hexsha stringlengths 40 40 | size int64 5 1.05M | ext stringclasses 98
values | lang stringclasses 21
values | max_stars_repo_path stringlengths 3 945 | max_stars_repo_name stringlengths 4 118 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 945 | max_issues_repo_name stringlengths 4 118 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 134k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 945 | max_forks_repo_name stringlengths 4 135 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 1.05M | avg_line_length float64 1 1.03M | max_line_length int64 2 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfefced7b0af58fd48dd439bdce7a672a36d9c72 | 9,249 | swift | Swift | WPAppKit/Classes/CustomView/TagsView.swift | WHeB/WPAppKit | 3b5e9e0d97f2d92c283ff12035bb154187dc7e27 | [
"MIT"
] | 5 | 2019-10-14T07:53:08.000Z | 2020-11-02T05:35:54.000Z | WPAppKit/Classes/CustomView/TagsView.swift | WHeB/WPAppKit | 3b5e9e0d97f2d92c283ff12035bb154187dc7e27 | [
"MIT"
] | null | null | null | WPAppKit/Classes/CustomView/TagsView.swift | WHeB/WPAppKit | 3b5e9e0d97f2d92c283ff12035bb154187dc7e27 | [
"MIT"
] | null | null | null | //
// TagsView.swift
// WPAppKit
//
// Created by 王鹏 on 2019/9/17.
//
import UIKit
public enum TagType {
case normal // 默认纯文本
case imgLeft(normalImg: UIImage, selectedImg: UIImage) // 左侧图片
case imgRight(normalImg: UIImage, selectedImg: UIImage) // 右侧图片
}
public struct TagStyle {
// 小标签样式
public var tagType: TagType = .normal
// 标签背景色
public var normalBgColor: UIColor = UIColor.white
public var selectedBgColor: UIColor = UIColor.orange
// 标签圆角
public var cornerRadius: CGFloat = 5
// 边框颜色
public var borderColor: UIColor = UIColor.orange
// 边框
public var borderWidth: CGFloat = 1
// 字号
public var txtFont: UIFont = UIFont.systemFont(ofSize: 14)
// 字体颜色
public var normalTxtColor: UIColor = UIColor.black
public var selectedTxtColor: UIColor = UIColor.white
// x轴方向内边距
public var itemPaddingX: CGFloat = 5
// 单个标签高度
public var itemHeight: CGFloat = 30
// 行间距
public var rowSpace: CGFloat = 15
// 列间距
public var lineSpace: CGFloat = 15
// 边距
public var margin: CGFloat = 25
// 图文间距 默认5
public var imgTxtSpace: CGFloat = 5
// 是否能点击
public var isClick: Bool = true
// 是否可以多选
public var isMultiSelect: Bool = true
public init() {}
}
// 回调
public typealias TagsResultCallBack = (_ result: [(Int, String)], _ index: [Int], _ text: [String]) -> Void
public class TagsView: UIView {
private var data = [String]()
private var style = TagStyle()
private var buttons = [UIButton]()
private var lastChooseIndex = 0 // 最后一个选中的下标
private var selfHeight: CGFloat = 0 // view高度
private var chooseResult: TagsResultCallBack?
private var result = [(Int, String)]()
private var resultText = [String]()
private var resultIndex = [Int]()
/// 设置选中
// indexs: 选中的下标。如果不能多选,只会取第一个。
public func setChooseButton(indexs: [Int]) {
if !self.style.isClick || indexs.count == 0 { // 不能点击
return
}
if self.style.isMultiSelect { // 可以多选
for index in indexs {
let tag = index + 100
if let btn = self.viewWithTag(tag) as? UIButton {
btn.isSelected = true
}
// 添加到数组
self.resultAddRemove(index: index)
}
}else {
let index = indexs.first ?? 0
let tag = index + 100
if let btn = self.viewWithTag(tag) as? UIButton {
btn.isSelected = true
}
self.lastChooseIndex = tag
// 添加到数组
self.resultAddRemove(index: index)
}
// 回调
self.chooseResult?(result, resultIndex, resultText)
}
/// 重置数据源
// 注意:重置数据源后,以前选中状态会被清除
public func refreshData(data: [String]) {
if self.data == data {
return
}
for sub in self.subviews {
sub.removeFromSuperview()
}
self.data = data
loadSubView()
// 重置高度
self.frame = CGRect(x: frame.origin.x, y: frame.origin.y, width: frame.size.width, height: self.selfHeight)
self.result.removeAll()
self.resultIndex.removeAll()
self.resultText.removeAll()
}
/// 实例化
public convenience init(style: TagStyle, data: [String], frame: CGRect, result: @escaping TagsResultCallBack) {
self.init(frame: frame)
self.style = style
self.data = data
loadSubView()
self.chooseResult = result
// 重置高度
self.frame = CGRect(x: frame.origin.x, y: frame.origin.y, width: frame.size.width, height: self.selfHeight)
}
override init(frame: CGRect) {
super.init(frame: frame)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
private func loadSubView() {
if data.count == 0 {
return
}
var btnX: CGFloat = self.style.margin
var btnY: CGFloat = self.style.rowSpace
for (index, text) in self.data.enumerated() {
let button = self.getButton(title: text)
let btnW = self.getButtonWidth(text: text, button: button)
let btnH = self.style.itemHeight
if btnX + btnW + self.style.lineSpace + self.style.margin > self.width { // 换行
btnX = self.style.margin
btnY += (btnH + self.style.rowSpace)
button.frame = CGRect(x: btnX, y: btnY, width: btnW, height: btnH)
}else {
button.frame = CGRect(x: btnX, y: btnY, width: btnW, height: btnH)
}
btnX += (btnW + self.style.lineSpace)
// view的高度
selfHeight = button.bottomY + self.style.rowSpace
switch self.style.tagType {
case .normal:
break
case .imgLeft:
button.setImageOrientation(position: .left, spacing: self.style.imgTxtSpace)
case .imgRight:
button.setImageOrientation(position: .right, spacing: self.style.imgTxtSpace)
}
button.setbackground(normalColor: self.style.normalBgColor, selectedColor: self.style.selectedBgColor)
button.setCornerRadiusAndBorder(.allCorners,
cornerRadius: self.style.cornerRadius,
color: self.style.borderColor,
borderWidth: self.style.borderWidth)
button.tag = index + 100 // 防止 viewWithTag 出错
button.addTarget(self, action: #selector(chooseAction(button:)), for: .touchUpInside)
self.addSubview(button)
}
}
private func getButton(title: String) -> UIButton {
let button = UIButton(type: .custom)
button.adjustsImageWhenHighlighted = false
button.titleLabel?.font = self.style.txtFont
button.setTitle(title, for: .normal)
button.setTitleColor(self.style.normalTxtColor, for: .normal)
button.setTitle(title, for: .selected)
button.setTitleColor(self.style.selectedTxtColor, for: .selected)
switch self.style.tagType {
case .normal:
break
case .imgLeft(let normalImg, let selectedImg):
button.setImage(normalImg, for: .normal)
button.setImage(selectedImg, for: .selected)
case .imgRight(let normalImg, let selectedImg):
button.setImage(normalImg, for: .normal)
button.setImage(selectedImg, for: .selected)
}
return button
}
private func getButtonWidth(text: String, button: UIButton) -> CGFloat {
switch self.style.tagType {
case .normal:
let txtW = text.txtStringWidth(font: self.style.txtFont, maxHeight: self.style.itemHeight)
return txtW + (self.style.itemPaddingX + self.style.cornerRadius) * CGFloat(2.0)
case .imgLeft, .imgRight:
let txtW = text.txtStringWidth(font: self.style.txtFont, maxHeight: self.style.itemHeight)
// self.style.txtFont.pointSize + 4 为字号大小
let imgW = button.imageView?.image?.size.width ?? 18
return txtW + (self.style.itemPaddingX + self.style.cornerRadius) * CGFloat(2.0) + self.style.imgTxtSpace + imgW
}
}
@objc private func chooseAction(button: UIButton) {
if !self.style.isClick { // 不能点击
return
}
if self.style.isMultiSelect { // 可以多选
button.isSelected = !button.isSelected
}else {
if let lastBtn = self.viewWithTag(self.lastChooseIndex) as? UIButton {
lastBtn.isSelected = false
}
button.isSelected = true
self.lastChooseIndex = button.tag
}
// 添加到数组
self.resultAddRemove(index: button.tag - 100)
// 回调
self.chooseResult?(result, resultIndex, resultText)
}
// 添加和删除元素
private func resultAddRemove(index: Int) {
if index > data.count {
return
}
let text = self.data[index]
let indexText = (index, text)
if !self.style.isMultiSelect { // 单选
self.result.removeAll()
self.resultText.removeAll()
self.resultIndex.removeAll()
self.result.append(indexText)
self.resultText.append(text)
self.resultIndex.append(index)
return
}
// 多选
let isContains = self.result.contains {
return $0 == indexText
}
if isContains {
self.result = self.result.filter {
return $0 != indexText
}
self.resultText = self.resultText.filter {
return $0 != text
}
self.resultIndex = self.resultIndex.filter {
return $0 != index
}
}else {
self.result.append(indexText)
self.resultText.append(text)
self.resultIndex.append(index)
}
}
}
| 34.003676 | 124 | 0.564277 |
9bff28c369dc648fcfb3dfcd2f1cb8ed70c56f30 | 950 | js | JavaScript | www/js/kcaptcha.js | CatsMiaow/KI-Board | b9d655e44be5df8fa689f5f07a8cd0bd18c8f31a | [
"MIT"
] | 10 | 2015-11-05T20:42:03.000Z | 2021-05-03T06:17:55.000Z | www/js/kcaptcha.js | CatsMiaow/KI_Board | b9d655e44be5df8fa689f5f07a8cd0bd18c8f31a | [
"MIT"
] | 3 | 2015-02-24T03:36:26.000Z | 2015-07-23T22:41:58.000Z | www/js/kcaptcha.js | CatsMiaow/KI-Board | b9d655e44be5df8fa689f5f07a8cd0bd18c8f31a | [
"MIT"
] | 10 | 2016-01-05T13:19:11.000Z | 2018-12-03T05:53:06.000Z | if (typeof(KCAPTCHA_JS) == 'undefined') {
if (typeof rt_path == 'undefined')
alert('올바르지 않은 접근입니다.');
var KCAPTCHA_JS = true
, md5_norobot_key = '';
$(function() {
$('body').on('click', '#kcaptcha', function() {
$.ajax({
type: 'POST',
url: rt_path + '/_trans/kcaptcha/session',
contentType: 'application/x-www-form-urlencoded',
success: function(data) {
$('#kcaptcha').attr('src', rt_path + '/_trans/kcaptcha/image/' + (new Date).getTime());
md5_norobot_key = data;
}
});
});
$('#kcaptcha').trigger('click');
if (typeof $.validator != 'undefined') {
$.validator.addMethod('wrKey', function(value, element) {
return this.optional(element) || hex_md5(value) == md5_norobot_key;
});
}
});
} | 33.928571 | 107 | 0.476842 |
dfa4eb2b118bfcb514ff510259ac58035f0a5497 | 2,919 | ts | TypeScript | spec/frontend/base-spec.ts | turboMaCk/DoctorMarkDown | a3e94957c7210ca7003d9fbb10278679fef1b169 | [
"MIT"
] | null | null | null | spec/frontend/base-spec.ts | turboMaCk/DoctorMarkDown | a3e94957c7210ca7003d9fbb10278679fef1b169 | [
"MIT"
] | null | null | null | spec/frontend/base-spec.ts | turboMaCk/DoctorMarkDown | a3e94957c7210ca7003d9fbb10278679fef1b169 | [
"MIT"
] | null | null | null | ///<reference path="../../header_files/jasmine.d.ts"/>
import { pushDepthToTree, Token, createNode } from '../../lib/frontend/base';
export default describe('parseNavTree', () => {
// describe('flat tree', () => {
// const initialTree = [
// { item: { text: 'first', href: "", depth: 1 }, children: [] },
// { item: { text: 'second', href: "", depth: 1 }, children: [] }
// ];
// const tokens : Token[] = [{ text: 'third', type: "heading", depth: 1 }];
// it('should push as last', () => {
// const exp = [
// { item: { text: 'first', href: "", depth: 1 }, children: [] },
// { item: { text: 'second', href: "", depth: 1 }, children: [
// { item: { text: 'third', href: "#third", depth: 1 }, children: [] }
// ] },
// ];
// expect(pushDepthToTree({}, initialTree, tokens)).toEqual(exp)
// });
// });
// describe('nested tree push deep', () => {
// const initialTree = [
// { item: { text: 'first', href: "", depth: 1 }, children: [] },
// { item: { text: 'second', href: "", depth: 1 }, children: [
// { item: { text: 'deep', href: "", depth: 1 }, children: [] },
// { item: { text: 'deep', href: "", depth: 1 }, children: [] },
// { item: { text: 'deep', href: "", depth: 1 }, children: [
// { item: { text: 'deeper', href: "", depth: 1 }, children: [] },
// ] },
// ] },
// { item: { text: 'third', href: "", depth: 1 }, children: [] },
// ];
// const tokens : Token[] = [{ text: 'new', type: "heading", depth: 1 }];
// it('should push as last', () => {
// const exp = [
// { item: { text: 'first', href: "", depth: 1 }, children: [] },
// { item: { text: 'second', href: "", depth: 1 }, children: [
// { item: { text: 'deep', href: "", depth: 1 }, children: [] },
// { item: { text: 'deep', href: "", depth: 1 }, children: [] },
// { item: { text: 'deep', href: "", depth: 1 }, children: [
// { item: { text: 'deeper', href: "", depth: 1 }, children: [
// { item: { text: 'new' , href: '#new', depth: 1}, children: [] }
// ] }
// ] },
// ] },
// { item: { text: 'third', href: "", depth: 1 }, children: [] },
// ];
// expect(pushDepthToTree({}, initialTree, tokens)).toEqual(exp)
// });
// });
// it('create node', () => {
// const node = { item: { text: 'text', href: '../app', depth: 1 }, children: [] };
// expect(createNode('text', '../app')).toEqual(node);
// })
});
| 46.333333 | 94 | 0.390887 |
c5076c5f3792fd15c68ef5204aa42073873709c7 | 18 | lua | Lua | rt/dot/mf/a/.1.0.lua | wpoely86/Lmod | 9323970e5d191d3f919bbadac14ff2c5670f9a34 | [
"MIT"
] | 318 | 2015-01-16T11:39:11.000Z | 2022-03-14T18:11:25.000Z | rt/dot/mf/a/.1.0.lua | wpoely86/Lmod | 9323970e5d191d3f919bbadac14ff2c5670f9a34 | [
"MIT"
] | 498 | 2015-01-06T15:12:34.000Z | 2022-03-25T10:14:10.000Z | rt/dot/mf/a/.1.0.lua | wpoely86/Lmod | 9323970e5d191d3f919bbadac14ff2c5670f9a34 | [
"MIT"
] | 123 | 2015-02-16T10:33:35.000Z | 2022-02-25T15:25:45.000Z | setenv("A","0.1")
| 9 | 17 | 0.5 |
fbaca2cc3093e5e7ea490d7fbb5037ddd9a64dbb | 3,741 | h | C | minerva/narray/narray.h | jjzhang166/minerva | 7d21ed2bdca3de9fbb6e5e2e277fd9956b81a04f | [
"Apache-2.0"
] | 561 | 2015-04-05T02:50:00.000Z | 2022-03-04T09:05:16.000Z | minerva/narray/narray.h | jjzhang166/minerva | 7d21ed2bdca3de9fbb6e5e2e277fd9956b81a04f | [
"Apache-2.0"
] | 35 | 2015-04-05T12:46:45.000Z | 2016-06-14T00:58:17.000Z | minerva/narray/narray.h | jjzhang166/minerva | 7d21ed2bdca3de9fbb6e5e2e277fd9956b81a04f | [
"Apache-2.0"
] | 161 | 2015-04-15T05:47:34.000Z | 2022-01-25T16:01:20.000Z | #pragma once
#include <initializer_list>
#include <dmlc/logging.h>
#include <memory>
#include "op/closure.h"
#include "common/scale.h"
#include "backend/backend.h"
#include "backend/backend_chunk.h"
namespace minerva {
struct FileFormat {
bool binary;
};
class NArray {
friend class Elewise;
friend class Convolution;
public:
// Static constructors
static NArray Constant(const Scale& size, float val);
static NArray Randn(const Scale& size, float mu, float var);
static NArray RandBernoulli(const Scale& size, float p);
static NArray Zeros(const Scale& size);
static NArray Ones(const Scale& size);
static NArray MakeNArray(const Scale& size, std::shared_ptr<float> array);
static NArray PushGradAndPullWeight(const NArray& grad, const std::string& layer_name);
// DAG generating operations
static std::vector<NArray> Compute(
const std::vector<NArray>& params,
const std::vector<Scale>& result_sizes,
ComputeFn* fn);
static NArray ComputeOne(
const std::vector<NArray>& params,
const Scale& size,
ComputeFn* fn);
static NArray GenerateOne(
const Scale& size,
ComputeFn* fn);
// Constructors and destructors
NArray();
NArray(const NArray&);
NArray(NArray&&);
NArray& operator=(const NArray&);
NArray& operator=(NArray&&);
virtual ~NArray();
// Element-wise operations
friend NArray operator+(const NArray&, const NArray&);
friend NArray operator-(const NArray&, const NArray&);
friend NArray operator/(const NArray&, const NArray&);
friend NArray operator+(float, const NArray&);
friend NArray operator-(float, const NArray&);
friend NArray operator*(float, const NArray&);
friend NArray operator/(float, const NArray&);
friend NArray operator+(const NArray&, float);
friend NArray operator-(const NArray&, float);
friend NArray operator*(const NArray&, float);
friend NArray operator/(const NArray&, float);
NArray& operator+=(const NArray&);
NArray& operator-=(const NArray&);
NArray& operator/=(const NArray&);
NArray& operator+=(float);
NArray& operator-=(float);
NArray& operator*=(float);
NArray& operator/=(float);
NArray operator-() const;
NArray operator[](int);
// Matmult
friend NArray operator*(const NArray&, const NArray&);
NArray& operator*=(const NArray&);
// Parameter server interaction
NArray& Pull(const std::string& layer_name);
// Concat
friend NArray Concat(const std::vector<NArray>& params, int concat_dim);
friend NArray Slice(const NArray& src, int slice_dim, int st_off, int slice_count);
// Shape
const Scale& Size() const { return CHECK_NOTNULL(data_)->shape(); }
int Size(int dim) const { return CHECK_NOTNULL(data_)->shape()[dim]; }
NArray Reshape(const Scale& dims) const;
NArray Trans() const;
NArray Select(std::vector<int> const&) const;
// Lazy reductions
NArray Sum(int dim) const;
NArray Sum(const Scale& dims) const;
NArray Max(int dim) const;
NArray Max(const Scale& dims) const;
NArray MaxIndex(int dim) const;
// Replicate matrix
NArray NormArithmetic(const NArray&, ArithmeticType) const;
// Non-lazy reductions
float Sum() const; // TODO
float Max() const; // TODO
int CountZero() const;
// System
void Wait() const;
std::shared_ptr<float> Get() const;
void ToStream(std::ostream& out, const FileFormat& format) const;
void ToFile(const std::string& filename, const FileFormat& format) const;
private:
NArray(BackendChunk*);
BackendChunk* data_;
};
// Matmult
NArray operator*(const NArray&, const NArray&);
NArray Concat(const std::vector<NArray>& params, int concat_dim);
NArray Slice(const NArray& src, int slice_dim, int st_off, int slice_count);
} // end of namespace minerva
| 32.815789 | 89 | 0.711307 |
86245a3b7a27e569ea4f0582bba0e57a541d8be2 | 944 | rs | Rust | src/src/tetris.rs | newbe36524/Nebwe.Tetris | b8ab1b6a9f6118eac1a6e6d2f114d5e76bd1fd6a | [
"MIT"
] | 8 | 2021-10-05T15:31:38.000Z | 2022-01-28T08:48:17.000Z | src/src/tetris.rs | newbe36524/Nebwe.Tetris | b8ab1b6a9f6118eac1a6e6d2f114d5e76bd1fd6a | [
"MIT"
] | null | null | null | src/src/tetris.rs | newbe36524/Nebwe.Tetris | b8ab1b6a9f6118eac1a6e6d2f114d5e76bd1fd6a | [
"MIT"
] | 1 | 2022-01-28T08:48:41.000Z | 2022-01-28T08:48:41.000Z | use crossterm::{
event::{KeyCode},
};
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct Size {
pub height: u16,
pub width: u16,
}
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct Point {
pub x: u16,
pub y: u16,
}
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct Movement {
pub x: i16,
pub y: i16,
}
impl Point {
pub fn new(x: u16, y: u16) -> Point {
Point { x, y }
}
}
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct KeyboardControl {
pub start: KeyCode,
pub pause: KeyCode,
pub down: KeyCode,
pub right: KeyCode,
pub left: KeyCode,
pub change: KeyCode,
pub exit: KeyCode,
}
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct AppSettings {
pub gaming_region: Size,
pub info_region: Size,
pub total_region: Size,
pub welcome_region: Size,
pub gaming_blocks_size: Size,
pub keyboard_control: KeyboardControl,
}
| 19.265306 | 44 | 0.630297 |
c45aebabaf190f3fe9608b4aca7215ed1fa3171c | 875 | h | C | iris_mt_scratch/egbert_codes-20210121T193218Z-001/egbert_codes/EMTF/SEED/qlib/datatypes.h | simpeg-research/iris-mt-scratch | ea458f253071db513fd0731118a2a7452a725944 | [
"MIT"
] | null | null | null | iris_mt_scratch/egbert_codes-20210121T193218Z-001/egbert_codes/EMTF/SEED/qlib/datatypes.h | simpeg-research/iris-mt-scratch | ea458f253071db513fd0731118a2a7452a725944 | [
"MIT"
] | 19 | 2020-12-23T17:55:48.000Z | 2021-06-24T21:01:05.000Z | iris_mt_scratch/egbert_codes-20210121T193218Z-001/egbert_codes/EMTF/SEED/qlib/datatypes.h | simpeg-research/iris-mt-scratch | ea458f253071db513fd0731118a2a7452a725944 | [
"MIT"
] | null | null | null | /* Data types for SEED data records. */
/* @(#)datatypes.h 1.2 1/26/96 11:10:33 */
#ifndef SEED_BIG_ENDIAN
/* Define UNKNOWN datatype. */
#define UNKNOWN_DATATYPE 0
/* General datatype codes. */
#define INT_16 1
#define INT_24 2
#define INT_32 3
#define IEEE_FP_SP 4
#define IEEE_FP_DP 5
/* FDSN Network codes. */
#define STEIM1 10
#define STEIM2 11
#define GEOSCOPE_MULTIPLEX_24 12
#define GEOSCOPE_MULTIPLEX_16_GR_3 13
#define GEOSCOPE_MULTIPLEX_16_GR_4 14
#define USNN 15
#define CDSN 16
#define GRAEFENBERG_16 17
#define IPG_STRASBOURG_16 18
/* Older Network codes. */
#define SRO 30
#define HGLP 31
#define DWWSSN_GR 32
#define RSTN_16_GR 33
/* Definitions for blockette 1000 */
#define SEED_LITTLE_ENDIAN 0
#define SEED_BIG_ENDIAN 1
#define IS_STEIM_COMP(n) ((n==STEIM1 || n==STEIM2) ? 1 : 0)
#endif
| 21.875 | 62 | 0.697143 |
5b47cc3b98d2b33bf2dfbb66a452fa3b0b820819 | 2,475 | c | C | lang/c/leetcode/interlaveStr.097.c | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/c/leetcode/interlaveStr.097.c | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/c/leetcode/interlaveStr.097.c | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | #include "leet.h"
// should different with false 0 or true 1
#define UNDEF 2
bool isInterleaveI(int *mem, int m, int n, char *s1, char *s2, char *s3,
int csr1, int csr2);
bool isInterleaveM(int *mem, int m, int n, char *s1, char *s2, char *s3,
int csr1, int csr2) {
int csr = csr1 * n + csr2;
if (mem[csr] == UNDEF) {
mem[csr] = isInterleaveI(mem, m, n, s1, s2, s3, csr1, csr2);
}
return mem[csr];
}
bool isInterleaveI(int *mem, int m, int n, char *s1, char *s2, char *s3,
int csr1, int csr2) {
char c3 = s3[csr1 + csr2];
if (c3 == '\0') {
return true;
}
bool b1 = c3 == s1[csr1];
bool b2 = c3 == s2[csr2];
if (b1 && b2) {
return isInterleaveM(mem, m, n, s1, s2, s3, csr1 + 1, csr2) ||
isInterleaveM(mem, m, n, s1, s2, s3, csr1, csr2 + 1);
} else if (b1) {
return isInterleaveM(mem, m, n, s1, s2, s3, csr1 + 1, csr2);
} else if (b2) {
return isInterleaveM(mem, m, n, s1, s2, s3, csr1, csr2 + 1);
} else {
return false;
}
}
bool isInterleave(char *s1, char *s2, char *s3) {
int l1 = strlen(s1);
int l2 = strlen(s2);
int l3 = strlen(s3);
if (l1 + l2 != l3) {
return false;
}
int sz = (l1 + 1) * (l2 + 1);
int *mem = malloc(sizeof(int) * sz);
int i;
for (i = 0; i != sz; i++) {
mem[i] = UNDEF;
}
bool r = isInterleaveM(mem, l1 + 1, l2 + 1, s1, s2, s3, 0, 0);
free(mem);
return r;
}
#define CASE(s1, s2, s3, e) {bool r = isInterleave(s1, s2, s3); \
printf("[%s] [%s] [%s]\n%s ?= %s %s\n", \
s1, s2, s3, SBOOL(r), SBOOL(e), expect(r == e)); }
int main() {
CASE("", "", "", true);
CASE("", "b", "b", true);
CASE("aa", "bb", "abab", true);
CASE("ac", "bd", "abcd", true);
CASE("aabcc", "dbbca", "aadbbcbcac", true);
CASE("aabcc", "dbbca", "aadbbbaccc", false);
CASE(
"bbbbbabbbbabaababaaaabbababbaaabbabbaaabaaaaababbbababbbbbabbbbababbabaabababbbaabababababbbaaababaa",
"babaaaabbababbbabbbbaabaabbaabbbbaabaaabaababaaaabaaabbaaabaaaabaabaabbbbbbbbbbbabaaabbababbabbabaab",
"babbbabbbaaabbababbbbababaabbabaabaaabbbbabbbaaabbbaaaaabbbbaabbaaabababbaaaaaabababbababaababbababbbababbbbaaaabaabbabbaaaaabbabbaaaabbbaabaaabaababaababbaaabbbbbabbbbaabbabaabbbbabaaabbababbabbabbab",
false);
return 0;
}
| 34.375 | 211 | 0.55596 |
a824952f912df565e967a8d43a105da007f886e4 | 7,158 | rs | Rust | cases/src/vmsop_vv_cases.rs | XuJiandong/rvv-testcases | 3f0bcae47a328ff76f7ed96368cb1d8d14edf32d | [
"MIT"
] | null | null | null | cases/src/vmsop_vv_cases.rs | XuJiandong/rvv-testcases | 3f0bcae47a328ff76f7ed96368cb1d8d14edf32d | [
"MIT"
] | null | null | null | cases/src/vmsop_vv_cases.rs | XuJiandong/rvv-testcases | 3f0bcae47a328ff76f7ed96368cb1d8d14edf32d | [
"MIT"
] | 1 | 2022-03-03T01:41:14.000Z | 2022-03-03T01:41:14.000Z | use core::{arch::asm, convert::TryInto};
use eint::{Eint, E256};
use rvv_asm::rvv_asm;
use rvv_testcases::{
intrinsic::vmsop_vv,
misc::{avl_iterator, set_bit_in_slice},
runner::{run_vmsop_vv, WideningCategory},
};
fn expected_eq(lhs: &[u8], rhs: &[u8], result: &mut [u8], index: usize) {
assert_eq!(lhs.len(), rhs.len());
match lhs.len() {
8 => {
let l = u64::from_le_bytes(lhs.try_into().unwrap());
let r = u64::from_le_bytes(rhs.try_into().unwrap());
let res = if l == r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
32 => {
let l = E256::get(lhs);
let r = E256::get(rhs);
let res = if l == r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
_ => {
panic!("Invalid sew");
}
}
}
fn test_vmseq(sew: u64, lmul: i64, avl: u64) {
fn op(lhs: &[u8], rhs: &[u8], result: &mut [u8], sew: u64, lmul: i64, avl: u64) {
vmsop_vv(lhs, rhs, result, sew, avl, lmul, || unsafe {
rvv_asm!("vmseq.vv v24, v8, v16");
});
}
run_vmsop_vv(
sew,
lmul,
avl,
expected_eq,
op,
WideningCategory::None,
"vmseq.vv",
);
}
fn expected_ne(lhs: &[u8], rhs: &[u8], result: &mut [u8], index: usize) {
assert_eq!(lhs.len(), rhs.len());
match lhs.len() {
8 => {
let l = u64::from_le_bytes(lhs.try_into().unwrap());
let r = u64::from_le_bytes(rhs.try_into().unwrap());
let res = if l != r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
32 => {
let l = E256::get(lhs);
let r = E256::get(rhs);
let res = if l != r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
_ => {
panic!("Invalid sew");
}
}
}
fn test_vmsne(sew: u64, lmul: i64, avl: u64) {
fn op(lhs: &[u8], rhs: &[u8], result: &mut [u8], sew: u64, lmul: i64, avl: u64) {
vmsop_vv(lhs, rhs, result, sew, avl, lmul, || unsafe {
rvv_asm!("vmsne.vv v24, v8, v16");
});
}
run_vmsop_vv(
sew,
lmul,
avl,
expected_ne,
op,
WideningCategory::None,
"vmsne.vv",
);
}
fn expected_ltu(lhs: &[u8], rhs: &[u8], result: &mut [u8], index: usize) {
assert_eq!(lhs.len(), rhs.len());
match lhs.len() {
8 => {
let l = u64::from_le_bytes(lhs.try_into().unwrap());
let r = u64::from_le_bytes(rhs.try_into().unwrap());
let res = if l < r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
32 => {
let l = E256::get(lhs);
let r = E256::get(rhs);
let res = if l < r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
_ => {
panic!("Invalid sew");
}
}
}
fn test_vmsltu(sew: u64, lmul: i64, avl: u64) {
fn op(lhs: &[u8], rhs: &[u8], result: &mut [u8], sew: u64, lmul: i64, avl: u64) {
vmsop_vv(lhs, rhs, result, sew, avl, lmul, || unsafe {
rvv_asm!("vmsltu.vv v24, v8, v16");
});
}
run_vmsop_vv(
sew,
lmul,
avl,
expected_ltu,
op,
WideningCategory::None,
"vmsltu.vv",
);
}
fn expected_lt(lhs: &[u8], rhs: &[u8], result: &mut [u8], index: usize) {
assert_eq!(lhs.len(), rhs.len());
match lhs.len() {
8 => {
let l = i64::from_le_bytes(lhs.try_into().unwrap());
let r = i64::from_le_bytes(rhs.try_into().unwrap());
let res = if l < r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
32 => {
let l = E256::get(lhs);
let r = E256::get(rhs);
let res = if l.cmp_s(&r).is_le() { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
_ => {
panic!("Invalid sew");
}
}
}
fn test_vmslt(sew: u64, lmul: i64, avl: u64) {
fn op(lhs: &[u8], rhs: &[u8], result: &mut [u8], sew: u64, lmul: i64, avl: u64) {
vmsop_vv(lhs, rhs, result, sew, avl, lmul, || unsafe {
rvv_asm!("vmslt.vv v24, v8, v16");
});
}
run_vmsop_vv(
sew,
lmul,
avl,
expected_lt,
op,
WideningCategory::None,
"vmslt.vv",
);
}
fn expected_leu(lhs: &[u8], rhs: &[u8], result: &mut [u8], index: usize) {
assert_eq!(lhs.len(), rhs.len());
match lhs.len() {
8 => {
let l = u64::from_le_bytes(lhs.try_into().unwrap());
let r = u64::from_le_bytes(rhs.try_into().unwrap());
let res = if l <= r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
32 => {
let l = E256::get(lhs);
let r = E256::get(rhs);
let res = if l <= r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
_ => {
panic!("Invalid sew");
}
}
}
fn test_vmsleu(sew: u64, lmul: i64, avl: u64) {
fn op(lhs: &[u8], rhs: &[u8], result: &mut [u8], sew: u64, lmul: i64, avl: u64) {
vmsop_vv(lhs, rhs, result, sew, avl, lmul, || unsafe {
rvv_asm!("vmsleu.vv v24, v8, v16");
});
}
run_vmsop_vv(
sew,
lmul,
avl,
expected_leu,
op,
WideningCategory::None,
"vmsleu.vv",
);
}
fn expected_le(lhs: &[u8], rhs: &[u8], result: &mut [u8], index: usize) {
assert_eq!(lhs.len(), rhs.len());
match lhs.len() {
8 => {
let l = i64::from_le_bytes(lhs.try_into().unwrap());
let r = i64::from_le_bytes(rhs.try_into().unwrap());
let res = if l <= r { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
32 => {
let l = E256::get(lhs);
let r = E256::get(rhs);
let ord = l.cmp_s(&r);
let res = if ord.is_eq() || ord.is_le() { 1 } else { 0 };
set_bit_in_slice(result, index, res);
}
_ => {
panic!("Invalid sew");
}
}
}
fn test_vmsle(sew: u64, lmul: i64, avl: u64) {
fn op(lhs: &[u8], rhs: &[u8], result: &mut [u8], sew: u64, lmul: i64, avl: u64) {
vmsop_vv(lhs, rhs, result, sew, avl, lmul, || unsafe {
rvv_asm!("vmsle.vv v24, v8, v16");
});
}
run_vmsop_vv(
sew,
lmul,
avl,
expected_le,
op,
WideningCategory::None,
"vmsle.vv",
);
}
pub fn test_vmsop_vv() {
for sew in [64, 256] {
for lmul in [-8, -2, 1, 4, 8] {
for avl in avl_iterator(sew, 4) {
test_vmseq(sew, lmul, avl);
test_vmsne(sew, lmul, avl);
test_vmsltu(sew, lmul, avl);
test_vmslt(sew, lmul, avl);
test_vmsleu(sew, lmul, avl);
test_vmsle(sew, lmul, avl);
}
}
}
}
| 28.29249 | 85 | 0.461162 |
1f91680d1c452101385a0cbf5786f599475da727 | 7,143 | html | HTML | src/app/routes/workflow/pages/template-detail/template-detail.component.html | 24wings/cr-client | 2f41a074b74504f7f800adf34b405cbb1c808aee | [
"MIT"
] | null | null | null | src/app/routes/workflow/pages/template-detail/template-detail.component.html | 24wings/cr-client | 2f41a074b74504f7f800adf34b405cbb1c808aee | [
"MIT"
] | null | null | null | src/app/routes/workflow/pages/template-detail/template-detail.component.html | 24wings/cr-client | 2f41a074b74504f7f800adf34b405cbb1c808aee | [
"MIT"
] | null | null | null | <div class="workflow-list-title">
<h2>工作流模板</h2>
<div class="workflow-list-title-menu">
<span>首页</span> >
<span>工作流</span> >
<span>工作流模板</span> >
<span>部门预算-ET-01</span>
</div>
</div>
<div class="workflow-template-details">
<div class="workflow-template-details-title">
<p>项目终止申请-EH-01 <span class="label-green">行业版</span></p>
<div class="workflow-template-details-title-detail">
<span>类型:</span>
<small>财务-预算</small>
<span>发布日期:</span>
<small>2016年07月04日</small>
<span>备注:</span>
<small>按照部门做预算</small>
</div>
<i nz-icon type="plus" theme="outline" class="add-label" (click)="showModal()"></i>
</div>
<div class="workflow-template-details-rule">
<div class="workflow-template-details-rule-title">
<p>规则字段</p>
</div>
<div class="workflow-template-details-rule-table">
<div class="workflow-template-details-rule-table-title">
<span style="width:15%">类型</span>
<span style="width:15%">字段</span>
<span style="width:70%">备注</span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">选择型</span>
<span style="width:15%">费用类型</span>
<span style="width:70%"></span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">选择型</span>
<span style="width:15%">费用类型</span>
<span style="width:70%"></span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">选择型</span>
<span style="width:15%">费用类型</span>
<span style="width:70%"></span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">选择型</span>
<span style="width:15%">费用类型</span>
<span style="width:70%"></span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">选择型</span>
<span style="width:15%">费用类型</span>
<span style="width:70%"></span>
</div>
<div class="workflow-template-details-rule-table-box">
<small>表单字段都可以作为规则判断条件!如上表中不包含您要用到的字段,请联系我们添加。</small>
</div>
</div>
</div>
<div class="workflow-template-details-rule">
<div class="workflow-template-details-rule-title">
<p>表单</p>
<i nz-icon type="plus" theme="outline" class="add-label" (click)="showModal1()"></i>
</div>
<div class="workflow-template-details-rule-table">
<div class="workflow-template-details-rule-table-title">
<span style="width:15%">编号</span>
<span style="width:15%">名称</span>
<span style="width:70%">调用方法</span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">291</span>
<span style="width:15%">部门预算-申请-01</span>
<span style="width:70%" class="set-lin">budgetListAction!startWorkFolowDept.action <small>此页面为部门预算申请页面(流程的开始页面)</small></span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">291</span>
<span style="width:15%">部门预算-申请-01</span>
<span style="width:70%" class="set-lin">budgetListAction!startWorkFolowDept.action <small>此页面为部门预算申请页面(流程的开始页面)</small></span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">291</span>
<span style="width:15%">部门预算-申请-01</span>
<span style="width:70%" class="set-lin">budgetListAction!startWorkFolowDept.action
<small>此页面为部门预算申请页面(流程的开始页面)</small>
</span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">291</span>
<span style="width:15%">部门预算-申请-01</span>
<span style="width:70%" class="set-lin">budgetListAction!startWorkFolowDept.action
<small>此页面为部门预算查看页面(每次提交后的查看页面)</small>
</span>
</div>
<div class="workflow-template-details-rule-table-box">
<span style="width:15%">291</span>
<span style="width:15%">部门预算-申请-01</span>
<span style="width:70%" class="set-lin">budgetListAction!startWorkFolowDept.action
<small>此页面为部门预算的审批页面(领导审批页面)</small>
</span>
</div>
<!-- <div class="workflow-template-details-rule-table-box">
<small>表单字段都可以作为规则判断条件!如上表中不包含您要用到的字段,请联系我们添加。</small>
</div> -->
</div>
</div>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="新建模板" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" class="addNode">
<div class="new-box">
<label for="">类型 :</label>
<nz-select [ngModel]="'Home'" class="xiala1">
<nz-option [nzLabel]="'Home'" [nzValue]=""></nz-option>
<nz-option [nzLabel]="'Company'" [nzValue]="'Company'"></nz-option>
</nz-select>
<nz-select [ngModel]="'Home'" class="xiala1">
<nz-option [nzLabel]="'Home'" [nzValue]=""></nz-option>
<nz-option [nzLabel]="'Company'" [nzValue]="'Company'"></nz-option>
</nz-select>
</div>
<div class="new-box">
<label for="">版本 :</label>
<nz-select [ngModel]="'Home'" class="xiala2">
<nz-option [nzLabel]="'Home'" [nzValue]=""></nz-option>
<nz-option [nzLabel]="'Company'" [nzValue]="'Company'"></nz-option>
</nz-select>
</div>
<div class="new-box">
<label for="">名称 :</label>
<input class="set-w-473" nz-input placeholder="" [(ngModel)]="value" />
</div>
<div class="new-box">
<label for="">备注 :</label>
<textarea rows="4" class="set-w-473" nz-input [(ngModel)]="inputValue"></textarea>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="isVisible1" nzTitle="注册工作流表单" (nzOnCancel)="handleCancel1()" (nzOnOk)="handleOk1()" class="addNode">
<div class="new-box">
<label for="">表单名称 :</label>
<input class="set-w-473" nz-input placeholder="" [(ngModel)]="value" />
</div>
<div class="new-box">
<label for="">表单编号:</label>
<input class="set-w-473" nz-input placeholder="" [(ngModel)]="value" />
</div>
<div class="new-box">
<label for="">调用方法:</label>
<input class="set-w-473" nz-input placeholder="" [(ngModel)]="value" />
</div>
<div class="new-box">
<label for="">备注 :</label>
<textarea rows="4" class="set-w-473" nz-input [(ngModel)]="inputValue"></textarea>
</div>
</nz-modal> | 43.290909 | 142 | 0.531289 |
6a06aacf29af8668e88809a4def83dc92f0ab934 | 3,151 | asm | Assembly | Code examples/Interrupts+LCD/blink11.asm | tocache/Intel-8085 | da1acfc20b3ab74a26993eeefb4cccf2b3ecf2de | [
"MIT"
] | null | null | null | Code examples/Interrupts+LCD/blink11.asm | tocache/Intel-8085 | da1acfc20b3ab74a26993eeefb4cccf2b3ecf2de | [
"MIT"
] | 2 | 2021-07-29T14:33:19.000Z | 2021-07-30T14:42:24.000Z | Code examples/Interrupts+LCD/blink11.asm | tocache/Intel-8085 | da1acfc20b3ab74a26993eeefb4cccf2b3ecf2de | [
"MIT"
] | null | null | null | ;Interrupciones habilitadas con visualizacion en LCD de la fuente de interrupcion
.CR 8085 To load the 8085 cross overlay
.TF blink11.hex,INT,32
.OR $0800 ;Zona de EEPROM, datos constantes
MSG1: .DB "i8085 Example 11"
MSG3: .DB "Int7.5 received!"
MSG4: .DB "Int6.5 received!"
MSG5: .DB "Int5.5 received!"
.OR $0000 ;Zona de EEPROM, inicio de programa
JMP INIT ;Salta a label INIT
.OR $003C ;Vector de interrupcion 7.5
JMP I75_ISR
.OR $0034 ;Vector de interrupcion 6.5
JMP I65_ISR
.OR $002C ;Vector de interrupcion 5.5
JMP I55_ISR
.OR $0050 ;Zona de programa de usuario
INIT: MVI A,0EH
OUT 40H ;8155 con PA, PB y PC como salidas
LXI SP,2FFFH ;Initialize Stack Pointer End of RAM 6264
EI ;Habilitamos interrupciones
MVI A, 08H
SIM ;Interrupciones sin masking
CALL LCDINIT ;Inicializacion del LCD
MVI E, 10H
LXI H, MSG1
CALL LCDMSG ;Imprime MSG1 en la primera linea
LOOP: NOP
JMP LOOP ;Retorna a label LOOP
LCDINIT: MVI A,00H ;Rutina de inicialización para el LCD
OUT 43H ;RS=0,RW=0,E=0
CALL DELAY
MVI A, 30H ;Primer 30H
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 30H ;Segundo 30H
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 30H ;Tercer 30H
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 30H ;Tercer 30H
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 38H ;Primera funcion real
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 08H ;Display on/off control
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 01H ;Clear display
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 06H ;Entry mode set
OUT 42H
CALL DELAY
CALL PULSOE
MVI A, 0CH ;Display on/off control
OUT 42H
CALL DELAY
CALL PULSOE
RET
LCDMSG: MOV B, H ;Enviar cadena a LCD
MOV C, L
MVI A, 01H
OUT 43H
LAZO: LDAX B
OUT 42H
CALL PULSOE2
INX B
NOP
DCR E
JNZ LAZO
RET
LCDCLR: MVI A,00H ;Comando para limpiar LCD
OUT 43H
MVI A, 01H
OUT 42H
CALL PULSOE
RET
LCDL1: MVI A,00H ;Comando para mover cursor a linea 1
OUT 43H
MVI A, 02H
OUT 42H
CALL PULSOE
RET
LCDL2: MVI A,00H ;Comando para mover cursor a linea 2
OUT 43H
MVI A, 0C0H
OUT 42H
CALL PULSOE
RET
PULSOE2: MVI A, 05H ;Pulso en E para dato
OUT 43H
MVI A, 01H
OUT 43H
RET
PULSOE: MVI A, 04H ;Pulso en E para comando
OUT 43H
MVI A, 00H
OUT 43H
RET
DELAY: PUSH B ; Saving B. This delay subroutine uses 2 single registers A & D and 1 register pair BC
PUSH D
PUSH PSW ; Saving PSW
MVI D, 0FFH ; Loading counter for outer loop
ST: LXI B, 20H ; Loading counter for inner loop
L: DCX B ; Decrement inner counter
MOV A, C ; If not exhausted go again for inner loop
ORA B
JNZ L
DCR D ; Decrement outer counter
JNZ ST ; If not exhausted go again for outer loop
POP PSW ; Restore PSW
POP D
POP B ; Restore B
RET
I75_ISR: CALL LCDL1
MVI E, 10H
LXI H, MSG3
CALL LCDMSG ;Imprime MSG3 en la primera linea
EI
RET
I65_ISR: CALL LCDL1
MVI E, 10H
LXI H, MSG4
CALL LCDMSG ;Imprime MSG3 en la primera linea
EI
RET
I55_ISR: CALL LCDL1
MVI E, 10H
LXI H, MSG5
CALL LCDMSG ;Imprime MSG3 en la primera linea
EI
RET
| 19.450617 | 102 | 0.675976 |
b2fa730dbd73b043c294390890c9c13d76abf7ce | 1,685 | py | Python | tests/stdlib_test.py | misantroop/jsonpickle | 97f4a05ccffe8593458b4b787c3fc97622f23cec | [
"BSD-3-Clause"
] | null | null | null | tests/stdlib_test.py | misantroop/jsonpickle | 97f4a05ccffe8593458b4b787c3fc97622f23cec | [
"BSD-3-Clause"
] | 1 | 2019-04-03T20:19:40.000Z | 2019-04-03T20:19:40.000Z | tests/stdlib_test.py | parsons-kyle-89/jsonpickle | 2828dd4a247bbae9d37a3d78194caaaeadeb2ed2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test miscellaneous objects from the standard library"""
import uuid
import unittest
import jsonpickle
class UUIDTestCase(unittest.TestCase):
def test_random_uuid(self):
u = uuid.uuid4()
encoded = jsonpickle.encode(u)
decoded = jsonpickle.decode(encoded)
expect = u.hex
actual = decoded.hex
self.assertEqual(expect, actual)
def test_known_uuid(self):
expect = '28b56adbd18f44e2a5556bba2f23e6f6'
exemplar = uuid.UUID(expect)
encoded = jsonpickle.encode(exemplar)
decoded = jsonpickle.decode(encoded)
actual = decoded.hex
self.assertEqual(expect, actual)
class BytesTestCase(unittest.TestCase):
def test_bytestream(self):
expect = (b'\x89HDF\r\n\x1a\n\x00\x00\x00\x00\x00\x08\x08\x00'
b'\x04\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xffh'
b'\x848\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff'
b'\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00`\x00\x00'
b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00'
b'\x00\x88\x00\x00\x00\x00\x00\x00\x00\xa8\x02\x00'
b'\x00\x00\x00\x00\x00\x01\x00\x01\x00')
encoded = jsonpickle.encode(expect)
actual = jsonpickle.decode(encoded)
self.assertEqual(expect, actual)
def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(UUIDTestCase))
suite.addTest(unittest.makeSuite(BytesTestCase))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='suite')
| 30.089286 | 70 | 0.629674 |
98b21f3cd84eb6713d59b688dc0fe7c6c288d93b | 893 | html | HTML | seeker/results/act2/files/452.html | mangel2o/proyecto-ingenieria-software | 4cede1a0202f78f79a3ce1f2f34986d93e9cb1b6 | [
"Apache-2.0"
] | 3 | 2021-02-20T22:31:47.000Z | 2021-03-20T00:02:55.000Z | seeker/results/act2/files/452.html | mangel2o/proyecto-ingenieria-software | 4cede1a0202f78f79a3ce1f2f34986d93e9cb1b6 | [
"Apache-2.0"
] | 1 | 2021-03-20T02:12:48.000Z | 2021-03-20T02:12:48.000Z | seeker/results/act2/files/452.html | mangel2o/proyecto-ingenieria-software | 4cede1a0202f78f79a3ce1f2f34986d93e9cb1b6 | [
"Apache-2.0"
] | null | null | null |
Motor Oils for heavy vehicles
MOTOR OILS FOR HEAVY VEHICLES
Diesel Móvil Extra Vida
(Long-Life)
Multigrade SAE 15W-40,
which exceeds API CF-4 classification, is highly capable
of keeping this soot suspended; accordingly, it has bee
granted new ACEA E3-96 classification.
Monograde SAE 30 o
40, for all types of Diesel engines requiring
lubes which meet Mercedes Benz’s requirements.
Diesel Móvil AT
Super Móvil HD
Suplemento 1
Monograde SAE 30,40 o 50. (API
SF/CC) provides for gasoline engines highest
protection against muddying, varnishing, and rust which
are typical of city service.
Return
to Automobile Lubes
| 15.666667 | 64 | 0.578947 |
18d6b2e70b92d5809e0e6184a7b0bb89f29fa3c1 | 1,135 | rb | Ruby | app/services/spree_shopify_importer/data_parsers/return_authorizations/base_data.rb | w4hs/shopify-spree-importer | f44a1324fd9be726483ded77a04176996a7f821a | [
"BSD-3-Clause"
] | 8 | 2018-02-08T11:11:03.000Z | 2020-06-05T17:16:53.000Z | app/services/spree_shopify_importer/data_parsers/return_authorizations/base_data.rb | w4hs/shopify-spree-importer | f44a1324fd9be726483ded77a04176996a7f821a | [
"BSD-3-Clause"
] | 61 | 2017-04-13T08:19:00.000Z | 2020-05-06T20:15:37.000Z | app/services/spree_shopify_importer/data_parsers/return_authorizations/base_data.rb | w4hs/shopify-spree-importer | f44a1324fd9be726483ded77a04176996a7f821a | [
"BSD-3-Clause"
] | 12 | 2018-01-26T12:46:57.000Z | 2021-06-25T13:46:47.000Z | module SpreeShopifyImporter
module DataParsers
module ReturnAuthorizations
class BaseData
def initialize(shopify_refund, spree_order)
@shopify_refund = shopify_refund
@spree_order = spree_order
end
def number
@number ||= "SRE#{@shopify_refund.id}"
end
def attributes
@attributes ||= {
state: :authorized,
order: @spree_order,
memo: @shopify_refund.note,
stock_location: stock_location,
reason: reason
}
end
def timestamps
@timestamps ||= {
created_at: @shopify_refund.created_at.to_datetime,
updated_at: @shopify_refund.processed_at.try(:to_datetime)
}
end
private
def stock_location
Spree::StockLocation.create_with(default: false, active: false).find_or_create_by(name: I18n.t(:shopify))
end
def reason
Spree::ReturnAuthorizationReason.create_with(active: false).find_or_create_by(name: I18n.t(:shopify))
end
end
end
end
end
| 25.795455 | 115 | 0.591189 |
c3f1d24dde05d7f1047f842d80170d0e501c6662 | 237 | sql | SQL | Seguranca/SqlServer/Tabelas/03_tbTppr.sql | adesempre/scripts_modulo_base | fe076f9fd5a3a0fc8ccc95d7b01c1997f0988056 | [
"Unlicense"
] | null | null | null | Seguranca/SqlServer/Tabelas/03_tbTppr.sql | adesempre/scripts_modulo_base | fe076f9fd5a3a0fc8ccc95d7b01c1997f0988056 | [
"Unlicense"
] | null | null | null | Seguranca/SqlServer/Tabelas/03_tbTppr.sql | adesempre/scripts_modulo_base | fe076f9fd5a3a0fc8ccc95d7b01c1997f0988056 | [
"Unlicense"
] | null | null | null | CREATE TABLE seg.tbTppr
(
tppr_cod CHAR(02) NOT NULL,
modu_cod CHAR(02) NOT NULL,
tppr_dsc CHAR(70) NOT NULL,
tppr_ico VARCHAR(255) NOT NULL,
tppr_ind_movto CHAR(01) NOT NULL,
CONSTRAINT tbTppr_PK PRIMARY KEY
(
tppr_cod
)
)
GO
| 16.928571 | 34 | 0.734177 |
ad3f60c2e7f40ce3a16d7bb18af7f6a8a5ee5522 | 4,327 | lua | Lua | examples/threaded-webserver.lua | LuaDist-testing/lua-apr | d5be82741b2aad3d592a079add2229bdc94b48bc | [
"MIT"
] | null | null | null | examples/threaded-webserver.lua | LuaDist-testing/lua-apr | d5be82741b2aad3d592a079add2229bdc94b48bc | [
"MIT"
] | null | null | null | examples/threaded-webserver.lua | LuaDist-testing/lua-apr | d5be82741b2aad3d592a079add2229bdc94b48bc | [
"MIT"
] | null | null | null | --[[
Example: Multi threaded webserver
Author: Peter Odding <peter@peterodding.com>
Last Change: June 19, 2011
Homepage: http://peterodding.com/code/lua/apr/
License: MIT
Thanks to the [multi threading] [threading_module] and [thread queue]
[thread_queues] modules in the Apache Portable Runtime it is possible to
improve the performance of the single threaded webserver from the previous
example. Here is a benchmark of the multi threaded implementation listed
below (again using [ApacheBench] [ab], but now with the `-c` argument):
$ NUM_THREADS=4
$ lua examples/threaded-webserver.lua $NUM_THREADS &
$ ab -qt5 -c$NUM_THREADS http://localhost:8080/ | grep 'Requests per second\|Transfer rate'
Requests per second: 9210.72 [#/sec] (mean)
Transfer rate: 5594.79 [Kbytes/sec] received
Comparing these numbers to the benchmark of the single threaded webserver we
can see that the number of requests per second went from 3670 to 9210, more
than doubling the throughput of the webserver on a dual core processor.
*Note that both benchmarks were run on my Compaq Presario CQ60 laptop (which
features an Intel Core 2 Duo T5800 processor clocked at 2 GHz and 3 GB of
RAM) and that the Lua/APR binding was compiled without debugging symbols.*
[threading_module]: #multi_threading
[thread_queues]: #thread_queues
[ab]: http://en.wikipedia.org/wiki/ApacheBench
[thread_pool]: http://en.wikipedia.org/wiki/Thread_pool_pattern
]]
local num_threads = tonumber(arg[1]) or 2
local port_number = tonumber(arg[2]) or 8080
local template = [[
<html>
<head>
<title>Hello from Lua/APR!</title>
<style type="text/css">
body { font-family: sans-serif; }
dt { font-weight: bold; }
dd { font-family: monospace; margin: -1.4em 0 0 14em; }
</style>
</head>
<body>
<h1>Hello from Lua/APR!</h1>
<p><em>This web page was served by worker %i.</em></p>
<p>The headers provided by your web browser:</p>
<dl>%s</dl>
</body>
</html>
]]
-- Load the Lua/APR binding.
local apr = require 'apr'
-- Initialize the server socket.
local server = assert(apr.socket_create())
assert(server:bind('*', port_number))
assert(server:listen(num_threads * 2))
print("Running webserver with " .. num_threads .. " client threads on http://localhost:" .. port_number .. " ..")
-- Create the thread queue (used to pass sockets between threads).
local queue = apr.thread_queue(num_threads)
-- Define the function to execute in each child thread.
function worker(thread_id, queue, template)
pcall(require, 'luarocks.require')
local apr = require 'apr'
while true do
local client, msg, code = queue:pop()
assert(client or code == 'EINTR', msg)
if client then
local status, message = pcall(function()
local request = assert(client:read(), "Failed to receive request from client!")
local method, location, protocol = assert(request:match '^(%w+)%s+(%S+)%s+(%S+)')
local headers = {}
for line in client:lines() do
local name, value = line:match '^(%S+):%s+(.-)$'
if not name then
break
end
table.insert(headers, '<dt>' .. name .. ':</dt><dd>' .. value .. '</dd>')
end
table.sort(headers)
local content = template:format(thread_id, table.concat(headers))
client:write(protocol, ' 200 OK\r\n',
'Content-Type: text/html\r\n',
'Content-Length: ' .. #content .. '\r\n',
'Connection: close\r\n',
'\r\n',
content)
assert(client:close())
end)
if not status then
print('Error while serving request:', message)
end
end
end
end
-- Create the child threads and keep them around in a table (so that they are
-- not garbage collected while we are still using them).
local pool = {}
for i = 1, num_threads do
table.insert(pool, apr.thread(worker, i, queue, template))
end
-- Enter the accept() loop in the parent thread.
while true do
local status, message = pcall(function()
local client = assert(server:accept())
assert(queue:push(client))
end)
if not status then
print('Error while serving request:', message)
end
end
-- vim: ts=2 sw=2 et
| 34.34127 | 113 | 0.653571 |
42d23999410ce60b53044a5f99a42a36a800aa31 | 4,355 | sql | SQL | bokhak.sql | dallball/boke_mysql | dafe0b833ea847b8b1214dd3bd9a885cb8fa5f0d | [
"MIT"
] | 1 | 2018-06-23T16:54:16.000Z | 2018-06-23T16:54:16.000Z | bokhak.sql | dallball/boke_mysql | dafe0b833ea847b8b1214dd3bd9a885cb8fa5f0d | [
"MIT"
] | null | null | null | bokhak.sql | dallball/boke_mysql | dafe0b833ea847b8b1214dd3bd9a885cb8fa5f0d | [
"MIT"
] | null | null | null | /*
Navicat MySQL Data Transfer
Source Server : local_centos
Source Server Version : 50556
Source Host : 192.168.0.166:3306
Source Database : bokhak
Target Server Type : MYSQL
Target Server Version : 50556
File Encoding : 65001
Date: 2018-06-14 15:36:43
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for blog
-- ----------------------------
DROP TABLE IF EXISTS `blog`;
CREATE TABLE `blog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`content` text NOT NULL,
`author` int(11) DEFAULT NULL,
`category_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `author` (`author`),
KEY `category_id` (`category_id`),
CONSTRAINT `blog_ibfk_1` FOREIGN KEY (`author`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `blog_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of blog
-- ----------------------------
INSERT INTO `blog` VALUES ('1', 'title1-update', '发射点发生发生123fsdf发射点发生发生123fsdf发射点发生发生123fsdf发射点发生发生123fsdf发射点发生发生123fsdf发射点发生发生123fsdf发射点发生发生123fsdf-update', '3', '2', '2018-06-12 15:02:00', '2018-06-12 16:23:58');
INSERT INTO `blog` VALUES ('2', 'title0-update', 'asdfasdfasdfasdfasdfasdfasdf', '3', '1', '2018-06-12 15:26:13', '2018-06-14 11:24:34');
INSERT INTO `blog` VALUES ('4', 'test3-update', 'asfadfasdfasdf-update', '3', '2', '2018-06-12 16:25:58', '2018-06-12 16:26:22');
INSERT INTO `blog` VALUES ('5', 'test4', '123123sdfasdff', '3', '1', '2018-06-13 10:51:44', '2018-06-13 10:51:44');
INSERT INTO `blog` VALUES ('6', 'test5-update', 'test5暗灰色的test5暗灰色的test5暗灰色的test5暗灰色的test5暗灰色的test5暗灰色的test5暗灰色的', '3', '2', '2018-06-13 11:21:34', '2018-06-13 11:30:34');
INSERT INTO `blog` VALUES ('7', 'test6', '华硕敦化市更多华硕敦化市东方', '2', '1', '2018-06-13 11:32:44', '2018-06-13 11:32:44');
INSERT INTO `blog` VALUES ('8', 'test8', '压缩敦化市华硕敦化市东方', '3', '1', '2018-06-13 11:45:49', '2018-06-13 11:45:49');
INSERT INTO `blog` VALUES ('9', 'test9', '阿快打锁定华硕东方', '2', '2', '2018-06-13 11:46:37', '2018-06-13 11:46:37');
INSERT INTO `blog` VALUES ('10', 'test10', '阿苏火山华硕东方的沙化', '2', '3', '2018-06-13 11:46:54', '2018-06-13 11:46:54');
INSERT INTO `blog` VALUES ('11', 'test11', '罂粟花沙化价格打算加多少华硕东方', '2', '1', '2018-06-13 11:47:04', '2018-06-13 11:47:04');
INSERT INTO `blog` VALUES ('12', 'test12', 'afasdfasdfasfasdf', '2', '1', '2018-06-13 18:06:07', '2018-06-13 18:06:07');
INSERT INTO `blog` VALUES ('13', 'test13', 'asfasdfasfasdf', '2', '1', '2018-06-13 18:07:34', '2018-06-13 18:07:34');
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `category_name` (`category_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES ('1', '分类1', '2018-06-13 11:21:34', '2018-06-13 11:21:34');
INSERT INTO `category` VALUES ('2', '分类2', '2018-06-13 11:30:34', '2018-06-13 11:30:34');
INSERT INTO `category` VALUES ('3', '分类3', '2018-06-13 11:46:54', '2018-06-13 11:46:54');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`role` int(11) DEFAULT '20',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_name` (`user_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('2', 'user1', '4297f44b13955235245b2497399d7a93', '20', '2018-06-08 15:11:46', '2018-06-08 15:11:46');
INSERT INTO `user` VALUES ('3', 'user2', '4297f44b13955235245b2497399d7a93', '20', '2018-06-11 15:04:45', '2018-06-11 15:04:45');
| 46.827957 | 214 | 0.617451 |
16c5ebce82b26826cc766439b0fec54fc8b665b9 | 533 | h | C | apps/editor/DialogComponents.h | ASxa86/azule | 9bf89dfc5a80f296b02edd3ac608d9a90e4ea26b | [
"MIT"
] | 1 | 2018-10-19T18:00:19.000Z | 2018-10-19T18:00:19.000Z | apps/editor/DialogComponents.h | ASxa86/azule | 9bf89dfc5a80f296b02edd3ac608d9a90e4ea26b | [
"MIT"
] | 7 | 2019-06-13T00:48:55.000Z | 2020-05-05T00:18:42.000Z | apps/editor/DialogComponents.h | ASxa86/AGE | 9bf89dfc5a80f296b02edd3ac608d9a90e4ea26b | [
"MIT"
] | null | null | null | #pragma once
#include <azule/entity/Entity.h>
#include <QtWidgets/QDialog>
namespace azule
{
///
/// \class DialogComponents
///
/// \brief A dialog for choosing a new component to add to an Entity.
///
/// \author Aaron Shelley
///
/// \date March 9, 2019
///
class DialogComponents : public QDialog
{
Q_OBJECT
public:
///
/// \param e The entity to add a new component too.
///
DialogComponents(azule::Entity* e, QWidget* parent = nullptr);
~DialogComponents();
private:
azule::Entity* entity;
};
}
| 16.65625 | 70 | 0.652908 |
a802108a2acfa3556acaaeaf8523050aede59fac | 105 | rs | Rust | src/os/unix.rs | stevebob/glutin | cff7a88d051c972e2b78957443bef5e45149c18a | [
"Apache-2.0"
] | 1 | 2017-03-18T18:10:16.000Z | 2017-03-18T18:10:16.000Z | src/os/unix.rs | sumproxy/glutin | 29588dee24c606e6e42e2455199258462853743b | [
"Apache-2.0"
] | null | null | null | src/os/unix.rs | sumproxy/glutin | 29588dee24c606e6e42e2455199258462853743b | [
"Apache-2.0"
] | 1 | 2017-07-07T04:06:40.000Z | 2017-07-07T04:06:40.000Z | #![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
| 52.5 | 104 | 0.666667 |
8115d57d90daacf9fc1d500e3da203b83ada5036 | 2,618 | rs | Rust | jetsocat/src/jmux/id.rs | Devolutions/devolutions-gateway | 80d83f7a07cd7a695f1f5ec30968efd59161b513 | [
"Apache-2.0",
"MIT"
] | 18 | 2021-01-16T21:13:04.000Z | 2022-03-23T21:54:06.000Z | jetsocat/src/jmux/id.rs | Devolutions/devolutions-gateway | 80d83f7a07cd7a695f1f5ec30968efd59161b513 | [
"Apache-2.0",
"MIT"
] | 19 | 2020-10-20T14:41:28.000Z | 2022-03-09T14:58:12.000Z | jetsocat/src/jmux/id.rs | Devolutions/devolutions-gateway | 80d83f7a07cd7a695f1f5ec30968efd59161b513 | [
"Apache-2.0",
"MIT"
] | null | null | null | use bitvec::prelude::*;
use std::convert::TryFrom;
pub trait Id: Copy + From<u32> + Into<u32> {}
/// Distant identifier for a channel
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
pub struct DistantChannelId(u32);
impl From<u32> for DistantChannelId {
fn from(v: u32) -> Self {
Self(v)
}
}
impl From<DistantChannelId> for u32 {
fn from(id: DistantChannelId) -> Self {
id.0
}
}
impl Id for DistantChannelId {}
impl std::fmt::Display for DistantChannelId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "d#{}", self.0)
}
}
/// Local identifier for a channel
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
pub struct LocalChannelId(u32);
impl From<u32> for LocalChannelId {
fn from(v: u32) -> Self {
Self(v)
}
}
impl From<LocalChannelId> for u32 {
fn from(id: LocalChannelId) -> Self {
id.0
}
}
impl Id for LocalChannelId {}
impl std::fmt::Display for LocalChannelId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "l#{}", self.0)
}
}
pub struct IdAllocator<T: Id> {
taken: BitVec,
_pd: std::marker::PhantomData<T>,
}
impl<T: Id> Default for IdAllocator<T> {
fn default() -> Self {
Self {
taken: BitVec::new(),
_pd: std::marker::PhantomData,
}
}
}
impl<T: Id> IdAllocator<T> {
pub fn new() -> Self {
Self::default()
}
/// Allocates an ID
///
/// Returns `None` when allocator is out of memory.
pub fn alloc(&mut self) -> Option<T> {
match self.taken.iter_zeros().next() {
Some(freed_idx) => {
// - Reclaim a freed ID -
let freed_idx_u32 = u32::try_from(freed_idx).expect("freed IDs should fit in an u32 integer");
self.taken.set(freed_idx, true);
Some(T::from(freed_idx_u32))
}
None => {
// - Allocate a new ID -
let new_idx = self.taken.len();
// If new_idx doesn’t fit in a u32, we are in the highly improbable case of an "out of memory" for this ID allocator
let new_idx_u32 = u32::try_from(new_idx).ok()?;
self.taken.push(true);
Some(T::from(new_idx_u32))
}
}
}
/// Frees an ID
///
/// Freed IDs can be later reclaimed.
pub fn free(&mut self, id: T) {
let idx = usize::try_from(Into::<u32>::into(id)).expect("ID should fit in an usize integer");
self.taken.set(idx, false);
}
}
| 25.417476 | 132 | 0.55424 |
019a58bc295bb93bc74b990e855f75c7f43b4345 | 557 | asm | Assembly | oeis/002/A002450.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/002/A002450.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/002/A002450.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A002450: a(n) = (4^n - 1)/3.
; 0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,1501199875790165,6004799503160661,24019198012642645,96076792050570581,384307168202282325,1537228672809129301,6148914691236517205,24595658764946068821,98382635059784275285,393530540239137101141,1574122160956548404565,6296488643826193618261,25185954575304774473045
mov $1,4
pow $1,$0
div $1,3
mov $0,$1
| 69.625 | 486 | 0.859964 |
88fc28ba0ceb436e8c1d046f2740b961fabd7334 | 1,947 | swift | Swift | Stocks/Activities/Search/SearchTextView.swift | Power186/StockViewer | 98df2742e286c30761034f32ac7b44cec39abd7a | [
"MIT"
] | null | null | null | Stocks/Activities/Search/SearchTextView.swift | Power186/StockViewer | 98df2742e286c30761034f32ac7b44cec39abd7a | [
"MIT"
] | null | null | null | Stocks/Activities/Search/SearchTextView.swift | Power186/StockViewer | 98df2742e286c30761034f32ac7b44cec39abd7a | [
"MIT"
] | null | null | null | //
// SearchTextView.swift
// Stocks
//
// Created by Scott on 3/4/21.
//
import SwiftUI
struct SearchTextView: View {
@Binding var searchTerm: String
@Binding var isSearching: Bool
var body: some View {
HStack {
HStack {
Image(systemName: "magnifyingglass")
.imageScale(.medium)
TextField("Search stocks", text: $searchTerm)
.font(.custom("Avenir", size: 18))
.keyboardType(.default)
if isSearching {
Button(action: { searchTerm = "" }) {
Image(systemName: "xmark.circle")
.imageScale(.medium)
.foregroundColor(.primary)
}
}
}
.padding(8)
.background(Color(.systemGray5))
.cornerRadius(10)
.padding(.horizontal)
.onTapGesture {
isSearching = true
}
.transition(.move(edge: .trailing))
.animation(.spring())
if isSearching {
Button(action: {
isSearching = false
searchTerm = ""
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}) {
Text("Cancel")
.font(.custom("Avenir", size: 18))
.fontWeight(.semibold)
.foregroundColor(.primary)
.padding(.trailing)
.padding(.leading, 0)
}
}
}
}
}
struct SearchTextView_Previews: PreviewProvider {
static var previews: some View {
SearchTextView(searchTerm: .constant(""), isSearching: .constant(false))
}
}
| 30.421875 | 126 | 0.45095 |
d2428246b978f430ec0c23e29fd5a8d84da1b0fe | 4,719 | php | PHP | app/Http/Controllers/Order/AssignDeliveryController.php | sdbappi69/ipost-local | a6e4b9ff803a5366ad8373135c438042dd2b24d0 | [
"MIT"
] | null | null | null | app/Http/Controllers/Order/AssignDeliveryController.php | sdbappi69/ipost-local | a6e4b9ff803a5366ad8373135c438042dd2b24d0 | [
"MIT"
] | null | null | null | app/Http/Controllers/Order/AssignDeliveryController.php | sdbappi69/ipost-local | a6e4b9ff803a5366ad8373135c438042dd2b24d0 | [
"MIT"
] | null | null | null | <?php
namespace App\Http\Controllers\Order;
use Illuminate\Http\Request;
use App\Http\Traits\LogsTrait;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\SubOrder;
use App\Trip;
use App\SuborderTrip;
use App\Order;
use App\User;
use Session;
use Redirect;
use Validator;
class AssignDeliveryController extends Controller
{
use LogsTrait;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
// $this->middleware('role:superadministrator|systemadministrator|systemmoderator|hubmanager');
$this->middleware('role:hubmanager|vehiclemanager');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$sub_orders = SubOrder::whereStatus(true)->where('sub_order_status', '=', '7')->orderBy('id', 'desc')->where('destination_hub_id', '=', auth()->user()->reference_id)->where('deliveryman_id', '=', null)->paginate(9);
$deliveryman = User::whereStatus(true)->where('user_type_id', '=', '8')->where('reference_id', '=', auth()->user()->reference_id)->lists('name', 'id')->toArray();
return view('assign-delivery.index', compact('sub_orders', 'deliveryman'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$suborder_unique_id = $request->unique_id;
$sub_orders = SubOrder::whereStatus(true)->where('sub_order_status', '=', '7')->orderBy('id', 'desc')->where('destination_hub_id', '=', auth()->user()->reference_id)->where('deliveryman_id', '=', null)->where('unique_suborder_id', '=', $suborder_unique_id)->paginate(1);
$deliveryman = User::whereStatus(true)->where('user_type_id', '=', '8')->where('reference_id', '=', auth()->user()->reference_id)->lists('name', 'id')->toArray();
return view('assign-delivery.index', compact('sub_orders', 'deliveryman'));
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
// return $request->all();
$validation = Validator::make($request->all(), [
'order_id' => 'required',
'sub_order_id' => 'required',
'deliveryman_id' => 'required',
]);
if($validation->fails()) {
return Redirect::back()->withErrors($validation)->withInput();
}
// Update Sub-Order
$suborderUp = SubOrder::findOrFail($request->sub_order_id);
$suborderUp->sub_order_status = '8';
$suborderUp->delivery_assigned_by = auth()->user()->id;
$suborderUp->deliveryman_id = $request->deliveryman_id;
$suborderUp->delivery_status = '0';
$suborderUp->save();
// orderLog($user_id, $order_id, $sub_order_id, $product_id, $ref_id, $ref_table, $text)
$this->orderLog(auth()->user()->id, $suborderUp->order_id, $suborderUp->id, '', $suborderUp->deliveryman_id, 'users', 'Assigned a delivery man');
// Update Order
$order_due = SubOrder::where('sub_order_status', '!=', '8')->where('order_id', '=', $suborderUp->order_id)->count();
if($order_due == 0){
$order = Order::findOrFail($request->order_id);
$order->order_status = '8';
$order->save();
// orderLog($user_id, $order_id, $sub_order_id, $product_id, $ref_id, $ref_table, $text)
$this->orderLog(auth()->user()->id, $order->id, '', '', auth()->user()->reference_id, 'hubs', 'All Sub-Order(s) assigned delivery man');
}
Session::flash('message', "Delivery assigned successfully");
return redirect('/assign-delivery');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
| 30.642857 | 278 | 0.592287 |
476fe43eb395709b065005db07fd4110b78a5e81 | 1,198 | html | HTML | templates/components/emthemes-modez/banners/half.html | cbkyro/fullcolorcoroplast | a06f347a5368c3b93ddb84640bce0ed300cc768c | [
"Unlicense",
"MIT"
] | null | null | null | templates/components/emthemes-modez/banners/half.html | cbkyro/fullcolorcoroplast | a06f347a5368c3b93ddb84640bce0ed300cc768c | [
"Unlicense",
"MIT"
] | null | null | null | templates/components/emthemes-modez/banners/half.html | cbkyro/fullcolorcoroplast | a06f347a5368c3b93ddb84640bce0ed300cc768c | [
"Unlicense",
"MIT"
] | null | null | null | <div class="emthemesModez-bannersContainer
emthemesModez-bannersContainer--half
emthemesModez-bannersContainer--half-{{index}}
{{#if style}}emthemesModez-bannersContainer--half-{{style}}{{/if}}">
{{> components/emthemes-modez/banners/banner
url=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner1.url"))
image=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner1.image"))
title=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner1.title"))
text=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner1.text"))
button=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner1.button"))
style=style
}}
{{> components/emthemes-modez/banners/banner
url=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner2.url"))
image=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner2.image"))
title=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner2.title"))
text=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner2.text"))
button=(lang (concat (concat "emthemesmodez.banners.half_" index) ".banner2.button"))
style=style
}}
</div>
| 47.92 | 87 | 0.72788 |
75a17be4af7dd0e90c68932490a55e85fc4fe4f5 | 7,000 | rs | Rust | src/smtp.rs | ivd-git/rust-smtp-server | c1ecab3e21135abe247d0c8965e6f70c415c4dc6 | [
"MIT"
] | 10 | 2020-04-04T13:49:58.000Z | 2022-03-29T14:56:30.000Z | projects/02-client-server/solution/smtp-server/src/smtp.rs | qaware/rust-hands-on | b769431af66af4f1df15b763e68c8325d2f9799f | [
"MIT"
] | 1 | 2020-08-20T01:19:12.000Z | 2020-08-20T01:19:12.000Z | projects/02-client-server/solution/smtp-server/src/smtp.rs | qaware/rust-hands-on | b769431af66af4f1df15b763e68c8325d2f9799f | [
"MIT"
] | 3 | 2020-01-25T18:52:07.000Z | 2021-07-07T14:32:27.000Z | use std::io::{BufRead, Error, Write};
// Client commands
const HELO_START: &str = "HELO ";
const MAIL_START: &str = "MAIL FROM:";
const RCPT_START: &str = "RCPT TO:";
const DATA_LINE: &str = "DATA";
const QUIT_LINE: &str = "QUIT";
// Server responses
const MSG_READY: &str = "220 ready";
const MSG_OK: &str = "250 OK";
const MSG_SEND_MESSAGE_CONTENT: &str = "354 Send message content";
const MSG_BYE: &str = "221 Bye";
const MSG_SYNTAX_ERROR: &str = "500 unexpected line";
/// An Email message
pub struct Message {
sender: String,
recipients: Vec<String>,
data: Vec<String>,
}
impl Message {
pub fn get_sender(&self) -> &str {
&self.sender
}
pub fn get_recipients(&self) -> &Vec<String> {
&self.recipients
}
pub fn get_data(&self) -> String {
self.data.join("\n")
}
}
/// SMTP States
///
/// States are named by the next expected command(s).
enum State {
Helo,
Mail,
Rcpt,
RcptOrData,
Dot,
MailOrQuit,
Done,
}
/// The state of a SMTP connection.
pub struct Connection {
state: State,
sender_domain: String,
messages: Vec<Message>,
next_sender: String,
next_recipients: Vec<String>,
next_data: Vec<String>,
}
impl Connection {
pub fn new() -> Connection {
Connection {
state: State::Helo,
sender_domain: "".to_string(),
messages: Vec::new(),
next_sender: "".to_string(),
next_recipients: Vec::new(),
next_data: Vec::new(),
}
}
/// Handle an incoming connection
pub fn handle(reader: &mut BufRead, writer: &mut Write) -> Result<Connection, Error> {
let mut result = Connection::new();
writeln!(writer, "{}", MSG_READY)?;
loop {
let mut line = String::new();
reader.read_line(&mut line)?;
// read_line will leave trailing newlines which must be removed
match result.feed_line(line.trim_right_matches(|c: char| c == '\n' || c == '\r')) {
Ok("") => {}
Ok(s) => {
writeln!(writer, "{}", s)?;
if s.starts_with("221") {
break;
}
}
Err(e) => {
writeln!(writer, "{}", e)?;
}
}
}
Ok(result)
}
fn get_if_done<R, F: FnOnce() -> R>(&self, getter: F) -> Option<R> {
match self.state {
State::Done => Some(getter()),
_ => None,
}
}
pub fn get_messages(&self) -> Option<&Vec<Message>> {
self.get_if_done(|| &self.messages)
}
pub fn get_sender_domain(&self) -> Option<&str> {
self.get_if_done(|| self.sender_domain.as_str())
}
fn feed_line<'a>(&mut self, line: &'a str) -> Result<&'a str, &'a str> {
match self.state {
State::Helo => {
if line.starts_with(HELO_START) {
self.sender_domain = line[HELO_START.len()..].trim().to_string();
self.state = State::Mail;
Ok(MSG_OK)
} else {
Err(MSG_SYNTAX_ERROR)
}
}
State::Mail => {
if line.starts_with(MAIL_START) {
self.next_sender = line[MAIL_START.len()..].trim().to_string();
self.state = State::Rcpt;
Ok(MSG_OK)
} else {
Err(MSG_SYNTAX_ERROR)
}
}
State::Rcpt => {
if line.starts_with(RCPT_START) {
self.next_recipients
.push(line[RCPT_START.len()..].trim().to_string());
self.state = State::RcptOrData;
Ok(MSG_OK)
} else {
Err(MSG_SYNTAX_ERROR)
}
}
State::RcptOrData => {
if line.starts_with(RCPT_START) {
self.next_recipients
.push(line[RCPT_START.len()..].trim().to_string());
Ok(MSG_OK)
} else if line == DATA_LINE {
self.state = State::Dot;
Ok(MSG_SEND_MESSAGE_CONTENT)
} else {
Err(MSG_SYNTAX_ERROR)
}
}
State::Dot => {
if line == "." {
self.messages.push(Message {
sender: self.next_sender.clone(),
recipients: self.next_recipients.clone(),
data: self.next_data.clone(),
});
self.next_sender = "".to_string();
self.next_recipients = Vec::new();
self.next_data = Vec::new();
self.state = State::MailOrQuit;
Ok(MSG_OK)
} else {
self.next_data.push(line.to_string());
Ok("")
}
}
State::MailOrQuit => {
if line.starts_with(MAIL_START) {
self.next_sender = line[MAIL_START.len()..].trim().to_string();
self.state = State::Rcpt;
Ok(MSG_OK)
} else if line == QUIT_LINE {
self.state = State::Done;
Ok(MSG_BYE)
} else {
Err(MSG_SYNTAX_ERROR)
}
}
State::Done => Err(MSG_SYNTAX_ERROR),
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::io::BufReader;
#[test]
fn parse_message() {
// When
let request = "HELO localhost\n\
MAIL FROM: tester@localhost\n\
RCPT TO: admin@localhost\n\
DATA\n\
It works!\n\
.\n\
QUIT\n";
let mut reader = BufReader::new(request.as_bytes());
let mut response_bytes = Vec::new();
let result = Connection::handle(&mut reader, &mut response_bytes).unwrap();
let response = String::from_utf8(response_bytes).unwrap();
// Then
assert_eq!(result.get_sender_domain(), Some("localhost"));
let messages = result.get_messages().unwrap();
assert_eq!(messages.len(), 1);
let message = messages.first().unwrap();
assert_eq!(message.get_sender(), "tester@localhost");
assert_eq!(message.get_recipients().join(", "), "admin@localhost");
assert_eq!(message.get_data(), "It works!");
assert_eq!(
response,
"220 ready\n\
250 OK\n\
250 OK\n\
250 OK\n\
354 Send message content\n\
250 OK\n\
221 Bye\n"
)
}
}
| 29.661017 | 95 | 0.464571 |
3e76f28f8d32e2d1e997a68035a823c9587f182e | 1,751 | h | C | Pods/MEFoundation/MEFoundation/NSArray+MEExtensions.h | manisha02/MERThumbnailKit | 3312eb2de25dd651637b26b6d06770db819f2771 | [
"MIT"
] | 6 | 2015-02-24T07:07:06.000Z | 2018-04-19T07:56:12.000Z | Pods/MEFoundation/MEFoundation/NSArray+MEExtensions.h | TeamMaestro/MERTwitterKit | 7626600b168f50c77c66e494c4734f889c5a03a2 | [
"MIT"
] | null | null | null | Pods/MEFoundation/MEFoundation/NSArray+MEExtensions.h | TeamMaestro/MERTwitterKit | 7626600b168f50c77c66e494c4734f889c5a03a2 | [
"MIT"
] | 2 | 2016-04-26T16:19:51.000Z | 2020-12-02T09:26:17.000Z | //
// NSArray+MEExtensions.h
// MEFoundation
//
// Created by Joshua Kovach on 4/19/12.
// Copyright (c) 2013 Maestro, LLC. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
@interface NSArray (MEExtensions)
/**
Creates and returns a set from the receiver's objects.
@return The set created from the receiver's objects
*/
- (NSSet *)ME_set;
/**
Creates and returns a mutable set from the receiver's objects.
@return The mutable set created from the receiver's objects
*/
- (NSMutableSet *)ME_mutableSet;
/**
Creates and retuns a new array by shuffling the receiver's objects;
@return The array created by shuffling the receiver's objects
*/
- (NSArray *)ME_shuffledArray;
@end
| 43.775 | 464 | 0.762993 |
d25f8319e09d1d8dc7f796778a7714af53140735 | 682 | php | PHP | tests/R2L/LocaleFileProcessorTest.php | matancohen365/R2L | 5a6ff46a26080d6e96da41614bab12f6f0214987 | [
"MIT"
] | null | null | null | tests/R2L/LocaleFileProcessorTest.php | matancohen365/R2L | 5a6ff46a26080d6e96da41614bab12f6f0214987 | [
"MIT"
] | null | null | null | tests/R2L/LocaleFileProcessorTest.php | matancohen365/R2L | 5a6ff46a26080d6e96da41614bab12f6f0214987 | [
"MIT"
] | null | null | null | <?php
namespace Tests\R2L;
use R2L\LocaleFileProcessor;
use R2L\ProcessorInterface;
/**
* Class LocaleFileProcessorTest
*
* @package R2L
*/
class LocaleFileProcessorTest extends AbstractProcessorTest
{
static public function getProcessor(): ProcessorInterface
{
return new LocaleFileProcessor(
file_get_contents(__DIR__ . './../stubs/template.locale.json.stub')
);
}
public function testProcessing()
{
$contents = file_get_contents(__DIR__ . './../stubs/locale.json.stub');
$result = file_get_contents(__DIR__ . './../stubs/result.locale.json.stub');
self::assertResults($contents, $result);
}
}
| 22 | 84 | 0.670088 |
018ef10fb5e97367a9c1550aa6b74860b7bcb33e | 572 | kt | Kotlin | favorite/src/test/java/com/ridhoafni/favorite/FakeData.kt | ridhoafnidev/codeinmoviedb | 1d22e7b85ce47a4bc034b8cf5e0760b18e44b4f9 | [
"Apache-2.0"
] | 1 | 2021-10-19T23:48:36.000Z | 2021-10-19T23:48:36.000Z | favorite/src/test/java/com/ridhoafni/favorite/FakeData.kt | ridhoafnidev/codeinmoviedb | 1d22e7b85ce47a4bc034b8cf5e0760b18e44b4f9 | [
"Apache-2.0"
] | null | null | null | favorite/src/test/java/com/ridhoafni/favorite/FakeData.kt | ridhoafnidev/codeinmoviedb | 1d22e7b85ce47a4bc034b8cf5e0760b18e44b4f9 | [
"Apache-2.0"
] | null | null | null | package com.ridhoafni.favorite
import com.ridhoafni.core.domain.model.Movie
object FakeData {
fun dummyMovie(): List<Movie> =
listOf(
Movie(
464052,
"Wonder Woman 1984",
"Wonder Woman comes into conflict with the Soviet Union during the Cold War in the 1980s and finds a formidable foe by the name of the Cheetah.",
"/8UlWHLMpgZm9bx6QYh0NFoq67TZ.jpg",
"2020-12-16",
7.4,
"popular",
false
)
)
} | 28.6 | 161 | 0.524476 |
5faa9efc71dd9ab9ab8e5ba8cb7a8684af52882b | 228 | kt | Kotlin | teapot/src/main/java/dev/teapot/contract/coroutines.kt | sgrekov/Teapot | 01724b845aacf0ec0085b47906ceb4041f74b6d9 | [
"Apache-2.0"
] | 21 | 2019-12-24T16:18:05.000Z | 2022-03-22T09:49:10.000Z | teapot/src/main/java/dev/teapot/contract/coroutines.kt | FactoryMarketRetailGmbH/RxElm | 01724b845aacf0ec0085b47906ceb4041f74b6d9 | [
"Apache-2.0"
] | 1 | 2020-02-10T12:33:10.000Z | 2020-02-10T15:15:49.000Z | teapot/src/main/java/dev/teapot/contract/coroutines.kt | FactoryMarketRetailGmbH/RxElm | 01724b845aacf0ec0085b47906ceb4041f74b6d9 | [
"Apache-2.0"
] | 1 | 2019-04-16T20:14:54.000Z | 2019-04-16T20:14:54.000Z | package dev.teapot.contract
import dev.teapot.cmd.Cmd
import dev.teapot.msg.Msg
interface CoroutineFeature<S : State> : Upd<S>, CoroutinesEffectHandler
interface CoroutinesEffectHandler {
suspend fun call(cmd: Cmd): Msg
} | 22.8 | 71 | 0.785088 |
9970b64feea8dfa0740f80eaa6f4f4b5e735d786 | 3,891 | c | C | src/derp.c | Tyler314/led_matrix | 76a78d5117c56126e9f2a898674ac9be90f060e4 | [
"MIT"
] | 3 | 2017-09-18T21:30:51.000Z | 2019-03-11T12:31:26.000Z | src/derp.c | elektrobil/led_matrix | 76a78d5117c56126e9f2a898674ac9be90f060e4 | [
"MIT"
] | 24 | 2017-09-18T17:22:52.000Z | 2018-03-17T19:34:16.000Z | src/derp.c | elektrobil/led_matrix | 76a78d5117c56126e9f2a898674ac9be90f060e4 | [
"MIT"
] | 1 | 2018-10-20T15:01:18.000Z | 2018-10-20T15:01:18.000Z | #include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "py/binary.h"
#include "portmodules.h"
#include <stdio.h>
#include <led.h>
// CLASS BEGIN
// Define variable and function prototypes
const mp_obj_type_t derp_myLEDs_type;
mp_obj_t derp_myLEDs_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args);
STATIC void derp_myLEDs_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind);
// this is the actual C-structure for the object "myLEDs"
typedef struct _derp_myLEDs_obj_t {
// base represents some basic information, like type
mp_obj_base_t base;
// LED number
pyb_led_t led_number;
} derp_myLEDs_obj_t;
// Define the constructor, and print function,
// of the object myLEDs, respectively
mp_obj_t derp_myLEDs_make_new(const mp_obj_type_t *type,
size_t n_args,
size_t n_kw,
const mp_obj_t *args){
// check the numer of arguments (min 1, max 1)
// on an error, raise Python exception
mp_arg_check_num(n_args, n_kw, 1, 1, true);
// create a new object of our C-struct/myLEDs type
derp_myLEDs_obj_t *self = m_new_obj(derp_myLEDs_obj_t);
// give the new object a type
self->base.type = &derp_myLEDs_type;
// set the led_number member with the first argument of the constructor
// self->led_number = mp_obj_get_int(args[0]);
switch(mp_obj_get_int(args[0])) {
case 1:
self->led_number = PYB_LED_RED;
break;
case 2:
self->led_number = PYB_LED_GREEN;
break;
case 3:
self->led_number = PYB_LED_YELLOW;
break;
case 4:
self->led_number = PYB_LED_BLUE;
break;
default:
self->led_number = PYB_LED_RED;
}
// return the object itself
return MP_OBJ_FROM_PTR(self);
}
STATIC void derp_myLEDs_print(const mp_print_t *print,
mp_obj_t self_in,
mp_print_kind_t kind) {
// create a pointer to the C-struct of the oject
derp_myLEDs_obj_t *self = MP_OBJ_TO_PTR(self_in);
// print the number
printf("LED number: %u", self->led_number);
}
STATIC mp_obj_t derp_myLEDs_blink(mp_obj_t self_in){
derp_myLEDs_obj_t *self = MP_OBJ_TO_PTR(self_in);
led_toggle(self->led_number);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_1(derp_myLEDs_blink_obj, derp_myLEDs_blink);
// create the table of global members for the class
STATIC const mp_rom_map_elem_t derp_myLEDs_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_blink), MP_ROM_PTR(&derp_myLEDs_blink_obj) },
};
STATIC MP_DEFINE_CONST_DICT(derp_myLEDs_locals_dict, derp_myLEDs_locals_dict_table);
// create the class-object type
const mp_obj_type_t derp_myLEDs_type = {
// inherit the type "type"
{ &mp_type_type },
// give the type a name
.name = MP_QSTR_myLEDsObj,
// give the type a print function
.print = derp_myLEDs_print,
// give the type a constructor
.make_new = derp_myLEDs_make_new,
// add the global members
.locals_dict = (mp_obj_dict_t*)&derp_myLEDs_locals_dict,
};
// CLASS END
STATIC mp_obj_t derp_printy(void){
printf("Tyler is the coolest.\n");
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(derp_printy_obj, derp_printy);
STATIC const mp_map_elem_t derp_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_derp) },
{ MP_ROM_QSTR(MP_QSTR_printy), (mp_obj_t)&derp_printy_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_myLEDs), (mp_obj_t)&derp_myLEDs_type },
};
STATIC MP_DEFINE_CONST_DICT (
mp_module_derp_globals,
derp_globals_table
);
const mp_obj_module_t mp_module_derp = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_derp_globals,
};
| 33.543103 | 107 | 0.682087 |
7473c12891c117e52aa5eef4bedeaf1e3089b7ee | 61 | rs | Rust | benchmarks/src/lib.rs | hashmismatch/fast-async-mutex | 8ce212f214bc54362922f5e6fe47f96b2055d69c | [
"Apache-2.0",
"MIT"
] | 5 | 2020-09-09T07:43:52.000Z | 2022-02-13T02:47:12.000Z | benchmarks/src/lib.rs | hashmismatch/fast-async-mutex | 8ce212f214bc54362922f5e6fe47f96b2055d69c | [
"Apache-2.0",
"MIT"
] | 1 | 2020-12-06T08:49:55.000Z | 2020-12-06T12:33:19.000Z | benchmarks/src/lib.rs | Mnwa/fast-async-mutex | 8ce212f214bc54362922f5e6fe47f96b2055d69c | [
"Apache-2.0",
"MIT"
] | null | null | null | #![feature(test)]
extern crate test;
mod mutex;
mod rwlock;
| 10.166667 | 18 | 0.704918 |
13506758cd042f796bc510a12af34be289884121 | 2,269 | h | C | RPGPrototype/Source/RPGPrototype/Attribute/PlayerAttributeSet.h | JiaqiJin/RPGPrototype_ue4 | e328798e880089841c0bfea1e25abee045dbf447 | [
"MIT"
] | 1 | 2022-01-07T11:48:03.000Z | 2022-01-07T11:48:03.000Z | RPGPrototype/Source/RPGPrototype/Attribute/PlayerAttributeSet.h | JiaqiJin/RPGPrototype_ue4 | e328798e880089841c0bfea1e25abee045dbf447 | [
"MIT"
] | null | null | null | RPGPrototype/Source/RPGPrototype/Attribute/PlayerAttributeSet.h | JiaqiJin/RPGPrototype_ue4 | e328798e880089841c0bfea1e25abee045dbf447 | [
"MIT"
] | null | null | null | // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "AttributeSet.h"
#include "AbilitySystemComponent.h"
#include "PlayerAttributeSet.generated.h"
// Uses macros from AttributeSet.h
// Automatically generate getter and setter functions for your Attributes.
#define ATTRIBUTE_ACCESSORS(ClassName, PropertyName) \
GAMEPLAYATTRIBUTE_PROPERTY_GETTER(ClassName, PropertyName) \
GAMEPLAYATTRIBUTE_VALUE_GETTER(PropertyName) \
GAMEPLAYATTRIBUTE_VALUE_SETTER(PropertyName) \
GAMEPLAYATTRIBUTE_VALUE_INITTER(PropertyName)
// Player Attribute Set
UCLASS()
class RPGPROTOTYPE_API UPlayerAttributeSet : public UAttributeSet
{
GENERATED_BODY()
public:
UPlayerAttributeSet();
// Respond to changes to an Attribute's CurrentValue before the change happens.
virtual void PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) override;
// Only triggers after changes to the BaseValue of an Attribute from an instant GameplayEffect
virtual void PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data) override;
// Move Speed
UPROPERTY(BlueprintReadOnly, Category = "MoveSpeed")
FGameplayAttributeData MoveSpeed;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, MoveSpeed)
// Health
UPROPERTY(BlueprintReadOnly, Category = "Health")
FGameplayAttributeData Health;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, Health)
UPROPERTY(BlueprintReadOnly, Category = "Health")
FGameplayAttributeData MaxHealth;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, MaxHealth)
// Mana
UPROPERTY(BlueprintReadOnly, Category = "Mana")
FGameplayAttributeData Mana;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, Mana)
UPROPERTY(BlueprintReadOnly, Category = "Mana")
FGameplayAttributeData MaxMana;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, MaxMana)
// Attack
UPROPERTY(BlueprintReadOnly, Category = "Damage")
FGameplayAttributeData AttackPower;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, AttackPower)
UPROPERTY(BlueprintReadOnly, Category = "Damage")
FGameplayAttributeData DefensePower;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, DefensePower)
UPROPERTY(BlueprintReadOnly, Category = "Damage")
FGameplayAttributeData Damage;
ATTRIBUTE_ACCESSORS(UPlayerAttributeSet, Damage)
};
| 33.367647 | 96 | 0.825914 |
2949039ba9aeabb97d980604a6dc086f0c72b4fd | 179 | sql | SQL | postgresql/sql/fetched_rows_ratio.sql | NikolayS/uber-scripts | 6487352c254dbcf83d0b181cb460b56610eb8a71 | [
"MIT"
] | 110 | 2015-01-11T02:29:42.000Z | 2022-03-25T15:01:14.000Z | postgresql/sql/fetched_rows_ratio.sql | gsefanof/uber-scripts | 0d594df3b0dda76d63f2268b4d411cf72a799bf2 | [
"MIT"
] | 1 | 2015-01-29T09:12:03.000Z | 2015-02-26T15:51:01.000Z | postgresql/sql/fetched_rows_ratio.sql | gsefanof/uber-scripts | 0d594df3b0dda76d63f2268b4d411cf72a799bf2 | [
"MIT"
] | 49 | 2015-06-09T12:38:20.000Z | 2022-03-29T18:41:56.000Z | -- show fetched rows ratio, values closer to 100 are better.
SELECT
round(100 * sum(tup_fetched) / sum(tup_fetched + tup_returned), 3) as fetched_ratio
FROM pg_stat_database;
| 35.8 | 87 | 0.759777 |
ddc6384c5b9bafb884f17fb39ec398452afa2a87 | 19,412 | php | PHP | resources/views/home.blade.php | mcmuchenje/foodzw | dcfa5b42bcfdcb42c3f1ad973def2e47816d6fe0 | [
"MIT"
] | null | null | null | resources/views/home.blade.php | mcmuchenje/foodzw | dcfa5b42bcfdcb42c3f1ad973def2e47816d6fe0 | [
"MIT"
] | null | null | null | resources/views/home.blade.php | mcmuchenje/foodzw | dcfa5b42bcfdcb42c3f1ad973def2e47816d6fe0 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="keywords" content="">
<title>SaaS 2 — TheSaaS Sample Demo Landing Page</title>
<!-- Styles -->
<link href="css/page.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- Favicons -->
<link rel="apple-touch-icon" href="../assets/img/apple-touch-icon.png">
<link rel="icon" href="../assets/img/favicon.png">
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark" data-navbar="fixed">
<div class="container">
<div class="navbar-left">
<button class="navbar-toggler" type="button"><span class="navbar-toggler-icon"></span></button>
<a class="navbar-brand" href="#">
<img class="logo-dark" src="../assets/img/logo-dark.png" alt="logo">
<img class="logo-light" src="../assets/img/logo-light.png" alt="logo">
</a>
</div>
<section class="navbar-mobile">
<nav class="nav nav-navbar ml-auto">
<a class="nav-link" href="#home">Home</a>
<a class="nav-link" href="#section-features">Features</a>
<a class="nav-link" href="#section-pricing">Pricing</a>
<a class="nav-link" href="#section-faq">FAQ</a>
<a class="nav-link" href="#footer">Contact</a>
</nav>
</section>
</div>
</nav><!-- /.navbar -->
<!-- Header -->
<header id="home" class="header" style="background-image: linear-gradient(150deg, #fdfbfb 0%, #eee 100%);">
<div class="container">
<div class="row align-items-center h-100">
<div class="col-lg-5">
<h1 class="display-4"><strong>TheSaaS</strong>;<br>Where Work happens</h1>
<p class="lead mt-5">Whatever work means for you, TheSaaS brings all the pieces and people you need together so you can actually get things done.</p>
<hr class="w-10 ml-0 my-7">
<p class="gap-xy">
<a class="btn btn-lg btn-round btn-success mw-200" href="#section-pricing">Get Started</a>
<a class="btn btn-lg btn-round btn-outline-success mw-200" href="#section-features">Features</a>
</p>
</div>
<div class="col-lg-6 ml-auto">
<div class="video-wrapper ratio-16x9 rounded shadow-6 mt-8 mt-lg-0">
<div class="poster" style="background-image: url(../assets/img/preview/shot-1.png)"></div>
<button class="btn btn-circle btn-lg btn-info"><i class="fa fa-play"></i></button>
<iframe width="560" height="315" src="https://www.youtube.com/embed/M5S_JBRjd1s?rel=0&showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
</div>
</div>
</div>
</div>
</header><!-- /.header -->
<!-- Main Content -->
<main class="main-content">
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| Features
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<section id="section-features" class="section">
<div class="container">
<header class="section-header">
<small>Feature</small>
<h2>Team communication for the 21st century.</h2>
<hr>
</header>
<div class="row gap-y align-items-center">
<div class="col-md-6 ml-auto">
<h4>Drag, drop, and share your files.</h4>
<p>Not just your messages, but all your files, images, PDFs, documents, and spreadsheets can be dropped right into TheSaaS and shared with anyone you want. Add comments, star for later reference, and it’s all completely searchable.</p>
<p>If you use any services like Google Drive, Dropbox, or Box, just paste the link and that document is immediately in sync and searchable too.</p>
</div>
<div class="col-md-5 order-md-first">
<img src="../assets/img/vector/10.png" alt="...">
</div>
</div>
<hr class="my-8">
<div class="row gap-y align-items-center">
<div class="col-md-6 mr-auto">
<h4>Works everywhere you go</h4>
<p>Everything in TheSaaS—messages, notifications, files, and all—is automatically indexed and archived so that you can have it at your fingertips whenever you want. TheSaaS also indexes the content of every file so you can search within PDFs, Word documents, Google docs, and more. With one search box and a set of powerful search operators, you can slice and dice your way to that one message in your communication haystack.</p>
</div>
<div class="col-md-5">
<img src="../assets/img/vector/11.png" alt="...">
</div>
</div>
<hr class="my-8">
<div class="row gap-y align-items-center">
<div class="col-md-6 ml-auto">
<h4>All your tools in one place.</h4>
<p>Connect all the tools you use to TheSaaS and avoid all that constant switching between apps. Set up your integration so that you get all your notifications directly within TheSaaS—from support requests, code check-ins, and error logs to sales leads—all of them searchable in one central archive.</p>
<p>If you use any services like Google Drive, Dropbox, or Box, just paste the link and that document is immediately in sync and searchable too.</p>
</div>
<div class="col-md-5 order-md-first">
<img src="../assets/img/vector/12.png" alt="...">
</div>
</div>
</div>
</section>
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| Features
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<section class="section bg-gray">
<div class="container">
<div class="row gap-y">
<div class="col-lg-4">
<div class="card card-body border text-center">
<p class="my-5"><i class="icon-layers lead-8 text-lighter"></i></p>
<h5>Channels</h5>
<p>Organize your team conversations in open channels. Make a channel for a project, a team, or everyone has a transparent view.</p>
<p><a class="small-3 fw-600" href="#">Read more <i class="fa fa-angle-right small-5 pl-1"></i></a></p>
</div>
</div>
<div class="col-lg-4">
<div class="card card-body border text-center">
<p class="my-5"><i class="icon-chat lead-8 text-lighter"></i></p>
<h5>Direct Messages</h5>
<p>Send messages directly to another and any person or to a small group of people for more focused conversations.</p>
<p><a class="small-3 fw-600" href="#">Read more <i class="fa fa-angle-right small-5 pl-1"></i></a></p>
</div>
</div>
<div class="col-lg-4">
<div class="card card-body border text-center">
<p class="my-5"><i class="icon-mic lead-8 text-lighter"></i></p>
<h5>Calls</h5>
<p>Take a conversation from typing to face-to-face by starting a TheSaaS voice or video call in any Channel or Direct Message.</p>
<p><a class="small-3 fw-600" href="#">Read more <i class="fa fa-angle-right small-5 pl-1"></i></a></p>
</div>
</div>
</div>
</div>
</section>
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| CTA
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<section class="section text-center">
<div class="container">
<div class="row">
<div class="col-md-6 mx-auto">
<p><img src="../assets/img/vector/13.png" alt="..."></p>
<br>
<h3 class="mb-6"><strong>Reclaim your workday</strong></h3>
<p class="lead text-muted">Less email. More productive. Our customers see an average 48.6% reduction in internal email, helping them enjoy a simpler, more pleasant, and more productive work life.</p>
<br>
<a class="btn btn-lg btn-round btn-success px-7" href="#">Start now</a>
</div>
</div>
</div>
</section>
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| Pricing
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<section id="section-pricing" class="section bg-gray">
<div class="container">
<header class="section-header">
<h2>Affordable Pricing</h2>
<hr>
<p class="lead">TheSaaS for Teams is a single workspace for your small- to medium-sized company or team.</p>
</header>
<div class="text-center my-7">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-round btn-outline-dark w-150 active">
<input type="radio" name="pricing" value="monthly" autocomplete="off" checked> Monthly
</label>
<label class="btn btn-round btn-outline-dark w-150">
<input type="radio" name="pricing" value="yearly" autocomplete="off"> Yearly
</label>
</div>
</div>
<div class="row gap-y text-center">
<div class="col-md-4">
<div class="pricing-1">
<p class="plan-name">Free</p>
<br>
<h2 class="price">free</h2>
<p class="small text-lighter">Forever!</p>
<div class="text-muted">
<small>Searchable messages up to 10K</small><br>
<small>10 apps or service integrations</small><br>
<small>5GB total file storage for the team</small><br>
</div>
<br>
<p class="text-center py-3">
<a class="btn btn-outline-primary" href="#">Get started</a>
</p>
</div>
</div>
<div class="col-md-4">
<div class="pricing-1 popular">
<p class="plan-name">Standard</p>
<br>
<h2 class="price text-success">
<span class="price-unit">$</span>
<span data-bind-radio="pricing" data-monthly="6.67" data-yearly="75">6.67</span>
</h2>
<p class="small text-lighter">
Per user/
<span data-bind-radio="pricing" data-monthly="month" data-yearly="year">month</span>
</p>
<div class="text-muted">
<small>Unlimited searchable message archives</small><br>
<small>Unlimited apps and service integrations</small><br>
<small>10GB file storage per team member</small><br>
</div>
<br>
<p class="text-center py-3">
<a class="btn btn-success" href="#" data-bind-href="pricing" data-monthly="#monthly" data-yearly="#yearly">Get started</a>
</p>
</div>
</div>
<div class="col-md-4">
<div class="pricing-1">
<p class="plan-name">Plus</p>
<br>
<h2 class="price">
<span class="price-unit">$</span>
<span data-bind-radio="pricing" data-monthly="12.5" data-yearly="120">12.5</span>
</h2>
<p class="small text-lighter">
Per user/
<span data-bind-radio="pricing" data-monthly="month" data-yearly="year">month</span>
</p>
<div class="text-muted">
<small>Everything in Free & Standard, and</small><br>
<small>SAML-based single sign-on (SSO)</small><br>
<small>Compliance Exports of all messages</small><br>
</div>
<br>
<p class="text-center py-3">
<a class="btn btn-outline-primary" href="#" data-bind-href="pricing" data-monthly="#monthly" data-yearly="#yearly">Get started</a>
</p>
</div>
</div>
</div>
</div>
</section>
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| Partner
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<section class="section bg-gray py-6">
<div class="container">
<div class="partner partner-sm">
<img src="../assets/img/partner/1.png" alt="partner 1">
<img src="../assets/img/partner/2.png" alt="partner 2">
<img src="../assets/img/partner/3.png" alt="partner 3">
<img src="../assets/img/partner/4.png" alt="partner 4">
<img src="../assets/img/partner/5.png" alt="partner 5">
<img src="../assets/img/partner/6.png" alt="partner 6">
</div>
</div>
</section>
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| FAQ
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<section id="section-faq" class="section">
<div class="container">
<header class="section-header">
<small>FAQ</small>
<h2>Frequently Asked Questions</h2>
<hr>
<p>Got a question? We've got answers. If you have some other questions, contact us using email.</p>
</header>
<div class="row gap-y">
<div class="col-md-6 col-xl-4">
<h5>Is this a secure site for purchases?</h5>
<p>Absolutely! We work with top payment companies which guarantees your safety and security. All billing information is stored on our payment processing partner which has the most stringent level of certification available in the payments industry.</p>
</div>
<div class="col-md-6 col-xl-4">
<h5>Can I cancel my subscription?</h5>
<p>You can cancel your subscription anytime in your account. Once the subscription is cancelled, you will not be charged next month. You will continue to have access to your account until your current subscription expires.</p>
</div>
<div class="col-md-6 col-xl-4">
<h5>How long are your contracts?</h5>
<p>Currently, we only offer monthly subscription. You can upgrade or cancel your monthly account at any time with no further obligation.</p>
</div>
<div class="col-md-6 col-xl-4">
<h5>Can I update my card details?</h5>
<p>Yes. Go to the billing section of your dashboard and update your payment information.</p>
</div>
<div class="col-md-6 col-xl-4">
<h5>Can I request refund?</h5>
<p>Unfortunately, not. We do not issue full or partial refunds for any reason.</p>
</div>
<div class="col-md-6 col-xl-4">
<h5>Can I try your service for free?</h5>
<p>Of course! We’re happy to offer a free plan to anyone who wants to try our service.</p>
</div>
</div>
</div>
</section>
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| Subscribe
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<section class="section py-10" style="background-image: url(../assets/img/bg/4.jpg)">
<div class="container">
<div class="row">
<div class="col-md-8 col-xl-6 mx-auto">
<div class="section-dialog bg-primary text-white shadow-6">
<h4>Latest news direct to your inbox</h4>
<br><br>
<p class="text-right small pr-5">Subscribe Now</p>
<form class="input-glass input-round" action="" method="post" target="_blank">
<div class="input-group">
<input type="text" name="EMAIL" class="form-control" placeholder="Enter Email Address">
<span class="input-group-append">
<button class="btn btn-glass btn-light" type="button">Sign up <i class="ti-arrow-right fs-9 ml-2"></i></button>
</span>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer id="footer" class="footer py-9">
<div class="container">
<div class="row gap-y">
<div class="col-xl-4 order-md-last">
<h6 class="mb-4"><strong>Get Started</strong></h6>
<p>Form so, head allowed how found at right, chosen put sad. Copy of field phase offers texts. Great family there first about that.</p>
<a class="btn btn-primary mr-2" href="#">Start trial</a>
<a class="btn btn-secondary" href="#">Contact</a>
</div>
<div class="col-6 col-md-4 col-xl-2">
<h6 class="mb-4"><strong>Product</strong></h6>
<div class="nav flex-column">
<a class="nav-link" href="#">Features</a>
<a class="nav-link" href="#">Pricing</a>
<a class="nav-link" href="#">Security</a>
<a class="nav-link" href="#">Help</a>
<a class="nav-link" href="#">Success Story</a>
</div>
</div>
<div class="col-6 col-md-4 col-xl-2">
<h6 class="mb-4"><strong>Company</strong></h6>
<div class="nav flex-column">
<a class="nav-link" href="#">About</a>
<a class="nav-link" href="#">Blog</a>
<a class="nav-link" href="#">Press</a>
<a class="nav-link" href="#">Policy</a>
<a class="nav-link" href="#">Contact</a>
</div>
</div>
<div class="col-xl-4 order-md-first">
<h6 class="mb-4"><strong>We Are Awesome</strong></h6>
<p>We’re a team of experienced designers and developers. We can combine beautiful, modern designs with clean, functional and high-performance code to produce stunning websites.</p>
<small class="opacity-70">© 2020 TheThemeio. All rights reserved.</small>
</div>
</div>
</div>
</footer><!-- /.footer -->
<!-- Scroll top -->
<button class="btn btn-circle btn-primary scroll-top"><i class="fa fa-angle-up"></i></button>
<!-- Scripts -->
<script src="../assets/js/page.min.js"></script>
<script src="../assets/js/script.js"></script>
</body>
</html>
| 40.107438 | 443 | 0.498867 |
1234e8580c02c9e15af092887e135594e05a8914 | 17,515 | c | C | llvm/tools/clang/test/OpenMP/atomic_messages.c | NoamDev/TON-Compiler | f76aa2084c7f09a228afef4a6e073c37b350c8f3 | [
"Apache-2.0"
] | 171 | 2018-09-17T13:15:12.000Z | 2022-03-18T03:47:04.000Z | llvm/tools/clang/test/OpenMP/atomic_messages.c | NoamDev/TON-Compiler | f76aa2084c7f09a228afef4a6e073c37b350c8f3 | [
"Apache-2.0"
] | 51 | 2019-10-23T11:55:08.000Z | 2021-12-21T06:32:11.000Z | llvm/tools/clang/test/OpenMP/atomic_messages.c | NoamDev/TON-Compiler | f76aa2084c7f09a228afef4a6e073c37b350c8f3 | [
"Apache-2.0"
] | 55 | 2018-02-01T07:11:49.000Z | 2022-03-04T01:20:23.000Z | // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
int foo() {
L1:
foo();
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected an expression statement}}
{
foo();
goto L1; // expected-error {{use of undeclared label 'L1'}}
}
goto L2; // expected-error {{use of undeclared label 'L2'}}
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected an expression statement}}
{
foo();
L2:
foo();
}
return 0;
}
struct S {
int a;
};
int readint() {
int a = 0, b = 0;
// Test for atomic read
#pragma omp atomic read
// expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
// expected-note@+1 {{expected an expression statement}}
;
#pragma omp atomic read
// expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
// expected-note@+1 {{expected built-in assignment operator}}
foo();
#pragma omp atomic read
// expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
// expected-note@+1 {{expected built-in assignment operator}}
a += b;
#pragma omp atomic read
// expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
// expected-note@+1 {{expected lvalue expression}}
a = 0;
#pragma omp atomic read
a = b;
// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'read' clause}}
#pragma omp atomic read read
a = b;
return 0;
}
int readS() {
struct S a, b;
// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'read' clause}}
#pragma omp atomic read read
// expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}}
// expected-note@+1 {{expected expression of scalar type}}
a = b;
return a.a;
}
int writeint() {
int a = 0, b = 0;
// Test for atomic write
#pragma omp atomic write
// expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}}
// expected-note@+1 {{expected an expression statement}}
;
#pragma omp atomic write
// expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}}
// expected-note@+1 {{expected built-in assignment operator}}
foo();
#pragma omp atomic write
// expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}}
// expected-note@+1 {{expected built-in assignment operator}}
a += b;
#pragma omp atomic write
a = 0;
#pragma omp atomic write
a = b;
// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'write' clause}}
#pragma omp atomic write write
a = b;
return 0;
}
int writeS() {
struct S a, b;
// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'write' clause}}
#pragma omp atomic write write
// expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}}
// expected-note@+1 {{expected expression of scalar type}}
a = b;
return a.a;
}
int updateint() {
int a = 0, b = 0;
// Test for atomic update
#pragma omp atomic update
// expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected an expression statement}}
;
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected built-in binary or unary operator}}
foo();
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected built-in binary operator}}
a = b;
#pragma omp atomic update
// expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected one of '+', '*', '-', '/', '&', '^', '|', '<<', or '>>' built-in operations}}
a = b || a;
#pragma omp atomic update
// expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected one of '+', '*', '-', '/', '&', '^', '|', '<<', or '>>' built-in operations}}
a = a && b;
#pragma omp atomic update
// expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected in right hand side of expression}}
a = (float)a + b;
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected in right hand side of expression}}
a = 2 * b;
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected in right hand side of expression}}
a = b + *&a;
#pragma omp atomic update
*&a = *&a + 2;
#pragma omp atomic update
a++;
#pragma omp atomic
++a;
#pragma omp atomic update
a--;
#pragma omp atomic
--a;
#pragma omp atomic update
a += b;
#pragma omp atomic
a %= b;
#pragma omp atomic update
a *= b;
#pragma omp atomic
a -= b;
#pragma omp atomic update
a /= b;
#pragma omp atomic
a &= b;
#pragma omp atomic update
a ^= b;
#pragma omp atomic
a |= b;
#pragma omp atomic update
a <<= b;
#pragma omp atomic
a >>= b;
#pragma omp atomic update
a = b + a;
#pragma omp atomic
a = a * b;
#pragma omp atomic update
a = b - a;
#pragma omp atomic
a = a / b;
#pragma omp atomic update
a = b & a;
#pragma omp atomic
a = a ^ b;
#pragma omp atomic update
a = b | a;
#pragma omp atomic
a = a << b;
#pragma omp atomic
a = b >> a;
// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'update' clause}}
#pragma omp atomic update update
a /= b;
return 0;
}
int captureint() {
int a = 0, b = 0, c = 0;
// Test for atomic capture
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected compound statement}}
;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected assignment expression}}
foo();
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected built-in binary or unary operator}}
a = b;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected assignment expression}}
a = b || a;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected one of '+', '*', '-', '/', '&', '^', '|', '<<', or '>>' built-in operations}}
b = a = a && b;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected assignment expression}}
a = (float)a + b;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected assignment expression}}
a = 2 * b;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected assignment expression}}
a = b + *&a;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected exactly two expression statements}}
{ a = b; }
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected exactly two expression statements}}
{}
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected in right hand side of the first expression}}
{a = b;a = b;}
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}}
// expected-note@+1 {{expected in right hand side of the first expression}}
{a = b; a = b || a;}
#pragma omp atomic capture
{b = a; a = a && b;}
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected in right hand side of expression}}
b = a = (float)a + b;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected in right hand side of expression}}
b = a = 2 * b;
#pragma omp atomic capture
// expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}}
// expected-note@+1 {{expected in right hand side of expression}}
b = a = b + *&a;
#pragma omp atomic capture
c = *&a = *&a + 2;
#pragma omp atomic capture
c = a++;
#pragma omp atomic capture
c = ++a;
#pragma omp atomic capture
c = a--;
#pragma omp atomic capture
c = --a;
#pragma omp atomic capture
c = a += b;
#pragma omp atomic capture
c = a %= b;
#pragma omp atomic capture
c = a *= b;
#pragma omp atomic capture
c = a -= b;
#pragma omp atomic capture
c = a /= b;
#pragma omp atomic capture
c = a &= b;
#pragma omp atomic capture
c = a ^= b;
#pragma omp atomic capture
c = a |= b;
#pragma omp atomic capture
c = a <<= b;
#pragma omp atomic capture
c = a >>= b;
#pragma omp atomic capture
c = a = b + a;
#pragma omp atomic capture
c = a = a * b;
#pragma omp atomic capture
c = a = b - a;
#pragma omp atomic capture
c = a = a / b;
#pragma omp atomic capture
c = a = b & a;
#pragma omp atomic capture
c = a = a ^ b;
#pragma omp atomic capture
c = a = b | a;
#pragma omp atomic capture
c = a = a << b;
#pragma omp atomic capture
c = a = b >> a;
#pragma omp atomic capture
{ c = *&a; *&a = *&a + 2;}
#pragma omp atomic capture
{ *&a = *&a + 2; c = *&a;}
#pragma omp atomic capture
{c = a; a++;}
#pragma omp atomic capture
{c = a; (a)++;}
#pragma omp atomic capture
{++a;c = a;}
#pragma omp atomic capture
{c = a;a--;}
#pragma omp atomic capture
{--a;c = a;}
#pragma omp atomic capture
{c = a; a += b;}
#pragma omp atomic capture
{c = a; (a) += b;}
#pragma omp atomic capture
{a %= b; c = a;}
#pragma omp atomic capture
{c = a; a *= b;}
#pragma omp atomic capture
{a -= b;c = a;}
#pragma omp atomic capture
{c = a; a /= b;}
#pragma omp atomic capture
{a &= b; c = a;}
#pragma omp atomic capture
{c = a; a ^= b;}
#pragma omp atomic capture
{a |= b; c = a;}
#pragma omp atomic capture
{c = a; a <<= b;}
#pragma omp atomic capture
{a >>= b; c = a;}
#pragma omp atomic capture
{c = a; a = b + a;}
#pragma omp atomic capture
{a = a * b; c = a;}
#pragma omp atomic capture
{c = a; a = b - a;}
#pragma omp atomic capture
{a = a / b; c = a;}
#pragma omp atomic capture
{c = a; a = b & a;}
#pragma omp atomic capture
{a = a ^ b; c = a;}
#pragma omp atomic capture
{c = a; a = b | a;}
#pragma omp atomic capture
{a = a << b; c = a;}
#pragma omp atomic capture
{c = a; a = b >> a;}
#pragma omp atomic capture
{c = a; a = foo();}
// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'capture' clause}}
#pragma omp atomic capture capture
b = a /= b;
return 0;
}
| 46.831551 | 481 | 0.603711 |
5bdd38874ddb2d3a7f8ea2cd2b1d97f1ada06725 | 242 | h | C | BuDeJie/Macro/LFColor.h | liufeng-working/BuDeJie | 5cf8bace71b072e5080043a09d2a93fca2c37339 | [
"MIT"
] | null | null | null | BuDeJie/Macro/LFColor.h | liufeng-working/BuDeJie | 5cf8bace71b072e5080043a09d2a93fca2c37339 | [
"MIT"
] | null | null | null | BuDeJie/Macro/LFColor.h | liufeng-working/BuDeJie | 5cf8bace71b072e5080043a09d2a93fca2c37339 | [
"MIT"
] | null | null | null | //
// LFColor.h
//
// Created by 刘丰 on 2017/5/26.
// Copyright © 2017年 liufeng. All rights reserved.
//
#ifndef LFColor_h
#define LFColor_h
#define lf_refreshFontColor [UIColor colorWithHexString:@"#989898"]//灰色
#endif /* LFColor_h */
| 16.133333 | 71 | 0.694215 |
f0500ba9ffaf2976d54c15fd029a5d3028d83775 | 5,147 | kt | Kotlin | src/test/kotlin/com/github/gimme/perfi/commands/MortgageCommandTest.kt | Gimme/perfi-bot | d8411120522654418c9f334c682b5ff335aecb16 | [
"MIT"
] | null | null | null | src/test/kotlin/com/github/gimme/perfi/commands/MortgageCommandTest.kt | Gimme/perfi-bot | d8411120522654418c9f334c682b5ff335aecb16 | [
"MIT"
] | null | null | null | src/test/kotlin/com/github/gimme/perfi/commands/MortgageCommandTest.kt | Gimme/perfi-bot | d8411120522654418c9f334c682b5ff335aecb16 | [
"MIT"
] | null | null | null | package com.github.gimme.perfi.commands
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import java.util.stream.Stream
class MortgageCommandTest {
private val command = MortgageCommand()
companion object {
@JvmStatic
private fun inputProvider() = Stream.of(
Input(1000, 1, expectedPayment = 12000),
Input(8500, 1, expectedPayment = 102000),
Input(8500, 2, expectedPayment = 204000),
Input(0, 1, 1000000, 8, 8, 100, 10, 0, expectedPayment = 100000),
Input(3, 0, 1000, 0, 8, 100, 0, expectedPayment = 0),
Input(3, 1, 1000, 0, 8, 100, 0, 1, expectedPayment = 46),
Input(3, 3, 1000, 0, 8, 100, 0, 1, expectedPayment = 138),
Input(0, 0.08, 1000000, 0, 8, 100, 0, 1.5, expectedPayment = 1250),
Input(0, 0.17, 1000000, 0, 8, 100, 0, 1.5, expectedPayment = 2500),
Input(0, 0.08, 1000000, 0, 8, 100, 3, 0, expectedPayment = 2500),
Input(0, 0.17, 1000000, 0, 8, 100, 3, 0, expectedPayment = 5000),
Input(0, 0.08, 1000000, 0, 8, 100, 3, 1.5, expectedPayment = 3750.0),
Input(0, 0.17, 1000000, 0, 8, 100, 3, 1.5, expectedPayment = 7496.875),
Input(1000, 0.17, 1000000, 0, 8, 100, 3, 1.5, expectedPayment = 9496.875),
Input(0, 0.17, 240000, 0, 8, 100, 10, 5, expectedPayment = 5991.6667),
// Investment Loss
Input(0, 1.00, 1000000, 0, 0, 100, 12, 0, expectedRevenue = 0),
Input(0, 0.08, 1000000, 0, 10, 100, 12, 12, expectedRevenue = -10000),
Input(0, 0.17, 1000000, 0, 10, 100, 12, 0, expectedRevenue = -79.7414),
Input(1000, 0.08, 0, 0, 10, 0, 0, 0, expectedRevenue = -1007.97414),
Input(1000, 0.08, 1000000, 0, 10, 100, 0, 12, expectedRevenue = -11007.97414),
Input(1000, 0.08, 1000000, 0, 10, 100, 12, 12, expectedRevenue = -11007.97414),
Input(1000, 0.17, 1000000, 0, 10, 100, 12, 12, expectedRevenue = (-21007.97414) * 1.00797414 - 1007.97414 - 9900 + 10000),
Input(0, 0.08, 1000, 10, 0, 0, 0, 0, expectedRevenue = -992.02586)
)
}
data class Input(
val rent: Number,
val durationYears: Number,
val propertyValue: Number = 0,
val propertyReturnPercent: Number = 0,
val marketReturnPercent: Number = 8,
val loanPercent: Number = 85,
val loanAmortizationPercent: Number = 2,
val loanInterestPercent: Number = 1.5,
val expectedPayment: Number? = null,
val expectedRevenue: Number? = null,
)
@ParameterizedTest
@MethodSource("inputProvider")
fun `should calculate mortgage costs`(data: Input) {
val result = command.execute(
data.durationYears.toDouble(),
data.rent.toDouble(),
data.propertyValue.toDouble(),
data.propertyReturnPercent.toDouble(),
data.marketReturnPercent.toDouble(),
data.loanPercent.toDouble(),
data.loanAmortizationPercent.toDouble(),
data.loanInterestPercent.toDouble(),
)
assert(data.expectedPayment != null || data.expectedRevenue != null)
val delta = 0.0001
data.expectedPayment?.let { assertEquals(it.toDouble(), result.totalPayment, delta) }
data.expectedRevenue?.let { assertEquals(it.toDouble(), result.totalRevenue, delta) }
}
@Test
fun `given total cost should calculate average monthly cost`() {
val result = command.execute(1.0, 1000.0, marketReturnPercent = 0.0)
assertEquals(12000.0, result.totalPayment)
assertEquals(-12000.0, result.totalRevenue)
assertEquals(1000.0, result.averageMonthlyPayment)
assertEquals(-1000.0, result.averageMonthlyRevenue)
}
@Test
fun `test input should have same defaults as command`() {
val data1 = Input(0, 0)
assertEquals(command.execute(0.0, 0.0),
command.execute(
data1.durationYears.toDouble(),
data1.rent.toDouble(),
data1.propertyValue.toDouble(),
data1.propertyReturnPercent.toDouble(),
data1.marketReturnPercent.toDouble(),
data1.loanPercent.toDouble(),
data1.loanAmortizationPercent.toDouble(),
data1.loanInterestPercent.toDouble(),
))
val data2 = Input(100, 1, loanPercent = 1000)
assertEquals(command.execute(1.0, 100.0, loanPercent = 1000.0),
command.execute(
data2.durationYears.toDouble(),
data2.rent.toDouble(),
data2.propertyValue.toDouble(),
data2.propertyReturnPercent.toDouble(),
data2.marketReturnPercent.toDouble(),
data2.loanPercent.toDouble(),
data2.loanAmortizationPercent.toDouble(),
data2.loanInterestPercent.toDouble(),
))
}
}
| 40.527559 | 134 | 0.595298 |
c674a9c77608f7568bbb8dc485e4bc3273ebc65e | 70 | rb | Ruby | lib/pg_nice_cluster.rb | adjust/pg_nice_cluster | e5b3cf40cf47e50047ce2b46a2f7787e498a0c1b | [
"MIT"
] | null | null | null | lib/pg_nice_cluster.rb | adjust/pg_nice_cluster | e5b3cf40cf47e50047ce2b46a2f7787e498a0c1b | [
"MIT"
] | null | null | null | lib/pg_nice_cluster.rb | adjust/pg_nice_cluster | e5b3cf40cf47e50047ce2b46a2f7787e498a0c1b | [
"MIT"
] | 1 | 2021-11-01T10:40:44.000Z | 2021-11-01T10:40:44.000Z | require "pg_nice_cluster/version"
require 'pg_nice_cluster/optimizer'
| 23.333333 | 35 | 0.857143 |
b64de0fc44e9aedbd2e37adce4f14c9abe67fd16 | 45 | rb | Ruby | app/formatters/credit_agreement/valid_from_formatter.rb | tamaloa/kavau | 15d0487043177c88a0c89612a09579fd020ab1cc | [
"MIT"
] | 3 | 2016-04-28T09:08:58.000Z | 2017-03-10T18:56:56.000Z | app/formatters/credit_agreement/valid_from_formatter.rb | CollegiumAcademicum/kavau | 5cb48749573f48f3adc36983b29874ccfeadad52 | [
"MIT"
] | 9 | 2016-06-07T09:56:10.000Z | 2022-03-30T23:04:17.000Z | app/formatters/credit_agreement/valid_from_formatter.rb | CollegiumAcademicum/kavau | 5cb48749573f48f3adc36983b29874ccfeadad52 | [
"MIT"
] | 5 | 2016-02-22T12:29:52.000Z | 2019-09-15T11:37:25.000Z | class ValidFromFormatter < DateFormatter
end
| 15 | 40 | 0.866667 |
664d5fa13920377a87861abdf6b5e594adca3306 | 738 | sql | SQL | t_station_img.sql | zjyww/admin-demo | 26088714fb2270f8bd115f42b96d16629bcdc5ae | [
"Apache-2.0"
] | null | null | null | t_station_img.sql | zjyww/admin-demo | 26088714fb2270f8bd115f42b96d16629bcdc5ae | [
"Apache-2.0"
] | null | null | null | t_station_img.sql | zjyww/admin-demo | 26088714fb2270f8bd115f42b96d16629bcdc5ae | [
"Apache-2.0"
] | null | null | null | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50624
Source Host : localhost:3306
Source Database : bz
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2016-07-21 20:53:23
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for t_station_img
-- ----------------------------
DROP TABLE IF EXISTS `t_station_img`;
CREATE TABLE `t_station_img` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(2) NOT NULL COMMENT '类型 1合同 2凭证',
`path` varchar(256) DEFAULT NULL,
`name` varchar(256) DEFAULT NULL,
`stationId` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
| 24.6 | 50 | 0.639566 |
5f9ee3b16e3a498d99c9e578ffe583abbb71621f | 1,738 | css | CSS | www/css/photoGridS.css | yebeman/NetworkingSite | 083e8414d47aaa345f3a1cf2601712c64a0ee905 | [
"BSD-2-Clause"
] | null | null | null | www/css/photoGridS.css | yebeman/NetworkingSite | 083e8414d47aaa345f3a1cf2601712c64a0ee905 | [
"BSD-2-Clause"
] | null | null | null | www/css/photoGridS.css | yebeman/NetworkingSite | 083e8414d47aaa345f3a1cf2601712c64a0ee905 | [
"BSD-2-Clause"
] | null | null | null | ul.parrent {
position: relative;
padding: 0;
list-style: none;
margin: 20px auto 0;
width: 890px;
}
ul.parrent li {
float: left;
margin: 0px 5px 10px 5px;
border: 1px double #ddd;
background-color: #eee;
}
ul.parrent li img {
width: 200px;
height: 150px;
cursor: pointer;
}
ul.parrent li a {
display: block;
cursor: default;
}
ul.child {
position: relative;
padding: 0;
list-style: none;
text-align: left;
}
ul.child li {
border: none;
float: right;
display: inline;
font: 12px Times;
line-height: 1;
margin-bottom: 3px;
}
ul.child li.views {
color: #666;
margin-left: 0px;
border-left: medium none;
padding-left: 18px;
background-repeat: no-repeat;
background-position: 0px 50%;
background-image: url("../images/views.png");
}
ul.child li.likes a {
color: #666;
padding-left: 15px;
text-decoration: none;
background-repeat: no-repeat;
background-image: url("../images/heartS0.png");
cursor: pointer;
}
ul.child li.likes a:hover {
background-image: url("../images/heartS.png");
}
ul.child li.cmts a {
color: #666;
padding-left: 15px;
text-decoration: none;
background-repeat: no-repeat;
background-position: 0px 0px;
background-image: url("../images/commentS0.png");
cursor: pointer;
}
ul.child li.cmts a:hover {
background-image: url("../images/commentS.png");
}
.viewport a span {
display: none;
padding-left: 5px;
word-break: break-all;
font: 15px Times;
width: 195px;
height: auto;
max-height: 130px;
position: absolute;
text-align: left;
text-decoration: none;
z-index: 100;
}
.dark-background {
background-color: rgba(15, 15, 15, 0.6);
color: #fff;
text-shadow: #000 0px 0px 20px;
}
| 19.75 | 51 | 0.652474 |
f0866351e30dfe6a21fbdfc5f89a89cc786a5615 | 172 | js | JavaScript | Famcy/static/js/line_chart.js | nexuni/Famcy | 80f8f18fe1614ab3c203ca3466b9506b494470bf | [
"Apache-2.0"
] | null | null | null | Famcy/static/js/line_chart.js | nexuni/Famcy | 80f8f18fe1614ab3c203ca3466b9506b494470bf | [
"Apache-2.0"
] | 12 | 2022-02-05T04:56:44.000Z | 2022-03-30T09:59:26.000Z | Famcy/static/js/line_chart.js | nexuni/Famcy | 80f8f18fe1614ab3c203ca3466b9506b494470bf | [
"Apache-2.0"
] | null | null | null | function generateLineChart(ident, data_list, title) {
var data = data_list;
var layout = {
title: title
};
Plotly.newPlot(ident.toString(), data, layout);
} | 15.636364 | 53 | 0.668605 |
2025672a9f2ce120c4c506aef765f2f20ca326aa | 232 | css | CSS | web/app/themes/sage/resources/style.css | DiachukRoma/stand-with-ukraine | 2e1029eb377ae4c37a3383a7c45cacdcc165c3e2 | [
"MIT"
] | 1 | 2022-03-15T10:31:18.000Z | 2022-03-15T10:31:18.000Z | web/app/themes/sage/resources/style.css | DiachukRoma/stand-with-ukraine | 2e1029eb377ae4c37a3383a7c45cacdcc165c3e2 | [
"MIT"
] | null | null | null | web/app/themes/sage/resources/style.css | DiachukRoma/stand-with-ukraine | 2e1029eb377ae4c37a3383a7c45cacdcc165c3e2 | [
"MIT"
] | null | null | null | /*
Theme Name: Stand With Ukraine
Theme URI: #
Description: created special by Stand With Ukraine
Version: 1.0.0
Author: Diachuk R.M.
Author URI: #
Text Domain: sage
*/
| 23.2 | 58 | 0.534483 |
0ebd5746f1c98147e1573c2e2e4df088a7741ff9 | 3,042 | tsx | TypeScript | coffee-chats/src/main/webapp/src/components/NavBar.tsx | googleinterns/step250-2020 | 055b00a2596d084564f9fd48a12946075b6d273a | [
"Apache-2.0"
] | 3 | 2020-07-13T09:19:43.000Z | 2020-08-10T12:01:55.000Z | coffee-chats/src/main/webapp/src/components/NavBar.tsx | googleinterns/step250-2020 | 055b00a2596d084564f9fd48a12946075b6d273a | [
"Apache-2.0"
] | 6 | 2020-08-11T16:03:58.000Z | 2022-02-13T19:33:38.000Z | coffee-chats/src/main/webapp/src/components/NavBar.tsx | googleinterns/step250-2020 | 055b00a2596d084564f9fd48a12946075b6d273a | [
"Apache-2.0"
] | null | null | null | import React from "react";
import {AppBar, Grid, Icon, IconButton, List, SwipeableDrawer, Toolbar, Tooltip} from "@material-ui/core";
import {ListItemLink} from "./LinkComponents";
import {AuthState, AuthStateContext} from "../entity/AuthState";
interface NavBarButtonsProps {
onDrawerOpen: () => void;
openOAuthDialog: () => void;
}
function NavBarButtons({onDrawerOpen, openOAuthDialog}: NavBarButtonsProps) {
const authState: AuthState = React.useContext(AuthStateContext);
return (
<Grid justify="space-between" container>
<Grid item>
{/* Left side of the navbar */}
<IconButton aria-label="Toggle navbar" onClick={onDrawerOpen}>
<Icon>menu</Icon>
</IconButton>
</Grid>
<Grid item>
{/* Right side of the navbar */}
<Grid container spacing={2}>
{!authState.oauthAuthorized &&
<Grid item>
<Tooltip title="You need to authorise the app with your Google Calendar">
<IconButton
color="secondary"
edge="end"
aria-label="Authorise the app with your Google Calendar"
onClick={openOAuthDialog}
>
<Icon>error</Icon>
</IconButton>
</Tooltip>
</Grid>
}
<Grid item>
<Tooltip title="Opt out of new chats">
<IconButton edge="end" aria-label="Opt out of new chats">
<Icon>notifications_none</Icon>
</IconButton>
</Tooltip>
</Grid>
<Grid item>
<Tooltip title="Log out">
<IconButton edge="end" aria-label="Log out" href={authState.logoutUrl}>
<Icon>exit_to_app</Icon>
</IconButton>
</Tooltip>
</Grid>
</Grid>
</Grid>
</Grid>
);
}
function DrawerButtons() {
return (
<List>
<ListItemLink to="/" primary="Main page"/>
<ListItemLink to="/groups" primary="My groups"/>
<ListItemLink to="/requests" primary="Requests"/>
<ListItemLink to="/chats" primary="My chats"/>
</List>
);
}
interface NavBarProps {
openOAuthDialog: () => void;
}
export function NavBar({openOAuthDialog}: NavBarProps) {
const [drawerOpen, setDrawerOpen] = React.useState(false);
return (
<React.Fragment>
<AppBar position="static" style={{background: "transparent", boxShadow: "none"}}>
<Toolbar>
<NavBarButtons
onDrawerOpen={() => setDrawerOpen(true)}
openOAuthDialog={openOAuthDialog}
/>
</Toolbar>
</AppBar>
<SwipeableDrawer
anchor="left"
onClose={() => setDrawerOpen(false)}
onOpen={() => setDrawerOpen(true)}
open={drawerOpen}>
<DrawerButtons/>
</SwipeableDrawer>
</React.Fragment>
);
}
| 30.118812 | 106 | 0.538133 |
76bccad1506df230f020aae79bbe6761938fe6dd | 3,352 | swift | Swift | CollageMaker/Controllers/MyAlbumVC.swift | JoaoFloresDev/iPhotosEditor | 3ff03395aa6125bc2b22707c22ab2b26abccdd8e | [
"MIT"
] | null | null | null | CollageMaker/Controllers/MyAlbumVC.swift | JoaoFloresDev/iPhotosEditor | 3ff03395aa6125bc2b22707c22ab2b26abccdd8e | [
"MIT"
] | null | null | null | CollageMaker/Controllers/MyAlbumVC.swift | JoaoFloresDev/iPhotosEditor | 3ff03395aa6125bc2b22707c22ab2b26abccdd8e | [
"MIT"
] | null | null | null | //
// MyAlbumVC.swift
// Photo Collage Maker
//
// Created by Grapes Infosoft on 14/09/19.
// Copyright © 2019 Grapes Infosoft. All rights reserved.
//
import UIKit
class MyAlbumVC: UIViewController,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout
{
var arrOfAlbumList = NSArray()
var objDelete = 0
//MARK:- Outlet
@IBOutlet weak var btnBack: UIButton!
@IBOutlet weak var AlbumsCV: UICollectionView!
@IBOutlet weak var lblAlert: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
lblAlert.isHidden = true
AlbumsCV.delegate = self
AlbumsCV.dataSource = self
AlbumsCV.register(UINib(nibName: "MainStickerCell", bundle: nil), forCellWithReuseIdentifier: "MainStickerCell")
if userDefault.object(forKey: "img") != nil {
arrOfAlbumList = (userDefault.object(forKey: "img") as! NSArray)
AlbumsCV.reloadData()
if arrOfAlbumList.count == 0{
lblAlert.isHidden = false
}else {
lblAlert.isHidden = true
}
}
}
override func viewDidAppear(_ animated: Bool) {
if arrOfAlbumList.count == 0{
lblAlert.isHidden = false
}else {
lblAlert.isHidden = true
}
}
//MARK:- Button Action Zone
@IBAction func btnBackAction(_ sender: Any) {
for controller in self.navigationController!.viewControllers as Array {
if controller.isKind(of: HomeVC.self) {
self.navigationController!.popToViewController(controller, animated: true)
break
}
}
}
//MARK:- Collection View Delegate Methods
func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return arrOfAlbumList.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell : MainStickerCell = collectionView.dequeueReusableCell(withReuseIdentifier: "MainStickerCell", for: indexPath) as! MainStickerCell
if let img = arrOfAlbumList[indexPath.row] as? NSData{
cell.imgStickers.image = UIImage(data: img as Data)
if cell.btnStickers == (cell.viewWithTag(25) as? UIButton) {
cell.btnStickers.mk_addTapHandlerIO { (btn) in
btn.isEnabled = true
let obj : ShareVC = self.storyboard?.instantiateViewController(withIdentifier: "ShareVC") as! ShareVC
obj.objDisplay = 2
obj.getImage = cell.imgStickers.image!
obj.index = indexPath.row
obj.objSetDelete = self
self.navigationController?.pushViewController(obj, animated: true)
}
}
}
return cell
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let width = (AlbumsCV.frame.width-20)/3
return CGSize(width: width, height: width)
}
}
| 36.043011 | 160 | 0.622912 |
d5deae370ff2776ef7135b9a63949f0abf19b628 | 726 | swift | Swift | Take&Food/MockupData/MockupData.swift | trotnic/takeandfood-client | ec95e666bfa45ffe019beaa26e5db97e45a7bb14 | [
"MIT"
] | null | null | null | Take&Food/MockupData/MockupData.swift | trotnic/takeandfood-client | ec95e666bfa45ffe019beaa26e5db97e45a7bb14 | [
"MIT"
] | null | null | null | Take&Food/MockupData/MockupData.swift | trotnic/takeandfood-client | ec95e666bfa45ffe019beaa26e5db97e45a7bb14 | [
"MIT"
] | null | null | null | //
// MockupData.swift
// Take&Food
//
// Created by Vladislav on 5/16/20.
// Copyright © 2020 Uladzislau Volchyk. All rights reserved.
//
import Foundation
struct MockupData {
static let user = Person(id: 25,
name: "vladislav",
login: "trotnic",
password: "password",
email: "email@email.com",
restaurantId: 26,
role: 0,
status: 1)
static let authUser = AuthEntity(login: "trotnic",
password: "password",
status: nil, role: nil)
}
| 26.888889 | 61 | 0.421488 |
f049567139fa9099114292306643318b4bde923b | 323 | js | JavaScript | resources/assets/js/app.js | divtag-nl/RFID-stock | 656d96a7d49b61595f24ee14794d8aae5ca4a280 | [
"MIT"
] | null | null | null | resources/assets/js/app.js | divtag-nl/RFID-stock | 656d96a7d49b61595f24ee14794d8aae5ca4a280 | [
"MIT"
] | 9 | 2019-12-29T10:34:27.000Z | 2022-02-26T14:32:10.000Z | resources/assets/js/app.js | divtag-nl/RFID-stock | 656d96a7d49b61595f24ee14794d8aae5ca4a280 | [
"MIT"
] | 2 | 2018-09-28T07:44:40.000Z | 2018-09-28T07:45:20.000Z | import './bootstrap';
import Vue from 'vue';
import routes from './routes';
import VueRouter from 'vue-router';
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js', { scope: '/' });
};
Vue.use(VueRouter);
let router = new VueRouter({
routes,
});
new Vue({
router,
}).$mount('#app');
| 17 | 62 | 0.643963 |
7db5475fa481328e57209078ca407df401b805ff | 6,206 | kt | Kotlin | meshui/src/main/java/io/particle/mesh/ui/BaseFlowActivity.kt | Faustasm/particle-android | 0f51f3dbbb5084a0a2c821f6d23e5c245fafdb66 | [
"Apache-2.0"
] | 16 | 2015-09-28T20:05:24.000Z | 2017-08-05T09:07:16.000Z | meshui/src/main/java/io/particle/mesh/ui/BaseFlowActivity.kt | Faustasm/particle-android | 0f51f3dbbb5084a0a2c821f6d23e5c245fafdb66 | [
"Apache-2.0"
] | 44 | 2019-02-14T12:25:38.000Z | 2022-01-25T15:29:23.000Z | meshui/src/main/java/io/particle/mesh/ui/BaseFlowActivity.kt | Faustasm/particle-android | 0f51f3dbbb5084a0a2c821f6d23e5c245fafdb66 | [
"Apache-2.0"
] | 30 | 2019-03-10T01:23:12.000Z | 2022-02-24T09:42:45.000Z | package io.particle.mesh.ui
import android.app.Activity
import android.bluetooth.BluetoothAdapter
import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.annotation.IdRes
import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import androidx.lifecycle.Observer
import androidx.navigation.NavController
import androidx.navigation.findNavController
import com.afollestad.materialdialogs.MaterialDialog
import com.google.android.material.snackbar.Snackbar
import com.snakydesign.livedataextensions.filter
import com.snakydesign.livedataextensions.nonNull
import io.particle.android.common.isLocationServicesAvailable
import io.particle.android.common.promptUserToEnableLocationServices
import io.particle.mesh.bluetooth.btAdapter
import io.particle.mesh.setup.flow.*
import io.particle.mesh.ui.utils.getViewModel
import mu.KotlinLogging
private const val REQUEST_ENABLE_BT = 42
abstract class BaseFlowActivity : AppCompatActivity() {
private val log = KotlinLogging.logger {}
@get:IdRes
protected abstract val navHostFragmentId: Int
@get:LayoutRes
protected abstract val contentViewIdRes: Int
@get:IdRes
protected abstract val progressSpinnerViewId: Int
protected abstract fun buildFlowUiDelegate(
systemInterface: FlowRunnerSystemInterface
): FlowUiDelegate
protected abstract fun onFlowTerminated(nextAction: FlowTerminationAction)
protected val navController: NavController
get() = findNavController(navHostFragmentId)
protected lateinit var flowModel: FlowRunnerAccessModel
protected lateinit var flowSystemInterface: FlowRunnerSystemInterface
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(contentViewIdRes)
flowModel = this.getViewModel()
if (savedInstanceState != null && !flowModel.isInitialized) {
log.warn { "Returning to mesh setup after process death is not supported; exiting!" }
finish()
return
}
flowSystemInterface = flowModel.systemInterface
flowSystemInterface.setNavController(
BaseNavigationToolImpl(navController, applicationContext)
)
flowModel.initialize(buildFlowUiDelegate(flowSystemInterface))
// FIXME: subscribe to other LiveDatas?
flowSystemInterface.dialogRequestLD.nonNull()
.observe(this, Observer { onDialogSpecReceived(it) })
flowSystemInterface.snackbarRequestLD.nonNull()
.observe(this, Observer { onSnackbarRequestReceived(it) })
flowSystemInterface.shouldShowProgressSpinnerLD.nonNull()
.observe(this, Observer { showGlobalProgressSpinner(it!!) })
flowSystemInterface.meshFlowTerminator.shouldTerminateFlowLD.nonNull()
.filter { it!!.first }
.observe(this, Observer { onFlowTerminated(it.second) })
}
override fun onPostResume() {
super.onPostResume()
if (!btAdapter.isEnabled) {
val enableBtIntent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT)
}
if (!isLocationServicesAvailable()) {
promptUserToEnableLocationServices { finish() }
}
}
override fun onPause() {
super.onPause()
log.info { "onPause()" }
if (isFinishing) {
flowSystemInterface.shutdown()
flowSystemInterface.setNavController(null)
flowModel.shutdown()
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {
// FIXME: inform the user why we're exiting?
finish()
}
}
private fun showGlobalProgressSpinner(show: Boolean) {
runOnUiThread { findViewById<View>(progressSpinnerViewId).isVisible = show }
}
override fun onSupportNavigateUp(): Boolean {
return navController.navigateUp()
}
private fun onDialogSpecReceived(spec: DialogSpec?) {
log.debug { "onDialogSpecReceived(): $spec" }
if (spec == null) {
log.warn { "Got null dialog spec?!" }
return
}
flowSystemInterface.dialogHack.clearDialogRequest()
val builder = MaterialDialog.Builder(this)
val strSpec: DialogSpec.StringDialogSpec = when (spec) {
is DialogSpec.StringDialogSpec? -> spec
is DialogSpec.ResDialogSpec? -> {
val negativeText = spec.negativeText?.let { getString(it) }
val title = spec.title?.let { getString(it) }
DialogSpec.StringDialogSpec(
getString(spec.text),
getString(spec.positiveText),
negativeText,
title
)
}
}
builder.content(strSpec.text)
.positiveText(strSpec.positiveText)
strSpec.negativeText?.let {
builder.negativeText(it)
builder.onNegative { dialog, _ ->
dialog.dismiss()
flowSystemInterface.dialogHack.updateDialogResult(DialogResult.NEGATIVE)
}
}
strSpec.title?.let { builder.title(it) }
builder.canceledOnTouchOutside(false)
.onPositive { dialog, _ ->
dialog.dismiss()
flowSystemInterface.dialogHack.updateDialogResult(DialogResult.POSITIVE)
}
log.info { "Showing dialog for: $spec" }
builder.show()
}
private fun onSnackbarRequestReceived(message: String?) {
log.debug { "Got snackbar msg request=$message" }
if (message == null) {
log.warn { "Got null snackbar message?!" }
return
}
Snackbar.make(
findViewById(navHostFragmentId),
message,
Snackbar.LENGTH_LONG
).show()
}
} | 32.663158 | 97 | 0.665807 |
9bca6fc6b34fe7139ebeff64f4c043c75ffaa21d | 5,630 | js | JavaScript | test/gridTest.js | BillMills/datapages | a995f9934a36bb058bfc650e8c2f3a1448eeac01 | [
"MIT"
] | 2 | 2017-10-04T20:41:03.000Z | 2018-08-16T22:44:34.000Z | test/gridTest.js | BillMills/datapages | a995f9934a36bb058bfc650e8c2f3a1448eeac01 | [
"MIT"
] | 2 | 2019-09-18T23:23:32.000Z | 2019-11-30T03:11:38.000Z | test/gridTest.js | BillMills/datapages | a995f9934a36bb058bfc650e8c2f3a1448eeac01 | [
"MIT"
] | null | null | null | process.env.NODE_ENV = 'test';
var chai = require('chai');
var assert = chai.assert;
let chaiHttp = require('chai-http');
let app = require('../app');
let should = chai.should();
var moment = require('moment');
chai.use(chaiHttp);
/* Test rgGrid */
describe('/GET get a RG temp anom object', function() {
this.timeout(15000);
const url = '/griddedProducts/grid/find?gridName=rgTempAnom'
it('it should a get a rgTempAnom object', (done) => {
chai.request(app)
.get(url)
.end((err, res) => {
//test overall response
res.should.have.status(200);
//test an element of the response
a_grid = res.body[0]
a_grid.should.include.keys('_id', 'date', 'data', 'gridName', 'measurement', 'units', 'variable', 'pres', 'cellsize', 'NODATA_value')
moment.utc(a_grid.date).format('YYYY-MM-DD').should.be.a('string');
a_grid._id.should.be.a('string');
a_grid.data.should.be.a('array');
a_grid.variable.should.be.a('string');
a_grid.units.should.be.a('string');
a_grid.pres.should.be.a('number');
a_grid.cellsize.should.be.a('number');
assert(a_grid.NODATA_value === null, 'no data value should be null')
done();
});
});
});
//http://localhost:3000/griddedProducts/nonUniformGrid/window?latRange=[-75,-73]&lonRange=[-5,0]&gridName=sose_si_area_3_day&date=2013-01-04&presLevel=0
//test sose_si_area_3_day assums it is in the db
describe('/GET get a sose_si_area_3_day object', function() {
this.timeout(15000);
const url = '/griddedProducts/nonUniformGrid/window?latRange=[-75,-70]&lonRange=[-5,0]&gridName=sose_si_area_1_day_sparse&date=2013-01-04&presLevel=0'
it('it should a get a sose_si_area_1_day_sparse object', (done) => {
chai.request(app)
.get(url)
.end((err, res) => {
//test overall response
res.should.have.status(200);
//test an element of the response
a_grid = res.body[0]
a_grid.should.include.keys('_id', 'date', 'param', 'data', 'gridName', 'measurement', 'units', 'variable', 'pres', 'chunks', 'NODATA_value')
moment.utc(a_grid.date).format('YYYY-MM-DD').should.be.a('string');
a_grid._id.should.be.a('string');
a_grid.data.should.be.a('array');
a_grid.variable.should.be.a('string');
a_grid.units.should.be.a('string');
a_grid.pres.should.be.a('number');
assert(a_grid.NODATA_value === null, 'no data value should be null')
done();
});
});
});
describe('/GET get a grid coordinate object', function() {
this.timeout(10000);
const url = '/griddedProducts/gridCoords?latRange=[-75,-73]&lonRange=[-5,5]&gridName=sose_si_area_1_day_sparse'
it('it should a get a grid_coord object', (done) => {
chai.request(app)
.get(url)
.end((err, res) => {
//test overall response
res.should.have.status(200);
//test an element of the response
a_grid = res.body[0]
a_grid.should.include.keys('_id', 'gridName', 'lats', 'lons')
a_grid.gridName.should.be.a('string');
a_grid.lats.should.be.a('array');
a_grid.lons.should.be.a('array');
done();
});
});
});
// describe('/GET get a ksSpaceTempTrend2 object', function() {
// this.timeout(5000);
// const url = '/griddedProducts/grid/find?gridName=ksSpaceTimeTempTrend2'
// it('it should a get a kuuselaGrid object', (done) => {
// chai.request(app)
// .get(url)
// .end((err, res) => {
// //test overall response
// res.should.have.status(200);
// //test an element of the response
// a_grid = res.body[0]
// a_grid.should.include.keys('_id', 'date', 'data', 'gridName', 'measurement', 'units', 'variable', 'pres', 'cellsize', 'NODATA_value')
// moment.utc(a_grid.date).format('YYYY-MM-DD').should.be.a('string');
// a_grid._id.should.be.a('string');
// a_grid.data.should.be.a('array');
// a_grid.variable.should.be.a('string');
// a_grid.units.should.be.a('string');
// a_grid.pres.should.be.a('number');
// a_grid.cellsize.should.be.a('number');
// assert(a_grid.NODATA_value === null, 'no data value should be null')
// done();
// });
// });
// });
// describe('/GET get a ksTempAnom object', function() {
// this.timeout(5000);
// const url = '/griddedProducts/grid/find?gridName=ksTempAnom'
// it('it should a get a kuuselaGrid object', (done) => {
// chai.request(app)
// .get(url)
// .end((err, res) => {
// //test overall response
// res.should.have.status(200);
// //test an element of the response
// a_grid = res.body[0]
// console.log('a grid:', a_grid._id)
// a_grid.should.include.keys('_id', 'date', 'data', 'gridName', 'measurement', 'units', 'variable', 'pres', 'cellsize', 'NODATA_value')
// moment.utc(a_grid.date).format('YYYY-MM-DD').should.be.a('string');
// a_grid._id.should.be.a('string');
// a_grid.data.should.be.a('array');
// a_grid.variable.should.be.a('string');
// a_grid.units.should.be.a('string');
// a_grid.pres.should.be.a('number');
// a_grid.cellsize.should.be.a('number');
// assert(a_grid.NODATA_value === null, 'no data value should be null')
// done();
// });
// });
// }); | 40.503597 | 154 | 0.577087 |
0ca19eadb115712fb3c48ed0a589480fef063fda | 27,687 | py | Python | tests/test_home.py | jeroenterheerdt/nexia | 93ff554913e1dad6389b54179eca7c4ec1f29371 | [
"Apache-2.0"
] | null | null | null | tests/test_home.py | jeroenterheerdt/nexia | 93ff554913e1dad6389b54179eca7c4ec1f29371 | [
"Apache-2.0"
] | null | null | null | tests/test_home.py | jeroenterheerdt/nexia | 93ff554913e1dad6389b54179eca7c4ec1f29371 | [
"Apache-2.0"
] | null | null | null | """Tests for Nexia Home."""
import json
import os
from os.path import dirname
import unittest
import pytest
from nexia.home import NexiaHome
def load_fixture(filename):
"""Load a fixture."""
test_dir = dirname(__file__)
path = os.path.join(test_dir, "fixtures", filename)
with open(path) as fptr:
return fptr.read()
class TestNexiaThermostat(unittest.TestCase):
"""Tests for nexia thermostat."""
def test_update(self):
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(2059661)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [83261002, 83261005, 83261008, 83261011])
nexia.update_from_json(devices_json)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [83261002, 83261005, 83261008, 83261011])
nexia.update_from_json(devices_json)
def test_idle_thermo(self):
"""Get methods for an idle thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(2059661)
self.assertEqual(thermostat.get_model(), "XL1050")
self.assertEqual(thermostat.get_firmware(), "5.9.1")
self.assertEqual(thermostat.get_dev_build_number(), "1581321824")
self.assertEqual(thermostat.get_device_id(), "000000")
self.assertEqual(thermostat.get_type(), "XL1050")
self.assertEqual(thermostat.get_name(), "Downstairs East Wing")
self.assertEqual(thermostat.get_deadband(), 3)
self.assertEqual(thermostat.get_setpoint_limits(), (55, 99))
self.assertEqual(thermostat.get_variable_fan_speed_limits(), (0.35, 1.0))
self.assertEqual(thermostat.get_unit(), "F")
self.assertEqual(thermostat.get_humidity_setpoint_limits(), (0.35, 0.65))
self.assertEqual(thermostat.get_fan_mode(), "Auto")
self.assertEqual(thermostat.get_fan_modes(), ["Auto", "On", "Circulate"])
self.assertEqual(thermostat.get_outdoor_temperature(), 88.0)
self.assertEqual(thermostat.get_relative_humidity(), 0.36)
self.assertEqual(thermostat.get_current_compressor_speed(), 0.0)
self.assertEqual(thermostat.get_requested_compressor_speed(), 0.0)
self.assertEqual(thermostat.get_fan_speed_setpoint(), 0.35)
self.assertEqual(thermostat.get_dehumidify_setpoint(), 0.50)
self.assertEqual(thermostat.has_dehumidify_support(), True)
self.assertEqual(thermostat.has_dehumidify_support(), True)
self.assertEqual(thermostat.has_emergency_heat(), False)
self.assertEqual(thermostat.get_system_status(), "System Idle")
self.assertEqual(thermostat.has_air_cleaner(), True)
self.assertEqual(thermostat.get_air_cleaner_mode(), "auto")
self.assertEqual(thermostat.is_blower_active(), False)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [83261002, 83261005, 83261008, 83261011])
def test_idle_thermo_issue_33758(self):
"""Get methods for an idle thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_issue_33758.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(12345678)
self.assertEqual(thermostat.get_model(), "XL1050")
self.assertEqual(thermostat.get_firmware(), "5.9.1")
self.assertEqual(thermostat.get_dev_build_number(), "1581321824")
self.assertEqual(thermostat.get_device_id(), "xxxxxx")
self.assertEqual(thermostat.get_type(), "XL1050")
self.assertEqual(thermostat.get_name(), "Thermostat")
self.assertEqual(thermostat.get_deadband(), 3)
self.assertEqual(thermostat.get_setpoint_limits(), (55, 99))
self.assertEqual(thermostat.get_variable_fan_speed_limits(), (0.35, 1.0))
self.assertEqual(thermostat.get_unit(), "F")
self.assertEqual(thermostat.get_humidity_setpoint_limits(), (0.35, 0.65))
self.assertEqual(thermostat.get_fan_mode(), "Auto")
self.assertEqual(thermostat.get_fan_modes(), ["Auto", "On", "Circulate"])
self.assertEqual(thermostat.get_outdoor_temperature(), 55.0)
self.assertEqual(thermostat.get_relative_humidity(), 0.43)
self.assertEqual(thermostat.get_current_compressor_speed(), 0.0)
self.assertEqual(thermostat.get_requested_compressor_speed(), 0.0)
self.assertEqual(thermostat.get_fan_speed_setpoint(), 1)
self.assertEqual(thermostat.get_dehumidify_setpoint(), 0.55)
self.assertEqual(thermostat.has_dehumidify_support(), True)
self.assertEqual(thermostat.has_humidify_support(), True)
self.assertEqual(thermostat.has_emergency_heat(), True)
self.assertEqual(thermostat.is_emergency_heat_active(), False)
self.assertEqual(thermostat.get_system_status(), "System Idle")
self.assertEqual(thermostat.has_air_cleaner(), True)
self.assertEqual(thermostat.get_air_cleaner_mode(), "auto")
self.assertEqual(thermostat.is_blower_active(), False)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [12345678])
def test_idle_thermo_issue_33968_thermostat_1690380(self):
"""Get methods for an cooling thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_issue_33968.json"))
nexia.update_from_json(devices_json)
thermostat_ids = nexia.get_thermostat_ids()
self.assertEqual(thermostat_ids, [1690380])
thermostat = nexia.get_thermostat_by_id(1690380)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [83037337, 83037340, 83037343])
self.assertEqual(thermostat.get_model(), "XL1050")
self.assertEqual(thermostat.get_firmware(), "5.9.1")
self.assertEqual(thermostat.get_dev_build_number(), "1581321824")
self.assertEqual(thermostat.get_device_id(), "removed")
self.assertEqual(thermostat.get_type(), "XL1050")
self.assertEqual(thermostat.get_name(), "Thermostat")
self.assertEqual(thermostat.get_deadband(), 3)
self.assertEqual(thermostat.get_setpoint_limits(), (55, 99))
self.assertEqual(thermostat.get_variable_fan_speed_limits(), (0.35, 1.0))
self.assertEqual(thermostat.get_unit(), "F")
self.assertEqual(thermostat.get_humidity_setpoint_limits(), (0.35, 0.65))
self.assertEqual(thermostat.get_fan_mode(), "Auto")
self.assertEqual(thermostat.get_fan_modes(), ["Auto", "On", "Circulate"])
self.assertEqual(thermostat.get_outdoor_temperature(), 80.0)
self.assertEqual(thermostat.get_relative_humidity(), 0.55)
self.assertEqual(thermostat.get_current_compressor_speed(), 0.41)
self.assertEqual(thermostat.get_requested_compressor_speed(), 0.41)
self.assertEqual(thermostat.get_fan_speed_setpoint(), 0.5)
self.assertEqual(thermostat.get_dehumidify_setpoint(), 0.55)
self.assertEqual(thermostat.has_dehumidify_support(), True)
self.assertEqual(thermostat.has_humidify_support(), False)
self.assertEqual(thermostat.has_emergency_heat(), True)
self.assertEqual(thermostat.is_emergency_heat_active(), False)
self.assertEqual(thermostat.get_system_status(), "Cooling")
self.assertEqual(thermostat.has_air_cleaner(), True)
self.assertEqual(thermostat.get_air_cleaner_mode(), "auto")
self.assertEqual(thermostat.is_blower_active(), True)
def test_active_thermo(self):
"""Get methods for an active thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(2293892)
self.assertEqual(thermostat.get_model(), "XL1050")
self.assertEqual(thermostat.get_firmware(), "5.9.1")
self.assertEqual(thermostat.get_dev_build_number(), "1581321824")
self.assertEqual(thermostat.get_device_id(), "0281B02C")
self.assertEqual(thermostat.get_type(), "XL1050")
self.assertEqual(thermostat.get_name(), "Master Suite")
self.assertEqual(thermostat.get_deadband(), 3)
self.assertEqual(thermostat.get_setpoint_limits(), (55, 99))
self.assertEqual(thermostat.get_variable_fan_speed_limits(), (0.35, 1.0))
self.assertEqual(thermostat.get_unit(), "F")
self.assertEqual(thermostat.get_humidity_setpoint_limits(), (0.35, 0.65))
self.assertEqual(thermostat.get_fan_mode(), "Auto")
self.assertEqual(thermostat.get_fan_modes(), ["Auto", "On", "Circulate"])
self.assertEqual(thermostat.get_outdoor_temperature(), 87.0)
self.assertEqual(thermostat.get_relative_humidity(), 0.52)
self.assertEqual(thermostat.get_current_compressor_speed(), 0.69)
self.assertEqual(thermostat.get_requested_compressor_speed(), 0.69)
self.assertEqual(thermostat.get_fan_speed_setpoint(), 0.35)
self.assertEqual(thermostat.get_dehumidify_setpoint(), 0.45)
self.assertEqual(thermostat.has_dehumidify_support(), True)
self.assertEqual(thermostat.has_humidify_support(), False)
self.assertEqual(thermostat.has_emergency_heat(), False)
self.assertEqual(thermostat.get_system_status(), "Cooling")
self.assertEqual(thermostat.has_air_cleaner(), True)
self.assertEqual(thermostat.get_air_cleaner_mode(), "auto")
self.assertEqual(thermostat.is_blower_active(), True)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [83394133, 83394130, 83394136, 83394127, 83394139])
@pytest.mark.skip(reason="not yet supported")
def test_xl624(self):
"""Get methods for an xl624 thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_xl624.json"))
nexia.update_from_json(devices_json)
thermostat_ids = nexia.get_thermostat_ids()
self.assertEqual(thermostat_ids, [2222222, 3333333])
thermostat = nexia.get_thermostat_by_id(1111111)
self.assertEqual(thermostat.get_model(), None)
self.assertEqual(thermostat.get_firmware(), "2.8")
self.assertEqual(thermostat.get_dev_build_number(), "0603340208")
self.assertEqual(thermostat.get_device_id(), None)
self.assertEqual(thermostat.get_type(), None)
self.assertEqual(thermostat.get_name(), "Downstairs Hall")
self.assertEqual(thermostat.get_deadband(), 3)
self.assertEqual(thermostat.get_setpoint_limits(), (55, 99))
self.assertEqual(thermostat.has_variable_fan_speed(), False)
self.assertEqual(thermostat.get_unit(), "F")
self.assertEqual(thermostat.get_humidity_setpoint_limits(), (0.35, 0.65))
self.assertEqual(thermostat.get_fan_mode(), "Auto")
self.assertEqual(thermostat.get_fan_modes(), ["Auto", "On", "Cycler"])
self.assertEqual(thermostat.get_current_compressor_speed(), 0.0)
self.assertEqual(thermostat.get_requested_compressor_speed(), 0.0)
self.assertEqual(thermostat.has_dehumidify_support(), False)
self.assertEqual(thermostat.has_humidify_support(), False)
self.assertEqual(thermostat.has_emergency_heat(), False)
self.assertEqual(thermostat.get_system_status(), "System Idle")
self.assertEqual(thermostat.has_air_cleaner(), False)
self.assertEqual(thermostat.is_blower_active(), False)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [12345678])
def test_xl824_1(self):
"""Get methods for an xl824 thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_xl624.json"))
nexia.update_from_json(devices_json)
thermostat_ids = nexia.get_thermostat_ids()
self.assertEqual(thermostat_ids, [2222222, 3333333])
thermostat = nexia.get_thermostat_by_id(2222222)
self.assertEqual(thermostat.get_model(), "XL824")
self.assertEqual(thermostat.get_firmware(), "5.9.1")
self.assertEqual(thermostat.get_dev_build_number(), "1581314625")
self.assertEqual(thermostat.get_device_id(), "0167CA48")
self.assertEqual(thermostat.get_type(), "XL824")
self.assertEqual(thermostat.get_name(), "Family Room")
self.assertEqual(thermostat.get_deadband(), 3)
self.assertEqual(thermostat.get_setpoint_limits(), (55, 99))
self.assertEqual(thermostat.has_variable_fan_speed(), True)
self.assertEqual(thermostat.get_unit(), "F")
self.assertEqual(thermostat.get_humidity_setpoint_limits(), (0.35, 0.65))
self.assertEqual(thermostat.get_fan_mode(), "Circulate")
self.assertEqual(thermostat.get_fan_modes(), ["Auto", "On", "Circulate"])
self.assertEqual(thermostat.get_current_compressor_speed(), 0.0)
self.assertEqual(thermostat.get_requested_compressor_speed(), 0.0)
self.assertEqual(thermostat.has_dehumidify_support(), True)
self.assertEqual(thermostat.has_humidify_support(), False)
self.assertEqual(thermostat.has_emergency_heat(), False)
self.assertEqual(thermostat.get_system_status(), "System Idle")
self.assertEqual(thermostat.has_air_cleaner(), True)
self.assertEqual(thermostat.is_blower_active(), False)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [88888888])
def test_xl824_2(self):
"""Get methods for an xl824 thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_xl624.json"))
nexia.update_from_json(devices_json)
thermostat_ids = nexia.get_thermostat_ids()
self.assertEqual(thermostat_ids, [2222222, 3333333])
thermostat = nexia.get_thermostat_by_id(3333333)
self.assertEqual(thermostat.get_model(), "XL824")
self.assertEqual(thermostat.get_firmware(), "5.9.1")
self.assertEqual(thermostat.get_dev_build_number(), "1581314625")
self.assertEqual(thermostat.get_device_id(), "01573380")
self.assertEqual(thermostat.get_type(), "XL824")
self.assertEqual(thermostat.get_name(), "Upstairs")
self.assertEqual(thermostat.get_deadband(), 3)
self.assertEqual(thermostat.get_setpoint_limits(), (55, 99))
self.assertEqual(thermostat.has_variable_fan_speed(), True)
self.assertEqual(thermostat.get_unit(), "F")
self.assertEqual(thermostat.get_humidity_setpoint_limits(), (0.35, 0.65))
self.assertEqual(thermostat.get_fan_mode(), "Circulate")
self.assertEqual(thermostat.get_fan_modes(), ["Auto", "On", "Circulate"])
self.assertEqual(thermostat.get_current_compressor_speed(), 0.0)
self.assertEqual(thermostat.get_requested_compressor_speed(), 0.0)
self.assertEqual(thermostat.has_dehumidify_support(), True)
self.assertEqual(thermostat.has_humidify_support(), False)
self.assertEqual(thermostat.has_emergency_heat(), False)
self.assertEqual(thermostat.get_system_status(), "System Idle")
self.assertEqual(thermostat.has_air_cleaner(), True)
self.assertEqual(thermostat.is_blower_active(), False)
zone_ids = thermostat.get_zone_ids()
self.assertEqual(zone_ids, [99999999])
class TestNexiaHome(unittest.TestCase):
"""Tests for nexia home."""
def test_basic(self):
"""Basic tests for NexiaHome."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
self.assertEqual(nexia.get_name(), "Hidden")
thermostat_ids = nexia.get_thermostat_ids()
self.assertEqual(thermostat_ids, [2059661, 2059676, 2293892, 2059652])
def test_basic_issue_33758(self):
"""Basic tests for NexiaHome."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_issue_33758.json"))
nexia.update_from_json(devices_json)
self.assertEqual(nexia.get_name(), "Hidden")
thermostat_ids = nexia.get_thermostat_ids()
self.assertEqual(thermostat_ids, [12345678])
class TestNexiaThermostatZone(unittest.TestCase):
"""Tests for nexia thermostat zone."""
def test_zone_issue_33968_zone_83037337(self):
"""Tests for nexia thermostat zone that is cooling."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_issue_33968.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(1690380)
zone = thermostat.get_zone_by_id(83037337)
self.assertEqual(zone.thermostat, thermostat)
self.assertEqual(zone.get_name(), "Family Room")
self.assertEqual(zone.get_cooling_setpoint(), 77)
self.assertEqual(zone.get_heating_setpoint(), 74)
self.assertEqual(zone.get_current_mode(), "COOL")
self.assertEqual(
zone.get_requested_mode(), "COOL",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Damper Closed",
)
self.assertEqual(
zone.get_setpoint_status(), "Permanent Hold",
)
self.assertEqual(zone.is_calling(), False)
self.assertEqual(zone.is_in_permanent_hold(), True)
def test_zone_issue_33968_zone_83037340(self):
"""Tests for nexia thermostat zone that is cooling."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_issue_33968.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(1690380)
zone = thermostat.get_zone_by_id(83037340)
self.assertEqual(zone.thermostat, thermostat)
self.assertEqual(zone.get_name(), "Office")
self.assertEqual(zone.get_cooling_setpoint(), 77)
self.assertEqual(zone.get_heating_setpoint(), 74)
self.assertEqual(zone.get_current_mode(), "COOL")
self.assertEqual(
zone.get_requested_mode(), "COOL",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Damper Open",
)
self.assertEqual(
zone.get_setpoint_status(), "Permanent Hold",
)
self.assertEqual(zone.is_calling(), True)
self.assertEqual(zone.is_in_permanent_hold(), True)
def test_zone_issue_33968_zone_83037343(self):
"""Tests for nexia thermostat zone that is cooling."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_issue_33968.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(1690380)
zone = thermostat.get_zone_by_id(83037343)
self.assertEqual(zone.thermostat, thermostat)
self.assertEqual(zone.get_name(), "Master")
self.assertEqual(zone.get_cooling_setpoint(), 77)
self.assertEqual(zone.get_heating_setpoint(), 68)
self.assertEqual(zone.get_current_mode(), "COOL")
self.assertEqual(
zone.get_requested_mode(), "COOL",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Damper Open",
)
self.assertEqual(
zone.get_setpoint_status(), "Permanent Hold",
)
self.assertEqual(zone.is_calling(), True)
self.assertEqual(zone.is_in_permanent_hold(), True)
def test_zone_issue_33758(self):
"""Tests for nexia thermostat zone relieving air."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_issue_33758.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(12345678)
zone = thermostat.get_zone_by_id(12345678)
self.assertEqual(zone.thermostat, thermostat)
self.assertEqual(zone.get_name(), "Thermostat NativeZone")
self.assertEqual(zone.get_cooling_setpoint(), 73)
self.assertEqual(zone.get_heating_setpoint(), 68)
self.assertEqual(zone.get_current_mode(), "AUTO")
self.assertEqual(
zone.get_requested_mode(), "AUTO",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Idle",
)
self.assertEqual(
zone.get_setpoint_status(), "Run Schedule - None",
)
self.assertEqual(zone.is_calling(), False)
self.assertEqual(zone.is_in_permanent_hold(), False)
def test_zone_relieving_air(self):
"""Tests for nexia thermostat zone relieving air."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(2293892)
zone = thermostat.get_zone_by_id(83394133)
self.assertEqual(zone.thermostat, thermostat)
self.assertEqual(zone.get_name(), "Bath Closet")
self.assertEqual(zone.get_cooling_setpoint(), 79)
self.assertEqual(zone.get_heating_setpoint(), 63)
self.assertEqual(zone.get_current_mode(), "AUTO")
self.assertEqual(
zone.get_requested_mode(), "AUTO",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Relieving Air",
)
self.assertEqual(
zone.get_setpoint_status(), "Permanent Hold",
)
self.assertEqual(zone.is_calling(), True)
self.assertEqual(zone.is_in_permanent_hold(), True)
def test_zone_cooling_air(self):
"""Tests for nexia thermostat zone cooling."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(2293892)
zone = thermostat.get_zone_by_id(83394130)
self.assertEqual(zone.get_name(), "Master")
self.assertEqual(zone.get_cooling_setpoint(), 71)
self.assertEqual(zone.get_heating_setpoint(), 63)
self.assertEqual(zone.get_current_mode(), "AUTO")
self.assertEqual(
zone.get_requested_mode(), "AUTO",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Damper Open",
)
self.assertEqual(
zone.get_setpoint_status(), "Permanent Hold",
)
self.assertEqual(zone.is_calling(), True)
self.assertEqual(zone.is_in_permanent_hold(), True)
def test_zone_idle(self):
"""Tests for nexia thermostat zone idle."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
thermostat = nexia.get_thermostat_by_id(2059661)
zone = thermostat.get_zone_by_id(83261002)
self.assertEqual(zone.get_name(), "Living East")
self.assertEqual(zone.get_cooling_setpoint(), 79)
self.assertEqual(zone.get_heating_setpoint(), 63)
self.assertEqual(zone.get_current_mode(), "AUTO")
self.assertEqual(
zone.get_requested_mode(), "AUTO",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Idle",
)
self.assertEqual(
zone.get_setpoint_status(), "Permanent Hold",
)
self.assertEqual(zone.is_calling(), False)
self.assertEqual(zone.is_in_permanent_hold(), True)
def test_xl824_idle(self):
"""Tests for nexia xl824 zone idle."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_house_xl624.json"))
nexia.update_from_json(devices_json)
thermostat_ids = nexia.get_thermostat_ids()
self.assertEqual(thermostat_ids, [2222222, 3333333])
thermostat = nexia.get_thermostat_by_id(3333333)
zone = thermostat.get_zone_by_id(99999999)
self.assertEqual(zone.get_name(), "Upstairs NativeZone")
self.assertEqual(zone.get_cooling_setpoint(), 74)
self.assertEqual(zone.get_heating_setpoint(), 62)
self.assertEqual(zone.get_current_mode(), "COOL")
self.assertEqual(
zone.get_requested_mode(), "COOL",
)
self.assertEqual(
zone.get_presets(), ["None", "Home", "Away", "Sleep"],
)
self.assertEqual(
zone.get_preset(), "None",
)
self.assertEqual(
zone.get_status(), "Idle",
)
self.assertEqual(
zone.get_setpoint_status(), "Permanent Hold",
)
self.assertEqual(zone.is_calling(), False)
self.assertEqual(zone.is_in_permanent_hold(), True)
class TestNexiaAutomation(unittest.TestCase):
def test_automations(self):
"""Get methods for an active thermostat."""
nexia = NexiaHome(auto_login=False)
devices_json = json.loads(load_fixture("mobile_houses_123456.json"))
nexia.update_from_json(devices_json)
automation_ids = nexia.get_automation_ids()
self.assertEqual(
automation_ids,
[3467876, 3467870, 3452469, 3452472, 3454776, 3454774, 3486078, 3486091],
)
automation_one = nexia.get_automation_by_id(3467876)
self.assertEqual(automation_one.name, "Away for 12 Hours")
self.assertEqual(
automation_one.description,
"When IFTTT activates the automation Upstairs West Wing will "
"permanently hold the heat to 62.0 and cool to 83.0 AND "
"Downstairs East Wing will permanently hold the heat to 62.0 "
"and cool to 83.0 AND Downstairs West Wing will permanently "
"hold the heat to 62.0 and cool to 83.0 AND Activate the mode "
"named 'Away 12' AND Master Suite will permanently hold the "
"heat to 62.0 and cool to 83.0",
)
self.assertEqual(automation_one.enabled, True)
self.assertEqual(automation_one.automation_id, 3467876)
| 44.946429 | 86 | 0.674757 |
b8f3c2775397757272bb30120cb8068f6a5d0220 | 2,670 | rs | Rust | tests/program_tests.rs | qtumproject/rust-qx86 | eeffcd460cabb9c33e71757528b9348fa08190fa | [
"MIT"
] | null | null | null | tests/program_tests.rs | qtumproject/rust-qx86 | eeffcd460cabb9c33e71757528b9348fa08190fa | [
"MIT"
] | null | null | null | tests/program_tests.rs | qtumproject/rust-qx86 | eeffcd460cabb9c33e71757528b9348fa08190fa | [
"MIT"
] | null | null | null | extern crate qx86;
mod common;
use qx86::vm::*;
use common::*;
#[test]
pub fn fibonacci(){
let mut hv = TestHypervisor::default();
hv.pushed_values.push(10);
hv.pushed_values.push(1);
hv.pushed_values.push(0);
hv.pushed_values.push(2);
//based on https://rosettacode.org/wiki/Category:8080_Assembly
let mut vm = execute_vm_with_asm_and_hypervisor("
;set fib(n) to calculate
int 0xAB ;get value from hypervisor
mov EAX, EBX
fib:
cmp eax, 0
je fib0
cmp eax, 1
je fib1
mov ECX, EAX
dec ECX
mov EAX, 1
mov EBX, 0
compute:
mov EDX, EAX
add EAX, EBX
mov EBX, EDX
dec ECX
jnz compute
jmp end_fib
fib0:
mov eax, 0
jmp end_fib
fib1:
mov eax, 1
end_fib:
nop
hlt
", &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 1);
reset_vm(&mut vm);
execute_vm_with_diagnostics_and_hypervisor(&mut vm, &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 0);
reset_vm(&mut vm);
execute_vm_with_diagnostics_and_hypervisor(&mut vm, &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 1);
reset_vm(&mut vm);
execute_vm_with_diagnostics_and_hypervisor(&mut vm, &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 55);
}
#[test]
pub fn fibonacci_16bit(){
let mut hv = TestHypervisor::default();
hv.pushed_values.push(10);
hv.pushed_values.push(1);
hv.pushed_values.push(0);
hv.pushed_values.push(2);
//based on https://rosettacode.org/wiki/Category:8080_Assembly
let mut vm = execute_vm_with_asm_and_hypervisor("
;set fib(n) to calculate
int 0xAB ;get value from hypervisor
mov EAX, EBX
fib:
cmp ax, 0
je fib0
cmp ax, 1
je fib1
mov CX, AX
dec CX
mov AX, 1
mov BX, 0
compute:
mov DX, AX
add AX, BX
mov BX, DX
dec CX
jnz compute
jmp end_fib
fib0:
mov ax, 0
jmp end_fib
fib1:
mov ax, 1
end_fib:
nop
hlt
", &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 1);
reset_vm(&mut vm);
execute_vm_with_diagnostics_and_hypervisor(&mut vm, &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 0);
reset_vm(&mut vm);
execute_vm_with_diagnostics_and_hypervisor(&mut vm, &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 1);
reset_vm(&mut vm);
execute_vm_with_diagnostics_and_hypervisor(&mut vm, &mut hv);
assert_eq!(vm.reg32(Reg32::EAX), 55);
} | 23.421053 | 66 | 0.567041 |
538e832d1773733eec6d82069cca5012b70dd0d7 | 378 | kt | Kotlin | app/src/main/kotlin/com/github/muneebwanee/dash/ui/fragments/social/InterfaceViewSocial.kt | Yassakesbi/Dash | 1fa68abddacedc7866cc09c6908f885fc9bf0281 | [
"Apache-2.0"
] | 81 | 2020-12-15T17:24:25.000Z | 2022-03-27T16:43:19.000Z | app/src/main/kotlin/com/github/muneebwanee/dash/ui/fragments/social/InterfaceViewSocial.kt | Yassakesbi/Dash | 1fa68abddacedc7866cc09c6908f885fc9bf0281 | [
"Apache-2.0"
] | 10 | 2020-12-31T03:48:04.000Z | 2022-03-24T17:03:45.000Z | app/src/main/kotlin/com/github/muneebwanee/dash/ui/fragments/social/InterfaceViewSocial.kt | Yassakesbi/Dash | 1fa68abddacedc7866cc09c6908f885fc9bf0281 | [
"Apache-2.0"
] | 37 | 2020-12-18T09:51:00.000Z | 2022-03-24T20:46:53.000Z | package com.github.muneebwanee.dash.ui.fragments.social
import com.github.muneebwanee.dash.ui.activities.base.InterfaceView
import com.google.firebase.database.DataSnapshot
/**
* Created by muneebwanee on 15/12/20.
*/
interface InterfaceViewSocial : InterfaceView {
fun setValuePermission(dataSnapshot: DataSnapshot)
fun successResult(dataSnapshot: DataSnapshot)
} | 27 | 67 | 0.804233 |
07feda6f61921039d75e6463db9c9448f566517c | 2,731 | h | C | src/test/dtimepnt.h | msperl/Period | da4b4364e8228852cc2b82639470dab0b3579055 | [
"MIT"
] | 1 | 2019-12-10T20:13:11.000Z | 2019-12-10T20:13:11.000Z | src/test/dtimepnt.h | msperl/Period | da4b4364e8228852cc2b82639470dab0b3579055 | [
"MIT"
] | null | null | null | src/test/dtimepnt.h | msperl/Period | da4b4364e8228852cc2b82639470dab0b3579055 | [
"MIT"
] | null | null | null | /*
* Program: Period98
*
* File: dtimepnt.h
* Purpose: header-file for
* time-string-data-point
* Author: Martin Sperl
* Created: 1996
* Copyright: (c) 1996-1998, Martin Sperl
*/
#ifndef __timepnt_h__
#define __timepnt_h__
#include <iostream.h>
#include <math.h>
///
class CTimePoint
{
public:
///constructor
CTimePoint(int i=0);
///
CTimePoint(double t, double o,double a=-99999,
double c=0,double pw=1.0,
int n1=0, int n2=0, int n3=0, int n4=0,int index=0);
///destructor
~CTimePoint();
/// returns the running index of the data
int GetRunningIndex() const { return mRunningIndex; }
/// returns the time of the data
double GetTime() const { return mTime; }
double GetPhasedTime(double Frequency) const
{ double tmp; return modf(mTime*Frequency,&tmp); }
/// returns the observed value of the data
double GetObserved() const { return mObserved; }
/// returns the adjusted value of the data
double GetAdjusted() const { return mAdjusted; }
/// sets the adjusted value of the data
void SetAdjusted(double t) { mAdjusted=t; }
/// returns the calculated value for the data
double GetCalculated() const { return mCalculated; }
/// sets the calculated value for the data
void SetCalculated(double t) { mCalculated=t ; }
/// returns the residuals in dependance to the observed values
double GetDataResidual() const { return mObserved-mCalculated; }
/// returns the residuals in dependance to the adjusted values
double GetAdjustedResidual() const { return mAdjusted-mCalculated; }
/// sets the weight for the data
void SetWeight(double w) { mWeight=w; }
/// returns the weight for the data
double GetWeight() const { return mWeight; }
/// returns the weight for the data
double GetPointWeight() const { return mPointWeight; }
/// returns the ID of the name of the data for a column
int GetIDName(int column) const {return mNames[column];}
/// sets the ID of the name of the data for a column
void SetIDName(int column, int ID) { mNames[column]=ID; }
//@ManMemo: data
private:
///Time
double const mTime;
///Observed
double const mObserved;
///Adjusted
double mAdjusted;
///Calculated
double mCalculated;
///Weight
double mWeight;
///Weight for point
double mPointWeight;
///Array of names
int mNames[4];
/// the index to use for the next file
static int mNextIndex;
/// the global running index
int mRunningIndex;
};
//@ManMemo: compare
int operator<(CTimePoint const &t1, CTimePoint const &t2);
int operator<=(CTimePoint const &t1, CTimePoint const &t2);
//@ManMemo: output
ostream& operator<<(ostream &str, CTimePoint const &t);
#endif
| 27.867347 | 70 | 0.685097 |
b167832a7470737f744879383aac82323a408045 | 2,354 | h | C | src/lifecycle_msgs/msg/detail/state__struct.h | kajMork/micro_ros_arduino | c7531a5d87e5a42a94879c936f3e25508869cab9 | [
"Apache-2.0"
] | 178 | 2020-10-28T17:42:00.000Z | 2022-03-27T16:14:15.000Z | src/lifecycle_msgs/msg/detail/state__struct.h | kajMork/micro_ros_arduino | c7531a5d87e5a42a94879c936f3e25508869cab9 | [
"Apache-2.0"
] | 176 | 2020-10-23T12:26:12.000Z | 2022-03-31T19:08:11.000Z | src/lifecycle_msgs/msg/detail/state__struct.h | kajMork/micro_ros_arduino | c7531a5d87e5a42a94879c936f3e25508869cab9 | [
"Apache-2.0"
] | 54 | 2020-11-03T06:25:59.000Z | 2022-03-18T22:59:29.000Z | // generated from rosidl_generator_c/resource/idl__struct.h.em
// with input from lifecycle_msgs:msg/State.idl
// generated code does not contain a copyright notice
#ifndef LIFECYCLE_MSGS__MSG__DETAIL__STATE__STRUCT_H_
#define LIFECYCLE_MSGS__MSG__DETAIL__STATE__STRUCT_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
// Constants defined in the message
/// Constant 'PRIMARY_STATE_UNKNOWN'.
enum
{
lifecycle_msgs__msg__State__PRIMARY_STATE_UNKNOWN = 0
};
/// Constant 'PRIMARY_STATE_UNCONFIGURED'.
enum
{
lifecycle_msgs__msg__State__PRIMARY_STATE_UNCONFIGURED = 1
};
/// Constant 'PRIMARY_STATE_INACTIVE'.
enum
{
lifecycle_msgs__msg__State__PRIMARY_STATE_INACTIVE = 2
};
/// Constant 'PRIMARY_STATE_ACTIVE'.
enum
{
lifecycle_msgs__msg__State__PRIMARY_STATE_ACTIVE = 3
};
/// Constant 'PRIMARY_STATE_FINALIZED'.
enum
{
lifecycle_msgs__msg__State__PRIMARY_STATE_FINALIZED = 4
};
/// Constant 'TRANSITION_STATE_CONFIGURING'.
enum
{
lifecycle_msgs__msg__State__TRANSITION_STATE_CONFIGURING = 10
};
/// Constant 'TRANSITION_STATE_CLEANINGUP'.
enum
{
lifecycle_msgs__msg__State__TRANSITION_STATE_CLEANINGUP = 11
};
/// Constant 'TRANSITION_STATE_SHUTTINGDOWN'.
enum
{
lifecycle_msgs__msg__State__TRANSITION_STATE_SHUTTINGDOWN = 12
};
/// Constant 'TRANSITION_STATE_ACTIVATING'.
enum
{
lifecycle_msgs__msg__State__TRANSITION_STATE_ACTIVATING = 13
};
/// Constant 'TRANSITION_STATE_DEACTIVATING'.
enum
{
lifecycle_msgs__msg__State__TRANSITION_STATE_DEACTIVATING = 14
};
/// Constant 'TRANSITION_STATE_ERRORPROCESSING'.
enum
{
lifecycle_msgs__msg__State__TRANSITION_STATE_ERRORPROCESSING = 15
};
// Include directives for member types
// Member 'label'
#include "rosidl_runtime_c/string.h"
// Struct defined in msg/State in the package lifecycle_msgs.
typedef struct lifecycle_msgs__msg__State
{
uint8_t id;
rosidl_runtime_c__String label;
} lifecycle_msgs__msg__State;
// Struct for a sequence of lifecycle_msgs__msg__State.
typedef struct lifecycle_msgs__msg__State__Sequence
{
lifecycle_msgs__msg__State * data;
/// The number of valid items in data
size_t size;
/// The number of allocated items in data
size_t capacity;
} lifecycle_msgs__msg__State__Sequence;
#ifdef __cplusplus
}
#endif
#endif // LIFECYCLE_MSGS__MSG__DETAIL__STATE__STRUCT_H_
| 21.017857 | 67 | 0.806287 |
11fdd6ab0d8175d6449110d75846f98bc8dc4cc4 | 3,680 | sql | SQL | sql/15_new_set_behavior.sql | cpaelzer/pgl_ddl_deploy | e26befafe554b9e26a7e23ee51c583aabb06c46e | [
"MIT"
] | 44 | 2017-08-01T03:56:57.000Z | 2022-03-21T12:16:43.000Z | sql/15_new_set_behavior.sql | cpaelzer/pgl_ddl_deploy | e26befafe554b9e26a7e23ee51c583aabb06c46e | [
"MIT"
] | 38 | 2017-08-01T00:11:11.000Z | 2021-08-19T04:31:28.000Z | sql/15_new_set_behavior.sql | cpaelzer/pgl_ddl_deploy | e26befafe554b9e26a7e23ee51c583aabb06c46e | [
"MIT"
] | 16 | 2017-08-03T14:55:29.000Z | 2022-01-17T01:20:01.000Z | SET client_min_messages = warning;
\set VERBOSITY terse
--This should fail due to overlapping tags
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex, lock_safe_deployment, allow_multi_statements, include_only_repset_tables, create_tags, drop_tags)
SELECT 'test1', '.*', TRUE, TRUE, FALSE, '{"CREATE VIEW","ALTER VIEW","CREATE FUNCTION","ALTER FUNCTION"}', '{"DROP VIEW","DROP FUNCTION"}';
--But if we drop these tags from test1, it should work
UPDATE pgl_ddl_deploy.set_configs
SET create_tags = '{ALTER TABLE,CREATE SEQUENCE,ALTER SEQUENCE,CREATE SCHEMA,CREATE TABLE,CREATE TYPE,ALTER TYPE}',
drop_tags = '{DROP SCHEMA,DROP TABLE,DROP TYPE,DROP SEQUENCE}'
WHERE set_name = 'test1';
--Now this set will only handle these tags
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex, lock_safe_deployment, allow_multi_statements, include_only_repset_tables, create_tags, drop_tags)
SELECT 'test1', '.*', TRUE, TRUE, FALSE, '{"CREATE VIEW","ALTER VIEW","CREATE FUNCTION","ALTER FUNCTION"}', '{"DROP VIEW","DROP FUNCTION"}';
--include_only_repset_tables
CREATE TEMP TABLE repsets AS
WITH new_sets (set_name) AS (
VALUES ('my_special_tables_1'::TEXT),
('my_special_tables_2'::TEXT)
)
SELECT pglogical.create_replication_set
(set_name:=s.set_name
,replicate_insert:=TRUE
,replicate_update:=TRUE
,replicate_delete:=TRUE
,replicate_truncate:=TRUE) AS result
FROM new_sets s
WHERE NOT EXISTS (
SELECT 1
FROM pglogical.replication_set
WHERE set_name = s.set_name);
DROP TABLE repsets;
--Only ALTER TABLE makes sense (and is allowed) with include_only_repset_tables. So this should fail
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex, lock_safe_deployment, allow_multi_statements, include_only_repset_tables, create_tags)
SELECT 'my_special_tables_1', NULL, TRUE, TRUE, TRUE, '{"CREATE TABLE"}';
--This is OK
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex, lock_safe_deployment, allow_multi_statements, include_only_repset_tables, create_tags, drop_tags)
SELECT 'temp_1', NULL, TRUE, TRUE, TRUE, '{"ALTER TABLE"}', NULL;
DELETE FROM pgl_ddl_deploy.set_configs WHERE set_name = 'temp_1';
--This also should fail - no DROP tags at all allowed
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex, lock_safe_deployment, allow_multi_statements, include_only_repset_tables, create_tags, drop_tags)
SELECT 'my_special_tables_1', NULL, TRUE, TRUE, TRUE, '{"ALTER TABLE"}', '{"DROP TABLE"}';
--These both are OK
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex, lock_safe_deployment, allow_multi_statements, include_only_repset_tables, create_tags, drop_tags)
SELECT 'my_special_tables_1', NULL, TRUE, TRUE, TRUE, '{"ALTER TABLE"}', NULL;
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex, lock_safe_deployment, allow_multi_statements, include_only_repset_tables, create_tags, drop_tags)
SELECT 'my_special_tables_2', NULL, TRUE, TRUE, TRUE, '{"ALTER TABLE"}', NULL;
--Check we get the defaults we want from the trigger
BEGIN;
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_schema_regex)
VALUES ('temp_1', '.*');
SELECT create_tags, drop_tags FROM pgl_ddl_deploy.set_configs WHERE set_name = 'temp_1';
ROLLBACK;
BEGIN;
INSERT INTO pgl_ddl_deploy.set_configs (set_name, include_only_repset_tables)
VALUES ('temp_1', TRUE);
SELECT create_tags, drop_tags FROM pgl_ddl_deploy.set_configs WHERE set_name = 'temp_1';
ROLLBACK;
--Now deploy again separately
--By set_name:
SELECT pgl_ddl_deploy.deploy('test1');
--By set_config_id
SELECT pgl_ddl_deploy.deploy(id)
FROM pgl_ddl_deploy.set_configs
WHERE set_name = 'test1';
| 44.878049 | 169 | 0.796739 |
dd70aee6adff92943a38d0a573615b4c94186559 | 310 | php | PHP | src/test/resources/files/Metrics/Analyzer/MaintainabilityIndexAnalyzer/testAnalyzerRestoresExpectedMethodMetricsFromCache.php | hbaeumer/pdepend | e3a93d73ecda1b7fd5fb8114bc916a8000a1f751 | [
"BSD-3-Clause"
] | 731 | 2015-01-12T11:59:52.000Z | 2022-03-25T05:36:08.000Z | src/test/resources/files/Metrics/Analyzer/MaintainabilityIndexAnalyzer/testAnalyzerRestoresExpectedMethodMetricsFromCache.php | hbaeumer/pdepend | e3a93d73ecda1b7fd5fb8114bc916a8000a1f751 | [
"BSD-3-Clause"
] | 357 | 2015-01-07T14:23:08.000Z | 2022-02-26T23:39:55.000Z | src/test/resources/files/Metrics/Analyzer/MaintainabilityIndexAnalyzer/testAnalyzerRestoresExpectedMethodMetricsFromCache.php | hbaeumer/pdepend | e3a93d73ecda1b7fd5fb8114bc916a8000a1f751 | [
"BSD-3-Clause"
] | 125 | 2015-01-02T22:43:25.000Z | 2022-03-25T01:55:59.000Z | <?php
interface MIMethodInterface {
function pdepend1($x);
function pdepend2($x);
}
class MIMethodClass implements MIMethodInterface
{
function pdepend1($x)
{
$value = $x + 1;
return $value;
}
function pdepend2($x)
{
return $this->pdepend1( $x );
}
}
| 14.761905 | 48 | 0.577419 |
3e89db536d0666240b5ce09598a91d1ec75f82d5 | 83 | c | C | .vim/sourceCode/glibc-2.16.0/elf/ifuncmain2picstatic.c | lakehui/Vim_config | 6cab80dc1209b34bf6379f42b1a92790bd0c146b | [
"MIT"
] | 47 | 2015-03-10T23:21:52.000Z | 2022-02-17T01:04:14.000Z | .vim/sourceCode/glibc-2.16.0/elf/ifuncmain2picstatic.c | lakehui/Vim_config | 6cab80dc1209b34bf6379f42b1a92790bd0c146b | [
"MIT"
] | 1 | 2020-06-30T18:01:37.000Z | 2020-06-30T18:01:37.000Z | .vim/sourceCode/glibc-2.16.0/elf/ifuncmain2picstatic.c | lakehui/Vim_config | 6cab80dc1209b34bf6379f42b1a92790bd0c146b | [
"MIT"
] | 19 | 2015-02-25T19:50:05.000Z | 2021-10-05T14:35:54.000Z | /* Test STT_GNU_IFUNC symbols with -fPIC and -static. */
#include "ifuncmain2.c"
| 20.75 | 57 | 0.710843 |
61e45dc9a12d4cf74d840b8e02cac12951195553 | 1,492 | css | CSS | src/app/task/task.component.css | MyamotoMusashi/goals | a3b0fbc47be8cd9145eee7aa3c9dd5399559e672 | [
"MIT"
] | null | null | null | src/app/task/task.component.css | MyamotoMusashi/goals | a3b0fbc47be8cd9145eee7aa3c9dd5399559e672 | [
"MIT"
] | null | null | null | src/app/task/task.component.css | MyamotoMusashi/goals | a3b0fbc47be8cd9145eee7aa3c9dd5399559e672 | [
"MIT"
] | null | null | null | html,body{
height:100%;
font-size:11px;
}
.nav-menu{
list-style-type: none;
height:100%;
padding:0;
}
.nav-li{
border: 1px solid rgb(63, 72, 204);
}
.card-body{
padding:0;
}
#request{
border: 1px solid rgb(63, 72, 204);
color: white;
background-color: rgb(97, 97, 97);
}
#backButton, #editButton{
background-color: rgb(0, 162, 232);
color: white;
margin:5px;
}
#deleteButton{
color: white;
margin:5px;
}
.request-item{
border-bottom: 1px solid rgb(63, 72, 204);
}
.request-item-checkbox, .request-item-header{
display:inline-block;
}
.request-item-header{
color:black;
}
.request-item-content{
display:block;
background-color: rgb(97, 97, 97);
color:white;
white-space: pre;
}
.task-list{
display:block;
}
.request-item-checkbox:checked ~ .request-item-content{
display:none;
}
.request-item-checkbox:checked ~ .task-list{
display:none;
}
.add-task-button:active ~ .add-task-content{
display:none;
}
.CPE{
border-radius:3px;
background-color:rgb(255,225,0);
font-weight:500;
}
.Me{
border-radius:3px;
background-color:rgb(255,0,0);
font-weight:500;
}
.Customer{
border-radius:3px;
background-color:rgb(0,0,255);
font-weight:500;
}
.AdditionalResources{
border-radius:3px;
background-color:rgb(0,225,0);
font-weight:500;
}
.WebEx{
border-radius:3px;
background-color:rgb(255, 0, 255);
font-weight:500;
}
.Elevation{
border-radius:3px;
background-color:rgb(255, 125, 0);
font-weight:500;
}
.task-header{
display:inline-block;
}
| 13.688073 | 56 | 0.686327 |
dd7d53b7a5b6d897ea1cc6932901af854974c997 | 400 | sql | SQL | conf/evolutions/default/6.sql | prasetiady/order-transaction-api | 13fd8ca8c1d9667480a65fd4b48a520f586340d7 | [
"MIT"
] | null | null | null | conf/evolutions/default/6.sql | prasetiady/order-transaction-api | 13fd8ca8c1d9667480a65fd4b48a520f586340d7 | [
"MIT"
] | null | null | null | conf/evolutions/default/6.sql | prasetiady/order-transaction-api | 13fd8ca8c1d9667480a65fd4b48a520f586340d7 | [
"MIT"
] | null | null | null | # ShippingAddresses schema
# --- !Ups
CREATE TABLE ShippingAddresses (
id INT(11) NOT NULL AUTO_INCREMENT,
orderId INT(11) NOT NULL,
address VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
phoneNumber VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (orderId) REFERENCES Orders(id) ON DELETE CASCADE
);
# --- !Downs
DROP TABLE ShippingAddresses;
| 23.529412 | 63 | 0.7225 |
8578dada082a25b1ff3fee8412a36270d1d40c06 | 3,566 | js | JavaScript | node_modules/css-tree/lib/syntax/node/AttributeSelector.js | JintaoYang18/JintaoYang-LearningPython | 0d5671148bef583965bae7f2038f1fc2b6920b10 | [
"MIT"
] | 3 | 2016-09-05T05:38:15.000Z | 2016-09-07T10:56:53.000Z | node_modules/css-tree/lib/syntax/node/AttributeSelector.js | JintaoYang18/JintaoYang-LearningPython | 0d5671148bef583965bae7f2038f1fc2b6920b10 | [
"MIT"
] | 6 | 2021-12-01T20:31:27.000Z | 2022-02-25T06:17:00.000Z | node_modules/css-tree/lib/syntax/node/AttributeSelector.js | JintaoYang18/JintaoYang-LearningPython | 0d5671148bef583965bae7f2038f1fc2b6920b10 | [
"MIT"
] | 3 | 2022-01-20T09:05:27.000Z | 2022-02-26T20:01:36.000Z | import {
Ident,
String as StringToken,
Delim,
LeftSquareBracket,
RightSquareBracket
} from '../../tokenizer/index.js';
const DOLLARSIGN = 0x0024; // U+0024 DOLLAR SIGN ($)
const ASTERISK = 0x002A; // U+002A ASTERISK (*)
const EQUALSSIGN = 0x003D; // U+003D EQUALS SIGN (=)
const CIRCUMFLEXACCENT = 0x005E; // U+005E (^)
const VERTICALLINE = 0x007C; // U+007C VERTICAL LINE (|)
const TILDE = 0x007E; // U+007E TILDE (~)
function getAttributeName() {
if (this.eof) {
this.error('Unexpected end of input');
}
const start = this.tokenStart;
let expectIdent = false;
if (this.isDelim(ASTERISK)) {
expectIdent = true;
this.next();
} else if (!this.isDelim(VERTICALLINE)) {
this.eat(Ident);
}
if (this.isDelim(VERTICALLINE)) {
if (this.charCodeAt(this.tokenStart + 1) !== EQUALSSIGN) {
this.next();
this.eat(Ident);
} else if (expectIdent) {
this.error('Identifier is expected', this.tokenEnd);
}
} else if (expectIdent) {
this.error('Vertical line is expected');
}
return {
type: 'Identifier',
loc: this.getLocation(start, this.tokenStart),
name: this.substrToCursor(start)
};
}
function getOperator() {
const start = this.tokenStart;
const code = this.charCodeAt(start);
if (code !== EQUALSSIGN && // =
code !== TILDE && // ~=
code !== CIRCUMFLEXACCENT && // ^=
code !== DOLLARSIGN && // $=
code !== ASTERISK && // *=
code !== VERTICALLINE // |=
) {
this.error('Attribute selector (=, ~=, ^=, $=, *=, |=) is expected');
}
this.next();
if (code !== EQUALSSIGN) {
if (!this.isDelim(EQUALSSIGN)) {
this.error('Equal sign is expected');
}
this.next();
}
return this.substrToCursor(start);
}
// '[' <wq-name> ']'
// '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'
export const name = 'AttributeSelector';
export const structure = {
name: 'Identifier',
matcher: [String, null],
value: ['String', 'Identifier', null],
flags: [String, null]
};
export function parse() {
const start = this.tokenStart;
let name;
let matcher = null;
let value = null;
let flags = null;
this.eat(LeftSquareBracket);
this.skipSC();
name = getAttributeName.call(this);
this.skipSC();
if (this.tokenType !== RightSquareBracket) {
// avoid case `[name i]`
if (this.tokenType !== Ident) {
matcher = getOperator.call(this);
this.skipSC();
value = this.tokenType === StringToken
? this.String()
: this.Identifier();
this.skipSC();
}
// attribute flags
if (this.tokenType === Ident) {
flags = this.consume(Ident);
this.skipSC();
}
}
this.eat(RightSquareBracket);
return {
type: 'AttributeSelector',
loc: this.getLocation(start, this.tokenStart),
name,
matcher,
value,
flags
};
}
export function generate(node) {
this.token(Delim, '[');
this.node(node.name);
if (node.matcher !== null) {
this.tokenize(node.matcher);
this.node(node.value);
}
if (node.flags !== null) {
this.token(Ident, node.flags);
}
this.token(Delim, ']');
}
| 24.094595 | 87 | 0.535334 |
dd2659428be9ec4f3216053c47b38022eb1be569 | 10,816 | go | Go | writer.go | keakon/golog | 79d6ce5cf679092d038b5325fce1d8038cc1eace | [
"MIT"
] | 34 | 2018-11-22T15:39:24.000Z | 2021-12-28T08:51:48.000Z | writer.go | keakon/golog | 79d6ce5cf679092d038b5325fce1d8038cc1eace | [
"MIT"
] | 1 | 2018-11-25T01:53:52.000Z | 2018-11-26T02:54:03.000Z | writer.go | keakon/golog | 79d6ce5cf679092d038b5325fce1d8038cc1eace | [
"MIT"
] | 6 | 2018-11-23T04:48:51.000Z | 2021-12-31T07:50:54.000Z | package golog
import (
"bufio"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
"sync"
"time"
)
const (
fileFlag = os.O_WRONLY | os.O_CREATE | os.O_APPEND
fileMode = 0644
flushDuration = time.Millisecond * 100
rotateByDateFormat = "-20060102.log" // -YYYYmmdd.log
rotateByHourFormat = "-2006010215.log" // -YYYYmmddHH.log
)
const (
// RotateByDate set the log file to be rotated each day.
RotateByDate RotateDuration = iota
// RotateByHour set the log file to be rotated each hour.
RotateByHour
)
var bufferSize = 1024 * 1024 * 4
// RotateDuration specifies rotate duration type, should be either RotateByDate or RotateByHour.
type RotateDuration uint8
// DiscardWriter is a WriteCloser which write everything to devNull
type DiscardWriter struct {
io.Writer
}
// NewDiscardWriter creates a new ConsoleWriter.
func NewDiscardWriter() *DiscardWriter {
return &DiscardWriter{Writer: ioutil.Discard}
}
// Close sets its Writer to nil.
func (w *DiscardWriter) Close() error {
w.Writer = nil
return nil
}
// A ConsoleWriter is a writer which should not be acturelly closed.
type ConsoleWriter struct {
*os.File // faster than io.Writer
}
// NewConsoleWriter creates a new ConsoleWriter.
func NewConsoleWriter(f *os.File) *ConsoleWriter {
return &ConsoleWriter{File: f}
}
// NewStdoutWriter creates a new stdout writer.
func NewStdoutWriter() *ConsoleWriter {
return NewConsoleWriter(os.Stdout)
}
// NewStderrWriter creates a new stderr writer.
func NewStderrWriter() *ConsoleWriter {
return NewConsoleWriter(os.Stderr)
}
// Close sets its File to nil.
func (w *ConsoleWriter) Close() error {
w.File = nil
return nil
}
// NewFileWriter creates a FileWriter by its path.
func NewFileWriter(path string) (*os.File, error) {
return os.OpenFile(path, fileFlag, fileMode)
}
// A BufferedFileWriter is a buffered file writer.
// The written bytes will be flushed to the log file every 0.1 second,
// or when reaching the buffer capacity (4 MB).
type BufferedFileWriter struct {
writer *os.File
buffer *bufio.Writer
locker sync.Mutex
updateChan chan struct{}
stopChan chan struct{}
updated bool
}
// NewBufferedFileWriter creates a new BufferedFileWriter.
func NewBufferedFileWriter(path string) (*BufferedFileWriter, error) {
f, err := os.OpenFile(path, fileFlag, fileMode)
if err != nil {
return nil, err
}
w := &BufferedFileWriter{
writer: f,
buffer: bufio.NewWriterSize(f, bufferSize),
updateChan: make(chan struct{}, 1),
stopChan: make(chan struct{}),
}
go w.schedule()
return w, nil
}
func (w *BufferedFileWriter) schedule() {
timer := time.NewTimer(0)
for {
select {
case <-w.updateChan:
stopTimer(timer)
timer.Reset(flushDuration)
case <-w.stopChan:
stopTimer(timer)
return
}
select {
case <-timer.C:
w.locker.Lock()
var err error
if w.writer != nil { // not closed
w.updated = false
err = w.buffer.Flush()
}
w.locker.Unlock()
if err != nil {
logError(err)
}
case <-w.stopChan:
stopTimer(timer)
return
}
}
}
// Write writes a byte slice to the buffer.
func (w *BufferedFileWriter) Write(p []byte) (n int, err error) {
w.locker.Lock()
n, err = w.buffer.Write(p)
if !w.updated && n > 0 && w.buffer.Buffered() > 0 {
w.updated = true
w.updateChan <- struct{}{}
}
w.locker.Unlock()
return
}
// Close flushes the buffer, then closes the file writer.
func (w *BufferedFileWriter) Close() error {
close(w.stopChan)
w.locker.Lock()
err := w.buffer.Flush()
w.buffer = nil
if err == nil {
err = w.writer.Close()
} else {
e := w.writer.Close()
if e != nil {
logError(e)
}
}
w.writer = nil
w.locker.Unlock()
return err
}
// A RotatingFileWriter is a buffered file writer which will rotate before reaching its maxSize.
// An exception is when a record is larger than maxSize, it won't be separated into 2 files.
// It keeps at most backupCount backups.
type RotatingFileWriter struct {
BufferedFileWriter
path string
pos uint64
maxSize uint64
backupCount uint8
}
// NewRotatingFileWriter creates a new RotatingFileWriter.
func NewRotatingFileWriter(path string, maxSize uint64, backupCount uint8) (*RotatingFileWriter, error) {
if maxSize == 0 {
return nil, errors.New("maxSize cannot be 0")
}
if backupCount == 0 {
return nil, errors.New("backupCount cannot be 0")
}
f, err := os.OpenFile(path, fileFlag, fileMode)
if err != nil {
return nil, err
}
stat, err := f.Stat()
if err != nil {
e := f.Close()
if e != nil {
logError(e)
}
return nil, err
}
w := RotatingFileWriter{
BufferedFileWriter: BufferedFileWriter{
writer: f,
buffer: bufio.NewWriterSize(f, bufferSize),
updateChan: make(chan struct{}, 1),
stopChan: make(chan struct{}),
},
path: path,
pos: uint64(stat.Size()),
maxSize: maxSize,
backupCount: backupCount,
}
go w.schedule()
return &w, nil
}
// Write writes a byte slice to the buffer and rotates if reaching its maxSize.
func (w *RotatingFileWriter) Write(p []byte) (n int, err error) {
length := uint64(len(p))
w.locker.Lock()
defer w.locker.Unlock()
if length >= w.maxSize {
err = w.rotate()
if err != nil {
return
}
n, err = w.buffer.Write(p)
if err != nil {
w.pos = uint64(n)
return
}
err = w.rotate()
} else {
pos := w.pos + length
if pos > w.maxSize {
err = w.rotate()
if err != nil {
return
}
}
n, err = w.buffer.Write(p)
if n > 0 {
w.pos += uint64(n)
if !w.updated && w.buffer.Buffered() > 0 {
w.updated = true
w.updateChan <- struct{}{}
}
}
}
return
}
// rotate rotates the log file. It should be called within a lock block.
func (w *RotatingFileWriter) rotate() error {
if w.writer == nil { // was closed
return os.ErrClosed
}
err := w.buffer.Flush()
if err != nil {
return err
}
err = w.writer.Close()
w.pos = 0
if err != nil {
w.writer = nil
w.buffer = nil
return err
}
for i := w.backupCount; i > 1; i-- {
oldPath := fmt.Sprintf("%s.%d", w.path, i-1)
newPath := fmt.Sprintf("%s.%d", w.path, i)
os.Rename(oldPath, newPath) // ignore error
}
err = os.Rename(w.path, w.path+".1")
if err != nil {
w.writer = nil
w.buffer = nil
return err
}
f, err := os.OpenFile(w.path, fileFlag, fileMode)
if err != nil {
w.writer = nil
w.buffer = nil
return err
}
w.writer = f
w.buffer.Reset(f)
return nil
}
// A TimedRotatingFileWriter is a buffered file writer which will rotate by time.
// Its rotateDuration can be either RotateByDate or RotateByHour.
// It keeps at most backupCount backups.
type TimedRotatingFileWriter struct {
BufferedFileWriter
pathPrefix string
rotateDuration RotateDuration
backupCount uint8
}
// NewTimedRotatingFileWriter creates a new TimedRotatingFileWriter.
func NewTimedRotatingFileWriter(pathPrefix string, rotateDuration RotateDuration, backupCount uint8) (*TimedRotatingFileWriter, error) {
if backupCount == 0 {
return nil, errors.New("backupCount cannot be 0")
}
f, err := openTimedRotatingFile(pathPrefix, rotateDuration)
if err != nil {
return nil, err
}
w := TimedRotatingFileWriter{
BufferedFileWriter: BufferedFileWriter{
writer: f,
buffer: bufio.NewWriterSize(f, bufferSize),
updateChan: make(chan struct{}, 1),
stopChan: make(chan struct{}),
},
pathPrefix: pathPrefix,
rotateDuration: rotateDuration,
backupCount: backupCount,
}
go w.schedule()
return &w, nil
}
func (w *TimedRotatingFileWriter) schedule() {
locker := &w.locker
flushTimer := time.NewTimer(0)
duration := nextRotateDuration(w.rotateDuration)
rotateTimer := time.NewTimer(duration)
for {
updateLoop:
for {
select {
case <-w.updateChan:
stopTimer(flushTimer)
flushTimer.Reset(flushDuration)
break updateLoop
case <-rotateTimer.C:
err := w.rotate(rotateTimer)
if err != nil {
logError(err)
}
case <-w.stopChan:
stopTimer(flushTimer)
stopTimer(rotateTimer)
return
}
}
flushLoop:
for {
select {
case <-flushTimer.C:
locker.Lock()
var err error
if w.writer != nil { // not closed
w.updated = false
err = w.buffer.Flush()
}
locker.Unlock()
if err != nil {
logError(err)
}
break flushLoop
case <-rotateTimer.C:
err := w.rotate(rotateTimer)
if err != nil {
logError(err)
}
case <-w.stopChan:
stopTimer(flushTimer)
stopTimer(rotateTimer)
return
}
}
}
}
// rotate rotates the log file.
func (w *TimedRotatingFileWriter) rotate(timer *time.Timer) error {
w.locker.Lock()
if w.writer == nil { // was closed
w.locker.Unlock()
return nil // usually happens when program exits, should be ignored
}
err := w.buffer.Flush()
if err != nil {
w.locker.Unlock()
return err
}
err = w.writer.Close()
if err != nil {
w.locker.Unlock()
return err
}
f, err := openTimedRotatingFile(w.pathPrefix, w.rotateDuration)
if err != nil {
w.buffer = nil
w.writer = nil
w.locker.Unlock()
return err
}
w.writer = f
w.buffer.Reset(f)
duration := nextRotateDuration(w.rotateDuration)
timer.Reset(duration)
w.locker.Unlock()
go w.purge()
return nil
}
// purge removes the outdated backups.
func (w *TimedRotatingFileWriter) purge() {
pathes, err := filepath.Glob(w.pathPrefix + "*")
if err != nil {
logError(err)
return
}
count := len(pathes) - int(w.backupCount) - 1
if count > 0 {
var name string
w.locker.Lock()
if w.writer != nil { // not closed
name = w.writer.Name()
}
w.locker.Unlock()
sort.Strings(pathes)
for i := 0; i < count; i++ {
path := pathes[i]
if path != name {
err = os.Remove(path)
if err != nil {
logError(err)
}
}
}
}
}
// openTimedRotatingFile opens a log file for TimedRotatingFileWriter
func openTimedRotatingFile(path string, rotateDuration RotateDuration) (*os.File, error) {
var pathSuffix string
t := now()
switch rotateDuration {
case RotateByDate:
pathSuffix = t.Format(rotateByDateFormat)
case RotateByHour:
pathSuffix = t.Format(rotateByHourFormat)
default:
return nil, errors.New("invalid rotateDuration")
}
return os.OpenFile(path+pathSuffix, fileFlag, fileMode)
}
// nextRotateDuration returns the next rotate duration for the rotateTimer.
// It is defined as a variable in order to mock it in the unit testing.
var nextRotateDuration = func(rotateDuration RotateDuration) time.Duration {
now := now()
var nextTime time.Time
if rotateDuration == RotateByDate {
nextTime = time.Date(now.Year(), now.Month(), now.Day()+1, 0, 0, 0, 0, now.Location())
} else {
nextTime = time.Date(now.Year(), now.Month(), now.Day(), now.Hour()+1, 0, 0, 0, now.Location())
}
return nextTime.Sub(now)
}
| 21.675351 | 136 | 0.669749 |
1601913aa4a0e5887ce2f44c8d9abc8b1569ceba | 13,872 | c | C | freebsd3/sys/i386/isa/intr_machdep.c | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 91 | 2015-01-05T15:18:31.000Z | 2022-03-11T16:43:28.000Z | freebsd3/sys/i386/isa/intr_machdep.c | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 1 | 2016-02-25T15:57:55.000Z | 2016-02-25T16:01:02.000Z | freebsd3/sys/i386/isa/intr_machdep.c | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 21 | 2015-02-07T08:23:07.000Z | 2021-12-14T06:01:49.000Z | /*-
* Copyright (c) 1991 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* William Jolitz.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
* $Id: intr_machdep.c,v 1.16 1999/01/08 19:17:48 bde Exp $
*/
#include "opt_auto_eoi.h"
#include <sys/param.h>
#ifndef SMP
#include <machine/lock.h>
#endif
#include <sys/systm.h>
#include <sys/syslog.h>
#include <machine/ipl.h>
#include <machine/md_var.h>
#include <machine/segments.h>
#if defined(APIC_IO)
#include <machine/smp.h>
#include <machine/smptests.h> /** FAST_HI */
#endif /* APIC_IO */
#include <i386/isa/isa_device.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
#include <pc98/pc98/pc98_machdep.h>
#include <pc98/pc98/epsonio.h>
#else
#include <i386/isa/isa.h>
#endif
#include <i386/isa/icu.h>
#include "vector.h"
#include <i386/isa/intr_machdep.h>
#include <sys/interrupt.h>
#ifdef APIC_IO
#include <machine/clock.h>
#endif
/* XXX should be in suitable include files */
#ifdef PC98
#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */
#define ICU_SLAVEID 7
#else
#define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */
#define ICU_SLAVEID 2
#endif
#ifdef APIC_IO
/*
* This is to accommodate "mixed-mode" programming for
* motherboards that don't connect the 8254 to the IO APIC.
*/
#define AUTO_EOI_1 1
#endif
u_long *intr_countp[ICU_LEN];
inthand2_t *intr_handler[ICU_LEN];
u_int intr_mask[ICU_LEN];
static u_int* intr_mptr[ICU_LEN];
void *intr_unit[ICU_LEN];
static inthand_t *fastintr[ICU_LEN] = {
&IDTVEC(fastintr0), &IDTVEC(fastintr1),
&IDTVEC(fastintr2), &IDTVEC(fastintr3),
&IDTVEC(fastintr4), &IDTVEC(fastintr5),
&IDTVEC(fastintr6), &IDTVEC(fastintr7),
&IDTVEC(fastintr8), &IDTVEC(fastintr9),
&IDTVEC(fastintr10), &IDTVEC(fastintr11),
&IDTVEC(fastintr12), &IDTVEC(fastintr13),
&IDTVEC(fastintr14), &IDTVEC(fastintr15)
#if defined(APIC_IO)
, &IDTVEC(fastintr16), &IDTVEC(fastintr17),
&IDTVEC(fastintr18), &IDTVEC(fastintr19),
&IDTVEC(fastintr20), &IDTVEC(fastintr21),
&IDTVEC(fastintr22), &IDTVEC(fastintr23)
#endif /* APIC_IO */
};
static inthand_t *slowintr[ICU_LEN] = {
&IDTVEC(intr0), &IDTVEC(intr1), &IDTVEC(intr2), &IDTVEC(intr3),
&IDTVEC(intr4), &IDTVEC(intr5), &IDTVEC(intr6), &IDTVEC(intr7),
&IDTVEC(intr8), &IDTVEC(intr9), &IDTVEC(intr10), &IDTVEC(intr11),
&IDTVEC(intr12), &IDTVEC(intr13), &IDTVEC(intr14), &IDTVEC(intr15)
#if defined(APIC_IO)
, &IDTVEC(intr16), &IDTVEC(intr17), &IDTVEC(intr18), &IDTVEC(intr19),
&IDTVEC(intr20), &IDTVEC(intr21), &IDTVEC(intr22), &IDTVEC(intr23)
#endif /* APIC_IO */
};
static inthand2_t isa_strayintr;
#ifdef PC98
#define NMI_PARITY 0x04
#define NMI_EPARITY 0x02
#else
#define NMI_PARITY (1 << 7)
#define NMI_IOCHAN (1 << 6)
#define ENMI_WATCHDOG (1 << 7)
#define ENMI_BUSTIMER (1 << 6)
#define ENMI_IOSTATUS (1 << 5)
#endif
/*
* Handle a NMI, possibly a machine check.
* return true to panic system, false to ignore.
*/
int
isa_nmi(cd)
int cd;
{
#ifdef PC98
int port = inb(0x33);
if (epson_machine_id == 0x20)
epson_outb(0xc16, epson_inb(0xc16) | 0x1);
if (port & NMI_PARITY) {
panic("BASE RAM parity error, likely hardware failure.");
} else if (port & NMI_EPARITY) {
panic("EXTENDED RAM parity error, likely hardware failure.");
} else {
printf("\nNMI Resume ??\n");
return(0);
}
#else /* IBM-PC */
int isa_port = inb(0x61);
int eisa_port = inb(0x461);
if (isa_port & NMI_PARITY)
panic("RAM parity error, likely hardware failure.");
if (isa_port & NMI_IOCHAN)
panic("I/O channel check, likely hardware failure.");
/*
* On a real EISA machine, this will never happen. However it can
* happen on ISA machines which implement XT style floating point
* error handling (very rare). Save them from a meaningless panic.
*/
if (eisa_port == 0xff)
return(0);
if (eisa_port & ENMI_WATCHDOG)
panic("EISA watchdog timer expired, likely hardware failure.");
if (eisa_port & ENMI_BUSTIMER)
panic("EISA bus timeout, likely hardware failure.");
if (eisa_port & ENMI_IOSTATUS)
panic("EISA I/O port status error.");
printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
return(0);
#endif
}
/*
* Fill in default interrupt table (in case of spuruious interrupt
* during configuration of kernel, setup interrupt control unit
*/
void
isa_defaultirq()
{
int i;
/* icu vectors */
for (i = 0; i < ICU_LEN; i++)
icu_unset(i, (inthand2_t *)NULL);
/* initialize 8259's */
outb(IO_ICU1, 0x11); /* reset; program device, four bytes */
outb(IO_ICU1+ICU_IMR_OFFSET, NRSVIDT); /* starting at this vector index */
outb(IO_ICU1+ICU_IMR_OFFSET, IRQ_SLAVE); /* slave on line 7 */
#ifdef PC98
#ifdef AUTO_EOI_1
outb(IO_ICU1+ICU_IMR_OFFSET, 0x1f); /* (master) auto EOI, 8086 mode */
#else
outb(IO_ICU1+ICU_IMR_OFFSET, 0x1d); /* (master) 8086 mode */
#endif
#else /* IBM-PC */
#ifdef AUTO_EOI_1
outb(IO_ICU1+ICU_IMR_OFFSET, 2 | 1); /* auto EOI, 8086 mode */
#else
outb(IO_ICU1+ICU_IMR_OFFSET, 1); /* 8086 mode */
#endif
#endif /* PC98 */
outb(IO_ICU1+ICU_IMR_OFFSET, 0xff); /* leave interrupts masked */
outb(IO_ICU1, 0x0a); /* default to IRR on read */
#ifndef PC98
outb(IO_ICU1, 0xc0 | (3 - 1)); /* pri order 3-7, 0-2 (com2 first) */
#endif /* !PC98 */
outb(IO_ICU2, 0x11); /* reset; program device, four bytes */
outb(IO_ICU2+ICU_IMR_OFFSET, NRSVIDT+8); /* staring at this vector index */
outb(IO_ICU2+ICU_IMR_OFFSET, ICU_SLAVEID); /* my slave id is 7 */
#ifdef PC98
outb(IO_ICU2+ICU_IMR_OFFSET,9); /* 8086 mode */
#else /* IBM-PC */
#ifdef AUTO_EOI_2
outb(IO_ICU2+ICU_IMR_OFFSET, 2 | 1); /* auto EOI, 8086 mode */
#else
outb(IO_ICU2+ICU_IMR_OFFSET,1); /* 8086 mode */
#endif
#endif /* PC98 */
outb(IO_ICU2+ICU_IMR_OFFSET, 0xff); /* leave interrupts masked */
outb(IO_ICU2, 0x0a); /* default to IRR on read */
}
/*
* Caught a stray interrupt, notify
*/
static void
isa_strayintr(vcookiep)
void *vcookiep;
{
int intr = (void **)vcookiep - &intr_unit[0];
/* DON'T BOTHER FOR NOW! */
/* for some reason, we get bursts of intr #7, even if not enabled! */
/*
* Well the reason you got bursts of intr #7 is because someone
* raised an interrupt line and dropped it before the 8259 could
* prioritize it. This is documented in the intel data book. This
* means you have BAD hardware! I have changed this so that only
* the first 5 get logged, then it quits logging them, and puts
* out a special message. rgrimes 3/25/1993
*/
/*
* XXX TODO print a different message for #7 if it is for a
* glitch. Glitches can be distinguished from real #7's by
* testing that the in-service bit is _not_ set. The test
* must be done before sending an EOI so it can't be done if
* we are using AUTO_EOI_1.
*/
if (intrcnt[NR_DEVICES + intr] <= 5)
log(LOG_ERR, "stray irq %d\n", intr);
if (intrcnt[NR_DEVICES + intr] == 5)
log(LOG_CRIT,
"too many stray irq %d's; not logging any more\n", intr);
}
/*
* Return a bitmap of the current interrupt requests. This is 8259-specific
* and is only suitable for use at probe time.
*/
intrmask_t
isa_irq_pending()
{
u_char irr1;
u_char irr2;
irr1 = inb(IO_ICU1);
irr2 = inb(IO_ICU2);
return ((irr2 << 8) | irr1);
}
int
update_intr_masks(void)
{
int intr, n=0;
u_int mask,*maskptr;
for (intr=0; intr < ICU_LEN; intr ++) {
#if defined(APIC_IO)
/* no 8259 SLAVE to ignore */
#else
if (intr==ICU_SLAVEID) continue; /* ignore 8259 SLAVE output */
#endif /* APIC_IO */
maskptr = intr_mptr[intr];
if (!maskptr) continue;
*maskptr |= 1 << intr;
mask = *maskptr;
if (mask != intr_mask[intr]) {
#if 0
printf ("intr_mask[%2d] old=%08x new=%08x ptr=%p.\n",
intr, intr_mask[intr], mask, maskptr);
#endif
intr_mask[intr]=mask;
n++;
}
}
return (n);
}
/*
* The find_device_id function is only required because of the way the
* device names are currently stored for reporting in systat or vmstat.
* In fact, those programs should be modified to use the sysctl interface
* to obtain a list of driver names by traversing intreclist_head[irq].
*/
static int
find_device_id(int irq)
{
char buf[16];
char *cp;
int free_id, id;
snprintf(buf, sizeof(buf), "pci irq%d", irq);
cp = intrnames;
/* default to 0, which corresponds to clk0 */
free_id = 0;
for (id = 0; id < NR_DEVICES; id++) {
if (strcmp(cp, buf) == 0)
return (id);
if (free_id == 0 && strcmp(cp, "pci irqnn") == 0)
free_id = id;
while (*cp++ != '\0');
}
#if 0
if (free_id == 0) {
/*
* All pci irq counters are in use, perhaps because config
* is old so there aren't any. Abuse the clk0 counter.
*/
printf("\tcounting shared irq%d as clk0 irq\n", irq);
}
#endif
return (free_id);
}
void
update_intrname(int intr, int device_id)
{
char *cp;
int id;
if (device_id == -1)
device_id = find_device_id(intr);
if ((u_int)device_id >= NR_DEVICES)
return;
intr_countp[intr] = &intrcnt[device_id];
for (cp = intrnames, id = 0; id <= device_id; id++)
while (*cp++ != '\0')
;
if (cp > eintrnames)
return;
if (intr < 10) {
cp[-3] = intr + '0';
cp[-2] = ' ';
} else if (intr < 20) {
cp[-3] = '1';
cp[-2] = intr - 10 + '0';
} else {
cp[-3] = '2';
cp[-2] = intr - 20 + '0';
}
}
int
icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
{
#ifdef FAST_HI
int select; /* the select register is 8 bits */
int vector;
u_int32_t value; /* the window register is 32 bits */
#endif /* FAST_HI */
u_long ef;
u_int mask = (maskptr ? *maskptr : 0);
#if defined(APIC_IO)
if ((u_int)intr >= ICU_LEN) /* no 8259 SLAVE to ignore */
#else
if ((u_int)intr >= ICU_LEN || intr == ICU_SLAVEID)
#endif /* APIC_IO */
if (intr_handler[intr] != isa_strayintr)
return (EBUSY);
ef = read_eflags();
disable_intr();
intr_handler[intr] = handler;
intr_mptr[intr] = maskptr;
intr_mask[intr] = mask | (1 << intr);
intr_unit[intr] = arg;
#ifdef FAST_HI
if (flags & INTR_FAST) {
vector = TPR_FAST_INTS + intr;
setidt(vector, fastintr[intr],
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
}
else {
vector = TPR_SLOW_INTS + intr;
#ifdef APIC_INTR_REORDER
#ifdef APIC_INTR_HIGHPRI_CLOCK
/* XXX: Hack (kludge?) for more accurate clock. */
if (intr == apic_8254_intr || intr == 8) {
vector = TPR_FAST_INTS + intr;
}
#endif
#endif
setidt(vector, slowintr[intr],
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
}
#ifdef APIC_INTR_REORDER
set_lapic_isrloc(intr, vector);
#endif
/*
* Reprogram the vector in the IO APIC.
*/
if (int_to_apicintpin[intr].ioapic >= 0) {
select = int_to_apicintpin[intr].redirindex;
value = io_apic_read(int_to_apicintpin[intr].ioapic,
select) & ~IOART_INTVEC;
io_apic_write(int_to_apicintpin[intr].ioapic,
select, value | vector);
}
#else
setidt(ICU_OFFSET + intr,
flags & INTR_FAST ? fastintr[intr] : slowintr[intr],
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif /* FAST_HI */
INTREN(1 << intr);
MPINTR_UNLOCK();
write_eflags(ef);
return (0);
}
void
register_imask(dvp, mask)
struct isa_device *dvp;
u_int mask;
{
if (dvp->id_alive && dvp->id_irq) {
int intr;
intr = ffs(dvp->id_irq) - 1;
intr_mask[intr] = mask | (1 <<intr);
}
(void) update_intr_masks();
}
int
icu_unset(intr, handler)
int intr;
inthand2_t *handler;
{
u_long ef;
if ((u_int)intr >= ICU_LEN || handler != intr_handler[intr])
return (EINVAL);
INTRDIS(1 << intr);
ef = read_eflags();
disable_intr();
intr_countp[intr] = &intrcnt[NR_DEVICES + intr];
intr_handler[intr] = isa_strayintr;
intr_mptr[intr] = NULL;
intr_mask[intr] = HWI_MASK | SWI_MASK;
intr_unit[intr] = &intr_unit[intr];
#ifdef FAST_HI_XXX
/* XXX how do I re-create dvp here? */
setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr,
slowintr[intr], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#else /* FAST_HI */
#ifdef APIC_INTR_REORDER
set_lapic_isrloc(intr, ICU_OFFSET + intr);
#endif
setidt(ICU_OFFSET + intr, slowintr[intr], SDT_SYS386IGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
#endif /* FAST_HI */
MPINTR_UNLOCK();
write_eflags(ef);
return (0);
}
| 27.633466 | 78 | 0.685482 |
f0618ae5c1b87db23e1c15aeed2890efe625454b | 283 | py | Python | src_Python/EtabsAPIaface0/a01comtypes/Excel03c.py | fjmucho/APIdeEtabsYPython | a5c7f7fe1861c4ac3c9370ef06e291f94c6fd523 | [
"MIT"
] | null | null | null | src_Python/EtabsAPIaface0/a01comtypes/Excel03c.py | fjmucho/APIdeEtabsYPython | a5c7f7fe1861c4ac3c9370ef06e291f94c6fd523 | [
"MIT"
] | null | null | null | src_Python/EtabsAPIaface0/a01comtypes/Excel03c.py | fjmucho/APIdeEtabsYPython | a5c7f7fe1861c4ac3c9370ef06e291f94c6fd523 | [
"MIT"
] | null | null | null | import sys
import comtypes
from comtypes.client import CreateObject
try:
# Connecting | coneccion
xl = CreateObject("Excel.Application")
except (OSError, comtypes.COMError):
print("No tiene instalada el programa(Excel).")
sys.exit(-1)
xl.Visible = True
print (xl) | 20.214286 | 49 | 0.720848 |
b94faae1f72e7fcf8bf42c427758ec8afd1fcc48 | 5,985 | c | C | oskar/telescope/station/src/oskar_evaluate_tec_screen.c | happyseayou/OSKAR | 3fb995ed39deb6b11da12524e8e30f0ca8f9c39b | [
"BSD-3-Clause"
] | 1 | 2022-02-23T16:48:00.000Z | 2022-02-23T16:48:00.000Z | oskar/telescope/station/src/oskar_evaluate_tec_screen.c | happyseayou/OSKAR | 3fb995ed39deb6b11da12524e8e30f0ca8f9c39b | [
"BSD-3-Clause"
] | null | null | null | oskar/telescope/station/src/oskar_evaluate_tec_screen.c | happyseayou/OSKAR | 3fb995ed39deb6b11da12524e8e30f0ca8f9c39b | [
"BSD-3-Clause"
] | null | null | null | /*
* Copyright (c) 2019, The University of Oxford
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the University of Oxford 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.
*/
#include "telescope/station/oskar_evaluate_tec_screen.h"
#include "telescope/station/define_evaluate_tec_screen.h"
#include "utility/oskar_kernel_macros.h"
#include "utility/oskar_device.h"
#ifdef __cplusplus
extern "C" {
#endif
OSKAR_EVALUATE_TEC_SCREEN(evaluate_tec_screen_float, float, float2)
OSKAR_EVALUATE_TEC_SCREEN(evaluate_tec_screen_double, double, double2)
void oskar_evaluate_tec_screen(
int num_points,
const oskar_Mem* l,
const oskar_Mem* m,
double station_u_m,
double station_v_m,
double frequency_hz,
double screen_height_m,
double screen_pixel_size_m,
int screen_num_pixels_x,
int screen_num_pixels_y,
const oskar_Mem* tec_screen,
int offset_out,
oskar_Mem* out,
int* status)
{
if (*status) return;
const double inv_pixel_size_m = 1.0 / screen_pixel_size_m;
const double inv_freq_hz = 1.0 / frequency_hz;
const float inv_freq_hz_f = (float) inv_freq_hz;
const float inv_pixel_size_m_f = (float) inv_pixel_size_m;
const float station_u_f = (float) station_u_m;
const float station_v_f = (float) station_v_m;
const float screen_height_m_f = (float) screen_height_m;
const int location = oskar_mem_location(tec_screen);
if (location == OSKAR_CPU)
{
if (oskar_mem_type(tec_screen) == OSKAR_SINGLE)
{
evaluate_tec_screen_float(num_points,
oskar_mem_float_const(l, status),
oskar_mem_float_const(m, status),
station_u_f, station_v_f, inv_freq_hz_f,
screen_height_m_f, inv_pixel_size_m_f,
screen_num_pixels_x, screen_num_pixels_y,
oskar_mem_float_const(tec_screen, status), offset_out,
oskar_mem_float2(out, status));
}
else
{
evaluate_tec_screen_double(num_points,
oskar_mem_double_const(l, status),
oskar_mem_double_const(m, status),
station_u_m, station_v_m, inv_freq_hz,
screen_height_m, inv_pixel_size_m,
screen_num_pixels_x, screen_num_pixels_y,
oskar_mem_double_const(tec_screen, status), offset_out,
oskar_mem_double2(out, status));
}
}
else
{
size_t local_size[] = {256, 1, 1}, global_size[] = {1, 1, 1};
const char* k = 0;
const int is_dbl = oskar_mem_is_double(tec_screen);
switch (oskar_mem_type(tec_screen))
{
case OSKAR_SINGLE:
k = "evaluate_tec_screen_float"; break;
case OSKAR_DOUBLE:
k = "evaluate_tec_screen_double"; break;
default:
*status = OSKAR_ERR_BAD_DATA_TYPE;
return;
}
oskar_device_check_local_size(location, 0, local_size);
global_size[0] = oskar_device_global_size(
(size_t) num_points, local_size[0]);
const oskar_Arg args[] = {
{INT_SZ, &num_points},
{PTR_SZ, oskar_mem_buffer_const(l)},
{PTR_SZ, oskar_mem_buffer_const(m)},
{is_dbl ? DBL_SZ : FLT_SZ, is_dbl ?
(const void*)&station_u_m : (const void*)&station_u_f},
{is_dbl ? DBL_SZ : FLT_SZ, is_dbl ?
(const void*)&station_v_m : (const void*)&station_v_f},
{is_dbl ? DBL_SZ : FLT_SZ, is_dbl ?
(const void*)&inv_freq_hz :
(const void*)&inv_freq_hz_f},
{is_dbl ? DBL_SZ : FLT_SZ, is_dbl ?
(const void*)&screen_height_m :
(const void*)&screen_height_m_f},
{is_dbl ? DBL_SZ : FLT_SZ, is_dbl ?
(const void*)&inv_pixel_size_m :
(const void*)&inv_pixel_size_m_f},
{INT_SZ, &screen_num_pixels_x},
{INT_SZ, &screen_num_pixels_y},
{PTR_SZ, oskar_mem_buffer_const(tec_screen)},
{INT_SZ, &offset_out},
{PTR_SZ, oskar_mem_buffer(out)}
};
oskar_device_launch_kernel(k, location, 1, local_size, global_size,
sizeof(args) / sizeof(oskar_Arg), args, 0, 0, status);
}
}
#ifdef __cplusplus
}
#endif
| 42.75 | 79 | 0.63726 |
127c95577eadb08893786dedca6e1a280c7c8556 | 131 | c | C | porting/liteos_m/kernel/src/stdio/snprintf.c | openharmony-gitee-mirror/third_party_musl | 8cb5b45210bfb0f583bcf8b50de8299843b5e075 | [
"MIT"
] | null | null | null | porting/liteos_m/kernel/src/stdio/snprintf.c | openharmony-gitee-mirror/third_party_musl | 8cb5b45210bfb0f583bcf8b50de8299843b5e075 | [
"MIT"
] | null | null | null | porting/liteos_m/kernel/src/stdio/snprintf.c | openharmony-gitee-mirror/third_party_musl | 8cb5b45210bfb0f583bcf8b50de8299843b5e075 | [
"MIT"
] | 1 | 2021-09-13T11:14:33.000Z | 2021-09-13T11:14:33.000Z | #include <stdio.h>
#include <stdarg.h>
int snprintf(char *restrict s, size_t n, const char *restrict fmt, ...)
{
return 0;
}
| 14.555556 | 71 | 0.648855 |
5fd7be5522d18325311c01bb82bdb4e867409fbb | 335 | h | C | devilcore/devilcore/source/devil/core/DevilDebugController.h | muyoungko/devil_ios | 0e6085261025e3c3690e397ef9f9f3a864c06287 | [
"MIT"
] | null | null | null | devilcore/devilcore/source/devil/core/DevilDebugController.h | muyoungko/devil_ios | 0e6085261025e3c3690e397ef9f9f3a864c06287 | [
"MIT"
] | null | null | null | devilcore/devilcore/source/devil/core/DevilDebugController.h | muyoungko/devil_ios | 0e6085261025e3c3690e397ef9f9f3a864c06287 | [
"MIT"
] | null | null | null | //
// DevilDebugController.h
// devilcore
//
// Created by Mu Young Ko on 2021/02/03.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "DevilBaseController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DevilDebugController : DevilBaseController<UITableViewDelegate, UITableViewDataSource>
@end
NS_ASSUME_NONNULL_END
| 18.611111 | 97 | 0.785075 |
9bd28b6d74f5c7b039d72b4f36e902ad1cf558f4 | 271 | js | JavaScript | client/actions/ProductActions.js | TobiahRex/chFinal | 194b9f2730616e71f8e1150f5187e0f0937a71a6 | [
"MIT"
] | 1 | 2016-08-02T18:41:29.000Z | 2016-08-02T18:41:29.000Z | client/actions/ProductActions.js | TobiahRex/chFinal | 194b9f2730616e71f8e1150f5187e0f0937a71a6 | [
"MIT"
] | null | null | null | client/actions/ProductActions.js | TobiahRex/chFinal | 194b9f2730616e71f8e1150f5187e0f0937a71a6 | [
"MIT"
] | null | null | null | import API from '../API'
const ProductActions = {
getAllMods() {
API.getAllMods();
},
getOneMod(id) {
API.getOneMod(id);
},
addNewMod(mod) {
API.addNewMod(mod);
},
removeMod(id) {
API.removeMod(id);
},
}
export default ProductActions
| 13.55 | 29 | 0.597786 |
918d8837334d65a784c5896f46d304b17cc4a4b6 | 6,440 | kt | Kotlin | SimpleNotification/app/src/main/java/com/greimul/simplenotification/MainActivity.kt | GreimuL/SimpleNotification | 6be505f8f0dc91f92e86f8909615d535639a94f5 | [
"MIT"
] | 1 | 2019-10-30T08:45:41.000Z | 2019-10-30T08:45:41.000Z | SimpleNotification/app/src/main/java/com/greimul/simplenotification/MainActivity.kt | GreimuL/SimpleNotification | 6be505f8f0dc91f92e86f8909615d535639a94f5 | [
"MIT"
] | null | null | null | SimpleNotification/app/src/main/java/com/greimul/simplenotification/MainActivity.kt | GreimuL/SimpleNotification | 6be505f8f0dc91f92e86f8909615d535639a94f5 | [
"MIT"
] | null | null | null | package com.greimul.simplenotification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.content.Intent
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.appcompat.app.AlertDialog
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.greimul.simplenotification.bgservice.NotificationPullService
import com.greimul.simplenotification.server.GetListener
import com.greimul.simplenotification.server.getAllNotification
import com.greimul.simplenotification.server.getNotification
import com.greimul.simplenotification.server.postNotification
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.dialog_add_notification.view.*
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.async
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
var notificationArray:MutableList<NotificationData> = mutableListOf()
class MainActivity : AppCompatActivity() {
private lateinit var recyclerView:RecyclerView
private lateinit var viewManager:RecyclerView.LayoutManager
private lateinit var viewAdapter:NotificationViewAdapter
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if(data!=null) {
val deletePosition = data.getIntExtra("pos", -1)
if (deletePosition != -1) {
deleteItem(deletePosition)
Log.d("isdel", "$deletePosition")
}
}
}
override fun onResume(){
super.onResume()
getAllData()
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val deletePosition = intent.getIntExtra("pos",-1)
createNotificationChannel()
viewManager = LinearLayoutManager(this).apply {
stackFromEnd = true
}
viewAdapter = NotificationViewAdapter(notificationArray)
recyclerView = notificationRecyclerView.apply {
setHasFixedSize(true)
layoutManager = viewManager
adapter = viewAdapter
}
viewAdapter.clickListner = object:NotificationViewAdapter.OnClickListener{
override fun onClick(v: View, pos: Int) {
startActivityForResult(Intent(this@MainActivity,DescriptionActivity::class.java)
.putExtra("id",notificationArray[pos].id)
.putExtra("pos",pos),0)
Log.d("Click","${notificationArray[pos]}")
}
}
getAllData()
recyclerView.scrollToPosition(notificationArray.size-1)
Intent(this,NotificationPullService::class.java).also{
startService(it)
}
addNotificationButton.setOnClickListener {
val dialog = AlertDialog.Builder(this)
val dialogView = layoutInflater.inflate(R.layout.dialog_add_notification,null)
dialog.setView(dialogView).setPositiveButton("Push!"){
dialog,i->
postData(
dialogView.addTitleEdit.text.toString(),
dialogView.addUserEdit.text.toString(),
dialogView.addDescriptionEdit.text.toString()
)
}.setNegativeButton("Cancle"){
dialog,i->
}.show()
}
refreshButton.setOnClickListener {
getAllData()
}
}
private fun deleteItem(id:Int){
notificationArray.removeAt(id)
viewAdapter.notifyItemRemoved(id)
}
private fun insertItem(data:NotificationData){
notificationArray.add(data)
viewAdapter.notifyItemInserted(notificationArray.size-1)
recyclerView.scrollToPosition(notificationArray.size-1)
}
private fun postData(title:String,user:String,description:String):Int{
var insertID = -1
postNotification(title,user,description,object:GetListener{
override fun getInsertID(id:Int) {
insertID =id
getData(insertID)
}
override fun serveLastNotification(data: NotificationData?) {}
override fun serveAllNotification(data: List<NotificationData>?) {}
override fun serveNotification(data: NotificationData?) {}
override fun onFail() {}
})
return insertID
}
private fun getData(id:Int):NotificationData{
var returnData = nullData
getNotification(id,object:GetListener{
override fun serveNotification(data: NotificationData?) {
returnData = data?: nullData
insertItem(returnData)
}
override fun serveLastNotification(data: NotificationData?) {}
override fun serveAllNotification(data: List<NotificationData>?) {}
override fun getInsertID(id:Int) {}
override fun onFail() {}
})
return returnData
}
private fun getAllData(){
getAllNotification(object:GetListener{
override fun serveAllNotification(data: List<NotificationData>?) {
notificationArray.clear()
if(data!=null) {
notificationArray.addAll(data)
viewAdapter.notifyDataSetChanged()
}
Log.d("Array","$notificationArray")
}
override fun serveLastNotification(data: NotificationData?) {}
override fun serveNotification(data: NotificationData?) {}
override fun getInsertID(id:Int) {}
override fun onFail() {}
})
}
private fun createNotificationChannel(){
if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.O) {
val importance = NotificationManager.IMPORTANCE_DEFAULT
val channel = NotificationChannel("TestCH", "TestName", importance).apply {
description = "Test"
}
val notificationManager:NotificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel)
}
}
}
| 38.562874 | 127 | 0.65854 |
1b3f64e6e07e891515660d07d47ec10a4a324065 | 129 | kt | Kotlin | picker/src/main/java/ir/shahabazimi/instagrampicker/classes/CameraImage.kt | mohamedmabrouk582/InstagramPicker | c9e018d155d7e527262d3b3ecc71041f7410899e | [
"Apache-2.0"
] | null | null | null | picker/src/main/java/ir/shahabazimi/instagrampicker/classes/CameraImage.kt | mohamedmabrouk582/InstagramPicker | c9e018d155d7e527262d3b3ecc71041f7410899e | [
"Apache-2.0"
] | null | null | null | picker/src/main/java/ir/shahabazimi/instagrampicker/classes/CameraImage.kt | mohamedmabrouk582/InstagramPicker | c9e018d155d7e527262d3b3ecc71041f7410899e | [
"Apache-2.0"
] | null | null | null | package ir.shahabazimi.instagrampicker.classes
data class CameraImage(
val address:String,
var selecte:Boolean
) | 21.5 | 46 | 0.736434 |
0edb153ca6187d81ee904c5d217451c8feb7c1ca | 908 | tsx | TypeScript | src/icons/general/IconRetry.tsx | The-Speck/box-ui-elements | 53dbdde6d6fa1bbd64292845a667d4721c40d1a1 | [
"Apache-2.0"
] | 673 | 2017-10-03T01:53:24.000Z | 2022-03-30T22:42:15.000Z | src/icons/general/IconRetry.tsx | The-Speck/box-ui-elements | 53dbdde6d6fa1bbd64292845a667d4721c40d1a1 | [
"Apache-2.0"
] | 2,087 | 2017-10-26T03:18:49.000Z | 2022-03-29T08:09:16.000Z | src/icons/general/IconRetry.tsx | The-Speck/box-ui-elements | 53dbdde6d6fa1bbd64292845a667d4721c40d1a1 | [
"Apache-2.0"
] | 282 | 2017-10-02T23:11:29.000Z | 2022-03-24T11:38:46.000Z | import * as React from 'react';
import AccessibleSVG from '../accessible-svg';
import { bdlGray } from '../../styles/variables';
import { Icon } from '../iconTypes';
const IconRetry = ({ className = '', color = bdlGray, height = 32, title, width = 32 }: Icon) => (
<AccessibleSVG
className={`bdl-IconRetry ${className}`}
height={height}
title={title}
viewBox="0 0 32 32"
width={width}
>
<g className="fill-color" fill={color} fillRule="evenodd">
<path
d="M25.023 16c0-6.075-4.925-11-11-11s-11 4.925-11 11 4.925 11 11 11c2.601 0 5.06-.904 7.02-2.53a1 1 0 1 1 1.278 1.538A12.949 12.949 0 0 1 14.023 29c-7.18 0-13-5.82-13-13s5.82-13 13-13 13 5.82 13 13a1 1 0 0 1-2 0z"
fillRule="nonzero"
/>
<path d="M20 14l6 6 6-6z" />
</g>
</AccessibleSVG>
);
export default IconRetry;
| 33.62963 | 229 | 0.567181 |
cb5463d714a4a4567433bdf0d4e4ee335cc3b69e | 481 | h | C | Other/Headers/WAProfileCardImageView.h | XWJACK/WeChatPlugin-MacOS | 4241ddb10ccce9484fcf6d5bd51a6afa3b446632 | [
"MIT"
] | 2 | 2019-01-11T02:02:55.000Z | 2020-04-23T02:42:01.000Z | Other/Headers/WAProfileCardImageView.h | XWJACK/WeChatPlugin-MacOS | 4241ddb10ccce9484fcf6d5bd51a6afa3b446632 | [
"MIT"
] | null | null | null | Other/Headers/WAProfileCardImageView.h | XWJACK/WeChatPlugin-MacOS | 4241ddb10ccce9484fcf6d5bd51a6afa3b446632 | [
"MIT"
] | 1 | 2021-01-09T14:54:27.000Z | 2021-01-09T14:54:27.000Z | //
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <AppKit/NSImageView.h>
@interface WAProfileCardImageView : NSImageView
{
CDUnknownBlockType _mouseDownAction;
}
@property(copy, nonatomic) CDUnknownBlockType mouseDownAction; // @synthesize mouseDownAction=_mouseDownAction;
- (void).cxx_destruct;
- (void)mouseDown:(id)arg1;
@end
| 24.05 | 111 | 0.733888 |
1574fd5f25fb3b7b2c474b8f942f132dad0efb16 | 619 | lua | Lua | init.lua | TaumuLu/hammerspoon-config | ae268576fdfbd85a0c0d82e40221cb932116bb70 | [
"MIT"
] | null | null | null | init.lua | TaumuLu/hammerspoon-config | ae268576fdfbd85a0c0d82e40221cb932116bb70 | [
"MIT"
] | null | null | null | init.lua | TaumuLu/hammerspoon-config | ae268576fdfbd85a0c0d82e40221cb932116bb70 | [
"MIT"
] | null | null | null | -- 引入公共模块,全局变量的方式使用
require 'plugins.common'
require 'plugins.autoReload'
require 'plugins.posMouse'
require 'plugins.resetLaunch'
require 'plugins.hotkey'
require 'plugins.hsSetting'
require 'plugins.appWatch'
require 'plugins.caffWatch'
-- require 'plugins.istatMenus'
require 'plugins.sizeup'
-- -- 加载 Spoons
-- -- 定义默认加载的 Spoons
-- if not Hspoon_list then
-- Hspoon_list = {
-- }
-- end
-- -- 加载 Spoons
-- for _, v in pairs(Hspoon_list) do
-- hs.loadSpoon(v)
-- end
-- hs.watchable https://www.hammerspoon.org/docs/hs.watchable.html
-- hs.fnutils https://www.hammerspoon.org/docs/hs.fnutils.html
| 19.967742 | 66 | 0.712439 |
2a0201944595026199c46bc311d8cb51d133e9af | 7,602 | java | Java | src/test/java/seedu/iscam/logic/commands/CommandTestUtil.java | zoeykobe/tp | f913e6c36cec075cfd79cbf9182ca07d6755403a | [
"MIT"
] | null | null | null | src/test/java/seedu/iscam/logic/commands/CommandTestUtil.java | zoeykobe/tp | f913e6c36cec075cfd79cbf9182ca07d6755403a | [
"MIT"
] | null | null | null | src/test/java/seedu/iscam/logic/commands/CommandTestUtil.java | zoeykobe/tp | f913e6c36cec075cfd79cbf9182ca07d6755403a | [
"MIT"
] | null | null | null | package seedu.iscam.logic.commands;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static seedu.iscam.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.iscam.logic.parser.CliSyntax.PREFIX_IMAGE;
import static seedu.iscam.logic.parser.CliSyntax.PREFIX_LOCATION;
import static seedu.iscam.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.iscam.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.iscam.logic.parser.CliSyntax.PREFIX_PLAN;
import static seedu.iscam.logic.parser.CliSyntax.PREFIX_TAG;
import static seedu.iscam.testutil.Assert.assertThrows;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import seedu.iscam.commons.core.index.Index;
import seedu.iscam.logic.commands.exceptions.CommandException;
import seedu.iscam.model.Model;
import seedu.iscam.model.client.Client;
import seedu.iscam.model.commons.NameContainsKeywordsPredicate;
import seedu.iscam.model.util.clientbook.ClientBook;
import seedu.iscam.testutil.EditClientDescriptorBuilder;
/**
* Contains helper methods for testing commands.
*/
public class CommandTestUtil {
public static final String VALID_NAME_AMY = "Amy Bee";
public static final String VALID_NAME_BOB = "Bob Choo";
public static final String VALID_PHONE_AMY = "91234567";
public static final String VALID_PHONE_BOB = "62222222";
public static final String VALID_EMAIL_AMY = "amy@example.com";
public static final String VALID_EMAIL_BOB = "bob@example.com";
public static final String VALID_LOCATION_AMY = "Block 312, Amy Street 1";
public static final String VALID_LOCATION_BOB = "Block 123, Bobby Street 3";
public static final String VALID_PLAN_AMY = "Plan A";
public static final String VALID_PLAN_BOB = "Plan B";
public static final String VALID_TAG_HUSBAND = "husband";
public static final String VALID_TAG_FRIEND = "friend";
public static final String VALID_IMAGE = "default.png";
public static final String NAME_DESC_AMY = " " + PREFIX_NAME + VALID_NAME_AMY;
public static final String NAME_DESC_BOB = " " + PREFIX_NAME + VALID_NAME_BOB;
public static final String PHONE_DESC_AMY = " " + PREFIX_PHONE + VALID_PHONE_AMY;
public static final String PHONE_DESC_BOB = " " + PREFIX_PHONE + VALID_PHONE_BOB;
public static final String EMAIL_DESC_AMY = " " + PREFIX_EMAIL + VALID_EMAIL_AMY;
public static final String EMAIL_DESC_BOB = " " + PREFIX_EMAIL + VALID_EMAIL_BOB;
public static final String LOCATION_DESC_AMY = " " + PREFIX_LOCATION + VALID_LOCATION_AMY;
public static final String LOCATION_DESC_BOB = " " + PREFIX_LOCATION + VALID_LOCATION_BOB;
public static final String PLAN_DESC_AMY = " " + PREFIX_PLAN + VALID_PLAN_AMY;
public static final String PLAN_DESC_BOB = " " + PREFIX_PLAN + VALID_PLAN_BOB;
public static final String TAG_DESC_FRIEND = " " + PREFIX_TAG + VALID_TAG_FRIEND;
public static final String TAG_DESC_HUSBAND = " " + PREFIX_TAG + VALID_TAG_HUSBAND;
public static final String IMAGE_DESC = " " + PREFIX_IMAGE + VALID_IMAGE;
public static final String INVALID_NAME_DESC = " " + PREFIX_NAME + "James&"; // '&' not allowed in names
public static final String INVALID_PHONE_DESC = " " + PREFIX_PHONE + "911a"; // 'a' not allowed in phones
public static final String INVALID_EMAIL_DESC = " " + PREFIX_EMAIL + "bob!yahoo"; // missing '@' symbol
public static final String INVALID_LOCATION_DESC = " " + PREFIX_LOCATION; // empty string not allowed for locations
public static final String INVALID_PLAN_DESC = " " + PREFIX_PLAN + "Plan $"; // '$" no allowed in insurance plans
public static final String INVALID_TAG_DESC = " " + PREFIX_TAG + "hubby*"; // '*' not allowed in tags
public static final String INVALID_IMAGE_DESC = " " + PREFIX_IMAGE + "morgan.jp"; // File extension not allowed
public static final String PREAMBLE_WHITESPACE = "\t \r \n";
public static final String PREAMBLE_NON_EMPTY = "NonEmptyPreamble";
public static final EditCommand.EditClientDescriptor DESC_AMY;
public static final EditCommand.EditClientDescriptor DESC_BOB;
static {
DESC_AMY = new EditClientDescriptorBuilder().withName(VALID_NAME_AMY)
.withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withLocation(VALID_LOCATION_AMY)
.withPlan(VALID_PLAN_AMY).withTags(VALID_TAG_FRIEND).build();
DESC_BOB = new EditClientDescriptorBuilder().withName(VALID_NAME_BOB)
.withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withLocation(VALID_LOCATION_BOB)
.withPlan(VALID_PLAN_BOB).withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();
}
/**
* Executes the given {@code command}, confirms that <br>
* - the returned {@link CommandResult} matches {@code expectedCommandResult} <br>
* - the {@code actualModel} matches {@code expectedModel}
*/
public static void assertCommandSuccess(Command command, Model actualModel, CommandResult expectedCommandResult,
Model expectedModel) {
try {
CommandResult result = command.execute(actualModel);
assertEquals(expectedCommandResult, result);
assertEquals(expectedModel, actualModel);
} catch (CommandException ce) {
throw new AssertionError("Execution of command should not fail.", ce);
}
}
/**
* Convenience wrapper to {@link #assertCommandSuccess(Command, Model, CommandResult, Model)}
* that takes a string {@code expectedMessage}.
*/
public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,
Model expectedModel) {
CommandResult expectedCommandResult = new CommandResult(expectedMessage);
assertCommandSuccess(command, actualModel, expectedCommandResult, expectedModel);
}
/**
* Executes the given {@code command}, confirms that <br>
* - a {@code CommandException} is thrown <br>
* - the CommandException message matches {@code expectedMessage} <br>
* - the iscam book, filtered client list and selected client in {@code actualModel} remain unchanged
*/
public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {
// we are unable to defensively copy the model for comparison later, so we can
// only do so by copying its components.
ClientBook expectedClientBook = new ClientBook(actualModel.getClientBook());
List<Client> expectedFilteredList = new ArrayList<>(actualModel.getFilteredClientList());
assertThrows(CommandException.class, expectedMessage, () -> command.execute(actualModel));
assertEquals(expectedClientBook, actualModel.getClientBook());
assertEquals(expectedFilteredList, actualModel.getFilteredClientList());
}
/**
* Updates {@code model}'s filtered list to show only the client at the given {@code targetIndex} in the
* {@code model}'s iscam book.
*/
public static void showClientAtIndex(Model model, Index targetIndex) {
assertTrue(targetIndex.getZeroBased() < model.getFilteredClientList().size());
Client client = model.getFilteredClientList().get(targetIndex.getZeroBased());
final String[] splitName = client.getName().fullName.split("\\s+");
model.updateFilteredClientList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));
assertEquals(1, model.getFilteredClientList().size());
}
}
| 54.690647 | 119 | 0.734938 |
759ae130292fea5b53a88bcef20214950114d6a7 | 270 | h | C | Example/JXUIKit/JXUIAppDelegate.h | tospery/JXUIKit | 3e4b585ceae4b1b0ecdd9dc61ece597234e7acac | [
"MIT"
] | null | null | null | Example/JXUIKit/JXUIAppDelegate.h | tospery/JXUIKit | 3e4b585ceae4b1b0ecdd9dc61ece597234e7acac | [
"MIT"
] | null | null | null | Example/JXUIKit/JXUIAppDelegate.h | tospery/JXUIKit | 3e4b585ceae4b1b0ecdd9dc61ece597234e7acac | [
"MIT"
] | null | null | null | //
// JXUIAppDelegate.h
// JXUIKit
//
// Created by tospery on 01/15/2020.
// Copyright (c) 2020 tospery. All rights reserved.
//
@import UIKit;
@interface JXUIAppDelegate : UIResponder <UIApplicationDelegate>
@property (nonatomic, strong) UIWindow *window;
@end
| 18 | 64 | 0.718519 |
7fc16d187e838dfc9ec9d6f5876170a86883b114 | 247 | rs | Rust | kernel/src/register/stval.rs | CS301-sustech-zmfl/xv6-rust | 289a4f0a04388fb9ac15cfc5df8df7ec79e6422e | [
"MIT"
] | 44 | 2021-03-20T02:14:58.000Z | 2022-03-31T03:40:52.000Z | kernel/src/register/stval.rs | CS301-sustech-zmfl/xv6-rust | 289a4f0a04388fb9ac15cfc5df8df7ec79e6422e | [
"MIT"
] | 10 | 2021-05-28T17:00:00.000Z | 2022-02-06T03:14:50.000Z | kernel/src/register/stval.rs | CS301-sustech-zmfl/xv6-rust | 289a4f0a04388fb9ac15cfc5df8df7ec79e6422e | [
"MIT"
] | 4 | 2021-04-28T08:43:35.000Z | 2022-03-18T01:34:28.000Z | // Supervisor Trap Value
#[inline]
pub unsafe fn read() -> usize {
let ret:usize;
llvm_asm!("csrr $0, stval":"=r"(ret):::"volatile");
ret
}
#[inline]
pub unsafe fn write(x:usize){
llvm_asm!("csrw stval, $0"::"r"(x)::"volatile");
} | 20.583333 | 55 | 0.587045 |
95793eb34d7bc1628d7bcaa449209963bf599548 | 51,786 | sql | SQL | database/init/cities/city.list087.sql | yh-coder/weather | 3e67e8cd4ce92cf96b58c69ccfaa5727b9045433 | [
"MIT"
] | null | null | null | database/init/cities/city.list087.sql | yh-coder/weather | 3e67e8cd4ce92cf96b58c69ccfaa5727b9045433 | [
"MIT"
] | null | null | null | database/init/cities/city.list087.sql | yh-coder/weather | 3e67e8cd4ce92cf96b58c69ccfaa5727b9045433 | [
"MIT"
] | null | null | null | insert into city values
(3856022,"Esperanza","AR",-60.931728,-31.448799),
(3832768,"Villa del Lago","AR",-64.50666,-31.416479),
(3833266,"Valenzuela","AR",-65.403313,-27.4139),
(3865373,"Arteaga","AR",-61.790039,-33.087879),
(3840222,"Pueblo Elisa","AR",-61.519081,-32.680672),
(3865449,"Armstrong","AR",-61.602219,-32.78215),
(3832694,"Villa Maria","AR",-63.240162,-32.407509),
(3864054,"Bobadal","AR",-64.39576,-26.718809),
(3832781,"Villa Colanchanga","AR",-64.354927,-31.1462),
(3859965,"Cosquin","AR",-64.46563,-31.245081),
(3864043,"Boca del Tigre","AR",-64.716667,-27.25),
(3861528,"Chichinales","AR",-66.927139,-39.115051),
(3431608,"Las Toninas","AR",-56.700001,-36.48333),
(3848894,"Larrechea","AR",-61.0466,-31.93548),
(3832745,"Villa Estela","AR",-61.311958,-33.709141),
(3436124,"Barranqueras","AR",-58.935791,-27.48299),
(3436430,"Aldea San Juan","AR",-58.768822,-32.69767),
(3433822,"General Almada","AR",-58.804729,-32.836899),
(3436159,"Bancalari","AR",-58.600899,-34.476559),
(3842621,"Oncativo","AR",-63.682011,-31.91353),
(3837675,"San Francisco","AR",-62.082661,-31.427971),
(3835767,"San Vicente","AR",-65.087601,-26.97653),
(3863887,"Bowen","AR",-67.508987,-34.99889),
(3865810,"Anchoris","AR",-68.914658,-33.321129),
(3833520,"Tunuyán","AR",-69.015381,-33.57653),
(3840082,"San Julian","AR",-67.727432,-49.305538),
(3432555,"Laferrere","AR",-58.58791,-34.748299),
(3864759,"Departamento de Bariloche","AR",-71.5,-41.5),
(3837856,"San Carlos de Bariloche","AR",-71.300003,-41.150002),
(7647007,"San Carlos de Bariloche","AR",-71.30822,-41.145569),
(3855114,"General Fernandez Oro","AR",-67.924889,-38.952969),
(3832711,"Villa La Angostura","AR",-71.646309,-40.76173),
(3840896,"Plaza Huincul","AR",-69.208633,-38.92598),
(3841363,"Pichi Leufú","AR",-70.849998,-41.133331),
(3435280,"Comandante Nicanor Otamendi","AR",-57.838089,-38.114151),
(3427832,"Partido de Tandil","AR",-59.25,-37.333328),
(3427833,"Tandil","AR",-59.13316,-37.321671),
(3434189,"El Verano","AR",-58.542309,-37.740841),
(3427380,"Villa Residencial Laguna Brava","AR",-57.983501,-37.85965),
(3430756,"Mechongué","AR",-58.224319,-38.14785),
(3430486,"Napaleofú","AR",-58.743649,-37.62468),
(3436369,"Álzaga","AR",-59.969978,-37.859692),
(3429616,"Ramos Otero","AR",-58.339401,-37.534382),
(3435024,"Don Bosco","AR",-58.292679,-34.701889),
(3431259,"Longchamps","AR",-58.385471,-34.856758),
(3435369,"Claypole","AR",-58.334339,-34.796749),
(3429582,"Remedios de Escalada","AR",-58.382549,-34.724918),
(3839303,"Departamento de Rawson","AR",-65,-43.333328),
(3839307,"Rawson","AR",-65.10228,-43.300159),
(3838289,"Saldungaray","AR",-61.770672,-38.204929),
(3855728,"Estomba","AR",-61.804508,-38.350182),
(3863980,"Bombal","AR",-61.319939,-33.45686),
(3436426,"Aldo Bonzi","AR",-58.518959,-34.70657),
(3427818,"Tapiales","AR",-58.508492,-34.699909),
(3435050,"Dock Sud","AR",-58.366669,-34.633331),
(3428113,"San Telmo","AR",-58.37122,-34.619999),
(3427510,"Versailles","AR",-58.515041,-34.627491),
(3433466,"Ingeniero Budge","AR",-58.458462,-34.719589),
(3427449,"Villa Diamante","AR",-58.43298,-34.681889),
(3430087,"Paternal","AR",-58.471561,-34.595421),
(3435704,"Capilla del Señor","AR",-59.101791,-34.292068),
(3431204,"Los Cardales","AR",-58.984322,-34.32814),
(3430596,"Monte Castro","AR",-58.5,-34.616669),
(3427407,"Villa Luro","AR",-58.502731,-34.638142),
(3852292,"Departamento de La Capital","AR",-60.666672,-31.5),
(3836764,"San Pedro","AR",-60.527939,-31.236389),
(3837457,"San Jerónimo del Sauce","AR",-61.14164,-31.60844),
(3866402,"Alcorta","AR",-61.122608,-33.54319),
(3854906,"Gramilla","AR",-64.61338,-27.297939),
(3480730,"Maquinista Savio","AR",-58.798328,-34.41111),
(3433844,"Garín","AR",-58.749001,-34.420631),
(3866946,"Acosta","AR",-65.23333,-25.5),
(3845663,"Los Ralos","AR",-64.999748,-26.88788),
(3856562,"El Taco","AR",-65.594841,-28.699499),
(3427565,"Vagues","AR",-59.462521,-34.29932),
(3427381,"Villa Reichembach","AR",-58.69997,-34.6558),
(3427445,"Villa D. Sobral","AR",-58.245441,-34.758499),
(3861061,"Cinco Saltos","AR",-68.062927,-38.822239),
(3429053,"San Francisco Solano","AR",-58.316669,-34.783329),
(3433780,"Partido de General Rodríguez","AR",-59,-34.666672),
(3433781,"General Rodríguez","AR",-58.95253,-34.608379),
(3854985,"Gobernador Galvez","AR",-60.64045,-33.030159),
(3855424,"Fortín Tiburcio","AR",-61.129009,-34.34547),
(3852288,"Departamento de Lácar","AR",-71.199997,-40.25),
(3836951,"San Martin de los Andes","AR",-71.348648,-40.160381),
(3859082,"Dumesnil","AR",-64.327888,-31.32198),
(3848989,"Larguía","AR",-61.218151,-32.551479),
(3860204,"Coronel Charlone","AR",-63.370312,-34.674789),
(3853643,"Isla Verde","AR",-62.402969,-33.241039),
(3843830,"Monte Maiz","AR",-62.600849,-33.20462),
(3836944,"San Mauricio","AR",-63.187801,-35.510719),
(3861568,"Chepes Viejo","AR",-66.58519,-31.26075),
(3855368,"Fray Luis Beltran","AR",-65.76667,-39.316669),
(3833871,"Tres Algarrobos","AR",-62.77396,-35.19471),
(3430940,"Malabrigo","AR",-59.96957,-29.346359),
(3839441,"Partido de Ramallo","AR",-60.083328,-33.5),
(3839444,"Ramallo","AR",-60.007069,-33.484821),
(3427388,"Villa Ocampo","AR",-59.355148,-28.48752),
(3861001,"Clodomiro Díaz","AR",-60.799999,-27.616671),
(3855365,"Fredriksson","AR",-61.4771,-33.446838),
(3837008,"San Marcos Sierra","AR",-64.693237,-30.79298),
(3430106,"Paso de la Laguna","AR",-59.166672,-31.799999),
(3427399,"Villa Maria Grande","AR",-59.901821,-31.665649),
(3855124,"General Cabrera","AR",-63.872429,-32.813129),
(3427908,"Sosa","AR",-59.910809,-31.73657),
(3842414,"Padilla","AR",-65.392159,-27.022659),
(3431002,"Lucas Sur","AR",-59.036709,-31.6551),
(3854987,"Gobernador Crespo","AR",-60.401619,-30.3627),
(3845682,"Los Puestos","AR",-64.973221,-27.267191),
(3861678,"Charata","AR",-61.18795,-27.21438),
(3858677,"El Calafate","AR",-72.276817,-50.340752),
(3840104,"Puerto Deseado","AR",-65.893822,-47.75034),
(3858909,"El Aranado","AR",-62.893219,-31.741199),
(3852428,"La Buena Parada","AR",-63.606361,-31.171129),
(3431266,"Loma Verde","AR",-58.403782,-35.273682),
(3834182,"Partido de Tornquist","AR",-62.25,-38.25),
(3834184,"Tornquist","AR",-62.222672,-38.101219),
(3860721,"Colonia San Pedro","AR",-62.342129,-37.953541),
(3860174,"Coronel Pringles","AR",-61.356152,-37.982948),
(3837455,"San Jerónimo Sur","AR",-61.025082,-32.87991),
(3436249,"Arturo Seguí","AR",-58.12579,-34.889519),
(3862584,"Carmen del Sauce","AR",-60.811161,-33.236),
(3427362,"Villa Zagala","AR",-58.537682,-34.551262),
(3843881,"Monte Buey","AR",-62.45668,-32.91642),
(3863314,"Camilo Aldao","AR",-62.094528,-33.127449),
(3435713,"Cañuelas","AR",-58.760609,-35.051842),
(3859538,"Daireaux","AR",-61.75,-36.599998),
(3845260,"Maguire","AR",-60.299999,-33.950001),
(3863419,"Calchaqui","AR",-60.286961,-29.887671),
(3429745,"Puerto Paulito","AR",-54.59853,-25.80266),
(3837611,"San Gabriel","AR",-65.449692,-27.104561),
(3429247,"Partido de San Antonio de Areco","AR",-59.5,-34.25),
(3429248,"San Antonio de Areco","AR",-59.469452,-34.24968),
(3857431,"Elortondo","AR",-61.616928,-33.700291),
(3862537,"Carreras","AR",-61.309818,-33.597038),
(3864251,"Bigand","AR",-61.184681,-33.372799),
(3848653,"Las Cañas","AR",-60.274849,-31.01363),
(3838411,"Saladero M. Cabal","AR",-60.036758,-30.880751),
(3430946,"Maipú","AR",-57.880939,-36.86274),
(3860168,"Coronel Rodríguez","AR",-61.245762,-31.700781),
(3844046,"Mojón","AR",-64.916283,-27.22823),
(3855244,"Galvez","AR",-61.221031,-32.02927),
(3429308,"Partido de San Andrés de Giles","AR",-59.5,-34.5),
(3429309,"San Andrés de Giles","AR",-59.443329,-34.449718),
(3835793,"Santo Tome","AR",-60.765301,-31.662741),
(3427447,"Villa Domínico","AR",-58.31963,-34.689529),
(3435073,"Diamante","AR",-58.416672,-34.666672),
(3429861,"Presidente Rivadavia","AR",-58.433331,-34.650002),
(3861704,"Chapelco","AR",-71.21769,-40.126621),
(3847617,"Las Varas","AR",-62.61655,-31.802601),
(3847907,"Las Petacas","AR",-62.108761,-31.82292),
(3838823,"Río Primero","AR",-63.616669,-31.33333),
(3429902,"Pontevedra","AR",-58.686958,-34.749741),
(3433762,"Glew","AR",-58.37764,-34.89151),
(3435029,"Domselaar","AR",-58.285542,-35.072231),
(3429814,"Puente Cascallares","AR",-58.819618,-34.686218),
(3842591,"Ordoqui","AR",-61.16153,-35.881329),
(3841678,"Partido de Pehuajó","AR",-61.75,-35.916672),
(3841679,"Pehuajó","AR",-61.896801,-35.810768),
(3839516,"Quiroga","AR",-61.406719,-35.292919),
(3842871,"Partido de Nueve de Julio","AR",-61,-35.5),
(3842881,"Nueve de Julio","AR",-60.883129,-35.44437),
(3430705,"Partido de Mercedes","AR",-59.416672,-34.666672),
(3430708,"Mercedes","AR",-59.430679,-34.651459),
(3854323,"Herrera Vegas","AR",-61.416672,-36.083328),
(3858765,"El Bolson","AR",-71.51667,-41.966671),
(3834397,"Tilisarao","AR",-65.291092,-32.732922),
(3841309,"Pico Truncado","AR",-67.957314,-46.794899),
(3864285,"Bernardo Larroude","AR",-63.582531,-35.02449),
(3860407,"Condarco","AR",-63.066669,-35.26667),
(3862634,"Carhué","AR",-62.757919,-37.176682),
(3428533,"Partido de San Pedro","AR",-59.75,-33.75),
(3428576,"San Pedro","AR",-59.666641,-33.679131),
(3427208,"Zelaya","AR",-58.86977,-34.370789),
(3851734,"La Donosa","AR",-64.971291,-27.427191),
(3866496,"Aguilares","AR",-65.614273,-27.4338),
(3844104,"Mixta","AR",-65.134956,-27.228991),
(3856575,"El Suncho","AR",-64.948463,-27.212299),
(3860217,"Coronda","AR",-60.919819,-31.97263),
(3836376,"Santa Clara de Buena Vista","AR",-61.31982,-31.763901),
(3861016,"Clason","AR",-61.291061,-32.461418),
(3435364,"Clorinda","AR",-57.71851,-25.284809),
(3863692,"Bustinza","AR",-61.290291,-32.73909),
(3862981,"Canada de Gomez","AR",-61.394932,-32.81636),
(3865485,"Arequito","AR",-61.471561,-33.145519),
(3435055,"Dique Luján","AR",-58.68792,-34.357189),
(3867002,"Abra Rica","AR",-64.883331,-27.133329),
(3844012,"Molinari","AR",-64.48333,-31.200001),
(3436237,"Atucha","AR",-59.285011,-33.979969),
(3435551,"Centinela del Mar","AR",-58.221748,-38.433159),
(3835807,"Santo Tomás","AR",-61.50631,-35.672588),
(3849403,"Laplacette","AR",-61.155811,-34.72187),
(3436101,"Partido de Arrecifes","AR",-60,-34),
(3865436,"Arrecifes","AR",-60.103569,-34.0639),
(3855003,"Girondo","AR",-61.616669,-36),
(3832625,"Villa San José","AR",-60.413589,-34.091259),
(3844811,"Mari Lauquen","AR",-62.976662,-36.130291),
(3854594,"Guanaco","AR",-61.6479,-35.71352),
(3850702,"La Invencible","AR",-60.387081,-34.27034),
(3849736,"La Niña","AR",-61.206959,-35.40715),
(3433723,"González Catán","AR",-58.647141,-34.768951),
(3845330,"Machagai","AR",-60.049561,-26.92614),
(3854494,"Guatimozin","AR",-62.438438,-33.461498),
(3843619,"Morteros","AR",-61.998619,-30.711639),
(3866029,"Alto San Pedro","AR",-64.478333,-31.047331),
(3864286,"Bernardo de Irigoyen","AR",-61.157051,-32.168129),
(3859435,"Desmochado Afuera","AR",-61.26667,-33),
(3853760,"Ingenio Nueva Baviera","AR",-65.395561,-27.070881),
(3840314,"Pozuelos","AR",-64.755722,-27.30801),
(3427386,"Villa Paranacito","AR",-58.657982,-33.72208),
(3846697,"Loma del Medio","AR",-64.739677,-27.37627),
(3833478,"Tusquitas","AR",-64.924789,-27.101101),
(3436048,"Benavídez","AR",-58.701389,-34.411301),
(3435874,"Caballito","AR",-58.44104,-34.622639),
(3855570,"Fighiera","AR",-60.4687,-33.194939),
(3427511,"Verónica","AR",-57.33691,-35.387959),
(3838294,"Saldan","AR",-64.306999,-31.30262),
(3856659,"El Sauce","AR",-64.313744,-31.09746),
(3860825,"Departamento de Colón","AR",-64.166672,-31.16667),
(3845679,"Los Quebrachitos","AR",-64.377022,-31.197861),
(3427662,"Tres Bocas","AR",-59.766441,-32.739891),
(3430239,"Palavecino","AR",-58.640598,-32.946079),
(3848656,"Las Cañas","AR",-65.215118,-28.203899),
(3834601,"Tartagal","AR",-63.801311,-22.516359),
(3833405,"Uranga","AR",-60.70406,-33.269161),
(3429160,"San Clemente del Tuyu","AR",-56.723511,-36.356941),
(3858918,"El Amparo","AR",-66.150002,-33.183331),
(3832131,"Departamento de Zapala","AR",-69.833328,-39),
(3832132,"Zapala","AR",-70.05442,-38.899158),
(3855563,"Filo-hua-hum","AR",-71.349998,-40.48333),
(3863596,"Cabildo","AR",-61.89542,-38.484211),
(3429418,"Sáenz Peña","AR",-58.530079,-34.600521),
(3832811,"Villa Angela","AR",-60.71526,-27.57383),
(3844609,"Mechita","AR",-60.408428,-35.07016),
(3855558,"Finca Elisa","AR",-65.1688,-26.958839),
(3834867,"Tacanas","AR",-64.809288,-27.13752),
(3853756,"Ingenio San Pablo","AR",-65.316673,-26.9),
(3433319,"José Santos Arévalo","AR",-59.223129,-35.17421),
(3860059,"Correa","AR",-61.254742,-32.849159),
(3860847,"Collún-Có","AR",-71.20137,-39.969551),
(3864830,"Banderaló","AR",-63.375561,-35.013069),
(3862222,"Cavanagh","AR",-62.338879,-33.476059),
(3836540,"Sansinena","AR",-63.21381,-35.276531),
(3832797,"Villa Berthet","AR",-60.412628,-27.29174),
(3431775,"Las Garzas","AR",-59.51667,-28.83333),
(3866389,"Aldea Jacobi","AR",-60.294189,-32.061619),
(3430968,"Macia","AR",-59.399471,-32.172199),
(3832765,"Villa del Rosario","AR",-63.534519,-31.556601),
(3845075,"Malvinas","AR",-65.283333,-26.91667),
(3860766,"Colonia La Brava","AR",-60.142841,-30.453699),
(3427528,"Vélez Sarsfield","AR",-58.48333,-34.633331),
(3838468,"Partido de Saavedra","AR",-62.5,-37.75),
(3838469,"Saavedra","AR",-62.349918,-37.76273),
(3848676,"Las Calles","AR",-64.971413,-31.82386),
(3855377,"Franck","AR",-60.939041,-31.58642),
(3430114,"Parque Patricios","AR",-58.410488,-34.640518),
(3862575,"Carnerillo","AR",-64.021751,-32.9137),
(3433579,"Heavy","AR",-59.65694,-34.43066),
(3433340,"Jeppener","AR",-58.19902,-35.278431),
(3860755,"Colonia Margarita","AR",-61.64592,-31.685801),
(3848896,"Larrea","AR",-60.366798,-35.051472),
(3838131,"San Ambrosio","AR",-65.890221,-33.037319),
(3834514,"Teniente Origone","AR",-62.569408,-39.058689),
(3862101,"Cereales","AR",-63.85535,-36.813412),
(3844962,"Manuel García Fernández","AR",-65.283333,-26.966669),
(3860209,"Coronel Arnold","AR",-60.965881,-33.105042),
(3428287,"Santa Lucia","AR",-59.102871,-28.987459),
(3843897,"Monteagudo","AR",-65.276558,-27.51162),
(3431239,"Los Acantilados","AR",-57.600189,-38.116051),
(3430862,"Mar del Sur","AR",-57.990799,-38.34288),
(3854427,"Guido Spano","AR",-60.6511,-34.22612),
(3855083,"General O’Brien","AR",-60.754608,-34.903141),
(3856511,"El Tejar","AR",-61.045658,-35.220951),
(3430838,"Mariano Acosta","AR",-58.793091,-34.719872),
(3430116,"Parque Chacabuco","AR",-58.443218,-34.634129),
(3835126,"Soldini","AR",-60.755291,-33.027599),
(3429713,"Puerto Vilelas","AR",-58.93906,-27.514139),
(3834623,"Taquello","AR",-64.782227,-27.43741),
(3837707,"San Fernando","AR",-64.380493,-31.26935),
(3842802,"Obanta","AR",-65.300003,-26.866671),
(3852490,"La Bolsa","AR",-65.300003,-26.950001),
(3865991,"Álvarez","AR",-60.803928,-33.130322),
(3433893,"Fortín Aguilar","AR",-59.633331,-27.066669),
(3861217,"Chumbicha","AR",-66.235001,-28.8543),
(3845228,"Maizales","AR",-60.963322,-33.317322),
(3845052,"Manantial","AR",-65.282959,-26.847481),
(3834813,"Tafi Viejo","AR",-65.259209,-26.73201),
(3853689,"Isca Yacú","AR",-64.609917,-27.028891),
(3435021,"Don Cristóbal","AR",-59.993778,-32.071201),
(3832637,"Villa Río Hondo","AR",-64.915024,-27.59341),
(3843854,"Monte Flores","AR",-60.68272,-33.1073),
(3432990,"Labardén","AR",-58.103779,-36.947491),
(3855152,"Gaviotas","AR",-63.638309,-38.943661),
(3853773,"Ingeniero White","AR",-62.266369,-38.780182),
(3848470,"Las Delicias","AR",-60.4263,-31.93499),
(3855069,"General Racedo","AR",-60.408619,-31.98283),
(3436004,"Boca","AR",-58.36298,-34.634129),
(3853994,"Hughes","AR",-61.334671,-33.801121),
(3855066,"General Roca","AR",-61.915989,-32.73196),
(3435910,"Buenos Aires","AR",-58.377232,-34.613152),
(3435506,"Chacarita","AR",-58.452499,-34.587009),
(3841979,"Paraje El Cerro","AR",-61.283329,-32.51667),
(3832798,"Villa Benegas","AR",-64.95591,-31.640579),
(3435103,"Curuzu Cuatia","AR",-58.0546,-29.79171),
(3840029,"Pujato","AR",-61.043228,-33.017658),
(3866356,"Alejandro Roca","AR",-63.718491,-33.353691),
(3862338,"Caspi Corral","AR",-63.529419,-27.38242),
(3845365,"Luque","AR",-63.343231,-31.647511),
(3847613,"Las Varillas","AR",-62.71946,-31.87208),
(3846296,"Los Chañaritos","AR",-63.332329,-31.40238),
(3833995,"Totoras","AR",-61.168522,-32.5844),
(3855113,"General Fotheringham","AR",-63.869499,-32.322929),
(3861828,"Challacó","AR",-68.96489,-38.96859),
(3427382,"Villa Recondo","AR",-58.476101,-34.705761),
(3430990,"Luis J. García","AR",-58.466671,-34.683331),
(3431606,"Las Toscas","AR",-59.25795,-28.3529),
(3841500,"Perez","AR",-60.76791,-32.998348),
(3843059,"Ninte","AR",-63.817059,-30.93609),
(3838240,"Partido de Salliqueló","AR",-63.083328,-36.666672),
(3838241,"Salliqueló","AR",-62.960529,-36.752159),
(3432598,"La Estafeta","AR",-57.640072,-38.162361),
(3429024,"San Gustavo","AR",-59.398399,-30.68961),
(3860198,"Partido de Coronel Dorrego","AR",-61.166672,-38.666672),
(3860199,"Coronel Dorrego","AR",-61.287319,-38.71867),
(3429933,"Plátanos","AR",-58.161049,-34.784012),
(3859749,"Cuchi Corral","AR",-64.57518,-30.974819),
(3846719,"Loma Alta","AR",-61.178028,-31.960569),
(3832799,"Villa Belgrano","AR",-64.252907,-31.35722),
(3862395,"Casalegno","AR",-61.126209,-32.262329),
(3844585,"Médano de Oro","AR",-68.449997,-31.6),
(3864185,"Blanca Grande","AR",-60.883331,-36.533329),
(3854970,"Gobernador Ugarte","AR",-60.08007,-35.164711),
(3854996,"Gnecco","AR",-62.00058,-35.682549),
(3841517,"Peralta","AR",-61.667568,-38.057919),
(3434161,"Emiliano Reynoso","AR",-59.876339,-35.54821),
(3860179,"Coronel Moldes","AR",-65.479027,-25.27994),
(3838059,"San Antonio","AR",-65.014122,-27.15378),
(3861956,"Chabás","AR",-61.357559,-33.244579),
(3832800,"Villa Belgrano","AR",-65.614723,-27.52655),
(3854008,"Huerta Grande","AR",-64.490631,-31.075239),
(3859833,"Cruz Chica","AR",-64.483788,-30.96497),
(3840081,"Puerto San Lorenzo","AR",-60.734631,-32.727482),
(3427215,"Zapiola","AR",-59.040981,-35.059021),
(3862320,"Castelli","AR",-60.619469,-25.946791),
(3832647,"Villa Regina","AR",-67.066673,-39.099998),
(3848354,"Las Heras","AR",-68.828369,-32.85273),
(3843798,"Montes de Oca","AR",-61.76881,-32.566662),
(3428708,"San Luis del Palmar","AR",-58.554539,-27.5079),
(3436134,"Barracas","AR",-58.383411,-34.649658),
(3433836,"Garupa","AR",-55.829208,-27.48171),
(3430103,"Departamento de Paso de los Libres","AR",-57.25,-29.66667),
(3430104,"Paso de los Libres","AR",-57.089909,-29.71311),
(3832923,"Victorica","AR",-65.43586,-36.21505),
(3843871,"Monte Cristo","AR",-63.94437,-31.343121),
(3855098,"General Levalle","AR",-63.924129,-34.014721),
(3832756,"Villa Dolores","AR",-65.189583,-31.94585),
(3860417,"Conchas","AR",-64.964111,-25.477409),
(3862760,"Capilla de los Remedios","AR",-63.831779,-31.430309),
(3836647,"San Ramón","AR",-65.527351,-25.01833),
(3845666,"Los Quirquinchos","AR",-61.709862,-33.375431),
(3428050,"Sarandí","AR",-58.351181,-34.683239),
(3427455,"Villa del Parque","AR",-58.48872,-34.600571),
(3838638,"Roldan","AR",-60.906811,-32.89846),
(3862525,"Carreta Quebrada","AR",-64.180779,-31.157721),
(3838154,"Departamento de San Alberto","AR",-65.25,-31.75),
(3837098,"San Lorenzo","AR",-65.0187,-31.6789),
(3860455,"Comedero","AR",-65.584969,-28.9175),
(3849516,"La Paz","AR",-67.549561,-33.460911),
(3855132,"Partido de General Arenales","AR",-61.25,-34.25),
(3855133,"General Arenales","AR",-61.305222,-34.302639),
(3833140,"Vedia","AR",-61.541382,-34.495579),
(3834080,"Tortugas","AR",-61.820091,-32.747799),
(3838684,"Rodeo del Medio","AR",-68.683319,-32.99353),
(3833675,"Trevelin","AR",-71.46386,-43.0858),
(3429576,"Retiro","AR",-58.383331,-34.583328),
(3860816,"Colonia Alpina","AR",-62.103779,-30.05954),
(3859827,"Departamento de Cruz del Eje","AR",-65,-30.75),
(3859828,"Cruz del Eje","AR",-64.803871,-30.72644),
(3429014,"Departamento de San Ignacio","AR",-55.333328,-27.25),
(3429016,"San Ignacio","AR",-55.533901,-27.255859),
(3841163,"Piedritas","AR",-62.983662,-34.768318),
(3862138,"Centeno","AR",-61.411221,-32.296879),
(3834780,"Tala Cañada","AR",-64.969879,-31.357389),
(3852629,"La Banda","AR",-64.242783,-27.73348),
(3832630,"Villa Saboya","AR",-62.646729,-34.460339),
(3833794,"Tres Isletas","AR",-60.432072,-26.34066),
(3855067,"General Ramirez","AR",-60.20079,-32.17601),
(3429439,"Rosario del Tala","AR",-59.145451,-32.30286),
(3832959,"Viale","AR",-60.007221,-31.867821),
(3835940,"Santa Rosa de Leales","AR",-65.260513,-27.136881),
(3861595,"Chazon","AR",-63.276569,-33.07872),
(3844908,"Marcelino Escalada","AR",-60.468689,-30.57918),
(3835297,"Sierra Grande","AR",-65.355743,-41.606022),
(3840885,"Plottier","AR",-68.23333,-38.966671),
(3853748,"Inriville","AR",-62.230282,-32.944241),
(3855639,"Fatraló","AR",-62.83503,-36.963959),
(3832669,"Villa Mugueta","AR",-61.055149,-33.311291),
(3428973,"Departamento de San Javier","AR",-59.916672,-30.33333),
(3428975,"San Javier","AR",-59.931702,-30.57781),
(3852279,"La Carlota","AR",-63.297691,-33.41993),
(3842217,"Palomitas","AR",-65.226982,-27.46703),
(3427387,"Villa Ortúzar","AR",-58.48333,-34.583328),
(3427561,"Valeria del Mar","AR",-56.890461,-37.146042),
(3848611,"Las Catitas","AR",-68.033333,-33.299999),
(3835943,"Santa Rosa de Calamuchita","AR",-64.536308,-32.06905),
(3435257,"Constitución","AR",-58.38633,-34.625931),
(3435643,"Partido de Carmen de Areco","AR",-59.833328,-34.333328),
(3435644,"Carmen de Areco","AR",-59.822788,-34.375332),
(3430780,"Máximo Paz","AR",-58.617882,-34.938782),
(3436227,"Partido de Avellaneda","AR",-58.333328,-34.666672),
(7535637,"Avellaneda","AR",-58.367439,-34.660179),
(3429389,"Partido de Saladillo","AR",-59.666672,-35.75),
(3429399,"Saladillo","AR",-59.777882,-35.637081),
(3435689,"Partido de Capitán Sarmiento","AR",-59.833328,-34.166672),
(3435690,"Capitán Sarmiento","AR",-59.789871,-34.172691),
(3855042,"Partido de General Viamonte","AR",-61,-35),
(3855043,"General Viamonte","AR",-61.03508,-35.000141),
(3862736,"Capitán Castro","AR",-62.2243,-35.9119),
(3843844,"Monte Hermoso","AR",-61.299999,-38.650002),
(3844267,"Miguel Riglos","AR",-63.688419,-36.853981),
(3859036,"Eduardo Castex","AR",-64.294479,-35.915009),
(3436149,"Partido de Baradero","AR",-59.5,-33.833328),
(3436150,"Baradero","AR",-59.508072,-33.81105),
(3430782,"Matheu","AR",-58.83292,-34.385448),
(3845391,"Lules","AR",-65.338692,-26.9277),
(3843802,"Departamento de Monteros","AR",-65.583328,-27.16667),
(3843803,"Monteros","AR",-65.498322,-27.167419),
(3865289,"Atahona","AR",-65.287163,-27.41737),
(3430857,"Margarita Belen","AR",-58.972191,-27.2616),
(3834652,"Tanti","AR",-64.592018,-31.35601),
(3838297,"Salazar","AR",-62.200001,-36.299999),
(3433712,"Goyeneche","AR",-58.72353,-35.342949),
(3433798,"Partido de General Las Heras","AR",-59,-34.833328),
(3433799,"General Las Heras","AR",-58.946209,-34.927261),
(3844818,"María Teresa","AR",-61.914951,-34.011871),
(3842432,"Pacará","AR",-65.133331,-26.9),
(3429703,"Pueyrredón","AR",-58.5,-34.583328),
(3433959,"Federacion","AR",-57.89962,-31.00621),
(3866985,"Acebal","AR",-60.836441,-33.243092),
(3849181,"La Puntilla","AR",-68.849052,-32.96225),
(3859278,"Dolavon","AR",-65.699997,-43.299999),
(3436058,"Departamento de Bella Vista","AR",-58.833328,-28.5),
(3436062,"Bella Vista","AR",-59.040089,-28.50918),
(3834339,"Tio Pujio","AR",-63.35598,-32.287899),
(3834822,"Tacural","AR",-61.591919,-30.846319),
(3853350,"Junin de los Andes","AR",-71.069359,-39.950432),
(3832608,"Villa Trinidad","AR",-61.875969,-30.213289),
(3433964,"Fátima","AR",-58.986549,-34.43903),
(3832599,"Villa Vieja","AR",-62.700001,-31.26667),
(3832741,"Villa Fontana","AR",-63.115341,-30.893761),
(3845251,"Mainque","AR",-67.300003,-39.066669),
(3429808,"Puerto Algarrobo","AR",-59.57972,-30.642139),
(3430272,"Ostende","AR",-56.883518,-37.125221),
(3832397,"Wheelwright","AR",-61.208881,-33.79039),
(3435446,"Partido de Chascomús","AR",-57.833328,-35.75),
(3435448,"Chascomús","AR",-58.008091,-35.572971),
(3833100,"Partido de Veinticinco de Mayo","AR",-60.25,-35.5),
(3833112,"Veinticinco de Mayo","AR",-60.17271,-35.432301),
(3854947,"González","AR",-64.612602,-24.895941),
(3866465,"Aimogasta","AR",-66.805878,-28.5609),
(3428481,"San Salvador","AR",-58.505241,-31.62487),
(3851331,"La Falda","AR",-64.489868,-31.088409),
(3436397,"Almagro","AR",-58.416672,-34.599998),
(3427500,"Victoria","AR",-58.546139,-34.455051),
(3856210,"Empalme Villa Constitución","AR",-60.379391,-33.26038),
(3832729,"Villa Giardino","AR",-64.48333,-31.033331),
(3841486,"Perico","AR",-65.114906,-24.382931),
(3842190,"Palpala","AR",-65.211632,-24.256479),
(3430597,"Departamento de Monte Caseros","AR",-57.833328,-30.25),
(3430598,"Monte Caseros","AR",-57.636261,-30.25359),
(3832376,"Yacimiento Rio Turbio","AR",-72.3508,-51.573212),
(3845181,"Malargüe","AR",-69.584267,-35.47546),
(3427377,"Villa Rosa","AR",-58.871159,-34.416569),
(3855712,"Eusebia","AR",-61.85704,-30.946239),
(3430568,"Moquehuá","AR",-59.775051,-35.091801),
(3862100,"Ceres","AR",-61.945042,-29.881001),
(3839262,"Recreo","AR",-60.73299,-31.490761),
(3861869,"Chacras de Coria","AR",-68.866669,-33),
(3866237,"Almafuerte","AR",-64.255592,-32.192959),
(3844424,"Mendiolaza","AR",-64.300873,-31.26738),
(3833111,"Veinticinco de Mayo","AR",-67.716377,-37.774101),
(3832763,"Villa del Totoral","AR",-63.716671,-30.816669),
(3429458,"Romang","AR",-59.748058,-29.501619),
(3427340,"Vivoratá","AR",-57.666328,-37.663872),
(3845293,"Madariaga","AR",-64.666672,-25.91667),
(3856140,"Epuyén","AR",-71.387337,-42.221859),
(3846915,"Libertador General San Martin","AR",-64.787567,-23.80644),
(3832631,"Villa Rumipal","AR",-64.48027,-32.187901),
(3834048,"Tostado","AR",-61.769169,-29.232019),
(3859409,"Devoto","AR",-62.306339,-31.40431),
(3861958,"Cevil Redondo","AR",-65.283333,-26.783331),
(3861415,"Departamento de Chimbas","AR",-68.533333,-31.466669),
(3861416,"Chimbas","AR",-68.533333,-31.48333),
(3832411,"Warnes","AR",-60.535229,-34.91066),
(3835300,"Sierra de la Ventana","AR",-61.795181,-38.138069),
(3860365,"Conesa","AR",-60.354279,-33.594341),
(3853509,"Jesús María","AR",-60.79298,-32.667198),
(3847783,"Las Talas","AR",-64.215881,-30.75589),
(3832793,"Villa Canas","AR",-61.607571,-34.00565),
(3865999,"Departamento de Aluminé","AR",-71,-39.166672),
(3866000,"Alumine","AR",-70.919701,-39.236858),
(3833936,"Tránsito","AR",-63.196011,-31.4252),
(3839288,"Real del Padre","AR",-67.764992,-34.841419),
(3855131,"General Baldissera","AR",-62.306301,-33.122459),
(3430454,"Partido de Navarro","AR",-59.5,-35),
(3430457,"Navarro","AR",-59.276989,-35.005589),
(3834665,"Tancacha","AR",-63.980701,-32.243092),
(3833182,"Vaqueros","AR",-65.397911,-24.705851),
(3839263,"Recreo","AR",-65.060959,-29.281839),
(3833412,"Unquillo","AR",-64.316147,-31.23073),
(3834647,"Tapalqué","AR",-60.026402,-36.354931),
(3427456,"Villa de los Patricios","AR",-58.537331,-34.61969),
(3835617,"Sauce Viejo","AR",-60.836658,-31.77125),
(3859034,"Egusquiza","AR",-61.62759,-31.09565),
(3839667,"Departamento de Quemú Quemú","AR",-63.75,-36.25),
(3839668,"Quemu Quemu","AR",-63.564281,-36.05463),
(3833358,"Uspallata","AR",-69.348717,-32.591702),
(3855394,"Fraile Pintado","AR",-64.799431,-23.94079),
(3866268,"Alicia","AR",-62.464951,-31.94006),
(3835695,"Sastre","AR",-61.828861,-31.76762),
(3853745,"Intendente Alvear","AR",-63.592049,-35.233829),
(3838741,"Rivera","AR",-63.24464,-37.158951),
(3838563,"Departamento de Rosario de la Frontera","AR",-64.833328,-25.91667),
(3838564,"Rosario de la Frontera","AR",-64.97094,-25.79693),
(3833027,"Vera","AR",-60.212608,-29.459299),
(3432790,"La Constancia","AR",-58.760052,-37.226219),
(3948969,"Los Rosas","AR",-61.586109,-32.47694),
(3866214,"Alpachiri","AR",-63.774448,-37.377041),
(3862883,"Canals","AR",-62.889271,-33.565418),
(3430287,"Open Door","AR",-59.07719,-34.492359),
(3855107,"General Gutiérrez","AR",-68.783493,-32.958309),
(3836188,"Departamento de Santa Lucía","AR",-68.466667,-31.533331),
(3836194,"Santa Lucia","AR",-68.495033,-31.539869),
(3853562,"James Craik","AR",-63.466881,-32.161201),
(3860280,"Coquimbito","AR",-68.75,-32.966671),
(3862761,"Capilla del Monte","AR",-64.525146,-30.86088),
(3842559,"Oro Verde","AR",-60.51749,-31.825081),
(3861002,"Clodomira","AR",-64.131081,-27.5744),
(3853786,"Ingeniero Jacobacci","AR",-69.544792,-41.34269),
(3865375,"Arrufo","AR",-61.728619,-30.232809),
(3837238,"San José de la Esquina","AR",-61.703159,-33.114441),
(3427422,"Villa Guillermina","AR",-59.454441,-28.24258),
(3863050,"Campo Quijano","AR",-65.636559,-24.909821),
(3851913,"La Consulta","AR",-69.121819,-33.73579),
(3832654,"Villa Parque","AR",-60.733459,-32.87521),
(3845266,"Magdalena","AR",-63.105701,-27.546949),
(3846991,"Leones","AR",-62.29678,-32.661739),
(3864632,"Barrio La Fortuna","AR",-62.30323,-32.649391),
(3860811,"Colonia Baron","AR",-63.854038,-36.15152),
(3429786,"Puerto Esperanza","AR",-54.673061,-26.015169),
(3834309,"Departamento de Toay","AR",-64.800003,-36.583328),
(3834310,"Toay","AR",-64.378601,-36.673382),
(3844644,"Mayor Buratovich","AR",-62.616619,-39.258961),
(3430409,"Norberto de la Riestra","AR",-59.77169,-35.273281),
(3861966,"Cervantes","AR",-67.383331,-39.049999),
(3864888,"Balnearia","AR",-62.667332,-31.008801),
(3844229,"Mina Clavero","AR",-65.006187,-31.721001),
(3433881,"Francisco Álvarez","AR",-58.858341,-34.633869),
(3841937,"Parera","AR",-64.500893,-35.146),
(3862945,"Cañada Rosquín","AR",-61.6007,-32.053669),
(3429738,"Puerto Piray","AR",-54.71476,-26.467791),
(3837854,"San Carlos Norte","AR",-61.074001,-31.67333),
(3853330,"Justo Daract","AR",-65.18277,-33.859402),
(3851100,"Lago Puelo","AR",-71.614052,-42.080952),
(3845350,"Luzuriaga","AR",-68.816673,-32.950001),
(3835238,"Simoca","AR",-65.356468,-27.26272),
(3855626,"Felicia","AR",-61.212349,-31.244579),
(3832806,"Villa Ascasubi","AR",-63.891571,-32.163509),
(3839402,"Ranchillos","AR",-65.045532,-26.954241),
(3433347,"Jáuregui","AR",-59.17778,-34.597431),
(3856436,"El Trebol","AR",-61.701401,-32.200802),
(3832712,"Villa Krause","AR",-68.533333,-31.566669),
(3837232,"San José del Rincón","AR",-60.567612,-31.604259),
(3860466,"Comandante Luis Piedra Buena","AR",-68.914673,-49.98513),
(3854092,"Huanguelén","AR",-61.950001,-37.033329),
(3853974,"Huinca Renanco","AR",-64.375801,-34.840382),
(3838796,"Departamento de Río Segundo","AR",-63.5,-31.75),
(3838797,"Rio Segundo","AR",-63.909901,-31.652599),
(3857012,"El Quebrachal","AR",-64.066673,-25.283331),
(3833773,"Tres Lomas","AR",-62.86047,-36.457218),
(3865430,"Arribeños","AR",-61.35466,-34.207741),
(3844759,"Marull","AR",-62.82576,-30.994711),
(3836239,"Santa Isabel","AR",-61.692848,-33.887051),
(3862251,"Catrilo","AR",-63.42168,-36.405979),
(3852468,"Laboulaye","AR",-63.39119,-34.126621),
(3839996,"Departamento de Punilla","AR",-64.666672,-31.16667),
(3836137,"Santa María","AR",-64.466667,-31.26667),
(3436109,"Barrio Norte","AR",-58.400002,-34.583328),
(3857851,"Elisa","AR",-61.048439,-30.69512),
(3434132,"Escalada","AR",-59.11396,-34.159199),
(3856036,"Espartillar","AR",-62.434391,-37.360859),
(3862373,"Casbas","AR",-62.504082,-36.759399),
(3430234,"Palermo","AR",-58.430531,-34.588558),
(3835351,"Serrano","AR",-63.538422,-34.469711),
(3435966,"Bovril","AR",-59.445122,-31.343109),
(3855143,"General Acha","AR",-64.604309,-37.37698),
(3948970,"San Lorenzo","AR",-60.744999,-32.74139),
(3844687,"Matorrales","AR",-63.511181,-31.71509),
(3862144,"Centenario","AR",-68.139977,-38.804329),
(3861443,"Departamento de Chilecito","AR",-67.5,-29.41667),
(3861445,"Chilecito","AR",-67.497398,-29.161949),
(3859574,"Curtiembre","AR",-60.16777,-31.46221),
(3849140,"La Quiaca","AR",-65.592987,-22.10236),
(3844819,"María Susana","AR",-61.90292,-32.26561),
(3862084,"Departamento de Cerrillos","AR",-65.416672,-25),
(3862086,"Cerrillos","AR",-65.487061,-24.898331),
(3433282,"Jubileo","AR",-58.63385,-31.73358),
(3436099,"Basavilbaso","AR",-58.878578,-32.372131),
(3837456,"San Jerónimo Norte","AR",-61.077339,-31.55097),
(3850005,"Lamarque","AR",-65.70208,-39.423038),
(3837590,"San Gregorio","AR",-62.035782,-34.3237),
(3838201,"Sampacho","AR",-64.722107,-33.3839),
(3844473,"Medrano","AR",-68.6138,-33.179619),
(3849298,"Partido de Laprida","AR",-60.75,-37.5),
(3849300,"Laprida","AR",-60.79969,-37.544151),
(3433564,"Herrera","AR",-58.624619,-32.435162),
(3835710,"Sarmiento","AR",-69.069962,-45.58815),
(3427505,"Vicente López","AR",-58.473701,-34.529469),
(3436077,"Belgrano","AR",-58.45829,-34.562698),
(3832662,"Villa Nueva","AR",-63.247631,-32.43293),
(3842796,"Obispo Trejo","AR",-63.413479,-30.781281),
(3431318,"Partido de Lobería","AR",-58.75,-38.083328),
(3431321,"Lobería","AR",-58.791302,-38.155739),
(3832098,"Zavalla","AR",-60.879551,-33.01968),
(3866905,"Agrelo","AR",-68.88694,-33.118519),
(3865281,"Ataliva","AR",-61.430141,-30.996759),
(3854454,"Güemes","AR",-65.293381,-27.30838),
(3865424,"Arroyito","AR",-63.050018,-31.420219),
(3848353,"Las Heras","AR",-68.935928,-46.541859),
(3855118,"General Deheza","AR",-63.78611,-32.756599),
(3864261,"Bialet Massé","AR",-64.460152,-31.313129),
(3845596,"Los Sauces","AR",-64.682137,-30.736629),
(3835021,"Suardi","AR",-61.961189,-30.535721),
(3832661,"Villa Nueva","AR",-68.78038,-32.897221),
(3833878,"Departamento de Trenel","AR",-64.25,-35.666672),
(3833880,"Trenel","AR",-64.132179,-35.698372),
(3864274,"Berrotaran","AR",-64.388672,-32.451),
(3838211,"Salto Grande","AR",-61.08741,-32.668011),
(3864328,"Beltran","AR",-64.060982,-27.82913),
(3834502,"Termas de Rio Hondo","AR",-64.86042,-27.49983),
(3852815,"La Angelita","AR",-60.9692,-34.262718),
(3865223,"Ausonia","AR",-63.24398,-32.661671),
(3861666,"Charras","AR",-64.047188,-33.023998),
(3853323,"Kaiken","AR",-67.199997,-54.533329),
(3864847,"Bandera","AR",-62.265999,-28.888399),
(3846267,"Los Cisnes","AR",-63.471981,-33.399929),
(3429712,"Puerto Wanda","AR",-54.599411,-25.963739),
(3427877,"Tacuarendí","AR",-59.30212,-28.417789),
(3854723,"Departamento de Graneros","AR",-65.333328,-27.75),
(3854724,"Graneros","AR",-65.438301,-27.64934),
(3848164,"Las Lomitas","AR",-60.593029,-24.709551),
(3835921,"Santa Sylvina","AR",-61.13747,-27.832609),
(3865762,"Angélica","AR",-61.54599,-31.55127),
(3836143,"Santa María","AR",-63.260319,-26.21797),
(3436003,"Boedo","AR",-58.416672,-34.633331),
(3862240,"Caucete","AR",-68.281052,-31.651791),
(3859179,"Dorila","AR",-63.715611,-35.775681),
(3428056,"Partido de San Vicente","AR",-58.5,-35.083328),
(3436414,"Alejandro Korn","AR",-58.3825,-34.98278),
(3837816,"Sancti Spíritu","AR",-62.238789,-34.014019),
(3857756,"El Maiten","AR",-71.166931,-42.04924),
(3433349,"Jardin America","AR",-55.226978,-27.043461),
(3853444,"Juan Bernabé Molina","AR",-60.512981,-33.492828),
(3837960,"San Basilio","AR",-64.314949,-33.497631),
(3433362,"Departamento de Itatí","AR",-58,-27.33333),
(3433363,"Itati","AR",-58.244579,-27.27043),
(3435266,"Concepcion de la Sierra","AR",-55.520309,-27.98311),
(3838634,"Rolón","AR",-63.414982,-37.167801),
(3854331,"Hernando","AR",-63.73333,-32.426571),
(3855120,"General Daniel Cerri","AR",-62.39806,-38.70612),
(3862583,"Carmen de Patagones","AR",-62.980968,-40.798279),
(3430648,"Mocoreta","AR",-57.96344,-30.61891),
(3856122,"Escalante","AR",-67.78981,-45.75016),
(3429664,"Quequén","AR",-58.7155,-38.53532),
(3836952,"San Martín de las Escobas","AR",-61.569851,-31.8578),
(3844933,"Maquinchao","AR",-68.73333,-41.25),
(3857387,"El Palomar","AR",-64.596878,-26.88315),
(3850920,"Laguna Paiva","AR",-60.658939,-31.303909),
(3854937,"Partido de Adolfo González Chaves","AR",-60.25,-38),
(3866923,"Adolfo Gonzáles Chaves","AR",-60.099998,-38.033329),
(3430709,"Mercedes","AR",-58.078949,-29.18186),
(3430951,"Partido de Magdalena","AR",-57.5,-35.25),
(3430957,"Magdalena","AR",-57.513008,-35.08065),
(3853783,"Ingeniero Luiggi","AR",-64.465187,-35.385849),
(3837989,"San Antonio de Arredondo","AR",-64.530418,-31.47949),
(3835388,"Selva","AR",-62.047699,-29.767759),
(3429688,"Punta Lara","AR",-57.98455,-34.80954),
(3855288,"Gaboto","AR",-60.814159,-32.43549),
(3836375,"Santa Clara de Saguier","AR",-61.818371,-31.33774),
(3855072,"General Pinto","AR",-61.89093,-34.764591),
(3435813,"Camet","AR",-57.605019,-37.88903),
(3841908,"Pasco","AR",-63.342319,-32.74733),
(3855322,"Fuentes","AR",-61.074329,-33.17252),
(3844270,"Miguel Cané","AR",-63.510872,-36.157009),
(3430067,"Pedernales","AR",-59.648998,-35.227711),
(3436030,"Bernardo de Irigoyen","AR",-53.645809,-26.255199),
(3865888,"Florentino Ameghino","AR",-62.46701,-34.844051),
(3832699,"Villa Luján","AR",-65.25,-26.816669),
(3845202,"Malagueno","AR",-64.358398,-31.46467),
(3844459,"Melincué","AR",-61.454578,-33.65847),
(3832790,"Villa Carmela","AR",-65.283333,-26.75),
(3847188,"La Violeta","AR",-60.170341,-33.73251),
(3861493,"Departamento de Chicoana","AR",-65.583328,-25.16667),
(3861494,"Chicoana","AR",-65.533096,-25.10088),
(3839063,"Ricardo Gaviña","AR",-60.039082,-37.444752),
(3851619,"La Emilia","AR",-60.31646,-33.34827),
(3845263,"Maggiolo","AR",-62.245258,-33.721661),
(3435234,"Coronel Vidal","AR",-57.728649,-37.446041),
(3429601,"Partido de Rauch","AR",-58.833328,-36.583328),
(3429602,"Rauch","AR",-59.089729,-36.774502),
(3866367,"Alderetes","AR",-65.133331,-26.816669),
(3428068,"San Vicente","AR",-54.133331,-26.616671),
(3849980,"La Maruja","AR",-64.939972,-35.673599),
(3841413,"Piamonte","AR",-61.98217,-32.143009),
(3855074,"General Pinedo","AR",-61.283329,-27.316669),
(3849924,"La Mendieta","AR",-64.963768,-24.311871),
(3844668,"Máximo Paz","AR",-60.958302,-33.484589),
(3863377,"Caleufu","AR",-64.557777,-35.595589),
(3832512,"Vista Flores","AR",-69.154442,-33.650589),
(3859535,"Dalmacio Velez Sarsfield","AR",-63.580379,-32.610722),
(3855719,"Etruria","AR",-63.246601,-32.940079),
(3853412,"Juárez Celman","AR",-64.166107,-31.258089),
(3855284,"Gaiman","AR",-65.492897,-43.2897),
(3853824,"Inés Indart","AR",-60.539322,-34.39624),
(3844848,"María Juana","AR",-61.751869,-31.676809),
(3832772,"Villada","AR",-61.444401,-33.34856),
(3838840,"Río Mayo","AR",-70.257973,-45.68573),
(3841475,"Perito Moreno","AR",-70.929749,-46.589939),
(3847557,"La Tablada","AR",-65.305542,-31.455669),
(3832609,"Villa Traful","AR",-71.40583,-40.657551),
(3434731,"El Colorado","AR",-59.37291,-26.308081),
(3428858,"San Jose de Feliciano","AR",-58.751671,-30.38452),
(3843026,"Noetinger","AR",-62.31126,-32.365971),
(3835372,"Senillosa","AR",-68.416672,-39),
(3853923,"Idiazabal","AR",-63.03252,-32.81411),
(3429865,"Partido de Presidencia de la Plaza","AR",-59.75,-27),
(3429866,"Presidencia de la Plaza","AR",-59.84243,-27.001471),
(3855102,"Partido de General La Madrid","AR",-61.25,-37.5),
(3855104,"General La Madrid","AR",-61.26273,-37.247559),
(3847599,"Las Vertientes","AR",-64.579079,-33.283371),
(3840080,"Puerto San Martín","AR",-60.736198,-32.715321),
(3435750,"Campo Viera","AR",-55.033329,-27.383329),
(3429496,"Ringuelet","AR",-57.988049,-34.889359),
(3434094,"Departamento de Esquina","AR",-59.333328,-30),
(3434095,"Esquina","AR",-59.527191,-30.014441),
(3852480,"Laborde","AR",-62.856609,-33.153191),
(3845344,"Macachin","AR",-63.6665,-37.135979),
(3861257,"Chovet","AR",-61.605808,-33.598759),
(3430180,"Pampa del Indio","AR",-59.91898,-26.06468),
(3846374,"Los Cardos","AR",-61.63102,-32.32206),
(3853592,"Jacinto Arauz","AR",-63.43169,-38.08606),
(3832719,"Villa Huidobro","AR",-64.586861,-34.838261),
(3853644,"Isla Verde","AR",-64.150002,-28.65),
(3431005,"Lucas Gonzalez","AR",-59.530128,-32.3843),
(3855715,"Eugenio Bustos","AR",-69.070442,-33.77734),
(3429449,"Partido de Roque Pérez","AR",-59.416672,-35.5),
(3429450,"Roque Pérez","AR",-59.33271,-35.397942),
(3836170,"Santa Magdalena","AR",-63.944092,-34.517761),
(3435539,"Cerrito","AR",-57.912769,-27.84218),
(3853477,"Josefina","AR",-61.991829,-31.406219),
(3429721,"Puerto Tirol","AR",-59.082062,-27.372181),
(3863833,"Brinkmann","AR",-62.037418,-30.8659),
(3434966,"Durazno","AR",-59.277802,-31.98564),
(3862215,"Cayastá","AR",-60.160549,-31.20089),
(3836983,"Departamento de San Martín","AR",-65.666672,-32.666672),
(3848588,"Las Chacras","AR",-65.776459,-32.56237),
(3839489,"Partido de Quitilipi","AR",-60.166672,-26.66667),
(3839490,"Quitilipi","AR",-60.216831,-26.869129),
(3853958,"Humboldt","AR",-61.082401,-31.40099),
(3835998,"Santa Rosa","AR",-60.33342,-31.419689),
(3832676,"Villa Minetti","AR",-61.62775,-28.62133),
(3854916,"Goudge","AR",-68.131531,-34.679272),
(3853938,"Ibarlucea","AR",-60.792721,-32.848202),
(3865474,"Arias","AR",-62.402721,-33.644112),
(3841426,"Peyrano","AR",-60.801491,-33.537331),
(3434291,"El Soberbio","AR",-54.198769,-27.29846),
(3839456,"Rama Caída","AR",-68.381989,-34.67749),
(3855690,"Facundo","AR",-69.973732,-45.309422),
(3833211,"Valle Hermoso","AR",-64.480843,-31.117319),
(3855369,"Fray Luis Beltrán","AR",-68.65062,-33.00724),
(3840858,"Departamento de Pocito","AR",-68.699997,-31.799999),
(3840860,"Pocito","AR",-68.583328,-31.683331),
(3433648,"Guarani","AR",-55.166672,-27.51667),
(3836752,"Departamento de San Pedro","AR",-64.833328,-24.33333),
(3836772,"San Pedro","AR",-64.866142,-24.23127),
(3435732,"Departamento de Candelaria","AR",-55.5,-27.5),
(3435734,"Candelaria","AR",-55.745361,-27.459499),
(3866667,"Agua de Oro","AR",-64.300171,-31.06661),
(3853616,"Italo","AR",-63.78199,-34.79237),
(3848863,"Las Acequias","AR",-63.976101,-33.281551),
(3837987,"San Antonio de Litin","AR",-62.63237,-32.213772),
(3861846,"Chaján","AR",-65.004784,-33.556358),
(3851244,"La Florida","AR",-65.554497,-27.226839),
(3863262,"Campanas","AR",-67.617264,-28.553949),
(3839565,"Quimili","AR",-62.416672,-27.633329),
(3435340,"Colonia Benitez","AR",-58.94622,-27.33099),
(3859102,"Dudignac","AR",-60.705219,-35.649059),
(3435532,"Cerro Azul","AR",-55.496201,-27.633101),
(3832388,"Winifreda","AR",-64.233879,-36.226429),
(3850355,"La Limpia","AR",-60.591019,-35.076679),
(3859103,"Ducós","AR",-62.416672,-37.466671),
(3865448,"Arocena","AR",-60.976158,-32.07859),
(3860733,"Colonia Río Chico","AR",-64.016762,-31.27132),
(3862820,"Candonga","AR",-64.3619,-31.099279),
(3433580,"Hasenkamp","AR",-59.835449,-31.51226),
(3856231,"Embarcacion","AR",-64.096046,-23.208981),
(3859951,"Costa Sacate","AR",-63.75935,-31.647699),
(3842899,"Nueva Lehmann","AR",-61.515652,-31.11702),
(3859956,"Costa de Araujo","AR",-68.3974,-32.757809),
(3428123,"Santa Teresita","AR",-56.70105,-36.541309),
(3429778,"Puerto Ibicuy","AR",-59.183331,-33.73333),
(3859498,"Delfín Gallo","AR",-65.09137,-26.853331),
(3427916,"Solís","AR",-59.324879,-34.297569),
(3854492,"Departamento de Guatraché","AR",-63.75,-37.5),
(3854493,"Guatrache","AR",-63.53022,-37.667759),
(3427375,"Villars","AR",-58.940842,-34.826351),
(3429493,"Río Luján","AR",-58.92028,-34.285561),
(3845016,"Manantiales Chicos","AR",-60.3032,-33.865021),
(3855140,"General Alvear","AR",-60.669029,-31.94594),
(3863502,"Departamento de Cafayate","AR",-65.833328,-26.08333),
(3863503,"Cafayate","AR",-65.976143,-26.07295),
(3860427,"Concepción","AR",-65.59726,-27.342779),
(3854993,"Gobernador Benegas","AR",-68.849998,-32.950001),
(3436203,"Azcuénaga","AR",-59.374409,-34.364609),
(3842680,"Olaeta","AR",-63.907349,-33.045261),
(3846236,"Los Condores","AR",-64.277519,-32.319839),
(3859502,"De la Garma","AR",-60.415001,-37.96336),
(3854604,"Guaminí","AR",-62.416672,-37.033329),
(3852374,"La Calera","AR",-64.335289,-31.343769),
(3848890,"Lartigau","AR",-61.565498,-38.447201),
(3865413,"Arroyo Cabral","AR",-63.40126,-32.491192),
(3854981,"Gobernador Gregores","AR",-70.247414,-48.750568),
(3836065,"Santa Regina","AR",-63.172531,-34.549278),
(3865974,"Amadores","AR",-65.637901,-28.26284),
(3854438,"Guerrico","AR",-60.40062,-33.673439),
(3837852,"San Carlos Sur","AR",-61.101189,-31.75692),
(3866082,"Alto de la Piedra","AR",-64.350647,-31.591431),
(3860881,"Colastiné Sur","AR",-60.600899,-31.66086),
(3429730,"Puerto Ruiz","AR",-59.36404,-33.221218),
(3857061,"El Pueblito","AR",-64.298599,-31.11578),
(3838981,"Rincón del Doll","AR",-60.392479,-32.436352),
(3841708,"Pedregal","AR",-68.683327,-32.966671),
(3832079,"Departamento de Zonda","AR",-68.583527,-31.68494),
(3832080,"Zonda","AR",-68.73333,-31.549999),
(3832715,"Villa Iris","AR",-63.234539,-38.17215),
(3841298,"Departamento de Picún Leufú","AR",-69.5,-39.5),
(3841301,"Picun Leufu","AR",-69.279663,-39.52351),
(3864891,"Ballesteros","AR",-62.983021,-32.545341),
(3839801,"Quebracho Herrado","AR",-62.2262,-31.54891),
(3865840,"Anatuya","AR",-62.834721,-28.46064),
(3834513,"Teodelina","AR",-61.528809,-34.186878),
(3835402,"Segui","AR",-60.124882,-31.956421),
(3863362,"Calingasta","AR",-69.407829,-31.330839),
(3846869,"Lin Calel","AR",-60.245029,-38.7062),
(3427949,"Siete Palmas","AR",-58.332191,-25.20228),
(3841748,"Pavón","AR",-60.40517,-33.241718),
(3430156,"Parada Leis","AR",-55.840698,-27.601021),
(3433456,"Ingeniero Otamendi","AR",-58.86417,-34.234169),
(3835354,"Serodino","AR",-60.94817,-32.605881),
(3840258,"Progresso","AR",-60.989521,-31.13773),
(3849075,"La Reducción","AR",-65.350533,-26.95529),
(3864430,"Belén","AR",-67.028702,-27.65103),
(3848343,"Las Higueras","AR",-64.289001,-33.092312),
(3855056,"General San Martin","AR",-63.604488,-37.979038),
(3862719,"Carabelas","AR",-60.867111,-34.035851),
(3856220,"Emilio V. Bunge","AR",-63.195572,-34.779819),
(3844679,"Mattaldi","AR",-64.172546,-34.481941),
(3860208,"Coronel Baigorria","AR",-64.361069,-32.847698),
(3860705,"Colonia Tirolesa","AR",-64.086411,-31.237289),
(3866375,"Aldea San Francisco","AR",-60.63517,-31.961241),
(3436395,"Almirante Brown","AR",-58.450001,-34.666672),
(3856547,"El Tala","AR",-64.48333,-31.799999),
(3853706,"Iriondo","AR",-60.756271,-31.31448),
(3429331,"San Alberto","AR",-54.98333,-26.799999),
(3845366,"Lunlunta","AR",-68.822617,-33.041229),
(3841763,"Patricios","AR",-60.715931,-35.439548),
(3865491,"Arenaza","AR",-61.773651,-34.98597),
(3855917,"Estación Ramallo","AR",-60.066669,-33.5),
(3866308,"Algarrobo","AR",-63.13792,-38.894459),
(3865775,"Departamento de Añelo","AR",-69,-38.166672),
(3865776,"Anelo","AR",-68.788399,-38.354408),
(3832509,"Vistalba","AR",-68.883331,-33.01667),
(3847102,"Departamento de Leales","AR",-65.083328,-27.200001),
(3847103,"Leales","AR",-65.308891,-27.195169),
(3862889,"Cañadón Seco","AR",-67.583328,-46.549999),
(3427369,"Villa San Marcial","AR",-58.933331,-32.166672),
(3427958,"Sierra de los Padres","AR",-57.77161,-37.95269),
(3866396,"Aldea Brasilera","AR",-60.589981,-31.8901),
(3854089,"Huanqueros","AR",-61.217709,-30.011511),
(3832607,"Villa Tulumba","AR",-64.122398,-30.395519),
(3428003,"Departamento de Sauce","AR",-58.666672,-30),
(3428023,"Sauce","AR",-58.787769,-30.08671),
(3432355,"La Leonesa","AR",-58.703468,-27.037861),
(3832818,"Villa Albertina","AR",-64.333328,-30.683331),
(3832903,"Videla","AR",-60.65453,-30.94458),
(3856548,"El Tala","AR",-65.276428,-26.111759),
(3835230,"Sindicato Dodero","AR",-67.631432,-46.061771),
(3832786,"Villa Castelar","AR",-62.806969,-37.38575),
(3841744,"Pavón Arriba","AR",-60.823681,-33.311211),
(3856839,"El Retiro","AR",-64.481903,-31.18046),
(3865742,"Anguil","AR",-64.010246,-36.525669),
(3835289,"Sierras Bayas","AR",-60.159229,-36.933399),
(3854334,"Hernandez","AR",-60.021599,-32.337299),
(3860197,"Coronel Du Graty","AR",-60.914619,-27.68038),
(3855603,"Ferré","AR",-61.138779,-34.127281),
(3842672,"Olascoaga","AR",-60.611671,-35.236881),
(3853963,"Humaitá","AR",-64.467598,-27.103519),
(3834897,"Susana","AR",-61.51577,-31.355961),
(3843788,"Monte Vera","AR",-60.676769,-31.516701),
(3435107,"Curuzú","AR",-55.824799,-27.914869),
(3847858,"Las Pulgas","AR",-69.618858,-45.460979),
(3435974,"Bosques","AR",-58.234428,-34.819271),
(3859946,"Cotagaita","AR",-62.07402,-30.913071),
(3865786,"Andino","AR",-60.87722,-32.66832),
(3834459,"Ticino","AR",-63.436062,-32.693501),
(3832742,"Villa Florida","AR",-65.366669,-23.549999),
(3861713,"Chapanay","AR",-68.433327,-32.98333),
(3864731,"Barrancas","AR",-60.980011,-32.234219),
(3846080,"Los Juries","AR",-62.10862,-28.465389),
(3853447,"Juan Bautista Alberdi","AR",-61.809818,-34.440102),
(3842840,"Nuevo Torino","AR",-61.235401,-31.346451),
(3854459,"Departamento de Guaymallén","AR",-68.699997,-32.883331),
(3864299,"Bermejo","AR",-68.800003,-32.883331),
(3434958,"Echagüe","AR",-59.282001,-32.39185),
(3430943,"Makalle","AR",-59.286961,-27.206869),
(3430679,"Ministro Rivadavia","AR",-58.366192,-34.841042),
(3835938,"Santa Rosa de Rio Primero","AR",-63.401909,-31.152309),
(3832803,"Villa Atuel","AR",-67.861771,-34.831322),
(3839588,"Quilino","AR",-64.500633,-30.21397),
(3840031,"Puiggari","AR",-60.447289,-32.05452),
(3840987,"Pirovano","AR",-61.566669,-36.5),
(3859500,"Del Campillo","AR",-64.495041,-34.376591),
(3860818,"Colonia Almada","AR",-63.864029,-32.03503),
(3864574,"Bauer y Sigel","AR",-61.945309,-31.27182),
(3832759,"Villa de Soto","AR",-64.999474,-30.85523),
(3427444,"Villa El Cacique","AR",-59.395691,-37.676159),
(3839061,"Ricardone","AR",-60.782398,-32.76923),
(3846135,"Los Gutiérrez","AR",-65.133331,-26.799999),
(3861059,"Cintra","AR",-62.652142,-32.306728),
(3832783,"Villa Chañar Ladeado","AR",-62.038311,-33.325241),
(3432144,"Lanteri","AR",-59.63681,-28.84141),
(3429733,"Puerto Reconquista","AR",-59.586418,-29.235241),
(3837797,"San Eduardo","AR",-62.09137,-33.87001),
(3833947,"Trancas","AR",-65.280251,-26.23135),
(3851181,"La Francia","AR",-62.633961,-31.40675),
(3430015,"Picada Gobernador Lopez","AR",-55.24585,-27.670691),
(3855201,"Garré","AR",-62.602169,-36.560371),
(3832805,"Villa Atamisqui","AR",-63.81609,-28.49609),
(3429156,"Departamento de San Cosme","AR",-58.5,-27.33333),
(3429157,"San Cosme","AR",-58.512138,-27.371229),
(3833463,"Ucacha","AR",-63.50666,-33.032028),
(3866959,"Achiras","AR",-64.993309,-33.175381),
(3860709,"Colonia Seré","AR",-62.725422,-35.436878),
(3861677,"Charbonier","AR",-64.543747,-30.77302),
(3433775,"Villa Urquiza","AR",-58.48333,-34.566669),
(3575625,"Saint Joseph","DM",-61.433331,15.43333),
(3575612,"Salisbury","DM",-61.450001,15.43333),
(3575630,"Saint David","DM",-61.283329,15.46667),
(3575870,"Castle Bruce","DM",-61.26667,15.43333),
(3575761,"Lagon","DM",-61.466671,15.58333),
(3575639,"Rosalie","DM",-61.26667,15.36667),
(3575632,"Saint Andrew","DM",-61.366669,15.56667),
(3575565,"Woodford Hill","DM",-61.333328,15.56667),
(3575628,"Saint George","DM",-61.366669,15.3),
(3575737,"Loubiere","DM",-61.383331,15.26667),
(3575578,"Trafalgar","DM",-61.349998,15.31667),
(1880252,"Singapore","SG",103.850067,1.28967),
(1882316,"Woodlands New Town","SG",103.776672,1.44444),
(1880574,"Kampong Pasir Ris","SG",103.931938,1.37833),
(1880216,"Tampines Estate","SG",103.940277,1.35806),
(8010237,"Banachaur","NP",85.415756,27.666161),
(1283582,"Biratnagar","NP",87.283371,26.483101),
(1283316,"Janakpur Zone","NP",86,27.33333),
(7648379,"Dhanusa","NP",86.010002,26.83),
(7800051,"Basahiya","NP",85.911797,26.6961),
(7943571,"Basahiya","NP",85.913887,26.69743),
(7800283,"Darling","NP",83.589157,28.27663),
(7953967,"Ramrekha","NP",83.605827,28.26368),
(7289706,"Madhya Pashchimanchal","NP",82.313347,29.059771),
(1283606,"Bherī Zone","NP",81.666672,28.58333),
(6941099,"Nepalgunj","NP",81.616669,28.049999),
(7521311,"National Capital Region","PH",120.971748,14.59455),
(1701668,"Manila","PH",120.982201,14.6042),
(7521310,"Bicol","PH",123.563889,13.31389),
(1706889,"Legaspi","PH",123.734444,13.13722),
(1711003,"Iloilo City","PH",122.550003,10.75),
(1711005,"Iloilo","PH",122.564438,10.69694),
(7521301,"Ilocos","PH",120.520828,16.97917),
(1695357,"Province of Pangasinan","PH",120.333328,15.91667),
(1716197,"Dagupan","PH",120.51667,16.1),
(7521309,"Davao","PH",125.708481,6.81304),
(1715348,"Davao","PH",125.612778,7.07306),
(1711032,"Province of Ilocos Sur","PH",120.583328,17.33333),
(1717455,"Cervantes","PH",120.716667,16.98333),
(1717452,"Cervantes","PH",120.735901,16.9909),
(7521307,"Eastern Visayas","PH",124.98333,11.41667),
(1697549,"Province of Northern Samar","PH",124.666672,12.33333),
(1687725,"Santo Domingo","PH",120.744003,14.9917),
(1726279,"Province of Batangas","PH",121.083328,13.91667); | 51.786 | 77 | 0.676264 |
e9c9f491313db8227027169d5cc15ec09a1ff812 | 520 | rs | Rust | src/asset.rs | kunicmarko20/express-vpn-gui | 1aaeb1d14ca5b7c2611df3bb69dac553425e3cd9 | [
"MIT"
] | 12 | 2019-03-04T11:12:20.000Z | 2021-06-28T06:50:20.000Z | src/asset.rs | kunicmarko20/express-vpn-gui | 1aaeb1d14ca5b7c2611df3bb69dac553425e3cd9 | [
"MIT"
] | 1 | 2020-04-08T08:23:58.000Z | 2020-04-08T08:23:58.000Z | src/asset.rs | kunicmarko20/express-vpn-gui | 1aaeb1d14ca5b7c2611df3bb69dac553425e3cd9 | [
"MIT"
] | 5 | 2020-11-05T16:09:25.000Z | 2021-06-28T06:50:23.000Z | pub const DATA_DIRECTORY: &'static str = "express-vpn-gui/";
pub const EXECUTABLE_NAME: &'static str = "express-vpn-gui";
pub const PATH_IMAGE_LOGO: &'static str = "express-vpn-gui/logo.png";
pub const PATH_IMAGE_ON: &'static str = "express-vpn-gui/on.png";
pub const PATH_IMAGE_OFF: &'static str = "express-vpn-gui/off.png";
pub const PATH_DESKTOP_ENTRY: &'static str = "applications/express-vpn-gui.desktop";
pub const IMAGE_NAME_ON: &'static str = "on.png";
pub const IMAGE_NAME_OFF: &'static str = "off.png";
| 32.5 | 84 | 0.726923 |
70be0dbe0c3aeb4d6c2b7ad4e5b4f4c5714f3ca4 | 890 | h | C | modules/miheev_ivan_d-ary_heap/include/DHeap_application.h | BalovaElena/devtools-course-practice | f8d5774dbb78ec50200c45fd17665ed40fc8c4c5 | [
"CC-BY-4.0"
] | null | null | null | modules/miheev_ivan_d-ary_heap/include/DHeap_application.h | BalovaElena/devtools-course-practice | f8d5774dbb78ec50200c45fd17665ed40fc8c4c5 | [
"CC-BY-4.0"
] | null | null | null | modules/miheev_ivan_d-ary_heap/include/DHeap_application.h | BalovaElena/devtools-course-practice | f8d5774dbb78ec50200c45fd17665ed40fc8c4c5 | [
"CC-BY-4.0"
] | null | null | null | // Copyright 2022 Olynin Alexander
#ifndef MODULES_MIHEEV_IVAN_D_ARY_HEAP_INCLUDE_DHEAP_APPLICATION_H_
#define MODULES_MIHEEV_IVAN_D_ARY_HEAP_INCLUDE_DHEAP_APPLICATION_H_
#include <string>
#include <vector>
#include "include/DHeap.h"
class Application {
private:
std::string Description();
std::string getElem(std::vector<std::string>::iterator it,
const std::vector<std::string>& args,
std::vector<double>* ans);
std::string getValue(std::vector<std::string> args,
std::string value, int* ans);
std::string Get(std::vector<std::string> args, DHeap Tmp);
std::string getDec(std::vector<std::string> args,
int* pos, double* dec);
public:
std::string operator()(int argc, const char** argv);
};
#endif // MODULES_MIHEEV_IVAN_D_ARY_HEAP_INCLUDE_DHEAP_APPLICATION_H_
| 34.230769 | 70 | 0.669663 |
cb2fe48d1b48fc17e2bc2ac39a3b43f22d03cde0 | 1,231 | go | Go | user/user_test.go | Luladjiev/hnews | 4726f06b3558485559b576494cda1a1eaa04285f | [
"MIT"
] | null | null | null | user/user_test.go | Luladjiev/hnews | 4726f06b3558485559b576494cda1a1eaa04285f | [
"MIT"
] | null | null | null | user/user_test.go | Luladjiev/hnews | 4726f06b3558485559b576494cda1a1eaa04285f | [
"MIT"
] | null | null | null | package user
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"github.com/luladjiev/hnews/request"
)
func TestGetWrongResponseData(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "null")
}))
defer ts.Close()
request.SetAPIURL(ts.URL)
_, err := Get("luladjiev")
if err == nil {
t.Errorf("Get() didn't check server response")
}
}
func TestGetCorrectParsing(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "{\"created\": 1468307419, \"id\": \"luladjiev\", \"karma\": 1, \"submitted\": [13349223]}")
}))
defer ts.Close()
request.SetAPIURL(ts.URL)
data, err := Get("luladjiev")
if err != nil {
t.Errorf("Get() got an error parsing server response")
}
if data.ID != "luladjiev" {
t.Errorf("Get() couldn't parse ID")
}
if data.Created != 1468307419 {
t.Errorf("Get() couldn't parse Created")
}
if data.Karma != 1 {
t.Errorf("Get() couldn't parse Karma")
}
if len(data.Submitted) != 1 || data.Submitted[0] != 13349223 {
t.Errorf("Get() couldn't parse Submitted")
}
}
| 20.180328 | 109 | 0.657189 |
74adb1ea8d5ed70ee0963a9c7d7a8e1cfd5c6874 | 374 | asm | Assembly | ee/hot/pick.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ee/hot/pick.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ee/hot/pick.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ; Function to set PICK HOTKEY V2.00 1988 Tony Tebby QJUMP
section hotkey
xdef hot_pick
xref hot_seti
include 'dev8_ee_hk_data'
;+++
; Set up a PICK HOTKEY
;
; error = HOT_PICK (key,name)
;---
hot_pick
moveq #hki.pick,d6 ; set pick
jmp hot_seti ; using utility
end
| 18.7 | 66 | 0.52139 |
bb990fc482751a5b1cd5730740179c5f2677362a | 369 | sql | SQL | Subqueries-and-JOINs/Employee Summary.sql | vasetousa/SQL-Server | 4ef525e1cf1924a6a29454b587dc7117c7239592 | [
"MIT"
] | null | null | null | Subqueries-and-JOINs/Employee Summary.sql | vasetousa/SQL-Server | 4ef525e1cf1924a6a29454b587dc7117c7239592 | [
"MIT"
] | null | null | null | Subqueries-and-JOINs/Employee Summary.sql | vasetousa/SQL-Server | 4ef525e1cf1924a6a29454b587dc7117c7239592 | [
"MIT"
] | null | null | null | USE [SoftUni]
GO
SELECT TOP 50
e.[EmployeeID],
CONCAT(e.[FirstName],' ', e.[LastName]) AS [EmployeeName],
CONCAT(m.[FirstName],' ', m.[LastName]) AS [ManagerName],
d.[Name] AS [DepartmentName]
FROM
[Employees] AS e
LEFT JOIN [Employees] AS m ON m.[EmployeeID] = e.[ManagerID]
LEFT JOIN [Departments] AS d ON e.[DepartmentID] = d.[DepartmentID]
ORDER BY e.[EmployeeID]
| 26.357143 | 67 | 0.701897 |
d02b92414d2fa280a78bfe43ab35cf524251bd0f | 560 | rb | Ruby | spec/queries/appeals_with_cancelled_root_task_completed_dispatch_query_spec.rb | ThorntonMatthewD/caseflow | 51448c06e8788daeb98c7535bc3766f3f3186b96 | [
"CC0-1.0"
] | 159 | 2015-10-16T14:25:19.000Z | 2022-03-23T17:43:26.000Z | spec/queries/appeals_with_cancelled_root_task_completed_dispatch_query_spec.rb | ThorntonMatthewD/caseflow | 51448c06e8788daeb98c7535bc3766f3f3186b96 | [
"CC0-1.0"
] | 13,775 | 2015-10-16T14:01:59.000Z | 2022-03-30T21:57:00.000Z | spec/queries/appeals_with_cancelled_root_task_completed_dispatch_query_spec.rb | rammatzkvosky/caseflow | 8f9f47fb6b371540f9f6b5421908ffe6200fad09 | [
"CC0-1.0"
] | 60 | 2015-10-16T14:20:39.000Z | 2022-02-22T13:40:52.000Z | # frozen_string_literal: true
describe AppealsWithCancelledRootTaskCompletedDispatchQuery, :postgres do
let!(:dispatched_appeal_with_cancelled_root_task) do
appeal = create(:appeal, :with_post_intake_tasks)
create(:bva_dispatch_task, :completed, appeal: appeal, parent: appeal.root_task)
appeal.root_task.cancelled!
appeal
end
describe "#call" do
subject { described_class.new.call }
it "returns array of matching appeals" do
expect(subject).to match_array([dispatched_appeal_with_cancelled_root_task])
end
end
end
| 29.473684 | 84 | 0.769643 |
d94a41d217cba2189a005eb62d055d285f45c379 | 19,540 | rs | Rust | node/node_proto/src/lib.rs | fikgol/stargate | ae2b915575baed28115cf3475e2a773d5158ea42 | [
"Apache-2.0"
] | 17 | 2019-10-21T06:53:12.000Z | 2020-09-19T03:09:38.000Z | node/node_proto/src/lib.rs | fikgol/stargate | ae2b915575baed28115cf3475e2a773d5158ea42 | [
"Apache-2.0"
] | 46 | 2019-10-23T14:09:07.000Z | 2020-10-26T00:59:26.000Z | node/node_proto/src/lib.rs | fikgol/stargate | ae2b915575baed28115cf3475e2a773d5158ea42 | [
"Apache-2.0"
] | 9 | 2019-10-21T05:37:18.000Z | 2020-10-24T11:58:00.000Z | // Copyright (c) The Starcoin Core Contributors
// SPDX-License-Identifier: Apache-2.0
//#[cfg(test)]
//mod protobuf_conversion_test;
use anyhow::{format_err, Error, Result};
use libra_crypto::HashValue;
use libra_types::account_address::AccountAddress;
use libra_types::transaction::{TransactionArgument, TransactionWithProof};
use sgtypes::channel_transaction::ChannelTransaction;
use sgtypes::script_package::ChannelScriptPackage;
use std::convert::{TryFrom, TryInto};
pub mod proto;
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct OpenChannelRequest {
pub remote_addr: AccountAddress,
pub local_amount: u64,
pub remote_amount: u64,
}
impl OpenChannelRequest {
pub fn new(remote_addr: AccountAddress, local_amount: u64, remote_amount: u64) -> Self {
Self {
remote_addr,
local_amount,
remote_amount,
}
}
}
impl TryFrom<crate::proto::node::OpenChannelRequest> for OpenChannelRequest {
type Error = Error;
fn try_from(value: crate::proto::node::OpenChannelRequest) -> Result<Self> {
Ok(Self {
remote_addr: value.remote_addr.try_into()?,
local_amount: value.local_amount,
remote_amount: value.remote_amount,
})
}
}
impl From<OpenChannelRequest> for crate::proto::node::OpenChannelRequest {
fn from(value: OpenChannelRequest) -> Self {
Self {
remote_addr: value.remote_addr.into(),
local_amount: value.local_amount,
remote_amount: value.remote_amount,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct OpenChannelResponse {}
impl OpenChannelResponse {
pub fn new() -> Self {
OpenChannelResponse {}
}
}
impl TryFrom<crate::proto::node::OpenChannelResponse> for OpenChannelResponse {
type Error = Error;
fn try_from(_value: crate::proto::node::OpenChannelResponse) -> Result<Self> {
Ok(Self::new())
}
}
impl From<OpenChannelResponse> for crate::proto::node::OpenChannelResponse {
fn from(_value: OpenChannelResponse) -> Self {
Self::default()
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PayRequest {
pub remote_addr: AccountAddress,
pub amount: u64,
}
impl PayRequest {
pub fn new(remote_addr: AccountAddress, amount: u64) -> Self {
PayRequest {
remote_addr,
amount,
}
}
}
impl TryFrom<crate::proto::node::PayRequest> for PayRequest {
type Error = Error;
fn try_from(value: crate::proto::node::PayRequest) -> Result<Self> {
Ok(Self {
remote_addr: value.remote_addr.try_into()?,
amount: value.amount,
})
}
}
impl From<PayRequest> for crate::proto::node::PayRequest {
fn from(value: PayRequest) -> Self {
Self {
remote_addr: value.remote_addr.into(),
amount: value.amount,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PayResponse {}
impl PayResponse {
pub fn new() -> Self {
PayResponse {}
}
}
impl TryFrom<crate::proto::node::PayResponse> for PayResponse {
type Error = Error;
fn try_from(_value: crate::proto::node::PayResponse) -> Result<Self> {
Ok(Self::new())
}
}
impl From<PayResponse> for crate::proto::node::PayResponse {
fn from(_value: PayResponse) -> Self {
Self::default()
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DepositRequest {
pub remote_addr: AccountAddress,
pub local_amount: u64,
}
impl DepositRequest {
pub fn new(remote_addr: AccountAddress, local_amount: u64) -> Self {
Self {
remote_addr,
local_amount,
}
}
}
impl TryFrom<crate::proto::node::DepositRequest> for DepositRequest {
type Error = Error;
fn try_from(value: crate::proto::node::DepositRequest) -> Result<Self> {
Ok(Self {
remote_addr: value.remote_addr.try_into()?,
local_amount: value.local_amount,
})
}
}
impl From<DepositRequest> for crate::proto::node::DepositRequest {
fn from(value: DepositRequest) -> Self {
Self {
remote_addr: value.remote_addr.into(),
local_amount: value.local_amount,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DepositResponse {}
impl DepositResponse {
pub fn new() -> Self {
Self {}
}
}
impl TryFrom<crate::proto::node::DepositResponse> for DepositResponse {
type Error = Error;
fn try_from(_value: crate::proto::node::DepositResponse) -> Result<Self> {
Ok(Self::new())
}
}
impl From<DepositResponse> for crate::proto::node::DepositResponse {
fn from(_value: DepositResponse) -> Self {
Self::default()
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct WithdrawRequest {
pub remote_addr: AccountAddress,
pub local_amount: u64,
}
impl WithdrawRequest {
pub fn new(remote_addr: AccountAddress, local_amount: u64) -> Self {
Self {
remote_addr,
local_amount,
}
}
}
impl TryFrom<crate::proto::node::WithdrawRequest> for WithdrawRequest {
type Error = Error;
fn try_from(value: crate::proto::node::WithdrawRequest) -> Result<Self> {
Ok(Self {
remote_addr: value.remote_addr.try_into()?,
local_amount: value.local_amount,
})
}
}
impl From<WithdrawRequest> for crate::proto::node::WithdrawRequest {
fn from(value: WithdrawRequest) -> Self {
Self {
remote_addr: value.remote_addr.into(),
local_amount: value.local_amount,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct WithdrawResponse {}
impl WithdrawResponse {
pub fn new() -> Self {
Self {}
}
}
impl TryFrom<crate::proto::node::WithdrawResponse> for WithdrawResponse {
type Error = Error;
fn try_from(_value: crate::proto::node::WithdrawResponse) -> Result<Self> {
Ok(Self::new())
}
}
impl From<WithdrawResponse> for crate::proto::node::WithdrawResponse {
fn from(_value: WithdrawResponse) -> Self {
Self::default()
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ChannelBalanceRequest {
pub remote_addr: AccountAddress,
}
impl ChannelBalanceRequest {
pub fn new(remote_addr: AccountAddress) -> Self {
Self { remote_addr }
}
}
impl TryFrom<crate::proto::node::ChannelBalanceRequest> for ChannelBalanceRequest {
type Error = Error;
fn try_from(value: crate::proto::node::ChannelBalanceRequest) -> Result<Self> {
Ok(Self {
remote_addr: value.remote_addr.try_into()?,
})
}
}
impl From<ChannelBalanceRequest> for crate::proto::node::ChannelBalanceRequest {
fn from(value: ChannelBalanceRequest) -> Self {
Self {
remote_addr: value.remote_addr.into(),
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ChannelBalanceResponse {
pub balance: u64,
}
impl ChannelBalanceResponse {
pub fn new(balance: u64) -> Self {
Self { balance }
}
}
impl TryFrom<crate::proto::node::ChannelBalanceResponse> for ChannelBalanceResponse {
type Error = Error;
fn try_from(value: crate::proto::node::ChannelBalanceResponse) -> Result<Self> {
Ok(Self {
balance: value.balance,
})
}
}
impl From<ChannelBalanceResponse> for crate::proto::node::ChannelBalanceResponse {
fn from(value: ChannelBalanceResponse) -> Self {
Self {
balance: value.balance,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct InstallChannelScriptPackageRequest {
pub channel_script_package: ChannelScriptPackage,
}
impl InstallChannelScriptPackageRequest {
pub fn new(channel_script_package: ChannelScriptPackage) -> Self {
Self {
channel_script_package,
}
}
}
impl TryFrom<crate::proto::node::InstallChannelScriptPackageRequest>
for InstallChannelScriptPackageRequest
{
type Error = Error;
fn try_from(value: crate::proto::node::InstallChannelScriptPackageRequest) -> Result<Self> {
Ok(Self {
channel_script_package: value
.channel_script_package
.ok_or_else(|| format_err!("Missing channel_script_package"))?
.try_into()?,
})
}
}
impl From<InstallChannelScriptPackageRequest>
for crate::proto::node::InstallChannelScriptPackageRequest
{
fn from(value: InstallChannelScriptPackageRequest) -> Self {
Self {
channel_script_package: Some(value.channel_script_package.into()),
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct InstallChannelScriptPackageResponse {}
impl InstallChannelScriptPackageResponse {
pub fn new() -> Self {
Self {}
}
}
impl TryFrom<crate::proto::node::InstallChannelScriptPackageResponse>
for InstallChannelScriptPackageResponse
{
type Error = Error;
fn try_from(_value: crate::proto::node::InstallChannelScriptPackageResponse) -> Result<Self> {
Ok(Self::new())
}
}
impl From<InstallChannelScriptPackageResponse>
for crate::proto::node::InstallChannelScriptPackageResponse
{
fn from(_value: InstallChannelScriptPackageResponse) -> Self {
Self::default()
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DeployModuleRequest {
pub module_bytes: Vec<u8>,
}
impl DeployModuleRequest {
pub fn new(module_bytes: Vec<u8>) -> Self {
Self { module_bytes }
}
}
impl TryFrom<crate::proto::node::DeployModuleRequest> for DeployModuleRequest {
type Error = Error;
fn try_from(value: crate::proto::node::DeployModuleRequest) -> Result<Self> {
Ok(Self {
module_bytes: value.module_bytes,
})
}
}
impl From<DeployModuleRequest> for crate::proto::node::DeployModuleRequest {
fn from(value: DeployModuleRequest) -> Self {
Self {
module_bytes: value.module_bytes,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DeployModuleResponse {
pub transaction_with_proof: TransactionWithProof,
}
impl DeployModuleResponse {
pub fn new(transaction_with_proof: TransactionWithProof) -> Self {
Self {
transaction_with_proof,
}
}
}
impl TryFrom<crate::proto::node::DeployModuleResponse> for DeployModuleResponse {
type Error = Error;
fn try_from(value: crate::proto::node::DeployModuleResponse) -> Result<Self> {
Ok(Self {
transaction_with_proof: value
.transaction_with_proof
.ok_or_else(|| format_err!("Missing transaction_with_proof"))?
.try_into()?,
})
}
}
impl From<DeployModuleResponse> for crate::proto::node::DeployModuleResponse {
fn from(value: DeployModuleResponse) -> Self {
Self {
transaction_with_proof: Some(value.transaction_with_proof.into()),
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ExecuteScriptRequest {
pub remote_addr: AccountAddress,
pub package_name: String,
pub script_name: String,
pub force_execute: bool,
pub args: Vec<TransactionArgument>,
}
impl ExecuteScriptRequest {
pub fn new(
remote_addr: AccountAddress,
package_name: String,
script_name: String,
force_execute: bool,
args: Vec<TransactionArgument>,
) -> Self {
Self {
remote_addr,
package_name,
script_name,
force_execute,
args,
}
}
}
impl TryFrom<crate::proto::node::ExecuteScriptRequest> for ExecuteScriptRequest {
type Error = Error;
fn try_from(value: crate::proto::node::ExecuteScriptRequest) -> Result<Self> {
Ok(Self {
remote_addr: value.remote_addr.try_into()?,
package_name: value.package_name,
script_name: value.script_name,
force_execute: value.force_execute,
args: value
.args
.into_iter()
.map(TransactionArgument::try_from)
.collect::<Result<Vec<_>>>()?,
})
}
}
impl From<ExecuteScriptRequest> for crate::proto::node::ExecuteScriptRequest {
fn from(value: ExecuteScriptRequest) -> Self {
Self {
remote_addr: value.remote_addr.into(),
package_name: value.package_name,
script_name: value.script_name,
force_execute: value.force_execute,
args: value.args.into_iter().map(Into::into).collect(),
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ExecuteScriptResponse {
pub channel_seq_number: u64,
}
impl ExecuteScriptResponse {
pub fn new(channel_seq_number: u64) -> Self {
Self { channel_seq_number }
}
}
impl TryFrom<crate::proto::node::ExecuteScriptResponse> for ExecuteScriptResponse {
type Error = Error;
fn try_from(value: crate::proto::node::ExecuteScriptResponse) -> Result<Self> {
Ok(Self::new(value.channel_sequence_number))
}
}
impl From<ExecuteScriptResponse> for crate::proto::node::ExecuteScriptResponse {
fn from(value: ExecuteScriptResponse) -> Self {
Self {
channel_sequence_number: value.channel_seq_number,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct QueryTransactionQuest {
pub participant_address: AccountAddress,
pub channel_seq_number: u64,
}
impl QueryTransactionQuest {
pub fn new(participant_address: AccountAddress, channel_seq_number: u64) -> Self {
Self {
participant_address,
channel_seq_number,
}
}
}
impl TryFrom<crate::proto::node::QueryTransactionQuest> for QueryTransactionQuest {
type Error = Error;
fn try_from(request: crate::proto::node::QueryTransactionQuest) -> Result<Self> {
let participant_address = AccountAddress::try_from(request.participant_address)?;
Ok(Self::new(participant_address, request.channel_seq_number))
}
}
impl From<QueryTransactionQuest> for crate::proto::node::QueryTransactionQuest {
fn from(request: QueryTransactionQuest) -> Self {
Self {
participant_address: request.participant_address.to_vec(),
channel_seq_number: request.channel_seq_number,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GetChannelTransactionProposalResponse {
pub channel_transaction: Option<ChannelTransaction>,
}
impl GetChannelTransactionProposalResponse {
pub fn new(channel_transaction: Option<ChannelTransaction>) -> Self {
Self {
channel_transaction,
}
}
}
impl TryFrom<crate::proto::node::GetChannelTransactionProposalResponse>
for GetChannelTransactionProposalResponse
{
type Error = Error;
fn try_from(
request: crate::proto::node::GetChannelTransactionProposalResponse,
) -> Result<Self> {
match request.channel_transaction {
Some(t) => {
return Ok(Self::new(Some(t.try_into()?)));
}
None => {
return Ok(Self::new(None));
}
}
}
}
impl From<GetChannelTransactionProposalResponse>
for crate::proto::node::GetChannelTransactionProposalResponse
{
fn from(request: GetChannelTransactionProposalResponse) -> Self {
match request.channel_transaction {
Some(t) => Self {
channel_transaction: Some(t.into()),
},
None => Self {
channel_transaction: None,
},
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ChannelTransactionProposalRequest {
pub participant_address: AccountAddress,
pub transaction_hash: HashValue,
pub approve: bool,
}
impl ChannelTransactionProposalRequest {
pub fn new(
participant_address: AccountAddress,
transaction_hash: HashValue,
approve: bool,
) -> Self {
Self {
participant_address,
transaction_hash,
approve,
}
}
}
impl TryFrom<crate::proto::node::ChannelTransactionProposalRequest>
for ChannelTransactionProposalRequest
{
type Error = Error;
fn try_from(request: crate::proto::node::ChannelTransactionProposalRequest) -> Result<Self> {
let participant_address = AccountAddress::try_from(request.participant_address)?;
Ok(Self::new(
participant_address,
HashValue::from_slice(&request.transaction_hash)?,
request.approve,
))
}
}
impl From<ChannelTransactionProposalRequest>
for crate::proto::node::ChannelTransactionProposalRequest
{
fn from(request: ChannelTransactionProposalRequest) -> Self {
Self {
participant_address: request.participant_address.to_vec(),
transaction_hash: request.transaction_hash.to_vec(),
approve: request.approve,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct EmptyResponse {}
impl EmptyResponse {
pub fn new() -> Self {
Self {}
}
}
impl TryFrom<crate::proto::node::EmptyResponse> for EmptyResponse {
type Error = Error;
fn try_from(_value: crate::proto::node::EmptyResponse) -> Result<Self> {
Ok(Self::new())
}
}
impl From<EmptyResponse> for crate::proto::node::EmptyResponse {
fn from(_value: EmptyResponse) -> Self {
Self::default()
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AddInvoiceRequest {
pub amount: u64,
}
impl AddInvoiceRequest {
pub fn new(amount: u64) -> Self {
Self { amount }
}
}
impl TryFrom<crate::proto::node::AddInvoiceRequest> for AddInvoiceRequest {
type Error = Error;
fn try_from(request: crate::proto::node::AddInvoiceRequest) -> Result<Self> {
Ok(Self::new(request.amount))
}
}
impl From<AddInvoiceRequest> for crate::proto::node::AddInvoiceRequest {
fn from(request: AddInvoiceRequest) -> Self {
Self {
amount: request.amount,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AddInvoiceResponse {
pub encoded_invoice: String,
}
impl AddInvoiceResponse {
pub fn new(encoded_invoice: String) -> Self {
Self { encoded_invoice }
}
}
impl TryFrom<crate::proto::node::AddInvoiceResponse> for AddInvoiceResponse {
type Error = Error;
fn try_from(request: crate::proto::node::AddInvoiceResponse) -> Result<Self> {
Ok(Self::new(request.encoded_invoice))
}
}
impl From<AddInvoiceResponse> for crate::proto::node::AddInvoiceResponse {
fn from(request: AddInvoiceResponse) -> Self {
Self {
encoded_invoice: request.encoded_invoice,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PaymentRequest {
pub encoded_invoice: String,
}
impl PaymentRequest {
pub fn new(encoded_invoice: String) -> Self {
Self { encoded_invoice }
}
}
impl TryFrom<crate::proto::node::PaymentRequest> for PaymentRequest {
type Error = Error;
fn try_from(request: crate::proto::node::PaymentRequest) -> Result<Self> {
Ok(Self::new(request.encoded_invoice))
}
}
impl From<PaymentRequest> for crate::proto::node::PaymentRequest {
fn from(request: PaymentRequest) -> Self {
Self {
encoded_invoice: request.encoded_invoice,
}
}
}
#[cfg(test)]
mod tests {
#[test]
fn test_compile() {
println!("it work");
}
}
| 25.609436 | 98 | 0.643859 |
48ebf4dd43bd08506816a355cd3233e8d890ef56 | 6,809 | c | C | Software/Azure_RTOS_Example2/FileX/src/fx_directory_name_extract.c | Indemsys/Backup-controller_BACKPMAN-v2.0 | e5b22f4bdd45fe04542fab6c1309de4ff3d3c009 | [
"MIT"
] | 4 | 2021-11-05T11:50:50.000Z | 2022-03-16T05:40:57.000Z | Software/Azure_RTOS_USB_MSC/Middlewares/ST/filex/common/src/fx_directory_name_extract.c | Indemsys/Backup-controller_BACKPMAN-v2.0 | e5b22f4bdd45fe04542fab6c1309de4ff3d3c009 | [
"MIT"
] | null | null | null | Software/Azure_RTOS_USB_MSC/Middlewares/ST/filex/common/src/fx_directory_name_extract.c | Indemsys/Backup-controller_BACKPMAN-v2.0 | e5b22f4bdd45fe04542fab6c1309de4ff3d3c009 | [
"MIT"
] | 2 | 2021-09-27T10:49:43.000Z | 2021-11-27T02:35:42.000Z | /**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** FileX Component */
/** */
/** Directory */
/** */
/**************************************************************************/
/**************************************************************************/
#define FX_SOURCE_CODE
/* Include necessary system files. */
#include "fx_api.h"
#include "fx_system.h"
#include "fx_directory.h"
#include "fx_utility.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _fx_directory_name_extract PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function extracts the file name from the supplied input */
/* string. If there is nothing left after the extracted name, a NULL */
/* is returned to the caller. Otherwise, if something is left, a */
/* pointer to it is returned. */
/* */
/* INPUT */
/* */
/* source_ptr Source string pointer */
/* dest_ptr Destination string pointer */
/* */
/* OUTPUT */
/* */
/* Pointer to Next Name (if multiple directories) */
/* */
/* CALLS */
/* */
/* None */
/* */
/* CALLED BY */
/* */
/* FileX System Functions */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
CHAR *_fx_directory_name_extract(CHAR *source_ptr, CHAR *dest_ptr)
{
UINT i;
/* Set the destination string to NULL. */
dest_ptr[0] = 0;
/* Is a backslash present? */
if ((*source_ptr == '\\') || (*source_ptr == '/'))
{
/* Advance the string pointer. */
source_ptr++;
}
/* Loop to remove any leading spaces. */
while (*source_ptr == ' ')
{
/* Position past leading space. */
source_ptr++;
}
/* Loop to extract the name. */
i = 0;
while (*source_ptr)
{
/* If another backslash is present, break the loop. */
if ((*source_ptr == '\\') || (*source_ptr == '/'))
{
break;
}
/* Long name can be at most 255 characters, but are further limited by the
FX_MAX_LONG_NAME_LEN define. */
if (i == FX_MAX_LONG_NAME_LEN - 1)
{
break;
}
/* Store the character. */
dest_ptr[i] = *source_ptr++;
/* Increment the character counter. */
i++;
}
/* NULL-terminate the string. */
dest_ptr[i] = 0;
/* Determine if we can backup to the previous character. */
if (i)
{
/* Yes, we can move backwards. */
i--;
}
/* Get rid of trailing blanks in the destination string. */
while (dest_ptr[i] == ' ')
{
/* Set this entry to NULL. */
dest_ptr[i] = 0;
/* Backup to the next character. Since leading spaces have been removed,
we know that the index is always greater than 1. */
i--;
}
/* Determine if the source string is now at the end. */
if (*source_ptr == 0)
{
/* Yes, return a NULL pointer. */
source_ptr = FX_NULL;
}
/* Return the last pointer position in the source. */
return(source_ptr);
}
| 42.030864 | 82 | 0.276105 |
cbdcecfc42b3d076b6acbd712c6612a42ce0cbd1 | 613 | go | Go | integration/util/osmpatch/patch.go | Telenav/osrm-backend | c50d8ab756b71b3738b67663e48c79ce27245b7a | [
"BSD-2-Clause"
] | 13 | 2019-02-21T02:02:41.000Z | 2021-09-09T13:49:31.000Z | integration/util/osmpatch/patch.go | Telenav/osrm-backend | c50d8ab756b71b3738b67663e48c79ce27245b7a | [
"BSD-2-Clause"
] | 288 | 2019-02-21T01:34:04.000Z | 2021-03-27T12:19:10.000Z | integration/util/osmpatch/patch.go | Telenav/osrm-backend | c50d8ab756b71b3738b67663e48c79ce27245b7a | [
"BSD-2-Clause"
] | 4 | 2019-06-21T20:51:59.000Z | 2021-01-13T09:22:24.000Z | // Package osmpatch implements some utility to optimize handling for OSM PBF.
package osmpatch
import "github.com/qedus/osmpbf"
// IsValidWay returns whether the way from OSM is valid or not.
// This validation is for OSM PBF only.
// Rule: it is a valid/navigable way only if it has `highway` or `route` tag.
// https://github.com/Telenav/osrm-backend/blob/master/profiles/car.lua#L379
func IsValidWay(way *osmpbf.Way) bool {
if way == nil {
return false
}
_, hasHighwayTag := way.Tags["highway"]
_, hasRouteTag := way.Tags["route"]
if hasHighwayTag || hasRouteTag {
return true
}
return false
}
| 25.541667 | 77 | 0.724307 |
7183c1e327d48a3586d27eae20063846d84911f4 | 735 | tsx | TypeScript | components/FavoriteButton.tsx | budokans/story-typer | c1ebc9d113730d81623839ecd06530292d8ed2b6 | [
"MIT"
] | null | null | null | components/FavoriteButton.tsx | budokans/story-typer | c1ebc9d113730d81623839ecd06530292d8ed2b6 | [
"MIT"
] | null | null | null | components/FavoriteButton.tsx | budokans/story-typer | c1ebc9d113730d81623839ecd06530292d8ed2b6 | [
"MIT"
] | null | null | null | import { IconButton } from "@chakra-ui/button";
import { RiStarFill, RiStarLine } from "react-icons/ri";
import { useFavorite } from "@/hooks/useFavorite";
import { FavoriteBase } from "interfaces";
export const FavoriteButton: React.FC<{ storyDetails: FavoriteBase }> = ({
storyDetails,
}) => {
const { handleFavoriteClick, isFavorited } = useFavorite(storyDetails);
return (
<IconButton
icon={isFavorited ? <RiStarFill /> : <RiStarLine />}
isRound
cursor="pointer"
fontSize="2.5rem"
aria-label="favorite this story"
bg="transparent"
color="gold"
onClick={handleFavoriteClick}
_hover={{ background: "transparent" }}
_focus={{ boxShadow: "none" }}
/>
);
};
| 28.269231 | 74 | 0.646259 |
168fd7b4a2ced0127f67f84ffb5dfc948e410ffd | 517 | ts | TypeScript | src/lib/StoreModules/types.ts | VEuPathDB/web-user-datasets | e2d4e8445eb0a105764b0871454b4cb752adad11 | [
"Apache-2.0"
] | null | null | null | src/lib/StoreModules/types.ts | VEuPathDB/web-user-datasets | e2d4e8445eb0a105764b0871454b4cb752adad11 | [
"Apache-2.0"
] | 4 | 2022-02-21T19:03:49.000Z | 2022-03-04T15:03:39.000Z | src/lib/StoreModules/types.ts | VEuPathDB/web-user-datasets | e2d4e8445eb0a105764b0871454b4cb752adad11 | [
"Apache-2.0"
] | null | null | null | import { RootState } from '@veupathdb/wdk-client/lib/Core/State/Types';
import { State as UserDatasetDetailState } from './UserDatasetDetailStoreModule';
import { State as UserDatasetListState } from './UserDatasetListStoreModule';
import { State as UserDatasetUploadState } from './UserDatasetUploadStoreModule';
export interface StateSlice extends Pick<RootState, 'globalData'> {
userDatasetDetail: UserDatasetDetailState;
userDatasetList: UserDatasetListState;
userDatasetUpload: UserDatasetUploadState;
}
| 43.083333 | 81 | 0.810445 |
4f83e5745fbe05d5c0ce25df48763b0d972c8829 | 107 | sql | SQL | src/FlatMate.Migration/Resources/ScriptTemplate.sql | prayzzz/FlatMate-v2 | 3486507e5a613bf944e7dd056bda47bf84f37ed8 | [
"MIT"
] | null | null | null | src/FlatMate.Migration/Resources/ScriptTemplate.sql | prayzzz/FlatMate-v2 | 3486507e5a613bf944e7dd056bda47bf84f37ed8 | [
"MIT"
] | 7 | 2019-06-26T15:38:03.000Z | 2021-05-08T04:38:43.000Z | src/FlatMate.Migration/Resources/ScriptTemplate.sql | prayzzz/FlatMate-v2 | 3486507e5a613bf944e7dd056bda47bf84f37ed8 | [
"MIT"
] | null | null | null | --
-- Script
--
--
-- Migration
--
INSERT INTO ##SCRIPTTABLE## ([FileName])
VALUES ('##FILENAME##'); | 8.230769 | 41 | 0.542056 |
d2e63e3b43940eb206edba069773b225ecf8deb5 | 217 | php | PHP | src/FlushViews.php | m4a1fox/matryoshka | ba168c9e598bdfdeb48040684c00d622f6c12fc0 | [
"MIT"
] | null | null | null | src/FlushViews.php | m4a1fox/matryoshka | ba168c9e598bdfdeb48040684c00d622f6c12fc0 | [
"MIT"
] | null | null | null | src/FlushViews.php | m4a1fox/matryoshka | ba168c9e598bdfdeb48040684c00d622f6c12fc0 | [
"MIT"
] | null | null | null | <?php
namespace Matryoshka;
use Illuminate\Support\Facades\Cache;
class FlushViews
{
public function handle($request, $next)
{
Cache::tags('view')->flush();
return $next($request);
}
}
| 13.5625 | 43 | 0.62212 |
dfa0e48e0bd8ecf20502e62142e520e9ff6d3479 | 764 | ts | TypeScript | server/models/facebookPages.ts | woophi/akai | e24ccde2d84626d7c6a1f049126df6a4c5153d1e | [
"MIT"
] | null | null | null | server/models/facebookPages.ts | woophi/akai | e24ccde2d84626d7c6a1f049126df6a4c5153d1e | [
"MIT"
] | 22 | 2019-10-15T09:53:00.000Z | 2022-02-17T20:47:44.000Z | server/models/facebookPages.ts | woophi/akai | e24ccde2d84626d7c6a1f049126df6a4c5153d1e | [
"MIT"
] | null | null | null | import mongoose from 'mongoose';
import { FacebookPage, SchemaNames } from './types';
const timestamps = require('mongoose-timestamp');
export const FacebookPagesSchema = new mongoose.Schema(
{
pageId: {
type: Number,
unique: true,
index: true,
},
pageName: {
type: String,
required: true,
},
longLiveToken: {
type: String,
required: true,
},
accessToken: {
type: String,
required: true,
},
isValid: {
type: Boolean,
required: true,
},
},
{ collection: SchemaNames.FB_PAGES }
);
FacebookPagesSchema.plugin(timestamps);
FacebookPagesSchema.index({ pageId: 1 });
export default mongoose.model<FacebookPage>(SchemaNames.FB_PAGES, FacebookPagesSchema);
| 21.222222 | 87 | 0.633508 |
5b592fbb10d64010c0a0239ffcb561a430a8df11 | 719 | h | C | source/FliterApp/FliterApp/controllers/faAboutTeamSlaay.h | slaay/FliterApp | 196f317389380b6b11c5210bb2b854995d7ce1a2 | [
"MIT"
] | null | null | null | source/FliterApp/FliterApp/controllers/faAboutTeamSlaay.h | slaay/FliterApp | 196f317389380b6b11c5210bb2b854995d7ce1a2 | [
"MIT"
] | null | null | null | source/FliterApp/FliterApp/controllers/faAboutTeamSlaay.h | slaay/FliterApp | 196f317389380b6b11c5210bb2b854995d7ce1a2 | [
"MIT"
] | null | null | null | //
// faAboutTeamSlaay.h
// FliterApp
//
// Created by Presley on 03/04/15.
// Copyright (c) 2015 SlaaySourceCoders. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface faAboutTeamSlaay : UIViewController
@property (strong, nonatomic) IBOutlet UIImageView *imgPresley;
@property (strong, nonatomic) IBOutlet UIImageView *imgVidel;
@property (strong, nonatomic) IBOutlet UIImageView *imgSanket;
@property (strong, nonatomic) IBOutlet UIImageView *imgCashburn;
@property (strong, nonatomic) IBOutlet UIImageView *imgAlison;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *sidebarButton;
@property (strong, nonatomic) IBOutlet UIImageView *imgBackground;
- (IBAction)btnSocialShare:(id)sender;
@end
| 28.76 | 68 | 0.776078 |
18afc1a146ccb59325a4e8f08e86fa3a24752b8d | 21,636 | rs | Rust | src/tokens.rs | tommilligan/RESS | 8b8abfa61d1a0273c1502031669262e29f69a6c5 | [
"MIT"
] | null | null | null | src/tokens.rs | tommilligan/RESS | 8b8abfa61d1a0273c1502031669262e29f69a6c5 | [
"MIT"
] | null | null | null | src/tokens.rs | tommilligan/RESS | 8b8abfa61d1a0273c1502031669262e29f69a6c5 | [
"MIT"
] | null | null | null | use combine::{
choice, eof,
error::ParseError,
many, not_followed_by,
parser::char::{char as c_char, string},
try, Parser, Stream,
};
use comments;
use keywords;
use numeric;
use punct;
use regex;
use strings;
use unicode;
#[derive(Debug, PartialEq, Clone)]
/// A wrapper around a token that will include
/// the byte span of the text that it was found
/// at
pub struct Item {
pub token: Token,
pub span: Span,
}
impl Item {
/// Create a new Item from its parts
pub fn new(token: Token, span: Span) -> Item {
Item { token, span }
}
}
#[derive(Debug, PartialEq, Clone)]
/// A location in the original source text
pub struct Span {
pub start: usize,
pub end: usize,
}
impl Span {
/// Create a new Span from its parts
pub fn new(start: usize, end: usize) -> Self {
Span { start, end }
}
}
#[derive(Debug, PartialEq, Clone)]
/// The representation of a single JS token
pub enum Token {
/// `true` of `false`
Boolean(BooleanLiteral),
/// The end of the file
EoF,
/// An identifier this will be either a variable name
/// or a function/method name
Ident(Ident),
/// A word that has been reserved to not be used as an identifier
Keyword(keywords::Keyword),
/// A `null` literal value
Null,
/// A number, this includes integers (`1`), decimals (`0.1`),
/// hex (`0x8f`), binary (`0b010011010`), and octal (`0o273`)
Numeric(numeric::Number),
/// A punctuation mark, this includes all mathematical operators
/// logical operators and general syntax punctuation
Punct(punct::Punct),
/// A string literal, either double or single quoted, the associated
/// value will be the unquoted string
String(strings::StringLit),
/// A regular expression literal.
/// ```js
/// let regex = /[a-zA-Z]+/g;
/// ```
RegEx(regex::RegEx),
/// The string parts of a template string
/// ```
/// # extern crate ress;
/// # use ress::{Scanner, Item, Token, Number, Template};
/// # fn main() {
/// let js = "`Things and stuff times ${10} equals ${100000000}... i think`";
/// let mut s = Scanner::new(js);
/// assert_eq!(s.next().unwrap().token,
/// Token::template_head("Things and stuff times "));
/// assert_eq!(s.next().unwrap().token,
/// Token::numeric("10"));
/// assert_eq!(s.next().unwrap().token,
/// Token::template_middle(" equals "));
/// assert_eq!(s.next().unwrap().token,
/// Token::numeric("100000000"));
/// assert_eq!(s.next().unwrap().token,
/// Token::template_tail("... i think"));
/// # }
/// ```
Template(strings::Template),
/// A comment, the associated value will contain the raw comment
/// This will capture both inline comments `// I am an inline comment`
/// and multi-line comments
/// ```js
/// /*multi lines
/// * comments
/// */
/// ```
Comment(comments::Comment),
}
#[derive(Debug, PartialEq, Clone)]
/// The tokenized representation of `true` or `false`
pub enum BooleanLiteral {
True,
False,
}
impl BooleanLiteral {
/// Test if this instance represents `true`
pub fn is_true(&self) -> bool {
match self {
BooleanLiteral::True => true,
_ => false,
}
}
}
impl<'a> From<&'a str> for BooleanLiteral {
/// Create a BooleanLiteral from raw text
///
/// panics if argument is not `true` or `false`
fn from(s: &'a str) -> Self {
if s == "true" {
BooleanLiteral::True
} else if s == "false" {
BooleanLiteral::False
} else {
panic!(r#"BooleanLiteral can only be created for "true" or "false"."#)
}
}
}
impl From<String> for BooleanLiteral {
/// Create a BooleanLiteral from raw text
///
/// panics if argument is not `true` or `false`
fn from(s: String) -> Self {
BooleanLiteral::from(s.as_str())
}
}
impl From<bool> for BooleanLiteral {
/// Creates a JS Bool for a rust bool
fn from(b: bool) -> Self {
if b {
BooleanLiteral::True
} else {
BooleanLiteral::False
}
}
}
impl Into<String> for BooleanLiteral {
/// Return this BooleanLiteral to the text
/// that was parsed to create it
fn into(self) -> String {
match self {
BooleanLiteral::True => "true".into(),
BooleanLiteral::False => "false".into(),
}
}
}
impl ToString for BooleanLiteral {
/// Return this BooleanLiteral to the text
/// that was parsed to create it
fn to_string(&self) -> String {
match self {
BooleanLiteral::True => "true".into(),
BooleanLiteral::False => "false".into(),
}
}
}
impl Into<bool> for BooleanLiteral {
/// Creates a Rust bool for a js bool
fn into(self) -> bool {
match self {
BooleanLiteral::True => true,
BooleanLiteral::False => false,
}
}
}
impl<'a> Into<bool> for &'a BooleanLiteral {
/// Creates a js bool for a rust bool
fn into(self) -> bool {
match self {
BooleanLiteral::True => true,
BooleanLiteral::False => false,
}
}
}
#[derive(Debug, PartialEq, Clone)]
/// An identifier
/// ```
/// # extern crate ress;
/// # use ress::{Scanner, Item, Token, Ident};
/// # fn main() {
/// let js = "var x = 1;";
/// let mut s = Scanner::new(js);
/// let _var = s.next().unwrap();
/// assert_eq!(s.next().unwrap().token,
/// Token::Ident(Ident::from("x")));
/// let _assign = s.next().unwrap();
/// let _one = s.next().unwrap();
/// # }
/// ```
pub struct Ident(String);
impl<'a> PartialEq<&'a str> for Ident {
fn eq(&self, other: &&'a str) -> bool {
&self.0 == other
}
}
impl PartialEq<str> for Ident {
fn eq(&self, other: &str) -> bool {
self.0 == other
}
}
impl<'a> From<&'a str> for Ident {
fn from(s: &'a str) -> Self {
Ident(s.into())
}
}
impl From<String> for Ident {
fn from(s: String) -> Self {
Self::from(s.as_str())
}
}
impl ToString for Ident {
fn to_string(&self) -> String {
self.0.clone()
}
}
impl Into<String> for Ident {
fn into(self) -> String {
self.0
}
}
//Constructors
impl Token {
///Create and instance of Token::Ident from a &str
pub fn ident(name: &str) -> Token {
Token::Ident(name.into())
}
///Create and instance of Token::Keyword from a &str
///
/// panics if the argument isn't a valid js keyword
pub fn keyword(name: &str) -> Token {
Token::Keyword(keywords::Keyword::from(name))
}
///Create and instance of Token::Numeric from a &str
pub fn numeric(number: &str) -> Token {
Token::Numeric(numeric::Number::from(number))
}
///Create and instance of Token::Punct from a &str
///
/// panics if the augment isn't valid js punctuation
pub fn punct(s: &str) -> Token {
Token::Punct(s.into())
}
///Create and instance of Token::String from a &str wrapped in double quotes
pub fn double_quoted_string(s: &str) -> Token {
Token::String(strings::StringLit::Double(s.into()))
}
///Create an instance of Token::String from a &str wrapped in single quotes
pub fn single_quoted_string(s: &str) -> Token {
Token::String(strings::StringLit::Single(s.into()))
}
/// Create an instance of Token::RegEx from a &str and an Option<String>
pub fn regex(body: &str, flags: Option<String>) -> Token {
Token::RegEx(regex::RegEx::from_parts(body, flags))
}
/// Creates an instance of Token::Template with a template string that has
/// no substitutions
///
/// ```js
/// var noSub = `template string with no subs`;
/// ```
pub fn no_sub_template(s: &str) -> Token {
Token::Template(strings::Template::NoSub(s.into()))
}
/// Creates an instance of Token::Template for a template head
/// ```js
/// let t = `head ${true} middle ${false} tail ${false}`;
/// ```
pub fn template_head(s: &str) -> Token {
Token::Template(strings::Template::Head(s.into()))
}
/// Creates an instance of a Token::Template for a template middle
/// ```js
/// let t = `head ${false} middle ${true} tail ${false}`;
/// ```
pub fn template_middle(s: &str) -> Token {
Token::Template(strings::Template::Middle(s.into()))
}
/// Creates an instance of a Token::Template for a template tail
/// ```js
/// let t = `head ${false} middle ${false} tail ${true}`;
/// ```
pub fn template_tail(s: &str) -> Token {
Token::Template(strings::Template::Tail(s.into()))
}
/// Creates an instance of a Token::Comment for a comment string and a flag
/// if this comment should be treated as a multi line comment
/// ```
/// # extern crate ress;
/// # use ress::{Scanner, Item, Token, Comment};
/// # fn main() {
/// let single_js = "//I am a comment";
/// let multi_js = "/*I am a multi-line comment*/";
/// let mut s = Scanner::new(single_js);
/// let single_scanner = s.next().expect("unable to parse single line comment");
/// let single = Token::comment("I am a comment", false);
/// assert_eq!(single, single_scanner.token);
/// s = Scanner::new(multi_js);
/// let multi_scanner = s.next().expect("Unable to parse multi-line comment");
/// let multi = Token::comment("I am a multi-line comment", true);
/// assert_eq!(multi, multi_scanner.token);
/// # }
/// ```
pub fn comment(comment: &str, multi: bool) -> Token {
Token::Comment(comments::Comment::from_parts(
comment.into(),
if multi {
comments::Kind::Multi
} else {
comments::Kind::Single
},
))
}
}
//Is tests
impl Token {
pub fn is_boolean(&self) -> bool {
match self {
Token::Boolean(_) => true,
_ => false,
}
}
pub fn is_boolean_true(&self) -> bool {
match self {
Token::Boolean(ref b) => b.into(),
_ => false,
}
}
pub fn is_boolean_false(&self) -> bool {
match self {
Token::Boolean(ref b) => {
let b: bool = b.into();
!b
}
_ => false,
}
}
pub fn is_eof(&self) -> bool {
self == &Token::EoF
}
pub fn is_ident(&self) -> bool {
match self {
Token::Ident(_) => true,
_ => false,
}
}
pub fn is_keyword(&self) -> bool {
match self {
Token::Keyword(_) => true,
_ => false,
}
}
pub fn is_strict_reserved(&self) -> bool {
match self {
Token::Keyword(ref k) => k.is_strict_reserved(),
_ => false,
}
}
pub fn is_restricted(&self) -> bool {
match self {
Token::Ident(ref i) => i == "arguments" || i == "eval",
_ => false,
}
}
pub fn is_null(&self) -> bool {
self == &Token::Null
}
pub fn is_numeric(&self) -> bool {
if let Token::Numeric(ref _n) = self {
true
} else {
false
}
}
pub fn is_hex_literal(&self) -> bool {
match self {
Token::Numeric(ref n) => n.is_hex(),
_ => false,
}
}
pub fn is_bin_literal(&self) -> bool {
match self {
Token::Numeric(ref n) => n.is_bin(),
_ => false,
}
}
pub fn is_oct_literal(&self) -> bool {
match self {
Token::Numeric(ref n) => n.is_oct(),
_ => false,
}
}
pub fn is_punct(&self) -> bool {
match self {
Token::Punct(_) => true,
_ => false,
}
}
pub fn is_string(&self) -> bool {
if let Token::String(ref _s) = self {
true
} else {
false
}
}
pub fn is_double_quoted_string(&self) -> bool {
match self {
Token::String(ref s) => match s {
strings::StringLit::Double(_) => true,
_ => false,
},
_ => false,
}
}
pub fn is_single_quoted_string(&self) -> bool {
match self {
Token::String(ref s) => match s {
strings::StringLit::Single(_) => true,
_ => false,
},
_ => false,
}
}
pub fn is_regex(&self) -> bool {
match self {
Token::RegEx(_) => true,
_ => false,
}
}
pub fn is_template(&self) -> bool {
self.is_template_head() || self.is_template_middle() || self.is_template_tail()
}
pub fn is_template_head(&self) -> bool {
match self {
Token::Template(ref s) => s.is_head(),
_ => false,
}
}
pub fn is_template_middle(&self) -> bool {
match self {
Token::Template(ref s) => s.is_middle(),
_ => false,
}
}
pub fn is_template_tail(&self) -> bool {
match self {
Token::Template(ref s) => s.is_tail(),
_ => false,
}
}
pub fn is_literal(&self) -> bool {
match self {
Token::Boolean(_) => true,
Token::String(_) => true,
Token::Null => true,
Token::Numeric(_) => true,
Token::RegEx(_) => true,
Token::Template(_) => true,
_ => false,
}
}
pub fn is_comment(&self) -> bool {
match self {
Token::Comment(_) => true,
_ => false,
}
}
pub fn is_multi_line_comment(&self) -> bool {
match self {
Token::Comment(ref t) => t.kind == comments::Kind::Multi,
_ => false,
}
}
pub fn is_single_line_comment(&self) -> bool {
match self {
Token::Comment(ref t) => t.kind == comments::Kind::Single,
_ => false,
}
}
}
//matches tests
impl Token {
pub fn matches_boolean(&self, b: BooleanLiteral) -> bool {
self == &Token::Boolean(b)
}
pub fn matches_boolean_str(&self, b: &str) -> bool {
match self {
Token::Boolean(ref lit) => match (lit, b) {
(&BooleanLiteral::True, "true") | (&BooleanLiteral::False, "false") => true,
_ => false,
},
_ => false,
}
}
pub fn matches_ident_str(&self, name: &str) -> bool {
match self {
Token::Ident(ref i) => name == i.0,
_ => false,
}
}
pub fn matches_keyword(&self, keyword: keywords::Keyword) -> bool {
self == &Token::Keyword(keyword)
}
pub fn matches_keyword_str(&self, name: &str) -> bool {
self == &Token::keyword(name)
}
pub fn matches_numeric(&self, number: numeric::Number) -> bool {
self == &Token::Numeric(number)
}
pub fn matches_numeric_str(&self, number: &str) -> bool {
self == &Token::numeric(number)
}
pub fn matches_punct(&self, p: punct::Punct) -> bool {
self == &Token::Punct(p)
}
pub fn matches_punct_str(&self, s: &str) -> bool {
match self {
Token::Punct(ref p) => p == &s.into(),
_ => false,
}
}
pub fn matches_regex(&self, regex: regex::RegEx) -> bool {
self == &Token::RegEx(regex)
}
pub fn matches_regex_str(&self, regex: &str) -> bool {
if let Some(idx) = regex.rfind('/') {
let parts = regex.split_at(idx);
let flags = if parts.1.is_empty() {
None
} else {
Some(parts.1[1..].to_string())
};
self == &Token::regex(&parts.0[1..], flags)
} else {
false
}
}
pub fn matches_comment(&self, comment: comments::Comment) -> bool {
self == &Token::Comment(comment)
}
pub fn matches_comment_str(&self, comment: &str) -> bool {
match self {
Token::Comment(ref t) => t.content == comment,
_ => false,
}
}
pub fn matches_string_content(&self, content: &str) -> bool {
match self {
Token::String(ref lit) => match lit {
strings::StringLit::Single(ref s) => content == s,
strings::StringLit::Double(ref s) => content == s,
},
_ => false,
}
}
}
impl ToString for Token {
fn to_string(&self) -> String {
match self {
Token::Boolean(ref b) => b.to_string(),
Token::EoF => String::new(),
Token::Ident(ref i) => i.to_string(),
Token::Keyword(ref k) => k.to_string(),
Token::Null => String::from("null"),
Token::Numeric(ref n) => n.to_string(),
Token::Punct(ref p) => p.to_string(),
Token::RegEx(ref r) => r.to_string(),
Token::String(ref s) => s.to_string(),
Token::Template(ref t) => t.to_string(),
Token::Comment(ref c) => c.to_string(),
}
}
}
parser!{
pub fn token[I]()(I) -> Token
where [I: Stream<Item = char>]
{
choice((token_not_eof(), end_of_input())).map(|t| t)
}
}
pub(crate) fn token_not_eof<I>() -> impl Parser<Input = I, Output = Token>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
choice((
comments::comment(),
boolean_literal(),
try(keywords::literal()),
try(ident()),
try(null_literal()),
try(numeric::literal()),
try(strings::literal()),
try(punct::punctuation()),
try(strings::template_start()),
)).map(|t| t)
}
pub(crate) fn boolean_literal<I>() -> impl Parser<Input = I, Output = Token>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
choice((try(true_literal()), try(false_literal())))
.map(|t: String| Token::Boolean(BooleanLiteral::from(t)))
}
fn true_literal<I>() -> impl Parser<Input = I, Output = String>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
string("true")
.skip(not_followed_by(ident_part()))
.map(|s: &str| s.to_string())
}
fn false_literal<I>() -> impl Parser<Input = I, Output = String>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
string("false")
.skip(not_followed_by(ident_part()))
.map(|s: &str| s.to_string())
}
pub(crate) fn end_of_input<I>() -> impl Parser<Input = I, Output = Token>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
eof().map(|_| Token::EoF)
}
pub(crate) fn ident<I>() -> impl Parser<Input = I, Output = Token>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
(ident_start(), many(ident_part())).map(|(start, body): (char, String)| {
let mut ret = String::new();
ret.push(start);
ret.push_str(&body);
Token::Ident(Ident(ret))
})
}
pub(crate) fn null_literal<I>() -> impl Parser<Input = I, Output = Token>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
string("null")
.skip(not_followed_by(ident_part()))
.map(|_| Token::Null)
}
fn unicode_char<I>() -> impl Parser<Input = I, Output = char>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
choice((
try(unicode::lu()),
try(unicode::ll()),
try(unicode::lt()),
try(unicode::lm()),
try(unicode::lo()),
try(unicode::nl()),
)).map(|c: char| c)
}
fn ident_start<I>() -> impl Parser<Input = I, Output = char>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
choice((
try(unicode_char()),
try(c_char('$')),
try(c_char('_')),
try(unicode::char_literal()),
)).map(|c: char| c)
}
pub(crate) fn ident_part<I>() -> impl Parser<Input = I, Output = char>
where
I: Stream<Item = char>,
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
choice((
try(ident_start()),
try(unicode::mn()),
try(unicode::mc()),
try(unicode::nd()),
try(unicode::pc()),
))
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn bool() {
let t = super::boolean_literal().parse("true").unwrap();
let f = super::boolean_literal().parse("false").unwrap();
assert_eq!(t, (Token::Boolean(BooleanLiteral::True), ""));
assert_eq!(f, (Token::Boolean(BooleanLiteral::False), ""));
}
#[test]
fn eof() {
let e = super::end_of_input().parse("").unwrap();
assert_eq!(e, (Token::EoF, ""));
}
#[test]
fn ident_tests() {
let idents = vec![
"$",
"x",
"thing",
"num",
"stuff",
"anotherThing",
"snake_thing",
"junk",
"_",
"_private",
];
for i in idents {
let t = token().parse(i.clone()).unwrap();
assert_eq!(t, (Token::Ident(Ident(i.to_string())), ""))
}
}
}
| 28.062257 | 92 | 0.521908 |
08039d5b67b49b890310e1d09ccc31e394555031 | 89,851 | sql | SQL | app/install/data/wooc-data.sql | HongJuZiNetStudio/wooc | b9d2debef2f52d136e49fe17cf6da90edf4138e6 | [
"MIT"
] | 1 | 2016-04-11T14:06:37.000Z | 2016-04-11T14:06:37.000Z | app/install/data/wooc-data.sql | HongJuZiNetStudio/wooc | b9d2debef2f52d136e49fe17cf6da90edf4138e6 | [
"MIT"
] | null | null | null | app/install/data/wooc-data.sql | HongJuZiNetStudio/wooc | b9d2debef2f52d136e49fe17cf6da90edf4138e6 | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 4.0.10
-- http://www.phpmyadmin.net
--
-- 主机: localhost:3306
-- 生成日期: 2015-05-17 19:44:56
-- 服务器版本: 5.5.32
-- PHP 版本: 5.4.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES {charset} */;
--
-- 数据库: `test_wooc`
--
--
-- 转存表中的数据 `{prefix}actor`
--
INSERT INTO `{prefix}actor` (`sort_num`, `id`, `name`, `identifier`, `description`, `create_time`, `author`) VALUES
(1387513086, 1, '超级管理员', 'root', '系统的最高权限用户', '2012-04-20 16:00:00', 11);
--
-- 转存表中的数据 `{prefix}article`
--
INSERT INTO `{prefix}article` (`sort_num`, `id`, `name`, `extend_class`, `identifier`, `parent_id`, `description`, `content`, `tags`, `tags_name`, `image_path`, `total_visits`, `total_comments`, `hash`, `status`, `lang_id`, `edit_time`, `create_time`, `author`) VALUES
(9999, 1, 'Hello Wooc!', '', 'Hello Wooc!', ',,,447,451,,,', '你好,Wooc!又一个Wooc 站!', '<p>你好,Wooc!又一个Wooc 站!</p>', ',86,', ',博客主页,Wooc,', NULL, 42, 0, '99999999999999999999999999999999', 2, 454, 1431862619, '2015-05-03 16:05:26', 21);
--
-- 转存表中的数据 `{prefix}category`
--
INSERT INTO `{prefix}category` (`sort_num`, `id`, `name`, `identifier`, `parent_id`, `parent_path`, `description`, `image_path`, `total_use`, `lang_id`, `create_time`, `author`) VALUES
(99999, 382, '独立页面', 'single-page', 0, ':382:', '独立页面', NULL, -1, 454, '2014-04-21 14:04:03', 21),
(99999, 451, '默认分类', '', 447, ':447:451:', '默认分类', NULL, -2, 454, '2015-03-08 10:03:02', 15),
(1400916190, 395, '广告分类', 'adv-cat', 0, ':395:', '广告分类', NULL, 0, 454, '2014-05-24 07:05:53', 5),
(1400916207, 396, 'Banner大图', 'banner', 395, ':395:396:', 'Banner大图', NULL, 0, 454, '2014-05-24 07:05:16', 5),
(99999, 423, '模块分类', 'model-category', 0, ':423:', '如:系统模块、分享系统、推荐系统', NULL, 0, 454, '2014-12-02 03:12:04', 15),
(1, 424, '基础系统', 'base-system', 423, ':423:424:', '基础系统', NULL, 0, 454, '2014-12-02 03:12:16', 15),
(99999, 425, '推荐系统', 'srs-system', 423, ':1557:425:', '推荐系统', NULL, 0, 454, '2014-12-02 03:12:40', 15),
(2, 426, '运营系统', 'business-system', 423, ':423:426:', '运营系统', NULL, 0, 454, '2014-12-02 05:12:00', 15),
(99999, 447, '文章分类', 'article-cat', 0, ':447:', '文章分类', NULL, -4, 454, '2015-03-07 10:03:30', 15),
(99999, 453, '语言分类', 'lang-type', 0, ':453:', '语言分类', NULL, 0, 454, '2015-04-03 14:04:46', 44),
(99999, 454, '简体中文', 'zh-cn', 453, ':453:454:', '简体中文', NULL, 0, 454, '2015-04-03 14:04:50', 44),
(99999, 457, '菜单位置分类', 'navmenu-position', 0, ':457:', '菜单位置分类', NULL, 0, 454, '2015-04-21 09:04:02', 15),
(99999, 458, '主菜单', 'main-navmenu', 457, ':457:458:', '主菜单', NULL, 0, 454, '2015-04-21 09:04:51', 15);
--
-- 转存表中的数据 `{prefix}lang`
--
INSERT INTO `{prefix}lang` (`sort_num`, `id`, `name`, `identifier`, `image_path`, `is_default`, `create_time`, `author`) VALUES
(99999, 454, '简体中文', 'zh-cn', NULL, 2, '2015-04-03 14:04:50', 44);
--
-- 转存表中的数据 `{prefix}linkeddata_article_category`
--
INSERT INTO `{prefix}linkeddata_article_category` (`id`, `item_id`, `rel_id`, `extend`, `create_time`, `author`) VALUES
(190, 612, '447', ':447:', '2015-05-04 14:37:16', 15),
(191, 612, '451', ':447:451:', '2015-05-04 14:37:16', 15),
(207, 1, '451', ':447:451:', '2015-05-17 11:37:00', 21),
(206, 1, '447', ':447:', '2015-05-17 11:37:00', 21);
--
-- 转存表中的数据 `{prefix}linkeddata_article_lang`
--
INSERT INTO `{prefix}linkeddata_article_lang` (`id`, `item_id`, `rel_id`, `extend`, `create_time`, `author`) VALUES
(386, 456, 1, 37, '2015-04-23 15:05:16', 15),
(385, 454, 37, 1, '2015-04-23 15:05:16', 15),
(387, 454, 608, 603, '2015-04-23 15:49:02', 15),
(388, 456, 603, 608, '2015-04-23 15:49:02', 15),
(389, 456, 604, 608, '2015-04-23 15:50:03', 15),
(390, 455, 608, 604, '2015-04-23 15:50:03', 15),
(391, 454, 604, 603, '2015-04-23 15:50:03', 15),
(392, 455, 603, 604, '2015-04-23 15:50:03', 15);
--
-- 转存表中的数据 `{prefix}linkeddata_navmenu_lang`
--
INSERT INTO `{prefix}linkeddata_navmenu_lang` (`id`, `item_id`, `rel_id`, `extend`, `create_time`, `author`) VALUES
(385, 454, 37, 1, '2015-04-23 15:36:03', 15),
(386, 456, 1, 37, '2015-04-23 15:36:03', 15),
(387, 454, 41, 20, '2015-04-24 14:25:10', 15),
(388, 456, 20, 41, '2015-04-24 14:25:10', 15),
(395, 454, 42, 35, '2015-04-24 14:28:22', 15),
(396, 456, 35, 42, '2015-04-24 14:28:22', 15);
--
-- 转存表中的数据 `{prefix}linkeddata_tpl_mark`
--
INSERT INTO `{prefix}linkeddata_tpl_mark` (`id`, `item_id`, `rel_id`, `extend`, `create_time`, `author`) VALUES
(791, 417, 248, '0', '2015-04-19 13:10:26', 1),
(792, 418, 248, '0', '2015-04-19 13:10:27', 1),
(793, 403, 248, '0', '2015-04-19 13:10:27', 1),
(794, 404, 248, '0', '2015-04-19 13:10:27', 1),
(795, 405, 248, '0', '2015-04-19 13:10:27', 1),
(796, 406, 248, '0', '2015-04-19 13:10:27', 1),
(797, 407, 248, '0', '2015-04-19 13:10:28', 1),
(798, 408, 248, '0', '2015-04-19 13:10:28', 1),
(799, 409, 248, '0', '2015-04-19 13:10:28', 1),
(800, 410, 248, '0', '2015-04-19 13:10:28', 1),
(801, 411, 248, '0', '2015-04-19 13:10:28', 1),
(802, 412, 248, '0', '2015-04-19 13:10:28', 1),
(803, 413, 248, '0', '2015-04-19 13:10:28', 1),
(804, 419, 248, '0', '2015-04-19 13:10:28', 1),
(805, 464, 248, '0', '2015-04-19 13:10:29', 1),
(806, 455, 248, '0', '2015-04-19 13:10:29', 1),
(807, 461, 248, '0', '2015-04-19 13:10:29', 1),
(808, 460, 248, '0', '2015-04-19 13:10:29', 1),
(809, 414, 248, '0', '2015-04-19 13:10:29', 1),
(810, 415, 248, '0', '2015-04-19 13:10:30', 1),
(811, 416, 248, '0', '2015-04-19 13:10:30', 1),
(812, 417, 242, '0', '2015-04-19 13:10:35', 1),
(813, 418, 242, '0', '2015-04-19 13:10:35', 1),
(814, 403, 242, '0', '2015-04-19 13:10:35', 1),
(815, 404, 242, '0', '2015-04-19 13:10:36', 1),
(816, 405, 242, '0', '2015-04-19 13:10:36', 1),
(817, 406, 242, '0', '2015-04-19 13:10:36', 1),
(818, 407, 242, '0', '2015-04-19 13:10:36', 1),
(819, 408, 242, '0', '2015-04-19 13:10:36', 1),
(820, 409, 242, '0', '2015-04-19 13:10:36', 1),
(821, 410, 242, '0', '2015-04-19 13:10:36', 1),
(822, 411, 242, '0', '2015-04-19 13:10:37', 1),
(823, 412, 242, '0', '2015-04-19 13:10:37', 1),
(824, 413, 242, '0', '2015-04-19 13:10:37', 1),
(825, 419, 242, '0', '2015-04-19 13:10:37', 1),
(826, 427, 242, '0', '2015-04-19 13:10:37', 1),
(827, 454, 242, '0', '2015-04-19 13:10:37', 1),
(828, 455, 242, '0', '2015-04-19 13:10:37', 1),
(829, 456, 242, '0', '2015-04-19 13:10:38', 1),
(830, 457, 242, '0', '2015-04-19 13:10:38', 1),
(831, 458, 242, '0', '2015-04-19 13:10:38', 1),
(832, 459, 242, '0', '2015-04-19 13:10:38', 1),
(833, 460, 242, '0', '2015-04-19 13:10:38', 1),
(834, 422, 242, '0', '2015-04-19 13:10:38', 1),
(835, 414, 242, '0', '2015-04-19 13:10:40', 1),
(836, 415, 242, '0', '2015-04-19 13:10:40', 1),
(837, 416, 242, '0', '2015-04-19 13:10:40', 1),
(838, 417, 264, '0', '2015-04-19 13:10:45', 1),
(839, 418, 264, '0', '2015-04-19 13:10:45', 1),
(840, 403, 264, '0', '2015-04-19 13:10:45', 1),
(841, 404, 264, '0', '2015-04-19 13:10:46', 1),
(842, 405, 264, '0', '2015-04-19 13:10:46', 1),
(843, 406, 264, '0', '2015-04-19 13:10:46', 1),
(844, 407, 264, '0', '2015-04-19 13:10:46', 1),
(845, 408, 264, '0', '2015-04-19 13:10:46', 1),
(846, 409, 264, '0', '2015-04-19 13:10:46', 1),
(847, 410, 264, '0', '2015-04-19 13:10:46', 1),
(848, 411, 264, '0', '2015-04-19 13:10:47', 1),
(849, 412, 264, '0', '2015-04-19 13:10:47', 1),
(850, 413, 264, '0', '2015-04-19 13:10:47', 1),
(851, 419, 264, '0', '2015-04-19 13:10:47', 1),
(852, 448, 264, '0', '2015-04-19 13:10:47', 1),
(853, 454, 264, '0', '2015-04-19 13:10:47', 1),
(854, 455, 264, '0', '2015-04-19 13:10:48', 1),
(855, 456, 264, '0', '2015-04-19 13:10:48', 1),
(856, 461, 264, '0', '2015-04-19 13:10:48', 1),
(857, 462, 264, '0', '2015-04-19 13:10:48', 1),
(858, 463, 264, '0', '2015-04-19 13:10:48', 1),
(859, 457, 264, '0', '2015-04-19 13:10:48', 1),
(860, 459, 264, '0', '2015-04-19 13:10:49', 1),
(861, 422, 264, '0', '2015-04-19 13:10:49', 1),
(862, 414, 264, '0', '2015-04-19 13:10:51', 1),
(863, 415, 264, '0', '2015-04-19 13:10:51', 1),
(864, 416, 264, '0', '2015-04-19 13:10:51', 1),
(865, 403, 246, '0', '2015-04-19 13:12:10', 1),
(866, 403, 244, '0', '2015-04-19 13:12:20', 1),
(867, 404, 244, '0', '2015-04-19 13:12:20', 1),
(868, 405, 244, '0', '2015-04-19 13:12:21', 1),
(869, 406, 244, '0', '2015-04-19 13:12:21', 1),
(870, 407, 244, '0', '2015-04-19 13:12:21', 1),
(871, 408, 244, '0', '2015-04-19 13:12:21', 1),
(872, 409, 244, '0', '2015-04-19 13:12:21', 1),
(873, 410, 244, '0', '2015-04-19 13:12:21', 1),
(874, 411, 244, '0', '2015-04-19 13:12:21', 1),
(875, 412, 244, '0', '2015-04-19 13:12:22', 1),
(876, 413, 244, '0', '2015-04-19 13:12:22', 1),
(877, 414, 244, '0', '2015-04-19 13:12:22', 1),
(878, 415, 244, '0', '2015-04-19 13:12:22', 1),
(879, 416, 244, '0', '2015-04-19 13:12:22', 1),
(880, 403, 252, '0', '2015-04-19 13:12:31', 1),
(881, 404, 252, '0', '2015-04-19 13:12:31', 1),
(882, 405, 252, '0', '2015-04-19 13:12:31', 1),
(883, 406, 252, '0', '2015-04-19 13:12:31', 1),
(884, 407, 252, '0', '2015-04-19 13:12:31', 1),
(885, 408, 252, '0', '2015-04-19 13:12:31', 1),
(886, 409, 252, '0', '2015-04-19 13:12:31', 1),
(887, 426, 252, '0', '2015-04-19 13:12:32', 1),
(888, 427, 252, '0', '2015-04-19 13:12:32', 1),
(889, 428, 252, '0', '2015-04-19 13:12:32', 1),
(890, 429, 252, '0', '2015-04-19 13:12:32', 1),
(891, 430, 252, '0', '2015-04-19 13:12:32', 1),
(892, 431, 252, '0', '2015-04-19 13:12:32', 1),
(893, 432, 252, '0', '2015-04-19 13:12:33', 1),
(894, 433, 252, '0', '2015-04-19 13:12:33', 1),
(895, 414, 252, '0', '2015-04-19 13:12:33', 1),
(896, 415, 252, '0', '2015-04-19 13:12:33', 1),
(897, 416, 252, '0', '2015-04-19 13:12:33', 1),
(898, 403, 243, '0', '2015-04-19 13:12:39', 1),
(899, 404, 243, '0', '2015-04-19 13:12:39', 1),
(900, 405, 243, '0', '2015-04-19 13:12:40', 1),
(901, 406, 243, '0', '2015-04-19 13:12:40', 1),
(902, 407, 243, '0', '2015-04-19 13:12:40', 1),
(903, 408, 243, '0', '2015-04-19 13:12:40', 1),
(904, 409, 243, '0', '2015-04-19 13:12:40', 1),
(905, 426, 243, '0', '2015-04-19 13:12:40', 1),
(906, 427, 243, '0', '2015-04-19 13:12:40', 1),
(907, 428, 243, '0', '2015-04-19 13:12:41', 1),
(908, 429, 243, '0', '2015-04-19 13:12:41', 1),
(909, 430, 243, '0', '2015-04-19 13:12:41', 1),
(910, 431, 243, '0', '2015-04-19 13:12:41', 1),
(911, 432, 243, '0', '2015-04-19 13:12:41', 1),
(912, 433, 243, '0', '2015-04-19 13:12:41', 1),
(913, 414, 243, '0', '2015-04-19 13:12:41', 1),
(914, 415, 243, '0', '2015-04-19 13:12:42', 1),
(915, 416, 243, '0', '2015-04-19 13:12:42', 1),
(916, 417, 249, '0', '2015-04-20 12:33:21', 1),
(917, 418, 249, '0', '2015-04-20 12:33:21', 1),
(918, 417, 281, '0', '2015-04-20 13:40:10', 1),
(919, 418, 281, '0', '2015-04-20 13:40:10', 1),
(920, 403, 281, '0', '2015-04-20 13:40:10', 1),
(921, 404, 281, '0', '2015-04-20 13:40:10', 1),
(922, 405, 281, '0', '2015-04-20 13:40:11', 1),
(923, 406, 281, '0', '2015-04-20 13:40:11', 1),
(924, 407, 281, '0', '2015-04-20 13:40:11', 1),
(925, 408, 281, '0', '2015-04-20 13:40:11', 1),
(926, 409, 281, '0', '2015-04-20 13:40:11', 1),
(927, 410, 281, '0', '2015-04-20 13:40:11', 1),
(928, 411, 281, '0', '2015-04-20 13:40:11', 1),
(929, 412, 281, '0', '2015-04-20 13:40:11', 1),
(930, 413, 281, '0', '2015-04-20 13:40:11', 1),
(931, 419, 281, '0', '2015-04-20 13:40:12', 1),
(932, 429, 281, '0', '2015-04-20 13:40:12', 1),
(933, 455, 281, '0', '2015-04-20 13:40:12', 1),
(934, 465, 281, '0', '2015-04-20 13:40:12', 1),
(935, 466, 281, '0', '2015-04-20 13:40:12', 1),
(936, 467, 281, '0', '2015-04-20 13:40:12', 1),
(937, 468, 281, '0', '2015-04-20 13:40:12', 1),
(938, 469, 281, '0', '2015-04-20 13:40:13', 1),
(939, 470, 281, '0', '2015-04-20 13:40:13', 1),
(940, 459, 281, '0', '2015-04-20 13:40:13', 1),
(941, 471, 281, '0', '2015-04-20 13:40:13', 1),
(942, 472, 281, '0', '2015-04-20 13:40:13', 1),
(943, 422, 281, '0', '2015-04-20 13:40:13', 1),
(944, 414, 281, '0', '2015-04-20 13:40:13', 1),
(945, 415, 281, '0', '2015-04-20 13:40:13', 1),
(946, 416, 281, '0', '2015-04-20 13:40:14', 1),
(947, 403, 283, '0', '2015-04-20 13:40:30', 1),
(948, 404, 283, '0', '2015-04-20 13:40:31', 1),
(949, 405, 283, '0', '2015-04-20 13:40:31', 1),
(950, 406, 283, '0', '2015-04-20 13:40:31', 1),
(951, 407, 283, '0', '2015-04-20 13:40:31', 1),
(952, 408, 283, '0', '2015-04-20 13:40:31', 1),
(953, 409, 283, '0', '2015-04-20 13:40:31', 1),
(954, 410, 283, '0', '2015-04-20 13:40:31', 1),
(955, 411, 283, '0', '2015-04-20 13:40:31', 1),
(956, 412, 283, '0', '2015-04-20 13:40:31', 1),
(957, 413, 283, '0', '2015-04-20 13:40:32', 1),
(958, 419, 283, '0', '2015-04-20 13:40:32', 1),
(959, 420, 283, '0', '2015-04-20 13:40:32', 1),
(960, 473, 283, '0', '2015-04-20 13:40:32', 1),
(961, 414, 283, '0', '2015-04-20 13:40:32', 1),
(962, 415, 283, '0', '2015-04-20 13:40:32', 1),
(963, 416, 283, '0', '2015-04-20 13:40:32', 1),
(964, 403, 266, '0', '2015-04-20 13:49:11', 1),
(965, 404, 266, '0', '2015-04-20 13:49:12', 1),
(966, 405, 266, '0', '2015-04-20 13:49:12', 1),
(967, 406, 266, '0', '2015-04-20 13:49:12', 1),
(968, 407, 266, '0', '2015-04-20 13:49:12', 1),
(969, 408, 266, '0', '2015-04-20 13:49:12', 1),
(970, 409, 266, '0', '2015-04-20 13:49:12', 1),
(971, 410, 266, '0', '2015-04-20 13:49:12', 1),
(972, 411, 266, '0', '2015-04-20 13:49:12', 1),
(973, 412, 266, '0', '2015-04-20 13:49:13', 1),
(974, 413, 266, '0', '2015-04-20 13:49:13', 1),
(975, 419, 266, '0', '2015-04-20 13:49:13', 1),
(976, 420, 266, '0', '2015-04-20 13:49:13', 1),
(977, 440, 266, '0', '2015-04-20 13:49:13', 1),
(978, 414, 266, '0', '2015-04-20 13:49:14', 1),
(979, 415, 266, '0', '2015-04-20 13:49:14', 1),
(980, 416, 266, '0', '2015-04-20 13:49:14', 1),
(981, 403, 265, '0', '2015-04-20 14:46:51', 1),
(982, 404, 265, '0', '2015-04-20 14:46:51', 1),
(983, 405, 265, '0', '2015-04-20 14:46:51', 1),
(984, 406, 265, '0', '2015-04-20 14:46:51', 1),
(985, 407, 265, '0', '2015-04-20 14:46:51', 1),
(986, 408, 265, '0', '2015-04-20 14:46:51', 1),
(987, 409, 265, '0', '2015-04-20 14:46:51', 1),
(988, 410, 265, '0', '2015-04-20 14:46:51', 1),
(989, 411, 265, '0', '2015-04-20 14:46:51', 1),
(990, 412, 265, '0', '2015-04-20 14:46:52', 1),
(991, 413, 265, '0', '2015-04-20 14:46:52', 1),
(992, 419, 265, '0', '2015-04-20 14:46:52', 1),
(993, 421, 265, '0', '2015-04-20 14:46:52', 1),
(994, 448, 265, '0', '2015-04-20 14:46:52', 1),
(995, 414, 265, '0', '2015-04-20 14:46:52', 1),
(996, 415, 265, '0', '2015-04-20 14:46:52', 1),
(997, 416, 265, '0', '2015-04-20 14:46:52', 1),
(998, 403, 241, '0', '2015-04-20 15:08:36', 1),
(999, 404, 241, '0', '2015-04-20 15:08:37', 1),
(1000, 405, 241, '0', '2015-04-20 15:08:37', 1),
(1001, 406, 241, '0', '2015-04-20 15:08:37', 1),
(1002, 407, 241, '0', '2015-04-20 15:08:37', 1),
(1003, 408, 241, '0', '2015-04-20 15:08:37', 1),
(1004, 409, 241, '0', '2015-04-20 15:08:37', 1),
(1005, 410, 241, '0', '2015-04-20 15:08:37', 1),
(1006, 411, 241, '0', '2015-04-20 15:08:37', 1),
(1007, 412, 241, '0', '2015-04-20 15:08:37', 1),
(1008, 413, 241, '0', '2015-04-20 15:08:38', 1),
(1009, 419, 241, '0', '2015-04-20 15:08:38', 1),
(1010, 421, 241, '0', '2015-04-20 15:08:38', 1),
(1011, 427, 241, '0', '2015-04-20 15:08:38', 1),
(1012, 414, 241, '0', '2015-04-20 15:08:38', 1),
(1013, 415, 241, '0', '2015-04-20 15:08:38', 1),
(1014, 416, 241, '0', '2015-04-20 15:08:38', 1),
(1015, 403, 284, '0', '2015-04-20 15:10:23', 1),
(1016, 404, 284, '0', '2015-04-20 15:10:23', 1),
(1017, 405, 284, '0', '2015-04-20 15:10:23', 1),
(1018, 406, 284, '0', '2015-04-20 15:10:23', 1),
(1019, 407, 284, '0', '2015-04-20 15:10:23', 1),
(1020, 408, 284, '0', '2015-04-20 15:10:23', 1),
(1021, 409, 284, '0', '2015-04-20 15:10:23', 1),
(1022, 410, 284, '0', '2015-04-20 15:10:23', 1),
(1023, 411, 284, '0', '2015-04-20 15:10:23', 1),
(1024, 412, 284, '0', '2015-04-20 15:10:24', 1),
(1025, 413, 284, '0', '2015-04-20 15:10:24', 1),
(1026, 419, 284, '0', '2015-04-20 15:10:24', 1),
(1027, 421, 284, '0', '2015-04-20 15:10:24', 1),
(1028, 429, 284, '0', '2015-04-20 15:10:24', 1),
(1029, 414, 284, '0', '2015-04-20 15:10:24', 1),
(1030, 415, 284, '0', '2015-04-20 15:10:24', 1),
(1031, 416, 284, '0', '2015-04-20 15:10:24', 1),
(1032, 417, 271, '0', '2015-04-20 15:40:11', 1),
(1033, 418, 271, '0', '2015-04-20 15:40:12', 1),
(1034, 403, 271, '0', '2015-04-20 15:40:13', 1),
(1035, 404, 271, '0', '2015-04-20 15:40:14', 1),
(1036, 405, 271, '0', '2015-04-20 15:40:14', 1),
(1037, 406, 271, '0', '2015-04-20 15:40:15', 1),
(1038, 407, 271, '0', '2015-04-20 15:40:15', 1),
(1039, 408, 271, '0', '2015-04-20 15:40:15', 1),
(1040, 409, 271, '0', '2015-04-20 15:40:16', 1),
(1041, 410, 271, '0', '2015-04-20 15:40:16', 1),
(1042, 411, 271, '0', '2015-04-20 15:40:16', 1),
(1043, 412, 271, '0', '2015-04-20 15:40:17', 1),
(1044, 413, 271, '0', '2015-04-20 15:40:17', 1),
(1045, 419, 271, '0', '2015-04-20 15:40:17', 1),
(1046, 455, 271, '0', '2015-04-20 15:40:18', 1),
(1047, 474, 271, '0', '2015-04-20 15:40:19', 1),
(1048, 475, 271, '0', '2015-04-20 15:40:19', 1),
(1049, 476, 271, '0', '2015-04-20 15:40:19', 1),
(1050, 477, 271, '0', '2015-04-20 15:40:20', 1),
(1051, 478, 271, '0', '2015-04-20 15:40:20', 1),
(1052, 479, 271, '0', '2015-04-20 15:40:21', 1),
(1053, 480, 271, '0', '2015-04-20 15:40:21', 1),
(1054, 422, 271, '0', '2015-04-20 15:40:22', 1),
(1055, 414, 271, '0', '2015-04-20 15:40:23', 1),
(1056, 415, 271, '0', '2015-04-20 15:40:23', 1),
(1057, 416, 271, '0', '2015-04-20 15:40:23', 1),
(1058, 439, 241, '0', '2015-04-20 16:25:02', 1),
(1059, 417, 274, '0', '2015-04-20 17:01:40', 1),
(1060, 418, 274, '0', '2015-04-20 17:01:41', 1),
(1061, 403, 274, '0', '2015-04-20 17:01:42', 1),
(1062, 404, 274, '0', '2015-04-20 17:01:42', 1),
(1063, 405, 274, '0', '2015-04-20 17:01:43', 1),
(1064, 406, 274, '0', '2015-04-20 17:01:43', 1),
(1065, 407, 274, '0', '2015-04-20 17:01:43', 1),
(1066, 408, 274, '0', '2015-04-20 17:01:44', 1),
(1067, 409, 274, '0', '2015-04-20 17:01:44', 1),
(1068, 426, 274, '0', '2015-04-20 17:01:44', 1),
(1069, 427, 274, '0', '2015-04-20 17:01:45', 1),
(1070, 428, 274, '0', '2015-04-20 17:01:45', 1),
(1071, 429, 274, '0', '2015-04-20 17:01:45', 1),
(1072, 430, 274, '0', '2015-04-20 17:01:46', 1),
(1073, 431, 274, '0', '2015-04-20 17:01:46', 1),
(1074, 432, 274, '0', '2015-04-20 17:01:46', 1),
(1075, 433, 274, '0', '2015-04-20 17:01:47', 1),
(1076, 419, 274, '0', '2015-04-20 17:01:47', 1),
(1077, 421, 274, '0', '2015-04-20 17:01:48', 1),
(1078, 455, 274, '0', '2015-04-20 17:01:48', 1),
(1079, 481, 274, '0', '2015-04-20 17:01:49', 1),
(1080, 461, 274, '0', '2015-04-20 17:01:49', 1),
(1081, 482, 274, '0', '2015-04-20 17:01:49', 1),
(1082, 483, 274, '0', '2015-04-20 17:01:50', 1),
(1083, 484, 274, '0', '2015-04-20 17:01:50', 1),
(1084, 485, 274, '0', '2015-04-20 17:01:51', 1),
(1085, 486, 274, '0', '2015-04-20 17:01:51', 1),
(1086, 460, 274, '0', '2015-04-20 17:01:51', 1),
(1087, 403, 253, '0', '2015-04-20 17:01:58', 1),
(1088, 404, 253, '0', '2015-04-20 17:01:58', 1),
(1089, 405, 253, '0', '2015-04-20 17:01:58', 1),
(1090, 406, 253, '0', '2015-04-20 17:01:59', 1),
(1091, 407, 253, '0', '2015-04-20 17:01:59', 1),
(1092, 408, 253, '0', '2015-04-20 17:02:00', 1),
(1093, 409, 253, '0', '2015-04-20 17:02:00', 1),
(1094, 426, 253, '0', '2015-04-20 17:02:01', 1),
(1095, 427, 253, '0', '2015-04-20 17:02:01', 1),
(1096, 428, 253, '0', '2015-04-20 17:02:01', 1),
(1097, 429, 253, '0', '2015-04-20 17:02:02', 1),
(1098, 430, 253, '0', '2015-04-20 17:02:02', 1),
(1099, 431, 253, '0', '2015-04-20 17:02:02', 1),
(1100, 432, 253, '0', '2015-04-20 17:02:03', 1),
(1101, 433, 253, '0', '2015-04-20 17:02:03', 1),
(1102, 419, 253, '0', '2015-04-20 17:02:04', 1),
(1103, 420, 253, '0', '2015-04-20 17:02:04', 1),
(1104, 414, 253, '0', '2015-04-20 17:02:18', 1),
(1105, 415, 253, '0', '2015-04-20 17:02:19', 1),
(1106, 416, 253, '0', '2015-04-20 17:02:19', 1),
(1107, 434, 254, '0', '2015-04-20 17:02:38', 1),
(1108, 417, 285, '0', '2015-04-20 17:04:36', 1),
(1109, 418, 285, '0', '2015-04-20 17:04:37', 1),
(1110, 403, 285, '0', '2015-04-20 17:04:38', 1),
(1111, 404, 285, '0', '2015-04-20 17:04:39', 1),
(1112, 405, 285, '0', '2015-04-20 17:04:39', 1),
(1113, 406, 285, '0', '2015-04-20 17:04:40', 1),
(1114, 407, 285, '0', '2015-04-20 17:04:40', 1),
(1115, 408, 285, '0', '2015-04-20 17:04:40', 1),
(1116, 409, 285, '0', '2015-04-20 17:04:41', 1),
(1117, 410, 285, '0', '2015-04-20 17:04:41', 1),
(1118, 411, 285, '0', '2015-04-20 17:04:41', 1),
(1119, 412, 285, '0', '2015-04-20 17:04:42', 1),
(1120, 413, 285, '0', '2015-04-20 17:04:42', 1),
(1121, 419, 285, '0', '2015-04-20 17:04:42', 1),
(1122, 487, 285, '0', '2015-04-20 17:04:43', 1),
(1123, 454, 285, '0', '2015-04-20 17:04:44', 1),
(1124, 455, 285, '0', '2015-04-20 17:04:44', 1),
(1125, 456, 285, '0', '2015-04-20 17:04:44', 1),
(1126, 488, 285, '0', '2015-04-20 17:04:45', 1),
(1127, 463, 285, '0', '2015-04-20 17:04:45', 1),
(1128, 457, 285, '0', '2015-04-20 17:04:46', 1),
(1129, 460, 285, '0', '2015-04-20 17:04:46', 1),
(1130, 489, 285, '0', '2015-04-20 17:04:46', 1),
(1131, 414, 285, '0', '2015-04-20 17:04:47', 1),
(1132, 415, 285, '0', '2015-04-20 17:04:48', 1),
(1133, 416, 285, '0', '2015-04-20 17:04:48', 1),
(1134, 403, 286, '0', '2015-04-20 17:04:56', 1),
(1135, 404, 286, '0', '2015-04-20 17:04:57', 1),
(1136, 405, 286, '0', '2015-04-20 17:04:57', 1),
(1137, 406, 286, '0', '2015-04-20 17:04:58', 1),
(1138, 407, 286, '0', '2015-04-20 17:04:58', 1),
(1139, 408, 286, '0', '2015-04-20 17:04:59', 1),
(1140, 409, 286, '0', '2015-04-20 17:04:59', 1),
(1141, 410, 286, '0', '2015-04-20 17:04:59', 1),
(1142, 411, 286, '0', '2015-04-20 17:05:00', 1),
(1143, 412, 286, '0', '2015-04-20 17:05:00', 1),
(1144, 413, 286, '0', '2015-04-20 17:05:01', 1),
(1145, 419, 286, '0', '2015-04-20 17:05:01', 1),
(1146, 421, 286, '0', '2015-04-20 17:05:01', 1),
(1147, 487, 286, '0', '2015-04-20 17:05:02', 1),
(1148, 447, 286, '0', '2015-04-20 17:05:02', 1),
(1149, 414, 286, '0', '2015-04-20 17:05:03', 1),
(1150, 415, 286, '0', '2015-04-20 17:05:03', 1),
(1151, 416, 286, '0', '2015-04-20 17:05:03', 1),
(1152, 402, 287, '0', '2015-04-20 17:07:10', 1),
(1153, 417, 273, '0', '2015-04-20 17:07:38', 1),
(1154, 418, 273, '0', '2015-04-20 17:07:39', 1),
(1155, 403, 273, '0', '2015-04-20 17:07:40', 1),
(1156, 404, 273, '0', '2015-04-20 17:07:41', 1),
(1157, 405, 273, '0', '2015-04-20 17:07:41', 1),
(1158, 406, 273, '0', '2015-04-20 17:07:42', 1),
(1159, 407, 273, '0', '2015-04-20 17:07:42', 1),
(1160, 408, 273, '0', '2015-04-20 17:07:42', 1),
(1161, 409, 273, '0', '2015-04-20 17:07:43', 1),
(1162, 410, 273, '0', '2015-04-20 17:07:43', 1),
(1163, 411, 273, '0', '2015-04-20 17:07:43', 1),
(1164, 412, 273, '0', '2015-04-20 17:07:44', 1),
(1165, 413, 273, '0', '2015-04-20 17:07:44', 1),
(1166, 419, 273, '0', '2015-04-20 17:07:44', 1),
(1167, 444, 273, '0', '2015-04-20 17:07:45', 1),
(1168, 454, 273, '0', '2015-04-20 17:07:45', 1),
(1169, 455, 273, '0', '2015-04-20 17:07:46', 1),
(1170, 456, 273, '0', '2015-04-20 17:07:46', 1),
(1171, 490, 273, '0', '2015-04-20 17:07:46', 1),
(1172, 462, 273, '0', '2015-04-20 17:07:47', 1),
(1173, 488, 273, '0', '2015-04-20 17:07:47', 1),
(1174, 459, 273, '0', '2015-04-20 17:07:47', 1),
(1175, 414, 273, '0', '2015-04-20 17:07:49', 1),
(1176, 415, 273, '0', '2015-04-20 17:07:49', 1),
(1177, 416, 273, '0', '2015-04-20 17:07:50', 1),
(1178, 403, 288, '0', '2015-04-20 17:09:42', 1),
(1179, 404, 288, '0', '2015-04-20 17:09:42', 1),
(1180, 405, 288, '0', '2015-04-20 17:09:43', 1),
(1181, 406, 288, '0', '2015-04-20 17:09:43', 1),
(1182, 407, 288, '0', '2015-04-20 17:09:44', 1),
(1183, 408, 288, '0', '2015-04-20 17:09:44', 1),
(1184, 409, 288, '0', '2015-04-20 17:09:44', 1),
(1185, 410, 288, '0', '2015-04-20 17:09:45', 1),
(1186, 411, 288, '0', '2015-04-20 17:09:45', 1),
(1187, 412, 288, '0', '2015-04-20 17:09:45', 1),
(1188, 413, 288, '0', '2015-04-20 17:09:46', 1),
(1189, 419, 288, '0', '2015-04-20 17:09:46', 1),
(1190, 421, 288, '0', '2015-04-20 17:09:46', 1),
(1191, 444, 288, '0', '2015-04-20 17:09:47', 1),
(1192, 447, 288, '0', '2015-04-20 17:09:47', 1),
(1193, 414, 288, '0', '2015-04-20 17:09:47', 1),
(1194, 415, 288, '0', '2015-04-20 17:09:48', 1),
(1195, 416, 288, '0', '2015-04-20 17:09:48', 1),
(1196, 417, 251, '0', '2015-04-20 17:10:54', 1),
(1197, 418, 251, '0', '2015-04-20 17:10:54', 1),
(1198, 403, 251, '0', '2015-04-20 17:10:55', 1),
(1199, 404, 251, '0', '2015-04-20 17:10:56', 1),
(1200, 405, 251, '0', '2015-04-20 17:10:56', 1),
(1201, 406, 251, '0', '2015-04-20 17:10:57', 1),
(1202, 407, 251, '0', '2015-04-20 17:10:57', 1),
(1203, 408, 251, '0', '2015-04-20 17:10:58', 1),
(1204, 409, 251, '0', '2015-04-20 17:10:58', 1),
(1205, 410, 251, '0', '2015-04-20 17:10:58', 1),
(1206, 411, 251, '0', '2015-04-20 17:10:59', 1),
(1207, 412, 251, '0', '2015-04-20 17:10:59', 1),
(1208, 413, 251, '0', '2015-04-20 17:10:59', 1),
(1209, 419, 251, '0', '2015-04-20 17:11:00', 1),
(1210, 442, 251, '0', '2015-04-20 17:11:00', 1),
(1211, 455, 251, '0', '2015-04-20 17:11:01', 1),
(1212, 491, 251, '0', '2015-04-20 17:11:01', 1),
(1213, 461, 251, '0', '2015-04-20 17:11:02', 1),
(1214, 492, 251, '0', '2015-04-20 17:11:02', 1),
(1215, 493, 251, '0', '2015-04-20 17:11:03', 1),
(1216, 494, 251, '0', '2015-04-20 17:11:03', 1),
(1217, 414, 251, '0', '2015-04-20 17:11:04', 1),
(1218, 415, 251, '0', '2015-04-20 17:11:04', 1),
(1219, 416, 251, '0', '2015-04-20 17:11:05', 1),
(1220, 414, 274, '0', '2015-04-20 17:11:28', 1),
(1221, 415, 274, '0', '2015-04-20 17:11:28', 1),
(1222, 416, 274, '0', '2015-04-20 17:11:29', 1),
(1223, 403, 289, '0', '2015-04-20 17:11:34', 1),
(1224, 404, 289, '0', '2015-04-20 17:11:35', 1),
(1225, 405, 289, '0', '2015-04-20 17:11:36', 1),
(1226, 406, 289, '0', '2015-04-20 17:11:36', 1),
(1227, 407, 289, '0', '2015-04-20 17:11:37', 1),
(1228, 408, 289, '0', '2015-04-20 17:11:37', 1),
(1229, 409, 289, '0', '2015-04-20 17:11:37', 1),
(1230, 410, 289, '0', '2015-04-20 17:11:38', 1),
(1231, 411, 289, '0', '2015-04-20 17:11:38', 1),
(1232, 412, 289, '0', '2015-04-20 17:11:38', 1),
(1233, 413, 289, '0', '2015-04-20 17:11:39', 1),
(1234, 419, 289, '0', '2015-04-20 17:11:39', 1),
(1235, 420, 289, '0', '2015-04-20 17:11:39', 1),
(1236, 402, 289, '0', '2015-04-20 17:11:40', 1),
(1237, 403, 290, '0', '2015-04-20 17:12:15', 1),
(1238, 404, 290, '0', '2015-04-20 17:12:16', 1),
(1239, 405, 290, '0', '2015-04-20 17:12:16', 1),
(1240, 406, 290, '0', '2015-04-20 17:12:17', 1),
(1241, 407, 290, '0', '2015-04-20 17:12:17', 1),
(1242, 408, 290, '0', '2015-04-20 17:12:18', 1),
(1243, 409, 290, '0', '2015-04-20 17:12:18', 1),
(1244, 410, 290, '0', '2015-04-20 17:12:18', 1),
(1245, 411, 290, '0', '2015-04-20 17:12:19', 1),
(1246, 412, 290, '0', '2015-04-20 17:12:19', 1),
(1247, 413, 290, '0', '2015-04-20 17:12:20', 1),
(1248, 419, 290, '0', '2015-04-20 17:12:20', 1),
(1249, 421, 290, '0', '2015-04-20 17:12:20', 1),
(1250, 442, 290, '0', '2015-04-20 17:12:21', 1),
(1251, 414, 290, '0', '2015-04-20 17:12:21', 1),
(1252, 415, 290, '0', '2015-04-20 17:12:22', 1),
(1253, 416, 290, '0', '2015-04-20 17:12:22', 1),
(1254, 495, 281, '0', '2015-04-20 17:18:39', 1),
(1255, 496, 281, '0', '2015-04-20 17:18:39', 1),
(1256, 417, 291, '0', '2015-04-20 17:21:10', 1),
(1257, 418, 291, '0', '2015-04-20 17:21:10', 1),
(1258, 403, 291, '0', '2015-04-20 17:21:10', 1),
(1259, 404, 291, '0', '2015-04-20 17:21:10', 1),
(1260, 405, 291, '0', '2015-04-20 17:21:10', 1),
(1261, 406, 291, '0', '2015-04-20 17:21:10', 1),
(1262, 407, 291, '0', '2015-04-20 17:21:10', 1),
(1263, 408, 291, '0', '2015-04-20 17:21:10', 1),
(1264, 409, 291, '0', '2015-04-20 17:21:10', 1),
(1265, 410, 291, '0', '2015-04-20 17:21:10', 1),
(1266, 411, 291, '0', '2015-04-20 17:21:10', 1),
(1267, 412, 291, '0', '2015-04-20 17:21:10', 1),
(1268, 413, 291, '0', '2015-04-20 17:21:10', 1),
(1269, 419, 291, '0', '2015-04-20 17:21:10', 1),
(1270, 497, 291, '0', '2015-04-20 17:21:10', 1),
(1271, 498, 291, '0', '2015-04-20 17:21:10', 1),
(1272, 489, 291, '0', '2015-04-20 17:21:10', 1),
(1273, 479, 291, '0', '2015-04-20 17:21:10', 1),
(1274, 499, 291, '0', '2015-04-20 17:21:10', 1),
(1275, 427, 291, '0', '2015-04-20 17:21:10', 1),
(1276, 494, 291, '0', '2015-04-20 17:21:10', 1),
(1277, 500, 291, '0', '2015-04-20 17:21:10', 1),
(1278, 460, 291, '0', '2015-04-20 17:21:10', 1),
(1279, 414, 291, '0', '2015-04-20 17:21:10', 1),
(1280, 415, 291, '0', '2015-04-20 17:21:10', 1),
(1281, 416, 291, '0', '2015-04-20 17:21:10', 1),
(1282, 403, 292, '0', '2015-04-20 17:21:15', 1),
(1283, 404, 292, '0', '2015-04-20 17:21:15', 1),
(1284, 405, 292, '0', '2015-04-20 17:21:15', 1),
(1285, 406, 292, '0', '2015-04-20 17:21:15', 1),
(1286, 407, 292, '0', '2015-04-20 17:21:15', 1),
(1287, 408, 292, '0', '2015-04-20 17:21:15', 1),
(1288, 409, 292, '0', '2015-04-20 17:21:15', 1),
(1289, 410, 292, '0', '2015-04-20 17:21:15', 1),
(1290, 411, 292, '0', '2015-04-20 17:21:15', 1),
(1291, 412, 292, '0', '2015-04-20 17:21:15', 1),
(1292, 413, 292, '0', '2015-04-20 17:21:15', 1),
(1293, 419, 292, '0', '2015-04-20 17:21:15', 1),
(1294, 421, 292, '0', '2015-04-20 17:21:15', 1),
(1295, 497, 292, '0', '2015-04-20 17:21:15', 1),
(1296, 414, 292, '0', '2015-04-20 17:21:15', 1),
(1297, 415, 292, '0', '2015-04-20 17:21:15', 1),
(1298, 416, 292, '0', '2015-04-20 17:21:15', 1),
(1299, 403, 293, '0', '2015-04-20 17:21:31', 1),
(1300, 404, 293, '0', '2015-04-20 17:21:31', 1),
(1301, 405, 293, '0', '2015-04-20 17:21:31', 1),
(1302, 406, 293, '0', '2015-04-20 17:21:31', 1),
(1303, 407, 293, '0', '2015-04-20 17:21:31', 1),
(1304, 408, 293, '0', '2015-04-20 17:21:31', 1),
(1305, 409, 293, '0', '2015-04-20 17:21:31', 1),
(1306, 410, 293, '0', '2015-04-20 17:21:31', 1),
(1307, 411, 293, '0', '2015-04-20 17:21:31', 1),
(1308, 412, 293, '0', '2015-04-20 17:21:31', 1),
(1309, 413, 293, '0', '2015-04-20 17:21:31', 1),
(1310, 419, 293, '0', '2015-04-20 17:21:31', 1),
(1311, 420, 293, '0', '2015-04-20 17:21:31', 1),
(1312, 501, 293, '0', '2015-04-20 17:21:31', 1),
(1313, 414, 293, '0', '2015-04-20 17:21:31', 1),
(1314, 415, 293, '0', '2015-04-20 17:21:31', 1),
(1315, 416, 293, '0', '2015-04-20 17:21:31', 1),
(1316, 403, 294, '0', '2015-04-20 17:22:50', 1),
(1317, 404, 294, '0', '2015-04-20 17:22:50', 1),
(1318, 405, 294, '0', '2015-04-20 17:22:50', 1),
(1319, 406, 294, '0', '2015-04-20 17:22:50', 1),
(1320, 407, 294, '0', '2015-04-20 17:22:50', 1),
(1321, 408, 294, '0', '2015-04-20 17:22:50', 1),
(1322, 409, 294, '0', '2015-04-20 17:22:50', 1),
(1323, 410, 294, '0', '2015-04-20 17:22:50', 1),
(1324, 411, 294, '0', '2015-04-20 17:22:50', 1),
(1325, 412, 294, '0', '2015-04-20 17:22:50', 1),
(1326, 413, 294, '0', '2015-04-20 17:22:50', 1),
(1327, 419, 294, '0', '2015-04-20 17:22:50', 1),
(1328, 420, 294, '0', '2015-04-20 17:22:50', 1),
(1329, 502, 294, '0', '2015-04-20 17:22:50', 1),
(1330, 414, 294, '0', '2015-04-20 17:22:50', 1),
(1331, 415, 294, '0', '2015-04-20 17:22:50', 1),
(1332, 416, 294, '0', '2015-04-20 17:22:50', 1),
(1333, 417, 295, '0', '2015-04-20 17:36:18', 1),
(1334, 418, 295, '0', '2015-04-20 17:36:18', 1),
(1335, 403, 295, '0', '2015-04-20 17:36:18', 1),
(1336, 404, 295, '0', '2015-04-20 17:36:18', 1),
(1337, 405, 295, '0', '2015-04-20 17:36:18', 1),
(1338, 406, 295, '0', '2015-04-20 17:36:18', 1),
(1339, 407, 295, '0', '2015-04-20 17:36:18', 1),
(1340, 408, 295, '0', '2015-04-20 17:36:18', 1),
(1341, 409, 295, '0', '2015-04-20 17:36:18', 1),
(1342, 410, 295, '0', '2015-04-20 17:36:18', 1),
(1343, 411, 295, '0', '2015-04-20 17:36:18', 1),
(1344, 412, 295, '0', '2015-04-20 17:36:18', 1),
(1345, 413, 295, '0', '2015-04-20 17:36:18', 1),
(1346, 419, 295, '0', '2015-04-20 17:36:18', 1),
(1347, 503, 295, '0', '2015-04-20 17:36:18', 1),
(1348, 454, 295, '0', '2015-04-20 17:36:18', 1),
(1349, 455, 295, '0', '2015-04-20 17:36:18', 1),
(1350, 456, 295, '0', '2015-04-20 17:36:18', 1),
(1351, 461, 295, '0', '2015-04-20 17:36:18', 1),
(1352, 459, 295, '0', '2015-04-20 17:36:18', 1),
(1353, 460, 295, '0', '2015-04-20 17:36:18', 1),
(1354, 489, 295, '0', '2015-04-20 17:36:18', 1),
(1355, 414, 295, '0', '2015-04-20 17:36:18', 1),
(1356, 415, 295, '0', '2015-04-20 17:36:18', 1),
(1357, 416, 295, '0', '2015-04-20 17:36:18', 1),
(1358, 403, 296, '0', '2015-04-20 17:36:23', 1),
(1359, 404, 296, '0', '2015-04-20 17:36:23', 1),
(1360, 405, 296, '0', '2015-04-20 17:36:23', 1),
(1361, 406, 296, '0', '2015-04-20 17:36:23', 1),
(1362, 407, 296, '0', '2015-04-20 17:36:23', 1),
(1363, 408, 296, '0', '2015-04-20 17:36:23', 1),
(1364, 409, 296, '0', '2015-04-20 17:36:23', 1),
(1365, 410, 296, '0', '2015-04-20 17:36:23', 1),
(1366, 411, 296, '0', '2015-04-20 17:36:23', 1),
(1367, 412, 296, '0', '2015-04-20 17:36:23', 1),
(1368, 413, 296, '0', '2015-04-20 17:36:23', 1),
(1369, 419, 296, '0', '2015-04-20 17:36:23', 1),
(1370, 420, 296, '0', '2015-04-20 17:36:23', 1),
(1371, 504, 296, '0', '2015-04-20 17:36:23', 1),
(1372, 414, 296, '0', '2015-04-20 17:36:23', 1),
(1373, 415, 296, '0', '2015-04-20 17:36:23', 1),
(1374, 416, 296, '0', '2015-04-20 17:36:23', 1),
(1375, 402, 297, '0', '2015-04-20 17:37:44', 1),
(1376, 417, 298, '0', '2015-04-20 17:37:54', 1),
(1377, 418, 298, '0', '2015-04-20 17:37:54', 1),
(1378, 403, 298, '0', '2015-04-20 17:37:55', 1),
(1379, 404, 298, '0', '2015-04-20 17:37:55', 1),
(1380, 405, 298, '0', '2015-04-20 17:37:55', 1),
(1381, 406, 298, '0', '2015-04-20 17:37:55', 1),
(1382, 407, 298, '0', '2015-04-20 17:37:55', 1),
(1383, 408, 298, '0', '2015-04-20 17:37:55', 1),
(1384, 409, 298, '0', '2015-04-20 17:37:55', 1),
(1385, 410, 298, '0', '2015-04-20 17:37:55', 1),
(1386, 411, 298, '0', '2015-04-20 17:37:55', 1),
(1387, 412, 298, '0', '2015-04-20 17:37:55', 1),
(1388, 413, 298, '0', '2015-04-20 17:37:55', 1),
(1389, 419, 298, '0', '2015-04-20 17:37:55', 1),
(1390, 505, 298, '0', '2015-04-20 17:37:55', 1),
(1391, 455, 298, '0', '2015-04-20 17:37:55', 1),
(1392, 506, 298, '0', '2015-04-20 17:37:55', 1),
(1393, 507, 298, '0', '2015-04-20 17:37:55', 1),
(1394, 508, 298, '0', '2015-04-20 17:37:55', 1),
(1395, 509, 298, '0', '2015-04-20 17:37:55', 1),
(1396, 510, 298, '0', '2015-04-20 17:37:55', 1),
(1397, 460, 298, '0', '2015-04-20 17:37:55', 1),
(1398, 480, 298, '0', '2015-04-20 17:37:55', 1),
(1399, 414, 298, '0', '2015-04-20 17:37:55', 1),
(1400, 415, 298, '0', '2015-04-20 17:37:55', 1),
(1401, 416, 298, '0', '2015-04-20 17:37:55', 1),
(1402, 403, 299, '0', '2015-04-20 17:37:59', 1),
(1403, 404, 299, '0', '2015-04-20 17:37:59', 1),
(1404, 405, 299, '0', '2015-04-20 17:37:59', 1),
(1405, 406, 299, '0', '2015-04-20 17:37:59', 1),
(1406, 407, 299, '0', '2015-04-20 17:37:59', 1),
(1407, 408, 299, '0', '2015-04-20 17:37:59', 1),
(1408, 409, 299, '0', '2015-04-20 17:38:00', 1),
(1409, 410, 299, '0', '2015-04-20 17:38:00', 1),
(1410, 411, 299, '0', '2015-04-20 17:38:00', 1),
(1411, 412, 299, '0', '2015-04-20 17:38:00', 1),
(1412, 413, 299, '0', '2015-04-20 17:38:00', 1),
(1413, 419, 299, '0', '2015-04-20 17:38:00', 1),
(1414, 421, 299, '0', '2015-04-20 17:38:00', 1),
(1415, 505, 299, '0', '2015-04-20 17:38:00', 1),
(1416, 414, 299, '0', '2015-04-20 17:38:00', 1),
(1417, 415, 299, '0', '2015-04-20 17:38:00', 1),
(1418, 416, 299, '0', '2015-04-20 17:38:00', 1),
(1419, 417, 275, '0', '2015-04-20 17:38:40', 1),
(1420, 418, 275, '0', '2015-04-20 17:38:40', 1),
(1421, 403, 275, '0', '2015-04-20 17:38:40', 1),
(1422, 404, 275, '0', '2015-04-20 17:38:40', 1),
(1423, 405, 275, '0', '2015-04-20 17:38:40', 1),
(1424, 406, 275, '0', '2015-04-20 17:38:40', 1),
(1425, 407, 275, '0', '2015-04-20 17:38:40', 1),
(1426, 408, 275, '0', '2015-04-20 17:38:41', 1),
(1427, 409, 275, '0', '2015-04-20 17:38:41', 1),
(1428, 410, 275, '0', '2015-04-20 17:38:41', 1),
(1429, 411, 275, '0', '2015-04-20 17:38:41', 1),
(1430, 412, 275, '0', '2015-04-20 17:38:41', 1),
(1431, 413, 275, '0', '2015-04-20 17:38:41', 1),
(1432, 419, 275, '0', '2015-04-20 17:38:41', 1),
(1433, 449, 275, '0', '2015-04-20 17:38:41', 1),
(1434, 455, 275, '0', '2015-04-20 17:38:41', 1),
(1435, 481, 275, '0', '2015-04-20 17:38:41', 1),
(1436, 461, 275, '0', '2015-04-20 17:38:41', 1),
(1437, 482, 275, '0', '2015-04-20 17:38:41', 1),
(1438, 483, 275, '0', '2015-04-20 17:38:41', 1),
(1439, 484, 275, '0', '2015-04-20 17:38:41', 1),
(1440, 485, 275, '0', '2015-04-20 17:38:41', 1),
(1441, 486, 275, '0', '2015-04-20 17:38:41', 1),
(1442, 460, 275, '0', '2015-04-20 17:38:41', 1),
(1443, 414, 275, '0', '2015-04-20 17:38:41', 1),
(1444, 415, 275, '0', '2015-04-20 17:38:41', 1),
(1445, 416, 275, '0', '2015-04-20 17:38:41', 1),
(1446, 403, 300, '0', '2015-04-20 17:38:51', 1),
(1447, 404, 300, '0', '2015-04-20 17:38:51', 1),
(1448, 405, 300, '0', '2015-04-20 17:38:51', 1),
(1449, 406, 300, '0', '2015-04-20 17:38:51', 1),
(1450, 407, 300, '0', '2015-04-20 17:38:51', 1),
(1451, 408, 300, '0', '2015-04-20 17:38:51', 1),
(1452, 409, 300, '0', '2015-04-20 17:38:51', 1),
(1453, 410, 300, '0', '2015-04-20 17:38:51', 1),
(1454, 411, 300, '0', '2015-04-20 17:38:51', 1),
(1455, 412, 300, '0', '2015-04-20 17:38:51', 1),
(1456, 413, 300, '0', '2015-04-20 17:38:51', 1),
(1457, 419, 300, '0', '2015-04-20 17:38:51', 1),
(1458, 421, 300, '0', '2015-04-20 17:38:51', 1),
(1459, 449, 300, '0', '2015-04-20 17:38:51', 1),
(1460, 447, 300, '0', '2015-04-20 17:38:51', 1),
(1461, 414, 300, '0', '2015-04-20 17:38:51', 1),
(1462, 415, 300, '0', '2015-04-20 17:38:51', 1),
(1463, 416, 300, '0', '2015-04-20 17:38:51', 1),
(1464, 417, 279, '0', '2015-04-20 17:39:22', 1),
(1465, 418, 279, '0', '2015-04-20 17:39:22', 1),
(1466, 403, 279, '0', '2015-04-20 17:39:22', 1),
(1467, 404, 279, '0', '2015-04-20 17:39:22', 1),
(1468, 405, 279, '0', '2015-04-20 17:39:22', 1),
(1469, 406, 279, '0', '2015-04-20 17:39:22', 1),
(1470, 407, 279, '0', '2015-04-20 17:39:22', 1),
(1471, 408, 279, '0', '2015-04-20 17:39:22', 1),
(1472, 409, 279, '0', '2015-04-20 17:39:22', 1),
(1473, 410, 279, '0', '2015-04-20 17:39:22', 1),
(1474, 411, 279, '0', '2015-04-20 17:39:22', 1),
(1475, 412, 279, '0', '2015-04-20 17:39:22', 1),
(1476, 413, 279, '0', '2015-04-20 17:39:22', 1),
(1477, 419, 279, '0', '2015-04-20 17:39:22', 1),
(1478, 451, 279, '0', '2015-04-20 17:39:22', 1),
(1479, 454, 279, '0', '2015-04-20 17:39:22', 1),
(1480, 455, 279, '0', '2015-04-20 17:39:22', 1),
(1481, 456, 279, '0', '2015-04-20 17:39:22', 1),
(1482, 461, 279, '0', '2015-04-20 17:39:22', 1),
(1483, 457, 279, '0', '2015-04-20 17:39:22', 1),
(1484, 471, 279, '0', '2015-04-20 17:39:22', 1),
(1485, 460, 279, '0', '2015-04-20 17:39:22', 1),
(1486, 511, 279, '0', '2015-04-20 17:39:22', 1),
(1487, 422, 279, '0', '2015-04-20 17:39:22', 1),
(1488, 414, 279, '0', '2015-04-20 17:39:22', 1),
(1489, 415, 279, '0', '2015-04-20 17:39:22', 1),
(1490, 416, 279, '0', '2015-04-20 17:39:22', 1),
(1491, 403, 301, '0', '2015-04-20 17:39:26', 1),
(1492, 404, 301, '0', '2015-04-20 17:39:26', 1),
(1493, 405, 301, '0', '2015-04-20 17:39:26', 1),
(1494, 406, 301, '0', '2015-04-20 17:39:26', 1),
(1495, 407, 301, '0', '2015-04-20 17:39:26', 1),
(1496, 408, 301, '0', '2015-04-20 17:39:26', 1),
(1497, 409, 301, '0', '2015-04-20 17:39:26', 1),
(1498, 410, 301, '0', '2015-04-20 17:39:26', 1),
(1499, 411, 301, '0', '2015-04-20 17:39:26', 1),
(1500, 412, 301, '0', '2015-04-20 17:39:26', 1),
(1501, 413, 301, '0', '2015-04-20 17:39:26', 1),
(1502, 419, 301, '0', '2015-04-20 17:39:26', 1),
(1503, 421, 301, '0', '2015-04-20 17:39:26', 1),
(1504, 451, 301, '0', '2015-04-20 17:39:26', 1),
(1505, 414, 301, '0', '2015-04-20 17:39:26', 1),
(1506, 415, 301, '0', '2015-04-20 17:39:26', 1),
(1507, 416, 301, '0', '2015-04-20 17:39:26', 1),
(1508, 402, 302, '0', '2015-04-21 09:59:50', 1),
(1509, 417, 303, '0', '2015-04-21 10:12:53', 1),
(1510, 418, 303, '0', '2015-04-21 10:12:53', 1),
(1511, 403, 303, '0', '2015-04-21 10:12:53', 1),
(1512, 404, 303, '0', '2015-04-21 10:12:53', 1),
(1513, 405, 303, '0', '2015-04-21 10:12:53', 1),
(1514, 406, 303, '0', '2015-04-21 10:12:53', 1),
(1515, 407, 303, '0', '2015-04-21 10:12:53', 1),
(1516, 408, 303, '0', '2015-04-21 10:12:53', 1),
(1517, 409, 303, '0', '2015-04-21 10:12:53', 1),
(1518, 410, 303, '0', '2015-04-21 10:12:53', 1),
(1519, 411, 303, '0', '2015-04-21 10:12:53', 1),
(1520, 412, 303, '0', '2015-04-21 10:12:53', 1),
(1521, 413, 303, '0', '2015-04-21 10:12:53', 1),
(1522, 419, 303, '0', '2015-04-21 10:12:53', 1),
(1523, 448, 303, '0', '2015-04-21 10:12:53', 1),
(1524, 454, 303, '0', '2015-04-21 10:12:53', 1),
(1525, 455, 303, '0', '2015-04-21 10:12:53', 1),
(1526, 456, 303, '0', '2015-04-21 10:12:53', 1),
(1527, 461, 303, '0', '2015-04-21 10:12:53', 1),
(1528, 462, 303, '0', '2015-04-21 10:12:53', 1),
(1529, 463, 303, '0', '2015-04-21 10:12:53', 1),
(1530, 457, 303, '0', '2015-04-21 10:12:53', 1),
(1531, 459, 303, '0', '2015-04-21 10:12:53', 1),
(1532, 422, 303, '0', '2015-04-21 10:12:53', 1),
(1533, 414, 303, '0', '2015-04-21 10:12:53', 1),
(1534, 415, 303, '0', '2015-04-21 10:12:53', 1),
(1535, 416, 303, '0', '2015-04-21 10:12:53', 1),
(1536, 403, 304, '0', '2015-04-21 10:15:29', 1),
(1537, 404, 304, '0', '2015-04-21 10:15:29', 1),
(1538, 405, 304, '0', '2015-04-21 10:15:29', 1),
(1539, 406, 304, '0', '2015-04-21 10:15:29', 1),
(1540, 407, 304, '0', '2015-04-21 10:15:29', 1),
(1541, 408, 304, '0', '2015-04-21 10:15:29', 1),
(1542, 409, 304, '0', '2015-04-21 10:15:29', 1),
(1543, 410, 304, '0', '2015-04-21 10:15:29', 1),
(1544, 411, 304, '0', '2015-04-21 10:15:29', 1),
(1545, 412, 304, '0', '2015-04-21 10:15:29', 1),
(1546, 413, 304, '0', '2015-04-21 10:15:29', 1),
(1547, 419, 304, '0', '2015-04-21 10:15:29', 1),
(1548, 420, 304, '0', '2015-04-21 10:15:29', 1),
(1549, 512, 304, '0', '2015-04-21 10:15:29', 1),
(1550, 414, 304, '0', '2015-04-21 10:15:29', 1),
(1551, 415, 304, '0', '2015-04-21 10:15:29', 1),
(1552, 416, 304, '0', '2015-04-21 10:15:29', 1),
(1553, 402, 249, '0', '2015-04-21 10:17:49', 1),
(1554, 513, 304, '0', '2015-04-22 01:39:25', 1),
(1555, 514, 304, '0', '2015-04-22 01:43:27', 1),
(1556, 515, 304, '0', '2015-04-22 01:43:41', 1),
(1557, 402, 305, '0', '2015-04-22 01:59:56', 1),
(1558, 516, 285, '0', '2015-04-22 02:00:34', 1),
(1559, 403, 278, '0', '2015-04-22 02:12:26', 1),
(1560, 404, 278, '0', '2015-04-22 02:12:26', 1),
(1561, 405, 278, '0', '2015-04-22 02:12:26', 1),
(1562, 406, 278, '0', '2015-04-22 02:12:26', 1),
(1563, 407, 278, '0', '2015-04-22 02:12:26', 1),
(1564, 408, 278, '0', '2015-04-22 02:12:26', 1),
(1565, 409, 278, '0', '2015-04-22 02:12:26', 1),
(1566, 426, 278, '0', '2015-04-22 02:12:26', 1),
(1567, 427, 278, '0', '2015-04-22 02:12:26', 1),
(1568, 428, 278, '0', '2015-04-22 02:12:26', 1),
(1569, 429, 278, '0', '2015-04-22 02:12:26', 1),
(1570, 430, 278, '0', '2015-04-22 02:12:26', 1),
(1571, 431, 278, '0', '2015-04-22 02:12:26', 1),
(1572, 432, 278, '0', '2015-04-22 02:12:26', 1),
(1573, 433, 278, '0', '2015-04-22 02:12:26', 1),
(1574, 419, 278, '0', '2015-04-22 02:12:26', 1),
(1575, 421, 278, '0', '2015-04-22 02:12:26', 1),
(1576, 414, 278, '0', '2015-04-22 02:12:26', 1),
(1577, 415, 278, '0', '2015-04-22 02:12:27', 1),
(1578, 416, 278, '0', '2015-04-22 02:12:27', 1),
(1579, 402, 306, '0', '2015-04-22 02:19:05', 1),
(1580, 517, 304, '0', '2015-04-22 13:49:34', 1),
(1581, 518, 304, '0', '2015-04-22 13:58:53', 1),
(1582, 519, 304, '0', '2015-04-22 13:59:24', 1),
(1583, 520, 304, '0', '2015-04-22 13:59:31', 1),
(1584, 521, 304, '0', '2015-04-22 14:00:03', 1),
(1585, 522, 304, '0', '2015-04-22 14:03:23', 1),
(1586, 523, 304, '0', '2015-04-22 14:03:58', 1),
(1587, 524, 304, '0', '2015-04-22 14:04:08', 1),
(1588, 525, 304, '0', '2015-04-22 14:04:50', 1),
(1589, 526, 304, '0', '2015-04-22 14:05:00', 1),
(1590, 527, 304, '0', '2015-04-22 14:05:40', 1),
(1591, 402, 307, '0', '2015-04-22 14:05:53', 1),
(1592, 528, 304, '0', '2015-04-22 14:10:52', 1),
(1593, 402, 304, '0', '2015-04-22 14:10:52', 1),
(1594, 402, 273, '0', '2015-04-22 14:12:05', 1),
(1595, 516, 273, '0', '2015-04-22 14:25:45', 1),
(1596, 463, 273, '0', '2015-04-22 14:26:50', 1),
(1597, 529, 249, '0', '2015-04-22 15:11:55', 1),
(1598, 439, 288, '0', '2015-04-22 15:13:39', 1),
(1599, 530, 304, '0', '2015-04-22 15:18:32', 1),
(1600, 403, 308, '0', '2015-04-22 15:22:37', 1),
(1601, 404, 308, '0', '2015-04-22 15:22:37', 1),
(1602, 405, 308, '0', '2015-04-22 15:22:37', 1),
(1603, 406, 308, '0', '2015-04-22 15:22:37', 1),
(1604, 407, 308, '0', '2015-04-22 15:22:37', 1),
(1605, 408, 308, '0', '2015-04-22 15:22:37', 1),
(1606, 409, 308, '0', '2015-04-22 15:22:37', 1),
(1607, 410, 308, '0', '2015-04-22 15:22:37', 1),
(1608, 411, 308, '0', '2015-04-22 15:22:37', 1),
(1609, 412, 308, '0', '2015-04-22 15:22:37', 1),
(1610, 413, 308, '0', '2015-04-22 15:22:37', 1),
(1611, 419, 308, '0', '2015-04-22 15:22:37', 1),
(1612, 420, 308, '0', '2015-04-22 15:22:37', 1),
(1613, 531, 308, '0', '2015-04-22 15:22:37', 1),
(1614, 414, 308, '0', '2015-04-22 15:22:37', 1),
(1615, 415, 308, '0', '2015-04-22 15:22:37', 1),
(1616, 416, 308, '0', '2015-04-22 15:22:37', 1),
(1617, 532, 308, '0', '2015-04-22 15:23:31', 1),
(1618, 403, 309, '0', '2015-04-23 15:45:09', 1),
(1619, 404, 309, '0', '2015-04-23 15:45:09', 1),
(1620, 405, 309, '0', '2015-04-23 15:45:09', 1),
(1621, 406, 309, '0', '2015-04-23 15:45:09', 1),
(1622, 407, 309, '0', '2015-04-23 15:45:09', 1),
(1623, 408, 309, '0', '2015-04-23 15:45:09', 1),
(1624, 409, 309, '0', '2015-04-23 15:45:09', 1),
(1625, 410, 309, '0', '2015-04-23 15:45:09', 1),
(1626, 411, 309, '0', '2015-04-23 15:45:10', 1),
(1627, 412, 309, '0', '2015-04-23 15:45:10', 1),
(1628, 413, 309, '0', '2015-04-23 15:45:10', 1),
(1629, 419, 309, '0', '2015-04-23 15:45:10', 1),
(1630, 421, 309, '0', '2015-04-23 15:45:10', 1),
(1631, 444, 309, '0', '2015-04-23 15:45:10', 1),
(1632, 454, 309, '0', '2015-04-23 15:45:10', 1),
(1633, 455, 309, '0', '2015-04-23 15:45:10', 1),
(1634, 456, 309, '0', '2015-04-23 15:45:10', 1),
(1635, 490, 309, '0', '2015-04-23 15:45:10', 1),
(1636, 462, 309, '0', '2015-04-23 15:45:10', 1),
(1637, 488, 309, '0', '2015-04-23 15:45:10', 1),
(1638, 463, 309, '0', '2015-04-23 15:45:10', 1),
(1639, 516, 309, '0', '2015-04-23 15:45:10', 1),
(1640, 459, 309, '0', '2015-04-23 15:45:10', 1),
(1641, 414, 309, '0', '2015-04-23 15:45:10', 1),
(1642, 415, 309, '0', '2015-04-23 15:45:10', 1),
(1643, 416, 309, '0', '2015-04-23 15:45:10', 1),
(1644, 417, 309, '0', '2015-04-23 15:47:46', 1),
(1645, 418, 309, '0', '2015-04-23 15:47:46', 1),
(1646, 533, 242, '0', '2015-04-23 15:48:11', 1),
(1647, 534, 242, '0', '2015-04-23 15:48:11', 1),
(1648, 452, 310, '0', '2015-04-23 15:49:19', 1),
(1649, 453, 310, '0', '2015-04-23 15:49:19', 1),
(1650, 535, 266, '0', '2015-04-23 15:51:06', 1),
(1651, 417, 311, '0', '2015-04-23 16:01:01', 1),
(1652, 418, 311, '0', '2015-04-23 16:01:01', 1),
(1653, 403, 311, '0', '2015-04-23 16:01:01', 1),
(1654, 404, 311, '0', '2015-04-23 16:01:01', 1),
(1655, 405, 311, '0', '2015-04-23 16:01:01', 1),
(1656, 406, 311, '0', '2015-04-23 16:01:01', 1),
(1657, 407, 311, '0', '2015-04-23 16:01:01', 1),
(1658, 408, 311, '0', '2015-04-23 16:01:01', 1),
(1659, 409, 311, '0', '2015-04-23 16:01:01', 1),
(1660, 410, 311, '0', '2015-04-23 16:01:01', 1),
(1661, 411, 311, '0', '2015-04-23 16:01:01', 1),
(1662, 412, 311, '0', '2015-04-23 16:01:01', 1),
(1663, 413, 311, '0', '2015-04-23 16:01:01', 1),
(1664, 419, 311, '0', '2015-04-23 16:01:01', 1),
(1665, 536, 311, '0', '2015-04-23 16:01:01', 1),
(1666, 455, 311, '0', '2015-04-23 16:01:01', 1),
(1667, 506, 311, '0', '2015-04-23 16:01:01', 1),
(1668, 537, 311, '0', '2015-04-23 16:01:01', 1),
(1669, 460, 311, '0', '2015-04-23 16:01:01', 1),
(1670, 538, 311, '0', '2015-04-23 16:01:01', 1),
(1671, 414, 311, '0', '2015-04-23 16:01:01', 1),
(1672, 415, 311, '0', '2015-04-23 16:01:01', 1),
(1673, 416, 311, '0', '2015-04-23 16:01:01', 1),
(1674, 539, 283, '0', '2015-04-23 16:01:22', 1),
(1675, 417, 312, '0', '2015-04-23 16:12:10', 1),
(1676, 418, 312, '0', '2015-04-23 16:12:10', 1),
(1677, 403, 312, '0', '2015-04-23 16:12:11', 1),
(1678, 404, 312, '0', '2015-04-23 16:12:11', 1),
(1679, 405, 312, '0', '2015-04-23 16:12:11', 1),
(1680, 406, 312, '0', '2015-04-23 16:12:11', 1),
(1681, 407, 312, '0', '2015-04-23 16:12:11', 1),
(1682, 408, 312, '0', '2015-04-23 16:12:11', 1),
(1683, 409, 312, '0', '2015-04-23 16:12:11', 1),
(1684, 410, 312, '0', '2015-04-23 16:12:11', 1),
(1685, 411, 312, '0', '2015-04-23 16:12:11', 1),
(1686, 412, 312, '0', '2015-04-23 16:12:11', 1),
(1687, 413, 312, '0', '2015-04-23 16:12:11', 1),
(1688, 419, 312, '0', '2015-04-23 16:12:11', 1),
(1689, 540, 312, '0', '2015-04-23 16:12:11', 1),
(1690, 455, 312, '0', '2015-04-23 16:12:11', 1),
(1691, 506, 312, '0', '2015-04-23 16:12:11', 1),
(1692, 461, 312, '0', '2015-04-23 16:12:11', 1),
(1693, 541, 312, '0', '2015-04-23 16:12:11', 1),
(1694, 542, 312, '0', '2015-04-23 16:12:11', 1),
(1695, 460, 312, '0', '2015-04-23 16:12:11', 1),
(1696, 480, 312, '0', '2015-04-23 16:12:11', 1),
(1697, 414, 312, '0', '2015-04-23 16:12:11', 1),
(1698, 415, 312, '0', '2015-04-23 16:12:11', 1),
(1699, 416, 312, '0', '2015-04-23 16:12:11', 1),
(1700, 402, 313, '0', '2015-04-23 16:12:16', 1),
(1701, 403, 313, '0', '2015-04-23 16:13:55', 1),
(1702, 404, 313, '0', '2015-04-23 16:13:55', 1),
(1703, 405, 313, '0', '2015-04-23 16:13:55', 1),
(1704, 406, 313, '0', '2015-04-23 16:13:55', 1),
(1705, 407, 313, '0', '2015-04-23 16:13:55', 1),
(1706, 408, 313, '0', '2015-04-23 16:13:55', 1),
(1707, 409, 313, '0', '2015-04-23 16:13:56', 1),
(1708, 410, 313, '0', '2015-04-23 16:13:56', 1),
(1709, 411, 313, '0', '2015-04-23 16:13:56', 1),
(1710, 412, 313, '0', '2015-04-23 16:13:56', 1),
(1711, 413, 313, '0', '2015-04-23 16:13:56', 1),
(1712, 419, 313, '0', '2015-04-23 16:13:56', 1),
(1713, 420, 313, '0', '2015-04-23 16:13:56', 1),
(1714, 543, 313, '0', '2015-04-23 16:13:56', 1),
(1715, 414, 313, '0', '2015-04-23 16:13:56', 1),
(1716, 415, 313, '0', '2015-04-23 16:13:56', 1),
(1717, 416, 313, '0', '2015-04-23 16:13:56', 1),
(1718, 435, 250, '0', '2015-04-24 14:13:48', 1),
(1719, 544, 304, '0', '2015-04-24 14:21:33', 1),
(1720, 545, 304, '0', '2015-04-24 14:22:39', 1),
(1721, 546, 304, '0', '2015-04-24 14:23:00', 1),
(1722, 547, 304, '0', '2015-04-24 14:24:47', 1),
(1723, 548, 304, '0', '2015-04-24 14:26:55', 1),
(1724, 549, 304, '0', '2015-04-24 14:27:23', 1),
(1725, 550, 304, '0', '2015-04-24 14:28:07', 1),
(1726, 403, 276, '0', '2015-04-24 14:29:24', 1),
(1727, 404, 276, '0', '2015-04-24 14:29:24', 1),
(1728, 405, 276, '0', '2015-04-24 14:29:24', 1),
(1729, 406, 276, '0', '2015-04-24 14:29:24', 1),
(1730, 407, 276, '0', '2015-04-24 14:29:24', 1),
(1731, 408, 276, '0', '2015-04-24 14:29:24', 1),
(1732, 409, 276, '0', '2015-04-24 14:29:24', 1),
(1733, 410, 276, '0', '2015-04-24 14:29:24', 1),
(1734, 411, 276, '0', '2015-04-24 14:29:24', 1),
(1735, 412, 276, '0', '2015-04-24 14:29:24', 1),
(1736, 413, 276, '0', '2015-04-24 14:29:24', 1),
(1737, 419, 276, '0', '2015-04-24 14:29:24', 1),
(1738, 420, 276, '0', '2015-04-24 14:29:24', 1),
(1739, 450, 276, '0', '2015-04-24 14:29:24', 1),
(1740, 414, 276, '0', '2015-04-24 14:29:24', 1),
(1741, 415, 276, '0', '2015-04-24 14:29:24', 1),
(1742, 416, 276, '0', '2015-04-24 14:29:24', 1),
(1743, 439, 265, '0', '2015-04-24 14:37:46', 1),
(1744, 403, 314, '0', '2015-04-24 14:44:24', 1),
(1745, 404, 314, '0', '2015-04-24 14:44:24', 1),
(1746, 405, 314, '0', '2015-04-24 14:44:24', 1),
(1747, 406, 314, '0', '2015-04-24 14:44:24', 1),
(1748, 407, 314, '0', '2015-04-24 14:44:24', 1),
(1749, 408, 314, '0', '2015-04-24 14:44:24', 1),
(1750, 409, 314, '0', '2015-04-24 14:44:24', 1),
(1751, 410, 314, '0', '2015-04-24 14:44:24', 1),
(1752, 411, 314, '0', '2015-04-24 14:44:24', 1),
(1753, 412, 314, '0', '2015-04-24 14:44:24', 1),
(1754, 413, 314, '0', '2015-04-24 14:44:24', 1),
(1755, 419, 314, '0', '2015-04-24 14:44:24', 1),
(1756, 420, 314, '0', '2015-04-24 14:44:24', 1),
(1757, 551, 314, '0', '2015-04-24 14:44:24', 1),
(1758, 414, 314, '0', '2015-04-24 14:44:24', 1),
(1759, 415, 314, '0', '2015-04-24 14:44:24', 1),
(1760, 416, 314, '0', '2015-04-24 14:44:24', 1),
(1761, 552, 315, '0', '2015-04-24 14:44:35', 1),
(1762, 417, 316, '0', '2015-04-27 14:50:33', 1),
(1763, 418, 316, '0', '2015-04-27 14:50:33', 1),
(1764, 553, 314, '0', '2015-05-01 12:29:31', 1),
(1765, 452, 317, '0', '2015-05-01 12:32:04', 1),
(1766, 453, 317, '0', '2015-05-01 12:32:04', 1),
(1767, 528, 266, '0', '2015-05-01 13:10:44', 1),
(1768, 402, 266, '0', '2015-05-01 13:10:44', 1),
(1769, 554, 266, '0', '2015-05-01 15:19:27', 1),
(1770, 402, 269, '0', '2015-05-01 16:54:02', 1),
(1771, 555, 314, '0', '2015-05-02 02:33:24', 1),
(1772, 556, 314, '0', '2015-05-02 02:39:24', 1),
(1773, 414, 289, '0', '2015-05-02 02:46:23', 1),
(1774, 415, 289, '0', '2015-05-02 02:46:23', 1),
(1775, 416, 289, '0', '2015-05-02 02:46:23', 1),
(1776, 557, 242, '0', '2015-05-02 03:11:56', 1),
(1777, 558, 251, '0', '2015-05-02 03:37:57', 1),
(1778, 417, 272, '0', '2015-05-02 03:39:47', 1),
(1779, 418, 272, '0', '2015-05-02 03:39:47', 1),
(1780, 403, 272, '0', '2015-05-02 03:39:47', 1),
(1781, 404, 272, '0', '2015-05-02 03:39:47', 1),
(1782, 405, 272, '0', '2015-05-02 03:39:47', 1),
(1783, 406, 272, '0', '2015-05-02 03:39:47', 1),
(1784, 407, 272, '0', '2015-05-02 03:39:47', 1),
(1785, 408, 272, '0', '2015-05-02 03:39:47', 1),
(1786, 409, 272, '0', '2015-05-02 03:39:47', 1),
(1787, 410, 272, '0', '2015-05-02 03:39:47', 1),
(1788, 411, 272, '0', '2015-05-02 03:39:47', 1),
(1789, 412, 272, '0', '2015-05-02 03:39:47', 1),
(1790, 413, 272, '0', '2015-05-02 03:39:47', 1),
(1791, 419, 272, '0', '2015-05-02 03:39:47', 1),
(1792, 443, 272, '0', '2015-05-02 03:39:47', 1),
(1793, 454, 272, '0', '2015-05-02 03:39:47', 1),
(1794, 498, 272, '0', '2015-05-02 03:39:47', 1),
(1795, 506, 272, '0', '2015-05-02 03:39:47', 1),
(1796, 461, 272, '0', '2015-05-02 03:39:47', 1),
(1797, 480, 272, '0', '2015-05-02 03:39:47', 1),
(1798, 414, 272, '0', '2015-05-02 03:39:47', 1),
(1799, 415, 272, '0', '2015-05-02 03:39:47', 1),
(1800, 416, 272, '0', '2015-05-02 03:39:47', 1),
(1801, 403, 318, '0', '2015-05-02 03:39:50', 1),
(1802, 404, 318, '0', '2015-05-02 03:39:50', 1),
(1803, 405, 318, '0', '2015-05-02 03:39:50', 1),
(1804, 406, 318, '0', '2015-05-02 03:39:50', 1),
(1805, 407, 318, '0', '2015-05-02 03:39:50', 1),
(1806, 408, 318, '0', '2015-05-02 03:39:50', 1),
(1807, 409, 318, '0', '2015-05-02 03:39:50', 1),
(1808, 410, 318, '0', '2015-05-02 03:39:50', 1),
(1809, 411, 318, '0', '2015-05-02 03:39:50', 1),
(1810, 412, 318, '0', '2015-05-02 03:39:50', 1),
(1811, 413, 318, '0', '2015-05-02 03:39:50', 1),
(1812, 419, 318, '0', '2015-05-02 03:39:50', 1),
(1813, 420, 318, '0', '2015-05-02 03:39:50', 1),
(1814, 414, 318, '0', '2015-05-02 03:39:50', 1),
(1815, 415, 318, '0', '2015-05-02 03:39:50', 1),
(1816, 416, 318, '0', '2015-05-02 03:39:50', 1),
(1817, 403, 319, '0', '2015-05-02 03:44:08', 1),
(1818, 404, 319, '0', '2015-05-02 03:44:08', 1),
(1819, 405, 319, '0', '2015-05-02 03:44:08', 1),
(1820, 406, 319, '0', '2015-05-02 03:44:08', 1),
(1821, 407, 319, '0', '2015-05-02 03:44:08', 1),
(1822, 408, 319, '0', '2015-05-02 03:44:08', 1),
(1823, 409, 319, '0', '2015-05-02 03:44:08', 1),
(1824, 410, 319, '0', '2015-05-02 03:44:08', 1),
(1825, 411, 319, '0', '2015-05-02 03:44:08', 1),
(1826, 412, 319, '0', '2015-05-02 03:44:08', 1),
(1827, 413, 319, '0', '2015-05-02 03:44:08', 1),
(1828, 419, 319, '0', '2015-05-02 03:44:08', 1),
(1829, 421, 319, '0', '2015-05-02 03:44:08', 1),
(1830, 443, 319, '0', '2015-05-02 03:44:08', 1),
(1831, 414, 319, '0', '2015-05-02 03:44:08', 1),
(1832, 415, 319, '0', '2015-05-02 03:44:08', 1),
(1833, 416, 319, '0', '2015-05-02 03:44:08', 1),
(1834, 421, 242, '0', '2015-05-02 04:17:40', 1),
(1835, 403, 320, '0', '2015-05-02 04:38:20', 1),
(1836, 404, 320, '0', '2015-05-02 04:38:20', 1),
(1837, 405, 320, '0', '2015-05-02 04:38:20', 1),
(1838, 406, 320, '0', '2015-05-02 04:38:20', 1),
(1839, 407, 320, '0', '2015-05-02 04:38:20', 1),
(1840, 408, 320, '0', '2015-05-02 04:38:20', 1),
(1841, 409, 320, '0', '2015-05-02 04:38:20', 1),
(1842, 410, 320, '0', '2015-05-02 04:38:20', 1),
(1843, 411, 320, '0', '2015-05-02 04:38:20', 1),
(1844, 412, 320, '0', '2015-05-02 04:38:20', 1),
(1845, 413, 320, '0', '2015-05-02 04:38:20', 1),
(1846, 419, 320, '0', '2015-05-02 04:38:20', 1),
(1847, 421, 320, '0', '2015-05-02 04:38:20', 1),
(1848, 414, 320, '0', '2015-05-02 04:38:20', 1),
(1849, 415, 320, '0', '2015-05-02 04:38:20', 1),
(1850, 416, 320, '0', '2015-05-02 04:38:20', 1),
(1851, 403, 321, '0', '2015-05-02 04:38:56', 1),
(1852, 404, 321, '0', '2015-05-02 04:38:56', 1),
(1853, 405, 321, '0', '2015-05-02 04:38:56', 1),
(1854, 406, 321, '0', '2015-05-02 04:38:56', 1),
(1855, 407, 321, '0', '2015-05-02 04:38:56', 1);
INSERT INTO `{prefix}linkeddata_tpl_mark` (`id`, `item_id`, `rel_id`, `extend`, `create_time`, `author`) VALUES
(1856, 408, 321, '0', '2015-05-02 04:38:56', 1),
(1857, 409, 321, '0', '2015-05-02 04:38:56', 1),
(1858, 410, 321, '0', '2015-05-02 04:38:56', 1),
(1859, 411, 321, '0', '2015-05-02 04:38:56', 1),
(1860, 412, 321, '0', '2015-05-02 04:38:56', 1),
(1861, 413, 321, '0', '2015-05-02 04:38:56', 1),
(1862, 419, 321, '0', '2015-05-02 04:38:56', 1),
(1863, 421, 321, '0', '2015-05-02 04:38:56', 1),
(1864, 503, 321, '0', '2015-05-02 04:38:56', 1),
(1865, 414, 321, '0', '2015-05-02 04:38:56', 1),
(1866, 415, 321, '0', '2015-05-02 04:38:56', 1),
(1867, 416, 321, '0', '2015-05-02 04:38:56', 1),
(1868, 410, 252, '0', '2015-05-02 04:40:29', 1),
(1869, 411, 252, '0', '2015-05-02 04:40:29', 1),
(1870, 412, 252, '0', '2015-05-02 04:40:29', 1),
(1871, 413, 252, '0', '2015-05-02 04:40:29', 1),
(1872, 449, 274, '0', '2015-05-02 04:44:40', 1),
(1873, 449, 278, '0', '2015-05-02 04:44:43', 1),
(1874, 558, 290, '0', '2015-05-02 04:49:12', 1),
(1875, 417, 259, '0', '2015-05-02 04:59:52', 1),
(1876, 418, 259, '0', '2015-05-02 04:59:52', 1),
(1877, 403, 259, '0', '2015-05-02 04:59:52', 1),
(1878, 404, 259, '0', '2015-05-02 04:59:52', 1),
(1879, 405, 259, '0', '2015-05-02 04:59:52', 1),
(1880, 406, 259, '0', '2015-05-02 04:59:52', 1),
(1881, 407, 259, '0', '2015-05-02 04:59:52', 1),
(1882, 408, 259, '0', '2015-05-02 04:59:52', 1),
(1883, 409, 259, '0', '2015-05-02 04:59:52', 1),
(1884, 410, 259, '0', '2015-05-02 04:59:52', 1),
(1885, 411, 259, '0', '2015-05-02 04:59:52', 1),
(1886, 412, 259, '0', '2015-05-02 04:59:52', 1),
(1887, 413, 259, '0', '2015-05-02 04:59:52', 1),
(1888, 419, 259, '0', '2015-05-02 04:59:52', 1),
(1889, 559, 259, '0', '2015-05-02 04:59:52', 1),
(1890, 455, 259, '0', '2015-05-02 04:59:52', 1),
(1891, 461, 259, '0', '2015-05-02 04:59:52', 1),
(1892, 459, 259, '0', '2015-05-02 04:59:52', 1),
(1893, 414, 259, '0', '2015-05-02 04:59:52', 1),
(1894, 415, 259, '0', '2015-05-02 04:59:52', 1),
(1895, 416, 259, '0', '2015-05-02 04:59:52', 1),
(1896, 403, 262, '0', '2015-05-02 05:00:03', 1),
(1897, 404, 262, '0', '2015-05-02 05:00:03', 1),
(1898, 405, 262, '0', '2015-05-02 05:00:03', 1),
(1899, 406, 262, '0', '2015-05-02 05:00:03', 1),
(1900, 407, 262, '0', '2015-05-02 05:00:03', 1),
(1901, 408, 262, '0', '2015-05-02 05:00:03', 1),
(1902, 409, 262, '0', '2015-05-02 05:00:03', 1),
(1903, 410, 262, '0', '2015-05-02 05:00:03', 1),
(1904, 411, 262, '0', '2015-05-02 05:00:03', 1),
(1905, 412, 262, '0', '2015-05-02 05:00:03', 1),
(1906, 413, 262, '0', '2015-05-02 05:00:03', 1),
(1907, 419, 262, '0', '2015-05-02 05:00:03', 1),
(1908, 420, 262, '0', '2015-05-02 05:00:03', 1),
(1909, 414, 262, '0', '2015-05-02 05:00:03', 1),
(1910, 415, 262, '0', '2015-05-02 05:00:03', 1),
(1911, 416, 262, '0', '2015-05-02 05:00:03', 1),
(1912, 560, 322, '0', '2015-05-02 05:00:14', 1),
(1913, 561, 244, '0', '2015-05-02 05:06:31', 1),
(1914, 561, 264, '0', '2015-05-02 05:07:14', 1),
(1915, 561, 242, '0', '2015-05-02 05:07:24', 1),
(1916, 561, 273, '0', '2015-05-02 05:07:26', 1),
(1917, 561, 251, '0', '2015-05-02 05:07:30', 1),
(1918, 562, 323, '0', '2015-05-02 09:11:30', 1),
(1919, 563, 323, '0', '2015-05-02 09:21:13', 1),
(1920, 564, 323, '0', '2015-05-02 09:21:13', 1),
(1921, 565, 323, '0', '2015-05-02 09:21:13', 1),
(1922, 566, 323, '0', '2015-05-02 09:23:37', 1),
(1923, 562, 324, '0', '2015-05-02 09:32:01', 1),
(1924, 566, 324, '0', '2015-05-02 09:32:01', 1),
(1925, 563, 324, '0', '2015-05-02 09:32:01', 1),
(1926, 564, 324, '0', '2015-05-02 09:32:01', 1),
(1927, 565, 324, '0', '2015-05-02 09:32:01', 1),
(1928, 562, 325, '0', '2015-05-02 10:19:18', 1),
(1929, 566, 325, '0', '2015-05-02 10:19:18', 1),
(1930, 563, 325, '0', '2015-05-02 10:19:18', 1),
(1931, 564, 325, '0', '2015-05-02 10:19:18', 1),
(1932, 565, 325, '0', '2015-05-02 10:19:18', 1),
(1933, 562, 326, '0', '2015-05-02 10:37:13', 1),
(1934, 566, 326, '0', '2015-05-02 10:37:13', 1),
(1935, 563, 326, '0', '2015-05-02 10:37:13', 1),
(1936, 564, 326, '0', '2015-05-02 10:37:13', 1),
(1937, 565, 326, '0', '2015-05-02 10:37:13', 1),
(1938, 560, 325, '0', '2015-05-02 14:02:24', 1),
(1939, 402, 325, '0', '2015-05-02 14:02:24', 1),
(1940, 562, 327, '0', '2015-05-02 14:15:21', 1),
(1941, 566, 327, '0', '2015-05-02 14:15:21', 1),
(1942, 563, 327, '0', '2015-05-02 14:15:21', 1),
(1943, 564, 327, '0', '2015-05-02 14:15:21', 1),
(1944, 565, 327, '0', '2015-05-02 14:15:21', 1),
(1945, 562, 328, '0', '2015-05-02 14:20:37', 1),
(1946, 566, 328, '0', '2015-05-02 14:20:37', 1),
(1947, 563, 328, '0', '2015-05-02 14:20:37', 1),
(1948, 564, 328, '0', '2015-05-02 14:20:37', 1),
(1949, 565, 328, '0', '2015-05-02 14:20:37', 1),
(1950, 562, 329, '0', '2015-05-02 14:34:37', 1),
(1951, 566, 329, '0', '2015-05-02 14:34:37', 1),
(1952, 563, 329, '0', '2015-05-02 14:34:37', 1),
(1953, 564, 329, '0', '2015-05-02 14:34:37', 1),
(1954, 565, 329, '0', '2015-05-02 14:34:37', 1),
(1955, 403, 330, '0', '2015-05-02 14:44:19', 1),
(1956, 404, 330, '0', '2015-05-02 14:44:19', 1),
(1957, 405, 330, '0', '2015-05-02 14:44:19', 1),
(1958, 406, 330, '0', '2015-05-02 14:44:19', 1),
(1959, 407, 330, '0', '2015-05-02 14:44:19', 1),
(1960, 408, 330, '0', '2015-05-02 14:44:19', 1),
(1961, 409, 330, '0', '2015-05-02 14:44:19', 1),
(1962, 410, 330, '0', '2015-05-02 14:44:19', 1),
(1963, 561, 330, '0', '2015-05-02 14:44:19', 1),
(1964, 411, 330, '0', '2015-05-02 14:44:19', 1),
(1965, 412, 330, '0', '2015-05-02 14:44:19', 1),
(1966, 413, 330, '0', '2015-05-02 14:44:19', 1),
(1967, 419, 330, '0', '2015-05-02 14:44:19', 1),
(1968, 421, 330, '0', '2015-05-02 14:44:19', 1),
(1969, 567, 330, '0', '2015-05-02 14:44:19', 1),
(1970, 455, 330, '0', '2015-05-02 14:44:19', 1),
(1971, 491, 330, '0', '2015-05-02 14:44:19', 1),
(1972, 461, 330, '0', '2015-05-02 14:44:19', 1),
(1973, 492, 330, '0', '2015-05-02 14:44:19', 1),
(1974, 568, 330, '0', '2015-05-02 14:44:19', 1),
(1975, 493, 330, '0', '2015-05-02 14:44:19', 1),
(1976, 569, 330, '0', '2015-05-02 14:44:19', 1),
(1977, 414, 330, '0', '2015-05-02 14:44:19', 1),
(1978, 415, 330, '0', '2015-05-02 14:44:20', 1),
(1979, 416, 330, '0', '2015-05-02 14:44:20', 1),
(1980, 403, 331, '0', '2015-05-02 14:44:25', 1),
(1981, 404, 331, '0', '2015-05-02 14:44:25', 1),
(1982, 405, 331, '0', '2015-05-02 14:44:25', 1),
(1983, 406, 331, '0', '2015-05-02 14:44:25', 1),
(1984, 407, 331, '0', '2015-05-02 14:44:25', 1),
(1985, 408, 331, '0', '2015-05-02 14:44:25', 1),
(1986, 409, 331, '0', '2015-05-02 14:44:25', 1),
(1987, 410, 331, '0', '2015-05-02 14:44:25', 1),
(1988, 561, 331, '0', '2015-05-02 14:44:26', 1),
(1989, 411, 331, '0', '2015-05-02 14:44:26', 1),
(1990, 412, 331, '0', '2015-05-02 14:44:26', 1),
(1991, 413, 331, '0', '2015-05-02 14:44:26', 1),
(1992, 419, 331, '0', '2015-05-02 14:44:26', 1),
(1993, 421, 331, '0', '2015-05-02 14:44:26', 1),
(1994, 567, 331, '0', '2015-05-02 14:44:26', 1),
(1995, 414, 331, '0', '2015-05-02 14:44:26', 1),
(1996, 415, 331, '0', '2015-05-02 14:44:26', 1),
(1997, 416, 331, '0', '2015-05-02 14:44:26', 1),
(1998, 570, 330, '0', '2015-05-03 02:29:00', 1),
(1999, 571, 330, '0', '2015-05-03 02:29:00', 1),
(2000, 423, 332, '0', '2015-05-03 02:30:05', 1),
(2001, 402, 332, '0', '2015-05-03 02:30:05', 1),
(2002, 417, 330, '0', '2015-05-03 03:29:10', 1),
(2003, 418, 330, '0', '2015-05-03 03:29:10', 1),
(2004, 561, 289, '0', '2015-05-03 03:46:20', 1),
(2005, 403, 333, '0', '2015-05-03 05:29:32', 1),
(2006, 404, 333, '0', '2015-05-03 05:29:32', 1),
(2007, 405, 333, '0', '2015-05-03 05:29:32', 1),
(2008, 406, 333, '0', '2015-05-03 05:29:32', 1),
(2009, 407, 333, '0', '2015-05-03 05:29:32', 1),
(2010, 408, 333, '0', '2015-05-03 05:29:32', 1),
(2011, 409, 333, '0', '2015-05-03 05:29:32', 1),
(2012, 410, 333, '0', '2015-05-03 05:29:32', 1),
(2013, 561, 333, '0', '2015-05-03 05:29:32', 1),
(2014, 411, 333, '0', '2015-05-03 05:29:32', 1),
(2015, 412, 333, '0', '2015-05-03 05:29:32', 1),
(2016, 413, 333, '0', '2015-05-03 05:29:32', 1),
(2017, 419, 333, '0', '2015-05-03 05:29:32', 1),
(2018, 420, 333, '0', '2015-05-03 05:29:32', 1),
(2019, 414, 333, '0', '2015-05-03 05:29:32', 1),
(2020, 415, 333, '0', '2015-05-03 05:29:32', 1),
(2021, 416, 333, '0', '2015-05-03 05:29:32', 1);
--
-- 转存表中的数据 `{prefix}mark`
--
INSERT INTO `{prefix}mark` (`id`, `name`, `create_time`, `author`) VALUES
(402, '非法请求', '2015-04-06 13:30:10', 0),
(403, '后台管理平台', '2015-04-06 13:30:10', 0),
(404, '去网站', '2015-04-06 13:30:11', 0),
(405, '退出', '2015-04-06 13:30:11', 0),
(406, '您好', '2015-04-06 13:30:11', 0),
(407, '网站设置', '2015-04-06 13:30:11', 0),
(408, '个人设置', '2015-04-06 13:30:11', 0),
(409, '安全退出', '2015-04-06 13:30:11', 0),
(410, '用户', '2015-04-06 13:30:11', 0),
(411, '写邮件', '2015-04-06 13:30:11', 0),
(412, '数据库工具', '2015-04-06 13:30:11', 0),
(413, '系统用户', '2015-04-06 13:30:11', 0),
(414, '更换风格', '2015-04-06 13:30:11', 0),
(415, '固定顶端', '2015-04-06 13:30:11', 0),
(416, '固定菜单', '2015-04-06 13:30:11', 0),
(417, '上一页', '2015-04-06 13:30:14', 0),
(418, '下一页', '2015-04-06 13:30:14', 0),
(419, '内容', '2015-04-06 13:30:15', 0),
(420, '编辑', '2015-04-06 13:30:25', 0),
(421, '添加', '2015-04-06 13:30:39', 0),
(422, '没有图片', '2015-04-06 14:10:03', 0),
(423, '无效数字', '2015-04-06 14:10:15', 0),
(424, '字符长度不能小于', '2015-04-06 14:28:25', 0),
(425, '字符长度不能大于', '2015-04-06 14:31:40', 0),
(426, '分类', '2015-04-06 14:44:40', 0),
(427, '文章', '2015-04-06 14:44:40', 0),
(428, '会员', '2015-04-06 14:44:40', 0),
(429, '网站管理', '2015-04-06 14:44:40', 0),
(430, '控制面板', '2015-04-06 14:44:40', 0),
(431, '文件管理', '2015-04-06 14:44:40', 0),
(432, '系统管理', '2015-04-06 14:44:40', 0),
(433, '生成工具', '2015-04-06 14:44:40', 0),
(434, '编辑成功', '2015-04-06 14:48:21', 0),
(435, '用戶名或密碼不正確,請確認!', '2015-04-07 14:18:27', 0),
(436, '用户注册', '2015-04-12 14:38:19', 15),
(437, '基于ID:', '2015-04-19 02:36:40', 0),
(438, '基于ID:603', '2015-04-19 02:36:52', 0),
(439, '基于', '2015-04-19 02:37:39', 0),
(440, '且听风铃', '2015-04-19 04:47:01', 0),
(441, 'God Is An Astronaut LIVE,虽然我没有在现场,但我还是有必要!!!', '2015-04-19 05:37:34', 0),
(442, '分享配置', '2015-04-19 07:02:33', 0),
(443, '角色', '2015-04-19 09:28:22', 0),
(444, '导航菜单', '2015-04-19 09:31:38', 0),
(445, '字段配置格式不正确', '2015-04-19 09:44:18', 0),
(446, '模块工具', '2015-04-19 09:56:54', 0),
(447, 'NONE', '2015-04-19 10:19:09', 0),
(448, '综合分类', '2015-04-19 10:20:26', 0),
(449, '系统模块', '2015-04-19 10:21:50', 0),
(450, '友情链接', '2015-04-19 10:23:18', 0),
(451, '语言种类', '2015-04-19 10:58:22', 0),
(452, '操作不能为空', '2015-04-19 10:58:44', 0),
(453, '操作项目', '2015-04-19 10:58:45', 0),
(454, '排序', '2015-04-19 12:38:41', 0),
(455, 'ID', '2015-04-19 12:38:41', 0),
(456, '标题', '2015-04-19 12:38:41', 0),
(457, '图片', '2015-04-19 12:38:41', 0),
(458, '阅读数', '2015-04-19 12:38:41', 0),
(459, '语言', '2015-04-19 12:38:41', 0),
(460, '创建时间', '2015-04-19 12:38:42', 0),
(461, '标识', '2015-04-19 12:39:50', 0),
(462, '所属分类', '2015-04-19 12:39:50', 0),
(463, '内容简介', '2015-04-19 12:39:50', 15),
(464, '语言标识', '2015-04-19 12:41:13', 0),
(465, '网站名称', '2015-04-20 13:40:12', 0),
(466, '网站LOGO', '2015-04-20 13:40:12', 0),
(467, '网站负责人', '2015-04-20 13:40:12', 0),
(468, 'QQ号', '2015-04-20 13:40:12', 0),
(469, '邮箱地址', '2015-04-20 13:40:12', 0),
(470, '联系电话', '2015-04-20 13:40:13', 0),
(471, '默认', '2015-04-20 13:40:13', 0),
(472, '开放', '2015-04-20 13:40:13', 0),
(473, '九九话事', '2015-04-20 13:40:32', 0),
(474, '用户名', '2015-04-20 15:40:18', 0),
(475, '性别', '2015-04-20 15:40:19', 0),
(476, '所属角色', '2015-04-20 15:40:19', 0),
(477, '头像', '2015-04-20 15:40:20', 0),
(478, 'QQ', '2015-04-20 15:40:20', 0),
(479, '邮箱', '2015-04-20 15:40:21', 0),
(480, '维护员', '2015-04-20 15:40:21', 0),
(481, '中文名称', '2015-04-20 17:01:48', 0),
(482, '所属父类', '2015-04-20 17:01:49', 0),
(483, '描述', '2015-04-20 17:01:50', 0),
(484, '类型', '2015-04-20 17:01:50', 0),
(485, '形象图片', '2015-04-20 17:01:50', 0),
(486, '多语言', '2015-04-20 17:01:51', 0),
(487, '大图展示', '2015-04-20 17:04:43', 0),
(488, '位置', '2015-04-20 17:04:45', 0),
(489, '维护人', '2015-04-20 17:04:46', 0),
(490, '跳转链接', '2015-04-20 17:07:46', 0),
(491, '昵称', '2015-04-20 17:11:01', 0),
(492, '口令', '2015-04-20 17:11:02', 0),
(493, '有效时间', '2015-04-20 17:11:02', 0),
(494, '状态', '2015-04-20 17:11:03', 0),
(495, 'SEO关键字', '2015-04-20 17:18:39', 0),
(496, 'SEO描述', '2015-04-20 17:18:39', 0),
(497, '评论', '2015-04-20 17:21:10', 0),
(498, '编号', '2015-04-20 17:21:10', 0),
(499, '评论内容', '2015-04-20 17:21:10', 0),
(500, 'IP', '2015-04-20 17:21:10', 0),
(501, 'moncler jacken men 351150', '2015-04-20 17:21:31', 0),
(502, 'admin', '2015-04-20 17:22:50', 0),
(503, '静态配置', '2015-04-20 17:36:18', 0),
(504, '可用X-ELE列表', '2015-04-20 17:36:23', 0),
(505, '文件资源', '2015-04-20 17:37:55', 0),
(506, '名称', '2015-04-20 17:37:55', 0),
(507, '存储位置', '2015-04-20 17:37:55', 0),
(508, '文件类型', '2015-04-20 17:37:55', 0),
(509, '文件哈希', '2015-04-20 17:37:55', 0),
(510, '使用数', '2015-04-20 17:37:55', 0),
(511, '作者', '2015-04-20 17:39:22', 0),
(512, '首页', '2015-04-21 10:15:29', 0),
(513, '在线商城', '2015-04-22 01:39:25', 0),
(514, '技术', '2015-04-22 01:43:27', 0),
(515, '手机微站', '2015-04-22 01:43:41', 0),
(516, '打开位置', '2015-04-22 02:00:34', 0),
(517, '摇滚', '2015-04-22 13:49:34', 0),
(518, '企业官网', '2015-04-22 13:58:53', 0),
(519, '点赞', '2015-04-22 13:59:24', 0),
(520, '门户论坛', '2015-04-22 13:59:31', 0),
(521, '开源作品', '2015-04-22 14:00:03', 0),
(522, '个人博客', '2015-04-22 14:03:23', 0),
(523, '红橘子科技', '2015-04-22 14:03:58', 0),
(524, '更多产品', '2015-04-22 14:04:08', 0),
(525, '小萌库', '2015-04-22 14:04:50', 0),
(526, '成功案例', '2015-04-22 14:05:00', 0),
(527, '关于', '2015-04-22 14:05:40', 0),
(528, '无效编号', '2015-04-22 14:10:52', 0),
(529, '记录不存在', '2015-04-22 15:11:55', 0),
(530, 'Home', '2015-04-22 15:18:32', 0),
(531, '英语', '2015-04-22 15:22:37', 0),
(532, 'English', '2015-04-22 15:23:31', 0),
(533, '总评论数', '2015-04-23 15:48:11', 0),
(534, '更新时间', '2015-04-23 15:48:11', 0),
(535, '且听风铃-En', '2015-04-23 15:51:06', 0),
(536, '模板', '2015-04-23 16:01:01', 0),
(537, '所属应用', '2015-04-23 16:01:01', 0),
(538, '操作人', '2015-04-23 16:01:01', 0),
(539, '九九话事-En', '2015-04-23 16:01:22', 0),
(540, '权限资源', '2015-04-23 16:12:11', 0),
(541, '所属模块', '2015-04-23 16:12:11', 0),
(542, '应用', '2015-04-23 16:12:11', 0),
(543, '权限资源编辑页面', '2015-04-23 16:13:56', 0),
(544, 'Coding', '2015-04-24 14:21:33', 0),
(545, 'Rock', '2015-04-24 14:22:39', 0),
(546, 'Great!', '2015-04-24 14:23:00', 0),
(547, 'Works', '2015-04-24 14:24:47', 0),
(548, 'HongJuZi Studio', '2015-04-24 14:26:55', 0),
(549, 'XiaoMengKu', '2015-04-24 14:27:23', 0),
(550, 'About Me', '2015-04-24 14:28:07', 0),
(551, 'Base System', '2015-04-24 14:44:24', 0),
(552, '更新分类成功!', '2015-04-24 14:44:35', 0),
(553, 'testse', '2015-05-01 12:29:31', 0),
(554, 'test', '2015-05-01 15:19:27', 0),
(555, '关于我们', '2015-05-02 02:33:24', 0),
(556, '基础系统', '2015-05-02 02:39:24', 0),
(557, 'article', '2015-05-02 03:11:56', 0),
(558, '绑定分享', '2015-05-02 03:37:57', 0),
(559, '翻译', '2015-05-02 04:59:52', 0),
(560, '不能为空', '2015-05-02 05:00:14', 0),
(561, '后台桌面', '2015-05-02 05:06:31', 0),
(562, '安装程序', '2015-05-02 09:11:29', 0),
(563, '安装帮助', '2015-05-02 09:21:13', 0),
(564, '官方QQ交流群', '2015-05-02 09:21:13', 0),
(565, '官方帮助手册', '2015-05-02 09:21:13', 0),
(566, '切换语言', '2015-05-02 09:23:37', 0),
(567, '分享设置', '2015-05-02 14:44:19', 0),
(568, '验证链接', '2015-05-02 14:44:19', 0),
(569, '认证key值', '2015-05-02 14:44:19', 0),
(570, '分享名称', '2015-05-03 02:29:00', 0),
(571, 'apiID', '2015-05-03 02:29:00', 0);
--
-- 转存表中的数据 `{prefix}modelmanager`
--
INSERT INTO `{prefix}modelmanager` (`sort_num`, `id`, `name`, `identifier`, `description`, `parent_id`, `type`, `image_path`, `has_multi_lang`, `create_time`, `author`) VALUES
(5, 204, '综合分类', 'category', '后台所有模块分类', 0, 424, 'static/uploadfiles/modelmanager/20131107/13838277712037500.jpg', 1, '2013-11-09 16:11:00', 21),
(26, 209, '访客留言', 'message', '访客的疑问或是意见反馈', 241, 426, 'static/uploadfiles/modelmanager/20131214/13869953301374000.png', 1, '2013-08-04 16:08:00', 15),
(1, 211, '导航菜单', 'navmenu', '网站导航菜单信息。', 0, 424, 'static/uploadfiles/modelmanager/20131107/1383827847152000.jpg', 1, '2013-08-04 16:08:00', 21),
(21, 210, '友情链接', 'link', '收集好友的网站,提供网站导航', 0, 426, 'static/uploadfiles/modelmanager/20131107/13838278312001900.jpg', 1, '2013-08-04 16:08:00', 15),
(3, 212, '大图展示', 'adv', '宣传、展示类大图', 204, 426, 'static/uploadfiles/modelmanager/20131107/13838278662237700.jpg', 1, '2013-08-04 16:08:00', 21),
(9999, 245, '评论', 'comment', '用户评论信息模块', 241, 426, 'static/uploadfiles/modelmanager/20131214/13869953761672000.png', 1, '2013-11-06 17:11:49', 15),
(31, 241, '用户', 'user', '用户', 249, 424, 'static/uploadfiles/modelmanager/20131107/13838280571760600.jpg', 1, '2013-10-30 16:10:00', 15),
(40, 227, '标签', 'tags', '标签信息管理', -1, 426, 'static/uploadfiles/modelmanager/20131107/13838279452943400.jpg', 1, '2013-10-02 16:10:00', 15),
(37, 229, '权限资源', 'rights', '权限资源管理', 0, 424, 'static/uploadfiles/modelmanager/20131107/13838279572065100.jpg', 1, '2013-10-04 16:10:00', 5),
(9999, 239, '文件资源', 'resource', '文件、图片等资源管理', -1, 424, 'static/uploadfiles/modelmanager/20131107/1383827970896800.jpg', 1, '2013-10-27 16:10:00', 15),
(10, 242, '文章', 'article', '文章信息模块', 204, 424, 'static/uploadfiles/modelmanager/20131107/1383828017272100.jpg', 1, '2013-10-27 16:10:00', 21),
(30, 249, '角色', 'actor', '角色', -1, 424, 'static/uploadfiles/modelmanager/20131205/13862566861417400.jpg', 1, '2013-11-10 07:11:27', 5),
(9999, 277, '静态配置', 'staticcfg', '如热门关键词、热门产品分类等', -1, 424, 'static/uploadfiles/modelmanager/20141009/14128595312340900.png', 1, '2014-10-09 04:10:07', 15),
(9999, 254, '网站管理', 'website', '平台所有网站管理', 204, 424, 'static/uploadfiles/modelmanager/20131219/1387460553962600.png', 1, '2013-12-19 13:12:18', 21),
(99999, 293, '模块管理', 'modelmanager', '系统模块管理', 204, 424, 'static/uploadfiles/modelmanager/2015/04/19/14294373442927800.png', 1, '2015-04-19 09:04:46', 15),
(99999, 289, '分享配置', 'sharecfg', '如微博、QQ微博、QQ空间等', 241, 426, 'static/uploadfiles/modelmanager/2015/03/17/14266003891005900.png', 1, '2015-03-17 13:03:50', 15),
(99999, 294, '语言种类', 'lang', '语言种类管理模块', -1, 424, 'static/uploadfiles/modelmanager/2015/04/19/1429441044159900.png', 1, '2015-04-19 10:04:13', 15),
(99999, 295, '分享设置', 'sharesetting', '社交媒体分享的必要信息', -1, 424, 'static/uploadfiles/modelmanager/2015/05/02/1430577600443100.png', 1, '2015-05-02 14:05:07', 21),
(99999, 296, '联系方式', 'contact', '联系方式管理模块', -1, 424, 'static/uploadfiles/modelmanager/2015/05/03/14306656741069800.png', 1, '2015-05-03 15:05:39', 15),
(99999, 297, '主题风格', 'theme', '主题风格管理模块', -1, 424, 'static/uploadfiles/modelmanager/2015/05/04/143075177754000.png', 1, '2015-05-04 15:05:21', 21);
--
-- 转存表中的数据 `{prefix}navmenu`
--
INSERT INTO `{prefix}navmenu` (`sort_num`, `id`, `name`, `url`, `parent_id`, `position_id`, `description`, `target`, `extend`, `lang_id`, `create_time`, `author`) VALUES
(29, 20, '联系', 'contact', 0, 458, '联系', '_self', '', 454, '2012-04-27 10:04:34', 15),
(9, 1, '首页', 'index', 0, 458, '回到九九话事首页', '_self', 'xicon-home', 454, '2012-04-26 01:04:45', 15),
(99, 35, '关于', 'aboutme', 0, 458, '关于九九', '_self', 'xicon-xjiujiu', 454, '2014-10-09 08:10:16', 15);
--
-- 转存表中的数据 `{prefix}rights`
--
INSERT INTO `{prefix}rights` (`id`, `name`, `identifier`, `parent_id`, `app`, `description`, `create_time`, `author`) VALUES
(554, '权限资源', 'rights', -1, 'admin', NULL, '2015-05-17 11:17:24', -1),
(555, '权限资源列表', 'index', 554, 'admin', NULL, '2015-05-17 11:17:24', -1),
(556, '列表', 'index', 555, 'admin', NULL, '2015-05-17 11:17:26', -1),
(557, '网站管理', 'website', -1, 'admin', NULL, '2015-05-17 11:36:25', -1),
(558, '网站管理列表', 'index', 557, 'admin', NULL, '2015-05-17 11:36:25', -1),
(559, '文章', 'article', -1, 'admin', NULL, '2015-05-17 11:36:31', -1),
(560, '文章列表', 'index', 559, 'admin', NULL, '2015-05-17 11:36:31', -1),
(561, '文章编辑页面', 'editview', 559, 'admin', NULL, '2015-05-17 11:36:34', -1),
(562, '文章执行编辑', 'edit', 559, 'admin', NULL, '2015-05-17 11:37:00', -1);
--
-- 转存表中的数据 `{prefix}sharecfg`
--
INSERT INTO `{prefix}sharecfg` (`id`, `name`, `user_id`, `identifier`, `token`, `content`, `end_time`, `status`, `create_time`, `author`) VALUES
(12, '', 0, 'qq-share', '', NULL, 0, 1, '2015-03-11 14:03:28', 15),
(13, '', 0, 'weibo-share', '', NULL, 0, 1, '2015-03-11 14:03:00', 15),
(14, '', 0, 'weixin-share', '', NULL, 0, 1, '2015-03-11 14:03:28', 15),
(15, '', 0, 'qzone-share', '', NULL, 0, 1, '2015-03-11 14:03:50', 15);
--
-- 转存表中的数据 `{prefix}sharesetting`
--
INSERT INTO `{prefix}sharesetting` (`id`, `name`, `identifier`, `appid`, `content`, `key`, `create_time`, `author`) VALUES
(16, 'QQ同步分享', 'qq', '101198019', 'openapi.tencentyun.com', '509b60e585ebcf1194795138b6a26402', '2015-05-03 03:05:20', 21),
(17, '微博同步分享', 'weibo', '2876731748', 'openapi.tencentyun.com', 'fd884364e193b83c93bb88ba4d7572a9', '2015-05-03 03:05:53', 21);
--
-- 转存表中的数据 `{prefix}tags`
--
INSERT INTO `{prefix}tags` (`id`, `name`, `hots`, `create_time`, `author`) VALUES
(1, '博客主页', 32, '2015-04-27 14:58:37', 1),
(2, '链接表', 1, '0000-00-00 00:00:00', 1),
(5, '音乐', 5, '2015-04-27 14:59:36', 1),
(6, '一些怪想', 7, '2015-03-08 03:57:09', 1),
(7, '瞎想', 21, '2015-03-08 03:57:10', 1),
(9, '总结', 54, '2015-03-08 13:46:35', 1),
(10, '生活', 1, '0000-00-00 00:00:00', 1),
(12, 'php', 0, '2015-03-17 13:26:58', 1),
(13, 'IT新闻', 1, '0000-00-00 00:00:00', 1),
(14, 'wp模板', 2, '2015-03-08 03:57:10', 1),
(15, '99EBC', 2, '2015-03-08 03:57:11', 1),
(16, '玩具', 11, '2015-03-08 03:57:10', 1),
(17, 'CI', 2, '2015-03-08 03:57:08', 1),
(18, '持续集成', 2, '2015-03-08 03:57:08', 1),
(19, 'Hudson', 2, '2015-03-08 03:57:08', 1),
(20, 'Svn Hooks', 2, '2015-03-08 03:57:08', 1),
(21, 'PHP', 17, '2015-03-08 03:57:08', 1),
(22, 'Java', 13, '2015-03-17 13:27:24', 1),
(23, 'C#', 6, '2015-03-08 03:57:05', 1),
(24, '算法', 1, '0000-00-00 00:00:00', 1),
(25, 'Linux', 7, '2015-03-08 03:57:07', 1),
(26, 'Python', 1, '0000-00-00 00:00:00', 1),
(27, 'Javascript', 9, '2015-03-08 03:57:07', 1),
(28, 'Css', 2, '2015-03-08 03:57:00', 1),
(29, 'Html5', 1, '0000-00-00 00:00:00', 1),
(30, '学车', 2, '2015-03-08 03:57:07', 1),
(31, 'Jquery', 4, '2015-03-08 03:57:07', 1),
(32, 'ftp', 2, '2015-03-08 03:57:07', 1),
(33, 'vim', 5, '2015-03-08 03:57:07', 1),
(34, '创业', 8, '2015-03-08 03:57:07', 1),
(35, '问题', 32, '2015-03-08 03:57:06', 1),
(36, 'Subversion', 3, '2015-03-08 03:57:06', 1),
(37, '服务器', 5, '2015-03-08 03:57:06', 1),
(38, 'HHJsLib', 4, '2015-03-08 03:57:04', 1),
(39, 'MySQL', 4, '2015-03-08 03:57:04', 1),
(40, '读书', 3, '2015-03-08 03:57:04', 1),
(41, '框架', 3, '2015-03-08 03:57:04', 1),
(42, '前端', 6, '2015-03-08 03:57:03', 1),
(43, 'Database', 4, '2015-03-08 03:57:04', 1),
(44, '生活元素', 6, '2015-03-08 03:57:03', 1),
(45, 'Android', 5, '2015-03-08 03:57:03', 1),
(46, 'SQLite', 2, '2015-03-08 03:57:03', 1),
(47, 'HTML', 2, '2015-03-08 03:57:03', 1),
(48, 'css', 2, '2015-03-08 03:57:03', 1),
(49, '工具使用', 2, '2015-03-08 03:57:02', 1),
(50, 'java', 2, '2015-03-08 03:57:02', 1),
(51, '改善编程体验', 2, '2015-03-08 03:57:02', 1),
(52, 'Map', 3, '2015-03-08 03:57:01', 1),
(53, 'TDD', 4, '2015-03-08 03:57:01', 1),
(54, 'DevOps', 2, '2015-03-08 03:57:01', 1),
(55, '重构', 2, '2015-03-08 03:57:01', 1),
(56, '代码优化', 2, '2015-03-08 03:57:01', 1),
(57, 'hjzphpcms', 2, '2015-03-08 03:57:01', 1),
(58, 'Oracle', 2, '2015-03-08 03:57:01', 1),
(59, '数据库设计', 2, '2015-03-08 03:57:01', 1),
(60, '优化', 2, '2015-03-08 03:57:01', 1),
(61, '音乐', 2, '2015-03-08 03:57:01', 1),
(62, '摇滚', 1, '2015-03-09 14:38:06', 1),
(63, '后摇', 2, '2015-03-08 03:57:01', 1),
(64, 'hosts', 2, '2015-03-08 03:57:01', 1),
(65, '翻墙', 3, '2015-03-08 03:57:00', 1),
(66, '宇航员', 2, '2015-03-08 03:57:00', 1),
(67, 'GIAA', 3, '2015-03-08 03:57:00', 1),
(68, 'POST-ROCK', 2, '2015-03-08 03:57:00', 1),
(69, 'WEB开发', 2, '2015-03-08 03:57:00', 1),
(70, '前端学习', 2, '2015-03-08 03:57:00', 1),
(71, 'HTML学习', 2, '2015-03-08 03:57:00', 1),
(72, '坐标轴', 2, '2015-03-08 03:57:00', 1),
(73, 'CSharp', 2, '2015-03-08 03:57:00', 1),
(74, 'LAMP', 2, '2015-03-08 03:57:00', 1),
(75, 'Mysql编译', 2, '2015-03-08 03:57:00', 1),
(76, 'php编译', 2, '2015-03-08 03:57:00', 1),
(77, 'nginx编译', 2, '2015-03-08 03:57:00', 1),
(78, '作品', 1, '2015-03-08 13:46:45', 15),
(79, '博客', 1, '2015-03-08 13:46:58', 15),
(80, '且听风铃', 1, '2015-03-09 14:38:13', 15),
(81, '海龟先生', 1, '2015-03-09 14:38:24', 15),
(82, 'javqa', 1, '2015-03-17 13:27:22', 5),
(83, '玛卡', 1, '2015-03-23 14:31:54', 15),
(84, '测试', 0, '2015-04-27 14:54:56', 15),
(85, 'testset', 1, '2015-05-01 15:19:14', 15),
(86, 'Wooc', 1, '2015-05-03 16:15:54', 15),
(87, '关于', 1, '2015-05-04 14:03:46', 15),
(88, '第一篇博文', 1, '2015-05-17 04:59:56', 22),
(89, '传奇', 1, '2015-05-17 05:13:33', 22),
(90, '故事', 1, '2015-05-17 05:13:35', 22),
(91, '经典传奇', 2, '2015-05-17 05:28:12', 22),
(92, 'test', 1, '2015-05-17 06:20:59', 22),
(93, '古树', 1, '2015-05-17 07:11:50', 22);
--
-- 转存表中的数据 `{prefix}theme`
--
INSERT INTO `{prefix}theme` (`id`, `name`, `identifier`, `description`, `image_path`, `tag`, `publisher`, `website`, `version`, `status`, `create_time`, `author`, `app`) VALUES
(472, '默认主题', 'default', 'Wooc 默认主题', 'http://localhost/hjz-wooc/static/template/cms/default/images/index.jpg', 'all', '红橘子科技', 'http://www.hongjuzi.net', '1.0', 3, '2015-05-05 14:04:20', 1, 'cms');
--
-- 转存表中的数据 `{prefix}tpl`
--
INSERT INTO `{prefix}tpl` (`id`, `name`, `app`, `create_time`, `author`) VALUES
(241, 'article-addview', 'admin', '2015-04-07 15:05:51', 0),
(242, 'article-index', 'admin', '2015-04-07 15:05:56', 0),
(243, 'langtool-index', 'wizard', '2015-04-07 15:06:06', 0),
(244, 'index-index', 'admin', '2015-04-07 15:06:10', 0),
(245, 'langtool-generate', 'wizard', '2015-04-07 15:08:01', 0),
(246, 'enter-index', 'admin', '2015-04-07 16:41:27', 0),
(247, 'vcode-index', 'public', '2015-04-07 16:41:29', 0),
(248, 'mark-index', 'admin', '2015-04-08 01:20:26', 0),
(249, 'index-index', 'cms', '2015-04-12 13:32:59', 0),
(250, 'auser-alogin', 'oauth', '2015-04-12 13:36:30', 0),
(251, 'sharecfg-index', 'admin', '2015-04-12 13:44:28', 0),
(252, 'index-index', 'wizard', '2015-04-12 13:49:47', 0),
(253, 'modelmanager-editview', 'wizard', '2015-04-12 13:49:57', 0),
(254, 'modelmanager-edit', 'wizard', '2015-04-12 13:50:07', 0),
(255, 'enter-signup', 'cms', '2015-04-12 14:37:27', 0),
(256, 'auser-register', 'public', '2015-04-12 14:42:22', 0),
(257, 'error-notfound', 'public', '2015-04-12 14:42:23', 0),
(258, 'auser-register', 'oauth', '2015-04-12 14:43:48', 0),
(259, 'translate-index', 'admin', '2015-04-14 12:44:11', 0),
(260, 'translate-addview', 'admin', '2015-04-14 12:44:17', 0),
(261, 'translate-index', 'wizard', '2015-04-14 13:17:54', 0),
(262, 'mark-editview', 'admin', '2015-04-14 13:19:35', 0),
(263, 'mark-edit', 'admin', '2015-04-14 13:55:46', 0),
(264, 'category-index', 'admin', '2015-04-14 15:57:52', 0),
(265, 'category-addview', 'admin', '2015-04-15 14:41:02', 0),
(266, 'article-editview', 'admin', '2015-04-16 15:16:58', 0),
(267, 'article-add', 'admin', '2015-04-18 14:57:04', 0),
(268, 'article-adellanglinked', 'admin', '2015-04-19 05:13:07', 0),
(269, 'article-edit', 'admin', '2015-04-19 05:36:04', 0),
(270, 'article-delete', 'admin', '2015-04-19 08:29:40', 0),
(271, 'user-index', 'admin', '2015-04-19 09:20:26', 0),
(272, 'actor-index', 'admin', '2015-04-19 09:28:19', 0),
(273, 'navmenu-index', 'admin', '2015-04-19 09:29:10', 0),
(274, 'modelmanager-index', 'wizard', '2015-04-19 09:36:28', 0),
(275, 'modelmanager-index', 'admin', '2015-04-19 09:56:20', 0),
(276, 'modelmanager-editview', 'admin', '2015-04-19 10:18:09', 0),
(277, 'modelmanager-edit', 'admin', '2015-04-19 10:19:51', 0),
(278, 'modelmanager-addview', 'wizard', '2015-04-19 10:56:10', 0),
(279, 'lang-index', 'admin', '2015-04-19 10:58:20', 0),
(280, 'lang-quick', 'admin', '2015-04-19 10:58:44', 0),
(281, 'website-index', 'admin', '2015-04-19 11:07:16', 0),
(282, 'article-search', 'admin', '2015-04-19 11:53:29', 0),
(283, 'website-editview', 'admin', '2015-04-20 13:40:30', 0),
(284, 'website-addview', 'admin', '2015-04-20 15:10:23', 0),
(285, 'adv-index', 'admin', '2015-04-20 17:04:36', 0),
(286, 'adv-addview', 'admin', '2015-04-20 17:04:56', 0),
(287, 'adv-add', 'admin', '2015-04-20 17:07:09', 0),
(288, 'navmenu-addview', 'admin', '2015-04-20 17:09:42', 0),
(289, 'sharecfg-editview', 'admin', '2015-04-20 17:11:34', 0),
(290, 'sharecfg-addview', 'admin', '2015-04-20 17:12:15', 0),
(291, 'comment-index', 'admin', '2015-04-20 17:21:10', 0),
(292, 'comment-addview', 'admin', '2015-04-20 17:21:15', 0),
(293, 'comment-editview', 'admin', '2015-04-20 17:21:31', 0),
(294, 'user-editview', 'admin', '2015-04-20 17:22:50', 0),
(295, 'staticcfg-index', 'admin', '2015-04-20 17:36:18', 0),
(296, 'staticcfg-editview', 'admin', '2015-04-20 17:36:23', 0),
(297, 'linkeddata-index', 'admin', '2015-04-20 17:37:44', 0),
(298, 'resource-index', 'admin', '2015-04-20 17:37:54', 0),
(299, 'resource-addview', 'admin', '2015-04-20 17:37:59', 0),
(300, 'modelmanager-addview', 'admin', '2015-04-20 17:38:51', 0),
(301, 'lang-addview', 'admin', '2015-04-20 17:39:26', 0),
(302, 'category-delete', 'admin', '2015-04-21 09:59:50', 0),
(303, 'category-search', 'admin', '2015-04-21 10:12:53', 0),
(304, 'navmenu-editview', 'admin', '2015-04-21 10:15:29', 0),
(305, 'category-ahasname', 'admin', '2015-04-22 01:59:56', 0),
(306, 'category-aupdate', 'admin', '2015-04-22 02:19:05', 0),
(307, 'navmenu-delete', 'admin', '2015-04-22 14:05:53', 0),
(308, 'lang-editview', 'admin', '2015-04-22 15:22:37', 0),
(309, 'navmenu-search', 'admin', '2015-04-23 15:45:09', 0),
(310, 'article-quick', 'admin', '2015-04-23 15:49:19', 0),
(311, 'tpl-index', 'admin', '2015-04-23 16:01:01', 0),
(312, 'rights-index', 'admin', '2015-04-23 16:12:10', 0),
(313, 'rights-editview', 'admin', '2015-04-23 16:12:16', 0),
(314, 'category-editview', 'admin', '2015-04-24 14:44:24', 0),
(315, 'category-edit', 'admin', '2015-04-24 14:44:35', 0),
(316, 'tags-index', 'cms', '2015-04-27 14:50:33', 0),
(317, 'category-quick', 'admin', '2015-05-01 12:32:04', 0),
(318, 'actor-editview', 'admin', '2015-05-02 03:39:50', 0),
(319, 'actor-addview', 'admin', '2015-05-02 03:44:08', 0),
(320, 'user-addview', 'admin', '2015-05-02 04:38:20', 0),
(321, 'staticcfg-addview', 'admin', '2015-05-02 04:38:56', 0),
(322, 'mark-aautotranslate', 'admin', '2015-05-02 05:00:14', 0),
(323, 'index-index', 'install', '2015-05-02 09:11:30', 0),
(324, 'index-init', 'install', '2015-05-02 09:32:01', 0),
(325, 'index-setup', 'install', '2015-05-02 10:19:18', 0),
(326, 'index-finished', 'install', '2015-05-02 10:37:13', 0),
(327, 'init-index', 'install', '2015-05-02 14:15:21', 0),
(328, 'init-error', 'install', '2015-05-02 14:20:37', 0),
(329, 'setup-index', 'install', '2015-05-02 14:34:37', 0),
(330, 'sharesetting-index', 'admin', '2015-05-02 14:44:19', 0),
(331, 'sharesetting-addview', 'admin', '2015-05-02 14:44:25', 0),
(332, 'sharesetting-add', 'admin', '2015-05-03 02:30:05', 0),
(333, 'sharesetting-editview', 'admin', '2015-05-03 05:29:32', 0);
--
-- 转存表中的数据 `{prefix}translate`
--
INSERT INTO `{prefix}translate` (`id`, `content`, `mark_id`, `parent_id`, `create_time`, `author`) VALUES
(347, '用户注册', 436, 454, '2015-04-14 12:56:27', 15),
(348, '后台管理平台', 403, 454, '2015-04-14 12:56:27', 1),
(349, '去网站', 404, 454, '2015-04-14 12:56:27', 1),
(350, '退出', 405, 454, '2015-04-14 12:56:27', 1),
(351, '您好', 406, 454, '2015-04-14 12:56:27', 1),
(352, '网站设置', 407, 454, '2015-04-14 12:56:27', 1),
(353, '个人设置', 408, 454, '2015-04-14 12:56:27', 1),
(354, '安全退出', 409, 454, '2015-04-14 12:56:27', 1),
(355, '用户', 410, 454, '2015-04-14 12:56:27', 1),
(356, '写邮件', 411, 454, '2015-04-14 12:56:27', 1),
(357, '数据库工具', 412, 454, '2015-04-14 12:56:27', 1),
(358, '系统用户', 413, 454, '2015-04-14 12:56:27', 1),
(359, '更换风格', 414, 454, '2015-04-14 12:56:27', 1),
(360, '固定顶端', 415, 454, '2015-04-14 12:56:27', 1),
(361, '固定菜单', 416, 454, '2015-04-14 12:56:27', 1),
(362, '上一页', 417, 454, '2015-04-14 12:56:27', 1),
(363, '下一页', 418, 454, '2015-04-14 12:56:27', 1),
(364, '内容', 419, 454, '2015-04-14 12:56:27', 1),
(365, '编辑', 420, 454, '2015-04-14 12:56:27', 1),
(366, '添加', 421, 454, '2015-04-14 12:56:27', 1),
(367, '没有图片', 422, 454, '2015-04-14 12:56:27', 1),
(368, '无效数字', 423, 454, '2015-04-14 12:56:27', 1),
(369, '字符长度不能小于', 424, 454, '2015-04-14 12:56:27', 1),
(370, '字符长度不能大于', 425, 454, '2015-04-14 12:56:27', 1),
(371, '分类', 426, 454, '2015-04-14 12:56:27', 1),
(372, '文章', 427, 454, '2015-04-14 12:56:27', 1),
(373, '会员', 428, 454, '2015-04-14 12:56:27', 1),
(374, '网站管理', 429, 454, '2015-04-14 12:56:27', 1),
(375, '控制面板', 430, 454, '2015-04-14 12:56:27', 1),
(376, '文件管理', 431, 454, '2015-04-14 12:56:27', 1),
(377, '系统管理', 432, 454, '2015-04-14 12:56:27', 1),
(378, '生成工具', 433, 454, '2015-04-14 12:56:27', 1),
(379, '编辑成功', 434, 454, '2015-04-14 12:56:27', 1),
(380, '用戶名或密碼不正確,請確認!', 435, 454, '2015-04-14 12:56:27', 1),
(381, '用户注册', 436, 454, '2015-04-14 12:56:27', 1),
(382, '用户注册', 436, 455, '2015-04-14 14:01:55', 15),
(383, 'User registration', 436, 456, '2015-04-14 14:01:55', 15),
(387, '内容简介', 463, 454, '2015-04-19 12:44:08', 15),
(388, '內容簡介', 463, 455, '2015-04-19 12:44:08', 15),
(389, 'Content abstract', 463, 456, '2015-04-19 12:44:08', 15);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| 49.072092 | 268 | 0.547529 |
fd6654077e7a14573da65e60549648cf245406c3 | 8,137 | h | C | MMOCoreORB/src/server/zone/objects/creature/commands/PurchaseTicketCommand.h | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 18 | 2017-02-09T15:36:05.000Z | 2021-12-21T04:22:15.000Z | MMOCoreORB/src/server/zone/objects/creature/commands/PurchaseTicketCommand.h | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 61 | 2016-12-30T21:51:10.000Z | 2021-12-10T20:25:56.000Z | MMOCoreORB/src/server/zone/objects/creature/commands/PurchaseTicketCommand.h | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 71 | 2017-01-01T05:34:38.000Z | 2022-03-29T01:04:00.000Z | /*
Copyright <SWGEmu>
See file COPYING for copying conditions.*/
#ifndef PURCHASETICKETCOMMAND_H_
#define PURCHASETICKETCOMMAND_H_
#include "server/zone/objects/scene/SceneObject.h"
#include "server/zone/objects/player/sui/messagebox/SuiMessageBox.h"
#include "server/zone/managers/planet/PlanetManager.h"
#include "server/zone/objects/region/CityRegion.h"
class PurchaseTicketCommand : public QueueCommand {
public:
PurchaseTicketCommand(const String& name, ZoneProcessServer* server)
: QueueCommand(name, server) {
}
int doQueueCommand(CreatureObject* creature, const uint64& target, const UnicodeString& arguments) const {
if (!checkStateMask(creature))
return INVALIDSTATE;
if (!checkInvalidLocomotions(creature))
return INVALIDLOCOMOTION;
SortedVector<QuadTreeEntry*> closeObjects;
CloseObjectsVector* vec = (CloseObjectsVector*) creature->getCloseObjects();
vec->safeCopyTo(closeObjects);
bool nearTravelTerminal = false;
for (int i = 0; i < closeObjects.size(); i++) {
SceneObject* object = cast<SceneObject*>( closeObjects.get(i));
if (object != nullptr && object->getGameObjectType() == SceneObjectType::TRAVELTERMINAL && checkDistance(creature, object, 8)) {
nearTravelTerminal = true;
break;
}
}
if (!nearTravelTerminal) {
creature->sendSystemMessage("@travel:too_far"); // You are too far from the terminal to purchase a ticket.
return GENERALERROR;
}
ManagedReference<CityRegion*> currentCity = creature->getCityRegion().get();
int departureTax = 0;
if (currentCity != nullptr){
if (currentCity->isBanned(creature->getObjectID())) {
creature->sendSystemMessage("@city/city:city_cant_purchase_ticket"); //You are banned from using the services of this city. You cannot purchase a ticket.
return GENERALERROR;
}
if(!currentCity->isClientRegion()){
departureTax = currentCity->getTravelTax();
}
}
ManagedReference<SceneObject*> inventory = creature->getSlottedObject("inventory");
if (inventory == nullptr)
return GENERALERROR;
String departurePlanet, departurePoint, arrivalPlanet, arrivalPoint, type;
bool roundTrip = true;
try {
UnicodeTokenizer tokenizer(arguments);
tokenizer.getStringToken(departurePlanet);
tokenizer.getStringToken(departurePoint);
tokenizer.getStringToken(arrivalPlanet);
tokenizer.getStringToken(arrivalPoint);
if(tokenizer.hasMoreTokens()) {
tokenizer.getStringToken(type);
if (type == "single" || type == "0")
roundTrip = false;
}
} catch(Exception& e) {
return INVALIDPARAMETERS;
}
departurePlanet = departurePlanet.replaceAll("_", " ");
departurePoint = departurePoint.replaceAll("_", " ");
arrivalPlanet = arrivalPlanet.replaceAll("_", " ");
arrivalPoint = arrivalPoint.replaceAll("_", " ");
ManagedReference<Zone*> departureZone = server->getZoneServer()->getZone(departurePlanet);
ManagedReference<Zone*> arrivalZone = server->getZoneServer()->getZone(arrivalPlanet);
if (departureZone == nullptr)
return GENERALERROR;
if (arrivalZone == nullptr)
return GENERALERROR;
ManagedReference<PlanetManager*> pmDeparture = departureZone->getPlanetManager();
ManagedReference<PlanetManager*> pmArrival = arrivalZone->getPlanetManager();
if (!pmArrival->isExistingPlanetTravelPoint(arrivalPoint)) {
creature->sendSystemMessage("@travel:no_location_found"); //No location was found for your destination.
return INVALIDPARAMETERS;
}
if (!pmDeparture->isExistingPlanetTravelPoint(departurePoint)) {
creature->sendSystemMessage("The given departure point was not found.");
return INVALIDPARAMETERS;
}
Reference<PlanetTravelPoint*> destPoint = pmArrival->getPlanetTravelPoint(arrivalPoint);
if (destPoint == nullptr)
return GENERALERROR;
ManagedReference<CreatureObject*> arrivalShuttle = destPoint->getShuttle();
if (arrivalShuttle == nullptr)
return GENERALERROR;
ManagedReference<CityRegion*> destCity = arrivalShuttle->getCityRegion().get();
if (destCity != nullptr){
if (destCity.get()->isBanned(creature->getObjectID())) {
creature->sendSystemMessage("@city/city:banned_from_that_city"); // You have been banned from traveling to that city by the city militia
return GENERALERROR;
}
}
//Check to see if this point can be reached from this location.
if (!pmDeparture->isTravelToLocationPermitted(departurePoint, arrivalPlanet, arrivalPoint))
return GENERALERROR;
if (roundTrip && !pmArrival->isTravelToLocationPermitted(arrivalPoint, departurePlanet, departurePoint))
return GENERALERROR; //If they are doing a round trip, make sure they can travel back.
int baseFare = pmDeparture->getTravelFare(departurePlanet, arrivalPlanet);
if (baseFare == 0) { // Make sure that the travel route is valid
creature->sendSystemMessage("Invalid travel route specified.");
return GENERALERROR;
}
int fare = baseFare + departureTax;
if (roundTrip)
fare *= 2;
//Make sure they have space in the inventory for the tickets before purchasing them.
Locker _lock(inventory, creature);
if (inventory->getContainerObjectsSize() + ((roundTrip) ? 2 : 1) > inventory->getContainerVolumeLimit()) {
creature->sendSystemMessage("@error_message:inv_full"); //Your inventory is full.
return GENERALERROR;
}
//Check if they have funds.
int bank = creature->getBankCredits();
int cash = creature->getCashCredits();
if (bank < fare) {
int diff = fare - bank;
if (diff > cash) {
ManagedReference<SuiMessageBox*> suiBox = new SuiMessageBox(creature, 0);
suiBox->setPromptTitle("");
suiBox->setPromptText("You do not have sufficient funds for that.");
creature->sendMessage(suiBox->generateMessage());
creature->sendSystemMessage("@travel:short_funds"); //You do not have enough money to complete the ticket purchase.
return GENERALERROR;
}
creature->subtractBankCredits(bank); //Take all from the bank, since they didn't have enough to cover.
creature->subtractCashCredits(diff); //Take the rest from the cash.
} else {
creature->subtractBankCredits(fare); //Take all of the fare from the bank.
}
StringIdChatParameter params("@base_player:prose_pay_acct_success"); //You successfully make a payment of %DI credits to %TO.
params.setDI(baseFare + (roundTrip * baseFare));
params.setTO("@money/acct_n:travelsystem"); //the Galactic Travel Commission
creature->sendSystemMessage(params);
ManagedReference<SceneObject*> ticket1 = pmDeparture->createTicket(departurePoint, arrivalPlanet, arrivalPoint);
if (ticket1 == nullptr) {
creature->sendSystemMessage("Error creating travel ticket.");
return GENERALERROR;
}
if (inventory->transferObject(ticket1, -1, true)) {
ticket1->sendTo(creature, true);
} else {
ticket1->destroyObjectFromDatabase(true);
creature->sendSystemMessage("Error transferring travel ticket to inventory.");
return GENERALERROR;
}
if (roundTrip) {
ManagedReference<SceneObject*> ticket2 = pmArrival->createTicket(arrivalPoint, departurePlanet, departurePoint);
if (inventory->transferObject(ticket2, -1, true)) {
ticket2->sendTo(creature, true);
} else {
ticket2->destroyObjectFromDatabase(true);
creature->sendSystemMessage("Error transferring round-trip travel ticket to inventory.");
return GENERALERROR;
}
}
_lock.release();
if(currentCity != nullptr && !currentCity->isClientRegion() && departureTax > 0) {
Locker clocker(currentCity, creature);
int taxPaid = departureTax + (roundTrip * departureTax);
currentCity->addToCityTreasury(taxPaid);
StringIdChatParameter param("@city/city:city_ticket_pay"); // You pay a tax of %DI credits to the local City Travel Authority.
param.setDI(taxPaid);
creature->sendSystemMessage(param);
}
ManagedReference<SuiMessageBox*> suiBox = new SuiMessageBox(creature, 0);
suiBox->setPromptTitle("");
suiBox->setPromptText("@travel:ticket_purchase_complete"); //Ticket purchase complete
creature->sendMessage(suiBox->generateMessage());
return SUCCESS;
}
};
#endif //PURCHASETICKETCOMMAND_H_
| 33.904167 | 157 | 0.736758 |
7f0369945da5e5c2ec697f06c540eaf949b63493 | 1,759 | rs | Rust | noodles-bam/src/bai/index/reference_sequence/bin.rs | sstadick/noodles | 2626a191634fdd7628c653fa8bf0e276ced26367 | [
"MIT"
] | null | null | null | noodles-bam/src/bai/index/reference_sequence/bin.rs | sstadick/noodles | 2626a191634fdd7628c653fa8bf0e276ced26367 | [
"MIT"
] | null | null | null | noodles-bam/src/bai/index/reference_sequence/bin.rs | sstadick/noodles | 2626a191634fdd7628c653fa8bf0e276ced26367 | [
"MIT"
] | null | null | null | //! BAM index bin and fields.
mod builder;
pub(crate) use self::builder::Builder;
use noodles_bgzf::index::Chunk;
// § 5.3 C source code for computing bin number and overlapping bins: MAX_BIN (2020-07-19)
pub(crate) const MAX_ID: usize = ((1 << 18) - 1) / 7 + 1;
/// A bin in a BAM index reference sequence.
///
/// Bin numbers have an effective range between 0 and 37449, inclusive. An optional pseudo-bin at
/// bin number 37450 holds two pairs of metadata: virtual positions of the start and end of the
/// reference sequence and the number of mapped and unmapped reads in the reference sequence.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Bin {
id: u32,
chunks: Vec<Chunk>,
}
impl Bin {
pub(crate) fn builder() -> Builder {
Builder::default()
}
/// Creates a BAM index reference sequence bin.
///
/// # Examples
///
/// ```
/// use noodles_bam::bai::index::reference_sequence::Bin;
/// let bin = Bin::new(10946, Vec::new());
/// ```
pub fn new(id: u32, chunks: Vec<Chunk>) -> Self {
Self { id, chunks }
}
/// Returns the bin ID.
///
/// This is also called the bin number.
///
/// # Examples
///
/// ```
/// use noodles_bam::bai::index::reference_sequence::Bin;
/// let bin = Bin::new(10946, Vec::new());
/// assert_eq!(bin.id(), 10946);
/// ```
pub fn id(&self) -> u32 {
self.id
}
/// Returns the list of chunks in the bin.
///
/// # Examples
///
/// ```
/// use noodles_bam::bai::index::reference_sequence::Bin;
/// let bin = Bin::new(10946, Vec::new());
/// assert!(bin.chunks().is_empty());
/// ```
pub fn chunks(&self) -> &[Chunk] {
&self.chunks
}
}
| 25.867647 | 97 | 0.572484 |
d5a73dead3361beb86dc37486428406aff93386b | 1,521 | h | C | src/manifestoxx/CPortDescriptor.h | cfriedt/libmanifesto | 1e7cebc5f2486548b0e5173eca8b1d9304b7b147 | [
"BSD-3-Clause"
] | null | null | null | src/manifestoxx/CPortDescriptor.h | cfriedt/libmanifesto | 1e7cebc5f2486548b0e5173eca8b1d9304b7b147 | [
"BSD-3-Clause"
] | 1 | 2020-08-16T18:09:54.000Z | 2020-08-16T22:01:45.000Z | src/manifestoxx/CPortDescriptor.h | cfriedt/libmanifesto | 1e7cebc5f2486548b0e5173eca8b1d9304b7b147 | [
"BSD-3-Clause"
] | null | null | null | /*
* Copyright (c) 2020 Friedt Professional Engineering Services, Inc
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef CPORT_DESCRIPTOR_H_
#define CPORT_DESCRIPTOR_H_
#include <iostream>
#include <string>
#include <utility>
#include <vector>
#include "BundleClass.h"
#include "BundleDescriptor.h"
#include "Descriptor.h"
class CPortDescriptor : public Descriptor {
public:
enum CPortProtocol {
Control = 0x00,
AP = 0x01,
GPIO = 0x02,
I2C = 0x03,
UART = 0x04,
HID = 0x05,
USB = 0x06,
SDIO = 0x07,
PowerSupply = 0x08,
PWM = 0x09,
SPI = 0x0b,
Display = 0x0c,
CameraManagement = 0x0d,
Sensor = 0x0e,
Lights = 0x0f,
Vibrator = 0x10,
Loopback = 0x11,
AudioManagement = 0x12,
AudioData = 0x13,
SVC = 0x14,
Firmware = 0x15,
CameraData = 0x16,
Raw = 0xfe,
VendorSpecific = 0xff,
};
CPortDescriptor(uint8_t id, uint8_t bundle, CPortProtocol protocol)
: id(id), bundle(bundle), protocol(protocol) {}
virtual ~CPortDescriptor() {}
uint8_t id;
uint8_t bundle;
CPortProtocol protocol;
virtual DescriptorType type() const override final {
return DescriptorType::CPort;
}
const std::pair<std::string, BundleClass> &protocol_data() const;
CPortProtocol protocol_num() const;
const std::string &protocol_name() const;
BundleClass protocol_class() const;
};
std::string to_string(const CPortDescriptor &desc);
std::ostream &operator<<(std::ostream &os, const CPortDescriptor &desc);
#endif
| 21.728571 | 72 | 0.678501 |
3994e946f9c84b29505dd4f41a837a6e04620d3e | 7,955 | swift | Swift | TKSwitcherCollection/TKExchangeSwitch.swift | Quietcat19/TKSwitcherCollection | 5a624a0492dec54a5c3a1e93fd26d4edf2f8c584 | [
"MIT"
] | null | null | null | TKSwitcherCollection/TKExchangeSwitch.swift | Quietcat19/TKSwitcherCollection | 5a624a0492dec54a5c3a1e93fd26d4edf2f8c584 | [
"MIT"
] | null | null | null | TKSwitcherCollection/TKExchangeSwitch.swift | Quietcat19/TKSwitcherCollection | 5a624a0492dec54a5c3a1e93fd26d4edf2f8c584 | [
"MIT"
] | null | null | null | //
// TKExchangeSwitch.swift
// SwitcherCollection
//
// Created by Tbxark on 15/10/25.
// Copyright © 2015年 TBXark. All rights reserved.
//
import UIKit
// Dedign by Oleg Frolov
//https://dribbble.com/shots/2238916-Switcher-VI
@IBDesignable
open class TKExchangeSwitch: TKBaseSwitch {
// MARK: - Property
private var swichControl: TKExchangeCircleView?
private var backgroundLayer = CAShapeLayer()
@IBInspectable open var lineColor = UIColor(white: 0.95, alpha: 1) {
didSet {
resetView()
}
}
@IBInspectable open var onColor = UIColor(red: 0.34, green: 0.91, blue: 0.51, alpha: 1.00) {
didSet {
resetView()
}
}
@IBInspectable open var offColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00) {
didSet {
resetView()
}
}
@IBInspectable open var lineSize: Double = 20 {
didSet {
resetView()
}
}
// MARK: - Getter
var lineWidth: CGFloat {
return CGFloat(lineSize) * sizeScale
}
// MARK: - Init
// MARK: - Private Func
override internal func setUpView() {
super.setUpView()
let radius = self.bounds.height/2 - lineWidth
let position = CGPoint(x: radius, y: radius + lineWidth)
let backLayerPath = UIBezierPath()
backLayerPath.move(to: CGPoint(x: lineWidth, y: 0))
backLayerPath.addLine(to: CGPoint(x: bounds.width - 4 * lineWidth, y: 0))
backgroundLayer.position = position
backgroundLayer.fillColor = lineColor.cgColor
backgroundLayer.strokeColor = lineColor.cgColor
backgroundLayer.lineWidth = self.bounds.height
backgroundLayer.lineCap = CAShapeLayerLineCap.round
backgroundLayer.path = backLayerPath.cgPath
layer.addSublayer(backgroundLayer)
let swichRadius = bounds.height - lineWidth
let swichControl = TKExchangeCircleView(frame: CGRect(x: lineWidth/2, y: lineWidth/2, width: swichRadius, height: swichRadius))
swichControl.onLayer.fillColor = onColor.cgColor
swichControl.offLayer.fillColor = offColor.cgColor
addSubview(swichControl)
self.swichControl = swichControl
}
// MARK: - Animate
override func changeValueAnimate(_ value: Bool, duration: Double) {
self.on = value
let keyTimes = [0, 0.4, 0.6, 1]
guard var frame = self.swichControl?.frame else { return }
frame.origin.x = value ? lineWidth/2 : (self.bounds.width - self.bounds.height + lineWidth/2)
let swichControlStrokeStartAnim = CAKeyframeAnimation(keyPath: "strokeStart")
swichControlStrokeStartAnim.values = [0, 0.45, 0.45, 0]
swichControlStrokeStartAnim.keyTimes = keyTimes as [NSNumber]?
swichControlStrokeStartAnim.duration = duration
swichControlStrokeStartAnim.isRemovedOnCompletion = true
let swichControlStrokeEndAnim = CAKeyframeAnimation(keyPath: "strokeEnd")
swichControlStrokeEndAnim.values = [1, 0.55, 0.55, 1]
swichControlStrokeEndAnim.keyTimes = keyTimes as [NSNumber]?
swichControlStrokeEndAnim.duration = duration
swichControlStrokeEndAnim.isRemovedOnCompletion = true
let swichControlChangeStateAnim: CAAnimationGroup = CAAnimationGroup()
swichControlChangeStateAnim.animations = [swichControlStrokeStartAnim, swichControlStrokeEndAnim]
swichControlChangeStateAnim.fillMode = CAMediaTimingFillMode.forwards
swichControlChangeStateAnim.isRemovedOnCompletion = false
swichControlChangeStateAnim.duration = duration
backgroundLayer.add(swichControlChangeStateAnim, forKey: "SwitchBackground")
swichControl?.exchangeAnimate(value, duration: duration)
UIView.animate(withDuration: duration, animations: { () -> Void in
self.swichControl?.frame = frame
})
}
}
// MARK: - Deprecated
extension TKExchangeSwitch {
@available(*, deprecated, message:"color is deprecated. Use lineColor, onColor, offColor instead ")
var color: (background: UIColor, on: UIColor, off: UIColor) {
set {
if newValue.background != lineColor {
lineColor = newValue.background
}
if newValue.on != onColor {
onColor = newValue.on
}
if newValue.on != offColor {
offColor = newValue.off
}
}
get {
return (lineColor, onColor, offColor)
}
}
}
private class TKExchangeCircleView: UIView {
// MARK: - Property
var onLayer: CAShapeLayer = CAShapeLayer()
var offLayer: CAShapeLayer = CAShapeLayer()
// MARK: - Init
override init(frame: CGRect) {
super.init(frame: frame)
setUpLayer()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setUpLayer()
}
// MARK: - Private Func
fileprivate func setUpLayer() {
let radius = min(self.bounds.width, self.bounds.height)
offLayer.frame = CGRect(x: 0, y: 0, width: radius, height: radius)
offLayer.path = UIBezierPath(ovalIn: CGRect(x: 0, y: 0, width: radius, height: radius)).cgPath
offLayer.transform = CATransform3DMakeScale(0, 0, 1)
self.layer.addSublayer(offLayer)
onLayer.frame = CGRect(x: 0, y: 0, width: radius, height: radius)
onLayer.path = UIBezierPath(ovalIn: CGRect(x: 0, y: 0, width: radius, height: radius)).cgPath
self.layer.addSublayer(onLayer)
}
func exchangeAnimate(_ value: Bool, duration: Double) {
let fillMode: String = convertFromCAMediaTimingFillMode(CAMediaTimingFillMode.forwards)
let hideValues = [NSValue(caTransform3D: CATransform3DMakeScale(0, 0, 1)),
NSValue(caTransform3D: CATransform3DIdentity)]
let showValues = [NSValue(caTransform3D: CATransform3DIdentity),
NSValue(caTransform3D: CATransform3DMakeScale(0, 0, 1))]
let showTimingFunction = CAMediaTimingFunction(controlPoints: 0, 0, 0, 1)
let hideTimingFunction = CAMediaTimingFunction(controlPoints: 0, 0, 1, 1)
let keyTimes = [0, 1]
offLayer.zPosition = value ? 1 : 0
onLayer.zPosition = value ? 0 : 1
////OffLayer animation
let offLayerTransformAnim = CAKeyframeAnimation(keyPath: "transform")
offLayerTransformAnim.values = value ? hideValues : showValues
offLayerTransformAnim.keyTimes = keyTimes as [NSNumber]?
offLayerTransformAnim.duration = duration
offLayerTransformAnim.timingFunction = value ? hideTimingFunction : showTimingFunction
offLayerTransformAnim.fillMode = convertToCAMediaTimingFillMode(fillMode)
offLayerTransformAnim.isRemovedOnCompletion = false
////OnLayer animation
let onLayerTransformAnim = CAKeyframeAnimation(keyPath: "transform")
onLayerTransformAnim.values = value ? showValues : hideValues
onLayerTransformAnim.keyTimes = keyTimes as [NSNumber]?
onLayerTransformAnim.duration = duration
offLayerTransformAnim.timingFunction = value ? showTimingFunction : hideTimingFunction
onLayerTransformAnim.fillMode = convertToCAMediaTimingFillMode(fillMode)
onLayerTransformAnim.isRemovedOnCompletion = false
onLayer.add(onLayerTransformAnim, forKey: "OnAnimate")
offLayer.add(offLayerTransformAnim, forKey: "OffAnimate")
}
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromCAMediaTimingFillMode(_ input: CAMediaTimingFillMode) -> String {
return input.rawValue
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToCAMediaTimingFillMode(_ input: String) -> CAMediaTimingFillMode {
return CAMediaTimingFillMode(rawValue: input)
}
| 37 | 135 | 0.666876 |
751b321ff90f956c3f5c40ba9e75148d4b3e3548 | 17,362 | h | C | src/lib/elfldltl/include/lib/elfldltl/phdr.h | sffc/fuchsia-clone | 633553d647314c9032f75d430c9377b9f6cfc26e | [
"BSD-2-Clause"
] | null | null | null | src/lib/elfldltl/include/lib/elfldltl/phdr.h | sffc/fuchsia-clone | 633553d647314c9032f75d430c9377b9f6cfc26e | [
"BSD-2-Clause"
] | 1 | 2022-03-01T01:12:04.000Z | 2022-03-01T01:17:26.000Z | src/lib/elfldltl/include/lib/elfldltl/phdr.h | sffc/fuchsia-clone | 633553d647314c9032f75d430c9377b9f6cfc26e | [
"BSD-2-Clause"
] | null | null | null | // Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_PHDR_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_PHDR_H_
#include <lib/stdcompat/bit.h>
#include <lib/stdcompat/span.h>
#include <limits>
#include <optional>
#include <string_view>
#include <type_traits>
#include "constants.h"
#include "internal/phdr-error.h"
namespace elfldltl {
using namespace std::literals::string_view_literals;
// elfldltl::DecodePhdrs does a single-pass decoding of a program
// header table by statically combining multiple "observer" objects. Various
// observers are defined to collect different subsets of the segment metadata
// needed for different purposes.
// This represents a program header entry that's been matched to a specific
// segment type. These types are used in the arguments to Observe callbacks;
// see below.
template <ElfPhdrType Type>
struct PhdrTypeMatch {};
// This is the base class for Phdr*Observer classes.
// Each Observer subclass should define these two methods:
// * template <class Diag, typename Phdr>
// bool Observe(Diag& diag, PhdrTypeMatch<Type> type, const Phdr& val);
// * template <class Diag>
// bool Finish(Diag& diag);
// Observe will be called with each entry matching any Type of the Types...
// list. Then Finish will be called at the end of all entries unless processing
// was terminated early for some reason, in which case the observer object is
// usually going to be destroyed without checking its results. Both return
// false if processing the phdr table should be terminated early.
//
// In practice, a given observer will correspond to a single ElfPhdrType;
// however, the parameter is kept variadic for consistency with other APIs in
// the library.
template <class Observer, ElfPhdrType... Types>
struct PhdrObserver {};
// This decodes a program header table by matching each entry against a list of
// observers. Each observer should be of a subclass of PhdrObserver that
// indicates the segment type it matches. If any matching observer returns
// false then this stops processing early and returns false. Otherwise, each
// observer's Finish method is called, stopping early if one returns false.
template <class Diag, class Phdr, size_t N, class... Observers>
constexpr bool DecodePhdrs(Diag&& diag, cpp20::span<const Phdr, N> phdrs,
Observers&&... observers) {
for (const Phdr& phdr : phdrs) {
if ((!DecodePhdr(diag, phdr, observers) || ...)) {
return false;
}
}
return (observers.Finish(diag) && ...);
}
// Match a single program header against a single observer. If the
// observer matches, its Observe overload for the matching tag is called.
// Returns the value of that call, or true if this observer didn't match.
template <class Diag, class Phdr, class Observer, ElfPhdrType... Type>
constexpr bool DecodePhdr(Diag&& diag, const Phdr& phdr,
PhdrObserver<Observer, Type...>& observer) {
constexpr auto kKnownFlags = Phdr::kRead | Phdr::kWrite | Phdr::kExecute;
bool ok = true;
auto check_header = [&](auto error) {
using Error = decltype(error);
if ((phdr.flags() & ~kKnownFlags) != 0) {
if (ok = diag.FormatWarning(Error::kUnknownFlags); !ok) {
return false;
}
}
// An `align` of 0 signifies no alignment constraints, which in practice
// means an alignment of 1.
auto align = phdr.align() > 0 ? phdr.align() : 1;
if (!cpp20::has_single_bit(align)) {
if (ok = diag.FormatError(Error::kBadAlignment); !ok) {
return false;
}
}
// While not a general spec'd constraint, this is the case in practice:
// either this a explicit requirement or the stronger constraint of
// `p_offset` and `p_vaddr` being `p_align`-aligned (e.g., zero) is
// expected to hold.
if (phdr.offset() % align != phdr.vaddr() % align) {
if (ok = diag.FormatError(Error::kOffsetNotEquivVaddr); !ok) {
return false;
}
}
return true;
};
auto call_observer = [&](auto type) {
ok = static_cast<Observer&>(observer).Observe(diag, type, phdr);
return ok;
};
((phdr.type == Type && check_header(internal::PhdrError<Type>{}) &&
call_observer(PhdrTypeMatch<Type>{})) ||
...);
return ok;
}
template <class Elf>
class PhdrNullObserver : public PhdrObserver<PhdrNullObserver<Elf>, ElfPhdrType::kNull> {
public:
using Phdr = typename Elf::Phdr;
template <class Diag>
constexpr bool Observe(Diag& diag, PhdrTypeMatch<ElfPhdrType::kNull> type, const Phdr& phdr) {
return diag.FormatWarning("PT_NULL header encountered");
}
template <class Diag>
constexpr bool Finish(Diag& diag) {
return true;
}
};
// A class of observer corresponding to the simpler segment metadata types:
// it merely stores any program header that it sees at the provided reference,
// complaining if it observes more than one segment of the same type.
template <class Elf, ElfPhdrType Type>
class PhdrSingletonObserver : public PhdrObserver<PhdrSingletonObserver<Elf, Type>, Type> {
public:
using Phdr = typename Elf::Phdr;
explicit PhdrSingletonObserver(std::optional<Phdr>& phdr) : phdr_(phdr) {}
template <class Diag>
constexpr bool Observe(Diag& diag, PhdrTypeMatch<Type> type, const Phdr& phdr) {
// Warning, since a wrong PHDRS clause in a linker script could cause
// this and be harmless in practice rather than indicating a linker bug
// or corrupted data.
if (phdr_ && !diag.FormatWarning(internal::PhdrError<Type>::kDuplicateHeader)) {
return false;
}
phdr_ = phdr;
return true;
}
template <class Diag>
constexpr bool Finish(Diag& diag) {
return true;
}
protected:
std::optional<Phdr>& phdr() { return phdr_; }
private:
std::optional<Phdr>& phdr_;
};
// Observes PT_GNU_STACK metadata. If CanBeExecutable is true, then the absence
// of any PT_GNU_STACK header is conventionally taken to mean that the stack is
// executable; if CanBeExecutable is false, then Finish() gives an error if no
// header is found or if it reports that the stack is executable (i.e., if
// PF_X is set).
template <class Elf, bool CanBeExecutable = false>
class PhdrStackObserver : public PhdrSingletonObserver<Elf, ElfPhdrType::kStack> {
private:
using Base = PhdrSingletonObserver<Elf, ElfPhdrType::kStack>;
using size_type = typename Elf::size_type;
using Phdr = typename Elf::Phdr;
public:
// There is only one constructor, but its signature is dependent on
//`CanBeExecutable`.
template <bool E = CanBeExecutable, typename = std::enable_if_t<!E>>
explicit PhdrStackObserver(std::optional<size_type>& size) : Base(phdr_), size_(size) {}
template <bool E = CanBeExecutable, typename = std::enable_if_t<E>>
PhdrStackObserver(std::optional<size_type>& size, bool& executable)
: Base(phdr_), size_(size), executable_(executable) {}
template <class Diag>
constexpr bool Finish(Diag& diag) {
using namespace std::literals::string_view_literals;
if (!phdr_) {
if constexpr (CanBeExecutable) {
executable_ = true;
return true;
} else {
return diag.FormatError("executable stack not supported: PT_GNU_STACK header required"sv);
}
}
const auto flags = phdr_->flags();
if ((flags & Phdr::kRead) == 0 &&
!diag.FormatError("stack is not readable: PF_R is not set"sv)) {
return false;
}
if ((flags & Phdr::kWrite) == 0 &&
!diag.FormatError("stack is not writable: PF_W is not set"sv)) {
return false;
}
if constexpr (CanBeExecutable) {
executable_ = (flags & Phdr::kExecute) != 0;
} else {
if ((flags & Phdr::kExecute) != 0 &&
!diag.FormatError("executable stack not supported: PF_X is set"sv)) {
return false;
}
}
if (phdr_->memsz != size_type{0}) {
size_ = phdr_->memsz;
}
return true;
}
private:
struct Empty {};
std::optional<Phdr> phdr_;
std::optional<size_type>& size_;
[[no_unique_address]] std::conditional_t<CanBeExecutable, bool&, Empty> executable_;
};
// A generic metadata, singleton observer that validates constraints around
// sizes, offset, address, and segment entry type.
template <class Elf, ElfPhdrType Type, typename EntryType = std::byte>
class PhdrMetadataObserver : public PhdrSingletonObserver<Elf, Type> {
private:
using Base = PhdrSingletonObserver<Elf, Type>;
using Phdr = typename Elf::Phdr;
public:
using Base::Base;
template <class Diag>
constexpr bool Finish(Diag& diag) {
using PhdrError = internal::PhdrError<Type>;
const std::optional<Phdr>& phdr = this->phdr();
if (!phdr) {
return true;
}
if (alignof(EntryType) > phdr->align() && //
!diag.FormatError(PhdrError::kIncompatibleEntryAlignment)) {
return false;
}
// Note that `p_vaddr % p_align == 0` implies that
// `p_offset % p_align == 0` by virtue of the general equivalence check
// made in DecodePhdrs().
if (phdr->vaddr() % phdr->align() != 0 && //
!diag.FormatError(PhdrError::kUnalignedVaddr)) {
return false;
}
if (phdr->memsz != phdr->filesz && //
!diag.FormatError(PhdrError::kFileszNotEqMemsz)) {
return false;
}
if (phdr->filesz() % sizeof(EntryType) != 0 && //
!diag.FormatError(PhdrError::kIncompatibleEntrySize)) {
return false;
}
return true;
}
};
template <class Elf>
using PhdrDynamicObserver = PhdrMetadataObserver<Elf, ElfPhdrType::kDynamic, typename Elf::Dyn>;
template <class Elf>
using PhdrInterpObserver = PhdrMetadataObserver<Elf, ElfPhdrType::kInterp>;
template <class Elf>
using PhdrEhFrameHdrObserver = PhdrMetadataObserver<Elf, ElfPhdrType::kEhFrameHdr>;
// PT_LOAD validation policy. Subsequent values extend previous ones.
enum class PhdrLoadPolicy {
// Universal checks for all phdrs are made here (beyond universal checks
// already made in `DecodePhdr()`):
// * `p_align` is runtime page-aligned.
// * `p_memsz >= p_filesz`;
// * `p_align`-aligned memory ranges (`[p_vaddr, p_vaddr + p_memsz)`) do
// not overlap and increase monotonically.
//
// Underspecified, pathological cases like where `p_vaddr + p_memsz` or
// `p_offset + p_filesz` overflow are checked as well.
kBasic,
// kFileRangeMonotonic further asserts that
// * `p_align`-aligned file offset ranges (`[p_offset, p_offset + p_filesz)`)
// do not overlap and increase monotonically.
//
// This condition is meaningful for an ELF loader because if a writable
// segment overlaps with any other segment, then one needs to map the former
// to a COW copy of that part of the file rather than reusing the file data
// directly (assuming one cares to not mutate the latter segment).
kFileRangeMonotonic,
// kContiguous further asserts that there is maximal 'contiguity' in the file
// and memory layouts:
// * `p_align`-aligned memory ranges are contiguous
// * `p_align`-aligned file offset ranges are contiguous
// * The first `p_offset` lies in the first page.
// The first two conditions ensure that the unused space between ranges is
// minimal, and permit the ELF file to be loaded as whole. Moreover, when
// loading as a whole, the last condition ensures minimality in the unused
// space in between the ELF header and the first `p_offset`.
kContiguous,
};
// A PT_LOAD observer for a given metadata policy.
template <class Elf, PhdrLoadPolicy Policy = PhdrLoadPolicy::kBasic>
class PhdrLoadObserver : public PhdrObserver<PhdrLoadObserver<Elf, Policy>, ElfPhdrType::kLoad> {
private:
using Base = PhdrSingletonObserver<Elf, ElfPhdrType::kStack>;
using Phdr = typename Elf::Phdr;
using size_type = typename Elf::size_type;
public:
// `vaddr_start` and `vaddr_size` are updated to track the size of the
// page-aligned memory image throughout observation.
PhdrLoadObserver(size_type page_size, size_type& vaddr_start, size_type& vaddr_size)
: vaddr_start_(vaddr_start), vaddr_size_(vaddr_size), page_size_(page_size) {
ZX_ASSERT(cpp20::has_single_bit(page_size));
vaddr_start_ = 0;
vaddr_size_ = 0;
ZX_DEBUG_ASSERT(NoHeadersSeen());
}
template <class Diag>
constexpr bool Observe(Diag& diag, PhdrTypeMatch<ElfPhdrType::kLoad> type, const Phdr& phdr) {
using namespace std::literals::string_view_literals;
// If `p_align` is not page-aligned, then this file cannot be loaded through
// normal memory mapping.
if (0 < phdr.align() && phdr.align() < page_size_ &&
!diag.FormatError("PT_LOAD's `p_align` is not page-aligned"sv)) {
return false;
}
if (phdr.memsz() == 0 && !diag.FormatWarning("PT_LOAD has `p_memsz == 0`"sv)) {
return false;
}
if (phdr.memsz() < phdr.filesz() && !diag.FormatError("PT_LOAD has `p_memsz < p_filez`"sv)) {
return false;
}
// A `p_align` of 0 signifies no alignment constraints. So that we can
// uniformally perform the usual alignment arithmetic below, we convert
// such a value to 1, which has the same intended effect.
auto align = std::max<size_type>(phdr.align(), 1);
// Technically, having `p_vaddr + p_memsz` or `p_offset + p_filesz` be
// exactly 2^64 is kosher per the ELF spec; however, such an ELF is not
// usable, so we conventionally error out here along with at the usual
// overflow scenarios.
constexpr auto kMax = std::numeric_limits<size_type>::max();
if (phdr.memsz() > kMax - phdr.vaddr()) [[unlikely]] {
return diag.FormatError("PT_LOAD has overflowing `p_vaddr + p_memsz`"sv);
}
if (phdr.vaddr() + phdr.memsz() > kMax - align + 1) [[unlikely]] {
return diag.FormatError("PT_LOAD has overflowing `p_align`-aligned `p_vaddr + p_memsz`"sv);
}
if (phdr.filesz() > kMax - phdr.offset()) [[unlikely]] {
return diag.FormatError("PT_LOAD has overflowing `p_offset + p_filesz`"sv);
}
if (phdr.offset() + phdr.filesz() > kMax - align + 1) [[unlikely]] {
return diag.FormatError("PT_LOAD has overflowing `p_align`-aligned `p_offset + p_filesz`"sv);
}
if (NoHeadersSeen()) {
if constexpr (Policy == PhdrLoadPolicy::kContiguous) {
if (phdr.offset() >= page_size_ &&
!diag.FormatError("first PT_LOAD's `p_offset` does not lie within the first page"sv))
[[unlikely]] {
return false;
}
}
vaddr_start_ = AlignDown(phdr.vaddr(), page_size_);
vaddr_size_ = AlignUp(phdr.vaddr() + phdr.memsz(), page_size_) - vaddr_start_;
UpdateHighWatermarks(phdr);
return true;
}
if (AlignDown(phdr.vaddr(), align) < high_memory_watermark_) [[unlikely]] {
return diag.FormatError(
"PT_LOAD has `p_align`-aligned memory ranges that overlap or do not increase monotonically"sv);
}
if constexpr (kTrackFileOffsets) {
if (AlignDown(phdr.offset(), align) < high_file_watermark_) [[unlikely]] {
return diag.FormatError(
"PT_LOAD has `p_align`-aligned file offset ranges that overlap or do not increase monotonically"sv);
}
}
if constexpr (Policy == PhdrLoadPolicy::kContiguous) {
if (AlignDown(phdr.vaddr(), align) != high_memory_watermark_) [[unlikely]] {
return diag.FormatError(
"PT_LOAD has `p_align`-aligned memory ranges that are not contiguous"sv);
}
if (AlignDown(phdr.offset(), align) != high_file_watermark_) [[unlikely]] {
return diag.FormatError(
"PT_LOAD has `p_align`-aligned file offset ranges that are not contiguous"sv);
}
}
vaddr_size_ = AlignUp(phdr.vaddr() + phdr.memsz(), page_size_) - vaddr_start_;
UpdateHighWatermarks(phdr);
return true;
}
template <class Diag>
constexpr bool Finish(Diag& diag) {
return true;
}
private:
struct Empty {};
// Whether the given policy requires tracking file offsets.
static constexpr bool kTrackFileOffsets = Policy != PhdrLoadPolicy::kBasic;
static constexpr size_type AlignUp(size_type value, size_type alignment) {
return (value + (alignment - 1)) & -alignment;
}
static constexpr size_type AlignDown(size_type value, size_type alignment) {
return value & -alignment;
}
// Whether any PT_LOAD header have yet been observed.
bool NoHeadersSeen() const { return vaddr_start_ == 0 && vaddr_size_ == 0; }
void UpdateHighWatermarks(const Phdr& phdr) {
auto align = std::max<size_type>(phdr.align(), 1); // As above.
high_memory_watermark_ = AlignUp(phdr.vaddr() + phdr.memsz(), align);
if constexpr (kTrackFileOffsets) {
high_file_watermark_ = AlignUp(phdr.offset() + phdr.filesz(), align);
}
}
// The total, observed page-aligned load segment range in memory.
size_type& vaddr_start_;
size_type& vaddr_size_;
// System page size.
const size_type page_size_;
// The highest `p_align`-aligned address and offset seen thus far.
size_type high_memory_watermark_;
[[no_unique_address]] std::conditional_t<kTrackFileOffsets, size_type, Empty>
high_file_watermark_;
};
} // namespace elfldltl
#endif // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_PHDR_H_
| 36.095634 | 112 | 0.689667 |
51158b6368614e223b327dac1b9dee51ff56e3f0 | 495 | h | C | System/Library/PrivateFrameworks/DiagnosticExtensions.framework/DiagnosticExtensions.h | lechium/tvOS10Headers | f0c99993da6cc502d36fdc5cb4ff90d94b12bf67 | [
"MIT"
] | 4 | 2017-03-23T00:01:54.000Z | 2018-08-04T20:16:32.000Z | System/Library/PrivateFrameworks/DiagnosticExtensions.framework/DiagnosticExtensions.h | lechium/tvOS10Headers | f0c99993da6cc502d36fdc5cb4ff90d94b12bf67 | [
"MIT"
] | null | null | null | System/Library/PrivateFrameworks/DiagnosticExtensions.framework/DiagnosticExtensions.h | lechium/tvOS10Headers | f0c99993da6cc502d36fdc5cb4ff90d94b12bf67 | [
"MIT"
] | 4 | 2017-05-14T16:23:26.000Z | 2019-12-21T15:07:59.000Z | #import <DiagnosticExtensions/DEExtensionHostContext.h>
#import <DiagnosticExtensions/DEExtension.h>
#import <DiagnosticExtensions/DEAttachmentItem.h>
#import <DiagnosticExtensions/DELogMover.h>
#import <DiagnosticExtensions/DEManagedDefaults.h>
#import <DiagnosticExtensions/DEExtensionManager.h>
#import <DiagnosticExtensions/DEExtensionProvider.h>
#import <DiagnosticExtensions/DEAttachmentGroup.h>
#import <DiagnosticExtensions/DEUtils.h>
#import <DiagnosticExtensions/DEExtensionContext.h>
| 45 | 55 | 0.858586 |
0b843ec57c40e34a7b0ee2c71349c26723ef8771 | 1,492 | py | Python | unit/either_spec.py | tek/amino | 51b314933e047a45587a24ecff02c836706d27ff | [
"MIT"
] | 33 | 2016-12-21T07:05:46.000Z | 2020-04-29T04:26:46.000Z | unit/either_spec.py | tek/amino | 51b314933e047a45587a24ecff02c836706d27ff | [
"MIT"
] | 1 | 2019-04-19T17:15:52.000Z | 2019-04-20T18:28:23.000Z | unit/either_spec.py | tek/amino | 51b314933e047a45587a24ecff02c836706d27ff | [
"MIT"
] | 4 | 2017-09-04T18:46:23.000Z | 2021-11-02T04:18:13.000Z | import operator
from amino.either import Left, Right
from amino import Empty, Just, Maybe, List, Either, _
from amino.test.spec_spec import Spec
from amino.list import Lists
class EitherSpec(Spec):
def map(self) -> None:
a = 'a'
b = 'b'
Right(a).map(_ + b).value.should.equal(a + b)
Left(a).map(_ + b).value.should.equal(a)
def optional(self) -> None:
a = 'a'
b = 'b'
Right(a).to_maybe.should.just_contain(a)
Left(a).to_maybe.should.be.a(Empty)
Right(a).to_either(b).should.equal(Right(a))
Left(a).to_either(b).should.equal(Left(a))
def ap2(self) -> None:
a = 'a'
b = 'b'
Right(a).ap2(Right(b), operator.add).should.equal(Right(a + b))
def traverse(self) -> None:
a = 'a'
Right(Just(a)).sequence(Maybe).should.equal(Just(Right(a)))
Left(Just(a)).sequence(Maybe).should.equal(Just(Left(Just(a))))
List(Right(a)).sequence(Either).should.equal(Right(List(a)))
List(Right(a), Left(a)).sequence(Either).should.equal(Left(a))
def fold_m(self) -> None:
def f(z: int, a: int) -> Either[str, int]:
return Right(z + a) if a < 5 else Left('too large')
Lists.range(5).fold_m(Right(8))(f).should.contain(18)
Lists.range(6).fold_m(Right(8))(f).should.be.left
def list_flat_map(self) -> None:
(List(Right(1), Left(2), Right(3)).join).should.equal(List(1, 3))
__all__ = ('EitherSpec',)
| 31.744681 | 73 | 0.586461 |