Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code: DatasetGenerationError
Exception: ArrowInvalid
Message: JSON parse error: Missing a closing quotation mark in string. in row 697
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 145, in _generate_tables
dataset = json.load(f)
File "/usr/local/lib/python3.9/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 667)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1995, in _prepare_split_single
for _, table in generator:
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 148, in _generate_tables
raise e
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables
pa_table = paj.read_json(
File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: JSON parse error: Missing a closing quotation mark in string. in row 697
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1529, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1154, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2038, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
text
string | meta
dict |
|---|---|
@interface UIView (Spec)
- (UIView *)subviewWithAccessibilityIdentifier:(NSString *)accessibilityIdentifier;
- (void)tap;
- (void)swipe;
- (void)pinch;
@end
|
{
"content_hash": "041408cc9199cab886c00a7322ae7d6e",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 83,
"avg_line_length": 19.875,
"alnum_prop": 0.7421383647798742,
"repo_name": "alexbasson/ios_course",
"id": "b88ab10ca5ab40f2f942abdd0508c18a84a79a68",
"size": "184",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "Pods/PivotalCoreKit/UIKit/SpecHelper/Extensions/UIView+Spec.h",
"mode": "33188",
"license": "mit",
"language": []
}
|
================================================================================
HostVirtualSwitch
================================================================================
.. describe:: Property of
:py:class:`~pyvisdk.do.host_network_info.HostNetworkInfo`,
:py:class:`~pyvisdk.do.host_port_group.HostPortGroup`
.. describe:: See also
:py:class:`~pyvisdk.do.host_port_group.HostPortGroup`,
:py:class:`~pyvisdk.do.host_virtual_switch_spec.HostVirtualSwitchSpec`,
:py:class:`~pyvisdk.do.physical_nic.PhysicalNic`
.. describe:: Extends
:py:class:`~pyvisdk.mo.dynamic_data.DynamicData`
.. class:: pyvisdk.do.host_virtual_switch.HostVirtualSwitch
.. py:attribute:: key
The virtual switch key.
.. py:attribute:: mtu
The maximum transmission unit (MTU) associated with this virtual switch in bytes.
.. py:attribute:: name
The name of the virtual switch. Maximum length is 32 characters.
.. py:attribute:: numPorts
The number of ports that this virtual switch currently has.
.. py:attribute:: numPortsAvailable
The number of ports that are available on this virtual switch. There are a number of networking services that utilize a port on the virtual switch and are not accounted for in the Port array of a PortGroup. For example, each physical NIC attached to a virtual switch consumes one port. This property should be used when attempting to implement admission control for new services attaching to virtual switches.
.. py:attribute:: pnic
The set of physical network adapters associated with this bridge.
.. py:attribute:: portgroup
The list of port groups configured for this virtual switch.
.. py:attribute:: spec
The specification of a PortGroup.
|
{
"content_hash": "046ceec282be2c140d9d5450ce08e42b",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 417,
"avg_line_length": 31.64516129032258,
"alnum_prop": 0.5973496432212029,
"repo_name": "xuru/pyvisdk",
"id": "3638580a11416068604e5484855a1e3ae34f68db",
"size": "1963",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/source/do/host_virtual_switch.rst",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "369"
},
{
"name": "Python",
"bytes": "3037849"
},
{
"name": "Shell",
"bytes": "4517"
}
]
}
|
#undef TRACE_SYSTEM
#define TRACE_SYSTEM sched
#if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_SCHED_H
#include <linux/sched.h>
#include <linux/tracepoint.h>
#include <linux/binfmts.h>
/*
* Tracepoint for calling kthread_stop, performed to end a kthread:
*/
TRACE_EVENT(sched_kthread_stop,
TP_PROTO(struct task_struct *t),
TP_ARGS(t),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
),
TP_fast_assign(
memcpy(__entry->comm, t->comm, TASK_COMM_LEN);
__entry->pid = t->pid;
),
TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid)
);
/*
* Tracepoint for the return value of the kthread stopping:
*/
TRACE_EVENT(sched_kthread_stop_ret,
TP_PROTO(int ret),
TP_ARGS(ret),
TP_STRUCT__entry(
__field( int, ret )
),
TP_fast_assign(
__entry->ret = ret;
),
TP_printk("ret=%d", __entry->ret)
);
/*
* Tracepoint for waking up a task:
*/
DECLARE_EVENT_CLASS(sched_wakeup_template,
TP_PROTO(struct task_struct *p, int success),
TP_ARGS(p, success),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, prio )
__field( int, success )
__field( int, target_cpu )
),
TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->prio = p->prio;
__entry->success = success;
__entry->target_cpu = task_cpu(p);
)
TP_perf_assign(
__perf_task(p);
),
TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d",
__entry->comm, __entry->pid, __entry->prio,
__entry->success, __entry->target_cpu)
);
DEFINE_EVENT(sched_wakeup_template, sched_wakeup,
TP_PROTO(struct task_struct *p, int success),
TP_ARGS(p, success));
/*
* Tracepoint for waking up a new task:
*/
DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new,
TP_PROTO(struct task_struct *p, int success),
TP_ARGS(p, success));
#ifdef CREATE_TRACE_POINTS
static inline long __trace_sched_switch_state(struct task_struct *p)
{
long state = p->state;
#ifdef CONFIG_PREEMPT
/*
* For all intents and purposes a preempted task is a running task.
*/
if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
state = TASK_RUNNING | TASK_STATE_MAX;
#endif
return state;
}
#endif
/*
* Tracepoint for task switches, performed by the scheduler:
*/
TRACE_EVENT(sched_switch,
TP_PROTO(struct task_struct *prev,
struct task_struct *next),
TP_ARGS(prev, next),
TP_STRUCT__entry(
__array( char, prev_comm, TASK_COMM_LEN )
__field( pid_t, prev_pid )
__field( int, prev_prio )
__field( long, prev_state )
__array( char, next_comm, TASK_COMM_LEN )
__field( pid_t, next_pid )
__field( int, next_prio )
),
TP_fast_assign(
memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
__entry->prev_pid = prev->pid;
__entry->prev_prio = prev->prio;
__entry->prev_state = __trace_sched_switch_state(prev);
memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
__entry->next_pid = next->pid;
__entry->next_prio = next->prio;
),
TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d",
__entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
__entry->prev_state & (TASK_STATE_MAX-1) ?
__print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|",
{ 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" },
{ 16, "Z" }, { 32, "X" }, { 64, "x" },
{ 128, "K" }, { 256, "W" }, { 512, "P" }) : "R",
__entry->prev_state & TASK_STATE_MAX ? "+" : "",
__entry->next_comm, __entry->next_pid, __entry->next_prio)
);
/*
* Tracepoint for a task being migrated:
*/
TRACE_EVENT(sched_migrate_task,
TP_PROTO(struct task_struct *p, int dest_cpu),
TP_ARGS(p, dest_cpu),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, prio )
__field( int, orig_cpu )
__field( int, dest_cpu )
),
TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->prio = p->prio;
__entry->orig_cpu = task_cpu(p);
__entry->dest_cpu = dest_cpu;
),
TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d",
__entry->comm, __entry->pid, __entry->prio,
__entry->orig_cpu, __entry->dest_cpu)
);
DECLARE_EVENT_CLASS(sched_process_template,
TP_PROTO(struct task_struct *p),
TP_ARGS(p),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, prio )
),
TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->prio = p->prio;
),
TP_printk("comm=%s pid=%d prio=%d",
__entry->comm, __entry->pid, __entry->prio)
);
/*
* Tracepoint for freeing a task:
*/
DEFINE_EVENT(sched_process_template, sched_process_free,
TP_PROTO(struct task_struct *p),
TP_ARGS(p));
/*
* Tracepoint for a task exiting:
*/
DEFINE_EVENT(sched_process_template, sched_process_exit,
TP_PROTO(struct task_struct *p),
TP_ARGS(p));
/*
* Tracepoint for waiting on task to unschedule:
*/
DEFINE_EVENT(sched_process_template, sched_wait_task,
TP_PROTO(struct task_struct *p),
TP_ARGS(p));
/*
* Tracepoint for a waiting task:
*/
TRACE_EVENT(sched_process_wait,
TP_PROTO(struct pid *pid),
TP_ARGS(pid),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, prio )
),
TP_fast_assign(
memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
__entry->pid = pid_nr(pid);
__entry->prio = current->prio;
),
TP_printk("comm=%s pid=%d prio=%d",
__entry->comm, __entry->pid, __entry->prio)
);
/*
* Tracepoint for do_fork:
*/
TRACE_EVENT(sched_process_fork,
TP_PROTO(struct task_struct *parent, struct task_struct *child),
TP_ARGS(parent, child),
TP_STRUCT__entry(
__array( char, parent_comm, TASK_COMM_LEN )
__field( pid_t, parent_pid )
__array( char, child_comm, TASK_COMM_LEN )
__field( pid_t, child_pid )
),
TP_fast_assign(
memcpy(__entry->parent_comm, parent->comm, TASK_COMM_LEN);
__entry->parent_pid = parent->pid;
memcpy(__entry->child_comm, child->comm, TASK_COMM_LEN);
__entry->child_pid = child->pid;
),
TP_printk("comm=%s pid=%d child_comm=%s child_pid=%d",
__entry->parent_comm, __entry->parent_pid,
__entry->child_comm, __entry->child_pid)
);
/*
* Tracepoint for exec:
*/
TRACE_EVENT(sched_process_exec,
TP_PROTO(struct task_struct *p, pid_t old_pid,
struct linux_binprm *bprm),
TP_ARGS(p, old_pid, bprm),
TP_STRUCT__entry(
__string( filename, bprm->filename )
__field( pid_t, pid )
__field( pid_t, old_pid )
),
TP_fast_assign(
__assign_str(filename, bprm->filename);
__entry->pid = p->pid;
__entry->old_pid = old_pid;
),
TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename),
__entry->pid, __entry->old_pid)
);
/*
* XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
* adding sched_stat support to SCHED_FIFO/RR would be welcome.
*/
DECLARE_EVENT_CLASS(sched_stat_template,
TP_PROTO(struct task_struct *tsk, u64 delay),
TP_ARGS(tsk, delay),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( u64, delay )
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->pid = tsk->pid;
__entry->delay = delay;
)
TP_perf_assign(
__perf_count(delay);
__perf_task(tsk);
),
TP_printk("comm=%s pid=%d delay=%Lu [ns]",
__entry->comm, __entry->pid,
(unsigned long long)__entry->delay)
);
/*
* Tracepoint for accounting wait time (time the task is runnable
* but not actually running due to scheduler contention).
*/
DEFINE_EVENT(sched_stat_template, sched_stat_wait,
TP_PROTO(struct task_struct *tsk, u64 delay),
TP_ARGS(tsk, delay));
/*
* Tracepoint for accounting sleep time (time the task is not runnable,
* including iowait, see below).
*/
DEFINE_EVENT(sched_stat_template, sched_stat_sleep,
TP_PROTO(struct task_struct *tsk, u64 delay),
TP_ARGS(tsk, delay));
/*
* Tracepoint for accounting iowait time (time the task is not runnable
* due to waiting on IO to complete).
*/
DEFINE_EVENT(sched_stat_template, sched_stat_iowait,
TP_PROTO(struct task_struct *tsk, u64 delay),
TP_ARGS(tsk, delay));
/*
* Tracepoint for accounting blocked time (time the task is in uninterruptible).
*/
DEFINE_EVENT(sched_stat_template, sched_stat_blocked,
TP_PROTO(struct task_struct *tsk, u64 delay),
TP_ARGS(tsk, delay));
/*
* Tracepoint for accounting runtime (time the task is executing
* on a CPU).
*/
TRACE_EVENT(sched_stat_runtime,
TP_PROTO(struct task_struct *tsk, u64 runtime, u64 vruntime),
TP_ARGS(tsk, runtime, vruntime),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( u64, runtime )
__field( u64, vruntime )
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->pid = tsk->pid;
__entry->runtime = runtime;
__entry->vruntime = vruntime;
)
TP_perf_assign(
__perf_count(runtime);
),
TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
__entry->comm, __entry->pid,
(unsigned long long)__entry->runtime,
(unsigned long long)__entry->vruntime)
);
/*
* Tracepoint for showing priority inheritance modifying a tasks
* priority.
*/
TRACE_EVENT(sched_pi_setprio,
TP_PROTO(struct task_struct *tsk, int newprio),
TP_ARGS(tsk, newprio),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, oldprio )
__field( int, newprio )
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->pid = tsk->pid;
__entry->oldprio = tsk->prio;
__entry->newprio = newprio;
),
TP_printk("comm=%s pid=%d oldprio=%d newprio=%d",
__entry->comm, __entry->pid,
__entry->oldprio, __entry->newprio)
);
/*
* Tracepoint for showing tracked load contribution.
*/
TRACE_EVENT(sched_task_load_contrib,
TP_PROTO(struct task_struct *tsk, unsigned long load_contrib),
TP_ARGS(tsk, load_contrib),
TP_STRUCT__entry(
__array(char, comm, TASK_COMM_LEN)
__field(pid_t, pid)
__field(unsigned long, load_contrib)
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->pid = tsk->pid;
__entry->load_contrib = load_contrib;
),
TP_printk("comm=%s pid=%d load_contrib=%lu",
__entry->comm, __entry->pid,
__entry->load_contrib)
);
/*
* Tracepoint for showing tracked task runnable ratio [0..1023].
*/
TRACE_EVENT(sched_task_runnable_ratio,
TP_PROTO(struct task_struct *tsk, unsigned long ratio),
TP_ARGS(tsk, ratio),
TP_STRUCT__entry(
__array(char, comm, TASK_COMM_LEN)
__field(pid_t, pid)
__field(unsigned long, ratio)
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->pid = tsk->pid;
__entry->ratio = ratio;
),
TP_printk("comm=%s pid=%d ratio=%lu",
__entry->comm, __entry->pid,
__entry->ratio)
);
/*
* Tracepoint for showing tracked rq runnable ratio [0..1023].
*/
TRACE_EVENT(sched_rq_runnable_ratio,
TP_PROTO(int cpu, unsigned long ratio),
TP_ARGS(cpu, ratio),
TP_STRUCT__entry(
__field(int, cpu)
__field(unsigned long, ratio)
),
TP_fast_assign(
__entry->cpu = cpu;
__entry->ratio = ratio;
),
TP_printk("cpu=%d ratio=%lu",
__entry->cpu,
__entry->ratio)
);
/*
* Tracepoint for showing tracked rq runnable load.
*/
TRACE_EVENT(sched_rq_runnable_load,
TP_PROTO(int cpu, u64 load),
TP_ARGS(cpu, load),
TP_STRUCT__entry(
__field(int, cpu)
__field(u64, load)
),
TP_fast_assign(
__entry->cpu = cpu;
__entry->load = load;
),
TP_printk("cpu=%d load=%llu",
__entry->cpu,
__entry->load)
);
TRACE_EVENT(sched_rq_nr_running,
TP_PROTO(int cpu, unsigned int nr_running, int nr_iowait),
TP_ARGS(cpu, nr_running, nr_iowait),
TP_STRUCT__entry(
__field(int, cpu)
__field(unsigned int, nr_running)
__field(int, nr_iowait)
),
TP_fast_assign(
__entry->cpu = cpu;
__entry->nr_running = nr_running;
__entry->nr_iowait = nr_iowait;
),
TP_printk("cpu=%d nr_running=%u nr_iowait=%d",
__entry->cpu,
__entry->nr_running, __entry->nr_iowait)
);
/*
* Tracepoint for showing tracked task cpu usage ratio [0..1023].
*/
TRACE_EVENT(sched_task_usage_ratio,
TP_PROTO(struct task_struct *tsk, unsigned long ratio),
TP_ARGS(tsk, ratio),
TP_STRUCT__entry(
__array(char, comm, TASK_COMM_LEN)
__field(pid_t, pid)
__field(unsigned long, ratio)
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->pid = tsk->pid;
__entry->ratio = ratio;
),
TP_printk("comm=%s pid=%d ratio=%lu",
__entry->comm, __entry->pid,
__entry->ratio)
);
/*
* Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations,
* marking the forced transition of runnable or running tasks.
*/
TRACE_EVENT(sched_hmp_migrate_force_running,
TP_PROTO(struct task_struct *tsk, int running),
TP_ARGS(tsk, running),
TP_STRUCT__entry(
__array(char, comm, TASK_COMM_LEN)
__field(int, running)
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->running = running;
),
TP_printk("running=%d comm=%s",
__entry->running, __entry->comm)
);
/*
* Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations,
* marking the forced transition of runnable or running
* tasks when a task is about to go idle.
*/
TRACE_EVENT(sched_hmp_migrate_idle_running,
TP_PROTO(struct task_struct *tsk, int running),
TP_ARGS(tsk, running),
TP_STRUCT__entry(
__array(char, comm, TASK_COMM_LEN)
__field(int, running)
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->running = running;
),
TP_printk("running=%d comm=%s",
__entry->running, __entry->comm)
);
/*
* Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations.
*/
#define HMP_MIGRATE_WAKEUP 0
#define HMP_MIGRATE_FORCE 1
#define HMP_MIGRATE_OFFLOAD 2
#define HMP_MIGRATE_IDLE_PULL 3
TRACE_EVENT(sched_hmp_migrate,
TP_PROTO(struct task_struct *tsk, int dest, int force),
TP_ARGS(tsk, dest, force),
TP_STRUCT__entry(
__array(char, comm, TASK_COMM_LEN)
__field(pid_t, pid)
__field(int, dest)
__field(int, force)
),
TP_fast_assign(
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
__entry->pid = tsk->pid;
__entry->dest = dest;
__entry->force = force;
),
TP_printk("comm=%s pid=%d dest=%d force=%d",
__entry->comm, __entry->pid,
__entry->dest, __entry->force)
);
TRACE_EVENT(sched_hmp_offload_abort,
TP_PROTO(int cpu, int data, char *label),
TP_ARGS(cpu,data,label),
TP_STRUCT__entry(
__array(char, label, 64)
__field(int, cpu)
__field(int, data)
),
TP_fast_assign(
strncpy(__entry->label, label, 64);
__entry->cpu = cpu;
__entry->data = data;
),
TP_printk("cpu=%d data=%d label=%63s",
__entry->cpu, __entry->data,
__entry->label)
);
TRACE_EVENT(sched_hmp_offload_succeed,
TP_PROTO(int cpu, int dest_cpu),
TP_ARGS(cpu,dest_cpu),
TP_STRUCT__entry(
__field(int, cpu)
__field(int, dest_cpu)
),
TP_fast_assign(
__entry->cpu = cpu;
__entry->dest_cpu = dest_cpu;
),
TP_printk("cpu=%d dest=%d",
__entry->cpu,
__entry->dest_cpu)
);
#endif /* _TRACE_SCHED_H */
/* This part must be outside protection */
#include <trace/define_trace.h>
|
{
"content_hash": "724fdc56f327b5499f62d0b7837ed39d",
"timestamp": "",
"source": "github",
"line_count": 710,
"max_line_length": 109,
"avg_line_length": 21.60281690140845,
"alnum_prop": 0.6277219976528883,
"repo_name": "OLIMEX/DIY-LAPTOP",
"id": "2afcb71857fd91131b0e0d65e6fd6e5cec7f1bab",
"size": "15338",
"binary": false,
"copies": "45",
"ref": "refs/heads/rel3",
"path": "SOFTWARE/A64-TERES/linux-a64/include/trace/events/sched.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "11134321"
},
{
"name": "Awk",
"bytes": "19031"
},
{
"name": "Batchfile",
"bytes": "8351"
},
{
"name": "C",
"bytes": "567314664"
},
{
"name": "C++",
"bytes": "490541"
},
{
"name": "CSS",
"bytes": "3924"
},
{
"name": "Classic ASP",
"bytes": "4528"
},
{
"name": "Dockerfile",
"bytes": "652"
},
{
"name": "GDB",
"bytes": "21755"
},
{
"name": "Lex",
"bytes": "55791"
},
{
"name": "M4",
"bytes": "3388"
},
{
"name": "Makefile",
"bytes": "2068526"
},
{
"name": "PHP",
"bytes": "54081"
},
{
"name": "Perl",
"bytes": "701416"
},
{
"name": "Python",
"bytes": "307470"
},
{
"name": "Raku",
"bytes": "3727"
},
{
"name": "Roff",
"bytes": "63487"
},
{
"name": "Scilab",
"bytes": "21433"
},
{
"name": "Shell",
"bytes": "328623"
},
{
"name": "SmPL",
"bytes": "69316"
},
{
"name": "Tcl",
"bytes": "967"
},
{
"name": "UnrealScript",
"bytes": "6113"
},
{
"name": "XS",
"bytes": "1240"
},
{
"name": "XSLT",
"bytes": "445"
},
{
"name": "Yacc",
"bytes": "101755"
},
{
"name": "sed",
"bytes": "3126"
}
]
}
|
<?php
/**
* ALIPAY API: alipay.marketing.campaign.drawcamp.status.update request
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
class AlipayMarketingCampaignDrawcampStatusUpdateRequest
{
/**
* 抽奖活动状态变更
**/
private $bizContent;
private $apiParas = array();
private $terminalType;
private $terminalInfo;
private $prodCode;
private $apiVersion="1.0";
private $notifyUrl;
private $returnUrl;
private $needEncrypt=false;
public function setBizContent($bizContent)
{
$this->bizContent = $bizContent;
$this->apiParas["biz_content"] = $bizContent;
}
public function getBizContent()
{
return $this->bizContent;
}
public function getApiMethodName()
{
return "alipay.marketing.campaign.drawcamp.status.update";
}
public function setNotifyUrl($notifyUrl)
{
$this->notifyUrl=$notifyUrl;
}
public function getNotifyUrl()
{
return $this->notifyUrl;
}
public function setReturnUrl($returnUrl)
{
$this->returnUrl=$returnUrl;
}
public function getReturnUrl()
{
return $this->returnUrl;
}
public function getApiParas()
{
return $this->apiParas;
}
public function getTerminalType()
{
return $this->terminalType;
}
public function setTerminalType($terminalType)
{
$this->terminalType = $terminalType;
}
public function getTerminalInfo()
{
return $this->terminalInfo;
}
public function setTerminalInfo($terminalInfo)
{
$this->terminalInfo = $terminalInfo;
}
public function getProdCode()
{
return $this->prodCode;
}
public function setProdCode($prodCode)
{
$this->prodCode = $prodCode;
}
public function setApiVersion($apiVersion)
{
$this->apiVersion=$apiVersion;
}
public function getApiVersion()
{
return $this->apiVersion;
}
public function setNeedEncrypt($needEncrypt)
{
$this->needEncrypt=$needEncrypt;
}
public function getNeedEncrypt()
{
return $this->needEncrypt;
}
}
|
{
"content_hash": "380cfa66d065ee61611e2339b96b1e5a",
"timestamp": "",
"source": "github",
"line_count": 118,
"max_line_length": 71,
"avg_line_length": 16.347457627118644,
"alnum_prop": 0.6998444790046656,
"repo_name": "Bigotry/OneBase",
"id": "2f7cf83bee7e93055059268bcabffec7f2cd4ab2",
"size": "1945",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/common/service/pay/driver/alipay/alipay-sdk-PHP-3.4.2/aop/request/AlipayMarketingCampaignDrawcampStatusUpdateRequest.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "22"
},
{
"name": "CSS",
"bytes": "328207"
},
{
"name": "HTML",
"bytes": "261069"
},
{
"name": "Hack",
"bytes": "1426"
},
{
"name": "JavaScript",
"bytes": "375125"
},
{
"name": "PHP",
"bytes": "4792230"
},
{
"name": "PLpgSQL",
"bytes": "3923"
},
{
"name": "Shell",
"bytes": "26"
},
{
"name": "Smarty",
"bytes": "33004"
}
]
}
|
package ua.com.fielden.platform.entity.query.generation.elements;
import static java.util.Collections.emptyList;
import static ua.com.fielden.platform.utils.CollectionUtil.listOf;
import java.util.List;
public class EntValue implements ISingleOperand {
private final Object value;
private final boolean ignoreNull;
private String sqlParamName;
@Override
public String sql() {
return sqlParamName != null ? ":" + sqlParamName : value.toString();
}
public EntValue(final Object value) {
this(value, false);
}
public EntValue(final Object value, final boolean ignoreNull) {
this.value = value;
this.ignoreNull = ignoreNull;
if (!ignoreNull && value == null) {
// TODO Uncomment when yieldNull() operator is implemented and all occurences of yield().val(null) are corrected.
// throw new IllegalStateException("Value can't be null"); //
}
}
@Override
public List<EntProp> getLocalProps() {
return emptyList();
}
@Override
public List<EntQuery> getLocalSubQueries() {
return emptyList();
}
@Override
public List<EntValue> getAllValues() {
return listOf(this);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof EntValue)) {
return false;
}
final EntValue other = (EntValue) obj;
if (value == null) {
if (other.value != null) {
return false;
}
} else if (!value.equals(other.value)) {
return false;
}
return true;
}
@Override
public boolean ignore() {
return ignoreNull && value == null;
}
@Override
public Class<?> type() {
return value != null ? value.getClass() : null;
}
public String getSqlParamName() {
return sqlParamName;
}
public void setSqlParamName(final String sqlParamName) {
this.sqlParamName = sqlParamName;
}
public Object getValue() {
return value;
}
@Override
public Object hibType() {
return null;
}
@Override
public boolean isNullable() {
return true;
}
}
|
{
"content_hash": "24e38532231adf60d0d166951c947433",
"timestamp": "",
"source": "github",
"line_count": 107,
"max_line_length": 125,
"avg_line_length": 24.05607476635514,
"alnum_prop": 0.5761460761460762,
"repo_name": "fieldenms/tg",
"id": "0292d0ae26b9876b06dc2e0ed5d36f09aeb5245e",
"size": "2574",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "platform-dao/src/main/java/ua/com/fielden/platform/entity/query/generation/elements/EntValue.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "4729"
},
{
"name": "CSS",
"bytes": "177044"
},
{
"name": "CoffeeScript",
"bytes": "2455"
},
{
"name": "HTML",
"bytes": "2236957"
},
{
"name": "Java",
"bytes": "12685270"
},
{
"name": "JavaScript",
"bytes": "34404107"
},
{
"name": "Makefile",
"bytes": "28094"
},
{
"name": "Python",
"bytes": "3798"
},
{
"name": "Roff",
"bytes": "3102"
},
{
"name": "Shell",
"bytes": "13899"
},
{
"name": "TSQL",
"bytes": "1058"
},
{
"name": "TeX",
"bytes": "1296798"
},
{
"name": "XSLT",
"bytes": "6158"
}
]
}
|
<html>
<head>
<title>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.44 Safari/537.36 OPR/25.0.1614.11 (Edition beta)</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.44 Safari/537.36 OPR/25.0.1614.11 (Edition beta)
<p>
Detected by 8 of 8 providers<br />
As bot detected by 0 of 7
</p>
</div>
</div>
<div class="section">
<table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Actions</th></tr><tr><td>BrowscapPhp<br /><small>6011</small></td><td>Opera 25.0</td><td>Blink </td><td>Linux </td><td></td><td>Linux Desktop</td><td>Desktop</td><td></td><td></td><td></td><td></td><td></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-cbfe2df3-330b-4abd-b5df-0ca181549ca9">Detail</a>
<!-- Modal Structure -->
<div id="modal-cbfe2df3-330b-4abd-b5df-0ca181549ca9" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapPhp result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*x86_64.*\) applewebkit\/.* \(khtml, like gecko\).*chrome\/.*safari\/.*opr\/25\.0.*$/
[browser_name_pattern] => mozilla/5.0 (*linux*x86_64*) applewebkit/* (khtml, like gecko)*chrome/*safari/*opr/25.0*
[parent] => Opera 25.0
[comment] => Opera 25.0
[browser] => Opera
[browser_type] => Browser
[browser_bits] => 64
[browser_maker] => Opera Software ASA
[browser_modus] => unknown
[version] => 25.0
[majorver] => 25
[minorver] => 0
[platform] => Linux
[platform_version] => unknown
[platform_description] => Linux
[platform_bits] => 64
[platform_maker] => Linux Foundation
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[javascript] => 1
[vbscript] =>
[javaapplets] =>
[activexcontrols] =>
[ismobiledevice] =>
[istablet] =>
[issyndicationreader] =>
[crawler] =>
[cssversion] => 3
[aolversion] => 0
[device_name] => Linux Desktop
[device_maker] => Various
[device_type] => Desktop
[device_pointing_method] => mouse
[device_code_name] => Linux Desktop
[device_brand_name] => unknown
[renderingengine_name] => Blink
[renderingengine_version] => unknown
[renderingengine_description] => a WebKit Fork by Google
[renderingengine_maker] => Google Inc
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>DonatjUAParser<br /><small>v0.5.0</small></td><td>Opera Next 25.0.1614.11</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-6fae891b-b0d5-4415-b07d-355015c3af67">Detail</a>
<!-- Modal Structure -->
<div id="modal-6fae891b-b0d5-4415-b07d-355015c3af67" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] => Linux
[browser] => Opera Next
[version] => 25.0.1614.11
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>PiwikDeviceDetector<br /><small>3.5.1</small></td><td>Opera 25.0</td><td>Blink </td><td>GNU/Linux </td><td></td><td></td><td>desktop</td><td></td><td></td><td></td><td></td><td></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-fc0f1b55-50d8-49c2-bb12-4cc1d8144ebf">Detail</a>
<!-- Modal Structure -->
<div id="modal-fc0f1b55-50d8-49c2-bb12-4cc1d8144ebf" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>PiwikDeviceDetector result detail</h4>
<p><pre><code class="php">Array
(
[client] => Array
(
[type] => browser
[name] => Opera
[short_name] => OP
[version] => 25.0
[engine] => Blink
)
[operatingSystem] => Array
(
[name] => GNU/Linux
[short_name] => LIN
[version] =>
[platform] => x64
)
[device] => Array
(
[brand] =>
[brandName] =>
[model] =>
[device] => 0
[deviceName] => desktop
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] =>
[isTablet] =>
[isTV] =>
[isDesktop] => 1
[isMobile] =>
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.0</small></td><td>Opera 25.0.1614.11</td><td><i class="material-icons">close</i></td><td>Linux </td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8c08f104-4e61-421b-9405-291b09c383dc">Detail</a>
<!-- Modal Structure -->
<div id="modal-8c08f104-4e61-421b-9405-291b09c383dc" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>SinergiBrowserDetector result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Sinergi\BrowserDetector\Browser Object
(
[userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.44 Safari/537.36 OPR/25.0.1614.11 (Edition beta)
)
[name:Sinergi\BrowserDetector\Browser:private] => Opera
[version:Sinergi\BrowserDetector\Browser:private] => 25.0.1614.11
[isRobot:Sinergi\BrowserDetector\Browser:private] =>
[isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
)
[operatingSystem] => Sinergi\BrowserDetector\Os Object
(
[name:Sinergi\BrowserDetector\Os:private] => Linux
[version:Sinergi\BrowserDetector\Os:private] => unknown
[isMobile:Sinergi\BrowserDetector\Os:private] =>
[userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.44 Safari/537.36 OPR/25.0.1614.11 (Edition beta)
)
)
[device] => Sinergi\BrowserDetector\Device Object
(
[name:Sinergi\BrowserDetector\Device:private] => unknown
[userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.44 Safari/537.36 OPR/25.0.1614.11 (Edition beta)
)
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UAParser<br /><small>v3.4.5</small></td><td>Opera 25.0.1614</td><td><i class="material-icons">close</i></td><td>Linux </td><td></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8f4c86c5-433e-4536-b799-ad26d77264e0">Detail</a>
<!-- Modal Structure -->
<div id="modal-8f4c86c5-433e-4536-b799-ad26d77264e0" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">UAParser\Result\Client Object
(
[ua] => UAParser\Result\UserAgent Object
(
[major] => 25
[minor] => 0
[patch] => 1614
[family] => Opera
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] =>
[minor] =>
[patch] =>
[patchMinor] =>
[family] => Linux
)
[device] => UAParser\Result\Device Object
(
[brand] =>
[model] =>
[family] => Other
)
[originalUserAgent] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.44 Safari/537.36 OPR/25.0.1614.11 (Edition beta)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhichBrowser<br /><small>2.0.9</small></td><td>Opera Beta 25.0</td><td>Blink 537.36</td><td>Linux </td><td></td><td></td><td>desktop</td><td></td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-62f1f3a3-0c44-4ecb-9ee2-48145e35736b">Detail</a>
<!-- Modal Structure -->
<div id="modal-62f1f3a3-0c44-4ecb-9ee2-48145e35736b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Opera
[family] => Array
(
[name] => Chrome
[version] => 38
)
[version] => 25.0
[type] => browser
)
[engine] => Array
(
[name] => Blink
[version] => 537.36
)
[os] => Array
(
[name] => Linux
)
[device] => Array
(
[type] => desktop
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Woothee<br /><small>v1.2.0</small></td><td>Opera 25.0.1614.11</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>pc</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-bd437f52-91e9-4ce8-88f7-6e5206ed6635">Detail</a>
<!-- Modal Structure -->
<div id="modal-bd437f52-91e9-4ce8-88f7-6e5206ed6635" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Woothee result detail</h4>
<p><pre><code class="php">Array
(
[name] => Opera
[vendor] => Opera
[version] => 25.0.1614.11
[category] => pc
[os] => Linux
[os_version] => UNKNOWN
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Opera 25.0.1614.11</td><td><i class="material-icons">close</i></td><td>Linux x86_64 </td><td></td><td></td><td>Desktop</td><td></td><td></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3a72b31e-c3c1-4317-a357-7a6d5e3c7027">Detail</a>
<!-- Modal Structure -->
<div id="modal-3a72b31e-c3c1-4317-a357-7a6d5e3c7027" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => false
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => true
[is_largescreen] => true
[is_mobile] => false
[is_robot] => false
[is_smartphone] => false
[is_touchscreen] => false
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => false
[is_html_preferred] => true
[advertised_device_os] => Linux x86_64
[advertised_device_os_version] =>
[advertised_browser] => Opera
[advertised_browser_version] => 25.0.1614.11
[complete_device_name] => Opera Software Opera
[form_factor] => Desktop
[is_phone] => false
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Opera Software
[model_name] => Opera
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => false
[device_claims_web_support] => true
[has_qwerty_keyboard] => true
[can_skip_aligned_link_row] => true
[uaprof] =>
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] => Desktop
[mobile_browser] => Opera
[mobile_browser_version] => 25.0
[device_os_version] =>
[pointing_method] => mouse
[release_date] => 2012_june
[marketing_name] =>
[model_extra_info] =>
[nokia_feature_pack] => 0
[can_assign_phone_number] => false
[is_tablet] => false
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => false
[built_in_back_button_support] => false
[card_title_support] => false
[softkey_support] => false
[table_support] => false
[numbered_menus] => false
[menu_with_select_element_recommended] => false
[menu_with_list_of_links_recommended] => false
[icons_on_menu_items_support] => false
[break_list_of_links_with_br_element_recommended] => false
[access_key_support] => false
[wrap_mode_support] => false
[times_square_mode_support] => false
[deck_prefetch_support] => false
[elective_forms_recommended] => false
[wizards_recommended] => false
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => false
[wml_make_phone_call_string] => none
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => true
[xhtml_honors_bgcolor] => true
[xhtml_supports_forms_in_table] => true
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => false
[xhtml_select_as_dropdown] => true
[xhtml_select_as_radiobutton] => true
[xhtml_select_as_popup] => true
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => false
[xhtml_supports_inline_input] => false
[xhtml_supports_monospace_font] => false
[xhtml_supports_table_for_layout] => false
[xhtml_supports_css_cell_table_coloring] => false
[xhtml_format_as_css_property] => false
[xhtml_format_as_attribute] => false
[xhtml_nowrap_mode] => false
[xhtml_marquee_as_css_property] => false
[xhtml_readable_background_color1] => #FFFFFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => false
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => utf8
[opwv_xhtml_extensions_support] => false
[xhtml_make_phone_call_string] => none
[xhtmlmp_preferred_mime_type] => text/html
[xhtml_table_support] => false
[xhtml_send_sms_string] => none
[xhtml_send_mms_string] => none
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => true
[xhtml_supports_iframe] => full
[xhtml_avoid_accesskeys] => true
[xhtml_can_embed_video] => play_and_stop
[ajax_support_javascript] => true
[ajax_manipulate_css] => true
[ajax_support_getelementbyid] => true
[ajax_support_inner_html] => true
[ajax_xhr_type] => standard
[ajax_manipulate_dom] => true
[ajax_support_events] => true
[ajax_support_event_listener] => true
[ajax_preferred_geoloc_api] => none
[xhtml_support_level] => 4
[preferred_markup] => html_web_4_0
[wml_1_1] => false
[wml_1_2] => false
[wml_1_3] => false
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => false
[html_wi_imode_html_1] => false
[html_wi_imode_html_2] => false
[html_wi_imode_html_3] => false
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => false
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => false
[html_web_3_2] => true
[html_web_4_0] => true
[voicexml] => false
[multipart_support] => false
[total_cache_disable_support] => false
[time_to_live_support] => false
[resolution_width] => 800
[resolution_height] => 600
[columns] => 120
[max_image_width] => 800
[max_image_height] => 600
[rows] => 200
[physical_screen_width] => 400
[physical_screen_height] => 400
[dual_orientation] => false
[density_class] => 1.0
[wbmp] => false
[bmp] => true
[epoc_bmp] => false
[gif_animated] => true
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => false
[transparent_png_index] => false
[svgt_1_1] => true
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => true
[webp_lossless_support] => false
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => true
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => false
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 3200
[wifi] => true
[sdio] => false
[vpn] => false
[has_cellular_radio] => false
[max_deck_size] => 100000
[max_url_length_in_requests] => 128
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => false
[inline_support] => false
[oma_support] => false
[ringtone] => false
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => false
[ringtone_midi_polyphonic] => false
[ringtone_imelody] => false
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => false
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => false
[ringtone_mp3] => false
[ringtone_spmidi] => false
[ringtone_qcelp] => false
[ringtone_voices] => 1
[ringtone_df_size_limit] => 0
[ringtone_directdownload_size_limit] => 0
[ringtone_inline_size_limit] => 0
[ringtone_oma_size_limit] => 0
[wallpaper] => false
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => none
[wallpaper_wbmp] => false
[wallpaper_bmp] => false
[wallpaper_gif] => false
[wallpaper_jpg] => false
[wallpaper_png] => false
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 2
[wallpaper_df_size_limit] => 0
[wallpaper_directdownload_size_limit] => 0
[wallpaper_inline_size_limit] => 0
[wallpaper_oma_size_limit] => 0
[screensaver] => false
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => none
[screensaver_wbmp] => false
[screensaver_bmp] => false
[screensaver_gif] => false
[screensaver_jpg] => false
[screensaver_png] => false
[screensaver_greyscale] => false
[screensaver_colors] => 2
[screensaver_df_size_limit] => 0
[screensaver_directdownload_size_limit] => 0
[screensaver_inline_size_limit] => 0
[screensaver_oma_size_limit] => 0
[picture] => false
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => none
[picture_wbmp] => false
[picture_bmp] => false
[picture_gif] => false
[picture_jpg] => false
[picture_png] => false
[picture_greyscale] => false
[picture_colors] => 2
[picture_df_size_limit] => 0
[picture_directdownload_size_limit] => 0
[picture_inline_size_limit] => 0
[picture_oma_size_limit] => 0
[video] => false
[oma_v_1_0_forwardlock] => false
[oma_v_1_0_combined_delivery] => false
[oma_v_1_0_separate_delivery] => false
[streaming_video] => false
[streaming_3gpp] => false
[streaming_mp4] => false
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => -1
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => -1
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => -1
[streaming_acodec_amr] => none
[streaming_acodec_aac] => none
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => none
[wap_push_support] => false
[connectionless_service_indication] => false
[connectionless_service_load] => false
[connectionless_cache_operation] => false
[connectionoriented_unconfirmed_service_indication] => false
[connectionoriented_unconfirmed_service_load] => false
[connectionoriented_unconfirmed_cache_operation] => false
[connectionoriented_confirmed_service_indication] => false
[connectionoriented_confirmed_service_load] => false
[connectionoriented_confirmed_cache_operation] => false
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => false
[j2me_cldc_1_0] => false
[j2me_cldc_1_1] => false
[j2me_midp_1_0] => false
[j2me_midp_2_0] => false
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => false
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => false
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => false
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 0
[j2me_max_jar_size] => 0
[j2me_storage_size] => 0
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 0
[j2me_screen_height] => 0
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 0
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => false
[j2me_wav] => false
[j2me_amr] => false
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 0
[j2me_right_softkey_code] => 0
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => false
[sender] => false
[mms_max_size] => 0
[mms_max_height] => 0
[mms_max_width] => 0
[built_in_recorder] => false
[built_in_camera] => false
[mms_jpeg_baseline] => false
[mms_jpeg_progressive] => false
[mms_gif_static] => false
[mms_gif_animated] => false
[mms_png] => false
[mms_bmp] => false
[mms_wbmp] => false
[mms_amr] => false
[mms_wav] => false
[mms_midi_monophonic] => false
[mms_midi_polyphonic] => false
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => false
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => false
[mms_vcalendar] => false
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => false
[mms_mp4] => false
[mms_3gpp] => false
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => false
[ems_variablesizedpictures] => false
[ems_imelody] => false
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => false
[siemens_logo_width] => 101
[siemens_logo_height] => 29
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => false
[wav] => false
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => false
[midi_polyphonic] => false
[sp_midi] => false
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => false
[au] => false
[amr] => false
[awb] => false
[aac] => false
[mp3] => false
[voices] => 1
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => true
[css_supports_width_as_percentage] => true
[css_border_image] => none
[css_rounded_corners] => none
[css_gradient] => none
[css_spriting] => true
[css_gradient_linear] => none
[is_transcoder] => false
[transcoder_ua_header] => user-agent
[rss_support] => false
[pdf_support] => true
[progressive_download] => true
[playback_vcodec_h263_0] => -1
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => -1
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => -1
[playback_real_media] => none
[playback_3gpp] => false
[playback_3g2] => false
[playback_mp4] => false
[playback_mov] => false
[playback_acodec_amr] => none
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => false
[html_preferred_dtd] => html4
[viewport_supported] => false
[viewport_width] =>
[viewport_userscalable] =>
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => none
[image_inlining] => true
[is_smarttv] => false
[is_console] => false
[nfc_support] => false
[ux_full_desktop] => true
[jqm_grade] => A
[is_sencha_touch_ok] => true
[controlcap_is_smartphone] => default
[controlcap_is_ios] => default
[controlcap_is_android] => default
[controlcap_is_robot] => default
[controlcap_is_app] => default
[controlcap_advertised_device_os] => default
[controlcap_advertised_device_os_version] => default
[controlcap_advertised_browser] => default
[controlcap_advertised_browser_version] => default
[controlcap_is_windows_phone] => default
[controlcap_is_full_desktop] => default
[controlcap_is_largescreen] => default
[controlcap_is_mobile] => default
[controlcap_is_touchscreen] => default
[controlcap_is_wml_preferred] => default
[controlcap_is_xhtmlmp_preferred] => default
[controlcap_is_html_preferred] => default
[controlcap_form_factor] => default
[controlcap_complete_device_name] => default
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr></table>
</div>
<div class="section">
<h1 class="header center orange-text">About this comparison</h1>
<div class="row center">
<h5 class="header light">
The primary goal of this project is simple<br />
I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br />
<br />
The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br />
<br />
You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br />
<br />
The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a>
</h5>
</div>
</div>
<div class="card">
<div class="card-content">
Comparison created <i>2016-01-26 16:43:05</i> | by
<a href="https://github.com/ThaDafinser">ThaDafinser</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script>
<script>
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
</script>
</body>
</html>
|
{
"content_hash": "d2bbca15a8100973768d6e093cfd58a1",
"timestamp": "",
"source": "github",
"line_count": 977,
"max_line_length": 556,
"avg_line_length": 39.67553735926305,
"alnum_prop": 0.5186131104403684,
"repo_name": "ThaDafinser/UserAgentParserComparison",
"id": "92c9c9c2bd24a51493b5aea1087e4e90a686b438",
"size": "38764",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "v3/user-agent-detail/0f/dd/0fdd334b-86a9-4511-bd6e-26cb2281f19f.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "2060859160"
}
]
}
|
namespace NLE
{
namespace INPUT
{
InputProcessor::InputProcessor(EngineServices& eServices) :
_eServices(eServices)
{
_enableTextInput.fetch_and_store(false);
_enableInputProcessing.fetch_and_store(true);
}
InputProcessor::~InputProcessor()
{
}
bool InputProcessor::initialize()
{
return true;
}
void InputProcessor::update(SystemServices& sServices, double deltaT)
{
DATA::SharedData& data = _eServices.data->getData();
NLE::TLS::PerformanceTimer::reference timer = NLE::TLS::performanceTimer.local();
timer.deltaT();
INPUT::Event event;
while (GLOBAL_EVENT_QUEUE->pop(event))
{
switch (event.eventType)
{
case EVENT_TYPE::EVENT_KEY:
data.keysPressed.set(
event.eventData.keyEvent.key,
event.eventData.keyEvent.action == ACTION::ACTION_PRESS ? true : false
);
data.keyModsPressed.set(
event.eventData.keyEvent.mods,
event.eventData.keyEvent.action == ACTION::ACTION_PRESS ? true : false
);
for (int i = 0; i < _keyAndCharCallbacks.size(); ++i)
{
_keyAndCharCallbacks[i](event);
}
onKeyEvent(sServices, event);
break;
case EVENT_TYPE::EVENT_MOUSE_BUTTON:
data.mouseButtonPressed.set(
event.eventData.mouseButtonEvent.button,
event.eventData.mouseButtonEvent.action == ACTION::ACTION_PRESS ? true : false
);
onMouseButtonEvent(event);
break;
case EVENT_TYPE::EVENT_CURSOR_POSITION:
data.mouseCursorPosition.set({
event.eventData.cursorPositionEvent.xPos,
event.eventData.cursorPositionEvent.yPos
});
onCursorPositionChange(event);
break;
case EVENT_TYPE::EVENT_SCROLL:
data.scrollOffset.set({
event.eventData.scrollEvent.xOffset,
event.eventData.scrollEvent.yOffset
});
onScrollEvent(event);
break;
case EVENT_TYPE::EVENT_CHAR:
for (int i = 0; i < _keyAndCharCallbacks.size(); ++i)
{
_keyAndCharCallbacks[i](event);
}
break;
case EVENT_TYPE::EVENT_WINDOW_CLOSE:
{
sServices.game->quitGame();
}
break;
default:
break;
}
}
data.sysExecutionTimes.set(INPUT_PROCESSOR, timer.deltaT());
}
void InputProcessor::attachKeyAndCharCallback(std::function<void(INPUT::Event)> callback)
{
_keyAndCharCallbacks.push_back(callback);
}
void InputProcessor::queueEvent(INPUT::Event& event)
{
if (!_enableInputProcessing)
return;
// Ignore repeated events
if (event.eventType == EVENT_KEY && event.eventData.keyEvent.action == ACTION_REPEAT)
return;
if (event.eventType == EVENT_MOUSE_BUTTON && event.eventData.mouseButtonEvent.action == ACTION_REPEAT)
return;
GLOBAL_EVENT_QUEUE->push(event);
}
void InputProcessor::enableInputProcessing(bool enable)
{
_enableInputProcessing.fetch_and_store(enable);
}
void InputProcessor::onKeyEvent(SystemServices& sServices, Event& event)
{
}
void InputProcessor::onMouseButtonEvent(Event& event)
{
}
void InputProcessor::onCursorPositionChange(Event& event)
{
}
void InputProcessor::onScrollEvent(Event& event)
{
}
}
}
|
{
"content_hash": "a5b7931b20589d394d9b8ebaeaa3366c",
"timestamp": "",
"source": "github",
"line_count": 141,
"max_line_length": 105,
"avg_line_length": 22.4822695035461,
"alnum_prop": 0.6681388012618297,
"repo_name": "AlexandrSachkov/NonLinearEngine",
"id": "a4bb746003d651d4e02d3d489e5b0d1b632a8e5c",
"size": "3439",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "NLE/NL_InputProcessor.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "241755"
},
{
"name": "CMake",
"bytes": "12331"
},
{
"name": "HLSL",
"bytes": "18541"
}
]
}
|
import classNames from 'classnames'
import React from 'react'
import {Portal} from '../portal'
import {useLayer} from './hooks'
import {LayerProvider} from './LayerProvider'
import styles from './Layer.module.css'
const INITIAL_Z_INDEX = 1060
export function Layer(props: React.HTMLProps<HTMLDivElement>) {
return (
<LayerProvider>
<Portal>
<LayerChildren {...props} />
</Portal>
</LayerProvider>
)
}
function LayerChildren({
children,
className,
style = {},
...restProps
}: React.HTMLProps<HTMLDivElement>) {
const layer = useLayer()
return (
<div
{...restProps}
className={classNames(styles.root, className)}
style={{...style, zIndex: INITIAL_Z_INDEX + layer.depth}}
>
{children}
</div>
)
}
|
{
"content_hash": "1fad96d5939b4801e502c9dcad5a2ddb",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 63,
"avg_line_length": 20.526315789473685,
"alnum_prop": 0.6423076923076924,
"repo_name": "sanity-io/sanity",
"id": "118e918c4c54883244f93b380f67252e0bd8d5b8",
"size": "780",
"binary": false,
"copies": "1",
"ref": "refs/heads/next",
"path": "packages/@sanity/base/src/__legacy/@sanity/components/layer/Layer.tsx",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "235048"
},
{
"name": "HTML",
"bytes": "181261"
},
{
"name": "JavaScript",
"bytes": "1485414"
},
{
"name": "Shell",
"bytes": "1303"
},
{
"name": "TypeScript",
"bytes": "3980581"
}
]
}
|
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
{
"content_hash": "2f6e8123cb99aed77da1bd200c88b5ca",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "2d9f2222bd638ef7b77a66dbd1bfeeeef28e08aa",
"size": "182",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Brassicales/Brassicaceae/Draba/Draba glabella/ Syn. Draba sornborgeri/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
package org.mifos.application.fund.persistence;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mifos.application.NamedQueryConstants;
import org.mifos.application.fund.business.FundBO;
import org.mifos.application.fund.util.helpers.FundConstants;
import org.mifos.application.master.business.FundCodeEntity;
import org.mifos.framework.components.logger.LoggerConstants;
import org.mifos.framework.components.logger.MifosLogManager;
import org.mifos.framework.components.logger.MifosLogger;
import org.mifos.framework.exceptions.PersistenceException;
import org.mifos.framework.persistence.Persistence;
public class FundPersistence extends Persistence {
private MifosLogger logger = MifosLogManager.getLogger(LoggerConstants.FUNDLOGGER);
public Long getFundNameCount(String fundName) throws PersistenceException {
logger.debug("getting the fund name count for :" + fundName);
HashMap<String, Object> queryParameters = new HashMap<String, Object>();
queryParameters.put(FundConstants.FUND_NAME, fundName);
return (Long) execUniqueResultNamedQuery(NamedQueryConstants.CHECK_FUND_NAME_EXIST, queryParameters);
}
public List<FundCodeEntity> getFundCodes() throws PersistenceException {
return executeNamedQuery(NamedQueryConstants.GET_FUND_CODES, null);
}
public List<FundBO> getSourcesOfFund() throws PersistenceException {
return executeNamedQuery(NamedQueryConstants.PRDSRCFUNDS, null);
}
public FundBO getFund(String fundName) throws PersistenceException {
Map<String, Object> queryParameters = new HashMap<String, Object>();
queryParameters.put(FundConstants.FUND_NAME, fundName);
return (FundBO) execUniqueResultNamedQuery(NamedQueryConstants.GET_FUND_FOR_GIVEN_NAME, queryParameters);
}
public FundBO getFund(Short fundId) throws PersistenceException {
return (FundBO) getPersistentObject(FundBO.class, fundId);
}
}
|
{
"content_hash": "95b9255aec138f347cffa9180267580b",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 113,
"avg_line_length": 43.19565217391305,
"alnum_prop": 0.7815802717664821,
"repo_name": "mifos/1.4.x",
"id": "24d33f626e7235bcb94c7021ce2aff738823abea",
"size": "2748",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/src/main/java/org/mifos/application/fund/persistence/FundPersistence.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "12805638"
},
{
"name": "JavaScript",
"bytes": "430899"
},
{
"name": "Python",
"bytes": "45199"
},
{
"name": "Shell",
"bytes": "8682"
}
]
}
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.koushik.movieflix.repositry;
import com.koushik.movieflix.entity.Title;
import java.util.List;
/**
*
* @author koushik
*/
public interface TitleRepositry {
public void create(Title title);
public void edit(Title title);
public void destroy(Title title) ;
public List<Title> findTitleEntities();
public List<Title> findTitleEntities(boolean all, int maxResults, int firstResult);
public Title findTitle(Integer id);
}
|
{
"content_hash": "8c8e0ac9aea514c06917e618aa0fa255",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 87,
"avg_line_length": 22.413793103448278,
"alnum_prop": 0.7307692307692307,
"repo_name": "koushik963/movieflix",
"id": "0e38543079b802bea96b2389022597f352d5ac75",
"size": "650",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "server/movieflix/src/main/java/com/koushik/movieflix/repositry/TitleRepositry.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2373"
},
{
"name": "HTML",
"bytes": "24745"
},
{
"name": "Java",
"bytes": "88242"
},
{
"name": "JavaScript",
"bytes": "30872"
}
]
}
|
title: adk38
type: products
image: /img/Screen Shot 2017-05-09 at 11.56.54 AM.png
heading: k38
description: lksadjf lkasdjf lksajdf lksdaj flksadj flksa fdj
main:
heading: Foo Bar BAz
description: |-
***This is i a thing***kjh hjk kj
# Blah Blah
## Blah
### Baah
image1:
alt: kkkk
---
|
{
"content_hash": "ec6a53fd8fba93deaf019fabe461014d",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 61,
"avg_line_length": 22.333333333333332,
"alnum_prop": 0.6656716417910448,
"repo_name": "pblack/kaldi-hugo-cms-template",
"id": "07acdad3887d41edf6e2925cba2198c0312139ea",
"size": "339",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "site/content/pages2/adk38.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "94394"
},
{
"name": "HTML",
"bytes": "18889"
},
{
"name": "JavaScript",
"bytes": "10014"
}
]
}
|
<?php
namespace Google\Service\Iam;
class LintResult extends \Google\Model
{
/**
* @var string
*/
public $debugMessage;
/**
* @var string
*/
public $fieldName;
/**
* @var string
*/
public $level;
/**
* @var int
*/
public $locationOffset;
/**
* @var string
*/
public $severity;
/**
* @var string
*/
public $validationUnitName;
/**
* @param string
*/
public function setDebugMessage($debugMessage)
{
$this->debugMessage = $debugMessage;
}
/**
* @return string
*/
public function getDebugMessage()
{
return $this->debugMessage;
}
/**
* @param string
*/
public function setFieldName($fieldName)
{
$this->fieldName = $fieldName;
}
/**
* @return string
*/
public function getFieldName()
{
return $this->fieldName;
}
/**
* @param string
*/
public function setLevel($level)
{
$this->level = $level;
}
/**
* @return string
*/
public function getLevel()
{
return $this->level;
}
/**
* @param int
*/
public function setLocationOffset($locationOffset)
{
$this->locationOffset = $locationOffset;
}
/**
* @return int
*/
public function getLocationOffset()
{
return $this->locationOffset;
}
/**
* @param string
*/
public function setSeverity($severity)
{
$this->severity = $severity;
}
/**
* @return string
*/
public function getSeverity()
{
return $this->severity;
}
/**
* @param string
*/
public function setValidationUnitName($validationUnitName)
{
$this->validationUnitName = $validationUnitName;
}
/**
* @return string
*/
public function getValidationUnitName()
{
return $this->validationUnitName;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LintResult::class, 'Google_Service_Iam_LintResult');
|
{
"content_hash": "edf8bac8aeedda84eff2b6ca0cd105bb",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 81,
"avg_line_length": 16,
"alnum_prop": 0.5973958333333333,
"repo_name": "googleapis/google-api-php-client-services",
"id": "de9da93a2ce341b2bdd552088ac7bac34d58e370",
"size": "2510",
"binary": false,
"copies": "6",
"ref": "refs/heads/main",
"path": "src/Iam/LintResult.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "PHP",
"bytes": "55414116"
},
{
"name": "Python",
"bytes": "427325"
},
{
"name": "Shell",
"bytes": "787"
}
]
}
|
<?php
namespace Storyplayer\SPv3\Modules;
use DataSift\Storyplayer\PlayerLib\StoryTeller;
use Predis\Client as PredisClient;
use Storyplayer\SPv3\Modules\Redis\FromRedisConn;
use Storyplayer\SPv3\Modules\Redis\UsingRedis;
use Storyplayer\SPv3\Modules\Redis\UsingRedisConn;
class Redis
{
/**
* get data from a Redis instance
*
* @param PredisClient $client
* the client that is connected to the Redis instance
* @return mixed
* the data returned
*/
public static function fromRedisConn(PredisClient $client)
{
return new FromRedisConn($client);
}
/**
* connect to a Redis instance
*
* @return UsingRedis
*/
public static function usingRedis()
{
return new UsingRedis();
}
/**
* perform an action on a Redis instance
*
* @param PredisClient $client
* the client that is connected to the Redis instance
* @return UsingRedisConn
*/
public static function usingRedisConn(PredisClient $client)
{
return new UsingRedisConn($client);
}
}
|
{
"content_hash": "63737c70940a777ee199b70d625621e2",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 65,
"avg_line_length": 22.857142857142858,
"alnum_prop": 0.6446428571428572,
"repo_name": "datasift/storyplayer",
"id": "b4535b0aa64871d1711153970f6b4ecec5d6f8db",
"size": "3048",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "src/php/Storyplayer/SPv3/Modules/Redis.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "5390"
},
{
"name": "HTML",
"bytes": "16005"
},
{
"name": "PHP",
"bytes": "3233010"
},
{
"name": "Python",
"bytes": "744"
},
{
"name": "Ruby",
"bytes": "5596"
},
{
"name": "Shell",
"bytes": "4293"
}
]
}
|
using System;
using NetCoreForce.Client.Models;
using NetCoreForce.Client.Attributes;
using Newtonsoft.Json;
namespace NetCoreForce.Models
{
///<summary>
/// Feed Poll Vote
///<para>SObject Name: FeedPollVote</para>
///<para>Custom Object: False</para>
///</summary>
public class SfFeedPollVote : SObject
{
[JsonIgnore]
public static string SObjectTypeName
{
get { return "FeedPollVote"; }
}
///<summary>
/// Feed Poll Vote ID
/// <para>Name: Id</para>
/// <para>SF Type: id</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "id")]
[Updateable(false), Createable(false)]
public string Id { get; set; }
///<summary>
/// Feed Item ID
/// <para>Name: FeedItemId</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "feedItemId")]
[Updateable(false), Createable(false)]
public string FeedItemId { get; set; }
///<summary>
/// Feed Poll Choice ID
/// <para>Name: ChoiceId</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "choiceId")]
[Updateable(false), Createable(false)]
public string ChoiceId { get; set; }
///<summary>
/// ReferenceTo: FeedPollChoice
/// <para>RelationshipName: Choice</para>
///</summary>
[JsonProperty(PropertyName = "choice")]
[Updateable(false), Createable(false)]
public SfFeedPollChoice Choice { get; set; }
///<summary>
/// Created By ID
/// <para>Name: CreatedById</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "createdById")]
[Updateable(false), Createable(false)]
public string CreatedById { get; set; }
///<summary>
/// ReferenceTo: User
/// <para>RelationshipName: CreatedBy</para>
///</summary>
[JsonProperty(PropertyName = "createdBy")]
[Updateable(false), Createable(false)]
public SfUser CreatedBy { get; set; }
///<summary>
/// Created Date
/// <para>Name: CreatedDate</para>
/// <para>SF Type: datetime</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "createdDate")]
[Updateable(false), Createable(false)]
public DateTimeOffset? CreatedDate { get; set; }
///<summary>
/// Last Modified Date
/// <para>Name: LastModifiedDate</para>
/// <para>SF Type: datetime</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "lastModifiedDate")]
[Updateable(false), Createable(false)]
public DateTimeOffset? LastModifiedDate { get; set; }
///<summary>
/// Deleted
/// <para>Name: IsDeleted</para>
/// <para>SF Type: boolean</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "isDeleted")]
[Updateable(false), Createable(false)]
public bool? IsDeleted { get; set; }
}
}
|
{
"content_hash": "7543935ae23356c08daadfbc16b0b9bd",
"timestamp": "",
"source": "github",
"line_count": 108,
"max_line_length": 55,
"avg_line_length": 26.97222222222222,
"alnum_prop": 0.6505320974939924,
"repo_name": "anthonyreilly/NetCoreForce",
"id": "7eddf826f778207d9087587120b39e5630940dd0",
"size": "3010",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "src/NetCoreForce.Models/SfFeedPollVote.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "3805931"
}
]
}
|
package org.springframework.social.greenhouse.api;
/**
* Model class representing a Greenhouse group.
*
* @author Craig Walls
*/
public class Group {
private String id;
private String label;
/**
* The group ID.
*
* @return the group ID.
*/
public String getId() {
return id;
}
/**
* The group's label.
*
* @return the group's label.
*/
public String getLabel() {
return label;
}
}
|
{
"content_hash": "259961e971a18c51bf442defe2d8031c",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 50,
"avg_line_length": 12.818181818181818,
"alnum_prop": 0.6217494089834515,
"repo_name": "pyricau/greenhouse-androidannotations",
"id": "2ff5342fc4565b88c321505cfe45c1b0882d5eaa",
"size": "1038",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/org/springframework/social/greenhouse/api/Group.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "172234"
}
]
}
|
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
Mycotaxon 24: 459 (1985)
#### Original name
Acremonium roseum (Oudem.) W. Gams, 1971
### Remarks
null
|
{
"content_hash": "ac6611605a58433b2b44744712e1ee20",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 40,
"avg_line_length": 14.615384615384615,
"alnum_prop": 0.7,
"repo_name": "mdoering/backbone",
"id": "050ac5e5eecd84fcf7c9e49a2f15b9319a6b7ca5",
"size": "266",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Sordariomycetes/Chaetosphaeriales/Chaetosphaeriaceae/Dischloridium/Dischloridium roseum/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
{
"content_hash": "e8f972cbfc3283e80ee9dd4a1f595a91",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "98dd7d6e1d7f8915837956caa22f5fe843e6cd07",
"size": "203",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Chrysothamnus/Chrysothamnus viscidiflorus/ Syn. Chrysothamnus pumilus acuminatus/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
module Data.LogInfo (
LogInfo
) where
import GHC.Generics
import Data.Aeson
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import qualified Data.Text.Read as Text
import Data.Monoid ((<>))
import Data.Bifunctor (first)
import Control.Spoon
import Format.Pretty
import Utils.Text (showText, readText)
import Servant
data MessageType
= Info
| Error
deriving (Show, Read, Generic)
instance FromJSON MessageType
data Message = Message
{ messageText :: Text
, messageType :: MessageType
} deriving (Generic, Show)
instance FromJSON Message
instance Pretty Message where
prettify (Message msgText msgType) = Text.concat [showText msgType, ": ", msgText]
data Device = Device
{ uuid :: Integer
, platform :: Text
, model :: Text
} deriving (Generic, Show)
instance FromJSON Device
type Latitude = Double
type Longitude = Double
data Location
= Coords Latitude Longitude
| UnknownLocation
deriving (Show)
instance FromJSON Location where
parseJSON (Object v) = parseLocation `fmap` (v .: "location")
instance Pretty Location where
prettify (Coords lat long) = Text.concat ["[", showText lat, ", ", showText long, "]"]
prettify UnknownLocation = "Unknown Location"
-- | Parse text containing coordinates in list format: "[latitude, longitude]"
parseLocation :: Text -> Location
parseLocation text =
case readText text of
Nothing -> UnknownLocation
Just [lat, long] -> Coords lat long
data LogInfo = LogInfo
{ appName :: Text
, message :: Message
, location :: Location
, device :: Device
} deriving (Generic, Show)
instance FromJSON LogInfo
instance Pretty LogInfo where
prettify (LogInfo name msg loc dev) =
Text.concat [
name,
" | ", showText (uuid dev),
" | ", prettify loc,
" | ", platform dev, " - ", model dev,
" | ", prettify msg
]
instance FromFormUrlEncoded LogInfo where
fromFormUrlEncoded inputs =
-- fromFormUrlEncoded's return type should be Either String LogInfo, but
-- logInfo is of type Either Text LogInfo.
--
-- We can fix this by using Bifunctor's `first` function to modify the left side.
Text.unpack `first` logInfo
-- Defining external functions is for losers, right?
where
logInfo = do
name <- extract "appName"
message <- do
msgText <- extract "message"
msgType <- readExtract "messageType"
return (Message msgText msgType)
location <- parseLocation `fmap` (extract "location")
device <- do
uuid <- readExtract "uuid"
platform <- extract "platform"
model <- extract "model"
return (Device uuid platform model)
return (LogInfo name message location device)
where
-- Essentially `lookup` wrapped in Either
extract :: Text -> Either Text Text
extract label =
case lookup label inputs of
Nothing -> Left $ Text.concat ["Couldn't find label ", label, "."]
Just value -> Right value
-- Essentially `readText` applied to `extract label`, wrapped in Either
readExtract :: Read a => Text -> Either Text a
readExtract label = do
x <- extract label
case readText x of
Nothing -> Left $ Text.concat ["Couldn't parse label ", label, "."]
Just value -> Right value
|
{
"content_hash": "04d80314a83b274efcdde7f21e553257",
"timestamp": "",
"source": "github",
"line_count": 139,
"max_line_length": 95,
"avg_line_length": 28.913669064748202,
"alnum_prop": 0.5859666583727295,
"repo_name": "frublox/logging-server",
"id": "a43bae3e583ede98d7cbc6b63c7a017783659d22",
"size": "4019",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/Data/logInfo.hs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Haskell",
"bytes": "7036"
}
]
}
|
#ifndef _LOGGER_STRINGUTIL_H
#define _LOGGER_STRINGUTIL_H
#ifdef __cplusplus
extern "C" {
#endif
/**
@brief Retrieve just the filename from the full filepath (unix shell equivalent 'basename')
@detail returned parameter #stringFileNameReturned does not contain a new refrence but simply a pointer within the char array provided w/o whitespaces
@param[out] stringFileNameReturned char array of just the filename
@param[out] stringFileNameReturnedLen length of above char array (optional)
@param[in] filePath char array to remove path from
@param[in] filePathLen length of above char array
*/
void logger_string_fileNameFromPath ( char ** stringFileNameReturned, size_t * stringFileNameReturnedLen, const char * filePath, size_t filePathLen );
/**
@brief Return a subreference containing char array #str removed of any leading & trailing whitespace
@detail returned parameter #stringTrimmed does not contain a new refrence but simply a pointer within the char array provided w/o whitespaces
@param[out] stringTrimmed returned whitespace free char array
@param[out] stringTrimmedLen length of above array
@param[in] str char array to remove whitespaces from
@param[in] strLen length of above array
*/
void logger_string_trimWhitespace ( char ** stringTrimmed, size_t * stringTrimmedLen, char * str, size_t strLen );
/**
@brief Trim any filename extension at the end the provided char array #str
@detail #stringTrimmedLen will return the last occurence of the character '.' in the #str char array
@param[out] stringTrimmedLen length of string w/o fileName extension
@param[in] str char array to search
@param[in] strLen length of above char array
*/
void logger_string_trimFileNameExtension ( size_t * stringTrimmedLen, char * str, size_t strLen );
/** Return pointer to first occurence of char in given string.
@param[in] str string to search
@param[in] searchChar character to look for
@return !NULL on success
*/
char* logger_string_findFirstOccurenceOfChar ( const char* str, const char searchChar );
/** Return pointer to first occurence of char in given string.
@param[in] str string to search
@param[in] strLen string length of above param
@param[in] searchChar character to look for
@return occurences of search char in string
*/
uint32_t logger_string_numberOfOccurencesOfChar ( const char* str, size_t strLen, const char searchChar );
#ifdef __cplusplus
}
#endif
#endif /* _LOGGER_STRINGUTIL_H */
|
{
"content_hash": "06d247fd1f65dd6d6a7b982ae4d673c9",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 151,
"avg_line_length": 36.11764705882353,
"alnum_prop": 0.7671009771986971,
"repo_name": "Ryandev/Logger",
"id": "e1893767608dadae3cd9ced7adb4cf78a2d19565",
"size": "2660",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/logger_stringUtil.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "96497"
},
{
"name": "Shell",
"bytes": "834"
}
]
}
|
import sys
from collections import OrderedDict
from optparse import make_option
from django.db import models
from django.core.management.base import BaseCommand, CommandError
from django.core.exceptions import ImproperlyConfigured
from processorfield import FileProcessorField
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--alias', dest='alias', action='append', default=[],
help='Specifies the output serialization format for fixtures.'),
make_option('-e', '--exclude', dest='exclude',action='append', default=[],
help='An appname or appname.ModelName to exclude (use multiple --exclude to exclude multiple apps/models).'),
make_option('-a', '--all', action='store_true', dest='all', default=False,
help="Use Django's base manager to dump all models stored in the database, including those that would otherwise be filtered or modified by a custom manager."),
)
help = 'Regenerate the processor fields for each model in the apps'
args = '[appname appname.ModelName ...]'
can_import_settings = True
def handle(self, *app_labels, **options):
from django.conf import settings
from django.db.models import get_app, get_apps, get_model, get_models
from django.utils import translation
translation.deactivate()
alias = options.get('alias')
excludes = options.get('exclude')
all = options.get('all')
excluded_apps = set()
excluded_models = set()
for exclude in excludes:
if '.' in exclude:
app_label, model_name = exclude.split('.', 1)
model_obj = get_model(app_label, model_name)
if not model_obj:
raise CommandError('Unknown model in excludes: %s' % exclude)
excluded_models.add(model_obj)
else:
try:
app_obj = get_app(exclude)
excluded_apps.add(app_obj)
except ImproperlyConfigured:
raise CommandError('Unknown app in excludes: %s' % exclude)
if len(app_labels) == 0:
app_list = OrderedDict((app, None) for app in get_apps() if app not in excluded_apps)
else:
app_list = OrderedDict()
for label in app_labels:
try:
app_label, model_label = label.split('.')
try:
app = get_app(app_label)
except ImproperlyConfigured:
raise CommandError("Unknown application: %s" % app_label)
if app in excluded_apps:
continue
model = get_model(app_label, model_label)
if model is None:
raise CommandError("Unknown model: %s.%s" % (app_label, model_label))
if app in app_list.keys():
if app_list[app] and model not in app_list[app]:
app_list[app].append(model)
else:
app_list[app] = [model]
except ValueError:
# This is just an app - no model qualifier
app_label = label
try:
app = get_app(app_label)
except ImproperlyConfigured:
raise CommandError("Unknown application: %s" % app_label)
if app in excluded_apps:
continue
app_list[app] = None
model_list = OrderedDict()
for app, app_models in app_list.iteritems():
app_models = app_models or get_models(app) or []
for model in app_models:
fields = []
for field in model._meta.fields:
if isinstance(field, FileProcessorField):
fields.append(field)
if fields:
model_list[model] = fields
spaces = ' '*20
for model, fields in model_list.iteritems():
field_names = [f.name for f in fields]
base = "Processing %s in %s.%s"%(', '.join(field_names), model._meta.app_label, model._meta.object_name)
sys.stdout.write(base)
sys.stdout.flush()
try:
instances = model.objects.only(*field_names).all()[:]
count = len(instances)
total = (count*len(fields))
enumerated_fields = list(enumerate(fields))
for i, instance in enumerate(instances):
for j, field in enumerated_fields:
current = float(i+j)
sys.stdout.write("\r\033[93m[IN PROGRESS]\033[0m %s [%d/%d] (%d%%)" %(base, current, total, current/total*100))
sys.stdout.flush()
file = getattr(instance, field.name)
file.reprocess(*alias)
sys.stdout.write("\r\033[92m[COMPLETED]\033[0m %s%s\n"%(base,spaces))
sys.stdout.flush()
except Exception, e:
sys.stdout.write("\r\033[91m[FAILED]\033[0m %s%s\n"%(base,spaces))
sys.stdout.flush()
raise e
|
{
"content_hash": "a8675e408b2353f9d0c5091251b2f803",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 171,
"avg_line_length": 47.10526315789474,
"alnum_prop": 0.5294227188081937,
"repo_name": "syrusakbary/django-processorfield",
"id": "2eedc4ad7269091a27edcfb2e987caa61e89eb76",
"size": "5370",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "processorfield/management/commands/regenerate.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Python",
"bytes": "13341"
}
]
}
|
@interface OrgApacheLuceneAnalysisCoreKeywordTokenizer () {
@public
jboolean done_;
jint finalOffset_;
id<OrgApacheLuceneAnalysisTokenattributesCharTermAttribute> termAtt_;
id<OrgApacheLuceneAnalysisTokenattributesOffsetAttribute> offsetAtt_;
}
@end
J2OBJC_FIELD_SETTER(OrgApacheLuceneAnalysisCoreKeywordTokenizer, termAtt_, id<OrgApacheLuceneAnalysisTokenattributesCharTermAttribute>)
J2OBJC_FIELD_SETTER(OrgApacheLuceneAnalysisCoreKeywordTokenizer, offsetAtt_, id<OrgApacheLuceneAnalysisTokenattributesOffsetAttribute>)
@implementation OrgApacheLuceneAnalysisCoreKeywordTokenizer
+ (jint)DEFAULT_BUFFER_SIZE {
return OrgApacheLuceneAnalysisCoreKeywordTokenizer_DEFAULT_BUFFER_SIZE;
}
J2OBJC_IGNORE_DESIGNATED_BEGIN
- (instancetype)init {
OrgApacheLuceneAnalysisCoreKeywordTokenizer_init(self);
return self;
}
J2OBJC_IGNORE_DESIGNATED_END
- (instancetype)initWithInt:(jint)bufferSize {
OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithInt_(self, bufferSize);
return self;
}
- (instancetype)initWithOrgApacheLuceneUtilAttributeFactory:(OrgApacheLuceneUtilAttributeFactory *)factory
withInt:(jint)bufferSize {
OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithOrgApacheLuceneUtilAttributeFactory_withInt_(self, factory, bufferSize);
return self;
}
- (jboolean)incrementToken {
if (!done_) {
[self clearAttributes];
done_ = true;
jint upto = 0;
IOSCharArray *buffer = [((id<OrgApacheLuceneAnalysisTokenattributesCharTermAttribute>) nil_chk(termAtt_)) buffer];
while (true) {
jint length = [((JavaIoReader *) nil_chk(input_)) readWithCharArray:buffer withInt:upto withInt:((IOSCharArray *) nil_chk(buffer))->size_ - upto];
if (length == -1) break;
upto += length;
if (upto == buffer->size_) buffer = [termAtt_ resizeBufferWithInt:1 + buffer->size_];
}
[termAtt_ setLengthWithInt:upto];
finalOffset_ = [self correctOffsetWithInt:upto];
[((id<OrgApacheLuceneAnalysisTokenattributesOffsetAttribute>) nil_chk(offsetAtt_)) setOffsetWithInt:[self correctOffsetWithInt:0] withInt:finalOffset_];
return true;
}
return false;
}
- (void)end {
[super end];
[((id<OrgApacheLuceneAnalysisTokenattributesOffsetAttribute>) nil_chk(offsetAtt_)) setOffsetWithInt:finalOffset_ withInt:finalOffset_];
}
- (void)reset {
[super reset];
self->done_ = false;
}
- (void)dealloc {
RELEASE_(termAtt_);
RELEASE_(offsetAtt_);
[super dealloc];
}
+ (const J2ObjcClassInfo *)__metadata {
static J2ObjcMethodInfo methods[] = {
{ NULL, NULL, 0x1, -1, -1, -1, -1, -1, -1 },
{ NULL, NULL, 0x1, -1, 0, -1, -1, -1, -1 },
{ NULL, NULL, 0x1, -1, 1, -1, -1, -1, -1 },
{ NULL, "Z", 0x11, -1, -1, 2, -1, -1, -1 },
{ NULL, "V", 0x11, -1, -1, 2, -1, -1, -1 },
{ NULL, "V", 0x1, -1, -1, 2, -1, -1, -1 },
};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-multiple-method-names"
#pragma clang diagnostic ignored "-Wundeclared-selector"
methods[0].selector = @selector(init);
methods[1].selector = @selector(initWithInt:);
methods[2].selector = @selector(initWithOrgApacheLuceneUtilAttributeFactory:withInt:);
methods[3].selector = @selector(incrementToken);
methods[4].selector = @selector(end);
methods[5].selector = @selector(reset);
#pragma clang diagnostic pop
static const J2ObjcFieldInfo fields[] = {
{ "DEFAULT_BUFFER_SIZE", "I", .constantValue.asInt = OrgApacheLuceneAnalysisCoreKeywordTokenizer_DEFAULT_BUFFER_SIZE, 0x19, -1, -1, -1, -1 },
{ "done_", "Z", .constantValue.asLong = 0, 0x2, -1, -1, -1, -1 },
{ "finalOffset_", "I", .constantValue.asLong = 0, 0x2, -1, -1, -1, -1 },
{ "termAtt_", "LOrgApacheLuceneAnalysisTokenattributesCharTermAttribute;", .constantValue.asLong = 0, 0x12, -1, -1, -1, -1 },
{ "offsetAtt_", "LOrgApacheLuceneAnalysisTokenattributesOffsetAttribute;", .constantValue.asLong = 0, 0x2, -1, -1, -1, -1 },
};
static const void *ptrTable[] = { "I", "LOrgApacheLuceneUtilAttributeFactory;I", "LJavaIoIOException;" };
static const J2ObjcClassInfo _OrgApacheLuceneAnalysisCoreKeywordTokenizer = { "KeywordTokenizer", "org.apache.lucene.analysis.core", ptrTable, methods, fields, 7, 0x11, 6, 5, -1, -1, -1, -1, -1 };
return &_OrgApacheLuceneAnalysisCoreKeywordTokenizer;
}
@end
void OrgApacheLuceneAnalysisCoreKeywordTokenizer_init(OrgApacheLuceneAnalysisCoreKeywordTokenizer *self) {
OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithInt_(self, OrgApacheLuceneAnalysisCoreKeywordTokenizer_DEFAULT_BUFFER_SIZE);
}
OrgApacheLuceneAnalysisCoreKeywordTokenizer *new_OrgApacheLuceneAnalysisCoreKeywordTokenizer_init() {
J2OBJC_NEW_IMPL(OrgApacheLuceneAnalysisCoreKeywordTokenizer, init)
}
OrgApacheLuceneAnalysisCoreKeywordTokenizer *create_OrgApacheLuceneAnalysisCoreKeywordTokenizer_init() {
J2OBJC_CREATE_IMPL(OrgApacheLuceneAnalysisCoreKeywordTokenizer, init)
}
void OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithInt_(OrgApacheLuceneAnalysisCoreKeywordTokenizer *self, jint bufferSize) {
OrgApacheLuceneAnalysisTokenizer_init(self);
self->done_ = false;
JreStrongAssign(&self->termAtt_, [self addAttributeWithIOSClass:OrgApacheLuceneAnalysisTokenattributesCharTermAttribute_class_()]);
JreStrongAssign(&self->offsetAtt_, [self addAttributeWithIOSClass:OrgApacheLuceneAnalysisTokenattributesOffsetAttribute_class_()]);
if (bufferSize <= 0) {
@throw create_JavaLangIllegalArgumentException_initWithNSString_(@"bufferSize must be > 0");
}
[((id<OrgApacheLuceneAnalysisTokenattributesCharTermAttribute>) nil_chk(self->termAtt_)) resizeBufferWithInt:bufferSize];
}
OrgApacheLuceneAnalysisCoreKeywordTokenizer *new_OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithInt_(jint bufferSize) {
J2OBJC_NEW_IMPL(OrgApacheLuceneAnalysisCoreKeywordTokenizer, initWithInt_, bufferSize)
}
OrgApacheLuceneAnalysisCoreKeywordTokenizer *create_OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithInt_(jint bufferSize) {
J2OBJC_CREATE_IMPL(OrgApacheLuceneAnalysisCoreKeywordTokenizer, initWithInt_, bufferSize)
}
void OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithOrgApacheLuceneUtilAttributeFactory_withInt_(OrgApacheLuceneAnalysisCoreKeywordTokenizer *self, OrgApacheLuceneUtilAttributeFactory *factory, jint bufferSize) {
OrgApacheLuceneAnalysisTokenizer_initWithOrgApacheLuceneUtilAttributeFactory_(self, factory);
self->done_ = false;
JreStrongAssign(&self->termAtt_, [self addAttributeWithIOSClass:OrgApacheLuceneAnalysisTokenattributesCharTermAttribute_class_()]);
JreStrongAssign(&self->offsetAtt_, [self addAttributeWithIOSClass:OrgApacheLuceneAnalysisTokenattributesOffsetAttribute_class_()]);
if (bufferSize <= 0) {
@throw create_JavaLangIllegalArgumentException_initWithNSString_(@"bufferSize must be > 0");
}
[((id<OrgApacheLuceneAnalysisTokenattributesCharTermAttribute>) nil_chk(self->termAtt_)) resizeBufferWithInt:bufferSize];
}
OrgApacheLuceneAnalysisCoreKeywordTokenizer *new_OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithOrgApacheLuceneUtilAttributeFactory_withInt_(OrgApacheLuceneUtilAttributeFactory *factory, jint bufferSize) {
J2OBJC_NEW_IMPL(OrgApacheLuceneAnalysisCoreKeywordTokenizer, initWithOrgApacheLuceneUtilAttributeFactory_withInt_, factory, bufferSize)
}
OrgApacheLuceneAnalysisCoreKeywordTokenizer *create_OrgApacheLuceneAnalysisCoreKeywordTokenizer_initWithOrgApacheLuceneUtilAttributeFactory_withInt_(OrgApacheLuceneUtilAttributeFactory *factory, jint bufferSize) {
J2OBJC_CREATE_IMPL(OrgApacheLuceneAnalysisCoreKeywordTokenizer, initWithOrgApacheLuceneUtilAttributeFactory_withInt_, factory, bufferSize)
}
J2OBJC_CLASS_TYPE_LITERAL_SOURCE(OrgApacheLuceneAnalysisCoreKeywordTokenizer)
|
{
"content_hash": "9e33def9598e14ae7f5dbd9e957d7484",
"timestamp": "",
"source": "github",
"line_count": 157,
"max_line_length": 217,
"avg_line_length": 49.29936305732484,
"alnum_prop": 0.7772609819121447,
"repo_name": "lukhnos/objclucene",
"id": "95582cc06de2106192e8c56465c2df49df7d0740",
"size": "8499",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/org/apache/lucene/analysis/core/KeywordTokenizer.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "72674"
},
{
"name": "Objective-C",
"bytes": "31684259"
},
{
"name": "Shell",
"bytes": "491"
}
]
}
|
'use strict';
module.exports = {
db: 'mongodb://elad:elance-xy4@ds050087.mongolab.com:50087/themap',
app: {
name: 'MEAN - A Modern Stack - Production'
},
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
},
twitter: {
clientID: 'CONSUMER_KEY',
clientSecret: 'CONSUMER_SECRET',
callbackURL: 'http://localhost:3000/auth/twitter/callback'
},
github: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/github/callback'
},
google: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/google/callback'
},
linkedin: {
clientID: 'API_KEY',
clientSecret: 'SECRET_KEY',
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
},
emailFrom: 'SENDER EMAIL ADDRESS', // sender address like ABC <abc@example.com>
mailer: {
service: 'SERVICE_PROVIDER',
auth: {
user: 'EMAIL_ID',
pass: 'PASSWORD'
}
}
};
|
{
"content_hash": "37785d42b44a5731925d04895eca7e51",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 81,
"avg_line_length": 25.878048780487806,
"alnum_prop": 0.6352497643732328,
"repo_name": "incephalon/dallasight",
"id": "9b04bf32bd63979a3e7ddd1f783b6cbc8d825edc",
"size": "1061",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "config/env/production.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "5625"
},
{
"name": "JavaScript",
"bytes": "306394"
}
]
}
|
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('knowledgeplatform', '0011_remove_coursecategorypage_name'),
]
operations = [
migrations.AddField(
model_name='coursepage',
name='category',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='knowledgeplatform.CourseCategoryPage'),
),
]
|
{
"content_hash": "af511e8ef66116aa0a224e90cbf97488",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 166,
"avg_line_length": 29.105263157894736,
"alnum_prop": 0.6672694394213382,
"repo_name": "Upande/MaMaSe",
"id": "ecf2d655ff7531bb3aa10fb53eb203a1f82e1bca",
"size": "625",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "apps/knowledgeplatform/migrations/0012_coursepage_category.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "192165"
},
{
"name": "HTML",
"bytes": "1244832"
},
{
"name": "Java",
"bytes": "305368"
},
{
"name": "JavaScript",
"bytes": "919803"
},
{
"name": "PHP",
"bytes": "569"
},
{
"name": "Python",
"bytes": "263206"
},
{
"name": "Shell",
"bytes": "4681"
}
]
}
|
function reflectedAmbientLight=ward_AmbientLight(params,angles)
% reflectedAmbientLight=ward_AmbientLight(params,angles)
%
% 12 august 2004 dpl wrote it.
numSamples=params.numSamples;
numPoints=params.numPoints;
numLightSources=params.numLightSources;
ambientLightIntensity=params.ambientLightIntensity;
% ambient light
j=find(angles(2,:,:));
reflectedAmbientLight=zeros([numSamples numPoints numLightSources]);
reflectedAmbientLight(:,j)=repmat(ambientLightIntensity,[1 length(j)]);
|
{
"content_hash": "21cb9f2cebb86a3bf1b7ca675ee7bb5c",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 71,
"avg_line_length": 34.642857142857146,
"alnum_prop": 0.8309278350515464,
"repo_name": "DavidBrainard/SphereRendererToolbox",
"id": "fcd7f850c3e90058d04f6dd39ac67b3a38a16f4f",
"size": "485",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SphereRenderer/ward_AmbientLight.m",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "M",
"bytes": "221"
},
{
"name": "Matlab",
"bytes": "166886"
},
{
"name": "Objective-C",
"bytes": "191"
}
]
}
|
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
{
"content_hash": "eb5310be60e7f179deca017f977270c2",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "2364df347b9bff2dae543e04e25fa7b162f50e3e",
"size": "181",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Gentianales/Rubiaceae/Pomax/Pomax umbellata/ Syn. Pomax rupestris/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
from zohmg.utils import fail # heh.
import os, re, sys, time
# the configuration file has four parts:
# 'dataset' - string
# 'dimensions' - list of strings
# 'units' - list of strings
# 'projections' - list of lists
class ConfigNotLoaded(Exception):
def __init__(self, value):
self.error = value
def __str__(self):
return self.error
# TODO: multiple dataset files
class Config(object):
def __init__(self, config_file=None):
if config_file:
self.config_file = config_file
else:
self.config_file = "dataset.yaml"
self.config = {}
self.__read_config()
def __read_config(self):
import yaml
config_loaded = False
possible_configs = [self.config_file, "config/"+self.config_file]
file_loaded = None
# two error conditions can occur:
# A) all files missing/can't be opened. => try next file, report later.
# B) a file opens, but can't be parsed. => report imm.
while (not config_loaded and len(possible_configs) > 0):
config_file = possible_configs.pop()
try:
f = open(config_file, "r")
except IOError, e:
continue # try to open the next file.
# we managed to open the file; will not try and open any more.
# now, load yaml.
try:
self.config = yaml.load(f)
file_loaded = config_file
except yaml.scanner.ScannerError, e:
# condition B.
# report error immediately.
sys.stderr.write("Configuration error: could not parse %s.\n" % config_file)
sys.stderr.write("%s\n", e)
f.close()
sys.exit(1)
# ok, good!
f.close()
config_loaded = True
if not config_loaded:
# condition A.
sys.stderr.write("Configuration error: Could not read dataset configuration " \
"from any of these files:\n" \
"\n".join(possible_configs) + "\n")
raise ConfigNotLoaded("Could not read configuration file.")
# check contents.
if not self.sanity_check():
msg = "[%s] Configuration error: Could not parse configuration from %s." % (time.asctime(), file_loaded)
fail(msg) # TODO: should maybe not use fail as it raises SystemExit.
return self.config
def dataset(self):
return self.config['dataset']
def dimensions(self):
return self.config['dimensions']
def units(self):
return self.config['units']
def projections(self):
# turn list of strings into list of list of strings.
# ['country', 'country-domain-useragent-usertype']
# => [['country'], ['country', 'domain', 'useragent', 'usertype']]
return map(lambda s : s.split('-'), self.config['projections'])
# returns True if configuration is sane,
# False otherwise.
def sanity_check(self):
sane = True # .. so far.
try:
# must be able to read these.
dataset = self.dataset()
ds = self.dimensions()
us = self.units()
ps = self.projections()
except:
# might as well return straight away; nothing else will work.
print >>sys.stderr, "Configuration error: Missing definition of dataset, dimensions, units, projections."
return False
# dimensions, projections and units must be non-empty.
if ds == None or us == None or ps == None or \
len(ds) == 0 or len(us) == 0 or len(ps) == 0:
print >>sys.stderr, "Configuration error: dimensions, projections and units must be non-empty."
return False
# also, the configuration may not reference unknown dimensions.
for p in ps:
for d in p:
if d not in ds:
print >>sys.stderr, "Configuration error: %s is a reference to an unkown dimension." % d
sane = False
# also, there must be no funny characters in the name of dimensions or units.
# dimensions and units will feature in the columnfamily name and rowkey respectively.
for (type, data) in [('dimension', ds), ('unit', us)]:
for d in data:
if re.match('^[a-zA-Z0-9]+$', d) == None:
print >>sys.stderr, "Configuration error: '%s' is an invalid %s name." % (d, type)
sane = False
# we can be a litte less strict with dataset names since they become the table names.
if re.match('^[a-zA-Z0-9]+[a-zA-Z0-9-_]*[a-zA-Z0-9]+$', dataset) == None:
print >>sys.stderr, "Configuration error: '%s' is an invalid dataset name." % dataset
sane = False
return sane
class Environ(object):
def __init__(self):
self.environ = {}
self.read_environ()
def get(self, key):
try:
return self.environ[key]
except:
return ''
def read_environ(self):
# add config path so we can import from it.
sys.path.append(".")
sys.path.append("config")
try:
import environment
except ImportError:
msg = "[%s] Error: Could not import environment.py" % time.asctime()
fail(msg)
for key in dir(environment):
self.environ[key] = environment.__dict__[key]
|
{
"content_hash": "29e77ea60655d794b915a5073a7bf06a",
"timestamp": "",
"source": "github",
"line_count": 164,
"max_line_length": 117,
"avg_line_length": 34.09756097560975,
"alnum_prop": 0.5491773962804005,
"repo_name": "zohmg/zohmg",
"id": "28876556cc093485965bca947b4a3f0557cb86dc",
"size": "6378",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/zohmg/config.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "51788"
},
{
"name": "JavaScript",
"bytes": "13239"
},
{
"name": "Python",
"bytes": "363980"
},
{
"name": "Shell",
"bytes": "18560"
}
]
}
|
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe AutoStubber do
describe "stub signals" do
before :each do
@class = stub_everything
@class.stubs(:instance_variable_get).with(:@signals).returns({})
@host = stub_everything
@host.stubs(:class).returns(@class)
end
it "should create an omni stub for each signal defined" do
auto_stubber = AutoStubber.new
auto_stubber.expects(:stub_everything).times(2)
@class.stubs(:instance_variable_get).with(:@signals).returns({'a' => 1, 'b' => 2})
auto_stubber.stub_signals(@host)
end
it "should set signal host's signals as the omni stubs hash" do
auto_stubber = AutoStubber.new
auto_stubber.stubs(:stub_everything).returns("bla")
@class.stubs(:instance_variable_get).with(:@signals).returns({'a' => 1, 'b' => 2})
@host.expects(:instance_variable_set).with(:@signals, has_key("b"))
auto_stubber.stub_signals(@host)
end
it "should always define a 'should fire' method" do
auto_stubber = AutoStubber.new
auto_stubber.stubs(:stub_everything)
@class.expects(:send).with(:define_method, :should_fire)
auto_stubber.stub_signals(@host)
end
end
describe "stub regions" do
before :each do
@class = stub_everything
@class.stubs(:instance_variable_get).with(:@regions).returns({})
@host = stub_everything
@host.stubs(:class).returns(@class)
end
it "should create an omni stub for each region defined" do
auto_stubber = AutoStubber.new
auto_stubber.expects(:stub_everything).times(2)
@class.stubs(:instance_variable_get).with(:@regions).returns({'r1' => 1, 'r2' => 2})
auto_stubber.stub_regions(@host)
end
it "should create a method on host for each region defined" do
auto_stubber = AutoStubber.new
@class.stubs(:instance_variable_get).with(:@regions).returns({'r1' => 1, 'r2' => 2})
@class.expects(:define_method).with('r1')
@class.expects(:define_method).with('r2')
auto_stubber.stub_regions(@host)
end
it "should set region host's regions as the omni stubs hash" do
auto_stubber = AutoStubber.new
auto_stubber.stubs(:stub_everything).returns("bla")
@class.stubs(:instance_variable_get).with(:@regions).returns({'a' => 1, 'b' => 2})
@host.expects(:instance_variable_set).with(:@regions, has_key('b'))
auto_stubber.stub_regions(@host)
end
it "should always define a 'should change region' method" do
auto_stubber = AutoStubber.new
auto_stubber.stubs(:stub_everything)
@class.expects(:send).with(:define_method, :should_change_region)
auto_stubber.stub_regions(@host)
end
end
describe "stub services" do
before :each do
@class = stub_everything
@class.stubs(:instance_variable_get).with(:@services).returns({})
@host = stub_everything
@host.stubs(:class).returns(@class)
end
it "should create an omni stub for each service defined" do
auto_stubber = AutoStubber.new
auto_stubber.expects(:stub_everything).times(2)
@class.stubs(:instance_variable_get).with(:@services).returns({'s1' => 1, 's2' => 2})
auto_stubber.stub_services(@host)
end
it "should call instance_variable_set on host for each service defined" do
auto_stubber = AutoStubber.new
auto_stubber.stubs(:stub_everything)
@host.expects(:instance_variable_set).with("@s1", anything)
@host.expects(:instance_variable_set).with("@s2", anything)
@class.stubs(:instance_variable_get).with(:@services).returns({'s1' => 1, 's2' => 2})
auto_stubber.stub_services(@host)
end
it "should create a method on host for each service defined" do
auto_stubber = AutoStubber.new
@class.stubs(:instance_variable_get).with(:@services).returns({'s1' => 1, 's2' => 2})
@class.expects(:define_method).with('s1')
@class.expects(:define_method).with('s2')
auto_stubber.stub_services(@host)
end
end
describe "stub_view" do
it "should call instance_variable_set with right params" do
auto_stubber = AutoStubber.new
auto_stubber.stubs(:stub_everything).returns(1)
viewmodel = stub()
viewmodel.expects(:instance_variable_set).with(:@view, 1)
auto_stubber.stub_view(viewmodel)
end
it "should create an accessor method for view" do
auto_stubber = AutoStubber.new
auto_stubber.stubs(:stub_everything)
viewmodel = stub()
viewmodel.stubs(:class).returns(mock(:define_method))
auto_stubber.stub_view(viewmodel)
viewmodel.view
end
end
describe "stub_viewmodel" do
before :each do
@stubber = AutoStubber.new
@class = stub_everything
@class.stubs(:@services).returns({})
@class.stubs(:@regions).returns({})
@class.stubs(:@signals).returns({})
@instance = stub_everything
@instance.stubs(:class).returns(@class)
Freightrain.stubs(:[]).with(:test_view_model).returns(@instance)
end
it "should ask Freightrain for the right element" do
Freightrain.expects(:[]).with(:test_view_model).returns(@instance)
@stubber.stub_viewmodel(:test)
end
it "should always override bootstrap" do
@class.expects(:define_method).with(:bootstrap)
@stubber.stub_viewmodel(:test)
end
it "should call stub_signals" do
@stubber.expects(:stub_signals)
@stubber.stub_viewmodel(:test)
end
it "should call stub_services" do
@stubber.expects(:stub_services)
@stubber.stub_viewmodel(:test)
end
it "should call stub_regions" do
@stubber.expects(:stub_regions)
@stubber.stub_viewmodel(:test)
end
it "should call stub_view" do
@stubber.expects(:stub_view)
@stubber.stub_viewmodel(:test)
end
end
describe "stub service" do
before :each do
@stubber = AutoStubber.new
@class = stub_everything
@class.stubs(:@services).returns({})
@class.stubs(:@signals).returns({})
@instance = stub_everything
@instance.stubs(:class).returns(@class)
Freightrain.stubs(:[]).with(:test_service).returns(@instance)
end
it "should ask Freightrain for the right element" do
Freightrain.expects(:[]).with(:test_service).returns(@instance)
@stubber.stub_service(:test)
end
it "should call stub_signals" do
@stubber.expects(:stub_signals)
@stubber.stub_service(:test)
end
it "should call stub_services" do
@stubber.expects(:stub_services)
@stubber.stub_service(:test)
end
end
end
|
{
"content_hash": "26d858b1d831c283adb32924a42805c1",
"timestamp": "",
"source": "github",
"line_count": 209,
"max_line_length": 91,
"avg_line_length": 32.119617224880386,
"alnum_prop": 0.6442723074631312,
"repo_name": "bolthar/freightrain",
"id": "4b84c00ab3840e22f042158e91f773eb6e1f936c",
"size": "6714",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spec/freightrain/testhelpers/auto_stubber_spec.rb",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Ruby",
"bytes": "120884"
}
]
}
|
#include "Common.h"
#include "HookContext.h"
#include "DevToolsHost.h"
CHookContext::CHookContext(DWORD dwThreadID)
{
m_hHook = SetWindowsHookEx(WH_CALLWNDPROC, CallWndProc, _Module.GetModuleInstance(),
dwThreadID);
}
LRESULT CALLBACK CHookContext::CallWndProc(int code, WPARAM wParam, LPARAM lParam)
{
CHookContext *ctx = Globals::GetContext();
ATLASSERT(NULL != ctx);
PCWPSTRUCT cwp = reinterpret_cast<PCWPSTRUCT>(lParam);
if (HC_ACTION == code) {
if (Globals::IsF12Notify(cwp->message)) {
switch (cwp->wParam)
{
case Globals::ShowDevTools:
{
CDevToolsHost *host = ctx->GetDevToolsHost(cwp->hwnd);
host->Show();
break;
}
}
} else if (WM_NCDESTROY == cwp->message) {
ctx->RemoveHost(cwp->hwnd);
}
}
ATLASSERT(NULL != ctx->m_hHook);
return CallNextHookEx(ctx->m_hHook, code, wParam, lParam);
}
CDevToolsHost* CHookContext::GetDevToolsHost(HWND hTridentWindow)
{
map<HWND, CDevToolsHost *>::const_iterator it = m_map.find(hTridentWindow);
if (it != m_map.end())
return it->second;
CDevToolsHost *host = new CDevToolsHost(hTridentWindow);
m_map[hTridentWindow] = host;
m_parentMap[GetParent(hTridentWindow)] = hTridentWindow;
return host;
}
bool CHookContext::RemoveHost(HWND hWindow)
{
map<HWND, HWND>::const_iterator it = m_parentMap.find(hWindow);
if (it == m_parentMap.end())
return false;
CDevToolsHost *host = m_map[it->second];
host->Hide();
delete host;
m_map.erase(it->second);
m_parentMap.erase(hWindow);
return true;
}
|
{
"content_hash": "749401cff25f5ec58a850833c02c5661",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 88,
"avg_line_length": 28.396825396825395,
"alnum_prop": 0.5908328675237563,
"repo_name": "titilima/SuperF12",
"id": "8bf9e29144808eb3bc0fcd51f3866aa732b63027",
"size": "2194",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/SuperF12.dll/HookContext.cpp",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "11473"
},
{
"name": "C++",
"bytes": "23865"
}
]
}
|
module Otis
module Generator
class CLI < Thor
include Thor::Actions
argument :name
def self.source_root
File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
end
#TODO: make it generate a simples structure without the WSDL
desc "generate NAME", "Generates gem structure based on a WSDL file"
method_option :wsdl, :aliases => "-w", :desc => "Input WSDL to be used as reference"
option :wsdl
def generate
wsdl = options[:wsdl]
n = name
name = n.chomp("/") # remove trailing slash if present
unless wsdl
puts "You did not provide any WSDL file. Sorry, I can't guess the structure of the webservice without it!"
puts "Bye."
exit
end
routes = routes(wsdl)
generate_soap(name, routes)
namespaced_path = name.tr('-', '/')
target = File.join(Dir.pwd, name)
create_config(target, wsdl)
constant_name = constantize(name)
constant_array = constant_name.split('::')
git_user_name = `git config user.name`.chomp
git_user_email = `git config user.email`.chomp
opts = {
:name => name,
:models => routes.keys,
:namespaced_path => namespaced_path,
:constant_name => constant_name,
:routes => Otis::Generator::RoutesPresenter.new(routes),
:wsdl => wsdl,
:constant_array => constant_array,
:author => git_user_name.empty? ? "TODO: Write your name" : git_user_name,
:email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
:test => options[:test]
}
gemspec_dest = File.join(target, "#{name}.gemspec")
template(File.join("newgem/Gemfile.tt"), File.join(target, "Gemfile"), opts)
template(File.join("newgem/Rakefile.tt"), File.join(target, "Rakefile"), opts)
template(File.join("newgem/LICENSE.txt.tt"), File.join(target, "LICENSE.txt"), opts)
template(File.join("newgem/README.md.tt"), File.join(target, "README.md"), opts)
template(File.join("newgem/gitignore.tt"), File.join(target, ".gitignore"), opts)
template(File.join("newgem/newgem.gemspec.tt"), gemspec_dest, opts)
template(File.join("newgem/lib/newgem.rb.tt"), File.join(target, "lib/#{namespaced_path}.rb"), opts)
template(File.join("newgem/lib/newgem/version.rb.tt"), File.join(target, "lib/#{namespaced_path}/version.rb"), opts)
template(File.join("newgem/rspec.tt"), File.join(target, ".rspec"), opts)
template(File.join("newgem/spec/spec_helper.rb.tt"), File.join(target, "spec/spec_helper.rb"), opts)
template(File.join("newgem/spec/newgem_spec.rb.tt"), File.join(target, "spec/#{namespaced_path}/#{namespaced_path}_spec.rb"), opts)
template(File.join("newgem/spec/integration/newgem_integration_spec.tt"), File.join(target, "spec/integration/#{namespaced_path}_integration_spec.rb"), opts)
Dir.chdir(target) { `git init`; `git add .` }
end
private
def generate_soap(name, routes)
target = File.join(Dir.pwd, name)
# Generate the models
routes.each_pair do |file_name, class_name|
template(File.join("newgem/lib/newgem/model.rb.tt"), File.join(target, "lib/#{name}/#{file_name.to_s}.rb"), {klass: class_name, name: constantize(name)})
end
end
def create_config(target, wsdl)
config = File.join(target, 'config')
Dir.mkdir(config)
FileUtils.cp wsdl, File.join(config, wsdl)
end
def routes(wsdl)
#TODO: Make it break nicely when the file is not found.
routes = {}
keys = Savon.client(wsdl: "./#{wsdl}").operations
keys.each {|name| routes[name] = constantize(name.to_s)}
routes
end
def constantize(name)
constant_name = name.split('_').map{|p| p[0..0].upcase + p[1..-1] }.join
constant_name.split('-').map{|q| q[0..0].upcase + q[1..-1] }.join('::') if constant_name =~ /-/
constant_name
end
end
end
end
|
{
"content_hash": "89606facf38650ba8293af35031214ff",
"timestamp": "",
"source": "github",
"line_count": 97,
"max_line_length": 169,
"avg_line_length": 46.7319587628866,
"alnum_prop": 0.5512905360688286,
"repo_name": "tbueno/otis-generator",
"id": "0ca0726d3ec22ca064b39ed35ca1202d7333b68e",
"size": "4533",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/otis/generator/cli.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "6368"
}
]
}
|
package fr.tse.lt2c.satin.matrix.examples;
import java.io.IOException;
import fr.tse.lt2c.satin.matrix.beans.BinaryMatrix;
import fr.tse.lt2c.satin.matrix.beans.DecompositionResult;
import fr.tse.lt2c.satin.matrix.extraction.linkedmatrix.refactored.WSMRDecomposer;
public class TestLargeReal {
private static final int MIN_AREA = 2;
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
for (int i = 0; i < 100; i++) {
BinaryMatrix matrix = new BinaryMatrix(465, 465, .7);
// System.out.println(matrix);
// FileUtils.writeStringToFile(new File("matrix.txt"),
// matrix.toString());
WSMRDecomposer extractor = new WSMRDecomposer(matrix);
long t1 = System.nanoTime();
DecompositionResult result = extractor.computeDecomposition(MIN_AREA);
System.out.println((System.nanoTime() - t1)/(1000*1000) + " ms");
// Collections.sort(result.getRectangle());
// System.out.println(result.getRectangle());
}
}
}
|
{
"content_hash": "a20df4f14462cbe6cf35e24ca307204d",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 82,
"avg_line_length": 28.685714285714287,
"alnum_prop": 0.7131474103585658,
"repo_name": "jsubercaze/wsrm",
"id": "55fb96a582c2f1614adc46cf5caf1edc0a98a03f",
"size": "1004",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/fr/tse/lt2c/satin/matrix/examples/TestLargeReal.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "260608"
}
]
}
|
<?php
namespace Aivo\Highchart\Series;
use Aivo\Highchart\Series\State\SolidHoverStateInterface;
/**
* Column series.
*
* @author Chris Wilkinson <chris.wilkinson@admin.cam.ac.uk>
*/
interface ColumnSeriesInterface extends StackableSeriesInterface
{
/**
* {@inheritdoc}
*
* @return SolidHoverStateInterface Hover state.
*/
public function getHoverState();
}
|
{
"content_hash": "09cde46c7ee8e0d355e81bb9f5b2b5ba",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 64,
"avg_line_length": 16.541666666666668,
"alnum_prop": 0.7002518891687658,
"repo_name": "mauro-moreno/laravel-highcharts",
"id": "d6da6dc23f31e961a2920ac504c6dc4589d6f1c2",
"size": "619",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "api/Aivo/Highchart/Series/ColumnSeriesInterface.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "196695"
}
]
}
|
import t from 'tcomb';
function foo() {
const ret = function () {}.call(this);
_assert(ret, _t.Nil, "return value");
return ret;
}
function bar() {
const ret = function () {}.call(this);
_assert(ret, _t.Nil, "return value");
return ret;
}
|
{
"content_hash": "60ad5c21d3c80689cc8b79e5178b6182",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 40,
"avg_line_length": 15.058823529411764,
"alnum_prop": 0.59375,
"repo_name": "gcanti/babel-plugin-tcomb",
"id": "3a258b86cec68c102050a92b188983b27b04435d",
"size": "256",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/fixtures/void/expected.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "71843"
}
]
}
|
<footer class="site-footer">
<section class="copyright"><a href="copyright/">©</a> {{ site.name }} {{ site.time | date: '%Y' }}</section>
</footer>
|
{
"content_hash": "c5d7411c15f5c3d5169be2c9ce2c15d4",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 116,
"avg_line_length": 52,
"alnum_prop": 0.6025641025641025,
"repo_name": "wbrgss/blog",
"id": "c77562cd30d3bcaad045a9f8c086c345bd60f6bd",
"size": "156",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_includes/footer.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "26565"
},
{
"name": "HTML",
"bytes": "38525"
},
{
"name": "Ruby",
"bytes": "13843"
}
]
}
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- contextQualifierLength=14 -->
<!-- contextQualifierLength=14 -->
<feature
id="org.eclipse.emf.codegen.ecore"
label="%featureName"
version="2.8.0.v20120608-0554"
provider-name="%providerName">
<description>
%description
</description>
<copyright url="http://www.eclipse.org/legal/epl-v10.html">
Copyright (c) 2002-2011 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
</copyright>
<license url="%licenseURL">
%license
</license>
<url>
<update label="%ModelingUpdateSiteName" url="http://www.eclipse.org/modeling/updates/"/>
<discovery label="%ModelingUpdateSiteName" url="http://www.eclipse.org/modeling/updates/"/>
</url>
<requires>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.jdt.launching"/>
<import plugin="org.eclipse.emf.ecore"/>
<import plugin="org.eclipse.emf.codegen"/>
<import plugin="org.eclipse.emf.ecore.xmi"/>
<import plugin="org.eclipse.text"/>
<import plugin="org.apache.ant"/>
<import plugin="org.eclipse.ant.core"/>
<import plugin="org.eclipse.emf.common"/>
</requires>
<plugin
id="org.eclipse.emf.codegen.ecore"
download-size="0"
install-size="0"
version="2.8.0.v20120608-0554"
unpack="false"/>
<plugin
id="org.eclipse.emf.ant"
download-size="0"
install-size="0"
version="2.7.0.v20120608-0554"
unpack="false"/>
</feature>
|
{
"content_hash": "fdccc3afe7ba89344478679fc85eaec6",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 97,
"avg_line_length": 31.64406779661017,
"alnum_prop": 0.6432779860739154,
"repo_name": "mclindon/GroupProject",
"id": "7d2a805647afbf09f3aac6556fba8b9b894bd490",
"size": "1867",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "eclipse/features/org.eclipse.emf.codegen.ecore_2.8.0.v20120608-0554/feature.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "1518287"
},
{
"name": "PHP",
"bytes": "90335"
},
{
"name": "Perl",
"bytes": "9844"
},
{
"name": "Python",
"bytes": "3299"
}
]
}
|
<?php declare(strict_types=1);
namespace ApiClients\Tests\Client\Travis\Resource\Async;
use ApiClients\Client\Travis\Resource\Async\EmptyEnvironmentVariable;
use ApiClients\Tools\ResourceTestUtilities\AbstractEmptyResourceTest;
final class EmptyEnvironmentVariableTest extends AbstractEmptyResourceTest
{
public function getSyncAsync(): string
{
return 'Async';
}
public function getClass(): string
{
return EmptyEnvironmentVariable::class;
}
}
|
{
"content_hash": "432c45c3a0c5059d898fd65fac25c865",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 74,
"avg_line_length": 25.736842105263158,
"alnum_prop": 0.7627811860940695,
"repo_name": "php-api-clients/travis",
"id": "a4c9901e31218f191dde9e8972ed4b9053f9ba4e",
"size": "489",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/Resource/Async/EmptyEnvironmentVariableTest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "582"
},
{
"name": "PHP",
"bytes": "206824"
}
]
}
|
<?php
namespace Payroll\Service\Factory;
use Zend\ServiceManager\ServiceLocatorInterface;
use Payroll\Service\PayrollService;
class PayrollServiceFactory
{
/**
*
* @param ServiceLocatorInterface $serviceLocator
* @return \Payroll\Service\PayrollService
*/
public function __invoke(ServiceLocatorInterface $serviceLocator)
{
$mapper = $serviceLocator->get('Payroll\Mapper\MysqlMapperInterface');
return new PayrollService($mapper);
}
}
|
{
"content_hash": "e66740e66827fc8dd2ca78550212f07f",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 78,
"avg_line_length": 24.9,
"alnum_prop": 0.7068273092369478,
"repo_name": "pacificnm/pnm",
"id": "988303efb2908a3a98690dba92728986da1ec1e4",
"size": "498",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "module/Payroll/src/Payroll/Service/Factory/PayrollServiceFactory.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "711"
},
{
"name": "CSS",
"bytes": "776174"
},
{
"name": "HTML",
"bytes": "4909517"
},
{
"name": "JavaScript",
"bytes": "3178841"
},
{
"name": "PHP",
"bytes": "3953782"
}
]
}
|
use extern; //~ ERROR unresolved import `extern`
//~^ NOTE no `extern` in the root
use extern::*; //~ ERROR cannot glob-import all possible crates
fn main() {
let s = extern::xcrate; //~ ERROR expected value, found module `extern::xcrate`
//~^ NOTE not a value
}
|
{
"content_hash": "43fccc8baa5ec9392477748d529e7577",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 83,
"avg_line_length": 38.5,
"alnum_prop": 0.5844155844155844,
"repo_name": "GBGamer/rust",
"id": "ea4488637031e316bf1135998992928107922fb2",
"size": "862",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "src/test/ui/rfc-2126-extern-in-paths/single-segment.rs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "27014"
},
{
"name": "Awk",
"bytes": "271"
},
{
"name": "C",
"bytes": "391581"
},
{
"name": "C++",
"bytes": "64107"
},
{
"name": "CSS",
"bytes": "27753"
},
{
"name": "HTML",
"bytes": "496"
},
{
"name": "JavaScript",
"bytes": "45051"
},
{
"name": "Lex",
"bytes": "9270"
},
{
"name": "Makefile",
"bytes": "306032"
},
{
"name": "PHP",
"bytes": "265"
},
{
"name": "Pascal",
"bytes": "13456"
},
{
"name": "Puppet",
"bytes": "3296"
},
{
"name": "Python",
"bytes": "197397"
},
{
"name": "Rust",
"bytes": "21265061"
},
{
"name": "Shell",
"bytes": "270571"
},
{
"name": "Yacc",
"bytes": "81068"
}
]
}
|
/**
* Licensed under the Artistic License; you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://displaytag.sourceforge.net/license.html
*
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
package org.displaytag.sample;
import java.util.Date;
import org.apache.commons.lang.time.FastDateFormat;
import org.displaytag.decorator.ColumnDecorator;
/**
* Simple column decorator which formats a date.
* @author epesh
* @author Fabrizio Giustina
* @version $Revision: 1.11 $ ($Author: fgiust $)
*/
public class LongDateWrapper implements ColumnDecorator
{
/**
* FastDateFormat used to format the date object.
*/
private FastDateFormat dateFormat = FastDateFormat.getInstance("MM/dd/yyyy HH:mm:ss"); //$NON-NLS-1$
/**
* transform the given object into a String representation. The object is supposed to be a date.
* @param columnValue Object
* @return String
*/
public final String decorate(Object columnValue)
{
Date date = (Date) columnValue;
return this.dateFormat.format(date);
}
}
|
{
"content_hash": "0cdeeff4f87cf7b31ae9a899c60ecdaf",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 104,
"avg_line_length": 29.34090909090909,
"alnum_prop": 0.7087529047250194,
"repo_name": "chinayuans/sysadmin",
"id": "afa026e45a2acfd1a747df90b6d917d06fd9d380",
"size": "1291",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/web/org/displaytag/sample/LongDateWrapper.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "168630"
},
{
"name": "HTML",
"bytes": "653164"
},
{
"name": "Java",
"bytes": "1152500"
},
{
"name": "JavaScript",
"bytes": "695168"
},
{
"name": "Perl",
"bytes": "932"
}
]
}
|
.class public abstract Lcom/android/gallery3d/ui/AbstractSlotRenderer;
.super Ljava/lang/Object;
.source "AbstractSlotRenderer.java"
# interfaces
.implements Lcom/android/gallery3d/ui/SlotView$SlotRenderer;
# instance fields
.field private final mAlbumSetFrame:Lcom/android/gallery3d/ui/NinePatchTexture;
.field private final mAudioJpeg:Lcom/android/gallery3d/ui/ResourceTexture;
.field private final mBkColor:I
.field private final mBmpNoRecoder:Lcom/android/gallery3d/ui/ResourceTexture;
.field private final mFramePressed:Lcom/android/gallery3d/ui/NinePatchTexture;
.field private mFramePressedUp:Lcom/android/gallery3d/ui/FadeOutTexture;
.field private final mFrameSelected:Lcom/android/gallery3d/ui/NinePatchTexture;
.field private mIsHomeAlbums:Z
.field private final mPanoramaIcon:Lcom/android/gallery3d/ui/ResourceTexture;
.field private final mPrivateModelIcon:Lcom/android/gallery3d/ui/ResourceTexture;
.field private final mStrNoRecoder:Lcom/android/gallery3d/ui/StringTexture;
.field private final mVideoOverlay:Lcom/android/gallery3d/ui/ResourceTexture;
.field private final mVideoPlayIcon:Lcom/android/gallery3d/ui/ResourceTexture;
# direct methods
.method protected constructor <init>(Landroid/content/Context;)V
.locals 3
.parameter "context"
.prologue
.line 44
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 38
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mIsHomeAlbums:Z
.line 45
new-instance v0, Lcom/android/gallery3d/ui/ResourceTexture;
const v1, 0x7f02015a
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/ResourceTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mVideoOverlay:Lcom/android/gallery3d/ui/ResourceTexture;
.line 46
new-instance v0, Lcom/android/gallery3d/ui/ResourceTexture;
const v1, 0x7f020120
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/ResourceTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mVideoPlayIcon:Lcom/android/gallery3d/ui/ResourceTexture;
.line 47
new-instance v0, Lcom/android/gallery3d/ui/ResourceTexture;
const v1, 0x7f020117
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/ResourceTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mPanoramaIcon:Lcom/android/gallery3d/ui/ResourceTexture;
.line 48
new-instance v0, Lcom/android/gallery3d/ui/NinePatchTexture;
const v1, 0x7f020114
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/NinePatchTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressed:Lcom/android/gallery3d/ui/NinePatchTexture;
.line 49
new-instance v0, Lcom/android/gallery3d/ui/NinePatchTexture;
const v1, 0x7f020115
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/NinePatchTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFrameSelected:Lcom/android/gallery3d/ui/NinePatchTexture;
.line 51
new-instance v0, Lcom/android/gallery3d/ui/NinePatchTexture;
const v1, 0x7f020002
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/NinePatchTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mAlbumSetFrame:Lcom/android/gallery3d/ui/NinePatchTexture;
.line 52
new-instance v0, Lcom/android/gallery3d/ui/ResourceTexture;
const v1, 0x7f0201d7
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/ResourceTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mPrivateModelIcon:Lcom/android/gallery3d/ui/ResourceTexture;
.line 53
new-instance v0, Lcom/android/gallery3d/ui/ResourceTexture;
const v1, 0x7f0201d5
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/ResourceTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mAudioJpeg:Lcom/android/gallery3d/ui/ResourceTexture;
.line 54
const v0, 0x7f0e030e
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
const/16 v1, 0xc
invoke-static {v1}, Lcom/android/gallery3d/util/GalleryUtils;->dpToPixel(I)I
move-result v1
int-to-float v1, v1
const v2, -0xf0d0d0e
invoke-static {v0, v1, v2}, Lcom/android/gallery3d/ui/StringTexture;->newInstance(Ljava/lang/String;FI)Lcom/android/gallery3d/ui/StringTexture;
move-result-object v0
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mStrNoRecoder:Lcom/android/gallery3d/ui/StringTexture;
.line 57
new-instance v0, Lcom/android/gallery3d/ui/ResourceTexture;
const v1, 0x7f0200ac
invoke-direct {v0, p1, v1}, Lcom/android/gallery3d/ui/ResourceTexture;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mBmpNoRecoder:Lcom/android/gallery3d/ui/ResourceTexture;
.line 58
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0b0006
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getColor(I)I
move-result v0
iput v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mBkColor:I
.line 59
return-void
.end method
.method protected static drawFrame(Lcom/android/gallery3d/ui/GLCanvas;Landroid/graphics/Rect;Lcom/android/gallery3d/ui/Texture;IIII)V
.locals 6
.parameter "canvas"
.parameter "padding"
.parameter "frame"
.parameter "x"
.parameter "y"
.parameter "width"
.parameter "height"
.prologue
.line 184
iget v0, p1, Landroid/graphics/Rect;->left:I
sub-int v2, p3, v0
iget v0, p1, Landroid/graphics/Rect;->top:I
sub-int v3, p4, v0
iget v0, p1, Landroid/graphics/Rect;->left:I
add-int/2addr v0, p5
iget v1, p1, Landroid/graphics/Rect;->right:I
add-int v4, v0, v1
iget v0, p1, Landroid/graphics/Rect;->top:I
add-int/2addr v0, p6
iget v1, p1, Landroid/graphics/Rect;->bottom:I
add-int v5, v0, v1
move-object v0, p2
move-object v1, p0
invoke-interface/range {v0 .. v5}, Lcom/android/gallery3d/ui/Texture;->draw(Lcom/android/gallery3d/ui/GLCanvas;IIII)V
.line 186
return-void
.end method
# virtual methods
.method protected drawAlbumSetFrame(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 7
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
const/4 v3, 0x0
.line 140
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mAlbumSetFrame:Lcom/android/gallery3d/ui/NinePatchTexture;
invoke-virtual {v0}, Lcom/android/gallery3d/ui/NinePatchTexture;->getPaddings()Landroid/graphics/Rect;
move-result-object v1
iget-object v2, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mAlbumSetFrame:Lcom/android/gallery3d/ui/NinePatchTexture;
move-object v0, p1
move v4, v3
move v5, p2
move v6, p3
invoke-static/range {v0 .. v6}, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->drawFrame(Lcom/android/gallery3d/ui/GLCanvas;Landroid/graphics/Rect;Lcom/android/gallery3d/ui/Texture;IIII)V
.line 141
return-void
.end method
.method protected drawAudioJpeg(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 6
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
const/4 v2, 0x0
.line 146
invoke-static {p2, p3}, Ljava/lang/Math;->min(II)I
move-result v0
div-int/lit8 v4, v0, 0x5
.line 147
.local v4, iconSize:I
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mAudioJpeg:Lcom/android/gallery3d/ui/ResourceTexture;
move-object v1, p1
move v3, v2
move v5, v4
invoke-virtual/range {v0 .. v5}, Lcom/android/gallery3d/ui/ResourceTexture;->draw(Lcom/android/gallery3d/ui/GLCanvas;IIII)V
.line 148
return-void
.end method
.method protected drawCameraCover(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 13
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
.line 91
move v9, p2
.line 92
.local v9, IMAGE_WIDTH:I
move/from16 v8, p3
.line 93
.local v8, IMAGE_HEIGHT:I
const/16 v0, 0x84
invoke-static {v0}, Lcom/android/gallery3d/util/GalleryUtils;->dpToPixel(I)I
move-result v7
.line 94
.local v7, EMPTY_ICON_W:I
const/16 v0, 0x54
invoke-static {v0}, Lcom/android/gallery3d/util/GalleryUtils;->dpToPixel(I)I
move-result v6
.line 95
.local v6, EMPTY_ICON_H:I
const/4 v0, 0x4
invoke-static {v0}, Lcom/android/gallery3d/util/GalleryUtils;->dpToPixel(I)I
move-result v10
.line 97
.local v10, RECORD_TOP_TITLE_MARGIN:I
sub-int v0, v9, v7
div-int/lit8 v11, v0, 0x2
.line 98
.local v11, x:I
sub-int v0, v8, v10
sub-int/2addr v0, v6
iget-object v1, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mStrNoRecoder:Lcom/android/gallery3d/ui/StringTexture;
invoke-virtual {v1}, Lcom/android/gallery3d/ui/StringTexture;->getHeight()I
move-result v1
sub-int/2addr v0, v1
div-int/lit8 v12, v0, 0x2
.line 100
.local v12, y:I
const/4 v1, 0x0
const/4 v2, 0x0
int-to-float v3, v9
int-to-float v4, v8
iget v5, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mBkColor:I
move-object v0, p1
invoke-interface/range {v0 .. v5}, Lcom/android/gallery3d/ui/GLCanvas;->fillRect(FFFFI)V
.line 101
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mBmpNoRecoder:Lcom/android/gallery3d/ui/ResourceTexture;
move-object v1, p1
move v2, v11
move v3, v12
move v4, v7
move v5, v6
invoke-virtual/range {v0 .. v5}, Lcom/android/gallery3d/ui/ResourceTexture;->draw(Lcom/android/gallery3d/ui/GLCanvas;IIII)V
.line 103
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mStrNoRecoder:Lcom/android/gallery3d/ui/StringTexture;
invoke-virtual {v0}, Lcom/android/gallery3d/ui/StringTexture;->getWidth()I
move-result v0
sub-int v0, v9, v0
div-int/lit8 v11, v0, 0x2
.line 104
add-int v0, v12, v6
add-int v12, v0, v10
.line 106
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mStrNoRecoder:Lcom/android/gallery3d/ui/StringTexture;
invoke-virtual {v0, p1, v11, v12}, Lcom/android/gallery3d/ui/StringTexture;->draw(Lcom/android/gallery3d/ui/GLCanvas;II)V
.line 107
return-void
.end method
.method protected drawContent(Lcom/android/gallery3d/ui/GLCanvas;Lcom/android/gallery3d/ui/Texture;IIII)V
.locals 8
.parameter "canvas"
.parameter "content"
.parameter "width"
.parameter "height"
.parameter "rotation"
.parameter "index"
.prologue
const/4 v7, 0x0
const/4 v5, 0x0
const/high16 v6, 0x3f80
.line 63
const/4 v3, 0x2
invoke-interface {p1, v3}, Lcom/android/gallery3d/ui/GLCanvas;->save(I)V
.line 67
if-lez p6, :cond_0
invoke-static {p3, p4}, Ljava/lang/Math;->min(II)I
move-result p4
move p3, p4
.line 69
:cond_0
if-eqz p5, :cond_2
iget-boolean v3, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mIsHomeAlbums:Z
if-eqz v3, :cond_1
if-eqz p6, :cond_2
.line 70
:cond_1
div-int/lit8 v3, p3, 0x2
int-to-float v3, v3
div-int/lit8 v4, p4, 0x2
int-to-float v4, v4
invoke-interface {p1, v3, v4}, Lcom/android/gallery3d/ui/GLCanvas;->translate(FF)V
.line 71
int-to-float v3, p5
invoke-interface {p1, v3, v5, v5, v6}, Lcom/android/gallery3d/ui/GLCanvas;->rotate(FFFF)V
.line 72
neg-int v3, p3
div-int/lit8 v3, v3, 0x2
int-to-float v3, v3
neg-int v4, p4
div-int/lit8 v4, v4, 0x2
int-to-float v4, v4
invoke-interface {p1, v3, v4}, Lcom/android/gallery3d/ui/GLCanvas;->translate(FF)V
.line 76
:cond_2
int-to-float v3, p3
invoke-interface {p2}, Lcom/android/gallery3d/ui/Texture;->getWidth()I
move-result v4
int-to-float v4, v4
div-float/2addr v3, v4
int-to-float v4, p4
invoke-interface {p2}, Lcom/android/gallery3d/ui/Texture;->getHeight()I
move-result v5
int-to-float v5, v5
div-float/2addr v4, v5
invoke-static {v3, v4}, Ljava/lang/Math;->min(FF)F
move-result v0
.line 79
.local v0, scale:F
if-nez p6, :cond_3
.line 80
int-to-float v3, p3
invoke-interface {p2}, Lcom/android/gallery3d/ui/Texture;->getWidth()I
move-result v4
int-to-float v4, v4
div-float v1, v3, v4
.line 81
.local v1, scaleX:F
int-to-float v3, p4
invoke-interface {p2}, Lcom/android/gallery3d/ui/Texture;->getHeight()I
move-result v4
int-to-float v4, v4
div-float v2, v3, v4
.line 82
.local v2, scaleY:F
invoke-interface {p1, v1, v2, v6}, Lcom/android/gallery3d/ui/GLCanvas;->scale(FFF)V
.line 86
.end local v1 #scaleX:F
.end local v2 #scaleY:F
:goto_0
invoke-interface {p2, p1, v7, v7}, Lcom/android/gallery3d/ui/Texture;->draw(Lcom/android/gallery3d/ui/GLCanvas;II)V
.line 87
invoke-interface {p1}, Lcom/android/gallery3d/ui/GLCanvas;->restore()V
.line 88
return-void
.line 84
:cond_3
invoke-interface {p1, v0, v0, v6}, Lcom/android/gallery3d/ui/GLCanvas;->scale(FFF)V
goto :goto_0
.end method
.method protected drawPanoramaIcon(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 6
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
.line 123
invoke-static {p2, p3}, Ljava/lang/Math;->min(II)I
move-result v0
div-int/lit8 v4, v0, 0x6
.line 124
.local v4, iconSize:I
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mPanoramaIcon:Lcom/android/gallery3d/ui/ResourceTexture;
sub-int v1, p2, v4
div-int/lit8 v2, v1, 0x2
sub-int v1, p3, v4
div-int/lit8 v3, v1, 0x2
move-object v1, p1
move v5, v4
invoke-virtual/range {v0 .. v5}, Lcom/android/gallery3d/ui/ResourceTexture;->draw(Lcom/android/gallery3d/ui/GLCanvas;IIII)V
.line 126
return-void
.end method
.method protected drawPressedFrame(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 7
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
const/4 v3, 0x0
.line 175
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressed:Lcom/android/gallery3d/ui/NinePatchTexture;
invoke-virtual {v0}, Lcom/android/gallery3d/ui/NinePatchTexture;->getPaddings()Landroid/graphics/Rect;
move-result-object v1
iget-object v2, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressed:Lcom/android/gallery3d/ui/NinePatchTexture;
move-object v0, p1
move v4, v3
move v5, p2
move v6, p3
invoke-static/range {v0 .. v6}, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->drawFrame(Lcom/android/gallery3d/ui/GLCanvas;Landroid/graphics/Rect;Lcom/android/gallery3d/ui/Texture;IIII)V
.line 176
return-void
.end method
.method protected drawPressedUpFrame(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 7
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
const/4 v3, 0x0
.line 168
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressedUp:Lcom/android/gallery3d/ui/FadeOutTexture;
if-nez v0, :cond_0
.line 169
new-instance v0, Lcom/android/gallery3d/ui/FadeOutTexture;
iget-object v1, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressed:Lcom/android/gallery3d/ui/NinePatchTexture;
invoke-direct {v0, v1}, Lcom/android/gallery3d/ui/FadeOutTexture;-><init>(Lcom/android/gallery3d/ui/BasicTexture;)V
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressedUp:Lcom/android/gallery3d/ui/FadeOutTexture;
.line 171
:cond_0
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressed:Lcom/android/gallery3d/ui/NinePatchTexture;
invoke-virtual {v0}, Lcom/android/gallery3d/ui/NinePatchTexture;->getPaddings()Landroid/graphics/Rect;
move-result-object v1
iget-object v2, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressedUp:Lcom/android/gallery3d/ui/FadeOutTexture;
move-object v0, p1
move v4, v3
move v5, p2
move v6, p3
invoke-static/range {v0 .. v6}, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->drawFrame(Lcom/android/gallery3d/ui/GLCanvas;Landroid/graphics/Rect;Lcom/android/gallery3d/ui/Texture;IIII)V
.line 172
return-void
.end method
.method protected drawPrivateModelIcon(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 6
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
const/4 v2, 0x0
.line 135
invoke-static {p2, p3}, Ljava/lang/Math;->min(II)I
move-result v0
div-int/lit8 v4, v0, 0x3
.line 136
.local v4, iconSize:I
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mPrivateModelIcon:Lcom/android/gallery3d/ui/ResourceTexture;
move-object v1, p1
move v3, v2
move v5, v4
invoke-virtual/range {v0 .. v5}, Lcom/android/gallery3d/ui/ResourceTexture;->draw(Lcom/android/gallery3d/ui/GLCanvas;IIII)V
.line 137
return-void
.end method
.method protected drawSelectedFrame(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 7
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
const/4 v3, 0x0
.line 179
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFrameSelected:Lcom/android/gallery3d/ui/NinePatchTexture;
invoke-virtual {v0}, Lcom/android/gallery3d/ui/NinePatchTexture;->getPaddings()Landroid/graphics/Rect;
move-result-object v1
iget-object v2, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFrameSelected:Lcom/android/gallery3d/ui/NinePatchTexture;
move-object v0, p1
move v4, v3
move v5, p2
move v6, p3
invoke-static/range {v0 .. v6}, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->drawFrame(Lcom/android/gallery3d/ui/GLCanvas;Landroid/graphics/Rect;Lcom/android/gallery3d/ui/Texture;IIII)V
.line 180
return-void
.end method
.method protected drawVideoOverlay(Lcom/android/gallery3d/ui/GLCanvas;II)V
.locals 14
.parameter "canvas"
.parameter "width"
.parameter "height"
.prologue
.line 112
iget-object v1, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mVideoOverlay:Lcom/android/gallery3d/ui/ResourceTexture;
.line 113
.local v1, v:Lcom/android/gallery3d/ui/ResourceTexture;
move/from16 v0, p3
int-to-float v2, v0
invoke-virtual {v1}, Lcom/android/gallery3d/ui/ResourceTexture;->getHeight()I
move-result v3
int-to-float v3, v3
div-float v13, v2, v3
.line 114
.local v13, scale:F
invoke-virtual {v1}, Lcom/android/gallery3d/ui/ResourceTexture;->getWidth()I
move-result v2
int-to-float v2, v2
mul-float/2addr v2, v13
invoke-static {v2}, Ljava/lang/Math;->round(F)I
move-result v5
.line 115
.local v5, w:I
invoke-virtual {v1}, Lcom/android/gallery3d/ui/ResourceTexture;->getHeight()I
move-result v2
int-to-float v2, v2
mul-float/2addr v2, v13
invoke-static {v2}, Ljava/lang/Math;->round(F)I
move-result v6
.line 116
.local v6, h:I
const/4 v3, 0x0
const/4 v4, 0x0
move-object v2, p1
invoke-virtual/range {v1 .. v6}, Lcom/android/gallery3d/ui/ResourceTexture;->draw(Lcom/android/gallery3d/ui/GLCanvas;IIII)V
.line 118
invoke-static/range {p2 .. p3}, Ljava/lang/Math;->min(II)I
move-result v2
div-int/lit8 v11, v2, 0x6
.line 119
.local v11, s:I
iget-object v7, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mVideoPlayIcon:Lcom/android/gallery3d/ui/ResourceTexture;
sub-int v2, p2, v11
div-int/lit8 v9, v2, 0x2
sub-int v2, p3, v11
div-int/lit8 v10, v2, 0x2
move-object v8, p1
move v12, v11
invoke-virtual/range {v7 .. v12}, Lcom/android/gallery3d/ui/ResourceTexture;->draw(Lcom/android/gallery3d/ui/GLCanvas;IIII)V
.line 120
return-void
.end method
.method protected isPressedUpFrameFinished()Z
.locals 1
.prologue
.line 157
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressedUp:Lcom/android/gallery3d/ui/FadeOutTexture;
if-eqz v0, :cond_1
.line 158
iget-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressedUp:Lcom/android/gallery3d/ui/FadeOutTexture;
invoke-virtual {v0}, Lcom/android/gallery3d/ui/FadeTexture;->isAnimating()Z
move-result v0
if-eqz v0, :cond_0
.line 159
const/4 v0, 0x0
.line 164
:goto_0
return v0
.line 161
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mFramePressedUp:Lcom/android/gallery3d/ui/FadeOutTexture;
.line 164
:cond_1
const/4 v0, 0x1
goto :goto_0
.end method
.method public setHomeAlbums(Z)V
.locals 0
.parameter "homeAlbums"
.prologue
.line 190
iput-boolean p1, p0, Lcom/android/gallery3d/ui/AbstractSlotRenderer;->mIsHomeAlbums:Z
.line 191
return-void
.end method
|
{
"content_hash": "c6fe6b9897e644035b33ac0cef2a6f0d",
"timestamp": "",
"source": "github",
"line_count": 866,
"max_line_length": 193,
"avg_line_length": 25.19745958429561,
"alnum_prop": 0.7028092204756886,
"repo_name": "baidurom/devices-Coolpad8720L",
"id": "f70e55ce6489391f6bbdc6850d0c65d9471f381d",
"size": "21821",
"binary": false,
"copies": "1",
"ref": "refs/heads/coron-4.3",
"path": "CP_Gallery3D/smali/com/android/gallery3d/ui/AbstractSlotRenderer.smali",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Makefile",
"bytes": "13619"
},
{
"name": "Shell",
"bytes": "1917"
}
]
}
|
package ludumdare32;
public class Wind {
static double direction = 0;
static double power = 0;
static boolean calculatedPower = false;
static double targetX = 0;
static double targetY = 0;
static double dvx = 0;
static double dvy = 0;
public static void update() {
dvx += (targetX-dvx)*0.025;
dvy += (targetY-dvy)*0.025;
calculatedPower = false;
direction = Math.atan2(dvy,dvx);
//if (power > 0) {
for (Character character : Character.characters) {
character.changeVx(dvx);
character.changeVy(dvy);
}
//} else {
// dvx = 0;
// dvy = 0;
//}
}
public static double getPower() {
if (!calculatedPower) {
power = Math.sqrt(dvx*dvx);
calculatedPower = true;
}
return power;
}
public static void change(double newDirection, double newStrength) {
targetX = Math.cos(newDirection)*newStrength;
targetY = Math.sin(newDirection)*newStrength;
}
}
|
{
"content_hash": "b0d574beeb38c606a5c0b30bcce87947",
"timestamp": "",
"source": "github",
"line_count": 45,
"max_line_length": 72,
"avg_line_length": 24.755555555555556,
"alnum_prop": 0.5394973070017953,
"repo_name": "bjornenalfa/LudumDare32",
"id": "f2fb3bcf11cda8f450667b5e8d01f5353e89a280",
"size": "1114",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/ludumdare32/Wind.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "239723"
}
]
}
|
This directory contains the `loadtime` tools, a set of tools for generating
transaction load against Tendermint and measuring their resulting latency.
`loadtime` generates transactions that contain the timestamp of when they were
generated as well as additional metadata to track the variables used when
generating the load.
## Building the tool set
The `Makefile` contains a target for building the `loadtime` tools.
The following command will build the tool and place the resulting binaries in `./build/`.
```bash
make build
```
## `load`
The `load` binary is built when `make build` is invoked. The `load` tool generates
transactions and broadcasts them to Tendermint.
`load` leverages the [tm-load-test](https://github.com/informalsystems/tm-load-test)
framework. As a result, all flags and options specified on the `tm-load-test` apply to
`load`.
Below is a basic invocation for generating load against a Tendermint websocket running
on `localhost:25567`
```bash
./build/load \
-c 1 -T 10 -r 1000 -s 1024 \
--broadcast-tx-method sync \
--endpoints ws://localhost:26657/websocket
```
## `report`
The `report` binary is built when `make build` is invoked. The `report` tool
reads all of the blocks from the specified blockstore database and calculates
transaction latency metrics. `report` reads transactions generated by `load`
and uses the difference between the timestamp contained in the transaction and
the timestamp of the block the transaction was executed in to determine transaction latency.
`report` outputs a set of metrics calculated on the list of latencies, including
minimum, maximum, and average latency as well as the standard deviation.
Below is a basic invocation of the report tool with a data directory under `/home/test/.tendermint/data/`
where the data was saved in a `goleveldb` database.
```bash
./build/report --database-type goleveldb --data-dir ~/.tendermint/data
```
The `report` tool also supports outputting the raw data as `csv`. This can be
useful if you want to use a more powerful tool to aggregate and analyze the data.
Below is an invocation of the report tool that outputs the data to a `csv` file
in `out.csv`
```bash
./build/report --database-type goleveldb --data-dir ~/.tendermint/data --csv out.csv
```
The `report` tool outputs the data for each experiment separately, identified
by the UUID generated by the `load` tool at the start of the experiment. It also
outputs the experimental values used for the run.
|
{
"content_hash": "7a86de4c5298c6817a525594956a55d0",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 105,
"avg_line_length": 37.149253731343286,
"alnum_prop": 0.7669746886299719,
"repo_name": "tendermint/tendermint",
"id": "8043d52973fc058ce95ffc417ca554853be798d4",
"size": "2501",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "test/loadtime/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "6535"
},
{
"name": "Go",
"bytes": "3494194"
},
{
"name": "HCL",
"bytes": "2065"
},
{
"name": "HTML",
"bytes": "787"
},
{
"name": "Jinja",
"bytes": "13466"
},
{
"name": "Makefile",
"bytes": "18461"
},
{
"name": "Python",
"bytes": "25606"
},
{
"name": "Shell",
"bytes": "26027"
},
{
"name": "TLA",
"bytes": "241140"
},
{
"name": "TeX",
"bytes": "332482"
}
]
}
|
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="si.ox.smsforwarder" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".SettingsActivity"
android:label="@string/app_name"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name=".TextMessageReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
</manifest>
|
{
"content_hash": "f5b0decdf194320bf262572a7b0bfe4f",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 87,
"avg_line_length": 34.16216216216216,
"alnum_prop": 0.6083860759493671,
"repo_name": "gregorb/SMSForwarder-android",
"id": "a2ca294efed9a37d2582976a23a128eb50950e76",
"size": "1264",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/AndroidManifest.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "7950"
}
]
}
|
End of preview.
No dataset card yet
- Downloads last month
- 5