code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
|---|---|---|---|---|---|
import {
AppState
} from 'react-native';
import BackgroundTimer from 'react-native-background-timer';
import * as AppStateActionCreators from 'app/redux/shared_actions/AppStateActionCreators';
var state = AppState.currentState;
export default function (store) {
AppState.addEventListener('change', (nextAppState) => {
if (state.match(/inactive|background/) && nextAppState === 'active') {
store.dispatch(AppStateActionCreators.unlockedScreen());
} else if (state.match(/active/) && nextAppState === 'background') {
store.dispatch(AppStateActionCreators.lockedScreen());
} else if (state.match(/active/) && nextAppState === 'inactive') {
store.dispatch(AppStateActionCreators.multiTask());
}
state = nextAppState;
});
};
|
squatsandsciencelabs/OpenBarbellApp
|
app/services/AppState.js
|
JavaScript
|
mit
| 811
|
// This file is generated. Do not edit
// to generate this file I moved the extends of Response into Response because they are not supported
// @generated
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
#[derive(Clone,Default)]
pub struct Response {
// message fields
request_id: ::protobuf::SingularField<::std::string::String>,
errorResponse: ::protobuf::SingularPtrField<ErrorResponse>,
takeResponse: ::protobuf::SingularPtrField<TakeResponse>,
putResponse: ::protobuf::SingularPtrField<PutResponse>,
statusResponse: ::protobuf::SingularPtrField<StatusResponse>,
pongResponse: ::protobuf::SingularPtrField<PongResponse>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::std::cell::Cell<u32>,
}
// see codegen.rs for the explanation why impl Sync explicitly
unsafe impl ::std::marker::Sync for Response {}
impl Response {
pub fn new() -> Response {
::std::default::Default::default()
}
pub fn default_instance() -> &'static Response {
static mut instance: ::protobuf::lazy::Lazy<Response> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Response,
};
unsafe {
instance.get(|| {
Response {
request_id: ::protobuf::SingularField::none(),
errorResponse: ::protobuf::SingularPtrField::none(),
takeResponse: ::protobuf::SingularPtrField::none(),
putResponse: ::protobuf::SingularPtrField::none(),
statusResponse: ::protobuf::SingularPtrField::none(),
pongResponse: ::protobuf::SingularPtrField::none(),
unknown_fields: ::protobuf::UnknownFields::new(),
cached_size: ::std::cell::Cell::new(0),
}
})
}
}
// required string request_id = 1;
pub fn clear_request_id(&mut self) {
self.request_id.clear();
}
pub fn has_request_id(&self) -> bool {
self.request_id.is_some()
}
// Param is passed by value, moved
pub fn set_request_id(&mut self, v: ::std::string::String) {
self.request_id = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_request_id(&mut self) -> &mut ::std::string::String {
if self.request_id.is_none() {
self.request_id.set_default();
};
self.request_id.as_mut().unwrap()
}
// Take field
pub fn take_request_id(&mut self) -> ::std::string::String {
self.request_id.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_request_id(&self) -> &str {
match self.request_id.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional .limitd.ErrorResponse errorResponse = 100;
pub fn clear_errorResponse(&mut self) {
self.errorResponse.clear();
}
pub fn has_errorResponse(&self) -> bool {
self.errorResponse.is_some()
}
// Param is passed by value, moved
pub fn set_errorResponse(&mut self, v: ErrorResponse) {
self.errorResponse = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_errorResponse(&mut self) -> &mut ErrorResponse {
if self.errorResponse.is_none() {
self.errorResponse.set_default();
};
self.errorResponse.as_mut().unwrap()
}
// Take field
pub fn take_errorResponse(&mut self) -> ErrorResponse {
self.errorResponse.take().unwrap_or_else(|| ErrorResponse::new())
}
pub fn get_errorResponse(&self) -> &ErrorResponse {
self.errorResponse.as_ref().unwrap_or_else(|| ErrorResponse::default_instance())
}
// optional .limitd.TakeResponse takeResponse = 101;
pub fn clear_takeResponse(&mut self) {
self.takeResponse.clear();
}
pub fn has_takeResponse(&self) -> bool {
self.takeResponse.is_some()
}
// Param is passed by value, moved
pub fn set_takeResponse(&mut self, v: TakeResponse) {
self.takeResponse = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_takeResponse(&mut self) -> &mut TakeResponse {
if self.takeResponse.is_none() {
self.takeResponse.set_default();
};
self.takeResponse.as_mut().unwrap()
}
// Take field
pub fn take_takeResponse(&mut self) -> TakeResponse {
self.takeResponse.take().unwrap_or_else(|| TakeResponse::new())
}
pub fn get_takeResponse(&self) -> &TakeResponse {
self.takeResponse.as_ref().unwrap_or_else(|| TakeResponse::default_instance())
}
// optional .limitd.PutResponse putResponse = 102;
pub fn clear_putResponse(&mut self) {
self.putResponse.clear();
}
pub fn has_putResponse(&self) -> bool {
self.putResponse.is_some()
}
// Param is passed by value, moved
pub fn set_putResponse(&mut self, v: PutResponse) {
self.putResponse = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_putResponse(&mut self) -> &mut PutResponse {
if self.putResponse.is_none() {
self.putResponse.set_default();
};
self.putResponse.as_mut().unwrap()
}
// Take field
pub fn take_putResponse(&mut self) -> PutResponse {
self.putResponse.take().unwrap_or_else(|| PutResponse::new())
}
pub fn get_putResponse(&self) -> &PutResponse {
self.putResponse.as_ref().unwrap_or_else(|| PutResponse::default_instance())
}
// optional .limitd.StatusResponse statusResponse = 103;
pub fn clear_statusResponse(&mut self) {
self.statusResponse.clear();
}
pub fn has_statusResponse(&self) -> bool {
self.statusResponse.is_some()
}
// Param is passed by value, moved
pub fn set_statusResponse(&mut self, v: StatusResponse) {
self.statusResponse = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_statusResponse(&mut self) -> &mut StatusResponse {
if self.statusResponse.is_none() {
self.statusResponse.set_default();
};
self.statusResponse.as_mut().unwrap()
}
// Take field
pub fn take_statusResponse(&mut self) -> StatusResponse {
self.statusResponse.take().unwrap_or_else(|| StatusResponse::new())
}
pub fn get_statusResponse(&self) -> &StatusResponse {
self.statusResponse.as_ref().unwrap_or_else(|| StatusResponse::default_instance())
}
// optional .limitd.PongResponse pongResponse = 104;
pub fn clear_pongResponse(&mut self) {
self.pongResponse.clear();
}
pub fn has_pongResponse(&self) -> bool {
self.pongResponse.is_some()
}
// Param is passed by value, moved
pub fn set_pongResponse(&mut self, v: PongResponse) {
self.pongResponse = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_pongResponse(&mut self) -> &mut PongResponse {
if self.pongResponse.is_none() {
self.pongResponse.set_default();
};
self.pongResponse.as_mut().unwrap()
}
// Take field
pub fn take_pongResponse(&mut self) -> PongResponse {
self.pongResponse.take().unwrap_or_else(|| PongResponse::new())
}
pub fn get_pongResponse(&self) -> &PongResponse {
self.pongResponse.as_ref().unwrap_or_else(|| PongResponse::default_instance())
}
}
impl ::protobuf::Message for Response {
fn is_initialized(&self) -> bool {
if self.request_id.is_none() {
return false;
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !try!(is.eof()) {
let (field_number, wire_type) = try!(is.read_tag_unpack());
match field_number {
1 => {
try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.request_id));
},
100 => {
try!(::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.errorResponse));
},
101 => {
try!(::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.takeResponse));
},
102 => {
try!(::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.putResponse));
},
103 => {
try!(::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.statusResponse));
},
104 => {
try!(::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pongResponse));
},
_ => {
try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields()));
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.request_id {
my_size += ::protobuf::rt::string_size(1, &value);
};
for value in &self.errorResponse {
let len = value.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.takeResponse {
let len = value.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.putResponse {
let len = value.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.statusResponse {
let len = value.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.pongResponse {
let len = value.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.request_id.as_ref() {
try!(os.write_string(1, &v));
};
if let Some(v) = self.errorResponse.as_ref() {
try!(os.write_tag(100, ::protobuf::wire_format::WireTypeLengthDelimited));
try!(os.write_raw_varint32(v.get_cached_size()));
try!(v.write_to_with_cached_sizes(os));
};
if let Some(v) = self.takeResponse.as_ref() {
try!(os.write_tag(101, ::protobuf::wire_format::WireTypeLengthDelimited));
try!(os.write_raw_varint32(v.get_cached_size()));
try!(v.write_to_with_cached_sizes(os));
};
if let Some(v) = self.putResponse.as_ref() {
try!(os.write_tag(102, ::protobuf::wire_format::WireTypeLengthDelimited));
try!(os.write_raw_varint32(v.get_cached_size()));
try!(v.write_to_with_cached_sizes(os));
};
if let Some(v) = self.statusResponse.as_ref() {
try!(os.write_tag(103, ::protobuf::wire_format::WireTypeLengthDelimited));
try!(os.write_raw_varint32(v.get_cached_size()));
try!(v.write_to_with_cached_sizes(os));
};
if let Some(v) = self.pongResponse.as_ref() {
try!(os.write_tag(104, ::protobuf::wire_format::WireTypeLengthDelimited));
try!(os.write_raw_varint32(v.get_cached_size()));
try!(v.write_to_with_cached_sizes(os));
};
try!(os.write_unknown_fields(self.get_unknown_fields()));
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn type_id(&self) -> ::std::any::TypeId {
::std::any::TypeId::of::<Response>()
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for Response {
fn new() -> Response {
Response::new()
}
fn descriptor_static(_: ::std::option::Option<Response>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor(
"request_id",
Response::has_request_id,
Response::get_request_id,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor(
"errorResponse",
Response::has_errorResponse,
Response::get_errorResponse,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor(
"takeResponse",
Response::has_takeResponse,
Response::get_takeResponse,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor(
"putResponse",
Response::has_putResponse,
Response::get_putResponse,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor(
"statusResponse",
Response::has_statusResponse,
Response::get_statusResponse,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor(
"pongResponse",
Response::has_pongResponse,
Response::get_pongResponse,
));
::protobuf::reflect::MessageDescriptor::new::<Response>(
"Response",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for Response {
fn clear(&mut self) {
self.clear_request_id();
self.clear_errorResponse();
self.clear_takeResponse();
self.clear_putResponse();
self.clear_statusResponse();
self.clear_pongResponse();
self.unknown_fields.clear();
}
}
impl ::std::cmp::PartialEq for Response {
fn eq(&self, other: &Response) -> bool {
self.request_id == other.request_id &&
self.errorResponse == other.errorResponse &&
self.takeResponse == other.takeResponse &&
self.putResponse == other.putResponse &&
self.statusResponse == other.statusResponse &&
self.pongResponse == other.pongResponse &&
self.unknown_fields == other.unknown_fields
}
}
impl ::std::fmt::Debug for Response {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
#[derive(Clone,Default)]
pub struct ErrorResponse {
// message fields
field_type: ::std::option::Option<ErrorResponse_Type>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::std::cell::Cell<u32>,
}
// see codegen.rs for the explanation why impl Sync explicitly
unsafe impl ::std::marker::Sync for ErrorResponse {}
impl ErrorResponse {
pub fn new() -> ErrorResponse {
::std::default::Default::default()
}
pub fn default_instance() -> &'static ErrorResponse {
static mut instance: ::protobuf::lazy::Lazy<ErrorResponse> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ErrorResponse,
};
unsafe {
instance.get(|| {
ErrorResponse {
field_type: ::std::option::Option::None,
unknown_fields: ::protobuf::UnknownFields::new(),
cached_size: ::std::cell::Cell::new(0),
}
})
}
}
// required .limitd.ErrorResponse.Type type = 1;
pub fn clear_field_type(&mut self) {
self.field_type = ::std::option::Option::None;
}
pub fn has_field_type(&self) -> bool {
self.field_type.is_some()
}
// Param is passed by value, moved
pub fn set_field_type(&mut self, v: ErrorResponse_Type) {
self.field_type = ::std::option::Option::Some(v);
}
pub fn get_field_type(&self) -> ErrorResponse_Type {
self.field_type.unwrap_or(ErrorResponse_Type::UNKNOWN_BUCKET_TYPE)
}
}
impl ::protobuf::Message for ErrorResponse {
fn is_initialized(&self) -> bool {
if self.field_type.is_none() {
return false;
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !try!(is.eof()) {
let (field_number, wire_type) = try!(is.read_tag_unpack());
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_enum());
self.field_type = ::std::option::Option::Some(tmp);
},
_ => {
try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields()));
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.field_type {
my_size += ::protobuf::rt::enum_size(1, *value);
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.field_type {
try!(os.write_enum(1, v.value()));
};
try!(os.write_unknown_fields(self.get_unknown_fields()));
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn type_id(&self) -> ::std::any::TypeId {
::std::any::TypeId::of::<ErrorResponse>()
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for ErrorResponse {
fn new() -> ErrorResponse {
ErrorResponse::new()
}
fn descriptor_static(_: ::std::option::Option<ErrorResponse>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_enum_accessor(
"type",
ErrorResponse::has_field_type,
ErrorResponse::get_field_type,
));
::protobuf::reflect::MessageDescriptor::new::<ErrorResponse>(
"ErrorResponse",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for ErrorResponse {
fn clear(&mut self) {
self.clear_field_type();
self.unknown_fields.clear();
}
}
impl ::std::cmp::PartialEq for ErrorResponse {
fn eq(&self, other: &ErrorResponse) -> bool {
self.field_type == other.field_type &&
self.unknown_fields == other.unknown_fields
}
}
impl ::std::fmt::Debug for ErrorResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum ErrorResponse_Type {
UNKNOWN_BUCKET_TYPE = 1,
}
impl ::protobuf::ProtobufEnum for ErrorResponse_Type {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ErrorResponse_Type> {
match value {
1 => ::std::option::Option::Some(ErrorResponse_Type::UNKNOWN_BUCKET_TYPE),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [ErrorResponse_Type] = &[
ErrorResponse_Type::UNKNOWN_BUCKET_TYPE,
];
values
}
fn enum_descriptor_static(_: Option<ErrorResponse_Type>) -> &'static ::protobuf::reflect::EnumDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
};
unsafe {
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new("ErrorResponse_Type", file_descriptor_proto())
})
}
}
}
impl ::std::marker::Copy for ErrorResponse_Type {
}
#[derive(Clone,Default)]
pub struct TakeResponse {
// message fields
conformant: ::std::option::Option<bool>,
delayed: ::std::option::Option<bool>,
remaining: ::std::option::Option<i32>,
reset: ::std::option::Option<i32>,
limit: ::std::option::Option<i32>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::std::cell::Cell<u32>,
}
// see codegen.rs for the explanation why impl Sync explicitly
unsafe impl ::std::marker::Sync for TakeResponse {}
impl TakeResponse {
pub fn new() -> TakeResponse {
::std::default::Default::default()
}
pub fn default_instance() -> &'static TakeResponse {
static mut instance: ::protobuf::lazy::Lazy<TakeResponse> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const TakeResponse,
};
unsafe {
instance.get(|| {
TakeResponse {
conformant: ::std::option::Option::None,
delayed: ::std::option::Option::None,
remaining: ::std::option::Option::None,
reset: ::std::option::Option::None,
limit: ::std::option::Option::None,
unknown_fields: ::protobuf::UnknownFields::new(),
cached_size: ::std::cell::Cell::new(0),
}
})
}
}
// required bool conformant = 1;
pub fn clear_conformant(&mut self) {
self.conformant = ::std::option::Option::None;
}
pub fn has_conformant(&self) -> bool {
self.conformant.is_some()
}
// Param is passed by value, moved
pub fn set_conformant(&mut self, v: bool) {
self.conformant = ::std::option::Option::Some(v);
}
pub fn get_conformant(&self) -> bool {
self.conformant.unwrap_or(false)
}
// optional bool delayed = 2;
pub fn clear_delayed(&mut self) {
self.delayed = ::std::option::Option::None;
}
pub fn has_delayed(&self) -> bool {
self.delayed.is_some()
}
// Param is passed by value, moved
pub fn set_delayed(&mut self, v: bool) {
self.delayed = ::std::option::Option::Some(v);
}
pub fn get_delayed(&self) -> bool {
self.delayed.unwrap_or(false)
}
// required int32 remaining = 3;
pub fn clear_remaining(&mut self) {
self.remaining = ::std::option::Option::None;
}
pub fn has_remaining(&self) -> bool {
self.remaining.is_some()
}
// Param is passed by value, moved
pub fn set_remaining(&mut self, v: i32) {
self.remaining = ::std::option::Option::Some(v);
}
pub fn get_remaining(&self) -> i32 {
self.remaining.unwrap_or(0)
}
// required int32 reset = 4;
pub fn clear_reset(&mut self) {
self.reset = ::std::option::Option::None;
}
pub fn has_reset(&self) -> bool {
self.reset.is_some()
}
// Param is passed by value, moved
pub fn set_reset(&mut self, v: i32) {
self.reset = ::std::option::Option::Some(v);
}
pub fn get_reset(&self) -> i32 {
self.reset.unwrap_or(0)
}
// required int32 limit = 5;
pub fn clear_limit(&mut self) {
self.limit = ::std::option::Option::None;
}
pub fn has_limit(&self) -> bool {
self.limit.is_some()
}
// Param is passed by value, moved
pub fn set_limit(&mut self, v: i32) {
self.limit = ::std::option::Option::Some(v);
}
pub fn get_limit(&self) -> i32 {
self.limit.unwrap_or(0)
}
}
impl ::protobuf::Message for TakeResponse {
fn is_initialized(&self) -> bool {
if self.conformant.is_none() {
return false;
};
if self.remaining.is_none() {
return false;
};
if self.reset.is_none() {
return false;
};
if self.limit.is_none() {
return false;
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !try!(is.eof()) {
let (field_number, wire_type) = try!(is.read_tag_unpack());
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_bool());
self.conformant = ::std::option::Option::Some(tmp);
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_bool());
self.delayed = ::std::option::Option::Some(tmp);
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.remaining = ::std::option::Option::Some(tmp);
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.reset = ::std::option::Option::Some(tmp);
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.limit = ::std::option::Option::Some(tmp);
},
_ => {
try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields()));
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.conformant.is_some() {
my_size += 2;
};
if self.delayed.is_some() {
my_size += 2;
};
for value in &self.remaining {
my_size += ::protobuf::rt::value_size(3, *value, ::protobuf::wire_format::WireTypeVarint);
};
for value in &self.reset {
my_size += ::protobuf::rt::value_size(4, *value, ::protobuf::wire_format::WireTypeVarint);
};
for value in &self.limit {
my_size += ::protobuf::rt::value_size(5, *value, ::protobuf::wire_format::WireTypeVarint);
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.conformant {
try!(os.write_bool(1, v));
};
if let Some(v) = self.delayed {
try!(os.write_bool(2, v));
};
if let Some(v) = self.remaining {
try!(os.write_int32(3, v));
};
if let Some(v) = self.reset {
try!(os.write_int32(4, v));
};
if let Some(v) = self.limit {
try!(os.write_int32(5, v));
};
try!(os.write_unknown_fields(self.get_unknown_fields()));
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn type_id(&self) -> ::std::any::TypeId {
::std::any::TypeId::of::<TakeResponse>()
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for TakeResponse {
fn new() -> TakeResponse {
TakeResponse::new()
}
fn descriptor_static(_: ::std::option::Option<TakeResponse>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor(
"conformant",
TakeResponse::has_conformant,
TakeResponse::get_conformant,
));
fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor(
"delayed",
TakeResponse::has_delayed,
TakeResponse::get_delayed,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"remaining",
TakeResponse::has_remaining,
TakeResponse::get_remaining,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"reset",
TakeResponse::has_reset,
TakeResponse::get_reset,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"limit",
TakeResponse::has_limit,
TakeResponse::get_limit,
));
::protobuf::reflect::MessageDescriptor::new::<TakeResponse>(
"TakeResponse",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for TakeResponse {
fn clear(&mut self) {
self.clear_conformant();
self.clear_delayed();
self.clear_remaining();
self.clear_reset();
self.clear_limit();
self.unknown_fields.clear();
}
}
impl ::std::cmp::PartialEq for TakeResponse {
fn eq(&self, other: &TakeResponse) -> bool {
self.conformant == other.conformant &&
self.delayed == other.delayed &&
self.remaining == other.remaining &&
self.reset == other.reset &&
self.limit == other.limit &&
self.unknown_fields == other.unknown_fields
}
}
impl ::std::fmt::Debug for TakeResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
#[derive(Clone,Default)]
pub struct PutResponse {
// message fields
remaining: ::std::option::Option<i32>,
reset: ::std::option::Option<i32>,
limit: ::std::option::Option<i32>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::std::cell::Cell<u32>,
}
// see codegen.rs for the explanation why impl Sync explicitly
unsafe impl ::std::marker::Sync for PutResponse {}
impl PutResponse {
pub fn new() -> PutResponse {
::std::default::Default::default()
}
pub fn default_instance() -> &'static PutResponse {
static mut instance: ::protobuf::lazy::Lazy<PutResponse> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const PutResponse,
};
unsafe {
instance.get(|| {
PutResponse {
remaining: ::std::option::Option::None,
reset: ::std::option::Option::None,
limit: ::std::option::Option::None,
unknown_fields: ::protobuf::UnknownFields::new(),
cached_size: ::std::cell::Cell::new(0),
}
})
}
}
// required int32 remaining = 1;
pub fn clear_remaining(&mut self) {
self.remaining = ::std::option::Option::None;
}
pub fn has_remaining(&self) -> bool {
self.remaining.is_some()
}
// Param is passed by value, moved
pub fn set_remaining(&mut self, v: i32) {
self.remaining = ::std::option::Option::Some(v);
}
pub fn get_remaining(&self) -> i32 {
self.remaining.unwrap_or(0)
}
// required int32 reset = 2;
pub fn clear_reset(&mut self) {
self.reset = ::std::option::Option::None;
}
pub fn has_reset(&self) -> bool {
self.reset.is_some()
}
// Param is passed by value, moved
pub fn set_reset(&mut self, v: i32) {
self.reset = ::std::option::Option::Some(v);
}
pub fn get_reset(&self) -> i32 {
self.reset.unwrap_or(0)
}
// required int32 limit = 3;
pub fn clear_limit(&mut self) {
self.limit = ::std::option::Option::None;
}
pub fn has_limit(&self) -> bool {
self.limit.is_some()
}
// Param is passed by value, moved
pub fn set_limit(&mut self, v: i32) {
self.limit = ::std::option::Option::Some(v);
}
pub fn get_limit(&self) -> i32 {
self.limit.unwrap_or(0)
}
}
impl ::protobuf::Message for PutResponse {
fn is_initialized(&self) -> bool {
if self.remaining.is_none() {
return false;
};
if self.reset.is_none() {
return false;
};
if self.limit.is_none() {
return false;
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !try!(is.eof()) {
let (field_number, wire_type) = try!(is.read_tag_unpack());
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.remaining = ::std::option::Option::Some(tmp);
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.reset = ::std::option::Option::Some(tmp);
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.limit = ::std::option::Option::Some(tmp);
},
_ => {
try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields()));
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.remaining {
my_size += ::protobuf::rt::value_size(1, *value, ::protobuf::wire_format::WireTypeVarint);
};
for value in &self.reset {
my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint);
};
for value in &self.limit {
my_size += ::protobuf::rt::value_size(3, *value, ::protobuf::wire_format::WireTypeVarint);
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.remaining {
try!(os.write_int32(1, v));
};
if let Some(v) = self.reset {
try!(os.write_int32(2, v));
};
if let Some(v) = self.limit {
try!(os.write_int32(3, v));
};
try!(os.write_unknown_fields(self.get_unknown_fields()));
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn type_id(&self) -> ::std::any::TypeId {
::std::any::TypeId::of::<PutResponse>()
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for PutResponse {
fn new() -> PutResponse {
PutResponse::new()
}
fn descriptor_static(_: ::std::option::Option<PutResponse>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"remaining",
PutResponse::has_remaining,
PutResponse::get_remaining,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"reset",
PutResponse::has_reset,
PutResponse::get_reset,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"limit",
PutResponse::has_limit,
PutResponse::get_limit,
));
::protobuf::reflect::MessageDescriptor::new::<PutResponse>(
"PutResponse",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for PutResponse {
fn clear(&mut self) {
self.clear_remaining();
self.clear_reset();
self.clear_limit();
self.unknown_fields.clear();
}
}
impl ::std::cmp::PartialEq for PutResponse {
fn eq(&self, other: &PutResponse) -> bool {
self.remaining == other.remaining &&
self.reset == other.reset &&
self.limit == other.limit &&
self.unknown_fields == other.unknown_fields
}
}
impl ::std::fmt::Debug for PutResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
#[derive(Clone,Default)]
pub struct StatusResponseItem {
// message fields
instance: ::protobuf::SingularField<::std::string::String>,
remaining: ::std::option::Option<i32>,
reset: ::std::option::Option<i32>,
limit: ::std::option::Option<i32>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::std::cell::Cell<u32>,
}
// see codegen.rs for the explanation why impl Sync explicitly
unsafe impl ::std::marker::Sync for StatusResponseItem {}
impl StatusResponseItem {
pub fn new() -> StatusResponseItem {
::std::default::Default::default()
}
pub fn default_instance() -> &'static StatusResponseItem {
static mut instance: ::protobuf::lazy::Lazy<StatusResponseItem> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const StatusResponseItem,
};
unsafe {
instance.get(|| {
StatusResponseItem {
instance: ::protobuf::SingularField::none(),
remaining: ::std::option::Option::None,
reset: ::std::option::Option::None,
limit: ::std::option::Option::None,
unknown_fields: ::protobuf::UnknownFields::new(),
cached_size: ::std::cell::Cell::new(0),
}
})
}
}
// required string instance = 1;
pub fn clear_instance(&mut self) {
self.instance.clear();
}
pub fn has_instance(&self) -> bool {
self.instance.is_some()
}
// Param is passed by value, moved
pub fn set_instance(&mut self, v: ::std::string::String) {
self.instance = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_instance(&mut self) -> &mut ::std::string::String {
if self.instance.is_none() {
self.instance.set_default();
};
self.instance.as_mut().unwrap()
}
// Take field
pub fn take_instance(&mut self) -> ::std::string::String {
self.instance.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_instance(&self) -> &str {
match self.instance.as_ref() {
Some(v) => &v,
None => "",
}
}
// required int32 remaining = 2;
pub fn clear_remaining(&mut self) {
self.remaining = ::std::option::Option::None;
}
pub fn has_remaining(&self) -> bool {
self.remaining.is_some()
}
// Param is passed by value, moved
pub fn set_remaining(&mut self, v: i32) {
self.remaining = ::std::option::Option::Some(v);
}
pub fn get_remaining(&self) -> i32 {
self.remaining.unwrap_or(0)
}
// required int32 reset = 3;
pub fn clear_reset(&mut self) {
self.reset = ::std::option::Option::None;
}
pub fn has_reset(&self) -> bool {
self.reset.is_some()
}
// Param is passed by value, moved
pub fn set_reset(&mut self, v: i32) {
self.reset = ::std::option::Option::Some(v);
}
pub fn get_reset(&self) -> i32 {
self.reset.unwrap_or(0)
}
// required int32 limit = 4;
pub fn clear_limit(&mut self) {
self.limit = ::std::option::Option::None;
}
pub fn has_limit(&self) -> bool {
self.limit.is_some()
}
// Param is passed by value, moved
pub fn set_limit(&mut self, v: i32) {
self.limit = ::std::option::Option::Some(v);
}
pub fn get_limit(&self) -> i32 {
self.limit.unwrap_or(0)
}
}
impl ::protobuf::Message for StatusResponseItem {
fn is_initialized(&self) -> bool {
if self.instance.is_none() {
return false;
};
if self.remaining.is_none() {
return false;
};
if self.reset.is_none() {
return false;
};
if self.limit.is_none() {
return false;
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !try!(is.eof()) {
let (field_number, wire_type) = try!(is.read_tag_unpack());
match field_number {
1 => {
try!(::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.instance));
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.remaining = ::std::option::Option::Some(tmp);
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.reset = ::std::option::Option::Some(tmp);
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
};
let tmp = try!(is.read_int32());
self.limit = ::std::option::Option::Some(tmp);
},
_ => {
try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields()));
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.instance {
my_size += ::protobuf::rt::string_size(1, &value);
};
for value in &self.remaining {
my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint);
};
for value in &self.reset {
my_size += ::protobuf::rt::value_size(3, *value, ::protobuf::wire_format::WireTypeVarint);
};
for value in &self.limit {
my_size += ::protobuf::rt::value_size(4, *value, ::protobuf::wire_format::WireTypeVarint);
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.instance.as_ref() {
try!(os.write_string(1, &v));
};
if let Some(v) = self.remaining {
try!(os.write_int32(2, v));
};
if let Some(v) = self.reset {
try!(os.write_int32(3, v));
};
if let Some(v) = self.limit {
try!(os.write_int32(4, v));
};
try!(os.write_unknown_fields(self.get_unknown_fields()));
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn type_id(&self) -> ::std::any::TypeId {
::std::any::TypeId::of::<StatusResponseItem>()
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for StatusResponseItem {
fn new() -> StatusResponseItem {
StatusResponseItem::new()
}
fn descriptor_static(_: ::std::option::Option<StatusResponseItem>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor(
"instance",
StatusResponseItem::has_instance,
StatusResponseItem::get_instance,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"remaining",
StatusResponseItem::has_remaining,
StatusResponseItem::get_remaining,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"reset",
StatusResponseItem::has_reset,
StatusResponseItem::get_reset,
));
fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor(
"limit",
StatusResponseItem::has_limit,
StatusResponseItem::get_limit,
));
::protobuf::reflect::MessageDescriptor::new::<StatusResponseItem>(
"StatusResponseItem",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for StatusResponseItem {
fn clear(&mut self) {
self.clear_instance();
self.clear_remaining();
self.clear_reset();
self.clear_limit();
self.unknown_fields.clear();
}
}
impl ::std::cmp::PartialEq for StatusResponseItem {
fn eq(&self, other: &StatusResponseItem) -> bool {
self.instance == other.instance &&
self.remaining == other.remaining &&
self.reset == other.reset &&
self.limit == other.limit &&
self.unknown_fields == other.unknown_fields
}
}
impl ::std::fmt::Debug for StatusResponseItem {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
#[derive(Clone,Default)]
pub struct StatusResponse {
// message fields
items: ::protobuf::RepeatedField<StatusResponseItem>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::std::cell::Cell<u32>,
}
// see codegen.rs for the explanation why impl Sync explicitly
unsafe impl ::std::marker::Sync for StatusResponse {}
impl StatusResponse {
pub fn new() -> StatusResponse {
::std::default::Default::default()
}
pub fn default_instance() -> &'static StatusResponse {
static mut instance: ::protobuf::lazy::Lazy<StatusResponse> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const StatusResponse,
};
unsafe {
instance.get(|| {
StatusResponse {
items: ::protobuf::RepeatedField::new(),
unknown_fields: ::protobuf::UnknownFields::new(),
cached_size: ::std::cell::Cell::new(0),
}
})
}
}
// repeated .limitd.StatusResponseItem items = 1;
pub fn clear_items(&mut self) {
self.items.clear();
}
// Param is passed by value, moved
pub fn set_items(&mut self, v: ::protobuf::RepeatedField<StatusResponseItem>) {
self.items = v;
}
// Mutable pointer to the field.
pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<StatusResponseItem> {
&mut self.items
}
// Take field
pub fn take_items(&mut self) -> ::protobuf::RepeatedField<StatusResponseItem> {
::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
}
pub fn get_items(&self) -> &[StatusResponseItem] {
&self.items
}
}
impl ::protobuf::Message for StatusResponse {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !try!(is.eof()) {
let (field_number, wire_type) = try!(is.read_tag_unpack());
match field_number {
1 => {
try!(::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items));
},
_ => {
try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields()));
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.items {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
for v in &self.items {
try!(os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited));
try!(os.write_raw_varint32(v.get_cached_size()));
try!(v.write_to_with_cached_sizes(os));
};
try!(os.write_unknown_fields(self.get_unknown_fields()));
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn type_id(&self) -> ::std::any::TypeId {
::std::any::TypeId::of::<StatusResponse>()
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for StatusResponse {
fn new() -> StatusResponse {
StatusResponse::new()
}
fn descriptor_static(_: ::std::option::Option<StatusResponse>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_message_accessor(
"items",
StatusResponse::get_items,
));
::protobuf::reflect::MessageDescriptor::new::<StatusResponse>(
"StatusResponse",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for StatusResponse {
fn clear(&mut self) {
self.clear_items();
self.unknown_fields.clear();
}
}
impl ::std::cmp::PartialEq for StatusResponse {
fn eq(&self, other: &StatusResponse) -> bool {
self.items == other.items &&
self.unknown_fields == other.unknown_fields
}
}
impl ::std::fmt::Debug for StatusResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
#[derive(Clone,Default)]
pub struct PongResponse {
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::std::cell::Cell<u32>,
}
// see codegen.rs for the explanation why impl Sync explicitly
unsafe impl ::std::marker::Sync for PongResponse {}
impl PongResponse {
pub fn new() -> PongResponse {
::std::default::Default::default()
}
pub fn default_instance() -> &'static PongResponse {
static mut instance: ::protobuf::lazy::Lazy<PongResponse> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const PongResponse,
};
unsafe {
instance.get(|| {
PongResponse {
unknown_fields: ::protobuf::UnknownFields::new(),
cached_size: ::std::cell::Cell::new(0),
}
})
}
}
}
impl ::protobuf::Message for PongResponse {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !try!(is.eof()) {
let (field_number, wire_type) = try!(is.read_tag_unpack());
match field_number {
_ => {
try!(::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields()));
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
try!(os.write_unknown_fields(self.get_unknown_fields()));
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn type_id(&self) -> ::std::any::TypeId {
::std::any::TypeId::of::<PongResponse>()
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for PongResponse {
fn new() -> PongResponse {
PongResponse::new()
}
fn descriptor_static(_: ::std::option::Option<PongResponse>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new::<PongResponse>(
"PongResponse",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for PongResponse {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::cmp::PartialEq for PongResponse {
fn eq(&self, other: &PongResponse) -> bool {
self.unknown_fields == other.unknown_fields
}
}
impl ::std::fmt::Debug for PongResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
static file_descriptor_proto_data: &'static [u8] = &[
0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x73, 0x2f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x64, 0x22, 0xfe, 0x01, 0x0a, 0x08, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x12, 0x2c, 0x0a, 0x0d, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x64, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x64, 0x2e, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x74, 0x61, 0x6b,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x64, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x69, 0x6d,
0x69, 0x74, 0x64, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x2e, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x64,
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x2a, 0x0a, 0x0c, 0x70, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18,
0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x64, 0x2e, 0x50,
0x6f, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x0d, 0x45,
0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04,
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6c, 0x69, 0x6d,
0x69, 0x74, 0x64, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x1f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17,
0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x01, 0x22, 0x6b, 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x12, 0x16, 0x0a, 0x07, 0x64,
0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61,
0x6c, 0x73, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
0x18, 0x03, 0x20, 0x02, 0x28, 0x05, 0x12, 0x0d, 0x0a, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18,
0x04, 0x20, 0x02, 0x28, 0x05, 0x12, 0x0d, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05,
0x20, 0x02, 0x28, 0x05, 0x22, 0x3e, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x12, 0x0d, 0x0a, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18,
0x02, 0x20, 0x02, 0x28, 0x05, 0x12, 0x0d, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03,
0x20, 0x02, 0x28, 0x05, 0x22, 0x57, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x08, 0x69, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x12, 0x11, 0x0a, 0x09,
0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x12,
0x0d, 0x0a, 0x05, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x05, 0x12, 0x0d,
0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x02, 0x28, 0x05, 0x22, 0x3b, 0x0a,
0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x29, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x6f,
0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x85, 0x0d, 0x0a, 0x06, 0x12,
0x04, 0x00, 0x00, 0x30, 0x01, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03, 0x00, 0x08, 0x0e, 0x0a,
0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x02, 0x00, 0x09, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04,
0x00, 0x01, 0x12, 0x03, 0x02, 0x08, 0x10, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12,
0x03, 0x03, 0x02, 0x21, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x04, 0x12, 0x03, 0x03,
0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x03, 0x0b, 0x11,
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x03, 0x12, 0x1c, 0x0a, 0x0c,
0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x03, 0x1f, 0x20, 0x0a, 0x0b, 0x0a, 0x04,
0x04, 0x00, 0x02, 0x01, 0x12, 0x03, 0x04, 0x02, 0x2d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02,
0x01, 0x04, 0x12, 0x03, 0x04, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x06,
0x12, 0x03, 0x04, 0x0b, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03,
0x04, 0x19, 0x26, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x04, 0x29,
0x2c, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, 0x05, 0x02, 0x2b, 0x0a, 0x0c,
0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x04, 0x12, 0x03, 0x05, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05,
0x04, 0x00, 0x02, 0x02, 0x06, 0x12, 0x03, 0x05, 0x0b, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00,
0x02, 0x02, 0x01, 0x12, 0x03, 0x05, 0x18, 0x24, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02,
0x03, 0x12, 0x03, 0x05, 0x27, 0x2a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x03, 0x12, 0x03,
0x06, 0x04, 0x2b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x04, 0x12, 0x03, 0x06, 0x04,
0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x06, 0x12, 0x03, 0x06, 0x0d, 0x18, 0x0a,
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x01, 0x12, 0x03, 0x06, 0x19, 0x24, 0x0a, 0x0c, 0x0a,
0x05, 0x04, 0x00, 0x02, 0x03, 0x03, 0x12, 0x03, 0x06, 0x27, 0x2a, 0x0a, 0x0b, 0x0a, 0x04, 0x04,
0x00, 0x02, 0x04, 0x12, 0x03, 0x07, 0x04, 0x31, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x04,
0x04, 0x12, 0x03, 0x07, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x04, 0x06, 0x12,
0x03, 0x07, 0x0d, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x04, 0x01, 0x12, 0x03, 0x07,
0x1c, 0x2a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x04, 0x03, 0x12, 0x03, 0x07, 0x2d, 0x30,
0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x05, 0x12, 0x03, 0x08, 0x04, 0x2d, 0x0a, 0x0c, 0x0a,
0x05, 0x04, 0x00, 0x02, 0x05, 0x04, 0x12, 0x03, 0x08, 0x04, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
0x00, 0x02, 0x05, 0x06, 0x12, 0x03, 0x08, 0x0d, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02,
0x05, 0x01, 0x12, 0x03, 0x08, 0x1a, 0x26, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x05, 0x03,
0x12, 0x03, 0x08, 0x29, 0x2c, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x04, 0x0b, 0x00, 0x11,
0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x0b, 0x08, 0x15, 0x0a, 0x0c, 0x0a,
0x04, 0x04, 0x01, 0x04, 0x00, 0x12, 0x04, 0x0c, 0x02, 0x0e, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
0x01, 0x04, 0x00, 0x01, 0x12, 0x03, 0x0c, 0x07, 0x0b, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x01, 0x04,
0x00, 0x02, 0x00, 0x12, 0x03, 0x0d, 0x04, 0x1c, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x01, 0x04, 0x00,
0x02, 0x00, 0x01, 0x12, 0x03, 0x0d, 0x04, 0x17, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x01, 0x04, 0x00,
0x02, 0x00, 0x02, 0x12, 0x03, 0x0d, 0x1a, 0x1b, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x00,
0x12, 0x03, 0x10, 0x02, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x04, 0x12, 0x03,
0x10, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x06, 0x12, 0x03, 0x10, 0x0b,
0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x10, 0x10, 0x14, 0x0a,
0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x10, 0x17, 0x18, 0x0a, 0x0a, 0x0a,
0x02, 0x04, 0x02, 0x12, 0x04, 0x13, 0x00, 0x1a, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01,
0x12, 0x03, 0x13, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x14,
0x02, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x14, 0x02, 0x0a,
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x05, 0x12, 0x03, 0x14, 0x0b, 0x0f, 0x0a, 0x0c,
0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x14, 0x10, 0x1a, 0x0a, 0x0c, 0x0a, 0x05,
0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x14, 0x1d, 0x1e, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02,
0x02, 0x01, 0x12, 0x03, 0x15, 0x02, 0x2e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x04,
0x12, 0x03, 0x15, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x05, 0x12, 0x03,
0x15, 0x0b, 0x0f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x01, 0x12, 0x03, 0x15, 0x10,
0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x03, 0x12, 0x03, 0x15, 0x1a, 0x1b, 0x0a,
0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x08, 0x12, 0x03, 0x15, 0x1c, 0x2d, 0x0a, 0x0c, 0x0a,
0x05, 0x04, 0x02, 0x02, 0x01, 0x07, 0x12, 0x03, 0x15, 0x27, 0x2c, 0x0a, 0x0b, 0x0a, 0x04, 0x04,
0x02, 0x02, 0x02, 0x12, 0x03, 0x17, 0x02, 0x1f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02,
0x04, 0x12, 0x03, 0x17, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x05, 0x12,
0x03, 0x17, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x01, 0x12, 0x03, 0x17,
0x11, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x03, 0x12, 0x03, 0x17, 0x1d, 0x1e,
0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x03, 0x12, 0x03, 0x18, 0x02, 0x1b, 0x0a, 0x0c, 0x0a,
0x05, 0x04, 0x02, 0x02, 0x03, 0x04, 0x12, 0x03, 0x18, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
0x02, 0x02, 0x03, 0x05, 0x12, 0x03, 0x18, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02,
0x03, 0x01, 0x12, 0x03, 0x18, 0x11, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x03, 0x03,
0x12, 0x03, 0x18, 0x19, 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x04, 0x12, 0x03, 0x19,
0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x04, 0x04, 0x12, 0x03, 0x19, 0x02, 0x0a,
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x04, 0x05, 0x12, 0x03, 0x19, 0x0b, 0x10, 0x0a, 0x0c,
0x0a, 0x05, 0x04, 0x02, 0x02, 0x04, 0x01, 0x12, 0x03, 0x19, 0x11, 0x16, 0x0a, 0x0c, 0x0a, 0x05,
0x04, 0x02, 0x02, 0x04, 0x03, 0x12, 0x03, 0x19, 0x19, 0x1a, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03,
0x12, 0x04, 0x1c, 0x00, 0x21, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x1c,
0x08, 0x13, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x00, 0x12, 0x03, 0x1e, 0x02, 0x1f, 0x0a,
0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x04, 0x12, 0x03, 0x1e, 0x02, 0x0a, 0x0a, 0x0c, 0x0a,
0x05, 0x04, 0x03, 0x02, 0x00, 0x05, 0x12, 0x03, 0x1e, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
0x03, 0x02, 0x00, 0x01, 0x12, 0x03, 0x1e, 0x11, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02,
0x00, 0x03, 0x12, 0x03, 0x1e, 0x1d, 0x1e, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x01, 0x12,
0x03, 0x1f, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x04, 0x12, 0x03, 0x1f,
0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x05, 0x12, 0x03, 0x1f, 0x0b, 0x10,
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x12, 0x03, 0x1f, 0x11, 0x16, 0x0a, 0x0c,
0x0a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x03, 0x12, 0x03, 0x1f, 0x19, 0x1a, 0x0a, 0x0b, 0x0a, 0x04,
0x04, 0x03, 0x02, 0x02, 0x12, 0x03, 0x20, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02,
0x02, 0x04, 0x12, 0x03, 0x20, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x02, 0x05,
0x12, 0x03, 0x20, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x02, 0x01, 0x12, 0x03,
0x20, 0x11, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x02, 0x03, 0x12, 0x03, 0x20, 0x19,
0x1a, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x04, 0x23, 0x00, 0x28, 0x01, 0x0a, 0x0a, 0x0a,
0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x23, 0x08, 0x1a, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02,
0x00, 0x12, 0x03, 0x24, 0x02, 0x20, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x04, 0x12,
0x03, 0x24, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x05, 0x12, 0x03, 0x24,
0x0b, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x01, 0x12, 0x03, 0x24, 0x12, 0x1a,
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x03, 0x12, 0x03, 0x24, 0x1e, 0x1f, 0x0a, 0x0b,
0x0a, 0x04, 0x04, 0x04, 0x02, 0x01, 0x12, 0x03, 0x25, 0x02, 0x20, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
0x04, 0x02, 0x01, 0x04, 0x12, 0x03, 0x25, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02,
0x01, 0x05, 0x12, 0x03, 0x25, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x01, 0x01,
0x12, 0x03, 0x25, 0x12, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x01, 0x03, 0x12, 0x03,
0x25, 0x1e, 0x1f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02, 0x02, 0x12, 0x03, 0x26, 0x02, 0x20,
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x02, 0x04, 0x12, 0x03, 0x26, 0x02, 0x0a, 0x0a, 0x0c,
0x0a, 0x05, 0x04, 0x04, 0x02, 0x02, 0x05, 0x12, 0x03, 0x26, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05,
0x04, 0x04, 0x02, 0x02, 0x01, 0x12, 0x03, 0x26, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04,
0x02, 0x02, 0x03, 0x12, 0x03, 0x26, 0x1e, 0x1f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x04, 0x02, 0x03,
0x12, 0x03, 0x27, 0x02, 0x20, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x03, 0x04, 0x12, 0x03,
0x27, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x03, 0x05, 0x12, 0x03, 0x27, 0x0b,
0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x03, 0x01, 0x12, 0x03, 0x27, 0x12, 0x17, 0x0a,
0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x03, 0x03, 0x12, 0x03, 0x27, 0x1e, 0x1f, 0x0a, 0x0a, 0x0a,
0x02, 0x04, 0x05, 0x12, 0x04, 0x2a, 0x00, 0x2d, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x05, 0x01,
0x12, 0x03, 0x2a, 0x08, 0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00, 0x12, 0x03, 0x2c,
0x02, 0x28, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x04, 0x12, 0x03, 0x2c, 0x02, 0x0a,
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x06, 0x12, 0x03, 0x2c, 0x0b, 0x1d, 0x0a, 0x0c,
0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2c, 0x1e, 0x23, 0x0a, 0x0c, 0x0a, 0x05,
0x04, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2c, 0x26, 0x27, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x06,
0x12, 0x04, 0x2f, 0x00, 0x30, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x06, 0x01, 0x12, 0x03, 0x2f,
0x08, 0x14,
];
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}
|
seppo0010/limitd-rs
|
src/protocol/pb/response.rs
|
Rust
|
mit
| 79,090
|
<!DOCTYPE html>
<html lang="en-us" dir="ltr" itemscope itemtype="http://schema.org/Article">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Quando Margot Encontra Margot</title>
<meta name="author" content="" />
<meta name="description"
content="A premissa do filme de Sophie Fillières (que dirige e escreve) não é nova, mas é colocada de maneira tão natural e bem-humorada que não importa muito. Sua Margot é uma versão reduzida de ser humano,..."/>
<meta name="yandex-verification" content="48a8210fc043c5e8" />
<meta name="generator" content="Hugo 0.54.0" />
<meta itemprop="name" content="Quando Margot Encontra Margot"/>
<meta itemprop="description"
content="A premissa do filme de Sophie Fillières (que dirige e escreve) não é nova, mas é colocada de maneira tão natural e bem-humorada que não importa muito. Sua Margot é uma versão reduzida de ser humano,..."/>
<meta itemprop="image"
content="/img/logo.svg"/>
<meta property="og:title" content="Quando Margot Encontra Margot"/>
<meta property="og:type"
content="article"/>
<meta property="og:url" content="http://www.cinetenisverde.com.br/quando-margot-encontra-margot/"/>
<meta property="og:image"
content="/img/logo.svg"/>
<meta property="og:description"
content="A premissa do filme de Sophie Fillières (que dirige e escreve) não é nova, mas é colocada de maneira tão natural e bem-humorada que não importa muito. Sua Margot é uma versão reduzida de ser humano,..."/>
<meta property="og:site_name" content="Cine Tênis Verde"/>
<meta property="article:published_time"
content="2019-03-20T15:08:12-03:00"/>
<meta property="article:section" content="post"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:site"
content=""/>
<meta name="twitter:title" content="Quando Margot Encontra Margot"/>
<meta name="twitter:description"
content="A premissa do filme de Sophie Fillières (que dirige e escreve) não é nova, mas é colocada de maneira tão natural e bem-humorada que não importa muito. Sua Margot é uma versão reduzida de ser humano,..."/>
<meta name="twitter:creator"
content=""/>
<meta name="twitter:image:src"
content="/img/logo.svg"/>
<link rel="stylesheet" type="text/css" href="/css/capsule.min.css"/>
<link rel="stylesheet" type="text/css" href="/css/custom.css"/>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-50557403-1', 'auto');
ga('send', 'pageview');
</script>
<link rel="apple-touch-icon" href="/img/apple-touch-icon.png"/>
<link rel="icon" href="/img/favicon.ico"/>
</head>
<body style="min-height:100vh;display:flex;flex-direction:column">
<nav class="navbar has-shadow is-white"
role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img alt="Brand" src="/img/brand.svg">
<div class="title is-4"> Cine Tênis Verde</div>
</a>
<label class="button navbar-burger is-white" for="navbar-burger-state">
<span></span>
<span></span>
<span></span>
</label>
</div>
<input type="checkbox" id="navbar-burger-state"/>
<div class="navbar-menu">
<div class="navbar-end">
<a href="/post"
class="navbar-item
">search
</a>
<a href="https://twitter.com/cinetenisverde"
class="navbar-item
">twitter
</a>
<a href="/index.xml"
class="navbar-item
">rss
</a>
</div>
</div>
</div>
</nav>
<section class="section" style="flex:1">
<div class="container">
<p class="title">Quando Margot Encontra Margot</p>
<p class="subtitle"><span class="entry-sidebar-stars">
★★★☆☆
</span>
Wanderley Caloni, <a href="https://github.com/Caloni/cinetenisverde/commits/master/content/post/quando-margot-encontra-margot.md">March 20, 2019</a></p>
<p><p>
<div class="content">
<p>A premissa do filme de Sophie Fillières (que dirige e escreve) não é nova, mas é colocada de maneira tão natural e bem-humorada que não importa muito. Sua Margot é uma versão reduzida de ser humano, cujas características são deduzidas por suas ações. O cinema francês tem muito disso. O que torna o filme aos poucos deceptionante é que a questão existencial de Margot vai sendo costurada com fios soltos demais para alguém que já sabe mais do seu futuro que qualquer pessoa jamais sonharia.</p>
<a href="https://www.imdb.com/title/tt6690176/mediaviewer/" target="ctvimg">Imagens</a> e créditos no <a title="IMDB: Internet Movie DataBase" href="http://www.imdb.com/title/tt6690176">IMDB</a>. O <a href="https://github.com/Caloni/cinetenisverde/tree/master/content/cinemaqui/quando-margot-encontra-margot.md">texto de estreia</a> será publicado no <a href="http://www.cinemaqui.com.br?s=Quando%20Margot%20Encontra%20Margot">CinemAqui</a>.
</div>
<span class="entry-sidebar-stars">
★★★☆☆
</span>
Quando Margot Encontra Margot ● La belle et la belle (França, 2018), escrito e dirigido por Sophie Fillières, com Sandrine Kiberlain, Agathe Bonitzer, Melvil Poupaud. ● Nota: 3/5. Categoria: movies. Visto em cabine de imprensa pelo cinemaqui. Publicado em 2019-03-20. Texto escrito por Wanderley Caloni.
<p><br>Quer <a href="https://twitter.com/search?q=@cinetenisverde Quando%20Margot%20Encontra%20Margot">comentar</a>?<br></p>
</div>
</section>
<section class="section">
<br>
<div class="container">
<div class="is-flex">
<span>
<a class="button">Share</a>
</span>
<span>
<a class="button"
href="https://www.facebook.com/sharer/sharer.php?u=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f">
<span class="icon"><i class="fa fa-facebook"></i></span>
</a>
<a class="button"
href="https://twitter.com/intent/tweet?url=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f&text=Quando%20Margot%20Encontra%20Margot">
<span class="icon"><i class="fa fa-twitter"></i></span>
</a>
<a class="button"
href="https://news.ycombinator.com/submitlink?u=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f">
<span class="icon"><i class="fa fa-hacker-news"></i></span>
</a>
<a class="button"
href="https://reddit.com/submit?url=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f&title=Quando%20Margot%20Encontra%20Margot">
<span class="icon"><i class="fa fa-reddit"></i></span>
</a>
<a class="button"
href="https://plus.google.com/share?url=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f">
<span class="icon"><i class="fa fa-google-plus"></i></span>
</a>
<a class="button"
href="https://www.linkedin.com/shareArticle?url=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f&title=Quando%20Margot%20Encontra%20Margot">
<span class="icon"><i class="fa fa-linkedin"></i></span>
</a>
<a class="button"
href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f&title=Quando%20Margot%20Encontra%20Margot&caption=">
<span class="icon"><i class="fa fa-tumblr"></i></span>
</a>
<a class="button"
href="https://pinterest.com/pin/create/bookmarklet/?media=%2fimg%2flogo.svg&url=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f&description=Quando%20Margot%20Encontra%20Margot">
<span class="icon"><i class="fa fa-pinterest"></i></span>
</a>
<a class="button"
href="whatsapp://send?text=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f">
<span class="icon"><i class="fa fa-whatsapp"></i></span>
</a>
<a class="button"
href="https://web.skype.com/share?url=http%3a%2f%2fwww.cinetenisverde.com.br%2fquando-margot-encontra-margot%2f">
<span class="icon"><i class="fa fa-skype"></i></span>
</a>
</span>
</div>
</div>
<br>
</section>
<footer class="footer">
<div class="container">
<nav class="level">
<div class="level-right has-text-centered">
<div class="level-item">
<a class="button" href="http://www.cinetenisverde.com.br/">
<span class="icon"><i class="fa fa-home"></i></span>
</a>
<a class="button" href="/post">
<span class="icon"><i class="fa fa-search"></i></span>
</a>
<a class="button" href="https://twitter.com/cinetenisverde">
<span class="icon"><i class="fa fa-twitter"></i></span>
</a>
<a class="button" href="/index.xml">
<span class="icon"><i class="fa fa-rss"></i></span>
</a>
</div>
</div>
</nav>
</div>
</footer>
</body>
</html>
|
cinetenisverde/cinetenisverde.github.io
|
quando-margot-encontra-margot/index.html
|
HTML
|
mit
| 10,296
|
using System;
using System.Collections.Generic;
public class IntervalTree
{
private class Node
{
internal Interval interval;
internal double max;
internal Node right;
internal Node left;
public Node(Interval interval)
{
this.interval = interval;
this.max = interval.Hi;
}
}
private Node root;
public void Insert(double lo, double hi)
{
this.root = this.Insert(this.root, lo, hi);
}
public void EachInOrder(Action<Interval> action)
{
EachInOrder(this.root, action);
}
public Interval SearchAny(double lo, double hi)
{
var current = this.root;
while (current != null && !current.interval.Intersects(lo, hi))
{
if (current.left != null && current.left.max > lo)
{
current = current.left;
}
else
{
current = current.right;
}
}
return current?.interval;
}
public IEnumerable<Interval> SearchAll(double lo, double hi)
{
List<Interval> result = new List<Interval>();
SearchAll(this.root, lo, hi, result);
return result;
}
private void SearchAll(Node node, double lo, double hi, List<Interval> result)
{
if (node == null)
{
return;
}
var goLeft = node.left != null && node.left.max > lo;
var goRight = node.right != null && node.right.interval.Lo < hi;
if (goLeft)
{
SearchAll(node.left, lo, hi, result);
}
if (node.interval.Intersects(lo, hi))
{
result.Add(node.interval);
}
if (goRight)
{
SearchAll(node.right, lo, hi, result);
}
}
private void EachInOrder(Node node, Action<Interval> action)
{
if (node == null)
{
return;
}
EachInOrder(node.left, action);
action(node.interval);
EachInOrder(node.right, action);
}
private Node Insert(Node node, double lo, double hi)
{
if (node == null)
{
return new Node(new Interval(lo, hi));
}
int cmp = lo.CompareTo(node.interval.Lo);
if (cmp < 0)
{
node.left = Insert(node.left, lo, hi);
}
else if (cmp > 0)
{
node.right = Insert(node.right, lo, hi);
}
this.UpdateMax(node);
return node;
}
private void UpdateMax(Node node)
{
Node maxChild = this.GetMax(node.left, node.right);
node.max = this.GetMax(node, maxChild).max;
}
private Node GetMax(Node a, Node b)
{
if (a == null)
{
return b;
}
if (b == null)
{
return a;
}
return a.max > b.max ? a : b;
}
}
|
metodiobetsanov/Tech-Module-CSharp
|
Data Structures/11. QUAD TREES, K-D TREES, INTERVAL TREES - Lab/IntervalTree/IntervalTree/IntervalTree.cs
|
C#
|
mit
| 2,951
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/favicon.ico" />
<link rel="apple-touch-icon" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/iosicon.png" />
<!-- DEVELOPMENT LESS -->
<!-- <link rel="stylesheet/less" href="css/photon.less" media="all" />
<link rel="stylesheet/less" href="css/photon-responsive.less" media="all" />
--> <!-- PRODUCTION CSS -->
<link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/css/css_compiled/photon-min.css?v1.1" media="all" />
<link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/css/css_compiled/photon-min-part2.css?v1.1" media="all" />
<link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/css/css_compiled/photon-responsive-min.css?v1.1" media="all" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie-only-min.css?v1.1" />
<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie8-only-min.css?v1.1" />
<script type="text/javascript" src="js/plugins/excanvas.js"></script>
<script type="text/javascript" src="js/plugins/html5shiv.js"></script>
<script type="text/javascript" src="js/plugins/respond.min.js"></script>
<script type="text/javascript" src="js/plugins/fixFontIcons.js"></script>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/modernizr.custom.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.pnotify.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/less-1.3.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/xbreadcrumbs.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.maskedinput-1.3.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.autotab-1.1b.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/charCount.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.textareaCounter.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/elrte.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/elrte.en.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/select2.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery-picklist.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/additional-methods.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.form.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.metadata.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.mockjax.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.rating.pack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/farbtastic.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.jstree.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.mCustomScrollbar.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.flot.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.flot.stack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.flot.pie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.flot.resize.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/raphael.2.1.0.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/justgage.1.0.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.clock.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.countdown.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.jqtweet.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/bootstrap-fileupload.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/prettify/prettify.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/bootstrapSwitch.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/plugins/mfupload.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/js/common.js"></script>
</head>
<body class="body-login">
<div class="nav-fixed-topright" style="visibility: hidden">
<ul class="nav nav-user-menu">
<li class="user-sub-menu-container">
<a href="javascript:;">
<i class="user-icon"></i><span class="nav-user-selection">Theme Options</span><i class="icon-menu-arrow"></i>
</a>
<ul class="nav user-sub-menu">
<li class="light">
<a href="javascript:;">
<i class='icon-photon stop'></i>Light Version
</a>
</li>
<li class="dark">
<a href="javascript:;">
<i class='icon-photon stop'></i>Dark Version
</a>
</li>
</ul>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon mail"></i>
</a>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon comment_alt2_stroke"></i>
<div class="notification-count">12</div>
</a>
</li>
</ul>
</div>
<script>
$(function(){
setTimeout(function(){
$('.nav-fixed-topright').removeAttr('style');
}, 300);
$(window).scroll(function(){
if($('.breadcrumb-container').length){
var scrollState = $(window).scrollTop();
if (scrollState > 0) $('.nav-fixed-topright').addClass('nav-released');
else $('.nav-fixed-topright').removeClass('nav-released')
}
});
$('.user-sub-menu-container').on('click', function(){
$(this).toggleClass('active-user-menu');
});
$('.user-sub-menu .light').on('click', function(){
if ($('body').is('.light-version')) return;
$('body').addClass('light-version');
setTimeout(function() {
$.cookie('themeColor', 'light', {
expires: 7,
path: '/'
});
}, 500);
});
$('.user-sub-menu .dark').on('click', function(){
if ($('body').is('.light-version')) {
$('body').removeClass('light-version');
$.cookie('themeColor', 'dark', {
expires: 7,
path: '/'
});
}
});
});
</script>
<div class="container-login">
<div class="form-centering-wrapper">
<div class="form-window-login">
<div class="form-window-login-logo">
<div class="login-logo">
<img src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/images/photon/login-logo@2x.png" alt="Photon UI"/>
</div>
<h2 class="login-title">Welcome to Photon UI!</h2>
<div class="login-member">Not a Member? <a href="raphael.2.1.0.min.js.html#">Sign Up »</a>
<a href="raphael.2.1.0.min.js.html#" class="btn btn-facebook"><i class="icon-fb"></i>Login with Facebook<i class="icon-fb-arrow"></i></a>
</div>
<div class="login-or">Or</div>
<div class="login-input-area">
<form method="POST" action="dashboard.php">
<span class="help-block">Login With Your Photon Account</span>
<input type="text" name="email" placeholder="Email">
<input type="password" name="password" placeholder="Password">
<button type="submit" class="btn btn-large btn-success btn-login">Login</button>
</form>
<a href="raphael.2.1.0.min.js.html#" class="forgot-pass">Forgot Your Password?</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1936460-27']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
|
user-tony/photon-rails
|
lib/assets/css/css_compiled/@{photonImagePath}plugins/elrte/css/css_compiled/js/plugins/prettify/js/bootstrap/js/plugins/raphael.2.1.0.min.js.html
|
HTML
|
mit
| 17,156
|
package org.vitrivr.cineast.standalone.run;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.vitrivr.cineast.standalone.config.Config;
import org.vitrivr.cineast.standalone.config.IngestConfig;
import java.io.File;
import java.io.IOException;
/**
* @author rgasser
* @version 1.0
* @created 13.01.17
*/
public class ExtractionDispatcher {
private static final Logger LOGGER = LogManager.getLogger();
/**
* ExtractionContextProvider used to setup the extraction.
*/
private IngestConfig context;
/**
* List of files due for extraction.
*/
private ExtractionContainerProvider pathProvider;
/**
* Reference to the thread that is being used to run the ExtractionFileHandler.
*/
private Thread fileHandlerThread;
private ExtractionItemProcessor handler;
private volatile boolean threadRunning = false;
public boolean initialize(ExtractionContainerProvider pathProvider,
IngestConfig context) throws IOException {
File outputLocation = Config.sharedConfig().getExtractor().getOutputLocation();
if (outputLocation == null) {
LOGGER.error("invalid output location specified in config");
return false;
}
outputLocation.mkdirs();
if (!outputLocation.canWrite()) {
LOGGER.error("cannot write to specified output location: '{}'",
outputLocation.getAbsolutePath());
return false;
}
this.pathProvider = pathProvider;
this.context = context;
if (this.fileHandlerThread == null) {
this.handler = new GenericExtractionItemHandler(this.pathProvider, this.context, this.context.getType());
this.fileHandlerThread = new Thread((GenericExtractionItemHandler) handler);
} else {
LOGGER.warn("You cannot initialize the current instance of ExtractionDispatcher again!");
}
return this.pathProvider.isOpen();
}
/**
* Starts extraction by dispatching a new ExtractionFileHandler thread.
*
* @throws IOException If an error occurs during pre-processing of the files.
*/
public synchronized void start() throws IOException {
if (fileHandlerThread != null && !threadRunning) {
this.fileHandlerThread.setName("extraction-file-handler-thread");
this.fileHandlerThread.start();
threadRunning = true;
} else {
LOGGER.warn("You cannot start the current instance of ExtractionDispatcher again!");
}
}
/**
* Blocks until the extraction process thread is completed.
*/
public synchronized void block() {
if (fileHandlerThread == null) {
LOGGER.warn("Tried to wait for extraction thread before extraction thread was initialized!");
return;
}
try {
fileHandlerThread.join();
} catch (InterruptedException e) {
LOGGER.error("Interrupted while waiting for extraction thread to complete!");
}
}
public void registerListener(ExtractionCompleteListener listener) {
if (this.fileHandlerThread == null) {
LOGGER.error("Could not register listener, no thread available");
throw new RuntimeException();
}
LOGGER.debug("Registering Listener {}", listener.getClass().getSimpleName());
handler.addExtractionCompleteListener(listener);
}
}
|
dbisUnibas/cineast
|
cineast-runtime/src/main/java/org/vitrivr/cineast/standalone/run/ExtractionDispatcher.java
|
Java
|
mit
| 3,242
|
// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2015/02/05 10:28
using DG.Tweening.Core.Enums;
using UnityEngine;
#pragma warning disable 1591
namespace DG.Tweening.Core
{
public class DOTweenSettings : ScriptableObject
{
public const string AssetName = "DOTweenSettings";
public bool useSafeMode = true;
public float timeScale = 1;
public bool useSmoothDeltaTime;
public float maxSmoothUnscaledTime = 0.15f; // Used if useSmoothDeltaTime is TRUE
public RewindCallbackMode rewindCallbackMode = RewindCallbackMode.FireIfPositionChanged;
public bool showUnityEditorReport;
public LogBehaviour logBehaviour = LogBehaviour.Default;
public bool drawGizmos = true;
public bool defaultRecyclable;
public AutoPlay defaultAutoPlay = AutoPlay.All;
public UpdateType defaultUpdateType;
public bool defaultTimeScaleIndependent;
public Ease defaultEaseType = Ease.OutQuad;
public float defaultEaseOvershootOrAmplitude = 1.70158f;
public float defaultEasePeriod = 0;
public bool defaultAutoKill = true;
public LoopType defaultLoopType = LoopType.Restart;
// Editor-only
public enum SettingsLocation
{
AssetsDirectory,
DOTweenDirectory,
DemigiantDirectory
}
public SettingsLocation storeSettingsLocation = SettingsLocation.AssetsDirectory;
// Editor-Only ► DOTween Inspector
public bool showPlayingTweens, showPausedTweens;
}
}
|
winddyhe/knight
|
knight-client/Packages/Knight-Lib/Knight.Framework.Tweening/Runtime/DOTween/Core/DOTweenSettings.cs
|
C#
|
mit
| 1,589
|
from . import _version
__version__ = _version.__version__
import os, math, pysam
from clint.textui import progress, puts_err
import sqlite3 as lite
import tempfile, warnings, pickle
def example_reads():
"""
returns the path to the example BAM file
"""
return os.path.join(os.path.join(os.path.dirname(__file__), "data"),"example.bam")
def example_regions():
"""
returns the path to the example BED file
"""
return os.path.join(os.path.join(os.path.dirname(__file__), "data"),"example.bed")
class BAMHandler(object):
"""
The object that provides the interface to DNase-seq data help in a BAM file
"""
def __init__(self, filePath, caching=True, chunkSize=1000, ATAC=False):
"""Initializes the BAMHandler with a BAM file
Args:
filePath (str): the path of a sorted, indexed BAM file from a DNase-seq experiment
Kwargs:
chunkSize (int): and int of the size of the regions to load if caching (default: 1000)
caching (bool): enables or disables read caching (default: True)
Raises:
IOError
"""
try:
self.samfile = pysam.Samfile(filePath)
except IOError:
errorString = "Unable to load BAM file:{0}".format(filePath)
raise IOError(errorString)
#Initialise the empty DNase cut cache with the chromosome names from the BAM file
self.purge_cache()
#Do not change the CHUNK_SIZE after object instantiation!
self.CHUNK_SIZE = chunkSize
self.CACHING = caching
if ATAC:
self.loffset = -5
self.roffset = +4
else:
self.loffset = 0
self.roffset = 0
def __addCutsToCache(self,chrom,start,end):
"""Loads reads from the BAM file into the cutCache. Will not check if reads are already there.
Args:
chrom (str): The chromosome
start (int): The start of the interval
end (int): The end of the interval
"""
for alignedread in self.samfile.fetch(chrom, max(start, 0), end):
if not alignedread.is_unmapped:
if alignedread.is_reverse:
a = int(alignedread.reference_end)
if a <= end +1:
self.cutCache[chrom]["-"][a] = self.cutCache[chrom]["-"].get(a, 0) + 1
else:
a = int(alignedread.reference_start) -1
if a >= start:
self.cutCache[chrom]["+"][a] = self.cutCache[chrom]["+"].get(a, 0) + 1
self.lookupCache[chrom].append(start)
def __lookupReadsUsingCache(self,startbp,endbp,chrom):
"""Looks up the DNase cut information from the cutCache and returns as a dictionary (private method)
Args:
startbp (int): The start of the interval
endbp (int): The end of the interval
chrom (str): The chromosome
"""
#Expand the region to the nearest CHUNK_SIZE and load these reads if they aren't in the cache
lbound = int(math.floor(startbp / float(self.CHUNK_SIZE)) * float(self.CHUNK_SIZE))
ubound = int(math.ceil(endbp / float(self.CHUNK_SIZE)) * float(self.CHUNK_SIZE))
for i in range(lbound,ubound,self.CHUNK_SIZE):
if i not in self.lookupCache[chrom]:
self.__addCutsToCache(chrom,i,i+self.CHUNK_SIZE)
#Fills in with zeroes where the hash table contains no information for each strand.
fwCutArray = [self.cutCache[chrom]["+"].get(i, 0) for i in range(startbp + self.loffset ,endbp + self.loffset)]
revCutArray = [self.cutCache[chrom]["-"].get(i, 0) for i in range(startbp + self.roffset, endbp + self.roffset)]
return {"+":fwCutArray,"-":revCutArray}
def __lookupReadsWithoutCache(self,startbp,endbp,chrom):
"""Loads reads from the BAM file directly from disk, ignoring the cache (private method)
Args:
startbp (int): The start of the interval
endbp (int): The end of the interval
chrom (str): The chromosome
"""
tempcutf = {}
tempcutr = {}
for alignedread in self.samfile.fetch(chrom, max(startbp, 0), endbp):
if not alignedread.is_unmapped:
if alignedread.is_reverse:
a = int(alignedread.reference_end)
if a <= endbp +1:
tempcutr[a] = tempcutr.get(a, 0) + 1
else:
a = int(alignedread.reference_start) - 1
if a >= startbp:
tempcutf[a] = tempcutf.get(a, 0) + 1
fwCutArray = [tempcutf.get(i, 0) for i in range(startbp + self.loffset ,endbp + self.loffset)]
revCutArray = [tempcutr.get(i, 0) for i in range(startbp + self.roffset, endbp + self.roffset)]
return {"+":fwCutArray,"-":revCutArray}
def purge_cache(self):
"""
Wipes the internal cache - useful if you need finer grain control over caching.
"""
#Initialise the empty DNase cut cache with the chromosome names from the BAM file
self.cutCache = {}
#This helps us differentiate between what's been looked up and when there's just no reads
self.lookupCache = {}
for i in self.samfile.references:
self.cutCache[i] = {"+":{},"-":{}}
self.lookupCache[i] = []
def get_cut_values(self,vals):
"""Return a dictionary with the cut counts. Can be used in two different ways:
You can either use a string or a GenomicInterval to query for cuts.
Returns reads dict with "+" corresponding to the +ve strand and "-" has the data with the -ve strand (rotated 180 degrees)
Args:
vals: either a string with the format "chr18,500:600,+" or a GenomicInterval object
>>> BAMHandler(example_reads())["chr6,170863142,170863150,+"]
{'+': array([ 1, 0, 0, 0, 1, 11, 1, 0]), '-': array([0, 1, 0, 0, 1, 0, 0, 1])}
>>> BAMHandler(example_reads())["chr6,170863142,170863150,-"]
{'+': array([1, 0, 0, 1, 0, 0, 1, 0]), '-': array([ 0, 1, 11, 1, 0, 0, 0, 1])}
"""
if isinstance(vals, GenomicInterval):
chrom = vals.chromosome
startbp = vals.startbp
endbp = vals.endbp
flip = vals.strand
elif isinstance(vals, str):
try:
chrom,startbp,endbp,flip = vals.split(",")
startbp = int(startbp)
endbp = int(endbp)
assert(flip in ["+", "-"])
except:
raise ValueError("Malformed query string")
else:
raise TypeError("Lookup must be a string or a GenomicInterval")
if self.CACHING:
retval = self.__lookupReadsUsingCache(startbp,endbp,chrom)
else:
retval = self.__lookupReadsWithoutCache(startbp,endbp,chrom)
if flip is "-":
retval["+"], retval["-"] = retval["-"][::-1], retval["+"][::-1]
return retval
def __getitem__(self,vals):
"""
Wrapper for get_cut_values
"""
return self.get_cut_values(vals)
def FOS(self,interval,bgsize=35):
"""Calculates the Footprint Occupancy Score (FOS) for a Genomicinterval. See Neph et al. 2012 (Nature) for full details.
Args:
interval (GenomicInterval): The interval that you want the FOS for
Kwargs:
bgsize (int): The size of the flanking region to use when calculating the FOS (default: 35)
Returns:
A float with the FOS - returns -1 if it can't calculate it
"""
cuts = self["{0},{1},{2},{3}".format(interval.chromosome,interval.startbp-bgsize,interval.endbp+bgsize,interval.strand)]
forwardArray, backwardArray = cuts["+"], cuts["-"]
cutArray = [forwardArray[i] + backwardArray[i] for i in range(len(forwardArray))]
leftReads = float(sum(cutArray[:bgsize]))
centreReads = float(sum(cutArray[bgsize:-bgsize]))
rightReads = float(sum(cutArray[-bgsize:]))
#Here we normalise by region length
leftReads /= (bgsize * 1.0)
centreReads /= (len(interval) * 1.0)
rightReads /= (bgsize * 1.0)
try:
return ( (centreReads+1.0) / (leftReads + 1.0) ) + ( (centreReads+1.0)/(rightReads + 1.0))
except BaseException:
#If it can't calculate the score, return a sentinel value
return -1
class GenomicIntervalSet(object):
"""Container class which stores and allow manipulations of large numbers of GenomicInterval objects.
Essentially a way of storing and sorting BED files.
"""
def __init__(self,filename = None):
"""
Inits GenomicIntervalSet. You can also specify a BED file path to load the intervals from
Kwargs:
filename (str): the path to a BED file to initialize the intervals with
If no ``filename`` provided, then the set will be empty
"""
self.intervals = {}
if filename:
self.loadBEDFile(filename)
def loadBEDFile(self,filename):
"""
Adds all the intervals in a BED file to this GenomicIntervalSet.
We're quite naughty here and allow some non-standard BED formats (along with the official one):
chrom chromStart chromEnd
chrom chromStart chromEnd strand
chrom chromStart chromEnd name score strand
Any whitespace (tabs or spaces) will be considered separators, so spaces in names cause a problem!
.. note::
If you don't supply a strand, we infer that it's +ve.
Args:
filename: the path to a BED file to load
Raises:
IOError
"""
try:
BEDfile = open(filename, 'r')
except IOError:
errorString = "Cannot load BED file: {0}".format(filename)
raise IOError(errorString)
puts_err("Reading BED File...")
#This is done so that if a malformed BED record is detected, no intervals are loaded.
records = []
intervalCount = max(enumerate(open(filename)))[0] + 1
for _ in progress.bar(list(range(intervalCount))):
line = BEDfile.readline()
if line:
#Skip lines in the bed files which are UCSC track metadata or comments
if not self.__isBEDHeader(line):
records.append(self.__parseBEDString(line))
for i in records:
self.__addInterval(GenomicInterval(i[0], i[1], i[2], i[3], i[4], i[5]))
BEDfile.close()
def __malformedBEDline(self,BEDString):
"""
Raises an exception and prints the offending BED string
Raises:
Exception
"""
#TODO: Make a new exception class, something like malformedBEDException?
exceptionString = "Malformed BED line: {0}".format(BEDString)
raise Exception(exceptionString)
def __isBEDHeader(self,string):
"""
Returns True/False whether a line in a bed file should be ignored according to
http://genome.ucsc.edu/goldenPath/help/customTrack.html#TRACK
"""
if string[0] == "#":
return True
headers = ["name","description","type","visibility","color","itemRgb","useScore","group",
"priority","db","offset","maxItems","url","htmlUrl","bigDataUrl","track","browser"]
for each in headers:
if string.startswith(each):
return True
return False
def __parseBEDString(self,BEDString):
"""
Parses the following BED formats
We're quite naughty here and allow some non-standard BED formats (along with the official one):
chrom chromStart chromEnd
chrom chromStart chromEnd strand
chrom chromStart chromEnd name score strand
Returns:
(chrom,startbp,endbp,label,score,strand)
Raises:
Exception
"""
BEDSplit = BEDString.split()
#Sanity check
if len(BEDSplit) not in [3,4,6]:
self.__malformedBEDline(BEDString)
#Default if only Chrom Start End is detected
try:
chrom = BEDSplit[0]
startbp = int(BEDSplit[1])
endbp = int(BEDSplit[2])
except:
self.__malformedBEDline(BEDString)
label = 0
score = 0
strand = "+"
if len(BEDSplit) is 4:
if BEDSplit[3] in ["+", "-"]:
strand = BEDSplit[3]
else:
self.__malformedBEDline(BEDString)
if len(BEDSplit) is 6:
label = BEDSplit[3]
try:
score = float(BEDSplit[4])
except ValueError:
self.__malformedBEDline(BEDString)
if BEDSplit[5] in ["+", "-"]:
strand = BEDSplit[5]
else:
self.__malformedBEDline(BEDString)
return chrom,startbp,endbp,label,score,strand
def __len__(self):
"""
Return the number of intervals in the set
"""
intervals = 0
for each in list(self.intervals.values()):
intervals += len(each)
return intervals
def __iter__(self):
"""
Iterates over the intervals in the order that the intervals were generated
"""
for each in sorted(sum(list(self.intervals.values()),[]), key=lambda peak: peak.importorder):
yield each
def __getitem__(self, i):
"""
Indexes the intervals in the order that the intervals were generated
"""
return sorted(sum(list(self.intervals.values()),[]), key=lambda peak: peak.importorder)[i]
def __delitem__(self,i):
"""
Deletes an interval from the set using the position i
"""
pos = self.intervals[self[i].chromosome].index(self[i])
del self.intervals[self[i].chromosome][pos]
def __iadd__(self, other):
"""
Adds all the intervals from an other GenomicIntervalSet or GenomicInterval to this one.
Args:
other: either a GenomicInterval or GenomicIntervalSet to be added
Raises:
TypeError: A GenomicInterval or GenomicIntervalSet wasn't supplied.
"""
if isinstance(other,GenomicIntervalSet):
for i in other:
self.__addInterval(i)
elif isinstance(other,GenomicInterval):
self.__addInterval(other)
else:
raise TypeError("Can only add GenomicInterval or GenomicIntervalSet objects to existing GenomicIntervalSet")
return self
def __addInterval(self, other):
"""
Adds a GenomicInterval to the set
Args:
other (GenomicInterval): The GenomicInterval to be added.
"""
if other.chromosome not in self.intervals:
self.intervals[other.chromosome] = []
self.intervals[other.chromosome].append(other)
def resizeRegions(self,toSize):
"""
Resized all GenomicIntervals to a specific size
Args:
toSize: an int of the size to resize all intervals to
"""
if not type(toSize) == int:
ValueError("Can only resize intervals to integers")
for i in self:
xamount = toSize-(i.endbp-i.startbp)//2
i.startbp -= xamount
i.endbp += xamount
if (i.endbp-i.startbp) > toSize*2:
i.endbp -= 1
def __str__(self):
return ''.join(str(i) +"\n" for i in self)
class GenomicInterval(object):
"""
Basic Object which describes reads region of the genome
"""
#This counts how many GenomicInterval objects have been created
counter = 0
def __init__(self, chrom, start, stop, label = 0,score = 0,strand="+"):
"""
Initialization routine
Args:
chrom (str): the chromosome
start (int): the start of the interval
stop (int): the end of the interval
Kwargs:
label: The name of the interval (will be given an automatic name if none entered)
score (float): the score of the interval (default: 0)
strand (str): the strand the interval is on (default: "+")
"""
self.__class__.counter += 1
self.importorder = self.__class__.counter
self.chromosome = str(chrom)
self.startbp = int(start)
self.endbp = int(stop)
self.strand = str(strand)
self.score = float(score)
if self.startbp > self.endbp:
raise Exception("Start location of GenomicInterval is larger than end location!")
# This is from reads bygone era where we ordered the intervals by import order
# self.score = self.__class__.counter
#This makes up reads fake name if one doesn't exist in the BED file
if label:
self.label = str(label)
else:
self.label = "Unnamed{0}".format(self.__class__.counter)
#This contains anything else you want to store about the interval
self.metadata = {}
def __str__(self):
"""
BED representation of the interval
"""
return "{0}\t{1}\t{2}\t{3}\t{4}\t{5}".format(self.chromosome, self.startbp, self.endbp, self.label, self.score, self.strand)
def __len__(self):
"""
Returns the length of the GenomicInterval in basepairs
"""
return self.endbp - self.startbp
def __lt__(self, other):
"""
Implements foo < bar
"""
if self.chromosome == other.chromosome:
if self.startbp < other.startbp:
return True
elif self.startbp == other.startbp:
if self.endbp < other.endbp:
return True
else:
return False
else:
return False
elif self.chromosome < other.chromosome:
return True
else:
return False
def __le__(self, other):
"""
Implements foo <= bar
"""
if self.chromosome == other.chromosome:
if self.startbp < other.startbp:
return True
elif self.startbp == other.startbp:
if self.endbp <= other.endbp:
return True
else:
return False
else:
return False
elif self.chromosome < other.chromosome:
return True
else:
return False
def __eq__(self, other):
"""
Implements foo == bar
"""
if self.chromosome == other.chromosome and \
self.startbp == other.startbp and \
self.endbp == other.endbp:
return True
return False
def __gt__(self, other):
"""
Implements foo > bar
"""
if self.chromosome == other.chromosome:
if self.startbp > other.startbp:
return True
elif self.startbp == other.startbp:
if self.endbp > other.endbp:
return True
else:
return False
else:
return False
elif self.chromosome > other.chromosome:
return True
else:
return False
def __ge__(self, other):
"""
Implements foo >= bar
"""
if self.chromosome == other.chromosome:
if self.startbp > other.startbp:
return True
elif self.startbp == other.startbp:
if self.endbp >= other.endbp:
return True
else:
return False
else:
return False
elif self.chromosome > other.chromosome:
return True
else:
return False
class FASTAHandler(object):
def __init__(self, fasta_file, vcf_file = None):
self.ffile = pysam.Fastafile(fasta_file)
self.conn = None
if vcf_file:
self.conn = lite.connect(tempfile.NamedTemporaryFile().name)
with open(vcf_file, 'r') as f:
records = [(x[0],x[1],x[3],x[4]) for x in (x.split() for x in f if x[0] != "#")]
with self.conn:
cur = self.conn.cursor()
cur.execute("CREATE TABLE SNPS(chr TEXT,pos INT, ref TEXT, mut TEXT)")
cur.executemany("INSERT INTO SNPS VALUES(?,?,?,?)",records)
#Manually remove these, as they potentially could be large in memory
del(records)
def sequence(self,interval):
sequence_string = self.ffile.fetch(interval.chromosome,interval.startbp,interval.endbp).upper()
if not self.conn:
# if interval.strand != "+":
# sequence_string = sequence_string[::-1]
return str(sequence_string)
else:
query_string = "SELECT chr, pos - ? - 1 as offset,ref,mut FROM SNPS WHERE chr=? and pos BETWEEN ? and ?"
snps = self.conn.cursor().execute(query_string,(interval.startbp,interval.chromosome,interval.startbp,interval.endbp)).fetchall()
sequence_list = [i for i in sequence_string]
for i in snps:
if sequence_list[i[1]] != i[2]:
warnings.warn("MISMATCH IN REF TO SNP - WHAT HAVE YOU DONE?")
else:
#str needed as sqlite returns unicode
sequence_list[i[1]] = str(i[3])
return "".join(sequence_list)
class BiasCalculator(object):
def __init__(self,bias_file=None):
if bias_file is None:
#Load the genomic IMR90 bias from Shirley
bias_file = open(os.path.join(os.path.join(os.path.dirname(__file__), "data"),"IMR90_6mer.pickle"))
self.biasdict = pickle.load(bias_file)
def bias(self,sequence):
"""
NOTE: Because bias is calculated from the centre of a 6-mer,
the data will be missing the values for the first and last 3 bases
"""
#Split sequence into consituent 6-mers
sequence_chunks = [sequence[i:i+6] for i in range(len(sequence)-5)]
#Look up values of these 6-mers in the precomputed bias database
fw_bias = [float(self.biasdict[i]["forward"])for i in sequence_chunks]
rv_bias = [float(self.biasdict[i]["reverse"])for i in sequence_chunks]
#FIXME: Pickled data should use "+" and "-" and not forward and reverse to prevent confusion here
#FIXME: Fix the pickled data - the reverse positions are off by one!
return {"+": fw_bias, "-":rv_bias}
class BAMHandlerWithBias(BAMHandler):
def __init__(self, sequence_object, *args, **kwargs):
super(BAMHandlerWithBias, self).__init__(*args, **kwargs)
self.sequence_data = sequence_object
self.bias_data = BiasCalculator()
def __getitem__(self,interval):
if not isinstance(interval,GenomicInterval):
raise TypeError("Sorry, but we only support GenomicInterval querying for the Bias Handler at the moment")
#Note: This is pretty Hacky!
interval.startbp -= 3
interval.endbp += 3
#Get the sequence data
bias_values = self.bias_data.bias(self.sequence_data.sequence(interval))
interval.startbp += 3
interval.endbp -= 3
bias_values["+"] = bias_values["+"][1:]
bias_values["-"] = bias_values["-"][:-1]
cuts = self.get_cut_values(interval)
#Nomenclature used below is that in the He. et al Nature Methods Paper
#These are N_i^s - note we are using an entire hypersensitive site, and not 50bp like the paper
N_i = {"+":sum(cuts["+"]) ,"-":sum(cuts["-"])}
#bias_values are y_i
for dir in ("-","+"):
bias_values[dir] = [float(i)/sum(bias_values[dir]) for i in bias_values[dir]]
#Stupid pass-by-reference
predicted_cuts = {"+":cuts["+"][:],"-":cuts["-"][:]}
#Calculate the predicted counts (nhat_i, which is N_i * y_i) based on n-mer cutting preference
for dir in ("-","+"):
#For each base
for num, val in enumerate(predicted_cuts[dir]):
#Multiply the total number of observed cuts by the bias value
predicted_cuts[dir][num] = bias_values[dir][num] * N_i[dir]
#Now we normalised the observed cuts by the expected
for dir in ("-","+"):
#For each base
for num, val in enumerate(predicted_cuts[dir]):
#Divide the number of observed cuts by the bias value
pass
#predicted_cuts[dir][num] = (cuts[dir][num] + 1.0) / (val + 1.0)
if interval.strand == "-":
# That's numberwang, let's rotate the board!
predicted_cuts["+"], predicted_cuts["-"] = predicted_cuts["-"][::-1], predicted_cuts["+"][::-1]
return predicted_cuts
|
jpiper/pyDNase
|
pyDNase/__init__.py
|
Python
|
mit
| 25,452
|
<?php
namespace test\TaskBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('test_task');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
return $treeBuilder;
}
}
|
masudiiuc/SymHelloWorld
|
src/test/TaskBundle/DependencyInjection/Configuration.php
|
PHP
|
mit
| 873
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!--[if IE 8]>
<html xmlns:ng="http://angularjs.org" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html xmlns:ng="http://angularjs.org" class="no-js">
<!--<![endif]-->
<html lang="en" ng-app="njyApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<base href="/">
<title>供应订单</title>
<!--<link rel="stylesheet" href="./js/My97DatePicker/skin/WdatePicker.css">-->
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/su-pu/l-nav.css">
<link rel="stylesheet" href="./css/su-pu/gongying.css">
<link rel="stylesheet" href="./css/su-pu/g-c-common.css">
</head>
<body ng-controller="myapp" ng-cloak class="ng-cloak">
<!--头部-->
<div njy-pageheader></div>
<!--农加易-->
<div njy-pagelogo data-title="农加易管理" data-right="backToIndex"></div>
<!--主要内容-->
<div class="w1200 l-main">
<div class="l-nav_list">
<span><a ng-href="{{$parent.njyPageUrl.index}}">首页</a></span> >
<span><a ng-href="{{$parent.njyPageUrl.commodityM}}">农加易管理</a></span> >
<span>商品管理</span>
</div>
<div class="content">
<div class="content-l color3">
<div class="left">
<div class="p18px njygl fz16">
农加易管理
</div>
<ul class="gy">
<p class="p50px gygl cggl"><img src="./img/su-pu/m_logo_c.png" alt="" class="imgs">供应管理</p>
<li class="p50px m-t-b20"><a ng-href="{{$parent.njyPageUrl.commodityM}}">商品管理</a></li>
<li class="p50px m-b20"><a class="cura" ng-href="{{$parent.njyPageUrl.supplierOrder}}">供应订单</a></li>
<li class="p50px m-b20"><a ng-href="{{$parent.njyPageUrl.supplierInfor}}">供应商信息</a></li>
</ul>
<ul class="gy cg">
<p class="p50px gygl cggl"><img src="./img/su-pu/c_icon.png" alt="" class="imgs">采购管理</p>
<li class="p50px m-t-b20"><a ng-href="{{$parent.njyPageUrl.purchaserOrder}}">采购订单</a></li>
<li class="p50px m-b20"><a ng-href="{{$parent.njyPageUrl.purchaserInfor}}">采购商信息</a></li>
</ul>
</div>
</div>
<div class="content-r" id="content-r">
<ul class="content-r-tab clearfix">
<li ng-class="{tabcur:tabType=='-1'}" ng-click="tabclick('-1')">所有订单 <i></i></li>
<li ng-class="{tabcur:tabType=='0'}" ng-click="tabclick('0')">待确认 <i></i></li>
<li ng-class="{tabcur:tabType=='1'}" ng-click="tabclick('1')">待付款 <i></i></li>
<li ng-class="{tabcur:tabType=='2'}" ng-click="tabclick('2')">待发货 <i></i></li>
<li ng-class="{tabcur:tabType=='3'}" ng-click="tabclick('3')">待收货 <i></i></li>
<li ng-class="{tabcur:tabType=='4'}" ng-click="tabclick('4')">已完成 <i></i></li>
<li ng-class="{tabcur:tabType=='5'}" ng-click="tabclick('5')">已关闭</li>
</ul>
<div class="search" ng-show="all">
<form name="myForm" novalidate>
<p class="search-title">
<input type="text" placeholder="输入商品标题或订单号进行搜索" ng-model="title" required
ng-maxlength="30" name="title" id="titleOrd">
<span style="color:red;" ng-show="myForm.title.$dirty&&myForm.title.$invalid"
class="title-span">
<span ng-show="myForm.title.$error.maxlength">超过30个字符输入限制</span>
</span>
<input type="button" ng-click="searchClick()" value="搜索" class="titleBtn" ng-disabled="myForm.title.$error.maxlength||myForm.cgname.$error.maxlength">
</p>
<p class="search-status">
<label for="stt">订单状态</label>
<select id="stt">
<option value="" selected="selected">全部</option>
<option value="0">待确认</option>
<option value="1">待付款</option>
<option value="2">待发货</option>
<option value="3">待收货</option>
<option value="4">已完成</option>
<option value="5">已关闭</option>
</select>
<label for="sttName">采购商名称</label>
<input type="text" id="sttName" ng-model="cgname" name="cgname" required
ng-maxlength="30" class="fz12">
<span style="color:red;font-size: 12px;" ng-show="myForm.cgname.$dirty&&myForm.cgname.$invalid">
<span ng-show="myForm.cgname.$error.maxlength">超过30个字符输入限制</span>
</span>
</p>
<p class="search-date">
<label for="sDate">下单时间</label>
<input id="sDate" class="Wdate"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'eDate\')}'})"
placeholder="请选择时间范围起始"/>
<span></span>
<input id="eDate" ng-model="oMarket" class="Wdate"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'sDate\')}'})"
placeholder="请选择时间范围结束"/>
</p>
<p class="search-btn">
<input type="button" class="btncur sBtn" ng-click="searchClick()" value="搜索" ng-disabled="myForm.title.$error.maxlength||myForm.cgname.$error.maxlength">
</p>
</form>
</div>
<!--订单列表标题-->
<div class="list-title">
<span class="sp1">商品</span>
<span class="sp2">商品操作</span>
<span class="sp3">单价(元)</span>
<span class="sp4">数量</span>
<span class="sp5">实付款(元)</span>
<span class="sp6">订单状态</span>
<span class="sp7">操作</span>
</div>
<!--具体订单-->
<div class="list-order" ng-repeat="(key,listarr) in listArr">
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="7" class="td-title">
<span>订单编号:{{listarr.orderNo }}</span>
<span>{{listarr.createDate|njyDate }}</span> <!--日期-->
<span>采购商:{{listarr.purchaserName }}</span>
</td>
</tr>
<tr ng-init="listarr.tkzStatus=0" ng-repeat="(key1,list) in listarr.orderItemVoList">
<td class="td1" data-status="{{list.status==6?(listarr.tkzStatus=1):''}}">
<div>
<div class="td1-img">
<a href="{{$parent.njyPageUrl.commDetails}}/{{list.goodsId}}/" target="_blank">
<img ng-src="{{list.goodsImage}}" alt=""> <!--商品图片-->
</a>
<!--跳转预览商品-->
<!--<a href="view/front.html?#/xqym/{{listarr.id}}/1">-->
<!--<img ng-src="{{list.goodsImage}}" alt=""> <!–商品图片–>-->
<!--</a>-->
</div>
<div class="td1-a">
<a href="{{$parent.njyPageUrl.commDetails}}/{{list.goodsId}}/" target="_blank">
{{list.goodsTitle}} <!--商品标题-->
</a>
</div>
</div>
</td>
<td class="td2">
<a href="javascript:;" ng-show="list.status!=6&&list.status!=7&&list.status!=8"></a>
<a href="javascript:;" ng-show="list.status==6" ng-click="clClick(list.goodsId,listarr.id)">处理退款</a>
<a href="javascript:;" ng-show="list.status==7||list.status==8"
ng-click="ckClick(list.goodsId,listarr.id,list.status)">查看退款详情</a>
</td> <!--商品操作-->
<td class="td3">{{list.goodsPrice|number:2}}</td> <!--商品单价-->
<td class="td4">{{list.goodsAmount }}</td> <!--商品数量-->
<td ng-if="key1<1" class="td5" rowspan="{{listarr.orderItemVoList.length}}">
{{listarr.actualPayMoney|number:2 }}<br><i ng-show="listarr.freight">(含运费:{{listarr.freight|number:2}}元)</i><i
ng-hide="listarr.freight">(运费待确认)</i></td> <!--实付款-->
<td ng-if="key1<1" class="td6" rowspan="{{listarr.orderItemVoList.length}}">
<span ng-show="listarr.orderStatus==0">待确认</span>
<span ng-show="listarr.orderStatus==1">待付款</span>
<span ng-show="listarr.orderStatus==2">待发货<br><i ng-show="listarr.tkzStatus==1">(退款中)</i></span>
<span ng-show="listarr.orderStatus==3">待收货<br><i ng-show="listarr.tkzStatus==1">(退款中)</i></span>
<span ng-show="listarr.orderStatus==4">已完成</span>
<span ng-show="listarr.orderStatus==5">已关闭</span>
</td> <!--订单状态-->
<td ng-if="key1<1" class="td7" rowspan="{{listarr.orderItemVoList.length}}"> <!--操作-->
<a href="javascript:;"
ng-show="listarr.orderStatus==0||listarr.orderStatus==1||listarr.orderStatus==2||listarr.orderStatus==3||listarr.orderStatus==4||listarr.orderStatus==5||list.status==6"
ng-click="hrefClick(listarr.orderStatus,listarr.id,listarr.tkzStatus)">订单详情</a>
<a href="javascript:;" ng-click="qxddclick(listarr.id)"
ng-show="listarr.orderStatus==0||listarr.orderStatus==1">取消订单</a>
<a href="javascript:;" ng-click="fhClick(listarr.id,listarr.tkzStatus)"
ng-show="listarr.orderStatus==2||(listarr.orderStatus==2&&list.status==6)">去发货</a></td>
</tr>
</table>
</div>
<!--分页-->
<!--* 分页指令,参数不能为空-->
<!--* current-page:当前页-->
<!--* total-page:总页数-->
<!--* get-list:更新列表的函数方法,函数可改,须带上一个page参数(表示选中页)-->
<p ng-show="listArr.length==0&&listArrLength==1" style="text-align: center;margin-top: 20px;margin-bottom: 20px">没有搜索到符合条件的订单</p>
<p ng-show="noData||(listArr.length==0&&listArrLength==0)" style="text-align: center;margin-top: 20px;margin-bottom: 20px">暂无订单数据</p>
<div njy-pager current-page="1" total-page="{{totalpage}}" pager-renew="newPager"
total-record="{{totalCount}}" unit="个订单" get-list="getListByPage(page)" ng-hide="noData||listArr.length==0"></div>
</div>
</div>
</div>
<!--尾部-->
<div njy-pagefoot></div>
<!--取消订单弹窗-->
<div class="gyalert" ng-show="isqx">
<div class="mb" ng-click="gyClick()"></div>
<div class="qx">
<p class="fz16 color3 pp1"><b><img src="./img/su-pu/qxIcon_03.png" alt=""></b>您确定要取消该订单吗?取消订单后,不能恢复。</p>
<p class="pp2 fz12 color3">请选择取消订单的原因:<select name="" id="gyalertse">
<option value="1" selected="selected">请选择原因</option>
<option value="没货了交易无法完成">没货了交易无法完成</option>
<option value="买家信息填写有误">买家信息填写有误</option>
<option value="长时间联系不到买家,交易不成功">长时间联系不到买家,交易不成功</option>
<option value="买家不想购买了">买家不想购买了</option>
<option value="线下完成交易">线下完成交易</option>
<option value="其他">其他</option>
</select><br>
<i class="fz12 red" ng-show="isqxyy">请选择取消订单的原因</i>
</p>
<span class="fh" ng-click="fhclick(isqx=false)">返 回</span>
<span class="qd" ng-click="qdclick()">确 定</span>
</div>
</div>
<!--js-->
<script src="../../../js/My97DatePicker/WdatePicker.js"></script>
<script src="./js/vendor/jquery-1.8.2.min.js"></script>
<script src="./js/vendor/jquery.placeholder.js"></script>
<script src="./js/lib/angular-1.2.32/angular.js"></script>
<script src="./js/vendor/modernizr-2.6.2.min.js"></script>
<script src="./js/config.js"></script>
<script src="./js/util.js"></script>
<script src="./js/directive/directives.js"></script>
<script src="./js/model/model.js"></script>
<script src="./js/index.js"></script>
<script src="./js/su-pu/gongying.js"></script>
</body>
</html>
|
souths/njy2
|
view/manage/supply/gongying.html
|
HTML
|
mit
| 14,301
|
#pragma once
#ifndef CRAP_TIMER_GCC_H
#define CRAP_TIMER_GCC_H
#include "config/crap_platform.h"
#include "config/crap_compiler.h"
#include "config/crap_cpu.h"
#include "config/crap_types.h"
#include <cstddef>
#include <ctime>
#if defined(CRAP_PLATFORM_MAC) || defined(CRAP_PLATFORM_IOS)
#include <mach/mach_time.h>
#endif
namespace crap
{
typedef uint64_t tick_t;
CRAP_INLINE void timer_frequency( tick_t* tick )
{
#if CRAP_PLATFORM_MAC
mach_timebase_info_data_t info;
mach_timebase_info(&info);
*tick = 1e9 * info.denom / info.numer;
#else
*tick = 1e9;
#endif
}
CRAP_INLINE void timer_get_tick( tick_t* tick )
{
#if CRAP_PLATFORM_MAC
*tick = mach_absolute_time();
#else
struct timespec ticks;
clock_gettime(CLOCK_MONOTONIC, &ticks);
*tick = (uint64_t) ticks.tv_sec * 1000000000ull + ticks.tv_nsec;
#endif
}
CRAP_INLINE void yield_thread( void )
{
#if CRAP_CPU_X86 || CRAP_CPU_X64
asm volatile("pause");
#endif
}
CRAP_INLINE void sleep_mil_sec( int32_t mil_sec )
{
struct timespec ts;
ts.tv_sec = mil_sec / 1000;
ts.tv_nsec = (mil_sec % 1000) * 1000;
nanosleep(&ts, 0x00);
}
} //namespace crap
#endif //CRAP_TID_GCC_H
|
stevenblaster/crapengine
|
source/core/include/thread/timer_gcc.h
|
C
|
mit
| 1,201
|
# Copyright (c) 2012 Bingoentreprenøren AS
# Copyright (c) 2012 Patrick Hanevold
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
module Crayfish
VERSION = "0.2.8"
end
|
patrickhno/crayfish
|
lib/crayfish/version.rb
|
Ruby
|
mit
| 1,182
|
import Immutable from 'immutable';
import uuid from './uuid';
export default function (suffix) {
return Immutable.fromJS([
{
_id: uuid(),
label: 'Startpage',
children: []
},
{
_id: uuid(),
label: `Page 1 (${suffix})`,
children: [
{
_id: uuid(),
label: `Page 1a (${suffix})`,
children: []
},
{
_id: uuid(),
label: `Page 1b (${suffix})`,
children: []
}
]
},
{
_id: uuid(),
label: `Page 2 (${suffix})`,
children: []
}
]);
}
|
choffmeister/react-nestedlist
|
public/data.js
|
JavaScript
|
mit
| 602
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("08. DigitAsWord")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("08. DigitAsWord")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2403bd0f-bf18-4753-8f3a-9d56587d0659")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
HMNikolova/Telerik_Academy
|
CSharpPartOne/5. ConditionalStatements/08. DigitAsWord/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,406
|
---
layout: page
title: Pink Citadel Trade Executive Retreat
date: 2016-05-24
author: Sara Alvarado
tags: weekly links, java
status: published
summary: Quisque nec lectus vel mauris.
banner: images/banner/leisure-03.jpg
booking:
startDate: 11/21/2019
endDate: 11/24/2019
ctyhocn: HIBHXHX
groupCode: PCTER
published: true
---
Donec neque erat, ullamcorper tristique mauris quis, egestas feugiat diam. Suspendisse nec sem a mi luctus varius. Cras molestie nibh nisl, fermentum fermentum neque egestas vitae. Duis at ligula id arcu accumsan varius. Vivamus imperdiet ligula risus, sed congue tortor sollicitudin id. Donec volutpat eu odio nec dictum. Quisque gravida egestas erat, a consectetur leo molestie et. In hac habitasse platea dictumst. Curabitur id lacus eu tellus sollicitudin dapibus. Proin scelerisque in nibh eget molestie.
Proin fringilla fringilla neque non scelerisque. Nunc a rutrum mauris. Quisque commodo nisi a egestas lobortis. Nam dapibus risus a hendrerit dapibus. Quisque congue, est nec tristique bibendum, ligula tortor faucibus magna, nec sodales lacus dui eget lorem. Vivamus varius lectus felis, et sollicitudin lacus blandit non. Etiam id congue felis. Vestibulum sodales iaculis nisl, vitae efficitur quam iaculis a. Praesent consequat lacus metus, non convallis magna tincidunt ac. Sed posuere eros vitae sodales ornare. Duis aliquet, eros eget imperdiet maximus, mauris odio vulputate nisl, nec scelerisque magna nunc ac mi. Nulla egestas ultricies ligula a sollicitudin. Duis molestie convallis sagittis. Aliquam quis eros lacus.
1 Curabitur dictum mauris a cursus bibendum
1 Donec quis risus porta, vehicula quam ut, sodales dui
1 Mauris et mauris hendrerit, bibendum arcu id, eleifend neque
1 Maecenas et lacus at justo tincidunt mattis.
Aenean accumsan elementum urna. Cras lacinia ornare sapien, eu sodales lectus ultricies ac. In ipsum diam, finibus quis lacus feugiat, gravida sodales nisi. Quisque venenatis ut turpis eu iaculis. Suspendisse sed imperdiet ex, nec molestie ligula. Morbi in dictum lectus, nec maximus orci. Phasellus sagittis tortor non posuere interdum. Suspendisse sagittis pulvinar odio id sollicitudin. Cras pharetra nisl nec consequat vehicula. Cras vehicula felis in ullamcorper feugiat. In hendrerit eu turpis at euismod.
|
KlishGroup/prose-pogs
|
pogs/H/HIBHXHX/PCTER/index.md
|
Markdown
|
mit
| 2,294
|
---
layout: page
title: Guardian Electronics Conference
date: 2016-05-24
author: Nicholas Werner
tags: weekly links, java
status: published
summary: In ultricies luctus maximus. Donec.
banner: images/banner/office-01.jpg
booking:
startDate: 02/19/2019
endDate: 02/22/2019
ctyhocn: MPTMIHX
groupCode: GEC
published: true
---
Proin semper sapien ut nisi mollis, et aliquet erat egestas. Fusce sapien ipsum, ornare quis risus at, blandit ullamcorper justo. Suspendisse tempor semper leo. Donec bibendum facilisis lacus quis commodo. Cras sit amet mi at nisi tempor faucibus. Aliquam faucibus pulvinar turpis non pharetra. Mauris sagittis lobortis quam vitae vestibulum. Ut elementum porttitor sapien condimentum porta. Maecenas cursus mi in ante dapibus, quis commodo elit feugiat. Mauris pharetra orci a nulla fermentum ultrices. Quisque neque eros, tempus vitae egestas a, imperdiet vel dolor. Etiam congue ligula nec turpis ornare eleifend. Aliquam dapibus, arcu sed varius luctus, erat ipsum ornare arcu, id convallis lacus justo a ante. Suspendisse et accumsan nulla. Donec vitae facilisis ante.
Etiam venenatis, felis vitae convallis ultricies, magna velit dignissim elit, a feugiat tellus orci vel metus. Sed facilisis ullamcorper elit ut fringilla. Nullam sodales sapien sit amet dapibus fermentum. Curabitur malesuada tempor auctor. Integer dignissim felis ac dapibus varius. Phasellus scelerisque pharetra ultrices. Fusce sagittis velit vel odio pellentesque, ut volutpat ante condimentum. Cras sit amet orci a leo volutpat consectetur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce fermentum egestas porttitor. Quisque vel purus justo. Aenean aliquam viverra commodo. Vestibulum sodales justo massa.
* Sed pulvinar ante et finibus feugiat
* Duis suscipit turpis sed sem ornare, sit amet facilisis sapien posuere
* Nulla interdum nibh eu elit ullamcorper, eget tincidunt ipsum porttitor
* Etiam blandit diam vel urna facilisis, vehicula viverra quam accumsan
* Praesent vel nibh ullamcorper leo facilisis efficitur eget ac enim.
Vestibulum et finibus neque, eu blandit urna. Sed consectetur ligula quis tellus lacinia, id pulvinar nisi tincidunt. Etiam non venenatis dui. Ut vitae ante varius, pellentesque nunc id, pretium purus. Cras risus odio, consectetur sed condimentum nec, ornare eu lectus. Duis fringilla tortor nec eros rutrum, eget faucibus est laoreet. Nam justo nibh, commodo et elit vitae, venenatis fringilla risus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur pulvinar eget ex pulvinar fermentum.
|
KlishGroup/prose-pogs
|
pogs/M/MPTMIHX/GEC/index.md
|
Markdown
|
mit
| 2,633
|
#include <natus-internal.h>
#include <assert.h>
#include <libmem.h>
#define hmkval(ctx, val) \
mkval(ctx, val, \
natusEngValFlagUnlock | natusEngValFlagFree, \
natusValueTypeUnknown)
static natusEngVal
return_ownership(natusValue *val, natusEngValFlags *flags)
{
natusEngVal ret = NULL;
if (!flags)
return NULL;
*flags = natusEngValFlagException;
if (!val)
return NULL;
*flags = val->flag;
/* If this value will not free here, retain ownership */
ret = val->val;
if (mem_parents_count(val, NULL) > 1)
*flags &= ~(natusEngValFlagUnlock | natusEngValFlagFree);
else
val->flag &= ~(natusEngValFlagUnlock | natusEngValFlagFree);
natus_decref(val);
return ret;
}
natusEngVal
natus_handle_property(const natusPropertyAction act, natusEngVal obj, const natusPrivate *priv, natusEngVal idx, natusEngVal val, natusEngValFlags *flags)
{
natusValue *glbl = private_get(priv, NATUS_PRIV_GLOBAL);
assert(glbl);
/* Convert the arguments */
natusValue *vobj = hmkval(glbl, obj);
natusValue *vidx = hmkval(glbl, act & natusPropertyActionEnumerate ? NULL : idx);
natusValue *vval = hmkval(glbl, act & natusPropertyActionSet ? val : NULL);
natusValue *rslt = NULL;
/* Do the call */
natusClass *clss = private_get(priv, NATUS_PRIV_CLASS);
if (clss && vobj &&
(vidx || (act & natusPropertyActionEnumerate)) &&
(vval || (act & ~natusPropertyActionSet))) {
switch (act) {
case natusPropertyActionDelete:
rslt = clss->del(clss, vobj, vidx);
break;
case natusPropertyActionGet:
rslt = clss->get(clss, vobj, vidx);
break;
case natusPropertyActionSet:
rslt = clss->set(clss, vobj, vidx, vval);
break;
case natusPropertyActionEnumerate:
rslt = clss->enumerate(clss, vobj);
break;
default:
assert(false);
}
}
natus_decref(vobj);
natus_decref(vidx);
natus_decref(vval);
return return_ownership(rslt, flags);
}
natusEngVal
natus_handle_call(natusEngVal obj, const natusPrivate *priv, natusEngVal ths, natusEngVal arg, natusEngValFlags *flags)
{
natusValue *glbl = private_get(priv, NATUS_PRIV_GLOBAL);
assert(glbl);
/* Convert the arguments */
natusValue *vobj = hmkval(glbl, obj);
natusValue *vths = ths ? hmkval(glbl, ths) : natus_new_undefined(glbl);
natusValue *varg = hmkval(glbl, arg);
natusValue *rslt = NULL;
if (vobj && vths && varg) {
natusClass *clss = private_get(priv, NATUS_PRIV_CLASS);
natusNativeFunction func = private_get(priv, NATUS_PRIV_FUNCTION);
if (clss)
rslt = clss->call(clss, vobj, vths, varg);
else if (func)
rslt = func(vobj, vths, varg);
}
/* Free the arguments */
natus_decref(vobj);
natus_decref(vths);
natus_decref(varg);
return return_ownership(rslt, flags);
}
void
natus_private_free(natusPrivate *priv)
{
mem_free(priv);
}
bool
natus_private_push(natusPrivate *priv, void *data, natusFreeFunction free)
{
return private_set(priv, NULL, data, free);
}
|
Natus/natus
|
natus/engine.c
|
C
|
mit
| 3,013
|
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
# What is the 10 001st prime number?
import math
from Utilities import Primes
from Problem import Problem
class N10001stPrime(Problem):
def __init__(self):
self.answer = 104743
def do(self):
return Primes.primes_up_to_n(self.find_upper_bound(10001))[10001 - 1]
# Lower bound on the number of primes below x
# there is at least : x/log(x) * (1 + 1 / log(x)) primes below x
# (https://en.wikipedia.org/wiki/Prime_number_theorem#Bounds_on_the_prime-counting_function)
def prime_count(self, x):
return (x / math.log(x)) * (1 + (1 / math.log(x)))
# finds an upper bound on the number of numbers we need to find n primes
def find_upper_bound(self, n):
inc = 1000
num = inc
while self.prime_count(num) <= n:
num += inc
return num
|
hperreault/ProjectEuler
|
007_N10001stPrime.py
|
Python
|
mit
| 932
|
#ignore this file
|
Fire-Hound/Linear-Regression-APK
|
ignore.py
|
Python
|
mit
| 18
|
var async = require('async');
var mongoose = require('mongoose');
// Denormalize values from foreign refs into local model
var denormalizeFrom = function(schema, from) {
return function(next) {
var self = this;
var funcs = [];
for (var key in from) {
var items = from[key];
var model = mongoose.model(schema.path(key).options.ref);
funcs.push(function(callback) {
model.findOne({ _id: self[key] }, function(err, instance) {
if (err) return callback(err);
items.forEach(function(item) {
self[item.key] = instance[item.field];
});
callback();
});
});
}
async.parallel(funcs, function(err) {
if (err) return next(err);
next();
});
};
};
// Denormalize values from local model into foreign refs
var denormalizeTo = function(to) {
return function(next) {
var self = this;
var funcs = [];
for (var name in to) {
for (var ref in to[name]) {
var items = to[name][ref];
var model = mongoose.model(name);
funcs.push(function(callback) {
var query = {};
var update = {};
query[ref] = self._id;
items.forEach(function(item) {
update[item.key] = self[item.field];
});
model.update(query, update, { multi: true }, callback);
});
}
}
async.parallel(funcs, function(err) {
if (err) return next(err);
next();
});
};
};
module.exports = function(schema, fields) {
// Fields that will be saved to foreign models
// when this schema's model is saved.
var from = {};
// Fields that will be saved in this schema's model
// when the foreign model is saved.
var to = {};
// Collect fields by "direction"
for (var field in fields) {
var options = fields[field];
if (options.from) {
// Ensure the `from` field is a ref
if (schema.path(options.from).options.ref === undefined) {
throw new Error('Must denomalize from a `ref` field');
}
// Defaults
options.key || (options.key = options.from + '_' + field);
options.type || (options.type = String);
// Add key to schema in which to denormalize the foreign data
var item = {};
item[options.key] = { type: options.type };
schema.add(item);
from[options.from] || (from[options.from] = []);
from[options.from].push({
field: field,
key: options.key,
type: options.type
});
} else if (options.to) {
options.key || (options.key = options.ref + '_' + field);
to[options.to] || (to[options.to] = {});
to[options.to][options.ref] || (to[options.to][options.ref] = []);
to[options.to][options.ref].push({
field: field,
key: options.key
});
} else {
throw new Error('Must specify a direction');
}
}
// Pre-save hooks to perform the denormalization
schema.pre('save', denormalizeFrom(schema, from));
schema.pre('save', denormalizeTo(to));
};
|
scttnlsn/mongoose-denormalize
|
lib/index.js
|
JavaScript
|
mit
| 3,736
|
<?php
use Illuminate\Database\Seeder;
class CategoriesTableSeeder extends Seeder {
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('categories')->delete();
\DB::table('categories')->insert(array (
0 =>
array (
'id' => 15,
'parent_id' => NULL,
'lft' => 1,
'rgt' => 6,
'depth' => 0,
'name' => 'PlayStation 4',
'slug' => 'playstation-4',
'created_at' => '2015-06-13 16:39:27',
'updated_at' => '2015-06-14 15:00:36',
),
1 =>
array (
'id' => 16,
'parent_id' => NULL,
'lft' => 7,
'rgt' => 10,
'depth' => 0,
'name' => 'Xbox One',
'slug' => 'xbox-one',
'created_at' => '2015-06-13 16:40:50',
'updated_at' => '2015-06-14 15:00:36',
),
2 =>
array (
'id' => 17,
'parent_id' => NULL,
'lft' => 11,
'rgt' => 14,
'depth' => 0,
'name' => 'Wii U',
'slug' => 'wii-u',
'created_at' => '2015-06-13 16:43:00',
'updated_at' => '2015-06-14 15:00:36',
),
3 =>
array (
'id' => 18,
'parent_id' => NULL,
'lft' => 15,
'rgt' => 16,
'depth' => 0,
'name' => 'Wii',
'slug' => 'wii',
'created_at' => '2015-06-13 16:44:16',
'updated_at' => '2015-06-14 15:00:36',
),
4 =>
array (
'id' => 19,
'parent_id' => NULL,
'lft' => 19,
'rgt' => 20,
'depth' => 0,
'name' => 'PC',
'slug' => 'pc',
'created_at' => '2015-06-13 16:45:26',
'updated_at' => '2015-06-14 15:00:36',
),
5 =>
array (
'id' => 20,
'parent_id' => NULL,
'lft' => 17,
'rgt' => 18,
'depth' => 0,
'name' => 'PlayStation 3',
'slug' => 'playstation-3',
'created_at' => '2015-06-13 16:46:28',
'updated_at' => '2015-06-14 15:00:36',
),
6 =>
array (
'id' => 23,
'parent_id' => 15,
'lft' => 2,
'rgt' => 3,
'depth' => 1,
'name' => 'Games',
'slug' => 'ps4-games',
'created_at' => '2015-06-13 17:01:16',
'updated_at' => '2015-06-13 17:01:52',
),
7 =>
array (
'id' => 25,
'parent_id' => 16,
'lft' => 8,
'rgt' => 9,
'depth' => 1,
'name' => 'Games',
'slug' => 'xbox-one-games',
'created_at' => '2015-06-13 17:02:20',
'updated_at' => '2015-06-14 15:00:36',
),
8 =>
array (
'id' => 26,
'parent_id' => 17,
'lft' => 12,
'rgt' => 13,
'depth' => 1,
'name' => 'Games',
'slug' => 'wii-u-games',
'created_at' => '2015-06-13 17:02:33',
'updated_at' => '2015-06-14 15:00:36',
),
9 =>
array (
'id' => 27,
'parent_id' => 15,
'lft' => 4,
'rgt' => 5,
'depth' => 1,
'name' => 'Consoles',
'slug' => 'ps4-consoles',
'created_at' => '2015-06-13 21:52:12',
'updated_at' => '2015-06-14 15:00:36',
),
));
}
}
|
IvanBernatovic/gameshop
|
database/seeds/CategoriesTableSeeder.php
|
PHP
|
mit
| 2,824
|
const express = require('express');
const config = require('./config/config');
const glob = require('glob');
const mongoose = require('mongoose');
mongoose.connect(config.db);
const db = mongoose.connection;
db.on('error', function () {
throw new Error('unable to connect to database at ' + config.db);
});
const models = glob.sync(config.root + '/app/models/*.js');
models.forEach(function (model) {
require(model);
});
const app = express();
require('./config/express')(app, config);
require('./config/helpers')(app, config);
module.exports = app;
module.exports.closeDatabase = function () {
mongoose.connection.close();
};
|
weld-io/bug-hunter-game
|
app/app.js
|
JavaScript
|
mit
| 634
|
<html>
<head>
<title>Acrostic Helper</title>
<script type="text/javascript" src="acrostic.js"></script>
</head>
<body>
<div id="setup">
<h4>Clues</h4>
<p>Enter the clues on the left (optional). Enter the numbers underneath the blanks on the right. Use 0 if a blank is not used in the final message.</p>
<textarea id="clues"></textarea>
<textarea id="cluepattern"></textarea>
<h4>Message</h4>
<p>If you know where spaces (or punctuation other than a period) occurs in the message, you can enter that information below. A period denotes a blank. For example, if you know that the message is a 3-letter word followed by a five-letter word, you would enter <tt>... .....</tt> below.</p>
<textarea id="messagepattern"></textarea>
<br/><button type="button" id="start">Start solving</button>
</div>
<div id="solve" style="display:none">
<h4>Clues</h4>
<textarea id="answers"></textarea>
<h4>Message</h4>
<textarea id="message"></textarea>
<div id="warnings">
</div>
<br/><button type="button" id="restart">Start over</button>
</div>
</body>
</html>
|
dgulotta/puzzle-tools
|
web/acrostic.html
|
HTML
|
mit
| 1,048
|
import unittest
from functools import partialmethod
from muk.sexp import *
class sexp_tests(unittest.TestCase):
def test_null_list(self):
self.isomorphism(l=[], c=[])
def test_singleton_proper_list_to_cons(self):
self.isomorphism(l=[1], c=cons(1, []))
def test_plain_proper_list_to_cons(self):
self.isomorphism(l=[1,2,3], c=cons(1, cons(2, cons(3, []))))
def test_plain_improper_list_to_cons(self):
self.isomorphism(l=(1,2,3), c=cons(1, cons(2, 3)))
def test_nested_improper_list_to_cons(self):
self.isomorphism(l=(1,[2,3], 4), c=cons(1, cons(cons(2, cons(3, [])), 4)))
def test_more_nested_improper_list_to_cons(self):
self.isomorphism(l=([3],(4,5), 6), c=cons(cons(3, []), cons(cons(4, 5), 6)))
def test_shadow_proper_list_using_improper_list_notation(self):
# pay attention, this is not an isomorphism, the next test shows the
# natural way of writing, without shadowing. The broken direction is
# represented by function `cons_to_list` which doesn't shadow objs it
# produces.
self.assertEqual(list_to_cons(([3],(4,5), [6])), cons(cons(3, []), cons(cons(4, 5), cons(6, []))))
def test_more_nested_improper_lists_into_proper_list_to_cons(self):
self.isomorphism(l=[[3],(4,5), 6], c=cons(cons(3, []), cons(cons(4, 5), cons(6, []))))
def test_invalid_improper_list(self):
with self.assertRaises(ImproperListError):
list_to_cons(l=(3,))
def test_invalid_improper_cons(self):
with self.assertRaises(ImproperListError):
cons_to_list(c=cons(3, ()))
def isomorphism(self, l, c):
self.assertEqual(c, list_to_cons(l))
self.assertEqual(l, cons_to_list(c))
def test_tuple_wrapping_and_ctor_call(self):
class A(tuple):
__int__ = partialmethod(sum)
a = (1,2,3,4) # vanilla tuple obj
self.assertEqual(tuple, type(a))
self.assertEqual(A, type(A(a)))
self.assertEqual(10, int(A(a)))
|
massimo-nocentini/on-python
|
microkanren/sexp_test.py
|
Python
|
mit
| 2,061
|
# Release History
## 11.4.0-beta.8 (Unreleased)
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
## 11.4.0-beta.7 (2022-03-08)
### Features Added
- Added support to create, update and delete aliases via the `SearchIndexClient`.
## 11.4.0-beta.6 (2022-02-08)
### Features Added
- Added `Unk` as an `OcrSkillLanguage` value. The values are used to set the default language code for the [OCR cognitive skill](https://docs.microsoft.com/azure/search/cognitive-search-skill-ocr).
- Support for [`AzureMachineLearningSkill`](https://docs.microsoft.com/azure/search/cognitive-search-aml-skill). The AML skill allows you to extend AI enrichment with a custom [Azure Machine Learning](https://docs.microsoft.com/azure/machine-learning/overview-what-is-azure-machine-learning) (AML) model. Once an AML model is [trained and deployed](https://docs.microsoft.com/azure/machine-learning/concept-azure-machine-learning-architecture#workspace), an AML skill integrates it into AI enrichment.
## 11.4.0-beta.5 (2021-11-09)
### Features Added
- Added support for [Semantic Search](https://docs.microsoft.com/azure/search/semantic-search-overview). `SearchOptions` now support specifying `SemanticSettings` to influence the search behavior.
### Breaking Changes
- Renamed `IndexerStateHighWaterMark` to `IndexerChangeTrackingState`.
- Renamed the property `HighWaterMark` to `ChangeTrackingState` in `IndexerState`.
## 11.4.0-beta.4 (2021-10-05)
### Features Added
- Added APIs to [reset documents](https://docs.microsoft.com/azure/search/search-howto-run-reset-indexers#reset-docs-preview) and [skills](https://docs.microsoft.com/azure/search/search-howto-run-reset-indexers#reset-skills-preview).
### Breaking Changes
- Renamed `QueryAnswer` to `QueryAnswerType` in `SearchOptions`.
- Renamed `QueryCaption` to `QueryCaptionType` in `SearchOptions`.
- Renamed `QuerySpeller` to `QuerySpellerType` in `SearchOptions`.
- Renamed `QueryCaptionHighlight` to `QueryCaptionHighlightEnabled` in `SearchOptions`.
## 11.4.0-beta.3 (2021-09-07)
### Features Added
- Support for [Lexical normalizers](https://docs.microsoft.com/azure/search/search-normalizers#normalizers) in [text analysers](https://docs.microsoft.com/rest/api/searchservice/test-analyzer) via `AnalyzeTextOptions`.
## 11.4.0-beta.2 (2021-08-10)
### Features Added
- Support for [Azure Active Directory](https://docs.microsoft.com/azure/active-directory/authentication/) based authentication. Users can specify a [`TokenCredential`](https://docs.microsoft.com/dotnet/api/azure.core.tokencredential) when creating a `SearchClient`, `SearchIndexClient` or a `SearchIndexerClient`. For example, you can get started with `new SearchClient(endpoint, new DefaultAzureCredential())` to authenticate via AAD using [Azure.Identity](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). For more details see [how to use role-based authentication in Azure Cognitive Search](https://docs.microsoft.com/azure/search/search-security-rbac?tabs=config-svc-portal%2Crbac-portal).
### Bugs Fixed
- Enhanced the documentation of some `SearchOptions` properties by adding links to REST docs - https://github.com/Azure/azure-sdk-for-net/issues/22808
## 11.4.0-beta.1 (2021-07-06)
### Features Added
- Support for additional/enhanced skills - [EntityLinkingSkill](https://docs.microsoft.com/azure/search/cognitive-search-skill-entity-linking-v3), [EntityRecognitionSkill](https://docs.microsoft.com/azure/search/cognitive-search-skill-entity-recognition-v3), [PiiDetectionSkill](https://docs.microsoft.com/azure/search/cognitive-search-skill-pii-detection), [SentimentSkill](https://docs.microsoft.com/azure/search/cognitive-search-skill-sentiment-v3)
- Use managed identities in Azure Active Directory with [SearchIndexerDataIdentity](https://docs.microsoft.com/azure/search/search-howto-managed-identities-data-sources)
## 11.3.0 (2021-06-08)
### Added
- Adds stable features and bug fixes from the [11.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/blob/Azure.Search.Documents_11.3.0-beta.1/sdk/search/Azure.Search.Documents/CHANGELOG.md#1130-beta1-2021-04-06) and [11.3.0-beta.2](https://github.com/Azure/azure-sdk-for-net/blob/Azure.Search.Documents_11.3.0-beta.2/sdk/search/Azure.Search.Documents/CHANGELOG.md#1130-beta2-2021-05-11) releases. Preview service features not generally available yet, like Semantic Search and Normalizers, are not included in this GA release.
## 11.3.0-beta.2 (2021-05-11)
### Added
- Added support for [Semantic Search](https://docs.microsoft.com/azure/search/semantic-search-overview).
## 11.3.0-beta.1 (2021-04-06)
### Added
- Added support for [`Azure.Core.GeoJson`](https://docs.microsoft.com/dotnet/api/azure.core.geojson) types in `SearchDocument`, `SearchFilter` and `FieldBuilder`.
- Added [`EventSource`](https://docs.microsoft.com/dotnet/api/system.diagnostics.tracing.eventsource) based logging. Event source name is **Azure-Search-Documents**. Current set of events are focused on tuning batch sizes for [`SearchIndexingBufferedSender`](https://docs.microsoft.com/dotnet/api/azure.search.documents.searchindexingbufferedsender-1).
- Added [`CustomEntityLookupSkill`](https://docs.microsoft.com/azure/search/cognitive-search-skill-custom-entity-lookup) and [`DocumentExtractionSkill`](https://docs.microsoft.com/azure/search/cognitive-search-skill-document-extraction). Added `DefaultCountryHint` in [`LanguageDetectionSkill`](https://docs.microsoft.com/azure/search/cognitive-search-skill-language-detection).
- Added [`LexicalNormalizer`](https://docs.microsoft.com/azure/search/search-normalizers#predefined-normalizers) to include predefined set of normalizers. See [here](https://docs.microsoft.com/azure/search/search-normalizers) for more details on search normalizers. Added `Normalizer` as a [`SearchField`](https://docs.microsoft.com/dotnet/api/azure.search.documents.indexes.models.searchfield) in an index definition.
- Added support for Azure Data Lake Storage Gen2 - [`AdlsGen2`](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-introduction) in [`SearchIndexerDataSourceType`](https://docs.microsoft.com/dotnet/api/azure.search.documents.indexes.models.searchindexerdatasourcetype).
## 11.2.0 (2021-02-10)
### Added
- Added setters for `MaxLength` and `MinLength` in `LengthTokenFilter`.
- Added a public constructor for `SearchIndexingBufferedSender<T>`.
- Added `IndexActionEventArgs<T>` to track indexing actions.
- Added `IndexActionCompletedEventArgs<T>` to track the completion of an indexing action.
- Added `IndexActionFailedEventArgs<T>` to track the failure of an indexing action.
- All changes from the 11.2.0-beta.2 and 11.2.0-beta.1 releases listed below.
### Breaking Changes
- Renamed `SearchIndexingBufferedSenderOptions<T>.MaxRetries` to `SearchIndexingBufferedSenderOptions<T>.MaxRetriesPerIndexAction`.
- Renamed `SearchIndexingBufferedSenderOptions<T>.MaxRetryDelay` to `SearchIndexingBufferedSenderOptions<T>.MaxThrottlingDelay`.
- Renamed `SearchIndexingBufferedSenderOptions<T>.RetryDelay` to `SearchIndexingBufferedSenderOptions<T>.ThrottlingDelay`.
- Removed the helper method `SearchClient.CreateIndexingBufferedSender<T>()`. Instead, callers are expected to use the public constructor of `SearchIndexingBufferedSender<T>`.
## 11.2.0-beta.2 (2020-11-10)
### Added
- Added `EncryptionKey` to `SearchIndexer`, `SearchIndexerDataSourceConnection`, and `SearchIndexerSkillset`.
- Added configuration options to tune the performance of `SearchIndexingBufferedSender<T>`.
### Fixed
- Fixed issue calling `SearchIndexClient.GetIndexNames` that threw an exception ([#15590](https://github.com/Azure/azure-sdk-for-net/issues/15590))
- Fixed issue where `ScoringProfile.FunctionAggregation` did not correctly handle null values ([#16570](https://github.com/Azure/azure-sdk-for-net/issues/16570))
- Fixed overly permissive date parsing on facets ([#16412](https://github.com/Azure/azure-sdk-for-net/issues/16412))
## 11.2.0-beta.1 (2020-10-09)
### Added
- Add `SearchIndexingBufferedSender<T>` to make indexing lots of documents fast and easy.
- Add support to `FieldBuilder` to define search fields for `Microsoft.Spatial` types without an explicit assembly dependency.
- Add support to `SearchFilter` to encode geometric types from `Microsoft.Spatial` without an explicit assembly dependency.
- Add `IndexingParameters.IndexingParametersConfiguration` property to define well-known properties supported by Azure Cognitive Search.
### Fixed
- Support deserializing null values during deserialization of skills ([#15108](https://github.com/Azure/azure-sdk-for-net/issues/15108))
- Fixed issues preventing mocking clients or initializing all models.
## 11.1.1 (2020-08-18)
### Fixed
- Bug in TaskExtensions.EnsureCompleted method that causes it to unconditionally throw an exception in the environments with synchronization context
## 11.1.0 (2020-08-11)
### Added
- Added `SearchClientOptions.Serializer` to set which `ObjectSerializer` to use for serialization.
- Added `FieldBuilder` to easily create `SearchIndex` fields from a model type.
### Removed
- Removed `$select` from the query parameters logged by default. You can add it back via `SearchClientOptions.Diagnostics.LoggedQueryParameters("$select");` if desired.
## 11.0.0 (2020-07-07)
### Changed
- Changed version to 11.0.0.
- Removed preview version `SearchClientOptions.ServiceVersion.V2019_05_06_Preview`
and added version `SearchClientOptions.ServiceVersion.V2020_06_30`.
### Removed
- Removed `Azure.Core.Experimental` reference and features until they're moved
into `Azure.Core`.
- Removed `SearchServiceCounters.SkillsetCounter`.
- Removed `new SearchOptions(string continuationToken)` overload.
## 1.0.0-preview.4 (2020-06-09)
### Added
- Referencing `Azure.Core.Experimental` which brings new spatial types and custom serializers.
- Added `SearchClientBuilderExtensions` to integrate with ASP.NET Core.
- Added `SearchModelFactory` to mock output model types.
### Breaking Changes
- Made collection- and dictionary-type properties read-only, i.e. has only get-accessors, based on [.NET Guidelines][net-guidelines-collection-properties].
- Moved models for managing indexes, indexers, and skillsets to `Azure.Search.Documents.Indexes.Models`.
- Removed the `SynonymMap.Format` property since only the "solr" format is supported currently.
- Renamed `AnalyzeRequest` to `AnalyzeTextOptions`, and overloaded constructors with required parameters.
- Renamed `AnalyzeTextOptions.Analyzer` to `AnalyzeTextOptions.AnalyzerName`.
- Renamed `AnalyzeTextOptions.Tokenizer` to `AnalyzeTextOptions.TokenizerName`.
- Renamed `CustomAnalyzer.Tokenizer` to `CustomAnalyzer.TokenizerName`.
- Renamed `SearchIndexerDataSource` to `SearchIndexerDataSourceConnection`.
- Renamed `Autocompletion` to `AutocompleteItem`.
- Renamed methods on `SearchIndexerClient` matching "\*DataSource" to "\*DataSourceConnection".
- Split `SearchServiceClient` into `SearchIndexClient` for managing indexes, and `SearchIndexerClient` for managing indexers, both of which are now in `Azure.Search.Documents.Indexes`.
- `SearchClient.IndexDocuments` now throws an `AggregateException` wrapping all the `RequestFailedException`s in the batch.
- Removed `dynamic` support from `SearchDocument` for the time being.
## 1.0.0-preview.3 (2020-05-05)
### Breaking Changes
- Renamed `SearchIndexClient` to `SearchClient`.
- Removed constructor from `SynonymMap` with `IEnumerable<string>` parameter.
- `SearchServiceClient.GetIndexes` and `SearchServiceClient.GetIndexesAsync` now return `Pageable<SearchIndex>` and `AsyncPageable<SearchIndex>` respectively.
- Replaced `MatchConditions` parameters with `bool onlyIfUnchanged` parameters that require a model with an `ETag` property.
- `ETag` properties have been redefined from `string` to `Azure.ETag?` consistent with other packages.
- Renamed `Analyzer` to `LexicalAnalyzer`.
- Renamed `AnalyzerName` to `LexicalAnalyzerName`.
- Removed `AzureActiveDirectoryApplicationCredentials` and moved its `ApplicationId` and `ApplicationSecret` properties to `SearchResourceEncryptionKey`.
- Renamed `DataContainer` to `SearchIndexerDataContainer`.
- Renamed `DataSource` to `SearchIndexerDataSource`.
- Removed `DataSourceCredentials` and moved its `ConnectionString` property to `SearchIndexerDataSource`.
- Renamed `DataSourceType` to `SearchIndexerDataSourceType`.
- Renamed `DataType` to `SearchFieldDataType`.
- Renamed `EncryptionKey` to `SearchResourceEncryptionKey`.
- Renamed `EncryptionKey.KeyVaultUri` to `SearchResourceEncryptionKey.VaultUri`.
- Renamed `EncryptionKey.KeyVaultKeyName` to `SearchResourceEncryptionKey.KeyName`.
- Renamed `EncryptionKey.KeyVaultKeyVersion` to `SearchResourceEncryptionKey.KeyVersion`.
- Renamed `Field` to `SearchField`.
- Renamed `FieldBase` to `SearchFieldTemplate`.
- Renamed `Index` to `SearchIndex`.
- Renamed `Indexer` to `SearchIndexer`.
- Renamed `IndexerExecutionInfo` to `SearchIndexerStatus`.
- Renamed `IndexerLimits` to `SearchIndexerLimits`.
- Renamed `ItemError` to `SearchIndexerError`.
- Renamed `ItemWarning` to `SearchIndexerWarning`.
- Renamed `LengthTokenFilter.Min` to `LengthTokenFilter.MinLength`.
- Renamed `LengthTokenFilter.Max` to `LengthTokenFilter.MaxLength`.
- Renamed `RegexFlags` to `RegexFlag` following .NET naming guidelines.
- Renamed `Skill` to `SearchIndexerSkill`.
- Renamed `Skillset` to `SearchIndexerSkillset`.
- Renamed `StandardAnalyzer` to `LuceneStandardAnalyzer`.
- Renamed `StandardTokenizer` to `LuceneStandardTokenizer`.
- Renamed `StandardTokenizerV2` to `LuceneStandardTokenizerV2`.
- Renamed `TokenInfo` to `AnalyzedTokenInfo`.
- Renamed `Tokenizer` to `LexicalTokenizer`.
- Renamed `TokenizerName` to `LexicalTokenizerName`.
## 1.0.0-preview.2 (2020-04-06)
### Added
- Added models and methods to `SearchServiceClient` to create and manage indexes.
- Added support for continuation tokens to resume server-side paging.
### Breaking Changes
- Renamed to Azure.Search.Documents (assembly, namespace, and package)
- Replaced SearchApiKeyCredential with AzureKeyCredential
- Renamed `SearchServiceClient.GetStatistics` and `SearchServiceClient.GetStatisticsAsync` to `SearchServiceClient.GetServiceStatistics` and `SearchServiceClient.GetServiceStatisticsAsync`
## 11.0.0-preview.1 (2020-03-13)
- Initial preview of the Azure.Search client library enabling you to query
and update documents in search indexes.
[net-guidelines-collection-properties]: https://docs.microsoft.com/dotnet/standard/design-guidelines/guidelines-for-collections#collection-properties-and-return-values
|
Azure/azure-sdk-for-net
|
sdk/search/Azure.Search.Documents/CHANGELOG.md
|
Markdown
|
mit
| 14,709
|
require File.dirname(__FILE__) + '/../test_helper'
class OptionsValidatorTest < ActiveSupport::TestCase
test "tiny mce should load the valid options on init" do
assert_not_nil TinyMCE::OptionValidator.options
end
test "tiny mce should allow a certain number of options" do
assert_equal 154, TinyMCE::OptionValidator.options.size
end
test "the valid method accepts valid options as strings or symbols" do
assert TinyMCE::OptionValidator.valid?('mode')
assert TinyMCE::OptionValidator.valid?('plugins')
assert TinyMCE::OptionValidator.valid?('theme')
assert TinyMCE::OptionValidator.valid?(:mode)
assert TinyMCE::OptionValidator.valid?(:plugins)
assert TinyMCE::OptionValidator.valid?(:theme)
end
test "the valid method detects invalid options as strings or symbols" do
assert !TinyMCE::OptionValidator.valid?('a_fake_option')
assert !TinyMCE::OptionValidator.valid?(:wrong_again)
end
test "plugins can be set in the options validator and be valid" do
TinyMCE::OptionValidator.plugins = Array.new
assert !TinyMCE::OptionValidator.valid?('paste_auto_cleanup_on_paste')
TinyMCE::OptionValidator.plugins = %w{paste}
assert TinyMCE::OptionValidator.valid?('paste_auto_cleanup_on_paste')
end
test "plugins can be added at a later stage in the script" do
TinyMCE::OptionValidator.plugins = %w{paste}
assert TinyMCE::OptionValidator.valid?('paste_auto_cleanup_on_paste')
TinyMCE::OptionValidator.plugins += %w{fullscreen}
assert ['paste', 'fullscreen'], TinyMCE::OptionValidator.plugins
assert TinyMCE::OptionValidator.valid?('fullscreen_overflow')
end
test "advanced theme container options get through based on regex" do
assert TinyMCE::OptionValidator.valid?('theme_advanced_container_content1')
assert TinyMCE::OptionValidator.valid?('theme_advanced_container_content1_align')
assert TinyMCE::OptionValidator.valid?('theme_advanced_container_content1_class')
assert !TinyMCE::OptionValidator.valid?('theme_advanced_container_[content]')
assert !TinyMCE::OptionValidator.valid?('theme_advanced_container_[content]_align')
assert !TinyMCE::OptionValidator.valid?('theme_advanced_container_[content]_class')
end
end
|
gordonbisnor/Wilderness
|
install-with-rake/vendor/plugins/tiny_mce/test/unit/options_validator_test.rb
|
Ruby
|
mit
| 2,245
|
<?php
namespace ERP\CRMBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use ERP\CRMBundle\Entity\CrmActividad;
use ERP\CRMBundle\Entity\CrmCuenta;
use ERP\CRMBundle\Entity\CrmAsignacionActividad;
use ERP\CRMBundle\Form\CrmActividadType;
/**
* CrmActividad controller.
*
* @Route("/admin/calls")
*/
class CrmLlamadasController extends Controller
{
/**
* Lists all CrmActividad entities.
*
* @Route("/", name="admin_calls_index")
* @Method("GET")
*/
public function indexAction()
{
try{
$em = $this->getDoctrine()->getManager();
// $crmCuentas = $em->getRepository('ERPCRMBundle:CrmCuenta')->findAll();
$response = new JsonResponse();
//Persona-usuarios
$personas = $em->getRepository('ERPCRMBundle:CtlUsuario')->findBy(array('estado' => 1));
//Estado
$estados = $em->getRepository('ERPCRMBundle:CrmEstadoActividad')->findAll();
//Tipo recordatorio
$recordatorios = $em->getRepository('ERPCRMBundle:CtlTipoRecordatorio')->findAll();
//Tipo recordatorio
$tiempos = $em->getRepository('ERPCRMBundle:CtlTiempoNotificacion')->findBy(array('estado' => 1), array('tiempoReal' => 'ASC'));
//Prioridad
$prioridad = $em->getRepository('ERPCRMBundle:CtlPrioridad')->findBy(array('estado' => 1));
//Actividades
$actividades = $em->getRepository('ERPCRMBundle:CrmTipoActividad')->findBy(array('estado' => 1));
// //$personas = $em->getRepository('ERPCRMBundle:CtlTipoEntidad')->findBy(array('estado'=>1));
// $personas = $em->getRepository('ERPCRMBundle:CtlTipoEntidad')->findAll();
// //Tipo industria
// $industrias = $em->getRepository('ERPCRMBundle:CtlIndustria')->findAll(array('estado'=>1));
// //Tipos telefono
// $tiposTelefono = $em->getRepository('ERPCRMBundle:CtlTipoTelefono')->findAll();
return $this->render('crmactividad/index_calls.html.twig', array(
// 'crmCuentas' => $crmCuentas,
'personas'=>$personas,
'estados'=>$estados,
'recordatorios'=>$recordatorios,
'tiempos'=>$tiempos,
'prioridad'=>$prioridad,
'actividades'=>$actividades,
'menuCallsA'=>true,
// 'personas'=>$personas,
// 'industrias'=>$industrias,
// 'tiposTelefono'=>$tiposTelefono,
// 'menuProveedorA' => true,
));
} catch (\Exception $e) {
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode()))
{
case 2003:
$serverOffline = $this->getParameter('app.serverOffline');
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
break;
default :
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
$row['data'][0]['name'] = $e->getMessage();
break;
}
}
else{
$data['error']=$e->getMessage();
}
$response->setData($data);
return $response;
}
}
/////Actividades calls
/**
* List level of activities
*
* @Route("/activities-calls/data/list", name="admin_activities_calls_data", options={"expose"=true}))
*/
public function dataactivitiesAction(Request $request)
{
try {
$timeZone = $this->get('time_zone')->getTimeZone();
date_default_timezone_set($timeZone->getNombre());
$start = $request->query->get('start');
$draw = $request->query->get('draw');
$longitud = $request->query->get('length');
$busqueda = $request->query->get('search');
$em = $this->getDoctrine()->getEntityManager();
$sql = "SELECT obj.id as id FROM ERPCRMBundle:CrmActividad obj "
."JOIN obj.tipoActividad tact WHERE tact.id=2";
$rowsTotal = $em->createQuery($sql)
->getResult();
$row['draw']=$draw++;
$row['recordsTotal'] = count($rowsTotal);
$row['recordsFiltered']= count($rowsTotal);
$row['data']= array();
$arrayFiltro = explode(' ',$busqueda['value']);
$orderParam = $request->query->get('order');
$orderBy = $orderParam[0]['column'];
$orderDir = $orderParam[0]['dir'];
$orderByText="";
switch(intval($orderBy)){
case 1:
$orderByText = "dateStart";
break;
case 2:
$orderByText = "name";
break;
// case 2:
// $orderByText = "priority";
// break;
case 3:
$orderByText = "responsable";
break;
// case 5:
// $orderByText = "dateCancel";
// break;
case 4:
$orderByText = "estado";
break;
}
// var_dump($orderByText);
$busqueda['value'] = str_replace(' ', '%', $busqueda['value']);
if($busqueda['value']!=''){
$sql = "SELECT CONCAT('<div id=\"',act.id,'\" style=\"text-align:left\"><input style=\"z-index:5;\" class=\"chkItem\" type=\"checkbox\"></div>') as chk, CONCAT('<div style=\"text-align:left\">',act.nombre,'</div>') as name, CONCAT('<div style=\"text-align:left\">',p.nombre,'</div>') as priority, est.nombre as estado,
(SELECT CONCAT('<div style=\"text-align:left\">',per.nombre,'<br>',per.apellido,'</div>')
FROM crm_asignacion_actividad asig
INNER JOIN ctl_usuario user on(asig.usuario_asignado=user.id)
INNER JOIN ctl_persona per on(user.persona=per.id)
WHERE asig.actividad=act.id LIMIT 0,1 ) as responsable,CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_inicio, '%H:%i'),'</div>') as 'dateStart', CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_fin, '%H:%i'),'</div>') as 'dateEnd',CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_cancelacion, '%H:%i'),'</div>') as 'dateCancel'
FROM crm_actividad act
INNER JOIN ctl_prioridad p on(act.prioridad = p.id)
INNER JOIN crm_tipo_actividad tact on(act.tipo_actividad = tact.id)
INNER JOIN crm_estado_actividad est on(act.estado_actividad = est.id)
WHERE tact.id=2
GROUP BY 1
HAVING estado LIKE upper('%".$busqueda['value']."%') OR dateStart LIKE upper('%".$busqueda['value']."%') OR dateEnd LIKE upper('%".$busqueda['value']."%') OR priority LIKE upper('%".$busqueda['value']."%') OR name LIKE upper('%".$busqueda['value']."%') OR responsable LIKE upper('%".$busqueda['value']."%')
ORDER BY ". $orderByText." ".$orderDir;
$stmt = $em->getConnection()->prepare($sql);
$stmt->execute();
$row['data'] = $stmt->fetchAll();
$row['recordsFiltered']= count($row['data']);
$sql = "SELECT CONCAT('<div id=\"',act.id,'\" style=\"text-align:left\"><input style=\"z-index:5;\" class=\"chkItem\" type=\"checkbox\"></div>') as chk, CONCAT('<div style=\"text-align:left\">',act.nombre,'</div>') as name, CONCAT('<div style=\"text-align:left\">',p.nombre,'</div>') as priority, est.nombre as estado,
(SELECT CONCAT('<div style=\"text-align:left\">',per.nombre,'<br>',per.apellido,'</div>')
FROM crm_asignacion_actividad asig
INNER JOIN ctl_usuario user on(asig.usuario_asignado=user.id)
INNER JOIN ctl_persona per on(user.persona=per.id)
WHERE asig.actividad=act.id LIMIT 0,1 ) as responsable, CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_inicio, '%H:%i'),'</div>') as 'dateStart', CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_fin, '%H:%i'),'</div>') as 'dateEnd',CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_cancelacion, '%H:%i'),'</div>') as 'dateCancel'
FROM crm_actividad act
INNER JOIN ctl_prioridad p on(act.prioridad = p.id)
INNER JOIN crm_tipo_actividad tact on(act.tipo_actividad = tact.id)
INNER JOIN crm_estado_actividad est on(act.estado_actividad = est.id)
WHERE tact.id=2
GROUP BY 1
HAVING estado LIKE upper('%".$busqueda['value']."%') OR dateStart LIKE upper('%".$busqueda['value']."%') OR dateEnd LIKE upper('%".$busqueda['value']."%') OR priority LIKE upper('%".$busqueda['value']."%') OR name LIKE upper('%".$busqueda['value']."%') OR responsable LIKE upper('%".$busqueda['value']."%')
ORDER BY ". $orderByText." ".$orderDir." LIMIT " . $start . "," . $longitud;
$stmt = $em->getConnection()->prepare($sql);
$stmt->execute();
$row['data'] = $stmt->fetchAll();
}
else{
$sql = "SELECT CONCAT('<div id=\"',act.id,'\" style=\"text-align:left\"><input style=\"z-index:5;\" class=\"chkItem\" type=\"checkbox\"></div>') as chk, CONCAT('<div style=\"text-align:left\">',act.nombre,'</div>') as name, CONCAT('<div style=\"text-align:left\">',p.nombre,'</div>') as priority, est.nombre as estado,
(SELECT CONCAT('<div style=\"text-align:left\">',per.nombre,'<br>',per.apellido,'</div>')
FROM crm_asignacion_actividad asig
INNER JOIN ctl_usuario user on(asig.usuario_asignado=user.id)
INNER JOIN ctl_persona per on(user.persona=per.id)
WHERE asig.actividad=act.id LIMIT 0,1 ) as responsable, CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_inicio, '%H:%i'),'</div>') as 'dateStart', CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_fin, '%H:%i'),'</div>') as 'dateEnd',CONCAT('<div style=\"text-align:left\">',DATE_FORMAT(act.fecha_inicio, '%Y-%m-%d'),'<br>',DATE_FORMAT(act.fecha_cancelacion, '%H:%i'),'</div>') as 'dateCancel'
FROM crm_actividad act
INNER JOIN ctl_prioridad p on(act.prioridad = p.id)
INNER JOIN crm_tipo_actividad tact on(act.tipo_actividad = tact.id)
INNER JOIN crm_estado_actividad est on(act.estado_actividad = est.id)
WHERE tact.id=2
GROUP BY 1
ORDER BY ". $orderByText." ".$orderDir." LIMIT " . $start . "," . $longitud;
$stmt = $em->getConnection()->prepare($sql);
$stmt->execute();
$row['data'] = $stmt->fetchAll();
// $row['recordsFiltered']= count($row['data']);
// var_dump($row);
}
return new Response(json_encode($row));
} catch (\Exception $e) {
// var_dump($e);
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode()))
{
case 2003:
$serverOffline= $this->getParameter('app.serverOffline');
$row['data'][0]['name'] =$serverOffline.'. CODE: '.$e->getErrorCode();
break;
default :
$row['data'][0]['name'] = $e->getMessage();
break;
}
$row['data'][0]['chk'] ='';
$row['recordsFiltered']= 0;
}
else{
$data['error']=$e->getMessage();
}
return new Response(json_encode($row));
}
}
//////Fin de actividades
/**
* Save calls
*
* @Route("/calls/save", name="admin_calls_save_ajax", options={"expose"=true}))
* @Method("POST")
*/
public function saveajaxAction(Request $request)
{
$isAjax = $this->get('Request')->isXMLhttpRequest();
if($isAjax){
try {
$timeZone = $this->get('time_zone')->getTimeZone();
date_default_timezone_set($timeZone->getNombre());
$em = $this->getDoctrine()->getEntityManager();
$em->getConnection()->beginTransaction();
$response = new JsonResponse();
$imgData = $_FILES;
//Captura de parametros
// var_dump($_POST);
date_default_timezone_set("America/Los_Angeles");
//tasks
$idTasks = $_POST['id'];//id crmActividad
$nombreTasks= $_POST['nombre'];//id crmActividad
$estado = $_POST['estado'];//Estado tasks
$descripcionTasks = $_POST['descripcion'];//descripcion
$tipoTasks = $_POST['tipoActividades'];//id de las actividades para tareas/tasks
if(isset($_POST['cuentaActividades'])){
$cuentaId = $_POST['cuentaActividades'];//id de las cuentas
}
else{
$cuentaId = 0;//id de las cuentas
}
$fechaInicio = $_POST['inicio'];//Inicio de actividad, fecha
$fechaFin = $_POST['fin'];//Fin de actividad, fecha
// var_dump($fechaInicio);
// var_dump($fechaInicio);
$dateInicio = new \DateTime($fechaInicio[0]);
$dateFin = new \DateTime($fechaFin[0]);
// var_dump($dateInicio);
// var_dump($dateFin);
// die();
//Se buscan foraneas de otras tablas, a partir de estos valores
$responsableArray = $_POST['responsable'];//responsable
$tipoRecordatorioArray = $_POST['tipoRecordatorio'];//tipoRecordatorio
$tiempoRecordatorioArray = $_POST['tiempoRecordatorio'];//tiempoRecordatorio
$prioridad = $_POST['prioridad'];//prioridad tasks
$fechaRegistro = new \DateTime('now');//descripcion
//Busqueda objetos a partir de ids
$estadoObj = $em->getRepository('ERPCRMBundle:CrmEstadoActividad')->find($estado);
$prioridadObj = $em->getRepository('ERPCRMBundle:CtlPrioridad')->find($prioridad);
$cuentaObj = $em->getRepository('ERPCRMBundle:CrmCuenta')->find($cuentaId);
// var_dump($cuentaObj);
// die();
$tipoActividadObj = $em->getRepository('ERPCRMBundle:CrmTipoActividad')->find($tipoTasks);//Task o tareas
// var_dump($tipoActividadObj);
// die();
if($idTasks==''){
//Tabla crmActividad
$crmActividadObj = new CrmActividad();
$crmActividadObj->setTipoActividad($tipoActividadObj);
$crmActividadObj->setPrioridad($prioridadObj);
$crmActividadObj->setEstadoActividad($estadoObj);
$crmActividadObj->setSucursal(null);
$crmActividadObj->setNombre($nombreTasks);
$crmActividadObj->setDescripcion($descripcionTasks);
$crmActividadObj->setFechaRegistro($fechaRegistro);
$crmActividadObj->setFechaInicio($dateInicio);
$crmActividadObj->setFechaFin($dateFin);
$crmActividadObj->setFechaCancelacion(null);
$crmActividadObj->setCuenta($cuentaObj);
$calendarId =$serverSave = $this->getParameter('app.googlecalendar');
$superGoogle= $this->get('calendar.google')->getFirstSyncToken($calendarId);
//$superGoogle= $this->get('calendar.google')->getEvents($calendarId,$superGoogle);
//Persist crmActividadObj
$em->persist($crmActividadObj);
$em->flush();
$eventAttendee = array();
//Tabla crmAsignacionActividad
foreach ($responsableArray as $key => $per) {
//Tabla crmAsignacionActividad
$responsableUsuarioObj = $em->getRepository('ERPCRMBundle:CtlUsuario')->find($per);
$idPersona = $responsableUsuarioObj->getPersona()->getId();
$correosPersona = $em->getRepository('ERPCRMBundle:CtlCorreo')->findBy(array('persona'=>$idPersona));
if(count($correosPersona)!=0){
array_push($eventAttendee, $correosPersona[0]->getEmail());
}
$crmAsignacionActividad = new CrmAsignacionActividad();
$crmAsignacionActividad->setActividad($crmActividadObj);
$crmAsignacionActividad->setUsuarioAsignado($responsableUsuarioObj);
$tiempoNotificacionUsuarioObj = $em->getRepository('ERPCRMBundle:CtlTiempoNotificacion')->find($tiempoRecordatorioArray[$key]);
$crmAsignacionActividad->setTiempoNotificacion($tiempoNotificacionUsuarioObj);
$tipoRecordatorioObj = $em->getRepository('ERPCRMBundle:CtlTipoRecordatorio')->find($tipoRecordatorioArray[$key]);
$crmAsignacionActividad->setTipoRecordatorio($tipoRecordatorioObj);
//Persist crmAsignacionActividad
$em->persist($crmAsignacionActividad);
$em->flush();
}
$eventStart = $dateInicio;
$eventEnd = $dateFin;
// var_dump($eventStart);
// var_dump($eventEnd);
$eventSummary = $nombreTasks;
$eventDescription = $descripcionTasks;
$optionalParams = [];
$superGoogle= $this->get('calendar.google')->addEvent($calendarId,$eventStart,$eventEnd,$eventSummary,$eventDescription,$eventAttendee,$optionalParams = []);
$crmActividadObj->setGoogleId($superGoogle->getId());
$em->merge($crmAsignacionActividad);
$em->flush();
//$superGoogle= $this->get('calendar.google')->initEventsList($this->getCalendarId());
$serverSave = $this->getParameter('app.serverMsgSave');
$data['id']=$crmActividadObj->getId();
$data['msg']=$serverSave;
}//Fin de if id, inserción
//else para la modificación del objeto crmCuenta(proveedores) y sus tablas dependientes
else{
// var_dump($phoneTypeArray);
// die();
$crmActividadObj = $em->getRepository('ERPCRMBundle:CrmActividad')->find($idTasks);
// $crmActividadObjDuplicate = $em->getRepository('ERPCRMBundle:CrmActividad')->findBy(array('nombre'=>$nombreTasks));
// var_dump($crmActividadObjDuplicate);
// die();
// if ($crmActividadObj[0]->getId()==$crmActividadObjDuplicate[0]->getId()) {
// $crmActividadObj->setTipoActividad($tipoActividadObj);
$crmActividadObj->setPrioridad($prioridadObj);
$crmActividadObj->setEstadoActividad($estadoObj);
$crmActividadObj->setNombre($nombreTasks);
$crmActividadObj->setDescripcion($descripcionTasks);
$crmActividadObj->setFechaInicio($dateInicio);
$crmActividadObj->setFechaFin($dateFin);
$crmActividadObj->setCuenta($cuentaObj);
//Persist crmCuentaObj
$em->merge($crmActividadObj);
$em->flush();
//Eliminar personal asignado
$crmAsignacionArrayObj = $em->getRepository('ERPCRMBundle:CrmAsignacionActividad')->findBy(array('actividad'=>$idTasks));
foreach ($crmAsignacionArrayObj as $key => $value) {
$em->remove($value);
$em->flush();
}
$calendarId =$serverSave = $this->getParameter('app.googlecalendar');
$superGoogle= $this->get('calendar.google')->getFirstSyncToken($calendarId);
$eventId = $crmActividadObj->getGoogleId();
$eventAttendee = array();
//Recuperar información del evento de google calendar, la url es necesaria para poder consultar, lleva el id del calendario, id del evento y el token de acceso
// $superGoogle= $this->get('calendar.google')->getToken();
// $url = 'https://www.googleapis.com/calendar/v3/calendars/fbk7pcdkcncqo0f3ur264nimsk%40group.calendar.google.com/events/i3s7m1oim79tlacs38sodu5c6c/?access_token='.str_replace('"', '', $superGoogle);
// var_dump($url);
// $data = file_get_contents('https://www.googleapis.com/calendar/v3/calendars/fbk7pcdkcncqo0f3ur264nimsk%40group.calendar.google.com/events/i3s7m1oim79tlacs38sodu5c6c/?access_token='.str_replace('"', '', $superGoogle));
// var_dump( json_decode($data));
// die();
//Tabla crmAsignacionActividad
foreach ($responsableArray as $key => $per) {
//Tabla crmAsignacionActividad
$responsableUsuarioObj = $em->getRepository('ERPCRMBundle:CtlUsuario')->find($per);
$idPersona = $responsableUsuarioObj->getPersona()->getId();
$correosPersona = $em->getRepository('ERPCRMBundle:CtlCorreo')->findBy(array('persona'=>$idPersona));
if(count($correosPersona)!=0){
array_push($eventAttendee, $correosPersona[0]->getEmail());
}
// var_dump($eventAttendee);
$crmAsignacionActividad = new CrmAsignacionActividad();
$crmAsignacionActividad->setActividad($crmActividadObj);
$crmAsignacionActividad->setUsuarioAsignado($responsableUsuarioObj);
$tiempoNotificacionUsuarioObj = $em->getRepository('ERPCRMBundle:CtlTiempoNotificacion')->find($tiempoRecordatorioArray[$key]);
$crmAsignacionActividad->setTiempoNotificacion($tiempoNotificacionUsuarioObj);
$tipoRecordatorioObj = $em->getRepository('ERPCRMBundle:CtlTipoRecordatorio')->find($tipoRecordatorioArray[$key]);
$crmAsignacionActividad->setTipoRecordatorio($tipoRecordatorioObj);
//Persist crmAsignacionActividad
$em->persist($crmAsignacionActividad);
$em->flush();
}
/////Manejo de excepciones para comprobar que el evento existe en google calendar
try {
//Eliminar evento en google calendar
$superGoogle= $this->get('calendar.google')->deleteEvent($calendarId,$eventId);
} catch (\Exception $e) {
}
$eventStart = $dateInicio;
$eventEnd = $dateFin;
// var_dump($eventStart);
// var_dump($eventEnd);
$eventSummary = $nombreTasks;
$eventDescription = $descripcionTasks;
$optionalParams = [];
$superGoogle= $this->get('calendar.google')->addEvent($calendarId,$eventStart,$eventEnd,$eventSummary,$eventDescription,$eventAttendee,$optionalParams = []);
$crmActividadObj->setGoogleId($superGoogle->getId());
$em->merge($crmAsignacionActividad);
$em->flush();
// $serverDuplicate = $this->getParameter('app.serverDuplicateName');
// $data['error'] = $serverDuplicate."! CODE: ".$e->getErrorCode();
$serverSave = $this->getParameter('app.serverMsgSave');
$data['msg']=$serverSave;
$data['id']=$idTasks;
// }
// else{
// $serverSave = $this->getParameter('app.serverMsgUpdate');
// $data['msg']=$serverSave;
// $data['id']=$idTasks;
// }
}
$em->getConnection()->commit();
$em->close();
$response->setData($data);
} catch (\Exception $e) {
$em->getConnection()->rollback();
$em->close();
// var_dump($e);
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode())){
case 2003:
$serverOffline = $this->getParameter('app.serverOffline');
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
break;
case 1062:
$serverDuplicate = $this->getParameter('app.serverDuplicateName');
$data['error'] = $serverDuplicate."! CODE: ".$e->getErrorCode();
break;
default :
$data['error'] = "Error CODE: ".$e->getMessage();
break;
}
}
else{
$data['error']=$e->getMessage();
}
$response->setData($data);
}
} else {
$data['error']='Ajax request';
$response->setData($data);
}
return $response;
}
/**
* Retrieve calls
*
* @Route("/calls/retrieve", name="admin_calls_retrieve_ajax", options={"expose"=true}))
* @Method("POST")
*/
public function retrieveajaxAction(Request $request)
{
try {
$timeZone = $this->get('time_zone')->getTimeZone();
date_default_timezone_set($timeZone->getNombre());
$idAct=$request->get("param1");
$response = new JsonResponse();
$em = $this->getDoctrine()->getManager();
$crmActividadObj = $em->getRepository('ERPCRMBundle:CrmActividad')->find($idAct);
// $calendarId =$serverSave = $this->getParameter('app.googlecalendar');
// $superGoogle= $this->get('calendar.google')->getFirstSyncToken($calendarId);
// var_dump($superGoogle);
// $calendarId =$serverSave = $this->getParameter('app.googlecalendar');
// $superGoogle= $this->get('calendar.google')->getFirstSyncToken($calendarId);
// $eventId = $crmActividadObj->getGoogleId();
// $eventAttendee = array();
// //Recuperar información del evento de google calendar, la url es necesaria para poder consultar, lleva el id del calendario, id del evento y el token de acceso
// $superGoogle= $this->get('calendar.google')->getToken();
// var_dump($superGoogle);
// $url = 'https://www.googleapis.com/calendar/v3/calendars/fbk7pcdkcncqo0f3ur264nimsk%40group.calendar.google.com/events/i3s7m1oim79tlacs38sodu5c6c/?access_token='.str_replace('"', '', $superGoogle);
// //var_dump($url);
// $data = file_get_contents('https://www.googleapis.com/calendar/v3/calendars/fbk7pcdkcncqo0f3ur264nimsk%40group.calendar.google.com/events/i3s7m1oim79tlacs38sodu5c6c/?access_token='.str_replace('"', '', $superGoogle));
// var_dump( json_decode($data));
// die();
// var_dump($ctlTelefonoObj);
if(count($crmActividadObj)!=0){
//$object->setProbabilidad($);
//$em->merge($object);
//$em->flush();
//var_dump($crmActividadObj);
// die();
$data['nombre']=$crmActividadObj->getNombre();
$data['estado']=$crmActividadObj->getEstadoActividad()->getId();
$data['descripcion']=$crmActividadObj->getDescripcion();
if ($crmActividadObj->getCuenta()!=null) {
$data['cuentaNombre']=$crmActividadObj->getCuenta()->getNombre();
$data['cuentaId']=$crmActividadObj->getCuenta()->getId();
} else {
$data['cuentaNombre']=0;
$data['cuentaId']=0;
}
$fechaInicio=$crmActividadObj->getFechaInicio();
$fechaFin=$crmActividadObj->getFechaFin();
$data['fechaInicio']=$fechaInicio->format('Y/m/d H:i');
$data['fechaFin']=$fechaFin->format('Y/m/d H:i');
$data['prioridad']=$crmActividadObj->getPrioridad()->getId();
// var_dump($data);
// die();
$crmAsignacionArrayObj = $em->getRepository('ERPCRMBundle:CrmAsignacionActividad')->findBy(array('actividad'=>$idAct));
// var_dump($crmAsignacionArrayObj);
if(count($crmAsignacionArrayObj)!=0){
$personaArray=array();
$tipoRecordatorioArray=array();
$tiempoRecordatorioArray=array();
foreach ($crmAsignacionArrayObj as $key => $value) {
array_push($personaArray, $value->getUsuarioAsignado()->getId());
array_push($tipoRecordatorioArray, $value->getTipoRecordatorio()->getId());
array_push($tiempoRecordatorioArray, $value->getTiempoNotificacion()->getId());
}
// $data['addressArray']=$ctlDireccionObj[0];
$data['personaArray']=$personaArray;
$data['tipoRecordatorioArray']=$tipoRecordatorioArray;
$data['tiempoRecordatorioArray']=$tiempoRecordatorioArray;
}
else{
$data['personaArray']=[];
$data['tipoRecordatorioArray']=[];
$data['tiempoRecordatorioArray']=[];
}
$data['id']=$idAct;
$sql = "SELECT doc.id as id, doc.src as nombre, doc.estado FROM ERPCRMBundle:CrmDocumentoAdjuntoActividad doc"
." JOIN doc.actividad c "
." WHERE c.id=:idAct ORDER BY doc.fechaRegistro DESC";
$docs = $em->createQuery($sql)
->setParameters(array('idAct'=>$idAct))
->getResult();
$data['docs']=$docs;
}
else{
$data['error']="Error";
}
$response->setData($data);
} catch (\Exception $e) {
//var_dump($e);
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode()))
{
case 2003:
$serverOffline = $this->getParameter('app.serverOffline');
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
break;
default :
$data['error'] = "Error CODE: ".$e->getMessage();
break;
}
}
else{
$data['error']=$e->getMessage();
}
$response->setData($data);
}
return $response;
}
/**
* Delete calls
*
* @Route("/calls/cancel", name="admin_calls_cancel_ajax", options={"expose"=true}))
* @Method("POST")
*/
public function cancelajaxAction(Request $request)
{
$isAjax = $this->get('Request')->isXMLhttpRequest();
if($isAjax){
try {
$timeZone = $this->get('time_zone')->getTimeZone();
date_default_timezone_set($timeZone->getNombre());
$ids=$request->get("param1");
$response = new JsonResponse();
// var_dump($ids);
// die();
$em = $this->getDoctrine()->getManager();
$serverCancel = "¡";
foreach ($ids as $key => $id) {
$object = $em->getRepository('ERPCRMBundle:CrmActividad')->find(intval($id));
// var_dump($id);
// die();
if(count($object)!=0){
if ($object->getEstadoActividad()->getId()!=3) {//Estado cancelado, por defecto
$object->setFechaCancelacion(new \DateTime('now'));
$estatus = $em->getRepository('ERPCRMBundle:CrmEstadoActividad')->find(3);
$object->setEstadoActividad($estatus);
$em->merge($object);
$em->flush();
$calendarId =$serverSave = $this->getParameter('app.googlecalendar');
$eventId = $object->getGoogleId();
$superGoogle= $this->get('calendar.google')->getFirstSyncToken($calendarId);
try {
$superGoogle= $this->get('calendar.google')->deleteEvent($calendarId,$eventId);
} catch (\Exception $e) {/////Solo para que no estalle
}
$serverCancel = $this->getParameter('app.serverMsgCancel');
$data['msg']=$serverCancel;
} else {
$serverCancel .= $object->getNombre().", ";
$data['error'] = $serverCancel;
if($key==count($ids)-1)
$data['error'] .= $this->getParameter('app.serverCancel');
}
}
else{
$data['error']="Error";
}
}
$response->setData($data);
} catch (\Exception $e) {
//var_dump($e);
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode()))
{
case 2003:
$serverOffline = $this->getParameter('app.serverOffline');
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
break;
default :
$data['error'] = $e->getMessage();
break;
}
}
else{
$data['error']=$e->getMessage();
}
$response->setData($data);
}
} else {
$data['error']='Ajax request';
$response->setData($data);
}
return $response;
}
/**
* Reprogramar eventos, guardar cambios
*
* @Route("/calls/rescheduled/calls/", name="admin_calls_rescheduled_ajax", options={"expose"=true}))
* @Method("POST")
*/
public function rescheduledajaxAction(Request $request)
{
$isAjax = $this->get('Request')->isXMLhttpRequest();
if($isAjax){
try {
$timeZone = $this->get('time_zone')->getTimeZone();
date_default_timezone_set($timeZone->getNombre());
$idActividad=$request->get("param1");
$fechaInicio=$request->get("param2");
$fechaFin=$request->get("param3");
// var_dump($idActividad);
// var_dump($fechaInicio);
// var_dump($fechaFin);
$response = new JsonResponse();
$em = $this->getDoctrine()->getManager();
$em->getConnection()->beginTransaction();
$crmActividadObj = $em->getRepository('ERPCRMBundle:CrmActividad')->find($idActividad);
$dateInicio = new \DateTime($fechaInicio);
$dateFin = new \DateTime($fechaFin);
$crmActividadObj->setFechaInicio($dateInicio);
$crmActividadObj->setFechaFin($dateFin);
$currentDate = date('Y-m-d H:i:s');
if ($fechaInicio<=$currentDate) {
$serverDate = $this->getParameter('app.serverDateConflict');
$data['error']=$serverDate;
//$data['title']=$crmActividadObj->getFechaInicio()->format('m/d H:i')." - ".$crmActividadObj->getFechaFin()->format('m/d H:i')." \n".$crmActividadObj->getNombre();
$data['title']=$crmActividadObj->getFechaInicio()->format('n/j G:i')."\n".$crmActividadObj->getFechaFin()->format('n/j G:i')."\n".$crmActividadObj->getNombre();
$response->setData($data);
return $response;
}
// var_dump($currentDate);
// var_dump($result);
// die();
$calendarId =$serverSave = $this->getParameter('app.googlecalendar');
$superGoogle= $this->get('calendar.google')->getFirstSyncToken($calendarId);
/////Manejo de excepciones para comprobar que el evento existe en google calendar
try {
//Eliminar evento en google calendar
$eventId = $crmActividadObj->getGoogleId();
$superGoogle= $this->get('calendar.google')->deleteEvent($calendarId,$eventId);
} catch (\Exception $e) {
}
$ids=array();
$eventAttendee = array();
$sql = "SELECT usr.id FROM ERPCRMBundle:CrmAsignacionActividad asigAct "
." JOIN asigAct.usuarioAsignado usr "
." WHERE asigAct.actividad=:id ";
$row = $em->createQuery($sql)
->setParameters(array('id'=>$idActividad))
->getResult();
foreach ($row as $key => $value) {
array_push($ids, $value['id']);
}
//Tabla crmAsignacionActividad
foreach ($ids as $key => $per) {
//Tabla crmAsignacionActividad
$responsableUsuarioObj = $em->getRepository('ERPCRMBundle:CtlUsuario')->find($per);
$idPersona = $responsableUsuarioObj->getPersona()->getId();
$correosPersona = $em->getRepository('ERPCRMBundle:CtlCorreo')->findBy(array('persona'=>$idPersona));
if(count($correosPersona)!=0){
array_push($eventAttendee, $correosPersona[0]->getEmail());
}
}
$eventStart = $dateInicio;
$eventEnd = $dateFin;
// var_dump($eventStart);
// var_dump($eventEnd);
$eventSummary = $crmActividadObj->getNombre();
$eventDescription = $crmActividadObj->getDescripcion();
$optionalParams = [];
$superGoogle= $this->get('calendar.google')->addEvent($calendarId,$eventStart,$eventEnd,$eventSummary,$eventDescription,$eventAttendee,$optionalParams = []);
$crmActividadObj->setGoogleId($superGoogle->getId());
//Persist crmCuentaObj
$em->merge($crmActividadObj);
$em->flush();
$em->getConnection()->commit();
$em->close();
$serverSave = $this->getParameter('app.serverMsgSave');
$data['id']=$crmActividadObj->getId();
$data['msg']=$serverSave;
//$data['title']=$crmActividadObj->getFechaInicio()->format('m/d H:i')." - ".$crmActividadObj->getFechaFin()->format('m/d H:i')." \n".$crmActividadObj->getNombre();
$data['title']=$crmActividadObj->getFechaInicio()->format('n/j G:i')."\n".$crmActividadObj->getFechaFin()->format('n/j G:i')."\n".$crmActividadObj->getNombre();
$response->setData($data);
} catch (\Exception $e) {
$em->getConnection()->rollback();
$em->close();
// var_dump($e);
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode()))
{
case 2003:
$serverOffline = $this->getParameter('app.serverOffline');
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
break;
default :
$data['error'] = $e->getMessage();
break;
}
}
else{
$data['error']=$e->getMessage();
}
$response->setData($data);
}
} else {
$data['error']='Ajax request';
$response->setData($data);
}
return $response;
}
/**
* Reprogramar eventos, guardar cambios
*
* @Route("/activities/get/info/", name="admin_get_info_activities_ajax", options={"expose"=true}))
* @Method("POST")
*/
public function activitiesinfoAction(Request $request)
{
$isAjax = $this->get('Request')->isXMLhttpRequest();
if($isAjax){
try {
$timeZone = $this->get('time_zone')->getTimeZone();
date_default_timezone_set($timeZone->getNombre());
$idActividad=$request->get("param1");
$response = new JsonResponse();
$em = $this->getDoctrine()->getManager();
$em->getConnection()->beginTransaction();
$crmActividadObj = $em->getRepository('ERPCRMBundle:CrmActividad')->find($idActividad);
//var_dump($crmActividadObj);
$currentDate = date('Y-m-d H:i:s');
$data['id']=$crmActividadObj->getId();
$data['nombre']=$crmActividadObj->getNombre();
$data['actividad']=$crmActividadObj->getTipoActividad()->getNombre();
if($crmActividadObj->getCuenta()!=null){
$data['cuenta']=$crmActividadObj->getCuenta()->getNombre();
}
else{
$data['cuenta']='-';
}
$data['clase']=$crmActividadObj->getTipoActividad()->getIcono();
$data['descripcion']=$crmActividadObj->getDescripcion();
$data['estado']=$crmActividadObj->getEstadoActividad()->getNombre();
$data['inicio']=$crmActividadObj->getFechaInicio()->format('Y-m-d H:i');
$data['fin']=$crmActividadObj->getFechaFin()->format('Y-m-d H:i');
$data['prioridad']=$crmActividadObj->getPrioridad()->getNombre();
$data['tipo']=$crmActividadObj->getTipoActividad()->getId();
$data['direccion']=$crmActividadObj->getDireccion();
$serverSave = $this->getParameter('app.serverMsgSave');
$data['msg']=$serverSave;
//$data['title']=$crmActividadObj->getFechaInicio()->format('m/d H:i')." - ".$crmActividadObj->getFechaFin()->format('m/d H:i')." \n".$crmActividadObj->getNombre();
$data['title']=$crmActividadObj->getFechaInicio()->format('n/j G:i')."\n".$crmActividadObj->getFechaFin()->format('n/j G:i')."\n".$crmActividadObj->getNombre();
$response->setData($data);
} catch (\Exception $e) {
$em->getConnection()->rollback();
$em->close();
// var_dump($e);
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode()))
{
case 2003:
$serverOffline = $this->getParameter('app.serverOffline');
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
break;
default :
$data['error'] = $e->getMessage();
break;
}
}
else{
$data['error']=$e->getMessage();
}
$response->setData($data);
}
} else {
$data['error']='Ajax request';
$response->setData($data);
}
return $response;
}
/**
* Reprogramar eventos, guardar cambios
*
* @Route("/activities/change/status/", name="admin_change_status_activities_ajax", options={"expose"=true}))
* @Method("POST")
*/
public function activitieschangeAction(Request $request)
{
$isAjax = $this->get('Request')->isXMLhttpRequest();
if($isAjax){
try {
$idActividad=$request->get("param1");
$idStatus=$request->get("param2");
$response = new JsonResponse();
$em = $this->getDoctrine()->getManager();
//$em->getConnection()->beginTransaction();
$crmActividadObj = $em->getRepository('ERPCRMBundle:CrmActividad')->find($idActividad);
if(count($crmActividadObj)!=0){
//$crmActividadObj->setEstadoActividad();
switch($idStatus){
case 1://finalizado
$crmStatus = $em->getRepository('ERPCRMBundle:CrmEstadoActividad')->find($idStatus);
$data['tipo']='Finalizado';
break;
case 2://pendiente
$crmStatus = $em->getRepository('ERPCRMBundle:CrmEstadoActividad')->find($idStatus);
break;
case 3://cancelado
$crmStatus = $em->getRepository('ERPCRMBundle:CrmEstadoActividad')->find($idStatus);
$data['tipo']='cancelado';
//var_dump($crmStatus);
break;
case 4://Perdida
$crmStatus = $em->getRepository('ERPCRMBundle:CrmEstadoActividad')->find($idStatus);
$data['tipo']='perdida';
//var_dump($crmStatus);
break;
}
}
$crmActividadObj->setEstadoActividad($crmStatus);
$em->merge($crmActividadObj);
$em->flush();
//var_dump($crmActividadObj);
//die();
$serverSave = $this->getParameter('app.serverMsgStatusChanged');
$data['msg']=$serverSave;
//$data['title']=$crmActividadObj->getFechaInicio()->format('m/d H:i')." - ".$crmActividadObj->getFechaFin()->format('m/d H:i')." \n".$crmActividadObj->getNombre();
//$data['title']=$crmActividadObj->getFechaInicio()->format('n/j G:i')."\n".$crmActividadObj->getFechaFin()->format('n/j G:i')."\n".$crmActividadObj->getNombre();
$response->setData($data);
} catch (\Exception $e) {
//echo $e->getMessage();
//echo $e->getLine();
$em->getConnection()->rollback();
$em->close();
//var_dump($e);
if(method_exists($e,'getErrorCode')){
switch (intval($e->getErrorCode()))
{
case 2003:
$serverOffline = $this->getParameter('app.serverOffline');
$data['error'] = $serverOffline.'. CODE: '.$e->getErrorCode();
break;
default :
$data['error'] = $e->getMessage();
break;
}
}
else{
$data['error']=$e->getMessage();
}
$response->setData($data);
}
} else {
$data['error']='Ajax request';
$response->setData($data);
}
return $response;
}
}
|
Kstro/erpsystem
|
src/ERP/CRMBundle/Controller/CrmLlamadasController.php
|
PHP
|
mit
| 54,864
|
// Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
package vm
import (
"math/big"
"testing"
"github.com/lab2528/go-oneTime/common"
"github.com/lab2528/go-oneTime/params"
)
type dummyContractRef struct {
calledForEach bool
}
func (dummyContractRef) ReturnGas(*big.Int) {}
func (dummyContractRef) Address() common.Address { return common.Address{} }
func (dummyContractRef) Value() *big.Int { return new(big.Int) }
func (dummyContractRef) SetCode(common.Hash, []byte) {}
func (d *dummyContractRef) ForEachStorage(callback func(key, value common.Hash) bool) {
d.calledForEach = true
}
func (d *dummyContractRef) SubBalance(amount *big.Int) {}
func (d *dummyContractRef) AddBalance(amount *big.Int) {}
func (d *dummyContractRef) SetBalance(*big.Int) {}
func (d *dummyContractRef) SetNonce(uint64) {}
func (d *dummyContractRef) Balance() *big.Int { return new(big.Int) }
type dummyStateDB struct {
NoopStateDB
ref *dummyContractRef
}
func TestStoreCapture(t *testing.T) {
var (
env = NewEVM(Context{}, nil, params.TestChainConfig, Config{EnableJit: false, ForceJit: false})
logger = NewStructLogger(nil)
mem = NewMemory()
stack = newstack()
contract = NewContract(&dummyContractRef{}, &dummyContractRef{}, new(big.Int), 0)
)
stack.push(big.NewInt(1))
stack.push(big.NewInt(0))
var index common.Hash
logger.CaptureState(env, 0, SSTORE, 0, 0, mem, stack, contract, 0, nil)
if len(logger.changedValues[contract.Address()]) == 0 {
t.Fatalf("expected exactly 1 changed value on address %x, got %d", contract.Address(), len(logger.changedValues[contract.Address()]))
}
exp := common.BigToHash(big.NewInt(1))
if logger.changedValues[contract.Address()][index] != exp {
t.Errorf("expected %x, got %x", exp, logger.changedValues[contract.Address()][index])
}
}
func TestStorageCapture(t *testing.T) {
t.Skip("implementing this function is difficult. it requires all sort of interfaces to be implemented which isn't trivial. The value (the actual test) isn't worth it")
var (
ref = &dummyContractRef{}
contract = NewContract(ref, ref, new(big.Int), 0)
env = NewEVM(Context{}, dummyStateDB{ref: ref}, params.TestChainConfig, Config{EnableJit: false, ForceJit: false})
logger = NewStructLogger(nil)
mem = NewMemory()
stack = newstack()
)
logger.CaptureState(env, 0, STOP, 0, 0, mem, stack, contract, 0, nil)
if ref.calledForEach {
t.Error("didn't expect for each to be called")
}
logger = NewStructLogger(&LogConfig{FullStorage: true})
logger.CaptureState(env, 0, STOP, 0, 0, mem, stack, contract, 0, nil)
if !ref.calledForEach {
t.Error("expected for each to be called")
}
}
|
lab2528/go-oneTime
|
core/vm/logger_test.go
|
GO
|
mit
| 3,459
|
define(function(){
var Track = function Track(options){
this.url = options && options.url || '';
this.instrument = options && options.instrument || '';
};
return Track;
});
|
leesus/beat-laboratory
|
js/src/models/track.js
|
JavaScript
|
mit
| 191
|
---
layout: post
title: Çoklu Zekâ Kontrol Listesi
date: 2012-01-02 10:59
author: admin
comments: true
tags: [çoklu zeka değerlendirme formu, Ketegorisiz]
---
Çoklu Zekâ türleri için Kontrol Listesi örneğidir
<a class="myl" href="http://www.egitimvaktim.com/dosyalar/2012/01/coklu_zeka.xls" target="_blank">örneği indir</a>
|
evaktim/egitimvaktim.github.io
|
_posts/2012-01-02-coklu-zeka-kontrol-listesi.md
|
Markdown
|
mit
| 348
|
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractApp = new ExtractTextPlugin({
filename: 'assets/[name].[hash].css'
});
const extractAntd = new ExtractTextPlugin({
filename: 'assets/antd.[hash].css'
});
module.exports = {
entry: {
polyfills: './src/polyfills',
vendor: './src/vendor',
app: './src/main'
},
devtool: 'source-map',
output: {
path: path.resolve(__dirname, '../dist'),
publicPath: '/',
filename: 'assets/[name].[hash].js',
chunkFilename: 'assets/[id].[hash].chunk.js'
},
module: {
rules: [
{
test: /\.s?(a|c)ss$/,
loader: extractApp.extract({
fallbackLoader: 'style-loader',
loader: 'css-loader?importLoaders=2&minimize&modules&camelCase&localIdentName=[name]__[local]--[hash:base64:5]!postcss-loader!sass-loader'
}),
exclude: /node_modules/
},
{
test: /\.s?(a|c)ss$/,
loader: extractAntd.extract({
fallbackLoader: 'style-loader',
loader: 'css-loader?minimize'
}),
include: path.resolve(__dirname, '../node_modules/antd')
}
]
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
extractAntd,
extractApp
]
};
|
ecozoic/atl4fort
|
webpack/webpack.prod.js
|
JavaScript
|
mit
| 1,435
|
$('.carousel').carousel({
interval: false
})
/////////////////////////////////////////
// begin navbar collapse on selection ///
$('.navbar-collapse').click('li', function() {
$('.navbar-collapse').collapse('hide');
});
// end navbar collapse on selection ///
///////////////////////////////////////
|
deepakswami07/deepakfx
|
js/custom.js
|
JavaScript
|
mit
| 319
|
// <auto-generated />
namespace Steep.Data.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
public sealed partial class InitalCreate : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(InitalCreate));
string IMigrationMetadata.Id
{
get { return "201602141147544_InitalCreate"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}
|
newmast/Steep
|
Source/Data/Steep.Data/Migrations/201602141147544_InitalCreate.Designer.cs
|
C#
|
mit
| 818
|
require 'ffi/disarm/args/bkpt'
require 'ffi/disarm/args/bl'
require 'ffi/disarm/args/blx_imm'
require 'ffi/disarm/args/blx_reg'
require 'ffi/disarm/args/clz'
require 'ffi/disarm/args/cp_data'
require 'ffi/disarm/args/cp_ls'
require 'ffi/disarm/args/cp_reg'
require 'ffi/disarm/args/data_imm'
require 'ffi/disarm/args/data_imm_sh'
require 'ffi/disarm/args/data_reg_sh'
require 'ffi/disarm/args/dsp_add_sub'
require 'ffi/disarm/args/dsp_mul'
require 'ffi/disarm/args/ls_hw_imm'
require 'ffi/disarm/args/ls_hw_reg'
require 'ffi/disarm/args/l_sign_imm'
require 'ffi/disarm/args/l_sign_reg'
require 'ffi/disarm/args/ls_imm'
require 'ffi/disarm/args/ls_multi'
require 'ffi/disarm/args/ls_reg'
require 'ffi/disarm/args/ls_two_imm'
require 'ffi/disarm/args/ls_two_reg'
require 'ffi/disarm/args/mrs'
require 'ffi/disarm/args/msr_imm'
require 'ffi/disarm/args/msr'
require 'ffi/disarm/args/mull'
require 'ffi/disarm/args/mul'
require 'ffi/disarm/args/swi'
require 'ffi/disarm/args/swp'
|
sophsec/ffi-disarm
|
lib/ffi/disarm/args.rb
|
Ruby
|
mit
| 976
|
<!DOCTYPE html>
<html lang="en">
<!-- Mirrored from www.themeon.net/nifty/v2.2.1/layouts-aside-left-side.html by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 20 Aug 2015 17:41:49 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Align aside on left side | Nifty - Responsive admin template.</title>
<!--STYLESHEET-->
<!--=================================================-->
<!--Open Sans Font [ OPTIONAL ] -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin" rel="stylesheet">
<!--Bootstrap Stylesheet [ REQUIRED ]-->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--Nifty Stylesheet [ REQUIRED ]-->
<link href="css/nifty.min.css" rel="stylesheet">
<!--Font Awesome [ OPTIONAL ]-->
<link href="plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!--Switchery [ OPTIONAL ]-->
<link href="plugins/switchery/switchery.min.css" rel="stylesheet">
<!--Bootstrap Select [ OPTIONAL ]-->
<link href="plugins/bootstrap-select/bootstrap-select.min.css" rel="stylesheet">
<!--SCRIPT-->
<!--=================================================-->
<!--Page Load Progress Bar [ OPTIONAL ]-->
<link href="plugins/pace/pace.min.css" rel="stylesheet">
<script src="plugins/pace/pace.min.js"></script>
<!--
REQUIRED
You must include this in your project.
RECOMMENDED
This category must be included but you may modify which plugins or components which should be included in your project.
OPTIONAL
Optional plugins. You may choose whether to include it in your project or not.
DEMONSTRATION
This is to be removed, used for demonstration purposes only. This category must not be included in your project.
SAMPLE
Some script samples which explain how to initialize plugins or components. This category should not be included in your project.
Detailed information and more samples can be found in the document.
-->
</head>
<!--TIPS-->
<!--You may remove all ID or Class names which contain "demo-", they are only used for demonstration. -->
<body>
<div id="container" class="effect mainnav-sm aside-in aside-left">
<!--NAVBAR-->
<!--===================================================-->
<header id="navbar">
<div id="navbar-container" class="boxed">
<!--Brand logo & name-->
<!--================================-->
<div class="navbar-header">
<a href="index-2.html" class="navbar-brand">
<img src="img/logo.png" alt="Nifty Logo" class="brand-icon">
<div class="brand-title">
<span class="brand-text">Nifty</span>
</div>
</a>
</div>
<!--================================-->
<!--End brand logo & name-->
<!--Navbar Dropdown-->
<!--================================-->
<div class="navbar-content clearfix">
<ul class="nav navbar-top-links pull-left">
<!--Navigation toogle button-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<li class="tgl-menu-btn">
<a class="mainnav-toggle" href="#">
<i class="fa fa-navicon fa-lg"></i>
</a>
</li>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End Navigation toogle button-->
<!--Messages Dropdown-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-envelope fa-lg"></i>
<span class="badge badge-header badge-warning">9</span>
</a>
<!--Message dropdown menu-->
<div class="dropdown-menu dropdown-menu-md with-arrow">
<div class="pad-all bord-btm">
<p class="text-lg text-muted text-thin mar-no">You have 3 messages.</p>
</div>
<div class="nano scrollable">
<div class="nano-content">
<ul class="head-list">
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<img src="img/av2.png" alt="Profile Picture" class="img-circle img-sm">
</div>
<div class="media-body">
<div class="text-nowrap">Andy sent you a message</div>
<small class="text-muted">15 minutes ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<img src="img/av4.png" alt="Profile Picture" class="img-circle img-sm">
</div>
<div class="media-body">
<div class="text-nowrap">Lucy sent you a message</div>
<small class="text-muted">30 minutes ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<img src="img/av3.png" alt="Profile Picture" class="img-circle img-sm">
</div>
<div class="media-body">
<div class="text-nowrap">Jackson sent you a message</div>
<small class="text-muted">40 minutes ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<img src="img/av6.png" alt="Profile Picture" class="img-circle img-sm">
</div>
<div class="media-body">
<div class="text-nowrap">Donna sent you a message</div>
<small class="text-muted">5 hours ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<img src="img/av4.png" alt="Profile Picture" class="img-circle img-sm">
</div>
<div class="media-body">
<div class="text-nowrap">Lucy sent you a message</div>
<small class="text-muted">Yesterday</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<img src="img/av3.png" alt="Profile Picture" class="img-circle img-sm">
</div>
<div class="media-body">
<div class="text-nowrap">Jackson sent you a message</div>
<small class="text-muted">Yesterday</small>
</div>
</a>
</li>
</ul>
</div>
</div>
<!--Dropdown footer-->
<div class="pad-all bord-top">
<a href="#" class="btn-link text-dark box-block">
<i class="fa fa-angle-right fa-lg pull-right"></i>Show All Messages
</a>
</div>
</div>
</li>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End message dropdown-->
<!--Notification dropdown-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-bell fa-lg"></i>
<span class="badge badge-header badge-danger">5</span>
</a>
<!--Notification dropdown menu-->
<div class="dropdown-menu dropdown-menu-md with-arrow">
<div class="pad-all bord-btm">
<p class="text-lg text-muted text-thin mar-no">You have 3 messages.</p>
</div>
<div class="nano scrollable">
<div class="nano-content">
<ul class="head-list">
<!-- Dropdown list-->
<li>
<a href="#">
<div class="clearfix">
<p class="pull-left">Database Repair</p>
<p class="pull-right">70%</p>
</div>
<div class="progress progress-sm">
<div style="width: 70%;" class="progress-bar">
<span class="sr-only">70% Complete</span>
</div>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#">
<div class="clearfix">
<p class="pull-left">Upgrade Progress</p>
<p class="pull-right">10%</p>
</div>
<div class="progress progress-sm">
<div style="width: 10%;" class="progress-bar progress-bar-warning">
<span class="sr-only">10% Complete</span>
</div>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<span class="icon-wrap icon-circle bg-primary">
<i class="fa fa-comment fa-lg"></i>
</span>
</div>
<div class="media-body">
<div class="text-nowrap">New comments waiting approval</div>
<small class="text-muted">15 minutes ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<span class="badge badge-success pull-right">90%</span>
<div class="media-left">
<span class="icon-wrap icon-circle bg-danger">
<i class="fa fa-hdd-o fa-lg"></i>
</span>
</div>
<div class="media-body">
<div class="text-nowrap">HDD is full</div>
<small class="text-muted">50 minutes ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<span class="icon-wrap bg-info">
<i class="fa fa-file-word-o fa-lg"></i>
</span>
</div>
<div class="media-body">
<div class="text-nowrap">Write a news article</div>
<small class="text-muted">Last Update 8 hours ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<span class="label label-danger pull-right">New</span>
<div class="media-left">
<span class="icon-wrap bg-purple">
<i class="fa fa-comment fa-lg"></i>
</span>
</div>
<div class="media-body">
<div class="text-nowrap">Comment Sorting</div>
<small class="text-muted">Last Update 8 hours ago</small>
</div>
</a>
</li>
<!-- Dropdown list-->
<li>
<a href="#" class="media">
<div class="media-left">
<span class="icon-wrap bg-success">
<i class="fa fa-user fa-lg"></i>
</span>
</div>
<div class="media-body">
<div class="text-nowrap">New User Registered</div>
<small class="text-muted">4 minutes ago</small>
</div>
</a>
</li>
</ul>
</div>
</div>
<!--Dropdown footer-->
<div class="pad-all bord-top">
<a href="#" class="btn-link text-dark box-block">
<i class="fa fa-angle-right fa-lg pull-right"></i>Show All Notifications
</a>
</div>
</div>
</li>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End notifications dropdown-->
<!--Mega dropdown-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<li class="mega-dropdown">
<a href="#" class="mega-dropdown-toggle">
<i class="fa fa-th-large fa-lg"></i>
</a>
<div class="dropdown-menu mega-dropdown-menu">
<div class="clearfix">
<div class="col-sm-12 col-md-3">
<!--Mega menu widget-->
<div class="text-center bg-purple pad-all">
<h3 class="text-thin mar-no">Weekend shopping</h3>
<div class="pad-ver box-inline">
<span class="icon-wrap icon-wrap-lg icon-circle bg-trans-light">
<i class="fa fa-shopping-cart fa-4x"></i>
</span>
</div>
<p class="pad-btm">
Members get <span class="text-lg text-bold">50%</span> more points. Lorem ipsum dolor sit amet!
</p>
<a href="#" class="btn btn-purple">Learn More...</a>
</div>
</div>
<div class="col-sm-4 col-md-3">
<!--Mega menu list-->
<ul class="list-unstyled">
<li class="dropdown-header">Pages</li>
<li><a href="#">Profile</a></li>
<li><a href="#">Search Result</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">Sreen Lock</a></li>
<li><a href="#" class="disabled">Disabled</a></li>
<li class="divider"></li>
<li class="dropdown-header">Icons</li>
<li><a href="#"><span class="pull-right badge badge-purple">479</span> Font Awesome</a></li>
<li><a href="#">Skycons</a></li>
</ul>
</div>
<div class="col-sm-4 col-md-3">
<!--Mega menu list-->
<ul class="list-unstyled">
<li class="dropdown-header">Mailbox</li>
<li><a href="#"><span class="pull-right label label-danger">Hot</span>Indox</a></li>
<li><a href="#">Read Message</a></li>
<li><a href="#">Compose</a></li>
<li class="divider"></li>
<li class="dropdown-header">Featured</li>
<li><a href="#">Smart navigation</a></li>
<li><a href="#"><span class="pull-right badge badge-success">6</span>Exclusive plugins</a></li>
<li><a href="#">Lot of themes</a></li>
<li><a href="#">Transition effects</a></li>
</ul>
</div>
<div class="col-sm-4 col-md-3">
<!--Mega menu list-->
<ul class="list-unstyled">
<li class="dropdown-header">Components</li>
<li><a href="#">Tables</a></li>
<li><a href="#">Charts</a></li>
<li><a href="#">Forms</a></li>
<li class="divider"></li>
<li>
<form role="form" class="form">
<div class="form-group">
<label class="dropdown-header" for="demo-megamenu-input">Newsletter</label>
<input id="demo-megamenu-input" type="email" placeholder="Enter email" class="form-control">
</div>
<button class="btn btn-primary btn-block" type="submit">Submit</button>
</form>
</li>
</ul>
</div>
</div>
</div>
</li>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End mega dropdown-->
</ul>
<ul class="nav navbar-top-links pull-right">
<!--Language selector-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<li class="dropdown">
<a id="demo-lang-switch" class="lang-selector dropdown-toggle" href="#" data-toggle="dropdown">
<span class="lang-selected">
<img class="lang-flag" src="img/flags/united-kingdom.png" alt="English">
<span class="lang-id">EN</span>
<span class="lang-name">English</span>
</span>
</a>
<!--Language selector menu-->
<ul class="head-list dropdown-menu with-arrow">
<li>
<!--English-->
<a href="#" class="active">
<img class="lang-flag" src="img/flags/united-kingdom.png" alt="English">
<span class="lang-id">EN</span>
<span class="lang-name">English</span>
</a>
</li>
<li>
<!--France-->
<a href="#">
<img class="lang-flag" src="img/flags/france.png" alt="France">
<span class="lang-id">FR</span>
<span class="lang-name">Français</span>
</a>
</li>
<li>
<!--Germany-->
<a href="#">
<img class="lang-flag" src="img/flags/germany.png" alt="Germany">
<span class="lang-id">DE</span>
<span class="lang-name">Deutsch</span>
</a>
</li>
<li>
<!--Italy-->
<a href="#">
<img class="lang-flag" src="img/flags/italy.png" alt="Italy">
<span class="lang-id">IT</span>
<span class="lang-name">Italiano</span>
</a>
</li>
<li>
<!--Spain-->
<a href="#">
<img class="lang-flag" src="img/flags/spain.png" alt="Spain">
<span class="lang-id">ES</span>
<span class="lang-name">Español</span>
</a>
</li>
</ul>
</li>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End language selector-->
<!--User dropdown-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<li id="dropdown-user" class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle text-right">
<span class="pull-right">
<img class="img-circle img-user media-object" src="img/av1.png" alt="Profile Picture">
</span>
<div class="username hidden-xs">John Doe</div>
</a>
<div class="dropdown-menu dropdown-menu-md dropdown-menu-right with-arrow panel-default">
<!-- Dropdown heading -->
<div class="pad-all bord-btm">
<p class="text-lg text-muted text-thin mar-btm">750Gb of 1,000Gb Used</p>
<div class="progress progress-sm">
<div class="progress-bar" style="width: 70%;">
<span class="sr-only">70%</span>
</div>
</div>
</div>
<!-- User dropdown menu -->
<ul class="head-list">
<li>
<a href="#">
<i class="fa fa-user fa-fw fa-lg"></i> Profile
</a>
</li>
<li>
<a href="#">
<span class="badge badge-danger pull-right">9</span>
<i class="fa fa-envelope fa-fw fa-lg"></i> Messages
</a>
</li>
<li>
<a href="#">
<span class="label label-success pull-right">New</span>
<i class="fa fa-gear fa-fw fa-lg"></i> Settings
</a>
</li>
<li>
<a href="#">
<i class="fa fa-question-circle fa-fw fa-lg"></i> Help
</a>
</li>
<li>
<a href="#">
<i class="fa fa-lock fa-fw fa-lg"></i> Lock screen
</a>
</li>
</ul>
<!-- Dropdown footer -->
<div class="pad-all text-right">
<a href="pages-login.html" class="btn btn-primary">
<i class="fa fa-sign-out fa-fw"></i> Logout
</a>
</div>
</div>
</li>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End user dropdown-->
</ul>
</div>
<!--================================-->
<!--End Navbar Dropdown-->
</div>
</header>
<!--===================================================-->
<!--END NAVBAR-->
<div class="boxed">
<!--CONTENT CONTAINER-->
<!--===================================================-->
<div id="content-container">
<!--Page Title-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<div id="page-title">
<h1 class="page-header text-overflow">Align aside on left side</h1>
<!--Searchbox-->
<div class="searchbox">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Search..">
<span class="input-group-btn">
<button class="text-muted" type="button"><i class="fa fa-search"></i></button>
</span>
</div>
</div>
</div>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End page title-->
<!--Breadcrumb-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li class="active">Data</li>
</ol>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End breadcrumb-->
<!--Page content-->
<!--===================================================-->
<div id="page-content">
<h3 class="text-thin">Your content...</h3>
</div>
<!--===================================================-->
<!--End page content-->
</div>
<!--===================================================-->
<!--END CONTENT CONTAINER-->
<!--MAIN NAVIGATION-->
<!--===================================================-->
<nav id="mainnav-container">
<div id="mainnav">
<!--Shortcut buttons-->
<!--================================-->
<div id="mainnav-shortcut">
<ul class="list-unstyled">
<li class="col-xs-4" data-content="Additional Sidebar">
<a id="demo-toggle-aside" class="shortcut-grid" href="#">
<i class="fa fa-magic"></i>
</a>
</li>
<li class="col-xs-4" data-content="Notification">
<a id="demo-alert" class="shortcut-grid" href="#">
<i class="fa fa-bullhorn"></i>
</a>
</li>
<li class="col-xs-4" data-content="Page Alerts">
<a id="demo-page-alert" class="shortcut-grid" href="#">
<i class="fa fa-bell"></i>
</a>
</li>
</ul>
</div>
<!--================================-->
<!--End shortcut buttons-->
<!--Menu-->
<!--================================-->
<div id="mainnav-menu-wrap">
<div class="nano">
<div class="nano-content">
<ul id="mainnav-menu" class="list-group">
<!--Category name-->
<li class="list-header">Navigation</li>
<!--Menu list item-->
<li>
<a href="index-2.html">
<i class="fa fa-dashboard"></i>
<span class="menu-title">
<strong>Dashboard</strong>
<span class="label label-success pull-right">Top</span>
</span>
</a>
</li>
<!--Menu list item-->
<li class="active-sub">
<a href="#">
<i class="fa fa-th"></i>
<span class="menu-title">
<strong>Layouts</strong>
</span>
<i class="arrow"></i>
</a>
<!--Submenu-->
<ul class="collapse in">
<li><a href="layouts-collapsed-navigation.html">Collapsed Navigation</a></li>
<li><a href="layouts-offcanvas-navigation.html">Off-Canvas Navigation</a></li>
<li><a href="layouts-offcanvas-slide-in-navigation.html">Slide-in Navigation</a></li>
<li><a href="layouts-offcanvas-revealing-navigation.html">Revealing Navigation</a></li>
<li class="list-divider"></li>
<li><a href="layouts-aside-right-side.html">Aside on the right side</a></li>
<li class="active-link"><a href="layouts-aside-left-side.html">Aside on the left side</a></li>
<li><a href="layouts-aside-bright-theme.html">Bright aside theme</a></li>
<li class="list-divider"></li>
<li><a href="layouts-fixed-navbar.html">Fixed Navbar</a></li>
<li><a href="layouts-fixed-footer.html">Fixed Footer</a></li>
</ul>
</li>
<!--Menu list item-->
<li>
<a href="widgets.html">
<i class="fa fa-flask"></i>
<span class="menu-title">
<strong>Widgets</strong>
<span class="pull-right badge badge-warning">9</span>
</span>
</a>
</li>
<li class="list-divider"></li>
<!--Category name-->
<li class="list-header">Components</li>
<!--Menu list item-->
<li>
<a href="#">
<i class="fa fa-briefcase"></i>
<span class="menu-title">UI Elements</span>
<i class="arrow"></i>
</a>
<!--Submenu-->
<ul class="collapse">
<li><a href="ui-buttons.html">Buttons</a></li>
<li><a href="ui-checkboxes-radio.html">Checkboxes & Radio</a></li>
<li><a href="ui-panels.html">Panels</a></li>
<li><a href="ui-modals.html">Modals</a></li>
<li><a href="ui-progress-bars.html">Progress bars</a></li>
<li><a href="ui-components.html">Components</a></li>
<li><a href="ui-typography.html">Typography</a></li>
<li><a href="ui-list-group.html">List Group</a></li>
<li><a href="ui-tabs-accordions.html">Tabs & Accordions</a></li>
<li><a href="ui-alerts-tooltips.html">Alerts & Tooltips</a></li>
<li><a href="ui-helper-classes.html">Helper Classes</a></li>
</ul>
</li>
<!--Menu list item-->
<li>
<a href="#">
<i class="fa fa-edit"></i>
<span class="menu-title">Forms</span>
<i class="arrow"></i>
</a>
<!--Submenu-->
<ul class="collapse">
<li><a href="forms-general.html">General</a></li>
<li><a href="forms-components.html">Components</a></li>
<li><a href="forms-validation.html">Validation</a></li>
<li><a href="forms-wizard.html">Wizard</a></li>
</ul>
</li>
<!--Menu list item-->
<li>
<a href="#">
<i class="fa fa-table"></i>
<span class="menu-title">Tables</span>
<i class="arrow"></i>
</a>
<!--Submenu-->
<ul class="collapse">
<li><a href="tables-static.html">Static Tables</a></li>
<li><a href="tables-bootstrap.html">Bootstrap Tables</a></li>
<li><a href="tables-datatable.html">Data Tables<span class="label label-info pull-right">New</span></a></li>
<li><a href="tables-footable.html">Foo Tables<span class="label label-info pull-right">New</span></a></li>
</ul>
</li>
<!--Menu list item-->
<li>
<a href="charts.html">
<i class="fa fa-line-chart"></i>
<span class="menu-title">Charts</span>
</a>
</li>
<li class="list-divider"></li>
<!--Category name-->
<li class="list-header">Extra</li>
<!--Menu list item-->
<li>
<a href="#">
<i class="fa fa-plug"></i>
<span class="menu-title">
Miscellaneous
<span class="label label-mint pull-right">New</span>
</span>
</a>
<!--Submenu-->
<ul class="collapse">
<li><a href="misc-calendar.html">Calendar</a></li>
<li><a href="misc-maps.html">Google Maps</a></li>
</ul>
</li>
<!--Menu list item-->
<li>
<a href="#">
<i class="fa fa-envelope"></i>
<span class="menu-title">Email</span>
<i class="arrow"></i>
</a>
<!--Submenu-->
<ul class="collapse">
<li><a href="mailbox.html">Inbox</a></li>
<li><a href="mailbox-message.html">View Message</a></li>
<li><a href="mailbox-compose.html">Compose Message</a></li>
</ul>
</li>
<!--Menu list item-->
<li>
<a href="#">
<i class="fa fa-file"></i>
<span class="menu-title">Pages</span>
<i class="arrow"></i>
</a>
<!--Submenu-->
<ul class="collapse">
<li><a href="pages-blank.html">Blank Page</a></li>
<li><a href="pages-profile.html">Profile</a></li>
<li><a href="pages-search-results.html">Search Results</a></li>
<li><a href="pages-timeline.html">Timeline<span class="label label-info pull-right">New</span></a></li>
<li><a href="pages-faq.html">FAQ</a></li>
<li class="list-divider"></li>
<li><a href="pages-404.html">404 Error</a></li>
<li><a href="pages-500.html">500 Error</a></li>
<li class="list-divider"></li>
<li><a href="pages-login.html">Login</a></li>
<li><a href="pages-register.html">Register</a></li>
<li><a href="pages-password-reminder.html">Password Reminder</a></li>
<li><a href="pages-lock-screen.html">Lock Screen</a></li>
</ul>
</li>
<!--Menu list item-->
<li>
<a href="#">
<i class="fa fa-plus-square"></i>
<span class="menu-title">Menu Level</span>
<i class="arrow"></i>
</a>
<!--Submenu-->
<ul class="collapse">
<li><a href="#">Second Level Item</a></li>
<li><a href="#">Second Level Item</a></li>
<li><a href="#">Second Level Item</a></li>
<li class="list-divider"></li>
<li>
<a href="#">Third Level<i class="arrow"></i></a>
<!--Submenu-->
<ul class="collapse">
<li><a href="#">Third Level Item</a></li>
<li><a href="#">Third Level Item</a></li>
<li><a href="#">Third Level Item</a></li>
<li><a href="#">Third Level Item</a></li>
</ul>
</li>
<li>
<a href="#">Third Level<i class="arrow"></i></a>
<!--Submenu-->
<ul class="collapse">
<li><a href="#">Third Level Item</a></li>
<li><a href="#">Third Level Item</a></li>
<li><a href="#">Third Level Item</a></li>
<li class="list-divider"></li>
<li><a href="#">Third Level Item</a></li>
<li><a href="#">Third Level Item</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<!--Widget-->
<!--================================-->
<div class="mainnav-widget">
<!-- Show the button on collapsed navigation -->
<div class="show-small">
<a href="#" data-toggle="menu-widget" data-target="#demo-wg-server">
<i class="fa fa-desktop"></i>
</a>
</div>
<!-- Hide the content on collapsed navigation -->
<div id="demo-wg-server" class="hide-small mainnav-widget-content">
<ul class="list-group">
<li class="list-header pad-no pad-ver">Server Status</li>
<li class="mar-btm">
<span class="label label-primary pull-right">15%</span>
<p>CPU Usage</p>
<div class="progress progress-sm">
<div class="progress-bar progress-bar-primary" style="width: 15%;">
<span class="sr-only">15%</span>
</div>
</div>
</li>
<li class="mar-btm">
<span class="label label-purple pull-right">75%</span>
<p>Bandwidth</p>
<div class="progress progress-sm">
<div class="progress-bar progress-bar-purple" style="width: 75%;">
<span class="sr-only">75%</span>
</div>
</div>
</li>
<li class="pad-ver"><a href="#" class="btn btn-success btn-bock">View Details</a></li>
</ul>
</div>
</div>
<!--================================-->
<!--End widget-->
</div>
</div>
</div>
<!--================================-->
<!--End menu-->
</div>
</nav>
<!--===================================================-->
<!--END MAIN NAVIGATION-->
<!--ASIDE-->
<!--===================================================-->
<aside id="aside-container">
<div id="aside">
<div class="nano">
<div class="nano-content">
<!--Nav tabs-->
<!--================================-->
<ul class="nav nav-tabs nav-justified">
<li class="active">
<a href="#demo-asd-tab-1" data-toggle="tab">
<i class="fa fa-comments"></i>
<span class="badge badge-purple">7</span>
</a>
</li>
<li>
<a href="#demo-asd-tab-2" data-toggle="tab">
<i class="fa fa-info-circle"></i>
</a>
</li>
<li>
<a href="#demo-asd-tab-3" data-toggle="tab">
<i class="fa fa-wrench"></i>
</a>
</li>
</ul>
<!--================================-->
<!--End nav tabs-->
<!-- Tabs Content -->
<!--================================-->
<div class="tab-content">
<!--First tab (Contact list)-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<div class="tab-pane fade in active" id="demo-asd-tab-1">
<h4 class="pad-hor text-thin">
<span class="pull-right badge badge-warning">3</span> Family
</h4>
<!--Family-->
<div class="list-group bg-trans">
<a href="#" class="list-group-item">
<div class="media-left">
<img class="img-circle img-xs" src="img/av2.png" alt="Profile Picture">
</div>
<div class="media-body">
<div class="text-lg">Stephen Tran</div>
<span class="text-muted">Availabe</span>
</div>
</a>
<a href="#" class="list-group-item">
<div class="media-left">
<img class="img-circle img-xs" src="img/av4.png" alt="Profile Picture">
</div>
<div class="media-body">
<div class="text-lg">Brittany Meyer</div>
<span class="text-muted">I think so</span>
</div>
</a>
<a href="#" class="list-group-item">
<div class="media-left">
<img class="img-circle img-xs" src="img/av3.png" alt="Profile Picture">
</div>
<div class="media-body">
<div class="text-lg">Donald Brown</div>
<span class="text-muted">Lorem ipsum dolor sit amet.</span>
</div>
</a>
</div>
<hr>
<h4 class="pad-hor text-thin">
<span class="pull-right badge badge-info">4</span> Friends
</h4>
<!--Friends-->
<div class="list-group bg-trans">
<a href="#" class="list-group-item">
<div class="media-left">
<img class="img-circle img-xs" src="img/av5.png" alt="Profile Picture">
</div>
<div class="media-body">
<div class="text-lg">Betty Murphy</div>
<span class="text-muted">Bye</span>
</div>
</a>
<a href="#" class="list-group-item">
<div class="media-left">
<img class="img-circle img-xs" src="img/av6.png" alt="Profile Picture">
</div>
<div class="media-body">
<div class="text-lg">Olivia Spencer</div>
<span class="text-muted">Thank you!</span>
</div>
</a>
<a href="#" class="list-group-item">
<div class="media-left">
<img class="img-circle img-xs" src="img/av4.png" alt="Profile Picture">
</div>
<div class="media-body">
<div class="text-lg">Sarah Ruiz</div>
<span class="text-muted">2 hours ago</span>
</div>
</a>
<a href="#" class="list-group-item">
<div class="media-left">
<img class="img-circle img-xs" src="img/av3.png" alt="Profile Picture">
</div>
<div class="media-body">
<div class="text-lg">Paul Aguilar</div>
<span class="text-muted">2 hours ago</span>
</div>
</a>
</div>
<hr>
<h4 class="pad-hor text-thin">
<span class="pull-right badge badge-success">Offline</span> Works
</h4>
<!--Works-->
<div class="list-group bg-trans">
<a href="#" class="list-group-item">
<span class="badge badge-purple badge-icon badge-fw pull-left"></span> Joey K. Greyson
</a>
<a href="#" class="list-group-item">
<span class="badge badge-info badge-icon badge-fw pull-left"></span> Andrea Branden
</a>
<a href="#" class="list-group-item">
<span class="badge badge-pink badge-icon badge-fw pull-left"></span> Lucy Moon
</a>
<a href="#" class="list-group-item">
<span class="badge badge-success badge-icon badge-fw pull-left"></span> Johny Juan
</a>
<a href="#" class="list-group-item">
<span class="badge badge-danger badge-icon badge-fw pull-left"></span> Susan Sun
</a>
</div>
</div>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--End first tab (Contact list)-->
<!--Second tab (Custom layout)-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<div class="tab-pane fade" id="demo-asd-tab-2">
<!--Monthly billing-->
<div class="pad-all">
<h4 class="text-lg mar-no">Monthly Billing</h4>
<p class="text-sm">January 2015</p>
<button class="btn btn-block btn-success mar-top">Pay Now</button>
</div>
<hr>
<!--Information-->
<div class="text-center clearfix pad-top">
<div class="col-xs-6">
<span class="h4">4,327</span>
<p class="text-muted text-uppercase"><small>Sales</small></p>
</div>
<div class="col-xs-6">
<span class="h4">$ 1,252</span>
<p class="text-muted text-uppercase"><small>Earning</small></p>
</div>
</div>
<hr>
<!--Simple Menu-->
<div class="list-group bg-trans">
<a href="#" class="list-group-item"><span class="label label-danger pull-right">Featured</span>Edit Password</a>
<a href="#" class="list-group-item">Email</a>
<a href="#" class="list-group-item"><span class="label label-success pull-right">New</span>Chat</a>
<a href="#" class="list-group-item">Reports</a>
<a href="#" class="list-group-item">Transfer Funds</a>
</div>
<hr>
<div class="text-center">Questions?
<p class="text-lg text-semibold"> (415) 234-53454 </p>
<small><em>We are here 24/7</em></small>
</div>
</div>
<!--End second tab (Custom layout)-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--Third tab (Settings)-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<div class="tab-pane fade" id="demo-asd-tab-3">
<ul class="list-group bg-trans">
<li class="list-header">
<h4 class="text-thin">Account Settings</h4>
</li>
<li class="list-group-item">
<div class="pull-right">
<input class="demo-switch" type="checkbox" checked>
</div>
<p>Show my personal status</p>
<small class="text-muted">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</small>
</li>
<li class="list-group-item">
<div class="pull-right">
<input class="demo-switch" type="checkbox" checked>
</div>
<p>Show offline contact</p>
<small class="text-muted">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</small>
</li>
<li class="list-group-item">
<div class="pull-right">
<input class="demo-switch" type="checkbox">
</div>
<p>Invisible mode </p>
<small class="text-muted">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</small>
</li>
</ul>
<hr>
<ul class="list-group bg-trans">
<li class="list-header"><h4 class="text-thin">Public Settings</h4></li>
<li class="list-group-item">
<div class="pull-right">
<input class="demo-switch" type="checkbox" checked>
</div>
Online status
</li>
<li class="list-group-item">
<div class="pull-right">
<input class="demo-switch" type="checkbox" checked>
</div>
Show offline contact
</li>
<li class="list-group-item">
<div class="pull-right">
<input class="demo-switch" type="checkbox">
</div>
Show my device icon
</li>
</ul>
<hr>
<h4 class="pad-hor text-thin">Task Progress</h4>
<div class="pad-all">
<p>Upgrade Progress</p>
<div class="progress progress-sm">
<div class="progress-bar progress-bar-success" style="width: 15%;"><span class="sr-only">15%</span></div>
</div>
<small class="text-muted">15% Completed</small>
</div>
<div class="pad-hor">
<p>Database</p>
<div class="progress progress-sm">
<div class="progress-bar progress-bar-danger" style="width: 75%;"><span class="sr-only">75%</span></div>
</div>
<small class="text-muted">17/23 Database</small>
</div>
</div>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!--Third tab (Settings)-->
</div>
</div>
</div>
</div>
</aside>
<!--===================================================-->
<!--END ASIDE-->
</div>
<!-- FOOTER -->
<!--===================================================-->
<footer id="footer">
<!-- Visible when footer positions are fixed -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="show-fixed pull-right">
<ul class="footer-list list-inline">
<li>
<p class="text-sm">SEO Proggres</p>
<div class="progress progress-sm progress-light-base">
<div style="width: 80%" class="progress-bar progress-bar-danger"></div>
</div>
</li>
<li>
<p class="text-sm">Online Tutorial</p>
<div class="progress progress-sm progress-light-base">
<div style="width: 80%" class="progress-bar progress-bar-primary"></div>
</div>
</li>
<li>
<button class="btn btn-sm btn-dark btn-active-success">Checkout</button>
</li>
</ul>
</div>
<!-- Visible when footer positions are static -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="hide-fixed pull-right pad-rgt">Currently v2.2</div>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Remove the class name "show-fixed" and "hide-fixed" to make the content always appears. -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<p class="pad-lft">© 2015 Your Company</p>
</footer>
<!--===================================================-->
<!-- END FOOTER -->
<!-- SCROLL TOP BUTTON -->
<!--===================================================-->
<button id="scroll-top" class="btn"><i class="fa fa-chevron-up"></i></button>
<!--===================================================-->
</div>
<!--===================================================-->
<!-- END OF CONTAINER -->
<!--JAVASCRIPT-->
<!--=================================================-->
<!--jQuery [ REQUIRED ]-->
<script src="js/jquery-2.1.1.min.js"></script>
<!--BootstrapJS [ RECOMMENDED ]-->
<script src="js/bootstrap.min.js"></script>
<!--Fast Click [ OPTIONAL ]-->
<script src="plugins/fast-click/fastclick.min.js"></script>
<!--Nifty Admin [ RECOMMENDED ]-->
<script src="js/nifty.min.js"></script>
<!--Switchery [ OPTIONAL ]-->
<script src="plugins/switchery/switchery.min.js"></script>
<!--Bootstrap Select [ OPTIONAL ]-->
<script src="plugins/bootstrap-select/bootstrap-select.min.js"></script>
<!--Demo script [ DEMONSTRATION ]-->
<script src="js/demo/nifty-demo.min.js"></script>
<script src="js/demo/layouts.js"></script>
<!--
REQUIRED
You must include this in your project.
RECOMMENDED
This category must be included but you may modify which plugins or components which should be included in your project.
OPTIONAL
Optional plugins. You may choose whether to include it in your project or not.
DEMONSTRATION
This is to be removed, used for demonstration purposes only. This category must not be included in your project.
SAMPLE
Some script samples which explain how to initialize plugins or components. This category should not be included in your project.
Detailed information and more samples can be found in the document.
-->
</body>
<!-- Mirrored from www.themeon.net/nifty/v2.2.1/layouts-aside-left-side.html by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 20 Aug 2015 17:41:49 GMT -->
</html>
|
JulioSantanaR/Cedae_facturation
|
RetailTerrabit-Facturacion/RODHE.Facturacion/SCFacturacion/main/layouts-aside-left-side.html
|
HTML
|
mit
| 45,382
|
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ActionView::TestCase::Behavior::RenderedViewsCollection</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" />
<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="banner">
<span>Ruby on Rails 4.2.1</span><br />
<h1>
<span class="type">Class</span>
ActionView::TestCase::Behavior::RenderedViewsCollection
<span class="parent"><
<a href="../../../Object.html">Object</a>
</span>
</h1>
<ul class="files">
<li><a href="../../../../files/__/__/__/__/_rvm/gems/ruby-2_2_2/gems/actionview-4_2_1/lib/action_view/test_case_rb.html">/Users/Bonobo/.rvm/gems/ruby-2.2.2/gems/actionview-4.2.1/lib/action_view/test_case.rb</a></li>
</ul>
</div>
<div id="bodyContent">
<div id="content">
<div class="description">
<p>Need to experiment if this priority is the best one: rendered =>
output_buffer</p>
</div>
<!-- Method ref -->
<div class="sectiontitle">Methods</div>
<dl class="methods">
<dt>A</dt>
<dd>
<ul>
<li>
<a href="#method-i-add">add</a>
</li>
</ul>
</dd>
<dt>L</dt>
<dd>
<ul>
<li>
<a href="#method-i-locals_for">locals_for</a>
</li>
</ul>
</dd>
<dt>N</dt>
<dd>
<ul>
<li>
<a href="#method-c-new">new</a>
</li>
</ul>
</dd>
<dt>R</dt>
<dd>
<ul>
<li>
<a href="#method-i-rendered_views">rendered_views</a>
</li>
</ul>
</dd>
<dt>V</dt>
<dd>
<ul>
<li>
<a href="#method-i-view_rendered-3F">view_rendered?</a>
</li>
</ul>
</dd>
</dl>
<!-- Methods -->
<div class="sectiontitle">Class Public methods</div>
<div class="method">
<div class="title method-title" id="method-c-new">
<b>new</b>()
<a href="../../../../classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html#method-c-new" name="method-c-new" class="permalink">Link</a>
</div>
<div class="description">
</div>
<div class="sourcecode">
<p class="source-link">
Source:
<a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
</p>
<div id="method-c-new_source" class="dyn-source">
<pre><span class="ruby-comment"># File ../../../../.rvm/gems/ruby-2.2.2/gems/actionview-4.2.1/lib/action_view/test_case.rb, line 130</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>
<span class="ruby-ivar">@rendered_views</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = [] }
<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title method-title" id="method-i-add">
<b>add</b>(view, locals)
<a href="../../../../classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html#method-i-add" name="method-i-add" class="permalink">Link</a>
</div>
<div class="description">
</div>
<div class="sourcecode">
<p class="source-link">
Source:
<a href="javascript:toggleSource('method-i-add_source')" id="l_method-i-add_source">show</a>
</p>
<div id="method-i-add_source" class="dyn-source">
<pre><span class="ruby-comment"># File ../../../../.rvm/gems/ruby-2.2.2/gems/actionview-4.2.1/lib/action_view/test_case.rb, line 134</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add</span>(<span class="ruby-identifier">view</span>, <span class="ruby-identifier">locals</span>)
<span class="ruby-ivar">@rendered_views</span>[<span class="ruby-identifier">view</span>] <span class="ruby-operator">||=</span> []
<span class="ruby-ivar">@rendered_views</span>[<span class="ruby-identifier">view</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">locals</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title method-title" id="method-i-locals_for">
<b>locals_for</b>(view)
<a href="../../../../classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html#method-i-locals_for" name="method-i-locals_for" class="permalink">Link</a>
</div>
<div class="description">
</div>
<div class="sourcecode">
<p class="source-link">
Source:
<a href="javascript:toggleSource('method-i-locals_for_source')" id="l_method-i-locals_for_source">show</a>
</p>
<div id="method-i-locals_for_source" class="dyn-source">
<pre><span class="ruby-comment"># File ../../../../.rvm/gems/ruby-2.2.2/gems/actionview-4.2.1/lib/action_view/test_case.rb, line 139</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">locals_for</span>(<span class="ruby-identifier">view</span>)
<span class="ruby-ivar">@rendered_views</span>[<span class="ruby-identifier">view</span>]
<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title method-title" id="method-i-rendered_views">
<b>rendered_views</b>()
<a href="../../../../classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html#method-i-rendered_views" name="method-i-rendered_views" class="permalink">Link</a>
</div>
<div class="description">
</div>
<div class="sourcecode">
<p class="source-link">
Source:
<a href="javascript:toggleSource('method-i-rendered_views_source')" id="l_method-i-rendered_views_source">show</a>
</p>
<div id="method-i-rendered_views_source" class="dyn-source">
<pre><span class="ruby-comment"># File ../../../../.rvm/gems/ruby-2.2.2/gems/actionview-4.2.1/lib/action_view/test_case.rb, line 143</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">rendered_views</span>
<span class="ruby-ivar">@rendered_views</span>.<span class="ruby-identifier">keys</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title method-title" id="method-i-view_rendered-3F">
<b>view_rendered?</b>(view, expected_locals)
<a href="../../../../classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html#method-i-view_rendered-3F" name="method-i-view_rendered-3F" class="permalink">Link</a>
</div>
<div class="description">
</div>
<div class="sourcecode">
<p class="source-link">
Source:
<a href="javascript:toggleSource('method-i-view_rendered-3F_source')" id="l_method-i-view_rendered-3F_source">show</a>
</p>
<div id="method-i-view_rendered-3F_source" class="dyn-source">
<pre><span class="ruby-comment"># File ../../../../.rvm/gems/ruby-2.2.2/gems/actionview-4.2.1/lib/action_view/test_case.rb, line 147</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">view_rendered?</span>(<span class="ruby-identifier">view</span>, <span class="ruby-identifier">expected_locals</span>)
<span class="ruby-identifier">locals_for</span>(<span class="ruby-identifier">view</span>).<span class="ruby-identifier">any?</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">actual_locals</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">expected_locals</span>.<span class="ruby-identifier">all?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">actual_locals</span>[<span class="ruby-identifier">key</span>] }
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|
TomMulvaney/AudioFlow
|
doc/api/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html
|
HTML
|
mit
| 11,630
|
import json
from operator import itemgetter
import os
import random
import string
import sys
from datetime import datetime
from devtools import debug
from functools import partial
from pathlib import Path
from statistics import StatisticsError, mean
from statistics import stdev as stdev_
from test_pydantic import TestPydantic
try:
from test_trafaret import TestTrafaret
except Exception:
print('WARNING: unable to import TestTrafaret')
TestTrafaret = None
try:
from test_drf import TestDRF
except Exception:
print('WARNING: unable to import TestDRF')
TestDRF = None
try:
from test_marshmallow import TestMarshmallow
except Exception:
print('WARNING: unable to import TestMarshmallow')
TestMarshmallow = None
try:
from test_valideer import TestValideer
except Exception:
print('WARNING: unable to import TestValideer')
TestValideer = None
try:
from test_cattrs import TestCAttrs
except Exception:
print('WARNING: unable to import TestCAttrs')
TestCAttrs = None
try:
from test_cerberus import TestCerberus
except Exception:
print('WARNING: unable to import TestCerberus')
TestCerberus = None
try:
from test_voluptuous import TestVoluptuous
except Exception as e:
print('WARNING: unable to import TestVoluptuous')
TestVoluptuous = None
try:
from test_schematics import TestSchematics
except Exception as e:
print('WARNING: unable to import TestSchematics')
TestSchematics = None
PUNCTUATION = ' \t\n!"#$%&\'()*+,-./'
LETTERS = string.ascii_letters
UNICODE = '\xa0\xad¡¢£¤¥¦§¨©ª«¬ ®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
ALL = PUNCTUATION * 5 + LETTERS * 20 + UNICODE
random = random.SystemRandom()
# in order of performance for csv
other_tests = [
TestCAttrs,
TestValideer,
TestMarshmallow,
TestVoluptuous,
TestTrafaret,
TestSchematics,
TestDRF,
TestCerberus,
]
active_other_tests = [t for t in other_tests if t is not None]
class GenerateData:
def __init__(self):
pass
def rand_string(min_length, max_length, corpus=ALL):
return ''.join(random.choices(corpus, k=random.randrange(min_length, max_length)))
MISSING = object()
def null_missing_v(f, null_chance=0.2, missing_chance=None):
r = random.random()
if random.random() < null_chance:
return None
missing_chance = null_chance if missing_chance is None else missing_chance
if r < (null_chance + missing_chance):
return MISSING
return f()
def null_missing_string(*args, **kwargs):
f = partial(rand_string, *args)
return null_missing_v(f, **kwargs)
def rand_email():
if random.random() < 0.2:
c1, c2 = UNICODE, LETTERS
else:
c1, c2 = LETTERS, LETTERS
return f'{rand_string(10, 50, corpus=c1)}@{rand_string(10, 50, corpus=c2)}.{rand_string(2, 5, corpus=c2)}'
def null_missing_email():
return null_missing_v(rand_email)
def rand_date():
r = random.randrange
return f'{r(1900, 2020)}-{r(0, 12)}-{r(0, 32)}T{r(0, 24)}:{r(0, 60)}:{r(0, 60)}'
def remove_missing(d):
if isinstance(d, dict):
return {k: remove_missing(v) for k, v in d.items() if v is not MISSING}
elif isinstance(d, list):
return [remove_missing(d_) for d_ in d]
else:
return d
def generate_case():
return remove_missing(dict(
id=random.randrange(1, 2000),
client_name=null_missing_string(10, 280, null_chance=0.05, missing_chance=0.05),
sort_index=random.random() * 200,
# client_email=null_missing_email(), # email checks differ with different frameworks
client_phone=null_missing_string(5, 15),
location=dict(
latitude=random.random() * 180 - 90,
longitude=random.random() * 180,
),
contractor=str(random.randrange(-100, 2000)),
upstream_http_referrer=null_missing_string(10, 1050),
grecaptcha_response=null_missing_string(10, 1050, null_chance=0.05, missing_chance=0.05),
last_updated=rand_date(),
skills=[dict(
subject=null_missing_string(5, 20, null_chance=0.01, missing_chance=0),
subject_id=i,
category=rand_string(5, 20),
qual_level=rand_string(5, 20),
qual_level_id=random.randrange(2000),
qual_level_ranking=random.random() * 20
) for i in range(random.randrange(1, 5))]
))
THIS_DIR = Path(__file__).parent.resolve()
def stdev(d):
try:
return stdev_(d)
except StatisticsError:
return 0
def run_tests(classes, cases, repeats, json=False):
if json:
classes = [c for c in classes if hasattr(c, 'to_json')]
lpad = max(len(t.package) for t in classes) + 4
print(f'testing {", ".join(t.package for t in classes)}, {repeats} times each')
results = []
csv_results = []
for test_class in classes:
times = []
p = test_class.package
for i in range(repeats):
count, pass_count = 0, 0
test = test_class(True)
models = []
if json:
models = [m for passed, m in (test.validate(c) for c in cases) if passed]
start = datetime.now()
for j in range(3):
if json:
for model in models:
test.to_json(model)
pass_count += 1
count += 1
else:
for case in cases:
passed, result = test.validate(case)
pass_count += passed
count += 1
time = (datetime.now() - start).total_seconds()
success = pass_count / count * 100
print(f'{p:>{lpad}} ({i+1:>{len(str(repeats))}}/{repeats}) time={time:0.3f}s, success={success:0.2f}%')
times.append(time)
print(f'{p:>{lpad}} best={min(times):0.3f}s, avg={mean(times):0.3f}s, stdev={stdev(times):0.3f}s')
model_count = 3 * len(cases)
avg = mean(times) / model_count * 1e6
sd = stdev(times) / model_count * 1e6
results.append(f'{p:>{lpad}} best={min(times) / model_count * 1e6:0.3f}μs/iter '
f'avg={avg:0.3f}μs/iter stdev={sd:0.3f}μs/iter version={test_class.version}')
csv_results.append([p, test_class.version, avg])
print()
return results, csv_results
def main():
json_path = THIS_DIR / 'cases.json'
if not json_path.exists():
print('generating test cases...')
cases = [generate_case() for _ in range(2000)]
with json_path.open('w') as f:
json.dump(cases, f, indent=2, sort_keys=True)
else:
with json_path.open() as f:
cases = json.load(f)
tests = [TestPydantic]
if 'pydantic-only' not in sys.argv:
tests += active_other_tests
repeats = int(os.getenv('BENCHMARK_REPEATS', '5'))
test_json = 'TEST_JSON' in os.environ
results, csv_results = run_tests(tests, cases, repeats, test_json)
for r in results:
print(r)
if 'SAVE' in os.environ:
save_md(csv_results)
def save_md(data):
headings = 'Package', 'Version', 'Relative Performance', 'Mean validation time'
rows = [headings, ['---' for _ in headings]]
first_avg = None
for package, version, avg in sorted(data, key=itemgetter(2)):
if first_avg:
relative = f'{avg / first_avg:0.1f}x slower'
else:
relative = ''
first_avg = avg
rows.append([package, f'`{version}`', relative, f'{avg:0.1f}μs'])
table = '\n'.join(' | '.join(row) for row in rows)
text = f"""\
[//]: <> (Generated with benchmarks/run.py, DO NOT EDIT THIS FILE DIRECTLY, instead run `SAVE=1 python ./run.py`.)
{table}
"""
(Path(__file__).parent / '..' / 'docs' / '.benchmarks_table.md').write_text(text)
def diff():
json_path = THIS_DIR / 'cases.json'
with json_path.open() as f:
cases = json.load(f)
allow_extra = True
pydantic = TestPydantic(allow_extra)
others = [t(allow_extra) for t in active_other_tests]
for case in cases:
pydantic_passed, pydantic_result = pydantic.validate(case)
for other in others:
other_passed, other_result = other.validate(case)
if other_passed != pydantic_passed:
print(f'⨯ pydantic {pydantic_passed} != {other.package} {other_passed}')
debug(case, pydantic_result, other_result)
return
print('✓ data passes match for all packages')
if __name__ == '__main__':
if 'diff' in sys.argv:
diff()
else:
main()
# if None in other_tests:
# print('not all libraries could be imported!')
# sys.exit(1)
|
samuelcolvin/pydantic
|
benchmarks/run.py
|
Python
|
mit
| 8,926
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Unstakeable</source>
<translation>در مورد Unstakeable</translation>
</message>
<message>
<location line="+39"/>
<source><b>Unstakeable</b> version</source>
<translation>نسخه Unstakeable</translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation>⏎ ⏎ این نسخه نرم افزار آزمایشی است⏎ ⏎ نرم افزار تحت لیسانس MIT/X11 منتشر شده است. به فایل coping یا آدرس http://www.opensource.org/licenses/mit-license.php. مراجعه شود⏎ ⏎ این محصول شامل نرم افزاری است که با OpenSSL برای استفاده از OpenSSL Toolkit (http://www.openssl.org/) و نرم افزار نوشته شده توسط اریک یانگ (eay@cryptsoft.com ) و UPnP توسط توماس برنارد طراحی شده است.</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The Unstakeable developers</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>فهرست آدرس</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>برای ویرایش آدرس یا بر چسب دو بار کلیک کنید</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>آدرس جدید ایجاد کنید</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>آدرس جدید</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Unstakeable addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>این آدرسها، آدرسهای unstakeable شما برای دریافت وجوه هستند. شما ممکن است آدرسهای متفاوت را به هر گیرنده اختصاص دهید که بتوانید مواردی که پرداخت می کنید را پیگیری نمایید</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>کپی آدرس</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>نمایش &کد QR</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Unstakeable address</source>
<translation>پیام را برای اثبات آدرس Unstakeable خود امضا کنید</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>امضا و پیام</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>آدرس انتخاب شده در سیستم تخته رسم گیره دا حذف</translation>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Unstakeable address</source>
<translation>یک پیام را برای حصول اطمینان از ورود به سیستم با آدرس unstakeable مشخص، شناسایی کنید</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>شناسایی پیام</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>حذف</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Unstakeable addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>کپی و برچسب گذاری</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>ویرایش</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Comma separated file (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>خطای صدور</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>تا فایل %1 نمی شود نوشت</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>بر چسب</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>آدرس</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>بدون برچسب</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>دیالوگ Passphrase </translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>وارد عبارت عبور</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>عبارت عبور نو</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>تکرار عبارت عبور نو</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>وارد کنید..&lt;br/&gt عبارت عبور نو در پنجره
10 یا بیشتر کاراکتورهای تصادفی استفاده کنید &lt;b&gt لطفا عبارت عبور</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>رمز بندی پنجره</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>این عملیت نیاز عبارت عبور پنجره شما دارد برای رمز گشایی آن</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>تکرار عبارت عبور نو</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>این عملیت نیاز عبارت عبور شما دارد برای رمز بندی آن</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>رمز بندی پنجره</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>تغییر عبارت عبور</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>تایید رمز گذاری</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR LITECOINS</b>!</source>
<translation>هشدار: اگر wallet رمزگذاری شود و شما passphrase را گم کنید شما همه اطلاعات unstakeable را از دست خواهید داد.</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>آیا اطمینان دارید که می خواهید wallet رمزگذاری شود؟</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>هشدار: Caps lock key روشن است</translation>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>تغییر عبارت عبور</translation>
</message>
<message>
<location line="-56"/>
<source>Unstakeable will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your unstakeables from being stolen by malware infecting your computer.</source>
<translation>Biticon هم اکنون بسته میشود تا فرایند رمزگذاری را تمام کند. به خاطر داشته باشید که رمزگذاری کیف پولتان نمیتواند به طور کامل بیتیکونهای شما را در برابر دزدیده شدن توسط بدافزارهایی که رایانه شما را آلوده میکنند، محافظت نماید.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>تنا موفق رمز بندی پنجره ناشی از خطای داخل شد. پنجره شما مرز بندی نشده است</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>عبارت عبور عرضه تطابق نشد</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>نجره رمز گذار شد</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>اموفق رمز بندی پنجر</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>ناموفق رمز بندی پنجره</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>wallet passphrase با موفقیت تغییر یافت</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>امضا و پیام</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>همگام سازی با شبکه ...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>بررسی اجمالی</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>نمای کلی پنجره نشان بده</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&معاملات</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>نمایش تاریخ معاملات</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>ویرایش لیست آدرسها و بر چسب های ذخیره ای</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>نمایش لیست آدرس ها برای در یافت پر داخت ها</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>خروج</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>خروج از برنامه </translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Unstakeable</source>
<translation>نمایش اطلاعات در مورد بیتکویین</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>درباره &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>نمایش اطلاعات درباره Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>تنظیمات...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>رمزگذاری wallet</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>پشتیبان گیری از wallet</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>تغییر Passphrase</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Unstakeable address</source>
<translation>سکه ها را به آدرس bitocin ارسال کن</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Unstakeable</source>
<translation>انتخابهای پیکربندی را برای unstakeable اصلاح کن</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>نسخه پیشتیبان wallet را به محل دیگر انتقال دهید</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>عبارت عبور رمز گشایی پنجره تغییر کنید</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>اشکال زدایی از صفحه</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>کنسول اشکال زدایی و تشخیص را باز کنید</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>بازبینی پیام</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Unstakeable</source>
<translation>یت کویین </translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>wallet</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About Unstakeable</source>
<translation>در مورد unstakeable</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&نمایش/ عدم نمایش</translation>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Unstakeable addresses to prove you own them</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Unstakeable addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>فایل</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>تنظیمات</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>کمک</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>نوار ابزار زبانه ها</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>آزمایش شبکه</translation>
</message>
<message>
<location line="+47"/>
<source>Unstakeable client</source>
<translation>مشتری Unstakeable</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Unstakeable network</source>
<translation><numerusform>در صد ارتباطات فعال بیتکویین با شبکه %n</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>تا تاریخ</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>ابتلا به بالا</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>هزینه تراکنش را تایید کنید</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>معامله ارسال شده</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>معامله در یافت شده</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>تاریخ %1
مبلغ%2
نوع %3
آدرس %4</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation>مدیریت URI</translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Unstakeable address or malformed URI parameters.</source>
<translation>URI قابل تحلیل نیست. این خطا ممکن است به دلیل ادرس LITECOIN اشتباه یا پارامترهای اشتباه URI رخ داده باشد</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>زمایش شبکهه</translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>زمایش شبکه</translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Unstakeable can no longer continue safely and will quit.</source>
<translation>خطا روی داده است. Unstakeable نمی تواند بدون مشکل ادامه دهد و باید بسته شود</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation>پیام شبکه</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>اصلاح آدرس</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>بر چسب</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>بر چسب با دفتر آدرس ورود مرتبط است</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>آدرس</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>آدرس با دفتر آدرس ورودی مرتبط است. این فقط در مورد آدرسهای ارسال شده است</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>آدرس در یافت نو</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>آدرس ارسال نو</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>اصلاح آدرس در یافت</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>اصلاح آدرس ارسال</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>%1آدرس وارد شده دیگر در دفتر آدرس است</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Unstakeable address.</source>
<translation>آدرس وارد شده %1 یک ادرس صحیح unstakeable نیست</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>رمز گشایی پنجره امکان پذیر نیست</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>کلید نسل جدید ناموفق است</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Unstakeable-Qt</source>
<translation>Unstakeable-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>نسخه</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>ستفاده :</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>انتخابها برای خطوط دستور command line</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>انتخابهای UI </translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>زبان را تنظیم کنید برای مثال "de_DE" (پیش فرض: system locale)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>شروع حد اقل</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>نمایش صفحه splash در STARTUP (پیش فرض:1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>اصلی</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>اصلی</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>دستمزد&پر داخت معامله</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start Unstakeable after logging in to the system.</source>
<translation>در زمان ورود به سیستم به صورت خودکار unstakeable را اجرا کن</translation>
</message>
<message>
<location line="+3"/>
<source>&Start Unstakeable on system login</source>
<translation>اجرای unstakeable در زمان ورود به سیستم</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>شبکه</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Unstakeable client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>اتوماتیک باز کردن بندر بیتکویین در روتر . این فقط در مواردی می باشد که روتر با کمک یو پ ن پ کار می کند</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>درگاه با استفاده از</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the Unstakeable network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>اتصال به شبکه LITECOIN از طریق پراکسی ساکس (برای مثال وقتی از طریق نرم افزار TOR متصل می شوید)</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>اتصال با پراکسی SOCKS</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>پراکسی و آی.پی.</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>درس پروکسی</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>درگاه</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>درگاه پراکسی (مثال 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>SOCKS و نسخه</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>نسخه SOCKS از پراکسی (مثال 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>صفحه</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>tray icon را تنها بعد از کوچک کردن صفحه نمایش بده</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>حد اقل رساندن در جای نوار ابزار ها</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>حد اقل رساندن در جای خروج بر نامه وقتیکه پنجره بسته است.وقتیکه این فعال است برنامه خاموش می شود بعد از انتخاب دستور خاموش در منیو</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>کوچک کردن صفحه در زمان بستن</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>نمایش</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>میانجی کاربر و زبان</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Unstakeable.</source>
<translation>زبان میانجی کاربر می تواند در اینجا تنظیم شود. این تنظیمات بعد از شروع دوباره RESTART در LITECOIN اجرایی خواهند بود.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>واحد برای نمایش میزان وجوه در:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>بخش فرعی پیش فرض را برای نمایش میانجی و زمان ارسال سکه ها مشخص و انتخاب نمایید</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show Unstakeable addresses in the transaction list or not.</source>
<translation>تا آدرسهای bITCOIN در فهرست تراکنش نمایش داده شوند یا نشوند.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>نمایش آدرسها در فهرست تراکنش</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>تایید</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>رد</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>انجام</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>پیش فرض</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>هشدار</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Unstakeable.</source>
<translation>این تنظیمات پس از اجرای دوباره Unstakeable اعمال می شوند</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>آدرس پراکسی داده شده صحیح نیست</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>تراز</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Unstakeable network after a connection is established, but this process has not completed yet.</source>
<translation>اطلاعات نمایش داده شده روزآمد نیستند.wallet شما به صورت خودکار با شبکه unstakeable بعد از برقراری اتصال روزآمد می شود اما این فرایند هنوز کامل نشده است.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>راز:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>تایید نشده</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>wallet</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation>نابالغ</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>بالانس/تتمه حساب استخراج شده، نابالغ است /تکمیل نشده است</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation>اخرین معاملات&lt</translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>تزار جاری شما</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>تعداد معاملات که تایید شده ولی هنوز در تزار جاری شما بر شمار نرفته است</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>روزآمد نشده</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start unstakeable: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>دیالوگ QR CODE</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>درخواست پرداخت</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>مقدار:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>برچسب:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>پیام</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&ذخیره به عنوان...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>خطا در زمان رمزدار کردن URI در کد QR</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>میزان وجه وارد شده صحیح نیست، لطفا بررسی نمایید</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>URI ذکر شده بسیار طولانی است، متن برچسب/پیام را کوتاه کنید</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>ذخیره کد QR</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>تصاویر با فرمت PNG (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>نام مشتری</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation>-</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>نسخه مشتری</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>اطلاعات</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>استفاده از نسخه OPENSSL</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>زمان آغاز STARTUP</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>شبکه</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>تعداد اتصالات</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>در testnetکها</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>زنجیره بلاک</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>تعداد کنونی بلاکها</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>تعداد تخمینی بلاکها</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>زمان آخرین بلاک</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>باز کردن</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>گزینه های command-line</translation>
</message>
<message>
<location line="+7"/>
<source>Show the Unstakeable-Qt help message to get a list with possible Unstakeable command-line options.</source>
<translation>پیام راهنمای Unstakeable-Qt را برای گرفتن فهرست گزینه های command-line نشان بده</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>نمایش</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>کنسول</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>ساخت تاریخ</translation>
</message>
<message>
<location line="-104"/>
<source>Unstakeable - Debug window</source>
<translation>صفحه اشکال زدایی Unstakeable </translation>
</message>
<message>
<location line="+25"/>
<source>Unstakeable Core</source>
<translation> هسته Unstakeable </translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation>فایلِ لاگِ اشکال زدایی</translation>
</message>
<message>
<location line="+7"/>
<source>Open the Unstakeable debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>فایلِ لاگِ اشکال زدایی Unstakeable را از دایرکتوری جاری داده ها باز کنید. این عملیات ممکن است برای فایلهای لاگِ حجیم طولانی شود.</translation>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>پاکسازی کنسول</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Unstakeable RPC console.</source>
<translation>به کنسول Unstakeable RPC خوش آمدید</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>دکمه های بالا و پایین برای مرور تاریخچه و Ctrl-L برای پاکسازی صفحه</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>با تایپ عبارت HELP دستورهای در دسترس را مرور خواهید کرد</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>ارسال سکه ها</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>ارسال چندین در یافت ها فورا</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>اضافه کردن دریافت کننده</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>پاک کردن تمام ستونهای تراکنش</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>پاکسازی همه</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>تزار :</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation>123.456 بتس</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>عملیت دوم تایید کنید</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&;ارسال</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation>(%3) تا <b>%1</b> درصد%2</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>ارسال سکه ها تایید کنید</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation> %1شما متماینید که می خواهید 1% ارسال کنید ؟</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>و</translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>آدرس گیرنده نادرست است، لطفا دوباره بررسی کنید.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>مبلغ پر داخت باید از 0 بیشتر باشد </translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>میزان وجه از بالانس/تتمه حساب شما بیشتر است</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>کل میزان وجه از بالانس/تتمه حساب شما بیشتر می شود وقتی %1 هزینه تراکنش نیز به ین میزان افزوده می شود</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>آدرس تکراری یافت شده است، در زمان انجام عملیات به هر آدرس تنها یکبار می توانید اطلاعات ارسال کنید</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>خطا: تراکنش تایید نشد. این پیام زمانی روی می دهد که مقداری از سکه های WALLET شما استفاده شده اند برای مثال اگر شما از WALLET.DAT استفاده کرده اید، ممکن است سکه ها استفاده شده باشند اما در اینجا نمایش داده نشوند</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>تراز</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>A&مبلغ :</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>به&پر داخت :</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>برای آدرس بر پسب وارد کنید که در دفتر آدرس اضافه شود</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&بر چسب </translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>اآدرسن ازدفتر آدرس انتخاب کنید</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>آدرس از تخته رسم گیره دار پست کنید </translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>بر داشتن این در یافت کننده</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Unstakeable address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>امضا - امضا کردن /شناسایی یک پیام</translation>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>&امضای پیام</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>شما می توانید پیامها را با آدرس خودتان امضا نمایید تا ثابت شود متعلق به شما هستند. مواظب باشید تا چیزی که بدان مطمئن نیستنید را امضا نکنید زیرا حملات فیشینگ در زمان ورود شما به سیستم فریبنده هستند. تنها مواردی را که حاوی اطلاعات دقیق و قابل قبول برای شما هستند را امضا کنید</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>یک آدرس را از فهرست آدرسها انتخاب کنید</translation>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>آدرس از تخته رسم گیره دار پست کنید </translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>پیامی را که میخواهید امضا کنید در اینجا وارد کنید</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>این امضا را در system clipboard کپی کن</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Unstakeable address</source>
<translation>پیام را برای اثبات آدرس LITECOIN خود امضا کنید</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>تنظیم دوباره تمامی فیلدهای پیام</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>پاکسازی همه</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>تایید پیام</translation>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>آدرس/پیام خود را وارد کنید (مطمئن شوید که فاصله بین خطوط، فاصله ها، تب ها و ... را دقیقا کپی می کنید) و سپس امضا کنید تا پیام تایید شود. مراقب باشید که پیام را بیشتر از مطالب درون امضا مطالعه نمایید تا فریب شخص سوم/دزدان اینترنتی را نخورید.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Unstakeable address</source>
<translation>پیام را برای اطمنان از ورود به سیستم با آدرس LITECOIN مشخص خود،تایید کنید</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>تنظیم دوباره تمامی فیلدهای پیام تایید شده</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Unstakeable address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>با کلیک بر "امضای پیام" شما یک امضای جدید درست می کنید</translation>
</message>
<message>
<location line="+3"/>
<source>Enter Unstakeable signature</source>
<translation>امضای BITOCOIN خود را وارد کنید</translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>آدرس وارد شده صحیح نیست</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>اطفا آدرس را بررسی کرده و دوباره امتحان کنید</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>آدرس وارد شده با کلید وارد شده مرتبط نیست</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>قفل کردن wallet انجام نشد</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>کلید شخصی برای آدرس وارد شده در دسترس نیست</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>پیام امضا کردن انجام نشد</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>پیام امضا شد</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>امضا نمی تواند رمزگشایی شود</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>لطفا امضا را بررسی و دوباره تلاش نمایید</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>امضا با تحلیلِ پیام مطابقت ندارد</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>عملیات شناسایی پیام انجام نشد</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>پیام شناسایی شد</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Unstakeable developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>آزمایش شبکه</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>باز کردن تا%1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation>%1 آفلاین</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1 تایید نشده </translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>ایید %1 </translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>وضعیت</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>انتشار از طریق n% گره
انتشار از طریق %n گره</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>تاریخ </translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>منبع</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>تولید شده</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>فرستنده</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>گیرنده</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>آدرس شما</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>برچسب</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>بدهی </translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>بلوغ در n% از بیشتر بلاکها
بلوغ در %n از بیشتر بلاکها</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>غیرقابل قبول</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>اعتبار</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>هزینه تراکنش</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>هزینه خالص</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>پیام</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>نظر</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>شناسه کاربری برای تراکنش</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>سکه های ایجاد شده باید 120 بلاک را قبل از استفاده بالغ کنند. در هنگام ایجاد بلاک، آن بلاک در شبکه منتشر می شود تا به زنجیره بلاکها بپیوندد. اگر در زنجیره قرار نگیرد، پیام وضعیت به غیرقابل قبول تغییر می بپیابد و قابل استفاده نیست. این مورد معمولا زمانی پیش می آید که گره دیگری به طور همزمان بلاکی را با فاصل چند ثانیه ای از شما ایجاد کند.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>اشکال زدایی طلاعات</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>تراکنش</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation>درونداد</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>صحیح</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>نادرست</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>هنوز با مو فقیت ارسال نشده</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>مشخص نیست </translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>جزییات معاملات</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>در این قاب شیشه توصیف دقیق معامله نشان می شود</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>تاریخ</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>نوع</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>ایل جدا </translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>از شده تا 1%1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>افلایین (%1)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>تایید نشده (%1/%2)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>تایید شده (%1)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation><numerusform>بالانس/تتمه حساب استخراج شده زمانی که %n از بیشتر بلاکها بالغ شدند در دسترس خواهد بود
بالانس/تتمه حساب استخراج شده زمانی که n% از بیشتر بلاکها بالغ شدند در دسترس خواهد بود</numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>این بلوک از دیگر گره ها در یافت نشده بدین دلیل شاید قابل قابول نیست</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>تولید شده ولی قبول نشده</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>در یافت با :</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>دریافتی از</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>ارسال به :</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>پر داخت به خودتان</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>استخراج</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(کاربرد ندارد)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>وضعیت معالمه . عرصه که تعداد تایید نشان می دهد</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>تاریخ و ساعت در یافت معامله</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>نوع معاملات</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>آدرس مقصود معاملات </translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>مبلغ از تزار شما خارج یا وارد شده</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>همه</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>امروز</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>این هفته</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>این ماه</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>ماه گذشته</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>امسال</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>محدوده </translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>در یافت با</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>ارسال به</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>به خودتان </translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>استخراج</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>یگر </translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>برای جستوجو نشانی یا برچسب را وارد کنید</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>حد اقل مبلغ </translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>کپی آدرس </translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>کپی بر چسب</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>روگرفت مقدار</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>اصلاح بر چسب</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>جزئیات تراکنش را نمایش بده</translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>صادرات تاریخ معامله</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Comma فایل جدا </translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>تایید شده</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>تاریخ </translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>نوع </translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>ر چسب</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>ایل جدا </translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>آی دی</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>خطای صادرت</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>تا فایل %1 نمی شود نوشت</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>>محدوده</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>به</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>ارسال سکه ها</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Unstakeable version</source>
<translation>سخه بیتکویین</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>ستفاده :</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or unstakeabled</source>
<translation>ارسال فرمان به سرور یا باتکویین</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>لیست فومان ها</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>کمک برای فرمان </translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>تنظیمات</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: unstakeable.conf)</source>
<translation>(: unstakeable.confپیش فرض: )فایل تنظیمی خاص </translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: unstakeabled.pid)</source>
<translation>(unstakeabled.pidپیش فرض : ) فایل پید خاص</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>دایرکتور اطلاعاتی خاص</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>سایز کَش بانک داده را بر حسب مگابایت تنظیم کنید (پیش فرض:25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 3456 or testnet: 13456)</source>
<translation>برای اتصالات به <port> (پیشفرض: 3456 یا تستنت: 13456) گوش کنید</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>حداکثر <n> اتصال با همکاران برقرار داشته باشید (پیشفرض: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>اتصال به گره برای دریافت آدرسهای قرینه و قطع اتصال</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>آدرس عمومی خود را ذکر کنید</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>آستانه برای قطع ارتباط با همکاران بدرفتار (پیشفرض: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>مدت زمان به ثانیه برای جلوگیری از همکاران بدرفتار برای اتصال دوباره (پیشفرض: 86400)</translation>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>در زمان تنظیم درگاه RPX %u در فهرست کردن %s اشکالی رخ داده است</translation>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 4567 or testnet: 13456)</source>
<translation>( 4567پیش فرض :) &lt;poort&gt; JSON-RPC شنوایی برای ارتباطات</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>JSON-RPC قابل فرمانها و</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>اجرای در پس زمینه به عنوان شبح و قبول فرمان ها</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>استفاده شبکه آزمایش</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال)</translation>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=unstakeablerpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Unstakeable Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Unstakeable is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>حجم حداکثر تراکنشهای با/کم اهمیت را به بایت تنظیم کنید (پیش فرض:27000)</translation>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>هشدار:paytxfee بسیار بالا تعریف شده است! این هزینه تراکنش است که باید در زمان ارسال تراکنش بپردازید</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>هشدار: تراکنش نمایش داده شده ممکن است صحیح نباشد! شما/یا یکی از گره ها به روزآمد سازی نیاز دارید </translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Unstakeable will not work properly.</source>
<translation>هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد unstakeable ممکن است صحیح کار نکند</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation>بستن گزینه ایجاد</translation>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>تنها در گره (های) مشخص شده متصل شوید</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip)</translation>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0 برای اینکار استفاده کیند.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال)</translation>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>آدرس نرم افزار تور غلط است %s</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>حداکثر بافر دریافت شده بر اساس اتصال <n>* 1000 بایت (پیش فرض:5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>حداکثر بافر دریافت شده بر اساس اتصال <n>* 1000 بایت (پیش فرض:1000)</translation>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>تنها =به گره ها در شبکه متصا شوید <net> (IPv4, IPv6 or Tor)</translation>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation>برونداد اطلاعات اشکال زدایی اضافی. گزینه های اشکال زدایی دیگر رفع شدند</translation>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation>برونداد اطلاعات اشکال زدایی اضافی برای شبکه</translation>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation>به خروجی اشکالزدایی برچسب زمان بزنید</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Unstakeable Wiki for SSL setup instructions)</source>
<translation>گزینه ssl (به ویکیunstakeable برای راهنمای راه اندازی ssl مراجعه شود)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>نسخه ای از پراکسی ساکس را برای استفاده انتخاب کنید (4-5 پیش فرض:5)</translation>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>اطلاعات ردگیری/اشکالزدایی را به جای فایل لاگ اشکالزدایی به کنسول بفرستید</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>اطلاعات ردگیری/اشکالزدایی را به اشکالزدا بفرستید</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>حداکثر سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 250000)</translation>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>فایل debug.log را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>(میلی ثانیه )فاصله ارتباط خاص</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>برای دستیابی به سرویس مخفیانه نرم افزار تور از پراکسی استفاده کنید (پیش فرض:same as -proxy)</translation>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>JSON-RPC شناسه برای ارتباطات</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است</translation>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>JSON-RPC عبارت عبور برای ارتباطات</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>از آدرس آی پی خاص JSON-RPC قبول ارتباطات</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>(127.0.0.1پیش فرض: ) &lt;ip&gt; دادن فرمانها برای استفاده گره ها روی</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>wallet را به جدیدترین فرمت روزآمد کنید</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation> (100پیش فرض:)&lt;n&gt; گذاشتن اندازه کلید روی </translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>JSON-RPCبرای ارتباطات استفاده کنید OpenSSL (https)</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation> (server.certپیش فرض: )گواهی نامه سرور</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>(server.pemپیش فرض: ) کلید خصوصی سرور</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>رمز های قابل قبول( TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>پیام کمکی</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>اتصال از طریق پراکسی ساکس</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>بار گیری آدرس ها</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>خطا در بارگیری wallet.dat: کیف پول خراب شده است</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Unstakeable</source>
<translation>خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از Biticon نیاز دارد</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Unstakeable to complete</source>
<translation>سلام</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>خطا در بارگیری wallet.dat</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>آدرس پراکسی اشتباه %s</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>نسخه پراکسی ساکس غیرقابل شناسایی درخواست شده است: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>آدرس قابل اتصال- شناسایی نیست %s</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>میزان وجه اشتباه برای paytxfee=<میزان وجه>: %s</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>میزان وجه اشتباه</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>بود جه نا کافی </translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>بار گیری شاخص بلوک</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>به اتصال یک گره اضافه کنید و اتصال را باز نگاه دارید</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Unstakeable is probably already running.</source>
<translation>اتصال به %s از این رایانه امکان پذیر نیست. Unstakeable احتمالا در حال اجراست.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>پر داجت برای هر کیلو بیت برای اضافه به معامله ارسال</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>بار گیری والت</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>امکان تنزل نسخه در wallet وجود ندارد</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>آدرس پیش فرض قابل ذخیره نیست</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>اسکان مجدد</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>بار گیری انجام شده است</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>برای استفاده از %s از انتخابات</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>خطا</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>%s، شما باید یک rpcpassword را در فایل پیکربندی تنظیم کنید :⏎%s⏎ اگر فایل ایجاد نشد، یک فایل فقط متنی ایجاد کنید.
</translation>
</message>
</context>
</TS>
|
Action-Committee/unstakeable
|
src/qt/locale/bitcoin_fa.ts
|
TypeScript
|
mit
| 119,415
|
body {
background-color: rgb(246,246,246);
font-family: -apple-system, 'avenir next', avenir, roboto, noto, ubuntu, 'helvetica neue', helvetica, arial, sans-serif;
}
.container {
text-align: center;
}
.grid-row{
display: inline-block;
width: 65vw;
}
.grid-row:first-child {
margin-top: 5vw;
}
.grid-space {
display: inline-block;
height: 10vh;
width: 10vh;
margin: 5vh;
text-align: -webkit-center;
}
.circle-boy {
background-color: black;
width: 60%;
height: 60%;
margin: 20%;
border-radius: 50%;
box-shadow: 5px 5px 20px -3px grey;
}
#s00 .circle-boy{background-color: rgb(234,120,98);}
#s01 .circle-boy{background-color: rgb(254,240,145);}
#s02 .circle-boy{background-color: rgb(53,209,133);}
#s10 .circle-boy{background-color: rgb(246,86,71);}
#s11 .circle-boy{
background-color: rgb(246,246,246);
width: 100%;
height: 100%;
margin: 0%;
}
#s12 .circle-boy{background-color: rgb(86,185,199);}
#s20 .circle-boy{background-color: rgb(214,105,137);}
#s21 .circle-boy{background-color: rgb(105,96,160);}
#s22 .circle-boy{background-color: rgb(83,129,217);}
#instructions h1{
margin: 0;
font-size: 4.5vw;
font-weight: 900;
color: rgb(246,246,246);
text-shadow: lightgrey 5px 0px 20px;
}
|
niklaslong/Electric-Blanket
|
css/styles.css
|
CSS
|
mit
| 1,243
|
/*
MIT License
Copyright (c) 2022 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import type { I18nState } from '../../utils'
const resources = {
describe_date: {
' complete': ' 完成',
'absolute prefix dateTime': '{{prefix}} {{dateTime}}',
ago: '以前',
'from now': '从现在起',
'is any time': '任意时间',
'is before': '早于',
'is day': '在 {{day}} 这一天',
'is from dateTimeStart until dateTimeEnd':
'从 {{dateTimeStart}} 到 {{dateTimeEnd}}',
'is in month year': '在 {{year}} 年 {{month}} 之内',
'is in the last': '在过去 {{describeInterval}} 之内',
'is in the year year': '在 {{year}} 年之内',
'is interval ago': '在 {{interval}} 之前',
'is intervalStart intervalType for intervalEnd':
'{{intervalType}} 在 {{intervalStart}} 到 {{intervalEnd}} 期间',
'is not null': '不为空值',
'is on dateTime': '在 {{dateTime}} 这一时间',
'is on or after': '等于或晚于',
'is previous unitLabel': '上一 {{unitLabel}}',
'is type unitLabel': '为 {{type}} {{unitLabel}}',
'prefix interval timePassed': '{{prefix}} {{interval}} {{timePassed}}',
'prefix now': '{{prefix}} 现在',
'this startInterval to endInterval':
'此 {{startInterval}} 到 {{endInterval}}',
'value complete unitLabel': '{{value}}{{complete}} {{unitLabel}}',
},
get_months: {
April: '四月',
August: '八月',
December: '十二月',
February: '二月',
January: '一月',
July: '七月',
June: '六月',
March: '三月',
May: '5 月',
November: '十一月',
October: '十月',
September: '九月',
},
get_unit_label: {
'complete day': '完整天',
'complete days': '完整天',
'complete fiscal quarter': '完整财政季度',
'complete fiscal quarters': '完整财政季度',
'complete fiscal year': '完整财政年度',
'complete fiscal years': '完整财政年度',
'complete hour': '完整小时',
'complete hours': '完整小时',
'complete minute': '完整分钟',
'complete minutes': '完整分钟',
'complete month': '完整月',
'complete months': '完整月',
'complete quarter': '完整季度',
'complete quarters': '完整季度',
'complete second': '完整秒',
'complete seconds': '完整秒',
'complete week': '完整周',
'complete weeks': '完整周',
'complete year': '完整年',
'complete years': '完整年',
day: '天',
days: '天',
'fiscal quarter': '财政季度',
'fiscal quarters': '个财政季度',
'fiscal year': '财政年度',
'fiscal years': '个财政年度',
hour: '小时',
hours: '小时',
minute: '分钟',
minutes: '分钟',
month: '月',
months: '个月',
quarter: '季度',
quarters: '个季度',
second: '秒',
seconds: '秒',
week: '周',
weeks: '周',
year: '年',
years: '年',
},
summary: {
'Value required': '必须提供值',
},
}
export const zhCN: I18nState = {
locale: 'zh-CN',
resources: { 'zh-CN': resources },
}
|
looker-open-source/components
|
packages/filter-expressions/src/locales/resources/zh-CN.ts
|
TypeScript
|
mit
| 4,142
|
---
layout: page
title: Blog Home
---
<div class="related">
<ul class="related-posts">
{% for post in site.posts limit:100 %}
<li>
<h3>
<a href="{{ post.url }}">
{{ post.title }}
<small><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time></small>
</a>
</h3>
</li>
{% endfor %}
</ul>
</div>
|
stefanRitter/jspadawan.com
|
index.html
|
HTML
|
mit
| 415
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>ReturnCoin</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2015 The ReturnCoin developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>Click đúp chuột để chỉnh sửa địa chỉ hoặc nhãn dữ liệu</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Tạo một địa chỉ mới</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Sao chép các địa chỉ đã được chọn vào bộ nhớ tạm thời của hệ thống</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-46"/>
<source>These are your ReturnCoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a ReturnCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Verify a message to ensure it was signed with a specified ReturnCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Xóa</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Tập tin tách biệt bởi dấu phẩy (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Nhãn dữ liệu</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Địa chỉ</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(chưa có nhãn)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+35"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-58"/>
<source>ReturnCoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+282"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>Synchronizing with network...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-319"/>
<source>&Overview</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-13"/>
<source>&Receive coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-7"/>
<source>&Send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show information about ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+259"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-256"/>
<source>&Export...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Send coins to a ReturnCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Modify configuration options for ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-202"/>
<source>ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+180"/>
<source>&About ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>&File</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Tabs toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Actions toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+9"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+60"/>
<source>ReturnCoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+75"/>
<source>%n active connection(s) to ReturnCoin network</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+40"/>
<source>Downloaded %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+413"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-403"/>
<source>%n second(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="-312"/>
<source>About ReturnCoin card</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about ReturnCoin card</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+297"/>
<source>%n minute(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Up to date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Catching up...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Last received block was generated %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid ReturnCoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+76"/>
<source>%n second(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+18"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+109"/>
<source>A fatal error occurred. ReturnCoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+90"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+551"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation>Số lượng</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Địa chỉ</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+66"/>
<source>(no label)</source>
<translation>(chưa có nhãn)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+20"/>
<source>New receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid ReturnCoin address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+420"/>
<location line="+12"/>
<source>returncoin-qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start ReturnCoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start ReturnCoin on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Detach databases at shutdown</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the ReturnCoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the ReturnCoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting ReturnCoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show ReturnCoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+55"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+149"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting ReturnCoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+231"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the ReturnCoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-160"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-107"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Total:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-108"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+113"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+348"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the returncoin-qt help message to get a list with possible ReturnCoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>ReturnCoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>ReturnCoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the ReturnCoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-33"/>
<source>Welcome to the ReturnCoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+182"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 hack</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>123.456 hack</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a ReturnCoin address (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>WARNING: Invalid ReturnCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>(chưa có nhãn)</translation>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<location filename="../sendcoinsentry.cpp" line="+25"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to send the payment to (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a ReturnCoin address (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this ReturnCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified ReturnCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a ReturnCoin address (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter ReturnCoin signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+19"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+8"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Số lượng</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-211"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+226"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Địa chỉ</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Số lượng</translation>
</message>
<message>
<location line="+60"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+190"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+55"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+144"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Tập tin tách biệt bởi dấu phẩy (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Nhãn dữ liệu</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Địa chỉ</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Số lượng</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+206"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+33"/>
<source>ReturnCoin version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or returncoind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: ReturnCoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: returncoind.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 15714 or testnet: 25714)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Stake your coins to support network and gain reward (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Detach block and address databases. Increases shutdown time (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Error: Transaction creation failed </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-8"/>
<source>Importing blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Importing bootstrap blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+117"/>
<source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+61"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong ReturnCoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-90"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+83"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-82"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+57"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=ReturnCoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "ReturnCoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+53"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-158"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+95"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot obtain a lock on data directory %s. ReturnCoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-98"/>
<source>ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+140"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart ReturnCoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: could not start node</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Unable to bind to %s on this computer. ReturnCoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-97"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot initialize keypool</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS>
|
ReturnCoin/ReturnCoin
|
src/qt/locale/bitcoin_vi.ts
|
TypeScript
|
mit
| 107,681
|
require 'gyazo/version'
require 'gyazo/error'
require 'gyazo/client'
|
masui/gyazo-ruby
|
lib/gyazo.rb
|
Ruby
|
mit
| 69
|
/**
* description:维修保养
* author: dongooo
* create: 2016-09-18 下午2:38
* php: https://github.com/dongooo
**/
|
dongooo/yonyouAuto
|
yyauto-web/src/main/webapp/webui/src/app/module/maintain/maintain.js
|
JavaScript
|
mit
| 130
|
/* jshint unused:true, undef:true, node:true */
/*
* The lame logger. Standardize the level of message using html tag names
* as logging methods.
*/
var path = require("path");
var util = require("util");
// Just in case colors was not required previously, we need it here.
require("colors");
var argsToArray = function(args) {
return Array.prototype.slice.call(args);
};
/**
* If made truthy, all loggers will display caller information,
* despite their individual settings.
*/
var _globalDisplayCallerInfo = false;
/**
* Turns on, or off, the display of the caller info, globally overriding
* all local settings.
* @param setting {Boolean} If truthy, turns on the display of the
* caller info for all existing loggers. If falsey, turns it off.
*/
module.exports.globalDisplayCallerInfo = function(setting) {
_globalDisplayCallerInfo = (setting) ? true : false;
};
var fmixin = {
/**
* What line number called this logger method?
* NOTE: This method is designed to be called from within a logger
* function and will not work as expected if called outside of the
* logger.
*/
_callerInfo: function() {
if (!this._displayCallerInfo && !_globalDisplayCallerInfo) {
return "";
}
else {
var callerFrame = (new Error()).stack.split('\n')[3];
// Got the line number trick from:
// https://github.com/igo/nlogger
// in the file:
// https://github.com/igo/nlogger/blob/master/lib/nlogger.js
var lineNumber = callerFrame.split(':')[1];
// Made up the filename trick based on the above.
var fileName = path.basename(callerFrame.split(/\(|\:/g)[1]);
return "("+fileName+":"+lineNumber+") ";
}
},
/**
* Turns on, or off, the display of the caller info.
* @param setting {Boolean} If truthy, turns on the display of the
* caller info. If falsey, turns it off.
*/
displayCallerInfo: function(setting) {
this._displayCallerInfo = (setting) ? true : false;
},
/**
* Return the current amount of indentation.
* @return {String} The current indentation.
* @private
*/
_getIndent: function() {
var currentIndent = [];
var i;
for (i = 0; i < this._currentIndent; i++) {
currentIndent[i] = this._singleIndent;
}
return currentIndent.join("");
},
/**
* Pass arg to set to make llogger be quiet (no output) or not.
*/
quiet: function () {
if (!arguments.length) {
return this._quiet;
} else {
this._quiet = arguments[0];
}
},
/**
* Increase the indentation level by one.
*/
indent: function() {
this._currentIndent += 1;
},
/**
* Decrease the indentation level by one (never goes below 0).
*/
dedent: function() {
this._currentIndent -= 1;
if (this._currentIndent < 0) {
this._currentIndent = 0;
}
},
/**
* Print message as a stylized diagnostic section header.
*/
h1: function() {
if (!this.quiet()) {
var prefix = this._callerInfo() + this._getIndent() + "#".magenta.bold;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.toUpperCase().magenta.bold.inverse;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Print message as a stylized diagnostic sub-section header.
*/
h2: function() {
if (!this.quiet()) {
var prefix = this._callerInfo() + this._getIndent() + "##".magenta.bold;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.magenta.bold.inverse;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Print message as a stylized diagnostic sub-sub-section header.
*/
h3: function() {
if (!this.quiet()) {
var prefix = this._callerInfo() + this._getIndent() + "###".magenta.bold;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.magenta.bold;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Print message as a stylized diagnostic sub-sub-sub-section header.
*/
h4: function() {
if (!this.quiet()) {
var prefix = this._callerInfo() + this._getIndent() + "####".magenta.bold;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.magenta.bold;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Print message as a stylized diagnostic sub-sub-sub-sub-section header.
*/
h5: function() {
if (!this.quiet()) {
var prefix = this._callerInfo() + this._getIndent() + "#####".magenta.bold;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.magenta;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Print message as a stylized diagnostic sub-sub-sub-sub-sub-section
* header.
*/
h6: function() {
if (!this.quiet()) {
var prefix = this._callerInfo() + this._getIndent() + "######".magenta.bold;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.toLowerCase().magenta;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Indent message one level in from the current indentation level.
*/
li: function() {
if (!this.quiet()) {
var prefix = this._callerInfo() + this._getIndent() + "*".green;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.green;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Prints out an 80 character horizontal rule.
*/
hr: function() {
if (!this.quiet()) {
var hr = [];
for (var i = 0; i < 79; i++) {
hr[i] = "-";
}
console.log(this._callerInfo() + this._getIndent() + hr.join("").green);
}
},
/**
* Print a regular output message.
* Output is sent through console.log.
* (Output is immune to the indentation rules but will print file info.)
*/
// This will get linked up in the "constructor" function.
//log: baseLogger,
/**
* Print a warning message.
* Output is sent through console.warn.
* (Output is immune to the indentation rules but will print file info.)
*/
warn: function() {
if (!this.quiet()) {
var prefix = this._callerInfo().yellow + "WARNING:".yellow;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.yellow;
}).join(" ");
console.log.call(console, prefix, args);
}
},
/**
* Print an error message.
* Output is sent through console.error.
* (Output is immune to the indentation rules but will print file info.)
*/
error: function() {
if (!this.quiet()) {
var prefix = this._callerInfo().red + "ERROR:".red;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.red;
}).join(" ");
console.log.call(console, prefix, args);
}
},
};
/**
* Create a new logger instance.
*/
module.exports.create = function() {
// Most of this bullshit is because Function.prototype.bind doesn't operate
// like I thought it would when passing a f() as a thisArg.
var self = Object.create(fmixin);
/**
* Should the caller info be displayed with messages or not?
* @type {Boolean}
* @private
*/
self._displayCallerInfo = false;
/**
* What represents a single indentation level?
* @type {String}
* @private
*/
self._singleIndent = " ";
/**
* What is the current indentation level?
* @type {Number}
* @private
*/
self._currentIndent = 0;
/**
* Are we quiet or not?
*/
self._quiet = false;
// Function that also acts as base object / namespace.
// Must be bound before calling
var baseLogger = function() {
if (!self.quiet()) {
var prefix = self._callerInfo().green;
var args = argsToArray(arguments).map(function(a) {
if (typeof a != "string") {
a = util.inspect(a);
}
return a.green;
}).join(" ");
// This is the only one routinely blank.
if (prefix) {
args = prefix + args;
}
console.log.call(console, args);
}
};
for (var prop in fmixin) {
if (fmixin.hasOwnProperty(prop)) {
// Ugh blargl cthulhu cthulhu beetlegeuse.
baseLogger[prop] = fmixin[prop].bind(self);
}
}
baseLogger.log = baseLogger;
// Need to bind here since this function is also used as a generic mixin
// to the prototype.
return baseLogger;
};
|
jeremyosborne/llogger
|
llogger.js
|
JavaScript
|
mit
| 10,299
|
4.3.0 / 2019-09-23
------------------
- Add TypeScript typings ([#30](https://github.com/jprichardson/node-path-extra/pull/30))
4.2.1 / 2017-09-01
------------------
- Added argument type-checking for `fileNameWithPrefix()` & `fileNameWithPostfix()` to prevent unexpected behavior. [#28](https://github.com/jprichardson/node-path-extra/pull/28)
4.2.0 / 2017-06-24
------------------
- Added `fileNameWithPrefix()` & `fileNameWithPostfix()`
4.1.0 / 2017-03-06
------------------
- Added `removeExt()`
4.0.0 / 2016-09-14
------------------
### Breaking
- dropped `homedir()`, `tempdir()`, and `datadir()`
### Added
- `replaceExt()`, `normalizeTrim()`, `base()`
3.0.0 / 2015-11-05
------------------
- fix linux config directory. Bumped major as it could have a breaking change for some modules. https://github.com/jprichardson/node-path-extra/pull/14
2.0.0 / 2015-10-05
------------------
- use env variables https://github.com/jprichardson/node-path-extra/pull/13
1.0.3 / 2015-05-24
------------------
- license fix https://github.com/jprichardson/node-path-extra/pull/11
1.0.2 / 2015-03-02
------------------
- bugfix `path.delimiter` / all properties added
1.0.1 / 2015-03-01
------------------
- bugfix: Windows `datadir()` was incorrect for default, this is breaking, but is a bugfix
1.0.0 / 2015-02-28
------------------
- added `sep` support. See #10
- use `standard` styling
0.3.0 / 2014-09-08
------------------
- add freebsd support
0.2.1 / 2014-06-23
------------------
* fixed npm warning about `homepage` field #6
0.2.0 / 2014-04-28
------------------
* added sunos support #5
0.1.1 / 2013-05-14
------------------
* Windows XP support for datadir
0.1.0 / 2013-03-18
------------------
* Added `datadir()`.
0.0.3 / 2012-08-07
------------------
* Removed CoffeeScript dev dependence.
* Added `homedir()` method.
|
jprichardson/node-path-extra
|
CHANGELOG.md
|
Markdown
|
mit
| 1,842
|
---
layout: post
title: On programming pet projects
joomla_id: 42
joomla_url: on-programming-pet-projects
date: 2011-12-03 11:59:12.000000000 +01:00
author: Joachim van de Haterd
category: Ramblings
tags: [Programming, Nooku]
---
If you stumble upon my little blog, you'll probably notice that I am a web programmer. Although I am wary about mixing work and downtime too much, I am working on a hobby project of mine, using the exact same tools and frameworks that I use for work. This is a great difference compared to my previous job, in which programming actually felt like a punishment. Read on if you want to know what made me change my mind on programming in the weekends.
## On motivation
Actually, I have been considering to do a pet project for about 6 years now. However, my previous job sucked, at first even without me knowing. I had no wish to further my knowledge of programming, and I was seriously considering leaving the IT business altogether. I found another job (again: as a programmer), and found a more productive and healthier environment as well.
At my current workspace, I am actively being encouraged to explore new programming techniques and experiment. If that experimentation is conducted on pet projects, that's fine. I even 'own' my own code. Furthermore, the web is slowly losing the shackles of Internet Explorer and other closed formats such as Flash. HTML5 and CSS3 have risen, Javascript is growing more useful and interesting every day and PHP is actually maturing. Yes, web programming is starting to be fun again.
## The project: a web based running log
I have long wanted to have a better running log tool that I currently have. I currently use LyX, which is a [WYSIWYM document processor](http://www.lyx.org/). I absolutely love the product, but it falls short for my wishes.
### Platform independence
One of them is platform independence. I always carry a laptop or mobile phone on the road. It is a bit silly to wait for me to have to go home to enter my training sessions. Furthermore, some of these data are weather-based. It is generally difficult to retrieve weather data from three days earlier in a place that you rarely visit.
### Views
Although my log still has the look and feel of a diary -or blog if you like-, there is a number of additional views that I want to be able to see. One of these is a table of checkpoints and their laptimes. These can even be put into graphs, to give the user a graphical representation of her progress. Another feature is the ability to export a log to a paper-based format, like PDF. I have a number of other, less well-rounded ideas.
### Web based
This is simply the only feasible way for me to make an application platform independent. Since I am a lazy and/or busy guy, I am not willing to do everything myself, so I am choosing a well-rounded environment that I am familiar with. A CMS is good for a blog- or log-based format, and each CMS already has a decent article manager.
## My weapon of choice: The Nooku framework
I chose to work with a non-standard framework for two reasons: my logging tool has quite some specific wishes and demands, and the CMS that I use (Joomla), has a decent, yet somewhat encumbered framework. The Nooku framework was set up by some of the main developers of Joomla 1.5, and they have given the aging CMS a new heart.
The Nooku framework allows me to rapidly develop added functionality for my web site and web apps. I am actually able to do something useful in those few and far-between hours that I am able to spend on pet programming.
Furthermore, the Nooku framework uses a lot of recent development techniques. I feel that I am actually learning something new while playing with code. You can teach an old dog new tricks.
### The Nooku community
The Nooku community is a friendly one. I have had the pleasure to be welcomed by the people there. The rules are simple, he who contributes, has something to say within the community. Contributions can be done by code, documentation, or helping fellow programmers. Or rambling blog posts such as mine. My Nooku code is still in the Vogon Poetry regions (that is, sane people would cringe), so I will just be spreading the word.
|
derjoachim/derjoachim_nl_v3
|
_posts/2011-12-03-on-programming-pet-projects.markdown
|
Markdown
|
mit
| 4,230
|
using MvvmCross;
using MvvmCross.Plugin;
namespace MvvX.Plugins.OAuthClient
{
[MvxPlugin]
public class Plugin : IMvxPlugin
{
public void Load()
{
Mvx.IoCProvider.RegisterSingleton<IOAuthClient>(new PlatformOAuthClient());
}
}
}
|
mathieumack/MvvX.Plugins.OauthClient
|
MvvX.Plugins.OAuthClient/platforms/android/Plugin.cs
|
C#
|
mit
| 280
|
# frozen_string_literal: true
# This class extends an OpenStruct object by adding predicate methods to mimic
# ActiveRecord access. We rely on the initial values being true or false to
# determine whether to define a predicate method because for a newly-added
# column that has not been migrated yet, there is no way to determine the
# column type without parsing db/structure.sql.
module Gitlab
class FakeApplicationSettings < OpenStruct
include ApplicationSettingImplementation
# Mimic ActiveRecord predicate methods for boolean values
def self.define_predicate_methods(options)
options.each do |key, value|
next if key.to_s.end_with?('?')
next unless [true, false].include?(value)
define_method "#{key}?" do
actual_key = key.to_s.chomp('?')
self[actual_key]
end
end
end
def initialize(options = {})
super
FakeApplicationSettings.define_predicate_methods(options)
end
alias_method :read_attribute, :[]
alias_method :has_attribute?, :[]
end
end
Gitlab::FakeApplicationSettings.prepend_if_ee('EE::Gitlab::FakeApplicationSettings')
|
mmkassem/gitlabhq
|
lib/gitlab/fake_application_settings.rb
|
Ruby
|
mit
| 1,150
|
package com.home.pori.demo_proj_01;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.home.pori.demo_proj_01", appContext.getPackageName());
}
}
|
subhamoykarmakar224/GREQuant
|
DEMO_PROJ_01/app/src/androidTest/java/com/home/pori/demo_proj_01/ExampleInstrumentedTest.java
|
Java
|
mit
| 756
|
<!-- ####### -->
<!-- Content -->
<!-- ####### -->
<main>
<div class="main-content">
<!-- ###### -->
<!-- Header -->
<!-- ###### -->
<div class="row">
<div class="col s12">
<div class="page-header">
<h1>
<i class="medium material-icons">shop_two</i> POSTULATE
</h1>
<p>Llena toda la infomación necesaria</p>
</div>
</div>
</div>
<!-- #### -->
<!-- Body -->
<!-- #### -->
<section id="apps_crud_form">
<div class="crud-app">
<div class="fixed-action-btn">
<a class="btn-floating btn-large tooltipped" data-tooltip="Regresar" data-position="top" data-delay="50" href="<?= base_url().'bolsatrabajo/alka' ?>">
<i class="large material-icons">undo</i>
</a>
<button class="btn-floating btn-large white tooltipped scrollToTop" data-tooltip="Scroll to top" data-position="top" data-delay="50">
<i class="large material-icons">keyboard_arrow_up</i>
</button>
</div>
<?php echo form_open_multipart('bolsatrabajo/postulate_alka/' . $this->uri->segment(3));?>
<?php
$datos = $this->session->userdata('usuario');
if($datos['template'] == 'alka'){
$correo = $datos['Correo'];
$nombre = ucwords($datos['Nombre']. ' ' .$datos['Apellido']);
}else if($datos['template'] == 'avante'){
$correo = $datos['email'];
$nom = explode(" ", $datos['displayname']);
$nombre = ucwords($nom[0]);
}
$data = array(
'nombre' => $nombre,
'correo' => $correo,
'vacantes_id' => $this->uri->segment(3)
);
echo form_hidden($data);
?>
<div class="row">
<div class="col s12 m8">
<?php
$msg = $this->session->flashdata('msg');
if ($msg){
echo $msg;
}
?>
<div class="panel panel-bordered">
<div class="panel-body">
<div class="row no-gutter">
<div class="input-field col s6">
<h5><?= $nombre ?></h5>
</div>
<div class="input-field col s6"></div>
</div>
<div class="row no-gutter">
<div class="input-field col s6">
<input name="depto" id="depto" type="text" value="<?= $this->input->post('depto') ?>">
<label for="depto">Departamento Actual</label>
<?php echo form_error('depto'); ?>
</div>
<div class="input-field col s6">
<input name="puesto" id="puesto" type="text" value="<?= $this->input->post('puesto') ?>">
<label for="puesto">Puesto Actual</label>
<?php echo form_error('puesto'); ?>
</div>
</div>
<div class="row no-gutter">
<div class="input-field col s2">
<input name="ext" id="ext" type="text" value="<?= $this->input->post('ext') ?>">
<label for="ext">Extensión</label>
<?php echo form_error('ext'); ?>
</div>
<div class="input-field col s6"></div>
</div>
<div class="row no-gutter">
<div class="input-field col s10">
<div class="file-field input-field">
<div class="btn">
<span>CV</span>
<input type="file" name="userfile[]">
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text">
<small>Solo adminte PDF, DOC, TXT</small>
<?php echo form_error('userfile[]'); ?>
</div>
</div>
</div>
<div class="input-field col s2">
</div>
</div>
</div>
<div class="panel-footer">
<div class="right-align">
<button type="reset" class="btn-flat waves-effect">
BORRAR
</button>
<button type="submit" class="btn-flat waves-effect">
ENVIAR
</button>
</div>
</div>
</div>
</div>
</div>
<?= form_close() ?>
</div>
</section>
</div>
</main>
|
si-quimera/avante
|
application/views/bolsa_trabajo/alka/postulate.php
|
PHP
|
mit
| 8,109
|
#pragma config(Hubs, S1, HTMotor, HTMotor, HTMotor, none)
#pragma config(Hubs, S4, HTServo, none, none, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Sensor, S4, , sensorI2CMuxController)
#pragma config(Motor, motorA, , tmotorNXT, openLoop)
#pragma config(Motor, motorB, , tmotorNXT, openLoop)
#pragma config(Motor, motorC, , tmotorNXT, openLoop)
#pragma config(Motor, mtr_S1_C1_1, liftMotor, tmotorTetrix, openLoop, encoder)
#pragma config(Motor, mtr_S1_C1_2, motorFL, tmotorTetrix, openLoop, driveLeft)
#pragma config(Motor, mtr_S1_C2_1, motorBR, tmotorTetrix, openLoop, reversed, driveRight, encoder)
#pragma config(Motor, mtr_S1_C2_2, motorFR, tmotorTetrix, openLoop, reversed, driveRight)
#pragma config(Motor, mtr_S1_C3_1, motorBL, tmotorTetrix, openLoop, driveLeft, encoder)
#pragma config(Motor, mtr_S1_C3_2, motorI, tmotorTetrix, openLoop)
#pragma config(Servo, srvo_S4_C1_1, lServo, tServoStandard)
#pragma config(Servo, srvo_S4_C1_2, rServo, tServoStandard)
#pragma config(Servo, srvo_S4_C1_3, servo3, tServoNone)
#pragma config(Servo, srvo_S4_C1_4, servo4, tServoNone)
#pragma config(Servo, srvo_S4_C1_5, servo5, tServoNone)
#pragma config(Servo, srvo_S4_C1_6, servo6, tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
/*#include <ir.h>
#include <move.h>
#include <Autonomous.h>*/
task main()
{
/*
irInit(1200);
while (true) {
float mag = getIRMagnitude();
displayStringAt(10,20,"%f",mag);
displayStringAt(10,10,"%f",irSeekerData.acDirection);
readSensor(&irSeekerData);
}
displayStringAt(10,30,"R");
displayStringAt(10,10,"L");
moveRobot5(12*10);
// 36403 36295
//moveRobot5(-12*10);
stopRobot();
wait10Msec(1000);
// moveRobot2(48);
/*int i;
irInit(1200);
i = detectFieldLayoutByMagnitude();
while (true) {
float mag = getIRMagnitude();
displayStringAt(10,20,"%f",mag);
displayStringAt(10,10,"%f",irSeekerData.acDirection);
readSensor(&irSeekerData);
displayStringAt(10,30,"%i",i);
}*/
motor[motorBL] = 50;
motor[motorBR] = 50;
motor[motorFL] = 50;
motor[motorFR] = 50;
motor[liftMotor] = 50;
wait1Msec(10000);
}
|
lightning-robotics/FTC-Cascade-Effect
|
Project/Movement/test.c
|
C
|
mit
| 2,512
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>18 --> 19</title>
<link href="./../../assets/style.css" rel="stylesheet">
</head>
<body>
<h2>You have to be fast</h2>
<a href="./5d360ab0674062fcc644f37795e27b8c2546d400182dd5ad4909f1d3ee8372ce.html">Teleport</a>
<hr>
<a href="./../../about.md">About</a> (Spoilers! )
<script src="./../../assets/md5.js"></script>
<script>
window.currentLevel = 7;
</script>
<script src="./../../assets/script.js"></script>
</body>
</html>
|
simonmysun/praxis
|
TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/6ae5828a81a3fe7940ffd7d34292506ce45762ef852c72d6bb4ee22aef6b6916.html
|
HTML
|
mit
| 550
|
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1">
<title>Navigation Menu with Element Queries</title>
<meta name="description" content="Bootstrap-free lightweight mobile-friendly nav menu with dropdowns you can use for adding navigation to a page. Built with HTML and EQCSS, which is CSS with Element Queries. This navigation will adapt responsively to whatever page layout you add it to. For more info: http://elementqueries.com">
<meta name="keywords" content="EQCSS, element queries, element query, container queries, responsive, mobile menu, mobile friendly, nav">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic" rel=stylesheet>
<style>
/* Global Menu Styles */
@element .eqNav {
html {
opacity: 1;
}
body {
margin: 0;
}
:self * {
box-sizing: border-box;
-moz-box-sizing: border-box;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', 'Open Sans', Roboto, 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', 'Myriad Pro', 'Segoe UI', Myriad, Helvetica, Arial, 'Lucida Grande', sans-serif;
font-kerning: auto;
outline: none;
}
:self {
background: #333;
}
:self .brand {
display: block;
color: #fff;
font-weight: 600;
text-decoration: none;
padding: .5em;
font-size: 140%;
position: relative;
}
:self input {
display: none;
}
:self label {
display: block;
position: relative;
}
:self label span,
:self label > div a {
display: block;
padding: 1em;
color: #fff;
font-size: 100%;
font-weight: 400;
text-decoration: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
cursor: pointer;
z-index: 3000;
position: relative;
transition: color .1s ease-in-out;
}
:self label span:hover,
:self label span:focus,
:self a:hover,
:self a:focus {
color: #f0c;
}
:self label > div a {
padding: 1em 1em 0 1em;
}
:self label > div a:last-child {
padding-bottom: 1em;
}
:self input + label > div {
display: none;
background: #333;
position: relative;
width: 100%;
right: 0;
z-index: 3000;
transition: all .5s ease-in-out;
}
:self input:checked + label {
background: #333;
}
:self input:checked + label span {
color: #cf0;
z-index: 100;
}
:self input:checked + label > div {
display: block;
z-index: 3000;
}
:self input:checked ~ label[for="reset"] {
opacity: 1;
pointer-events: all;
background: transparent;
}
:self label[for="reset"] {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
z-index: 2000;
opacity: 0;
background: transparent;
transition: all .2s ease-in-out;
pointer-events: none;
}
:self input#reset:checked + label {
opacity: 0;
pointer-events: none;
}
}
/* Mobile Menu View */
@element .eqNav and (max-width: 499px) {
:self {
text-align: center;
}
:self label[for="menu"] {
display: inline-block;
width: auto;
position: absolute;
top: 0;
right: 0;
}
:self label[for="menu"] span {
display: inline-block;
font-size: 200%;
padding: .2em .5em;
text-align: center;
z-index: 3000;
}
:self input#menu:checked + label span {
color: #cf0;
}
:self input[type="radio"] + label {
display: none;
}
:self input#menu:checked ~ input[type="radio"] + label,
:self input#menu:checked ~ input[type="radio"]:checked ~ label[for="reset"] {
display: block;
}
:self input#menu:checked ~ input[type="radio"] + label[for="reset"] {
display: none;
}
}
/* Desktop Menu View */
@element .eqNav and (min-width: 500px) {
:self {
text-align: right;
max-height: auto !important;
overflow: visible;
}
:self .brand {
display: inline-block;
float: left;
}
:self label[for="menu"] {
display: none;
}
:self input + label > div {
display: none;
background: #333;
position: absolute;
width: auto;
min-width: 200px;
max-width: 500px;
word-break: normal;
right: 0;
text-align: left;
z-index: 3000;
transition: all .5s ease-in-out;
}
:self:before {
display: none;
}
:self label {
display: inline-block;
}
}
</style>
</head>
<body>
<nav class="eqNav">
<a href="#" class="brand">responsive nav</a>
<input type="checkbox" id="menu">
<label for="menu"><span>≡</span></label>
<!-- Menu Loop -->
<input type="radio" name="eqNav" id="one" value="one">
<label for="one">
<span>One</span>
<div>
<a href="#">link a</a>
<a href="#">link b</a>
<a href="#">link c</a>
</div>
</label>
<input type="radio" name="eqNav" id="two" value="two">
<label for="two">
<span>Two</span>
<div>
<a href="#">link d</a>
<a href="#">link f</a>
<a href="#">link g</a>
</div>
</label>
<input type="radio" name="eqNav" id="three" value="three">
<label for="three">
<span>Three</span>
<div>
<a href="#">link h</a>
<a href="#">link i</a>
<a href="#">link j</a>
</div>
</label>
<!-- /Menu Loop -->
<input type="radio" name="eqNav" id="reset">
<label for="reset"></label>
</nav>
<!--[if lt IE 9]><script src=../EQCSS-polyfills.min.js></script><![endif]-->
<script src=../EQCSS.min.js></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-76690105-1','auto');
ga('send','pageview');
</script>
</body>
</html>
|
eqcss/eqcss
|
demos/nav.html
|
HTML
|
mit
| 6,891
|
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CTEBeamRing | demofile</title>
<meta name="description" content="Documentation for demofile">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">demofile</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/_sendtabletypes_.html">"sendtabletypes"</a>
</li>
<li>
<a href="_sendtabletypes_.ctebeamring.html">CTEBeamRing</a>
</li>
</ul>
<h1>Interface CTEBeamRing</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">CTEBeamRing</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="_sendtabletypes_.ctebeamring.html#dt_basebeam" class="tsd-kind-icon">DT_<wbr><wbr>Base<wbr>Beam</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="_sendtabletypes_.ctebeamring.html#dt_tebeamring" class="tsd-kind-icon">DT_<wbr>TEBeam<wbr>Ring</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="dt_basebeam" class="tsd-anchor"></a>
<h3>DT_<wbr><wbr>Base<wbr>Beam</h3>
<div class="tsd-signature tsd-kind-icon">DT_<wbr><wbr>Base<wbr>Beam<span class="tsd-signature-symbol">:</span> <a href="_sendtabletypes_.dt_basebeam.html" class="tsd-signature-type">DT_BaseBeam</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/saul/demofile/blob/b4d2298/src/sendtabletypes.ts#L13866">src/sendtabletypes.ts:13866</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="dt_tebeamring" class="tsd-anchor"></a>
<h3>DT_<wbr>TEBeam<wbr>Ring</h3>
<div class="tsd-signature tsd-kind-icon">DT_<wbr>TEBeam<wbr>Ring<span class="tsd-signature-symbol">:</span> <a href="_sendtabletypes_.dt_tebeamring.html" class="tsd-signature-type">DT_TEBeamRing</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/saul/demofile/blob/b4d2298/src/sendtabletypes.ts#L13867">src/sendtabletypes.ts:13867</a></li>
</ul>
</aside>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class="current tsd-kind-module">
<a href="../modules/_sendtabletypes_.html">"sendtabletypes"</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-module">
<a href="_sendtabletypes_.ctebeamring.html" class="tsd-kind-icon">CTEBeam<wbr>Ring</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="_sendtabletypes_.ctebeamring.html#dt_basebeam" class="tsd-kind-icon">DT_<wbr><wbr>Base<wbr>Beam</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="_sendtabletypes_.ctebeamring.html#dt_tebeamring" class="tsd-kind-icon">DT_<wbr>TEBeam<wbr>Ring</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>
|
saul/demofile
|
docs/interfaces/_sendtabletypes_.ctebeamring.html
|
HTML
|
mit
| 7,657
|
import {expect} from "chai";
import Sinon from "sinon";
import {CLASS_STORE, descriptorOf, Metadata, METHOD_STORE, PARAM_STORE, PROPERTY_STORE, prototypeOf, Store} from "../../src";
class FakeMetadata {
attr1: any;
attr2: any;
constructor(public target: any) {}
test() {
return this.target;
}
}
class SuperFake extends FakeMetadata {}
describe("Store", () => {
describe("constructor", () => {
describe("when metadata should be store on class", () => {
let spyGet: any, store: any, store2: any, store3: any;
before(() => {
spyGet = Sinon.spy(Metadata, "getOwn");
store = Store.from(FakeMetadata);
store2 = Store.from(FakeMetadata);
store3 = Store.from(class {});
store.set("keyTest", {test: "2"});
});
after(() => {
spyGet.restore();
});
it("should have been called the Metadata.get()", () => {
expect(spyGet).to.have.been.calledWithExactly(CLASS_STORE, FakeMetadata);
});
it("should share the same StoreMap when the signature is equals", () => {
expect(store.get("keyTest")).to.eq(store2.get("keyTest"));
});
it("should not share the same StoreMap when the signature is not equals", () => {
expect(store.get("keyTest")).not.to.eq(store3.get("keyTest"));
});
});
describe("when metadata should be store on method", () => {
let spyGet: any, store: any;
before(() => {
spyGet = Sinon.spy(Metadata, "getOwn");
store = Store.from(FakeMetadata, "get", {
value: () => {}
});
});
after(() => {
spyGet.restore();
});
it("should have been called the Metadata.get()", () => {
expect(spyGet).to.have.been.calledWithExactly(METHOD_STORE, FakeMetadata, "get");
});
});
describe("when metadata should be store on property (1)", () => {
let spyGet: any, store: any;
before(() => {
spyGet = Sinon.spy(Metadata, "getOwn");
store = Store.from(FakeMetadata, "get");
});
after(() => {
spyGet.restore();
});
it("should have been called the Metadata.get()", () => {
expect(spyGet).to.have.been.calledWithExactly(PROPERTY_STORE, FakeMetadata, "get");
});
});
describe("when metadata should be store on property (2)", () => {
let spyGet: any, store: any;
before(() => {
spyGet = Sinon.spy(Metadata, "getOwn");
store = Store.from(FakeMetadata, "get", {
set: () => {}
});
});
after(() => {
spyGet.restore();
});
it("should have been called the Metadata.get()", () => {
expect(spyGet).to.have.been.calledWithExactly(PROPERTY_STORE, FakeMetadata, "get");
});
});
describe("when metadata should be store on property (3)", () => {
let spyGet: any, store: any;
before(() => {
spyGet = Sinon.spy(Metadata, "getOwn");
store = Store.from(FakeMetadata, "get", {
get: () => {}
});
});
after(() => {
spyGet.restore();
});
it("should have been called the Metadata.get()", () => {
expect(spyGet).to.have.been.calledWithExactly(PROPERTY_STORE, FakeMetadata, "get");
});
});
describe("when metadata should be store on parameters", () => {
let spyGet: any, store: any;
before(() => {
spyGet = Sinon.spy(Metadata, "getOwn");
store = Store.from(FakeMetadata, "get", 0);
});
after(() => {
spyGet.restore();
});
it("should have been called the Metadata.get()", () => {
expect(spyGet).to.have.been.calledWithExactly(PARAM_STORE, FakeMetadata, "get");
});
});
});
describe("set()", () => {
let store: any;
before(() => {
store = Store.from(FakeMetadata);
store.set("key", {});
});
it("should add a metadata", () => {
expect(store.get("key")).to.deep.equal({});
});
});
describe("has()", () => {
let store: any;
before(() => {
store = Store.from(FakeMetadata);
});
it("should return true if class is known", () => {
expect(store.has("key")).to.be.true;
});
it("should return false if class is unknown", () => {
expect(store.has("key2")).to.be.false;
});
});
describe("delete()", () => {
let store: any;
before(() => {
store = Store.from(FakeMetadata);
});
it("should remove key", () => {
store.set("key", {test: true});
expect(store.get("key")).to.deep.equal({test: true});
store.delete("key");
expect(store.get("key")).to.equal(undefined);
});
});
describe("merge()", () => {
let store: any;
before(() => {
store = Store.from(FakeMetadata);
store.merge("key3", {attr1: 1});
store.merge("key3", {attr2: 2});
});
it("should merge metadata", () => {
expect(store.get("key3")).to.deep.equal({attr1: 1, attr2: 2});
});
});
describe("inheritance", () => {
let r1: any, r2: any;
before(() => {
Store.from(FakeMetadata).set("sc", {test: "test"});
Store.from(SuperFake).set("sc", {test: "test2"});
r1 = Store.from(SuperFake).get("sc");
r2 = Store.from(FakeMetadata).get("sc");
});
it("should haven't the same sc", () => {
expect(r1).to.not.deep.equal(r2);
});
});
describe("from()", () => {
it("should create a store from Symbol", () => {
// GIVEN
const TOKEN = Symbol.for("token");
const TOKEN2 = Symbol.for("token2");
const store1 = Store.from(TOKEN);
const store2 = Store.from(TOKEN);
const store3 = Store.from(TOKEN2);
// WHEN
store1.set("test", "value");
expect(store2.get("test")).to.eq("value");
expect(store3.get("test")).to.eq(undefined);
});
});
});
|
Romakita/ts-express-decorators
|
packages/core/src/domain/Store.spec.ts
|
TypeScript
|
mit
| 5,880
|
package dorp
import (
"errors"
"fmt"
"io"
"golang.org/x/crypto/nacl/secretbox"
)
// A SetMessage is the Go representation of the JSON message
// sent to set states
type SetMessage struct {
DoorState string
LightState string
}
// A State is a binary condition of the door or lights.
type State byte
//go:generate stringer -type=State
// Positive and Negative are the two possible states
const (
Negative State = iota
Positive
)
// ErrWrongNumberOfStates may be returned if a function takes a slice of states
// and got the wrong number. This probably will only occur deserializing network data.
var ErrWrongNumberOfStates = errors.New("incorrect state count")
// GenerateNonce creats a 24 byte nonce from the source of randomness rand
func GenerateNonce(rand io.Reader) ([24]byte, error) {
var nonce [24]byte
var n int
for i := 0; i < 3; i++ {
n, _ = rand.Read(nonce[:])
if n == 24 {
break
}
}
if n != 24 {
return nonce, fmt.Errorf("encrypt: unable to read 24 random bytes for nonce (read %d)", n)
}
return nonce, nil
}
// KeyToByteArray converts a key to the [32]bytes required by nacl.secretbox
func KeyToByteArray(key string) ([32]byte, error) {
var k [32]byte
if len(key) != 32 {
return k, fmt.Errorf("Key must be 32 bytes (characters) long")
}
n := copy(k[:], []byte(key))
if n != 32 {
return k, fmt.Errorf("Copying key failed")
}
return k, nil
}
// ProcessNonceMessage takes the message from the server and the shared key
// and returns the next nonce the server expects
func ProcessNonceMessage(message *[64]byte, key *[32]byte) (*[24]byte, error) {
var nonce [24]byte
copy(nonce[:], message[64-24:])
var nextNonce []byte
var ok bool
nextNonce, ok = secretbox.Open(nextNonce, message[:64-24], &nonce, key)
if !ok {
return nil, fmt.Errorf("Unable to open box")
}
n := copy(nonce[:], nextNonce)
if n != 24 {
return nil, fmt.Errorf("Recvd nonce has incorrect length")
}
return &nonce, nil
}
// Thought of a haiku
// I may as well leave it here
// To be found by you
|
millere/dorp
|
dorp.go
|
GO
|
mit
| 2,034
|
# Release Notes für ECceresA
## v1.0.0
### Hinzugefügt
[Weitere Informationen](https://developers.plentymarkets.com/marketplace/plugin-requirements#marketplace-changelog)
|
pixel-21/ECceresA
|
meta/documents/changelog_de.md
|
Markdown
|
mit
| 174
|
package com.mczal.nb.controller;
import com.mczal.nb.dto.InputSetDtoRequest;
import com.mczal.nb.service.hdfs.HdfsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Created by mczal on 08/03/17.
*/
@Controller
@RequestMapping(InputSetController.ABSOLUTE_PATH)
public class InputSetController {
public static final String ABSOLUTE_PATH = "/admin/input-set";
private static final String LAYOUTS_ADMIN = "layouts/admin";
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private HdfsService hdfsService;
@Value("${hdfs.input.regex}")
private String regex;
@RequestMapping({"", "/"})
public String index(Model model) throws Exception {
return "redirect:" + ABSOLUTE_PATH + "/both";
}
@RequestMapping("/both")
public String indexBoth(Model model) throws Exception {
// return "redirect:/admin/home";
model.addAttribute("view", "input-set-both");
model.addAttribute("inputSet", new InputSetDtoRequest());
// logger.info("listInputDirOnPath(): " + hdfsService.listInputDirOnPath().toString());
model.addAttribute("availableDirs", hdfsService.listInputDirOnPath());
return LAYOUTS_ADMIN;
}
@RequestMapping("/infoonly")
public String indexInfoOnly(Model model) throws Exception {
// return "redirect:/admin/home";
model.addAttribute("view", "input-set-infoonly");
model.addAttribute("inputSet", new InputSetDtoRequest());
// logger.info("listInputDirOnPath(): " + hdfsService.listInputDirOnPath().toString());
model.addAttribute("availableDirs", hdfsService.listInputDirOnPath());
return LAYOUTS_ADMIN;
}
@RequestMapping("/inputonly")
public String indexInputOnly(Model model) throws Exception {
// return "redirect:/admin/home";
model.addAttribute("view", "input-set-inputonly");
model.addAttribute("inputSet", new InputSetDtoRequest());
// logger.info("listInputDirOnPath(): " + hdfsService.listInputDirOnPath().toString());
model.addAttribute("availableDirs", hdfsService.listInputDirOnPath());
return LAYOUTS_ADMIN;
}
@RequestMapping(method = RequestMethod.POST,
value = "")
public String postFile(Model model, InputSetDtoRequest inputSetDtoRequest,
RedirectAttributes redirectAttributes) throws Exception {
// logger.info(inputSetDtoRequest.toString());
if (inputSetDtoRequest.getFilesInput().length == 0
|| inputSetDtoRequest.getFilesInfo().length == 0
|| inputSetDtoRequest.getTypes().size() == 0 || inputSetDtoRequest.getClazz().size() == 0) {
redirectAttributes.addFlashAttribute("danger", "File error on upload files");
return "redirect:" + ABSOLUTE_PATH;
}
String modelDir;
if (inputSetDtoRequest.getModelDirSelect().equals("null")) {
if (inputSetDtoRequest.getModelDir() == null || inputSetDtoRequest.getModelDir().trim()
.equals("")) {
redirectAttributes.addFlashAttribute("danger", "Error upload new file");
return "redirect:" + ABSOLUTE_PATH;
} else {
modelDir = inputSetDtoRequest.getModelDir();
hdfsService.cleanHdfsDir(modelDir);
}
} else {
modelDir = inputSetDtoRequest.getModelDirSelect();
}
BufferedReader brInfo = new BufferedReader(
new InputStreamReader(inputSetDtoRequest.getFilesInfo()[0].getInputStream()));
int countCols = hdfsService
.transformAndTransferInfoToHdfsInfo(brInfo, inputSetDtoRequest.getClazz(),
inputSetDtoRequest.getTypes(), modelDir);
// logger.info(
// "inputSetDtoRequest.getFilesInput().length = " + inputSetDtoRequest.getFilesInput().length);
AtomicInteger atomicInteger = new AtomicInteger(1);
Arrays.stream(inputSetDtoRequest.getFilesInput()).forEach(multipartFile -> {
// logger.info("FileName: " + multipartFile.getOriginalFilename());
try {
BufferedReader brInput =
new BufferedReader(new InputStreamReader(multipartFile.getInputStream()));
BufferedReader brInputLines =
new BufferedReader(new InputStreamReader(multipartFile.getInputStream()));
AtomicInteger totalLinesAtomic = new AtomicInteger(0);
brInputLines.lines().forEach(s -> {
totalLinesAtomic.incrementAndGet();
});
int totalLines = totalLinesAtomic.get();
hdfsService.transportToHdfs(brInput, modelDir, atomicInteger.getAndIncrement(),
inputSetDtoRequest.getPercentage(), totalLines, countCols);
} catch (Exception e) {
e.printStackTrace();
}
});
// BufferedReader brInput = new BufferedReader(
// new InputStreamReader(inputSetDtoRequest.getFilesInput()[0].getInputStream()));
// hdfsService.transportToHdfs(brInput, inputSetDtoRequest.getModelDir());
redirectAttributes.addFlashAttribute("success", "Success upload new file to HDFS");
return "redirect:" + ABSOLUTE_PATH;
}
@RequestMapping(method = RequestMethod.POST,
value = "/infoonly")
public String postInfoOnly(Model model, InputSetDtoRequest inputSetDtoRequest,
RedirectAttributes redirectAttributes) throws Exception {
if (inputSetDtoRequest.getFilesInput() != null || inputSetDtoRequest.getFilesInfo().length == 0
|| inputSetDtoRequest.getTypes().size() == 0 || inputSetDtoRequest.getClazz().size() == 0) {
redirectAttributes.addFlashAttribute("danger", "File error on upload files");
return "redirect:" + ABSOLUTE_PATH;
}
String modelDir;
if (inputSetDtoRequest.getModelDirSelect().equals("null")) {
if (inputSetDtoRequest.getModelDir() == null || inputSetDtoRequest.getModelDir().trim()
.equals("")) {
redirectAttributes.addFlashAttribute("danger", "Error upload new file");
return "redirect:" + ABSOLUTE_PATH + "/infoonly";
} else {
modelDir = inputSetDtoRequest.getModelDir();
hdfsService.cleanHdfsDir(modelDir);
}
} else {
modelDir = inputSetDtoRequest.getModelDirSelect();
}
BufferedReader brInfo = new BufferedReader(
new InputStreamReader(inputSetDtoRequest.getFilesInfo()[0].getInputStream()));
int countCols = hdfsService
.transformAndTransferInfoToHdfsInfo(brInfo, inputSetDtoRequest.getClazz(),
inputSetDtoRequest.getTypes(), modelDir);
redirectAttributes.addFlashAttribute("success", "Success upload info file");
return "redirect:" + ABSOLUTE_PATH + "/infoonly";
}
@RequestMapping(method = RequestMethod.POST,
value = "/inputonly")
public String postInputOnly(Model model, InputSetDtoRequest inputSetDtoRequest,
RedirectAttributes redirectAttributes) throws Exception {
if (inputSetDtoRequest.getFilesInput().length == 0
|| inputSetDtoRequest.getFilesInfo().length == 0 || inputSetDtoRequest.getTypes().size() > 0
|| inputSetDtoRequest.getClazz().size() > 0) {
redirectAttributes.addFlashAttribute("danger", "File error on upload files");
logger.error("Error");
logger.error("inputlength: " + inputSetDtoRequest.getFilesInput().length);
logger.error("infolength: " + inputSetDtoRequest.getFilesInfo().length);
logger.error("typesSize: " + inputSetDtoRequest.getTypes().size());
logger.error("clazzSize: " + inputSetDtoRequest.getClazz().size());
return "redirect:" + ABSOLUTE_PATH + "/inputonly";
}
String modelDir;
if (inputSetDtoRequest.getModelDirSelect().equals("null")) {
if (inputSetDtoRequest.getModelDir() == null || inputSetDtoRequest.getModelDir().trim()
.equals("")) {
redirectAttributes.addFlashAttribute("danger", "Error upload new file");
return "redirect:" + ABSOLUTE_PATH;
} else {
modelDir = inputSetDtoRequest.getModelDir();
hdfsService.cleanHdfsDir(modelDir);
}
} else {
modelDir = inputSetDtoRequest.getModelDirSelect();
}
BufferedReader brInfo = new BufferedReader(
new InputStreamReader(inputSetDtoRequest.getFilesInfo()[0].getInputStream()));
int countCols = (int) brInfo.lines().findFirst().get().split(regex).length;
AtomicInteger atomicInteger = new AtomicInteger(1);
Arrays.stream(inputSetDtoRequest.getFilesInput()).forEach(multipartFile -> {
// logger.info("FileName: " + multipartFile.getOriginalFilename());
try {
BufferedReader brInput =
new BufferedReader(new InputStreamReader(multipartFile.getInputStream()));
BufferedReader brInputLines =
new BufferedReader(new InputStreamReader(multipartFile.getInputStream()));
AtomicInteger totalLinesAtomic = new AtomicInteger(0);
brInputLines.lines().forEach(s -> {
totalLinesAtomic.incrementAndGet();
});
int totalLines = totalLinesAtomic.get();
hdfsService.transportToHdfs(brInput, modelDir, atomicInteger.getAndIncrement(),
inputSetDtoRequest.getPercentage(), totalLines, countCols);
} catch (Exception e) {
e.printStackTrace();
}
});
redirectAttributes.addFlashAttribute("success", "Success upload input file");
return "redirect:" + ABSOLUTE_PATH + "/inputonly";
}
}
|
mczal/spring-naivebayes
|
src/main/java/com/mczal/nb/controller/InputSetController.java
|
Java
|
mit
| 9,792
|
// setup global chai methods
import { expect } from 'chai'
import Vue from 'vue/dist/vue.common'
import VueTouch from '../helpers/vue-touch'
import {
createFromTemplate,
isEnabled,
isDisabled,
allDisabled
} from '../helpers'
describe('VueTouch.enabledProps', () => {
beforeEach(() => {
Vue.use(VueTouch)
})
it('prop is true by default & events are enabled', () => {
const vt = createFromTemplate(`
<v-touch
@tap="cb"
@swipe="cb"
/>
`)
const propEnabled = vt.enabled
expect(propEnabled).to.be.true
const rcEnabled = isEnabled(vt, 'tap')
expect(rcEnabled).to.be.true
})
it('all rcg disabled when enabled="false"', () => {
const vt = createFromTemplate(`
<v-touch
v-bind:enabled="false"
v-on:tap="cb"
v-on:swipe="cb"
/>
`)
expect(vt.enabled).to.be.false
const areAllDisabled = allDisabled(vt)
expect(areAllDisabled).to.be.true
})
it('Passing obj to enabled prop correctly toggles recognizers', () => {
const vt = createFromTemplate(`
<v-touch
v-bind:enabled="{ tap: true, swipe: false }"
v-on:tap="cb"
v-on:swipe="cb"
/>
`)
vt.$nextTick()
.then(() => {
const tapEnabled = isEnabled(vt, 'tap')
const swipeDisabled = isDisabled(vt, 'swipe')
expect(tapEnabled && swipeDisabled).to.be.true
})
.then(() => {
vt.updateEnabled({ tap: false, swipe: true })
return vt.$nextTick()
})
.then(() => {
const tapDisabled = isDisabled(vt, 'tap')
const swipeEnabled = isEnabled(vt, 'swipe')
expect(tapDisabled && swipeEnabled).to.be.true
})
})
})
|
whjvenyl/vue-touch-next
|
test/specs/enabledProps.js
|
JavaScript
|
mit
| 1,679
|
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="layoutclass_pic"><div class="layoutclass_first_pic"><table class="ztable"><tr><th class="ztd1"><b>成語 </b></th><td class="ztd2">脫口成章</td></tr>
<tr><th class="ztd1"><b>典源 </b></th><td class="ztd2"> 此處所列為「<a href="/cgi-bin/cydic/gsweb.cgi?o=dcydic&schfmt=text&gourl=%3De0%26sec%3Dsec1%26op%3Dsid%3D%22CW0000001322%22.%26v%3D-1" class="clink" target=_blank>出口成章</a>」之典源,提供參考。</font> <font class="dianuan_mark">《詩經.小雅.都人士》</font><br>彼都<font size=-2 color="#999900"><font class="dianyuanfont"><b><i>1></i></b></font></font>人士,狐裘黃黃<font size=-2 color="#999900"><font class="dianyuanfont"><b><i>2></i></b></font></font>。其容不改<font size=-2 color="#999900"><font class="dianyuanfont"><b><i>3></i></b></font></font>,出言有章。行歸于周<font size=-2 color="#999900"><font class="dianyuanfont"><b><i>4></i></b></font></font>,萬民所望<font size=-2 color="#999900"><font class="dianyuanfont"><b><i>5></i></b></font></font>。</font> <br><font class="dianuan_mark2">〔注解〕</font><br></font>
<div class="Rulediv"><font class="english_word">(1)</font> 都:都城。</font></div>
<div class="Rulediv"><font class="english_word">(2)</font> 狐裘黃黃:穿著黃色的狐皮袍子。</font></div>
<div class="Rulediv"><font class="english_word">(3)</font> 不改:沒有改變,維持原本的樣子。</font></div>
<div class="Rulediv"><font class="english_word">(4)</font> 行歸于周:言行舉止歸於忠信。周,忠信之意。</font></div>
<div class="Rulediv"><font class="english_word">(5)</font> 萬民所望:為千萬人民所仰望。</font></div>
</td></tr>
</td></tr></table></div> <!-- layoutclass_first_pic --><div class="layoutclass_second_pic"></div> <!-- layoutclass_second_pic --></div> <!-- layoutclass_pic --></td></tr></table>
|
BuzzAcademy/idioms-moe-unformatted-data
|
all-data/1000-1999/1711-31.html
|
HTML
|
mit
| 2,102
|
namespace SubClassing
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(552, 175);
this.Name = "Form1";
this.Text = "Basic Sub-classing Demo";
this.ResumeLayout(false);
}
#endregion
}
}
|
Dhiraj3005/Mastering-C-Sharp-and-.NET-Framework
|
Chapter13/1-SubClassing/SubClassing/Form1.Designer.cs
|
C#
|
mit
| 1,383
|
<!DOCTYPE html>
<html>
<head>
<title>Tone Docs</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="style/style.css">
<link rel="stylesheet" type="text/css" href="style/tomorrow.css">
</head>
<body>
<div id="content">
<div id="constructor">
<span id="name">Transport</span><span id="extends"> → <a href='#Emitter'>Tone.Emitter</a></span>
<div id="description"><p>Transport for timing musical events.
Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)
<a class="internalLink" href='../docs/#Transport'>Tone.Transport</a> timing events pass in the exact time of the scheduled event
in the argument of the callback function. Pass that time value to the object
you're scheduling. <br><br>
A single transport is created for you when the library is initialized.
<br><br>
The transport emits the events: "start", "stop", "pause", and "loop" which are
called with the time of that event as the argument.</p>
</div>
<div id="new">
<span id="newKeyword">singleton</span>
<span>Tone.</span><span id="class">Transport</span>
<span class="params">
<span class='syntax'>(</span><span class='syntax'>)</span>
</span>
<div id="paramDescriptions">
</div>
</div>
<div id="examples">
<div class='example'><div id=exampleTitle>code</div><pre><span class="hljs-comment">//repeated event every 8th note</span>
Tone.Transport.scheduleRepeat(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">time</span>)</span>{
<span class="hljs-comment">//do something with the time</span>
}, <span class="hljs-string">"8n"</span>);</pre></div>
<div class='example'><div id=exampleTitle>code</div><pre><span class="hljs-comment">//schedule an event on the 16th measure</span>
Tone.Transport.schedule(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">time</span>)</span>{
<span class="hljs-comment">//do something with the time</span>
}, <span class="hljs-string">"16:0:0"</span>);</pre></div>
</div>
<div id="defaults"><div id="title">default values</div><div id="values"><div class='row'><span id='name'>bpm</span><span class='syntax'>:</span><span class='value number'>120</span></div><div class='row'><span id='name'>swing</span><span class='syntax'>:</span><span class='value number'>0</span></div><div class='row'><span id='name'>swingSubdivision</span><span class='syntax'>:</span><span class='value string'>"8n"</span></div><div class='row'><span id='name'>timeSignature</span><span class='syntax'>:</span><span class='value number'>4</span></div><div class='row'><span id='name'>loopStart</span><span class='syntax'>:</span><span class='value number'>0</span></div><div class='row'><span id='name'>loopEnd</span><span class='syntax'>:</span><span class='value string'>"4m"</span></div><div class='row'><span id='name'>PPQ</span><span class='syntax'>:</span><span class='value number'>192</span></div></div></div>
</div>
<div id="members">
<div id="title">members</div>
<div id="loop" class="member listItem">
<span id="title">.loop</span>
<span class="type"><span class='paren'>{</span>boolean<span class='paren'>}</span></span>
<div id="description"><p>If the transport loops or not.</p>
</div>
</div>
<div id="bpm" class="member listItem">
<span id="title">.bpm</span>
<span class='signal' title='signal'><a target='_blank' href='https://github.com/TONEnoTONE/Tone.js/wiki/Signals'>~</a></span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/BPM'>BPM</a><span class='paren'>}</span></span>
<div id="description"><p>The Beats Per Minute of the Transport.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre>Tone.Transport.bpm.value = <span class="hljs-number">80</span>;
<span class="hljs-comment">//ramp the bpm to 120 over 10 seconds</span>
Tone.Transport.bpm.rampTo(<span class="hljs-number">120</span>, <span class="hljs-number">10</span>);</pre></div>
</div>
<div id="state" class="member listItem">
<span id="title">.state</span>
<span class="type"><span class='paren'>{</span>Tone.State<span class='paren'>}</span></span>
<span id="readonly">READ ONLY</span>
<div id="description"><p>Returns the playback state of the source, either "started", "stopped", or "paused"</p>
</div>
</div>
<div id="timeSignature" class="member listItem">
<span id="title">.timeSignature</span>
<span class="type"><span class='paren'>{</span>Number|Array<span class='paren'>}</span></span>
<div id="description"><p>The time signature as just the numerator over 4.
For example 4/4 would be just 4 and 6/8 would be 3.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre><span class="hljs-comment">//common time</span>
Tone.Transport.timeSignature = <span class="hljs-number">4</span>;
<span class="hljs-comment">// 7/8</span>
Tone.Transport.timeSignature = [<span class="hljs-number">7</span>, <span class="hljs-number">8</span>];
<span class="hljs-comment">//this will be reduced to a single number</span>
Tone.Transport.timeSignature; <span class="hljs-comment">//returns 3.5</span></pre></div>
</div>
<div id="loopStart" class="member listItem">
<span id="title">.loopStart</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description"><p>When the <a class="internalLink" href='../docs/#Transport.loop'>Tone.Transport.loop</a> = true, this is the starting position of the loop.</p>
</div>
</div>
<div id="loopEnd" class="member listItem">
<span id="title">.loopEnd</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description"><p>When the <a class="internalLink" href='../docs/#Transport.loop'>Tone.Transport.loop</a> = true, this is the ending position of the loop.</p>
</div>
</div>
<div id="swing" class="member listItem">
<span id="title">.swing</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/NormalRange'>NormalRange</a><span class='paren'>}</span></span>
<div id="description"><p>The swing value. Between 0-1 where 1 equal to
the note + half the subdivision.</p>
</div>
</div>
<div id="swingSubdivision" class="member listItem">
<span id="title">.swingSubdivision</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Time'>Time</a><span class='paren'>}</span></span>
<div id="description"><p>Set the subdivision which the swing will be applied to.
The default values is a 16th note. Value must be less
than a quarter note.</p>
</div>
</div>
<div id="position" class="member listItem">
<span id="title">.position</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/BarsBeatsSixteenths'>BarsBeatsSixteenths</a><span class='paren'>}</span></span>
<div id="description"><p>The Transport's position in Bars:Beats:Sixteenths.
Setting the value will jump to that position right away.</p>
</div>
</div>
<div id="progress" class="member listItem">
<span id="title">.progress</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/NormalRange'>NormalRange</a><span class='paren'>}</span></span>
<div id="description"><p>The Transport's loop position as a normalized value. Always
returns 0 if the transport if loop is not true.</p>
</div>
</div>
<div id="ticks" class="member listItem">
<span id="title">.ticks</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Ticks'>Ticks</a><span class='paren'>}</span></span>
<div id="description"><p>The transports current tick position.</p>
</div>
</div>
<div id="PPQ" class="member listItem">
<span id="title">.PPQ</span>
<span class="type"><span class='paren'>{</span>Number<span class='paren'>}</span></span>
<div id="description"><p>Pulses Per Quarter note. This is the smallest resolution
the Transport timing supports. This should be set once
on initialization and not set again. Changing this value
after other objects have been created can cause problems.</p>
</div>
</div>
</div>
<div id="methods">
<div id="title">methods</div>
<div id="schedule" class="method listItem ">
<span id="title">.schedule
<span class="params">
<span class='syntax'>(</span><span id='name'>callback</span><span class='syntax'>, </span><span id='name'>time</span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">callback</span>
<span class="type"><span class='paren'>{</span>function<span class='paren'>}</span></span>
<div id="description">The callback to be invoked at the time.</div>
<span id="name">time</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description">The time to invoke the callback at.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span>Number<span class='paren'>}</span></span>
<span id="description"><p>The id of the event which can be used for canceling the event.</p>
</span>
</div>
<div id="description"><p>Schedule an event along the timeline.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre><span class="hljs-comment">//trigger the callback when the Transport reaches the desired time</span>
Tone.Transport.schedule(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">time</span>)</span>{
envelope.triggerAttack(time);
}, <span class="hljs-string">"128i"</span>);</pre></div>
</div>
<div id="scheduleRepeat" class="method listItem ">
<span id="title">.scheduleRepeat
<span class="params">
<span class='syntax'>(</span><span id='name'>callback</span><span class='syntax'>, </span><span id='name'>interval</span>[<span class='syntax'>, </span><span id='name'>startTime</span>][<span class='syntax'>, </span><span id='name'>duration</span>]<span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">callback</span>
<span class="type"><span class='paren'>{</span>function<span class='paren'>}</span></span>
<div id="description">The callback to invoke.</div>
<span id="name">interval</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Time'>Time</a><span class='paren'>}</span></span>
<div id="description">The duration between successive
callbacks.</div>
<span id="name">startTime</span>
<span class="type"><span class='paren'>{</span>TimelinePosition<span class='paren'>}</span></span>
<div id="description">When along the timeline the events should
start being invoked.</div>
<span id="name">duration</span> <span class="syntax">=</span>
<span id="default">Infinity</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Time'>Time</a><span class='paren'>}</span></span>
<div id="description">How long the event should repeat.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span>Number<span class='paren'>}</span></span>
<span id="description"><p>The ID of the scheduled event. Use this to cancel
the event.</p>
</span>
</div>
<div id="description"><p>Schedule a repeated event along the timeline. The event will fire
at the <code>interval</code> starting at the <code>startTime</code> and for the specified
<code>duration</code>.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre><span class="hljs-comment">//a callback invoked every eighth note after the first measure</span>
Tone.Transport.scheduleRepeat(callback, <span class="hljs-string">"8n"</span>, <span class="hljs-string">"1m"</span>);</pre></div>
</div>
<div id="scheduleOnce" class="method listItem ">
<span id="title">.scheduleOnce
<span class="params">
<span class='syntax'>(</span><span id='name'>callback</span><span class='syntax'>, </span><span id='name'>time</span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">callback</span>
<span class="type"><span class='paren'>{</span>function<span class='paren'>}</span></span>
<div id="description">The callback to invoke once.</div>
<span id="name">time</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description">The time the callback should be invoked.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span>Number<span class='paren'>}</span></span>
<span id="description"><p>The ID of the scheduled event.</p>
</span>
</div>
<div id="description"><p>Schedule an event that will be removed after it is invoked.
Note that if the given time is less than the current transport time,
the event will be invoked immediately.</p>
</div>
</div>
<div id="clear" class="method listItem ">
<span id="title">.clear
<span class="params">
<span class='syntax'>(</span><span id='name'>eventId</span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">eventId</span>
<span class="type"><span class='paren'>{</span>Number<span class='paren'>}</span></span>
<div id="description">The id of the event.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Clear the passed in event id from the timeline</p>
</div>
</div>
<div id="cancel" class="method listItem ">
<span id="title">.cancel
<span class="params">
<span class='syntax'>(</span>[<span id='name'>after</span>]<span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">after</span> <span class="syntax">=</span>
<span id="default">0</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description">Clear all events after
this time.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Remove scheduled events from the timeline after
the given time. Repeated events will be removed
if their startTime is after the given time</p>
</div>
</div>
<div id="start" class="method listItem ">
<span id="title">.start
<span class="params">
<span class='syntax'>(</span>[<span id='name'>time</span>][<span class='syntax'>, </span><span id='name'>offset</span>]<span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">time</span> <span class="syntax">=</span>
<span id="default">now</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Time'>Time</a><span class='paren'>}</span></span>
<div id="description">The time when the transport should start.</div>
<span id="name">offset</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description">The timeline offset to start the transport.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Start the transport and all sources synced to the transport.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre><span class="hljs-comment">//start the transport in one second starting at beginning of the 5th measure. </span>
Tone.Transport.start(<span class="hljs-string">"+1"</span>, <span class="hljs-string">"4:0:0"</span>);</pre></div>
</div>
<div id="stop" class="method listItem ">
<span id="title">.stop
<span class="params">
<span class='syntax'>(</span>[<span id='name'>time</span>]<span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">time</span> <span class="syntax">=</span>
<span id="default">now</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Time'>Time</a><span class='paren'>}</span></span>
<div id="description">The time when the transport should stop.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Stop the transport and all sources synced to the transport.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre>Tone.Transport.stop();</pre></div>
</div>
<div id="pause" class="method listItem ">
<span id="title">.pause
<span class="params">
<span class='syntax'>(</span>[<span id='name'>time</span>]<span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">time</span> <span class="syntax">=</span>
<span id="default">now</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Time'>Time</a><span class='paren'>}</span></span>
<div id="description"></div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Pause the transport and all sources synced to the transport.</p>
</div>
</div>
<div id="setLoopPoints" class="method listItem ">
<span id="title">.setLoopPoints
<span class="params">
<span class='syntax'>(</span><span id='name'>startPosition</span><span class='syntax'>, </span><span id='name'>endPosition</span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">startPosition</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description"></div>
<span id="name">endPosition</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/TransportTime'>TransportTime</a><span class='paren'>}</span></span>
<div id="description"></div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Set the loop start and stop at the same time.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre><span class="hljs-comment">//loop over the first measure</span>
Tone.Transport.setLoopPoints(<span class="hljs-number">0</span>, <span class="hljs-string">"1m"</span>);
Tone.Transport.loop = <span class="hljs-literal">true</span>;</pre></div>
</div>
<div id="nextSubdivision" class="method listItem ">
<span id="title">.nextSubdivision
<span class="params">
<span class='syntax'>(</span><span id='name'>subdivision</span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">subdivision</span>
<span class="type"><span class='paren'>{</span><a href='../docs/#types/Time'>Time</a><span class='paren'>}</span></span>
<div id="description">The subdivision to quantize to</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span>Number<span class='paren'>}</span></span>
<span id="description"><p>The context time of the next subdivision.</p>
</span>
</div>
<div id="description"><p>Returns the time aligned to the next subdivision
of the Transport. If the Transport is not started,
it will return 0.
Note: this will not work precisely during tempo ramps.</p>
</div>
<div class='example'><div id=exampleTitle>code</div><pre>Tone.Transport.start(); <span class="hljs-comment">//the transport must be started</span>
Tone.Transport.nextSubdivision(<span class="hljs-string">"4n"</span>);</pre></div>
</div>
<div id="syncSignal" class="method listItem ">
<span id="title">.syncSignal
<span class="params">
<span class='syntax'>(</span><span id='name'>signal</span>[<span class='syntax'>, </span><span id='name'>ratio</span>]<span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">signal</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Signal'>Tone.Signal</a><span class='paren'>}</span></span>
<div id="description"></div>
<span id="name">ratio</span>
<span class="type"><span class='paren'>{</span>number<span class='paren'>}</span></span>
<div id="description">Optionally pass in the ratio between
the two signals. Otherwise it will be computed
based on their current values.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Attaches the signal to the tempo control signal so that
any changes in the tempo will change the signal in the same
ratio.</p>
</div>
</div>
<div id="unsyncSignal" class="method listItem ">
<span id="title">.unsyncSignal
<span class="params">
<span class='syntax'>(</span><span id='name'>signal</span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">signal</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Signal'>Tone.Signal</a><span class='paren'>}</span></span>
<div id="description"></div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Transport'>Tone.Transport</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Unsyncs a previously synced signal from the transport's control.
See <a class="internalLink" href='../docs/#Transport.syncSignal'>Tone.Transport.syncSignal</a>.</p>
</div>
</div>
<div id="on" class="method listItem ">
<span id="title">.on
<span class="params">
<span class='syntax'>(</span><span id='name'>event</span><span class='syntax'>, </span><span id='name'>callback</span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">event</span>
<span class="type"><span class='paren'>{</span>String<span class='paren'>}</span></span>
<div id="description">The name of the event to listen for.</div>
<span id="name">callback</span>
<span class="type"><span class='paren'>{</span>function<span class='paren'>}</span></span>
<div id="description">The callback to invoke when the
event is triggered</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Emitter'>Tone.Emitter</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Bind a callback to a specific event.</p>
</div>
</div>
<div id="off" class="method listItem ">
<span id="title">.off
<span class="params">
<span class='syntax'>(</span><span id='name'>event</span>[<span class='syntax'>, </span><span id='name'>callback</span>]<span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">event</span>
<span class="type"><span class='paren'>{</span>String<span class='paren'>}</span></span>
<div id="description">The event to stop listening to.</div>
<span id="name">callback</span>
<span class="type"><span class='paren'>{</span>function<span class='paren'>}</span></span>
<div id="description">The callback which was bound to
the event with Tone.Emitter.on.
If no callback is given, all callbacks
events are removed.</div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Emitter'>Tone.Emitter</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Remove the event listener.</p>
</div>
</div>
<div id="trigger" class="method listItem ">
<span id="title">.trigger
<span class="params">
<span class='syntax'>(</span><span id='name'>event</span><span class='syntax'>, </span><span id='name'></span><span class='syntax'>)</span>
</span>
</span>
<div id="paramDescriptions">
<span id="name">event</span>
<span class="type"><span class='paren'>{</span>String<span class='paren'>}</span></span>
<div id="description">The name of the event.</div>
<span id="name"></span>
<span class="type"></span>
<div id="description"></div>
</div>
<div id="returns">
<span id="keyword">returns</span>
<span class="type"><span class='paren'>{</span><a class="internalLink" href='../docs/#Emitter'>Tone.Emitter</a><span class='paren'>}</span></span>
<span id="description"><p>this</p>
</span>
</div>
<div id="description"><p>Invoke all of the callbacks bound to the event
with any arguments passed in.</p>
</div>
</div>
</div>
<div id="footer"></div>
</div>
</body>
</html>
|
seutje/saxomochrome
|
docs/Transport.html
|
HTML
|
mit
| 27,524
|
import React, {Component} from 'react';
import {StyleSheet, Image, View, Text} from 'react-native';
export default class PersonalInfo extends Component {
static navigationOptions = {
headerTitle: "我",
};
render() {
return (
<View style={styles.container}>
<Image style={styles.imageStyle} source={require('../images/avatar.jpg')}/>
<Text>我的Github: https://github.com/panyz</Text>
<Text>Repo: https://github.com/panyz/GankAndPanyz</Text>
<Text style={{marginTop: 30, marginHorizontal: 30}}>
This is a completely developed by the React Native App, inside the data from the contents of gank.io
and their own GitHub some of the Content.
这是一个完全由React Native开发的App,里面的数据内容来自gank.io(干货集中营)和自己GitHub上的一些Content。有什么问题,
欢迎到Issue中提出!
</Text>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center'
},
textStyle: {},
imageStyle: {
borderRadius: 100,
height: 80,
width: 80,
marginVertical: 15,
}
});
|
panyz/GankAndPanyz
|
src/pages/PersonalInfoPage.js
|
JavaScript
|
mit
| 1,320
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Open Knowledge">
<meta name="description" content="The Global Open Data Index assesses the state of open government data around the world.
">
<meta name="keywords" content="Open Government, Open Data, Government Transparency, Open Knowledge
">
<meta property="og:type" content="website"/>
<meta property="og:title" content="Open Data Index - Open Knowledge"/>
<meta property="og:site_name" content="Open Data Index"/>
<meta property="og:description"
content="The Global Open Data Index assesses the state of open government data around the world."/>
<meta property="og:image" content="/static/images/favicon.ico"/>
<title>Canada / Water Quality (2014) | Global Open Data Index by Open Knowledge</title>
<base href="/">
<!--[if lt IE 9]>
<script src="/static/vendor/html5shiv.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="/static/css/site.css">
<link rel="icon" href="/static/images/favicon.ico">
<script>
var siteUrl = '';
</script>
</head>
<body class="na">
<div class="fixed-ok-panel">
<div id="ok-panel" class="closed">
<iframe src="http://assets.okfn.org/themes/okfn/okf-panel.html" scrolling="no"></iframe>
</div>
<a class="ok-ribbon"><img src="http://okfnlabs.org/ok-panel/assets/images/ok-ribbon.png" alt="Open Knowledge"></a>
</div>
<header id="header">
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div>
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="logo">
<a href="/">
<img src="/static/images/logo2.png">
<span>Global<br/>Open Data Index</span>
</a>
</div>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav" style="margin-right: 132px;">
<li>
<a href="/place/" title="About the Open Data Index project">
Places
</a>
</li>
<li>
<a href="/dataset/" title="About the Open Data Index project">
Datasets
</a>
</li>
<li>
<a href="/download/" title="Download Open Data Index data">
Download
</a>
</li>
<li>
<a href="/insights/" title="Insights">
Insights
</a>
</li>
<li>
<a href="/methodology/"
title="The methodology behind the Open Data Index">
Methodology
</a>
</li>
<li>
<a href="/about/" title="About the Open Data Index project">
About
</a>
</li>
<li>
<a href="/press/"
title="Press information for the Open Data Index">
Press
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<div class="container">
<div class="content">
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li>
<a href="/">Home</a>
</li>
<li class="active">Canada / Water Quality (2014)</li>
</ol>
<header class="page-header">
<h1>Canada / Water Quality (2014)</h1>
</header>
<h3>Sorry</h3>
<p>
There is no data available for Canada / Water Quality (2014) in the Index.
</p>
</div>
</div>
</div>
</div>
<footer id="footer">
<div class="container">
<div class="row">
<div class="footer-main col-md-8">
<div class="footer-attribution">
<p>
<a href="http://opendefinition.org/ossd/" title="Open Online Software Service">
<img src="http://assets.okfn.org/images/ok_buttons/os_80x15_orange_grey.png" alt=""
border=""/>
</a>
<a href="http://opendefinition.org/okd/" title="Open Online Software Service">
<img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="" border=""/>
</a>
<a href="http://opendefinition.org/okd/" title="Open Content">
<img src="http://assets.okfn.org/images/ok_buttons/oc_80x15_blue.png" alt="" border=""/>
</a>
–
<a href="http://creativecommons.org/licenses/by/3.0/"
title="Content Licensed under a CC Attribution"></a>
<a href="http://opendatacommons.org/licenses/pddl/1.0"
title="Data License (Public Domain)">Data License (Public
Domain)</a>
</p>
</div>
<div class="footer-meta">
<p>
This service is run by <a href="https://okfn.org/" title="Open Knowledge">Open Knowledge</a>
</p> <a class="naked" href="http://okfn.org/" title="Open Knowledge"><img
src="http://assets.okfn.org/p/okfn/img/okfn-logo-landscape-black-s.png" alt="" height="28"></a>
</div>
</div>
<div class="footer-links col-md-2">
<li><a href="http://okfn.org/" title="Open Knowledge">Open Knowledge</a></li>
<li><a href="http://okfn.org/opendata/" title="What is Open Data?">What is
Open Data?</a></li>
<li><a href="http://census.okfn.org/" title="Run your own Index">Run your
own Index</a></li>
<li><a href="https://github.com/okfn/opendataindex" title="The source code for Open Data Index">Source Code</a></li>
</div>
<div class="footer-links col-md-2">
<li><a href="/" title="Open Data Index home">Home</a></li>
<li><a href="/download/" title="Download data">Download</a></li>
<li><a href="/methodology/"
title="The methodology behind the Open Data Index">Methodology</a></li>
<li><a href="/faq/" title=" Open Data Index FAQ">FAQ</a></li>
<li><a href="/about/" title="About the Open Data Index">About</a></li>
<li><a href="/about/" title="Contact us">Contact</a></li>
<li><a href="/press/" title="Press">Press</a></li>
</div>
</div>
</div>
</footer>
<script data-main="/static/scripts/site" src="/static/scripts/require.js"></script>
</body>
</html>
|
okfn/opendataindex-2015
|
place/canada/water/2014/index.html
|
HTML
|
mit
| 8,126
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Open Knowledge">
<meta name="description" content="The Global Open Data Index assesses the state of open government data around the world.
">
<meta name="keywords" content="Open Government, Open Data, Government Transparency, Open Knowledge
">
<meta property="og:type" content="website"/>
<meta property="og:title" content="Open Data Index - Open Knowledge"/>
<meta property="og:site_name" content="Open Data Index"/>
<meta property="og:description"
content="The Global Open Data Index assesses the state of open government data around the world."/>
<meta property="og:image" content="/static/images/favicon.ico"/>
<title>Sierra Leone / Weather forecast (2014) | Global Open Data Index by Open Knowledge</title>
<base href="/">
<!--[if lt IE 9]>
<script src="/static/vendor/html5shiv.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="/static/css/site.css">
<link rel="icon" href="/static/images/favicon.ico">
<script>
var siteUrl = '';
</script>
</head>
<body class="na">
<div class="fixed-ok-panel">
<div id="ok-panel" class="closed">
<iframe src="http://assets.okfn.org/themes/okfn/okf-panel.html" scrolling="no"></iframe>
</div>
<a class="ok-ribbon"><img src="http://okfnlabs.org/ok-panel/assets/images/ok-ribbon.png" alt="Open Knowledge"></a>
</div>
<header id="header">
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div>
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="logo">
<a href="/">
<img src="/static/images/logo2.png">
<span>Global<br/>Open Data Index</span>
</a>
</div>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav" style="margin-right: 132px;">
<li>
<a href="/place/" title="About the Open Data Index project">
Places
</a>
</li>
<li>
<a href="/dataset/" title="About the Open Data Index project">
Datasets
</a>
</li>
<li>
<a href="/download/" title="Download Open Data Index data">
Download
</a>
</li>
<li>
<a href="/insights/" title="Insights">
Insights
</a>
</li>
<li>
<a href="/methodology/"
title="The methodology behind the Open Data Index">
Methodology
</a>
</li>
<li>
<a href="/about/" title="About the Open Data Index project">
About
</a>
</li>
<li>
<a href="/press/"
title="Press information for the Open Data Index">
Press
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<div class="container">
<div class="content">
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li>
<a href="/">Home</a>
</li>
<li class="active">Sierra Leone / Weather forecast (2014)</li>
</ol>
<header class="page-header">
<h1>Sierra Leone / Weather forecast (2014)</h1>
</header>
<h3>Sorry</h3>
<p>
There is no data available for Sierra Leone / Weather forecast (2014) in the Index.
</p>
</div>
</div>
</div>
</div>
<footer id="footer">
<div class="container">
<div class="row">
<div class="footer-main col-md-8">
<div class="footer-attribution">
<p>
<a href="http://opendefinition.org/ossd/" title="Open Online Software Service">
<img src="http://assets.okfn.org/images/ok_buttons/os_80x15_orange_grey.png" alt=""
border=""/>
</a>
<a href="http://opendefinition.org/okd/" title="Open Online Software Service">
<img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="" border=""/>
</a>
<a href="http://opendefinition.org/okd/" title="Open Content">
<img src="http://assets.okfn.org/images/ok_buttons/oc_80x15_blue.png" alt="" border=""/>
</a>
–
<a href="http://creativecommons.org/licenses/by/3.0/"
title="Content Licensed under a CC Attribution"></a>
<a href="http://opendatacommons.org/licenses/pddl/1.0"
title="Data License (Public Domain)">Data License (Public
Domain)</a>
</p>
</div>
<div class="footer-meta">
<p>
This service is run by <a href="https://okfn.org/" title="Open Knowledge">Open Knowledge</a>
</p> <a class="naked" href="http://okfn.org/" title="Open Knowledge"><img
src="http://assets.okfn.org/p/okfn/img/okfn-logo-landscape-black-s.png" alt="" height="28"></a>
</div>
</div>
<div class="footer-links col-md-2">
<li><a href="http://okfn.org/" title="Open Knowledge">Open Knowledge</a></li>
<li><a href="http://okfn.org/opendata/" title="What is Open Data?">What is
Open Data?</a></li>
<li><a href="http://census.okfn.org/" title="Run your own Index">Run your
own Index</a></li>
<li><a href="https://github.com/okfn/opendataindex" title="The source code for Open Data Index">Source Code</a></li>
</div>
<div class="footer-links col-md-2">
<li><a href="/" title="Open Data Index home">Home</a></li>
<li><a href="/download/" title="Download data">Download</a></li>
<li><a href="/methodology/"
title="The methodology behind the Open Data Index">Methodology</a></li>
<li><a href="/faq/" title=" Open Data Index FAQ">FAQ</a></li>
<li><a href="/about/" title="About the Open Data Index">About</a></li>
<li><a href="/about/" title="Contact us">Contact</a></li>
<li><a href="/press/" title="Press">Press</a></li>
</div>
</div>
</div>
</footer>
<script data-main="/static/scripts/site" src="/static/scripts/require.js"></script>
</body>
</html>
|
okfn/opendataindex-2015
|
place/sierra-leone/weather/2014/index.html
|
HTML
|
mit
| 8,162
|
<html>
<head>
<title>
Why can't Congress oppose the war?
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>
</head>
<body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0">
<table width="744" cellspacing="0" cellpadding="0" border="0">
<tr><td width="474"><a name="Top"></a><?php include "../../legacy-includes/TopLogo.htmlf" ?></td>
<td width="270"><?php include "../../legacy-includes/TopAd.htmlf" ?>
</td></tr></table>
<table width="744" cellspacing="0" cellpadding="0" border="0">
<tr><td width="18" bgcolor="FFCC66"></td>
<td width="108" bgcolor="FFCC66" valign=top><?php include "../../legacy-includes/LeftButtons.htmlf" ?></td>
<td width="18"></td>
<td width="480" valign="top">
<?php include "../../legacy-includes/BodyInsert.htmlf" ?>
<font face="Arial, Helvetica, sans-serif" size="2"><b>WHAT WE THINK</b></font><br>
<font face="Times New Roman, Times, serif" size="4">Two-thirds of people around the U.S. do...</font><br>
<font face="Times New Roman, Times, serif" size="5"><b>Why can't Congress oppose the war?</b></font><p>
<font face="Arial, Helvetica, sans-serif" size="2">February 23, 2007 | Page 3</font><p>
<font face="Times New Roman, Times, serif" size="3">LAST NOVEMBER, the congressional elections sent a clear message that a majority of people wanted to see an end to the U.S. war on Iraq. Four months later, and the new Democrat-controlled Congress hasn't managed to get all its members to cast a vote about the most pressing political issue of the day.<p>
The House of Representatives at least managed to pass a nonbinding resolution disapproving of the Bush administration's plans to send 21,500 additional troops to Iraq.<p>
But last weekend, with the Senate called into a special Saturday session, Republicans used undemocratic procedural tactics--the same ones they railed against the former Democratic minority for even mentioning, much less using--to block a vote on a similar measure.<p>
In October 2002, within hours of the House approving a resolution giving Bush the authority to declare war on Iraq, the Senate took no time whipping up a resounding yes vote. Four years later, with Iraq occupation spiraling into ever-deeper crisis, the "world's greatest deliberative body" can't muster enough votes to bring a nonbinding resolution to the floor.<p>
But even if the Senate could manage a vote on the nonbinding resolution passed by the House, there's another problem with it. It's nonbinding.<p>
The question now is if the Democrats who talk a good game when it comes to criticizing Bush's escalation in Iraq will do something concrete to challenge the administration's war policy.<p>
A good place to start would be the almost $100 billion in emergency supplemental funding for the war in Iraq that Bush needs Congress to approve in the coming months.<p>
But weak-in-the-knees Democrats have already been bowing before the complaints of Republicans accusing them of "not supporting our troops." "They've denounced the surge," accused Sen. Mitch McConnell (R-Ky.) "The question is, are they going to fund the troops?"<p>
As if the goal of those who want to end the occupation is to withdraw all the bombs and warplanes and supplies from Iraq--but leave U.S. soldiers. If any of the politicians really cared about "supporting our troops," they would fight to bring them home right now.<p>
<p><font face="Arial, Helvetica, sans-serif" size="1">- - - - - - - - - - - - - - - -</font></p>
<font face="Times New Roman, Times, serif" size="3">SOME DEMOCRATS are putting forward proposals on Iraq that go beyond nonbinding resolutions.<p>
One from House Appropriations Defense Subcommittee Chair Rep. John Murtha would add provisions to the supplemental funding bill that, he claims, would make it harder for Bush to go through with his troop surge.<p>
The Murtha plan is favored by many Democrats because it doesn't actually call for cutting off funds for the war. "We're going to make sure people understand we're supporting the troops and protecting the troops," Murtha said in an interview posted on the Web by the antiwar group Win Without War.<p>
Liberal lobbying groups are joining right in. "What we have staked out is a campaign to stop the war without cutting off funding" for the troops, said Tom Mazzie of Americans Against Escalation of the War in Iraq. "We call it the 'readiness strategy.'"<p>
But a "campaign to stop the war without cutting off funding" is in reality a campaign to stop the war without stopping the war. It makes about as much sense as an antiwar group calling itself "Win Without War"--especially four years after the war has started.<p>
Resolutions like Murtha's could give Democrats cover on the Iraq issue, but they don't do anything to stop the Iraq war.<p>
The toughest proposal on Iraq from a Democrat--House Resolution 508, introduced by Reps. Barbara Lee, Maxine Waters and Lynne Woolsey--would set a six-month deadline for the withdrawal of all U.S. troops within six months.<p>
The bill isn't unconditional. It calls for an "international stabilization force" to stay in Iraq for up to two years after the end of the U.S. occupation--if "requested" by an Iraqi government.<p>
But the worst thing about this legislation is that it doesn't stand a chance of passing--and its liberal sponsors know it. It amounts to an attempt to show that antiwar forces have a voice in the halls of Congress--while the "real" debate takes place among "pragmatic" Democrats whose concern isn't ending the occupation, but deciding how best to manage it.<p>
The Democrats are interested in saving the war on Iraq from the Bush administration's disastrous mistakes, not ending it.<p>
The possibility of galvanizing support for immediate withdrawal in Iraq is plain.<p>
Take a recent petition issued by Noam Chomsky, Howard Zinn, Cindy Sheehan and others, which argued, "We call on the U.S. to get out of Iraq--not in six months, not in a year, but now." Or Vermont, where the state Senate and House passed a resolution calling for U.S. forces to "immediately withdraw" from Iraq,<p>
Antiwar activists can set their sights on demonstrations called around the country for the weekend of March 17--the fourth anniversary of the invasion--to keep up the demand for immediate withdrawal.<p>
<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>
<td width="12"></td>
<td width="108" valign="top">
<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>
</td>
</tr>
</table>
</body>
</html>
|
ISO-tech/sw-d8
|
web/2007-1/620/620_03_Congress.php
|
PHP
|
mit
| 6,602
|
//2D sprite class
//Created by James Vanderhyde, 31 May 2010
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
public class ImageSprite
{
//Screen coordinates
protected double x,y;
protected double width, height;
protected Image image;
public ImageSprite()
{
image=null;
}
public ImageSprite(String imageFileName)
{
this.setImage(imageFileName);
x=this.width/2;
y=this.height/2;
}
public ImageSprite(String imageFileName, GraphicsConfiguration gc)
{
this(imageFileName);
this.createCompatibleImage(gc);
}
protected final void setImage(String name)
{
image=(new ImageIcon(this.getClass().getResource(name))).getImage();
//image=(new ImageIcon(name)).getImage();
width=image.getWidth(null);
height=image.getHeight(null);
}
private void createCompatibleImage(GraphicsConfiguration gc)
{
BufferedImage copy;
if (image instanceof BufferedImage)
{
BufferedImage bim = (BufferedImage)image;
int transparency = bim.getColorModel().getTransparency();
copy = gc.createCompatibleImage(bim.getWidth(), bim.getHeight(), transparency);
}
else
{
final int t=java.awt.Transparency.TRANSLUCENT;
copy = gc.createCompatibleImage(image.getWidth(null), image.getHeight(null),t);
}
//copy image
Graphics2D g2d = copy.createGraphics();
g2d.drawImage(image,0,0,null);
g2d.dispose();
image=copy;
}
public static BufferedImage loadCompatibleImage(String imageFileName,GraphicsConfiguration gc)
{
ImageSprite s=new ImageSprite(imageFileName,gc);
return (BufferedImage)s.image;
}
public void paint(Graphics g)
{
Rectangle viewport=g.getClipBounds();
if ((viewport==null) || (viewport.intersects(this.getBoundingRect())))
g.drawImage(image, (int)Math.floor(x-width/2), (int)Math.floor(y-height/2), null);
}
public Rectangle2D.Double getBoundingRect()
{
return new Rectangle2D.Double(x-width/2, y-height/2,width,height);
}
public double getX()
{
return x;
}
public void setX(double x)
{
this.x=x;
}
public double getY()
{
return y;
}
public void setY(double y)
{
this.y=y;
}
}
|
jvanderhyde/worlds-tiniest-platformer
|
TiniestPlatformer/src/ImageSprite.java
|
Java
|
mit
| 2,494
|
//
// ViewController.h
// ITRCloud-Part1
//
// Created by kiruthika selvavinayagam on 3/30/16.
// Copyright © 2016 kiruthika selvavinayagam. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
ITechRoof/ITRCloud
|
ITRCloudDemo/ITRCloud-Part1/ITRCloud-Part1/ViewController.h
|
C
|
mit
| 249
|
#include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include "base58.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For Qt::escape
#include <QAbstractItemView>
#include <QApplication>
#include <QClipboard>
#include <QFileDialog>
#include <QDesktopServices>
#include <QThread>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#ifdef WIN32
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0501
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
#define _WIN32_IE 0x0501
#define WIN32_LEAN_AND_MEAN 1
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include "shlwapi.h"
#include "shlobj.h"
#include "shellapi.h"
#endif
namespace GUIUtil {
QString dateTimeStr(const QDateTime &date)
{
return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm");
}
QString dateTimeStr(qint64 nTime)
{
return dateTimeStr(QDateTime::fromTime_t((qint32)nTime));
}
QFont bitcoinAddressFont()
{
QFont font("Monospace");
font.setStyleHint(QFont::TypeWriter);
return font;
}
void setupAddressWidget(QLineEdit *widget, QWidget *parent)
{
widget->setMaxLength(BitcoinAddressValidator::MaxAddressLength);
widget->setValidator(new BitcoinAddressValidator(parent));
widget->setFont(bitcoinAddressFont());
}
void setupAmountWidget(QLineEdit *widget, QWidget *parent)
{
QDoubleValidator *amountValidator = new QDoubleValidator(parent);
amountValidator->setDecimals(8);
amountValidator->setBottom(0.0);
widget->setValidator(amountValidator);
widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
}
bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
{
if(uri.scheme() != QString("densecoin"))
return false;
// check if the address is valid
CBitcoinAddress addressFromUri(uri.path().toStdString());
if (!addressFromUri.IsValid())
return false;
SendCoinsRecipient rv;
rv.address = uri.path();
rv.amount = 0;
QList<QPair<QString, QString> > items = uri.queryItems();
for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
{
bool fShouldReturnFalse = false;
if (i->first.startsWith("req-"))
{
i->first.remove(0, 4);
fShouldReturnFalse = true;
}
if (i->first == "label")
{
rv.label = i->second;
fShouldReturnFalse = false;
}
else if (i->first == "amount")
{
if(!i->second.isEmpty())
{
if(!BitcoinUnits::parse(BitcoinUnits::BTC, i->second, &rv.amount))
{
return false;
}
}
fShouldReturnFalse = false;
}
if (fShouldReturnFalse)
return false;
}
if(out)
{
*out = rv;
}
return true;
}
bool parseBitcoinURI(QString uri, SendCoinsRecipient *out)
{
// Convert densecoin:// to densecoin:
//
// Cannot handle this later, because densecoin:// will cause Qt to see the part after // as host,
// which will lowercase it (and thus invalidate the address).
if(uri.startsWith("densecoin://"))
{
uri.replace(0, 11, "densecoin:");
}
QUrl uriInstance(uri);
return parseBitcoinURI(uriInstance, out);
}
QString HtmlEscape(const QString& str, bool fMultiLine)
{
QString escaped = Qt::escape(str);
if(fMultiLine)
{
escaped = escaped.replace("\n", "<br>\n");
}
return escaped;
}
QString HtmlEscape(const std::string& str, bool fMultiLine)
{
return HtmlEscape(QString::fromStdString(str), fMultiLine);
}
void copyEntryData(QAbstractItemView *view, int column, int role)
{
if(!view || !view->selectionModel())
return;
QModelIndexList selection = view->selectionModel()->selectedRows(column);
if(!selection.isEmpty())
{
// Copy first item
QApplication::clipboard()->setText(selection.at(0).data(role).toString());
}
}
QString getSaveFileName(QWidget *parent, const QString &caption,
const QString &dir,
const QString &filter,
QString *selectedSuffixOut)
{
QString selectedFilter;
QString myDir;
if(dir.isEmpty()) // Default to user documents location
{
myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
}
else
{
myDir = dir;
}
QString result = QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter);
/* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");
QString selectedSuffix;
if(filter_re.exactMatch(selectedFilter))
{
selectedSuffix = filter_re.cap(1);
}
/* Add suffix if needed */
QFileInfo info(result);
if(!result.isEmpty())
{
if(info.suffix().isEmpty() && !selectedSuffix.isEmpty())
{
/* No suffix specified, add selected suffix */
if(!result.endsWith("."))
result.append(".");
result.append(selectedSuffix);
}
}
/* Return selected suffix if asked to */
if(selectedSuffixOut)
{
*selectedSuffixOut = selectedSuffix;
}
return result;
}
Qt::ConnectionType blockingGUIThreadConnection()
{
if(QThread::currentThread() != QCoreApplication::instance()->thread())
{
return Qt::BlockingQueuedConnection;
}
else
{
return Qt::DirectConnection;
}
}
bool checkPoint(const QPoint &p, const QWidget *w)
{
QWidget *atW = qApp->widgetAt(w->mapToGlobal(p));
if (!atW) return false;
return atW->topLevelWidget() == w;
}
bool isObscured(QWidget *w)
{
return !(checkPoint(QPoint(0, 0), w)
&& checkPoint(QPoint(w->width() - 1, 0), w)
&& checkPoint(QPoint(0, w->height() - 1), w)
&& checkPoint(QPoint(w->width() - 1, w->height() - 1), w)
&& checkPoint(QPoint(w->width() / 2, w->height() / 2), w));
}
void openDebugLogfile()
{
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
/* Open debug.log with the associated application */
if (boost::filesystem::exists(pathDebug))
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathDebug.string())));
}
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
QObject(parent), size_threshold(size_threshold)
{
}
bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
{
if(evt->type() == QEvent::ToolTipChange)
{
QWidget *widget = static_cast<QWidget*>(obj);
QString tooltip = widget->toolTip();
if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt/>") && !Qt::mightBeRichText(tooltip))
{
// Prefix <qt/> to make sure Qt detects this as rich text
// Escape the current message as HTML and replace \n by <br>
tooltip = "<qt/>" + HtmlEscape(tooltip, true);
widget->setToolTip(tooltip);
return true;
}
}
return QObject::eventFilter(obj, evt);
}
#ifdef WIN32
boost::filesystem::path static StartupShortcutPath()
{
return GetSpecialFolderPath(CSIDL_STARTUP) / "Densecoin.lnk";
}
bool GetStartOnSystemStartup()
{
// check for Densecoin.lnk
return boost::filesystem::exists(StartupShortcutPath());
}
bool SetStartOnSystemStartup(bool fAutoStart)
{
// If the shortcut exists already, remove it for updating
boost::filesystem::remove(StartupShortcutPath());
if (fAutoStart)
{
CoInitialize(NULL);
// Get a pointer to the IShellLink interface.
IShellLink* psl = NULL;
HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER, IID_IShellLink,
reinterpret_cast<void**>(&psl));
if (SUCCEEDED(hres))
{
// Get the current executable path
TCHAR pszExePath[MAX_PATH];
GetModuleFileName(NULL, pszExePath, sizeof(pszExePath));
TCHAR pszArgs[5] = TEXT("-min");
// Set the path to the shortcut target
psl->SetPath(pszExePath);
PathRemoveFileSpec(pszExePath);
psl->SetWorkingDirectory(pszExePath);
psl->SetShowCmd(SW_SHOWMINNOACTIVE);
psl->SetArguments(pszArgs);
// Query IShellLink for the IPersistFile interface for
// saving the shortcut in persistent storage.
IPersistFile* ppf = NULL;
hres = psl->QueryInterface(IID_IPersistFile,
reinterpret_cast<void**>(&ppf));
if (SUCCEEDED(hres))
{
WCHAR pwsz[MAX_PATH];
// Ensure that the string is ANSI.
MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().string().c_str(), -1, pwsz, MAX_PATH);
// Save the link by calling IPersistFile::Save.
hres = ppf->Save(pwsz, TRUE);
ppf->Release();
psl->Release();
CoUninitialize();
return true;
}
psl->Release();
}
CoUninitialize();
return false;
}
return true;
}
#elif defined(LINUX)
// Follow the Desktop Application Autostart Spec:
// http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html
boost::filesystem::path static GetAutostartDir()
{
namespace fs = boost::filesystem;
char* pszConfigHome = getenv("XDG_CONFIG_HOME");
if (pszConfigHome) return fs::path(pszConfigHome) / "autostart";
char* pszHome = getenv("HOME");
if (pszHome) return fs::path(pszHome) / ".config" / "autostart";
return fs::path();
}
boost::filesystem::path static GetAutostartFilePath()
{
return GetAutostartDir() / "densecoin.desktop";
}
bool GetStartOnSystemStartup()
{
boost::filesystem::ifstream optionFile(GetAutostartFilePath());
if (!optionFile.good())
return false;
// Scan through file for "Hidden=true":
std::string line;
while (!optionFile.eof())
{
getline(optionFile, line);
if (line.find("Hidden") != std::string::npos &&
line.find("true") != std::string::npos)
return false;
}
optionFile.close();
return true;
}
bool SetStartOnSystemStartup(bool fAutoStart)
{
if (!fAutoStart)
boost::filesystem::remove(GetAutostartFilePath());
else
{
char pszExePath[MAX_PATH+1];
memset(pszExePath, 0, sizeof(pszExePath));
if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1)
return false;
boost::filesystem::create_directories(GetAutostartDir());
boost::filesystem::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc);
if (!optionFile.good())
return false;
// Write a densecoin.desktop file to the autostart directory:
optionFile << "[Desktop Entry]\n";
optionFile << "Type=Application\n";
optionFile << "Name=Densecoin\n";
optionFile << "Exec=" << pszExePath << " -min\n";
optionFile << "Terminal=false\n";
optionFile << "Hidden=false\n";
optionFile.close();
}
return true;
}
#else
// TODO: OSX startup stuff; see:
// https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Articles/CustomLogin.html
bool GetStartOnSystemStartup() { return false; }
bool SetStartOnSystemStartup(bool fAutoStart) { return false; }
#endif
HelpMessageBox::HelpMessageBox(QWidget *parent) :
QMessageBox(parent)
{
header = tr("Densecoin-Qt") + " " + tr("version") + " " +
QString::fromStdString(FormatFullVersion()) + "\n\n" +
tr("Usage:") + "\n" +
" densecoin-qt [" + tr("command-line options") + "] " + "\n";
coreOptions = QString::fromStdString(HelpMessage());
uiOptions = tr("UI options") + ":\n" +
" -lang=<lang> " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
" -min " + tr("Start minimized") + "\n" +
" -splash " + tr("Show splash screen on startup (default: 1)") + "\n";
setWindowTitle(tr("Densecoin-Qt"));
setTextFormat(Qt::PlainText);
// setMinimumWidth is ignored for QMessageBox so put in nonbreaking spaces to make it wider.
setText(header + QString(QChar(0x2003)).repeated(50));
setDetailedText(coreOptions + "\n" + uiOptions);
}
void HelpMessageBox::printToConsole()
{
// On other operating systems, the expected action is to print the message to the console.
QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions;
fprintf(stderr, "%s", strUsage.toStdString().c_str());
}
void HelpMessageBox::showOrPrint()
{
#if defined(WIN32)
// On windows, show a message box, as there is no stderr/stdout in windowed applications
exec();
#else
// On other operating systems, print help text to console
printToConsole();
#endif
}
} // namespace GUIUtil
|
dynius/densecoin
|
src/qt/guiutil.cpp
|
C++
|
mit
| 13,505
|
package com.github.dwickern.macros
import com.github.dwickern.macros.NameOf._
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
import javax.annotation.Resource
/**
* Arguments to Java runtime annotations must be compile-time constants.
*
* Blackbox macros widen the return time from `"name"` to `("name": String)`,
* so in order for this code to compile we must use whitebox macros.
*/
class AnnotationTest extends AnyFunSuite with Matchers {
test("nameOf") {
def test = ???
@Resource(name = nameOf(test))
class AnnotatedClass
val annotation = classOf[AnnotatedClass].getDeclaredAnnotation(classOf[Resource])
annotation.name should === ("test")
}
test("nameOf instance") {
class SomeClass(val foobar: String)
@Resource(name = nameOf[AnnotatedClass](_.classMember))
class AnnotatedClass {
def classMember = ???
}
val annotation = classOf[AnnotatedClass].getDeclaredAnnotation(classOf[Resource])
annotation.name should === ("classMember")
}
test("nameOfType") {
@Resource(name = nameOfType[AnnotatedClass])
class AnnotatedClass
val annotation = classOf[AnnotatedClass].getDeclaredAnnotation(classOf[Resource])
annotation.name should === ("AnnotatedClass")
}
test("qualifiedNameOfType") {
@Resource(name = qualifiedNameOfType[AnnotatedClass])
class AnnotatedClass
val annotation = classOf[AnnotatedClass].getDeclaredAnnotation(classOf[Resource])
annotation.name should === ("com.github.dwickern.macros.AnnotationTest.AnnotatedClass")
}
}
|
dwickern/scala-nameof
|
src/test/scalajvm/com/github/dwickern/macros/AnnotationTest.scala
|
Scala
|
mit
| 1,647
|
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-comp-2654',
templateUrl: './comp-2654.component.html',
styleUrls: ['./comp-2654.component.css']
})
export class Comp2654Component implements OnInit {
constructor() { }
ngOnInit() {
}
}
|
angular/angular-cli-stress-test
|
src/app/components/comp-2654/comp-2654.component.ts
|
TypeScript
|
mit
| 484
|
import {Injectable} from '@angular/core';
import {IJenkinsData} from 'jenkins-api-ts-typings';
import {IJenkinsNode} from 'jenkins-api-ts-typings';
import {IJenkinsJob} from 'jenkins-api-ts-typings';
import {IJenkinsBuild} from 'jenkins-api-ts-typings';
import {IJenkinsUser} from 'jenkins-api-ts-typings';
import {IJenkinsView} from 'jenkins-api-ts-typings';
import {IJenkinsChangeSet} from 'jenkins-api-ts-typings';
import {IJenkinsAction} from 'jenkins-api-ts-typings';
@Injectable()
export class IJenkinsDataMockService implements IJenkinsData {
public nodes: Array<IJenkinsNode> = new Array<IJenkinsNode>();
public jobs: Array<IJenkinsJob> = new Array<IJenkinsJob>();
public builds: Map<IJenkinsJob, Array<IJenkinsBuild>> = new Map<IJenkinsJob, Array<IJenkinsBuild>>();
public users: Array<IJenkinsUser> = new Array<IJenkinsUser>();
public views: Array<IJenkinsView> = new Array<IJenkinsView>();
public changeSets: Map<IJenkinsBuild, Array<IJenkinsChangeSet>> = new Map<IJenkinsBuild, Array<IJenkinsChangeSet>>();
public actions: Map<IJenkinsBuild, Array<IJenkinsAction>> = new Map<IJenkinsBuild, Array<IJenkinsAction>>();
}
|
Andrei-Straut/statkins
|
src/main/webapp/src/app/test-mock/services/jenkins-data.mock.service.ts
|
TypeScript
|
mit
| 1,159
|
export class ValidationMessagesConfiguration {
class: string;
defaultErrorMessages: DefaultErrorMessages;
}
export class DefaultErrorMessages {
required: string;
pattern: string;
email: string;
minLength: string;
maxLength: string;
minNumber: string;
maxNumber: string;
noEmpty: string;
unknownError: string;
rangeLength: string;
range: string;
digit: string;
equal: string;
url: string;
date: string;
areEqual: string;
passwords: string;
[key: string]: string;
}
export const defaultConfig: ValidationMessagesConfiguration = {
class: 'text-danger',
defaultErrorMessages: {
required: 'This field is required!',
pattern: 'The input value does not match the pattern required!',
email: 'Invalid email!',
minLength: 'Minimum length is {0}!',
maxLength: 'Maximum length is {0}!',
minNumber: 'Minimal value is {0}!',
maxNumber: 'Maximal value is {0}!',
noEmpty: 'Only blank spaces are not allowed!',
rangeLength: 'The input must be between {0} and {1} symbols long!',
range: 'The input must be between {0} and {1}!',
digit: 'The input must be a number!',
equal: 'The input must be equal to {0}!',
url: 'The input must be a valid URL!',
date: 'The input must be a valid date!',
areEqual: 'The values in the group must match!',
passwords: 'Both fields "Password" and "Confirm Password" must match!',
unknownError: 'Unknown Error!',
},
};
|
d-kostov-dev/ng2-mdf-validation-messages
|
src/config.ts
|
TypeScript
|
mit
| 1,563
|
# frozen_string_literal: true
require 'spec_helper'
describe Projects::DiscussionsController do
let(:user) { create(:user) }
let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.source_project }
let(:note) { create(:discussion_note_on_merge_request, noteable: merge_request, project: project) }
let(:discussion) { note.discussion }
let(:request_params) do
{
namespace_id: project.namespace,
project_id: project,
merge_request_id: merge_request,
id: note.discussion_id
}
end
describe 'GET show' do
before do
sign_in user
end
context 'when user is not authorized to read the MR' do
it 'returns 404' do
get :show, params: request_params, session: { format: :json }
expect(response).to have_gitlab_http_status(404)
end
end
context 'when user is authorized to read the MR' do
before do
project.add_reporter(user)
end
it 'returns status 200' do
get :show, params: request_params, session: { format: :json }
expect(response).to have_gitlab_http_status(200)
end
it 'returns status 404 if MR does not exists' do
merge_request.destroy!
get :show, params: request_params, session: { format: :json }
expect(response).to have_gitlab_http_status(404)
end
end
context 'when user is authorized but note is LegacyDiffNote' do
before do
project.add_developer(user)
note.update!(type: 'LegacyDiffNote')
end
it 'returns status 200' do
get :show, params: request_params, session: { format: :json }
expect(response).to have_gitlab_http_status(200)
end
end
end
describe 'POST resolve' do
before do
sign_in user
end
context "when the user is not authorized to resolve the discussion" do
it "returns status 404" do
post :resolve, params: request_params
expect(response).to have_gitlab_http_status(404)
end
end
context "when the user is authorized to resolve the discussion" do
before do
project.add_developer(user)
end
context "when the discussion is not resolvable" do
before do
note.update(system: true)
end
it "returns status 404" do
post :resolve, params: request_params
expect(response).to have_gitlab_http_status(404)
end
end
context "when the discussion is resolvable" do
it "resolves the discussion" do
post :resolve, params: request_params
expect(note.reload.discussion.resolved?).to be true
expect(note.reload.discussion.resolved_by).to eq(user)
end
it "sends notifications if all discussions are resolved" do
expect_any_instance_of(MergeRequests::ResolvedDiscussionNotificationService).to receive(:execute).with(merge_request)
post :resolve, params: request_params
end
it "returns the name of the resolving user" do
post :resolve, params: request_params
expect(json_response['resolved_by']['name']).to eq(user.name)
end
it "returns status 200" do
post :resolve, params: request_params
expect(response).to have_gitlab_http_status(200)
end
it "renders discussion with serializer" do
expect_any_instance_of(DiscussionSerializer).to receive(:represent)
.with(instance_of(Discussion), { context: instance_of(described_class), render_truncated_diff_lines: true })
post :resolve, params: request_params
end
context 'diff discussion' do
let(:note) { create(:diff_note_on_merge_request, noteable: merge_request, project: project) }
let(:discussion) { note.discussion }
it "returns truncated diff lines" do
post :resolve, params: request_params
expect(json_response['truncated_diff_lines']).to be_present
end
end
end
end
end
describe 'DELETE unresolve' do
before do
sign_in user
note.discussion.resolve!(user)
end
context "when the user is not authorized to resolve the discussion" do
it "returns status 404" do
delete :unresolve, params: request_params
expect(response).to have_gitlab_http_status(404)
end
end
context "when the user is authorized to resolve the discussion" do
before do
project.add_developer(user)
end
context "when the discussion is not resolvable" do
before do
note.update(system: true)
end
it "returns status 404" do
delete :unresolve, params: request_params
expect(response).to have_gitlab_http_status(404)
end
end
context "when the discussion is resolvable" do
it "unresolves the discussion" do
delete :unresolve, params: request_params
expect(note.reload.discussion.resolved?).to be false
end
it "returns status 200" do
delete :unresolve, params: request_params
expect(response).to have_gitlab_http_status(200)
end
context "when vue_mr_discussions cookie is present" do
before do
cookies[:vue_mr_discussions] = 'true'
end
it "renders discussion with serializer" do
expect_any_instance_of(DiscussionSerializer).to receive(:represent)
.with(instance_of(Discussion), { context: instance_of(described_class), render_truncated_diff_lines: true })
delete :unresolve, params: request_params
end
end
end
end
end
end
|
stoplightio/gitlabhq
|
spec/controllers/projects/discussions_controller_spec.rb
|
Ruby
|
mit
| 5,740
|
/**
* https://gist.github.com/gaearon/830490fc17d3fccc88c9
* Inspiration and apdatation from code in the link above
*/
import React, { Component, PropTypes } from 'react'
import ReactDOM from 'react-dom'
export default class AudioPlayer extends Component {
static propTypes = {
source: PropTypes.string.isRequired,
isPlaying: PropTypes.bool.isRequired,
defaultTime: PropTypes.number,
// onProgress: PropTypes.func.isRequired,
// onTimeUpdate: PropTypes.func.isRequired,
onEnd: PropTypes.func.isRequired
};
render() {
return (
<audio preload='none'>
<source src={this.props.source}
type='audio/mpeg' />
</audio>
)
}
/**
* start of react life cycle functions
*/
componentDidMount() {
var node = ReactDOM.findDOMNode(this)
// node.addEventListener('progress', this.handleProgress)
// node.addEventListener('timeupdate', this.handleTimeUpdate)
node.addEventListener('ended', this.handleMediaEnd)
this.updateIsPlaying()
}
componentDidUpdate(prevProps) {
if (prevProps.source !== this.props.source) {
this.updateSource()
}
if (prevProps.isPlaying !== this.props.isPlaying) {
this.updateIsPlaying()
}
if (prevProps.defaultTime !== this.props.defaultTime) {
this.updateCurrentTime()
}
}
componentWillUnmount() {
var node = ReactDOM.findDOMNode(this)
// node.removeEventListener('progress', this.handleProgress)
// node.removeEventListener('timeupdate', this.handleTimeUpdate)
node.removeEventListener('ended', this.handleMediaEnd)
}
/**
* Start of custom logic functions
*/
// handleTimeUpdate = () => {
// var node = ReactDOM.findDOMNode(this)
// var currentTime = node.currentTime
// var trackDuration = node.duration
// this.props.onTimeUpdate({
// currentTime: currentTime,
// trackDuration: trackDuration
// })
// }
handleMediaEnd = () => {
ReactDOM.findDOMNode(this).currentTime = 0
this.props.onEnd()
};
// handleProgress = () => {
// var node = ReactDOM.findDOMNode(this)
// var trackDuration = node.duration
// var buffered = node.buffered
// this.props.onProgress({
// trackDuration: trackDuration,
// buffered: buffered
// })
// }
updateCurrentTime = () => {
var node = ReactDOM.findDOMNode(this)
if (node.readyState) {
node.currentTime = this.props.defaultTime
}
};
updateIsPlaying = () => {
var node = ReactDOM.findDOMNode(this)
var isPlaying = this.props.isPlaying
if (isPlaying) {
node.play()
} else {
node.pause()
}
};
updateSource = () => {
var node = ReactDOM.findDOMNode(this)
var isPlaying = this.props.isPlaying
node.pause()
// this.props.onTimeUpdate({
// currentTime: 0,
// trackDuration: node.duration
// })
node.load()
if (isPlaying) {
node.play()
}
};
}
|
wwwfreedom/FreeCodeCamp
|
src/components/PomoTime/AudioPlayer/AudioPlayer.js
|
JavaScript
|
mit
| 2,976
|
# Cfserver C/C++ bundle for Sublime
===================================
This bundle brings C/C++ static analysis capabilities provided by Advanced Tools [Cfserver](http://www.adv-tools.com/) to Sublime Text. The following features are currently provided:
* Errors/warnings reported by Cfserver.
* Navigation to definition/usage
Next on the list are:
* Code completion
* Analysis on the fly(without need to save file)
PRE-REQ
=======
You will need to have [Cfserver](http://www.adv-tools.com/) binary for your OS available locally in order to use this plugin.
INSTALLATION
============
### Using Package Control
Installing through the [Package Control][1] plugin is the recommended way:
- Open the command palette (<kbd>Ctrl+Shift+P</kbd> or <kbd>⌘+Shift+P</kbd>)
- Type 'install'
- Select **Package Control: Install Package**
- Type 'Cfserver'
- Select 'Cfserver'
You may need to restart ST3 before you can start using all the features in the
package.
### Manually
To install this package manually, copy the the contents of this repository to a
new directory in the Sublime packages directory (on OSX:
~/Library/Application Support/Sublime Text 3/Packages).
You can also clone github repository directly into your packages directory:
aam@mac:~/Library/Application Support/Sublime Text 3/Packages$ git clone https://github.com/aam/cfserver-sublime-bundle.git Cfserver
Cloning into 'Cfserver'...
remote: Counting objects: 59, done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 59 (delta 25), reused 42 (delta 9)
Unpacking objects: 100% (59/59), done.
Add the `cfserver_path` variable pointing to cfserver to your user settings:
{
"cfserver_path" : "c:\\Users\\baz\\cfserver.exe",
}
LICENSE
=======
Copyright (c) 2014 Alexander Aprelev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
|
aam/cfserver-sublime-bundle
|
README.md
|
Markdown
|
mit
| 2,912
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="Craig McClellan" name="author">
<title>Craig McClellan - Page 163</title>
<link href="/assets/css/style.css" rel="stylesheet">
<link href="/assets/css/highlight.css" rel="stylesheet">
<link rel="stylesheet" href="/custom.css">
<link rel="shortcut icon" href="https://micro.blog/craigmcclellan/favicon.png" type="image/x-icon" />
<link rel="alternate" type="application/rss+xml" title="Craig McClellan" href="http://craigmcclellan.com/feed.xml" />
<link rel="alternate" type="application/json" title="Craig McClellan" href="http://craigmcclellan.com/feed.json" />
<link rel="EditURI" type="application/rsd+xml" href="/rsd.xml" />
<link rel="me" href="https://micro.blog/craigmcclellan" />
<link rel="me" href="https://twitter.com/craigmcclellan" />
<link rel="me" href="https://github.com/craigwmcclellan" />
<link rel="authorization_endpoint" href="https://micro.blog/indieauth/auth" />
<link rel="token_endpoint" href="https://micro.blog/indieauth/token" />
<link rel="micropub" href="https://micro.blog/micropub" />
<link rel="webmention" href="https://micro.blog/webmention" />
<link rel="subscribe" href="https://micro.blog/users/follow" />
</head>
<body>
<nav class="main-nav">
<a class="normal" href="/"> <span class="arrow">←</span> Home</a>
<a href="/archive/">Archive</a>
<a href="/about/">About</a>
<a href="/tools-of-choice/">Tools of Choice</a>
<a class="cta" href="https://micro.blog/craigmcclellan" rel="me">Also on Micro.blog</a>
</nav>
<div class="profile">
<section id="wrapper">
<header class="h-card">
<a class="u-url" href="/about">
<img id="avatar" src="https://micro.blog/craigmcclellan/avatar.jpg"/>
</a>
<h1 class="p-name" rel="me">Craig McClellan</h1>
<h4 class="p-role">Follow <a href="https://micro.blog/craigmcclellan">@craigmcclellan on Micro.blog</a>.</h4>
</header>
</section>
</div>
<section id="wrapper">
<ul id="post-list">
<li>
<article>
<section class="post-body">
<p>Last day of summer break, and I’m sitting on my couch watching Friends. This feels like a good decision.</p>
</section>
<a href="/2018/07/31/last-day-of.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-31 15:32:07 -0500" class="dt-published">→ 3:32 PM, Jul 31</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p><a href="https://www.macstories.net/linked/logitech-purchases-blue-microphones-to-better-serve-gamers-podcasters-and-more/">Logitech Purchases Blue Microphones to Better Serve Gamers, Podcasters, and More – MacStories</a></p>
<p>I record every episode of <a href="https://micro.blog/theclassnerd">@theclassnerd</a> on a Blue Snowball plugged into my iPad, and have been thrilled with the quality. Blue having more resources behind them is exciting.</p>
</section>
<a href="/2018/07/31/logitech-purchases-blue.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-31 10:52:13 -0500" class="dt-published">→ 10:52 AM, Jul 31</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>Is anyone else good at listening to their own podcasts? Listening back to <a href="https://micro.blog/theclassnerd">@theclassnerd</a> is just a reminder of all the weird ways I phrase things.</p>
</section>
<a href="/2018/07/31/is-anyone-else.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-31 08:03:11 -0500" class="dt-published">→ 8:03 AM, Jul 31</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>And I ordered a bag…</p>
</section>
<a href="/2018/07/30/and-i-ordered.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-30 21:41:42 -0500" class="dt-published">→ 9:41 PM, Jul 30</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>If kids get new backpacks at the beginning of the school year, maybe I need another Tom Bihn bag. 🤔</p>
</section>
<a href="/2018/07/30/if-kids-get.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-30 20:27:28 -0500" class="dt-published">→ 8:27 PM, Jul 30</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>Today was another day in foster parenting I wish I could share more of, but can’t. It was the perfect picture of how the world isn’t black and white. It’s beautiful and messy at the same time.</p>
</section>
<a href="/2018/07/29/today-was-another.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-29 20:18:03 -0500" class="dt-published">→ 8:18 PM, Jul 29</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>Thanks <a href="https://micro.blog/manton">@manton</a> for sharing <a href="http://www.internetfriends.show/12">the latest episode</a> of <a href="https://micro.blog/internetfriends">@internetfriends</a>. It gave me a lot to think about in terms of how I approach the web. Well done <a href="https://micro.blog/ablaze">@ablaze</a> and <a href="https://micro.blog/drewcoffman">@drewcoffman</a>. Instant subscribe.</p>
</section>
<a href="/2018/07/28/thanks-manton-for.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-28 20:53:07 -0500" class="dt-published">→ 8:53 PM, Jul 28</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p><a href="https://m.youtube.com/watch?v=4L2VB3quhH0">The Middle (Cover) // Zedd, Maren Morris, Grey</a></p>
<p>If you ever need a reminder of what good musicians the Gregory Brothers (autotune the news) are, here’s one.</p>
</section>
<a href="/2018/07/28/the-middle-cover.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-28 16:10:27 -0500" class="dt-published">→ 4:10 PM, Jul 28</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>I let my girls paint my nails once last week. Now the chances of me ever having non-painted nails again are slim to none.
<img src="http://craigmcclellan.com/uploads/2018/f77b9916df.jpg" alt="EDE2AFC3-77D3-441D-A993-FA88A6B147E8.jpg" /></p>
</section>
<a href="/2018/07/28/i-let-my.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-28 09:00:08 -0500" class="dt-published">→ 9:00 AM, Jul 28</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>📚 Finished Thrawn Alliances today. Not as good as the first (canon) Thrawn Book, but enjoyable nonetheless.</p>
</section>
<a href="/2018/07/27/finished-thrawn-alliances.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-27 17:56:25 -0500" class="dt-published">→ 5:56 PM, Jul 27</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>My home state. 😭</p>
<p><img src="http://craigmcclellan.com/uploads/2018/a44fc8567a.jpg" width="600" height="600" /></p>
</section>
<a href="/2018/07/27/my-home-state.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-27 14:12:17 -0500" class="dt-published">→ 2:12 PM, Jul 27</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>🎵 <a href="https://itunes.apple.com/us/album/id1411794190?i=1411794402&at=1l3vwJx&ct=microblog&app=music">Andrew Ripp - Wildfire</a></p>
<p>Definitely a different feel for one of my favorite singer songwriters, but man is this song good.</p>
</section>
<a href="/2018/07/27/andrew-ripp-wildfire.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-27 13:20:17 -0500" class="dt-published">→ 1:20 PM, Jul 27</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>Now more than ever.</p>
<p><img src="http://craigmcclellan.com/uploads/2018/c54a98c537.jpg" width="600" height="600" /></p>
</section>
<a href="/2018/07/26/now-more-than.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-26 16:07:33 -0500" class="dt-published">→ 4:07 PM, Jul 26</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>If you’ve ever wondered where elementary school teachers get all the stuff for their classrooms, may I introduce you to the Parent Teacher Store. Today I make my annual pilgrimage.</p>
<p><img src="http://craigmcclellan.com/uploads/2018/c76ddd1dbf.jpg" width="600" height="600" /><img src="http://craigmcclellan.com/uploads/2018/0ca58933bb.jpg" width="600" height="600" /></p>
</section>
<a href="/2018/07/26/if-youve-ever.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-26 12:58:14 -0500" class="dt-published">→ 12:58 PM, Jul 26</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>“Daddy, I’m pretending to be nice to you.” - My almost 3-year-old as she hugs and kisses me this morning.</p>
<p>😰😂</p>
</section>
<a href="/2018/07/26/daddy-im-pretending.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-26 07:09:05 -0500" class="dt-published">→ 7:09 AM, Jul 26</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p><a href="https://apple.news/AxD1QwWlvSiWPScHU-PRJuQ">New Alzheimer’s Drug Shows Big Promise in Early Trial Results - The New York Times</a></p>
<p>As someone whose family has been dramatically impacted by Alzheimer’s on all sides, this is excellent news.</p>
</section>
<a href="/2018/07/26/new-alzheimers-drug.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-26 06:50:30 -0500" class="dt-published">→ 6:50 AM, Jul 26</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>I should add that if you’re on the Shortcuts beta, it does work there too. Once we can share Shortcuts links and Drafts is officially updated to work with Shortcuts (currently in beta), I’ll share the updated Drafts actions and shortcuts.</p>
</section>
<a href="/2018/07/25/i-should-add.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-25 19:16:43 -0500" class="dt-published">→ 7:16 PM, Jul 25</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>I realized my workflow to upload photos to Micro.blog didn’t work with all image file types. I’ve <a href="https://workflow.is/workflows/bb3eceff6d1340daa4dd52da14912af3">updated it</a> to always convert images to JEPG which should solve the problem.</p>
</section>
<a href="/2018/07/25/i-realized-my.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-25 18:39:45 -0500" class="dt-published">→ 6:39 PM, Jul 25</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>Top golf with friends is what summer is all about. Also, my wife destroyed us all on her first time.
<img src="http://craigmcclellan.com/uploads/2018/e94f2cd993.jpg" alt="BA17E6CF-7B16-46DD-9C78-58ACA597EAD1.jpg" /></p>
</section>
<a href="/2018/07/25/top-golf-with.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-25 12:14:56 -0500" class="dt-published">→ 12:14 PM, Jul 25</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>I’ve updated my <a href="http://craigmcclellan.com/tools-of-choice/">Tools of Choice</a> page on my website. It’s amazing how much has changed since February. Most of that is how big an effect Drafts 5 has had on my workflows.</p>
</section>
<a href="/2018/07/25/ive-updated-my.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-25 08:25:11 -0500" class="dt-published">→ 8:25 AM, Jul 25</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>Just arrived at a coffee shop, and there are more iPads in use than Macs. We’re slowly taking over!</p>
</section>
<a href="/2018/07/25/just-arrived-at.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-25 07:49:08 -0500" class="dt-published">→ 7:49 AM, Jul 25</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>I tried <a href="https://itunes.apple.com/us/app/id1272769808?at=1l3vwJx&ct=microblog">Keep It</a> several months back, and couldn’t really get into it. Now Viticci is using it, I try it, and suddenly I don’t know how I lived without it. How does that guy do it?</p>
</section>
<a href="/2018/07/24/i-tried-keep.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-24 12:50:30 -0500" class="dt-published">→ 12:50 PM, Jul 24</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p>📚 I’ve been waiting for Thrawn Alliances all summer. Marc Thompson’s narration was so good on the first Thrawn book, I didn’t even consider buying a text version. Should be a good listen as I set up my classroom.</p>
<p><img src="http://craigmcclellan.com/uploads/2018/8a0788a85f.jpg" width="600" height="600" /></p>
</section>
<a href="/2018/07/24/ive-been-waiting.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-24 07:09:35 -0500" class="dt-published">→ 7:09 AM, Jul 24</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p><a href="https://homekitnews.com/2018/07/19/wemo-smart-plugs-now-support-homekit-without-a-bridge/">Wemo Mini Smart Plugs Now Support HomeKit Without a Bridge – Homekit News and Reviews</a></p>
<p>I have a feeling a few of these are in my future now.</p>
</section>
<a href="/2018/07/23/wemo-mini-smart.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-23 17:29:52 -0500" class="dt-published">→ 5:29 PM, Jul 23</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
<li>
<article>
<section class="post-body">
<p><a href="http://www.vulture.com/2018/07/san-diego-comic-con-2018-watch-all-of-the-trailers.html">San Diego Comic-Con 2018: Watch All of the Trailers</a></p>
</section>
<a href="/2018/07/23/san-diego-comiccon.html" class="u-url">
<aside class="dates">
<time datetime="2018-07-23 16:58:12 -0500" class="dt-published">→ 4:58 PM, Jul 23</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
</ul>
</section>
<footer id="footer">
<section id="wrapper">
<ul>
<li><a href="/feed.xml">RSS</a></li>
<li><a href="/feed.json">JSON Feed</a></li>
<li><a href="https://micro.blog/craigmcclellan" rel="me">Micro.blog</a></li>
<!-- <li><a class="u-email" href="mailto:" rel="me">Email</a></li> -->
</ul>
<form method="get" id="search" action="https://duckduckgo.com/">
<input type="hidden" name="sites" value="http://craigmcclellan.com"/>
<input type="hidden" name="k8" value="#444444"/>
<input type="hidden" name="k9" value="#ee4792"/>
<input type="hidden" name="kt" value="h"/>
<input class="field" type="text" name="q" maxlength="255" placeholder="To search, type and hit Enter…"/>
<input type="submit" value="Search" style="display: none;" />
</form>
</section>
</footer>
</body>
</html>
|
craigwmcclellan/craigwmcclellan.github.io
|
_site/page/163/index.html
|
HTML
|
mit
| 20,240
|
//
// System.Web.UI.WebContrls.FormViewModeEventHandler.cs;
//
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
// (C) 2004 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
namespace System.Web.UI.WebControls {
public delegate void FormViewModeEventHandler (object sender, FormViewModeEventArgs e);
}
#endif
|
jjenki11/blaze-chem-rendering
|
qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Web/System.Web.UI.WebControls/FormViewModeEventHandler.cs
|
C#
|
mit
| 1,400
|
#
# 3rd party libraries
require 'celluloid'
require 'celluloid/autostart'
require 'exception_notification'
require 'koala'
require 'open-uri'
require 'sucker_punch'
# local libraries
require_relative 'facebook/helpers'
module CacheParty
class Engine < ::Rails::Engine
initializer :assets do |config|
Rails.application.config.assets.precompile += %w( cache_party/application.js cache_party/application.css )
end
isolate_namespace CacheParty
config.generators do |g|
g.test_framework :rspec,
view_specs: false,
helper_specs: false,
routing_specs: false,
controller_specs: false,
request_specs: true,
fixtures: true
g.fixture_replacement :factory_girl, dir: 'spec/factories/cache_party'
g.helper = false
g.stylesheets = false
end
end
end
|
rjayroach/cache-party
|
lib/cache_party/engine.rb
|
Ruby
|
mit
| 845
|
package org.openfact.ubl.send;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.configuration.security.FiltersType;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
public class ServiceWrapper<T> {
private String wsUrl;
private Map<String, String> config;
private ServicePasswordThread passwordThread;
public ServiceWrapper(Map<String, String> config, String wsUrl) {
this.wsUrl = wsUrl;
this.config = config;
passwordThread = new ServicePasswordThread(config);
}
public T initWebService(Class<?> serviceClass) {
Properties properties = System.getProperties();
properties.put("org.apache.cxf.stax.allowInsecureParser", "1");
System.setProperties(properties);
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
Map<String, Object> props = new HashMap<>();
props.put("mtom-enabled", Boolean.FALSE);
factory.setProperties(props);
factory.setAddress(wsUrl);
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
factory.setServiceClass(serviceClass);
T client = (T) factory.create();
try {
configureSSLOnTheClient(client, config.get("username"));
return client;
} catch (ServiceConfigurationException ex) {
throw new RuntimeException(ex);
}
}
private void configureSSLOnTheClient(Object object, String username) throws ServiceConfigurationException {
Client client = ClientProxy.getClient(object);
HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
TLSClientParameters tlsParams = new TLSClientParameters();
tlsParams.setDisableCNCheck(true);
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setConnectionTimeout(30000L);
policy.setReceiveTimeout(15000L);
policy.setAllowChunking(false);
httpConduit.setClient(policy);
FiltersType filter = new FiltersType();
filter.getInclude().add(".*_EXPORT_.*");
filter.getInclude().add(".*_EXPORT1024_.*");
filter.getInclude().add(".*_WITH_DES_.*");
filter.getInclude().add(".*_WITH_NULL_.*");
filter.getExclude().add(".*_DH_anon_.*");
tlsParams.setCipherSuitesFilter(filter);
httpConduit.setTlsClientParameters(tlsParams);
HashMap outProps = new HashMap();
outProps.put("action", "UsernameToken");
outProps.put("user", username);
outProps.put("passwordType", "PasswordText");
outProps.put("passwordCallbackClass", ServicePasswordCallback.class.getName());
WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor(outProps);
client.getEndpoint().getOutInterceptors().add(wsOut);
}
}
|
openfact/openfact-temp
|
services/src/main/java/org/openfact/ubl/send/ServiceWrapper.java
|
Java
|
mit
| 3,016
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>search (BodysizeController)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File app/controllers/bodysize_controller.rb, line 97</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
<span class="ruby-identifier">conditions</span> = []
<span class="ruby-comment cmt">## Add permission criteria</span>
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@current_logged_in_user</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Approver</span>)
<span class="ruby-identifier">conditions</span> <span class="ruby-operator"><<</span> [<span class="ruby-value str">"(complete_bodysizes.approved=? OR complete_bodysizes.creator_id=?)"</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@current_logged_in_user</span>.<span class="ruby-identifier">id</span>]
<span class="ruby-keyword kw">end</span>
<span class="ruby-comment cmt">## Add search criteria to an array</span>
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">field</span> <span class="ruby-keyword kw">in</span> [<span class="ruby-identifier">:kingdom_id</span>, <span class="ruby-identifier">:phylum_id</span>, <span class="ruby-identifier">:environment_id</span>, <span class="ruby-identifier">:motility_id</span>] <span class="ruby-keyword kw">do</span>
<span class="ruby-identifier">conditions</span> <span class="ruby-operator"><<</span> [<span class="ruby-node">"complete_bodysizes.#{field}=?"</span>, <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:bodysize</span>][<span class="ruby-identifier">field</span>]] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">field</span>].<span class="ruby-identifier">blank?</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">conditions</span> <span class="ruby-operator"><<</span> [<span class="ruby-value str">"lower(complete_bodysizes.class_classification) LIKE ?"</span>, <span class="ruby-node">"%#{options[:class_classification].downcase}%"</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:class_classification</span>].<span class="ruby-identifier">blank?</span>
<span class="ruby-identifier">start_period</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:start_period_midpoint</span>]
<span class="ruby-identifier">end_period</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:end_period_midpoint</span>]
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">start_period</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">end_period</span>.<span class="ruby-identifier">blank?</span>
<span class="ruby-identifier">periods</span> = <span class="ruby-constant">Period</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">:all</span>, <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"midpoint DESC"</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">start_period</span>.<span class="ruby-identifier">blank?</span>
<span class="ruby-identifier">start_period</span> = <span class="ruby-identifier">periods</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">midpoint</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">end_period</span>.<span class="ruby-identifier">blank?</span>
<span class="ruby-identifier">end_period</span> = <span class="ruby-identifier">periods</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">midpoint</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">conditions</span> <span class="ruby-operator"><<</span> [<span class="ruby-value str">"(complete_bodysizes.midpoint <= ? AND complete_bodysizes.midpoint >= ?)"</span>, <span class="ruby-identifier">start_period</span>, <span class="ruby-identifier">end_period</span>]
<span class="ruby-comment cmt">## Combine all given search criteria</span>
<span class="ruby-identifier">combined_conditions</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
<span class="ruby-identifier">combined_conditions</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">conditions</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">condition</span><span class="ruby-operator">|</span> <span class="ruby-identifier">condition</span>[<span class="ruby-value">0</span>] }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" AND "</span>)
<span class="ruby-identifier">conditions</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">condition</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">combined_conditions</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">condition</span>[<span class="ruby-value">1</span>]
<span class="ruby-identifier">combined_conditions</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">condition</span>[<span class="ruby-value">2</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">condition</span>[<span class="ruby-value">2</span>]
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:group_by</span>].<span class="ruby-identifier">blank?</span>
<span class="ruby-comment cmt">## The user is searching, but has not requested any grouping of results</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:show_all</span>]
<span class="ruby-ivar">@bodysizes</span> = <span class="ruby-ivar">@current_logged_in_user</span>.<span class="ruby-identifier">accessible_bodysize_records</span>({ <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">combined_conditions</span> })
<span class="ruby-keyword kw">else</span>
<span class="ruby-ivar">@bodysizes</span> = <span class="ruby-ivar">@current_logged_in_user</span>.<span class="ruby-identifier">accessible_bodysize_records</span>({ <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">combined_conditions</span>, <span class="ruby-identifier">:page</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:page</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>, <span class="ruby-identifier">:per_page</span> =<span class="ruby-operator">></span> <span class="ruby-value">3</span> })
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-comment cmt">## The user is requesting grouped search results</span>
<span class="ruby-ivar">@grouping_field</span> = <span class="ruby-ivar">@groups</span>[<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:group_by</span>]]
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Results are being grouped by #{@grouping_field}"</span>)
<span class="ruby-identifier">graph_criteria</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:graph</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"1"</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@grouping_field</span>.<span class="ruby-identifier">field_name</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"period_id"</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">", complete_bodysizes.period_id"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">""</span>
<span class="ruby-comment cmt">## Create a query that takes into account search criteria, grouping options, and graph options</span>
<span class="ruby-identifier">group_maxes_sql</span> = <span class="ruby-node">"(SELECT MAX(complete_bodysizes.#{@data_field}) AS max_biovolume, complete_bodysizes.#{@grouping_field.field_name} #{graph_criteria} FROM complete_bodysizes"</span>
<span class="ruby-identifier">group_maxes_sql</span> <span class="ruby-operator">+=</span> <span class="ruby-node">" WHERE (#{combined_conditions[0]})"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">combined_conditions</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">blank?</span>
<span class="ruby-identifier">group_maxes_sql</span> <span class="ruby-operator">+=</span> <span class="ruby-node">" GROUP BY complete_bodysizes.#{@grouping_field.field_name} #{graph_criteria}) AS maxes"</span>
<span class="ruby-identifier">full_records_grouped_by_max_sql</span> = <span class="ruby-node">"complete_bodysizes INNER JOIN #{group_maxes_sql} ON maxes.max_biovolume=complete_bodysizes.#{@data_field} AND maxes.#{@grouping_field.field_name}=complete_bodysizes.#{@grouping_field.field_name}"</span>
<span class="ruby-identifier">sql</span> = <span class="ruby-node">"SELECT DISTINCT complete_bodysizes.* FROM #{full_records_grouped_by_max_sql}"</span>
<span class="ruby-identifier">sql</span> <span class="ruby-operator">+=</span> <span class="ruby-node">" ORDER BY complete_bodysizes.#{@grouping_field.field_name} #{graph_criteria}"</span>
<span class="ruby-identifier">combined_conditions</span>[<span class="ruby-value">0</span>] = <span class="ruby-identifier">sql</span>
<span class="ruby-comment cmt">## Run this query along with any additional criteria that may limit records the user can view</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:show_all</span>]
<span class="ruby-ivar">@bodysizes</span> = <span class="ruby-ivar">@current_logged_in_user</span>.<span class="ruby-identifier">get_complete_records</span>({ <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">combined_conditions</span> })
<span class="ruby-keyword kw">else</span>
<span class="ruby-ivar">@bodysizes</span> = <span class="ruby-ivar">@current_logged_in_user</span>.<span class="ruby-identifier">get_complete_records</span>({ <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">combined_conditions</span> }, { <span class="ruby-identifier">:page</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"page"</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>, <span class="ruby-identifier">:per_page</span> =<span class="ruby-operator">></span> <span class="ruby-value">3</span> })
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:graph</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"1"</span>
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">"Graph Yes"</span>)
<span class="ruby-comment cmt">## Prepare a graph of the results</span>
<span class="ruby-identifier">bodysizes_for_graph</span> = <span class="ruby-ivar">@current_logged_in_user</span>.<span class="ruby-identifier">get_complete_records</span>({ <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">combined_conditions</span> })
<span class="ruby-ivar">@periods</span> = <span class="ruby-constant">Period</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">:all</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> [<span class="ruby-value str">"midpoint <=? AND midpoint >=?"</span>, <span class="ruby-identifier">start_period</span>, <span class="ruby-identifier">end_period</span>], <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"midpoint DESC"</span>)
<span class="ruby-ivar">@charts</span> = []
<span class="ruby-ivar">@charts</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">BodySize</span><span class="ruby-operator">::</span><span class="ruby-constant">Graph</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bodysizes_for_graph</span>, <span class="ruby-ivar">@periods</span>, { <span class="ruby-identifier">:grouping_field</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@grouping_field</span>, <span class="ruby-identifier">:data_field</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@data_field</span>, <span class="ruby-identifier">:period_spacing</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"midpoint"</span>, <span class="ruby-identifier">:x_axis_label_row_count</span> =<span class="ruby-operator">></span> <span class="ruby-value">5</span> } )
<span class="ruby-ivar">@charts</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">BodySize</span><span class="ruby-operator">::</span><span class="ruby-constant">Graph</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bodysizes_for_graph</span>, <span class="ruby-ivar">@periods</span>, { <span class="ruby-identifier">:grouping_field</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@grouping_field</span>, <span class="ruby-identifier">:data_field</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@data_field</span> } )
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
|
NESCent/max-bodysize-evol
|
doc/rdoc/classes/BodysizeController.src/M000178.html
|
HTML
|
mit
| 15,950
|
export * from './modules';
import {dependencies} from './dependencies';
import {default as bootstrap} from './bootstrap';
import {default as run} from './run';
export const application: angular.IModule = angular.module(
'Beacon',
dependencies
);
// Bootstrap the application.
bootstrap(application).then((): void => {
// Run the application.
run(application);
});
|
BeaconPlatform/frontend
|
application/entry.ts
|
TypeScript
|
mit
| 376
|
// the configured options and settings for Tutorial
#define Tutorial_VERSION_MAJOR 1
#define Tutorial_VERSION_MINOR 0
/* #undef USE_MYMATH */
|
abneye/CSCI2963-01-Spring2017
|
lab04/step03/TutorialConfig.h
|
C
|
mit
| 142
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace probno
{
class Program
{
static void Main(string[] args)
{
}
}
}
|
vasilchavdarov/SoftUniHomework
|
Projects/Exam Programing Fundamentals/probno/Program.cs
|
C#
|
mit
| 244
|
/*
HTML5 ✰ Boilerplate
style.css contains a reset, font normalization and some base styles.
credit is left where credit is due.
much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display:block;
}
ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after,
q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
/* tables still need cellspacing="0" in the markup */
table { border-collapse:collapse; border-spacing:0; }
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/* fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* remove arial, helvetica from explicit font stack
* we normalize monospace styles ourselves
* table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/* normalize monospace sizing
* en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
* minimal base styles
*/
body, select, input, textarea {
/* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */
color: #444;
/* set your base font here, to apply evenly */
font-family: Helvetica, Arial, sans-serif;
}
/* Headers (h1,h2,etc) have no default font-size or margin,
you'll want to define those yourself. */
h1,h2,h3,h4,h5,h6 { font-weight: bold; color: #fff; letter-spacing: 1px; text-shadow: 0 0 2px #000; }
h1 span, h2 span, h3 span, h4 span, h5 span, h6 span { color: #cc0000; }
/* always force a scrollbar in non-IE */
html { overflow-y: scroll; }
/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
a:hover, a:active { outline: none; }
a, a:active, a:visited { color: #EF7B00; text-decoration: none; }
a:hover { color: #EF7B00; text-decoration: underline; }
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
/* Remove margins for navigation lists */
ul, li { margin: 0; }
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre {
padding: 15px;
/* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
word-wrap: break-word; /* IE */
}
textarea { overflow: auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left: -7px; } /* thnx ivannikolic! */
/* align checkboxes, radios, text inputs with their label
by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
/* hand cursor on clickable input elements */
label, input[type=button], input[type=submit], button { cursor: pointer; }
/* webkit browsers add a 2px margin outside the chrome of form elements */
button, input, select, textarea { margin: 0; }
/* colors for form validity */
input:valid, textarea:valid { }
input:invalid, textarea:invalid {
border-radius: 1px;
-moz-box-shadow: 0px 0px 5px red;
-webkit-box-shadow: 0px 0px 5px red;
box-shadow: 0px 0px 5px red;
}
.no-boxshadow input:invalid,
.no-boxshadow textarea:invalid { background-color: #f0dddd; }
/* These selection declarations have to be separate.
No text-shadow: twitter.com/miketaylr/status/12228805301
Also: hot pink. */
::-moz-selection{ background: #cc0000; color:#fff; text-shadow: none; }
::selection { background: #cc0000; color:#fff; text-shadow: none; }
/* j.mp/webkit-tap-highlight-color */
a:link { -webkit-tap-highlight-color: #FF5E99; }
/* make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
button { width: auto; overflow: visible; }
/* bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
* Non-semantic helper classes
*/
/* for image replacement */
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
/* Hide for both screenreaders and browsers
css-discuss.incutio.com/wiki/Screenreader_Visibility */
.hidden { display: none; visibility: hidden; }
/* Hide only visually, but have it available for screenreaders
www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */
.visuallyhidden { position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px); }
/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }
/* >> The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */
.clearfix:before, .clearfix:after {
content: "\0020"; display: block; height: 0; visibility: hidden;
}
.clearfix:after { clear: both; }
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
.clearfix { zoom: 1; }
/* Primary Styles
Author:
*/
/* http://covertprestige.info/css/inline-block/ */
.inlineblock {
display: -moz-inline-stack;
display: inline-block;
vertical-align: middle;
*display: inline;
*zoom: 1;
}
/*
BUTTONS
*/
a.button, button, input.button {
display: inline-block;
white-space: nowrap;
padding: 3px 10px 3px 7px; /* Links */
background-color: #cc0000;
border: 1px solid #990000;
font-family: Arial, monospace, monaco;
text-transform: uppercase;
font-size: 1em;
text-decoration: none;
font-weight: bold;
text-align: center;
color: #fff;
cursor: pointer;
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
text-shadow: 0 0 2px #000;
position: relative;
behavior: url('../css/PIE.htc');
}
button {
width: auto;
overflow: visible;
padding: 3px 10px 3px 7px; /* IE6 */
}
button[type] {
padding: 3px 10px 3px 7px; /* Firefox */
line-height: 17px; /* Safari */
}
*:first-child+html button[type] {
padding: 3px 10px 3px 7px; /* IE7 */
}
a.button img, button img {
margin: 0 4px -4px 0 !important;
padding: 0;
border: none;
width: 16px;
height: 16px;
float: none;
}
a.button:hover, button:hover, input.button:hover {
color: #fff;
background-color: #666;
border: 1px solid #3b3b3b;
position: relative;
behavior: url('../css/PIE.htc');
}
a.button:active { border: 1px solid #ccc; color: #fff; }
|
abdeltiflouardi/VotreTicketAvion
|
web/css/base.css
|
CSS
|
mit
| 8,456
|
// Copyright (c) 2015-2018 Robert Rypuła - https://audio-network.rypula.pl
'use strict';
var
AudioMonoIO = AudioNetwork.Rewrite.WebAudio.AudioMonoIO,
WaveAnalyser = AudioNetwork.Rewrite.Dsp.WaveAnalyser;
function init() {
}
function checkWaveAnalyserPerformance() {
var log;
log = '';
log += runPerformanceTest(1 * 1024) + '\n<br/>';
log += runPerformanceTest(2 * 1024) + '\n<br/>';
log += runPerformanceTest(4 * 1024) + '\n<br/>';
log += runPerformanceTest(8 * 1024) + '\n<br/>';
log += runPerformanceTest(16 * 1024) + '\n<br/>';
log += runPerformanceTest(32 * 1024) + '\n<br/>';
log += runPerformanceTest(64 * 1024) + '\n<br/>';
html('#log-performance', log);
}
function runPerformanceTest(windowSize) {
var
SAMPLE_RATE = 48000, // fixed for all devices
SUBCARRIERS = 100, // for average
dummySamplePerPeriod,
windowFunction,
waveAnalyser,
i,
j,
decibel,
timeDomainData = [],
start,
end,
oneSubcarrierTime,
windowSizeDurationMs,
subcarriersPerSecond;
for (i = 0; i < windowSize; i++) {
timeDomainData.push(-1 + 2 * Math.random());
}
start = new Date().getTime();
dummySamplePerPeriod = 1; // could be any other value
windowFunction = true;
waveAnalyser = new WaveAnalyser(dummySamplePerPeriod, windowSize, windowFunction);
for (i = 0; i < SUBCARRIERS; i++) {
waveAnalyser.setSamplePerPeriod(1 + i);
for (j = 0; j < windowSize; j++) {
waveAnalyser.handle(timeDomainData[j]);
}
decibel = waveAnalyser.getDecibel();
}
end = new Date().getTime();
oneSubcarrierTime = (end - start) / SUBCARRIERS;
windowSizeDurationMs = (windowSize / SAMPLE_RATE) * 1000;
subcarriersPerSecond = windowSizeDurationMs / oneSubcarrierTime;
return '' +
'<b>Window size:</b> ' + windowSize + ' samples\n<br/>' +
'<b>Window time:</b> ' + windowSizeDurationMs.toFixed(1) + ' ms\n<br/>' +
'<b>One frequency computation time:</b> ' + oneSubcarrierTime + ' ms (' + (100 * (oneSubcarrierTime / windowSizeDurationMs)).toFixed(1) + ' % of window time)\n<br/>' +
'<b>[estimation] Real-time frequencies:</b> ' + subcarriersPerSecond.toFixed(0) + '\n<br/>' +
'<b>[estimation] DFT computing time:</b> ' + (0.5 * oneSubcarrierTime * windowSize / 1000).toFixed(3) + ' s\n<br/>';
}
|
robertrypula/AudioNetwork
|
example/00-03-02-wave-analyser-performance/wave-analyser-performance.js
|
JavaScript
|
mit
| 2,472
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FileMatcher = exports.excludedNames = undefined;
var _bluebirdLst;
function _load_bluebirdLst() {
return _bluebirdLst = require("bluebird-lst");
}
var _bluebirdLst2;
function _load_bluebirdLst2() {
return _bluebirdLst2 = _interopRequireDefault(require("bluebird-lst"));
}
exports.getMainFileMatchers = getMainFileMatchers;
exports.getFileMatchers = getFileMatchers;
exports.copyFiles = copyFiles;
var _builderUtil;
function _load_builderUtil() {
return _builderUtil = require("builder-util");
}
var _fs;
function _load_fs() {
return _fs = require("builder-util/out/fs");
}
var _fsExtraP;
function _load_fsExtraP() {
return _fsExtraP = require("fs-extra-p");
}
var _minimatch;
function _load_minimatch() {
return _minimatch = require("minimatch");
}
var _path = _interopRequireWildcard(require("path"));
var _core;
function _load_core() {
return _core = require("./core");
}
var _filter;
function _load_filter() {
return _filter = require("./util/filter");
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// https://github.com/electron-userland/electron-builder/issues/733
const minimatchOptions = { dot: true };
// noinspection SpellCheckingInspection
const excludedNames = exports.excludedNames = ".git,.hg,.svn,CVS,RCS,SCCS," + "__pycache__,.DS_Store,thumbs.db,.gitignore,.gitkeep,.gitattributes,.npmignore," + ".idea,.vs,.flowconfig,.jshintrc,.eslintrc,.circleci," + ".yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,package-lock.json,npm-debug.log," + "appveyor.yml,.travis.yml,circle.yml,.nyc_output";
/** @internal */
class FileMatcher {
constructor(from, to, macroExpander, patterns) {
this.macroExpander = macroExpander;
this.excludePatterns = null;
this.from = macroExpander(from);
this.to = macroExpander(to);
this.patterns = (0, (_builderUtil || _load_builderUtil()).asArray)(patterns).map(it => this.normalizePattern(it));
this.isSpecifiedAsEmptyArray = Array.isArray(patterns) && patterns.length === 0;
}
normalizePattern(pattern) {
if (pattern.startsWith("./")) {
pattern = pattern.substring("./".length);
}
return _path.posix.normalize(this.macroExpander(pattern.replace(/\\/g, "/")));
}
addPattern(pattern) {
this.patterns.push(this.normalizePattern(pattern));
}
prependPattern(pattern) {
this.patterns.unshift(this.normalizePattern(pattern));
}
isEmpty() {
return this.patterns.length === 0;
}
containsOnlyIgnore() {
return !this.isEmpty() && this.patterns.find(it => !it.startsWith("!")) == null;
}
computeParsedPatterns(result, fromDir) {
const relativeFrom = fromDir == null ? null : _path.relative(fromDir, this.from);
if (this.patterns.length === 0 && relativeFrom != null) {
// file mappings, from here is a file
result.push(new (_minimatch || _load_minimatch()).Minimatch(relativeFrom, minimatchOptions));
return;
}
for (let pattern of this.patterns) {
if (relativeFrom != null) {
pattern = _path.join(relativeFrom, pattern);
}
const parsedPattern = new (_minimatch || _load_minimatch()).Minimatch(pattern, minimatchOptions);
result.push(parsedPattern);
// do not add if contains dot (possibly file if has extension)
if (!pattern.includes(".") && !(0, (_filter || _load_filter()).hasMagic)(parsedPattern)) {
// https://github.com/electron-userland/electron-builder/issues/545
// add **/*
result.push(new (_minimatch || _load_minimatch()).Minimatch(`${pattern}/**/*`, minimatchOptions));
}
}
}
createFilter() {
const parsedPatterns = [];
this.computeParsedPatterns(parsedPatterns);
return (0, (_filter || _load_filter()).createFilter)(this.from, parsedPatterns, this.excludePatterns);
}
toString() {
return `from: ${this.from}, to: ${this.to}, patterns: ${this.patterns.join(", ")}`;
}
}
exports.FileMatcher = FileMatcher; /** @internal */
function getMainFileMatchers(appDir, destination, macroExpander, platformSpecificBuildOptions, packager, outDir, isElectronCompile) {
const buildResourceDir = _path.resolve(packager.info.projectDir, packager.buildResourcesDir);
let matchers = packager.info.isPrepackedAppAsar ? null : getFileMatchers(packager.info.config, "files", appDir, destination, macroExpander, platformSpecificBuildOptions);
if (matchers == null) {
matchers = [new FileMatcher(appDir, destination, macroExpander)];
}
const matcher = matchers[0];
// add default patterns, but only if from equals to app dir
if (matcher.from !== appDir) {
return matchers;
}
// https://github.com/electron-userland/electron-builder/issues/1741#issuecomment-311111418 so, do not use inclusive patterns
const patterns = matcher.patterns;
const customFirstPatterns = [];
// electron-webpack - we need to copy only package.json and node_modules from root dir (and these files are added by default), so, explicit empty array is specified
if (!matcher.isSpecifiedAsEmptyArray && (matcher.isEmpty() || matcher.containsOnlyIgnore())) {
customFirstPatterns.push("**/*");
} else {
// prependPattern - user pattern should be after to be able to override
// do not use **/node_modules/**/* because if pattern starts with **, all not explicitly excluded directories will be traversed (performance + empty dirs will be included into the asar)
customFirstPatterns.push("node_modules/**/*");
if (!patterns.includes("package.json")) {
patterns.push("package.json");
}
}
// https://github.com/electron-userland/electron-builder/issues/1482
const relativeBuildResourceDir = _path.relative(matcher.from, buildResourceDir);
if (relativeBuildResourceDir.length !== 0 && !relativeBuildResourceDir.startsWith(".")) {
customFirstPatterns.push(`!${relativeBuildResourceDir}{,/**/*}`);
}
const relativeOutDir = matcher.normalizePattern(_path.relative(packager.info.projectDir, outDir));
if (!relativeOutDir.startsWith(".")) {
customFirstPatterns.push(`!${relativeOutDir}{,/**/*}`);
}
// add our default exclusions after last user possibly defined "all"/permissive pattern
let insertIndex = 0;
for (let i = patterns.length - 1; i >= 0; i--) {
if (patterns[i].startsWith("**/")) {
insertIndex = i + 1;
break;
}
}
patterns.splice(insertIndex, 0, ...customFirstPatterns);
// not moved to copyNodeModules because depends on platform packager (for now, not easy)
if (packager.platform !== (_core || _load_core()).Platform.WINDOWS) {
// https://github.com/electron-userland/electron-builder/issues/1738
patterns.push("!**/node_modules/**/*.{dll,exe}");
}
patterns.push(`!**/*.{iml,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,suo,xproj,cc,pdb}`);
patterns.push("!**/._*");
patterns.push("!**/electron-builder.{yaml,yml,json,json5,toml}");
//noinspection SpellCheckingInspection
patterns.push(`!**/{${excludedNames}}`);
if (isElectronCompile) {
patterns.push("!.cache{,/**/*}");
}
// https://github.com/electron-userland/electron-builder/issues/1969
// exclude ony for app root, use .yarnclean to clean node_modules
patterns.push("!.editorconfig");
const debugLogger = packager.info.debugLogger;
if (debugLogger.enabled) {
//tslint:disable-next-line:no-invalid-template-strings
debugLogger.add(`${macroExpander("${arch}")}.firstOrDefaultFilePatterns`, patterns);
}
return matchers;
}
/** @internal */
function getFileMatchers(config, name, defaultSrc, defaultDestination, macroExpander, customBuildOptions) {
const globalPatterns = config[name];
const platformSpecificPatterns = customBuildOptions[name];
const defaultMatcher = new FileMatcher(defaultSrc, defaultDestination, macroExpander);
const fileMatchers = [];
function addPatterns(patterns) {
if (patterns == null) {
return;
} else if (!Array.isArray(patterns)) {
if (typeof patterns === "string") {
defaultMatcher.addPattern(patterns);
return;
}
patterns = [patterns];
}
for (const pattern of patterns) {
if (typeof pattern === "string") {
// use normalize to transform ./foo to foo
defaultMatcher.addPattern(pattern);
} else if (name === "asarUnpack") {
throw new Error(`Advanced file copying not supported for "${name}"`);
} else {
const from = pattern.from == null ? defaultSrc : _path.resolve(defaultSrc, pattern.from);
const to = pattern.to == null ? defaultDestination : _path.resolve(defaultDestination, pattern.to);
fileMatchers.push(new FileMatcher(from, to, macroExpander, pattern.filter));
}
}
}
addPatterns(globalPatterns);
addPatterns(platformSpecificPatterns);
if (!defaultMatcher.isEmpty()) {
// default matcher should be first in the array
fileMatchers.unshift(defaultMatcher);
}
return fileMatchers.length === 0 ? null : fileMatchers;
}
/** @internal */
function copyFiles(matchers) {
if (matchers == null || matchers.length === 0) {
return (_bluebirdLst2 || _load_bluebirdLst2()).default.resolve();
}
return (_bluebirdLst2 || _load_bluebirdLst2()).default.map(matchers, (() => {
var _ref = (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* (matcher) {
const fromStat = yield (0, (_fs || _load_fs()).statOrNull)(matcher.from);
if (fromStat == null) {
(0, (_builderUtil || _load_builderUtil()).warn)(`File source ${matcher.from} doesn't exist`);
return;
}
if (fromStat.isFile()) {
const toStat = yield (0, (_fs || _load_fs()).statOrNull)(matcher.to);
// https://github.com/electron-userland/electron-builder/issues/1245
if (toStat != null && toStat.isDirectory()) {
return yield (0, (_fs || _load_fs()).copyOrLinkFile)(matcher.from, _path.join(matcher.to, _path.basename(matcher.from)), fromStat);
}
yield (0, (_fsExtraP || _load_fsExtraP()).mkdirs)(_path.dirname(matcher.to));
return yield (0, (_fs || _load_fs()).copyOrLinkFile)(matcher.from, matcher.to, fromStat);
}
if (matcher.isEmpty() || matcher.containsOnlyIgnore()) {
matcher.prependPattern("**/*");
}
if ((_builderUtil || _load_builderUtil()).debug.enabled) {
(0, (_builderUtil || _load_builderUtil()).debug)(`Copying files using pattern: ${matcher}`);
}
return yield (0, (_fs || _load_fs()).copyDir)(matcher.from, matcher.to, { filter: matcher.createFilter() });
});
return function (_x) {
return _ref.apply(this, arguments);
};
})());
}
//# sourceMappingURL=fileMatcher.js.map
|
302bis/figma-app-ubuntu
|
app/node_modules/electron-builder/out/fileMatcher.js
|
JavaScript
|
mit
| 11,762
|
;(function($){
"use strict";
// youtube
var fnResizeMedia = function() {
$("div.movie").each(function(i, el){
$("iframe", el).each(function(j, iframe){
var w = $(el).width();
var h = w * 0.5625;
$(iframe).width(w);
$(iframe).height(h);
})
})
};
// --
fnResizeMedia();
$(window).resize(fnResizeMedia);
})(jQuery);
|
scienceaction/scienceaction.github.io
|
assets/js/scienceaction.js
|
JavaScript
|
mit
| 350
|
// Relabelling.cpp
// created by Kuangdai on 6-Jun-2016
// particle relabelling
#include "Relabelling.h"
#include "Quad.h"
#include "SpectralConstants.h"
#include "Geometric3D.h"
#include "XMath.h"
#include "Geodesy.h"
#include "PreloopFFTW.h"
#include "PRT_1D.h"
#include "PRT_3D.h"
Relabelling::Relabelling(const Quad *quad):
mMyQuad(quad) {
mStiff_dZ = RDMatXN::Zero(mMyQuad->getNr(), nPE);
mStiff_dZdR = RDMatXN::Zero(mMyQuad->getNr(), nPE);
mStiff_dZdT = RDMatXN::Zero(mMyQuad->getNr(), nPE);
mStiff_dZdZ = RDMatXN::Zero(mMyQuad->getNr(), nPE);
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
int ipnt = ipol * nPntEdge + jpol;
mMass_dZ[ipnt] = RDColX::Zero(mMyQuad->getPointNr(ipol, jpol));
mMass_dZdR[ipnt] = RDColX::Zero(mMyQuad->getPointNr(ipol, jpol));
mMass_dZdT[ipnt] = RDColX::Zero(mMyQuad->getPointNr(ipol, jpol));
mMass_dZdZ[ipnt] = RDColX::Zero(mMyQuad->getPointNr(ipol, jpol));
}
}
}
void Relabelling::addUndulation(const std::vector<Geometric3D *> &g3D,
double srcLat, double srcLon, double srcDep, double phi2D) {
if (g3D.size() == 0) {
return;
}
double rElemCenter = mMyQuad->computeCenterRadius();
int Nr = mMyQuad->getNr();
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
int ipnt = ipol * nPntEdge + jpol;
const RDCol2 &xieta = SpectralConstants::getXiEta(ipol, jpol, mMyQuad->isAxial());
const RDMatX3 &rtpS = mMyQuad->computeGeocentricGlobal(srcLat, srcLon, srcDep, xieta, Nr, phi2D);
for (int alpha = 0; alpha < Nr; alpha++) {
double r = rtpS(alpha, 0);
double t = rtpS(alpha, 1);
double p = rtpS(alpha, 2);
for (const auto &model: g3D) {
mStiff_dZ(alpha, ipnt) += model->getDeltaR(r, t, p, rElemCenter);
}
}
}
}
if (!isZero()) {
checkHmin();
formGradientUndulation();
formMassUndulation();
}
}
RDMatXN Relabelling::getStiffJacobian() const {
int n = mMyQuad->getNr();
RDMatXN J(n, nPE);
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
const RDCol2 &xieta = SpectralConstants::getXiEta(ipol, jpol, mMyQuad->isAxial());
double Z = mMyQuad->mapping(xieta).norm();
int ipnt = ipol * nPntEdge + jpol;
if (Z < tinyDouble) {
const RDColX &J22 = RDColX::Ones(n) + mStiff_dZdZ.col(ipnt);
J.col(ipnt) = J22.schur(J22).schur(J22);
} else {
const RDColX &J00 = RDColX::Ones(n) + mStiff_dZ.col(ipnt) / Z;
const RDColX &J22 = RDColX::Ones(n) + mStiff_dZdZ.col(ipnt);
J.col(ipnt) = J00.schur(J00).schur(J22);
}
}
}
if (J.array().minCoeff() <= 0.) {
throw std::runtime_error("Relabelling::getStiffJacobian || Negative Jacobian.");
}
return J;
}
RDMatXN4 Relabelling::getStiffX() const {
int n = mMyQuad->getNr();
RDMatXN4 X(n, nPE * 4);
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
const RDCol2 &xieta = SpectralConstants::getXiEta(ipol, jpol, mMyQuad->isAxial());
double Z = mMyQuad->mapping(xieta).norm();
int ipnt = ipol * nPntEdge + jpol;
RDColX J0(n), J1(n), J2(n), J3(n);
if (Z < tinyDouble) {
J0 = RDColX::Ones(n) + mStiff_dZdZ.col(ipnt);
} else {
J0 = RDColX::Ones(n) + mStiff_dZ.col(ipnt) / Z;
}
J1 = mStiff_dZdR.col(ipnt);
J2 = mStiff_dZdT.col(ipnt);
J3 = RDColX::Ones(n) + mStiff_dZdZ.col(ipnt);
X.col(nPE * 0 + ipnt) = J0.array().pow(-1.).matrix();
X.col(nPE * 1 + ipnt) = -J1.schur((J0.schur(J3)).array().pow(-1.).matrix());
X.col(nPE * 2 + ipnt) = -J2.schur((J0.schur(J3)).array().pow(-1.).matrix());
X.col(nPE * 3 + ipnt) = J3.array().pow(-1.).matrix();
}
}
return X;
}
arPP_RDColX Relabelling::getMassJacobian() const {
arPP_RDColX J;
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
int n = mMyQuad->getPointNr(ipol, jpol);
const RDCol2 &xieta = SpectralConstants::getXiEta(ipol, jpol, mMyQuad->isAxial());
double Z = mMyQuad->mapping(xieta).norm();
int ipnt = ipol * nPntEdge + jpol;
if (Z < tinyDouble) {
const RDColX &J22 = RDColX::Ones(n) + mMass_dZdZ[ipnt];
J[ipnt] = J22.schur(J22).schur(J22);
} else {
const RDColX &J00 = RDColX::Ones(n) + mMass_dZ[ipnt] / Z;
const RDColX &J22 = RDColX::Ones(n) + mMass_dZdZ[ipnt];
J[ipnt] = J00.schur(J00).schur(J22);
}
if (J[ipnt].array().minCoeff() <= 0.) {
throw std::runtime_error("Relabelling::getMassJacobian || Negative Jacobian.");
}
}
}
return J;
}
RDMatX3 Relabelling::getSFNormalRTZ(int ipol, int jpol) const {
int n = mMyQuad->getPointNr(ipol, jpol);
const RDCol2 &xieta = SpectralConstants::getXiEta(ipol, jpol, mMyQuad->isAxial());
double Z = mMyQuad->mapping(xieta).norm();
int ipnt = ipol * nPntEdge + jpol;
RDColX J0(n), J1(n), J2(n);
if (Z < tinyDouble) {
J0 = RDColX::Ones(n) + mMass_dZdZ[ipnt];
} else {
J0 = RDColX::Ones(n) + mMass_dZ[ipnt] / Z;
}
J1 = mMass_dZdR[ipnt];
J2 = mMass_dZdT[ipnt];
RDMatX3 normal(n, 3);
normal.col(0) = -J1.schur(J0);
normal.col(1) = -J2.schur(J0);
normal.col(2) = J0.schur(J0);
return normal;
}
bool Relabelling::isZero() const {
return mStiff_dZ.array().abs().maxCoeff() < tinyDouble;
}
bool Relabelling::isPar1D() const {
return XMath::equalRows(mStiff_dZ);
}
PRT *Relabelling::createPRT(bool elem1D) const {
if (isZero()) {
return 0;
}
const RDMatXN4 &X = getStiffX();
if (elem1D) {
std::array<RMatPP, 4> xstruct;
for (int idim = 0; idim < 4; idim++) {
RDRowN xi_flat = X.block(0, nPE * idim, 1, nPE);
RDMatPP xi_strct;
XMath::structuredUseFirstRow(xi_flat, xi_strct);
xstruct[idim] = xi_strct.cast<Real>();
}
return new PRT_1D(xstruct);
} else {
return new PRT_3D(X.cast<Real>());
}
}
////////////////////////////////////////////////////////////////////////////////////////////
void Relabelling::checkHmin() {
int Nr = mMyQuad->getNr();
int maxOrder = (Nr + 1) / 2 - 1;
RDMatXN original = mStiff_dZ;
for (int order = 0; order <= maxOrder; order++) {
// gaussian smooth
for (int ipnt = 0; ipnt < nPntElem; ipnt++) {
RDColX data = original.col(ipnt);
XMath::gaussianSmoothing(data, order, 100, true);
mStiff_dZ.col(ipnt) = data;
}
// compute hmin
const RDColX &hmin = mMyQuad->getHminSlices();
double hmin_all = XMath::trigonResampling(5 * Nr, hmin).minCoeff();
if (hmin_all >= hmin.minCoeff() * .8) {
// if (order >= 2) {
// std::cout << order << " " << Nr << std::endl;
// for (int i = 0; i < Nr; i++)
// std::cout << original.col(0)(i) << " " << mStiff_dZ.col(0)(i) << std::endl;
// std::cout << std::endl << std::endl;
// }
return;
}
}
throw std::runtime_error("Relabelling::checkHmin || Program should not have reached here.");
}
void Relabelling::formGradientUndulation() {
int Nr = mMyQuad->getNr();
int Nu = Nr / 2;
// mask Nyquist first
if (Nr % 2 == 0) {
for (int ipnt = 0; ipnt < nPntElem; ipnt++) {
const RDColX &data_even = mStiff_dZ.col(ipnt);
const RDColX &data_odd = XMath::trigonResampling(Nr - 1, data_even);
mStiff_dZ.col(ipnt) = XMath::trigonResampling(Nr, data_odd);
}
}
// FFT R2C
vec_CDMatPP deltaR_C(Nu + 1, CDMatPP::Zero());
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
int ipnt = ipol * nPntEdge + jpol;
PreloopFFTW::getR2C_RMat(Nr) = mStiff_dZ.col(ipnt);
PreloopFFTW::computeR2C(Nr);
const CDColX &R2C_C = PreloopFFTW::getR2C_CMat(Nr);
for (int alpha = 0; alpha <= Nu; alpha++) {
deltaR_C[alpha](ipol, jpol) = R2C_C(alpha);
}
}
}
// gradient
const ar3_CDMatPP zero_ar3_CDMatPP = {CDMatPP::Zero(), CDMatPP::Zero(), CDMatPP::Zero()};
vec_ar3_CDMatPP nablaDeltaR_C(Nu + 1, zero_ar3_CDMatPP);
mMyQuad->computeGradientScalar(deltaR_C, nablaDeltaR_C);
// FFT C2R
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
int ipnt = ipol * nPntEdge + jpol;
CDColX &C2R_C = PreloopFFTW::getC2R_CMat(Nr);
// phi = T
for (int alpha = 0; alpha <= Nu; alpha++) {
C2R_C(alpha) = nablaDeltaR_C[alpha][1](ipol, jpol);
}
PreloopFFTW::computeC2R(Nr);
mStiff_dZdT.col(ipnt) = PreloopFFTW::getC2R_RMat(Nr);
// s
for (int alpha = 0; alpha <= Nu; alpha++) {
C2R_C(alpha) = nablaDeltaR_C[alpha][0](ipol, jpol);
}
PreloopFFTW::computeC2R(Nr);
RDColX drds = PreloopFFTW::getC2R_RMat(Nr);
// z
for (int alpha = 0; alpha <= Nu; alpha++) {
C2R_C(alpha) = nablaDeltaR_C[alpha][2](ipol, jpol);
}
PreloopFFTW::computeC2R(Nr);
RDColX drdz = PreloopFFTW::getC2R_RMat(Nr);
// rotate s-phi-z to RTZ
const RDCol2 &xieta = SpectralConstants::getXiEta(ipol, jpol, mMyQuad->isAxial());
double theta = Geodesy::theta(mMyQuad->mapping(xieta));
mStiff_dZdZ.col(ipnt) = drdz * cos(theta) + drds * sin(theta);
mStiff_dZdR.col(ipnt) = -drdz * sin(theta) + drds * cos(theta);
}
}
}
void Relabelling::formMassUndulation() {
for (int ipol = 0; ipol <= nPol; ipol++) {
for (int jpol = 0; jpol <= nPol; jpol++) {
int ipnt = ipol * nPntEdge + jpol;
int nr_mass = mMyQuad->getPointNr(ipol, jpol);
mMass_dZ[ipnt] = XMath::linearResampling(nr_mass, mStiff_dZ.col(ipnt));
mMass_dZdR[ipnt] = XMath::linearResampling(nr_mass, mStiff_dZdR.col(ipnt));
mMass_dZdT[ipnt] = XMath::linearResampling(nr_mass, mStiff_dZdT.col(ipnt));
mMass_dZdZ[ipnt] = XMath::linearResampling(nr_mass, mStiff_dZdZ.col(ipnt));
}
}
}
|
kuangdai/AxiSEM3D
|
SOLVER/src/preloop/physics/relabelling/Relabelling.cpp
|
C++
|
mit
| 11,028
|
#ifndef GENETIC_RANDOMPOPULATIONGENERATOR_HPP_
#define GENETIC_RANDOMPOPULATIONGENERATOR_HPP_
#include "data/Graph.hpp"
#include "genetic/Population.hpp"
namespace tsp
{
class RandomPopulationGenerator
{
private:
const Graph &graph_;
unsigned int startNode_;
public:
RandomPopulationGenerator(const Graph &graph);
~RandomPopulationGenerator();
void setStartNode(const unsigned int startNode);
void generateIndividual(Individual &individual);
void generatePopulation(Population &population, const unsigned int size);
};
}
#endif
|
AvS2016/ParallelTSP
|
src/genetic/RandomPopulationGenerator.hpp
|
C++
|
mit
| 610
|
package at.fishkog.als.ui.actions;
import java.util.Stack;
import at.fishkog.als.AdvancedLogicSimulator;
public class Actions {
//TODO Temp needs to be initialized in each project
public static final Actions instance = new Actions();
private Stack<Action> actions;
public Actions() {
actions = new Stack<Action>();
}
protected void add(Action action) {
if(actions.isEmpty()) {
AdvancedLogicSimulator.mainUi.menuItemUndo.setDisable(false);
}
this.actions.push(action);
}
public void undo() {
if(actions.isEmpty()) return;
Action action = actions.pop();
action.type.undo(action);
if(actions.isEmpty()) {
AdvancedLogicSimulator.mainUi.menuItemUndo.setDisable(true);
}
}
}
|
domkog/AdvancedLogicSimulator
|
AdvancedLogicSimulator/src/at/fishkog/als/ui/actions/Actions.java
|
Java
|
mit
| 750
|
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{tikz}
\begin{document}
\title{OPAM for Coq}
\author{Guillaume Claret}
\date{October 23, 2014 - Coq Working Group}
\maketitle
\section*{Need}
\begin{frame}
\frametitle{The need for a package manager}
Even if there seem to be more and more developers:
\begin{itemize}
\item few user developments are reused
\item \emph{contribs} mechanism, but outdated and centralized
\item no simple / uniform way to install a foreign library
\end{itemize}
A lot of time is lost. What other programming languages have:
\begin{center}
\emph{A package manager.}
\end{center}
\end{frame}
\section*{Plan}
\begin{frame}
\tableofcontents
\end{frame}
\section{OPAM}
\begin{frame}
\frametitle{OPAM}
\begin{center}
\includegraphics[width=4cm]{images/opam}
\end{center}
\end{frame}
\begin{frame}
\frametitle{OPAM: the package manager of OCaml}
We will use OPAM.
Why?
\begin{itemize}
\item OCaml people are our closest cousins
\item some Coq developments depend on OCaml packages
\end{itemize}
What it is?
\begin{itemize}
\item a tool made by OCaml Pro
\item 772 OCaml packages today
\item dependency management based on the Mancoosi project
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{What we have}
\begin{itemize}
\item a website (not online yet)
\item four repositories: \emph{stable}, \emph{testing}, \emph{unstable}, \emph{coqs}.
Hosted on \url{https://github.com/coq}.
\item a bench system
Hosted on \url{https://github.com/coq-bench}.
\end{itemize}
\end{frame}
\section{Demo}
\begin{frame}
\frametitle{Demo}
\begin{center}
\includegraphics[width=4cm]{images/demo}
\end{center}
\end{frame}
\section{Policies}
\begin{frame}
\frametitle{Policies}
\begin{center}
\includegraphics[width=4cm]{images/policies}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Repositories}
\begin{itemize}
\item \emph{stable}: for stable release (link to a static archive)
The only one interesting for the end-users.
\item \emph{testing}: for beta versions or pre-releases
\item \emph{unstable}: anything, even links to Git masters
\item \emph{coqs}: Coq version for developers (branches, trunk)
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Naming scheme}
\begin{itemize}
\item regular expression: \texttt{coq-[a-Z0-9\textbackslash-]+}
\item example: \texttt{coq-ssreflect}
\item prefix \texttt{coq-} to distinguish from OCaml packages
\item lowercase letters, dash as separator (\texttt{-}) to be uniform
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Versions scheme}
We must be strict because people will use inequalities over version numbers for dependencies, and it has to be predictable.
\begin{itemize}
\item \emph{SemVer} convention: \texttt{MAJOR.MINOR.PATCH}. In theory:
\begin{itemize}
\item \texttt{MAJOR}: breaking changes
\item \texttt{MINOR}: backward compatible changes
\item \texttt{PATCH}: bug fixes
\end{itemize}
\item example: \texttt{1.5.1}
\item If it is hard for your package to follow, you probably need to do some \emph{divide and conquer}.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Versions scheme for non-stable releases}
Recommendations: using letters:
\begin{itemize}
\item pre-releases: \texttt{1.6-beta1} or \texttt{1.6-rc3} (are smaller than \texttt{1.6.0})
\item branches: \texttt{1.6.dev} (bigger than \texttt{1.6.0})
\item master: \texttt{dev} (bigger than any version starting with a number)
\end{itemize}
(the order on versions in OPAM is the same as in Debian)
\end{frame}
\begin{frame}
\frametitle{Build system}
Note: \emph{OPAM is not a build system.}
\begin{itemize}
\item to exploit the \texttt{-j} option of OPAM, we should enforce the:
\begin{center}
\texttt{make "-j\%{jobs}\%"}
\end{center}
in OPAM files.
\item we hope \texttt{coq\_makefile} will be enough for most of the packages
\end{itemize}
\end{frame}
\section{Bench system}
\begin{frame}
\frametitle{Bench system}
\begin{center}
\includegraphics[width=4cm]{images/bench}
\end{center}
\end{frame}
\section*{Conclusion}
\begin{frame}
\frametitle{TODO}
\begin{itemize}
\item add the OPAM website on \url{http://coq.inria.fr/}
\item improve the bench
\item what should we do with the \emph{contribs}?
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Thanks.}
\Huge{Thanks.}
\end{frame}
\end{document}
|
clarus/slides-coq-gt-october-2014
|
index.tex
|
TeX
|
mit
| 4,989
|
// This software is part of the Autofac IoC container
// Copyright (c) 2013 Autofac Contributors
// https://autofac.org
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
using System;
using NHibernate.Bytecode.Lightweight;
using NHibernate.Properties;
namespace Autofac.Extras.NHibernate.Bytecode
{
/// <summary>
/// Reflection optimizer implementation.
/// </summary>
public class AutofacReflectionOptimizer : ReflectionOptimizer
{
private readonly IComponentContext _container;
/// <summary>
/// Initializes a new instance of the <see cref="AutofacReflectionOptimizer"/> class.
/// </summary>
/// <param name="container">The container.</param>
/// <param name="mappedType">The type being mapped.</param>
/// <param name="getters">The getters.</param>
/// <param name="setters">The setters.</param>
public AutofacReflectionOptimizer(IComponentContext container, Type mappedType, IGetter[] getters, ISetter[] setters)
: base(mappedType, getters, setters)
{
_container = container;
}
/// <summary>
/// Creates the instance.
/// </summary>
/// <returns>The instance.</returns>
public override object CreateInstance()
{
if (_container.IsRegistered(mappedType))
return _container.Resolve(mappedType);
return _container.IsRegisteredWithName(mappedType.FullName, mappedType)
? _container.ResolveNamed(mappedType.FullName, mappedType)
: base.CreateInstance();
}
/// <summary>
/// Determines if an exception should be thrown for when no default constructor is found.
/// </summary>
/// <param name="type">The type.</param>
protected override void ThrowExceptionForNoDefaultCtor(Type type) { }
}
}
|
autofac/Autofac.Extras.NHibernate
|
src/Autofac.Extras.NHibernate/Bytecode/AutofacReflectionOptimizer.cs
|
C#
|
mit
| 2,949
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>W29300_text</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div style="margin-left: auto; margin-right: auto; width: 800px; overflow: hidden;">
<div style="float: left;">
<a href="page89.html">«</a>
</div>
<div style="float: right;">
</div>
</div>
<hr/>
<div style="position: absolute; margin-left: 106px; margin-top: 276px;">
<p class="styleSans41.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Measured Incl Dn'ft Tme Vertical C L O S U R E Dogleg -S E-W Section Distance Direction Severity <br/>Depth Angle Direction Vertical N FT De th FT FT FT FT De 100 77 3.89 221.17 ,21 <br/>___ A- nn-i nn f) 0’} -7 56 ' </p>
</div>
<div style="position: absolute; margin-left: 212px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">998.00 1098.00 1 198.00 1298.00 1398.00 </p>
</div>
<div style="position: absolute; margin-left: 127px; margin-top: 765px;">
<p class="styleSans61.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">1498.00 .58 247.23 1598.00 .34 262.58 1698.00 .31 218.62 1798.00 .08 306.51 1898.00 .04 117.27 <br/>Last Survey Depth Recorded 1978.00 .19 <br/> <br/>98.45 <br/> <br/> <br/>1497.97 1597.97 1697.97 1797.97 1897.97 <br/>1977.97 <br/>-4.01 4.24 -4.49 -4.66 4.64 <br/>-6.23 —6.99 -7 .45 -7.68 -7.70 <br/>7.41 8.17 8.70 8.98 8.99 <br/>237.23 238.74 238.91 238.73 238.95 <br/>.13 .27 .24 .32 .12 <br/> <br/> </p>
</div>
<div style="position: absolute; margin-left: 871px; margin-top: 2337px;">
<p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Page 2 Surface - 1978‘ MD. (Rate Gyro) File: S:\2014SU~1\EOG\GJ\PARSHALL\98\33H.SVY </p>
</div>
<div style="position: absolute; margin-left: 595px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">.40 <br/>.46 </p>
</div>
<div style="position: absolute; margin-left: 828px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">2 I l .35 254.60 230.31 277.24 240.89 </p>
</div>
<div style="position: absolute; margin-left: 1105px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">33/ .33 1097.99 1197.98 1297.98 1397.98 </p>
</div>
<div style="position: absolute; margin-left: 1445px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">-2.99 —3.32 -3‘48 -3.62 </p>
</div>
<div style="position: absolute; margin-left: 1742px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">-3.22 4.59 -5.41 </p>
</div>
<div style="position: absolute; margin-left: 2061px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>"></p>
</div>
<div style="position: absolute; margin-left: 2358px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">4.39 5.09 5.76 6.51 </p>
</div>
<div style="position: absolute; margin-left: 2613px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">227.06 229.29 232.83 236.23 </p>
</div>
<div style="position: absolute; margin-left: 2975px; margin-top: 510px;">
<p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">.18 .40 .32 </p>
</div>
</body>
</html>
|
datamade/elpc_bakken
|
ocr_extracted/W29300_text/page90.html
|
HTML
|
mit
| 4,221
|
export default () => ({
hostname: process.env.ES_HOST || 'localhost',
port: 1116,
useSslConnection: global.runningTestsInSecureMode,
validateServer: !global.runningTestsInSecureMode,
credentials: {
username: 'admin',
password: 'changeit'
},
poolOptions: {
autostart: false,
max: 10,
min: 0
},
connectionNameGenerator: () => `CUSTOM_TCP_CONNECTION_NAME_${new Date().getTime()}`
});
|
RemoteMetering/geteventstore-promise
|
tests/support/getTcpConfigCustomConnectionName.js
|
JavaScript
|
mit
| 399
|
---
layout: post
title: Node API Hooks
comments: true
categories: ["drupal 7"]
tags: ["drupal", "drupal 7"]
---
### Node API Function
Functions to define and modify content types.
Each content type is maintained by a primary module, which is either node.module (for content types created in the user interface) or the module that implements hook_node_info() to define the content type.
During node operations (create, update, view, delete, etc.), there are several sets of hooks that get invoked to allow modules to modify the base node operation:
- *Node-type-specific hooks: * When defining a node type, hook_node_info() returns a 'base' component. Node-type-specific hooks are named base_hookname() instead of mymodule_hookname() (in a module called 'mymodule' for example). Only the node type's corresponding implementation is invoked. For example, poll_node_info() in poll.module defines the base for the 'poll' node type as 'poll'. So when a poll node is created, hook_insert() is invoked on poll_insert() only. Hooks that are node-type-specific are noted below.
- *All-module hooks: * This set of hooks is invoked on all implementing modules, to allow other modules to modify what the primary node module is doing. For example, hook_node_insert() is invoked on all modules when creating a poll node.
- *Field hooks: * Hooks related to the fields attached to the node. These are invoked from the field operations functions described below, and can be either field-type-specific or all-module hooks.
- *Entity hooks: * Generic hooks for "entity" operations. These are always invoked on all modules.
Here is a list of the node and entity hooks that are invoked, field operations, and other steps that take place during node operations:
#### Creating a new node (calling node_save() on a new node):
- field_attach_presave()
- hook_node_presave() (all)
- hook_entity_presave() (all)
- Node and revision records are written to the database
- hook_insert() (node-type-specific)
- field_attach_insert()
- hook_node_insert() (all)
- hook_entity_insert() (all)
- hook_node_access_records() (all)
- hook_node_access_records_alter() (all)
#### Updating an existing node (calling node_save() on an existing node):
- field_attach_presave()
- hook_node_presave() (all)
- hook_entity_presave() (all)
- Node and revision records are written to the database
- hook_update() (node-type-specific)
- field_attach_update()
- hook_node_update() (all)
- hook_entity_update() (all)
- hook_node_access_records() (all)
- hook_node_access_records_alter() (all)
#### Loading a node (calling node_load(), node_load_multiple() or entity_load() with $entity_type of 'node'):
- Node and revision information is read from database.
- hook_load() (node-type-specific)
- field_attach_load_revision() and field_attach_load()
- hook_entity_load() (all)
- hook_node_load() (all)
#### Viewing a single node (calling node_view() - note that the input to node_view() is a loaded node, so the Loading steps above are already done):
- hook_view() (node-type-specific)
- field_attach_prepare_view()
- hook_entity_prepare_view() (all)
- field_attach_view()
- hook_node_view() (all)
- hook_entity_view() (all)
- hook_node_view_alter() (all)
- hook_entity_view_alter() (all)
#### Viewing multiple nodes (calling node_view_multiple() - note that the input to node_view_multiple() is a set of loaded nodes, so the Loading steps above are already done):
- field_attach_prepare_view()
- hook_entity_prepare_view() (all)
- hook_view() (node-type-specific)
- field_attach_view()
- hook_node_view() (all)
- hook_entity_view() (all)
- hook_node_view_alter() (all)
- hook_entity_view_alter() (all)
#### Deleting a node (calling node_delete() or node_delete_multiple()):
- Node is loaded (see Loading section above)
- hook_delete() (node-type-specific)
- hook_node_delete() (all)
- hook_entity_delete() (all)
- field_attach_delete()
- Node and revision information are deleted from database
#### Deleting a node revision (calling node_revision_delete()):
- Node is loaded (see Loading section above)
- Revision information is deleted from database
- hook_node_revision_delete() (all)
- field_attach_delete_revision()
#### Preparing a node for editing (calling node_form() - note that if it is an existing node, it will already be loaded; see the Loading section above):
- hook_prepare() (node-type-specific)
- hook_node_prepare() (all)
- hook_form() (node-type-specific)
- field_attach_form()
#### Validating a node during editing form submit (calling node_form_validate()):
- hook_validate() (node-type-specific)
- hook_node_validate() (all)
- field_attach_form_validate()
#### Searching (calling node_search_execute()):
- hook_ranking() (all)
- Query is executed to find matching nodes
- Resulting node is loaded (see Loading section above)
- Resulting node is prepared for viewing (see Viewing a single node above)
- comment_node_update_index() is called.
- hook_node_search_result() (all)
#### Search indexing (calling node_update_index()):
- Node is loaded (see Loading section above)
- Node is prepared for viewing (see Viewing a single node above)
- hook_node_update_index() (all)
## References
* [https://api.drupal.org/api/drupal/modules%21node%21node.api.php/group/node_api_hooks/7.x](https://api.drupal.org/api/drupal/modules%21node%21node.api.php/group/node_api_hooks/7.x)
|
minhhoit/minhhoit.github.io
|
_posts/2018-11-21-node-api-functions.md
|
Markdown
|
mit
| 5,361
|
// Copyright (c) 2016 Daniel Grunwald
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
use libc;
use ffi;
use std::mem;
use python::{Python, PythonObject, PyDrop, ToPythonPointer};
use objects::PyObject;
use function::AbortOnDrop;
// TODO: what's the semantics of the traverse return code?
// If it's just a normal python exception, we might want to use PyErr instead.
pub struct TraverseError(libc::c_int);
#[derive(Copy, Clone)]
pub struct VisitProc<'a> {
visit: ffi::visitproc,
arg: *mut libc::c_void,
/// VisitProc contains a Python instance to ensure that
/// 1) it is cannot be moved out of the traverse() call
/// 2) it cannot be sent to other threads
_py: Python<'a>
}
impl <'a> VisitProc<'a> {
pub fn call<T>(&self, obj: &T) -> Result<(), TraverseError>
where T: PythonObject
{
let r = unsafe { (self.visit)(obj.as_ptr(), self.arg) };
if r == 0 {
Ok(())
} else {
Err(TraverseError(r))
}
}
}
#[macro_export]
#[doc(hidden)]
macro_rules! py_class_tp_traverse {
($class_name:ident,
/* gc: */ {
/* traverse_proc: */ None,
/* traverse_data: */ [ ]
}) => {
// If there's nothing to traverse, we don't need to generate
// tp_traverse.
// Note that in this case, py_class_type_object_flags! must not
// use Py_TPFLAGS_HAVE_GC.
None
};
($class_name:ident,
/* gc: */ {
$traverse_proc: expr,
/* traverse_data: */ []
}) => {{
unsafe extern "C" fn tp_traverse(
slf: *mut $crate::_detail::ffi::PyObject,
visit: $crate::_detail::ffi::visitproc,
arg: *mut $crate::_detail::libc::c_void
) -> $crate::_detail::libc::c_int
{
$crate::py_class::gc::tp_traverse::<$class_name, _>(
concat!(stringify!($class_name), ".__traverse__"),
slf, visit, arg, $traverse_proc)
}
Some(tp_traverse)
}};
}
#[doc(hidden)]
pub unsafe fn tp_traverse<C, F>(
location: &str,
slf: *mut ffi::PyObject,
visit: ffi::visitproc,
arg: *mut libc::c_void,
callback: F
) -> libc::c_int
where C: PythonObject,
F: FnOnce(&C, Python, VisitProc) -> Result<(), TraverseError>
{
let guard = AbortOnDrop(location);
let py = Python::assume_gil_acquired();
let visit = VisitProc { visit: visit, arg: arg, _py: py };
let slf = PyObject::from_borrowed_ptr(py, slf).unchecked_cast_into::<C>();
let ret = match callback(&slf, py, visit) {
Ok(()) => 0,
Err(TraverseError(code)) => code
};
slf.release_ref(py);
mem::forget(guard);
ret
}
#[macro_export]
#[doc(hidden)]
macro_rules! py_class_tp_clear {
($class_name:ident) => {{
unsafe extern "C" fn tp_clear(
slf: *mut $crate::_detail::ffi::PyObject
) -> $crate::_detail::libc::c_int
{
$crate::py_class::gc::tp_clear::<$class_name, _>(
concat!(stringify!($class_name), ".__clear__"),
slf, $class_name::__clear__)
}
Some(tp_clear)
}}
}
#[doc(hidden)]
pub unsafe fn tp_clear<C, F>(
location: &str,
slf: *mut ffi::PyObject,
callback: F
) -> libc::c_int
where C: PythonObject,
F: FnOnce(&C, Python)
{
let guard = AbortOnDrop(location);
let py = Python::assume_gil_acquired();
let slf = PyObject::from_borrowed_ptr(py, slf).unchecked_cast_into::<C>();
callback(&slf, py);
slf.release_ref(py);
mem::forget(guard);
0
}
/*
/// Trait that has to be implemented by `#[gc_traverse]` members.
pub trait Traversable {
/// Call VisitProc for all python objects owned by this value.
fn traverse(&self, py: Python, visit: VisitProc) -> Result<(), TraverseError>;
}
impl <T> Traversable for T where T: PythonObject {
fn traverse(&self, _py: Python, visit: VisitProc) -> Result<(), TraverseError> {
visit.call(self.as_object())
}
}
impl <T> Traversable for Option<T> where T: Traversable {
fn traverse(&self, py: Python, visit: VisitProc) -> Result<(), TraverseError> {
match *self {
Some(ref val) => val.traverse(py, visit),
None => Ok(())
}
}
}
impl <T> Traversable for Vec<T> where T: Traversable {
fn traverse(&self, py: Python, visit: VisitProc) -> Result<(), TraverseError> {
for val in self {
try!(val.traverse(py, visit));
}
Ok(())
}
}
*/
|
naufraghi/rust-cpython
|
src/py_class/gc.rs
|
Rust
|
mit
| 5,520
|
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import datetime
import numpy as np
from copy import deepcopy
import sys
import logging
class System:
def __init__(self, _start_time, start_power=0, test_plan=None):
self.start_power = start_power
self.power_left = self.start_power
self.last_event = _start_time
self.last_decision = _start_time
self.decision_interval = (24*3600) / test_plan.state_number
self.reward = 0
self.time_to_read_input = 0
self.learning_a = deepcopy(test_plan.learning_module)
self.current_clock = self.learning_a.choose_action(0)
self.first_start = True
self.event_count = 0
self.awake_count = 0
self.ml_parameters = {'d_penalty': test_plan.delay_award, 'd_award': test_plan.delay_award,
's_penalty': test_plan.awake_penalty, 's_award': test_plan.awake_award,
'delay_threshold': test_plan.delay_threshold, 'delay_scale': 2}
self.power_consumption = {'sleep': 4.42, 'active': 63.68}
self.button_push_counter = 0
self.voltage = 6.54
self.b_event_action = False
print("d_penalty = ", self.ml_parameters['d_penalty'], "s_penalty", self.ml_parameters['s_penalty'],
's_award', self.ml_parameters['s_award'], "delay_threshold", self.ml_parameters['delay_threshold'])
def simulation_step(self, _current_time):
if self.time_to_read_input <= 0:
if self.b_event_action:
self.reward += self.ml_parameters['s_award']
self.b_event_action = False
else:
self.reward -= self.ml_parameters['s_penalty']
self.awake_count += 1
self.power_left += self.power_consumption['active'] * self.voltage / 1000.
self.time_to_read_input = self.current_clock
else:
self.power_left += self.power_consumption['sleep'] * self.voltage / 1000.
self.time_to_read_input -= 1
if _current_time - self.last_decision >= datetime.timedelta(seconds=self.decision_interval)\
or _current_time < self.last_decision:
self.last_decision = _current_time
state = (_current_time.hour * 3600 + _current_time.minute * 60 +
_current_time.second) / self.decision_interval
if not self.first_start:
# update (Q table)/knowledge
self.learning_a.update_knowledge(self.calculate_reward(), int(state))
self.first_start = False
# Learning - choose action
self.current_clock = self.learning_a.choose_action(int(state))
def reset_epoch(self):
self.power_left = self.start_power
self.button_push_counter = 0
self.event_count = 0
self.awake_count = 0
try:
self.learning_a.e_greedy *= .9
except AttributeError:
pass
def event_action(self, _):
self.event_count += 1
self.b_event_action = True
if self.time_to_read_input > np.random.normal(loc=self.ml_parameters['delay_threshold'],
scale=self.ml_parameters['delay_scale']):
self.reward -= self.ml_parameters['d_penalty']
self.button_push_counter += 1
else:
self.reward += self.ml_parameters['d_award']
self.reward -= self.time_to_read_input
return self.time_to_read_input
def calculate_reward(self):
reward = self.reward
self.reward = 0
self.awake_count = 0
self.event_count = 0
return reward
class SystemTransmission:
def __init__(self, _start_time, start_power=0, test_plan=None):
self.start_power = start_power
self.power_left = self.start_power
self.last_event = _start_time
self.last_decision = _start_time
self.decision_interval = 1200
self.reward = 0
self.power_reward = 0
self.time_to_read_input = 0
self.learning_a = deepcopy(test_plan.learning_module)
self.update_knowledge = False
self.event_count = 0
self.awake_count = 0
self.power_consumption = {'idle': 63.68, 'sleep': 4.42, 'off': None,
'gprs': [32.75, 36.39, 37.26, 38.82, 41.09, 42.99, 44.9, 46.81, 48.71, 50.62],
'sms': 16.37}
self.timings = {'sms': 18.16, 'gprs': [23.41, 25.13, 26.06, 27.19, 28.52, 29.74, 30.97, 32.3, 33.42, 34.65],
'deregister_sms': 2., 'deregister_gprs': 2.02}
self.rewards = {'delay_award': 150, 'delay_penalty': 150, 'buff_overflow': 10000, 'lost_message': 1000}
self.rewards_const = {'message_threshold': 500, 'power_scale': .2}
self.current_state = 'off'
self.max_buff_size = 9
self.buff = []
self.state_number = int(((24 * 60 * 60) / self.decision_interval) * (self.max_buff_size + 1))
self.delays = [[] for _ in range(self.state_number)]
self.button_push_counter = 0
self.action_time = None
self.last_action = None
self.aggregation_count = 0
self.mode = test_plan.mode
def simulation_step(self, _current_time):
# self.power_left += self.power_consumption['idle']
buff_timeout = 3600
if self.mode == 'timeout':
buff_timeout = 1200
for mgs in self.buff:
delay = self.datatime2seconds(_current_time) - self.datatime2seconds(mgs)
if delay < 0:
delay = 86400 - self.datatime2seconds(mgs) + self.datatime2seconds(_current_time)
# logging.error("rtime = " + str(_current_time) + "mgs = " + str(mgs))
if delay > buff_timeout:
# print(self.buff)
# logging.error("TIMEOUT! rtime = " + str(_current_time) + "mgs = " + str(mgs))
self.send_gprs(_current_time, add2buff=False)
self.learning_a.update_knowledge(-200, self.time2state(_current_time))
self.update_knowledge = False
def reset_epoch(self):
self.delays = [[] for _ in range(self.state_number)]
self.power_left = self.start_power
self.button_push_counter = 0
try:
self.learning_a.e_greedy *= .9
except AttributeError:
pass
def event_action(self, _current_time):
# logging.info("LEARNING MODE = " + str(self.mode))
state = self.time2state(_current_time)
if self.update_knowledge:
self.learning_a.update_knowledge(self.calculate_reward(_current_time), int(state))
self.update_knowledge = True
if self.mode == 'ml':
if len(self.buff) == 0:
action = self.learning_a.choose_action(state, restricted_state=[2])
elif len(self.buff) > 0:
action = self.learning_a.choose_action(state, restricted_state=[0])
elif self.mode == 'sms':
action = 0
elif self.mode == 'timeout':
action = 1
else:
logging.error("MODE NOT SET!")
sys.exit()
# logging.info("ACTION == " + str(action))
self.execute_action(action, _current_time)
def execute_action(self, action, time):
"""
# 0 - wyślij SMS
# 1 - dodaj wiadomość do bufora
# 2 - wyślij przez GPRS wiadomości z bufora
:param action:
:param time:
"""
if action == 0:
self.send_sms(time)
elif action == 1:
if len(self.buff) > self.max_buff_size - 2:
self.send_gprs(time)
else:
self.buffer_data(time)
elif action == 2:
self.send_gprs(time)
def buffer_data(self, r_time):
self.last_action = 'buff'
if len(self.buff) == 0:
self.action_time = r_time
self.buff.append(r_time)
else:
self.buff.append(r_time)
def send_sms(self, r_time):
self.last_action = 'sms'
self.action_time = r_time
time = self.timings['sms'] - self.timings['deregister_sms']
energy = self.power_consumption['sms'] # power consumed for sending sms
self.power_left += energy
if time < 0:
sys.exit()
self.delays[self.time2state(r_time)].append(time)
def send_gprs(self, r_time, add2buff=True):
self.aggregation_count = len(self.buff)
self.last_action = 'gprs'
if add2buff:
self.buff.append(r_time)
messages_number = len(self.buff)
time = self.timings['gprs'][messages_number] - self.timings['deregister_gprs']
energy = self.power_consumption['gprs'][messages_number]
self.power_left += energy
for mgs in self.buff:
delay = self.datatime2seconds(r_time) - self.datatime2seconds(mgs) + time
if delay > 14400:
logging.error("rtime = " + str(r_time) + "mgs = " + str(mgs))
if delay < 0:
delay = 86400 - self.datatime2seconds(mgs) + self.datatime2seconds(r_time) + time
self.delays[self.time2state(r_time)].append(delay)
self.buff.clear()
def calculate_reward(self, r_time):
if self.dates2seconds(r_time, self.action_time) > 350:
if self.last_action != 'buff':
reward = 100
else:
reward = -100
else:
if self.last_action == 'buff':
reward = 100
else:
reward = -100
if self.last_action == 'gprs':
if self.aggregation_count < 4:
reward -= 400
else:
reward += 200
# self.action_time = r_time
return reward
def delay2reward(self, seconds):
if seconds > self.rewards_const['message_threshold']:
self.button_push_counter += 1
return self.rewards['delay_penalty']
else:
return self.rewards['delay_award']
def time2state(self, _current_time):
time_state = int((_current_time.hour * 3600 + _current_time.minute * 60 + _current_time.second) /
self.decision_interval)
val = time_state + 72 * self.buff2state(len(self.buff))
return val
def datatime2seconds(self, _current_time):
return _current_time.hour * 3600 + _current_time.minute * 60 + _current_time.second
def dates2seconds(self, first_time, second_time):
res_time = self.datatime2seconds(first_time) - self.datatime2seconds(second_time)
if res_time < 0:
res_time = 86400 - self.datatime2seconds(second_time) + self.datatime2seconds(first_time)
return res_time
def buff2state(self, n):
if n == 0:
return 0
elif n == 1:
return 1
elif n < 8:
return int(np.log2(n)+1)
else:
return int(np.log2(n-1) + 1)
|
pwcz/ml_embedded
|
simulation_tool/symulator.py
|
Python
|
mit
| 11,083
|
<h4 id="buttons" class="section-header">Buttons</h4>
<div class="bs-component">
<a class="button-link" href="">Button Link</a>
<a class="button" href="">Anchor Button</a>
<button>Button Element</button>
<input type="submit" value="submit input">
<input type="button" value="button input">
</div>
|
darkmuzo/staging
|
components/forms/button.php
|
PHP
|
mit
| 309
|