code
stringlengths
5
1.01M
repo_name
stringlengths
5
84
path
stringlengths
4
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
5
1.01M
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
package example; import java.util.Collection; public interface SpikeMessageRepository { void add(SpikeMessage message); Collection<SpikeMessage> list(); }
tomcz/zookeeper-example
src/main/java/example/SpikeMessageRepository.java
Java
mit
167
[ 30522, 7427, 2742, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 3074, 1025, 2270, 8278, 9997, 7834, 3736, 4590, 13699, 20049, 7062, 1063, 11675, 5587, 1006, 9997, 7834, 3736, 3351, 4471, 1007, 1025, 3074, 1026, 9997, 7834, 3736, 3351, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# ganada
bwyoon/ganada
README.md
Markdown
gpl-2.0
9
[ 30522, 1001, 25957, 8447, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * ioctl32.c: Conversion between 32bit and 64bit native ioctls. * Separated from fs stuff by Arnd Bergmann <arnd@arndb.de> * * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs * Copyright (C) 2003 Pavel Machek (pavel@ucw.cz) * Copyright (C) 2005 Philippe De Muyter (phdm@macqel.be) * Copyright (C) 2008 Hans Verkuil <hverkuil@xs4all.nl> * * These routines maintain argument size conversion between 32bit and 64bit * ioctls. */ #include <linux/compat.h> #include <linux/videodev2.h> #include <linux/module.h> #include <media/v4l2-ioctl.h> #ifdef CONFIG_COMPAT static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { long ret = -ENOIOCTLCMD; if (file->f_op->unlocked_ioctl) ret = file->f_op->unlocked_ioctl(file, cmd, arg); return ret; } struct v4l2_clip32 { struct v4l2_rect c; compat_caddr_t next; }; struct v4l2_window32 { struct v4l2_rect w; enum v4l2_field field; __u32 chromakey; compat_caddr_t clips; /* actually struct v4l2_clip32 * */ __u32 clipcount; compat_caddr_t bitmap; }; static int get_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) { if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_window32)) || copy_from_user(&kp->w, &up->w, sizeof(up->w)) || get_user(kp->field, &up->field) || get_user(kp->chromakey, &up->chromakey) || get_user(kp->clipcount, &up->clipcount)) return -EFAULT; if (kp->clipcount > 2048) return -EINVAL; if (kp->clipcount) { struct v4l2_clip32 __user *uclips; struct v4l2_clip __user *kclips; int n = kp->clipcount; compat_caddr_t p; if (get_user(p, &up->clips)) return -EFAULT; uclips = compat_ptr(p); kclips = compat_alloc_user_space(n * sizeof(struct v4l2_clip)); kp->clips = kclips; while (--n >= 0) { if (copy_in_user(&kclips->c, &uclips->c, sizeof(uclips->c))) return -EFAULT; if (put_user(n ? kclips + 1 : NULL, &kclips->next)) return -EFAULT; uclips += 1; kclips += 1; } } else kp->clips = NULL; return 0; } static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) { if (copy_to_user(&up->w, &kp->w, sizeof(kp->w)) || put_user(kp->field, &up->field) || put_user(kp->chromakey, &up->chromakey) || put_user(kp->clipcount, &up->clipcount)) return -EFAULT; return 0; } static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) { if (copy_from_user(kp, up, sizeof(struct v4l2_pix_format))) return -EFAULT; return 0; } static inline int get_v4l2_pix_format_mplane(struct v4l2_pix_format_mplane *kp, struct v4l2_pix_format_mplane __user *up) { if (copy_from_user(kp, up, sizeof(struct v4l2_pix_format_mplane))) return -EFAULT; return 0; } static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) { if (copy_to_user(up, kp, sizeof(struct v4l2_pix_format))) return -EFAULT; return 0; } static inline int put_v4l2_pix_format_mplane(struct v4l2_pix_format_mplane *kp, struct v4l2_pix_format_mplane __user *up) { if (copy_to_user(up, kp, sizeof(struct v4l2_pix_format_mplane))) return -EFAULT; return 0; } static inline int get_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) { if (copy_from_user(kp, up, sizeof(struct v4l2_vbi_format))) return -EFAULT; return 0; } static inline int put_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) { if (copy_to_user(up, kp, sizeof(struct v4l2_vbi_format))) return -EFAULT; return 0; } static inline int get_v4l2_sliced_vbi_format(struct v4l2_sliced_vbi_format *kp, struct v4l2_sliced_vbi_format __user *up) { if (copy_from_user(kp, up, sizeof(struct v4l2_sliced_vbi_format))) return -EFAULT; return 0; } static inline int put_v4l2_sliced_vbi_format(struct v4l2_sliced_vbi_format *kp, struct v4l2_sliced_vbi_format __user *up) { if (copy_to_user(up, kp, sizeof(struct v4l2_sliced_vbi_format))) return -EFAULT; return 0; } struct v4l2_format32 { enum v4l2_buf_type type; union { struct v4l2_pix_format pix; struct v4l2_pix_format_mplane pix_mp; struct v4l2_window32 win; struct v4l2_vbi_format vbi; struct v4l2_sliced_vbi_format sliced; __u8 raw_data[200]; /* user-defined */ } fmt; }; static int get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) { if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_format32)) || get_user(kp->type, &up->type)) return -EFAULT; switch (kp->type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: case V4L2_BUF_TYPE_VIDEO_OUTPUT: return get_v4l2_pix_format(&kp->fmt.pix, &up->fmt.pix); case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: return get_v4l2_pix_format_mplane(&kp->fmt.pix_mp, &up->fmt.pix_mp); case V4L2_BUF_TYPE_VIDEO_OVERLAY: case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: return get_v4l2_window32(&kp->fmt.win, &up->fmt.win); case V4L2_BUF_TYPE_VBI_CAPTURE: case V4L2_BUF_TYPE_VBI_OUTPUT: return get_v4l2_vbi_format(&kp->fmt.vbi, &up->fmt.vbi); case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: return get_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced); case V4L2_BUF_TYPE_PRIVATE: if (copy_from_user(kp, up, sizeof(kp->fmt.raw_data))) return -EFAULT; return 0; default: printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n", kp->type); return -EINVAL; } } static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) { if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_format32)) || put_user(kp->type, &up->type)) return -EFAULT; switch (kp->type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: case V4L2_BUF_TYPE_VIDEO_OUTPUT: return put_v4l2_pix_format(&kp->fmt.pix, &up->fmt.pix); case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: return put_v4l2_pix_format_mplane(&kp->fmt.pix_mp, &up->fmt.pix_mp); case V4L2_BUF_TYPE_VIDEO_OVERLAY: case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: return put_v4l2_window32(&kp->fmt.win, &up->fmt.win); case V4L2_BUF_TYPE_VBI_CAPTURE: case V4L2_BUF_TYPE_VBI_OUTPUT: return put_v4l2_vbi_format(&kp->fmt.vbi, &up->fmt.vbi); case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: return put_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced); case V4L2_BUF_TYPE_PRIVATE: if (copy_to_user(up, kp, sizeof(up->fmt.raw_data))) return -EFAULT; return 0; default: printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n", kp->type); return -EINVAL; } } struct v4l2_standard32 { __u32 index; __u32 id[2]; /* __u64 would get the alignment wrong */ __u8 name[24]; struct v4l2_fract frameperiod; /* Frames, not fields */ __u32 framelines; __u32 reserved[4]; }; static int get_v4l2_standard32(struct v4l2_standard *kp, struct v4l2_standard32 __user *up) { /* other fields are not set by the user, nor used by the driver */ if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_standard32)) || get_user(kp->index, &up->index)) return -EFAULT; return 0; } static int put_v4l2_standard32(struct v4l2_standard *kp, struct v4l2_standard32 __user *up) { if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_standard32)) || put_user(kp->index, &up->index) || copy_to_user(up->id, &kp->id, sizeof(__u64)) || copy_to_user(up->name, kp->name, 24) || copy_to_user(&up->frameperiod, &kp->frameperiod, sizeof(kp->frameperiod)) || put_user(kp->framelines, &up->framelines) || copy_to_user(up->reserved, kp->reserved, 4 * sizeof(__u32))) return -EFAULT; return 0; } struct v4l2_plane32 { __u32 bytesused; __u32 length; union { __u32 mem_offset; compat_long_t userptr; } m; __u32 data_offset; __u32 reserved[11]; }; struct v4l2_buffer32 { __u32 index; enum v4l2_buf_type type; __u32 bytesused; __u32 flags; enum v4l2_field field; struct compat_timeval timestamp; struct v4l2_timecode timecode; __u32 sequence; /* memory location */ enum v4l2_memory memory; union { __u32 offset; compat_long_t userptr; compat_caddr_t planes; } m; __u32 length; __u32 input; __u32 reserved; }; static int get_v4l2_plane32(struct v4l2_plane *up, struct v4l2_plane32 *up32, enum v4l2_memory memory) { void __user *up_pln; compat_long_t p; if (copy_in_user(up, up32, 2 * sizeof(__u32)) || copy_in_user(&up->data_offset, &up32->data_offset, sizeof(__u32))) return -EFAULT; if (memory == V4L2_MEMORY_USERPTR) { if (get_user(p, &up32->m.userptr)) return -EFAULT; up_pln = compat_ptr(p); if (put_user((unsigned long)up_pln, &up->m.userptr)) return -EFAULT; } else { if (copy_in_user(&up->m.mem_offset, &up32->m.mem_offset, sizeof(__u32))) return -EFAULT; } return 0; } static int put_v4l2_plane32(struct v4l2_plane *up, struct v4l2_plane32 *up32, enum v4l2_memory memory) { if (copy_in_user(up32, up, 2 * sizeof(__u32)) || copy_in_user(&up32->data_offset, &up->data_offset, sizeof(__u32))) return -EFAULT; /* For MMAP, driver might've set up the offset, so copy it back. * USERPTR stays the same (was userspace-provided), so no copying. */ if (memory == V4L2_MEMORY_MMAP) if (copy_in_user(&up32->m.mem_offset, &up->m.mem_offset, sizeof(__u32))) return -EFAULT; return 0; } static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user *up) { struct v4l2_plane32 __user *uplane32; struct v4l2_plane __user *uplane; compat_caddr_t p; int num_planes; int ret; if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_buffer32)) || get_user(kp->index, &up->index) || get_user(kp->type, &up->type) || get_user(kp->flags, &up->flags) || get_user(kp->memory, &up->memory) || get_user(kp->input, &up->input)) return -EFAULT; if (V4L2_TYPE_IS_OUTPUT(kp->type)) if (get_user(kp->bytesused, &up->bytesused) || get_user(kp->field, &up->field) || get_user(kp->timestamp.tv_sec, &up->timestamp.tv_sec) || get_user(kp->timestamp.tv_usec, &up->timestamp.tv_usec)) return -EFAULT; if (V4L2_TYPE_IS_MULTIPLANAR(kp->type)) { if (get_user(kp->length, &up->length)) return -EFAULT; num_planes = kp->length; if (num_planes == 0) { kp->m.planes = NULL; /* num_planes == 0 is legal, e.g. when userspace doesn't * need planes array on DQBUF*/ return 0; } if (get_user(p, &up->m.planes)) return -EFAULT; uplane32 = compat_ptr(p); if (!access_ok(VERIFY_READ, uplane32, num_planes * sizeof(struct v4l2_plane32))) return -EFAULT; /* We don't really care if userspace decides to kill itself * by passing a very big num_planes value */ uplane = compat_alloc_user_space(num_planes * sizeof(struct v4l2_plane)); kp->m.planes = uplane; while (--num_planes >= 0) { ret = get_v4l2_plane32(uplane, uplane32, kp->memory); if (ret) return ret; ++uplane; ++uplane32; } } else { switch (kp->memory) { case V4L2_MEMORY_MMAP: if (get_user(kp->length, &up->length) || get_user(kp->m.offset, &up->m.offset)) return -EFAULT; break; case V4L2_MEMORY_USERPTR: { compat_long_t tmp; if (get_user(kp->length, &up->length) || get_user(tmp, &up->m.userptr)) return -EFAULT; kp->m.userptr = (unsigned long)compat_ptr(tmp); } break; case V4L2_MEMORY_OVERLAY: if (get_user(kp->m.offset, &up->m.offset)) return -EFAULT; break; } } return 0; } static int put_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user *up) { struct v4l2_plane32 __user *uplane32; struct v4l2_plane __user *uplane; compat_caddr_t p; int num_planes; int ret; if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_buffer32)) || put_user(kp->index, &up->index) || put_user(kp->type, &up->type) || put_user(kp->flags, &up->flags) || put_user(kp->memory, &up->memory) || put_user(kp->input, &up->input)) return -EFAULT; if (put_user(kp->bytesused, &up->bytesused) || put_user(kp->field, &up->field) || put_user(kp->timestamp.tv_sec, &up->timestamp.tv_sec) || put_user(kp->timestamp.tv_usec, &up->timestamp.tv_usec) || copy_to_user(&up->timecode, &kp->timecode, sizeof(struct v4l2_timecode)) || put_user(kp->sequence, &up->sequence) || put_user(kp->reserved, &up->reserved)) return -EFAULT; if (V4L2_TYPE_IS_MULTIPLANAR(kp->type)) { num_planes = kp->length; if (num_planes == 0) return 0; uplane = kp->m.planes; if (get_user(p, &up->m.planes)) return -EFAULT; uplane32 = compat_ptr(p); while (--num_planes >= 0) { ret = put_v4l2_plane32(uplane, uplane32, kp->memory); if (ret) return ret; ++uplane; ++uplane32; } } else { switch (kp->memory) { case V4L2_MEMORY_MMAP: if (put_user(kp->length, &up->length) || put_user(kp->m.offset, &up->m.offset)) return -EFAULT; break; case V4L2_MEMORY_USERPTR: if (put_user(kp->length, &up->length) || put_user(kp->m.userptr, &up->m.userptr)) return -EFAULT; break; case V4L2_MEMORY_OVERLAY: if (put_user(kp->m.offset, &up->m.offset)) return -EFAULT; break; } } return 0; } struct v4l2_framebuffer32 { __u32 capability; __u32 flags; compat_caddr_t base; struct v4l2_pix_format fmt; }; static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_framebuffer32 __user *up) { u32 tmp; if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_framebuffer32)) || get_user(tmp, &up->base) || get_user(kp->capability, &up->capability) || get_user(kp->flags, &up->flags)) return -EFAULT; kp->base = compat_ptr(tmp); get_v4l2_pix_format(&kp->fmt, &up->fmt); return 0; } static int put_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_framebuffer32 __user *up) { u32 tmp = (u32)((unsigned long)kp->base); if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_framebuffer32)) || put_user(tmp, &up->base) || put_user(kp->capability, &up->capability) || put_user(kp->flags, &up->flags)) return -EFAULT; put_v4l2_pix_format(&kp->fmt, &up->fmt); return 0; } struct v4l2_input32 { __u32 index; /* Which input */ __u8 name[32]; /* Label */ __u32 type; /* Type of input */ __u32 audioset; /* Associated audios (bitfield) */ __u32 tuner; /* Associated tuner */ v4l2_std_id std; __u32 status; __u32 reserved[4]; } __attribute__ ((packed)); /* The 64-bit v4l2_input struct has extra padding at the end of the struct. Otherwise it is identical to the 32-bit version. */ static inline int get_v4l2_input32(struct v4l2_input *kp, struct v4l2_input32 __user *up) { if (copy_from_user(kp, up, sizeof(struct v4l2_input32))) return -EFAULT; return 0; } static inline int put_v4l2_input32(struct v4l2_input *kp, struct v4l2_input32 __user *up) { if (copy_to_user(up, kp, sizeof(struct v4l2_input32))) return -EFAULT; return 0; } struct v4l2_ext_controls32 { __u32 ctrl_class; __u32 count; __u32 error_idx; __u32 reserved[2]; compat_caddr_t controls; /* actually struct v4l2_ext_control32 * */ }; struct v4l2_ext_control32 { __u32 id; __u32 size; __u32 reserved2[1]; union { __s32 value; __s64 value64; compat_caddr_t string; /* actually char * */ }; } __attribute__ ((packed)); /* The following function really belong in v4l2-common, but that causes a circular dependency between modules. We need to think about this, but for now this will do. */ /* Return non-zero if this control is a pointer type. Currently only type STRING is a pointer type. */ static inline int ctrl_is_pointer(u32 id) { switch (id) { case V4L2_CID_RDS_TX_PS_NAME: case V4L2_CID_RDS_TX_RADIO_TEXT: return 1; default: return 0; } } static int get_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext_controls32 __user *up) { struct v4l2_ext_control32 __user *ucontrols; struct v4l2_ext_control __user *kcontrols; int n; compat_caddr_t p; if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_ext_controls32)) || get_user(kp->ctrl_class, &up->ctrl_class) || get_user(kp->count, &up->count) || get_user(kp->error_idx, &up->error_idx) || copy_from_user(kp->reserved, up->reserved, sizeof(kp->reserved))) return -EFAULT; n = kp->count; if (n == 0) { kp->controls = NULL; return 0; } if (get_user(p, &up->controls)) return -EFAULT; ucontrols = compat_ptr(p); if (!access_ok(VERIFY_READ, ucontrols, n * sizeof(struct v4l2_ext_control32))) return -EFAULT; kcontrols = compat_alloc_user_space(n * sizeof(struct v4l2_ext_control)); kp->controls = kcontrols; while (--n >= 0) { if (copy_in_user(kcontrols, ucontrols, sizeof(*ucontrols))) return -EFAULT; if (ctrl_is_pointer(kcontrols->id)) { void __user *s; if (get_user(p, &ucontrols->string)) return -EFAULT; s = compat_ptr(p); if (put_user(s, &kcontrols->string)) return -EFAULT; } ucontrols++; kcontrols++; } return 0; } static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext_controls32 __user *up) { struct v4l2_ext_control32 __user *ucontrols; struct v4l2_ext_control __user *kcontrols = kp->controls; int n = kp->count; compat_caddr_t p; if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_ext_controls32)) || put_user(kp->ctrl_class, &up->ctrl_class) || put_user(kp->count, &up->count) || put_user(kp->error_idx, &up->error_idx) || copy_to_user(up->reserved, kp->reserved, sizeof(up->reserved))) return -EFAULT; if (!kp->count) return 0; if (get_user(p, &up->controls)) return -EFAULT; ucontrols = compat_ptr(p); if (!access_ok(VERIFY_WRITE, ucontrols, n * sizeof(struct v4l2_ext_control32))) return -EFAULT; while (--n >= 0) { unsigned size = sizeof(*ucontrols); /* Do not modify the pointer when copying a pointer control. The contents of the pointer was changed, not the pointer itself. */ if (ctrl_is_pointer(kcontrols->id)) size -= sizeof(ucontrols->value64); if (copy_in_user(ucontrols, kcontrols, size)) return -EFAULT; ucontrols++; kcontrols++; } return 0; } #define VIDIOC_G_FMT32 _IOWR('V', 4, struct v4l2_format32) #define VIDIOC_S_FMT32 _IOWR('V', 5, struct v4l2_format32) #define VIDIOC_QUERYBUF32 _IOWR('V', 9, struct v4l2_buffer32) #define VIDIOC_G_FBUF32 _IOR ('V', 10, struct v4l2_framebuffer32) #define VIDIOC_S_FBUF32 _IOW ('V', 11, struct v4l2_framebuffer32) #define VIDIOC_QBUF32 _IOWR('V', 15, struct v4l2_buffer32) #define VIDIOC_DQBUF32 _IOWR('V', 17, struct v4l2_buffer32) #define VIDIOC_ENUMSTD32 _IOWR('V', 25, struct v4l2_standard32) #define VIDIOC_ENUMINPUT32 _IOWR('V', 26, struct v4l2_input32) #define VIDIOC_TRY_FMT32 _IOWR('V', 64, struct v4l2_format32) #define VIDIOC_G_EXT_CTRLS32 _IOWR('V', 71, struct v4l2_ext_controls32) #define VIDIOC_S_EXT_CTRLS32 _IOWR('V', 72, struct v4l2_ext_controls32) #define VIDIOC_TRY_EXT_CTRLS32 _IOWR('V', 73, struct v4l2_ext_controls32) #define VIDIOC_OVERLAY32 _IOW ('V', 14, s32) #define VIDIOC_STREAMON32 _IOW ('V', 18, s32) #define VIDIOC_STREAMOFF32 _IOW ('V', 19, s32) #define VIDIOC_G_INPUT32 _IOR ('V', 38, s32) #define VIDIOC_S_INPUT32 _IOWR('V', 39, s32) #define VIDIOC_G_OUTPUT32 _IOR ('V', 46, s32) #define VIDIOC_S_OUTPUT32 _IOWR('V', 47, s32) static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { union { struct v4l2_format v2f; struct v4l2_buffer v2b; struct v4l2_framebuffer v2fb; struct v4l2_input v2i; struct v4l2_standard v2s; struct v4l2_ext_controls v2ecs; unsigned long vx; int vi; } karg; void __user *up = compat_ptr(arg); int compatible_arg = 1; long err = 0; /* First, convert the command. */ switch (cmd) { case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break; case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break; case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break; case VIDIOC_G_FBUF32: cmd = VIDIOC_G_FBUF; break; case VIDIOC_S_FBUF32: cmd = VIDIOC_S_FBUF; break; case VIDIOC_QBUF32: cmd = VIDIOC_QBUF; break; case VIDIOC_DQBUF32: cmd = VIDIOC_DQBUF; break; case VIDIOC_ENUMSTD32: cmd = VIDIOC_ENUMSTD; break; case VIDIOC_ENUMINPUT32: cmd = VIDIOC_ENUMINPUT; break; case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break; case VIDIOC_G_EXT_CTRLS32: cmd = VIDIOC_G_EXT_CTRLS; break; case VIDIOC_S_EXT_CTRLS32: cmd = VIDIOC_S_EXT_CTRLS; break; case VIDIOC_TRY_EXT_CTRLS32: cmd = VIDIOC_TRY_EXT_CTRLS; break; case VIDIOC_OVERLAY32: cmd = VIDIOC_OVERLAY; break; case VIDIOC_STREAMON32: cmd = VIDIOC_STREAMON; break; case VIDIOC_STREAMOFF32: cmd = VIDIOC_STREAMOFF; break; case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break; case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break; case VIDIOC_G_OUTPUT32: cmd = VIDIOC_G_OUTPUT; break; case VIDIOC_S_OUTPUT32: cmd = VIDIOC_S_OUTPUT; break; } switch (cmd) { case VIDIOC_OVERLAY: case VIDIOC_STREAMON: case VIDIOC_STREAMOFF: case VIDIOC_S_INPUT: case VIDIOC_S_OUTPUT: err = get_user(karg.vi, (s32 __user *)up); compatible_arg = 0; break; case VIDIOC_G_INPUT: case VIDIOC_G_OUTPUT: compatible_arg = 0; break; case VIDIOC_G_FMT: case VIDIOC_S_FMT: case VIDIOC_TRY_FMT: err = get_v4l2_format32(&karg.v2f, up); compatible_arg = 0; break; case VIDIOC_QUERYBUF: case VIDIOC_QBUF: case VIDIOC_DQBUF: err = get_v4l2_buffer32(&karg.v2b, up); compatible_arg = 0; break; case VIDIOC_S_FBUF: err = get_v4l2_framebuffer32(&karg.v2fb, up); compatible_arg = 0; break; case VIDIOC_G_FBUF: compatible_arg = 0; break; case VIDIOC_ENUMSTD: err = get_v4l2_standard32(&karg.v2s, up); compatible_arg = 0; break; case VIDIOC_ENUMINPUT: err = get_v4l2_input32(&karg.v2i, up); compatible_arg = 0; break; case VIDIOC_G_EXT_CTRLS: case VIDIOC_S_EXT_CTRLS: case VIDIOC_TRY_EXT_CTRLS: err = get_v4l2_ext_controls32(&karg.v2ecs, up); compatible_arg = 0; break; } if (err) return err; if (compatible_arg) err = native_ioctl(file, cmd, (unsigned long)up); else { mm_segment_t old_fs = get_fs(); set_fs(KERNEL_DS); err = native_ioctl(file, cmd, (unsigned long)&karg); set_fs(old_fs); } /* Special case: even after an error we need to put the results back for these ioctls since the error_idx will contain information on which control failed. */ switch (cmd) { case VIDIOC_G_EXT_CTRLS: case VIDIOC_S_EXT_CTRLS: case VIDIOC_TRY_EXT_CTRLS: if (put_v4l2_ext_controls32(&karg.v2ecs, up)) err = -EFAULT; break; } if (err) return err; switch (cmd) { case VIDIOC_S_INPUT: case VIDIOC_S_OUTPUT: case VIDIOC_G_INPUT: case VIDIOC_G_OUTPUT: err = put_user(((s32)karg.vi), (s32 __user *)up); break; case VIDIOC_G_FBUF: err = put_v4l2_framebuffer32(&karg.v2fb, up); break; case VIDIOC_G_FMT: case VIDIOC_S_FMT: case VIDIOC_TRY_FMT: err = put_v4l2_format32(&karg.v2f, up); break; case VIDIOC_QUERYBUF: case VIDIOC_QBUF: case VIDIOC_DQBUF: err = put_v4l2_buffer32(&karg.v2b, up); break; case VIDIOC_ENUMSTD: err = put_v4l2_standard32(&karg.v2s, up); break; case VIDIOC_ENUMINPUT: err = put_v4l2_input32(&karg.v2i, up); break; } return err; } long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) { long ret = -ENOIOCTLCMD; if (!file->f_op->unlocked_ioctl) return ret; switch (cmd) { case VIDIOC_QUERYCAP: case VIDIOC_RESERVED: case VIDIOC_ENUM_FMT: case VIDIOC_G_FMT32: case VIDIOC_S_FMT32: case VIDIOC_REQBUFS: case VIDIOC_QUERYBUF32: case VIDIOC_G_FBUF32: case VIDIOC_S_FBUF32: case VIDIOC_OVERLAY32: case VIDIOC_QBUF32: case VIDIOC_DQBUF32: case VIDIOC_STREAMON32: case VIDIOC_STREAMOFF32: case VIDIOC_G_PARM: case VIDIOC_S_PARM: case VIDIOC_G_STD: case VIDIOC_S_STD: case VIDIOC_ENUMSTD32: case VIDIOC_ENUMINPUT32: case VIDIOC_G_CTRL: case VIDIOC_S_CTRL: case VIDIOC_G_TUNER: case VIDIOC_S_TUNER: case VIDIOC_G_AUDIO: case VIDIOC_S_AUDIO: case VIDIOC_QUERYCTRL: case VIDIOC_QUERYMENU: case VIDIOC_G_INPUT32: case VIDIOC_S_INPUT32: case VIDIOC_G_OUTPUT32: case VIDIOC_S_OUTPUT32: case VIDIOC_ENUMOUTPUT: case VIDIOC_G_AUDOUT: case VIDIOC_S_AUDOUT: case VIDIOC_G_MODULATOR: case VIDIOC_S_MODULATOR: case VIDIOC_S_FREQUENCY: case VIDIOC_G_FREQUENCY: case VIDIOC_CROPCAP: case VIDIOC_G_CROP: case VIDIOC_S_CROP: case VIDIOC_G_JPEGCOMP: case VIDIOC_S_JPEGCOMP: case VIDIOC_QUERYSTD: case VIDIOC_TRY_FMT32: case VIDIOC_ENUMAUDIO: case VIDIOC_ENUMAUDOUT: case VIDIOC_G_PRIORITY: case VIDIOC_S_PRIORITY: case VIDIOC_G_SLICED_VBI_CAP: case VIDIOC_LOG_STATUS: case VIDIOC_G_EXT_CTRLS32: case VIDIOC_S_EXT_CTRLS32: case VIDIOC_TRY_EXT_CTRLS32: case VIDIOC_ENUM_FRAMESIZES: case VIDIOC_ENUM_FRAMEINTERVALS: case VIDIOC_G_ENC_INDEX: case VIDIOC_ENCODER_CMD: case VIDIOC_TRY_ENCODER_CMD: case VIDIOC_DBG_S_REGISTER: case VIDIOC_DBG_G_REGISTER: case VIDIOC_DBG_G_CHIP_IDENT: case VIDIOC_S_HW_FREQ_SEEK: case VIDIOC_ENUM_DV_PRESETS: case VIDIOC_S_DV_PRESET: case VIDIOC_G_DV_PRESET: case VIDIOC_QUERY_DV_PRESET: case VIDIOC_S_DV_TIMINGS: case VIDIOC_G_DV_TIMINGS: case VIDIOC_DQEVENT: case VIDIOC_SUBSCRIBE_EVENT: case VIDIOC_UNSUBSCRIBE_EVENT: ret = do_video_ioctl(file, cmd, arg); break; default: printk(KERN_WARNING "compat_ioctl32: " "unknown ioctl '%c', dir=%d, #%d (0x%08x)\n", _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd), cmd); break; } return ret; } EXPORT_SYMBOL_GPL(v4l2_compat_ioctl32); #endif MODULE_LICENSE("GPL");
JijonHyuni/HyperKernel-JB
virt/drivers/media/video/v4l2-compat-ioctl32.c
C
gpl-2.0
25,621
[ 30522, 1013, 1008, 1008, 25941, 19646, 16703, 1012, 1039, 1024, 7584, 2090, 3590, 16313, 1998, 4185, 16313, 3128, 25941, 19646, 2015, 1012, 1008, 5459, 2013, 1042, 2015, 4933, 2011, 12098, 4859, 24544, 2078, 1026, 12098, 4859, 1030, 12098, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php if (!defined('APPLICATION')) exit(); include (PATH_PLUGINS.DS.'Galleries/views/helper/helper.php'); //echo $Sender->Form->Open(); //echo $Sender->Form->Errors(); ?> <div id="Custom"> <h1>Sorry! The Details have not been filled in yet.</h1> <p>The tin-bots specialize in the details, though. Check back soon!</p> <ul id="Item"> <?php //foreach ($AllFiles as $Class) { //print_r (GalleriesModel::GetFilesInfo('covers')); //print_r($Class); foreach ($Classes as $Class) { $Label = $Class->ClassLabel; $AllStuff = GalleriesModel::GetFilesInfo($Label); foreach ($AllStuff as $File) { echo '<a href="/tinsdirect/plugin/gallery/item/'.$File['Slug'].'"> <li><img src="'.$PublicDir.$Label.DS.$File['FileName'].'"></img></li>'; echo '</a>'; } } ?> </ul> </div>
DMeganoski/Gallery-Designer
plugins/Galleries/views/item/home.php
PHP
gpl-2.0
1,014
[ 30522, 1026, 1029, 25718, 2065, 1006, 999, 4225, 1006, 1005, 4646, 1005, 1007, 1007, 6164, 1006, 1007, 1025, 2421, 1006, 4130, 1035, 13354, 7076, 1012, 16233, 1012, 1005, 11726, 1013, 5328, 1013, 2393, 2121, 1013, 2393, 2121, 1012, 25718, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# modern-django Modern Django: A Guide on How to Deploy Django-based Web Applications in 2017
safouh94/modern-django
README.md
Markdown
mit
94
[ 30522, 1001, 2715, 1011, 6520, 23422, 2715, 6520, 23422, 1024, 1037, 5009, 2006, 2129, 2000, 21296, 6520, 23422, 1011, 2241, 4773, 5097, 1999, 2418, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/***************************************************************************** * Copyright (C) 2006 Imre Kelényi *------------------------------------------------------------------- * This file is part of SymTorrent * * SymTorrent is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * SymTorrent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Symella; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ /** * ============================================================================ * Name : CNetworkConnection from NetworkConnection.h * Part of : SymTorrent * Created : 11.01.2006 by Imre Kelényi * ============================================================================ */ #ifndef NETWORKCONNECTION_H__ #define NETWORKCONNECTION_H__ // INCLUDES #include <Es_sock.h> #include <in_sock.h> #include "SocketListenerBase.h" //FORWARD DECLARATIONS class CNetworkConnection; class CNetworkManager; class MKiAccessPointSupplier; //class CSocketListenerBase; // CONSTS const TInt KBluetoothIapId = -2; /** * MNetworkConnectionObserver */ class MNetworkConnectionObserver { public: virtual void OnNetworkConnectionStartedL(TBool aResult, CNetworkConnection& aConnection) = 0; /** * Called when an active connection is disconnected */ virtual void OnNetworkConnectionDownL(CNetworkConnection& aConnection) = 0; }; /** * CNetworkConnection */ class CNetworkConnection : public CActive { public: enum TNetworkConnectionState { ENCUninitialized = 0, // the connection type and IAP id is unset ENCInitializing, // asking for access point (this state can be skipped) ENCStopped, ENCStarting, ENCStarted }; enum TNetworkConnectionType { ERConnectionBased, EBluetooth }; CNetworkConnection(RSocketServ& aSocketServer, CNetworkManager& aNetMgr); void ConstructL(); ~CNetworkConnection(); /** * Will leave if Iap ID is unset. */ void StartL(); void Close(); /** * Sets the connection type and the associated access point id (in case of RConnection-based * connections). The connection must be in unitialized state, otherwise PANIC is raised. */ IMPORT_C void InitializeL(TNetworkConnectionType aType, TInt aIapId = -1); IMPORT_C TBool GetIapAndInitializeL(TInt aConnectionId, MKiAccessPointSupplier* aAccessPointSupplier); /** * Closes the conenctions, removes the access point binding and deletes all socket listeners. */ IMPORT_C void SetUninitialized(); inline TBool IsInitialized() const; inline TInt IapId() const; inline TNetworkConnectionType Type() const; inline CNetworkManager& NetMgr(); //void CreateSocketListenerL(); // inline CSocketListenerBase* SocketListener(TInt aIndex); // inline TInt SocketListenerCount() const; /** * Starts listening for incoming connections onthe given port. * * The network connection must already be started (otherwise the function panics) */ TInt StartListeningL(TUint aPort, MSocketListenerObserver* aObserver); void StopListening(TUint aPort); void StopAllListening(); CSocketListenerBase* GetListener(TUint aPort); const CSocketListenerBase* GetListener(TUint aPort) const; TBool IsListening(TUint aPort) const; /** * @return ETrue if there is an active listener */ TBool IsListening() const; inline TNetworkConnectionState State() const; inline TBool IsStarted() const; inline RConnection& BaseConnection(); inline void SetNetworkConnectionObserver(MNetworkConnectionObserver* aNetworkConnectionObserver); inline TBool GotLocalAddress() const; inline const TSockAddr& LocalAddress(); private: void ScheduleProgressNotification(); TInt GetLocalIPAddressL(TInetAddr& aAddr); private: // from CActive void RunL(); void DoCancel(); private: TNetworkConnectionType iType; TInt iIapId; RSocketServ& iSocketServer; RConnection iConnection; TNetworkConnectionState iState; TNifProgressBuf iProgress; MNetworkConnectionObserver* iNetworkConnectionObserver; RPointerArray<CSocketListenerBase> iSocketListeners; RNotifier iBluetoothPowerNotifier; TPckgBuf<TBool> iBtPowerNotifierResult; TPckgBuf<TBool> iBtPowerNotifierDummy; TBool iGotLocalAddress; TSockAddr iLocalAddress; CNetworkManager& iNetMgr; }; // INLINE METHOD DEFINITIONS inline CNetworkConnection::TNetworkConnectionState CNetworkConnection::State() const { return iState; } inline TBool CNetworkConnection::IsStarted() const { return (iState == ENCStarted); } inline RConnection& CNetworkConnection::BaseConnection() { return iConnection; } inline TBool CNetworkConnection::IsInitialized() const { return ((iState != ENCUninitialized) && (iState != ENCInitializing)); } inline TInt CNetworkConnection::IapId() const { return iIapId; } inline void CNetworkConnection::SetNetworkConnectionObserver(MNetworkConnectionObserver* aNetworkConnectionObserver) { iNetworkConnectionObserver = aNetworkConnectionObserver; } inline CNetworkConnection::TNetworkConnectionType CNetworkConnection::Type() const { return iType; } inline TBool CNetworkConnection::GotLocalAddress() const { return iGotLocalAddress; } const TSockAddr& CNetworkConnection::LocalAddress() { return iLocalAddress; } inline CNetworkManager& CNetworkConnection::NetMgr() { return iNetMgr; } /*inline CSocketListenerBase* CNetworkConnection::SocketListener(TInt aIndex) { return iSocketListeners[aIndex]; } inline TInt CNetworkConnection::SocketListenerCount() const { return iSocketListeners.Count(); }*/ #endif // End of File
imrekel/SymTorrent
SymTorrentEngine/inc/kinetwork/NetworkConnection.h
C
gpl-2.0
6,212
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php defined('BASEPATH') OR exit('No direct script access allowed.'); $config['useragent'] = 'PHPMailer'; // Mail engine switcher: 'CodeIgniter' or 'PHPMailer' $config['protocol'] = IS_WINDOWS_OS ? 'smtp' : 'mail'; // 'mail', 'sendmail', or 'smtp' $config['mailpath'] = '/usr/sbin/sendmail'; $config['smtp_host'] = 'localhost'; $config['smtp_user'] = ''; $config['smtp_pass'] = ''; $config['smtp_port'] = 25; $config['smtp_timeout'] = 30; // (in seconds) $config['smtp_crypto'] = ''; // '' or 'tls' or 'ssl' $config['smtp_debug'] = 0; // PHPMailer's SMTP debug info level: 0 = off, 1 = commands, 2 = commands and data, 3 = as 2 plus connection status, 4 = low level data output. $config['debug_output'] = ''; // PHPMailer's SMTP debug output: 'html', 'echo', 'error_log' or user defined function with parameter $str and $level. NULL or '' means 'echo' on CLI, 'html' otherwise. $config['smtp_auto_tls'] = true; // Whether to enable TLS encryption automatically if a server supports it, even if `smtp_crypto` is not set to 'tls'. $config['smtp_conn_options'] = array(); // SMTP connection options, an array passed to the function stream_context_create() when connecting via SMTP. $config['wordwrap'] = true; $config['wrapchars'] = 76; $config['mailtype'] = 'html'; // 'text' or 'html' $config['charset'] = null; // 'UTF-8', 'ISO-8859-15', ...; NULL (preferable) means config_item('charset'), i.e. the character set of the site. $config['validate'] = true; $config['priority'] = 3; // 1, 2, 3, 4, 5; on PHPMailer useragent NULL is a possible option, it means that X-priority header is not set at all, see https://github.com/PHPMailer/PHPMailer/issues/449 $config['crlf'] = "\n"; // "\r\n" or "\n" or "\r" $config['newline'] = "\n"; // "\r\n" or "\n" or "\r" $config['bcc_batch_mode'] = false; $config['bcc_batch_size'] = 200; $config['encoding'] = '8bit'; // The body encoding. For CodeIgniter: '8bit' or '7bit'. For PHPMailer: '8bit', '7bit', 'binary', 'base64', or 'quoted-printable'. // DKIM Signing // See https://yomotherboard.com/how-to-setup-email-server-dkim-keys/ // See http://stackoverflow.com/questions/24463425/send-mail-in-phpmailer-using-dkim-keys // See https://github.com/PHPMailer/PHPMailer/blob/v5.2.14/test/phpmailerTest.php#L1708 $config['dkim_domain'] = ''; // DKIM signing domain name, for exmple 'example.com'. $config['dkim_private'] = ''; // DKIM private key, set as a file path. $config['dkim_private_string'] = ''; // DKIM private key, set directly from a string. $config['dkim_selector'] = ''; // DKIM selector. $config['dkim_passphrase'] = ''; // DKIM passphrase, used if your key is encrypted. $config['dkim_identity'] = ''; // DKIM Identity, usually the email address used as the source of the email. // An example for a Gmail Account: /* $config['useragent'] = 'PHPMailer'; $config['protocol'] = 'smtp'; $config['mailpath'] = '/usr/sbin/sendmail'; $config['smtp_host'] = 'smtp.gmail.com'; $config['smtp_user'] = 'yourusername@gmail.com'; $config['smtp_pass'] = 'yourpassword'; $config['smtp_port'] = 587; $config['smtp_timeout'] = 30; $config['smtp_crypto'] = 'tls'; $config['smtp_debug'] = 0; $config['debug_output'] = ''; $config['smtp_auto_tls'] = false; $config['smtp_conn_options'] = array(); $config['wordwrap'] = true; $config['wrapchars'] = 76; $config['mailtype'] = 'html'; $config['charset'] = null; $config['validate'] = true; $config['priority'] = 3; $config['crlf'] = "\n"; $config['newline'] = "\n"; $config['bcc_batch_mode'] = false; $config['bcc_batch_size'] = 200; $config['encoding'] = '8bit'; */
ivantcholakov/starter-public-edition-4
platform/common/config/email.php
PHP
mit
4,261
[ 30522, 1026, 1029, 25718, 4225, 1006, 1005, 2918, 15069, 1005, 1007, 2030, 6164, 1006, 1005, 2053, 3622, 5896, 3229, 3039, 1012, 1005, 1007, 1025, 1002, 9530, 8873, 2290, 1031, 1005, 5310, 4270, 3372, 1005, 1033, 1027, 1005, 25718, 21397, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*---------------------------------------------------------------------------/ / FatFs - FAT file system module configuration file R0.10a (C)ChaN, 2014 /---------------------------------------------------------------------------*/ #ifndef _FFCONF #define _FFCONF 29000 /* Revision ID */ /*---------------------------------------------------------------------------/ / Functions and Buffer Configurations /---------------------------------------------------------------------------*/ #define _FS_TINY 0 /* 0:Normal or 1:Tiny */ /* When _FS_TINY is set to 1, it reduces memory consumption _MAX_SS bytes each / file object. For file data transfer, FatFs uses the common sector buffer in / the file system object (FATFS) instead of private sector buffer eliminated / from the file object (FIL). */ #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */ /* Setting _FS_READONLY to 1 defines read only configuration. This removes / writing functions, f_write(), f_sync(), f_unlink(), f_mkdir(), f_chmod(), / f_rename(), f_truncate() and useless f_getfree(). */ #define _FS_MINIMIZE 0 /* 0 to 3 */ /* The _FS_MINIMIZE option defines minimization level to remove API functions. / / 0: All basic functions are enabled. / 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(), / f_truncate() and f_rename() function are removed. / 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1. / 3: f_lseek() function is removed in addition to 2. */ #define _USE_STRFUNC 1 /* 0:Disable or 1-2:Enable */ /* To enable string functions, set _USE_STRFUNC to 1 or 2. */ #define _USE_MKFS 0 /* 0:Disable or 1:Enable */ /* To enable f_mkfs() function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */ #define _USE_FASTSEEK 1 /* 0:Disable or 1:Enable */ /* To enable fast seek feature, set _USE_FASTSEEK to 1. */ #define _USE_LABEL 1 /* 0:Disable or 1:Enable */ /* To enable volume label functions, set _USE_LAVEL to 1 */ #define _USE_FORWARD 0 /* 0:Disable or 1:Enable */ /* To enable f_forward() function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */ /*---------------------------------------------------------------------------/ / Locale and Namespace Configurations /---------------------------------------------------------------------------*/ #define _CODE_PAGE 932 /* The _CODE_PAGE specifies the OEM code page to be used on the target system. / Incorrect setting of the code page can cause a file open failure. / / 932 - Japanese Shift-JIS (DBCS, OEM, Windows) / 936 - Simplified Chinese GBK (DBCS, OEM, Windows) / 949 - Korean (DBCS, OEM, Windows) / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows) / 1250 - Central Europe (Windows) / 1251 - Cyrillic (Windows) / 1252 - Latin 1 (Windows) / 1253 - Greek (Windows) / 1254 - Turkish (Windows) / 1255 - Hebrew (Windows) / 1256 - Arabic (Windows) / 1257 - Baltic (Windows) / 1258 - Vietnam (OEM, Windows) / 437 - U.S. (OEM) / 720 - Arabic (OEM) / 737 - Greek (OEM) / 775 - Baltic (OEM) / 850 - Multilingual Latin 1 (OEM) / 858 - Multilingual Latin 1 + Euro (OEM) / 852 - Latin 2 (OEM) / 855 - Cyrillic (OEM) / 866 - Russian (OEM) / 857 - Turkish (OEM) / 862 - Hebrew (OEM) / 874 - Thai (OEM, Windows) / 1 - ASCII (Valid for only non-LFN cfg.) */ #define _USE_LFN 0 /* 0 to 3 */ #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */ /* The _USE_LFN option switches the LFN feature. / / 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect. / 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe. / 2: Enable LFN with dynamic working buffer on the STACK. / 3: Enable LFN with dynamic working buffer on the HEAP. / / When enable LFN feature, Unicode handling functions ff_convert() and ff_wtoupper() / function must be added to the project. / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. When use stack for the / working buffer, take care on stack overflow. When use heap memory for the working / buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added / to the project. */ #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */ /* To switch the character encoding on the FatFs API (TCHAR) to Unicode, enable LFN / feature and set _LFN_UNICODE to 1. This option affects behavior of string I/O / functions. */ #define _STRF_ENCODE 3 /* 0:ANSI/OEM, 1:UTF-16LE, 2:UTF-16BE, 3:UTF-8 */ /* When Unicode API is enabled by _LFN_UNICODE option, this option selects the character / encoding on the file to be read/written via string I/O functions, f_gets(), f_putc(), / f_puts and f_printf(). This option has no effect when Unicode API is not enabled. */ #define _FS_RPATH 0 /* 0 to 2 */ /* The _FS_RPATH option configures relative path feature. / / 0: Disable relative path feature and remove related functions. / 1: Enable relative path. f_chdrive() and f_chdir() function are available. / 2: f_getcwd() function is available in addition to 1. / / Note that output of the f_readdir() fnction is affected by this option. */ /*---------------------------------------------------------------------------/ / Drive/Volume Configurations /---------------------------------------------------------------------------*/ #define _VOLUMES 1 /* Number of volumes (logical drives) to be used. */ #define _STR_VOLUME_ID 0 /* 0:Use only 0-9 for drive ID, 1:Use strings for drive ID */ #define _VOLUME_STRS "RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3" /* When _STR_VOLUME_ID is set to 1, also pre-defined string can be used as drive number / in the path name. _VOLUME_STRS defines the drive ID strings for each logical drives. / Number of items must be equal to _VOLUMES. Valid characters for the drive ID strings / are: 0-9 and A-Z. */ #define _MULTI_PARTITION 0 /* 0:Single partition, 1:Enable multiple partition */ /* By default(0), each logical drive number is bound to the same physical drive number / and only a FAT volume found on the physical drive is mounted. When it is set to 1, / each logical drive number is bound to arbitrary drive/partition listed in VolToPart[]. */ #define _MIN_SS 512 #define _MAX_SS 512 /* These options configure the sector size to be supported. (512, 1024, 2048 or 4096) / Always set both 512 for most systems, all memory card and hard disk. But a larger / value may be required for on-board flash memory and some type of optical media. / When _MIN_SS != _MAX_SS, FatFs is configured to multiple sector size and / GET_SECTOR_SIZE command must be implemented to the disk_ioctl() function. */ #define _USE_ERASE 0 /* 0:Disable or 1:Enable */ /* To enable sector erase feature, set _USE_ERASE to 1. Also CTRL_ERASE_SECTOR command / should be added to the disk_ioctl() function. */ #define _FS_NOFSINFO 0 /* 0 to 3 */ /* If you need to know correct free space on the FAT32 volume, set bit 0 of this / option and f_getfree() function at first time after volume mount will force / a full FAT scan. Bit 1 controls the last allocated cluster number as bit 0. / / bit0=0: Use free cluster count in the FSINFO if available. / bit0=1: Do not trust free cluster count in the FSINFO. / bit1=0: Use last allocated cluster number in the FSINFO if available. / bit1=1: Do not trust last allocated cluster number in the FSINFO. */ /*---------------------------------------------------------------------------/ / System Configurations /---------------------------------------------------------------------------*/ #define _WORD_ACCESS 0 /* 0 or 1 */ /* The _WORD_ACCESS option is an only platform dependent option. It defines / which access method is used to the word data on the FAT volume. / / 0: Byte-by-byte access. Always compatible with all platforms. / 1: Word access. Do not choose this unless under both the following conditions. / / * Address misaligned memory access is always allowed for all instructions. / * Byte order on the memory is little-endian. / / If it is the case, _WORD_ACCESS can also be set to 1 to improve performance / and reduce code size. */ #define _FS_LOCK 0 /* 0:Disable or >=1:Enable */ /* To enable file lock control feature, set _FS_LOCK to 1 or greater. / The value defines how many files/sub-directories can be opened simultaneously. / This feature consumes _FS_LOCK * 12 bytes of bss area. */ #define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */ #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */ #define _SYNC_t HANDLE /* O/S dependent sync object type. e.g. HANDLE, OS_EVENT*, ID and etc.. */ /*#include <windows.h>*/ /* A header file that defines sync object types on the O/S, such as windows.h, / ucos_ii.h and semphr.h, should be included here when enable this option. / The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs module. / / 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect. / 1: Enable re-entrancy. Also user provided synchronization handlers, / ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() / function must be added to the project. */ #endif /* _FFCONFIG */
nocoolnicksleft/bare-os
source/fatfs/ffconf.h
C
mit
9,397
[ 30522, 1013, 1008, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
version https://git-lfs.github.com/spec/v1 oid sha256:d1ae7db9f7928706e5601ba8c7d71d4c9fbd1c4463c6b6465b502115eae45c07 size 77153
yogeshsaroya/new-cdnjs
ajax/libs/yui/3.17.1/matrix/matrix-coverage.js
JavaScript
mit
130
[ 30522, 2544, 16770, 1024, 1013, 1013, 21025, 2102, 1011, 1048, 10343, 1012, 21025, 2705, 12083, 1012, 4012, 1013, 28699, 1013, 1058, 2487, 1051, 3593, 21146, 17788, 2575, 1024, 1040, 2487, 6679, 2581, 18939, 2683, 2546, 2581, 2683, 22407, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package ch.wisv.toornament.model; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class MatchDetails extends Match { private List<Stream> streams; private List<Vod> vods; @JsonProperty("private_note") private String privateNote; private String note; public List<Stream> getStreams() { return streams; } public void setStreams(List<Stream> streams) { this.streams = streams; } public List<Vod> getVods() { return vods; } public void setVods(List<Vod> vods) { this.vods = vods; } public String getPrivateNote() { return privateNote; } public void setPrivateNote(String privateNote) { this.privateNote = privateNote; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } }
Biokinetica/toornament-client
src/main/java/ch/wisv/toornament/model/MatchDetails.java
Java
mit
910
[ 30522, 7427, 10381, 1012, 15536, 2015, 2615, 1012, 2205, 12789, 3672, 1012, 2944, 1025, 12324, 4012, 1012, 5514, 2595, 19968, 1012, 4027, 1012, 5754, 17287, 3508, 1012, 1046, 3385, 21572, 4842, 3723, 1025, 12324, 9262, 1012, 21183, 4014, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
% File: api.pl % Purpose: prolog api for elf application % Author: Roger Evans % Version: 1.0 % Date: 21/12/2013 % % (c) Copyright 2013, University of Brighton % application api from prolog nimrodel(Model, Title, String) :- nimrodel(['-model', Model, '-title', Title, String]). nimrodel(Model, String) :- nimrodel(['-model', Model, String]). nimrodel(X) :- atom(X), !, nimrodel([X]). nimrodel(X) :- datr_query('nimrodel.MAIN', [arglist | X], _V). nimrodel_query(Index, Path) :- datr_theorem('nimrodel.STRING-QUERY', [Index | Path]).
rogerevansbrighton/nimrodel
nimrodel/api.pl
Perl
bsd-3-clause
604
[ 30522, 1003, 5371, 1024, 17928, 1012, 20228, 1003, 3800, 1024, 4013, 21197, 17928, 2005, 17163, 4646, 1003, 3166, 1024, 5074, 6473, 1003, 2544, 1024, 1015, 1012, 1014, 1003, 3058, 1024, 2538, 1013, 2260, 1013, 2286, 1003, 1003, 1006, 1039, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
//------------------------------------------------------------------------------ // <自动生成> // 此代码由工具生成。 // // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 // </自动生成> //------------------------------------------------------------------------------ namespace DTcms.Web.admin.manager { public partial class role_edit { /// <summary> /// form1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlForm form1; /// <summary> /// ddlRoleType 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.DropDownList ddlRoleType; /// <summary> /// txtRoleName 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.TextBox txtRoleName; /// <summary> /// rptList 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.Repeater rptList; /// <summary> /// btnSubmit 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.WebControls.Button btnSubmit; } }
LutherW/MTMS
Source/DTcms.Web/admin/manager/role_edit.aspx.designer.cs
C#
apache-2.0
2,149
[ 30522, 1013, 1013, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Created by sh on 15/7/6. */ "use strict"; var type = require("../type"); exports.parse = function (object, define, addition) { return type.dataParse(object, {type: Object, contents: String}, addition); };
LightCircle/LightCore
lib/db/mongo/operator/$rename.js
JavaScript
mit
218
[ 30522, 1013, 1008, 1008, 1008, 2580, 2011, 14021, 2006, 2321, 1013, 1021, 1013, 1020, 1012, 1008, 1013, 1000, 2224, 9384, 1000, 1025, 13075, 2828, 1027, 5478, 1006, 1000, 1012, 1012, 1013, 2828, 1000, 1007, 1025, 14338, 1012, 11968, 3366, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * @package Joomla.Site * @subpackage com_content * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; JLoader::register('ContentModelArticles', __DIR__ . '/articles.php'); /** * Frontpage Component Model * * @since 1.5 */ class ContentModelFeatured extends ContentModelArticles { /** * Model context string. * * @var string */ public $_context = 'com_content.frontpage'; /** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @param string $ordering The field to order on. * @param string $direction The direction to order on. * * @return void * * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { parent::populateState($ordering, $direction); $input = JFactory::getApplication()->input; $user = JFactory::getUser(); $app = JFactory::getApplication('site'); // List state information $limitstart = $input->getUInt('limitstart', 0); $this->setState('list.start', $limitstart); $params = $this->state->params; $menuParams = new Registry; if ($menu = $app->getMenu()->getActive()) { $menuParams->loadString($menu->params); } $mergedParams = clone $menuParams; $mergedParams->merge($params); $this->setState('params', $mergedParams); $limit = $params->get('num_leading_articles') + $params->get('num_intro_articles') + $params->get('num_links'); $this->setState('list.limit', $limit); $this->setState('list.links', $params->get('num_links')); $this->setState('filter.frontpage', true); if ((!$user->authorise('core.edit.state', 'com_content')) && (!$user->authorise('core.edit', 'com_content'))) { // Filter on published for those who do not have edit or edit.state rights. $this->setState('filter.published', 1); } else { $this->setState('filter.published', array(0, 1, 2)); } // Process show_noauth parameter if (!$params->get('show_noauth')) { $this->setState('filter.access', true); } else { $this->setState('filter.access', false); } // Check for category selection if ($params->get('featured_categories') && implode(',', $params->get('featured_categories')) == true) { $featuredCategories = $params->get('featured_categories'); $this->setState('filter.frontpage.categories', $featuredCategories); } $articleOrderby = $params->get('orderby_sec', 'rdate'); $articleOrderDate = $params->get('order_date'); $categoryOrderby = $params->def('orderby_pri', ''); $secondary = ContentHelperQuery::orderbySecondary($articleOrderby, $articleOrderDate); $primary = ContentHelperQuery::orderbyPrimary($categoryOrderby); $this->setState('list.ordering', $primary . $secondary . ', a.created DESC'); $this->setState('list.direction', ''); } /** * Method to get a list of articles. * * @return mixed An array of objects on success, false on failure. */ public function getItems() { $params = clone $this->getState('params'); $limit = $params->get('num_leading_articles') + $params->get('num_intro_articles') + $params->get('num_links'); if ($limit > 0) { $this->setState('list.limit', $limit); return parent::getItems(); } return array(); } /** * Method to get a store id based on model configuration state. * * This is necessary because the model is used by the component and * different modules that might need different sets of data or different * ordering requirements. * * @param string $id A prefix for the store id. * * @return string A store id. */ protected function getStoreId($id = '') { // Compile the store id. $id .= $this->getState('filter.frontpage'); return parent::getStoreId($id); } /** * Get the list of items. * * @return JDatabaseQuery */ protected function getListQuery() { // Create a new query object. $query = parent::getListQuery(); // Filter by categories $featuredCategories = $this->getState('filter.frontpage.categories'); if (is_array($featuredCategories) && !in_array('', $featuredCategories)) { $query->where('a.catid IN (' . implode(',', $featuredCategories) . ')'); } return $query; } public function getImportant() { $params = clone $this->getState('params'); $id_category = $params->get('important_category'); $query = 'SELECT title'. ' FROM #__categories'. ' WHERE id ='.(int) $id_category; $Arows = $this->_getList($query); //Agafem l'unic element $categoria = array_pop($Arows); $query = 'SELECT id, alias, title, introtext, created, modified, catid, language, cf.ordering'. ' FROM #__content c'. ' JOIN #__content_frontpage cf ON cf.content_id=c.id'. ' WHERE state = 1'. ' AND featured = 1'. ' AND catid ='. (int) $id_category . ' ORDER BY cf.ordering'; $articles = $this->_getList($query); return $articles; } }
IOC/joomla3
components/com_content/models/featured.php
PHP
gpl-2.0
5,221
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1030, 7427, 28576, 19968, 2050, 1012, 2609, 1008, 1030, 4942, 23947, 4270, 4012, 1035, 4180, 1008, 1008, 1030, 9385, 9385, 1006, 1039, 1007, 2384, 1011, 10476, 2330, 3120, 5609, 1010, 4297, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/operators/linear_chain_crf_op.h" #include <memory> namespace paddle { namespace operators { class LinearChainCRFOpMaker : public framework::OpProtoAndCheckerMaker { public: void Make() override { AddInput("Emission", "(LoDTensor/Tensor<float>). When a LoDTensor input,A 2-D LoDTensor" " with shape [N x D], where N is the size of the " "mini-batch and D is the total tag number. The unscaled emission " "weight matrix for the linear chain CRF. When a Tensor input," "A Tensor with shape [N x S x D], where N is batch number," "S is max length of sequences, D is the total tag number." "A LoDTensor or Tensor with type float32, float64."); AddInput("Transition", "(Tensor, default Tensor<float>) A 2-D Tensor with shape " "[(D + 2) x D]. The learnable parameter for the linear_chain_crf " "operator. See more details in the operator's comments."); AddInput("Label", "(LoDTensor/Tensor<int64_t>), when a LoDTensor input, " "[N x 1], where N is the total element number in a mini-batch. " "when a Tensor input, [N x S], where N is batch number. " "S is max length of sequences. The ground truth." "A LoDTensor or Tensor with int64."); AddInput("Length", "(Tensor, default Tensor<int64_t>) A Tensor with shape " "[M x 1], where M is the sequence number in a mini-batch." "A Tensor with type int64.") .AsDispensable(); AddOutput( "Alpha", "(Tensor, default Tensor<float>), the same shape with Emission. " "The forward vectors for the entire batch. Denote it as $\alpha$. " "$\alpha$ is a memo table used to calculate the normalization " "factor in CRF. $\alpha[k, v]$ stores the unnormalized " "probabilites of all possible unfinished sequences of tags that end at " "position $k$ with tag $v$. For each $k$, " "$\alpha[k, v]$ is a vector of length $D$ with a component for " "each tag value $v$. This vector is called a forward vecotr and " "will also be used in backward computations.") .AsIntermediate(); AddOutput( "EmissionExps", "(Tensor, default Tensor<float>), the same shape with Emission. " "The exponentials of Input(Emission). This is an intermediate " "computational result in forward computation, and will be reused in " "backward computation." "A LoDTensor or Tensor with type float32, float64.") .AsIntermediate(); AddOutput( "TransitionExps", "(Tensor, default Tensor<float>) A 2-D Tensor with shape " "[(D + 2) x D]. The exponentials of Input(Transition). This is an " "intermediate computational result in forward computation, and " "will be reused in backward computation." "A LoDTensor or Tensor with type float32, float64.") .AsIntermediate(); AddOutput( "LogLikelihood", "(Tensor, default Tensor<float>) The logarithm of the conditional " "likelihood of each training sample in a mini-batch. This is a 2-D " "tensor with shape [S x 1], where S is the sequence number in a " "mini-batch. Note: S is equal to the sequence number in a mini-batch. " "A Tensor with type float32, float64."); AddComment(R"DOC( Conditional Random Field defines an undirected probabilistic graph with nodes denoting random variables and edges denoting dependencies between these variables. CRF learns the conditional probability $P(Y|X)$, where $X = (x_1, x_2, ... , x_n)$ are structured inputs and $Y = (y_1, y_2, ... , y_n)$ are labels for the inputs. Linear chain CRF is a special case of CRF that is useful for sequence labeling task. Sequence labeling tasks do not assume a lot of conditional independences among inputs. The only constraint they impose is that the input and output must be linear sequences. Thus, the graph of such a CRF is a simple chain or a line, which results in the linear chain CRF. This operator implements the Forward-Backward algorithm for the linear chain CRF. Please refer to http://www.cs.columbia.edu/~mcollins/fb.pdf and http://cseweb.ucsd.edu/~elkan/250Bwinter2012/loglinearCRFs.pdf for details. Equation: 1. Denote Input(Emission) to this operator as $x$ here. 2. The first D values of Input(Transition) to this operator are for starting weights, denoted as $a$ here. 3. The next D values of Input(Transition) of this operator are for ending weights, denoted as $b$ here. 4. The remaning values of Input(Transition) are for transition weights, denoted as $w$ here. 5. Denote Input(Label) as $s$ here. The probability of a sequence $s$ of length $L$ is defined as: $$P(s) = (1/Z) \exp(a_{s_1} + b_{s_L} + \sum_{l=1}^L x_{s_l} + \sum_{l=2}^L w_{s_{l-1},s_l})$$ where $Z$ is a normalization value so that the sum of $P(s)$ over all possible sequences is 1, and $x$ is the emission feature weight to the linear chain CRF. Finally, the linear chain CRF operator outputs the logarithm of the conditional likelihood of each training sample in a mini-batch. NOTE: 1. The feature function for a CRF is made up of the emission features and the transition features. The emission feature weights are NOT computed in this operator. They MUST be computed first before this operator is called. 2. Because this operator performs global normalization over all possible sequences internally, it expects UNSCALED emission feature weights. Please do not call this op with the emission feature being output of any nonlinear activation. 3. The 2nd dimension of Input(Emission) MUST be equal to the tag number. )DOC"); } }; class LinearChainCRFOp : public framework::OperatorWithKernel { public: using framework::OperatorWithKernel::OperatorWithKernel; void InferShape(framework::InferShapeContext* ctx) const override { PADDLE_ENFORCE(ctx->HasInput("Emission"), "Input(Emission) should be not null."); PADDLE_ENFORCE(ctx->HasInput("Transition"), "Input(Transition) should be not null."); PADDLE_ENFORCE(ctx->HasInput("Label"), "Input(Label) should be not null."); PADDLE_ENFORCE(ctx->HasOutput("Alpha"), "Output(Alpha) should be not null."); PADDLE_ENFORCE(ctx->HasOutput("EmissionExps"), "Output(EmissionExps) should be not null."); PADDLE_ENFORCE(ctx->HasOutput("TransitionExps"), "Output(TransitionExps) should be not null."); PADDLE_ENFORCE(ctx->HasOutput("LogLikelihood"), "Output(LogLikelihood) should be not null."); auto transition_dims = ctx->GetInputDim("Transition"); PADDLE_ENFORCE_EQ(transition_dims.size(), 2, "The Input(Transition) should be a 2-D tensor."); bool check = true; if ((!ctx->IsRuntime()) && (transition_dims[0] <= 0 || transition_dims[1] <= 0)) { check = false; } if (check) { PADDLE_ENFORCE_EQ( transition_dims[0] - 2, transition_dims[1], "An invalid dimension for the Input(Transition), which should " "be a 2-D tensor with shape [(D + 2) x D]."); } auto emission_dims = ctx->GetInputDim("Emission"); PADDLE_ENFORCE_NE(emission_dims[0], 0, "An empty mini-batch is not allowed."); if (ctx->HasInput("Length")) { PADDLE_ENFORCE_EQ(emission_dims.size(), 3, "The Input(Emission) should be a 3-D tensor."); auto label_dims = ctx->GetInputDim("Label"); PADDLE_ENFORCE_EQ( (label_dims.size() == 3UL && label_dims[2] == 1) || (label_dims.size() == 2UL), true, "The Input(Label) should be a 3-D tensor with last " "dimension fixed to 1 or a 2-D tensor in padding mode."); if (ctx->IsRuntime()) { PADDLE_ENFORCE_EQ(emission_dims[0], label_dims[0], "The batch size of Input(Emission) and Input(Label) " "should be the same."); PADDLE_ENFORCE_EQ(emission_dims[1], label_dims[1], "The max length of Input(Emission) and Input(Label) " "should be the same."); } } else { PADDLE_ENFORCE_EQ(emission_dims.size(), 2, "The Input(Emission) should be a 2-D tensor."); if (ctx->IsRuntime()) { PADDLE_ENFORCE_EQ(emission_dims[1], transition_dims[1], "The 2nd dimension of the Input(Emission) and the " "Input(Transition) " "should be equal to the tag number."); } auto label_dims = ctx->GetInputDim("Label"); PADDLE_ENFORCE_EQ(label_dims.size(), 2, "The Input(Label) should be a 2-D tensor with the 2nd " "dimensions fixed to 1."); if (ctx->IsRuntime()) { PADDLE_ENFORCE_EQ( emission_dims[0], label_dims[0], "The height of Input(Emission) and the height of Input(Label) " "should be the same."); } } ctx->SetOutputDim("Alpha", emission_dims); ctx->SetOutputDim("EmissionExps", emission_dims); ctx->SetOutputDim("TransitionExps", transition_dims); // TODO(caoying) This is tricky. The 1st dimension of Output(LogLikelihood) // is the sequence number in a mini-batch. The dimension set here should be // resized to its correct size in the function Compute. Fix this once we can // get LoD information in the InferShape interface. ctx->SetOutputDim("LogLikelihood", {emission_dims[0], 1}); } protected: // Explicitly set that the data type of computation kernel of linear_chain_crf // is determined by its input "Emission". framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { return framework::OpKernelType( OperatorWithKernel::IndicateVarDataType(ctx, "Emission"), platform::CPUPlace()); } }; class LinearChainCRFGradOp : public framework::OperatorWithKernel { public: using framework::OperatorWithKernel::OperatorWithKernel; void InferShape(framework::InferShapeContext* ctx) const override { PADDLE_ENFORCE(ctx->HasInput("EmissionExps"), "Input(EmissionExps) should be not null."); PADDLE_ENFORCE(ctx->HasInput("TransitionExps"), "Input(TransitionExps) should be not null."); PADDLE_ENFORCE(ctx->HasInput(framework::GradVarName("LogLikelihood")), "Input(LogLikelihood@GRAD) shoudl be not null."); auto transition_exps_dims = ctx->GetInputDim("TransitionExps"); auto emission_exps_dims = ctx->GetInputDim("EmissionExps"); if (ctx->HasOutput(framework::GradVarName("Emission"))) { ctx->SetOutputDim(framework::GradVarName("Emission"), emission_exps_dims); if (ctx->HasInput("Length") == false) { ctx->ShareLoD("Emission", framework::GradVarName("Emission")); } } if (ctx->HasOutput(framework::GradVarName("Transition"))) { ctx->SetOutputDim(framework::GradVarName("Transition"), transition_exps_dims); ctx->ShareLoD("Transition", framework::GradVarName("Transition")); } } protected: // Explicitly set that the data type of output of the linear_chain_crf_grad // operator is determined by its input: gradients of LogLikelihood. framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { return framework::OpKernelType( OperatorWithKernel::IndicateVarDataType( ctx, framework::GradVarName("LogLikelihood")), platform::CPUPlace()); } }; class LinearChainCRFGradDescMaker : public framework::SingleGradOpDescMaker { public: using framework::SingleGradOpDescMaker::SingleGradOpDescMaker; protected: std::unique_ptr<framework::OpDesc> Apply() const override { std::unique_ptr<framework::OpDesc> op(new framework::OpDesc()); op->SetType("linear_chain_crf_grad"); op->SetAttrMap(Attrs()); op->SetInput("Emission", Input("Emission")); op->SetInput("Transition", Input("Transition")); op->SetInput("Label", Input("Label")); op->SetInput("Alpha", Output("Alpha")); op->SetInput("EmissionExps", Output("EmissionExps")); op->SetInput("TransitionExps", Output("TransitionExps")); if (ForwardOp().Inputs().count("Length") > 0) { op->SetInput("Length", Input("Length")); } op->SetInput(framework::GradVarName("LogLikelihood"), OutputGrad("LogLikelihood")); op->SetOutput(framework::GradVarName("Emission"), InputGrad("Emission")); op->SetOutput(framework::GradVarName("Transition"), InputGrad("Transition")); return op; } }; DECLARE_NO_NEED_BUFFER_VARS_INFERENCE( LinearChainCRFGradNoNeedBufferVarsInference, "Transition", "Emission"); } // namespace operators } // namespace paddle namespace ops = paddle::operators; REGISTER_OPERATOR(linear_chain_crf, ops::LinearChainCRFOp, ops::LinearChainCRFOpMaker, ops::LinearChainCRFGradDescMaker); REGISTER_OPERATOR(linear_chain_crf_grad, ops::LinearChainCRFGradOp, ops::LinearChainCRFGradNoNeedBufferVarsInference); REGISTER_OP_CPU_KERNEL( linear_chain_crf, ops::LinearChainCRFOpKernel<paddle::platform::CPUDeviceContext, float>, ops::LinearChainCRFOpKernel<paddle::platform::CPUDeviceContext, double>); REGISTER_OP_CPU_KERNEL( linear_chain_crf_grad, ops::LinearChainCRFGradOpKernel<paddle::platform::CPUDeviceContext, float>, ops::LinearChainCRFGradOpKernel<paddle::platform::CPUDeviceContext, double>);
chengduoZH/Paddle
paddle/fluid/operators/linear_chain_crf_op.cc
C++
apache-2.0
14,511
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2355, 20890, 15455, 10362, 6048, 1012, 2035, 2916, 9235, 1012, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 2017, 2089, 2025, 2224, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/renderer/media/android/stream_texture_factory_synchronous_impl.h" #include <algorithm> #include "base/bind.h" #include "base/callback.h" #include "base/location.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop_proxy.h" #include "base/process/process.h" #include "base/synchronization/lock.h" #include "cc/output/context_provider.h" #include "content/common/android/surface_texture_peer.h" #include "content/renderer/render_thread_impl.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "ui/gl/android/surface_texture.h" using gpu::gles2::GLES2Interface; namespace content { namespace { class StreamTextureProxyImpl : public StreamTextureProxy, public base::SupportsWeakPtr<StreamTextureProxyImpl> { public: explicit StreamTextureProxyImpl( StreamTextureFactorySynchronousImpl::ContextProvider* provider); virtual ~StreamTextureProxyImpl(); // StreamTextureProxy implementation: virtual void BindToCurrentThread(int32 stream_id) OVERRIDE; virtual void SetClient(cc::VideoFrameProvider::Client* client) OVERRIDE; virtual void Release() OVERRIDE; private: void OnFrameAvailable(); scoped_refptr<base::MessageLoopProxy> loop_; base::Lock client_lock_; cc::VideoFrameProvider::Client* client_; base::Closure callback_; scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> context_provider_; scoped_refptr<gfx::SurfaceTexture> surface_texture_; float current_matrix_[16]; bool has_updated_; DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureProxyImpl); }; StreamTextureProxyImpl::StreamTextureProxyImpl( StreamTextureFactorySynchronousImpl::ContextProvider* provider) : context_provider_(provider), has_updated_(false) { std::fill(current_matrix_, current_matrix_ + 16, 0); } StreamTextureProxyImpl::~StreamTextureProxyImpl() {} void StreamTextureProxyImpl::Release() { SetClient(NULL); if (loop_.get() && !loop_->BelongsToCurrentThread()) loop_->DeleteSoon(FROM_HERE, this); else delete this; } void StreamTextureProxyImpl::SetClient(cc::VideoFrameProvider::Client* client) { base::AutoLock lock(client_lock_); client_ = client; } void StreamTextureProxyImpl::BindToCurrentThread(int stream_id) { loop_ = base::MessageLoopProxy::current(); surface_texture_ = context_provider_->GetSurfaceTexture(stream_id); if (!surface_texture_) { LOG(ERROR) << "Failed to get SurfaceTexture for stream."; return; } callback_ = base::Bind(&StreamTextureProxyImpl::OnFrameAvailable, AsWeakPtr()); surface_texture_->SetFrameAvailableCallback(callback_); } void StreamTextureProxyImpl::OnFrameAvailable() { // GetTransformMatrix only returns something valid after both is true: // - OnFrameAvailable was called // - we called UpdateTexImage if (has_updated_) { float matrix[16]; surface_texture_->GetTransformMatrix(matrix); if (memcmp(current_matrix_, matrix, sizeof(matrix)) != 0) { memcpy(current_matrix_, matrix, sizeof(matrix)); base::AutoLock lock(client_lock_); if (client_) client_->DidUpdateMatrix(current_matrix_); } } // OnFrameAvailable being called a second time implies that we called // updateTexImage since after we received the first frame. has_updated_ = true; base::AutoLock lock(client_lock_); if (client_) client_->DidReceiveFrame(); } } // namespace // static scoped_refptr<StreamTextureFactorySynchronousImpl> StreamTextureFactorySynchronousImpl::Create( const CreateContextProviderCallback& try_create_callback, int frame_id) { return new StreamTextureFactorySynchronousImpl(try_create_callback, frame_id); } StreamTextureFactorySynchronousImpl::StreamTextureFactorySynchronousImpl( const CreateContextProviderCallback& try_create_callback, int frame_id) : create_context_provider_callback_(try_create_callback), context_provider_(create_context_provider_callback_.Run()), frame_id_(frame_id) {} StreamTextureFactorySynchronousImpl::~StreamTextureFactorySynchronousImpl() {} StreamTextureProxy* StreamTextureFactorySynchronousImpl::CreateProxy() { if (!context_provider_) context_provider_ = create_context_provider_callback_.Run(); if (!context_provider_) return NULL; return new StreamTextureProxyImpl(context_provider_); } void StreamTextureFactorySynchronousImpl::EstablishPeer(int32 stream_id, int player_id) { DCHECK(context_provider_); scoped_refptr<gfx::SurfaceTexture> surface_texture = context_provider_->GetSurfaceTexture(stream_id); if (surface_texture) { SurfaceTexturePeer::GetInstance()->EstablishSurfaceTexturePeer( base::Process::Current().handle(), surface_texture, frame_id_, player_id); } } unsigned StreamTextureFactorySynchronousImpl::CreateStreamTexture( unsigned texture_target, unsigned* texture_id, gpu::Mailbox* texture_mailbox) { DCHECK(context_provider_); unsigned stream_id = 0; GLES2Interface* gl = context_provider_->ContextGL(); gl->GenTextures(1, texture_id); stream_id = gl->CreateStreamTextureCHROMIUM(*texture_id); gl->GenMailboxCHROMIUM(texture_mailbox->name); gl->BindTexture(texture_target, *texture_id); gl->ProduceTextureCHROMIUM(texture_target, texture_mailbox->name); return stream_id; } void StreamTextureFactorySynchronousImpl::SetStreamTextureSize( int32 stream_id, const gfx::Size& size) {} gpu::gles2::GLES2Interface* StreamTextureFactorySynchronousImpl::ContextGL() { DCHECK(context_provider_); return context_provider_->ContextGL(); } } // namespace content
chromium2014/src
content/renderer/media/android/stream_texture_factory_synchronous_impl.cc
C++
bsd-3-clause
5,856
[ 30522, 1013, 1013, 9385, 2297, 1996, 10381, 21716, 5007, 6048, 1012, 2035, 2916, 9235, 1012, 1013, 1013, 2224, 1997, 2023, 3120, 3642, 2003, 9950, 2011, 1037, 18667, 2094, 1011, 2806, 6105, 2008, 2064, 2022, 1013, 1013, 2179, 1999, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
DELETE FROM `weenie` WHERE `class_Id` = 5173; INSERT INTO `weenie` (`class_Id`, `class_Name`, `type`, `last_Modified`) VALUES (5173, 'letterthanksnasun', 8, '2019-02-10 00:00:00') /* Book */; INSERT INTO `weenie_properties_int` (`object_Id`, `type`, `value`) VALUES (5173, 1, 8192) /* ItemType - Writable */ , (5173, 5, 25) /* EncumbranceVal */ , (5173, 16, 8) /* ItemUseable - Contained */ , (5173, 19, 0) /* Value */ , (5173, 93, 1044) /* PhysicsState - Ethereal, IgnoreCollisions, Gravity */ , (5173, 8041, 101) /* PCAPRecordedPlacement - Resting */ , (5173, 8042, 1) /* PCAPRecordedAppraisalPages */ , (5173, 8043, 1) /* PCAPRecordedAppraisalMaxPages */; INSERT INTO `weenie_properties_float` (`object_Id`, `type`, `value`) VALUES (5173, 54, 1) /* UseRadius */; INSERT INTO `weenie_properties_string` (`object_Id`, `type`, `value`) VALUES (5173, 1, 'Thank You Note') /* Name */ , (5173, 16, 'A note from Mara al Luq outside Yaraq, for delivery to Nasur ibn Tifar in the North Yaraq Outpost.') /* LongDesc */; INSERT INTO `weenie_properties_d_i_d` (`object_Id`, `type`, `value`) VALUES (5173, 1, 33554773) /* Setup */ , (5173, 3, 536870932) /* SoundTable */ , (5173, 8, 100668176) /* Icon */ , (5173, 22, 872415275) /* PhysicsEffectTable */ , (5173, 8001, 2113584) /* PCAPRecordedWeenieHeader - Usable, UseRadius, Container, Burden */ , (5173, 8003, 272) /* PCAPRecordedObjectDesc - Attackable, Book */ , (5173, 8005, 137217) /* PCAPRecordedPhysicsDesc - CSetup, STable, PeTable, AnimationFrame */; INSERT INTO `weenie_properties_i_i_d` (`object_Id`, `type`, `value`) VALUES (5173, 8000, 3705510181) /* PCAPRecordedObjectIID */;
LtRipley36706/ACE-World
Database/3-Core/9 WeenieDefaults/SQL/Book/Writable/05173 Thank You Note.sql
SQL
agpl-3.0
1,814
[ 30522, 3972, 12870, 2013, 1036, 16776, 8034, 1036, 2073, 1036, 2465, 1035, 8909, 1036, 1027, 4868, 2581, 2509, 1025, 19274, 2046, 1036, 16776, 8034, 1036, 1006, 1036, 2465, 1035, 8909, 1036, 1010, 1036, 2465, 1035, 2171, 1036, 1010, 1036, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
global.SETTINGS = require('./settings'); global.log = require('./lib/log'); let app = require('./lib/server'); app.listen(SETTINGS.PORT, () => { log.info(`#server Listening on port ${SETTINGS.PORT}`); });
sgmonda/api-koa
index.js
JavaScript
mit
208
[ 30522, 3795, 1012, 10906, 1027, 5478, 1006, 1005, 1012, 1013, 10906, 1005, 1007, 1025, 3795, 1012, 8833, 1027, 5478, 1006, 1005, 1012, 1013, 5622, 2497, 1013, 8833, 1005, 1007, 1025, 2292, 10439, 1027, 5478, 1006, 1005, 1012, 1013, 5622, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include "../../../src/devicehosting/controlpoint/hcontrolpoint_configuration.h"
centic9/digikam-ppa
extra/kipi-plugins/dlnaexport/extra/hupnp/include/HUpnpCore/public/hcontrolpoint_configuration.h
C
gpl-2.0
81
[ 30522, 1001, 2421, 1000, 1012, 1012, 1013, 1012, 1012, 1013, 1012, 1012, 1013, 5034, 2278, 1013, 5080, 15006, 3436, 1013, 2491, 8400, 1013, 16731, 12162, 13153, 8400, 1035, 9563, 1012, 1044, 1000, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.oracle.graal.nodes.java; import com.oracle.graal.api.meta.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; /** * The {@code StoreIndexedNode} represents a write to an array element. */ public final class StoreIndexedNode extends AccessIndexedNode implements StateSplit, Lowerable, Virtualizable { @Input private ValueNode value; @Input(notDataflow = true) private FrameState stateAfter; public FrameState stateAfter() { return stateAfter; } public void setStateAfter(FrameState x) { assert x == null || x.isAlive() : "frame state must be in a graph"; updateUsages(stateAfter, x); stateAfter = x; } public boolean hasSideEffect() { return true; } public ValueNode value() { return value; } /** * Creates a new StoreIndexedNode. * * @param array the node producing the array * @param index the node producing the index * @param elementKind the element type * @param value the value to store into the array */ public StoreIndexedNode(ValueNode array, ValueNode index, Kind elementKind, ValueNode value) { super(StampFactory.forVoid(), array, index, elementKind); this.value = value; } @Override public void virtualize(VirtualizerTool tool) { State arrayState = tool.getObjectState(array()); if (arrayState != null && arrayState.getState() == EscapeState.Virtual) { ValueNode indexValue = tool.getReplacedValue(index()); int index = indexValue.isConstant() ? indexValue.asConstant().asInt() : -1; if (index >= 0 && index < arrayState.getVirtualObject().entryCount()) { ResolvedJavaType componentType = arrayState.getVirtualObject().type().getComponentType(); if (componentType.isPrimitive() || value.objectStamp().alwaysNull() || (value.objectStamp().type() != null && componentType.isAssignableFrom(value.objectStamp().type()))) { tool.setVirtualEntry(arrayState, index, value()); tool.delete(); } } } } }
rjsingh/graal
graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java
Java
gpl-2.0
3,269
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2268, 1010, 2249, 1010, 14721, 1998, 1013, 2030, 2049, 18460, 1012, 2035, 2916, 9235, 1012, 1008, 2079, 2025, 11477, 2030, 6366, 9385, 14444, 2030, 2023, 5371, 20346, 1012, 1008, 1008, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package fr.guiguilechat.jcelechat.model.sde.attributes; import fr.guiguilechat.jcelechat.model.sde.IntAttribute; /** * */ public class MiningDurationRoleBonus extends IntAttribute { public static final MiningDurationRoleBonus INSTANCE = new MiningDurationRoleBonus(); @Override public int getId() { return 2458; } @Override public int getCatId() { return 7; } @Override public boolean getHighIsGood() { return false; } @Override public double getDefaultValue() { return 0.0; } @Override public boolean getPublished() { return true; } @Override public boolean getStackable() { return true; } @Override public String toString() { return "MiningDurationRoleBonus"; } }
guiguilechat/EveOnline
model/sde/SDE-Types/src/generated/java/fr/guiguilechat/jcelechat/model/sde/attributes/MiningDurationRoleBonus.java
Java
gpl-3.0
830
[ 30522, 7427, 10424, 1012, 26458, 25698, 2571, 7507, 2102, 1012, 29175, 12260, 7507, 2102, 1012, 30524, 12332, 1025, 12324, 10424, 1012, 26458, 25698, 2571, 7507, 2102, 1012, 29175, 12260, 7507, 2102, 1012, 2944, 1012, 17371, 2063, 1012, 20014...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (C) 2018 Nagisa Sekiguchi * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "json.h" // helper macro definition. #define RET(k) \ do { \ kind = JSONTokenKind::k; \ goto END; \ } while (false) #define REACH_EOS() \ do { \ if (this->isEnd()) { \ goto EOS; \ } else { \ ERROR(); \ } \ } while (false) #define UPDATE_LN() this->updateNewline(startPos) #define SKIP() goto INIT #define ERROR() \ do { \ RET(INVALID); \ } while (false) namespace ydsh::json { JSONTokenKind JSONLexer::nextToken(Token &token) { /*!re2c re2c:define:YYCTYPE = "unsigned char"; re2c:define:YYCURSOR = this->cursor; re2c:define:YYLIMIT = this->limit; re2c:define:YYMARKER = this->marker; re2c:define:YYCTXMARKER = this->ctxMarker; re2c:define:YYFILL:naked = 1; re2c:define:YYFILL@len = #; re2c:define:YYFILL = "if(!this->fill(#)) { REACH_EOS(); }"; re2c:yyfill:enable = 0; re2c:indent:top = 1; re2c:indent:string = " "; INT = "0" | [1-9] [0-9]*; FRAC = "." [0-9]+; EXP = [eE] [+-] [0-9]+; UNESCAPED = [\x20\x21\x23-\x5B\x5D-\U0010FFFF]; HEX = [0-9a-fA-F]; CHAR = UNESCAPED | "\\" ( ["\\/bfnrt] | "u" HEX{4} ); */ INIT: unsigned int startPos = this->getPos(); JSONTokenKind kind = JSONTokenKind::INVALID; /*!re2c "true" { RET(TRUE); } "false" { RET(FALSE); } "null" { RET(NIL); } "-"? INT FRAC? EXP? { RET(NUMBER); } ["] CHAR* ["] { RET(STRING); } "[" { RET(ARRAY_OPEN); } "]" { RET(ARRAY_CLOSE); } "{" { RET(OBJECT_OPEN); } "}" { RET(OBJECT_CLOSE); } "," { RET(COMMA); } ":" { RET(COLON); } [ \t\r\n]+ { UPDATE_LN(); SKIP(); } "\000" { REACH_EOS(); } * { RET(INVALID); } */ END: token.pos = startPos; token.size = this->getPos() - startPos; return kind; EOS: token.pos = this->getUsedSize(); token.size = 0; this->cursor--; return JSONTokenKind::EOS; } } // namespace ydsh::json
sekiguchi-nagisa/ydsh
tools/json/lexer.re2c.cpp
C++
apache-2.0
3,899
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2760, 6583, 17701, 2050, 7367, 3211, 16918, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1008, 2017, 2089, 2025, 2224, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (C) 2018 the original author or authors. * * This file is part of jBB Application Project. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 */ package org.jbb.security.rest.oauth.client; import io.swagger.annotations.ApiModel; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @Builder @ApiModel("OAuthClientSecret") @NoArgsConstructor(access = AccessLevel.PUBLIC) @AllArgsConstructor(access = AccessLevel.PRIVATE) public class ClientSecretDto { private String clientSecret; }
jbb-project/jbb
domain-rest/jbb-security-rest/src/main/java/org/jbb/security/rest/oauth/client/ClientSecretDto.java
Java
apache-2.0
751
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2760, 1996, 2434, 3166, 2030, 6048, 1012, 1008, 1008, 2023, 5371, 2003, 2112, 1997, 1046, 10322, 4646, 2622, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * ams-iaq-core.c - Support for AMS iAQ-Core VOC sensors * * Copyright (C) 2015 Matt Ranostay <mranostay@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include <linux/module.h> #include <linux/mutex.h> #include <linux/init.h> #include <linux/i2c.h> #include <linux/iio/iio.h> #define AMS_IAQCORE_DATA_SIZE 9 #define AMS_IAQCORE_VOC_CO2_IDX 0 #define AMS_IAQCORE_VOC_RESISTANCE_IDX 1 #define AMS_IAQCORE_VOC_TVOC_IDX 2 struct ams_iaqcore_reading { __be16 co2_ppm; u8 status; __be32 resistance; __be16 voc_ppb; } __attribute__((__packed__)); struct ams_iaqcore_data { struct i2c_client *client; struct mutex lock; unsigned long last_update; struct ams_iaqcore_reading buffer; }; static const struct iio_chan_spec ams_iaqcore_channels[] = { { .type = IIO_CONCENTRATION, .channel2 = IIO_MOD_CO2, .modified = 1, .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), .address = AMS_IAQCORE_VOC_CO2_IDX, }, { .type = IIO_RESISTANCE, .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), .address = AMS_IAQCORE_VOC_RESISTANCE_IDX, }, { .type = IIO_CONCENTRATION, .channel2 = IIO_MOD_VOC, .modified = 1, .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), .address = AMS_IAQCORE_VOC_TVOC_IDX, }, }; static int ams_iaqcore_read_measurement(struct ams_iaqcore_data *data) { struct i2c_client *client = data->client; int ret; struct i2c_msg msg = { .addr = client->addr, .flags = client->flags | I2C_M_RD, .len = AMS_IAQCORE_DATA_SIZE, .buf = (char *) &data->buffer, }; ret = i2c_transfer(client->adapter, &msg, 1); return (ret == AMS_IAQCORE_DATA_SIZE) ? 0 : ret; } static int ams_iaqcore_get_measurement(struct ams_iaqcore_data *data) { int ret; /* sensor can only be polled once a second max per datasheet */ if (!time_after(jiffies, data->last_update + HZ)) { return 0; } ret = ams_iaqcore_read_measurement(data); if (ret < 0) { return ret; } data->last_update = jiffies; return 0; } static int ams_iaqcore_read_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int *val, int *val2, long mask) { struct ams_iaqcore_data *data = iio_priv(indio_dev); int ret; if (mask != IIO_CHAN_INFO_PROCESSED) { return -EINVAL; } mutex_lock(&data->lock); ret = ams_iaqcore_get_measurement(data); if (ret) { goto err_out; } switch (chan->address) { case AMS_IAQCORE_VOC_CO2_IDX: *val = 0; *val2 = be16_to_cpu(data->buffer.co2_ppm); ret = IIO_VAL_INT_PLUS_MICRO; break; case AMS_IAQCORE_VOC_RESISTANCE_IDX: *val = be32_to_cpu(data->buffer.resistance); ret = IIO_VAL_INT; break; case AMS_IAQCORE_VOC_TVOC_IDX: *val = 0; *val2 = be16_to_cpu(data->buffer.voc_ppb); ret = IIO_VAL_INT_PLUS_NANO; break; default: ret = -EINVAL; } err_out: mutex_unlock(&data->lock); return ret; } static const struct iio_info ams_iaqcore_info = { .read_raw = ams_iaqcore_read_raw, .driver_module = THIS_MODULE, }; static int ams_iaqcore_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct iio_dev *indio_dev; struct ams_iaqcore_data *data; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); if (!indio_dev) { return -ENOMEM; } data = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); data->client = client; /* so initial reading will complete */ data->last_update = jiffies - HZ; mutex_init(&data->lock); indio_dev->dev.parent = &client->dev; indio_dev->info = &ams_iaqcore_info, indio_dev->name = dev_name(&client->dev); indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->channels = ams_iaqcore_channels; indio_dev->num_channels = ARRAY_SIZE(ams_iaqcore_channels); return devm_iio_device_register(&client->dev, indio_dev); } static const struct i2c_device_id ams_iaqcore_id[] = { { "ams-iaq-core", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, ams_iaqcore_id); static const struct of_device_id ams_iaqcore_dt_ids[] = { { .compatible = "ams,iaq-core" }, { } }; MODULE_DEVICE_TABLE(of, ams_iaqcore_dt_ids); static struct i2c_driver ams_iaqcore_driver = { .driver = { .name = "ams-iaq-core", .of_match_table = of_match_ptr(ams_iaqcore_dt_ids), }, .probe = ams_iaqcore_probe, .id_table = ams_iaqcore_id, }; module_i2c_driver(ams_iaqcore_driver); MODULE_AUTHOR("Matt Ranostay <mranostay@gmail.com>"); MODULE_DESCRIPTION("AMS iAQ-Core VOC sensors"); MODULE_LICENSE("GPL v2");
williamfdevine/PrettyLinux
drivers/iio/chemical/ams-iaq-core.c
C
gpl-3.0
4,887
[ 30522, 1013, 1008, 1008, 2572, 2015, 1011, 24264, 4160, 1011, 4563, 1012, 1039, 1011, 2490, 2005, 2572, 2015, 24264, 4160, 1011, 4563, 29536, 2278, 13907, 1008, 1008, 9385, 1006, 1039, 1007, 2325, 4717, 2743, 28696, 2100, 1026, 2720, 6761, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Converted from: ../../examples/obj/torus/Torus.obj // vertices: 576 // faces: 576 // materials: 1 // // Generated with OBJ -> Three.js converter // http://github.com/alteredq/three.js/blob/master/utils/exporters/convert_obj_three.py var model = { "version" : 1, "materials": [ { "DbgColor" : 15658734, "DbgIndex" : 0, "DbgName" : "(null)" }], "buffers": "Torus_bin.bin" }; postMessage( model ); close();
pushmatrix/three.js
examples/obj/torus/Torus_bin.js
JavaScript
mit
464
[ 30522, 1013, 1013, 4991, 2013, 1024, 1012, 1012, 1013, 1012, 1012, 1013, 4973, 1013, 27885, 3501, 1013, 17153, 2271, 1013, 17153, 2271, 1012, 27885, 3501, 1013, 1013, 18984, 1024, 5401, 2575, 1013, 1013, 5344, 1024, 5401, 2575, 1013, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package ec2 import ( "encoding/base64" "encoding/xml" "fmt" "net/url" "strconv" "strings" "github.com/dynport/gocloud/aws" ) func NewFromEnv() *Client { return &Client{ aws.NewFromEnv(), } } type Client struct { *aws.Client } func (client *Client) Endpoint() string { prefix := "https://" if client.Client.Region != "" { prefix += client.Client.Region + "." } return prefix + "ec2.amazonaws.com" } const ( API_VERSIONS_EC2 = "2013-08-15" CANONICAL_OWNER_ID = "099720109477" SELF_OWNER_ID = "self" UBUNTU_ALL = "ubuntu/images/*" UBUNTU_PREFIX = "ubuntu-*" UBUNTU_RARING_PREFIX = "ubuntu-raring*" UBUNTU_TRUSTY_PREFIX = "ubuntu-trusty*" UBUNTU_SAUCY_PREFIX = "ubuntu-saucy*" ImagePrefixRaringAmd64 = "ubuntu-raring-13.04-amd64*" ) type ImageFilter struct { Owner string Name string ImageIds []string } type ImageList []*Image type InstanceList []*Instance func (list ImageList) Len() int { return len(list) } func (list ImageList) Swap(a, b int) { list[a], list[b] = list[b], list[a] } func (list ImageList) Less(a, b int) bool { return list[a].Name > list[b].Name } type RunInstancesConfig struct { ImageId string `json:",omitempty"` MinCount int `json:",omitempty"` MaxCount int `json:",omitempty"` InstanceType string `json:",omitempty"` AvailabilityZone string `json:",omitempty"` KeyName string `json:",omitempty"` SecurityGroups []string `json:",omitempty"` SubnetId string `json:",omitempty"` NetworkInterfaces []*CreateNetworkInterface `json:",omitempty"` BlockDeviceMappings []*BlockDeviceMapping `json:",omitempty"` UserData string `json:",omitempty"` IamInstanceProfileName string `json:",omitempty"` EbsOptimized bool `json:",omitempty"` } func (config *RunInstancesConfig) Values() (url.Values, error) { values := url.Values{} if config.MinCount == 0 { config.MinCount = 1 } if config.MaxCount == 0 { config.MaxCount = 1 } if config.ImageId == "" { return nil, fmt.Errorf("ImageId must be provided") } values.Add("MinCount", strconv.Itoa(config.MinCount)) values.Add("MaxCount", strconv.Itoa(config.MaxCount)) values.Add("ImageId", config.ImageId) if config.EbsOptimized { values.Add("EbsOptimized", "true") } if config.UserData != "" { values.Add("UserData", b64.EncodeToString([]byte(config.UserData))) } if config.IamInstanceProfileName != "" { values.Add("IamInstanceProfile.Name", config.IamInstanceProfileName) } if config.InstanceType != "" { values.Add("InstanceType", config.InstanceType) } if config.KeyName != "" { values.Add("KeyName", config.KeyName) } if config.AvailabilityZone != "" { values.Add("Placement.AvailabilityZone", config.AvailabilityZone) } if len(config.NetworkInterfaces) > 0 { for i, nic := range config.NetworkInterfaces { idx := strconv.Itoa(i) values.Add("NetworkInterface."+idx+".DeviceIndex", idx) values.Add("NetworkInterface."+idx+".AssociatePublicIpAddress", "true") values.Add("NetworkInterface."+idx+".SubnetId", nic.SubnetId) for i, sg := range nic.SecurityGroupIds { values.Add("NetworkInterface."+idx+".SecurityGroupId."+strconv.Itoa(i), sg) } } } else { for i, sg := range config.SecurityGroups { values.Add("SecurityGroupId."+strconv.Itoa(i+1), sg) } values.Add("SubnetId", config.SubnetId) } for i, bdm := range config.BlockDeviceMappings { prefix := fmt.Sprintf("BlockDeviceMapping.%d", i) if bdm.DeviceName == "" { return nil, fmt.Errorf("DeviceName must be set for all BlockDeviceMappings") } values.Add(prefix+".DeviceName", bdm.DeviceName) if ebs := bdm.Ebs; ebs != nil { prefix := prefix + ".Ebs" if ebs.VolumeSize > 0 { values.Add(prefix+".VolumeSize", strconv.Itoa(ebs.VolumeSize)) } if ebs.Iops > 0 { values.Add(prefix+".Iops", strconv.Itoa(ebs.Iops)) } if ebs.DeleteOnTermination { values.Add(prefix+".DeleteOnTermination", "true") } if ebs.Encrypted { values.Add(prefix+".Encrypted", "true") } if ebs.SnapshotId != "" { values.Add(prefix+".SnapshotId", ebs.SnapshotId) } if ebs.VolumeType != "" { values.Add(prefix+".VolumeType", ebs.VolumeType) } } } return values, nil } func (config *RunInstancesConfig) AddPublicIp() error { if config.SubnetId == "" { return fmt.Errorf("SubnetId must be set") } nic := &CreateNetworkInterface{ DeviceIndex: len(config.NetworkInterfaces), AssociatePublicIpAddress: true, SubnetId: config.SubnetId, SecurityGroupIds: config.SecurityGroups, } config.NetworkInterfaces = []*CreateNetworkInterface{nic} return nil } func queryForAction(action string) string { values := &url.Values{} values.Add("Version", API_VERSIONS_EC2) values.Add("Action", action) return values.Encode() } func (client *Client) DescribeTags() (tags TagList, e error) { query := queryForAction("DescribeTags") raw, e := client.DoSignedRequest("GET", client.Endpoint(), query, nil) if e != nil { return tags, e } rsp := &DescribeTagsResponse{} e = xml.Unmarshal(raw.Content, rsp) if e != nil { return tags, e } return rsp.Tags, e } func (client *Client) CreateTags(resourceIds []string, tags map[string]string) error { values := &url.Values{} for i, id := range resourceIds { values.Add("ResourceId."+strconv.Itoa(i), id) } tagsCount := 1 for k, v := range tags { prefix := fmt.Sprintf("Tag.%d.", tagsCount) values.Add(prefix+"Key", k) values.Add(prefix+"Value", v) tagsCount++ } query := queryForAction("CreateTags") + "&" + values.Encode() _, e := client.DoSignedRequest("POST", client.Endpoint(), query, nil) if e != nil { return e } return nil } func (client *Client) TerminateInstances(ids []string) (*aws.Response, error) { query := queryForAction("TerminateInstances") for i, id := range ids { query += fmt.Sprintf("&InstanceId.%d=%s", i, id) } return client.DoSignedRequest("DELETE", client.Endpoint(), query, nil) } type Error struct { Code string `xml:"Code"` Message string `xml:"Message"` } type ErrorResponse struct { XMLName xml.Name `xml:"Response"` RequestID string `xml:"RequestID"` Errors []*Error `xml:"Errors>Error"` } func (er *ErrorResponse) ErrorStrings() string { out := []string{} for _, e := range er.Errors { out = append(out, fmt.Sprintf("%s: %s", e.Code, e.Message)) } return strings.Join(out, ", ") } type RunInstancesResponse struct { XMLName xml.Name `xml:"RunInstancesResponse"` RequestId string `xml:"requestId"` ReservationId string `xml:"reservationId"` OwnerId string `xml:"ownerId"` Instances []*Instance `xml:"instancesSet>item"` } var b64 = base64.StdEncoding func (client *Client) RunInstances(config *RunInstancesConfig) (list InstanceList, e error) { values, e := config.Values() if e != nil { return nil, e } query := queryForAction("RunInstances") + "&" + values.Encode() raw, e := client.DoSignedRequest("POST", client.Endpoint(), query, nil) if e != nil { return list, e } er := &ErrorResponse{} if e := xml.Unmarshal(raw.Content, er); e == nil { return nil, fmt.Errorf(er.ErrorStrings()) } rsp := &RunInstancesResponse{} e = xml.Unmarshal(raw.Content, rsp) if e != nil { return list, e } return InstanceList(rsp.Instances), nil } type DescribeInstancesOptions struct { InstanceIds []string Filters []*Filter } func (client *Client) DescribeInstancesWithOptions(options *DescribeInstancesOptions) (instances []*Instance, e error) { if options == nil { options = &DescribeInstancesOptions{} } values := url.Values{"Version": {API_VERSIONS_EC2}, "Action": {"DescribeInstances"}} if len(options.InstanceIds) > 0 { for i, id := range options.InstanceIds { values.Add("InstanceId."+strconv.Itoa(i+1), id) } } applyFilters(values, options.Filters) raw, e := client.DoSignedRequest("GET", client.Endpoint(), values.Encode(), nil) if e != nil { return instances, e } rsp := &DescribeInstancesResponse{} e = xml.Unmarshal(raw.Content, rsp) if e != nil { e = fmt.Errorf("%s: %s", e.Error(), string(raw.Content)) return instances, e } return rsp.Instances(), nil } func (client *Client) DescribeInstances() (instances []*Instance, e error) { return client.DescribeInstancesWithOptions(nil) }
dynport/gocloud
aws/ec2/client.go
GO
apache-2.0
8,627
[ 30522, 7427, 14925, 2475, 12324, 1006, 1000, 17181, 1013, 2918, 21084, 1000, 1000, 17181, 1013, 20950, 1000, 1000, 4718, 2102, 1000, 1000, 5658, 1013, 24471, 2140, 1000, 1000, 2358, 29566, 2078, 2615, 1000, 1000, 7817, 1000, 1000, 21025, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intel.mallet; import java.util.logging.Logger; import java.io.File; import java.io.IOException; public class TpcdsTool { private static final Logger logger = Logger.getLogger(TpcdsTool.class.getName()); public static String[] generateStreamSqlFile(int numberOfStreams) throws MalletException { Conf conf = Conf.getConf(); // Build cmd string // /*WORKAROUND*/ // String templateDirectory = conf.getBaseDirectory() + "/query_templates"; // It seems the dsqgen tool has problem with long path time, so workaround here is // that the tool is under the tool directory of the program base directory. String templateDirectory = "../query_templates"; if (conf.isQuickRunMode()) { templateDirectory += "/quickrun"; } String templateListFile = templateDirectory + "/templates.lst"; String outputDirectory = conf.getTempDirectory(); String cmd = "./dsqgen -INPUT " + templateListFile + " -DIRECTORY " + templateDirectory + " -OUTPUT_DIR " + outputDirectory + " -DIALECT hive -STREAMS " + numberOfStreams + " -SCALE " + conf.getScale(); if (conf.isSingleQueryMode()) { cmd += " -TEMPLATE query" + conf.getQueryId() + ".tpl"; } // Invoke the TPC-DS tool to generate queries from templates logger.info("Invoke TPC-DS tool to generate queries from templates:"); logger.info(" " + cmd); Process toolProcess; try { toolProcess = Runtime.getRuntime().exec(cmd, null, new File(conf.getTpcDsToolDirectory())); } catch (IOException e) { throw new MalletException("Failed to invoke TPC-DS tool.", e); } // Wait for the termination of the tool process try { toolProcess.waitFor(); } catch (InterruptedException e) { } // Check if the tool process has any error if(toolProcess.exitValue() != 0) { throw new MalletException("TPC-DS tool exited with error."); } // return the SQL file names for each stream String[] sqlFileNames = new String[numberOfStreams]; for(int i = 0; i < numberOfStreams; i++) { String sqlFileName = outputDirectory + "/query_" + i + ".sql"; sqlFileNames[i] = sqlFileName; // Make sure the file exists if (!(new File(sqlFileName)).exists()) { throw new MalletException("TPC-DS tool succeeded, but can't find " + sqlFileName); } } return sqlFileNames; } public static void generateRefreshDataSets() throws MalletException { Conf conf = Conf.getConf(); // TODO } }
wyg1990/Mallet
src/main/java/com/intel/mallet/TpcdsTool.java
Java
apache-2.0
3,375
[ 30522, 1013, 1008, 1008, 1008, 7000, 2000, 1996, 15895, 4007, 3192, 1006, 2004, 2546, 1007, 2104, 2028, 2030, 2062, 1008, 12130, 6105, 10540, 1012, 2156, 1996, 5060, 5371, 5500, 2007, 1008, 2023, 2147, 2005, 3176, 2592, 4953, 9385, 6095, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# -- # Copyright (C) 2001-2015 OTRS AG, http://otrs.com/ # -- # This software comes with ABSOLUTELY NO WARRANTY. For details, see # the enclosed file COPYING for license information (AGPL). If you # did not receive this file, see http://www.gnu.org/licenses/agpl.txt. # -- package Kernel::System::Web::Request; use strict; use warnings; use CGI (); use CGI::Carp; use File::Path qw(); our @ObjectDependencies = ( 'Kernel::Config', 'Kernel::System::CheckItem', 'Kernel::System::Encode', ); =head1 NAME Kernel::System::Web::Request - global CGI interface =head1 SYNOPSIS All cgi param functions. =head1 PUBLIC INTERFACE =over 4 =cut =item new() create param object. Do not use it directly, instead use: use Kernel::System::ObjectManager; local $Kernel::OM = Kernel::System::ObjectManager->new( 'Kernel::System::Web::Request' => { WebRequest => CGI::Fast->new(), # optional, e. g. if fast cgi is used } ); my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request'); If Kernel::System::Web::Request is instantiated several times, they will share the same CGI data (this can be helpful in filters which do not have access to the ParamObject, for example. If you need to reset the CGI data before creating a new instance, use CGI::initialize_globals(); before calling Kernel::System::Web::Request->new(); =cut sub new { my ( $Type, %Param ) = @_; # allocate new hash for object my $Self = {}; bless( $Self, $Type ); # get config object my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); # max 5 MB posts $CGI::POST_MAX = $ConfigObject->Get('WebMaxFileUpload') || 1024 * 1024 * 5; ## no critic # query object (in case use already existing WebRequest, e. g. fast cgi) $Self->{Query} = $Param{WebRequest} || CGI->new(); return $Self; } =item Error() to get the error back if ( $ParamObject->Error() ) { print STDERR $ParamObject->Error() . "\n"; } =cut sub Error { my ( $Self, %Param ) = @_; # Workaround, do not check cgi_error() with perlex, CGI module is not # working with perlex. if ( $ENV{'GATEWAY_INTERFACE'} && $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-PerlEx/ ) { return; } return if !$Self->{Query}->cgi_error(); ## no critic return $Self->{Query}->cgi_error() . ' - POST_MAX=' . ( $CGI::POST_MAX / 1024 ) . 'KB'; ## use critic } =item GetParam() to get single request parameters. By default, trimming is performed on the data. my $Param = $ParamObject->GetParam( Param => 'ID', Raw => 1, # optional, input data is not changed ); =cut sub GetParam { my ( $Self, %Param ) = @_; my $Value = $Self->{Query}->param( $Param{Param} ); # Fallback to query string for mixed requests. my $RequestMethod = $Self->{Query}->request_method() // ''; if ( $RequestMethod eq 'POST' && !defined $Value ) { $Value = $Self->{Query}->url_param( $Param{Param} ); } $Kernel::OM->Get('Kernel::System::Encode')->EncodeInput( \$Value ); my $Raw = defined $Param{Raw} ? $Param{Raw} : 0; if ( !$Raw ) { # If it is a plain string, perform trimming if ( ref \$Value eq 'SCALAR' ) { $Kernel::OM->Get('Kernel::System::CheckItem')->StringClean( StringRef => \$Value, TrimLeft => 1, TrimRight => 1, ); } } return $Value; } =item GetParamNames() to get names of all parameters passed to the script. my @ParamNames = $ParamObject->GetParamNames(); Example: Called URL: index.pl?Action=AdminSysConfig;Subaction=Save;Name=Config::Option::Valid my @ParamNames = $ParamObject->GetParamNames(); print join " :: ", @ParamNames; #prints Action :: Subaction :: Name =cut sub GetParamNames { my $Self = shift; # fetch all names my @ParamNames = $Self->{Query}->param(); # Fallback to query string for mixed requests. my $RequestMethod = $Self->{Query}->request_method() // ''; if ( $RequestMethod eq 'POST' ) { my %POSTNames; @POSTNames{@ParamNames} = @ParamNames; my @GetNames = $Self->{Query}->url_param(); GETNAME: for my $GetName (@GetNames) { next GETNAME if !defined $GetName; push @ParamNames, $GetName if !exists $POSTNames{$GetName}; } } for my $Name (@ParamNames) { $Kernel::OM->Get('Kernel::System::Encode')->EncodeInput( \$Name ); } return @ParamNames; } =item GetArray() to get array request parameters. By default, trimming is performed on the data. my @Param = $ParamObject->GetArray( Param => 'ID', Raw => 1, # optional, input data is not changed ); =cut sub GetArray { my ( $Self, %Param ) = @_; my @Values = $Self->{Query}->multi_param( $Param{Param} ); # Fallback to query string for mixed requests. my $RequestMethod = $Self->{Query}->request_method() // ''; if ( $RequestMethod eq 'POST' && !@Values ) { @Values = $Self->{Query}->url_param( $Param{Param} ); } $Kernel::OM->Get('Kernel::System::Encode')->EncodeInput( \@Values ); my $Raw = defined $Param{Raw} ? $Param{Raw} : 0; if ( !$Raw ) { # get check item object my $CheckItemObject = $Kernel::OM->Get('Kernel::System::CheckItem'); for my $Value (@Values) { $CheckItemObject->StringClean( StringRef => \$Value, TrimLeft => 1, TrimRight => 1, ); } } return @Values; } =item GetUploadAll() gets file upload data. my %File = $ParamObject->GetUploadAll( Param => 'FileParam', # the name of the request parameter containing the file data ); returns ( Filename => 'abc.txt', ContentType => 'text/plain', Content => 'Some text', ); =cut sub GetUploadAll { my ( $Self, %Param ) = @_; # get upload my $Upload = $Self->{Query}->upload( $Param{Param} ); return if !$Upload; # get real file name my $UploadFilenameOrig = $Self->GetParam( Param => $Param{Param} ) || 'unkown'; my $NewFileName = "$UploadFilenameOrig"; # use "" to get filename of anony. object $Kernel::OM->Get('Kernel::System::Encode')->EncodeInput( \$NewFileName ); # replace all devices like c: or d: and dirs for IE! $NewFileName =~ s/.:\\(.*)/$1/g; $NewFileName =~ s/.*\\(.+?)/$1/g; # return a string my $Content; while (<$Upload>) { $Content .= $_; } close $Upload; # Check if content is there, IE is always sending file uploads without content. return if !$Content; my $ContentType = $Self->_GetUploadInfo( Filename => $UploadFilenameOrig, Header => 'Content-Type', ); return ( Filename => $NewFileName, Content => $Content, ContentType => $ContentType, ); } sub _GetUploadInfo { my ( $Self, %Param ) = @_; # get file upload info my $FileInfo = $Self->{Query}->uploadInfo( $Param{Filename} ); # return if no upload info exists return 'application/octet-stream' if !$FileInfo; # return if no content type of upload info exists return 'application/octet-stream' if !$FileInfo->{ $Param{Header} }; # return content type of upload info return $FileInfo->{ $Param{Header} }; } =item SetCookie() set a cookie $ParamObject->SetCookie( Key => ID, Value => 123456, Expires => '+3660s', Path => 'otrs/', # optional, only allow cookie for given path Secure => 1, # optional, set secure attribute to disable cookie on HTTP (HTTPS only) HTTPOnly => 1, # optional, sets HttpOnly attribute of cookie to prevent access via JavaScript ); =cut sub SetCookie { my ( $Self, %Param ) = @_; $Param{Path} ||= ''; return $Self->{Query}->cookie( -name => $Param{Key}, -value => $Param{Value}, -expires => $Param{Expires}, -secure => $Param{Secure} || '', -httponly => $Param{HTTPOnly} || '', -path => '/' . $Param{Path}, ); } =item GetCookie() get a cookie my $String = $ParamObject->GetCookie( Key => ID, ); =cut sub GetCookie { my ( $Self, %Param ) = @_; return $Self->{Query}->cookie( $Param{Key} ); } =item IsAJAXRequest() checks if the current request was sent by AJAX my $IsAJAXRequest = $ParamObject->IsAJAXRequest(); =cut sub IsAJAXRequest { my ( $Self, %Param ) = @_; return ( $Self->{Query}->http('X-Requested-With') // '' ) eq 'XMLHttpRequest' ? 1 : 0; } 1; =back =head1 TERMS AND CONDITIONS This software is part of the OTRS project (L<http://otrs.org/>). This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (AGPL). If you did not receive this file, see L<http://www.gnu.org/licenses/agpl.txt>. =cut
brandonshults01/otrs
Kernel/System/Web/Request.pm
Perl
agpl-3.0
9,078
[ 30522, 1001, 1011, 1011, 1001, 9385, 1006, 1039, 1007, 2541, 1011, 2325, 27178, 2869, 12943, 1010, 8299, 1024, 1013, 1013, 27178, 2869, 1012, 4012, 1013, 1001, 1011, 1011, 1001, 2023, 4007, 3310, 2007, 7078, 2053, 10943, 2100, 1012, 2005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright © gaosong * * This program and the accompanying materials are licensed under * the terms of the GNU Lesser General Public License version 3.0 * as published by the Free Software Foundation. */ package org.gsimple.common.tuple; /** * Quintet tuple * * @param <A> * First value of Quintet * @param <B> * Second value of Quintet * @param <C> * Third value of Quintet * @param <D> * Forth value of Quintet * @param <E> * Fifth value of Quintet * * @author gaosong * */ public class Quintet<A, B, C, D, E> extends Quartet<A, B, C, D> { private static final long serialVersionUID = 7659362806794841460L; protected E value4; public Quintet(A val0, B val1, C val2, D val3, E val4) { super(val0, val1, val2, val3); value4 = val4; } public E getValue4() { return value4; } public void setValue4(E value4) { this.value4 = value4; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((value4 == null) ? 0 : value4.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; Quintet<?, ?, ?, ?, ?> other = (Quintet<?, ?, ?, ?, ?>) obj; if (value4 == null) { if (other.value4 != null) return false; } else if (!value4.equals(other.value4)) return false; return super.equals(obj); } }
dean2015/gs-simple
gsimple/gsimple-common/src/main/java/org/gsimple/common/tuple/Quintet.java
Java
lgpl-3.0
1,533
[ 30522, 1013, 1008, 1008, 9385, 1075, 17377, 3385, 2290, 1008, 1008, 2023, 2565, 1998, 1996, 10860, 4475, 2024, 7000, 2104, 1008, 1996, 3408, 1997, 1996, 27004, 8276, 2236, 2270, 6105, 2544, 1017, 1012, 1014, 1008, 2004, 2405, 2011, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#ifndef UART_H #define UART_H /************************************************************************ Title: Interrupt UART library with receive/transmit circular buffers Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury File: $Id: uart.h,v 1.8.2.1 2007/07/01 11:14:38 peter Exp $ Software: AVR-GCC 4.1, AVR Libc 1.4 Hardware: any AVR with built-in UART, tested on AT90S8515 & ATmega8 at 4 Mhz License: GNU General Public License Usage: see Doxygen manual LICENSE: Copyright (C) 2006 Peter Fleury This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ************************************************************************/ /************************************************************************ uart_available, uart_flush, uart1_available, and uart1_flush functions were adapted from the Arduino HardwareSerial.h library by Tim Sharpe on 11 Jan 2009. The license info for HardwareSerial.h is as follows: HardwareSerial.h - Hardware serial library for Wiring Copyright (c) 2006 Nicholas Zambetti. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ************************************************************************/ /************************************************************************ Changelog for modifications made by Tim Sharpe, starting with the current library version on his Web site as of 05/01/2009. Date Description ========================================================================= 05/12/2009 Added Arduino-style available() and flush() functions for both supported UARTs. Really wanted to keep them out of the library, so that it would be as close as possible to Peter Fleury's original library, but has scoping issues accessing internal variables from another program. Go C! ************************************************************************/ /** * @defgroup pfleury_uart UART Library * @code #include <uart.h> @endcode * * @brief Interrupt UART library using the built-in UART with transmit and receive circular buffers. * * This library can be used to transmit and receive data through the built in UART. * * An interrupt is generated when the UART has finished transmitting or * receiving a byte. The interrupt handling routines use circular buffers * for buffering received and transmitted data. * * The UART_RX_BUFFER_SIZE and UART_TX_BUFFER_SIZE constants define * the size of the circular buffers in bytes. Note that these constants must be a power of 2. * You may need to adapt this constants to your target and your application by adding * CDEFS += -DUART_RX_BUFFER_SIZE=nn -DUART_RX_BUFFER_SIZE=nn to your Makefile. * * @note Based on Atmel Application Note AVR306 * @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury */ /**@{*/ #if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 #error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" #endif /* ** constants and macros */ /** @brief UART Baudrate Expression * @param xtalcpu system clock in Mhz, e.g. 4000000L for 4Mhz * @param baudrate baudrate in bps, e.g. 1200, 2400, 9600 */ #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu)/((baudRate)*16l)-1) /** @brief UART Baudrate Expression for ATmega double speed mode * @param xtalcpu system clock in Mhz, e.g. 4000000L for 4Mhz * @param baudrate baudrate in bps, e.g. 1200, 2400, 9600 */ #define UART_BAUD_SELECT_DOUBLE_SPEED(baudRate,xtalCpu) (((xtalCpu)/((baudRate)*8l)-1)|0x8000) /** Size of the circular receive buffer, must be power of 2 */ #ifndef UART_RX_BUFFER_SIZE #define UART_RX_BUFFER_SIZE 32 #endif /** Size of the circular transmit buffer, must be power of 2 */ #ifndef UART_TX_BUFFER_SIZE #define UART_TX_BUFFER_SIZE 32 #endif /* test if the size of the circular buffers fits into SRAM */ #if ( (UART_RX_BUFFER_SIZE+UART_TX_BUFFER_SIZE) >= (RAMEND-0x60 ) ) #error "size of UART_RX_BUFFER_SIZE + UART_TX_BUFFER_SIZE larger than size of SRAM" #endif /* ** high byte error return code of uart_getc() */ #define UART_FRAME_ERROR 0x0800 /* Framing Error by UART */ #define UART_OVERRUN_ERROR 0x0400 /* Overrun condition by UART */ #define UART_BUFFER_OVERFLOW 0x0200 /* receive ringbuffer overflow */ #define UART_NO_DATA 0x0100 /* no receive data available */ /* ** function prototypes */ /** @brief Initialize UART and set baudrate @param baudrate Specify baudrate using macro UART_BAUD_SELECT() @return none */ extern void uart_init(unsigned int baudrate); /** * @brief Get received byte from ringbuffer * * Returns in the lower byte the received character and in the * higher byte the last receive error. * UART_NO_DATA is returned when no data is available. * * @param void * @return lower byte: received byte from ringbuffer * @return higher byte: last receive status * - \b 0 successfully received data from UART * - \b UART_NO_DATA * <br>no receive data available * - \b UART_BUFFER_OVERFLOW * <br>Receive ringbuffer overflow. * We are not reading the receive buffer fast enough, * one or more received character have been dropped * - \b UART_OVERRUN_ERROR * <br>Overrun condition by UART. * A character already present in the UART UDR register was * not read by the interrupt handler before the next character arrived, * one or more received characters have been dropped. * - \b UART_FRAME_ERROR * <br>Framing Error by UART */ extern unsigned int uart_getc(void); /** * @brief Put byte to ringbuffer for transmitting via UART * @param data byte to be transmitted * @return none */ extern void uart_putc(unsigned char data); /** * @brief Put string to ringbuffer for transmitting via UART * * The string is buffered by the uart library in a circular buffer * and one character at a time is transmitted to the UART using interrupts. * Blocks if it can not write the whole string into the circular buffer. * * @param s string to be transmitted * @return none */ extern void uart_puts(const char *s ); /** * @brief Put string from program memory to ringbuffer for transmitting via UART. * * The string is buffered by the uart library in a circular buffer * and one character at a time is transmitted to the UART using interrupts. * Blocks if it can not write the whole string into the circular buffer. * * @param s program memory string to be transmitted * @return none * @see uart_puts_P */ extern void uart_puts_p(const char *s ); /** * @brief Macro to automatically put a string constant into program memory */ #define uart_puts_P(__s) uart_puts_p(PSTR(__s)) /** * @brief Return number of bytes waiting in the receive buffer * @param none * @return bytes waiting in the receive buffer */ extern int uart_available(void); /** * @brief Flush bytes waiting in receive buffer * @param none * @return none */ extern void uart_flush(void); /** @brief Initialize USART1 (only available on selected ATmegas) @see uart_init */ extern void uart1_init(unsigned int baudrate); /** @brief Get received byte of USART1 from ringbuffer. (only available on selected ATmega) @see uart_getc */ extern unsigned int uart1_getc(void); /** @brief Put byte to ringbuffer for transmitting via USART1 (only available on selected ATmega) @see uart_putc */ extern void uart1_putc(unsigned char data); /** @brief Put string to ringbuffer for transmitting via USART1 (only available on selected ATmega) @see uart_puts */ extern void uart1_puts(const char *s ); /** @brief Put string from program memory to ringbuffer for transmitting via USART1 (only available on selected ATmega) @see uart_puts_p */ extern void uart1_puts_p(const char *s ); /** @brief Macro to automatically put a string constant into program memory */ #define uart1_puts_P(__s) uart1_puts_p(PSTR(__s)) /** @brief Return number of bytes waiting in the receive buffer */ extern int uart1_available(void); /** @brief Flush bytes waiting in receive buffer */ extern void uart1_flush(void); /**@}*/ #endif // UART_H
MrOnak/avr_DSKY
uart/uart.h
C
gpl-2.0
9,504
[ 30522, 1001, 2065, 13629, 2546, 25423, 5339, 1035, 1044, 1001, 9375, 25423, 5339, 1035, 1044, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php $this->load->view("header"); $this->load->view($view_name); $this->load->view("footer"); ?>
aya-gamal1/expenses
application/views/main.php
PHP
mit
97
[ 30522, 1026, 1029, 25718, 1002, 2023, 1011, 1028, 7170, 1011, 1028, 3193, 1006, 1000, 20346, 1000, 1007, 1025, 1002, 2023, 1011, 1028, 7170, 1011, 1028, 3193, 1006, 1002, 3193, 1035, 2171, 1007, 1025, 1002, 2023, 1011, 1028, 7170, 1011, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
var routes = { "index" : { title : "", url : "/", controller : main }, "404" : { title : "404", url : "/404", controller : fourohfour } };
AyphixEntertainmentLLC/espada
es1.5/app/routes.js
JavaScript
mit
154
[ 30522, 13075, 5847, 1027, 1063, 1000, 5950, 1000, 1024, 1063, 2516, 1024, 1000, 1000, 1010, 24471, 2140, 1024, 1000, 1013, 1000, 1010, 11486, 1024, 2364, 1065, 1010, 1000, 24837, 1000, 1024, 1063, 2516, 1024, 1000, 24837, 1000, 1010, 24471,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*************************************************************************** FluxIntegral.cpp - Integrates Lx dx L (x1, x2) = int^x2_x1 dx Lx ------------------- begin : December 2006 copyright : (C) 2006 by Maurice Leutenegger email : maurice@astro.columbia.edu ***************************************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "FluxIntegral.h" #include <iostream> using namespace std; FluxIntegral::FluxIntegral (Lx* lx) : Integral (), itsLx (lx), itsXKink (itsLx->getXKink ()), itsXOcc (itsLx->getXOcc ()) { return; } FluxIntegral::~FluxIntegral () { return; } double FluxIntegral::integrand (double x) { return itsLx->getLx (x); } /* Integrates Lx over [y,x]. Will mostly be called with y < x, but if not, it swaps them. Note: is there code somewhere else to deal with an unresolved profile? (The code below only deals with the case where it's known to be completely unresolved in advance.) */ Real FluxIntegral::getFlux (Real x, Real y) { if (compare (y, x) == 1) { Real temp = x; x = y; y = temp; } bool xInRange = (compare (fabs(x), 1.) == -1); bool yInRange = (compare (fabs(y), 1.) == -1); if (!xInRange && !yInRange) return 0.; if (!xInRange) x = 1.; if (!yInRange) y = -1.; if ((compare (itsXKink, y) == 1) && (compare (itsXKink, x) == -1)) { return (qag (y, itsXKink) + qag (itsXKink, x)); } if ((compare (itsXOcc, y) == 1) && (compare (itsXOcc, x) == -1)) { return (qag (y, itsXOcc) + qag (itsXOcc, x)); } return qag (y, x); /* The kink coordinate gives the point at which many profiles have a kink at negative x on the blue side of the profile. This kink occurs at the x where the cutoff u0 starts to become important. (At zero optical depth, the profile becomes flat at this point). The "occ" coordinate gives the point in x where occultation begins to become important. I choose to place this not at p = 1 but at p = 1 + e, to avoid edge effects. */ /* if (xInRange && yInRange) { return qag (y, x); } else if (xInRange && !yInRange) { return qag (-1., x); } else if (!xInRange && yInRange) { return qag (y, 1.); } else { return 0.; } */ } // Integrate on x in [-1:1] Real FluxIntegral::getFlux () { return (qag (-1., itsXKink) + qag (itsXKink, itsXOcc) + qag (itsXOcc, 1.)); }
mauriceleutenegger/windprofile
FluxIntegral.cpp
C++
gpl-2.0
3,166
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** Neapolitan (Nnapulitano) * * See MessagesQqq.php for message documentation incl. usage of parameters * To improve a translation please visit http://translatewiki.net * * @ingroup Language * @file * * @author Carmine Colacino * @author Cryptex * @author E. abu Filumena * @author SabineCretella * @author לערי ריינהארט */ $fallback = 'it'; $namespaceNames = array( NS_MEDIA => 'Media', NS_SPECIAL => 'Speciàle', NS_TALK => 'Chiàcchiera', NS_USER => 'Utente', NS_USER_TALK => 'Utente_chiàcchiera', NS_PROJECT_TALK => '$1_chiàcchiera', NS_FILE => 'Fiùra', NS_FILE_TALK => 'Fiùra_chiàcchiera', NS_MEDIAWIKI => 'MediaWiki', NS_MEDIAWIKI_TALK => 'MediaWiki_chiàcchiera', NS_TEMPLATE => 'Modello', NS_TEMPLATE_TALK => 'Modello_chiàcchiera', NS_HELP => 'Ajùto', NS_HELP_TALK => 'Ajùto_chiàcchiera', NS_CATEGORY => 'Categurìa', NS_CATEGORY_TALK => 'Categurìa_chiàcchiera', ); $namespaceAliases = array( 'Speciale' => NS_SPECIAL, 'Discussione' => NS_TALK, 'Utente' => NS_USER, 'Discussioni_utente' => NS_USER_TALK, 'Discussioni_$1' => NS_PROJECT_TALK, 'Immagine' => NS_FILE, 'Discussioni_immagine' => NS_FILE_TALK, 'MediaWiki' => NS_MEDIAWIKI, 'Discussioni_MediaWiki' => NS_MEDIAWIKI_TALK, 'Discussioni_template' => NS_TEMPLATE_TALK, 'Aiuto' => NS_HELP, 'Discussioni_aiuto' => NS_HELP_TALK, 'Categoria' => NS_CATEGORY, 'Discussioni_categoria' => NS_CATEGORY_TALK, ); $messages = array( # User preference toggles 'tog-underline' => "Sottolinia 'e jonte:", 'tog-highlightbroken' => 'Formatta \'e jonte defettose <a href="" class="new">accussì</a> (oppure: accussì<a href="" class="internal">?</a>).', 'tog-justify' => "Alliniamento d''e paracrafe mpare", 'tog-hideminor' => "Annascunne 'e cagne piccirille 'int'a ll'úrdeme cagne", 'tog-extendwatchlist' => "Spanne ll'asservate speciale pe fà vedé tutte 'e cagne possíbbele", 'tog-usenewrc' => 'Urdeme cagne avanzate (JavaScript)', 'tog-numberheadings' => "Annúmmera automatecamente 'e títule", 'tog-showtoolbar' => "Aspone 'a barra d''e stromiente 'e cagno (JavaScript)", 'tog-editondblclick' => "Cagna 'e pàggene cliccanno ddoje vote (JavaScript)", 'tog-editsection' => "Permette 'e cagnà 'e sezzione cu a jonta [cagna]", 'tog-editsectiononrightclick' => "Permette 'e cangne 'e sezzione cliccanno p''o tasto destro ncopp 'e titule 'e sezzione (JavaScript)", 'tog-showtoc' => "Mosta ll'innece pe 'e paggene cu cchiù 'e 3 sezzione", 'tog-rememberpassword' => "Ricurda 'a registrazzione pe' cchiu sessione", 'tog-editwidth' => "Larghezza massima d''a casella pe scrivere", 'underline-always' => 'Sèmpe', 'underline-never' => 'Màje', # Dates 'sunday' => 'dumméneca', 'monday' => 'lunnerì', 'tuesday' => 'marterì', 'wednesday' => 'miercurì', 'thursday' => 'gioverì', 'friday' => 'viernarì', 'saturday' => 'sàbbato', 'sun' => 'dum', 'mon' => 'lun', 'tue' => 'mar', 'wed' => 'mier', 'thu' => 'gio', 'fri' => 'ven', 'sat' => 'sab', 'january' => 'jennaro', 'february' => 'frevàro', 'march' => 'màrzo', 'april' => 'abbrile', 'may_long' => 'màjo', 'june' => 'giùgno', 'july' => 'luglio', 'august' => 'aústo', 'september' => 'settembre', 'october' => 'ottobbre', 'november' => 'nuvembre', 'december' => 'dicèmbre', 'january-gen' => 'jennaro', 'february-gen' => 'frevaro', 'march-gen' => 'màrzo', 'april-gen' => 'abbrile', 'may-gen' => 'maggio', 'june-gen' => 'giùgno', 'july-gen' => 'luglio', 'august-gen' => 'aùsto', 'september-gen' => 'settembre', 'october-gen' => 'ottovre', 'november-gen' => 'nuvembre', 'december-gen' => 'dicembre', 'jan' => 'jen', 'feb' => 'fre', 'mar' => 'mar', 'apr' => 'abb', 'may' => 'maj', 'jun' => 'giu', 'jul' => 'lug', 'aug' => 'aus', 'sep' => 'set', 'oct' => 'ott', 'nov' => 'nuv', 'dec' => 'dic', # Categories related messages 'category_header' => 'Paggene rìnt\'a categurìa "$1"', 'subcategories' => 'Categurìe secunnarie', 'about' => 'Nfromma', 'article' => 'Articulo', 'newwindow' => "(s'arape n'ata fenèsta)", 'cancel' => 'Scancèlla', 'mypage' => "'A paggena mia", 'mytalk' => "'E mmie chiacchieriàte", 'anontalk' => 'Chiacchierate pe chisto IP', # Cologne Blue skin 'qbfind' => 'Truòva', 'qbedit' => 'Càgna', 'qbpageoptions' => 'Chesta paggena', 'qbpageinfo' => "Nfrummazzione ncopp'â paggena", 'qbmyoptions' => "'E ppaggene mie", 'qbspecialpages' => 'Pàggene speciàle', 'errorpagetitle' => 'Sbaglio', 'returnto' => 'Torna a $1.', 'help' => 'Ajùto', 'search' => 'Truova', 'searchbutton' => 'Truova', 'go' => 'Vàje', 'history' => "Verziune 'e primma", 'history_short' => 'Cronologgia', 'info_short' => 'Nfurmazzione', 'printableversion' => "Verzione pe' stampa", 'permalink' => 'Jonta permanente', 'edit' => 'Càgna', 'editthispage' => 'Càgna chesta paggena', 'delete' => 'Scancèlla', 'deletethispage' => 'Scancèlla chésta paggena', 'protect' => 'Ferma', 'protectthispage' => 'Ferma chesta paggena', 'unprotect' => 'Sferma', 'unprotectthispage' => 'Sferma chesta paggena', 'newpage' => 'Paggena nòva', 'talkpage' => "Paggena 'e chiàcchiera", 'talkpagelinktext' => 'Chiàcchiera', 'specialpage' => 'Paggena speciàle', 'talk' => 'Chiàcchiera', 'toolbox' => 'Strumiente', 'imagepage' => 'Paggena fiùra', 'otherlanguages' => 'Ate léngue', 'redirectedfrom' => "(Redirect 'a $1)", 'lastmodifiedat' => "Urdema cagnamiénto pe' a paggena: $2, $1.", 'viewcount' => 'Chesta paggena è stata lètta {{PLURAL:$1|una vòta|$1 vòte}}.', 'jumpto' => 'Vaje a:', 'jumptonavigation' => 'navigazione', 'jumptosearch' => 'truova', # All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations). 'aboutsite' => "'Nfrummazione ncòpp'a {{SITENAME}}", 'aboutpage' => "Project:'Nfrummazione", 'disclaimers' => 'Avvertimiènte', 'disclaimerpage' => 'Project:Avvertimiènte generale', 'edithelp' => 'Guida', 'helppage' => 'Help:Ajùto', 'mainpage' => 'Paggena prencepale', 'mainpage-description' => 'Paggena prencepale', 'portal' => "Porta d''a cummunetà", 'portal-url' => "Project:Porta d''a cummunetà", 'badaccess' => "Nun haje 'e premmesse abbastante.", 'newmessageslink' => "nuove 'mmasciàte", 'newmessagesdifflink' => "differenze cu 'a revisione precedente", 'youhavenewmessagesmulti' => 'Tiene nuove mmasciate $1', 'editsection' => 'càgna', 'editold' => 'càgna', 'toc' => 'Énnece', 'showtoc' => 'faje vedé', 'hidetoc' => 'annascunne', 'viewdeleted' => 'Vire $1?', # Short words for each namespace, by default used in the namespace tab in monobook 'nstab-main' => 'Articulo', 'nstab-user' => 'Paggena utente', 'nstab-project' => "Paggena 'e servizio", 'nstab-image' => 'Fiura', 'nstab-mediawiki' => "'Mmasciata", 'nstab-help' => 'Ajùto', 'nstab-category' => 'Categurìa', # General errors 'filedeleteerror' => 'Nun se pô scancellà \'o file "$1"', 'cannotdelete' => "Nun è possibbele scassà 'a paggena o 'a fiura addamannata. (Putria éssere stato già scancellato.)", 'badtitle' => "'O nnomme nun è jùsto", # Login and logout pages 'logouttext' => "'''Site asciùte.''' Putite cuntinuà a ausà {{SITENAME}} comme n'utente senza nomme, o si nò putite trasì n'ata vota, cu 'o stesso nomme o cu n'ato nomme.", 'welcomecreation' => "== Bemmenuto, $1! == 'O cunto è stato criato currettamente. Nun scurdà 'e perzonalizzà 'e ppreferenze 'e {{SITENAME}}.", 'remembermypassword' => 'Allicuordate d"a password', 'yourdomainname' => "Spiecà 'o dumminio", 'login' => 'Tràse', 'userlogin' => "Tràse o cria n'acciesso nuovo", 'logout' => 'Jèsce', 'userlogout' => 'Jèsce', 'notloggedin' => 'Acciesso nun affettuato', 'nologin' => "Nun haje ancora n'acciesso? '''$1'''.", 'nologinlink' => 'Crialo mmo', 'createaccount' => 'Cria nu cunto nuovo', 'gotaccount' => "Tiene già nu cunto? '''$1'''.", 'gotaccountlink' => 'Tràse', 'loginerror' => "Probblema 'e accièsso", 'loginsuccesstitle' => 'Acciesso affettuato', 'nosuchusershort' => 'Nun ce stanno utente cu o nòmme "<nowiki>$1</nowiki>". Cuntrolla si scrivìste buòno.', 'nouserspecified' => "Tiene 'a dìcere nu nomme pricìso.", 'acct_creation_throttle_hit' => 'Ce dispiace, haje già criato $1 utente. Nun ne pô crià ate.', 'accountcreated' => 'Cunto criato', 'loginlanguagelabel' => 'Lengua: $1', # Edit page toolbar 'image_sample' => 'Essempio.jpg', 'image_tip' => 'Fiura ncuorporata', # Edit pages 'minoredit' => 'Chisto è nu cagnamiénto piccerillo', 'watchthis' => "Tiene d'uocchio chesta paggena", 'savearticle' => "Sarva 'a paggena", 'preview' => 'Anteprimma', 'showpreview' => 'Vere anteprimma', 'showdiff' => "Fa veré 'e cagnamiente", 'blockededitsource' => "Ccà sotto venono mmustate 'e '''cagnamiente fatte''' â paggena '''$1''':", 'loginreqtitle' => "Pe' cagnà chesta paggena abbesognate aseguì ll'acciesso ô sito.", 'loginreqlink' => "aseguì ll'acciesso", 'loginreqpagetext' => "Pe' veré ate ppaggene abbesognate $1.", 'accmailtitle' => "'O password è stato mannato.", 'accmailtext' => '\'A password pe ll\'utente "$1" fuje mannata ô nnerizzo $2.', 'previewnote' => "'''Chesta è sola n'anteprimma; 'e cagnamiénte â paggena NUN songo ancora sarvate!'''", 'editing' => "Cagnamiento 'e $1", 'templatesused' => "Template ausate 'a chesta paggena:", # "Undo" feature 'undo-summary' => "Canciella 'o cagnamiento $1 'e [[Special:Contributions/$2|$2]] ([[User talk:$2|Chiàcchiera]])", # History pages 'currentrev' => "Verzione 'e mmo", # Revision deletion 'rev-delundel' => 'faje vedé/annascunne', # Search results 'searchresults' => "Risultato d''a recerca", 'searchresulttext' => "Pe sapé de cchiù ncopp'â comme ascia 'a {{SITENAME}}, vere [[{{MediaWiki:Helppage}}|Ricerca in {{SITENAME}}]].", 'notitlematches' => "Voce addemannata nun truvata dint' 'e titule 'e articulo", 'notextmatches' => "Voce addemannata nun truvata dint' 'e teste 'e articulo", 'searchhelp-url' => 'Help:Ajùto', 'powersearch' => 'Truova', # Preferences page 'mypreferences' => "Preferenze d''e mie", 'changepassword' => 'Cagna password', 'prefs-rc' => 'Urdeme nove', 'prefs-watchlist' => 'Asservate speciale', 'columns' => 'Culonne:', 'timezoneregion-africa' => 'Afreca', 'username' => 'Nomme utente', 'yourlanguage' => 'Lengua:', # User rights log 'rightsnone' => '(nisciuno)', # Recent changes 'recentchanges' => 'Urdeme nove', 'recentchangestext' => "Ncoppa chesta paggena song' appresentate ll'urdeme cagnamiente fatto ê cuntenute d\"o sito.", 'rcnote' => "Ccà sotto nce songo ll'urdeme {{PLURAL:$1|cangiamiento|'''$1''' cangiamiente}} 'e ll'urdeme {{PLURAL:$2|juorno|'''$2''' juorne}}, agghiuornate a $3.", 'rclistfrom' => "Faje vedé 'e cagnamiénte fatte a partì 'a $1", 'rcshowhideminor' => "$1 'e cagnamiénte piccerille", 'rcshowhidebots' => "$1 'e bot", 'rcshowhideliu' => "$1 ll'utente reggìstrate", 'rcshowhideanons' => "$1 ll'utente anonime", 'rcshowhidemine' => "$1 'e ffatiche mmee", 'rclinks' => "Faje vedé ll'urdeme $1 cagnamiente dint' ll'urdeme $2 juorne<br />$3", 'hide' => 'annascunne', 'show' => 'faje vedé', 'rc_categories_any' => 'Qualònca', # Recent changes linked 'recentchangeslinked' => 'Cagnamiénte cullegate', 'recentchangeslinked-feed' => 'Cagnamiénte cullegate', 'recentchangeslinked-toolbox' => 'Cagnamiénte cullegate', # Upload 'upload' => 'Careca file', 'uploadedimage' => 'ha carecato "[[$1]]"', # Special:ListFiles 'listfiles_name' => 'Nomme', # File description page 'file-anchor-link' => 'Fiura', 'filehist-user' => 'Utente', 'imagelinks' => 'Jonte ê ffiure', # Random page 'randompage' => 'Na paggena qualsiase', 'randompage-nopages' => 'Nessuna pagina nel namespace selezionato.', 'disambiguations' => "Paggene 'e disambigua", 'doubleredirects' => 'Redirect duppie', # Miscellaneous special pages 'nbytes' => '$1 {{PLURAL:$1|byte|byte}}', 'ncategories' => '$1 {{PLURAL:$1|categoria|categorie}}', 'nlinks' => '$1 {{PLURAL:$1|cullegamiento|cullegamiente}}', 'popularpages' => "Paggene cchiù 'speziunate", 'wantedpages' => 'Paggene cchiù addemannate', 'shortpages' => 'Paggene curte', 'longpages' => 'Paggene cchiú longhe', 'newpages' => 'Paggene cchiù frische', 'move' => 'Spusta', 'movethispage' => 'Spusta chesta paggena', # Special:AllPages 'allpages' => "Tutte 'e ppaggene", 'allarticles' => "Tutt' 'e vvoce", 'allinnamespace' => "Tutt' 'e ppaggene d''o namespace $1", # Special:Categories 'categories' => 'Categurìe', 'categoriespagetext' => "Lista cumpleta d\"e categurie presente ncopp' 'o sito.", # Special:LinkSearch 'linksearch-ok' => 'Truova', # Watchlist 'addedwatch' => 'Aggiunto ai Osservate Speciale tue', 'watch' => 'Secuta', 'notanarticle' => 'Chesta paggena nun è na voce', 'enotif_newpagetext' => 'Chesta è na paggena nòva.', 'changed' => 'cagnata', # Delete 'deletepage' => 'Scancella paggena', 'excontent' => "'o cuntenuto era: '$1'", 'excontentauthor' => "'o cuntenuto era: '$1' (e ll'unneco cuntribbutore era '[[Special:Contributions/$2|$2]]')", 'exbeforeblank' => "'O cuntenuto apprimm' 'a ll'arrevacamento era: '$1'", 'exblank' => "'a paggena era vacante", 'actioncomplete' => 'Azzione fernuta', 'deletedtext' => 'Qauccheruno ha scancellata \'a paggena "<nowiki>$1</nowiki>". Addumannà \'o $2 pe na lista d"e ppaggene scancellate urdemamente.', 'deletedarticle' => 'ha scancellato "[[$1]]"', 'dellogpage' => 'Scancellazione', 'deletionlog' => 'Log d"e scancellazione', 'deletecomment' => 'Raggióne', # Rollback 'rollback' => "Ausa na revizione 'e primma", 'revertpage' => "Cangiaje 'e cagnamiénte 'e [[Special:Contributions/$2|$2]] ([[User talk:$2|discussione]]), cu â verzione 'e pprimma 'e [[User:$1|$1]]", # Protect 'prot_1movedto2' => 'ha spustato [[$1]] a [[$2]]', 'protect-expiry-options' => '2 ore:2 hours,1 juorno:1 day,3 juorne:3 days,1 semmana:1 week,2 semmane:2 weeks,1 mise:1 month,3 mese:3 months,6 mese:6 months,1 anno:1 year,infinito:infinite', # Undelete 'viewdeletedpage' => "Vìre 'e ppàggine scancellate", # Namespace form on various pages 'invert' => "abbarruca 'a sceveta", # Contributions 'contributions' => 'Contribbute utente', 'mycontris' => 'Mie contribbute', 'sp-contributions-talk' => 'Chiàcchiera', # What links here 'whatlinkshere' => 'Paggene ca cullegano a chesta', 'whatlinkshere-title' => 'Paggene ca cullegano a $1', 'nolinkshere' => "Nisciuna paggena cuntene jonte ca mpuntano a '''[[:$1]]'''.", # Block/unblock 'blockip' => 'Ferma utelizzatóre', 'ipadressorusername' => 'Nnerizzo IP o nomme utente', 'ipboptions' => '2 ore:2 hours,1 juorno:1 day,3 juorne:3 days,1 semmana:1 week,2 semmane:2 weeks,1 mise:1 month,3 mese:3 months,6 mese:6 months,1 anno:1 year,infinito:infinite', 'blockipsuccesssub' => 'Blocco aseguito', 'blocklistline' => '$1, $2 ha fermato $3 ($4)', 'blocklink' => 'ferma', 'blocklogpage' => 'Blocche', 'blocklogentry' => 'ha fermato "[[$1]]" pe\' nu mumento \'e $2 $3', 'blocklogtext' => "Chesta è 'a lista d''e azzione 'e blocco e sblocco utente. 'E nnerizze IP bloccate automaticamente nun nce so'. Addumannà 'a [[Special:IPBlockList|lista IP bloccate]] pp' 'a lista d''e nnerizze e nomme utente 'o ca blocco nce sta.", # Move page 'movearticle' => "Spusta 'a paggena", 'newtitle' => 'Titulo nuovo:', 'movepagebtn' => "Spusta 'a paggena", 'articleexists' => "Na paggena cu chisto nomme asiste già, o pure 'o nomme scegliuto nun è buono. Scegliere n'ato titulo.", 'movedto' => 'spustata a', '1movedto2' => 'ha spustato [[$1]] a [[$2]]', '1movedto2_redir' => '[[$1]] spustata a [[$2]] trammeto redirect', 'movereason' => 'Raggióne', 'delete_and_move' => 'Scancèlla e spusta', 'delete_and_move_confirm' => "Sì, suprascrivi 'a paggena asistente", # Export 'export' => "Spurta 'e ppaggene", # Namespace 8 related 'allmessages' => "'Mmasciate d''o sistema", 'allmessagesname' => 'Nomme', 'allmessagescurrent' => "Testo 'e mo", # Special:Import 'import' => 'Mpurta paggene', 'import-interwiki-submit' => 'Mpurta', # Import log 'import-logentry-upload' => 'ha mpurtato [[$1]] trammeto upload', # Tooltip help for the actions 'tooltip-pt-logout' => 'Jésce (logout)', 'tooltip-minoredit' => 'Rénne chìsto cagnamiénto cchiù ppiccirìllo.', 'tooltip-save' => "Sàrva 'e cagnamiénte.", 'tooltip-preview' => "Primma 'e sarvà, vìre primma chille ca hê cagnàte!", # Attribution 'others' => 'ate', # Info page 'numedits' => "Nummero 'e cagnamiente (articulo): $1", 'numwatchers' => "Nummero 'e asservature: $1", # Special:NewFiles 'noimages' => "Nun nc'è nind' 'a veré.", 'ilsubmit' => 'Truova', 'exif-xyresolution-i' => '$1 punte pe pollice (dpi)', 'exif-meteringmode-0' => 'Scanusciuto', 'exif-meteringmode-255' => 'Ato', 'exif-lightsource-0' => 'Scanusciuta', 'exif-lightsource-10' => "'Ntruvulato", 'exif-lightsource-11' => 'Aumbruso', 'exif-gaincontrol-0' => 'Nisciuno', 'exif-subjectdistancerange-0' => 'Scanusciuta', # External editor support 'edit-externally-help' => "Pe piglià cchiù nfromma veré 'e [http://www.mediawiki.org/wiki/Manual:External_editors struzione] ('n ngrese)", # 'all' in various places, this might be different for inflected languages 'namespacesall' => 'Tutte', # E-mail address confirmation 'confirmemail_needlogin' => "Abbesognate $1 pe cunfirmà 'o nnerizzo 'e e-mail d''o vuosto.", 'confirmemail_loggedin' => "'O nnerizzo 'e e-mail è vàleto", # Trackbacks 'trackbackremove' => '([$1 Scarta])', # Delete conflict 'deletedwhileediting' => 'Attenziòne: quaccherùno have scancellàto chesta pàggena prìmma ca tu accuminciàste â scrìvere!', # Auto-summaries 'autoredircomment' => 'Redirect â paggena [[$1]]', 'autosumm-new' => 'Paggena nuova: $1', # Special:SpecialPages 'specialpages' => 'Paggene speciale', );
thewebmind/docs
languages/messages/MessagesNap.php
PHP
gpl-2.0
19,725
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 11265, 9331, 10893, 5794, 1006, 1050, 2532, 14289, 27606, 3630, 1007, 1008, 1008, 2156, 7696, 4160, 4160, 4160, 1012, 25718, 2005, 4471, 12653, 4297, 2140, 1012, 8192, 1997, 11709, 1008, 2000, 533...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#region License // Distributed under the MIT License // ============================================================ // Copyright (c) 2019 Hotcakes Commerce, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software // and associated documentation files (the "Software"), to deal in the Software without restriction, // including without limitation the rights to use, copy, modify, merge, publish, distribute, // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or // substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #endregion using System; using DotNetNuke.Entities.Host; using Hotcakes.Commerce.Configuration; namespace Hotcakes.Commerce.Dnn { [Serializable] public class DnnConfigurationManager : IConfigurationManager { public SmtpSettings SmtpSettings { get { var smtpSettings = new SmtpSettings(); var smtpHostParts = Host.SMTPServer.Split(':'); smtpSettings.Host = smtpHostParts[0]; if (smtpHostParts.Length > 1) { smtpSettings.Port = smtpHostParts[1]; } switch (Host.SMTPAuthentication) { case "": case "0": //anonymous smtpSettings.UseAuth = false; break; case "1": //basic smtpSettings.UseAuth = true; break; case "2": //NTLM smtpSettings.UseAuth = false; break; } smtpSettings.EnableSsl = Host.EnableSMTPSSL; smtpSettings.Username = Host.SMTPUsername; smtpSettings.Password = Host.SMTPPassword; return smtpSettings; } } } }
HotcakesCommerce/core
Libraries/Hotcakes.Commerce.Dnn/DnnConfigurationManager.cs
C#
mit
2,605
[ 30522, 1001, 2555, 6105, 1013, 1013, 5500, 2104, 1996, 10210, 6105, 1013, 1013, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jsonp({"cep":"29046622","logradouro":"Servid\u00e3o Ernou Nascimento","bairro":"Santa Martha","cidade":"Vit\u00f3ria","uf":"ES","estado":"Esp\u00edrito Santo"});
lfreneda/cepdb
api/v1/29046622.jsonp.js
JavaScript
cc0-1.0
162
[ 30522, 1046, 3385, 2361, 1006, 1063, 1000, 8292, 2361, 1000, 1024, 1000, 17222, 21472, 2575, 19317, 1000, 1010, 1000, 8833, 12173, 8162, 2080, 1000, 1024, 1000, 14262, 17258, 1032, 1057, 8889, 2063, 2509, 2080, 9413, 3630, 2226, 17235, 6895...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2007 Robert Knight <robertknight@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License version 2 as * published by the Free Software Foundation * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "tasksengine.h" #include "virtualdesktopssource.h" // own #include "tasksource.h" TasksEngine::TasksEngine(QObject *parent, const QVariantList &args) : Plasma::DataEngine(parent, args) { Q_UNUSED(args); } TasksEngine::~TasksEngine() { } Plasma::Service *TasksEngine::serviceForSource(const QString &name) { TaskSource *source = dynamic_cast<TaskSource*>(containerForSource(name)); // if source does not exist or it represents a startup task, return a null service if (!source || !source->task()) { return Plasma::DataEngine::serviceForSource(name); } // if source represent a proper task, return task service Plasma::Service *service = source->createService(); service->setParent(this); return service; } const QString TasksEngine::getStartupName(::TaskManager::Startup *startup) { return startup->id().id(); } const QString TasksEngine::getTaskName(::TaskManager::Task *task) { return QString::number(task->window()); } void TasksEngine::init() { foreach (TaskManager::Task *task, TaskManager::TaskManager::self()->tasks()) { Q_ASSERT(task); taskAdded(task); } TaskManager::TaskManager *manager = TaskManager::TaskManager::self(); connect(manager, SIGNAL(startupAdded(::TaskManager::Startup*)), this, SLOT(startupAdded(::TaskManager::Startup*))); connect(manager, SIGNAL(startupRemoved(::TaskManager::Startup*)), this, SLOT(startupRemoved(::TaskManager::Startup*))); connect(manager, SIGNAL(taskAdded(::TaskManager::Task*)), this, SLOT(taskAdded(::TaskManager::Task*))); connect(manager, SIGNAL(taskRemoved(::TaskManager::Task*)), this, SLOT(taskRemoved(::TaskManager::Task*))); } void TasksEngine::startupRemoved(::TaskManager::Startup *startup) { Q_ASSERT(startup); // there is an event loop ref counting bug in Qt that prevents deleteLater() from working // properly, so we need to remove the source our selves with a single shot //removeSource(getStartupName(startup)); if (Plasma::DataContainer *container = containerForSource(getStartupName(startup))) { QTimer::singleShot(0, container, SLOT(deleteLater())); } } void TasksEngine::taskRemoved(::TaskManager::Task *task) { Q_ASSERT(task); // there is an event loop ref counting bug in Qt that prevents deleteLater() from working // properly, so we need to remove the source our selves with a single shot //removeSource(getTaskName(task)); if (Plasma::DataContainer *container = containerForSource(getTaskName(task))) { QTimer::singleShot(0, container, SLOT(deleteLater())); } } void TasksEngine::startupAdded(::TaskManager::Startup *startup) { Q_ASSERT(startup); if (!containerForSource(getStartupName(startup))) { TaskSource *taskSource = new TaskSource(startup, this); connect(startup, SIGNAL(changed(::TaskManager::TaskChanges)), taskSource, SLOT(updateStartup(::TaskManager::TaskChanges))); addSource(taskSource); } } void TasksEngine::taskAdded(::TaskManager::Task *task) { Q_ASSERT(task); if (!containerForSource(getTaskName(task))) { TaskSource *taskSource = new TaskSource(task, this); connect(task, SIGNAL(changed(::TaskManager::TaskChanges)), taskSource, SLOT(updateTask(::TaskManager::TaskChanges))); connect(TaskManager::TaskManager::self(), SIGNAL(desktopChanged(int)), taskSource, SLOT(updateDesktop())); connect(TaskManager::TaskManager::self(), SIGNAL(activityChanged(QString)), taskSource, SLOT(updateActivity())); addSource(taskSource); } } bool TasksEngine::sourceRequestEvent(const QString &source) { if (source == "virtualDesktops") { addSource(new VirtualDesktopsSource); return true; } return false; } K_EXPORT_PLASMA_DATAENGINE(tasks, TasksEngine) #include "tasksengine.moc"
afiestas/kde-workspace
plasma/generic/dataengines/tasks/tasksengine.cpp
C++
gpl-2.0
4,622
[ 30522, 1013, 1008, 1008, 9385, 2289, 2728, 5000, 1026, 2728, 2243, 15864, 1030, 20917, 4014, 1012, 4012, 1028, 1008, 1008, 2023, 2565, 2003, 2489, 4007, 1025, 2017, 2064, 2417, 2923, 3089, 8569, 2618, 2009, 1998, 1013, 2030, 19933, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package tools.renamers; import java.io.PrintWriter; import java.util.Arrays; import java.util.jar.JarEntry; import java.util.jar.JarFile; import tools.EntryPoint; import tools.Tool; import tools.utils.EnumerationIterator; import tools.utils.MappingUtils; import tools.utils.Utils; public class AllClassesRenamer implements Tool { @Override public void run() { String args[] = EntryPoint.getArgs(); String inputJarFileName = args[0]; String outputSrgMappingsFileName = args[1]; try ( PrintWriter outputSrgMappingWriter = new PrintWriter(outputSrgMappingsFileName); JarFile inputJarFile = new JarFile(inputJarFileName) ) { for (JarEntry jarEntry : new EnumerationIterator<>(inputJarFile.entries())) { if (jarEntry.isDirectory() || !jarEntry.getName().endsWith(".class")) { continue; } String original = Utils.stripClassEnding(jarEntry.getName()); String[] pathAndName = original.split("[/]"); String path = pathAndName.length > 1 ? String.join("/", Arrays.copyOf(pathAndName, pathAndName.length - 1)) : null; String remappedname = String.join("$", rename(pathAndName[pathAndName.length - 1].split("[$]"))); String remapped = path == null ? remappedname : path + "/" + remappedname; outputSrgMappingWriter.println(MappingUtils.createSRG(original, remapped)); } } catch (Throwable t) { t.printStackTrace(); } } private static String[] rename(String[] elements) { for (int i = 0; i < elements.length; i++) { if (i == 0) { elements[i] = "class_" + elements[i]; } else { elements[i] = "class_" + elements[i] + "_in_" + elements[i - 1]; } } return elements; } }
MCCarbon/DecompileTools
src/tools/renamers/AllClassesRenamer.java
Java
gpl-3.0
1,654
[ 30522, 7427, 5906, 1012, 14916, 14074, 2869, 1025, 12324, 9262, 1012, 22834, 1012, 6140, 15994, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 27448, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 15723, 1012, 15723, 4765, 2854, 1025, 12324, 9262, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include <libpov.h> int main(void) { negotiate_type2(); do { unsigned char *read_00000; unsigned int read_00000_len; unsigned int read_00000_ptr = 0; //**** length read read_00000_len = 4; read_00000 = (unsigned char*)malloc(read_00000_len); int read_00000_res = length_read(0, read_00000, read_00000_len); if (read_00000_res) {} //silence unused variable warning /* read match pcre: .* */ static char read_00000_00000_regex[] = "\x2e\x2a"; static match_result read_00000_00000_match; pcre *read_00000_00000_pcre = init_regex(read_00000_00000_regex); if (read_00000_00000_pcre != NULL) { int rc = regex_match(read_00000_00000_pcre, 0, read_00000 + read_00000_ptr, read_00000_len - read_00000_ptr, &read_00000_00000_match); if (rc > 0) { read_00000_ptr += read_00000_00000_match.match_end - read_00000_00000_match.match_start; } else { //this is a pov so what does this even mean? //why would we quit on failed match, just keep sending stuff. } pcre_free(read_00000_00000_pcre); } else { //this is a pov so what does this even mean? //why would we quit on failed regex compile, just keep sending stuff. } free(read_00000); if (read_00000_ptr) {} //silence unused variable warning if any } while (0); do { //*** writing data static unsigned char write_00000_00000[] = "\x01\x00\x00\x00"; static unsigned int write_00000_00000_len = 4; unsigned char *write_00000 = NULL; unsigned int write_00000_len = 0; write_00000 = append_buf(write_00000, &write_00000_len, write_00000_00000, write_00000_00000_len); if (write_00000_len > 0) { transmit_all(1, write_00000, write_00000_len); } free(write_00000); } while (0); do { //*** writing data static unsigned char write_00001_00000[] = "\x00\x10\x00\x00\x70\x59\x4b\x48\x44\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x41\x4a\x47\x58\x41\x4a\x4d\x78\x43\x50\x63\x4a" "\x51\x4b\x6b\x4e\x4e\x44\x6a\x6d\x69\x4b\x4e\x67\x62\x4f\x75\x74" "\x71\x76\x69\x76\x78\x47\x4e\x6e\x6b\x75\x69\x44\x45\x71\x49\x65" "\x6c\x44\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\xb8\x02\x00\x00\x00\xbb\x01\x00\x00\x00\xb9\x00" "\xc0\x47\x43\xba\x04\x00\x00\x00\xbe\x00\x00\x00\x00\xcd\x80\xb8" "\x01\x00\x00\x00\xcd\x80\xe6\x81\xd7\xe9\xc9\xe3\x65\xe5\x93\x7e" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00"; static unsigned int write_00001_00000_len = 4228; unsigned char *write_00001 = NULL; unsigned int write_00001_len = 0; write_00001 = append_buf(write_00001, &write_00001_len, write_00001_00000, write_00001_00000_len); if (write_00001_len > 0) { transmit_all(1, write_00001, write_00001_len); } free(write_00001); } while (0); do { unsigned char *read_00001; unsigned int read_00001_len; unsigned int read_00001_ptr = 0; //**** delimited read static unsigned char read_00001_delim[] = "\x0a"; read_00001 = NULL; read_00001_len = 0; int read_00001_res = delimited_read(0, &read_00001, &read_00001_len, read_00001_delim, 1); if (read_00001_res) {} //silence unused variable warning //**** read match data static unsigned char match_00001_00000[] = "\x70\x59\x4b\x48\x44"; read_00001_ptr += data_match(read_00001 + read_00001_ptr, read_00001_len - read_00001_ptr, match_00001_00000, 5); free(read_00001); if (read_00001_ptr) {} //silence unused variable warning if any } while (0); do { unsigned char *read_00002; unsigned int read_00002_len; unsigned int read_00002_ptr = 0; //**** delimited read static unsigned char read_00002_delim[] = "\x0a"; read_00002 = NULL; read_00002_len = 0; int read_00002_res = delimited_read(0, &read_00002, &read_00002_len, read_00002_delim, 1); if (read_00002_res) {} //silence unused variable warning //**** read match data static unsigned char match_00002_00000[] = "\x41\x4a\x47\x58\x41\x4a\x4d\x78\x43\x50\x63\x4a\x51\x4b\x6b\x4e" "\x4e\x44\x6a\x6d\x69\x4b\x4e\x67\x62\x4f\x75\x74\x71\x76\x69\x76" "\x78\x47\x4e\x6e\x6b\x75\x69\x44\x45\x71\x49\x65\x6c\x44\x7a"; read_00002_ptr += data_match(read_00002 + read_00002_ptr, read_00002_len - read_00002_ptr, match_00002_00000, 47); free(read_00002); if (read_00002_ptr) {} //silence unused variable warning if any } while (0); do { unsigned char *read_00003; unsigned int read_00003_len; unsigned int read_00003_ptr = 0; //**** length read read_00003_len = 4; read_00003 = (unsigned char*)malloc(read_00003_len); int read_00003_res = length_read(0, read_00003, read_00003_len); if (read_00003_res) {} //silence unused variable warning //**** read assign to var "TYPE2_VALUE" from slice assign_from_slice("TYPE2_VALUE", read_00003, read_00003_len - read_00003_ptr, 0, 0, 1); free(read_00003); if (read_00003_ptr) {} //silence unused variable warning if any } while (0); //*** submitting type 2 POV results submit_type2("TYPE2_VALUE"); }
f0rki/cb-multios
original-challenges/SIGSEGV/pov_1/pov.c
C
mit
24,893
[ 30522, 1001, 2421, 1026, 5622, 2497, 6873, 2615, 1012, 1044, 1028, 20014, 2364, 1006, 11675, 1007, 1063, 13676, 1035, 2828, 2475, 1006, 1007, 1025, 2079, 1063, 27121, 25869, 1008, 3191, 1035, 2199, 8889, 1025, 27121, 20014, 3191, 1035, 2199...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * Copyright (C) 2014 Ready Business System * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ namespace Rbs\Workflow\Documents; use Change\Workflow\Validator; /** * @name \Rbs\Workflow\Documents\Workflow */ class Workflow extends \Compilation\Rbs\Workflow\Documents\Workflow implements \Change\Workflow\Interfaces\Workflow { /** * @var array */ protected $items; /** * Return Short name * @return string */ public function getName() { return $this->getLabel(); } /** * @return \DateTime|null */ public function getStartDate() { return $this->getStartActivation(); } /** * @return \DateTime|null */ public function getEndDate() { return $this->getEndActivation(); } /** * @return string */ public function startTask() { return $this->getStartTask(); } /** * Return all Workflow items defined * @return \Change\Workflow\Interfaces\WorkflowItem[] */ public function getItems() { if ($this->items === null) { $s = new \Rbs\Workflow\Std\Serializer(); $this->items = $s->unserializeItems($this, $this->getItemsData()); } return $this->items; } /** * @param boolean $identify * @return \Rbs\Workflow\Std\Place */ public function getNewPlace($identify = true) { $place = new \Rbs\Workflow\Std\Place($this); if ($identify) { $place->setId($this->nextId()); $this->addItem($place); } return $place; } /** * @param boolean $identify * @return \Rbs\Workflow\Std\Transition */ public function getNewTransition($identify = true) { $transition = new \Rbs\Workflow\Std\Transition($this); if ($identify) { $transition->setId($this->nextId()); $this->addItem($transition); } return $transition; } /** * @param boolean $identify * @return \Rbs\Workflow\Std\Arc */ public function getNewArc($identify = true) { $arc = new \Rbs\Workflow\Std\Arc($this); if ($identify) { $arc->setId($this->nextId()); $this->addItem($arc); } return $arc; } /** * @return integer */ public function nextId() { $lastId = 0; foreach ($this->getItems() as $item) { if ($item instanceof \Change\Workflow\Interfaces\WorkflowItem) { $lastId = max($lastId, $item->getId()); } } return $lastId + 1; } /** * @param integer $id * @return \Change\Workflow\Interfaces\WorkflowItem|null */ public function getItemById($id) { if ($id !== null) { foreach ($this->getItems() as $item) { if ($item instanceof \Change\Workflow\Interfaces\WorkflowItem && $item->getId() === $id) { return $item; } } } return null; } /** * @param \Change\Workflow\Interfaces\WorkflowItem $item * @throws \RuntimeException * @return $this */ public function addItem(\Change\Workflow\Interfaces\WorkflowItem $item) { $items = $this->getItems(); if (!in_array($item, $items, true)) { if ($item->getWorkflow() !== $this) { throw new \RuntimeException('Invalid item Workflow', 999999); } if (!$item->getId()) { throw new \RuntimeException('Empty item Id', 999999); } if (!is_int($item->getId()) || $this->getItemById($item->getId()) !== null) { throw new \RuntimeException('Invalid item Id', 999999); } $items[] = $item; $this->setItems($items); } return $this; } /** * @param \Change\Workflow\Interfaces\WorkflowItem[] $items */ protected function setItems(array $items) { $this->items = $items; } /** * @return $this */ protected function serializeItems() { if ($this->items !== null) { $s = new \Rbs\Workflow\Std\Serializer(); $array = $s->serializeItems($this->items); $this->setItemsData(count($array) ? $array : null); } return $this; } /** * @return boolean */ public function isValid() { $validator = new Validator(); try { $validator->isValid($this); } catch (\Exception $e) { $this->setErrors($e->getMessage()); return false; } $this->setErrors(null); return true; } public function reset() { parent::reset(); $this->items = null; } protected function onCreate() { $this->serializeItems(); } protected function onUpdate() { $this->serializeItems(); } /** * @return \Rbs\Workflow\Documents\WorkflowInstance */ public function createWorkflowInstance() { /* @var $workflowInstance \Rbs\Workflow\Documents\WorkflowInstance */ $workflowInstance = $this->getDocumentManager()->getNewDocumentInstanceByModelName('Rbs_Workflow_WorkflowInstance'); $workflowInstance->setWorkflow($this); return $workflowInstance; } /** * @param \Change\Documents\Events\Event $event */ public function onDefaultUpdateRestResult(\Change\Documents\Events\Event $event) { parent::onDefaultUpdateRestResult($event); $document = $event->getDocument(); if (!$document instanceof Workflow) { return; } $restResult = $event->getParam('restResult'); if ($restResult instanceof \Change\Http\Rest\V1\Resources\DocumentResult) { $restResult->removeRelAction('delete'); } elseif ($restResult instanceof \Change\Http\Rest\V1\Resources\DocumentLink) { $restResult->removeRelAction('delete'); } } }
intportg/Change
Plugins/Modules/Rbs/Workflow/Documents/Workflow.php
PHP
mpl-2.0
5,317
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 9385, 1006, 1039, 1007, 2297, 3201, 2449, 2291, 1008, 1008, 2023, 3120, 3642, 2433, 2003, 3395, 2000, 1996, 3408, 1997, 1996, 9587, 5831, 4571, 2270, 1008, 6105, 1010, 1058, 1012, 1016, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package BusinessLogic.ConnectionStates; import BusinessLogic.ActualConnection; import BusinessLogic.Message; public class MessageMenuState implements ConnectionState{ public void dial(String key, ActualConnection connection) { if (key.equals("1")) { String output = ""; Message m = connection.currentMailbox.getCurrentMessage(); if (m == null) output += "No messages." + "\n"; else output += m.getText() + "\n"; output += ActualConnection.MESSAGE_MENU_TEXT; connection.speakToAllUIs(output); } else if (key.equals("2")) { connection.currentMailbox.saveCurrentMessage(); connection.speakToAllUIs(ActualConnection.MESSAGE_MENU_TEXT); } else if (key.equals("3")) { connection.currentMailbox.removeCurrentMessage(); connection.speakToAllUIs(ActualConnection.MESSAGE_MENU_TEXT); } else if (key.equals("4")) { //connection.state = Connection.MAILBOX_MENU; connection.currentState = new MailBoxMenuState(); connection.speakToAllUIs(ActualConnection.MAILBOX_MENU_TEXT); } } public int getState(){ return 4; } }
PatriciaRosembluth/VoiceMailSimulator
src/BusinessLogic/ConnectionStates/MessageMenuState.java
Java
mit
1,243
[ 30522, 7427, 2449, 27179, 1012, 7264, 12259, 2015, 1025, 12324, 2449, 27179, 1012, 5025, 8663, 2638, 7542, 1025, 12324, 2449, 27179, 1012, 4471, 1025, 2270, 2465, 4471, 3549, 19966, 3686, 22164, 7264, 12259, 1063, 2270, 11675, 13764, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations under * the License. * * The Original Code is OpenELIS code. * * Copyright (C) The Minnesota Department of Health. All Rights Reserved. */ package us.mn.state.health.lims.result.action; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.beanutils.PropertyUtils; import org.apache.struts.Globals; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessages; import us.mn.state.health.lims.analysis.dao.AnalysisDAO; import us.mn.state.health.lims.analysis.daoimpl.AnalysisDAOImpl; import us.mn.state.health.lims.analysis.valueholder.Analysis; import us.mn.state.health.lims.common.action.BaseAction; import us.mn.state.health.lims.common.action.BaseActionForm; import us.mn.state.health.lims.common.exception.LIMSRuntimeException; import us.mn.state.health.lims.common.log.LogEvent; import us.mn.state.health.lims.common.util.DateUtil; import us.mn.state.health.lims.common.util.StringUtil; import us.mn.state.health.lims.common.util.SystemConfiguration; import us.mn.state.health.lims.common.util.validator.ActionError; import us.mn.state.health.lims.dictionary.dao.DictionaryDAO; import us.mn.state.health.lims.dictionary.daoimpl.DictionaryDAOImpl; import us.mn.state.health.lims.dictionary.valueholder.Dictionary; import us.mn.state.health.lims.login.dao.UserTestSectionDAO; import us.mn.state.health.lims.login.daoimpl.UserTestSectionDAOImpl; import us.mn.state.health.lims.note.dao.NoteDAO; import us.mn.state.health.lims.note.daoimpl.NoteDAOImpl; import us.mn.state.health.lims.note.valueholder.Note; import us.mn.state.health.lims.patient.dao.PatientDAO; import us.mn.state.health.lims.patient.daoimpl.PatientDAOImpl; import us.mn.state.health.lims.patient.valueholder.Patient; import us.mn.state.health.lims.person.dao.PersonDAO; import us.mn.state.health.lims.person.daoimpl.PersonDAOImpl; import us.mn.state.health.lims.person.valueholder.Person; import us.mn.state.health.lims.referencetables.valueholder.ReferenceTables; import us.mn.state.health.lims.result.dao.ResultDAO; import us.mn.state.health.lims.result.daoimpl.ResultDAOImpl; import us.mn.state.health.lims.result.valueholder.Result; import us.mn.state.health.lims.result.valueholder.ResultsEntryTestResultComparator; import us.mn.state.health.lims.result.valueholder.Sample_TestAnalyte; import us.mn.state.health.lims.result.valueholder.TestAnalyte_TestResults; import us.mn.state.health.lims.sample.dao.SampleDAO; import us.mn.state.health.lims.sample.daoimpl.SampleDAOImpl; import us.mn.state.health.lims.sample.valueholder.Sample; import us.mn.state.health.lims.samplehuman.dao.SampleHumanDAO; import us.mn.state.health.lims.samplehuman.daoimpl.SampleHumanDAOImpl; import us.mn.state.health.lims.samplehuman.valueholder.SampleHuman; import us.mn.state.health.lims.sampleitem.dao.SampleItemDAO; import us.mn.state.health.lims.sampleitem.daoimpl.SampleItemDAOImpl; import us.mn.state.health.lims.sampleitem.valueholder.SampleItem; import us.mn.state.health.lims.sampleorganization.dao.SampleOrganizationDAO; import us.mn.state.health.lims.sampleorganization.daoimpl.SampleOrganizationDAOImpl; import us.mn.state.health.lims.sampleorganization.valueholder.SampleOrganization; import us.mn.state.health.lims.test.dao.TestDAO; import us.mn.state.health.lims.test.daoimpl.TestDAOImpl; import us.mn.state.health.lims.test.valueholder.Test; import us.mn.state.health.lims.test.valueholder.TestComparator; import us.mn.state.health.lims.test.valueholder.TestSectionComparator; import us.mn.state.health.lims.testanalyte.dao.TestAnalyteDAO; import us.mn.state.health.lims.testanalyte.daoimpl.TestAnalyteDAOImpl; import us.mn.state.health.lims.testanalyte.valueholder.TestAnalyte; import us.mn.state.health.lims.testresult.dao.TestResultDAO; import us.mn.state.health.lims.testresult.daoimpl.TestResultDAOImpl; import us.mn.state.health.lims.testresult.valueholder.TestResult; /** * @author diane benz * //AIS - bugzilla 1863 * //AIS - bugzilla 1891 * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. To enable and disable the creation of type * comments go to Window>Preferences>Java>Code Generation. * bugzilla 1992 - cleanup (remove counter definitions to stay consistent) * bugzilla 2614 - fix to work for NB samples */ public class BatchResultsEntryViewAction extends BaseAction { private boolean isNew = false; protected ActionForward performAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // The first job is to determine if we are coming to this action with an // ID parameter in the request. If there is no parameter, we are // creating a new Result. // If there is a parameter present, we should bring up an existing // Result to edit. String id = request.getParameter(ID); String forward = FWD_SUCCESS; request.setAttribute(ALLOW_EDITS_KEY, "true"); request.setAttribute(PREVIOUS_DISABLED, "true"); request.setAttribute(NEXT_DISABLED, "true"); BaseActionForm dynaForm = (BaseActionForm) form; //bugzilla 2028 sub bugzilla 2036 if coming back from Qa Events selectedTestId will be request parameter //bugzilla 2053 naming of static variable changed String selectedTestId = (String)request.getParameter("QA_EVENTS_ENTRY_ROUTING_FROM_BATCH_RESULTS_ENTRY_PARAM_TEST_ID");; if (StringUtil.isNullorNill(selectedTestId)) { selectedTestId = (String) dynaForm.get("selectedTestId"); } String receivedDateForDisplay = (String) dynaForm .get("receivedDateForDisplay"); String currentDate = (String) dynaForm.get("currentDate"); List testSections = (List) dynaForm.get("testSections"); List tests = (List) dynaForm.get("tests"); //bugzilla 2379 String selectedTestSectionId = (String)dynaForm.get("selectedTestSectionId"); //bugzilla 2379 TestDAO testDAO = new TestDAOImpl(); UserTestSectionDAO userTestSectionDAO = new UserTestSectionDAOImpl(); if (!StringUtil.isNullorNill(selectedTestSectionId)) { tests = testDAO.getTestsByTestSection(selectedTestSectionId); } else { testSections = userTestSectionDAO.getAllUserTestSections(request); tests = userTestSectionDAO.getAllUserTests(request, true); } ActionMessages errors = null; // bugzilla #1346 add ability to hover over accession number and // view patient/person information (first and last name and external id) //bugzilla 1387 renamed so more generic //bugzilla 2614 allow for NB domain samples // initialize the form dynaForm.initialize(mapping); List sample_Tas = new ArrayList(); List sample_Tasv = new ArrayList(); List sample_Tasvt = new ArrayList(); List testAnalyte_TestResults = new ArrayList(); if (!StringUtil.isNullorNill(selectedTestId)) { Test test = new Test(); test.setId(selectedTestId); testDAO.getData(test); List testAnalytes = new ArrayList(); TestAnalyteDAO testAnalyteDAO = new TestAnalyteDAOImpl(); testAnalytes = testAnalyteDAO.getAllTestAnalytesPerTest(test); try { List analyses = new ArrayList(); AnalysisDAO analysisDAO = new AnalysisDAOImpl(); //bugzilla 2227 analyses = analysisDAO.getAllMaxRevisionAnalysesPerTest(test); SampleDAO sampleDAO = new SampleDAOImpl(); ResultDAO resultDAO = new ResultDAOImpl(); PatientDAO patientDAO = new PatientDAOImpl(); PersonDAO personDAO = new PersonDAOImpl(); SampleItemDAO sampleItemDAO = new SampleItemDAOImpl(); SampleHumanDAO sampleHumanDAO = new SampleHumanDAOImpl(); SampleOrganizationDAO sampleOrganizationDAO = new SampleOrganizationDAOImpl(); NoteDAO noteDAO = new NoteDAOImpl(); Patient patient = new Patient(); Person person = new Person(); SampleHuman sampleHuman = new SampleHuman(); SampleOrganization sampleOrganization = new SampleOrganization(); Analysis analysis = null; SampleItem sampleItem = null; //bugzilla 2227 String sampleHasTestRevisions = "false"; for (int i = 0; i < analyses.size(); i++) { analysis = (Analysis) analyses.get(i); //bugzilla 2227 sampleHasTestRevisions = "false"; //bugzilla 1942 status results verified changed to released (logic is to say if analysis status is not yet released then go ahead) if(!StringUtil.isNullorNill(analysis.getStatus()) && !analysis.getStatus().equals(SystemConfiguration.getInstance() .getAnalysisStatusReleased()) ) { sampleItem = (SampleItem) analysis.getSampleItem(); //System.out.println("This is sampleItem " + sampleItem); if (sampleItem != null) { //bugzilla 1773 need to store sample not sampleId for use in sorting String sampleId = sampleItem.getSample().getId(); Sample sample = new Sample(); //bgm - bugzilla 1639 check sampleId first before using... if(sampleId !=null){ sample.setId(sampleId); sampleDAO.getData(sample); //bugzilla 2227 if (!analysis.getRevision().equals("0")) { sampleHasTestRevisions = "true"; } // bugzilla #1346 add ability to hover over accession // number and // view patient/person information (first and last name // and external id) //bugzilla 2614 allow for NB domain samples // bugzilla #1346 add ability to hover over // accession number and // view patient/person information (first and last // name and external id) if (!StringUtil.isNullorNill(sample.getId())) { //bugzilla 2252 sampleHuman = new SampleHuman(); patient = new Patient(); person = new Person(); sampleHuman.setSampleId(sample.getId()); sampleHumanDAO.getDataBySample(sampleHuman); sampleOrganization.setSample(sample); sampleOrganizationDAO.getDataBySample(sampleOrganization); if(sampleHuman !=null){ patient.setId(sampleHuman.getPatientId()); if(patient.getId() !=null) { patientDAO.getData(patient); person = patient.getPerson(); personDAO.getData(person); } } Sample_TestAnalyte sample_Ta = new Sample_TestAnalyte(); Sample_TestAnalyte sample_Tav = new Sample_TestAnalyte(); Sample_TestAnalyte sample_Tavt = new Sample_TestAnalyte(); // System.out.println("This is // sample.getReceivedDate " // + sample.getReceivedDate()); // System.out.println("This is // receivedDateForDisplay " // + receivedDateForDisplay); String locale = SystemConfiguration.getInstance() .getDefaultLocale().toString(); java.sql.Date convertedReceivedDate = DateUtil.convertStringDateToSqlDate( receivedDateForDisplay, locale); if (sample.getReceivedDate().equals(convertedReceivedDate) || StringUtil.isNullorNill(receivedDateForDisplay)) { // exclude samples for which results have been // entered // (status code?? in analysis or sample) sample_Ta.setSample(sample); // bugzilla #1346 add ability to hover over // accession number and // view patient/person information (first and // last name and external id) // display N/A if no first, last name if (person.getFirstName() == null && person.getLastName() == null) { person.setFirstName(NOT_APPLICABLE); person.setLastName(BLANK); } if (person.getFirstName() != null && person.getLastName() == null) { person.setLastName(BLANK); } if (person.getFirstName() == null && person.getLastName() != null) { person.setFirstName(BLANK); } sample_Ta.setPerson(person); // display N/A if no externalId if (patient.getExternalId() == null) { patient.setExternalId(NOT_APPLICABLE); } sample_Ta.setPatient(patient); sample_Ta.setAnalysis(analysis); sample_Ta.setTestAnalytes(testAnalytes); List results = new ArrayList(); List resultValues = new ArrayList(); List resultValuesn = new ArrayList(); List resultValuest = new ArrayList(); List resultIds = new ArrayList(); List resultLastupdatedList = new ArrayList(); List sampleResultHasNotesList = new ArrayList(); for (int j = 0; j < testAnalytes.size(); j++) { TestAnalyte ta = (TestAnalyte) testAnalytes .get(j); Result result = new Result(); resultDAO.getResultByAnalysisAndAnalyte( result, analysis, ta); if (result != null) { if (result.getTestResult() != null) { resultIds.add(result.getId()); TestResult tr = result .getTestResult(); String trId = tr.getId(); results.add(trId); if (tr.getTestResultType().equalsIgnoreCase(SystemConfiguration.getInstance().getNumericType())){ resultValues.add(result.getValue()); resultValuesn.add(result.getValue()); resultValuest.add(""); }else if(tr.getTestResultType().equalsIgnoreCase(SystemConfiguration.getInstance().getTiterType())){ String resultValue = result.getValue(); resultValue = resultValue.substring(2,resultValue.length()); resultValues.add(resultValue); resultValuest.add(resultValue); resultValuesn.add(""); }else{ resultValues.add(""); resultValuesn.add(""); resultValuest.add(""); } resultLastupdatedList.add(result .getLastupdated()); } else { results.add(""); resultIds.add("0"); resultValues.add(""); resultValuesn.add(""); resultValuest.add(""); resultLastupdatedList .add(new Timestamp( System.currentTimeMillis())); } } else { results.add(""); resultIds.add("0"); resultValues.add(""); resultValuesn.add(""); resultValuest.add(""); resultLastupdatedList .add(new Timestamp( System.currentTimeMillis())); } // bugzilla 1942 now get the Notes for this result if // exist/ we need to know about notes on batch result entry // in order to determine whether an existing result is allowed to be deleted if (result != null && result.getTestResult() != null) { Note note = new Note(); List notesByResult = new ArrayList(); note.setReferenceId(result.getId()); //bugzilla 1922 //bugzilla 2571 go through ReferenceTablesDAO to get reference tables info ReferenceTables referenceTables = new ReferenceTables(); referenceTables.setId(SystemConfiguration .getInstance() .getResultReferenceTableId()); //bugzilla 2571 go through ReferenceTablesDAO to get reference tables info note .setReferenceTables(referenceTables); notesByResult = noteDAO .getAllNotesByRefIdRefTable(note); if (notesByResult != null && notesByResult.size() > 0) { sampleResultHasNotesList.add(true); } else { sampleResultHasNotesList.add(false); } } else {//no result sampleResultHasNotesList.add(false); } //END 1942 } sample_Ta.setSampleTestResultIds(results); sample_Ta.setResultLastupdatedList(resultLastupdatedList); sample_Ta.setTestResultValues(resultValues); sample_Ta.setResultIds(resultIds); sample_Ta.setResultHasNotesList(sampleResultHasNotesList); //bugzilla 2227 sample_Ta.setSampleHasTestRevisions(sampleHasTestRevisions); sample_Tav.setTestResultValues(resultValuesn); sample_Tavt.setTestResultValues(resultValuest); sample_Tas.add(sample_Ta); sample_Tasv.add(sample_Tav); sample_Tasvt.add(sample_Tavt); } } // bugzilla #1346 add ability to hover over // accession number and // view patient/person information (first and last // name and external id) } } }//end if analysisStatus check }//end for loop // Load list of TestAnalyte_TestResults for display TestResultDAO testResultDAO = new TestResultDAOImpl(); DictionaryDAO dictDAO = new DictionaryDAOImpl(); TestAnalyte ta = null; TestAnalyte_TestResults ta_Trs = null; List listOfTestResults = null; for (int i = 0; i < testAnalytes.size(); i++) { ta = (TestAnalyte) testAnalytes.get(i); ta_Trs = new TestAnalyte_TestResults(); ta_Trs.setTestAnalyte(ta); listOfTestResults = new ArrayList(); listOfTestResults = testResultDAO .getTestResultsByTestAndResultGroup(ta); // fill in dictionary values for (int j = 0; j < listOfTestResults.size(); j++) { TestResult tr = (TestResult) listOfTestResults.get(j); if (tr.getTestResultType().equals( SystemConfiguration.getInstance() .getDictionaryType())) { // get from dictionary Dictionary dictionary = new Dictionary(); dictionary.setId(tr.getValue()); dictDAO.getData(dictionary); //bugzilla 1847: use dictEntryDisplayValue tr.setValue(dictionary.getDictEntryDisplayValue()); } } //bugzilla 1845 Collections.sort(listOfTestResults, ResultsEntryTestResultComparator.SORTORDER_VALUE_COMPARATOR); ta_Trs.setTestResults(listOfTestResults); testAnalyte_TestResults.add(ta_Trs); } } catch (LIMSRuntimeException lre) { // if error then forward to fail and don't update to blank // page // = false //bugzilla 2154 LogEvent.logError("BatchResultsEntryViewAction","performAction()",lre.toString()); errors = new ActionMessages(); ActionError error = null; error = new ActionError("errors.GetException", null, null); errors.add(ActionMessages.GLOBAL_MESSAGE, error); saveErrors(request, errors); request.setAttribute(Globals.ERROR_KEY, errors); request.setAttribute(ALLOW_EDITS_KEY, "false"); return mapping.findForward(FWD_FAIL); } } // #1347 sort dropdown values Collections.sort(testSections, TestSectionComparator.NAME_COMPARATOR); //bugzilla 1844 Collections.sort(tests, TestComparator.DESCRIPTION_COMPARATOR); PropertyUtils.setProperty(form, "sample_TestAnalytes", sample_Tas); PropertyUtils.setProperty(form, "resultValueN", sample_Tasv); PropertyUtils.setProperty(form, "resultValueT", sample_Tasvt); PropertyUtils.setProperty(form, "testAnalyte_TestResults", testAnalyte_TestResults); PropertyUtils.setProperty(form, "selectedTestId", selectedTestId); //bugzilla 2379 PropertyUtils.setProperty(form, "selectedTestSectionId", selectedTestSectionId); PropertyUtils.setProperty(form, "receivedDateForDisplay", receivedDateForDisplay); PropertyUtils.setProperty(form, "tests", tests); PropertyUtils.setProperty(form, "testSections", testSections); PropertyUtils.setProperty(form, "currentDate", currentDate); return mapping.findForward(forward); } protected String getPageTitleKey() { if (isNew) { return "batchresultsentry.add.title"; } else { return "batchresultsentry.edit.title"; } } protected String getPageSubtitleKey() { if (isNew) { return "batchresultsentry.add.subtitle"; } else { return "batchresultsentry.edit.subtitle"; } } }
pfschwartz/openelisglobal-core
app/src/us/mn/state/health/lims/result/action/BatchResultsEntryViewAction.java
Java
mpl-2.0
20,712
[ 30522, 1013, 1008, 1008, 1008, 1996, 8417, 1997, 2023, 5371, 2024, 3395, 2000, 1996, 9587, 5831, 4571, 2270, 6105, 1008, 2544, 1015, 1012, 1015, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * Чистый Шаблон для разработки * Шаблон вывода поста * http://dontforget.pro * @package WordPress * @subpackage clean */ get_header(); // Подключаем хедер?> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?> <h1><?php the_title(); // Заголовок ?></h1> <?php the_content(); // Содержимое страницы ?> <?php echo 'Рубрики: '; the_category( ' | ' ); // Выводим категории поста ?> <?php the_tags( 'Тэги: ', ' | ', '' ); // Выводим тэги(метки) поста ?> <?php endwhile; // Конец цикла ?> <?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); // Ссылка на предидущий пост?> <?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); // Ссылка на следующий пост?> <?php comments_template( '', true ); // Комментарии ?> <?php get_sidebar(); // Подключаем сайдбар ?> <?php get_footer(); // Подключаем футер ?>
lexus65/yummy.loc
wp-content/themes/yummy-theme/single.php
PHP
gpl-2.0
1,240
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1202, 10325, 29747, 22919, 29113, 10325, 1203, 10260, 29740, 29436, 14150, 18947, 1184, 29436, 17432, 1195, 10260, 29744, 16856, 10260, 29740, 14150, 22919, 23925, 10325, 1008, 1203, 10260, 2974...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// This is a generated file. Not intended for manual editing. package io.v.vdl.psi.impl; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import static io.v.vdl.psi.VdlTypes.*; import io.v.vdl.psi.*; public class VdlFunctionLitImpl extends VdlExpressionImpl implements VdlFunctionLit { public VdlFunctionLitImpl(ASTNode node) { super(node); } public void accept(@NotNull VdlVisitor visitor) { visitor.visitFunctionLit(this); } public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof VdlVisitor) accept((VdlVisitor)visitor); else super.accept(visitor); } @Override @Nullable public VdlBlock getBlock() { return findChildByClass(VdlBlock.class); } @Override @Nullable public VdlSignature getSignature() { return findChildByClass(VdlSignature.class); } @Override @NotNull public PsiElement getFunc() { return findNotNullChildByType(FUNC); } }
vanadium/intellij-vdl-plugin
gen/io/v/vdl/psi/impl/VdlFunctionLitImpl.java
Java
bsd-3-clause
1,102
[ 30522, 1013, 1013, 2023, 2003, 1037, 7013, 5371, 1012, 2025, 3832, 2005, 6410, 9260, 1012, 7427, 22834, 1012, 1058, 1012, 1058, 19422, 1012, 17816, 1012, 17727, 2140, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 2862, 1025, 12324, 8917, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * gmpy_mpz_prp.h * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Python interface to the GMP or MPIR, MPFR, and MPC multiple precision * * libraries. * * * * Copyright 2012 - 2022 Case Van Horsen * * * * This file is part of GMPY2. * * * * GMPY2 is free software: you can redistribute it and/or modify it under * * the terms of the GNU Lesser General Public License as published by the * * Free Software Foundation, either version 3 of the License, or (at your * * option) any later version. * * * * GMPY2 is distributed in the hope that it will be useful, but WITHOUT * * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * * License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with GMPY2; if not, see <http://www.gnu.org/licenses/> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef GMPY_PRP_H #define GMPY_PRP_H #ifdef __cplusplus extern "C" { #endif static PyObject * GMPY_mpz_is_fermat_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_euler_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_strong_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_fibonacci_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_lucas_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_stronglucas_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_extrastronglucas_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_selfridge_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_strongselfridge_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_bpsw_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_strongbpsw_prp(PyObject *self, PyObject *args); #ifdef __cplusplus } #endif #endif
aleaxit/gmpy
src/gmpy_mpz_prp.h
C
lgpl-3.0
2,732
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// This file was procedurally generated from the following sources: // - src/dstr-assignment/obj-id-init-assignment-missing.case // - src/dstr-assignment/default/assignment-expr.template /*--- description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference (no corresponding property defined). (AssignmentExpression) esid: sec-variable-statement-runtime-semantics-evaluation es6id: 13.3.2.4 features: [destructuring-binding] flags: [generated] info: | VariableDeclaration : BindingPattern Initializer 1. Let rhs be the result of evaluating Initializer. 2. Let rval be GetValue(rhs). 3. ReturnIfAbrupt(rval). 4. Return the result of performing BindingInitialization for BindingPattern passing rval and undefined as arguments. ---*/ var x; var result; var vals = {}; result = { x = 1 } = vals; assert.sameValue(x, 1); assert.sameValue(result, vals);
sebastienros/jint
Jint.Tests.Test262/test/language/expressions/assignment/dstr-obj-id-init-assignment-missing.js
JavaScript
bsd-2-clause
963
[ 30522, 1013, 1013, 2023, 5371, 2001, 24508, 2135, 7013, 2013, 1996, 2206, 4216, 1024, 1013, 1013, 1011, 5034, 2278, 1013, 16233, 16344, 1011, 8775, 1013, 27885, 3501, 1011, 8909, 1011, 1999, 4183, 1011, 8775, 1011, 4394, 1012, 2553, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
'use strict'; var packager = require('electron-packager'); var options = { 'arch': 'ia32', 'platform': 'win32', 'dir': './', 'app-copyright': 'Paulo Galdo', 'app-version': '2.2.5', 'asar': true, 'icon': './app.ico', 'name': 'TierraDesktop', 'out': './releases', 'overwrite': true, 'prune': true, 'version': '1.4.13', 'version-string': { 'CompanyName': 'Paulo Galdo', 'FileDescription': 'Tierra de colores', /*This is what display windows on task manager, shortcut and process*/ 'OriginalFilename': 'TierraDesktop', 'ProductName': 'Tierra de colores', 'InternalName': 'TierraDesktop' } }; packager(options, function done_callback(err, appPaths) { console.log("Error: ", err); console.log("appPaths: ", appPaths); });
CosmicaJujuy/TierraDesktop
elec.js
JavaScript
cc0-1.0
847
[ 30522, 1005, 2224, 9384, 1005, 1025, 13075, 7427, 2099, 1027, 5478, 1006, 1005, 10496, 1011, 7427, 2099, 1005, 1007, 1025, 13075, 7047, 1027, 1063, 1005, 7905, 1005, 1024, 1005, 24264, 16703, 1005, 1010, 1005, 4132, 1005, 1024, 1005, 2663, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<p ng-message="maxlength">Занадто довге поле.</p> <p ng-message="required">Це поле є обов'язковим.</p> <p ng-message="email">Некоректна електронна пошта.</p> <p ng-message="pattern">Некоректні дані.</p> <p ng-message="availableEmail">Користувач із такою електронною поштою вже зареєстрований.</p> <p ng-message="availableNickname">Користувач із таким псевдонімом вже зареєстрований.</p> <p ng-message="minlength">Занадто коротке поле.</p> <p ng-message="compareTo">Паролі не співпадають.</p>
v-knyagnitskiy/EcoMap
ecomap/www/templates/error_msgs.html
HTML
gpl-3.0
698
[ 30522, 1026, 1052, 12835, 1011, 4471, 1027, 1000, 4098, 7770, 13512, 2232, 1000, 1028, 1187, 28995, 10260, 29742, 22919, 14150, 1184, 19259, 29741, 15290, 1194, 14150, 29436, 15290, 1012, 1026, 1013, 1052, 1028, 1026, 1052, 12835, 1011, 4471,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/********************************************************************** * This file is part of Search and Rescue II (SaR2). * * * * SaR2 is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License v.2 as * * published by the Free Software Foundation. * * * * SaR2 is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * * the GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with SaR2. If not, see <http://www.gnu.org/licenses/>. * ***********************************************************************/ #include <string.h> #include <stdlib.h> #include <sys/types.h> #ifdef __MSW__ # include <windows.h> #endif #include <GL/gl.h> #include "../include/string.h" #include "v3dtex.h" #include "gw.h" #include "stategl.h" #include "image.h" #include "menu.h" #include "sar.h" /* For cur_millitime */ static sar_menu_map_marking_struct *SARMenuMapMatchMarkingPosition( gw_display_struct *display, sar_menu_map_struct *map, int x, int y, int start_marking_num, int *matched_marking_num ); sar_menu_map_marking_struct *SARMenuMapGetMarkingPtr( sar_menu_map_struct *map, int i ); int SARMenuMapNew( sar_menu_struct *m, float x, float y, float width, float height, GWFont *font, sar_menu_color_struct *color, const sar_image_struct **bg_image, /* Total 9 images */ float scroll_x, float scroll_y, float m_to_pixels_coeff, int show_markings_policy ); int SARMenuMapAppendMarking( sar_menu_map_struct *map, int type, /* One of SAR_MENU_MAP_MARKING_TYPE_* */ const sar_menu_color_struct *fg_color, float x, float y, /* In meters */ float x_end, float y_end, /* In meters (for intercept line) */ const sar_image_struct *icon, /* Shared icon image */ const char *desc ); void SARMenuMapDeleteAllMarkings(sar_menu_map_struct *map); void SARMenuMapMarkingSelectNext( sar_menu_map_struct *map, Boolean allow_warp ); void SARMenuMapMarkingSelectPrev( sar_menu_map_struct *map, Boolean allow_warp ); void SARMenuMapDraw( gw_display_struct *display, sar_menu_struct *m, sar_menu_map_struct *map, int map_num ); int SARMenuMapManagePointer( gw_display_struct *display, sar_menu_struct *m, sar_menu_map_struct *map, int menu_obj_num, int x, int y, gw_event_type type, int btn_num ); #define ATOI(s) (((s) != NULL) ? atoi(s) : 0) #define ATOL(s) (((s) != NULL) ? atol(s) : 0) #define ATOF(s) (((s) != NULL) ? atof(s) : 0.0f) #define STRDUP(s) (((s) != NULL) ? strdup(s) : NULL) #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #define CLIP(a,l,h) (MIN(MAX((a),(l)),(h))) #define STRLEN(s) (((s) != NULL) ? ((int)strlen(s)) : 0) /* * Default spacings (in pixels): * * These values should match and coenciding values in menu.c. */ #define DEF_XMARGIN 5 #define DEF_YMARGIN 5 #define DEF_WIDTH 100 #define DEF_HEIGHT 100 #define DO_REDRAW_MENU(d,m) { \ SARMenuDrawAll((d), (m)); \ GWSwapBuffer(d); \ } #define DO_REDRAW_OBJECT(d,m,n) { \ if((m)->always_full_redraw) \ SARMenuDrawAll((d), (m)); \ else \ SARMenuDrawObject((d),(m),(n)); \ GWSwapBuffer(d); \ } /* * Returns the matched marking pointer at the given position * in window coordinates relative to the upper left origin. * * Returns NULL on failed match. * * The search will start at the marking index specified by * start_marking_num and returns the first match. */ static sar_menu_map_marking_struct *SARMenuMapMatchMarkingPosition( gw_display_struct *display, sar_menu_map_struct *map, int x, int y, int start_marking_num, int *matched_marking_num ) { int i, width, height; int tolor_x, tolor_y; int marking_xp, marking_yp; int scroll_xp, scroll_yp; int map_wp, map_hp, map_xp_cen, map_yp_cen, map_xp_min, map_yp_min, map_xp_max, map_yp_max; float mtop_coeff; sar_menu_map_marking_struct *marking_ptr; const sar_image_struct *icon; if(matched_marking_num != NULL) *matched_marking_num = -1; if(map == NULL) return(NULL); GWContextGet( display, GWContextCurrent(display), NULL, NULL, NULL, NULL, &width, &height ); /* Bounds of map object on menu in pixels */ map_xp_cen = (int)(map->x * width); map_yp_cen = (int)(map->y * height); map_wp = (int)(map->width * width); map_hp = (int)(map->height * height); if((map_wp <= 0) || (map_hp <= 0)) return(NULL); map_xp_min = MAX(map_xp_cen - (map_wp / 2), 0); map_yp_min = MAX(map_yp_cen - (map_hp / 2), 0); map_xp_max = map_xp_min + map_wp; map_yp_max = map_yp_min + map_hp; /* Flip given y coordinate */ y = (map_hp - (y - map_yp_min)) + map_yp_min; mtop_coeff = map->m_to_pixels_coeff; scroll_xp = map->scroll_x; scroll_yp = map->scroll_y; /* Iterate through markings on the map object */ for(i = start_marking_num; i < map->total_markings; i++) { marking_ptr = map->marking[i]; if(marking_ptr == NULL) continue; /* Calculate marking position in pixels */ marking_xp = (int)((marking_ptr->x * mtop_coeff) + map_xp_cen + scroll_xp); marking_yp = (int)((marking_ptr->y * mtop_coeff) + map_yp_cen + scroll_yp); /* Get icon of marking (if any) */ icon = marking_ptr->icon; if(icon == NULL) { tolor_x = 5; tolor_y = 5; } else { tolor_x = icon->width / 2; tolor_y = icon->height / 2; } /* Given coordinates in bound with tolorance applied to * marking position? */ if(((marking_xp - tolor_x) < x) && ((marking_xp + tolor_x) > x) && ((marking_yp - tolor_y) < y) && ((marking_yp + tolor_y) > y) ) { if(matched_marking_num != NULL) *matched_marking_num = i; return(marking_ptr); } } return(NULL); } /* * Returns the pointer to the marking specified by the index i * on the given map object. */ sar_menu_map_marking_struct *SARMenuMapGetMarkingPtr( sar_menu_map_struct *map, int i ) { if(map == NULL) return(NULL); if((i < 0) || (i >= map->total_markings)) return(NULL); else return(map->marking[i]); } /* * Creates a map object on menu m, returns the index number of * the map object or -1 on failure. */ int SARMenuMapNew( sar_menu_struct *m, float x, float y, float width, float height, GWFont *font, sar_menu_color_struct *color, const sar_image_struct **bg_image, /* Total 9 images */ float scroll_x, float scroll_y, float m_to_pixels_coeff, int show_markings_policy ) { int i, n; sar_menu_map_struct *map; if(m == NULL) return(-1); if(m->total_objects < 0) m->total_objects = 0; for(i = 0; i < m->total_objects; i++) { if(m->object[i] == NULL) break; } if(i < m->total_objects) { n = i; } else { n = m->total_objects; m->total_objects = n + 1; m->object = (void **)realloc( m->object, m->total_objects * sizeof(void *) ); if(m->object == NULL) { m->total_objects = 0; return(-1); } } /* Allocate structure */ m->object[n] = map = SAR_MENU_MAP(calloc( 1, sizeof(sar_menu_map_struct) )); if(map == NULL) return(-1); /* Set map values */ map->type = SAR_MENU_OBJECT_TYPE_MAP; map->x = x; map->y = y; map->width = width; map->height = height; map->sensitive = True; map->font = font; if(color != NULL) memcpy(&map->color, color, sizeof(sar_menu_color_struct)); map->show_markings_policy = show_markings_policy; map->bg_image = bg_image; map->scroll_x = (int)(-scroll_x * m_to_pixels_coeff); map->scroll_y = (int)(-scroll_y * m_to_pixels_coeff); map->m_to_pixels_coeff = m_to_pixels_coeff; map->marking = NULL; map->total_markings = 0; map->selected_marking = -1; return(n); } /* * Appends a new marking to the given map object. * * Returns the new marking index or -1 on error. */ int SARMenuMapAppendMarking( sar_menu_map_struct *map, int type, /* One of SAR_MENU_MAP_MARKING_TYPE_* */ const sar_menu_color_struct *fg_color, float x, float y, /* In meters */ float x_end, float y_end, /* In meters (for intercept line) */ const sar_image_struct *icon, /* Shared icon image */ const char *desc ) { int i; sar_menu_map_marking_struct *marking_ptr; if(map == NULL) return(-1); i = MAX(map->total_markings, 0); map->total_markings = i + 1; map->marking = (sar_menu_map_marking_struct **)realloc( map->marking, map->total_markings * sizeof(sar_menu_map_marking_struct *) ); if(map->marking == NULL) { map->total_markings = 0; return(-1); } map->marking[i] = marking_ptr = SAR_MENU_MAP_MARKING(calloc( 1, sizeof(sar_menu_map_marking_struct) )); if(marking_ptr == NULL) return(-1); marking_ptr->type = type; if(fg_color != NULL) memcpy(&marking_ptr->fg_color, fg_color, sizeof(sar_menu_color_struct)); marking_ptr->x = x; marking_ptr->y = y; marking_ptr->x_end = x_end; marking_ptr->y_end = y_end; marking_ptr->icon = icon; marking_ptr->desc = STRDUP(desc); return(i); } /* * Delete all map markings on map object. */ void SARMenuMapDeleteAllMarkings(sar_menu_map_struct *map) { int i; sar_menu_map_marking_struct *marking_ptr; if(map == NULL) return; /* Iterate through markings on map object */ for(i = 0; i < map->total_markings; i++) { marking_ptr = map->marking[i]; if(marking_ptr == NULL) continue; marking_ptr->icon = NULL; /* Shared */ free(marking_ptr->desc); marking_ptr->desc = NULL; free(marking_ptr); map->marking[i] = marking_ptr = NULL; } free(map->marking); map->marking = NULL; map->total_markings = 0; } /* * Selects the next marking on the given map object. */ void SARMenuMapMarkingSelectNext( sar_menu_map_struct *map, Boolean allow_warp ) { int i, passes, got_match = 0; sar_menu_map_marking_struct *marking_ptr; if(map == NULL) return; /* Marking can only be selected if marking show policy is set * to SAR_MENU_MAP_SHOW_MARKING_SELECTED. */ if(map->show_markings_policy != SAR_MENU_MAP_SHOW_MARKING_SELECTED) return; /* No markings? */ if(map->total_markings <= 0) return; i = map->selected_marking; for(passes = 0; passes < 2; passes++) { while(i < (map->total_markings - 1)) { i++; marking_ptr = SARMenuMapGetMarkingPtr(map, i); if(marking_ptr != NULL) { if(marking_ptr->desc != NULL) { got_match = 1; break; } } } if(got_match) break; /* Start from the beginning - 1 for one more pass */ if(allow_warp) i = -1; else break; } /* If a marking was matched then update selected marking as index i */ if(got_match) { map->selected_marking = i; /* Scroll to selected marking */ marking_ptr = SARMenuMapGetMarkingPtr( map, map->selected_marking ); if(marking_ptr != NULL) { map->scroll_x = (int)(-marking_ptr->x * map->m_to_pixels_coeff); map->scroll_y = (int)(-marking_ptr->y * map->m_to_pixels_coeff); } } } /* * Selects the previous marking on the given map object. */ void SARMenuMapMarkingSelectPrev( sar_menu_map_struct *map, Boolean allow_warp ) { int i, passes, got_match = 0; sar_menu_map_marking_struct *marking_ptr; if(map == NULL) return; /* Marking can only be selected if marking show policy is set * to SAR_MENU_MAP_SHOW_MARKING_SELECTED. */ if(map->show_markings_policy != SAR_MENU_MAP_SHOW_MARKING_SELECTED) return; /* No markings? */ if(map->total_markings <= 0) return; i = map->selected_marking; for(passes = 0; passes < 2; passes++) { while(i > 0) { i--; marking_ptr = SARMenuMapGetMarkingPtr(map, i); if(marking_ptr != NULL) { if(marking_ptr->desc != NULL) { got_match = 1; break; } } } if(got_match) break; /* Start from the end + 1 for one more pass */ if(allow_warp) i = map->total_markings; else break; } /* If a marking was matched then update selected marking as index i */ if(got_match) { map->selected_marking = i; /* Scroll to selected marking */ marking_ptr = SARMenuMapGetMarkingPtr( map, map->selected_marking ); if(marking_ptr != NULL) { map->scroll_x = (int)(-marking_ptr->x * map->m_to_pixels_coeff); map->scroll_y = (int)(-marking_ptr->y * map->m_to_pixels_coeff); } } } /* * Draws the map object. */ void SARMenuMapDraw( gw_display_struct *display, sar_menu_struct *m, sar_menu_map_struct *map, int map_num ) { int i, width, height; int scroll_xp, scroll_yp; int map_wp, map_hp, map_xp_cen, map_yp_cen, map_xp_min, map_yp_min, map_xp_max, map_yp_max; int marking_xp, marking_yp; float mtop_coeff; const sar_image_struct *image; v3d_texture_ref_struct *t; sar_menu_map_marking_struct *marking_ptr; if((display == NULL) || (m == NULL) || (map == NULL)) return; GWContextGet( display, GWContextCurrent(display), NULL, NULL, NULL, NULL, &width, &height ); mtop_coeff = map->m_to_pixels_coeff; scroll_xp = map->scroll_x; scroll_yp = map->scroll_y; /* Bounds of map object on menu in pixels */ map_xp_cen = (int)(map->x * width); map_yp_cen = (int)(map->y * height); map_wp = (int)(map->width * width); map_hp = (int)(map->height * height); if((map_wp < 1) || (map_hp < 1)) return; map_xp_min = MAX(map_xp_cen - (map_wp / 2), 0); map_yp_min = MAX(map_yp_cen - (map_hp / 2), 0); map_xp_max = map_xp_min + map_wp; map_yp_max = map_yp_min + map_hp; /* Convert all coordinates to lower-left origin for easy * OpenGL calculations. */ i = map_yp_max; map_yp_cen = MAX(height - map_yp_cen, 0); map_yp_max = MAX(height - map_yp_min, 0); map_yp_min = MAX(height - i, 0); t = map->bg_tex; if(t != NULL) { int tex_wp = (int)MAX(map->bg_tex_width * mtop_coeff, 10); int tex_hp = (int)MAX(map->bg_tex_height * mtop_coeff, 10); float t_xc_min, t_yc_min, t_xc_max, t_yc_max; /* Calculate texture coordinate bounds */ t_xc_min = (float)(-scroll_xp + (tex_wp / 2) - (map_wp / 2)) / (float)tex_wp; t_xc_max = (float)(-scroll_xp + (tex_wp / 2) + (map_wp / 2)) / (float)tex_wp; t_yc_max = (float)(scroll_yp + (tex_hp / 2) - (map_hp / 2)) / (float)tex_hp; t_yc_min = (float)(scroll_yp + (tex_hp / 2) + (map_hp / 2)) / (float)tex_hp; StateGLTexEnvI( &display->state_gl, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); StateGLEnable(&display->state_gl, GL_TEXTURE_2D); V3DTextureSelect(t); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glColor4d(0.5, 0.5, 0.5, 1.0); glBegin(GL_QUADS); { glTexCoord2d(t_xc_min, t_yc_min); glVertex2d(map_xp_min, map_yp_min); glTexCoord2d(t_xc_max, t_yc_min); glVertex2d(map_xp_max, map_yp_min); glTexCoord2d(t_xc_max, t_yc_max); glVertex2d(map_xp_max, map_yp_max); glTexCoord2d(t_xc_min, t_yc_max); glVertex2d(map_xp_min, map_yp_max); } glEnd(); StateGLDisable(&display->state_gl, GL_TEXTURE_2D); } else { glColor4d(0.0, 0.0, 0.0, 1.0); glBegin(GL_QUADS); { glVertex2d((GLfloat)map_xp_min, (GLfloat)map_yp_min); glVertex2d((GLfloat)map_xp_max, (GLfloat)map_yp_min); glVertex2d((GLfloat)map_xp_max, (GLfloat)map_yp_max); glVertex2d((GLfloat)map_xp_min, (GLfloat)map_yp_max); } glEnd(); } /* Draw title? */ if(map->title != NULL) { const char *s = map->title; GWFont *font = map->font; sar_menu_color_struct *color = &map->color; int fw, fh, len = STRLEN(s); GWGetFontSize(font, NULL, NULL, &fw, &fh); GWSetFont(display, font); glColor4f( color->r, color->g, color->b, color->a ); GWDrawString( display, map_xp_cen - (fw * len / 2), height - (map_yp_max - 16), s ); } /* Begin drawing map markings */ for(i = 0; i < map->total_markings; i++) { marking_ptr = map->marking[i]; if(marking_ptr == NULL) continue; /* Skip this marking if we are only to display the selected * marking and this is not selected. */ if(map->show_markings_policy == SAR_MENU_MAP_SHOW_MARKING_SELECTED) { /* Skip this check for now */ } /* Calculate marking position in pixels */ marking_xp = (int)((marking_ptr->x * mtop_coeff) + map_xp_cen + scroll_xp); marking_yp = (int)((marking_ptr->y * mtop_coeff) + map_yp_cen + scroll_yp); /* Handle by type */ switch(marking_ptr->type) { /* ***************************************************** */ case SAR_MENU_MAP_MARKING_TYPE_ICON: image = marking_ptr->icon; if(image != NULL) { int img_hw = image->width / 2, img_hh = image->height / 2; /* Out of bounds? */ if((marking_xp <= (map_xp_min + img_hw)) || (marking_yp <= (map_yp_min + img_hh)) || (marking_xp >= (map_xp_max - img_hw)) || (marking_yp >= (map_yp_max - img_hh)) ) break; glPixelZoom(1.0, -1.0); StateGLEnable(&display->state_gl, GL_ALPHA_TEST); StateGLAlphaFunc(&display->state_gl, GL_GREATER, 0.5); glRasterPos2i( marking_xp - (image->width / 2), marking_yp + (image->height / 2) ); glDrawPixels( image->width, image->height, GL_RGBA, GL_UNSIGNED_BYTE, image->data ); } break; case SAR_MENU_MAP_MARKING_TYPE_INTERCEPT_LINE: /* Need better bounds checking */ if(marking_xp <= map_xp_min) marking_xp = map_xp_min + 1; else if(marking_xp >= map_xp_max) marking_xp = map_xp_max - 1; if(marking_yp <= map_yp_min) marking_yp = map_yp_min + 1; else if(marking_yp >= map_yp_max) marking_yp = map_yp_max - 1; glColor4d( (GLfloat)marking_ptr->fg_color.r, (GLfloat)marking_ptr->fg_color.g, (GLfloat)marking_ptr->fg_color.b, (GLfloat)marking_ptr->fg_color.a ); glBegin(GL_LINES); { int marking_x2p = (int)((marking_ptr->x_end * mtop_coeff) + map_xp_cen + scroll_xp), marking_y2p = (int)((marking_ptr->y_end * mtop_coeff) + map_yp_cen + scroll_yp); /* Need better bounds checking */ if(marking_x2p <= map_xp_min) marking_x2p = map_xp_min + 1; else if(marking_x2p >= map_xp_max) marking_x2p = map_xp_max - 1; if(marking_y2p <= map_yp_min) marking_y2p = map_yp_min + 1; else if(marking_y2p >= map_yp_max) marking_y2p = map_yp_max - 1; glVertex2d((GLfloat)marking_xp, (GLfloat)marking_yp); glVertex2d((GLfloat)marking_x2p, (GLfloat)marking_y2p); } glEnd(); break; } } /* Check if a marking is selected */ i = map->selected_marking; if((i >= 0) && (i < map->total_markings)) { marking_ptr = map->marking[i]; if((marking_ptr != NULL) ? (marking_ptr->desc != NULL) : False) { GWFont *font = map->font; sar_menu_color_struct *color = &map->color; const char *desc = marking_ptr->desc; int fw, fh, len; len = STRLEN(desc); GWGetFontSize(font, NULL, NULL, &fw, &fh); GWSetFont(display, font); glColor4f( color->r, color->g, color->b, color->a ); GWDrawString( display, map_xp_cen - (fw * len / 2), height - (map_yp_min + fh + (5 + 16)), desc ); } } } /* * Manages the pointer event with respect to the given menu map * object. */ int SARMenuMapManagePointer( gw_display_struct *display, sar_menu_struct *m, sar_menu_map_struct *map, int menu_obj_num, int x, int y, gw_event_type type, int btn_num ) { int events_handled = 0; int x_min, x_max, y_min, y_max, width, height, w, h; static Boolean map_translate_drag_state = False; static Boolean map_zoom_drag_state = False; static int prev_motion_x, prev_motion_y; static time_t last_motion_time = 0; if((display == NULL) || (m == NULL) || (map == NULL)) return(events_handled); GWContextGet( display, GWContextCurrent(display), NULL, NULL, NULL, NULL, &width, &height ); /* If the button state is down and the event is a release, * then reset all states */ if((map_translate_drag_state || map_zoom_drag_state ) && (type == GWEventTypeButtonRelease) ) { map_translate_drag_state = False; map_zoom_drag_state = False; } w = (int)(map->width * width); if(w <= 0) w = (int)(width - (2 * DEF_XMARGIN)); if(w <= 0) w = DEF_XMARGIN; if(map->height > 0) h = (int)(map->height * height); else h = DEF_HEIGHT; if(h <= 0) h = DEF_YMARGIN; /* Get coordinate bounds */ x_min = (int)((map->x * width) - (w / 2)); x_max = (int)(x_min + w); y_min = (int)((map->y * height) - (h / 2)); y_max = (int)(y_min + h); /* Pointer event in bounds? */ if((x >= x_min) && (x < x_max) && (y >= y_min) && (y < y_max) ) { /* Calculate scroll bounds */ float mtop_coeff; int tex_w, tex_h; int scroll_x_min, scroll_y_min, scroll_x_max, scroll_y_max; /* Calculates scroll bounds by first fetching latest mtop_coeff * value and updates variables tex_w, tex_h, scroll_x_min, scroll_y_min, * scroll_x_max, and scroll_y_max. */ #define GET_SCROLL_BOUNDS \ { \ mtop_coeff = map->m_to_pixels_coeff; \ \ /* Get texture size in pixels */ \ tex_w = (int)(map->bg_tex_width * mtop_coeff); \ tex_h = (int)(map->bg_tex_height * mtop_coeff); \ \ /* Calculate scroll bounds in pixels */ \ scroll_x_min = (w / 2) - (tex_w / 2); \ scroll_x_max = (tex_w / 2) - (w / 2); \ \ scroll_y_min = (h / 2) - (tex_h / 2); \ scroll_y_max = (tex_h / 2) - (h / 2); \ } GET_SCROLL_BOUNDS /* Handle by event type */ switch(type) { case GWEventTypeButtonPress: events_handled++; /* Select new object as needed and redraw the * previously selected object. */ if(m->selected_object != menu_obj_num) { int po = m->selected_object; m->selected_object = menu_obj_num; if(m->always_full_redraw) SARMenuDrawAll(display, m); else SARMenuDrawObject(display, m, po); } /* Handle by button number */ switch(btn_num) { case 1: map_translate_drag_state = True; last_motion_time = cur_millitime; prev_motion_x = x; prev_motion_y = y; GWSetPointerCursor( display, GWPointerCursorTranslate ); DO_REDRAW_OBJECT(display, m, menu_obj_num) break; case 3: map_zoom_drag_state = True; last_motion_time = cur_millitime; prev_motion_x = x; prev_motion_y = y; GWSetPointerCursor( display, GWPointerCursorZoom ); DO_REDRAW_OBJECT(display, m, menu_obj_num) break; } break; case GWEventTypeButtonRelease: GWSetPointerCursor( display, GWPointerCursorStandard ); /* Manipulate last motion time so next case * checks okay */ last_motion_time = cur_millitime - 1; /* Fall through */ case GWEventTypePointerMotion: /* Too soon to handle a motion event? */ if(last_motion_time == cur_millitime) break; else last_motion_time = cur_millitime; events_handled++; /* Translating? */ if(map_translate_drag_state) { #if 0 map->scroll_x = CLIP( map->scroll_x + (x - prev_motion_x), scroll_x_min, scroll_x_max ); map->scroll_y = CLIP( map->scroll_y - (y - prev_motion_y), scroll_y_min, scroll_y_max ); #endif map->scroll_x = map->scroll_x + (x - prev_motion_x); map->scroll_y = map->scroll_y - (y - prev_motion_y); DO_REDRAW_OBJECT(display, m, menu_obj_num) } /* Zooming? */ else if(map_zoom_drag_state) { float scroll_x_coeff, scroll_y_coeff; float prev_m_to_pixels_coeff = map->m_to_pixels_coeff; /* Calculate new zoom */ map->m_to_pixels_coeff = (float)CLIP( map->m_to_pixels_coeff + ((y - prev_motion_y) * map->m_to_pixels_coeff / 100), 0.002, /* Zoomed out max */ 0.050 /* Zoomed in max */ ); /* Need to calculate last scroll position coeff * relative to the previous zoom dimension, then * set the new scroll position by multiplying * the scroll position coeff just calculated by * the new zoom dimension. */ if(map->bg_tex_width > 0) scroll_x_coeff = (float)map->scroll_x / (map->bg_tex_width * prev_m_to_pixels_coeff); else scroll_x_coeff = 0.0; map->scroll_x = (int)(map->bg_tex_width * map->m_to_pixels_coeff * scroll_x_coeff); if(map->bg_tex_height > 0) scroll_y_coeff = -(float)map->scroll_y / (map->bg_tex_height * prev_m_to_pixels_coeff); else scroll_y_coeff = 0.0; map->scroll_y = -(int)(map->bg_tex_height * map->m_to_pixels_coeff * scroll_y_coeff); /* Need to calculate scroll bounds again */ GET_SCROLL_BOUNDS /* Reclip scroll bounds */ /* Its safe to scroll anywhere, plus we can see offmap markings. map->scroll_x = CLIP( map->scroll_x, scroll_x_min, scroll_x_max ); map->scroll_y = CLIP( map->scroll_y, scroll_y_min, scroll_y_max ); */ DO_REDRAW_OBJECT(display, m, menu_obj_num) } /* All else assume marking select, we can select a * marking with the pointer only if we are showing * all markings. Cannot select a marking if only showing * the selected marking. */ else if(map->show_markings_policy == SAR_MENU_MAP_SHOW_MARKING_ALL) { /* Do this even if button is in released state */ int prev_marking_num = map->selected_marking, matched_marking_num = -1, next_marking_num; sar_menu_map_marking_struct *marking_ptr; /* Iterate till we find a marking with a description */ for(next_marking_num = 0; 1;) { marking_ptr = SARMenuMapMatchMarkingPosition( display, map, x, y, next_marking_num, &matched_marking_num ); if((marking_ptr == NULL) || (matched_marking_num < 0)) break; /* This one has a description? */ if(marking_ptr->desc != NULL) break; next_marking_num = matched_marking_num + 1; } if(matched_marking_num != prev_marking_num) { map->selected_marking = matched_marking_num; /* For this we need to redraw the entire menu */ DO_REDRAW_MENU(display,m) } } /* Record previous pointer coordinates */ prev_motion_x = x; prev_motion_y = y; break; case GWEventType2ButtonPress: case GWEventType3ButtonPress: break; } /* Handle by event type */ } /* Pointer event in bounds? */ #undef GET_SCROLL_BOUNDS return(events_handled); }
hsanjuan/sar2
src/menumap.c
C
gpl-2.0
27,147
[ 30522, 1013, 1008, 1008, 1008, 1008, 30524, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 2023, 5371, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.samepage.view; import java.util.List; import com.samepage.model.EmpDTO; public class EmpView { public static void print(String title, List<EmpDTO> emplist){ System.out.println(title + ">>========== ¿©·¯°Ç Ãâ·Â ===========<<"); for (EmpDTO empDTO : emplist) { System.out.println(empDTO); } } public static void printOne(String title, EmpDTO empDTO){ System.out.println(title + ">>========== ÇÑ°Ç Ãâ·Â ===========<<"); System.out.println(empDTO); } public static void sysMessage(String message){ System.out.println(message); } }
qfactor2013/BizStudyParallel
DB/Day5/src/com/samepage/view/EmpView.java
Java
lgpl-3.0
569
[ 30522, 7427, 4012, 1012, 2168, 13704, 1012, 3193, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 2862, 1025, 12324, 4012, 1012, 2168, 13704, 1012, 2944, 1012, 7861, 17299, 3406, 1025, 2270, 2465, 7861, 2361, 8584, 1063, 2270, 10763, 11675, 614...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
{# This file was generated with the ext-templateevents:generate command. #} {%- if marttiphpbb_templateevents.enable -%} <a class="templateevents" title="3.1.0-a1&#10;navbar_header.html" href="https://github.com/phpbb/phpbb/tree/prep-release-3.2.2/phpBB/styles/prosilver/template/navbar_header.html#L86">overall_header_navigation_append</a> {%- endif -%}
marttiphpbb/phpbb-ext-templateevents
styles/all/template/event/overall_header_navigation_append.html
HTML
gpl-2.0
355
[ 30522, 1063, 1001, 2023, 5371, 2001, 7013, 2007, 1996, 4654, 2102, 1011, 23561, 18697, 7666, 1024, 9699, 3094, 1012, 1001, 1065, 1063, 1003, 1011, 2065, 20481, 25101, 22269, 10322, 1035, 23561, 18697, 7666, 1012, 9585, 1011, 1003, 1065, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import os import platform from setuptools import setup, Extension from distutils.util import convert_path from Cython.Build import cythonize system = platform.system() ## paths settings # Linux if 'Linux' in system: CLFFT_DIR = r'/home/gregor/devel/clFFT' CLFFT_LIB_DIRS = [r'/usr/local/lib64'] CLFFT_INCL_DIRS = [os.path.join(CLFFT_DIR, 'src', 'include'), ] CL_INCL_DIRS = ['/opt/AMDAPPSDK-3.0/include'] EXTRA_COMPILE_ARGS = [] EXTRA_LINK_ARGS = [] #Windows elif 'Windows' in system: CLFFT_DIR = r'C:\Users\admin\Devel\clFFT-Full-2.12.2-Windows-x64' CLFFT_LIB_DIRS = [os.path.join(CLFFT_DIR, 'lib64\import')] CLFFT_INCL_DIRS = [os.path.join(CLFFT_DIR, 'include'), ] CL_DIR = os.getenv('AMDAPPSDKROOT') CL_INCL_DIRS = [os.path.join(CL_DIR, 'include')] EXTRA_COMPILE_ARGS = [] EXTRA_LINK_ARGS = [] # macOS elif 'Darwin' in system: CLFFT_DIR = r'/Users/gregor/Devel/clFFT' CLFFT_LIB_DIRS = [r'/Users/gregor/Devel/clFFT/src/library'] CLFFT_INCL_DIRS = [os.path.join(CLFFT_DIR, 'src', 'include'), ] CL_INCL_DIRS = [] EXTRA_COMPILE_ARGS = ['-stdlib=libc++'] EXTRA_LINK_ARGS = ['-stdlib=libc++'] import Cython.Compiler.Options Cython.Compiler.Options.generate_cleanup_code = 2 extensions = [ Extension("gpyfft.gpyfftlib", [os.path.join('gpyfft', 'gpyfftlib.pyx')], include_dirs= CLFFT_INCL_DIRS + CL_INCL_DIRS, extra_compile_args=EXTRA_COMPILE_ARGS, extra_link_args=EXTRA_LINK_ARGS, libraries=['clFFT'], library_dirs = CLFFT_LIB_DIRS, language='c++', ) ] def copy_clfftdll_to_package(): import shutil shutil.copy( os.path.join(CLFFT_DIR, 'bin', 'clFFT.dll'), 'gpyfft') shutil.copy( os.path.join(CLFFT_DIR, 'bin', 'StatTimer.dll'), 'gpyfft') print("copied clFFT.dll, StatTimer.dll") package_data = {} if 'Windows' in platform.system(): copy_clfftdll_to_package() package_data.update({'gpyfft': ['clFFT.dll', 'StatTimer.dll']},) def get_version(): main_ns = {} version_path = convert_path('gpyfft/version.py') with open(version_path) as version_file: exec(version_file.read(), main_ns) version = main_ns['__version__'] return version def get_readme(): dirname = os.path.dirname(os.path.abspath(__file__)) with open(os.path.join(dirname, "README.md"), "r") as fp: long_description = fp.read() return long_description install_requires = ["numpy", "pyopencl"] setup_requires = ["numpy", "cython"] setup( name='gpyfft', version=get_version(), description='A Python wrapper for the OpenCL FFT library clFFT', long_description=get_readme(), url=r"https://github.com/geggo/gpyfft", maintainer='Gregor Thalhammer', maintainer_email='gregor.thalhammer@gmail.com', license='LGPL', packages=['gpyfft', "gpyfft.test"], ext_modules=cythonize(extensions), package_data=package_data, install_requires=install_requires, setup_requires=setup_requires, )
geggo/gpyfft
setup.py
Python
lgpl-3.0
3,106
[ 30522, 12324, 9808, 12324, 4132, 2013, 16437, 3406, 27896, 12324, 16437, 1010, 5331, 2013, 4487, 3367, 21823, 4877, 1012, 21183, 4014, 12324, 10463, 1035, 4130, 2013, 22330, 2705, 2239, 1012, 3857, 12324, 22330, 2705, 10698, 4371, 2291, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
$(document).ready(function () { $("#bSort").hide(); $("#bShare").hide(); var movieCache = new Array(); //var movieRatingCache = new Array(); var isDebugMode = false; var webSocketAddress, imdbServletUrl, treeUrl, sortUrl, shareServletUrl, sharedDataUrl; if (isDebugMode) { webSocketAddress = "ws://localhost:8080/RankixSocket"; } else { webSocketAddress = "ws://theapache64.xyz:8080/rankix/RankixSocket"; } imdbServletUrl = "/rankix/imdbServlet"; treeUrl = "/rankix/Tree"; sortUrl = "/rankix/sortServlet"; shareServletUrl = "/rankix/shareServlet"; sharedDataUrl = "/rankix/shared/"; var sharedLink = null; var isWorking = true; function showProgressBar() { $("#divProgress").css({'display': 'block'}); $("#divProgress").slideDown(2000); } function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } function hideProgress() { $("#divProgress").slideUp(2000); } function consoleData(data) { $("#console_data").prepend('<p>' + data + '</p>'); } webSocket = new WebSocket(webSocketAddress); consoleData("CONNECTING..."); $("#bRankix").removeClass("btn-primary").addClass("btn-disabled"); webSocket.onopen = function (evt) { hideProgress(); freeApp(); consoleData("CONNECTED TO SOCKET :)"); }; //Checking if the intent is to access shared data var params = window.location.search; var key = getParameterByName('key'); if (key.length == 10) { postProgress(70, "Loading shared data... ") //Valid key $.ajax({ url: sharedDataUrl + key, type: "get", success: function (response) { hideProgress(); if (response.error) { alert(response.message); } else { $("div#results").html(response.data); } }, error: function (xhr) { console.log(xhr); consoleData("Error " + xhr.data); consoleData("Error " + xhr.data); } }); } $("#bShare").click(function () { if (sharedLink == null) { var shareData = $("#results").html(); postProgress(70, "Sharing... This may take some time.") $.ajax({ url: shareServletUrl, xhr: function () { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with upload progress here postProgress(percentComplete, "Saving result..."); } }, false); xhr.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with download progress postProgress(percentComplete, "Downloading shared link..."); } }, false); return xhr; }, type: "post", data: {share_data: shareData}, success: function (response) { console.log(response); hideProgress(); if (response.error) { consoleData("Error :" + response.message); } else { sharedLink = response.shared_data_url; window.prompt("Shared! Press Control+C to copy the link", sharedLink); consoleData(response.shared_data_url); } }, error: function (xhr) { console.log(xhr); } }); } else { window.prompt("Press Control + C to copy the shareable link.", sharedLink); } }); $("#bSort").click(function () { sharedLink = null; var resultHtml = $("#results").html(); $.ajax({ url: sortUrl, xhr: function () { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with upload progress here postProgress(percentComplete, "Sorting (UP)..."); } }, false); xhr.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with download progress postProgress(percentComplete, "Sorting (DOWN)..."); } }, false); return xhr; }, type: "post", data: {results: resultHtml}, success: function (response) { postProgress(100, "Finished"); hideProgress(); console.log(response); if (!response.error) { $("#bSort").fadeOut(1000); $("#bShare").fadeIn(1000); $("#results").html(response.results); } else { alert(response.message); } }, error: function (xhr) { hideProgress(); console.log(xhr); consoleData("Error while " + xhr.data); } }); }); function postProgress(perc, sentance) { if (perc == 100) { $("#pbProgress") .removeClass("progress-bar-info progress-bar-striped active") .addClass("progress-bar-success") .attr('aria-valuenow', 100) .css({width: "100%"}) .html("Finished (100%)"); } else if (perc == 10) { $("#pbProgress") .removeClass("progress-bar-success") .addClass("progress-bar-info progress-bar-striped active") .attr('aria-valuenow', 10) .css({width: "10%"}) .html("Initializing..."); } else { $("#pbProgress") .attr('aria-valuenow', perc) .css({width: perc + "%"}) .html(sentance); } } function freezeApp() { isWorking = true; $("#bRankix").removeClass("btn-primary").addClass("btn-disabled"); } function freeApp() { isWorking = false; $("#bRankix").addClass("btn-primary").removeClass("btn-disabled"); } $("#bRankix").click(function () { if (isWorking) { consoleData("Work in progress...") return; } sharedLink = null; $("#bSort").hide(); $("#bShare").hide(); var movieCache = new Array(); //TODO: X //var movieRatingCache = new Array(); postProgress(20, "Contacting TREE Manager..."); if (webSocket == null || webSocket.readyState != 1) { consoleData("Reopening new socket..."); webSocket = new WebSocket(webSocketAddress); isWorking = false; } var treeData = $("#taTree").val(); function showError(errorReason) { $("div#results").prepend('<p r="0" class="text-danger"><strong>Error: </strong>' + errorReason + '</p>\n'); } if (treeData.trim().length == 0) { alert("Tree data can't be empty!"); } else { showProgressBar(); freezeApp(); $.ajax({ url: treeUrl, xhr: function () { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with upload progress here postProgress(percentComplete, "Scanning tree ..."); } }, false); xhr.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with download progress postProgress(percentComplete, "Downloading scan result..."); } }, false); return xhr; }, type: "post", data: {tree: treeData}, success: function (data) { postProgress(100, "Tree scan completed, please wait...") if (data.error) { postProgress(0, ""); hideProgress(); freeApp(); showError(data.message); consoleData(data.message); } else { $("#pbProgress") .removeClass("progress-bar-success") .addClass("progress-bar-info progress-bar-striped active"); var movieNameAndId = []; /*{ "ignored_element_count":14, "total_elements_found":18, "rankixed_file_count":0, "movie_file_count":4}*/ var totalElementsCount = data.total_elements_found; var rankixedFileCount = data.rankixed_file_count; var ignoredFileCount = data.ignored_element_count; var fineFileCount = data.movie_file_count; var date = new Date(); var startTime = date.getTime(); consoleData("---------------------------------"); consoleData("Requested at " + date.toLocaleTimeString()); consoleData("Total elements count: " + totalElementsCount); consoleData("Rankixed file count: " + rankixedFileCount); consoleData("Ignored file count: " + ignoredFileCount); consoleData("Fine file count: " + fineFileCount); if (fineFileCount == 0) { freeApp(); showError("No fine file found!"); return; } $("div#results").html(""); function handleData(data) { var movieName = movieNameAndId[data.id]; console.log(data); function addResult(fontSize, movieName, imdbId, imdbRating) { $("div#results").prepend('<p r="' + imdbRating + '" data-toggle="modal" data-target="#myModal" class="movieRow" id="' + imdbId + '" style="font-size:' + fontSize + 'px;">' + movieName + '<small class="text-muted"> has ' + imdbRating + '</small></p>\n'); } if (!data.error) { var fontSize = data.data * 5; addResult(fontSize, movieName, data.imdb_id, data.data); } else { console.log('Data is ' + data.message); var myRegexp = /^Invalid movie name (.+)$/; var match = myRegexp.exec(data.message); movieName = match[1]; $("div#results").prepend('<p r="0" class="text-danger"><strong>' + movieName + '</strong> has no rating</p>\n'); } var scoreCount = $("#results p").length; var perc = (scoreCount / movieNameAndId.length ) * 100; postProgress(perc, parseInt(perc) + "%"); if (perc == 100) { $("#bSort").fadeIn(1000); $("#bShare").fadeIn(1000); var finishTime = new Date().getTime(); consoleData("Took " + Math.round(((finishTime - startTime) / 1000)) + "s"); consoleData("---------------------------------"); freeApp(); /* //SORTING REMOVED $("div#results p").sort(function (a, b) { console.log(a.id + " " + b.id); return parseFloat(a.id) > parseFloat(b.id); }).each(function(){ var elem = $(this); elem.remove(); $(elem).prependTo("div#results"); });*/ } } data.results.forEach(function (obj) { movieNameAndId[obj.id] = obj.name; webSocket.send(JSON.stringify(obj)); /* //Cacheing concept must be improved if (obj.id in movieRatingCache) { consoleData("Downloading from cache : " + obj.name); handleData(movieRatingCache[obj.id]); } else { }*/ }); webSocket.onmessage = function (evt) { var data = JSON.parse(evt.data); //Adding to cache //movieRatingCache[data.id] = data; handleData(data); }; webSocket.onclose = function (evt) { consoleData("Socket closed"); freeApp(); $("div#results").prepend("<p r='0' class='text-info'>SOCKET Closed</p>\n"); }; webSocket.onerror = function (evt) { freeApp(); $("div#results").prepend("<p r='0' class='text-danger'>" + evt.data + "</p>\n"); }; } }, error: function () { hideProgress(); freeApp(); showError("Network error occured, Please check your connection! "); } }); } }); $('div#results').on('click', 'p.movieRow', function () { var id = $(this).attr('id'); //Set loading $("h4.modal-title").html("Loading..."); $("div.modal-body").hide(); $("#imgPoster").html(""); if (id in movieCache) { consoleData("Data available in cache for " + movieCache[id].name); showMovieDetailedDialog(movieCache[id]); } else { //Not available in cache so download $.ajax({ url: imdbServletUrl, type: "get", data: {imdbId: id}, success: function (data) { movieCache[id] = data; consoleData("Movie loaded " + data.name); showMovieDetailedDialog(data); }, error: function (xhr) { $("#bDismissDialog").click(); consoleData("Error occurred!"); } }); } function showMovieDetailedDialog(data) { var img = $('<img />').load(function () { $("#imgPoster").html(""); $("#imgPoster").append(img); }).error(function () { consoleData("Failed to load image"); }).attr('src', data.poster_url); $("b#bRating").text(data.rating); $("b#bGender").text(data.gender); $("p#pPlot").text(data.plot); $("h4.modal-title").text(data.name); $("div.modal-body").slideDown(500); } }); });
axefox/Rankix
server/web/js/code.js
JavaScript
apache-2.0
17,897
[ 30522, 1002, 1006, 6254, 1007, 1012, 3201, 1006, 3853, 1006, 1007, 1063, 1002, 1006, 1000, 1001, 18667, 11589, 1000, 1007, 1012, 5342, 1006, 1007, 1025, 1002, 1006, 1000, 1001, 18667, 8167, 2063, 1000, 1007, 1012, 5342, 1006, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<html dir="LTR"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" /> <title>ConfigFileExtension Property</title> <xml> </xml> <link rel="stylesheet" type="text/css" href="MSDN.css" /> </head> <body id="bodyID" class="dtBODY"> <div id="nsbanner"> <div id="bannerrow1"> <table class="bannerparthead" cellspacing="0"> <tr id="hdr"> <td class="runninghead">Apache log4net™ SDK Documentation - Microsoft .NET Framework 4.0</td> <td class="product"> </td> </tr> </table> </div> <div id="TitleRow"> <h1 class="dtH1">XmlConfiguratorAttribute.ConfigFileExtension Property</h1> </div> </div> <div id="nstext"> <p> Gets or sets the extension of the configuration file. </p> <div class="syntax"> <span class="lang">[Visual Basic]</span> <br />Public Property ConfigFileExtension As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a></div> <div class="syntax"> <span class="lang">[C#]</span> <br />public <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a> ConfigFileExtension {get; set;}</div> <p> </p> <h4 class="dtH4">Property Value</h4> <p> The extension of the configuration file. </p> <h4 class="dtH4">Remarks</h4> <p> If specified this is the extension for the configuration file. The path to the config file is built by using the <b>application base</b> directory (<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemAppDomainClassBaseDirectoryTopic.htm">BaseDirectory</a>), the <b>assembly file name</b> and the config file extension. </p> <p> If the <b>ConfigFileExtension</b> is set to <code>MyExt</code> then possible config file names would be: <code>MyConsoleApp.exe.MyExt</code> or <code>MyClassLibrary.dll.MyExt</code>. </p> <p> The <a href="log4net.Config.XmlConfiguratorAttribute.ConfigFile.html">ConfigFile</a> takes priority over the <b>ConfigFileExtension</b>. </p> <h4 class="dtH4">See Also</h4><p><a href="log4net.Config.XmlConfiguratorAttribute.html">XmlConfiguratorAttribute Class</a> | <a href="log4net.Config.html">log4net.Config Namespace</a></p><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"><param name="Keyword" value="ConfigFileExtension property"></param><param name="Keyword" value="ConfigFileExtension property, XmlConfiguratorAttribute class"></param><param name="Keyword" value="XmlConfiguratorAttribute.ConfigFileExtension property"></param></object><hr /><div id="footer"><a href='http://logging.apache.org/log4net/'>Copyright 2004-2013 The Apache Software Foundation.</a><br></br>Apache log4net, Apache and log4net are trademarks of The Apache Software Foundation.</div></div> </body> </html>
gersonkurz/manualisator
manualisator/log4net-1.2.13/doc/release/sdk/log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension.html
HTML
apache-2.0
3,146
[ 30522, 1026, 16129, 16101, 1027, 1000, 8318, 2099, 1000, 1028, 1026, 2132, 1028, 1026, 18804, 8299, 1011, 1041, 15549, 2615, 1027, 1000, 4180, 1011, 2828, 1000, 4180, 1027, 1000, 3793, 1013, 16129, 1025, 25869, 13462, 1027, 3645, 1011, 8732...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
class ApplicationController < ActionController::Base protect_from_forgery with: :exception helper_method :current_user def current_user @current_user ||= User.find(session[:user_id]) if session[:user_id] end def require_login render_404 unless current_user end private def render_404 raise ActionController::RoutingError.new('Not Found') end end
mk12/great-reads
app/controllers/application_controller.rb
Ruby
mit
380
[ 30522, 2465, 4646, 8663, 13181, 10820, 1026, 2895, 8663, 13181, 10820, 1024, 1024, 2918, 4047, 1035, 2013, 1035, 15681, 2854, 2007, 1024, 1024, 6453, 2393, 2121, 1035, 4118, 1024, 2783, 1035, 5310, 13366, 2783, 1035, 5310, 1030, 2783, 1035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php namespace elisdn\gii\fixture\tests; use yii\db\ActiveRecord; class Post extends ActiveRecord { public static function tableName() { return 'post'; } }
ElisDN/yii2-gii-fixture-generator
tests/Post.php
PHP
bsd-3-clause
180
[ 30522, 1026, 1029, 25718, 3415, 15327, 12005, 16150, 2078, 1032, 21025, 2072, 1032, 15083, 1032, 5852, 1025, 2224, 12316, 2072, 1032, 16962, 1032, 3161, 2890, 27108, 2094, 1025, 2465, 2695, 8908, 3161, 2890, 27108, 2094, 1063, 2270, 10763, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; namespace Destiny.Graphics.World.Octagonal.Dimension { }
iZakaroN/Terrain
Destiny/Destiny/Graphics/World/Octagonal/Dimension/IntegerGeometry.cs
C#
gpl-2.0
178
[ 30522, 2478, 2291, 1025, 2478, 2291, 1012, 6407, 1012, 12391, 1025, 2478, 2291, 1012, 11409, 4160, 1025, 2478, 2291, 1012, 3793, 1025, 2478, 7513, 1012, 1060, 2532, 1012, 7705, 1025, 3415, 15327, 10461, 1012, 8389, 1012, 2088, 1012, 22340, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package leetcode.reverse_linked_list_ii; import common.ListNode; public class Solution { public ListNode reverseBetween(ListNode head, int m, int n) { if(head == null) return null; ListNode curRight = head; for(int len = 0; len < n - m; len++){ curRight = curRight.next; } ListNode prevLeft = null; ListNode curLeft = head; for(int len = 0; len < m - 1; len++){ prevLeft = curLeft; curLeft = curLeft.next; curRight = curRight.next; } if(prevLeft == null){ head = curRight; }else{ prevLeft.next = curRight; } for(int len = 0; len < n - m; len++){ ListNode next = curLeft.next; curLeft.next = curRight.next; curRight.next = curLeft; curLeft = next; } return head; } public static void dump(ListNode node){ while(node != null){ System.err.print(node.val + "->"); node = node.next; } System.err.println("null"); } public static void main(String[] args){ final int N = 10; ListNode[] list = new ListNode[N]; for(int m = 1; m <= N; m++){ for(int n = m; n <= N; n++){ for(int i = 0; i < N; i++){ list[i] = new ListNode(i); if(i > 0) list[i - 1].next = list[i]; } dump(new Solution().reverseBetween(list[0], m, n)); } } } }
ckclark/leetcode
java/leetcode/reverse_linked_list_ii/Solution.java
Java
apache-2.0
1,378
[ 30522, 7427, 3389, 13535, 10244, 1012, 7901, 1035, 5799, 1035, 2862, 1035, 2462, 1025, 12324, 2691, 1012, 2862, 3630, 3207, 1025, 2270, 2465, 5576, 1063, 2270, 2862, 3630, 3207, 7901, 20915, 28394, 2078, 1006, 2862, 3630, 3207, 2132, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// npm var chalk = require('chalk') // local var Copper = require('../copper') var copper = new Copper var util = require('../util') module.exports = function (config, wallet, keys, args) { var abort = false var name if (args._.length > 0) { name = args._.join(' ') } var key = copper.newKey() console.log(' pub:', chalk.green(key.pub)) console.log('priv:', chalk.blue(key.priv)) var wkey = {pub: key.pub, priv: key.priv, date: new Date()} if (name) { var keynames = wallet.keys.map(function (k) {return k.name}) if (keynames.indexOf(name) > -1) { console.log('abort!', chalk.red('key named', name, 'already exists')) abort = true } else { wkey.name = name console.log('name:', JSON.stringify(wkey.name)) } } if (!abort) { wallet.keys.push(wkey) util.saveJSON(config.wallet.file, wallet) } }
donpdonp/coindust
lib/commands/new.js
JavaScript
cc0-1.0
874
[ 30522, 1013, 1013, 27937, 2213, 13075, 16833, 1027, 5478, 1006, 1005, 16833, 1005, 1007, 1013, 1013, 2334, 13075, 6967, 1027, 5478, 1006, 1005, 1012, 1012, 1013, 6967, 1005, 1007, 13075, 6967, 1027, 2047, 6967, 13075, 21183, 4014, 1027, 547...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* ** Copyright 2001, Manuel J. Petit. All rights reserved. ** Distributed under the terms of the NewOS License. */ #include <unistd.h> #include <errno.h> #include <sys/syscalls.h> int close(int fd) { int retval; retval= _kern_close(fd); if(retval< 0) { errno = retval; } return retval; }
dioptre/newos
lib/libc/unistd/close.c
C
bsd-3-clause
301
[ 30522, 1013, 1008, 1008, 1008, 9385, 2541, 1010, 7762, 1046, 1012, 17268, 1012, 2035, 2916, 9235, 1012, 1008, 1008, 5500, 2104, 1996, 3408, 1997, 1996, 2047, 2891, 6105, 1012, 1008, 1013, 1001, 2421, 1026, 4895, 2923, 2094, 1012, 1044, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package net.doubledoordev.insidertrading.util; import com.google.gson.Gson; import com.google.gson.GsonBuilder; /** * @author Dries007 */ public class Constants { public static final String MODID = "InsiderTrading"; public static final String MODID_ASM = "InsiderTrading-ASM"; public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); }
DoubleDoorDevelopment/InsiderTrading
src/main/java/net/doubledoordev/insidertrading/util/Constants.java
Java
bsd-3-clause
375
[ 30522, 7427, 5658, 1012, 11515, 16506, 24844, 1012, 25297, 6494, 4667, 1012, 21183, 4014, 1025, 12324, 4012, 1012, 8224, 1012, 28177, 2239, 1012, 28177, 2239, 1025, 12324, 4012, 1012, 8224, 1012, 28177, 2239, 1012, 28177, 2239, 8569, 23891, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// // LDCLoginCommunitySelectionViewController.h // LiquidDecisions // // Created by Eric Johnson on 3/28/13. // Copyright (c) 2013 Liquid Analytics. All rights reserved. // #import <UIKit/UIKit.h> @interface LDCLoginCommunitySelectionViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> @end
LiquidAnalytics/ld-api-examples
ios/LiquidPlatformKit.framework/Headers/LDCLoginCommunitySelectionViewController.h
C
apache-2.0
325
[ 30522, 1013, 1013, 1013, 1013, 25510, 20464, 8649, 2378, 9006, 23041, 3012, 11246, 18491, 8584, 8663, 13181, 10820, 1012, 1044, 1013, 1013, 6381, 3207, 28472, 2015, 1013, 1013, 1013, 1013, 2580, 2011, 4388, 3779, 2006, 1017, 1013, 2654, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Flexibacter elegans (ex Lewin, 1969, non Soriano, 1945) Reichenbach, 1989 SPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Bacteria/Bacteroidetes/Sphingobacteria/Sphingobacteriales/Flexibacteraceae/Flexibacter/Flexibacter elegans/README.md
Markdown
apache-2.0
231
[ 30522, 1001, 23951, 18410, 21162, 3449, 20307, 2015, 1006, 4654, 24992, 2378, 1010, 3440, 1010, 2512, 2061, 6862, 2080, 1010, 3386, 1007, 14365, 21409, 1010, 2960, 2427, 1001, 1001, 1001, 1001, 3570, 3970, 1001, 1001, 1001, 1001, 2429, 2000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- nautilus-link.h: . Copyright (C) 2001 Red Hat, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Authors: Jonathan Blandford <jrb@redhat.com> */ #ifndef NAUTILUS_LINK_H #define NAUTILUS_LINK_H #include <gdk/gdktypes.h> #include <libgnome/gnome-desktop-item.h> gboolean nautilus_link_local_create (const char *directory_uri, const char *base_name, const char *display_name, const char *image, const char *target_uri, const GdkPoint *point, int screen, gboolean unique_filename); gboolean nautilus_link_local_set_text (const char *uri, const char *text); char * nautilus_link_local_get_text (const char *uri); char * nautilus_link_local_get_additional_text (const char *uri); char * nautilus_link_local_get_link_uri (const char *uri); void nautilus_link_get_link_info_given_file_contents (const char *file_contents, int link_file_size, char **uri, char **name, char **icon, gboolean *is_launcher); void nautilus_link_local_create_from_gnome_entry (GnomeDesktopItem *entry, const char *dest_uri, const GdkPoint *position, int screen); #endif /* NAUTILUS_LINK_H */
awalton/nautilus
libnautilus-private/nautilus-link.h
C
gpl-2.0
2,331
[ 30522, 1013, 1008, 1011, 1008, 1011, 5549, 1024, 1039, 1025, 27427, 4765, 1011, 21628, 2015, 1011, 5549, 1024, 1056, 1025, 1039, 1011, 3937, 1011, 16396, 1024, 1022, 1025, 21628, 1011, 9381, 1024, 1022, 1011, 1008, 1011, 6583, 21823, 7393, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include <math.h> #if (__ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__)) && !BROKEN_VFP_ASM float sqrtf(float x) { __asm__ ("vsqrt.f32 %0, %1" : "=t"(x) : "t"(x)); return x; } #else #include "../sqrtf.c" #endif
youtube/cobalt
third_party/musl/src/math/arm/sqrtf.c
C
bsd-3-clause
214
[ 30522, 1001, 2421, 1026, 8785, 1012, 1044, 30524, 1064, 1006, 1035, 1035, 1058, 22540, 1035, 1042, 2361, 1035, 1035, 1004, 1004, 999, 1035, 1035, 3730, 22540, 1035, 1035, 1007, 1007, 1004, 1004, 999, 3714, 1035, 1058, 22540, 1035, 2004, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// // VisibleBuildConfig.h // VisibleBuildConfig // // Created by David Li on 11/09/2017. // // #import <Foundation/Foundation.h> #define kVisibleBuildConfigChanged @"kVisibleBuildConfigChanged" @interface VisibleBuildConfig : NSObject //ConfigName is reqired and unique @property(nonatomic, strong) NSString *configName; + (instancetype)sharedInstance; //setup configuration data with plist - (void)setupWithPlist:(NSString *)plistFile; //Fix to use the build config with Release parameter valued YES. If no Release, use the first. - (void)setAsRelease; //Enable left swipe to show build config browser - (void)enableSwipe; //Show build config browser - (void)showConfigBrowser; //Get value with key from the current build config data - (id)configValueForKey:(NSString *)key; @end
davidli86/VisibleBuildConfig
VisibleBuildConfig/Classes/VisibleBuildConfig.h
C
mit
799
[ 30522, 1013, 1013, 1013, 1013, 5710, 8569, 4014, 16409, 2239, 8873, 2290, 1012, 1044, 1013, 1013, 5710, 8569, 4014, 16409, 2239, 8873, 2290, 1013, 1013, 1013, 1013, 2580, 2011, 2585, 5622, 2006, 2340, 1013, 5641, 1013, 2418, 1012, 1013, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef TRINITY_GUARDAI_H #define TRINITY_GUARDAI_H #include "ScriptedCreature.h" class Creature; class TC_GAME_API GuardAI : public ScriptedAI { public: explicit GuardAI(Creature* creature); static int32 Permissible(Creature const* creature); void UpdateAI(uint32 diff) override; bool CanSeeAlways(WorldObject const* obj) override; void EnterEvadeMode(EvadeReason /*why*/) override; void JustDied(Unit* killer) override; }; #endif
pete318/TrinityCore
src/server/game/AI/CoreAI/GuardAI.h
C
gpl-2.0
1,236
[ 30522, 1013, 1008, 1008, 2023, 5371, 2003, 2112, 1997, 1996, 7124, 17345, 2622, 1012, 2156, 6048, 5371, 2005, 9385, 2592, 1008, 1008, 2023, 2565, 2003, 2489, 4007, 1025, 2017, 2064, 2417, 2923, 3089, 8569, 2618, 2009, 1998, 1013, 2030, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Write a program that prints to the console which day of the week is today. // Use System.DateTime. using System; class DayOfTheWeek { static void WhatDayOfTheWeekIs() { DateTime dt = DateTime.Now; Console.WriteLine("The day today is : {0}", dt.DayOfWeek); } static void Main() { WhatDayOfTheWeekIs(); } }
Producenta/TelerikAcademy
C# 2/DomClassesAndObjects/03.DayOfTheWeek/DayOfTheWeek.cs
C#
mit
374
[ 30522, 1013, 1013, 4339, 1037, 2565, 2008, 11204, 2000, 1996, 10122, 2029, 2154, 1997, 1996, 2733, 2003, 2651, 1012, 1013, 1013, 2224, 2291, 1012, 3058, 7292, 1012, 2478, 2291, 1025, 2465, 2154, 15794, 5369, 28075, 1063, 10763, 11675, 2054,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php namespace ByteNoodles\Bundle\Symfony2ORMBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */ class Configuration implements ConfigurationInterface { /** * {@inheritDoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('byte_noodles_symfony2_orm'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. return $treeBuilder; } }
bytenoodles/symfony2-orm
src/ByteNoodles/Bundle/Symfony2ORMBundle/DependencyInjection/Configuration.php
PHP
mit
910
[ 30522, 1026, 1029, 25718, 3415, 15327, 24880, 3630, 26156, 2015, 1032, 14012, 1032, 25353, 2213, 14876, 4890, 2475, 2953, 14905, 8630, 2571, 1032, 24394, 2378, 20614, 3258, 1025, 2224, 25353, 2213, 14876, 4890, 1032, 6922, 1032, 9530, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
INSERT INTO `security_role` (`id`, `parent_id`, `roleId`) VALUES (1, NULL, 'guest'), (2, 1, 'user'), (3, 2, 'moderator'), (4, 3, 'administrator');
iskovskikh/ogorod.local
data/Sql/init_roles.sql
SQL
bsd-3-clause
168
[ 30522, 19274, 2046, 1036, 3036, 1035, 2535, 1036, 1006, 1036, 8909, 1036, 1010, 1036, 6687, 1035, 8909, 1036, 1010, 1036, 2535, 3593, 1036, 1007, 5300, 1006, 1015, 1010, 19701, 1010, 1005, 4113, 1005, 1007, 1010, 1006, 1016, 1010, 1015, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# coding=utf-8 from __future__ import print_function, unicode_literals __author__ = "Sally Wilsak" import codecs import os import sys import textwrap import unittest import import_resolver # This isn't strictly correct; it will only work properly if your terminal is set to UTF-8. # However, Linux is usually set to UTF-8 and Windows' English code page 437 is at least ASCII-compatible this will work well enough for our purposes if sys.stdout.encoding != 'utf8': sys.stdout = codecs.getwriter('utf8')(sys.stdout, 'strict') if sys.stderr.encoding != 'utf8': sys.stderr = codecs.getwriter('utf8')(sys.stderr, 'strict') def simple_normpath(path): """On Windows, normpath substitutes back slashes into the file path. This makes cross-platform testing difficult since we're checking string output. But the test cases have simple filepaths so we can substitute something simpler for the tests. """ return path.replace("./", "") def simple_join(path, *args): """ Make os.path.join work the same on Windows and Linux. Again this is ok because the test cases have simple paths """ elements = [path] elements.extend(args) return "/".join(elements) class TestImportResolver(unittest.TestCase): def setUp(self): # Monkey-patch some path manipulations so we can string match with Unix-style paths and Windows won't mess them up import_resolver.os.path.normpath = simple_normpath import_resolver.os.path.join = simple_join def test_line_extraction(self): self.assertEqual(import_resolver.extract_import_files(""), []) self.assertEqual(import_resolver.extract_import_files("This isn't TypeScript.\nBut it does have multiple lines."), []) self.assertEqual(import_resolver.extract_import_files("import thing = require('./thing.ts');"), ["./thing.ts"]) import_statements = textwrap.dedent(""" // Comments should get ignored, of course import first = require('./lib/first.ts'); // Different amounts of whitespace should be ok import second=require('./second.ts') ; // so should other stuff at the end // Double quotes are also ok import _THIRD = require("./third.ts") // So is something that's not a ts file, but it gets .ts added import fourth = require("../fourth/file/path") // A Windows-style path doesn't match... import fifth = require("C:\\fifth.ts") // ...neither does an absolute Unix-style path... import sixth = require("/home/user6/sixth.ts") // ...but this mixed-up one does import seventh = require('./folder\\folder\\seventh.ts') // Capitalizing the keywords means it doesn't match Import eighth = Require('./eighth.ts') // Something that's not a file path doesn't match import ninth = require('ninth') // If it's not at the start of the line, it doesn't match some stuff import tenth = require('./tenth.ts') // And for good measure, a non-ASCII file path should work import eleventh = require('./одиннадцать.ts') """) expected_filenames = [ "./lib/first.ts", "./second.ts", "./third.ts", "../fourth/file/path.ts", "./folder\\folder\\seventh.ts", "./одиннадцать.ts", ] self.assertEqual(import_resolver.extract_import_files(import_statements), expected_filenames) def test_format(self): files = ["/badger/badger", "C:\\badger.ts", "/bad ger/snake.ts"] self.assertEqual(import_resolver.format_line("/file/name.ts", files), "/file/name.ts <- /badger/badger C:\\badger.ts /bad\\ ger/snake.ts") def test_circular_deps(self): circular_deps = { "/home/badger/a.ts": "import b = require('./b.ts');\nimport c = require('./c.ts');", "/home/badger/b.ts": "import d = require('./d.ts');", "/home/badger/c.ts": "", "/home/badger/d.ts": "import a = require('./a.ts');", } import_resolver.read_file = lambda x: circular_deps[x] expected_string = "\n".join([ "/home/badger/c.ts <- /home/badger/a.ts", "/home/badger/d.ts <- /home/badger/b.ts", "/home/badger/a.ts <- /home/badger/d.ts", "/home/badger/b.ts <- /home/badger/a.ts", ]) self.assertEqual(import_resolver.do_dependency_resolve(["/home/badger/a.ts"]), expected_string) def test_triangle_deps(self): triangle_deps = { "/home/badger/a.ts": "import b = require('./b.ts');\nimport c = require('./c.ts');", "/home/badger/b.ts": "import c = require('./c.ts');", "/home/badger/c.ts": "", } import_resolver.read_file = lambda x: triangle_deps[x] expected_string = "\n".join([ "/home/badger/c.ts <- /home/badger/a.ts /home/badger/b.ts", "/home/badger/a.ts <- ", "/home/badger/b.ts <- /home/badger/a.ts", ]) self.assertEqual(import_resolver.do_dependency_resolve(["/home/badger/a.ts"]), expected_string) def test_inaccessible_deps(self): def inaccessible_deps(filename): if "a.ts" in filename: return "import b = require('./b.ts');" elif "b.ts" in filename: return "import c = require('./c.ts');" raise IOError import_resolver.read_file = inaccessible_deps expected_string = "\n".join([ "/home/badger/c.ts <- /home/badger/b.ts", "/home/badger/a.ts <- ", "/home/badger/b.ts <- /home/badger/a.ts", "Cannot read file '/home/badger/c.ts'", ]) self.assertEqual(import_resolver.do_dependency_resolve(["/home/badger/a.ts"]), expected_string) def test_lists(self): lists_deps = { "/home/badger/a.ts": "import b = require('./b.ts');\nimport c = require('./c.ts');\nimport d = require('./d.ts');", "/home/badger/b.ts": "import c = require('./c.ts');\nimport d = require('./d.ts');", "/home/badger/c.ts": "import d = require('./d.ts');", "/home/badger/d.ts": "", } import_resolver.read_file = lambda x: lists_deps[x] expected_string = "\n".join([ "/home/badger/c.ts <- /home/badger/a.ts /home/badger/b.ts", "/home/badger/d.ts <- /home/badger/a.ts /home/badger/b.ts /home/badger/c.ts", "/home/badger/a.ts <- ", "/home/badger/b.ts <- /home/badger/a.ts", ]) self.assertEqual(import_resolver.do_dependency_resolve(["/home/badger/a.ts"]), expected_string)
starcruiseromega/insolent-meow
import_resolver/test_import_resolver.py
Python
gpl-2.0
6,124
[ 30522, 1001, 16861, 1027, 21183, 2546, 1011, 1022, 2013, 1035, 1035, 2925, 1035, 1035, 12324, 6140, 1035, 3853, 1010, 27260, 1035, 18204, 2015, 1035, 1035, 3166, 1035, 1035, 1027, 1000, 8836, 19863, 3736, 2243, 1000, 12324, 3642, 6169, 1232...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# `Erichika` The game for developers. ## Koding Global Hackathon This is a project for Koding Global Hackthon. The submit page is here: https://github.com/team-kke/hackathon.submit ## License The MIT License (MIT) Copyright (c) 2014 [Team KKE](https://github.com/team-kke)
team-kke/erichika
README.md
Markdown
mit
278
[ 30522, 1001, 1036, 17513, 7556, 1036, 1996, 2208, 2005, 9797, 1012, 1001, 1001, 12849, 4667, 3795, 20578, 8988, 2239, 2023, 2003, 1037, 2622, 2005, 12849, 4667, 3795, 20578, 2705, 2239, 1012, 1996, 12040, 30524, 1001, 1001, 6105, 1996, 1021...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.7.0) on Wed Feb 13 15:11:38 GMT 2008 --> <TITLE> BigRequests </TITLE> <META NAME="date" CONTENT="2008-02-13"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="BigRequests"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV CLASS&nbsp; &nbsp;<A HREF="../../../gnu/x11/extension/DBE.html" title="class in gnu.x11.extension"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?gnu/x11/extension/BigRequests.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="BigRequests.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_gnu.x11.extension.Extension">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> gnu.x11.extension</FONT> <BR> Class BigRequests</H2> <PRE> java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../gnu/x11/extension/Extension.html" title="class in gnu.x11.extension">gnu.x11.extension.Extension</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>gnu.x11.extension.BigRequests</B> </PRE> <HR> <DL> <DT><PRE>public class <B>BigRequests</B><DT>extends <A HREF="../../../gnu/x11/extension/Extension.html" title="class in gnu.x11.extension">Extension</A></DL> </PRE> <P> Big Requests Extension. The specification can be found <a href= "http://escher.sourceforge.net/etc/specification/bigrequest.ps.gz" >here</a>. <P> <P> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> </TABLE> &nbsp;<A NAME="fields_inherited_from_class_gnu.x11.extension.Extension"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class gnu.x11.extension.<A HREF="../../../gnu/x11/extension/Extension.html" title="class in gnu.x11.extension">Extension</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../gnu/x11/extension/Extension.html#display">display</A>, <A HREF="../../../gnu/x11/extension/Extension.html#first_error">first_error</A>, <A HREF="../../../gnu/x11/extension/Extension.html#first_event">first_event</A>, <A HREF="../../../gnu/x11/extension/Extension.html#major_opcode">major_opcode</A>, <A HREF="../../../gnu/x11/extension/Extension.html#name">name</A></CODE></TD> </TR> </TABLE> &nbsp; <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../gnu/x11/extension/BigRequests.html#BigRequests(gnu.x11.Display)">BigRequests</A></B>(<A HREF="../../../gnu/x11/Display.html" title="class in gnu.x11">Display</A>&nbsp;display)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../gnu/x11/extension/BigRequests.html#enable()">enable</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_gnu.x11.extension.Extension"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class gnu.x11.extension.<A HREF="../../../gnu/x11/extension/Extension.html" title="class in gnu.x11.extension">Extension</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../gnu/x11/extension/Extension.html#more_string()">more_string</A>, <A HREF="../../../gnu/x11/extension/Extension.html#toString()">toString</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="BigRequests(gnu.x11.Display)"><!-- --></A><H3> BigRequests</H3> <PRE> public <B>BigRequests</B>(<A HREF="../../../gnu/x11/Display.html" title="class in gnu.x11">Display</A>&nbsp;display) throws <A HREF="../../../gnu/x11/extension/NotFoundException.html" title="class in gnu.x11.extension">NotFoundException</A></PRE> <DL> <DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../gnu/x11/extension/NotFoundException.html" title="class in gnu.x11.extension">NotFoundException</A></CODE></DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="enable()"><!-- --></A><H3> enable</H3> <PRE> public int <B>enable</B>()</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><a href="XExtendedMaxRequestSize.html"> XExtendedMaxRequestSize</a></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV CLASS&nbsp; &nbsp;<A HREF="../../../gnu/x11/extension/DBE.html" title="class in gnu.x11.extension"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?gnu/x11/extension/BigRequests.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="BigRequests.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_gnu.x11.extension.Extension">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
chriskmanx/qmole
QMOLEDEV/escher-0.3/doc/gnu/x11/extension/BigRequests.html
HTML
gpl-3.0
11,976
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl<T> __BindgenUnionField<T> { #[inline] pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) } #[inline] pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) } #[inline] pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) } } impl<T> ::std::default::Default for __BindgenUnionField<T> { #[inline] fn default() -> Self { Self::new() } } impl<T> ::std::clone::Clone for __BindgenUnionField<T> { #[inline] fn clone(&self) -> Self { Self::new() } } impl<T> ::std::marker::Copy for __BindgenUnionField<T> {} impl<T> ::std::fmt::Debug for __BindgenUnionField<T> { fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { fmt.write_str("__BindgenUnionField") } } impl<T> ::std::hash::Hash for __BindgenUnionField<T> { fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {} } impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> { fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true } } impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {} #[repr(C)] #[derive(Debug, Default, Copy, Hash, PartialEq, Eq)] pub struct foo { pub a: __BindgenUnionField<::std::os::raw::c_uint>, pub __bindgen_anon_1: __BindgenUnionField<foo__bindgen_ty_1>, pub bindgen_union_field: u32, } #[repr(C)] #[derive(Debug, Default, Copy, Hash, PartialEq, Eq)] pub struct foo__bindgen_ty_1 { pub b: __BindgenUnionField<::std::os::raw::c_ushort>, pub c: __BindgenUnionField<::std::os::raw::c_uchar>, pub bindgen_union_field: u16, } #[test] fn bindgen_test_layout_foo__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<foo__bindgen_ty_1>(), 2usize, concat!("Size of: ", stringify!(foo__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::<foo__bindgen_ty_1>(), 2usize, concat!("Alignment of ", stringify!(foo__bindgen_ty_1)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).b as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(foo__bindgen_ty_1), "::", stringify!(b) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<foo__bindgen_ty_1>())).c as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(foo__bindgen_ty_1), "::", stringify!(c) ) ); } impl Clone for foo__bindgen_ty_1 { fn clone(&self) -> Self { *self } } #[test] fn bindgen_test_layout_foo() { assert_eq!( ::std::mem::size_of::<foo>(), 4usize, concat!("Size of: ", stringify!(foo)) ); assert_eq!( ::std::mem::align_of::<foo>(), 4usize, concat!("Alignment of ", stringify!(foo)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<foo>())).a as *const _ as usize }, 0usize, concat!("Offset of field: ", stringify!(foo), "::", stringify!(a)) ); } impl Clone for foo { fn clone(&self) -> Self { *self } }
rust-lang/rust-bindgen
tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs
Rust
bsd-3-clause
3,411
[ 30522, 1001, 999, 1031, 3499, 1006, 2757, 1035, 3642, 1010, 2512, 1035, 7488, 1035, 2553, 1010, 2512, 1035, 19130, 1035, 2553, 1035, 4127, 1010, 2512, 1035, 3356, 1035, 2553, 1035, 3795, 2015, 1007, 1033, 1001, 1031, 16360, 2099, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
require 'chef/knife/base_sync' require 'chef/knife/core/object_loader' class Chef class Knife class PackSync < Chef::Knife include ::BaseSync VISIBILITY_ALT_NS_TAG = 'enableForOrg' banner "Loads packs into OneOps.\nUsage:\n circuit pack [OPTIONS] [PACKS...]" option :all, :short => "-a", :long => "--all", :description => "Sync all packs" option :register, :short => "-r REGISTER", :long => "--register REGISTER", :description => "Specify the source register name to use during sync" option :version, :short => "-v VERSION", :long => "--version VERSION", :description => "Specify the source register version to use during sync" option :pack_path, :short => "-o PATH:PATH", :long => "--pack-path PATH:PATH", :description => "A colon-separated path to look for packs in", :proc => lambda {|o| o.split(":")} option :reload, :long => "--reload", :description => "Force pack sync even if digest signatue has not changed (not applicable for packs with semantic versioning)" option :clean, :long => "--clean", :description => "Remove the current pack (and corresponding namespace) and then sync - 'fresh start' (not applicable for packs with semantic versioning)" option :semver, :long => "--semver", :description => "Creates new patch version for each change" def run t1 = Time.now ENV['CMS_TRACE'] = 'true' if config[:cms_trace] config[:pack_path] ||= Chef::Config[:pack_path] config[:register] ||= Chef::Config[:register] config[:version] ||= Chef::Config[:version] config[:semver] ||= ENV['SEMVER'].present? Chef::Pack.config = config @packs_loader ||= Knife::Core::ObjectLoader.new(Chef::Pack, ui) validate_packs # safety measure: make sure no packs conflict in scope circuit_ns_path = get_packs_ns unless Cms::Namespace.first(:params => {:nsPath => circuit_ns_path}) ui.error("Can't find namespace #{circuit_ns_path}. Please register your source first with the register command.") exit 1 end if config[:all] files = config[:pack_path].inject([]) {|a, dir| a + Dir.glob("#{dir}/*.rb").sort} else files = @name_args.inject([]) {|a, pack| a << "#{pack}.rb"} end if files.blank? ui.error 'You must specify pack name(s) or use the --all option to sync all.' exit(1) end comments = "#{ENV['USER']}:#{$0} #{config[:msg]}" loaded_files = files.inject([]) {|a, f| a << f if sync_pack(f, comments); a} t2 = Time.now ui.info("\nProcessed #{files.size} files, loaded #{loaded_files.size} packs.\nDone at #{t2} in #{(t2 - t1).round(1)}sec") end def validate_packs pack_map = {} config[:pack_path].each do |dir| Dir.glob("#{dir}/*.rb").each do |file| pack = @packs_loader.load_from(config[:pack_path], file) key = "#{get_source}**#{pack.name.downcase}**#{pack.version.presence || config[:version].split('.').first}" if pack_map.has_key?(key) ui.error("Conflict of pack source-name-version: #{key} is defined in #{file} and #{pack_map[key]}") exit 1 else pack_map[key] = file end end end end private def get_source config[:register] end def get_packs_ns "#{Chef::Config[:nspath]}/#{get_source}/packs" end def get_pack_ns(pack) "#{get_packs_ns}/#{pack.name}/#{pack.version}" end def sync_pack(file, comments) @existing_pack_ci_map ||= Cms::Ci.all(:params => {:nsPath => get_packs_ns, :ciClassName => 'mgmt.Pack'}). inject({}) {|h, p| h[p.ciName.downcase] = p; h} pack = @packs_loader.load_from(config[:pack_path], file) pack_ci = @existing_pack_ci_map[pack.name.downcase] pack.name(pack_ci ? pack_ci.ciName : pack.name.downcase) # This kludge is deal with legacy problem of some existing packs loaded but not converted to down case. if pack.ignore ui.info("Ignoring pack #{pack.name} version #{pack.version.presence || config[:version]}") return false elsif config[:semver] || pack.semver? signature = sync_pack_semver(pack, comments) else signature = sync_pack_no_semver(pack, comments) end sync_docs(pack) ui.info("Successfully synched pack #{pack.name} version #{pack.version} #{"[signature: #{signature}]" if signature}".green) return signature end def sync_pack_semver(pack, comments) ui.info("\n--------------------------------------------------") ui.info(" #{pack.name} #{pack.version} ".blue(true)) ui.info('--------------------------------------------------') if config[:reload] ui.warn('Reload option is not available in semver mode, all pack versions are '\ 'immutable. If you need to force a new patch version, make a change in '\ 'the pack (i.e. pack description) or specify patch version explicitly.') end signature = check_pack_version_ver_update(pack) return false unless signature # If pack signature matches nothing to do. Log.debug(pack.to_yaml) if Log.debug? version_ci = setup_pack_version(pack, comments, signature) begin ns = get_pack_ns(pack) # Upload design template sync_env(ns, 'mgmt.catalog', pack, '_default', pack.design_resources, comments) # Upload manifest templates pack.environments.each do |env, _| setup_mode(pack, env, comments) sync_env("#{ns}/#{env}", 'mgmt.manifest', pack, env, pack.environment_resources(env), comments) end rescue Exception => e ui.error(e.message) ui.info('Attempting to clean up...') begin version_ci.destroy rescue Exception ui.warn("Failed to clean up pack #{pack.name} version #{pack.version}!") end raise e end return signature end def sync_pack_no_semver(pack, comments) signature = Digest::MD5.hexdigest(pack.signature) pack.version((pack.version.presence || config[:version]).split('.').first) # default to the global knife version if not specified ui.info("\n--------------------------------------------------") ui.info(" #{pack.name} ver.#{pack.version} ".blue(true)) ui.info('--------------------------------------------------') pack_ci = @existing_pack_ci_map[pack.name.downcase] if pack_ci && config[:clean] @existing_pack_ci_map.delete(pack.name.downcase) pack_ci.destroy end # If pack signature matches but reload option is not set - bail return false if !config[:reload] && check_pack_version_no_ver_update(pack, signature) Log.debug(pack.to_yaml) if Log.debug? # First, check to see if anything from CMS need to flip to pending_deletion fix_delta_cms(pack) version_ci = setup_pack_version(pack, comments, '') ns = get_pack_ns(pack) # Upload design template sync_env(ns, 'mgmt.catalog', pack, '_default', pack.design_resources, comments) # Upload manifest templates pack.environments.each do |env, _| setup_mode(pack, env, comments) sync_env("#{ns}/#{env}", 'mgmt.manifest', pack, env, pack.environment_resources(env), comments) end version_ci.ciAttributes.commit = signature unless save(version_ci) ui.warn("Failed to update signature for pack #{pack.name} version #{pack.version}") end return signature end def fix_delta_cms(pack) nsPath = get_pack_ns(pack) cmsEnvs = ['_default'] + Cms::Ci.all(:params => {:nsPath => nsPath, :ciClassName => 'mgmt.Mode'}).map(&:ciName) cmsEnvs.each do |env| relations = fix_rels_from_cms(pack, env) fix_ci_from_cms(pack, env, relations, cmsEnvs) end end def fix_rels_from_cms(pack, env = '_default') pack_rels = pack.relations target_rels = [] scope = (env == '_default') ? '' : "/#{env}" Cms::Relation.all(:params => {:nsPath => "#{get_pack_ns(pack)}#{scope}", :includeToCi => true, :includeFromCi => true}).each do |r| new_state = nil fromCiName = r.fromCi.ciName toCiName = r.toCi.ciName relationShort = r.relationName.split('.').last key = "#{fromCiName}::#{relationShort.scan(/[A-Z][a-z]+/).join('_').downcase}::#{toCiName}" exists_in_pack = pack_rels.include?(key) # Search through resource to determine if relation exists or not unless exists_in_pack case relationShort when 'Payload' exists_in_pack = pack.resources[fromCiName] && pack.resources[fromCiName].include?('payloads') && pack.resources[fromCiName]['payloads'].include?(toCiName) when 'WatchedBy' exists_in_pack = pack.resources[fromCiName] && pack.resources[fromCiName].include?('monitors') && pack.resources[fromCiName]['monitors'].include?(toCiName) when 'Requires' exists_in_pack = pack.resources[fromCiName] && pack.resources[toCiName] when 'Entrypoint' exists_in_pack = pack.entrypoints.include?(toCiName) end end target_rels.push(toCiName) if exists_in_pack && !target_rels.include?(toCiName) if exists_in_pack && r.relationState == 'pending_deletion' new_state = 'default' elsif !exists_in_pack && r.relationState != 'pending_deletion' new_state = 'pending_deletion' end if new_state r.relationState = new_state if save(r) ui.debug("Successfuly updated ciRelationState to #{new_state} #{r.relationName} #{r.fromCi.ciName} <-> #{r.toCi.ciName} for #{env}") else ui.error("Failed to update ciRelationState to #{new_state} #{r.relationName} #{r.fromCi.ciName} <-> #{r.toCi.ciName} for #{env}") end end end target_rels end def fix_ci_from_cms(pack, env, relations, environments) scope = (env == '_default') ? '' : "/#{env}" pack_resources = pack.resources Cms::Ci.all(:params => {:nsPath => "#{get_pack_ns(pack)}#{scope}"}).each do |resource| new_state = nil exists_in_pack = pack_resources.include?(resource.ciName) || relations.include?(resource.ciName) || environments.include?(resource.ciName) if exists_in_pack && resource.ciState == 'pending_deletion' new_state = 'default' elsif !exists_in_pack && resource.ciState != 'pending_deletion' new_state = 'pending_deletion' end if new_state resource.ciState = new_state if save(resource) ui.debug("Successfuly updated ciState to #{new_state} for #{resource.ciName} for #{env}") else ui.error("Failed to update ciState to #{new_state} for #{resource.ciName} for #{env}") end end end end def check_pack_version_ver_update(pack) all_versions = Cms::Ci.all(:params => {:nsPath => "#{get_packs_ns}/#{pack.name}", :ciClassName => 'mgmt.Version', :includeAltNs => VISIBILITY_ALT_NS_TAG}) major, minor, patch = (pack.version.blank? ? config[:version] : pack.version).split('.') minor = '0' if minor.blank? # Need to filter version for the same major and find latest patch version for the same minor. latest_patch = nil latest_patch_number = -1 versions = all_versions.select do |ci_v| split = ci_v.ciName.split('.') if major == split[0] && minor == split[1] && split[2].to_i > latest_patch_number latest_patch = ci_v latest_patch_number = split[2].to_i end major == split[0] end if versions.size > 0 version_ci = latest_patch || versions.sort_by(&:ciName).last # Carry over 'enable' and 'visibility' from the latest patch or latest version overall. pack.enabled(version_ci.ciAttributes.attributes['enabled'] != 'false') pack.visibility(version_ci.altNs.attributes[VISIBILITY_ALT_NS_TAG]) end if patch.present? # Check to make sure version does not already exist. version = "#{major}.#{minor}.#{patch}" if versions.find {|ci_v| ci_v.ciName == version} ui.warn("Pack #{pack.name} version #{pack.version} explicitly specified but it already exists, ignore it - will SKIP pack loading, but will try to update docs.") return nil else pack.version(version) ui.info("Pack #{pack.name} version #{pack.version} explicitly specified and it does not exist yet, will load.") return pack.signature end else ui.info("Pack #{pack.name} version #{pack.version} - patch version is not explicitly specified, continue with checking for latest patch version for it.") end if latest_patch pack.version(latest_patch.ciName) signature = pack.signature if latest_patch.ciAttributes.attributes['commit'] == signature ui.info("Pack #{pack.name} latest patch version #{latest_patch.ciName} matches signature (#{signature}), will skip pack loading, but will try to update docs.") return nil else ui.info("Pack #{pack.name} latest patch version #{latest_patch.ciName} signature is different from new pack signature #{signature}, will increment patch version and load.") pack.version("#{major}.#{minor}.#{latest_patch.ciName.split('.')[2].to_i + 1}") return pack.signature end else ui.info("No patches found for #{pack.name} version #{major}.#{minor}, start at patch 0 and load.") pack.version("#{major}.#{minor}.0") return pack.signature end end def check_pack_version_no_ver_update(pack, signature) pack_version = Cms::Ci.first(:params => {:nsPath => "#{get_packs_ns}/#{pack.name}", :ciClassName => 'mgmt.Version', :ciName => pack.version}) if pack_version.nil? ui.info("Pack #{pack.name} version #{pack.version} not found") return false else if pack_version.ciAttributes.attributes.key?('commit') && pack_version.ciAttributes.commit == signature ui.info("Pack #{pack.name} version #{pack.version} matches signature #{signature}, use --reload to force load.") return true else ui.warn("Pack #{pack.name} version #{pack.version} signature is different from file signature #{signature}") return false end end end def setup_pack_version(pack, comments, signature) pack_ci = @existing_pack_ci_map[pack.name.downcase] packs_ns = get_packs_ns if pack_ci ui.debug("Updating pack #{pack.name}") else ui.info("Creating pack CI #{pack.name}") pack_ci = build('Cms::Ci', :nsPath => packs_ns, :ciClassName => 'mgmt.Pack', :ciName => pack.name) end pack_ci.comments = comments pack_ci.ciAttributes.pack_type = pack.type pack_ci.ciAttributes.description = pack.description pack_ci.ciAttributes.category = pack.category pack_ci.ciAttributes.owner = pack.owner if save(pack_ci) ui.debug("Successfuly saved pack CI #{pack.name}") @existing_pack_ci_map[pack.name.downcase] = pack_ci pack_version = Cms::Ci.first(:params => {:nsPath => "#{packs_ns}/#{pack.name}", :ciClassName => 'mgmt.Version', :ciName => pack.version}) if pack_version ui.debug("Updating pack CI #{pack.name} version #{pack.version}") else ui.info("Creating pack CI #{pack.name} version #{pack.version}") pack_version = build('Cms::Ci', :nsPath => "#{packs_ns}/#{pack.name}", :ciClassName => 'mgmt.Version', :ciName => pack.version, :ciAttributes => {:enabled => pack.enabled}, :altNs => {VISIBILITY_ALT_NS_TAG => pack.visibility}) end pack_version.comments = comments pack_version.ciAttributes.description = pack.description pack_version.ciAttributes.commit = signature if save(pack_version) ui.debug("Successfuly saved pack version CI for: #{pack.name} #{pack.version}") return pack_version else ui.error("Could not save pack version CI for: #{pack.name} #{pack.version}") end else ui.error("Could not save pack CI #{pack.name}") end message = "Unable to setup namespace for pack #{pack.name} version #{pack.version}" raise Exception.new(message) end def setup_mode(pack, env, comments) ns = get_pack_ns(pack) mode = Cms::Ci.first(:params => {:nsPath => ns, :ciClassName => 'mgmt.Mode', :ciName => env}) if mode ui.debug("Updating pack #{pack.name} version #{pack.version} environment mode #{env}") else ui.info("Creating pack #{pack.name} version #{pack.version} environment mode #{env}") mode = build('Cms::Ci', :nsPath => ns, :ciClassName => 'mgmt.Mode', :ciName => env) end mode.comments = comments mode.ciAttributes.description = pack.description if save(mode) ui.debug("Successfuly saved pack mode CI #{env}") return mode else message = "Unable to setup environment namespace for pack #{pack.name} version #{pack.version} environment mode #{env}" ui.error(message) raise Exception.new(message) end end def sync_env(ns_path, package, pack, env, resources, comments) ui.info("======> #{env == '_default' ? 'design' : env}") Log.debug([pack.name, pack.version, package, ns_path, resources, comments].to_yaml) if Log.debug? platform = sync_platform(ns_path, package, pack, comments) if platform components = sync_components(package, ns_path, platform, resources, comments) %w(DependsOn ManagedVia SecuredBy).each do |relation_name| sync_relations(relation_name, package, ns_path, pack.env_relations(env, relation_name), components) end upload_template_entrypoint(ns_path, pack, resources, components, platform, env) upload_template_procedures(ns_path, pack, platform, env) upload_template_variables(ns_path, pack, package, platform, env) upload_template_policies(ns_path, pack, package, env) sync_monitors(package, ns_path, resources, components) sync_payloads(ns_path, resources, components) if package == 'mgmt.manifest' end end def sync_platform(nspath, package, pack, comments) ci_class_name = "#{package}.#{pack.type.capitalize}" platform = Cms::Ci.first(:params => {:nsPath => nspath, :ciClassName => ci_class_name, :ciName => pack.name}) if platform ui.debug("Updating #{ci_class_name}") else ui.info("Creating #{ci_class_name}") platform = build('Cms::Ci', :nsPath => nspath, :ciClassName => ci_class_name, :ciName => pack.name) end plat_attrs = pack.platform && pack.platform[:attributes] if plat_attrs attrs = platform.ciAttributes.attributes attrs.each {|name, _| attrs[name] = plat_attrs[name] if plat_attrs.has_key?(name)} end platform.comments = comments platform.ciAttributes.description = pack.description platform.ciAttributes.source = get_source platform.ciAttributes.pack = pack.name platform.ciAttributes.version = pack.version if save(platform) ui.debug("Successfuly saved #{ci_class_name}") return platform else ui.error("Could not save #{ci_class_name}, skipping pack") return false end end def sync_components(package, ns_path, platform, resources, comments) relations = [] existing = Cms::Relation.all(:params => {:ciId => platform.ciId, :direction => 'from', :relationShortName => 'Requires', :includeToCi => true}) resources.each do |resource_name, resource| class_name_parts = resource[:cookbook].split('.') class_name_parts[-1] = class_name_parts[-1].capitalize class_name_parts = class_name_parts.unshift(resource[:source]) if resource[:source] class_name_parts = class_name_parts.unshift(package) ci_class_name = class_name_parts.join('.') relation = existing.find {|r| r.toCi.ciName == resource_name && r.toCi.ciClassName == ci_class_name} if relation ui.debug("Updating resource #{resource_name}") else ui.info("Creating resource #{resource_name}") relation = build('Cms::Relation', :relationName => 'mgmt.Requires', :nsPath => ns_path, :fromCiId => platform.ciId, :toCiId => 0, :toCi => build('Cms::Ci', :nsPath => ns_path, :ciClassName => ci_class_name, :ciName => resource_name)) end relation.comments = comments relation.toCi.comments = comments relation.relationAttributes.template = resource_name # default value for template attribute is the resource name requires_attrs = resource[:requires] if requires_attrs attrs = relation.relationAttributes.attributes attrs.each {|name, _| attrs[name] = requires_attrs[name] if requires_attrs[name]} end component_attrs = resource[:attributes] if component_attrs attrs = relation.toCi.ciAttributes.attributes attrs.each {|name, _| attrs[name] = component_attrs[name] if component_attrs.has_key?(name)} end relations << relation end relations, error = Cms::Relation.bulk(relations) unless relations ui.error("Could not save components: #{error}") raise(error) end ui.info("synced #{relations.size} components") return relations.inject({}) {|h, r| h[r.toCi.ciName] = r.toCiId; h} end def sync_relations(short_name, package, ns_path, pack_rels, components) relation_name = "#{package}.#{short_name}" existing_rels = Cms::Relation.all(:params => {:nsPath => ns_path, :relationName => relation_name}) relations = pack_rels.inject([]) do |rels_to_save, pack_rel| from = pack_rel[:from_resource] to = pack_rel[:to_resource] from_id = components[from] to_id = components[to] problems = [] problems << "component #{from} not found" unless from_id problems << "component #{to} not found" unless to_id if problems.present? ui.warn("Can't process #{short_name} from #{from} to #{to}: #{problems.join('; ')}") next rels_to_save end relation = rels_to_save.find {|d| d.fromCiId == from_id && d.toCiId == to_id} if relation ui.debug("Updating again #{short_name} from #{from} to #{to}") else relation = existing_rels.find {|d| d.fromCiId == from_id && d.toCiId == to_id} if relation ui.debug("Updating #{short_name} from #{from} to #{to}") else ui.info("Creating #{short_name} between #{from} to #{to}") relation = build('Cms::Relation', :relationName => relation_name, :nsPath => ns_path, :fromCiId => from_id, :toCiId => to_id) end rels_to_save << relation end relation.merge_attributes(pack_rel[:attributes]) rels_to_save end if relations.present? relations, error = Cms::Relation.bulk(relations) unless relations ui.error("Could not save #{short_name} relations: #{error}") raise(error) end ui.info("synched #{relations.size} #{short_name} relations") end end def upload_template_entrypoint(nspath, pack, resources, components, platform, env) relation_name = 'mgmt.Entrypoint' relations = Cms::Relation.all(:params => {:ciId => platform.ciId, :nsPath => nspath, :direction => 'from', :relationName => relation_name}) resources.each do |resource_name, _| next unless pack.environment_entrypoints(env)[resource_name] entrypoint = relations.find {|r| r.toCi.ciId == components[resource_name]} if entrypoint ui.debug("Updating entrypoint between platform and #{resource_name}") else ui.info("Creating entrypoint between platform and #{resource_name}") entrypoint = build('Cms::Relation', :relationName => relation_name, :nsPath => nspath, :fromCiId => platform.ciId, :toCiId => components[resource_name]) end entrypoint_attrs = pack.entrypoints[resource_name]['attributes'] attrs = entrypoint.relationAttributes.attributes attrs.each {|name, __| attrs[name] = entrypoint_attrs[name] if entrypoint_attrs[name]} if save(entrypoint) ui.debug("Successfuly saved entrypoint between platform and #{resource_name}") else ui.error("Could not save entrypoint between platform and #{resource_name}, skipping it") end end end def sync_monitors(package, ns_path, resources, components) relation_name = "#{package}.WatchedBy" ci_class_name = "#{package}.Monitor" relations = Cms::Relation.all(:params => {:nsPath => ns_path, :relationName => relation_name, :includeToCi => true}).to_a resources.each do |resource_name, resource| next unless resource[:monitors] resource[:monitors].each do |monitor_name, monitor| relation = relations.find {|r| r.fromCiId == components[resource_name] && r.toCi.ciName == monitor_name} if relation ui.debug("Updating monitor #{monitor_name} for #{resource_name} in #{package}") else ui.info("Creating monitor #{monitor_name} for #{resource_name}") relation = build('Cms::Relation', :relationName => relation_name, :nsPath => ns_path, :fromCiId => components[resource_name]) # For legacy reasons, we might have monitors with same name, so several components # link (via relation) to the same CI in the pack template. Therefore, # monitor CI may already exists. duplicate_ci_name_rel = relations.find {|r| r.toCi.ciName == monitor_name} if duplicate_ci_name_rel ui.warn("Monitor #{monitor_name} for component #{resource_name} is not uniquely named, will re-use existing monitor CI with the same name") relation.toCiId = duplicate_ci_name_rel.toCiId if save(relation) relation.toCi = duplicate_ci_name_rel.toCi else ui.error("Could not create WatchedBy relation #{monitor_name} for #{resource_name}, skipping it") next end else relation.toCiId = 0 relation.toCi = build('Cms::Ci', :nsPath => ns_path, :ciClassName => ci_class_name, :ciName => monitor_name) end relations << relation end attrs = relation.toCi.ciAttributes.attributes attrs.each do |name, _| if monitor[name] monitor[name] = monitor[name].to_json if monitor[name].is_a?(Hash) attrs[name] = monitor[name] end end if save(relation) ui.debug("Successfuly saved monitor #{monitor_name} for #{resource_name} in #{package}") else ui.error("Could not save monitor #{monitor_name} for #{resource_name}, skipping it") end end end end def sync_payloads(ns_path, resources, components) relation_name = 'mgmt.manifest.Payload' ci_class_name = 'mgmt.manifest.Qpath' relations = Cms::Relation.all(:params => {:nsPath => ns_path, :relationName => relation_name, :targetClassName => ci_class_name, :includeToCi => true}) existing_rels = relations.inject({}) {|h, r| h[r.toCi.ciName.downcase] = r; h} resources.each do |resource_name, resource| next unless resource[:payloads] resource[:payloads].each do |payload_name, payload| relation = relations.find {|r| r.toCi.ciName == payload_name && r.fromCiId == components[resource_name]} # For legacy reasons, we might have payloads with same name, so several components # link (via relation) to the same pyaload CI in the pack template. Therefore, # payload CI may already exists. duplicate_ci_name_rel = existing_rels[payload_name.downcase] if duplicate_ci_name_rel && (!relation || relation.fromCiId != duplicate_ci_name_rel.fromCiId) ui.warn("Payload #{payload_name} for component #{resource_name} is not uniquely named, will re-use existing payload CI with the same name") end if relation ui.debug("Updating payload #{payload_name} for #{resource_name}") else ui.info("Creating payload #{payload_name} for #{resource_name}") relation = build('Cms::Relation', :relationName => relation_name, :nsPath => ns_path, :fromCiId => components[resource_name]) if duplicate_ci_name_rel relation.toCiId = duplicate_ci_name_rel.toCiId unless save(relation) ui.error("Could not create Payload relation #{payload_name} for #{resource_name}, skipping it") next end relation.toCi = duplicate_ci_name_rel.toCi else relation.toCiId = 0 relation.toCi = build('Cms::Ci', :nsPath => ns_path, :ciClassName => ci_class_name, :ciName => payload_name) end end attrs = relation.toCi.ciAttributes.attributes attrs.each {|name, _| attrs[name] = payload[name] if payload[name]} if save(relation) existing_rels[payload_name.downcase] = relation unless duplicate_ci_name_rel ui.debug("Successfuly saved payload #{payload_name} for #{resource_name}") else ui.error("Could not save payload #{payload_name} for #{resource_name}, skipping it") end end end end def upload_template_procedures(nspath, pack, platform, env) relation_name = 'mgmt.manifest.ControlledBy' ci_class_name = 'mgmt.manifest.Procedure' relations = Cms::Relation.all(:params => {:ciId => platform.ciId, :nsPath => nspath, :direction => 'from', :relationName => relation_name, :targetClassName => ci_class_name, :includeToCi => true}) pack.environment_procedures(env).each do |procedure_name, procedure_attributes| relation = relations.find {|r| r.toCi.ciName == procedure_name} if relation ui.debug("Updating procedure #{procedure_name} for environment #{env}") else ui.info("Creating procedure #{procedure_name} for environment #{env}") relation = build('Cms::Relation', :relationName => relation_name, :nsPath => nspath, :fromCiId => platform.ciId, :toCiId => 0, :toCi => build('Cms::Ci', :nsPath => nspath, :ciClassName => ci_class_name, :ciName => procedure_name)) end attrs = relation.toCi.ciAttributes.attributes attrs.each do |name, _| if procedure_attributes[name] if name == 'arguments' && procedure_attributes[name].is_a?(Hash) procedure_attributes[name] = procedure_attributes[name].to_json end attrs[name] = procedure_attributes[name] end end if save(relation) ui.debug("Successfuly saved procedure #{procedure_name} for environment #{env}") else ui.error("Could not save procedure #{procedure_name} for environment #{env}, skipping it") end end end def upload_template_variables(nspath, pack, package, platform, env) relation_name = "#{package}.ValueFor" ci_class_name = "#{package}.Localvar" relations = Cms::Relation.all(:params => {:ciId => platform.ciId, :direction => 'to', :relationName => relation_name, :targetClassName => ci_class_name, :includeFromCi => true}) pack.environment_variables(env).each do |variable_name, var_attrs| relation = relations.find {|r| r.fromCi.ciName == variable_name} if relation ui.debug("Updating variable #{variable_name} for environment #{env}") else ui.info("Creating variable #{variable_name} for environment #{env}") relation = build('Cms::Relation', :relationName => relation_name, :nsPath => nspath, :toCiId => platform.ciId, :fromCiId => 0, :fromCi => build('Cms::Ci', :nsPath => nspath, :ciClassName => ci_class_name, :ciName => variable_name)) end attrs = relation.fromCi.ciAttributes.attributes attrs.each {|name, _| attrs[name] = var_attrs[name] if var_attrs[name]} if save(relation) ui.debug("Successfuly saved variable #{variable_name} for environment #{env}") else ui.error("Could not save variable #{variable_name} for environment #{env}, skipping it") end end end def upload_template_policies(nspath, pack, package, env) ci_class_name = "#{package}.Policy" policies = Cms::Ci.all(:params => {:nsPath => nspath, :ciClassName => ci_class_name}) pack.environment_policies(env).each do |policy_name, policy_attrs| policy = policies.find {|p| p.ciName == policy_name} unless policy policy = build('Cms::Ci', :nsPath => nspath, :ciClassName => ci_class_name, :ciName => policy_name) end attrs = policy.ciAttributes.attributes attrs.each {|name, _| attrs[name] = policy_attrs[name] if policy_attrs[name]} if save(policy) ui.debug("Successfuly saved policy #{policy_name} attributes for environment #{env} and #{pack}") else ui.error("Could not save policy #{policy_name} attributes for environment #{env} and #{pack}, skipping it") end end end def sync_docs(pack) return unless sync_docs? doc_dir = File.expand_path('doc', File.dirname(pack.filename)) files = Dir.glob("#{doc_dir}/#{pack.name}.*") if files.present? ui.info('docs and images:') files.each {|file| sync_doc_file(file, file.gsub(doc_dir, "#{get_source}/packs/#{pack.name}/#{pack.version}"))} end end end end end
oneops/OneOps
oneops-admin/lib/chef/knife/pack_sync.rb
Ruby
apache-2.0
40,395
[ 30522, 5478, 1005, 10026, 1013, 5442, 1013, 2918, 1035, 26351, 1005, 5478, 1005, 10026, 1013, 5442, 1013, 4563, 1013, 4874, 1035, 7170, 2121, 1005, 2465, 10026, 2465, 5442, 2465, 15173, 6038, 2278, 1026, 10026, 1024, 1024, 5442, 2421, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
namespace HaoCodeBuilder { partial class Form_Code_Area { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form_Code_Area)); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.全选ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.复制ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.粘贴ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.textEditorControl1 = new ICSharpCode.TextEditor.TextEditorControl(); this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); // // contextMenuStrip1 // this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.全选ToolStripMenuItem, this.复制ToolStripMenuItem, this.toolStripMenuItem1, this.粘贴ToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Size = new System.Drawing.Size(125, 92); // // 全选ToolStripMenuItem // this.全选ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("全选ToolStripMenuItem.Image"))); this.全选ToolStripMenuItem.Name = "全选ToolStripMenuItem"; this.全选ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); this.全选ToolStripMenuItem.Text = "全选"; this.全选ToolStripMenuItem.Click += new System.EventHandler(this.全选ToolStripMenuItem_Click); // // 复制ToolStripMenuItem // this.复制ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("复制ToolStripMenuItem.Image"))); this.复制ToolStripMenuItem.Name = "复制ToolStripMenuItem"; this.复制ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); this.复制ToolStripMenuItem.Text = "复制"; this.复制ToolStripMenuItem.Click += new System.EventHandler(this.复制ToolStripMenuItem_Click); // // toolStripMenuItem1 // this.toolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem1.Image"))); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(124, 22); this.toolStripMenuItem1.Text = "复制全部"; this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); // // 粘贴ToolStripMenuItem // this.粘贴ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("粘贴ToolStripMenuItem.Image"))); this.粘贴ToolStripMenuItem.Name = "粘贴ToolStripMenuItem"; this.粘贴ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); this.粘贴ToolStripMenuItem.Text = "粘贴"; this.粘贴ToolStripMenuItem.Click += new System.EventHandler(this.粘贴ToolStripMenuItem_Click); // // textEditorControl1 // this.textEditorControl1.ContextMenuStrip = this.contextMenuStrip1; this.textEditorControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.textEditorControl1.IsReadOnly = false; this.textEditorControl1.Location = new System.Drawing.Point(0, 0); this.textEditorControl1.Name = "textEditorControl1"; this.textEditorControl1.Size = new System.Drawing.Size(716, 366); this.textEditorControl1.TabIndex = 0; // // Form_Code_Area // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(716, 366); this.Controls.Add(this.textEditorControl1); this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "Form_Code_Area"; this.ShowInTaskbar = false; this.Text = "Form_Code_Area"; this.Load += new System.EventHandler(this.Form_Code_Area_Load); this.contextMenuStrip1.ResumeLayout(false); this.ResumeLayout(false); } #endregion private ICSharpCode.TextEditor.TextEditorControl textEditorControl1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ToolStripMenuItem 全选ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 复制ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 粘贴ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; } }
Siyy/HaoCodeBuilder
src/HaoCodeBuilder/HaoCodeBuilder/Form_Code_Area.Designer.cs
C#
lgpl-3.0
6,243
[ 30522, 3415, 15327, 5292, 24163, 3207, 8569, 23891, 2099, 1063, 7704, 2465, 2433, 1035, 3642, 1035, 2181, 1063, 1013, 1013, 1013, 1026, 12654, 1028, 1013, 1013, 1013, 3223, 5859, 8023, 1012, 1013, 1013, 1013, 1026, 1013, 12654, 1028, 2797, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<html> <head> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> <title>OneWatershed - Admin</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" > <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="nav.css"> <link rel="stylesheet" type="text/css" href="admin.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script> function subjectSearch(name){ if (name.length==0){ document.getElementById("subjectSearch").innerHTML = ""; return; } xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){ if (this.readyState==4 && this.status==200){ document.getElementById("searchBar").innerHTML=this.responseText; document.getElementById("searchBar").style.display = "block"; } }; xmlhttp.open("GET", "searchSubject.php?x="+name, true); xmlhttp.send(); } function fillSubject(name){ var string = name; var final = string.toString(); document.getElementById("subject").value = final; document.getElementById("searchBar").style.display = "none"; } $(document).on('click', function(event) { if (!$(event.target).closest('#searchBar').length) { document.getElementById("searchBar").style.display = "none"; } }); </script> <script> function topicDropDown(themeName, index){ xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){ if (this.readyState==4 && this.status==200){ var text = this.responseText; var topics = text.split(":"); var x = document.getElementById("topicDrop"+index); while(x.length > 0){ x.remove(x.length - 1); } var option = document.createElement("option"); option.text = "Please Select a Topic"; option.selected = "true"; x.add(option); //var option2 = document.createElement("option"); //option2.text = topics[0]; //x.add(option2); for(var i=0; i < 8; i++){ var option2 = document.createElement("option") //topicString = topic[i].toString(); option2.text = topics[i]; option2.value = topics[i]; x.add(option2); } } }; xmlhttp.open("GET", "load/loadAllTopics.php?x="+themeName, true); xmlhttp.send(); } </script> </head> <body> <div id="holder"> <div class="nav"> <div class="links"> <ul class="nav"> <!-- <li><div class="login"><a href="login_page.php"><img class="logo" src="Images/earth_waterdrop.png"></a></div></li> --> <li class="object"><a class="link" href="wheel.php">Home</a></li> <li class="object"><a class="link" href="search_start.php">Search</a></li> <li class="object"><a class="link" href="upload.php">Upload</a></li> <li class="object"><a class="link" href="resources.php">Resources</a></li> <li class="object"><a class="link" href="About.php">About</a></li> <li class="object"><a class="link" href="partners.php">Partners</a></li> <?php //start session to check that the person has signed in session_start(); //do check if the person is logged in and if they are show the uploaded_data table for them to be verified and copied to live_data if(isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true && $_SESSION['accessLevel'] == 'admin'){ echo "<li class='object'><a class='link' href='member_page.php'>". $_SESSION['username']."</a><li>"; echo "<li class='object'><a class='link' id='active' href='admin_page.php'>Admin</a></li>"; } elseif (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true && $_SESSION['accessLevel'] == ''){ echo "<li class='object'><a class='link' href='member_page.php'>". $_SESSION['username']."</a><li>"; } ?> </ul> <div> <div class="nav_tooltip"> <a href="login_page.php"><img class="logo" src="Images/earth_waterdrop.png"></a> <span id="login" class="tooltiptext">Login</span> </div> <div class="nav_tooltip"> <img id="help" class="logo" src="Images/question_mark2.png" onclick="openModal()"> <span id="" class="tooltiptext">Need Help?</span> </div> <div id="search"> <form method="post" action="search_display.php"> <input id="subject" class="search" type="text" name="subject" placeholder="Search.." onkeyup="subjectSearch(this.value)" autocomplete="off"><ul id="searchBar" class="searchBarResults"></ul> <button class="search"><img class="search" src="Images/search-icon-th.png"></button> </form> </div> </div> </div> </div> <div> <form action='admin_page.php' method='post'> <div id='button'> <button id='submit' type='submit' name='modify'>Return to Admin Page</button> </div> </form> </div> <?php include 'connect.php'; //start session to check that the person has signed in session_start(); //do check if the person is logged in if(isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true && $_SESSION['accessLevel'] == 'admin'){ //if the person is logged in check if they are verifying or deleting and run process if (isset($_POST['verify'])){ //copy selected entries to live_data from uploaded_data as well as all of the info needed to make all connections work //and then delete them from uploaded_data so that they do not appear and the user does not need to manual delete them //iterate through POST to find which ones were selected and only verify those entries $sql2 = "SELECT Name FROM theme WHERE 1"; echo "<form action='action/verify.php' method='post'><section class=''><div class='lesson_container'><table class='lessons'>"; echo "<thead><tr><th>Theme & Topic<div>Theme & Topic</div></th>"; echo "<th>Recommended Theme<div>Recommended Theme</div></th>"; echo "<th>Recommended Topic<div>Recommended Topic</div></th>"; echo "<th>Name<div>Name</div></th>"; echo "<th>Language<div>Language</div></th>"; echo "<th>Primary Subject<div>Primary Subject</div></th>"; echo "<th>Secondary Subject<div>Secondary Subject</div></th>"; echo "<th>Grade(s)<div>Grade(s)</div></th>"; echo "<th>Standard(s)<div>Standard(s)</div></th>"; echo "<th>View<div>View</div></th></tr></thead><tbody>"; $y = 0; for($x =0; $x < count($_POST); $x++){ if ($_POST[$x] == 'on'){ $lessonName = $_POST['Name'.$x]; $pdfLink = $_POST['Link'.$x]; $standardIDs = $_POST['Standards_ID'.$x]; $standards = $_POST['Standard'.$x]; $primary_subject = $_POST['Primary_Subject'.$x]; $secondary_subject = $_POST['Secondary_Subject'.$x]; $language = $_POST['Language'.$x]; $grade = $_POST['Grade'.$x]; $recommendedTheme = $_POST['Theme'.$x]; $recommendedTopic = $_POST['Topic'.$x]; $result2 = $con->query($sql2); echo "<tr class='results'><td><div>Theme: <select name='theme".$y."' onchange='topicDropDown(this.value,".$y.")'><option selected='true'>Please Select a Theme</option>"; while($row2 = $result2->fetch_assoc()){ echo "<option value='".$row2['Name']."'>".$row2['Name']."</option>"; } echo "</select> Topic: <select id='topicDrop".$y."' name='topic".$y."'></select></div></td>"; echo "<td>".$recommendedTheme."</td>"; echo "<td>".$recommendedTopic."</td>"; echo "<td><input type='hidden' name='lessonName".$y."' value='$lessonName'/>". $lessonName."</td>"; echo "<td><input type='hidden' name='language".$y."' value='$language'/>".$language."</td>"; echo "<td><input type='hidden' name='primary_subject".$y."' value='$primary_subject'/>".$primary_subject."</td>"; echo "<td><input type='hidden' name='secondary_subject".$y."' value='$secondary_subject'/>".$secondary_subject."</td>"; echo "<td><input type='hidden' name='grade".$y."' value='$grade'/>".$grade."</td>"; echo "<td><input type='hidden' name='standards_ID".$y."' value='$standardIDs'/><input type='hidden' name='standards".$y."' value='$standards'/>".$standards."</td>"; echo "<td><input type='hidden' name='link".$y."' value='$pdfLink'/><a href=PDFs/$pdfLink target='_blank'>$pdfLink</a></td>"; $y = $y + 1; } } echo "</tbody></table></div></section>"; echo "<br><button>Submit</button></form>"; } elseif (isset($_POST['delete'])){ //delete selected entries from uploaded_data without copying them to live_data //iterate through POST to find which ones were selected and only verify those entries for($x =0; $x < count($_POST); $x++){ if ($_POST[$x] == 'on'){ //only do things in this if statement other wise it will create problems $lessonName = $_POST['Name'.$x]; $pdfLink = $_POST['Link' .$x]; $standardIDs = $_POST['Standards_ID' .$x]; $ids = explode(",",$standardIDs); $sql ="DELETE FROM uploaded_data WHERE uploaded_data.Name='$lessonName' AND uploaded_data.PDF_link='$pdfLink'"; if ($con->query($sql) === TRUE){ for($i =0; $i < count($ids); $i++){ $sql2 ="DELETE FROM standard_upload_junction WHERE Standard_ID='$ids[$i]'"; $con->query($sql2); } } else{ echo "The lesson " .$lessonName. " was not deleted!<br>"; } echo "The lesson ".$lessonName." was deleted<br>"; } } } elseif (isset($_POST['modify'])){ echo "<div><form action='action/commit.php' method='post' enctype='multipart/form-data'><section class=''><div class='lesson_container'><table class='lessons'><thead>"; echo "<tr class='header'><th>Checkbox<div>Checkbox</div></th>"; echo "<th>Name<div>Name</div></th>"; echo "<th>Language<div>Language</div></th>"; echo "<th>Primary Subject<div>Primary Subject</div></th>"; echo "<th>Secondary Subject<div>Secondary Subject</div></th>"; echo "<th>Grade(s)<div> Grade(s)</siv></th>"; echo "<th>Standard(s)<div>Standard(s)</div></th>"; echo "<th>Lesson Plan<div>Lesson Plan</div></th>"; echo "<th>Upload New Lesson Plan<div>Upload New Lesson Plan</div></th></tr></thead><tbody>"; $y = 0; for($x =0; $x < count($_POST); $x++){ if ($_POST[$x] == 'on'){ //do modify stuff here $lessonName = $_POST['Name'.$x]; $pdfLink = $_POST['Link' .$x]; $standardIDs = $_POST['Standards_ID' .$x]; $ids = explode(",",$standardIDs); $standards = $_POST['Standard'.$x]; $primary_subject = $_POST['Primary_Subject' .$x]; $secondary_subject = $_POST['Secondary_Subject' .$x]; $language = $_POST['Language' .$x]; $grade = $_POST['Grade' .$x]; echo "<tr><td><input type='checkbox' name='".$y."'/></td>"; echo "<td><input type='text' name='lessonName".$y."' value='$lessonName'/><input type='hidden' name='oldLessonName".$y."' value='$lessonName'/></td>"; echo "<td><input type='text' name='language".$y."' value='$language'/></td>"; echo "<td><input type='text' name='primary_subject".$y."' value='$primary_subject'/><input type='hidden' name='oldPrimarySubject".$y."' value='$primary_subject'/></td>"; echo "<td><input type='text' name='secondary_subject".$y."' value='$secondary_subject'/></td>"; echo "<td>$grade</td>"; echo "<td>$standards</td>"; echo "<td><a href=PDFs/$pdfLink target='_blank'>$pdfLink</a></td>"; echo "<td><input type='file' name='pdf".$y."'><br><br></td></tr>"; //echo "modify button selected<br>"; $y = $y + 1; } } echo "</tbody></table></div></section>"; echo"<br><button id='submit' type='submit'>Verify</button></form></div>"; } } else{ //if the user is not logged in redirect them to the login page header("Location:login.php"); } ?> </div> <br> <br> </body> <div id="images"><span> <a href="https://www.washcoll.edu/centers/ces/"><img class="CES" src="Images/CES.png" alt="CES"></a> <a href="https://www.washcoll.edu"><img class="WAC" src="Images/Black_sig_MD.png" alt="Washington College"></a> </span></div> </html>
dbenton2/onewatershed.org
action.php
PHP
apache-2.0
13,527
[ 30522, 1026, 16129, 1028, 1026, 2132, 1028, 1026, 4957, 2128, 2140, 1027, 1000, 2460, 12690, 12696, 1000, 2828, 1027, 1000, 3746, 1013, 1060, 1011, 12696, 1000, 17850, 12879, 1027, 1000, 6904, 7903, 2239, 1012, 24582, 2080, 1000, 1013, 1028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.somnusdear.coolweather.gson; import com.google.gson.annotations.SerializedName; /** * Created by Administrator on 2017/9/4. */ public class Basic { @SerializedName("city") public String cityName; @SerializedName("id") public String weatherId; public Update update; public class Update{ @SerializedName("loc") public String updateTime; } }
somnusdear/coolweather
app/src/main/java/com/somnusdear/coolweather/gson/Basic.java
Java
apache-2.0
402
[ 30522, 7427, 4012, 1012, 2061, 2213, 10182, 3207, 2906, 1012, 4658, 28949, 1012, 28177, 2239, 1025, 12324, 4012, 1012, 8224, 1012, 28177, 2239, 1012, 5754, 17287, 9285, 1012, 27289, 18442, 1025, 1013, 1008, 1008, 1008, 2580, 2011, 8911, 200...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_31) on Mon Apr 06 15:30:27 CEST 2015 --> <title>Uses of Class org.cloudbus.cloudsim.VmSchedulerTimeShared</title> <meta name="date" content="2015-04-06"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.cloudbus.cloudsim.VmSchedulerTimeShared"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/cloudbus/cloudsim/class-use/VmSchedulerTimeShared.html" target="_top">Frames</a></li> <li><a href="VmSchedulerTimeShared.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.cloudbus.cloudsim.VmSchedulerTimeShared" class="title">Uses of Class<br>org.cloudbus.cloudsim.VmSchedulerTimeShared</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeShared</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.cloudbus.cloudsim">org.cloudbus.cloudsim</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.cloudbus.cloudsim"> <!-- --> </a> <h3>Uses of <a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeShared</a> in <a href="../../../../org/cloudbus/cloudsim/package-summary.html">org.cloudbus.cloudsim</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> <caption><span>Subclasses of <a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeShared</a> in <a href="../../../../org/cloudbus/cloudsim/package-summary.html">org.cloudbus.cloudsim</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeSharedOverSubscription.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeSharedOverSubscription</a></span></code> <div class="block">This is a Time-Shared VM Scheduler, which allows over-subscription.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/cloudbus/cloudsim/class-use/VmSchedulerTimeShared.html" target="_top">Frames</a></li> <li><a href="VmSchedulerTimeShared.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
Udacity2048/CloudSimDisk
docs/org/cloudbus/cloudsim/class-use/VmSchedulerTimeShared.html
HTML
lgpl-3.0
6,590
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* ******************************************************************************* * Copyright (C) 2002-2012, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ package com.ibm.icu.dev.util; import java.util.Collection; import java.util.Iterator; import java.util.Map; import com.ibm.icu.text.UnicodeSet; import com.ibm.icu.text.UnicodeSetIterator; public abstract class Visitor { public void doAt(Object item) { if (item instanceof Collection) { doAt((Collection) item); } else if (item instanceof Map) { doAt((Map) item); } else if (item instanceof Object[]) { doAt((Object[]) item); } else if (item instanceof UnicodeSet) { doAt((UnicodeSet) item); } else { doSimpleAt(item); } } public int count(Object item) { if (item instanceof Collection) { return ((Collection) item).size(); } else if (item instanceof Map) { return ((Map) item).size(); } else if (item instanceof Object[]) { return ((Object[]) item).length; } else if (item instanceof UnicodeSet) { return ((UnicodeSet) item).size(); } else { return 1; } } // the default implementation boxing public void doAt(int o) { doSimpleAt(new Integer(o)); } public void doAt(double o) { doSimpleAt(new Double(o)); } public void doAt(char o) { doSimpleAt(new Character(o)); } // for subclassing protected void doAt (Collection c) { if (c.size() == 0) doBefore(c, null); Iterator it = c.iterator(); boolean first = true; Object last = null; while (it.hasNext()) { Object item = it.next(); if (first) { doBefore(c, item); first = false; } else { doBetween(c, last, item); } doAt(last=item); } doAfter(c, last); } protected void doAt (Map c) { doAt(c.entrySet()); } protected void doAt (UnicodeSet c) { if (c.size() == 0) doBefore(c, null); UnicodeSetIterator it = new UnicodeSetIterator(c); boolean first = true; Object last = null; Object item; CodePointRange cpr0 = new CodePointRange(); CodePointRange cpr1 = new CodePointRange(); CodePointRange cpr; while(it.nextRange()) { if (it.codepoint == UnicodeSetIterator.IS_STRING) { item = it.string; } else { cpr = last == cpr0 ? cpr1 : cpr0; // make sure we don't override last cpr.codepoint = it.codepoint; cpr.codepointEnd = it.codepointEnd; item = cpr; } if (!first) { doBefore(c, item); first = true; } else { doBetween(c, last, item); } doAt(last = item); } doAfter(c, last); } protected void doAt (Object[] c) { doBefore(c, c.length == 0 ? null : c[0]); Object last = null; for (int i = 0; i < c.length; ++i) { if (i != 0) doBetween(c, last, c[i]); doAt(last = c[i]); } doAfter(c, last); } public static class CodePointRange{ public int codepoint, codepointEnd; } // ===== MUST BE OVERRIDEN ===== abstract protected void doBefore(Object container, Object item); abstract protected void doBetween(Object container, Object lastItem, Object nextItem); abstract protected void doAfter(Object container, Object item); abstract protected void doSimpleAt(Object o); }
nightauer/quickdic-dictionary.dictionary
jars/icu4j-52_1/main/tests/framework/src/com/ibm/icu/dev/util/Visitor.java
Java
apache-2.0
4,008
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php namespace DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRTests\FHIRElement\FHIRBackboneElement\FHIRValueSet; /*! * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * * Class creation date: December 26th, 2019 15:43+0000 * * PHPFHIR Copyright: * * Copyright 2016-2019 Daniel Carbone (daniel.p.carbone@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * FHIR Copyright Notice: * * Copyright (c) 2011-2013, HL7, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of HL7 nor the names of its contributors may be used to * endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * * Generated on Tue, Sep 30, 2014 18:08+1000 for FHIR v0.0.82 */ use PHPUnit\Framework\TestCase; use DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRBackboneElement\FHIRValueSet\FHIRValueSetConcept; /** * Class FHIRValueSetConceptTest * @package \DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRTests\FHIRElement\FHIRBackboneElement\FHIRValueSet */ class FHIRValueSetConceptTest extends TestCase { public function testCanConstructTypeNoArgs() { $type = new FHIRValueSetConcept(); $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRBackboneElement\FHIRValueSet\FHIRValueSetConcept', $type); } }
dcarbone/php-fhir-generated
src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php
PHP
apache-2.0
3,281
[ 30522, 1026, 1029, 25718, 3415, 15327, 5887, 2906, 14417, 1032, 25718, 2546, 11961, 6914, 16848, 1032, 16233, 8525, 2487, 1032, 25718, 2546, 11961, 22199, 2015, 1032, 1042, 20908, 16930, 4765, 1032, 1042, 11961, 5963, 14417, 12260, 3672, 1032...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php // +--------------------------------------------------------------------------+ // | Bad Behavior Plugin - glFusion CMS | // +--------------------------------------------------------------------------+ // | dutch_utf-8.php | // | | // | Dutch language file | // +--------------------------------------------------------------------------+ // | Bad Behavior - detects and blocks unwanted Web accesses | // | Copyright (C) 2005-2014 Michael Hampton | // +--------------------------------------------------------------------------+ // | Copyright (C) 2008-2012 by the following authors: | // | | // | Mark R. Evans mark AT glfusion DOT org | // | | // | Copyright (C) 2000-2008 by the following authors: | // | | // | Authors: Dirk Haun - dirk AT haun-online DOT de | // +--------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +--------------------------------------------------------------------------+ if (!defined ('GVERSION')) { die ('This file cannot be used on its own.'); } ############################################################################### $LANG_BAD_BEHAVIOR = array( 'added' => 'Added', 'auto_refresh_off' => 'Auto Refresh Off', 'auto_refresh_on' => 'Auto Refresh On', 'automatic_captcha' => 'Automatically Added (CAPTCHA)', 'automatic_token' => 'Automatically Added (Token)', 'automatic_hp' => 'Automatically Added (Spam-X)', 'back_to_search' => 'Back to Search List', 'ban_ip' => 'Ban IPs', 'ban_list_info' => 'The IPs listed below are banned from the system. Manual bans are permanent. Automatic bans expire after 24 hours.', 'ban_results' => 'IPs listed below had errors that prevented them from being added to the ban list.', 'banned_ips' => 'Banned IPs', 'blacklist' => 'Blacklists', 'blacklist_info_text' => 'You can specify several types of bans; User Agent - Beginning of text, User Agent - anywhere in the text, User Agent Regex, URL text, Referer text or an IP address, or a range of IP addresses using CIDR format. See the <a href="https://www.glfusion.org/wiki/glfusion:bb2" target="_blank">glFusion\'s Bad Behavior2 Plugin Documentation</a> for full details on how to setup bans.', 'blacklist_items' => 'Blacklist Items', 'blacklist_new' => 'New Blacklist Entry', 'blacklist_success_delete' => 'Blacklist item(s) successfully deleted', 'blacklist_success_save' => 'Blacklist entry successfully saved', 'block_title_admin' => 'Bad Behavior2 Instellingen', 'block_title_donate' => 'Donateer', 'block_title_entry' => 'log details', 'block_title_list' => 'Bad Behavior2 Log regels', 'blocked_ips' => 'Unique IP adressen geblokkeerd', 'cancel' => 'Cancel', 'captcha' => 'CAPTCHA', 'date' => 'Date', 'delete' => 'Delete', 'delete_bl_confirm_1' => 'Are you sure you want to remove the selected blacklist entries?', 'delete_confirm_1' => 'Are you sure you want to un-ban these IPs?', 'delete_confirm_2' => 'Are you REALLY sure?', 'delete_info' => 'Remove Banned IP', 'delete_wl_confirm_1' => 'Are you sure you want to remove the selected whitelist entries?', 'denied_reason' => 'Reden', 'description' => 'Bad Behavior complements other link spam solutions by acting as a gatekeeper, preventing spammers from ever delivering their junk, and in many cases, from ever reading your site in the first place. This keeps your site\'s load down, makes your site logs cleaner, and can help prevent denial of service conditions caused by spammers.', 'donate_msg' => 'If you find this plugin useful, please consider making a donation to Michael Hampton, the original author of Bad Behavior. <a href="http://www.bad-behavior.ioerror.us/">Visit the Bad Behavior homepage</a>.', 'duplicate_error' => 'IP %s already exists in the Ban list.', 'enter_ip' => 'Enter IP', 'enter_ip_info' => 'Enter IPs to ban from the site below. Each IP should be on a separate line.', 'error' => 'Fout', 'filter' => 'Filter Selection', 'fsockopen_failed' => 'Failed to open socket. Could not perform self test.', 'fsockopen_not_available' => 'Sorry, the PHP function <code>fsockopen</code> is not available. Can not perform self test.', 'go' => 'Go', 'headers' => 'Headers', 'invalid_ip' => 'IP %s is not a valid IPv4 address.', 'ip_addr' => 'IP Addr', 'ip_address' => 'IP Address', 'ip_date' => 'IP / Date / Status', 'ip_error' => 'Invalid IP Address or CIDR format', 'ip_prompt' => 'Enter IP Address or Range', 'item' => 'IP / User Agent / URL', 'link_back' => 'Terug naar de lijst met log regels', 'list_entries' => 'Toon log regels (%d)', 'list_ips' => 'List Banned IPs', 'list_no_entries' => 'Geen log regels.', 'log_entries' => 'Log Entries', 'manual' => 'Manual', 'manually_added' => 'Manually Added', 'new_entry' => 'New Entry', 'no_bl_data_error' => 'No blacklist data entered', 'no_data' => 'No data available', 'no_data_error' => 'No whitelist data entered', 'no_filter' => 'No Filter', 'note' => 'Notes', 'page_title' => 'Bad Behavior2', 'plugin_display_name' => 'Bad Behavior2', 'reason' => 'Reason', 'results' => 'Bad Behavior2 Resultaten', 'row_date' => 'Datum', 'row_ip' => 'IP Adres', 'row_method' => 'Methode', 'row_protocol' => 'Protocol', 'row_reason' => 'Reden', 'row_referer' => 'Referrer', 'row_response' => 'Response', 'row_user_agent' => 'User Agent', 'search' => 'Zoek', 'select_all' => 'All', 'select_iprange' => 'IP / IP Range (CIDR)', 'select_ua' => 'User Agent', 'select_url' => 'URLs', 'self_test' => 'Test Bad Behavior2', 'spambot_ip' => 'IP / Range (CIDR)', 'spambot_ip_prompt' => 'Enter IP Address or Range (CIDR) to block', 'spambot_referer' => 'Referer', 'spambot_referer_prompt' => 'Enter String to match anywhere in the referer URL', 'spambots' => 'UserAgent - Anywhere', 'spambots_0' => 'UA Beginning of String', 'spambots_0_prompt' => 'Enter String to match at the Beginning of the User Agent', 'spambots_prompt' => 'Enter string to match anywhere in the User Agent', 'spambots_regex' => 'User Agent Regex', 'spambots_regex_prompt' => 'Enter Regex (regular express) to match in the User Agent', 'spambots_url' => 'URL Strings', 'spambots_url_prompt' => 'Enter string to match in the URL parameters', 'stats_blocked' => 'Geblokkeerd', 'stats_headline' => 'Bad Behavior2 Statistieken', 'stats_no_hits' => 'Geen regels.', 'stats_reason' => 'Reden', 'submit' => 'Submit', 'temp_ban' => 'Temporary Ban?', 'temporary_ban' => 'TEMPORARY BAN', 'title_lookup_ip' => 'LookUp IP adres', 'title_show_headers' => 'Toon HTTP headers', 'token' => 'Token', 'type' => 'Type', 'type_spambot_ip' => 'IP Addr', 'type_spambot_referer' => 'Referer', 'type_spambots' => 'UA Anywhere', 'type_spambots_0' => 'UA', 'type_spambots_regex' => 'UA Regex', 'type_spambots_url' => 'URL', 'ua_prompt' => 'Enter Full User Agent', 'unblock' => 'Deblokkeer IP adres', 'url' => 'URL', 'url_prompt' => 'Enter URL', 'useragent' => 'UserAgent', 'whitelist' => 'Whitelists', 'whitelist_info_text' => 'You can specify an IP address, or a range of IP addresses using CIDR format, specific User Agents or URLs on your site to whitelist. A whitelisted item will never be blocked by glFusion\'s spam protections provided by the Bad Behavior2 plugin.', 'whitelist_items' => 'Whitelist Items', 'whitelist_new' => 'New Whitelist Entry', 'whitelist_success_delete' => 'Whitelist item(s) successfully deleted', 'whitelist_success_save' => 'Whitelist entry successfully saved', 'invalid_item_id' => 'Invalid Item ID - No record found' ); $LANG_BB2_RESPONSE = array( '00000000' => 'Request Passed - No User Agent Specified', '136673cd' => 'IP adres gevonden die op de externe zwarte lijst staat', '17566707' => 'Required header \'Accept\' missing', '17f4e8c8' => 'User-Agent staat op de zwarte lijst', '17f4e8c9' => 'Referer was found on blacklist', '21f11d3f' => 'User-Agent claimed to be AvantGo, claim appears false', '2b021b1f' => 'IP adres op de http:BL zwarte lijst gevonden', '2b90f772' => 'Connection: TE present, not supported by MSIE', '35ea7ffa' => 'Invalid language specified', '408d7e72' => 'POST comes too quickly after GET', '41feed15' => 'Header \'Pragma\' without \'Cache-Control\' prohibited for HTTP/1.1 requests', '45b35e30' => 'Header \'Referer\' is corrupt', '57796684' => 'Prohibited header \'X-Aaaaaaaaaa\' or \'X-Aaaaaaaaaaaa\' present', '582ec5e4' => 'Header \'TE\' present but TE not specified in \'Connection\' header', '69920ee5' => 'Header \'Referer\' present but blank', '6c502ff1' => 'Bot not fully compliant with RFC 2965', '71436a15' => 'User-Agent claimed to be Yahoo, claim appears to be false', '799165c2' => 'Rotating user-agents detected', '7a06532b' => 'Required header \'Accept-Encoding\' missing', '7ad04a8a' => 'Prohibited header \'Range\' present', '7d12528e' => 'Prohibited header \'Range\' or \'Content-Range\' in POST request', '939a6fbb' => 'Banned proxy server in use', '9c9e4979' => 'Prohibited header \'via\' present', 'a0105122' => 'Header \'Expect\' prohibited; resend without Expect', 'a1084bad' => 'User-Agent claimed to be MSIE, with invalid Windows version', 'a52f0448' => 'Header \'Connection\' contains invalid values', 'b40c8ddc' => 'POST more than two days after GET', 'b7830251' => 'Prohibited header \'Proxy-Connection\' present', 'b9cc1d86' => 'Prohibited header \'X-Aaaaaaaaaa\' or \'X-Aaaaaaaaaaaa\' present', 'c1fa729b' => 'Use of rotating proxy servers detected', 'cd361abb' => 'Referer did not point to a form on this site', 'd60b87c7' => 'Trackback received via proxy server', 'e3990b47' => 'Obviously fake trackback received', 'dfd9b1ad' => 'Request contained a malicious JavaScript or SQL injection attack', 'e4de0453' => 'User-Agent claimed to be msnbot, claim appears to be false', 'e87553e1' => 'I know you and I don\'t like you, dirty spammer.', 'f0dcb3fd' => 'Web browser attempted to send a trackback', 'f1182195' => 'User-Agent claimed to be Googlebot, claim appears to be false.', 'f9f2b8b9' => 'A User-Agent is required but none was provided.', 'f9f3b8b0' => 'Question mark at end of query.', '96c0bd29' => 'SQL Injection detected', 'f9f3b8b1' => 'do=register BOT Attack', 'f9f3b8b2' => '/RK=0/RS= BOT', '96c0bd30' => 'Banned IP', '96c0bd40' => 'Banned by Blacklist entry' ); $PLG_bad_behavior_MESSAGE1 = 'If you see this message, then Bad Behavior2 is <b>not</b> installed correctly! Please read the installation instructions again carefully.'; $PLG_bad_behavior_MESSAGE100 = 'IP adres is gedeblokkeerd.'; $PLG_bad_behavior_MESSAGE101 = 'Er is een probleem opgetreden bij het deblokkeren van het IP adres.'; ?>
leegarner/glfusion
private/plugins/bad_behavior2/language/dutch_utf-8.php
PHP
gpl-2.0
12,907
[ 30522, 1026, 1029, 25718, 1013, 1013, 1009, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/****************************************************************************** * AUTHOR: Alexander Casal * FILE: game.cpp * DESCRIPTION: Demonstrate the use of the Strategy Design Pattern through * a very simple game which allows the user to select different * weapons. Each weapon has a different characteristic, changing * the way the player attacks. *****************************************************************************/ #include "game.h" #include "largesword.h" #include "smallsword.h" #include "bow.h" #include <memory> #include <limits> #include <iostream> /** * Constructor * * When we create the game we initialize playing to true so our game * loop runs. */ Game::Game() { playing = true; } /** * play * * Control the game loop allowing the player to select various * options. The function changeWeapon allows us to use the strategy * pattern to change which strategy we are using at runtime. */ void Game::play() { std::cout << "Welcome to the Strategy Pattern Game!\n"; showOptions(); while (playing) { switch (getOption()) { case 1: player.changeWeapon(std::make_unique<LargeSword>()); break; case 2: player.changeWeapon(std::make_unique<SmallSword>()); break; case 3: player.changeWeapon(std::make_unique<Bow>()); break; case 4: player.attack(); break; case 5: playing = false; break; } } } /** * getOption * * Prompt the user to enter an option and retrieve it. We do some simple * error checking to validate the user has entered a value between 1 and 5 * inclusive. */ int Game::getOption() { bool valid = false; int input = 0; do { std::cout << "> "; // Validate the user has entered valid data if (std::cin >> input) { valid = true; if (input <= 0 || input > 5) { std::cout << "Please enter an option between 1 and 5\n"; valid = false; } } else { std::cin.clear(); std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); std::cout << "Plese enter an option between 1 and 5\n"; } } while (!valid); return input; } /** * showOptions * * Display a list of possible options the user can input for their next * action. */ void Game::showOptions() { std::cout << "\nPlease type an option from the menu (ex: > 4)\n"; std::cout << "1.) Select large sword\n2.) Select small sword\n"; std::cout << "3.) Select bow\n4.) Attack\n5.) Quit\n"; }
alexandercasal/StrategyPattern
cpp/src/game.cpp
C++
cc0-1.0
2,429
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf")) kinsol = r.doKinematics(np.zeros((7, 1)), np.zeros((7, 1))) c = r.centerOfMass(kinsol) self.assertTrue(np.allclose(c.flat, [0.0, 0.0, -0.2425], atol=1e-4)) def testCoMJacobian(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf")) q = r.getRandomConfiguration() kinsol = r.doKinematics(q, np.zeros((7, 1))) J = r.centerOfMassJacobian(kinsol) self.assertTrue(np.shape(J) == (3, 7)) q = r.getZeroConfiguration() kinsol = r.doKinematics(q, np.zeros((7, 1))) J = r.centerOfMassJacobian(kinsol) self.assertTrue(np.allclose(J.flat, [1., 0., 0., 0., -0.2425, 0., -0.25, 0., 1., 0., 0.2425, 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], atol=1e-4)) if __name__ == '__main__': unittest.main()
billhoffman/drake
drake/bindings/python/pydrake/test/testRBTCoM.py
Python
bsd-3-clause
1,228
[ 30522, 2013, 1035, 1035, 2925, 1035, 1035, 12324, 6140, 1035, 3853, 12324, 3131, 22199, 12324, 16371, 8737, 2100, 2004, 27937, 12324, 1052, 25688, 16555, 2063, 12324, 9808, 1012, 4130, 2465, 3231, 15185, 13535, 5358, 1006, 3131, 22199, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v10/services/customer_conversion_goal_service.proto package com.google.ads.googleads.v10.services; /** * <pre> * A single operation (update) on a customer conversion goal. * </pre> * * Protobuf type {@code google.ads.googleads.v10.services.CustomerConversionGoalOperation} */ public final class CustomerConversionGoalOperation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.ads.googleads.v10.services.CustomerConversionGoalOperation) CustomerConversionGoalOperationOrBuilder { private static final long serialVersionUID = 0L; // Use CustomerConversionGoalOperation.newBuilder() to construct. private CustomerConversionGoalOperation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private CustomerConversionGoalOperation() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new CustomerConversionGoalOperation(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CustomerConversionGoalOperation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.ads.googleads.v10.resources.CustomerConversionGoal.Builder subBuilder = null; if (operationCase_ == 1) { subBuilder = ((com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_).toBuilder(); } operation_ = input.readMessage(com.google.ads.googleads.v10.resources.CustomerConversionGoal.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_); operation_ = subBuilder.buildPartial(); } operationCase_ = 1; break; } case 18: { com.google.protobuf.FieldMask.Builder subBuilder = null; if (updateMask_ != null) { subBuilder = updateMask_.toBuilder(); } updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(updateMask_); updateMask_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v10.services.CustomerConversionGoalServiceProto.internal_static_google_ads_googleads_v10_services_CustomerConversionGoalOperation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v10.services.CustomerConversionGoalServiceProto.internal_static_google_ads_googleads_v10_services_CustomerConversionGoalOperation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v10.services.CustomerConversionGoalOperation.class, com.google.ads.googleads.v10.services.CustomerConversionGoalOperation.Builder.class); } private int operationCase_ = 0; private java.lang.Object operation_; public enum OperationCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { UPDATE(1), OPERATION_NOT_SET(0); private final int value; private OperationCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static OperationCase valueOf(int value) { return forNumber(value); } public static OperationCase forNumber(int value) { switch (value) { case 1: return UPDATE; case 0: return OPERATION_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public OperationCase getOperationCase() { return OperationCase.forNumber( operationCase_); } public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> * @return Whether the updateMask field is set. */ @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> * @return The updateMask. */ @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } public static final int UPDATE_FIELD_NUMBER = 1; /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> * @return Whether the update field is set. */ @java.lang.Override public boolean hasUpdate() { return operationCase_ == 1; } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> * @return The update. */ @java.lang.Override public com.google.ads.googleads.v10.resources.CustomerConversionGoal getUpdate() { if (operationCase_ == 1) { return (com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_; } return com.google.ads.googleads.v10.resources.CustomerConversionGoal.getDefaultInstance(); } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ @java.lang.Override public com.google.ads.googleads.v10.resources.CustomerConversionGoalOrBuilder getUpdateOrBuilder() { if (operationCase_ == 1) { return (com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_; } return com.google.ads.googleads.v10.resources.CustomerConversionGoal.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (operationCase_ == 1) { output.writeMessage(1, (com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_); } if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (operationCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_); } if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getUpdateMask()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.ads.googleads.v10.services.CustomerConversionGoalOperation)) { return super.equals(obj); } com.google.ads.googleads.v10.services.CustomerConversionGoalOperation other = (com.google.ads.googleads.v10.services.CustomerConversionGoalOperation) obj; if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { if (!getUpdateMask() .equals(other.getUpdateMask())) return false; } if (!getOperationCase().equals(other.getOperationCase())) return false; switch (operationCase_) { case 1: if (!getUpdate() .equals(other.getUpdate())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasUpdateMask()) { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } switch (operationCase_) { case 1: hash = (37 * hash) + UPDATE_FIELD_NUMBER; hash = (53 * hash) + getUpdate().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.ads.googleads.v10.services.CustomerConversionGoalOperation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * A single operation (update) on a customer conversion goal. * </pre> * * Protobuf type {@code google.ads.googleads.v10.services.CustomerConversionGoalOperation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:google.ads.googleads.v10.services.CustomerConversionGoalOperation) com.google.ads.googleads.v10.services.CustomerConversionGoalOperationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v10.services.CustomerConversionGoalServiceProto.internal_static_google_ads_googleads_v10_services_CustomerConversionGoalOperation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v10.services.CustomerConversionGoalServiceProto.internal_static_google_ads_googleads_v10_services_CustomerConversionGoalOperation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v10.services.CustomerConversionGoalOperation.class, com.google.ads.googleads.v10.services.CustomerConversionGoalOperation.Builder.class); } // Construct using com.google.ads.googleads.v10.services.CustomerConversionGoalOperation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (updateMaskBuilder_ == null) { updateMask_ = null; } else { updateMask_ = null; updateMaskBuilder_ = null; } operationCase_ = 0; operation_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.ads.googleads.v10.services.CustomerConversionGoalServiceProto.internal_static_google_ads_googleads_v10_services_CustomerConversionGoalOperation_descriptor; } @java.lang.Override public com.google.ads.googleads.v10.services.CustomerConversionGoalOperation getDefaultInstanceForType() { return com.google.ads.googleads.v10.services.CustomerConversionGoalOperation.getDefaultInstance(); } @java.lang.Override public com.google.ads.googleads.v10.services.CustomerConversionGoalOperation build() { com.google.ads.googleads.v10.services.CustomerConversionGoalOperation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.ads.googleads.v10.services.CustomerConversionGoalOperation buildPartial() { com.google.ads.googleads.v10.services.CustomerConversionGoalOperation result = new com.google.ads.googleads.v10.services.CustomerConversionGoalOperation(this); if (updateMaskBuilder_ == null) { result.updateMask_ = updateMask_; } else { result.updateMask_ = updateMaskBuilder_.build(); } if (operationCase_ == 1) { if (updateBuilder_ == null) { result.operation_ = operation_; } else { result.operation_ = updateBuilder_.build(); } } result.operationCase_ = operationCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.ads.googleads.v10.services.CustomerConversionGoalOperation) { return mergeFrom((com.google.ads.googleads.v10.services.CustomerConversionGoalOperation)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.ads.googleads.v10.services.CustomerConversionGoalOperation other) { if (other == com.google.ads.googleads.v10.services.CustomerConversionGoalOperation.getDefaultInstance()) return this; if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } switch (other.getOperationCase()) { case UPDATE: { mergeUpdate(other.getUpdate()); break; } case OPERATION_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.ads.googleads.v10.services.CustomerConversionGoalOperation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.ads.googleads.v10.services.CustomerConversionGoalOperation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int operationCase_ = 0; private java.lang.Object operation_; public OperationCase getOperationCase() { return OperationCase.forNumber( operationCase_); } public Builder clearOperation() { operationCase_ = 0; operation_ = null; onChanged(); return this; } private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> * @return Whether the updateMask field is set. */ public boolean hasUpdateMask() { return updateMaskBuilder_ != null || updateMask_ != null; } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> * @return The updateMask. */ public com.google.protobuf.FieldMask getUpdateMask() { if (updateMaskBuilder_ == null) { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } else { return updateMaskBuilder_.getMessage(); } } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { if (value == null) { throw new NullPointerException(); } updateMask_ = value; onChanged(); } else { updateMaskBuilder_.setMessage(value); } return this; } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ public Builder setUpdateMask( com.google.protobuf.FieldMask.Builder builderForValue) { if (updateMaskBuilder_ == null) { updateMask_ = builderForValue.build(); onChanged(); } else { updateMaskBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { if (updateMask_ != null) { updateMask_ = com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); } else { updateMask_ = value; } onChanged(); } else { updateMaskBuilder_.mergeFrom(value); } return this; } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ public Builder clearUpdateMask() { if (updateMaskBuilder_ == null) { updateMask_ = null; onChanged(); } else { updateMask_ = null; updateMaskBuilder_ = null; } return this; } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { if (updateMaskBuilder_ != null) { return updateMaskBuilder_.getMessageOrBuilder(); } else { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } } /** * <pre> * FieldMask that determines which resource fields are modified in an update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> getUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( getUpdateMask(), getParentForChildren(), isClean()); updateMask_ = null; } return updateMaskBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v10.resources.CustomerConversionGoal, com.google.ads.googleads.v10.resources.CustomerConversionGoal.Builder, com.google.ads.googleads.v10.resources.CustomerConversionGoalOrBuilder> updateBuilder_; /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> * @return Whether the update field is set. */ @java.lang.Override public boolean hasUpdate() { return operationCase_ == 1; } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> * @return The update. */ @java.lang.Override public com.google.ads.googleads.v10.resources.CustomerConversionGoal getUpdate() { if (updateBuilder_ == null) { if (operationCase_ == 1) { return (com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_; } return com.google.ads.googleads.v10.resources.CustomerConversionGoal.getDefaultInstance(); } else { if (operationCase_ == 1) { return updateBuilder_.getMessage(); } return com.google.ads.googleads.v10.resources.CustomerConversionGoal.getDefaultInstance(); } } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ public Builder setUpdate(com.google.ads.googleads.v10.resources.CustomerConversionGoal value) { if (updateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } operation_ = value; onChanged(); } else { updateBuilder_.setMessage(value); } operationCase_ = 1; return this; } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ public Builder setUpdate( com.google.ads.googleads.v10.resources.CustomerConversionGoal.Builder builderForValue) { if (updateBuilder_ == null) { operation_ = builderForValue.build(); onChanged(); } else { updateBuilder_.setMessage(builderForValue.build()); } operationCase_ = 1; return this; } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ public Builder mergeUpdate(com.google.ads.googleads.v10.resources.CustomerConversionGoal value) { if (updateBuilder_ == null) { if (operationCase_ == 1 && operation_ != com.google.ads.googleads.v10.resources.CustomerConversionGoal.getDefaultInstance()) { operation_ = com.google.ads.googleads.v10.resources.CustomerConversionGoal.newBuilder((com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_) .mergeFrom(value).buildPartial(); } else { operation_ = value; } onChanged(); } else { if (operationCase_ == 1) { updateBuilder_.mergeFrom(value); } updateBuilder_.setMessage(value); } operationCase_ = 1; return this; } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ public Builder clearUpdate() { if (updateBuilder_ == null) { if (operationCase_ == 1) { operationCase_ = 0; operation_ = null; onChanged(); } } else { if (operationCase_ == 1) { operationCase_ = 0; operation_ = null; } updateBuilder_.clear(); } return this; } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ public com.google.ads.googleads.v10.resources.CustomerConversionGoal.Builder getUpdateBuilder() { return getUpdateFieldBuilder().getBuilder(); } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ @java.lang.Override public com.google.ads.googleads.v10.resources.CustomerConversionGoalOrBuilder getUpdateOrBuilder() { if ((operationCase_ == 1) && (updateBuilder_ != null)) { return updateBuilder_.getMessageOrBuilder(); } else { if (operationCase_ == 1) { return (com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_; } return com.google.ads.googleads.v10.resources.CustomerConversionGoal.getDefaultInstance(); } } /** * <pre> * Update operation: The customer conversion goal is expected to have a * valid resource name. * </pre> * * <code>.google.ads.googleads.v10.resources.CustomerConversionGoal update = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v10.resources.CustomerConversionGoal, com.google.ads.googleads.v10.resources.CustomerConversionGoal.Builder, com.google.ads.googleads.v10.resources.CustomerConversionGoalOrBuilder> getUpdateFieldBuilder() { if (updateBuilder_ == null) { if (!(operationCase_ == 1)) { operation_ = com.google.ads.googleads.v10.resources.CustomerConversionGoal.getDefaultInstance(); } updateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v10.resources.CustomerConversionGoal, com.google.ads.googleads.v10.resources.CustomerConversionGoal.Builder, com.google.ads.googleads.v10.resources.CustomerConversionGoalOrBuilder>( (com.google.ads.googleads.v10.resources.CustomerConversionGoal) operation_, getParentForChildren(), isClean()); operation_ = null; } operationCase_ = 1; onChanged();; return updateBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.ads.googleads.v10.services.CustomerConversionGoalOperation) } // @@protoc_insertion_point(class_scope:google.ads.googleads.v10.services.CustomerConversionGoalOperation) private static final com.google.ads.googleads.v10.services.CustomerConversionGoalOperation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.ads.googleads.v10.services.CustomerConversionGoalOperation(); } public static com.google.ads.googleads.v10.services.CustomerConversionGoalOperation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<CustomerConversionGoalOperation> PARSER = new com.google.protobuf.AbstractParser<CustomerConversionGoalOperation>() { @java.lang.Override public CustomerConversionGoalOperation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CustomerConversionGoalOperation(input, extensionRegistry); } }; public static com.google.protobuf.Parser<CustomerConversionGoalOperation> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<CustomerConversionGoalOperation> getParserForType() { return PARSER; } @java.lang.Override public com.google.ads.googleads.v10.services.CustomerConversionGoalOperation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
googleads/google-ads-java
google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/services/CustomerConversionGoalOperation.java
Java
apache-2.0
36,172
[ 30522, 1013, 1013, 7013, 2011, 1996, 8778, 17698, 21624, 1012, 2079, 2025, 10086, 999, 1013, 1013, 3120, 1024, 8224, 1013, 14997, 1013, 8224, 19303, 1013, 1058, 10790, 1013, 2578, 1013, 8013, 1035, 7584, 1035, 3125, 1035, 2326, 1012, 15053,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * C# Version Ported by Matt Bettcher and Ian Qvist 2009-2010 * * Original C++ Version Copyright (c) 2007 Eric Jordan * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ using System; using System.Collections.Generic; using System.Diagnostics; using Microsoft.Xna.Framework; namespace FarseerPhysics.Common.Decomposition { /// <summary> /// Convex decomposition algorithm using ear clipping /// /// Properties: /// - Only works on simple polygons. /// - Does not support holes. /// - Running time is O(n^2), n = number of vertices. /// /// Source: http://www.ewjordan.com/earClip/ /// </summary> internal static class EarclipDecomposer { //box2D rev 32 - for details, see http://www.box2d.org/forum/viewtopic.php?f=4&t=83&start=50 /// <summary> /// Decompose the polygon into several smaller non-concave polygon. /// Each resulting polygon will have no more than Settings.MaxPolygonVertices vertices. /// </summary> /// <param name="vertices">The vertices.</param> /// <param name="tolerance">The tolerance.</param> public static List<Vertices> convexPartition( Vertices vertices, float tolerance = 0.001f ) { Debug.Assert( vertices.Count > 3 ); Debug.Assert( !vertices.isCounterClockWise() ); return triangulatePolygon( vertices, tolerance ); } /// <summary> /// Triangulates a polygon using simple ear-clipping algorithm. Returns /// size of Triangle array unless the polygon can't be triangulated. /// This should only happen if the polygon self-intersects, /// though it will not _always_ return null for a bad polygon - it is the /// caller's responsibility to check for self-intersection, and if it /// doesn't, it should at least check that the return value is non-null /// before using. You're warned! /// /// Triangles may be degenerate, especially if you have identical points /// in the input to the algorithm. Check this before you use them. /// /// This is totally unoptimized, so for large polygons it should not be part /// of the simulation loop. /// </summary> /// <remarks> /// Only works on simple polygons. /// </remarks> static List<Vertices> triangulatePolygon( Vertices vertices, float tolerance ) { //FPE note: Check is needed as invalid triangles can be returned in recursive calls. if( vertices.Count < 3 ) return new List<Vertices>(); var results = new List<Vertices>(); //Recurse and split on pinch points Vertices pA, pB; var pin = new Vertices( vertices ); if( resolvePinchPoint( pin, out pA, out pB, tolerance ) ) { var mergeA = triangulatePolygon( pA, tolerance ); var mergeB = triangulatePolygon( pB, tolerance ); if( mergeA.Count == -1 || mergeB.Count == -1 ) throw new Exception( "Can't triangulate your polygon." ); for( int i = 0; i < mergeA.Count; ++i ) results.Add( new Vertices( mergeA[i] ) ); for( int i = 0; i < mergeB.Count; ++i ) results.Add( new Vertices( mergeB[i] ) ); return results; } var buffer = new Vertices[vertices.Count - 2]; var bufferSize = 0; var xrem = new float[vertices.Count]; var yrem = new float[vertices.Count]; for( int i = 0; i < vertices.Count; ++i ) { xrem[i] = vertices[i].X; yrem[i] = vertices[i].Y; } var vNum = vertices.Count; while( vNum > 3 ) { // Find an ear var earIndex = -1; var earMaxMinCross = -10.0f; for( int i = 0; i < vNum; ++i ) { if( isEar( i, xrem, yrem, vNum ) ) { var lower = remainder( i - 1, vNum ); var upper = remainder( i + 1, vNum ); var d1 = new Vector2( xrem[upper] - xrem[i], yrem[upper] - yrem[i] ); var d2 = new Vector2( xrem[i] - xrem[lower], yrem[i] - yrem[lower] ); var d3 = new Vector2( xrem[lower] - xrem[upper], yrem[lower] - yrem[upper] ); Nez.Vector2Ext.normalize( ref d1 ); Nez.Vector2Ext.normalize( ref d2 ); Nez.Vector2Ext.normalize( ref d3 ); float cross12; MathUtils.cross( ref d1, ref d2, out cross12 ); cross12 = Math.Abs( cross12 ); float cross23; MathUtils.cross( ref d2, ref d3, out cross23 ); cross23 = Math.Abs( cross23 ); float cross31; MathUtils.cross( ref d3, ref d1, out cross31 ); cross31 = Math.Abs( cross31 ); //Find the maximum minimum angle float minCross = Math.Min( cross12, Math.Min( cross23, cross31 ) ); if( minCross > earMaxMinCross ) { earIndex = i; earMaxMinCross = minCross; } } } // If we still haven't found an ear, we're screwed. // Note: sometimes this is happening because the // remaining points are collinear. Really these // should just be thrown out without halting triangulation. if( earIndex == -1 ) { for( int i = 0; i < bufferSize; i++ ) results.Add( buffer[i] ); return results; } // Clip off the ear: // - remove the ear tip from the list --vNum; float[] newx = new float[vNum]; float[] newy = new float[vNum]; int currDest = 0; for( int i = 0; i < vNum; ++i ) { if( currDest == earIndex ) ++currDest; newx[i] = xrem[currDest]; newy[i] = yrem[currDest]; ++currDest; } // - add the clipped triangle to the triangle list int under = ( earIndex == 0 ) ? ( vNum ) : ( earIndex - 1 ); int over = ( earIndex == vNum ) ? 0 : ( earIndex + 1 ); var toAdd = new Triangle( xrem[earIndex], yrem[earIndex], xrem[over], yrem[over], xrem[under], yrem[under] ); buffer[bufferSize] = toAdd; ++bufferSize; // - replace the old list with the new one xrem = newx; yrem = newy; } var tooAdd = new Triangle( xrem[1], yrem[1], xrem[2], yrem[2], xrem[0], yrem[0] ); buffer[bufferSize] = tooAdd; ++bufferSize; for( int i = 0; i < bufferSize; i++ ) results.Add( new Vertices( buffer[i] ) ); return results; } /// <summary> /// Finds and fixes "pinch points," points where two polygon /// vertices are at the same point. /// /// If a pinch point is found, pin is broken up into poutA and poutB /// and true is returned; otherwise, returns false. /// /// Mostly for internal use. /// /// O(N^2) time, which sucks... /// </summary> /// <param name="pin">The pin.</param> /// <param name="poutA">The pout A.</param> /// <param name="poutB">The pout B.</param> /// <param name="tolerance"></param> static bool resolvePinchPoint( Vertices pin, out Vertices poutA, out Vertices poutB, float tolerance ) { poutA = new Vertices(); poutB = new Vertices(); if( pin.Count < 3 ) return false; bool hasPinchPoint = false; int pinchIndexA = -1; int pinchIndexB = -1; for( int i = 0; i < pin.Count; ++i ) { for( int j = i + 1; j < pin.Count; ++j ) { //Don't worry about pinch points where the points //are actually just dupe neighbors if( Math.Abs( pin[i].X - pin[j].X ) < tolerance && Math.Abs( pin[i].Y - pin[j].Y ) < tolerance && j != i + 1 ) { pinchIndexA = i; pinchIndexB = j; hasPinchPoint = true; break; } } if( hasPinchPoint ) break; } if( hasPinchPoint ) { int sizeA = pinchIndexB - pinchIndexA; if( sizeA == pin.Count ) return false; //has dupe points at wraparound, not a problem here for( int i = 0; i < sizeA; ++i ) { int ind = remainder( pinchIndexA + i, pin.Count ); // is this right poutA.Add( pin[ind] ); } int sizeB = pin.Count - sizeA; for( int i = 0; i < sizeB; ++i ) { int ind = remainder( pinchIndexB + i, pin.Count ); // is this right poutB.Add( pin[ind] ); } } return hasPinchPoint; } /// <summary> /// Fix for obnoxious behavior for the % operator for negative numbers... /// </summary> /// <param name="x">The x.</param> /// <param name="modulus">The modulus.</param> /// <returns></returns> static int remainder( int x, int modulus ) { int rem = x % modulus; while( rem < 0 ) { rem += modulus; } return rem; } /// <summary> /// Checks if vertex i is the tip of an ear in polygon defined by xv[] and yv[]. /// </summary> /// <param name="i">The i.</param> /// <param name="xv">The xv.</param> /// <param name="yv">The yv.</param> /// <param name="xvLength">Length of the xv.</param> /// <remarks> /// Assumes clockwise orientation of polygon. /// </remarks> /// <returns> /// <c>true</c> if the specified i is ear; otherwise, <c>false</c>. /// </returns> static bool isEar( int i, float[] xv, float[] yv, int xvLength ) { float dx0, dy0, dx1, dy1; if( i >= xvLength || i < 0 || xvLength < 3 ) { return false; } int upper = i + 1; int lower = i - 1; if( i == 0 ) { dx0 = xv[0] - xv[xvLength - 1]; dy0 = yv[0] - yv[xvLength - 1]; dx1 = xv[1] - xv[0]; dy1 = yv[1] - yv[0]; lower = xvLength - 1; } else if( i == xvLength - 1 ) { dx0 = xv[i] - xv[i - 1]; dy0 = yv[i] - yv[i - 1]; dx1 = xv[0] - xv[i]; dy1 = yv[0] - yv[i]; upper = 0; } else { dx0 = xv[i] - xv[i - 1]; dy0 = yv[i] - yv[i - 1]; dx1 = xv[i + 1] - xv[i]; dy1 = yv[i + 1] - yv[i]; } float cross = dx0 * dy1 - dx1 * dy0; if( cross > 0 ) return false; var myTri = new Triangle( xv[i], yv[i], xv[upper], yv[upper], xv[lower], yv[lower] ); for( int j = 0; j < xvLength; ++j ) { if( j == i || j == lower || j == upper ) continue; if( myTri.isInside( xv[j], yv[j] ) ) return false; } return true; } class Triangle : Vertices { //Constructor automatically fixes orientation to ccw public Triangle( float x1, float y1, float x2, float y2, float x3, float y3 ) { float cross = ( x2 - x1 ) * ( y3 - y1 ) - ( x3 - x1 ) * ( y2 - y1 ); if( cross > 0 ) { Add( new Vector2( x1, y1 ) ); Add( new Vector2( x2, y2 ) ); Add( new Vector2( x3, y3 ) ); } else { Add( new Vector2( x1, y1 ) ); Add( new Vector2( x3, y3 ) ); Add( new Vector2( x2, y2 ) ); } } public bool isInside( float x, float y ) { Vector2 a = this[0]; Vector2 b = this[1]; Vector2 c = this[2]; if( x < a.X && x < b.X && x < c.X ) return false; if( x > a.X && x > b.X && x > c.X ) return false; if( y < a.Y && y < b.Y && y < c.Y ) return false; if( y > a.Y && y > b.Y && y > c.Y ) return false; float vx2 = x - a.X; float vy2 = y - a.Y; float vx1 = b.X - a.X; float vy1 = b.Y - a.Y; float vx0 = c.X - a.X; float vy0 = c.Y - a.Y; float dot00 = vx0 * vx0 + vy0 * vy0; float dot01 = vx0 * vx1 + vy0 * vy1; float dot02 = vx0 * vx2 + vy0 * vy2; float dot11 = vx1 * vx1 + vy1 * vy1; float dot12 = vx1 * vx2 + vy1 * vy2; float invDenom = 1.0f / ( dot00 * dot11 - dot01 * dot01 ); float u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom; float v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom; return ( ( u > 0 ) && ( v > 0 ) && ( u + v < 1 ) ); } } } }
Blucky87/Nez
Nez.FarseerPhysics/Farseer/Common/Decomposition/EarclipDecomposer.cs
C#
mit
11,877
[ 30522, 1013, 1008, 1008, 1039, 1001, 2544, 27650, 2011, 4717, 6655, 10649, 2121, 1998, 4775, 1053, 11365, 2102, 2268, 1011, 2230, 1008, 1008, 2434, 1039, 1009, 1009, 2544, 9385, 1006, 1039, 1007, 2289, 4388, 5207, 1008, 1008, 2023, 4007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/common/chrome_version_info.h" #include "base/basictypes.h" #include "base/file_version_info.h" #include "base/string_util.h" #include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "build/build_config.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" // Generated header #include "chrome/common/chrome_release_version_info.h" namespace chrome { #if defined(OS_WIN) || defined(OS_MACOSX) // On Windows and Mac, we get the Chrome version info by querying // FileVersionInfo for the current module. VersionInfo::VersionInfo() { // The current module is already loaded in memory, so this will be cheap. base::ThreadRestrictions::ScopedAllowIO allow_io; version_info_.reset(FileVersionInfo::CreateFileVersionInfoForCurrentModule()); } VersionInfo::~VersionInfo() { } bool VersionInfo::is_valid() const { return version_info_.get() != NULL; } std::string VersionInfo::Name() const { if (!is_valid()) return std::string(); return UTF16ToUTF8(version_info_->product_name()); } std::string VersionInfo::Version() const { if (!is_valid()) return std::string(); return UTF16ToUTF8(version_info_->product_version()); } std::string VersionInfo::LastChange() const { if (!is_valid()) return std::string(); return UTF16ToUTF8(version_info_->last_change()); } bool VersionInfo::IsOfficialBuild() const { if (!is_valid()) return false; return version_info_->is_official_build(); } #elif defined(OS_POSIX) // We get chrome version information from chrome_version_info_posix.h, // a generated header. #include "chrome/common/chrome_version_info_posix.h" VersionInfo::VersionInfo() { } VersionInfo::~VersionInfo() { } bool VersionInfo::is_valid() const { return true; } std::string VersionInfo::Name() const { return PRODUCT_NAME; } std::string VersionInfo::Version() const { return PRODUCT_VERSION; } std::string VersionInfo::LastChange() const { return LAST_CHANGE; } bool VersionInfo::IsOfficialBuild() const { return IS_OFFICIAL_BUILD; } #endif std::string VersionInfo::CreateVersionString() const { std::string current_version; if (is_valid()) { current_version += Version(); #if 0 current_version += " ("; current_version += l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_UNOFFICIAL); current_version += " "; current_version += LastChange(); current_version += " "; current_version += OSType(); current_version += ")"; #endif std::string modifier = GetVersionStringModifier(); if (!modifier.empty()) current_version += " " + modifier; } return current_version; } std::string VersionInfo::OSType() const { #if defined(OS_WIN) return "Windows"; #elif defined(OS_MACOSX) return "Mac OS X"; #elif defined(OS_CHROMEOS) if (ui::ResourceBundle::HasSharedInstance()) return UTF16ToASCII(l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME)); else return "Chromium OS"; #elif defined(OS_ANDROID) return "Android"; #elif defined(OS_LINUX) return "Linux"; #elif defined(OS_FREEBSD) return "FreeBSD"; #elif defined(OS_OPENBSD) return "OpenBSD"; #elif defined(OS_SOLARIS) return "Solaris"; #else return "Unknown"; #endif } std::string VersionInfo::ChromiumReleaseVersion() const { return CHROMIUM_RELEASE_VERSION; } } // namespace chrome
leiferikb/bitpop-private
chrome/common/chrome_version_info.cc
C++
bsd-3-clause
3,604
[ 30522, 1013, 1013, 9385, 1006, 1039, 1007, 2262, 1996, 10381, 21716, 5007, 6048, 1012, 2035, 2916, 9235, 1012, 1013, 1013, 2224, 1997, 2023, 3120, 3642, 2003, 9950, 2011, 1037, 18667, 2094, 1011, 2806, 6105, 2008, 2064, 2022, 1013, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*Copyright (C) 2014 JD Software, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.jd.survey.dao.settings; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.PersistenceContext; import javax.persistence.Query; import org.skyway.spring.util.dao.AbstractJpaDao; import org.springframework.dao.DataAccessException; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import com.jd.survey.dao.interfaces.settings.InvitationDAO; import com.jd.survey.domain.settings.Invitation; /** DAO implementation to handle persistence for object :Invitation */ @Repository("InvitationDAO") @Transactional public class InvitationDAOImpl extends AbstractJpaDao<Invitation> implements InvitationDAO { private final static Set<Class<?>> dataTypes = new HashSet<Class<?>>(Arrays.asList(new Class<?>[] { Invitation.class })); @PersistenceContext(unitName = "persistenceUnit") private EntityManager entityManager; public InvitationDAOImpl() { super(); } public EntityManager getEntityManager() { return entityManager; } public Set<Class<?>> getTypes() { return dataTypes; } @Override @Transactional public SortedSet<Invitation> findSurveyAll(Long surveyDefinitionId) throws DataAccessException { return findSurveyAll(surveyDefinitionId , -1, -1); } @Override @SuppressWarnings("unchecked") @Transactional public SortedSet<Invitation> findSurveyAll(Long surveyDefinitionId,int startResult, int maxRows) throws DataAccessException { Query query = createNamedQuery("Invitation.findSurveyAll", startResult,maxRows , surveyDefinitionId); return new TreeSet<Invitation>(query.getResultList()); } @Override @Transactional public Invitation findById(Long id) throws DataAccessException { try { Query query = createNamedQuery("Invitation.findById", -1, -1, id); return (Invitation) query.getSingleResult(); } catch (NoResultException nre) { return null; } } @Override @Transactional public Invitation findByUuid(String uuid) throws DataAccessException { try { Query query = createNamedQuery("Invitation.findByUuid", -1, -1, uuid); return (Invitation) query.getSingleResult(); } catch (NoResultException nre) { return null; } } @Override @Transactional public Long getSurveyCount(Long surveyDefinitionId) throws DataAccessException { try { Query query = createNamedQuery("Invitation.getSurveyCount",-1,-1,surveyDefinitionId); return (Long) query.getSingleResult(); } catch (NoResultException nre) { return null; } } @Override @Transactional public Long getSurveyOpenedCount(Long surveyDefinitionId) throws DataAccessException { try { Query query = createNamedQuery("Invitation.getSurveyOpenedCount",-1,-1, surveyDefinitionId); return (Long) query.getSingleResult(); } catch (NoResultException nre) { return null; } } @SuppressWarnings("unchecked") @Override @Transactional public SortedSet<Invitation> searchByFirstName(String firstName) throws DataAccessException { Query query = createNamedQuery("Invitation.searchByFirstName", -1, -1 , "%" + firstName +"%" ); return new TreeSet<Invitation>(query.getResultList()); } @SuppressWarnings("unchecked") @Override @Transactional public SortedSet<Invitation> searchByLastName(String lastName) throws DataAccessException { Query query = createNamedQuery("Invitation.searchByLastName", -1, -1 , "%" + lastName +"%" ); return new TreeSet<Invitation>(query.getResultList()); } @SuppressWarnings("unchecked") @Override @Transactional public SortedSet<Invitation> searchByFirstNameAndLastName(String firstName , String lastName) throws DataAccessException { Query query = createNamedQuery("Invitation.searchByFirstNameAndLastName", -1, -1 , "%" + firstName +"%" , "%" + lastName +"%"); return new TreeSet<Invitation>(query.getResultList()); } @SuppressWarnings("unchecked") @Override @Transactional public SortedSet<Invitation> searchByEmail(String email) throws DataAccessException { Query query = createNamedQuery("Invitation.searchByEmail", -1, -1 , "%" + email +"%" ); return new TreeSet<Invitation>(query.getResultList()); } public boolean canBeMerged(Invitation entity) { return true; } }
pku1001210910/JDeSurvey
jdsurvey-core/src/main/java/com/jd/survey/dao/settings/InvitationDAOImpl.java
Java
agpl-3.0
5,161
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2297, 26219, 4007, 1010, 4297, 1012, 2023, 2565, 2003, 2489, 4007, 1024, 2017, 2064, 2417, 2923, 3089, 8569, 2618, 2009, 1998, 1013, 2030, 19933, 2009, 2104, 1996, 3408, 1997, 1996, 27004, 21358, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#pragma once #include "Painter.h" #include "Piece.h" #define FIELD_WIDTH 10 // blocks #define FIELD_HEIGHT 20 // blocks #define FIELD_X_PX 10 #define FIELD_Y_PX 10 #define FIELD_WIDTH_PX (BLOCK_SIZE_PX * FIELD_WIDTH) #define FIELD_HEIGHT_PX (BLOCK_SIZE_PX * FIELD_HEIGHT) #define BLANK -1 class Field { public: Field(Painter *painter); void draw(); void reset(); void drawPiece(Piece *piece, int posX, int posY); Uint8 checkCollisions(Piece *piece, int posX, int posY, Uint8 what); int clearRows(); void copyPieceToHeap(Piece *piece, int posX, int posY); bool checkNotBlank(int x, int y); enum { COLLIDED_LEFT = 1, COLLIDED_RIGHT = 2, COLLIDED_HEAP = 4, COLLIDED_TOP = 8 }; private: void drawHeap(); Painter *m_painter; int m_field[FIELD_WIDTH][FIELD_HEIGHT]; };
luza/tetris
Field.h
C
apache-2.0
928
[ 30522, 1001, 10975, 8490, 2863, 2320, 1001, 2421, 1000, 5276, 1012, 1044, 1000, 1001, 2421, 1000, 3538, 1012, 1044, 1000, 1001, 9375, 2492, 1035, 9381, 2184, 1013, 1013, 5991, 1001, 9375, 2492, 1035, 4578, 2322, 1013, 1013, 5991, 1001, 93...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-06-06 02:47 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Car', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('car_model', models.CharField(max_length=20)), ('color', models.CharField(max_length=20)), ('year', models.SmallIntegerField(help_text='Use year as YYYY.', validators=[django.core.validators.RegexValidator('^[0-9]{4}$', 'Year in invalid format!', 'invalid')])), ('mileage', models.IntegerField(default=0, help_text='Or your car is brand new or it have some mileage traveled', validators=[django.core.validators.MinValueValidator(0)])), ], ), migrations.CreateModel( name='OilChange', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date', models.DateTimeField(verbose_name='date changed')), ('mileage', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)])), ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='car.Car')), ], ), migrations.CreateModel( name='Refuel', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date', models.DateTimeField(verbose_name='date refueled')), ('liters', models.DecimalField(decimal_places=3, max_digits=7)), ('fuel_price', models.DecimalField(decimal_places=2, max_digits=4)), ('mileage', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)])), ('fuel_type', models.CharField(choices=[('Regular gas', 'Regular gas'), ('Premium gas', 'Premium gas'), ('Alcohol', 'Alcohol'), ('Diesel', 'Diesel')], default='Regular gas', max_length=20)), ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='car.Car')), ], ), ]
italopaiva/your.car
yourcar/car/migrations/0001_initial.py
Python
bsd-2-clause
2,468
[ 30522, 1001, 1011, 1008, 1011, 16861, 1024, 21183, 2546, 1011, 1022, 1011, 1008, 1011, 1001, 7013, 2011, 6520, 23422, 1015, 1012, 1023, 1012, 1020, 2006, 2355, 1011, 5757, 1011, 5757, 6185, 1024, 4700, 2013, 1035, 1035, 2925, 1035, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/////////////////////////////////////////////////6//////////////////////// // $Id: sse.cc 11984 2013-12-01 22:21:55Z sshwarts $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2003-2013 Stanislav Shwartsman // Written by Stanislav Shwartsman [sshwarts at sourceforge net] // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA B 02110-1301 USA // ///////////////////////////////////////////////////////////////////////// #define NEED_CPU_REG_SHORTCUTS 1 #include "bochs.h" #include "cpu.h" #define LOG_THIS BX_CPU_THIS_PTR /* ********************************************** */ /* SSE Integer Operations (128bit MMX extensions) */ /* ********************************************** */ #if BX_CPU_LEVEL >= 6 #include "simd_int.h" #include "simd_compare.h" #define SSE_2OP(HANDLER, func) \ /* SSE instruction with two src operands */ \ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C :: HANDLER (bxInstruction_c *i) \ { \ BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->dst()), op2 = BX_READ_XMM_REG(i->src()); \ (func)(&op1, &op2); \ BX_WRITE_XMM_REG(i->dst(), op1); \ \ BX_NEXT_INSTR(i); \ } SSE_2OP(PHADDW_VdqWdqR, xmm_phaddw) SSE_2OP(PHADDSW_VdqWdqR, xmm_phaddsw) SSE_2OP(PHADDD_VdqWdqR, xmm_phaddd) SSE_2OP(PHSUBW_VdqWdqR, xmm_phsubw) SSE_2OP(PHSUBSW_VdqWdqR, xmm_phsubsw) SSE_2OP(PHSUBD_VdqWdqR, xmm_phsubd) SSE_2OP(PSIGNB_VdqWdqR, xmm_psignb) SSE_2OP(PSIGNW_VdqWdqR, xmm_psignw) SSE_2OP(PSIGND_VdqWdqR, xmm_psignd) SSE_2OP(PCMPEQQ_VdqWdqR, xmm_pcmpeqq) SSE_2OP(PCMPGTQ_VdqWdqR, xmm_pcmpgtq) SSE_2OP(PMINSB_VdqWdqR, xmm_pminsb) SSE_2OP(PMINSD_VdqWdqR, xmm_pminsd) SSE_2OP(PMINUW_VdqWdqR, xmm_pminuw) SSE_2OP(PMINUD_VdqWdqR, xmm_pminud) SSE_2OP(PMAXSB_VdqWdqR, xmm_pmaxsb) SSE_2OP(PMAXSD_VdqWdqR, xmm_pmaxsd) SSE_2OP(PMAXUW_VdqWdqR, xmm_pmaxuw) SSE_2OP(PMAXUD_VdqWdqR, xmm_pmaxud) SSE_2OP(PACKUSDW_VdqWdqR, xmm_packusdw) SSE_2OP(PMULLD_VdqWdqR, xmm_pmulld) SSE_2OP(PMULDQ_VdqWdqR, xmm_pmuldq) SSE_2OP(PMULHRSW_VdqWdqR, xmm_pmulhrsw) SSE_2OP(PMADDUBSW_VdqWdqR, xmm_pmaddubsw) #endif // BX_CPU_LEVEL >= 6 #if BX_CPU_LEVEL >= 6 #define SSE_2OP_CPU_LEVEL6(HANDLER, func) \ SSE_2OP(HANDLER, func) #else #define SSE_2OP_CPU_LEVEL6(HANDLER, func) \ /* SSE instruction with two src operands */ \ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C :: HANDLER (bxInstruction_c *i) \ { \ BX_NEXT_INSTR(i); \ } #endif SSE_2OP_CPU_LEVEL6(PMINUB_VdqWdqR, xmm_pminub) SSE_2OP_CPU_LEVEL6(PMINSW_VdqWdqR, xmm_pminsw) SSE_2OP_CPU_LEVEL6(PMAXUB_VdqWdqR, xmm_pmaxub) SSE_2OP_CPU_LEVEL6(PMAXSW_VdqWdqR, xmm_pmaxsw) SSE_2OP_CPU_LEVEL6(PAVGB_VdqWdqR, xmm_pavgb) SSE_2OP_CPU_LEVEL6(PAVGW_VdqWdqR, xmm_pavgw) SSE_2OP_CPU_LEVEL6(PCMPEQB_VdqWdqR, xmm_pcmpeqb) SSE_2OP_CPU_LEVEL6(PCMPEQW_VdqWdqR, xmm_pcmpeqw) SSE_2OP_CPU_LEVEL6(PCMPEQD_VdqWdqR, xmm_pcmpeqd) SSE_2OP_CPU_LEVEL6(PCMPGTB_VdqWdqR, xmm_pcmpgtb) SSE_2OP_CPU_LEVEL6(PCMPGTW_VdqWdqR, xmm_pcmpgtw) SSE_2OP_CPU_LEVEL6(PCMPGTD_VdqWdqR, xmm_pcmpgtd) SSE_2OP_CPU_LEVEL6(ANDPS_VpsWpsR, xmm_andps) SSE_2OP_CPU_LEVEL6(ANDNPS_VpsWpsR, xmm_andnps) SSE_2OP_CPU_LEVEL6(ORPS_VpsWpsR, xmm_orps) SSE_2OP_CPU_LEVEL6(XORPS_VpsWpsR, xmm_xorps) SSE_2OP_CPU_LEVEL6(PSUBB_VdqWdqR, xmm_psubb) SSE_2OP_CPU_LEVEL6(PSUBW_VdqWdqR, xmm_psubw) SSE_2OP_CPU_LEVEL6(PSUBD_VdqWdqR, xmm_psubd) SSE_2OP_CPU_LEVEL6(PSUBQ_VdqWdqR, xmm_psubq) SSE_2OP_CPU_LEVEL6(PADDB_VdqWdqR, xmm_paddb) SSE_2OP_CPU_LEVEL6(PADDW_VdqWdqR, xmm_paddw) SSE_2OP_CPU_LEVEL6(PADDD_VdqWdqR, xmm_paddd) SSE_2OP_CPU_LEVEL6(PADDQ_VdqWdqR, xmm_paddq) SSE_2OP_CPU_LEVEL6(PSUBSB_VdqWdqR, xmm_psubsb) SSE_2OP_CPU_LEVEL6(PSUBUSB_VdqWdqR, xmm_psubusb) SSE_2OP_CPU_LEVEL6(PSUBSW_VdqWdqR, xmm_psubsw) SSE_2OP_CPU_LEVEL6(PSUBUSW_VdqWdqR, xmm_psubusw) SSE_2OP_CPU_LEVEL6(PADDSB_VdqWdqR, xmm_paddsb) SSE_2OP_CPU_LEVEL6(PADDUSB_VdqWdqR, xmm_paddusb) SSE_2OP_CPU_LEVEL6(PADDSW_VdqWdqR, xmm_paddsw) SSE_2OP_CPU_LEVEL6(PADDUSW_VdqWdqR, xmm_paddusw) SSE_2OP_CPU_LEVEL6(PACKUSWB_VdqWdqR, xmm_packuswb) SSE_2OP_CPU_LEVEL6(PACKSSWB_VdqWdqR, xmm_packsswb) SSE_2OP_CPU_LEVEL6(PACKSSDW_VdqWdqR, xmm_packssdw) SSE_2OP_CPU_LEVEL6(UNPCKLPS_VpsWpsR, xmm_unpcklps) SSE_2OP_CPU_LEVEL6(UNPCKHPS_VpsWpsR, xmm_unpckhps) SSE_2OP_CPU_LEVEL6(PUNPCKLQDQ_VdqWdqR, xmm_unpcklpd) SSE_2OP_CPU_LEVEL6(PUNPCKHQDQ_VdqWdqR, xmm_unpckhpd) SSE_2OP_CPU_LEVEL6(PUNPCKLBW_VdqWdqR, xmm_punpcklbw) SSE_2OP_CPU_LEVEL6(PUNPCKLWD_VdqWdqR, xmm_punpcklwd) SSE_2OP_CPU_LEVEL6(PUNPCKHBW_VdqWdqR, xmm_punpckhbw) SSE_2OP_CPU_LEVEL6(PUNPCKHWD_VdqWdqR, xmm_punpckhwd) SSE_2OP_CPU_LEVEL6(PMULLW_VdqWdqR, xmm_pmullw) SSE_2OP_CPU_LEVEL6(PMULHW_VdqWdqR, xmm_pmulhw) SSE_2OP_CPU_LEVEL6(PMULHUW_VdqWdqR, xmm_pmulhuw) SSE_2OP_CPU_LEVEL6(PMULUDQ_VdqWdqR, xmm_pmuludq) SSE_2OP_CPU_LEVEL6(PMADDWD_VdqWdqR, xmm_pmaddwd) SSE_2OP_CPU_LEVEL6(PSADBW_VdqWdqR, xmm_psadbw) #if BX_CPU_LEVEL >= 6 #define SSE_1OP(HANDLER, func) \ /* SSE instruction with single src operand */ \ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C :: HANDLER (bxInstruction_c *i) \ { \ BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); \ (func)(&op); \ BX_WRITE_XMM_REG(i->dst(), op); \ \ BX_NEXT_INSTR(i); \ } SSE_1OP(PABSB_VdqWdqR, xmm_pabsb) SSE_1OP(PABSW_VdqWdqR, xmm_pabsw) SSE_1OP(PABSD_VdqWdqR, xmm_pabsd) BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PSHUFB_VdqWdqR(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->dst()); BxPackedXmmRegister op2 = BX_READ_XMM_REG(i->src()), result; xmm_pshufb(&result, &op1, &op2); BX_WRITE_XMM_REG(i->dst(), result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PBLENDVB_VdqWdqR(bxInstruction_c *i) { xmm_pblendvb(&BX_XMM_REG(i->dst()), &BX_XMM_REG(i->src()), &BX_XMM_REG(0)); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::BLENDVPS_VpsWpsR(bxInstruction_c *i) { xmm_blendvps(&BX_XMM_REG(i->dst()), &BX_XMM_REG(i->src()), &BX_XMM_REG(0)); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::BLENDVPD_VpdWpdR(bxInstruction_c *i) { xmm_blendvpd(&BX_XMM_REG(i->dst()), &BX_XMM_REG(i->src()), &BX_XMM_REG(0)); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PTEST_VdqWdqR(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->dst()), op2 = BX_READ_XMM_REG(i->src()); unsigned result = 0; if ((op2.xmm64u(0) & op1.xmm64u(0)) == 0 && (op2.xmm64u(1) & op1.xmm64u(1)) == 0) result |= EFlagsZFMask; if ((op2.xmm64u(0) & ~op1.xmm64u(0)) == 0 && (op2.xmm64u(1) & ~op1.xmm64u(1)) == 0) result |= EFlagsCFMask; setEFlagsOSZAPC(result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PHMINPOSUW_VdqWdqR(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); unsigned min = 0; for (unsigned j=1; j < 8; j++) { if (op.xmm16u(j) < op.xmm16u(min)) min = j; } op.xmm16u(0) = op.xmm16u(min); op.xmm16u(1) = min; op.xmm32u(1) = 0; op.xmm64u(1) = 0; BX_WRITE_XMM_REGZ(i->dst(), op, i->getVL()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::BLENDPS_VpsWpsIbR(bxInstruction_c *i) { xmm_blendps(&BX_XMM_REG(i->dst()), &BX_XMM_REG(i->src()), i->Ib()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::BLENDPD_VpdWpdIbR(bxInstruction_c *i) { xmm_blendpd(&BX_XMM_REG(i->dst()), &BX_XMM_REG(i->src()), i->Ib()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PBLENDW_VdqWdqIbR(bxInstruction_c *i) { xmm_pblendw(&BX_XMM_REG(i->dst()), &BX_XMM_REG(i->src()), i->Ib()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRB_EbdVdqIbR(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit8u result = op.xmmubyte(i->Ib() & 0xF); BX_WRITE_32BIT_REGZ(i->dst(), (Bit32u) result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRB_EbdVdqIbM(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit8u result = op.xmmubyte(i->Ib() & 0xF); bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); write_virtual_byte(i->seg(), eaddr, result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRW_EwdVdqIbR(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit16u result = op.xmm16u(i->Ib() & 7); BX_WRITE_32BIT_REGZ(i->dst(), (Bit32u) result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRW_EwdVdqIbM(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit16u result = op.xmm16u(i->Ib() & 7); bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); write_virtual_word(i->seg(), eaddr, result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRD_EdVdqIbR(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); #if BX_SUPPORT_X86_64 if (i->os64L()) /* 64 bit operand size mode */ { Bit64u result = op.xmm64u(i->Ib() & 1); BX_WRITE_64BIT_REG(i->dst(), result); } else #endif { Bit32u result = op.xmm32u(i->Ib() & 3); BX_WRITE_32BIT_REGZ(i->dst(), result); } BX_NEXT_INSTR(i); } #if BX_SUPPORT_X86_64 BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRQ_EqVdqIbR(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit64u result = op.xmm64u(i->Ib() & 1); BX_WRITE_64BIT_REG(i->dst(), result); BX_NEXT_INSTR(i); } #endif BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRD_EdVdqIbM(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); #if BX_SUPPORT_X86_64 if (i->os64L()) /* 64 bit operand size mode */ { Bit64u result = op.xmm64u(i->Ib() & 1); write_virtual_qword_64(i->seg(), eaddr, result); } else #endif { Bit32u result = op.xmm32u(i->Ib() & 3); write_virtual_dword(i->seg(), eaddr, result); } BX_NEXT_INSTR(i); } #if BX_SUPPORT_X86_64 BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRQ_EqVdqIbM(bxInstruction_c *i) { bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit64u result = op.xmm64u(i->Ib() & 1); write_virtual_qword_64(i->seg(), eaddr, result); BX_NEXT_INSTR(i); } #endif BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::EXTRACTPS_EdVpsIbR(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit32u result = op.xmm32u(i->Ib() & 3); BX_WRITE_32BIT_REGZ(i->dst(), result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::EXTRACTPS_EdVpsIbM(bxInstruction_c *i) { BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit32u result = op.xmm32u(i->Ib() & 3); bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); write_virtual_dword(i->seg(), eaddr, result); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PINSRB_VdqHdqEbIbR(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->src1()); op1.xmmubyte(i->Ib() & 0xF) = BX_READ_8BIT_REGL(i->src2()); // won't allow reading of AH/CH/BH/DH BX_WRITE_XMM_REGZ(i->dst(), op1, i->getVL()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PINSRB_VdqHdqEbIbM(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->src1()); bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); op1.xmmubyte(i->Ib() & 0xF) = read_virtual_byte(i->seg(), eaddr); BX_WRITE_XMM_REGZ(i->dst(), op1, i->getVL()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::INSERTPS_VpsHpsWssIb(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->src1()); Bit8u control = i->Ib(); Bit32u op2; /* op2 is a register or memory reference */ if (i->modC0()) { BxPackedXmmRegister temp = BX_READ_XMM_REG(i->src2()); op2 = temp.xmm32u((control >> 6) & 3); } else { bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); op2 = read_virtual_dword(i->seg(), eaddr); } op1.xmm32u((control >> 4) & 3) = op2; if (control & 1) op1.xmm32u(0) = 0; if (control & 2) op1.xmm32u(1) = 0; if (control & 4) op1.xmm32u(2) = 0; if (control & 8) op1.xmm32u(3) = 0; BX_WRITE_XMM_REGZ(i->dst(), op1, i->getVL()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PINSRD_VdqHdqEdIbR(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->src1()); #if BX_SUPPORT_X86_64 if (i->os64L()) { /* 64 bit operand size mode */ op1.xmm64u(i->Ib() & 1) = BX_READ_64BIT_REG(i->src2()); } else #endif { op1.xmm32u(i->Ib() & 3) = BX_READ_32BIT_REG(i->src2()); } BX_WRITE_XMM_REGZ(i->dst(), op1, i->getVL()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PINSRD_VdqHdqEdIbM(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->src1()); bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); #if BX_SUPPORT_X86_64 if (i->os64L()) { /* 64 bit operand size mode */ Bit64u op2 = read_virtual_qword_64(i->seg(), eaddr); op1.xmm64u(i->Ib() & 1) = op2; } else #endif { Bit32u op2 = read_virtual_dword(i->seg(), eaddr); op1.xmm32u(i->Ib() & 3) = op2; } BX_WRITE_XMM_REGZ(i->dst(), op1, i->getVL()); BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::MPSADBW_VdqWdqIbR(bxInstruction_c *i) { BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->dst()); BxPackedXmmRegister op2 = BX_READ_XMM_REG(i->src()), result; xmm_mpsadbw(&result, &op1, &op2, i->Ib() & 0x7); BX_WRITE_XMM_REG(i->dst(), result); BX_NEXT_INSTR(i); } #endif // BX_CPU_LEVEL >= 6 BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PSHUFD_VdqWdqIbR(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()), result; xmm_shufps(&result, &op, &op, i->Ib()); BX_WRITE_XMM_REG(i->dst(), result); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PSHUFHW_VdqWdqIbR(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()), result; xmm_pshufhw(&result, &op, i->Ib()); BX_WRITE_XMM_REG(i->dst(), result); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PSHUFLW_VdqWdqIbR(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()), result; xmm_pshuflw(&result, &op, i->Ib()); BX_WRITE_XMM_REG(i->dst(), result); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PINSRW_VdqHdqEwIbR(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->src1()); Bit8u count = i->Ib() & 0x7; op1.xmm16u(count) = BX_READ_16BIT_REG(i->src2()); BX_WRITE_XMM_REGZ(i->dst(), op1, i->getVL()); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::PEXTRW_GdUdqIb(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister op = BX_READ_XMM_REG(i->src()); Bit8u count = i->Ib() & 0x7; Bit32u result = (Bit32u) op.xmm16u(count); BX_WRITE_32BIT_REGZ(i->dst(), result); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::SHUFPS_VpsWpsIbR(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->dst()); BxPackedXmmRegister op2 = BX_READ_XMM_REG(i->src()), result; xmm_shufps(&result, &op1, &op2, i->Ib()); BX_WRITE_XMM_REG(i->dst(), result); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::SHUFPD_VpdWpdIbR(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->dst()); BxPackedXmmRegister op2 = BX_READ_XMM_REG(i->src()), result; xmm_shufpd(&result, &op1, &op2, i->Ib()); BX_WRITE_XMM_REG(i->dst(), result); #endif BX_NEXT_INSTR(i); } #if BX_CPU_LEVEL >= 6 #define SSE_PSHIFT_CPU_LEVEL6(HANDLER, func) \ /* SSE packed shift instruction */ \ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C:: HANDLER (bxInstruction_c *i) \ { \ BxPackedXmmRegister op = BX_READ_XMM_REG(i->dst()); \ \ (func)(&op, BX_READ_XMM_REG_LO_QWORD(i->src())); \ \ BX_WRITE_XMM_REG(i->dst(), op); \ \ BX_NEXT_INSTR(i); \ } #else #define SSE_PSHIFT_CPU_LEVEL6(HANDLER, func) \ /* SSE instruction with two src operands */ \ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C :: HANDLER (bxInstruction_c *i) \ { \ BX_NEXT_INSTR(i); \ } #endif SSE_PSHIFT_CPU_LEVEL6(PSRLW_VdqWdqR, xmm_psrlw); SSE_PSHIFT_CPU_LEVEL6(PSRLD_VdqWdqR, xmm_psrld); SSE_PSHIFT_CPU_LEVEL6(PSRLQ_VdqWdqR, xmm_psrlq); SSE_PSHIFT_CPU_LEVEL6(PSRAW_VdqWdqR, xmm_psraw); SSE_PSHIFT_CPU_LEVEL6(PSRAD_VdqWdqR, xmm_psrad); SSE_PSHIFT_CPU_LEVEL6(PSLLW_VdqWdqR, xmm_psllw); SSE_PSHIFT_CPU_LEVEL6(PSLLD_VdqWdqR, xmm_pslld); SSE_PSHIFT_CPU_LEVEL6(PSLLQ_VdqWdqR, xmm_psllq); #if BX_CPU_LEVEL >= 6 #define SSE_PSHIFT_IMM_CPU_LEVEL6(HANDLER, func) \ /* SSE packed shift with imm8 instruction */ \ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C:: HANDLER (bxInstruction_c *i) \ { \ (func)(&BX_XMM_REG(i->dst()), i->Ib()); \ \ BX_NEXT_INSTR(i); \ } #else #define SSE_PSHIFT_IMM_CPU_LEVEL6(HANDLER, func) \ /* SSE packed shift with imm8 instruction */ \ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C :: HANDLER (bxInstruction_c *i) \ { \ BX_NEXT_INSTR(i); \ } #endif SSE_PSHIFT_IMM_CPU_LEVEL6(PSRLW_UdqIb, xmm_psrlw); SSE_PSHIFT_IMM_CPU_LEVEL6(PSRLD_UdqIb, xmm_psrld); SSE_PSHIFT_IMM_CPU_LEVEL6(PSRLQ_UdqIb, xmm_psrlq); SSE_PSHIFT_IMM_CPU_LEVEL6(PSRAW_UdqIb, xmm_psraw); SSE_PSHIFT_IMM_CPU_LEVEL6(PSRAD_UdqIb, xmm_psrad); SSE_PSHIFT_IMM_CPU_LEVEL6(PSLLW_UdqIb, xmm_psllw); SSE_PSHIFT_IMM_CPU_LEVEL6(PSLLD_UdqIb, xmm_pslld); SSE_PSHIFT_IMM_CPU_LEVEL6(PSLLQ_UdqIb, xmm_psllq); SSE_PSHIFT_IMM_CPU_LEVEL6(PSRLDQ_UdqIb, xmm_psrldq); SSE_PSHIFT_IMM_CPU_LEVEL6(PSLLDQ_UdqIb, xmm_pslldq); /* ************************ */ /* SSE4A (AMD) INSTRUCTIONS */ /* ************************ */ #if BX_CPU_LEVEL >= 6 BX_CPP_INLINE Bit64u xmm_extrq(Bit64u src, unsigned shift, unsigned len) { len &= 0x3f; shift &= 0x3f; src >>= shift; if (len) { Bit64u mask = (BX_CONST64(1) << len) - 1; return src & mask; } return src; } BX_CPP_INLINE Bit64u xmm_insertq(Bit64u dest, Bit64u src, unsigned shift, unsigned len) { Bit64u mask; len &= 0x3f; shift &= 0x3f; if (len == 0) { mask = BX_CONST64(0xffffffffffffffff); } else { mask = (BX_CONST64(1) << len) - 1; } return (dest & ~(mask << shift)) | ((src & mask) << shift); } #endif BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::EXTRQ_UdqIbIb(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BX_WRITE_XMM_REG_LO_QWORD(i->dst(), xmm_extrq(BX_READ_XMM_REG_LO_QWORD(i->dst()), i->Ib2(), i->Ib())); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::EXTRQ_VdqUq(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 Bit16u ctrl = BX_READ_XMM_REG_LO_WORD(i->src()); BX_WRITE_XMM_REG_LO_QWORD(i->dst(), xmm_extrq(BX_READ_XMM_REG_LO_QWORD(i->dst()), ctrl >> 8, ctrl)); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::INSERTQ_VdqUqIbIb(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 Bit64u dst = BX_READ_XMM_REG_LO_QWORD(i->dst()), src = BX_READ_XMM_REG_LO_QWORD(i->src()); BX_WRITE_XMM_REG_LO_QWORD(i->dst(), xmm_insertq(dst, src, i->Ib2(), i->Ib())); #endif BX_NEXT_INSTR(i); } BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::INSERTQ_VdqUdq(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 6 BxPackedXmmRegister src = BX_READ_XMM_REG(i->src()); Bit64u dst = BX_READ_XMM_REG_LO_QWORD(i->dst()); BX_WRITE_XMM_REG_LO_QWORD(i->dst(), xmm_insertq(dst, src.xmm64u(0), src.xmmubyte(9), src.xmmubyte(8))); #endif BX_NEXT_INSTR(i); }
matildah/bochsdoor
cpu/sse.cc
C++
lgpl-2.1
23,130
[ 30522, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using LeagueSharp; using LeagueSharp.Common; using Marksman.Common; using EloBuddy; using LeagueSharp.Common; namespace Marksman.Champions.Common { internal static class PlayerSpells { public static void CastSpellWithHitchance(this Spell spell, AIHeroClient t) { var nPrediction = spell.GetPrediction(t); var nHitPosition = nPrediction.CastPosition.Extend(ObjectManager.Player.Position, -140); if (nPrediction.Hitchance >= spell.GetHitchance()) { spell.Cast(nHitPosition); } } } }
saophaisau/port
Core/AIO Ports/Marksman II/Champions/Common/PlayerSpells.cs
C#
gpl-3.0
713
[ 30522, 2478, 2291, 1025, 2478, 2291, 1012, 6407, 1012, 12391, 1025, 2478, 2291, 1012, 11409, 4160, 1025, 2478, 2291, 1012, 3793, 1025, 2478, 2291, 1012, 11689, 2075, 1012, 8518, 1025, 2478, 8121, 8167, 2361, 1025, 2478, 8121, 8167, 2361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* ==== editable-form ==== */ /* class for single editable element */ .editable-wrap { display: inline-block; white-space: pre; margin: 0; } /* remove bottom-margin for bootstrap */ .editable-wrap .editable-controls, .editable-wrap .editable-error { margin-bottom: 0; } /* remove bottom-margin of inputs */ .editable-wrap .editable-controls > input, .editable-wrap .editable-controls > select, .editable-wrap .editable-controls > textarea { margin-bottom: 0; } /* keep buttons on the same line */ .editable-wrap .editable-input { display: inline-block; } .editable-buttons { display: inline-block; vertical-align: top; } .editable-buttons button { margin-left: 5px; } /* in bootstrap width: 100% => buttons go outside the box */ .editable-input.editable-has-buttons { width: auto; } /* ==== editable-text ==== */ /* fix padding issue on typeahead */ .editable-text { white-space: nowrap; } /* ==== editable-bsdate ==== */ /* fix padding issue on bsdate popup */ .editable-bsdate { white-space: nowrap; } /* ==== editable-bstime ==== */ /* fix padding issue on bstime */ .editable-bstime { white-space: nowrap; } /* workaround for bootstrap that sets width: 100% and inputs become too wide */ .editable-bstime .editable-input input[type="text"] { width: 46px; } /* less padding for .well */ .editable-bstime .well-small { margin-bottom: 0; padding: 10px; } /* ==== editable-range ==== */ .editable-range output { display: inline-block; min-width: 30px; vertical-align: top; text-align: center; } /* ==== editable-color ==== */ .editable-color input[type="color"] { width: 50px; } /* ==== editable-checkbox ==== */ /* ==== editable-checklist ==== */ /* ==== editable-radiolist ==== */ .editable-checkbox label span, .editable-checklist label span, .editable-radiolist label span { margin-left: 7px; margin-right: 10px; } /* ==== element ==== */ /* hiding element */ .editable-hide { display: none !important; } .editable-click, a.editable-click { text-decoration: none; color: #428bca; border-bottom: dashed 1px #428bca; } .editable-click:hover, a.editable-click:hover { text-decoration: none; color: #2a6496; border-bottom-color: #2a6496; } /* editable-empty */ .editable-empty, .editable-empty:hover, .editable-empty:focus, a.editable-empty, a.editable-empty:hover, a.editable-empty:focus { font-style: italic; color: #DD1144; text-decoration: none; } /* ui-bootstrap editable popover */ .ui-popover-wrapper a { /* make the link always show up */ display: inline !important; } .ui-popover-wrapper form { display: none !important; } /* editable popover */ .popover-wrapper > a { /* make the link always show up */ display: inline !important; } .popover-wrapper { /* make absolutely positioned children constrained to this box*/ display: inline; position: relative; } .popover-wrapper form { position: absolute; top: -53px; background: #FFF; border: 1px solid #AAA; border-radius: 5px; padding: 7px; width: auto; display: inline-block; left: 50%; z-index: 101; } .popover-wrapper form:before { content:""; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #AAA; position:absolute; bottom:-10px; } .popover-wrapper form:after { content:""; width:0; height:0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 9px solid #FFF; position:absolute; bottom:-9px; } @media screen and (max-width: 750px) { .popover-wrapper form { margin-left: -60px; } .popover-wrapper form:before { left:50px; } .popover-wrapper form:after { left:51px; } } @media screen and (min-width: 750px) { .popover-wrapper form { margin-left: -110px; } .popover-wrapper form:before { left:100px; } .popover-wrapper form:after { left:101px; } }
josemonsalve2/PIMC
www/external/angular-xeditable-0.8.1/css/xeditable.css
CSS
apache-2.0
4,006
[ 30522, 1013, 1008, 1027, 1027, 1027, 1027, 10086, 3085, 1011, 2433, 1027, 1027, 1027, 1027, 1008, 1013, 1013, 1008, 2465, 2005, 2309, 10086, 3085, 5783, 1008, 1013, 1012, 10086, 3085, 1011, 10236, 1063, 4653, 1024, 23881, 1011, 3796, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // // #include "stdafx.h" #include "../../shared/amd64/primitives.cpp"
Priya91/coreclr
src/debug/ee/amd64/primitives.cpp
C++
mit
234
[ 30522, 1013, 1013, 1013, 1013, 9385, 1006, 1039, 1007, 7513, 1012, 2035, 2916, 9235, 1012, 1013, 1013, 7000, 2104, 1996, 10210, 6105, 1012, 2156, 6105, 5371, 1999, 1996, 2622, 7117, 2005, 2440, 6105, 2592, 1012, 1013, 1013, 1013, 1013, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# -*- encoding: utf-8 -*- require 'spec_helper' describe Role do #pending "add some examples to (or delete) #{__FILE__}" fixtures :roles it "should not be saved if name is blank" do role = Role.first role.name = '' lambda{role.save!}.should raise_error(ActiveRecord::RecordInvalid) end it "should not be saved if name is not unique" do role = Role.first lambda{Role.create!(:name => role.name)}.should raise_error(ActiveRecord::RecordInvalid) end it "should respond to localized_name" do roles(:role_00001).localized_name.should eq 'Guest' end it "should respond to default_role" do Role.default_role.should eq roles(:role_00001) end end # == Schema Information # # Table name: roles # # id :integer not null, primary key # name :string(255) not null # display_name :string(255) # note :text # created_at :datetime # updated_at :datetime # score :integer default(0), not null # position :integer #
MiraitSystems/enju_trunk
spec/models/role_spec.rb
Ruby
mit
1,022
[ 30522, 1001, 1011, 1008, 1011, 17181, 1024, 21183, 2546, 1011, 1022, 1011, 1008, 1011, 5478, 1005, 28699, 1035, 2393, 2121, 1005, 6235, 2535, 2079, 1001, 14223, 1000, 5587, 2070, 4973, 2000, 1006, 2030, 3972, 12870, 1007, 1001, 1063, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright (c) 2007 - 2010, Carlos Guzmán Álvarez All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Text; using System.Threading; using Hanoi.Serialization.Core.Sasl; namespace Hanoi.Authentication { /// <summary> /// <see cref = "Authenticator" /> implementation for the SASL Plain Authentication mechanism. /// </summary> /// <remarks> /// References: /// http://www.ietf.org/html.charters/sasl-charter.html /// http://www.ietf.org/internet-drafts/draft-ietf-sasl-plain-09.txt /// </remarks> internal sealed class SaslPlainAuthenticator : Authenticator { private readonly AutoResetEvent _waitEvent; /// <summary> /// Initializes a new instance of the <see cref="SaslPlainAuthenticator" /> class. /// </summary> public SaslPlainAuthenticator(Connection connection) : base(connection) { _waitEvent = new AutoResetEvent(false); } public override string FeatureKey { get { return "PLAIN"; } } /// <summary> /// Performs the authentication using the SASL Plain authentication mechanism. /// </summary> public override void Authenticate() { // Send authentication mechanism var auth = new Auth { Mechanism = XmppCodes.SaslPlainMechanism, Value = BuildMessage(), }; Connection.Send(auth); _waitEvent.WaitOne(); if (!AuthenticationFailed) { // Re-Initialize XMPP Stream Connection.InitializeXmppStream(); // Wait until we receive the Stream features Connection.WaitForStreamFeatures(); } } protected override void OnUnhandledMessage(object sender, UnhandledMessageEventArgs e) { if (e.StanzaInstance is Success) { _waitEvent.Set(); } } protected override void OnAuthenticationError(object sender, AuthenticationFailiureEventArgs e) { base.OnAuthenticationError(sender, e); _waitEvent.Set(); } private string BuildMessage() { string message = String.Format("\0{0}\0{1}", Connection.UserId.BareIdentifier, Connection.UserPassword); return Encoding.UTF8.GetBytes(message).ToBase64String(); } } }
MustafaUzumcuCom/Hanoi
source/Hanoi/Authentication/SaslPlainAuthenticator.cs
C#
bsd-3-clause
4,120
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2289, 1011, 2230, 1010, 5828, 22789, 16309, 2035, 2916, 9235, 1012, 25707, 1998, 2224, 1999, 3120, 1998, 12441, 3596, 1010, 2007, 2030, 2302, 14080, 1010, 2024, 7936, 3024, 2008, 1996, 2206, 3785, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
namespace Cosmos.Logging.Core.LogFields { public class TagsField : ILogField<string[]> { public TagsField(params string[] tags) => Value = tags; public LogFieldTypes Type => LogFieldTypes.Tags; public string[] Value { get; } public int Sort { get; set; } = 1; } }
CosmosProgramme/Cosmos.Core
Logging/src/Cosmos.Logging/Core/LogFields/LogFields.Tags.cs
C#
mit
306
[ 30522, 3415, 15327, 21182, 1012, 15899, 1012, 4563, 1012, 8833, 15155, 1063, 2270, 2465, 22073, 3790, 1024, 6335, 8649, 3790, 1026, 5164, 1031, 1033, 1028, 1063, 2270, 22073, 3790, 1006, 11498, 5244, 5164, 1031, 1033, 22073, 1007, 1027, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML XMLNS="http://www.w3.org/1999/xhtml"> <HEAD > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <TITLE>unixODBC</TITLE> <META NAME="generator" CONTENT="SlickEdit"> <!-- leave this for stats --> <LINK REL="stylesheet" HREF="style.css" TYPE="text/css" MEDIA="screen"> <STYLE TYPE="text/css" MEDIA="screen"> body { background: url("background.jpg"); } #page { background: url("body.jpg") repeat-y top; border: none; } #header { background: url("header.gif") no-repeat bottom center; } #footer { background: url("footer.jpg") no-repeat bottom; border: none;} #header { padding: 22px 30px 0px 30px; height: 56px; width: 690px; } </STYLE> </HEAD> <BODY> <DIV ID="page"> <DIV ID="header"> <A HREF="http://www.unixodbc.org/"><IMG SRC="icon64.png" ALIGN="right" BORDER="0" HSPACE="0" VSPACE="0"></A> <H1>unixODBC</H1> <DIV CLASS="description"> Standards compliant, open source, database connectivity for everyone. </DIV> </DIV> <DIV ID="content" CLASS="widecolumn"> <DIV STYLE="text-align: center;"> <SPAN STYLE="font-weight: bold;"> Home </SPAN> | <A HREF="News.html">News</A> | <A HREF="Documentation.html">Documentation</A> | <A HREF="Drivers.html">Drivers</A> | <A HREF="Support.html">Support</A> | <A HREF="Downloads.html">Downloads</A> </DIV> <DIV CLASS="post" ID="post-68"> <DIV CLASS="entrytext"> <TABLE> <TR> <TD><H2>unixODBC is...</H2></TD> <TD><H2>News</H2></TD> </TR> <TR> <TD><BR>unixODBC is an implementation of the ODBC standard which is; <UL> <LI> open source </LI> <LI> licensed under LGPL/GPL </LI> <LI> community developed and community supported </LI> <LI> proven with over a decade of active use/development </LI> </UL> </TD> <TD> <HR STYLE="width: 100%; height: 2px;"> <SPAN STYLE="color: rgb(192, 192, 192);"> March 15th 2007 </SPAN> <BR> <DIV STYLE="margin-left: 40px;"> New look for unixodbc.org <DIV STYLE="margin-left: 40px;"> The old web site was serving the project fine but it seemed like it was about time to make it all 'fresh'. We hope you find it more pleasing to use. </DIV> </DIV> <SPAN STYLE="color: rgb(192, 192, 192);"> October 13th 2006 </SPAN> <BR> <DIV STYLE="margin-left: 40px;"> 2.2.12 Released<BR> </DIV> <A HREF="News.html"><SMALL>More...</A></TD> </TR> <TR> <TD><H2>Key features...</H2></TD> <TD><H2>Architecture</H2></TD> </TR> <TR> <TD STYLE="vertical-align: top;"><BR> <SPAN STYLE="font-weight: bold;"> Software Development Kit </SPAN> (SDK) - Develop ODBC applications and drivers using the C language and the unixODBC SDK.<BR> <BR> <SPAN STYLE="font-weight: bold;"> Driver Manager </SPAN> (DM)&nbsp; - The unixODBC DM allows the end-User to switch data sources without recompiling/linking application source code. The application does not have to be linked to a specific vendors product.<BR> <BR> <SPAN STYLE="font-weight: bold;"> Tools </SPAN> - unixODBC includes CrossPlatform command-line and GUI tools to make working with ODBC easy.<BR> </TD> <TD STYLE="vertical-align: top;"><IMG ALIGN="LEFT" STYLE="width: 200px; height: 175px;" ALT="" SRC="Splash.png"> <P>Applications typically link with the unixODBC Driver Manager (DM) which then uses the appropriate Driver to communicate with the data source. The DM understands ODBC but relies on the Driver to understand specifics of the data source.</P> <P>The Driver is typically provided by the data source Vendor. The Driver understands ODBC and the specifics of the data source.</P> </TD> </TR> </TABLE> <BR> <TABLE CLASS =codebox> <TR> <TD STYLE="vertical-align: top; background-color: rgb(102, 102, 102); width: 33%;"> <SPAN STYLE="font-weight: bold;"> CrossPlatform<BR> <BR> </SPAN> Applications built using unixODBC are compatible with the Microsoft implementation of ODBC. unixODBC is provided with all majour Linux distributions. unixODBC has been ported to all majour UNIX and UNIX-like platforms;<BR> <DIV STYLE="margin-left: 40px;"> - Linux, Solaris, SGI, etc<BR> - VMS, OS/2, etc<BR> </DIV> </TD> <TD STYLE="vertical-align: top; background-color: rgb(102, 102, 102); width: 33%;"> <SPAN STYLE="font-weight: bold;"> CrossDatabase </SPAN> <BR> <BR> unixODBC supports drivers from all majour database vendors including;<BR> <DIV STYLE="margin-left: 40px;"> - Oracle<BR> - DB2<BR> - Interbase<BR> - Mimer<BR> - MySQL<BR> - others<BR> </DIV> </TD> <TD STYLE="vertical-align: top; background-color: rgb(102, 102, 102); width: 33%;"> <SPAN STYLE="font-weight: bold;"> License </SPAN> <BR> <BR> unixODBC was developed by the open source community and is provided under the LGPL and GPL licenses. Commercial applications can be developed using unixODBC without paying for a license or royalty. Free support is provided by the community. </TD> </TR> <TR> <TD STYLE="vertical-align: top;"><A HREF="CrossPlatform.html">More...</A></TD> <TD STYLE="vertical-align: top;"><A HREF="CrossDatabase.html">More...</A></TD> <TD STYLE="vertical-align: top;"><A HREF="License.html">More...</A></TD> </TR> </TABLE> </TD> </TR> </TABLE> </P> </DIV> </DIV> </DIV> <DIV ID="footer"> <P> --<BR> <A HREF=mailto:pharvey@peterharvey.org>Peter Harvey</A> </P> </DIV> </DIV> </BODY> </HTML>
TextusData/Mover
thirdparty/unixODBC-2.3.1/doc/index.html
HTML
gpl-3.0
8,359
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 1060, 11039, 19968, 1015, 1012, 1014, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/****************************************************************************** * * file: Visitor.h * * Copyright (c) 2003, Michael E. Smoot . * All rights reverved. * * See the file COPYING in the top directory of this distribution for * more information. * * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * *****************************************************************************/ #ifndef TCLAP_VISITOR_H #define TCLAP_VISITOR_H namespace TCLAP { /** * A base class that defines the interface for visitors. */ class Visitor { public: /** * Constructor. Does nothing. */ Visitor() { } /** * Does nothing. Should be overridden by child. */ virtual void visit() { } }; } #endif
cpmech/vismatrix
src/tclap/Visitor.h
C
bsd-3-clause
1,189
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * @category Zend * @package Zend_Cloud * @subpackage Infrastructure * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ #require_once 'Zend/Cloud/Infrastructure/Instance.php'; /** * List of instances * * @package Zend_Cloud * @subpackage Infrastructure * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cloud_Infrastructure_InstanceList implements Countable, Iterator, ArrayAccess { /** * @var array Array of Zend_Cloud_Infrastructure_Instance */ protected $instances = array(); /** * @var int Iterator key */ protected $iteratorKey = 0; /** * @var Zend_Cloud_Infrastructure_Adapter */ protected $adapter; /** * Constructor * * @param Adapter $adapter * @param array $instances * @return void */ public function __construct($adapter, array $instances = null) { if (!($adapter instanceof Zend_Cloud_Infrastructure_Adapter)) { #require_once 'Zend/Cloud/Infrastructure/Exception.php'; throw new Zend_Cloud_Infrastructure_Exception('You must pass a Zend_Cloud_Infrastructure_Adapter'); } if (empty($instances)) { #require_once 'Zend/Cloud/Infrastructure/Exception.php'; throw new Zend_Cloud_Infrastructure_Exception('You must pass an array of Instances'); } $this->adapter = $adapter; $this->constructFromArray($instances); } /** * Transforms the Array to array of Instances * * @param array $list * @return void */ protected function constructFromArray(array $list) { foreach ($list as $instance) { $this->addInstance(new Zend_Cloud_Infrastructure_Instance($this->adapter,$instance)); } } /** * Add an instance * * @param Instance * @return InstanceList */ protected function addInstance(Zend_Cloud_Infrastructure_Instance $instance) { $this->instances[] = $instance; return $this; } /** * Return number of instances * * Implement Countable::count() * * @return int */ public function count() { return count($this->instances); } /** * Return the current element * * Implement Iterator::current() * * @return Instance */ public function current() { return $this->instances[$this->iteratorKey]; } /** * Return the key of the current element * * Implement Iterator::key() * * @return int */ public function key() { return $this->iteratorKey; } /** * Move forward to next element * * Implement Iterator::next() * * @return void */ public function next() { $this->iteratorKey++; } /** * Rewind the Iterator to the first element * * Implement Iterator::rewind() * * @return void */ public function rewind() { $this->iteratorKey = 0; } /** * Check if there is a current element after calls to rewind() or next() * * Implement Iterator::valid() * * @return bool */ public function valid() { $numItems = $this->count(); if ($numItems > 0 && $this->iteratorKey < $numItems) { return true; } return false; } /** * Whether the offset exists * * Implement ArrayAccess::offsetExists() * * @param int $offset * @return bool */ public function offsetExists($offset) { return ($offset < $this->count()); } /** * Return value at given offset * * Implement ArrayAccess::offsetGet() * * @param int $offset * @return Instance * @throws Zend_Cloud_Infrastructure_Exception */ public function offsetGet($offset) { if (!$this->offsetExists($offset)) { #require_once 'Zend/Cloud/Infrastructure/Exception.php'; throw new Zend_Cloud_Infrastructure_Exception('Illegal index'); } return $this->instances[$offset]; } /** * Throws exception because all values are read-only * * Implement ArrayAccess::offsetSet() * * @param int $offset * @param string $value * @throws Zend_Cloud_Infrastructure_Exception */ public function offsetSet($offset, $value) { #require_once 'Zend/Cloud/Infrastructure/Exception.php'; throw new Zend_Cloud_Infrastructure_Exception('You are trying to set read-only property'); } /** * Throws exception because all values are read-only * * Implement ArrayAccess::offsetUnset() * * @param int $offset * @throws Zend_Cloud_Infrastructure_Exception */ public function offsetUnset($offset) { #require_once 'Zend/Cloud/Infrastructure/Exception.php'; throw new Zend_Cloud_Infrastructure_Exception('You are trying to unset read-only property'); } }
almadaocta/lordbike-production
lib/Zend/Cloud/Infrastructure/InstanceList.php
PHP
mit
5,547
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1030, 4696, 16729, 2094, 1008, 1030, 7427, 16729, 2094, 1035, 6112, 1008, 1030, 4942, 23947, 4270, 6502, 1008, 1030, 9385, 9385, 1006, 1039, 1007, 2384, 1011, 2262, 16729, 2094, 6786, 3915, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...