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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4cd9481798f4a603b7012e1e4b42649ff8973906
| 111
|
py
|
Python
|
Math/algebra/addition/python/add.py
|
rishiosaur/beginners-only
|
5466f99ccf7f32ba20f911a79d2cc6015a27b6e9
|
[
"MIT"
] | 16
|
2019-10-06T13:31:17.000Z
|
2022-02-17T12:49:05.000Z
|
Math/algebra/addition/python/add.py
|
rishiosaur/beginners-only
|
5466f99ccf7f32ba20f911a79d2cc6015a27b6e9
|
[
"MIT"
] | 26
|
2019-10-05T06:11:35.000Z
|
2020-11-17T13:16:02.000Z
|
Math/algebra/addition/python/add.py
|
rishiosaur/beginners-only
|
5466f99ccf7f32ba20f911a79d2cc6015a27b6e9
|
[
"MIT"
] | 88
|
2019-10-05T08:16:46.000Z
|
2021-10-01T09:24:39.000Z
|
def add(first,second):
"""Adds two numbers"""
return first + second
if __name__ == "__main__":
add(2,3)
| 15.857143
| 26
| 0.63964
|
65e01ff87f73dc9e759d6fd7be5145790b7da5c4
| 258
|
dart
|
Dart
|
lib/utils.dart
|
loloof64/GenericDice
|
90bad2cbb593af0adbecde4463542273b1070450
|
[
"MIT"
] | null | null | null |
lib/utils.dart
|
loloof64/GenericDice
|
90bad2cbb593af0adbecde4463542273b1070450
|
[
"MIT"
] | null | null | null |
lib/utils.dart
|
loloof64/GenericDice
|
90bad2cbb593af0adbecde4463542273b1070450
|
[
"MIT"
] | null | null | null |
String replaceVariables(String message, Map<String, String> variables) {
for (var entry in variables.entries) {
final currKey = entry.key;
final currVal = entry.value;
message = message.replaceAll("[$currKey]", currVal);
}
return message;
}
| 32.25
| 72
| 0.70155
|
88725318b71d78f48ed46e5e2346e206bc2980e0
| 158
|
dart
|
Dart
|
lib/src/data_converter.dart
|
karbunkul/flutter_any_to_widget
|
985b453e053f76bddd8444bfc5de222801f3ca0f
|
[
"MIT"
] | null | null | null |
lib/src/data_converter.dart
|
karbunkul/flutter_any_to_widget
|
985b453e053f76bddd8444bfc5de222801f3ca0f
|
[
"MIT"
] | null | null | null |
lib/src/data_converter.dart
|
karbunkul/flutter_any_to_widget
|
985b453e053f76bddd8444bfc5de222801f3ca0f
|
[
"MIT"
] | null | null | null |
import 'package:flutter/widgets.dart';
abstract class DataConverter {
bool hasMatch(dynamic data);
Widget convert(BuildContext context, dynamic data);
}
| 22.571429
| 53
| 0.778481
|
c67c958ffc2201b813625c1c97feb05fbc636b55
| 1,108
|
py
|
Python
|
tools/get_raw_calltips.py
|
CoppeliaRobotics/zmqRemoteApi
|
826be2ac8b7a7561be9709732d854f46963e60a6
|
[
"BSD-3-Clause"
] | 4
|
2021-11-22T11:55:56.000Z
|
2022-03-01T02:12:04.000Z
|
tools/get_raw_calltips.py
|
CoppeliaRobotics/zmqRemoteApi
|
826be2ac8b7a7561be9709732d854f46963e60a6
|
[
"BSD-3-Clause"
] | null | null | null |
tools/get_raw_calltips.py
|
CoppeliaRobotics/zmqRemoteApi
|
826be2ac8b7a7561be9709732d854f46963e60a6
|
[
"BSD-3-Clause"
] | 2
|
2022-01-29T17:47:54.000Z
|
2022-02-02T18:25:05.000Z
|
if __name__ == '__main__':
import sys
if len(sys.argv) != 2:
print(f'usage: {sys.argv[0]} <output-file.json>')
sys.exit(2)
try:
import json
from zmqRemoteApi import RemoteAPIClient
client = RemoteAPIClient()
sim = client.getObject('sim')
def progress(i, lst, prev_pct):
pct = int((i + 1) * 100 / len(lst))
if pct == prev_pct:
return pct
msg = f'\rReading calltips: {pct}%...'
if pct == 100:
msg = '\r' + ' ' * len(msg) + '\r'
sys.stdout.write(msg)
sys.stdout.flush()
return pct
with open(sys.argv[1], 'wt') as f:
all_funcs = sim.getApiFunc(-1, '+')
calltips = {}
pct = -1
for i, func in enumerate(all_funcs):
pct = progress(i, all_funcs, pct)
calltips[func] = sim.getApiInfo(-1, func)
json.dump(calltips, f, indent=4, separators=(',', ': '))
except Exception as e:
print(f'error: {e}')
sys.exit(1)
| 29.157895
| 68
| 0.475632
|
ae3a3e4727e4687235808f7b412656426670b064
| 2,324
|
cshtml
|
C#
|
fi.retorch.com/fi.retorch.com/Areas/Dashboard/Views/Transactions/_Delete.cshtml
|
jcbeck37/fi-retorch
|
123557106e8d4b946a4dd5285acbe41acd2a56ff
|
[
"MIT"
] | null | null | null |
fi.retorch.com/fi.retorch.com/Areas/Dashboard/Views/Transactions/_Delete.cshtml
|
jcbeck37/fi-retorch
|
123557106e8d4b946a4dd5285acbe41acd2a56ff
|
[
"MIT"
] | null | null | null |
fi.retorch.com/fi.retorch.com/Areas/Dashboard/Views/Transactions/_Delete.cshtml
|
jcbeck37/fi-retorch
|
123557106e8d4b946a4dd5285acbe41acd2a56ff
|
[
"MIT"
] | null | null | null |
@model fi.retorch.com.Areas.Dashboard.Models.TransactionModel
<div class="modal-header hide">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Delete Transaction</h4>
</div>
<div class="modal-body">
<dl>
<dt>
@Html.DisplayNameFor(model => model.AccountId)
</dt>
<dd>
@Html.DisplayFor(model => model.AccountName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.CategoryId)
</dt>
<dd>
@Html.DisplayFor(model => model.CategoryName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DisplayDate)
</dt>
<dd>
@Html.DisplayFor(model => model.DisplayDate)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Amount)
</dt>
<dd>
@Html.DisplayFor(model => model.Amount, new { Value = Model.Amount * (Model.IsCredit ? 1 : -1) })
</dd>
<dt>
@Html.DisplayNameFor(model => model.IsPosted)
</dt>
<dd>
@Html.DisplayFor(model => model.IsPosted)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DatePosted)
</dt>
<dd>
@Html.DisplayFor(model => model.DatePosted)
</dd>
</dl>
@using (Ajax.BeginForm("Delete", "Transactions", FormMethod.Post, new AjaxOptions(), new { name = "frmTransactionDelete" }))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(model => model.RedirectController)
<div class="form-actions no-color buttons">
<input type="submit" value="Delete" class="btn btn-danger" />
</div>
<div class="modal-footer hide">
<div class="row">
<div class="col-md-4">
<input type="submit" value="Delete" class="btn btn-danger" />
</div>
<div class="col-md-8 text-right">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
}
</div>
| 27.023256
| 128
| 0.509466
|
92ef7b7be633ed77324ef7acfbf7fdc6a03ecee8
| 337
|
cql
|
SQL
|
embedded-cassandra-extension-example/src/test/resources/com/myorg/cassandra/extension/example/database/repository/external-simple-insert.cql
|
shaileshre/embedded-cassandra-extension
|
e5af84514a719d5b378c07e810bb9f197d1084d0
|
[
"Apache-2.0"
] | 1
|
2019-09-04T00:07:54.000Z
|
2019-09-04T00:07:54.000Z
|
embedded-cassandra-extension-example/src/test/resources/com/myorg/cassandra/extension/example/database/repository/external-simple-insert.cql
|
shaileshre/embedded-cassandra-extension
|
e5af84514a719d5b378c07e810bb9f197d1084d0
|
[
"Apache-2.0"
] | null | null | null |
embedded-cassandra-extension-example/src/test/resources/com/myorg/cassandra/extension/example/database/repository/external-simple-insert.cql
|
shaileshre/embedded-cassandra-extension
|
e5af84514a719d5b378c07e810bb9f197d1084d0
|
[
"Apache-2.0"
] | null | null | null |
INSERT INTO myTable(id, value) values('myKey01','myValue01');
INSERT INTO myTable(id, value) values('myKey02','myValue02');
//INSERT INTO myTable(id, value, description) values('myKey01','myValue01', 'schema validation example');
//INSERT INTO myTable(id, value, description) values('myKey02','myValue02', 'schema validation example');
| 56.166667
| 105
| 0.747774
|
c2d2ed3b922f6c0c19b48202e68cde04aa6d4826
| 255
|
sql
|
SQL
|
spring/src/main/resources/schema.sql
|
linksgo2011/java-self-testing-example
|
ef381aab16366e54eb54d19021e5f832f25f0f8f
|
[
"Apache-2.0"
] | 8
|
2020-11-11T01:31:36.000Z
|
2022-02-15T11:18:05.000Z
|
spring/src/main/resources/schema.sql
|
linksgo2011/java-self-testing-example
|
ef381aab16366e54eb54d19021e5f832f25f0f8f
|
[
"Apache-2.0"
] | null | null | null |
spring/src/main/resources/schema.sql
|
linksgo2011/java-self-testing-example
|
ef381aab16366e54eb54d19021e5f832f25f0f8f
|
[
"Apache-2.0"
] | 2
|
2020-08-09T03:33:59.000Z
|
2020-11-10T08:54:55.000Z
|
CREATE TABLE user (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`username` varchar(255) DEFAULT '' COMMENT '用户名',
`password` varchar(255) DEFAULT '' COMMENT '密码',
`createAt` datetime NOT NULL,
`updateAt` datetime NOT NULL
);
| 31.875
| 57
| 0.666667
|
97b690d7fe532a3d6af2c18fb65635cf2e358365
| 1,765
|
go
|
Go
|
alsa/list_devices.go
|
gurupras/dhwani_backend_p2p
|
5369d58f25bc76e0f7b4d685d60b116baff634fd
|
[
"MIT"
] | null | null | null |
alsa/list_devices.go
|
gurupras/dhwani_backend_p2p
|
5369d58f25bc76e0f7b4d685d60b116baff634fd
|
[
"MIT"
] | null | null | null |
alsa/list_devices.go
|
gurupras/dhwani_backend_p2p
|
5369d58f25bc76e0f7b4d685d60b116baff634fd
|
[
"MIT"
] | null | null | null |
package alsa
import (
"fmt"
"strings"
"github.com/gurupras/dhwani_backend_p2p/types"
log "github.com/sirupsen/logrus"
"github.com/yobert/alsa"
)
func ListDevicesWithLib() ([]*types.AudioDevice, error) {
cards, err := alsa.OpenCards()
if err != nil {
return nil, err
}
log.Debugf("Got %v cards\n", len(cards))
results := make([]*types.AudioDevice, 0)
for _, card := range cards {
cardDevices, err := card.Devices()
cardInfo := make([]string, 0)
if err != nil {
log.Warnf("Failed to enumerate devices of card '%v': %v\n", card.String(), err)
continue
}
cardInfo = append(cardInfo, fmt.Sprintf("%v number=%v path=%v", card.Title, card.Number, card.Path))
for _, dev := range cardDevices {
device := &types.AudioDevice{
Name: fmt.Sprintf("%v [%v]", card.Title, dev.Title),
Identifier: fmt.Sprintf("hw:%v,%v", card.Number, dev.Number),
CanPlay: dev.Play,
CanRecord: dev.Record,
}
results = append(results, device)
cardInfo = append(cardInfo, fmt.Sprintf("\tNumber: %v", dev.Number))
cardInfo = append(cardInfo, fmt.Sprintf("\tPath: %v", dev.Path))
cardInfo = append(cardInfo, fmt.Sprintf("\tPlay: %v", dev.Play))
cardInfo = append(cardInfo, fmt.Sprintf("\tRecord: %v", dev.Record))
cardInfo = append(cardInfo, fmt.Sprintf("\tTitle: %v", dev.Title))
cardInfo = append(cardInfo, fmt.Sprintf("\tType: %v", dev.Type))
}
log.Debugf("%v\n", strings.Join(cardInfo, "\n"))
}
return results, nil
}
// func ListDevicesWithALSAUtils() ([]*ALSADevice, error) {
// playOutput, err := exec.Command("aplay -l").Output()
// if err != nil {
// return nil, err
// }
// recordOutput, err := exec.Command("arecord -l").Output()
// if err != nil {
// return nil, err
// }
// }
| 29.915254
| 103
| 0.634561
|
dfdc8d01e3c584325a033a0e044b1b505e49efd8
| 267
|
cs
|
C#
|
LooseLeaf.Business/Models/Results/IUserResult.cs
|
2102-feb08-net/team1-p2
|
16a7ceb41d0de0fff89e7a09926fb78cf5de062d
|
[
"MIT"
] | null | null | null |
LooseLeaf.Business/Models/Results/IUserResult.cs
|
2102-feb08-net/team1-p2
|
16a7ceb41d0de0fff89e7a09926fb78cf5de062d
|
[
"MIT"
] | 9
|
2021-03-12T20:52:28.000Z
|
2021-03-18T23:49:32.000Z
|
LooseLeaf.Business/Models/Results/IUserResult.cs
|
2102-feb08-net/team1-p2
|
16a7ceb41d0de0fff89e7a09926fb78cf5de062d
|
[
"MIT"
] | null | null | null |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LooseLeaf.Business.Models.Results
{
public interface IUserResult
{
int Id { get; }
string Username { get; }
}
}
| 19.071429
| 43
| 0.692884
|
be05c3adbfb4b95028a4605d8d72a6a0fdfb9a19
| 2,524
|
ts
|
TypeScript
|
packages/gitbeaker-core/test/unit/templates/ResourceDiscussions.ts
|
vboulaye/gitbeaker
|
8290c7f1db29e2fa52b663c6118188a3adfae070
|
[
"MIT"
] | null | null | null |
packages/gitbeaker-core/test/unit/templates/ResourceDiscussions.ts
|
vboulaye/gitbeaker
|
8290c7f1db29e2fa52b663c6118188a3adfae070
|
[
"MIT"
] | null | null | null |
packages/gitbeaker-core/test/unit/templates/ResourceDiscussions.ts
|
vboulaye/gitbeaker
|
8290c7f1db29e2fa52b663c6118188a3adfae070
|
[
"MIT"
] | null | null | null |
import { ResourceDiscussions } from '../../../src/templates';
import { RequestHelper } from '../../../src/infrastructure';
jest.mock(
'../../../src/infrastructure/RequestHelper',
() => require('../../__mocks__/RequestHelper').default,
);
let service: ResourceDiscussions;
beforeEach(() => {
service = new ResourceDiscussions('resource1', 'resource2', {
requesterFn: jest.fn(),
token: 'abcdefg',
});
});
describe('Instantiating ResourceDiscussions service', () => {
it('should create a valid service object', async () => {
expect(service).toBeInstanceOf(ResourceDiscussions);
expect(service.url).toBeDefined();
expect(service.rejectUnauthorized).toBeTruthy();
expect(service.headers).toMatchObject({ 'private-token': 'abcdefg' });
});
});
describe('ResourceDiscussions.addNote', () => {
it('should call the correct url', async () => {
await service.addNote(1, 2, 3, 4, 'test');
expect(RequestHelper.post()).toHaveBeenCalledWith(
service,
'1/resource2/2/discussions/3/notes',
{
noteId: '4',
body: 'test',
},
);
});
});
describe('ResourceCustomAttributes.all', () => {
it('should call the correct url with a resource id', async () => {
await service.all(1, 2);
expect(RequestHelper.get()).toBeCalledWith(service, '1/resource2/2/discussions', undefined);
});
});
describe('ResourceDiscussions.create', () => {
it('should call the correct url', async () => {
await service.create(1, 2, 'test');
expect(RequestHelper.post()).toHaveBeenCalledWith(service, '1/resource2/2/discussions', {
body: 'test',
});
});
});
describe('ResourceDiscussions.editNote', () => {
it('should call the correct url', async () => {
await service.editNote(1, 2, 3, 4, 'test');
expect(RequestHelper.put()).toHaveBeenCalledWith(
service,
'1/resource2/2/discussions/3/notes/4',
{
body: 'test',
},
);
});
});
describe('ResourceDiscussions.removeNote', () => {
it('should call the correct url', async () => {
await service.removeNote(1, 2, 3, 4);
expect(RequestHelper.del()).toHaveBeenCalledWith(
service,
'1/resource2/2/discussions/3/notes/4',
undefined,
);
});
});
describe('ResourceDiscussions.show', () => {
it('should call the correct url', async () => {
await service.show(1, 2, 3);
expect(RequestHelper.get()).toHaveBeenCalledWith(
service,
'1/resource2/2/discussions/3',
undefined,
);
});
});
| 26.020619
| 96
| 0.619255
|
6220c1942b6b0e4588eeeea941141107756e064b
| 5,623
|
sql
|
SQL
|
application/install/data/opensmarty-v1.0.0.sql
|
opensmarty/learntp5
|
e4d6484f99c3448522d4a63f64bf61a2721ab3f6
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
application/install/data/opensmarty-v1.0.0.sql
|
opensmarty/learntp5
|
e4d6484f99c3448522d4a63f64bf61a2721ab3f6
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
application/install/data/opensmarty-v1.0.0.sql
|
opensmarty/learntp5
|
e4d6484f99c3448522d4a63f64bf61a2721ab3f6
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : 127.0.0.1:3306
Source Database : os
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-09-16 19:00:31
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for os_articles
-- ----------------------------
DROP TABLE IF EXISTS `os_articles`;
CREATE TABLE `os_articles` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '文章id',
`title` varchar(155) NOT NULL COMMENT '文章标题',
`description` varchar(255) NOT NULL COMMENT '文章描述',
`keywords` varchar(155) NOT NULL COMMENT '文章关键字',
`thumbnail` varchar(255) NOT NULL COMMENT '文章缩略图',
`content` text NOT NULL COMMENT '文章内容',
`add_time` datetime NOT NULL COMMENT '发布时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of os_articles
-- ----------------------------
INSERT INTO `os_articles` VALUES ('2', '文章标题', '文章描述', '关键字1,关键字2,关键字3', '/upload/20170916/1e915c70dbb9d3e8a07bede7b64e4cff.png', '<p><img src=\"/upload/image/20170916/1505555254.png\" title=\"1505555254.png\" alt=\"QQ截图20170916174651.png\"/></p><p>测试文章内容</p><p>测试内容</p>', '2017-09-16 17:47:44');
-- ----------------------------
-- Table structure for os_node
-- ----------------------------
DROP TABLE IF EXISTS `os_node`;
CREATE TABLE `os_node` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`node_name` varchar(155) NOT NULL DEFAULT '' COMMENT '节点名称',
`control_name` varchar(155) NOT NULL DEFAULT '' COMMENT '控制器名',
`action_name` varchar(155) NOT NULL COMMENT '方法名',
`is_menu` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否是菜单项 1不是 2是',
`type_id` int(11) NOT NULL COMMENT '父级节点id',
`style` varchar(155) DEFAULT '' COMMENT '菜单样式',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Records of os_node
-- ----------------------------
INSERT INTO `os_node` VALUES ('1', '用户管理', '#', '#', '2', '0', 'fa fa-users');
INSERT INTO `os_node` VALUES ('2', '管理员管理', 'user', 'index', '2', '1', '');
INSERT INTO `os_node` VALUES ('3', '添加管理员', 'user', 'useradd', '1', '2', '');
INSERT INTO `os_node` VALUES ('4', '编辑管理员', 'user', 'useredit', '1', '2', '');
INSERT INTO `os_node` VALUES ('5', '删除管理员', 'user', 'userdel', '1', '2', '');
INSERT INTO `os_node` VALUES ('6', '角色管理', 'role', 'index', '2', '1', '');
INSERT INTO `os_node` VALUES ('7', '添加角色', 'role', 'roleadd', '1', '6', '');
INSERT INTO `os_node` VALUES ('8', '编辑角色', 'role', 'roleedit', '1', '6', '');
INSERT INTO `os_node` VALUES ('9', '删除角色', 'role', 'roledel', '1', '6', '');
INSERT INTO `os_node` VALUES ('10', '分配权限', 'role', 'giveaccess', '1', '6', '');
INSERT INTO `os_node` VALUES ('11', '系统管理', '#', '#', '2', '0', 'fa fa-desktop');
INSERT INTO `os_node` VALUES ('12', '数据备份/还原', 'data', 'index', '2', '11', '');
INSERT INTO `os_node` VALUES ('13', '备份数据', 'data', 'importdata', '1', '12', '');
INSERT INTO `os_node` VALUES ('14', '还原数据', 'data', 'backdata', '1', '12', '');
INSERT INTO `os_node` VALUES ('15', '节点管理', 'node', 'index', '2', '1', '');
INSERT INTO `os_node` VALUES ('16', '添加节点', 'node', 'nodeadd', '1', '15', '');
INSERT INTO `os_node` VALUES ('17', '编辑节点', 'node', 'nodeedit', '1', '15', '');
INSERT INTO `os_node` VALUES ('18', '删除节点', 'node', 'nodedel', '1', '15', '');
INSERT INTO `os_node` VALUES ('19', '文章管理', 'articles', 'index', '2', '0', 'fa fa-book');
INSERT INTO `os_node` VALUES ('20', '文章列表', 'articles', 'index', '2', '19', '');
INSERT INTO `os_node` VALUES ('21', '添加文章', 'articles', 'articleadd', '1', '19', '');
INSERT INTO `os_node` VALUES ('22', '编辑文章', 'articles', 'articleedit', '1', '19', '');
INSERT INTO `os_node` VALUES ('23', '删除文章', 'articles', 'articledel', '1', '19', '');
INSERT INTO `os_node` VALUES ('24', '上传图片', 'articles', 'uploadImg', '1', '19', '');
-- ----------------------------
-- Table structure for os_role
-- ----------------------------
DROP TABLE IF EXISTS `os_role`;
CREATE TABLE `os_role` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`role_name` varchar(155) NOT NULL COMMENT '角色名称',
`rule` varchar(255) DEFAULT '' COMMENT '权限节点数据',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Records of os_role
-- ----------------------------
INSERT INTO `os_role` VALUES ('1', '超级管理员', '*');
INSERT INTO `os_role` VALUES ('2', '系统维护员', '1,2,3,4,5,6,7,8,9,10');
-- ----------------------------
-- Table structure for os_user
-- ----------------------------
DROP TABLE IF EXISTS `os_user`;
CREATE TABLE `os_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '密码',
`login_times` int(11) NOT NULL DEFAULT '0' COMMENT '登陆次数',
`last_login_ip` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '最后登录IP',
`last_login_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
`real_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '真实姓名',
`status` int(1) NOT NULL DEFAULT '0' COMMENT '状态',
`role_id` int(11) NOT NULL DEFAULT '1' COMMENT '用户角色id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of os_user
-- ----------------------------
INSERT INTO `os_user` VALUES ('1', 'admin', '21232f297a57a5a743894a0e4a801fc3', '41', '127.0.0.1', '1505559479', 'admin', '1', '1');
| 47.252101
| 296
| 0.587587
|
e08c6f4d325bad601d9cf9a1e2c73a7c10fa4379
| 2,092
|
lua
|
Lua
|
lua/starfall/libs_sh/game.lua
|
shantih19/StarfallEx
|
ad7b5ea0a51da5067d606a1293c97f7a74a4cd47
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] | 1
|
2020-03-20T12:04:24.000Z
|
2020-03-20T12:04:24.000Z
|
lua/starfall/libs_sh/game.lua
|
shantih19/StarfallEx
|
ad7b5ea0a51da5067d606a1293c97f7a74a4cd47
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null |
lua/starfall/libs_sh/game.lua
|
shantih19/StarfallEx
|
ad7b5ea0a51da5067d606a1293c97f7a74a4cd47
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null |
--- Game functions
-- @name game
-- @class library
-- @libtbl game_library
SF.RegisterLibrary("game")
return function(instance)
local game_library = instance.Libraries.game
local vwrap = instance.Types.Vector.Wrap
--- Returns the map name
-- @name game_library.getMap
-- @class function
-- @return string The name of the current map
game_library.getMap = game.GetMap
--- Returns The hostname
-- @name game_library.getHostname
-- @class function
-- @return string The hostname of the server
game_library.getHostname = GetHostName
--- Returns true if the server is on a LAN
-- @return boolean True if the game is a lan game
function game_library.isLan()
return GetConVar("sv_lan"):GetBool()
end
--- Returns whether or not the current game is single player
-- @name game_library.isSinglePlayer
-- @class function
-- @return boolean True if the game is singleplayer
game_library.isSinglePlayer = game.SinglePlayer
--- Returns whether or not the server is a dedicated server
-- @name game_library.isDedicated
-- @class function
-- @return boolean True if the game is a dedicated server
game_library.isDedicated = game.IsDedicated
--- Returns the maximum player limit
-- @name game_library.getMaxPlayers
-- @class function
-- @return number The max players allowed by the server
game_library.getMaxPlayers = game.MaxPlayers
--- Checks whether the specified game is mounted
-- @name String identifier of the game, eg. 'cstrike'
-- @class function
-- @return True if the game is mounted
game_library.isMounted = IsMounted
if CLIENT then
--- Returns if the game has focus or not, i.e. will return false if the game is minimized
-- @name game_library.hasFocus
-- @client
-- @class function
-- @return boolean True if the game is focused
game_library.hasFocus = system.HasFocus
--- Returns the direction and how obstructed the map's sun is
-- @client
-- @return vector The direction of the sun
-- @return number How obstructed the sun is 0 to 1.
function game_library.getSunInfo()
local info = util.GetSunInfo()
return vwrap(info.direction), info.obstruction
end
end
end
| 27.893333
| 90
| 0.75478
|
5f331f3d905b84a581308e0fc968027d0cfbd7a4
| 629
|
lua
|
Lua
|
tests/max.lua
|
LuaDist-testing/rxlua
|
e46612c14b45b0181ffaf2dde47328a7a56b07b4
|
[
"MIT"
] | null | null | null |
tests/max.lua
|
LuaDist-testing/rxlua
|
e46612c14b45b0181ffaf2dde47328a7a56b07b4
|
[
"MIT"
] | null | null | null |
tests/max.lua
|
LuaDist-testing/rxlua
|
e46612c14b45b0181ffaf2dde47328a7a56b07b4
|
[
"MIT"
] | null | null | null |
describe('max', function()
it('produces an error if its parent errors', function()
local observable = Rx.Observable.fromValue(''):map(function(x) return x() end)
expect(observable.subscribe).to.fail()
expect(observable:max().subscribe).to.fail()
end)
it('produces an error if one of the values produced is a string', function()
local observable = Rx.Observable.fromValue('string'):max()
expect(observable.subscribe).to.fail()
end)
it('produces the maximum of all values produced', function()
local observable = Rx.Observable.fromRange(5):max()
expect(observable).to.produce(5)
end)
end)
| 34.944444
| 82
| 0.704293
|
218a4a18429fc8d6081f648d1fb01c71048eb12a
| 426
|
js
|
JavaScript
|
test/browser.stub.js
|
log4b0at/pegjs
|
fe63207fbfcb23ff5fd6f8d77db2255b2ecdbc45
|
[
"MIT"
] | 3,299
|
2015-01-02T21:48:38.000Z
|
2022-03-29T14:32:43.000Z
|
test/browser.stub.js
|
manbaum/pegjs
|
aadea922fc6270a9c31aa16d10a78371a09dba0c
|
[
"MIT"
] | 441
|
2015-01-01T15:14:35.000Z
|
2022-03-11T07:28:51.000Z
|
test/browser.stub.js
|
manbaum/pegjs
|
aadea922fc6270a9c31aa16d10a78371a09dba0c
|
[
"MIT"
] | 402
|
2015-01-04T16:39:44.000Z
|
2022-03-04T07:39:50.000Z
|
/* globals mocha */
"use strict";
/*
This file is loaded through Webpack to automatically get mocha test files,
and create a valid bundled file that executes on the browser.
*/
require( "mocha/mocha.js" );
mocha.setup( {
reporter: "html",
ui: "bdd",
} );
const context = require.context( "./", true, /.+\.(spec|test)\.js?$/ );
context.keys().forEach( context );
process.nextTick( () => mocha.run() );
| 17.75
| 78
| 0.626761
|
a34a3dba4572db6500e34a712a3ea7b19e948e70
| 1,325
|
java
|
Java
|
client/hotrod-client/src/test/java/org/infinispan/client/hotrod/TransportObjectFactoryTest.java
|
blueblueblue/infinispan
|
9299bfa935ca9c0c3178f323da57de7b83243c42
|
[
"Apache-2.0"
] | null | null | null |
client/hotrod-client/src/test/java/org/infinispan/client/hotrod/TransportObjectFactoryTest.java
|
blueblueblue/infinispan
|
9299bfa935ca9c0c3178f323da57de7b83243c42
|
[
"Apache-2.0"
] | null | null | null |
client/hotrod-client/src/test/java/org/infinispan/client/hotrod/TransportObjectFactoryTest.java
|
blueblueblue/infinispan
|
9299bfa935ca9c0c3178f323da57de7b83243c42
|
[
"Apache-2.0"
] | null | null | null |
package org.infinispan.client.hotrod;
import org.infinispan.client.hotrod.exceptions.TransportException;
import org.infinispan.client.hotrod.impl.protocol.Codec;
import org.infinispan.client.hotrod.impl.protocol.HeaderParams;
import org.infinispan.client.hotrod.impl.transport.Transport;
import org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory;
import org.testng.annotations.Test;
import java.net.InetSocketAddress;
import java.util.concurrent.atomic.AtomicInteger;
import static org.testng.AssertJUnit.assertFalse;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
/**
* @author Mircea Markus
* @since 6.0
*/
@Test (groups = "unit", testName = "client.hotrod.TransportObjectFactoryTest")
public class TransportObjectFactoryTest {
public void testValidate() {
Codec codec = mock(Codec.class);
TransportObjectFactory objectFactory = new TransportObjectFactory(codec, null, new AtomicInteger());
doThrow(new TransportException("induced!", null))
.when(codec).writeHeader(any(Transport.class), any(HeaderParams.class));
InetSocketAddress address = new InetSocketAddress(123);
assertFalse("Exception shouldn't be thrown here", objectFactory.validateObject(address, null));
}
}
| 37.857143
| 106
| 0.783396
|
25ac5eed9e4cf2d6485d64a9139cb9418e8fec84
| 601
|
cs
|
C#
|
src/Core/Riganti.Selenium.Core/Factories/Implementation/ChromeFastWebBrowserFactory.cs
|
JaskaRoman/selenium-utils
|
a29ea4a01062181f43cf88eb4cb85de316f3687b
|
[
"Apache-2.0"
] | 11
|
2016-06-20T05:13:40.000Z
|
2021-11-07T20:18:49.000Z
|
src/Core/Riganti.Selenium.Core/Factories/Implementation/ChromeFastWebBrowserFactory.cs
|
JaskaRoman/selenium-utils
|
a29ea4a01062181f43cf88eb4cb85de316f3687b
|
[
"Apache-2.0"
] | 6
|
2016-07-21T15:40:05.000Z
|
2020-12-06T23:20:59.000Z
|
src/Core/Riganti.Selenium.Core/Factories/Implementation/ChromeFastWebBrowserFactory.cs
|
JaskaRoman/selenium-utils
|
a29ea4a01062181f43cf88eb4cb85de316f3687b
|
[
"Apache-2.0"
] | 7
|
2016-09-08T23:56:27.000Z
|
2021-07-15T18:19:48.000Z
|
using Riganti.Selenium.Core.Drivers;
using Riganti.Selenium.Core.Drivers.Implementation;
using Riganti.Selenium.Core.Configuration;
using Riganti.Selenium.Core.Logging;
namespace Riganti.Selenium.Core.Factories.Implementation
{
public class ChromeFastWebBrowserFactory : FastLocalWebBrowserFactory
{
public override string Name => "chrome:fast";
protected override IWebBrowser CreateBrowser()
{
return new ChromeFastWebBrowser(this);
}
public ChromeFastWebBrowserFactory(TestSuiteRunner runner) : base(runner)
{
}
}
}
| 28.619048
| 81
| 0.717138
|
ffac789ff31fabc5265b4277a42f097ed847a381
| 3,237
|
py
|
Python
|
samples/oci-apigw-display-httprequest-info-python/func.py
|
ojasvajain/oracle-functions-samples
|
268fe177e50349fa4d826be6370493b3d678506d
|
[
"Apache-2.0"
] | 1
|
2022-01-18T05:45:13.000Z
|
2022-01-18T05:45:13.000Z
|
samples/oci-apigw-display-httprequest-info-python/func.py
|
ojasvajain/oracle-functions-samples
|
268fe177e50349fa4d826be6370493b3d678506d
|
[
"Apache-2.0"
] | null | null | null |
samples/oci-apigw-display-httprequest-info-python/func.py
|
ojasvajain/oracle-functions-samples
|
268fe177e50349fa4d826be6370493b3d678506d
|
[
"Apache-2.0"
] | null | null | null |
#
# oci-apigw-display-httprequest-info-python version 1.0.
#
# Copyright (c) 2020 Oracle, Inc.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
import io
import json
import oci
import logging
from urllib.parse import urlparse, parse_qs
from fdk import response
def handler(ctx, data: io.BytesIO=None):
logging.getLogger().info("function handler start")
resp = {}
# retrieving the request headers
headers = ctx.Headers()
logging.getLogger().info("Headers: " + json.dumps(headers))
resp["Headers"] = headers
# retrieving the function configuration
resp["Configuration"] = dict(ctx.Config())
logging.getLogger().info("Configuration: " + json.dumps(resp["Configuration"]))
# retrieving the request body, e.g. {"key1":"value"}
#requestbody_bytes = data.getvalue()
#if requestbody_bytes==b'':
# logging.getLogger().info("No request body")
# requestbody = {}
#else:
# requestbody = json.loads(requestbody_bytes)
# logging.getLogger().info()
try:
requestbody_str = data.getvalue().decode('UTF-8')
if requestbody_str:
resp["Request body"] = json.loads(requestbody_str)
else:
resp["Request body"] = {}
except Exception as ex:
print('ERROR: The request body is not JSON', ex, flush=True)
raise
# retrieving the request URL, e.g. "/v1/display-uri-info"
requesturl = ctx.RequestURL()
logging.getLogger().info("Request URL: " + json.dumps(requesturl))
resp["Request URL"] = requesturl
# retrieving query string from the request URL, e.g. {"param1":["value"]}
parsed_url = urlparse(requesturl)
resp["Query String"] = parse_qs(parsed_url.query)
logging.getLogger().info("Query string: " + json.dumps(resp["Query String"]))
# retrieving the request method, e.g. "POST", "GET"...
method = ctx.Method()
if method:
logging.getLogger().info("Request Method: " + method)
resp["Request Method"] = method
else:
logging.getLogger().info("No Request Method")
resp["Request Method"] = None
# retrieving the Application ID, e.g. "ocid1.fnapp.oc1.phx.aaaaxxxx"
appid = ctx.AppID()
logging.getLogger().info("AppID: " + appid)
resp["AppID"] = appid
# retrieving the Function ID, e.g. "ocid1.fnfunc.oc1.phx.aaaaxxxxx"
fnid = ctx.FnID()
logging.getLogger().info("FnID: " + fnid)
resp["FnID"] = fnid
# retrieving the Function call ID, e.g. "01E9FE6JBW1BT0C68ZJ003KR1Q"
callid = ctx.CallID()
logging.getLogger().info("CallID: " + callid)
resp["CallID"] = callid
# retrieving the Function format, e.g. "http-stream"
fnformat = ctx.Format()
logging.getLogger().info("Format: " + fnformat)
resp["Format"] = fnformat
# retrieving the Function deadline, e.g. "2020-05-29T05:24:46Z"
deadline = ctx.Deadline()
logging.getLogger().info("Deadline: " + deadline)
resp["Deadline"] = deadline
logging.getLogger().info("function handler end")
return response.Response(
ctx,
response_data=json.dumps(resp),
headers={"Content-Type": "application/json"}
)
| 32.69697
| 104
| 0.646277
|
1aa558c3c13239795a2a352fa48c8deccece5133
| 3,541
|
cshtml
|
C#
|
EES.MvcUI/Views/Home/EvaluateDepartmentalWorkers.cshtml
|
bseker/EES
|
7e04587a9cd44f12e8f27a222a1359cf54553849
|
[
"Apache-2.0"
] | null | null | null |
EES.MvcUI/Views/Home/EvaluateDepartmentalWorkers.cshtml
|
bseker/EES
|
7e04587a9cd44f12e8f27a222a1359cf54553849
|
[
"Apache-2.0"
] | null | null | null |
EES.MvcUI/Views/Home/EvaluateDepartmentalWorkers.cshtml
|
bseker/EES
|
7e04587a9cd44f12e8f27a222a1359cf54553849
|
[
"Apache-2.0"
] | null | null | null |
@model EES.MvcUI.Models.EvaluateViewModel
@{
ViewBag.Title = "EvaluateDepartmentalWorkers";
Layout = "~/Views/Shared/_PublicLayout.cshtml";
}
<h2 class="alert-info">Evaluate Department Employees</h2>
<div class="container">
<div class="row-border">
<h4>Evaluated Employee Details</h4>
<table class="table">
<thead>
<tr>
<td>Employee Name & Surname</td>
<td>Employee Department</td>
<td>Employee Supervisor</td>
<td>Employee Project Details </td>
</tr>
</thead>
<tbody>
<tr>
<td>@Model.EvaluatedEmployee.Name @Model.EvaluatedEmployee.Surname</td>
<td>@Model.EvaluatedEmployee.DepartmentName</td>
<td>@Model.EvaluatedEmployee.SupervisorName @Model.EvaluatedEmployee.SupervisorSurname </td>
<td>
@if (Model.EvaluatedEmployeeProjects != null)
{
@Model.EvaluatedEmployeeProjects.ProjectName @Model.EvaluatedEmployeeProjects.RoleName
}
</td>
</tr>
</tbody>
</table>
</div>
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
@*<div class="box-header with-border">
<h3 class="box-title">Quick Example</h3>
</div>*@
@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" }))
{
@Html.AntiForgeryToken()
<div class="box-body">
@Html.HiddenFor(t => t.Evaluation.EvaluationId)
@Html.HiddenFor(t => t.EvaluatedEmployee.EmployeeId)
@Html.HiddenFor(t => t.EvaluatingEmployee.EmployeeId)
@for (int i = 0; i < Model.Questions.Count; i++)
{
<div class="form-group">
@Html.HiddenFor(t => t.Questions[i].QuestionId)
@Html.HiddenFor(t => t.Questions[i].QuestionWeight)
@Html.LabelFor(t => t.Questions[i].QuestionText, Model.Questions[i].QuestionText, new { @class = "col-sm-4 control-label" })
<div class="col-sm-6">
@Html.EditorFor(t => t.Questions[i].QuestionText, "Number")
@* @Html.ValidationMessageFor(t => t.Artist.ArtistName)*@
</div>
</div>
}
<div class="form-group">
@Html.LabelFor(t => t.Comment.CommentText, "Your Comment", new { @class = "col-sm-2 control-label" })
<div class="col-sm-10">
@Html.TextAreaFor(t => t.Comment.CommentText, new { @class = "form-control" })
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="btn btn-info btn-flat pull-right">Submit Evaluation</button>
</div>
}
</div>
</div>
</div>
</div>
| 39.786517
| 156
| 0.448178
|
471e5b42a538d2561905e8585a52e38a001774e2
| 2,227
|
lua
|
Lua
|
Lua/Game/MainUI/MainUITaskView.lua
|
BitcoinSolution/UnityMMO
|
16729ef0e7a1d6acdf6ed33cf0890d7be730ec6b
|
[
"MIT"
] | 1,083
|
2018-07-19T07:52:49.000Z
|
2022-03-31T09:34:22.000Z
|
Lua/Game/MainUI/MainUITaskView.lua
|
BitcoinSolution/UnityMMO
|
16729ef0e7a1d6acdf6ed33cf0890d7be730ec6b
|
[
"MIT"
] | 32
|
2019-03-21T02:59:49.000Z
|
2021-11-09T12:03:12.000Z
|
Lua/Game/MainUI/MainUITaskView.lua
|
BitcoinSolution/UnityMMO
|
16729ef0e7a1d6acdf6ed33cf0890d7be730ec6b
|
[
"MIT"
] | 312
|
2018-08-14T07:48:07.000Z
|
2022-03-31T09:30:49.000Z
|
local MainUITaskView = BaseClass(UINode)
function MainUITaskView:Constructor( parentTrans )
self.viewCfg = {
prefabPath = "Assets/AssetBundleRes/ui/mainui/MainUITaskView.prefab",
parentTrans = parentTrans,
}
self.model = TaskModel:GetInstance()
self:Load()
end
function MainUITaskView:OnLoad( )
local names = {
"item_scroll/Viewport/item_con","item_scroll",
}
UI.GetChildren(self, self.transform, names)
print('Cat:MainUITaskView.lua[15] on load')
self:AddEvents()
self:OnUpdate()
end
function MainUITaskView:AddEvents( )
self:BindEvent(self.model, TaskConst.Events.AckTaskList, function()
self:OnUpdate()
end)
end
function MainUITaskView:OnUpdate( )
print('Cat:MainUITaskView.lua[34] self.isLoaded', self.isLoaded)
local taskInfo = self.model:GetTaskInfos()
if not taskInfo or not taskInfo.taskList or not self.isLoaded then return end
print("Cat:MainUITaskView [start:47] taskInfo.taskList:", taskInfo.taskList)
PrintTable(taskInfo.taskList)
print("Cat:MainUITaskView [end]")
self.item_list_com = self.item_list_com or self:AddUIComponent(UI.ItemListCreator)
local info = {
data_list = taskInfo.taskList,
item_con = self.item_con,
scroll_view = self.item_scroll,
prefab_path = "Assets/AssetBundleRes/ui/mainui/MainUITaskItem.prefab",
item_height = 54,
space_y = 0,
child_names = {
"desc:txt","name:txt","status:txt","click:obj",
},
on_update_item = function(item, i, v)
self:OnUpdateItem(item, i, v)
end,
}
self.item_list_com:UpdateItems(info)
end
function MainUITaskView:OnUpdateItem( item, i, v )
local on_click = function ( click_obj )
print('Cat:MainUITaskView.lua[59] click_obj', click_obj)
if item.click_obj == click_obj then
print('Cat:MainUITaskView.lua[61]')
-- TaskController.GetInstance():DoTask({type = TaskConst.SubType.Talk, npcID = 3001})
TaskController.GetInstance():DoTask(v)
end
end
UI.BindClickEvent(item.click_obj, on_click)
local cfg = ConfigMgr:GetTaskCfg(v.taskID)
if not cfg then return end
local name = string.format("[%s]%s", TaskConst.Prefix[cfg.taskType], cfg.name)
item.name_txt.text = name
item.desc_txt.text = v.desc
item.status_txt.text = TaskConst.StatusStr[v.status]
end
return MainUITaskView
| 29.693333
| 89
| 0.747643
|
da7168c6e64aab5f82d33ac9b19309b80cb816a8
| 172
|
sh
|
Shell
|
scripts/install-awscli.sh
|
rssnyder/docker-linux-dev-box
|
1bac09eb9775ae98bc61a115ac67f003b8549e1d
|
[
"MIT"
] | 2
|
2021-08-23T20:43:41.000Z
|
2021-09-05T12:31:53.000Z
|
scripts/install-awscli.sh
|
rssnyder/docker-linux-dev-box
|
1bac09eb9775ae98bc61a115ac67f003b8549e1d
|
[
"MIT"
] | 3
|
2021-03-26T00:43:56.000Z
|
2021-08-23T18:53:05.000Z
|
scripts/install-awscli.sh
|
rssnyder/docker-linux-dev-box
|
1bac09eb9775ae98bc61a115ac67f003b8549e1d
|
[
"MIT"
] | 3
|
2021-03-25T19:47:19.000Z
|
2022-02-09T07:00:42.000Z
|
#!/bin/zsh
# Install AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
# Cleanup
rm awscliv2.zip
| 17.2
| 81
| 0.738372
|
0dc8214fa6e888efdcea522eccff24059fa2b511
| 4,619
|
cs
|
C#
|
projects/Fishomatic/src/MainWindow.xaml.cs
|
psryland/rylogic_code
|
f79e471fe0d6714c5e0cf8385ddc2a88ab2e082b
|
[
"CNRI-Python"
] | 2
|
2020-11-11T16:19:04.000Z
|
2021-01-19T01:53:29.000Z
|
projects/Fishomatic/src/MainWindow.xaml.cs
|
psryland/rylogic_code
|
f79e471fe0d6714c5e0cf8385ddc2a88ab2e082b
|
[
"CNRI-Python"
] | 1
|
2020-07-27T09:00:21.000Z
|
2020-07-27T10:58:10.000Z
|
projects/Fishomatic/src/MainWindow.xaml.cs
|
psryland/rylogic_code
|
f79e471fe0d6714c5e0cf8385ddc2a88ab2e082b
|
[
"CNRI-Python"
] | 1
|
2021-04-04T01:39:55.000Z
|
2021-04-04T01:39:55.000Z
|
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Rylogic.Extn.Windows;
using Rylogic.Gui.WPF;
using Rylogic.Interop.Win32;
using Rylogic.Utility;
using Rectangle = System.Drawing.Rectangle;
namespace Fishomatic
{
public partial class MainWindow :Window
{
public MainWindow()
{
try
{
Settings = new Settings(SettingsFilepath);
FishFinder = new FishFinder(Settings);
TargetGraphic = new Target();
InitializeComponent();
SetSearchArea = Command.Create(this, SetSearchAreaInternal);
ShowOptions = Command.Create(this, ShowOptionsInternal);
ToggleFishing = Command.Create(this, ToggleFishingInternal);
Closed += delegate { Util.Dispose(FishFinder!); };
DataContext = this;
}
catch (Exception)
{
throw;
}
}
protected override void OnClosing(CancelEventArgs e)
{
TargetGraphic.Close();
base.OnClosing(e);
}
/// <summary></summary>
public Settings Settings { get; }
/// <summary></summary>
public FishFinder FishFinder
{
get => m_fish_finder;
set
{
if (FishFinder == value) return;
if (m_fish_finder != null)
{
m_fish_finder.BobberUpdate -= HandleBobberPositionChanged;
}
m_fish_finder = value;
if (m_fish_finder != null)
{
m_fish_finder.BobberUpdate += HandleBobberPositionChanged;
}
// Handler
void HandleBobberPositionChanged(object? sender, FishFinder.BobberUpdateEventArgs e)
{
TargetGraphic.Visibility = e.Visible ? Visibility.Visible : Visibility.Collapsed;
if (e.Visible && FishFinder.TargetWnd is CWindow wnd)
{
var wrect = wnd.WindowRectangle;
TargetGraphic.Left = wrect.Left + e.Position.X - TargetGraphic.Width / 2;
TargetGraphic.Top = wrect.Top + e.Position.Y - TargetGraphic.Height / 2;
}
}
}
}
private FishFinder m_fish_finder = null!;
/// <summary></summary>
private Window TargetGraphic { get; }
/// <summary></summary>
public ICommand SetSearchArea { get; }
private void SetSearchAreaInternal()
{
// Get the search area relative to the target window
var wrect = (FishFinder.TargetWnd?.WindowRectangle ?? new Rectangle(0, 0, (int)SystemParameters.PrimaryScreenWidth, (int)SystemParameters.PrimaryScreenHeight)).ToRectD();
var area = Settings.LargeSearchArea(wrect);
// 'offset' is the position of the mouse relative to 'frame'
var offset = (Point?)null;
var frame = new Window
{
Owner = this,
Title = "Bobber search area",
ShowInTaskbar = true,
ShowActivated = false,
AllowsTransparency = true,
WindowStyle = WindowStyle.None,
WindowStartupLocation = WindowStartupLocation.Manual,
ResizeMode = ResizeMode.CanResizeWithGrip,
Visibility = Visibility.Collapsed,
Background = new SolidColorBrush(Color.FromArgb(0xD0, 0x80, 0x80, 0xff)),
Left = area.Left,
Top = area.Top,
Width = area.Width,
Height = area.Height,
Opacity = 0.5,
};
frame.MouseDown += delegate (object i, MouseButtonEventArgs e)
{
if (e.LeftButton != MouseButtonState.Pressed) return;
offset = e.GetPosition(frame);
frame.CaptureMouse();
e.Handled = true;
};
frame.MouseMove += delegate (object i, MouseEventArgs e)
{
if (offset == null) return;
var pos = frame.PointToScreen(e.GetPosition(frame));
frame.Left = pos.X - offset.Value.X;
frame.Top = pos.Y - offset.Value.Y;
e.Handled = true;
};
frame.MouseUp += delegate (object i, MouseButtonEventArgs e)
{
frame.ReleaseMouseCapture();
offset = null;
};
frame.KeyDown += delegate (object i, KeyEventArgs e)
{
if (e.Key == Key.Return)
frame.DialogResult = true;
if (e.Key == Key.Escape)
frame.DialogResult = false;
};
frame.ShowDialog();
// Record the search area
if (frame.DialogResult == true)
Settings.SearchArea = Rect_.ToThickness(wrect, frame.Bounds());
//CaptureScreen(ref m_small_grab, m_props.SearchArea);
}
/// <summary></summary>
public ICommand ShowOptions { get; }
private void ShowOptionsInternal()
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = "explorer",
Arguments = SettingsFilepath,
});
}
/// <summary>Enable/Disable fishing</summary>
public ICommand ToggleFishing { get; }
private void ToggleFishingInternal()
{
FishFinder.Run = !FishFinder.Run;
}
/// <summary></summary>
private static string SettingsFilepath => Util.ResolveUserDocumentsPath("Rylogic", "Fishomatic", "Settings.xml");
}
}
| 27.658683
| 173
| 0.682399
|
db93f757b6e53b796463f5c93d52d77c582b0dab
| 13,857
|
php
|
PHP
|
vendor/jackalope/jackalope-doctrine-dbal/tests/Jackalope/Test/Fixture/DBUnitFixtureXML.php
|
tuanduong279/sylius-standard-recommandation
|
51ba46ae5db42a0ee07effefcb78c897955ed434
|
[
"MIT"
] | null | null | null |
vendor/jackalope/jackalope-doctrine-dbal/tests/Jackalope/Test/Fixture/DBUnitFixtureXML.php
|
tuanduong279/sylius-standard-recommandation
|
51ba46ae5db42a0ee07effefcb78c897955ed434
|
[
"MIT"
] | null | null | null |
vendor/jackalope/jackalope-doctrine-dbal/tests/Jackalope/Test/Fixture/DBUnitFixtureXML.php
|
tuanduong279/sylius-standard-recommandation
|
51ba46ae5db42a0ee07effefcb78c897955ed434
|
[
"MIT"
] | null | null | null |
<?php
namespace Jackalope\Test\Fixture;
use PHPCR\Util\PathHelper;
use PHPCR\Util\UUIDHelper;
/**
* Convert Jackalope Document or System Views into PHPUnit DBUnit Fixture XML files.
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author cryptocompress <cryptocompress@googlemail.com>
*/
class DBUnitFixtureXML extends XMLDocument
{
const DATEFORMAT = 'Y-m-d\TH:i:s.uP';
/**
* @var integer
*/
protected static $idCounter = 1;
/**
* @var array
*/
protected $tables;
/**
* @var array
*/
protected $ids;
/**
* @var array
*/
protected $references;
/**
* @var array
*/
protected $expectedNodes;
/**
* @param string $file - file path
* @param int $options - libxml option constants: http://www.php.net/manual/en/libxml.constants.php
*/
public function __construct($file, $options = null)
{
parent::__construct($file, $options);
$this->tables = array();
$this->ids = array();
$this->references = array();
$this->expectedNodes = array();
}
public function addDataset()
{
$this->appendChild($this->createElement('dataset'));
// purge binary in case no binary properties are in fixture
$this->ensureTableExists('phpcr_binarydata', array(
'node_id',
'property_name',
'workspace_name',
'idx',
'data',
));
return $this;
}
public function addWorkspace($name)
{
$this->addRow('phpcr_workspaces', array('name' => $name));
return $this;
}
public function addNamespaces(array $namespaces)
{
$namespaces = array_diff($namespaces, $this->namespaces);
foreach ($namespaces as $prefix => $uri) {
$this->addRow('phpcr_namespaces', array('prefix' => $prefix, 'uri' => $uri));
}
return $this;
}
/**
* Add all nodes from the fixtures xml document.
*
* If the root node is not called jcr:root, autogenerate a root node.
*
* @param string $workspaceName
* @param \DOMNodeList $nodes
*
* @return DBUnitFixtureXML
*/
public function addNodes($workspaceName, \DOMNodeList $nodes)
{
$node = $nodes->item(0);
if ('jcr:root' !== $node->getAttributeNS($this->namespaces['sv'], 'name')) {
$this->addRootNode('tests');
}
foreach ($nodes as $node) {
$this->addNode($workspaceName, $node);
}
return $this;
}
public function addRootNode($workspaceName = 'default')
{
$uuid = UUIDHelper::generateUUID();
$this->ids[$uuid] = self::$idCounter++;
return $this->addRow('phpcr_nodes', array(
'id' => $this->ids[$uuid],
'path' => '/',
'parent' => '',
'local_name' => '',
'namespace' => '',
'workspace_name'=> $workspaceName,
'identifier' => $uuid,
'type' => 'nt:unstructured',
'props' => '<?xml version="1.0" encoding="UTF-8"?>'
. '<sv:node xmlns:crx="http://www.day.com/crx/1.0"'
. ' xmlns:lx="http://flux-cms.org/2.0"'
. ' xmlns:test="http://liip.to/jackalope"'
. ' xmlns:mix="http://www.jcp.org/jcr/mix/1.0"'
. ' xmlns:sling="http://sling.apache.org/jcr/sling/1.0"'
. ' xmlns:nt="http://www.jcp.org/jcr/nt/1.0"'
. ' xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions"'
. ' xmlns:fn="http://www.w3.org/2005/xpath-functions"'
. ' xmlns:vlt="http://www.day.com/jcr/vault/1.0"'
. ' xmlns:xs="http://www.w3.org/2001/XMLSchema"'
. ' xmlns:new_prefix="http://a_new_namespace"'
. ' xmlns:jcr="http://www.jcp.org/jcr/1.0"'
. ' xmlns:sv="http://www.jcp.org/jcr/sv/1.0"'
. ' xmlns:rep="internal" />',
'depth' => 0,
'sort_order' => 0,
));
}
public function addNode($workspaceName, \DOMElement $node)
{
$properties = $this->getAttributes($node);
$uuid = isset($properties['jcr:uuid']['value'][0])
? (string) $properties['jcr:uuid']['value'][0] : UUIDHelper::generateUUID();
$this->ids[$uuid] = $id = isset($this->expectedNodes[$uuid])
? $this->expectedNodes[$uuid] : self::$idCounter++;
$dom = new \DOMDocument('1.0', 'UTF-8');
$phpcrNode = $dom->createElement('sv:node');
foreach ($this->namespaces as $namespace => $uri) {
$phpcrNode->setAttribute('xmlns:' . $namespace, $uri);
}
$dom->appendChild($phpcrNode);
foreach ($properties as $propertyName => $propertyData) {
if ($propertyName == 'jcr:uuid') {
continue;
}
if (!isset($this->jcrTypes[$propertyData['type']])) {
throw new \InvalidArgumentException('"' . $propertyData['type'] . '" is not a valid JCR type.');
}
$phpcrNode->appendChild($this->createPropertyNode($workspaceName, $propertyName, $propertyData, $id, $dom, $phpcrNode));
}
list($parentPath, $childPath) = $this->getPath($node);
$namespace = '';
$name = $node->getAttributeNS($this->namespaces['sv'], 'name');
if (count($parts = explode(':', $name, 2)) == 2) {
list($namespace, $name) = $parts;
}
if ($namespace == 'jcr' && $name == 'root') {
$id = 1;
$childPath = '/';
$parentPath = '';
$name = '';
$namespace = '';
}
$this->addRow('phpcr_nodes', array(
'id' => $id,
'path' => $childPath,
'parent' => $parentPath,
'local_name' => $name,
'namespace' => $namespace,
'workspace_name'=> $workspaceName,
'identifier' => $uuid,
'type' => $properties['jcr:primaryType']['value'][0],
'props' => $dom->saveXML(),
'depth' => PathHelper::getPathDepth($childPath),
'sort_order' => $id - 2,
));
return $this;
}
public function addReferences()
{
foreach ($this->references as $type => $references) {
$table = 'phpcr_nodes_'.$type.'s';
// make sure we have the references even if there is not a single entry in it to have it truncated
$this->ensureTableExists($table, array('source_id', 'source_property_name', 'target_id'));
foreach ($references as $uuid => $reference) {
if (isset($this->ids[$uuid])) {
foreach ($reference as $data) {
$this->addRow($table, $data);
}
}
}
}
return $this;
}
public function getAttributes(\DOMElement $node)
{
$properties = array();
foreach ($node->childNodes as $child) {
if ($child instanceof \DOMElement && $child->tagName == 'sv:property') {
list($name, $propertyNameibute) = $this->getChildAttribute($child);
$properties[$name] = $propertyNameibute;
}
}
return $properties;
}
public function getChildAttribute(\DOMElement $node)
{
$name = $node->getAttributeNS($this->namespaces['sv'], 'name');
$type = strtolower($node->getAttributeNS($this->namespaces['sv'], 'type'));
$values = array();
if ($name == 'jcr:created') {
$values[] = date(self::DATEFORMAT);
} else {
foreach ($node->getElementsByTagNameNS($this->namespaces['sv'], 'value') as $nodeValue) {
$values[] = $nodeValue->nodeValue;
}
}
$isMultiValue = false;
if ($name == 'jcr:mixinTypes'
|| count($values) > 1
|| ($node->hasAttributeNS($this->namespaces['sv'], 'multiple') && $node->getAttributeNS($this->namespaces['sv'], 'multiple') == 'true')
) {
$isMultiValue = true;
}
return array($name, array('type' => $type, 'value' => $values, 'multiValued' => $isMultiValue));
}
public function createPropertyNode($workspaceName, $propertyName, $propertyData, $id, \DOMDocument $dom)
{
$propertyNode = $dom->createElement('sv:property');
$propertyNode->setAttribute('sv:name', $propertyName);
$propertyNode->setAttribute('sv:type', $propertyData['type']);
$propertyNode->setAttribute('sv:multi-valued', $propertyData['multiValued'] ? '1' : '0');
$binaryDataIdx = 0;
foreach ($propertyData['value'] as $value) {
$propertyNode->appendChild($this->createValueNodeByType($workspaceName, $propertyData['type'], $value, $id, $propertyName, $binaryDataIdx++, $dom));
}
return $propertyNode;
}
public function createValueNodeByType($workspaceName, $type, $value, $id, $propertyName, $binaryDataIdx, \DOMDocument $dom)
{
$length = is_scalar($value) ? strlen($value) : null;
switch ($type) {
case 'binary':
$value = $this->addBinaryNode($id, $propertyName, $workspaceName, $binaryDataIdx, $value);
$length = $value;
break;
case 'boolean':
$value = ('true' === $value) ? '1' : '0';
$length = 1;
break;
case 'date':
$value = date_format(date_create_from_format(self::DATEFORMAT, $value), self::DATEFORMAT);
break;
case 'weakreference':
case 'reference':
if (isset($this->ids[$value])) {
$targetId = $this->ids[$value];
} elseif (isset($this->expectedNodes[$value])) {
$targetId = $this->expectedNodes[$value];
} else {
$targetId = $this->expectedNodes[$value] = self::$idCounter++;
}
// do not repeat references
$this->references[$type][$value][$id . $propertyName . $targetId] = array(
'source_id' => $id,
'source_property_name' => $propertyName,
'target_id' => $targetId,
);
break;
}
return $this->createValueNode($value, $dom, $length);
}
public function createValueNode($value, \DOMDocument $dom, $length)
{
$valueNode = $dom->createElement('sv:value');
if (is_string($value) && strpos($value, ' ') !== false) {
$valueNode->appendChild($dom->createCDATASection($value));
} else {
$valueNode->appendChild($dom->createTextNode($value));
}
if (null !== $length) {
$lengthAttribute = $dom->createAttribute('length');
$lengthAttribute->value = $length;
$valueNode->appendChild($lengthAttribute);
}
return $valueNode;
}
public function getPath(\DOMElement $node)
{
$childPath = '';
$parent = $node;
do {
if ($parent->tagName == 'sv:node') {
$childPath = '/' . $parent->getAttributeNS($this->namespaces['sv'], 'name') . $childPath;
}
$parent = $parent->parentNode;
} while ($parent instanceof \DOMElement);
$parentPath = implode('/', array_slice(explode('/', $childPath), 0, -1));
if (empty($parentPath)) {
$parentPath = '/';
}
return array($parentPath, $childPath);
}
/**
* @param int $id
* @param string $propertyName
* @param string $workspaceName
* @param int $idx
* @param string $data
*
* @return int - length of base64 decoded string
*/
public function addBinaryNode($id, $propertyName, $workspaceName, $idx, $data)
{
$data = base64_decode($data);
$this->addRow('phpcr_binarydata', array(
'node_id' => $id,
'property_name' => $propertyName,
'workspace_name' => $workspaceName,
'idx' => $idx,
'data' => $data,
));
return strlen($data);
}
protected function addRow($tableName, array $data)
{
$this->ensureTableExists($tableName, array_keys($data));
$row = $this->createElement('row');
foreach ($data as $value) {
if (null === $value) {
$row->appendChild($this->createElement('null'));
} else {
$row->appendChild($this->createElement('value', htmlspecialchars($value)));
}
}
$this->tables[$tableName]->appendChild($row);
return $this;
}
protected function ensureTableExists($tableName, $columns)
{
if (!isset($this->tables[$tableName])) {
$table = $this->createElement('table');
$table->setAttribute('name', $tableName);
foreach ($columns as $k) {
$table->appendChild($this->createElement('column', $k));
}
$this->documentElement->appendChild($table);
$this->tables[$tableName] = $table;
}
return $this;
}
}
| 33.230216
| 160
| 0.501552
|
51fa8f79ba06f83d32da6f3a363724896c23ceb1
| 346
|
sh
|
Shell
|
resources/secure/vlc_front.sh
|
hcfman/sbts-install
|
0bd2fbfc27d5898776117c4087daf4c8dcd7202e
|
[
"Apache-2.0"
] | 5
|
2021-08-07T20:22:08.000Z
|
2022-02-22T02:40:07.000Z
|
resources/secure/vlc_front.sh
|
hcfman/sbts-install
|
0bd2fbfc27d5898776117c4087daf4c8dcd7202e
|
[
"Apache-2.0"
] | null | null | null |
resources/secure/vlc_front.sh
|
hcfman/sbts-install
|
0bd2fbfc27d5898776117c4087daf4c8dcd7202e
|
[
"Apache-2.0"
] | null | null | null |
#!/bin/sh
while [ 1 ] ; do
cvlc -v rtsp://myusername:mypassword@192.1.2.3/PSI/streaming/channels/102 --http-reconnect \
--sout-keep --sout '#duplicate{dst=std{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a,user=santa,pwd=youtube},mux=mpjpeg,dst=:8100/front/video.jpg}}' vlc://quit
sleep 10
done
| 43.25
| 201
| 0.731214
|
e22108ba35c0a279db52ef2538b93dd3b60a05cd
| 819
|
rs
|
Rust
|
src/model.rs
|
MorRutPlz/home
|
71aa5eb385941fca421d7ceaf8b3389871c295f0
|
[
"MIT"
] | null | null | null |
src/model.rs
|
MorRutPlz/home
|
71aa5eb385941fca421d7ceaf8b3389871c295f0
|
[
"MIT"
] | 2
|
2021-02-18T02:40:24.000Z
|
2021-03-01T18:53:29.000Z
|
src/model.rs
|
MorRutPlz/home
|
71aa5eb385941fca421d7ceaf8b3389871c295f0
|
[
"MIT"
] | null | null | null |
use serde::{
ser::{SerializeStruct, Serializer},
Deserialize, Serialize,
};
use serenity::model::id::{ChannelId, UserId};
#[derive(Clone, Deserialize, PartialEq, Eq)]
pub struct RoomInfo {
#[serde(rename = "a")]
pub owner: UserId,
#[serde(rename = "b")]
pub channel_ids: Vec<ChannelId>,
}
impl Serialize for RoomInfo {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut state = serializer.serialize_struct("RoomInfo", 3)?;
state.serialize_field("a", &(self.owner.0 as i64))?;
state.serialize_field(
"b",
&(self
.channel_ids
.iter()
.map(|x| x.0 as i64)
.collect::<Vec<_>>()),
)?;
state.end()
}
}
| 24.818182
| 68
| 0.533578
|
a914719655de54bb196a2534394f140136a67fa8
| 1,738
|
css
|
CSS
|
samples/effects/combo_sample.css
|
melvinhgf/Spry
|
b333bb5ab9582f9a59f413782891e644104f5f20
|
[
"MIT"
] | 74
|
2015-01-14T16:03:03.000Z
|
2022-01-08T05:43:10.000Z
|
samples/effects/combo_sample.css
|
fvignals/Spry
|
e208b89ebdeee6c05a4707e433c9bfb007b986e9
|
[
"MIT"
] | 5
|
2016-11-04T17:47:52.000Z
|
2018-06-20T14:32:59.000Z
|
samples/effects/combo_sample.css
|
fvignals/Spry
|
e208b89ebdeee6c05a4707e433c9bfb007b986e9
|
[
"MIT"
] | 77
|
2015-01-07T23:49:45.000Z
|
2022-03-14T06:31:24.000Z
|
#container {
position: relative;
width: 890px;
margin: 0 0 0 0;
text-align: left;
}
.Accordion {
overflow: hidden;
}
.AccordionPanelLabel {
border-top: 4px;
padding: 2px;
cursor: pointer;
border-top-style: solid;
line-height: 14px;
font-weight: bold;
width: 150px;
border-top-color: #CCCCCC;
}
.AccordionPanelContent {
overflow: hidden;
height: 100px;
padding-left: 6px;
list-style-type: none;
margin: 4px;
}
.style1 {
color: #FF0000
}
#Acc1 {
width: 200px;
float: left;
margin: 20px;
z-index: 50;
}
#Acc1 .AccordionPanelContent {
height: 0px;
}
#Acc1 .AccordionPanelLabel {
width:190px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
#Acc2 {
width: 170px;
float: left;
margin: 20px;
}
#Acc2 .AccordionPanelLabel {
font-weight: bold;
cursor: pointer;
width: 160px;
}
#Acc2 .AccordionPanelContent {
height: 1px;
list-style-type: none;
overflow: hidden;
}
#panel1Content, #panel2Content, #panel3Content, #panel4Content {
border: none;
}
#panel1Content.AccordionPanelContent{
height:100px;
}
#panel1Content ul{
list-style-type:none;
}
#apDiv1 {
width: 380px;
height: 600px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
float: left;
margin-top: 20px;
padding-top: 20px;
}
#img12hours{
width: 92px;
height: 68px;
float: left;
position: relative;
top: 0px;
left: 0px;
border: 1px;
}
#img12hours2{
width: 56px;
height: 38px;
float: right;
position: relative;
}
#div12hours3{
height: 0px;
overflow: hidden;
}
#img12hours3{
width: 395px;
height: 200px;
clear: both;
opacity: 0.0;
filter: alpha(opacity=0);
}
img {
margin: 8px;
cursor: pointer;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 1em;
}
| 15.517857
| 64
| 0.6916
|
5aea40a9f22e81c712633e61cf643f488cd0298d
| 2,505
|
cs
|
C#
|
Assets/JumpRace3D/Scripts/UIs/EndScreenUI.cs
|
deadlykam/JumpRace3D
|
88a39d2fb500a7f2f693f906c4af738403f7b8e0
|
[
"MIT"
] | 1
|
2020-07-02T11:41:21.000Z
|
2020-07-02T11:41:21.000Z
|
Assets/JumpRace3D/Scripts/UIs/EndScreenUI.cs
|
deadlykam/JumpRace3D
|
88a39d2fb500a7f2f693f906c4af738403f7b8e0
|
[
"MIT"
] | 72
|
2020-05-29T10:14:44.000Z
|
2020-06-21T22:33:34.000Z
|
Assets/JumpRace3D/Scripts/UIs/EndScreenUI.cs
|
deadlykam/JumpRace3D
|
88a39d2fb500a7f2f693f906c4af738403f7b8e0
|
[
"MIT"
] | null | null | null |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class EndScreenUI : BasicUI
{
[Header("End Screen UI Properties")]
[SerializeField]
private TextMeshProUGUI[] _posTexts; // Position texts
[SerializeField]
private GameObject[] _posBacks; // Red backgrounds for
// highlighting the player
[SerializeField]
private Canvas _triggerCanvas; // Canvas that triggers an
// event
/// <summary>
/// This method resets the End Screen UI
/// </summary>
private void ResetUI()
{
// Loop for resetting all the texts and player
// highlighters
for (int i = 0; i < _posTexts.Length; i++)
{
// Resetting the text
_posTexts[i].text = "";
// Condition for resetting the player highlighter
if (i != 0) _posBacks[i - 1].SetActive(false);
}
_triggerCanvas.enabled = true; // Enabling the trigger
// canvas again
}
/// <summary>
/// This method shows all the racers at the end screen.
/// </summary>
public void SetUI()
{
// Loop for showing all the racers in the end screen
for(int i = 0; i < RaceTracker.Instance.Racers.Length; i++)
{
// Checking if the racer is the player
if(RaceTracker.Instance.Racers[i]
.CharacterName == GameData.Instance.PlayerName)
{
// Checking if it is not the first position
// and showing the player highlighter
if (i != 0) _posBacks[i - 1].SetActive(true);
}
// Condition for not being the player and hiding
// the player highlighter
else if (i != 0) _posBacks[i - 1].SetActive(false);
// Setting the racers name
_posTexts[i].text = RaceTracker.Instance
.Racers[i].CharacterName;
}
}
/// <summary>
/// This method disables the trigger event UI.
/// </summary>
public void DisableTrigger() { _triggerCanvas.enabled = false; }
/// <summary>
/// This method hides the End Screen UI.
/// </summary>
public override void HideUI()
{
base.HideUI();
ResetUI(); // Resetting the UI
}
}
| 30.925926
| 69
| 0.528144
|
b9014337ab1bb59354a754e6516f92c96ff94190
| 1,080
|
css
|
CSS
|
build/css/demo-styles.css
|
kashyapvicky/gogreen
|
96c9fe61e8d51e54d271f6f2b79824fafa9d25d2
|
[
"MIT"
] | null | null | null |
build/css/demo-styles.css
|
kashyapvicky/gogreen
|
96c9fe61e8d51e54d271f6f2b79824fafa9d25d2
|
[
"MIT"
] | null | null | null |
build/css/demo-styles.css
|
kashyapvicky/gogreen
|
96c9fe61e8d51e54d271f6f2b79824fafa9d25d2
|
[
"MIT"
] | null | null | null |
*, *:before, *:after {
box-sizing: border-box;
}
*, body, button, input, textarea, select {
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;
font-weight:normal;
}
ol,ul {
list-style:none;
}
caption,th {
text-align:left;
}
h1,h2,h3,h4,h5,h6 {
font-size:100%;
font-weight:normal;
}
q:before,q:after {
content:'';
}
abbr,acronym {
border: 0;
}
body {
font-family: sans-serif;
font-size: 16px;
line-height: 1.4;
padding: 2em;
}
.demo-example {
margin-bottom: 2em;
}
.demo-example > label {
display: block;
margin-bottom: 0.5em;
font-weight: bold;
}
.position-menu-within {
width: 18em;
height: 15em;
background: #eee;
overflow: auto;
padding: 2em 0 0 2em;
}
| 14.594595
| 98
| 0.618519
|
a44a52aea58a9ba44e6f6c1524a82727c5d39329
| 1,762
|
h
|
C
|
src/exceptions.h
|
MartanJe/ant-wars
|
f135b938ffa9ea2eff0beaa8f71fed8e60a26ad1
|
[
"MIT"
] | 1
|
2021-07-05T13:29:29.000Z
|
2021-07-05T13:29:29.000Z
|
src/exceptions.h
|
MartanJe/ant-wars
|
f135b938ffa9ea2eff0beaa8f71fed8e60a26ad1
|
[
"MIT"
] | 1
|
2021-07-05T13:34:04.000Z
|
2021-07-05T13:34:04.000Z
|
src/exceptions.h
|
jencmart/ant-wars
|
f135b938ffa9ea2eff0beaa8f71fed8e60a26ad1
|
[
"MIT"
] | null | null | null |
//
// Created by jencmart on 5/28/17.
//
#ifndef ANTWARS_EXCEPTIONS_H
#define ANTWARS_EXCEPTIONS_H
#include <iostream>
///*************************************************************************************************
///******************************* CLASSES OF EXCEPTION *******************************************
///*************************************************************************************************
/*! Thrown during game when user want to pause game.
*
*/
class Pause
{};
/*! Thrown when loading files with unexpected characters.
* It also collects information of position of this unexpected character in the file.
*/
class UnexpectedCharacter
{
public:
UnexpectedCharacter(int row, int col, char c) : m_row(row), m_col(col), m_c(c)
{}
void print()
{
std::cout << "[Unexpected character in map file!]: " << m_row + 1 << "," << m_col + 1 << ": '"
<< m_c << "'"
<< std::endl;
}
int m_row;
int m_col;
char m_c;
};
/*! Thrown by path when command asks to create path between two anthills which cant be connected.
*/
class PathNotExistException
{
};
/*! If there is problem durign saving the game exception is thrown. (usually wen we lost permission
* to write to the file or when save dir is missing or inacessible
*/
class ErrorWhileSaving{};
/*! Usually thrown when desired file is missing or inacessible.
*/
class ErrorWhileReadingFile
{
public:
ErrorWhileReadingFile(const std::string &fileName) : m_fileName(fileName)
{}
/*! Prints name of filename which caused error
*/
inline void print() const
{ std::cout << "Error while reading: " << m_fileName << std::endl; }
private:
std::string m_fileName;
};
#endif //ANTWARS_EXCEPTIONS_H
| 25.536232
| 100
| 0.562997
|
14e0c695485e3eaf2aa5800251ba11b7c03ce570
| 1,360
|
ts
|
TypeScript
|
src/flags.ts
|
kfrz/developer-portal
|
de98e6f0a83deabda451b69312b4594ca29c6b1c
|
[
"CC0-1.0"
] | null | null | null |
src/flags.ts
|
kfrz/developer-portal
|
de98e6f0a83deabda451b69312b4594ca29c6b1c
|
[
"CC0-1.0"
] | 22
|
2020-11-11T08:26:37.000Z
|
2021-07-30T07:27:16.000Z
|
src/flags.ts
|
ediiotero/developer-portal
|
8c0c227bec3dba24a16af3e72dc32621d5206a8f
|
[
"CC0-1.0"
] | null | null | null |
import createFlags from 'flag';
import { getDeactivatedFlags } from './apiDefs/deprecated';
import { getCategoryFlags, getEnvFlags } from './apiDefs/env';
import { getAllApis } from './apiDefs/query';
import { APIDescription } from './apiDefs/schema';
export interface AppFlags {
categories: { [categoryId: string]: boolean };
deactivated_apis: { [apiId: string]: boolean };
enabled: { [apiId: string]: boolean };
hosted_apis: { [apiId: string]: boolean };
show_testing_notice: boolean;
signups_enabled: boolean;
}
const { Flag, FlagsProvider } = createFlags<AppFlags>();
const getFlags = (): AppFlags => {
const deactivatedFlags = getDeactivatedFlags();
const envFlags = getEnvFlags();
const apiCategories = getCategoryFlags();
const apiFlags = getAllApis().reduce((result, api: APIDescription): {
[key: string]: boolean;
} => {
const isApiAvailable = envFlags[api.urlFragment] && !deactivatedFlags[api.urlFragment];
result[api.urlFragment] = isApiAvailable;
return result;
}, {});
return {
categories: apiCategories,
deactivated_apis: deactivatedFlags,
enabled: envFlags,
hosted_apis: apiFlags,
show_testing_notice: process.env.REACT_APP_SHOW_TESTING_NOTICE === 'true',
signups_enabled: process.env.REACT_APP_SIGNUPS_ENABLED !== 'false',
};
};
export { Flag, FlagsProvider, getFlags };
| 34
| 91
| 0.711029
|
c34ce6ce451bfec648fcea269f1f1056ea567677
| 1,064
|
cs
|
C#
|
HelpForHire/ModEntry.cs
|
wally232/StardewMods-2
|
1030d5720d3ceceefb54112a381d46f48428d3f4
|
[
"MIT"
] | null | null | null |
HelpForHire/ModEntry.cs
|
wally232/StardewMods-2
|
1030d5720d3ceceefb54112a381d46f48428d3f4
|
[
"MIT"
] | null | null | null |
HelpForHire/ModEntry.cs
|
wally232/StardewMods-2
|
1030d5720d3ceceefb54112a381d46f48428d3f4
|
[
"MIT"
] | null | null | null |
namespace HelpForHire;
using Chores;
using Common.Helpers;
using StardewModdingAPI;
using StardewModdingAPI.Events;
public class ModEntry : Mod
{
internal ServiceLocator ServiceLocator { get; private set; }
/// <inheritdoc />
public override void Entry(IModHelper helper)
{
// Init
Log.Init(this.Monitor);
this.ServiceLocator = new(this.Helper, this.ModManifest);
this.ServiceLocator.Create(
new[]
{
typeof(FeedAnimals),
typeof(FeedPet),
typeof(PetAnimals),
typeof(RepairFences),
typeof(WaterCrops),
typeof(WaterSlimes),
});
// Events
this.Helper.Events.GameLoop.DayStarted += this.OnDayStarted;
}
private void OnDayStarted(object sender, DayStartedEventArgs e)
{
foreach (var chore in this.ServiceLocator.GetAll<GenericChore>().Where(chore => chore.IsActive && chore.IsPossible))
{
chore.PerformChore();
}
}
}
| 26.6
| 124
| 0.592105
|
93ce1f1f4169475f29b28abc33e4df06e863c92a
| 2,012
|
cs
|
C#
|
Assets/Scripts/Chunks/Lighting/DayNightCycle.cs
|
Delt06/voxel-terrain
|
c46490c7c4c93b14c8bb9dcdca4ad7ada9eba2fe
|
[
"MIT"
] | 11
|
2021-06-24T10:21:07.000Z
|
2022-03-13T03:57:56.000Z
|
Assets/Scripts/Chunks/Lighting/DayNightCycle.cs
|
codingwatching/voxel-terrain
|
fa141c2b86350a30bb4a2351ff723dff677dc012
|
[
"MIT"
] | 1
|
2021-06-27T21:25:10.000Z
|
2021-06-27T21:33:55.000Z
|
Assets/Scripts/Chunks/Lighting/DayNightCycle.cs
|
codingwatching/voxel-terrain
|
fa141c2b86350a30bb4a2351ff723dff677dc012
|
[
"MIT"
] | 5
|
2021-07-20T09:08:08.000Z
|
2022-01-12T01:58:49.000Z
|
using UnityEngine;
namespace Chunks.Lighting
{
public class DayNightCycle : MonoBehaviour
{
[SerializeField, Min(0f)] private float _dayDuration = 60f;
[SerializeField, Min(0f)] private float _nightDuration = 30f;
[SerializeField] private Gradient _sunlightColor = default;
[SerializeField] private Gradient _skyColor = default;
private void Update()
{
_time += Time.deltaTime;
if (_day && _time >= _dayDuration)
{
_time = 0f;
_day = false;
}
if (!_day && _time >= _nightDuration)
{
_time = 0f;
_day = true;
}
var normalizedTimeOfDay = CalculateNormalizedTimeOfDay();
Shader.SetGlobalFloat(NormalizedTimeOfDayId, normalizedTimeOfDay);
var sunlightColor = _sunlightColor.Evaluate(normalizedTimeOfDay);
Shader.SetGlobalColor(SunlightColorId, sunlightColor);
var skyColor = _skyColor.Evaluate(normalizedTimeOfDay);
Shader.SetGlobalColor(SkyColorId, skyColor);
}
private void OnDestroy()
{
Shader.SetGlobalFloat(NormalizedTimeOfDayId, 0);
Shader.SetGlobalColor(SunlightColorId, Color.white);
Shader.SetGlobalColor(SkyColorId, Color.white);
}
private float CalculateNormalizedTimeOfDay()
{
const float half = 0.5f;
if (_day)
return Mathf.Clamp01(_time / _dayDuration) * half;
return Mathf.Clamp01(_time / _nightDuration) * half + half;
}
private float _time;
private bool _day = true;
private static readonly int SunlightColorId = Shader.PropertyToID("_SunlightColor");
private static readonly int SkyColorId = Shader.PropertyToID("_SkyColor");
private static readonly int NormalizedTimeOfDayId = Shader.PropertyToID("_NormalizedTimeOfDay");
}
}
| 35.928571
| 104
| 0.60835
|
52073cd1317556ea35eff8b0534a2c27f9619b0a
| 1,293
|
ps1
|
PowerShell
|
.ci/run-repository.ps1
|
romansp/elasticsearch-net
|
0020ff3df6c35bc95407a58e23c91c1d8e975139
|
[
"Apache-2.0"
] | null | null | null |
.ci/run-repository.ps1
|
romansp/elasticsearch-net
|
0020ff3df6c35bc95407a58e23c91c1d8e975139
|
[
"Apache-2.0"
] | null | null | null |
.ci/run-repository.ps1
|
romansp/elasticsearch-net
|
0020ff3df6c35bc95407a58e23c91c1d8e975139
|
[
"Apache-2.0"
] | null | null | null |
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable
# NETWORK_NAME -- The docker network name
# NODE_NAME -- The docker container name also used as Elasticsearch node name
# DOTNET_VERSION -- SDK version (defined in test-matrix.yml, a default is hardcoded here)
param(
[System.Uri]
$ELASTICSEARCH_URL,
[string]
$NETWORK_NAME,
[string]
$NODE_NAME,
[string]
$DOTNET_VERSION = "5.0.102"
)
$ESC = [char]27
Write-Output "$ESC[34;1mINFO:$ESC[0m URL ${ELASTICSEARCH_URL}$ESC[0m"
Write-Output "$ESC[34;1mINFO:$ESC[0m DOTNET_VERSION ${DOTNET_VERSION}$ESC[0m"
Write-Output "$ESC[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>$ESC[0m"
docker build --file .ci/DockerFile --tag elastic/elasticsearch-net .
Write-Output "$ESC[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>$ESC[0m"
mkdir -p build/output -ErrorAction Ignore
$repo = Get-Location
docker run `
--network="`"$NETWORK_NAME`"" `
--env "DOTNET_VERSION=$DOTNET_VERSION" `
--name test-runner `
--volume $repo/build/output:/sln/build/output `
--rm `
elastic/elasticsearch-net `
./build.sh rest-spec-tests -f count -e $ELASTICSEARCH_URL -o /sln/build/output/rest-spec-junit.xml
| 30.785714
| 108
| 0.658159
|
7dd9b11729988c82616512cd9f3729ec924f555d
| 992
|
css
|
CSS
|
react-ui/src/Components/App.css
|
Megan-Vasconcelos/Tweets
|
ec09a02152ee4cc2c13e8ee2bfcf58e6abc5ab6a
|
[
"MIT"
] | null | null | null |
react-ui/src/Components/App.css
|
Megan-Vasconcelos/Tweets
|
ec09a02152ee4cc2c13e8ee2bfcf58e6abc5ab6a
|
[
"MIT"
] | null | null | null |
react-ui/src/Components/App.css
|
Megan-Vasconcelos/Tweets
|
ec09a02152ee4cc2c13e8ee2bfcf58e6abc5ab6a
|
[
"MIT"
] | null | null | null |
.h2{
font-family: 'Alfa Slab One', cursive;
margin-top: 0;
}
.images{
display: flex;
justify-content:center;
padding-top:15px;
box-shadow: 2px;
}
.image2{
padding-left:50px;
}
.main-content{
background-color:#8ce4df;
min-height:750px;
max-width:100%;
justify-content: center;
padding-bottom:25px;
}
.tweets{
padding-left:30.5%;
}
.main-header {
max-width: 100%;
height:auto;
background-color: #987ced;
font-family: 'Signika Negative', sans-serif;
font-size: 17pt;
text-align:center;
color: #fff;
overflow: hidden;
padding: 0.5em 2em 0.5em 1em;
/* display: flex; */
justify-content: center;
}
.tweets{
margin-top: 10px;
/* margin-left: 30.5%; */
justify-content: center;
}
.tweet{
margin-bottom: 10px;
border-radius: 15px;
}
.toggleButton{
border-radius:2px;
font-family: 'Alfa Slab One', cursive;
font-size:18px;
}
| 15.746032
| 48
| 0.585685
|
b882b4773a17771f0a9cf60fe652dbfa3481dd82
| 141
|
h
|
C
|
stopwatch.h
|
richardwalenga/csort
|
0b24ebac5ecb7bc55056bb7a577a1524339f84d7
|
[
"MIT"
] | null | null | null |
stopwatch.h
|
richardwalenga/csort
|
0b24ebac5ecb7bc55056bb7a577a1524339f84d7
|
[
"MIT"
] | null | null | null |
stopwatch.h
|
richardwalenga/csort
|
0b24ebac5ecb7bc55056bb7a577a1524339f84d7
|
[
"MIT"
] | null | null | null |
#ifndef _STOPWATCH_H
#define _STOPWATCH_H
#include <time.h>
clock_t stopwatch_start();
int stopwatch_elapsed_milliseconds(clock_t);
#endif
| 15.666667
| 44
| 0.815603
|
af8ce765071c229a12232eb21a0bd6781e04312b
| 4,888
|
py
|
Python
|
src/CIFAR-10/model7.py
|
MarwanAlaa94/Colorizing-with-GANs
|
c4369fc435e6068dd6ebe4377c9af99acd08036c
|
[
"Apache-2.0"
] | 1
|
2021-12-08T14:08:27.000Z
|
2021-12-08T14:08:27.000Z
|
src/CIFAR-10/model7.py
|
MarwanAlaa94/Colorizing-with-GANs
|
c4369fc435e6068dd6ebe4377c9af99acd08036c
|
[
"Apache-2.0"
] | 1
|
2021-06-17T15:00:58.000Z
|
2021-06-17T15:00:58.000Z
|
src/CIFAR-10/model7.py
|
MarwanAlaa94/Colorizing-with-GANs
|
c4369fc435e6068dd6ebe4377c9af99acd08036c
|
[
"Apache-2.0"
] | null | null | null |
import os
import numpy as np
import keras.backend as K
from keras import metrics
from keras.models import Model
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRateScheduler, ReduceLROnPlateau
from keras.layers import Input, MaxPool2D, Activation, BatchNormalization, UpSampling2D, concatenate, LeakyReLU, Conv2D
import os, sys, inspect
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))))
from dataset import *
from utils import *
EPOCHS = 10000
BATCH_SIZE = 128
LEARNING_RATE = 0.002
INPUT_SHAPE = (32, 32, 1)
WEIGHTS = 'model7.hdf5'
MODE = 2 # 1: train - 2: visualize
data_lab, data_grey = load_cifar10_data(outType='LAB')
data_test_lab, data_test_grey = load_cifar10_test_data(outType='LAB')
def eacc(y_true, y_pred):
return K.mean(K.equal(K.round(y_true), K.round(y_pred)))
def mse(y_true, y_pred):
return K.mean(K.square(y_pred - y_true), axis=-1)
def mae(y_true, y_pred):
return K.mean(K.abs(y_pred - y_true), axis=-1)
def learning_scheduler(epoch):
lr = LEARNING_RATE / (2 ** (epoch // 50))
print('\nlearning rate: ' + str(lr) + '\n')
return lr
def create_conv(filters, kernel_size, inputs, name=None, bn=True, padding='same', activation='relu'):
conv = Conv2D(filters, kernel_size, padding=padding, kernel_initializer='he_normal', name=name)(inputs)
if bn == True:
conv = BatchNormalization()(conv)
if activation == 'relu':
conv = Activation(activation)(conv)
elif activation == 'leakyrelu':
conv = LeakyReLU()(conv)
return conv
def create_model():
inputs = Input(INPUT_SHAPE)
conv1 = create_conv(64, (3, 3), inputs, 'conv1_1', activation='leakyrelu')
conv1 = create_conv(64, (3, 3), conv1, 'conv1_2', activation='leakyrelu')
pool1 = MaxPool2D((2, 2))(conv1)
conv2 = create_conv(128, (3, 3), pool1, 'conv2_1', activation='leakyrelu')
conv2 = create_conv(128, (3, 3), conv2, 'conv2_2', activation='leakyrelu')
pool2 = MaxPool2D((2, 2))(conv2)
conv3 = create_conv(256, (3, 3), pool2, 'conv3_1', activation='leakyrelu')
conv3 = create_conv(256, (3, 3), conv3, 'conv3_2', activation='leakyrelu')
pool3 = MaxPool2D((2, 2))(conv3)
conv4 = create_conv(512, (3, 3), pool3, 'conv4_1', activation='leakyrelu')
conv4 = create_conv(512, (3, 3), conv4, 'conv4_2', activation='leakyrelu')
pool4 = MaxPool2D((2, 2))(conv4)
conv5 = create_conv(1024, (3, 3), pool4, 'conv5_1', activation='leakyrelu')
conv5 = create_conv(1024, (3, 3), conv5, 'conv5_2', activation='leakyrelu')
up6 = create_conv(512, (2, 2), UpSampling2D((2, 2))(conv5), 'up6', activation='relu')
merge6 = concatenate([conv4, up6], axis=3)
conv6 = create_conv(512, (3, 3), merge6, 'conv6_1', activation='relu')
conv6 = create_conv(512, (3, 3), conv6, 'conv6_2', activation='relu')
up7 = create_conv(256, (2, 2), UpSampling2D((2, 2))(conv6), 'up7', activation='relu')
merge7 = concatenate([conv3, up7], axis=3)
conv7 = create_conv(256, (3, 3), merge7, 'conv7_1', activation='relu')
conv7 = create_conv(256, (3, 3), conv7, 'conv7_2', activation='relu')
up8 = create_conv(128, (2, 2), UpSampling2D((2, 2))(conv7), 'up8', activation='relu')
merge8 = concatenate([conv2, up8], axis=3)
conv8 = create_conv(128, (3, 3), merge8, 'conv8_1', activation='relu')
conv8 = create_conv(128, (3, 3), conv8, 'conv8_2', activation='relu')
up9 = create_conv(64, (2, 2), UpSampling2D((2, 2))(conv8))
merge9 = concatenate([conv1, up9], axis=3)
conv9 = create_conv(64, (3, 3), merge9, 'conv9_1', activation='relu')
conv9 = create_conv(64, (3, 3), conv9, 'conv9_2', activation='relu')
conv9 = Conv2D(3, (1, 1), padding='same', name='conv9_3')(conv9)
model = Model(inputs=inputs, outputs=conv9)
model.compile(optimizer=Adam(LEARNING_RATE),
loss='mean_squared_error',
metrics=['accuracy', eacc, mse, mae])
return model
model = create_model()
if os.path.exists(WEIGHTS):
model.load_weights(WEIGHTS)
if MODE == 1:
model_checkpoint = ModelCheckpoint(
filepath=WEIGHTS,
monitor='loss',
verbose=1,
save_best_only=True)
reduce_lr = ReduceLROnPlateau(
monitor='loss',
factor=0.5,
patience=10)
scheduler = LearningRateScheduler(learning_scheduler)
model.fit(
data_grey,
data_lab,
batch_size=BATCH_SIZE,
epochs=EPOCHS,
verbose=1,
validation_data=(data_test_grey, data_test_lab),
callbacks=[model_checkpoint, scheduler])
elif MODE == 2:
for i in range(0, 5000):
print(i)
grey = data_test_grey[i:i+1]
lab_original = data_test_lab[i]
lab_pred = np.array(model.predict(grey))[0]
show_lab(lab_original, lab_pred)
| 33.710345
| 119
| 0.657119
|
5719f140f9b4b56d24313cc459bbe76cdedd95ba
| 204,251
|
js
|
JavaScript
|
test/test-50-fs-runtime-layer/test-x3-index.js
|
plasmo-foss/pkg
|
d9508881313581697a4632c217c3af6a6ca0490d
|
[
"MIT"
] | 4,489
|
2020-05-27T19:16:08.000Z
|
2022-03-31T23:26:29.000Z
|
test/test-50-fs-runtime-layer/test-x3-index.js
|
plasmo-foss/pkg
|
d9508881313581697a4632c217c3af6a6ca0490d
|
[
"MIT"
] | 1,022
|
2020-05-28T11:10:24.000Z
|
2022-03-31T22:48:18.000Z
|
test/test-50-fs-runtime-layer/test-x3-index.js
|
plasmo-foss/pkg
|
d9508881313581697a4632c217c3af6a6ca0490d
|
[
"MIT"
] | 277
|
2020-05-27T18:23:15.000Z
|
2022-03-28T11:30:12.000Z
|
/* eslint-disable brace-style */
/* eslint-disable no-path-concat */
'use strict';
var fs = require('fs');
var path = require('path');
var assert = require('assert');
var theRequireContentA = './test-z-asset-A.css';
var theRequireContentB = 'test-z-asset-B.css';
function firstLowerCase(s) {
return s.slice(0, 1).toLowerCase() + s.slice(1);
}
function firstUpperCase(s) {
return s.slice(0, 1).toUpperCase() + s.slice(1);
}
// ///////////////////////////////////////////////////////////////////////////
fs.exists(path.join(__dirname, theRequireContentA), function (e82, v82) {
fs.exists(__dirname + path.sep + theRequireContentB, function (e83, v83) {
fs.exists(__dirname + '/' + theRequireContentB, function (e84, v84) {
fs.exists(
firstLowerCase(path.join(__dirname, theRequireContentA)),
function (e85, v85) {
fs.exists(
firstLowerCase(__dirname + path.sep + theRequireContentB),
function (e86, v86) {
fs.exists(
firstLowerCase(__dirname + '/' + theRequireContentB),
function (e87, v87) {
fs.exists(
firstUpperCase(path.join(__dirname, theRequireContentA)),
function (e88, v88) {
fs.exists(
firstUpperCase(
__dirname + path.sep + theRequireContentB
),
function (e89, v89) {
fs.exists(
firstUpperCase(
__dirname + '/' + theRequireContentB
),
function (e90, v90) {
//
fs.exists(
path.join(
__dirname,
theRequireContentA + '-no-such'
),
function (e91, v91) {
fs.exists(
__dirname +
path.sep +
theRequireContentB +
'-no-such',
function (e92, v92) {
fs.exists(
__dirname +
'/' +
theRequireContentB +
'-no-such',
function (e93, v93) {
fs.exists(
firstLowerCase(
path.join(
__dirname,
theRequireContentA + '-no-such'
)
),
function (e94, v94) {
fs.exists(
firstLowerCase(
__dirname +
path.sep +
theRequireContentB +
'-no-such'
),
function (e95, v95) {
fs.exists(
firstLowerCase(
__dirname +
'/' +
theRequireContentB +
'-no-such'
),
function (e96, v96) {
fs.exists(
firstUpperCase(
path.join(
__dirname,
theRequireContentA +
'-no-such'
)
),
function (e97, v97) {
fs.exists(
firstUpperCase(
__dirname +
path.sep +
theRequireContentB +
'-no-such'
),
function (
e98,
v98
) {
fs.exists(
firstUpperCase(
__dirname +
'/' +
theRequireContentB +
'-no-such'
),
function (
e99,
v99
) {
//
fs.access(
path.join(
__dirname,
theRequireContentA
),
function (
e100,
v100
) {
fs.access(
__dirname +
path.sep +
theRequireContentB,
function (
e101,
v101
) {
fs.access(
__dirname +
'/' +
theRequireContentB,
function (
e102,
v102
) {
fs.access(
firstLowerCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e103,
v103
) {
fs.access(
firstLowerCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e104,
v104
) {
fs.access(
firstLowerCase(
__dirname +
'/' +
theRequireContentB
),
function (
e105,
v105
) {
fs.access(
firstUpperCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e106,
v106
) {
fs.access(
firstUpperCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e107,
v107
) {
fs.access(
firstUpperCase(
__dirname +
'/' +
theRequireContentB
),
function (
e108,
v108
) {
//
fs.access(
path.join(
__dirname,
theRequireContentA +
'-no-such'
),
function (
e109,
v109
) {
fs.access(
__dirname +
path.sep +
theRequireContentB +
'-no-such',
function (
e110,
v110
) {
fs.access(
__dirname +
'/' +
theRequireContentB +
'-no-such',
function (
e111,
v111
) {
fs.access(
firstLowerCase(
path.join(
__dirname,
theRequireContentA +
'-no-such'
)
),
function (
e112,
v112
) {
fs.access(
firstLowerCase(
__dirname +
path.sep +
theRequireContentB +
'-no-such'
),
function (
e113,
v113
) {
fs.access(
firstLowerCase(
__dirname +
'/' +
theRequireContentB +
'-no-such'
),
function (
e114,
v114
) {
fs.access(
firstUpperCase(
path.join(
__dirname,
theRequireContentA +
'-no-such'
)
),
function (
e115,
v115
) {
fs.access(
firstUpperCase(
__dirname +
path.sep +
theRequireContentB +
'-no-such'
),
function (
e116,
v116
) {
fs.access(
firstUpperCase(
__dirname +
'/' +
theRequireContentB +
'-no-such'
),
function (
e117,
v117
) {
//
fs.stat(
path.join(
__dirname,
theRequireContentA
),
function (
e118,
v118
) {
fs.stat(
__dirname +
path.sep +
theRequireContentB,
function (
e119,
v119
) {
fs.stat(
__dirname +
'/' +
theRequireContentB,
function (
e120,
v120
) {
fs.stat(
firstLowerCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e121,
v121
) {
fs.stat(
firstLowerCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e122,
v122
) {
fs.stat(
firstLowerCase(
__dirname +
'/' +
theRequireContentB
),
function (
e123,
v123
) {
fs.stat(
firstUpperCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e124,
v124
) {
fs.stat(
firstUpperCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e125,
v125
) {
fs.stat(
firstUpperCase(
__dirname +
'/' +
theRequireContentB
),
function (
e126,
v126
) {
//
fs.lstat(
path.join(
__dirname,
theRequireContentA
),
function (
e127,
v127
) {
fs.lstat(
__dirname +
path.sep +
theRequireContentB,
function (
e128,
v128
) {
fs.lstat(
__dirname +
'/' +
theRequireContentB,
function (
e129,
v129
) {
fs.lstat(
firstLowerCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e130,
v130
) {
fs.lstat(
firstLowerCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e131,
v131
) {
fs.lstat(
firstLowerCase(
__dirname +
'/' +
theRequireContentB
),
function (
e132,
v132
) {
fs.lstat(
firstUpperCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e133,
v133
) {
fs.lstat(
firstUpperCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e134,
v134
) {
fs.lstat(
firstUpperCase(
__dirname +
'/' +
theRequireContentB
),
function (
e135,
v135
) {
//
fs.realpath(
path.join(
__dirname,
theRequireContentA
),
function (
e145,
v145
) {
fs.realpath(
__dirname +
path.sep +
theRequireContentB,
function (
e146,
v146
) {
fs.realpath(
__dirname +
'/' +
theRequireContentB,
function (
e147,
v147
) {
fs.realpath(
firstLowerCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e148,
v148
) {
fs.realpath(
firstLowerCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e149,
v149
) {
fs.realpath(
firstLowerCase(
__dirname +
'/' +
theRequireContentB
),
function (
e150,
v150
) {
fs.realpath(
firstUpperCase(
path.join(
__dirname,
theRequireContentA
)
),
function (
e151,
v151
) {
fs.realpath(
firstUpperCase(
__dirname +
path.sep +
theRequireContentB
),
function (
e152,
v152
) {
fs.realpath(
firstUpperCase(
__dirname +
'/' +
theRequireContentB
),
function (
e153,
v153
) {
console.log(
[
'******************************************************',
'******************************************************',
'******************************************************',
'exists',
assert(
v82 ===
undefined
),
e82,
v82 ===
undefined,
e83,
v83 ===
undefined,
e84,
v84 ===
undefined,
e85,
v85 ===
undefined,
e86,
v86 ===
undefined,
e87,
v87 ===
undefined,
e88,
v88 ===
undefined,
e89,
v89 ===
undefined,
e90,
v90 ===
undefined,
'******************************************************',
'******************************************************',
'******************************************************',
'exists-no-such',
assert(
v91 ===
undefined
),
e91,
v91 ===
undefined,
e92,
v92 ===
undefined,
e93,
v93 ===
undefined,
e94,
v94 ===
undefined,
e95,
v95 ===
undefined,
e96,
v96 ===
undefined,
e97,
v97 ===
undefined,
e98,
v98 ===
undefined,
e99,
v99 ===
undefined,
'******************************************************',
'******************************************************',
'******************************************************',
'access',
assert(
v100 ===
undefined ||
v100 ===
0
),
e100 ===
null,
v100 ===
undefined ||
v100 ===
0, // odd behaviour in 0.12.14
e101 ===
null,
v101 ===
undefined ||
v101 ===
0, // callback args are (null, 0). wtf 0?
e102 ===
null,
v102 ===
undefined ||
v102 ===
0,
e103 ===
null,
v103 ===
undefined ||
v103 ===
0,
e104 ===
null,
v104 ===
undefined ||
v104 ===
0,
e105 ===
null,
v105 ===
undefined ||
v105 ===
0,
e106 ===
null,
v106 ===
undefined ||
v106 ===
0,
e107 ===
null,
v107 ===
undefined ||
v107 ===
0,
e108 ===
null,
v108 ===
undefined ||
v108 ===
0,
'******************************************************',
'******************************************************',
'******************************************************',
'access-no-such',
assert(
v109 ===
undefined
),
e109.errno,
e109.code,
v109 ===
undefined,
e110.errno,
e110.code,
v110 ===
undefined,
e111.errno,
e111.code,
v111 ===
undefined,
e112.errno,
e112.code,
v112 ===
undefined,
e113.errno,
e113.code,
v113 ===
undefined,
e114.errno,
e114.code,
v114 ===
undefined,
e115.errno,
e115.code,
v115 ===
undefined,
e116.errno,
e116.code,
v116 ===
undefined,
e117.errno,
e117.code,
v117 ===
undefined,
'******************************************************',
'******************************************************',
'******************************************************',
'stat',
assert(
e118 ===
null
),
e118 ===
null,
v118.mode,
v118.birthtime.getYear(),
v118.isFile(),
v118.isDirectory(),
e119 ===
null,
v119.mode,
v119.birthtime.getYear(),
v119.isFile(),
v119.isDirectory(),
e120 ===
null,
v120.mode,
v120.birthtime.getYear(),
v120.isFile(),
v120.isDirectory(),
e121 ===
null,
v121.mode,
v121.birthtime.getYear(),
v121.isFile(),
v121.isDirectory(),
e122 ===
null,
v122.mode,
v122.birthtime.getYear(),
v122.isFile(),
v122.isDirectory(),
e123 ===
null,
v123.mode,
v123.birthtime.getYear(),
v123.isFile(),
v123.isDirectory(),
e124 ===
null,
v124.mode,
v124.birthtime.getYear(),
v124.isFile(),
v124.isDirectory(),
e125 ===
null,
v125.mode,
v125.birthtime.getYear(),
v125.isFile(),
v125.isDirectory(),
e126 ===
null,
v126.mode,
v126.birthtime.getYear(),
v126.isFile(),
v126.isDirectory(),
'******************************************************',
'******************************************************',
'******************************************************',
'lstat',
assert(
e127 ===
null
),
e127 ===
null,
v127.mode,
v127.birthtime.getYear(),
v127.isFile(),
v127.isDirectory(),
e128 ===
null,
v128.mode,
v128.birthtime.getYear(),
v128.isFile(),
v128.isDirectory(),
e129 ===
null,
v129.mode,
v129.birthtime.getYear(),
v129.isFile(),
v129.isDirectory(),
e130 ===
null,
v130.mode,
v130.birthtime.getYear(),
v130.isFile(),
v130.isDirectory(),
e131 ===
null,
v131.mode,
v131.birthtime.getYear(),
v131.isFile(),
v131.isDirectory(),
e132 ===
null,
v132.mode,
v132.birthtime.getYear(),
v132.isFile(),
v132.isDirectory(),
e133 ===
null,
v133.mode,
v133.birthtime.getYear(),
v133.isFile(),
v133.isDirectory(),
e134 ===
null,
v134.mode,
v134.birthtime.getYear(),
v134.isFile(),
v134.isDirectory(),
e135 ===
null,
v135.mode,
v135.birthtime.getYear(),
v135.isFile(),
v135.isDirectory(),
'******************************************************',
'******************************************************',
'******************************************************',
'realpath',
assert(
e145 ===
null
),
e145 ===
null,
path.basename(
v145
),
path.basename(
path.dirname(
v145
)
),
e146 ===
null,
path.basename(
v146
),
path.basename(
path.dirname(
v146
)
),
e147 ===
null,
path.basename(
v147
),
path.basename(
path.dirname(
v147
)
),
e148 ===
null,
path.basename(
v148
),
path.basename(
path.dirname(
v148
)
),
e149 ===
null,
path.basename(
v149
),
path.basename(
path.dirname(
v149
)
),
e150 ===
null,
path.basename(
v150
),
path.basename(
path.dirname(
v150
)
),
e151 ===
null,
path.basename(
v151
),
path.basename(
path.dirname(
v151
)
),
e152 ===
null,
path.basename(
v152
),
path.basename(
path.dirname(
v152
)
),
e153 ===
null,
path.basename(
v153
),
path.basename(
path.dirname(
v153
)
),
'******************************************************',
'******************************************************',
'******************************************************',
].join(
'\n'
)
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
}
);
});
});
});
| 182.041889
| 307
| 0.034433
|
437e10bf8a11b4073f6fd29321834c14594dc368
| 490
|
ts
|
TypeScript
|
src/components/tokenDictionary/tokens/transaction.ts
|
phartenfeller/plsql-lint
|
cc4732fcdc9fc483b2b783f68de71283fa72cafe
|
[
"MIT"
] | 1
|
2020-02-13T12:13:17.000Z
|
2020-02-13T12:13:17.000Z
|
src/components/tokenDictionary/tokens/transaction.ts
|
phartenfeller/plsql-lint
|
cc4732fcdc9fc483b2b783f68de71283fa72cafe
|
[
"MIT"
] | 1
|
2020-05-08T17:07:31.000Z
|
2020-05-08T17:07:31.000Z
|
src/components/tokenDictionary/tokens/transaction.ts
|
phartenfeller/plsql-lint
|
cc4732fcdc9fc483b2b783f68de71283fa72cafe
|
[
"MIT"
] | null | null | null |
import { createToken } from 'chevrotain';
import Identifier from './Identifier';
const StartTransactionKw = createToken({
name: 'StartTransactionKw',
pattern: /start transaction/i,
longer_alt: Identifier,
});
const CommitKw = createToken({
name: 'CommitKw',
pattern: /commit/i,
longer_alt: Identifier,
});
const RollbackKw = createToken({
name: 'RollbackKw',
pattern: /rollback/i,
longer_alt: Identifier,
});
export default [StartTransactionKw, CommitKw, RollbackKw];
| 21.304348
| 58
| 0.726531
|
375d9aa006ff4240b4fffeb4d419cd7173e37edd
| 37,782
|
kt
|
Kotlin
|
src/com/halfdeadgames/kterminal/KTerminalData.kt
|
heatherhaks/kterminal
|
391c7ac2c023a61c4e128edec2b54828c4003a3f
|
[
"MIT"
] | 29
|
2018-04-22T21:01:00.000Z
|
2021-09-20T05:10:02.000Z
|
src/com/halfdeadgames/kterminal/KTerminalData.kt
|
heatherhaks/kterminal
|
391c7ac2c023a61c4e128edec2b54828c4003a3f
|
[
"MIT"
] | 1
|
2019-04-02T17:42:44.000Z
|
2019-04-02T17:42:44.000Z
|
src/com/halfdeadgames/kterminal/KTerminalData.kt
|
heatherhaks/kterminal
|
391c7ac2c023a61c4e128edec2b54828c4003a3f
|
[
"MIT"
] | 8
|
2018-04-25T08:26:26.000Z
|
2021-03-16T20:47:46.000Z
|
package com.halfdeadgames.kterminal
import com.badlogic.gdx.graphics.Color
import com.halfdeadgames.kterminal.KTerminalShapePlotter.plotCircle
import com.halfdeadgames.kterminal.KTerminalShapePlotter.plotEllipse
import com.halfdeadgames.kterminal.KTerminalShapePlotter.plotLine
import com.halfdeadgames.kterminal.KTerminalShapePlotter.plotRect
import com.halfdeadgames.kterminal.KTerminalShapePlotter.plotTriangle
import java.security.cert.CertificateNotYetValidException
@Suppress("unused", "MemberVisibilityCanBePrivate")
class KTerminalData(width: Int,
height: Int,
var defaultForegroundColor: Float = Color.WHITE.toFloatBits(),
var defaultBackgroundColor: Float = Color.BLACK.toFloatBits(),
val customColorMap: Map<String, Color>? = null
) {
var width: Int = width
set(value) {
if(value > 0) {
field = value
} else {
throw IllegalArgumentException("Width can't be 0 or below.")
}
}
var height: Int = height
set(value) {
if(value > 0) {
field = value
} else {
throw IllegalArgumentException("Height can't be 0 or below.")
}
}
var terminal = Array(width) {
Array(height) {
KTerminalGlyph(0, defaultForegroundColor, defaultBackgroundColor)
}
}
//will not preserve terminal data
fun resize(width: Int, height: Int) {
this.width = width
this.height = height
terminal = Array(width) {
Array(height) {
KTerminalGlyph(0, defaultForegroundColor, defaultBackgroundColor)
}
}
}
inner class Cursor(x: Int, y: Int, foregroundColor: Float, backgroundColor: Float, rotation: Float, scale: Float, offsetX: Float, offsetY: Float, isFlippedX: Boolean, isFlippedY: Boolean) {
constructor() : this(0, 0, defaultForegroundColor, defaultBackgroundColor, 0f, 1f, 0f, 0f, isFlippedX = false, isFlippedY = false)
var foregroundColor: Float
set(value) { cursorGlyph.foregroundColor = value }
get() = cursorGlyph.foregroundColor
var backgroundColor: Float
set(value) { cursorGlyph.backgroundColor = value }
get() = cursorGlyph.backgroundColor
var rotation: Float
set(value) { cursorGlyph.rotation = value }
get() = cursorGlyph.rotation
var scale: Float
set(value) { cursorGlyph.scale = value }
get() = cursorGlyph.scale
var offsetX: Float
set(value) { cursorGlyph.offsetX = value }
get() = cursorGlyph.offsetX
var offsetY: Float
set(value) { cursorGlyph.offsetY = value }
get() = cursorGlyph.offsetY
var isFlippedX: Boolean
set(value) { cursorGlyph.isFlippedX = value }
get() = cursorGlyph.isFlippedX
var isFlippedY: Boolean
set(value) { cursorGlyph.isFlippedY = value }
get() = cursorGlyph.isFlippedY
private var cursorGlyph = KTerminalGlyph(0, foregroundColor, backgroundColor, rotation, scale, offsetX, offsetY, isFlippedX, isFlippedY)
private fun clampCursor(value: Int, max: Int) : Int {
var tempValue = value
while (tempValue < 0 || tempValue >= max) {
if (tempValue < 0) {
tempValue += max
} else if (tempValue >= max) {
tempValue -= max
}
}
return tempValue
}
var x: Int = x
set(value) {
field = clampCursor(value, width)
}
var y: Int = y
set(value) {
field = clampCursor(value, height)
}
fun set(x: Int, y: Int, foregroundColor: Float, backgroundColor: Float, rotation: Float, scale: Float, offsetX: Float, offsetY: Float, isFlippedX: Boolean, isFlippedY: Boolean) {
this.x = x
this.y = y
cursorGlyph.set(0, foregroundColor, backgroundColor, rotation, scale, offsetX, offsetY, isFlippedX, isFlippedY)
}
fun set(x: Int, y: Int) {
this.x = x
this.y = y
}
fun set(cursor: Cursor) {
set(cursor.x, cursor.y, cursor.foregroundColor, cursor.backgroundColor, cursor.rotation, cursor.scale, cursor.offsetX, cursor.offsetY, cursor.isFlippedX, cursor.isFlippedY)
}
}
private val cursor: Cursor = Cursor()
private val workingCursor: Cursor = Cursor()
@JvmOverloads fun setCursor(x: Int = 0, y: Int = 0, foregroundColor: Float = defaultForegroundColor, backgroundColor: Float = defaultBackgroundColor, rotation: Float = 0f, scale: Float = 1f, offsetX: Float = 0f, offsetY: Float = 0f, isFlippedX: Boolean = false, isFlippedY: Boolean = false) {
cursor.set(x, y, foregroundColor, backgroundColor, rotation, scale, offsetX, offsetY, isFlippedX, isFlippedY)
workingCursor.set(cursor)
}
fun resetCursor() {
setCursor(0, 0, defaultForegroundColor, defaultBackgroundColor, 0f, 1f, 0f, 0f, isFlippedX = false, isFlippedY = false)
}
fun setCursorPosition(x: Int, y: Int) : KTerminalData {
cursor.x = x
cursor.y = y
workingCursor.set(cursor)
return this
}
fun setCursorColor(foregroundColor: Float, backgroundColor: Float) : KTerminalData {
cursor.foregroundColor = foregroundColor
cursor.backgroundColor = backgroundColor
workingCursor.foregroundColor = foregroundColor
workingCursor.backgroundColor = backgroundColor
return this
}
fun setCursorColor(foregroundColor: Color, backgroundColor: Color) : KTerminalData {
return setCursorColor(foregroundColor.toFloatBits(), backgroundColor.toFloatBits())
}
fun setCursorScale(scale: Float) : KTerminalData {
cursor.scale = scale
workingCursor.scale = scale
return this
}
fun setCursorRotation(rotation: Float) : KTerminalData {
cursor.rotation = rotation
workingCursor.rotation = rotation
return this
}
fun setCursorOffset(x: Float, y: Float) : KTerminalData {
cursor.offsetX = x
cursor.offsetY = y
workingCursor.offsetX = x
workingCursor.offsetY = y
return this
}
fun setCursorFlip(isFlippedX: Boolean, isFlippedY: Boolean) : KTerminalData {
cursor.isFlippedX = isFlippedX
cursor.isFlippedY = isFlippedY
workingCursor.isFlippedX = isFlippedX
workingCursor.isFlippedY = isFlippedY
return this
}
//position brackets
operator fun get(x: Int, y: Int) : KTerminalData {
return setCursorPosition(x, y)
}
//position + offset brackets
operator fun get(x: Int, y: Int, offsetX: Float, offsetY: Float) : KTerminalData {
return setCursorPosition(x, y).setCursorOffset(offsetX, offsetY)
}
//color brackets, can't do floats because rotation and scale use floats
operator fun get(foregroundColor: Color, backgroundColor: Color) : KTerminalData {
return setCursorColor(foregroundColor, backgroundColor)
}
//rotation and scale brackets
operator fun get(rotation: Float, scale: Float) : KTerminalData {
return setCursorRotation(rotation).setCursorScale(scale)
}
//flip status brackets
operator fun get(isFlippedX: Boolean, isFlippedY: Boolean) : KTerminalData {
return setCursorFlip(isFlippedX, isFlippedY)
}
//override any cursor data given by the glyph
fun write(glyph: KTerminalGlyph) : KTerminalData {
workingCursor.foregroundColor = glyph.foregroundColor
workingCursor.backgroundColor = glyph.backgroundColor
workingCursor.rotation = glyph.rotation
workingCursor.scale = glyph.scale
workingCursor.offsetX = glyph.offsetX
workingCursor.offsetY = glyph.offsetY
workingCursor.isFlippedX = glyph.isFlippedX
workingCursor.isFlippedY = glyph.isFlippedY
return write(glyph.value)
}
fun write(value: Int) : KTerminalData {
terminal[workingCursor.x][workingCursor.y].apply {
this.value = value
this.foregroundColor = workingCursor.foregroundColor
this.backgroundColor = workingCursor.backgroundColor
this.rotation = workingCursor.rotation
this.scale = workingCursor.scale
this.offsetX = workingCursor.offsetX
this.offsetY = workingCursor.offsetY
this.isFlippedX = workingCursor.isFlippedX
this.isFlippedY = workingCursor.isFlippedY
}
workingCursor.set(cursor)
return this
}
fun write(char: Char) : KTerminalData {
return write(char.toInt())
}
@Suppress("LocalVariableName")
private tailrec fun recursiveTagExtractor(input: String,
tagMap: MutableMap<Int, String>,
position: Int = 0,
inTag: Boolean = false,
output: String = "",
tagPosition: Int = -1,
offsetPosition: Int = 0) : String {
val STARTING_CHAR = '['
val ENDING_CHAR = ']'
val ESCAPE_CHAR = '\\'
var tagging: Boolean = inTag
var tagPos = tagPosition
var outputString = output
var offsetPos = offsetPosition
fun isStartingChar(pos: Int = position) : Boolean = input[pos] == STARTING_CHAR
fun isEscapeChar(pos: Int = position) : Boolean = input[pos] == ESCAPE_CHAR
fun isEndingChar(pos: Int = position) : Boolean = input[pos] == ENDING_CHAR
fun isEscaped(pos:Int = position) : Boolean = (pos == 0 && (isEscapeChar(pos)))
|| (pos > 0 && isEscapeChar(pos) && !isEscapeChar(pos - 1))
if(!tagging && (isStartingChar() && !isEscaped(2))) {
tagging = true
tagPos = offsetPos
} else if(tagging && isEndingChar( position - 1) && !isEscaped(position - 1)) {
tagging = false
tagPos = -1
}
val inputCharString = "${input[position]}"
if(!isEscaped()) {
when(tagging) {
true -> tagMap[tagPos] = if(tagMap[tagPos].isNullOrEmpty()) inputCharString else tagMap[tagPos] + inputCharString
false -> {
outputString += if(tagMap[-1].isNullOrEmpty()) inputCharString else tagMap[-1] + inputCharString
offsetPos++
}
}
}
return if(position + 1 >= input.length) outputString
else recursiveTagExtractor(input, tagMap, position + 1, tagging, outputString, tagPos, offsetPos)
}
@JvmOverloads fun write(string: String, hasMarkup: Boolean = false, direction: Int = WRITE_LEFT_TO_RIGHT, wrapping: Int = WRAP_NONE) : KTerminalData {
var posX = cursor.x
var posY = cursor.y
var isWriting = true
fun wrap(writingPos: Int, alignPos: Int, max: Int) : Pair<Int, Int> {
var tempAlignPos = alignPos
fun adjustAlignPos() {
when(wrapping) {
WRAP_NONE -> isWriting = false
WRAP_POSITIVE_SHIFT -> tempAlignPos++
WRAP_NEGATIVE_SHIFT -> tempAlignPos--
}
}
val tempWritingPos = when {
writingPos >= max -> {
adjustAlignPos()
0
}
writingPos < 0 -> {
adjustAlignPos()
max - 1
}
else -> writingPos
}
return Pair(tempWritingPos, tempAlignPos)
}
val tagMap = mutableMapOf<Int, String>()
val workingString = if(hasMarkup) recursiveTagExtractor(string, tagMap) else string
var writingColor = workingCursor.foregroundColor
workingString.toCharArray().forEachIndexed { i, it ->
if(isWriting) {
workingCursor.set(posX, posY)
if(hasMarkup && tagMap[i] != null) {
val tagString = tagMap.getValue(i).removePrefix("[").removeSuffix("]")
if(customColorMap != null && customColorMap[tagString] != null) {
writingColor = customColorMap.getValue(tagString).toFloatBits()
} else if(KTerminalColor.colorMap[tagString] != null) {
writingColor = KTerminalColor.colorMap.getValue(tagString).toFloatBits()
}
}
workingCursor.foregroundColor = writingColor
write(it)
when(direction) {
WRITE_LEFT_TO_RIGHT -> posX++
WRITE_TOP_TO_BOTTOM -> posY++
WRITE_RIGHT_TO_LEFT -> posX--
WRITE_BOTTOM_TO_TOP -> posY--
}
when(direction) {
WRITE_LEFT_TO_RIGHT, WRITE_RIGHT_TO_LEFT -> {
val (tempX, tempY) = wrap(posX, posY, width)
posX = tempX
posY = tempY
}
WRITE_TOP_TO_BOTTOM, WRITE_BOTTOM_TO_TOP -> {
val (tempY, tempX) = wrap(posY, posX, height)
posX = tempX
posY = tempY
}
}
}
}
return this
}
@JvmOverloads fun writeSubCell(subcellX: Int, subcellY: Int, color: Float = defaultBackgroundColor, value: Int = -1) : KTerminalData {
fun clampCoord(value: Int, max: Int) : Int {
var tempValue = value
while (tempValue < 0 || tempValue >= max) {
if (tempValue < 0) {
tempValue += max
} else if (tempValue >= max) {
tempValue -= max
}
}
return tempValue
}
val tempX = clampCoord(subcellX, width * 2)
val tempY = clampCoord(subcellY, height * 2)
terminal[tempX / 2][tempY / 2].apply {
this.isSubCellEnabled = true
val tempValue = when(value) {
-1 -> when {
tempX % 2 == 0 && tempY % 2 == 0 -> 257
tempX % 2 == 1 && tempY % 2 == 0 -> 258
tempX % 2 == 0 && tempY % 2 == 1 -> 260
else -> 259
}
else -> value
}
this.subCellGlyph.subCells[tempX % 2][tempY % 2].set(color, tempValue)
}
return this
}
@JvmOverloads fun setSubCell(topLeftColor: Float = defaultBackgroundColor,
topRightColor: Float = defaultBackgroundColor,
bottomLeftColor: Float = defaultBackgroundColor,
bottomRightColor: Float = defaultBackgroundColor,
topLeftValue: Int = 257,
topRightValue: Int = 258,
bottomLeftValue: Int = 260,
bottomRightValue: Int = 259) : KTerminalData {
terminal[workingCursor.x][workingCursor.y].apply {
this.isSubCellEnabled = true
this.subCellGlyph.subCells[0][0].set(topLeftColor, topLeftValue)
this.subCellGlyph.subCells[1][0].set(topRightColor, topRightValue)
this.subCellGlyph.subCells[0][1].set(bottomLeftColor, bottomLeftValue)
this.subCellGlyph.subCells[1][1].set(bottomRightColor, bottomRightValue)
}
return this
}
fun setSubCell(topLeftColor: Color,
topRightColor: Color,
bottomLeftColor: Color,
bottomRightColor: Color,
topLeftValue: Int = 257,
topRightValue: Int = 258,
bottomLeftValue: Int = 260,
bottomRightValue: Int = 259) : KTerminalData {
return setSubCell(topLeftColor.toFloatBits(),
topRightColor.toFloatBits(),
bottomLeftColor.toFloatBits(),
bottomRightColor.toFloatBits(),
topLeftValue,
topRightValue,
bottomLeftValue,
bottomRightValue)
}
fun setSubCell(subCellGlyph: SubCellGlyph) : KTerminalData {
terminal[workingCursor.x][workingCursor.y].isSubCellEnabled = true
terminal[workingCursor.x][workingCursor.y].subCellGlyph = subCellGlyph
return this
}
fun clearSubCell() : KTerminalData {
terminal[workingCursor.x][workingCursor.y].isSubCellEnabled = false
terminal[workingCursor.x][workingCursor.y].subCellGlyph.reset()
return this
}
@JvmOverloads fun clear(width: Int = 1, height: Int = 1) : KTerminalData {
workingCursor.foregroundColor = defaultForegroundColor
workingCursor.backgroundColor = defaultBackgroundColor
workingCursor.rotation = 0f
workingCursor.scale = 1f
workingCursor.isFlippedX = false
workingCursor.isFlippedY = false
workingCursor.offsetX = 0f
workingCursor.offsetY = 0f
val startX = workingCursor.x
val startY = workingCursor.y
drawRect(width, height, 0, true)
for(x in startX until startX + width) {
for(y in startY until startY + height) {
workingCursor.x = x
workingCursor.y = y
clearSubCell()
}
}
return this
}
fun clearAll() : KTerminalData {
workingCursor.set(0, 0, defaultForegroundColor, defaultBackgroundColor, 0f, 1f, 0f, 0f, isFlippedX = false, isFlippedY = false)
return clear(width, height)
}
private fun fillShape(shapeList: List<Pair<Int, Int>>, value: Int, foregroundColor: Float, backgroundColor: Float) : KTerminalData {
val shapeListSorted = shapeList.sortedWith(compareBy<Pair<Int, Int>>{it.second}.thenBy { it.first })
val firstY = shapeListSorted.first().second
val lastY = shapeListSorted.last().second
shapeListSorted.forEachIndexed { index, pair ->
if(index + 1 < shapeListSorted.size) {
if(pair.second != firstY && pair.second != lastY) {
if( pair.second == shapeListSorted[index + 1].second
&& pair.first <= shapeListSorted[index + 1].first - 2) {
for(i in pair.first + 1 until shapeListSorted[index + 1].first) {
workingCursor.x = i
workingCursor.y = pair.second
workingCursor.foregroundColor = foregroundColor
workingCursor.backgroundColor = backgroundColor
write(value)
}
}
}
}
}
return this
}
private fun drawShape(shapeList: List<Pair<Int, Int>>, value: Int) : KTerminalData {
shapeList.forEach {
workingCursor.x = it.first
workingCursor.y = it.second
write(value)
}
return this
}
fun drawRect(width: Int,
height: Int,
char: Char = ' ',
isFilled: Boolean = false,
fillChar: Char = char,
fillForeground: Float,
fillBackground: Float) :KTerminalData {
return drawRect(width, height, char.toInt(), isFilled, fillChar.toInt(), fillForeground, fillBackground)
}
@JvmOverloads fun drawRect(width: Int,
height: Int,
value: Int,
isFilled: Boolean = false,
fillValue: Int = value,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
val plotList = plotRect(cursor.x, cursor.y, width, height)
drawShape(plotList, value)
if(isFilled) fillShape(plotList, fillValue, fillForeground, fillBackground)
return this
}
fun drawLine(endX: Int, endY: Int, char: Char) : KTerminalData {
return drawLine(endX, endY, char.toInt())
}
fun drawLine(endX: Int, endY: Int, value: Int) : KTerminalData {
val linePlot = plotLine(cursor.x, cursor.y, endX, endY).toList()
return drawShape(linePlot, value)
}
@JvmOverloads fun drawEllipse(width: Int,
height: Int,
char: Char,
isFilled: Boolean = false,
fillChar: Char = ' ',
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
return drawEllipse(width, height, char.toInt(), isFilled, fillChar.toInt(), fillForeground, fillBackground)
}
@JvmOverloads fun drawEllipse(width: Int,
height: Int,
value: Int,
isFilled: Boolean = false,
fillValue: Int = value,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
val ellipsePlot = plotEllipse(cursor.x, cursor.y, cursor.x + width, cursor.y + height)
drawShape(ellipsePlot, value)
if(isFilled) fillShape(ellipsePlot, fillValue, fillForeground, fillBackground)
return this
}
@JvmOverloads fun drawCircle(radius: Int,
char: Char,
isFilled: Boolean = false,
fillChar: Char = char,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
return drawCircle(radius, char.toInt(), isFilled, fillChar.toInt(), fillForeground, fillBackground)
}
@JvmOverloads fun drawCircle(radius: Int,
value: Int,
isFilled: Boolean = false,
fillValue: Int = value,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
val circlePlot = plotCircle(cursor.x, cursor.y, radius)
drawShape(circlePlot, value)
if(isFilled) fillShape(circlePlot, fillValue, fillForeground, fillBackground)
return this
}
@JvmOverloads fun drawTriangle(leftX: Int,
leftY: Int,
rightX: Int,
rightY: Int,
char: Char,
isFilled: Boolean = false,
fillChar: Char = char,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
return drawTriangle(leftX, leftY, rightX, rightY, char.toInt(), isFilled, fillChar.toInt(), fillForeground, fillBackground)
}
@JvmOverloads fun drawTriangle(leftX: Int,
leftY: Int,
rightX: Int,
rightY: Int,
value: Int,
isFilled: Boolean = false,
fillValue: Int = value,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
val trianglePlot = plotTriangle(cursor.x, cursor.y, leftX, leftY, rightX, rightY)
drawShape(trianglePlot, value)
if(isFilled) fillShape(trianglePlot, fillValue, fillForeground, fillBackground)
return this
}
@JvmOverloads fun drawBox(width: Int,
height: Int,
topLeft: Char,
topRight: Char,
bottomLeft: Char,
bottomRight: Char,
horizontal: Char,
vertical: Char,
isFilled: Boolean = false,
fillChar: Char = ' ',
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
return drawBox(width, height, topLeft.toInt(), topRight.toInt(), bottomLeft.toInt(), bottomRight.toInt(),
horizontal.toInt(), vertical.toInt(), isFilled, fillChar.toInt(), fillForeground, fillBackground)
}
@JvmOverloads fun drawBox(width: Int,
height: Int,
topLeft: Int,
topRight: Int,
bottomLeft: Int,
bottomRight: Int,
horizontal: Int,
vertical: Int,
isFilled: Boolean = false,
fillValue: Int = 0,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
val plotList = plotRect(cursor.x, cursor.y, width, height)
plotList.forEach {
workingCursor.x = it.first
workingCursor.y = it.second
when(it.first) {
cursor.x ->
when(it.second) {
cursor.y -> write(topLeft)
cursor.y + height - 1 -> write(bottomLeft)
else -> write(vertical)
}
cursor.x + width - 1 ->
when(it.second) {
cursor.y -> write(topRight)
cursor.y + height - 1 -> write(bottomRight)
else -> write(vertical)
}
else -> write(horizontal)
}
}
if(isFilled) fillShape(plotList, fillValue, fillForeground, fillBackground)
return this
}
@JvmOverloads fun drawDoubleBox(width: Int,
height: Int,
isFilled: Boolean,
fillChar: Char,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
return drawDoubleBox(width, height, isFilled, fillChar.toInt(), fillForeground, fillBackground)
}
@JvmOverloads fun drawDoubleBox(width: Int,
height: Int,
isFilled: Boolean = false,
fillValue: Int = 0,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
return drawBox(width, height,
BOX_DOUBLE_DOWN_RIGHT,
BOX_DOUBLE_DOWN_LEFT,
BOX_DOUBLE_UP_RIGHT,
BOX_DOUBLE_UP_LEFT,
BOX_DOUBLE_HORIZONTAL,
BOX_DOUBLE_VERTICAL,
isFilled, fillValue, fillForeground, fillBackground)
}
fun drawSingleBox(width: Int,
height: Int,
isFilled: Boolean,
fillChar: Char,
fillForeground: Color,
fillBackground: Color) : KTerminalData {
return drawSingleBox(width, height, isFilled, fillChar, fillForeground, fillBackground)
}
@JvmOverloads fun drawSingleBox(width: Int,
height: Int,
isFilled: Boolean = false,
fillValue: Int = 0,
fillForeground: Float = cursor.foregroundColor,
fillBackground: Float = cursor.backgroundColor) : KTerminalData {
return drawBox(width, height,
BOX_SINGLE_DOWN_RIGHT,
BOX_SINGLE_DOWN_LEFT,
BOX_SINGLE_UP_RIGHT,
BOX_SINGLE_UP_LEFT,
BOX_SINGLE_HORIZONTAL,
BOX_SINGLE_VERTICAL,
isFilled, fillValue, fillForeground, fillBackground)
}
override fun toString(): String {
var output = "[width=$width,height=$height,defaultForegroundColor=$defaultForegroundColor," +
"defaultBackgroundColor=$defaultBackgroundColor,cursor={x=${cursor.x},y=${cursor.y}," +
"foreground=${cursor.foregroundColor},background=${cursor.backgroundColor}},terminal={\n"
for(j in 0 until height) {
for(i in 0 until width) {
output += "${terminal[i][j].char}"
}
output += "\n"
}
output += "}]"
return output
}
companion object {
const val WRITE_LEFT_TO_RIGHT = 0
const val WRITE_TOP_TO_BOTTOM = 1
const val WRITE_RIGHT_TO_LEFT = 2
const val WRITE_BOTTOM_TO_TOP = 3
const val WRAP_NONE = -1
const val WRAP_NO_SHIFT = 0
const val WRAP_POSITIVE_SHIFT = 1
const val WRAP_NEGATIVE_SHIFT = 2
const val NULL = 0
const val SMILE = 1
const val INVERTED_SMILE = 2
const val HEART = 3
const val DIAMOND = 4
const val CLUB = 5
const val SPADE = 6
const val BULLET = 7
const val INVERTED_BULLET = 8
const val CIRCLE = 9
const val INVERTED_CIRCLE = 10
const val MALE = 11
const val FEMALE = 12
const val PAIR_EIGHTH_NOTE = 13
const val EIGHTH_NOTE = 14
const val SOLAR = 15
const val RIGHT_TRIANGLE = 16
const val LEFT_TRIANGLE = 17
const val UP_DOWN_ARROW = 18
const val DOUBLE_EXCLAMATION = 19
const val PARAGRAPH = 20
const val SECTION = 21
const val LOWER_BLACK_RECTANGLE = 22
const val UP_DOWN_BAR_ARROW = 23
const val UP_ARROW = 24
const val DOWN_ARROW = 25
const val RIGHT_ARROW = 26
const val LEFT_ARROW = 27
const val RIGHT_ANGLE = 28
const val LEFT_RIGHT_ARROW = 29
const val UP_TRIANGLE = 30
const val DOWN_TRIANGLE = 31
const val SPACE = 32
const val HOUSE = 127
const val UPPER_CEDILLA_C = 128
const val LOWER_UMLAUT_U = 129
const val ACUTE_E = 130
const val CIRCUMFLEX_A = 131
const val LOWER_UMLAUT_A = 132
const val GRAVE_A = 133
const val LOWER_RING_A = 134
const val LOWER_CEDILLA_C = 135
const val CIRCUMFLEX_E = 136
const val UMLAUT_E = 137
const val GRAVE_E = 138
const val UMLAUT_I = 139
const val CIRCUMFLEX_I = 140
const val GRAVE_I = 141
const val UPPER_UMLAUT_A = 142
const val UPPER_RING_A = 143
const val UPPER_ACUTE_E = 144
const val LOWER_ASH = 145
const val UPPER_ASH = 146
const val CIRCUMFLEX_O = 147
const val LOWER_UMLAUT_O = 148
const val GRAVE_O = 149
const val CIRCUMFLEX_U = 150
const val GRAVE_U = 151
const val UMLAUT_Y = 152
const val UPPER_UMLAUT_O = 153
const val UPPER_UMLAUT_U = 154
const val CENT = 155
const val POUND = 156
const val YEN = 157
const val PESETA = 158
const val HOOK_F = 159
const val ACUTE_A = 160
const val ACUTE_I = 161
const val ACUTE_O = 162
const val ACUTE_U = 163
const val LOWER_TILDE_N = 164
const val UPPER_TILDE_N = 165
const val ORDINAL_FEMININE = 166
const val ORDINAL_MASCULINE = 167
const val INVERTED_QUESTION = 168
const val INVERTED_NOT = 169
const val NOT = 170
const val ONE_HALF = 171
const val ONE_FOURTH = 172
const val INVERTED_EXCLAMATION = 173
const val ANGLE_LEFT = 174
const val ANGLE_RIGHT = 175
const val SHADE_LIGHT = 176
const val SHADE_MEDIUM = 177
const val SHADE_DARK = 178
const val BOX_SINGLE_VERTICAL = 179
const val BOX_SINGLE_VERTICAL_LEFT = 180
const val BOX_VERTICAL_SINGLE_LEFT_DOUBLE = 181
const val BOX_VERTICAL_DOUBLE_LEFT_SINGLE = 182
const val BOX_DOWN_DOUBLE_LEFT_SINGLE = 183
const val BOX_DOWN_SINGLE_LEFT_DOUBLE = 184
const val BOX_DOUBLE_VERTICAL_LEFT = 185
const val BOX_DOUBLE_VERTICAL = 186
const val BOX_DOUBLE_DOWN_LEFT = 187
const val BOX_DOUBLE_UP_LEFT = 188
const val BOX_UP_DOUBLE_LEFT_SINGLE = 189
const val BOX_UP_SINGLE_LEFT_DOUBLE = 190
const val BOX_SINGLE_DOWN_LEFT = 191
const val BOX_SINGLE_UP_RIGHT = 192
const val BOX_SINGLE_HORIZONTAL_UP = 193
const val BOX_SINGLE_HORIZONTAL_DOWN = 194
const val BOX_SINGLE_VERTICAL_RIGHT = 195
const val BOX_SINGLE_HORIZONTAL = 196
const val BOX_SINGLE_VERTICAL_HORIZONTAL = 197
const val BOX_VERTICAL_SINGLE_RIGHT_DOUBLE = 198
const val BOX_VERTICAL_DOUBLE_RIGHT_SINGLE = 199
const val BOX_DOUBLE_UP_RIGHT = 200
const val BOX_DOUBLE_DOWN_RIGHT = 201
const val BOX_DOUBLE_HORIZONTAL_UP = 202
const val HOX_DOUBLE_HORIZONTAL_DOWN = 203
const val BOX_DOUBLE_VERTICAL_RIGHT = 204
const val BOX_DOUBLE_HORIZONTAL = 205
const val BOX_DOUBLE_VERTICAL_HORIZONTAL = 206
const val BOX_UP_SINGLE_HORIZONTAL_DOUBLE = 207
const val BOX_UP_DOUBLE_HORIZONTAL_SINGLE = 208
const val BOX_DOWN_SINGLE_HORIZONTAL_DOUBLE = 209
const val BOX_DOWN_DOUBLE_HORIZONTAL_SINGLE = 210
const val BOX_UP_DOUBLE_RIGHT_SINGLE = 211
const val BOX_UP_SINGLE_RIGHT_DOUBLE = 212
const val BOX_DOWN_SINGLE_RIGHT_DOUBLE = 213
const val BOX_DOWN_DOUBLE_RIGHT_SINGLE = 214
const val BOX_VERTICAL_DOUBLE_HORIZONTAL_SINGLE = 215
const val BOX_VERTICAL_SINGLE_HORIZONTAL_DOUBLE = 216
const val BOX_SINGLE_UP_LEFT = 217
const val BOX_SINGLE_DOWN_RIGHT = 218
const val BLOCK_FULL = 219
const val BLOCK_LOWER_HALF = 220
const val BLOCK_LEFT_HALF = 221
const val BLOCK_RIGHT_HALF = 222
const val BLOCK_UPPER_HALF = 223
const val ALPHA = 224
const val SHARP_S = 225
const val GAMMA = 226
const val PI = 227
const val UPPER_SIGMA = 228
const val LOWER_SIGMA = 229
const val MU = 230
const val TAU = 231
const val UPPER_PHI = 232
const val THETA = 233
const val OMEGA = 234
const val DELTA = 235
const val INFINITY = 236
const val LOWER_PHI = 237
const val EPSILON = 238
const val INTERSECTION = 239
const val TRIPLE_BAR = 240
const val PLUS_MINUS = 241
const val GREATER_EQUAL = 242
const val LESSER_EQUAL = 243
const val INTEGRAL_TOP = 244
const val INTEGRAL_BOTTOM = 245
const val DIVISION = 246
const val APROXIMATE = 247
const val DEGREE = 248
const val SMALL_BULLET = 249
const val INTERPUNCT = 250
const val RADICAL = 251
const val SUPERSCRIPT = 252
const val SUPERSCRIPT_SQUARE = 253
const val SQUARE = 254
const val NBSP = 255
}
}
| 40.023305
| 297
| 0.540866
|
dca742175f81e6f846d36a93f3c72d321d32d89d
| 7,356
|
rb
|
Ruby
|
test/creq/repository_spec.rb
|
nvoynov/creq
|
1c66257aefd432e98eb544c39ab66b87d6ced2f2
|
[
"MIT"
] | 8
|
2015-09-26T13:12:18.000Z
|
2021-03-22T18:51:03.000Z
|
test/creq/repository_spec.rb
|
nvoynov/creq
|
1c66257aefd432e98eb544c39ab66b87d6ced2f2
|
[
"MIT"
] | 1
|
2018-08-07T13:18:42.000Z
|
2019-11-19T08:27:35.000Z
|
test/creq/repository_spec.rb
|
nvoynov/creq
|
1c66257aefd432e98eb544c39ab66b87d6ced2f2
|
[
"MIT"
] | 2
|
2017-03-01T20:11:32.000Z
|
2019-12-21T05:51:20.000Z
|
# encoding: UTF-8
require_relative '../test_helper'
class SpecReader < Reader
def self.call(enum)
r = new("SpecReader")
r.read(enum)
end
end
describe Repository do
let(:contents) {
StringIO.new %(# [ur] User
## [us] User Stories
## [uc] Use Cases
# [fr] Func
# [if] Interface
# [nf] Non-func
)
}
let(:stories) {
StringIO.new %(# [us.actor] Actor
{{parent: us}}
## [us.actor.1] Actor User Storiy 1
## [us.actor.2] Actor User Storiy 2
)
}
let(:funcs) {
StringIO.new %(# [fr.1] Func 1
{{parent: fr}}
## [fr.1.1] Func 1 1
## [fr.1.2] Func 1 2
)
}
def build_repo
{}.tap do |repo|
{contents: contents, stories: stories, funcs: funcs}.each do |k, v|
req = SpecReader.(v.each_line)
repo[k.to_s + '.md'] = req
end
end
end
def build_stringIO_repo(strings)
req = SpecReader.(strings.each_line)
{ 'stringIO' => req }
end
def debug_print(repo)
repo.each{|r| puts "#{' '*r.level} [#{r.id}] #{r.title}"}
end
describe '#generate_missing_ids' do
let(:contents) {
StringIO.new %(# [h1] first header
## [h1.1] first sub header
## [h1.2] second sub header
## third sub header
### third level header
# second header
)
}
it 'must aute generate ids when it not provided' do
repo = Repository.(build_stringIO_repo(contents))
repo.first.id.must_equal 'h1'
repo.first.last.id.must_equal 'h1.01'
repo.first.last.title.must_equal 'third sub header'
repo.last.id.must_equal '01'
end
end
# Demo repo:
# [ur] User
## [us] User Stories
## [uc] Use Cases
# [fr] Func
# [if] Interface
# [nf] Non-func
# [us.actor] Actor
## [us.actor.1] Actor User Storiy 1
## [us.actor.2] Actor User Storiy 2
# [fr.1] Func 1
## [fr.1.1] Func 1 1
## [fr.1.2] Func 1 2
describe '#query' do
it 'must return requirements according to the query' do
repo = Repository.(build_repo)
qry = repo.query "['us', 'fr'].include?(r.id)"
ids = %w(us us.actor us.actor.1 us.actor.2 fr fr.1 fr.1.1 fr.1.2)
qry.map(&:id).must_equal ids
qry = repo.query "r.id == 'not.exists'"
qry.must_equal []
proc {
qry = repo.query "r.id == wrong Ruby expression"
}.must_output %r/query error/
qry.must_equal []
end
end
describe 'self#load' do
it 'must load all requirements in Repository' do
repo = Repository.(build_repo)
repo.must_be_kind_of Repository
repo.size.must_equal 4
repo.find('us.actor').size.must_equal 2
repo.find('fr.1').size.must_equal 2
end
end
describe '#duplicate_ids' do
it 'must return [] if errors does not found' do
repo = Repository.(build_repo)
repo.duplicate_ids.must_equal []
end
it 'must return [errors] if errors are found' do
payload = build_repo
with_errors = StringIO.new %(# [fr.2] Func 2
{{parent: fr}}
## [fr.2.1] Func 2 1
## [fr.1.2] Func 2 2
)
req = SpecReader.(with_errors.each_line)
payload['errors.md'] = req
repo = Repository.(payload)
repo.duplicate_ids.must_equal ["[fr.1.2] in funcs.md, errors.md"]
end
end
describe '#expand_links' do
it 'must expand links in single file' do
content = StringIO.new %(# [f] functional
## [.c1] component 1
component items:
* [[.f]];
* [[.e]].
### [.f] functions
{{order_index: .f2 .f1}}
component functions:
* [[.f1]];
* [[.f2]].
#### [.f1] func 1
Accroding to [[..f]]
* Create [[..e1]].
* Call [[f2]].
#### [.f2] func 2
### [.e] entities
#### [.e1] entity 1
#### [.e2] entity 2
## [.c2] component 2
)
repo = Repository.({'content.md' => SpecReader.(content.each_line)})
body = repo.find('f.c1').body
body.must_match "* [[f.c1.f]]"
body.must_match "* [[f.c1.f]]"
body.must_match "* [[f.c1.e]]"
body = repo.find('f.c1.f.f1').body
body.must_match "Accroding to [[f.c1.f]]"
body.must_match "* Create [[f.c1.e.e1]]"
body.must_match "* Call [[f.c1.f.f2]]"
req = repo.find('f.c1.f')
req.items.first.id.must_equal "f.c1.f.f2"
req.items.last.id.must_equal "f.c1.f.f1"
end
it 'must expand links betweed two files' do
f1 = StringIO.new %(# [c1] c1
## [.f1] c1 f1
Call [[f2]]
Call [[..f3]]
## [.f2] c1 f2
)
f2 = StringIO.new %(# [c2] c2
## [.f3] c2 f3
## [.f4] c2 f4
Call [[f3]]
Call [[..f1]]
)
repo = Repository.({
'f1.md' => SpecReader.(f1.each_line),
'f2.md' => SpecReader.(f2.each_line)})
body = repo.find('c1.f1').body
body.must_match "Call [[c1.f2]]"
body.must_match "Call [[c2.f3]]"
body = repo.find('c2.f4').body
body.must_match "Call [[c2.f3]]"
body.must_match "Call [[c1.f1]]"
end
end
describe '#wrong_parents' do
it 'must return [] if errors does not found' do
repo = Repository.(build_repo)
repo.wrong_parents.must_equal []
end
it 'must return [errors] if errors are found' do
payload = build_repo
with_errors = StringIO.new %(# [fr.2] Func 2
{{parent: fr}}
## [fr.2.1] Func 2 1
## [fr.2.2] Func 2 2
# [f3] Func 3
{{parent: ff}}
# [f4] Func 4
{{parent: fm}}
)
req = SpecReader.(with_errors.each_line)
payload['errors.md'] = req
repo = Repository.(payload)
repo.wrong_parents.must_equal [
"[ff] for [f3] in errors.md",
"[fm] for [f4] in errors.md"]
end
end
describe '#wrong_links' do
it 'must return [] if errors does not found' do
repo = Repository.(build_repo)
repo.wrong_links.must_equal []
end
it 'must return [errors] if errors are found' do
payload = build_repo
with_errors = StringIO.new %(# [fr.2] Func 2
{{parent: fr}}
I have a right link [[fr]]
## [fr.2.1] Func 2 1
I have a wrong link [[fm]]
## [fr.2.2] Func 2 2
I also have a [[fa]] - wrong link
## [fr.2.3] Func 2 3
[[fb]] is also wrong
)
req = SpecReader.(with_errors.each_line)
payload['errors.md'] = req
repo = Repository.(payload)
repo.wrong_links.must_equal [
"[[fm]] in [fr.2.1]",
"[[fa]] in [fr.2.2]",
"[[fb]] in [fr.2.3]"]
end
end
# TODO refactor test by get_repo_from
def get_repo_from(txt)
req = SpecReader.(StringIO.new(txt).each_line)
Repository.({ 'get_repo_from.md' => req })
end
describe '#wrong_order_index' do
it 'must return [] if errors does not found' do
content = %(# [w] Func W
{{order_index: w1 w2}}
I have right order_index
## [w1] w1
## [w2] w2
)
repo = get_repo_from(content)
repo.wrong_order_index.must_equal []
end
it 'must return [errors] if errors are found' do
content = %(# [w] Func W
{{order_index: w1 w2}}
I have wrong order_index attribute with w1 and w2
)
repo = get_repo_from(content)
repo.wrong_order_index.must_equal ["[w1, w2] for [w]"]
content = %(# [w] Func W
{{order_index: w1 w2}}
I have wrong order_index attribute with w1
## [w2] w2
)
repo = get_repo_from(content)
repo.wrong_order_index.must_equal ["[w1] for [w]"]
end
end
end
| 23.426752
| 75
| 0.56702
|
38de67fcf9ff1a50ee0590d9a19d67b9011c7753
| 4,809
|
php
|
PHP
|
routes/web.php
|
lkq001/haofeng30
|
aa217c9fbd329f581e27a94fb613804ec92cd0b8
|
[
"MIT"
] | null | null | null |
routes/web.php
|
lkq001/haofeng30
|
aa217c9fbd329f581e27a94fb613804ec92cd0b8
|
[
"MIT"
] | null | null | null |
routes/web.php
|
lkq001/haofeng30
|
aa217c9fbd329f581e27a94fb613804ec92cd0b8
|
[
"MIT"
] | null | null | null |
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
/**
* 后台管理路由
*/
Route::group(['namespace' => 'Admin', 'prefix' => 'admin', 'middleware' => 'admin'], function () {
/**
* 后台菜单管理
*/
// 菜单列表
Route::get('/category/index', 'CategoryController@index')->name('admin.category.index');
// 添加数据
Route::post('/category/store', 'CategoryController@store')->name('admin.category.store');
// 查询指定ID数据(id)
Route::get('/category/edit', 'CategoryController@edit')->name('admin.category.edit');
// 修改数据(id)
Route::post('/category/update', 'CategoryController@update')->name('admin.category.update');
// 删除数据(id)
Route::delete('/category/destroy', 'CategoryController@destroy')->name('admin.category.destroy');
// 修改状态
Route::post('/category/status', 'CategoryController@status')->name('admin.category.status');
// 修改排序
Route::post('/category/order', 'CategoryController@order')->name('admin.category.order');
/**
* 产品组管理
*/
// 数据列表
Route::get('/product/group/index', 'ProductGroupController@index')->name('admin.product.group.index');
// 添加数据
Route::post('/product/group/store', 'ProductGroupController@store')->name('admin.product.group.store');
// 查询指定ID数据(id)
Route::get('/product/group/edit', 'ProductGroupController@edit')->name('admin.product.group.edit');
// 修改数据(id)
Route::post('/product/group/update', 'ProductGroupController@update')->name('admin.product.group.update');
// 删除数据(id)
Route::delete('/product/group/destroy', 'ProductGroupController@destroy')->name('admin.product.group.destroy');
// 批量删除
Route::delete('/product/group/destroys', 'ProductGroupController@destroys')->name('admin.product.group.destroys');
// 修改状态
Route::post('/product/group/status', 'ProductGroupController@status')->name('admin.product.group.status');
// 修改排序
Route::post('/product/group/order', 'ProductGroupController@order')->name('admin.product.group.order');
/**
* 产品规格分类
*/
// 数据列表
Route::get('/specifications/category/index', 'SpecificationsCategoryController@index')->name('admin.specifications.category.index');
// 添加数据
Route::post('/specifications/category/store', 'SpecificationsCategoryController@store')->name('admin.specifications.category.store');
// 查询指定ID数据(id)
Route::get('/specifications/category/edit', 'SpecificationsCategoryController@edit')->name('admin.specifications.category.edit');
// 修改数据(id)
Route::post('/specifications/category/update', 'SpecificationsCategoryController@update')->name('admin.specifications.category.update');
// 删除数据(id)
Route::delete('/specifications/category/destroy', 'SpecificationsCategoryController@destroy')->name('admin.specifications.category.destroy');
// 批量删除
Route::delete('/specifications/category/destroys', 'SpecificationsCategoryController@destroys')->name('admin.specifications.category.destroys');
// 修改状态
Route::post('/specifications/category/status', 'SpecificationsCategoryController@status')->name('admin.specifications.category.status');
// 修改排序
Route::post('/specifications/category/order', 'SpecificationsCategoryController@order')->name('admin.specifications.category.order');
/**
* 产品规格
*/
// 数据列表
Route::get('/specifications/index', 'SpecificationsController@index')->name('admin.specifications.index');
// 添加数据
Route::post('/specifications/store', 'SpecificationsController@store')->name('admin.specifications.store');
// 查询指定ID数据(id)
Route::get('/specifications/edit', 'SpecificationsController@edit')->name('admin.specifications.edit');
// 修改数据(id)
Route::post('/specifications/update', 'SpecificationsController@update')->name('admin.specifications.update');
// 删除数据(id)
Route::delete('/specifications/destroy', 'SpecificationsController@destroy')->name('admin.specifications.destroy');
// 批量删除
Route::delete('/specifications/destroys', 'SpecificationsController@destroys')->name('admin.specifications.destroys');
// 修改状态
Route::post('/specifications/status', 'SpecificationsController@status')->name('admin.specifications.status');
// 修改排序
Route::post('/specifications/order', 'SpecificationsController@order')->name('admin.specifications.order');
Route::get('/role/index', 'RoleController@index')->name('admin.role.index');
});
| 44.943925
| 148
| 0.672905
|
7b5e7776debcbfbad892b46a97bf64771df221d8
| 98,631
|
sql
|
SQL
|
marina (5).sql
|
husseinzaher/marina_algharbia
|
ba1607f63d6ffd46539bc99209174c51d41e1c9e
|
[
"MIT"
] | null | null | null |
marina (5).sql
|
husseinzaher/marina_algharbia
|
ba1607f63d6ffd46539bc99209174c51d41e1c9e
|
[
"MIT"
] | null | null | null |
marina (5).sql
|
husseinzaher/marina_algharbia
|
ba1607f63d6ffd46539bc99209174c51d41e1c9e
|
[
"MIT"
] | null | null | null |
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 06, 2019 at 09:05 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.0.32
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 utf8mb4 */;
--
-- Database: `marina`
--
-- --------------------------------------------------------
--
-- Table structure for table `banks`
--
CREATE TABLE `banks` (
`id` int(10) UNSIGNED NOT NULL,
`bank_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`account_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`account_number_with` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`name_of_owner` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`number_of_owner` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `banks`
--
INSERT INTO `banks` (`id`, `bank_name`, `image`, `account_number`, `account_number_with`, `name_of_owner`, `number_of_owner`, `created_at`, `updated_at`) VALUES
(1, 'Elraj7y bank', 'banks/March2019/WU8OKY3qgaEpJmbdzXdQ.png', '544054514015025', '5025020502052', 'elryal', '0953562456232', '2019-03-19 17:34:43', '2019-03-19 17:34:43');
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` int(10) UNSIGNED NOT NULL,
`parent_id` int(10) UNSIGNED DEFAULT NULL,
`order` int(11) NOT NULL DEFAULT '1',
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`id`, `parent_id`, `order`, `name`, `slug`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, 'Category 1', 'category-1', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(2, NULL, 1, 'Category 2', 'category-2', '2019-03-10 11:47:40', '2019-03-10 11:47:40');
-- --------------------------------------------------------
--
-- Table structure for table `cities`
--
CREATE TABLE `cities` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`country_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `cities`
--
INSERT INTO `cities` (`id`, `created_at`, `updated_at`, `name`, `country_id`) VALUES
(1, '2019-03-10 12:15:00', '2019-03-10 12:48:34', 'city1', 1);
-- --------------------------------------------------------
--
-- Table structure for table `conditions`
--
CREATE TABLE `conditions` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`condition` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `conditions`
--
INSERT INTO `conditions` (`id`, `created_at`, `updated_at`, `condition`) VALUES
(1, '2019-03-10 13:52:23', '2019-03-10 13:52:23', 'condittion with english'),
(2, '2019-03-10 13:52:32', '2019-03-10 13:52:32', 'condittion with english2');
-- --------------------------------------------------------
--
-- Table structure for table `contacts`
--
CREATE TABLE `contacts` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`contact_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`contact_phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`contact_relation` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`order_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `countries`
--
CREATE TABLE `countries` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `countries`
--
INSERT INTO `countries` (`id`, `created_at`, `updated_at`, `name`) VALUES
(1, '2019-03-10 12:10:00', '2019-03-10 12:49:07', 'ksa');
-- --------------------------------------------------------
--
-- Table structure for table `data_rows`
--
CREATE TABLE `data_rows` (
`id` int(10) UNSIGNED NOT NULL,
`data_type_id` int(10) UNSIGNED NOT NULL,
`field` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`required` tinyint(1) NOT NULL DEFAULT '0',
`browse` tinyint(1) NOT NULL DEFAULT '1',
`read` tinyint(1) NOT NULL DEFAULT '1',
`edit` tinyint(1) NOT NULL DEFAULT '1',
`add` tinyint(1) NOT NULL DEFAULT '1',
`delete` tinyint(1) NOT NULL DEFAULT '1',
`details` text COLLATE utf8mb4_unicode_ci,
`order` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `data_rows`
--
INSERT INTO `data_rows` (`id`, `data_type_id`, `field`, `type`, `display_name`, `required`, `browse`, `read`, `edit`, `add`, `delete`, `details`, `order`) VALUES
(1, 1, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, '{}', 1),
(2, 1, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 2),
(3, 1, 'email', 'text', 'Email', 1, 1, 1, 1, 1, 1, '{}', 3),
(4, 1, 'password', 'password', 'Password', 1, 0, 0, 1, 1, 0, '{}', 4),
(5, 1, 'remember_token', 'text', 'Remember Token', 0, 0, 0, 0, 0, 0, '{}', 5),
(6, 1, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 0, 0, 0, '{}', 6),
(7, 1, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 7),
(8, 1, 'avatar', 'image', 'Avatar', 0, 1, 1, 1, 1, 1, '{}', 8),
(9, 1, 'user_belongsto_role_relationship', 'relationship', 'Role', 0, 1, 1, 1, 1, 0, '{\"model\":\"TCG\\\\Voyager\\\\Models\\\\Role\",\"table\":\"roles\",\"type\":\"belongsTo\",\"column\":\"role_id\",\"key\":\"id\",\"label\":\"display_name\",\"pivot_table\":\"roles\",\"pivot\":\"0\",\"taggable\":\"0\"}', 10),
(10, 1, 'user_belongstomany_role_relationship', 'relationship', 'Roles', 0, 1, 1, 1, 1, 1, '{\"model\":\"TCG\\\\Voyager\\\\Models\\\\Role\",\"table\":\"roles\",\"type\":\"belongsToMany\",\"column\":\"id\",\"key\":\"id\",\"label\":\"display_name\",\"pivot_table\":\"user_roles\",\"pivot\":\"1\",\"taggable\":\"0\"}', 11),
(11, 1, 'settings', 'hidden', 'Settings', 0, 0, 0, 0, 0, 0, '{}', 12),
(12, 2, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(13, 2, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, NULL, 2),
(14, 2, 'created_at', 'timestamp', 'Created At', 0, 0, 0, 0, 0, 0, NULL, 3),
(15, 2, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, NULL, 4),
(16, 3, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(17, 3, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, NULL, 2),
(18, 3, 'created_at', 'timestamp', 'Created At', 0, 0, 0, 0, 0, 0, NULL, 3),
(19, 3, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, NULL, 4),
(20, 3, 'display_name', 'text', 'Display Name', 1, 1, 1, 1, 1, 1, NULL, 5),
(21, 1, 'role_id', 'text', 'Role', 0, 1, 1, 1, 1, 1, '{}', 9),
(22, 4, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(23, 4, 'parent_id', 'select_dropdown', 'Parent', 0, 0, 1, 1, 1, 1, '{\"default\":\"\",\"null\":\"\",\"options\":{\"\":\"-- None --\"},\"relationship\":{\"key\":\"id\",\"label\":\"name\"}}', 2),
(24, 4, 'order', 'text', 'Order', 1, 1, 1, 1, 1, 1, '{\"default\":1}', 3),
(25, 4, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, NULL, 4),
(26, 4, 'slug', 'text', 'Slug', 1, 1, 1, 1, 1, 1, '{\"slugify\":{\"origin\":\"name\"}}', 5),
(27, 4, 'created_at', 'timestamp', 'Created At', 0, 0, 1, 0, 0, 0, NULL, 6),
(28, 4, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, NULL, 7),
(29, 5, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(30, 5, 'author_id', 'text', 'Author', 1, 0, 1, 1, 0, 1, NULL, 2),
(31, 5, 'category_id', 'text', 'Category', 1, 0, 1, 1, 1, 0, NULL, 3),
(32, 5, 'title', 'text', 'Title', 1, 1, 1, 1, 1, 1, NULL, 4),
(33, 5, 'excerpt', 'text_area', 'Excerpt', 1, 0, 1, 1, 1, 1, NULL, 5),
(34, 5, 'body', 'rich_text_box', 'Body', 1, 0, 1, 1, 1, 1, NULL, 6),
(35, 5, 'image', 'image', 'Post Image', 0, 1, 1, 1, 1, 1, '{\"resize\":{\"width\":\"1000\",\"height\":\"null\"},\"quality\":\"70%\",\"upsize\":true,\"thumbnails\":[{\"name\":\"medium\",\"scale\":\"50%\"},{\"name\":\"small\",\"scale\":\"25%\"},{\"name\":\"cropped\",\"crop\":{\"width\":\"300\",\"height\":\"250\"}}]}', 7),
(36, 5, 'slug', 'text', 'Slug', 1, 0, 1, 1, 1, 1, '{\"slugify\":{\"origin\":\"title\",\"forceUpdate\":true},\"validation\":{\"rule\":\"unique:posts,slug\"}}', 8),
(37, 5, 'meta_description', 'text_area', 'Meta Description', 1, 0, 1, 1, 1, 1, NULL, 9),
(38, 5, 'meta_keywords', 'text_area', 'Meta Keywords', 1, 0, 1, 1, 1, 1, NULL, 10),
(39, 5, 'status', 'select_dropdown', 'Status', 1, 1, 1, 1, 1, 1, '{\"default\":\"DRAFT\",\"options\":{\"PUBLISHED\":\"published\",\"DRAFT\":\"draft\",\"PENDING\":\"pending\"}}', 11),
(40, 5, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 0, 0, 0, NULL, 12),
(41, 5, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, NULL, 13),
(42, 5, 'seo_title', 'text', 'SEO Title', 0, 1, 1, 1, 1, 1, NULL, 14),
(43, 5, 'featured', 'checkbox', 'Featured', 1, 1, 1, 1, 1, 1, NULL, 15),
(44, 6, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, NULL, 1),
(45, 6, 'author_id', 'text', 'Author', 1, 0, 0, 0, 0, 0, NULL, 2),
(46, 6, 'title', 'text', 'Title', 1, 1, 1, 1, 1, 1, NULL, 3),
(47, 6, 'excerpt', 'text_area', 'Excerpt', 1, 0, 1, 1, 1, 1, NULL, 4),
(48, 6, 'body', 'rich_text_box', 'Body', 1, 0, 1, 1, 1, 1, NULL, 5),
(49, 6, 'slug', 'text', 'Slug', 1, 0, 1, 1, 1, 1, '{\"slugify\":{\"origin\":\"title\"},\"validation\":{\"rule\":\"unique:pages,slug\"}}', 6),
(50, 6, 'meta_description', 'text', 'Meta Description', 1, 0, 1, 1, 1, 1, NULL, 7),
(51, 6, 'meta_keywords', 'text', 'Meta Keywords', 1, 0, 1, 1, 1, 1, NULL, 8),
(52, 6, 'status', 'select_dropdown', 'Status', 1, 1, 1, 1, 1, 1, '{\"default\":\"INACTIVE\",\"options\":{\"INACTIVE\":\"INACTIVE\",\"ACTIVE\":\"ACTIVE\"}}', 9),
(53, 6, 'created_at', 'timestamp', 'Created At', 1, 1, 1, 0, 0, 0, NULL, 10),
(54, 6, 'updated_at', 'timestamp', 'Updated At', 1, 0, 0, 0, 0, 0, NULL, 11),
(55, 6, 'image', 'image', 'Page Image', 0, 1, 1, 1, 1, 1, NULL, 12),
(56, 8, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(57, 8, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 2),
(58, 8, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 3),
(59, 8, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 4),
(60, 9, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(61, 9, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 2),
(62, 9, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 3),
(63, 9, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 4),
(76, 12, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(77, 12, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 4),
(78, 12, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 5),
(79, 12, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 6),
(80, 12, 'country_id', 'text', 'Country Id', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 2),
(81, 12, 'city_id', 'text', 'City Id', 1, 1, 1, 1, 1, 1, '{\"validation\":{\"rule\":\"required\"}}', 3),
(82, 12, 'state_belongsto_country_relationship', 'relationship', 'countries', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Country\",\"table\":\"countries\",\"type\":\"belongsTo\",\"column\":\"country_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 7),
(83, 12, 'state_belongsto_city_relationship', 'relationship', 'cities', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\City\",\"table\":\"cities\",\"type\":\"belongsTo\",\"column\":\"city_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 8),
(84, 14, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(85, 14, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 2),
(86, 14, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 3),
(87, 14, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 4),
(88, 15, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(89, 15, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 3),
(90, 15, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 4),
(91, 15, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 5),
(92, 15, 'country_id', 'text', 'Country Id', 1, 1, 1, 1, 1, 1, '{}', 2),
(93, 15, 'city_belongsto_country_relationship', 'relationship', 'countries', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Country\",\"table\":\"countries\",\"type\":\"belongsTo\",\"column\":\"country_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 6),
(94, 16, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(95, 16, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 2),
(96, 16, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 3),
(97, 16, 'condition', 'text', 'Condition', 1, 1, 1, 1, 1, 1, '{}', 4),
(98, 17, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(99, 17, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 2),
(100, 17, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 3),
(101, 17, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 4),
(102, 18, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(103, 18, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '{}', 2),
(104, 18, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 3),
(105, 18, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 4),
(106, 19, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(107, 19, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 2),
(108, 19, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 3),
(109, 19, 'price', 'number', 'Price', 1, 1, 1, 1, 1, 1, '{}', 4),
(110, 21, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(111, 21, 'created_at', 'timestamp', 'Created At', 0, 0, 1, 1, 0, 1, '{}', 14),
(112, 21, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 15),
(113, 21, 'number_bridal', 'text', 'Number Bridal', 0, 0, 1, 1, 1, 1, '{}', 16),
(114, 21, 'name_bridal', 'text', 'Name Bridal', 0, 0, 1, 1, 1, 1, '{}', 17),
(115, 21, 'identity', 'text', 'Identity', 0, 0, 1, 1, 1, 1, '{}', 18),
(116, 21, 'birthday', 'text', 'Birthday', 0, 0, 1, 1, 1, 1, '{}', 19),
(117, 21, 'nationalty', 'text', 'Nationalty', 0, 0, 1, 1, 1, 1, '{}', 20),
(118, 21, 'identity_source', 'text', 'Identity Source', 0, 0, 1, 1, 1, 1, '{}', 21),
(119, 21, 'identity_image', 'image', 'Identity Image', 0, 0, 1, 1, 1, 1, '{}', 22),
(120, 21, 'email_address', 'text', 'Email Address', 0, 0, 1, 1, 1, 1, '{}', 23),
(121, 21, 'phone_bridal', 'text', 'Phone Bridal', 0, 0, 1, 1, 1, 1, '{}', 24),
(122, 21, 'singer_gender', 'text', 'Singer Gender', 0, 0, 1, 1, 1, 1, '{}', 25),
(123, 21, 'singer_name', 'text', 'Singer Name', 0, 0, 1, 1, 1, 1, '{}', 26),
(124, 21, 'singer_name_optional', 'text', 'Singer Name Optional', 0, 0, 1, 1, 1, 1, '{}', 27),
(125, 21, 'code_number', 'text', 'Code', 0, 1, 1, 1, 1, 1, '{}', 28),
(126, 21, 'carol_type', 'text', 'Carol', 0, 0, 1, 1, 1, 1, '{}', 29),
(127, 21, 'hejry_date', 'hejry', 'Hejry Date', 0, 1, 1, 1, 1, 1, '{}', 31),
(128, 21, 'date', 'text', 'Date', 0, 0, 1, 1, 1, 1, '{}', 33),
(129, 21, 'hotel_name', 'text', 'Hotel Name', 0, 0, 1, 1, 1, 1, '{}', 35),
(130, 21, 'start_time', 'time', 'Start Time', 0, 0, 1, 1, 1, 1, '{}', 37),
(131, 21, 'end_time', 'time', 'End Time', 0, 0, 1, 1, 1, 1, '{}', 39),
(132, 21, 'street_name', 'text', 'Street Name', 0, 0, 1, 1, 1, 1, '{}', 41),
(133, 21, 'hall_id', 'text', 'Hall Id', 0, 0, 1, 1, 1, 1, '{}', 42),
(134, 21, 'user_id', 'text', 'User Id', 1, 1, 1, 1, 1, 1, '{}', 9),
(135, 21, 'country_id', 'text', 'Country Id', 1, 0, 1, 1, 1, 1, '{}', 10),
(136, 21, 'city_id', 'text', 'City Id', 1, 0, 1, 1, 1, 1, '{}', 11),
(137, 21, 'state_id', 'text', 'State Id', 1, 0, 1, 1, 1, 1, '{}', 12),
(138, 21, 'tune_id', 'hidden', 'Tune Id', 0, 0, 1, 1, 1, 1, '{}', 13),
(139, 21, 'occasion_id', 'text', 'Occasion Id', 0, 0, 1, 1, 1, 1, '{}', 45),
(140, 21, 'rhythms', 'array', 'Rhythms', 0, 0, 1, 0, 0, 1, '{}', 47),
(141, 21, 'machines', 'array', 'Machines', 0, 0, 1, 0, 0, 1, '{}', 48),
(142, 21, 'agreements', 'array', 'Agreements', 0, 0, 1, 0, 0, 1, '{}', 49),
(143, 21, 'approved', 'checkbox', 'Status', 1, 1, 1, 1, 1, 1, '{\"on\":\"Deposited\",\"off\":\"Pending\",\"checked\":false}', 51),
(145, 21, 'contacts', 'array', 'Contacts', 0, 0, 1, 0, 0, 1, '{}', 50),
(147, 21, 'order_belongsto_country_relationship', 'relationship', 'County', 0, 0, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Country\",\"table\":\"countries\",\"type\":\"belongsTo\",\"column\":\"country_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 3),
(148, 21, 'order_belongsto_city_relationship', 'relationship', 'City', 0, 0, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\City\",\"table\":\"cities\",\"type\":\"belongsTo\",\"column\":\"city_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 4),
(149, 21, 'order_belongsto_user_relationship', 'relationship', 'User', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"user_id\",\"key\":\"id\",\"label\":\"email\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 5),
(150, 21, 'order_belongsto_hall_relationship', 'relationship', 'Hall', 0, 0, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Halls\",\"table\":\"halls\",\"type\":\"belongsTo\",\"column\":\"hall_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 6),
(151, 21, 'order_belongsto_state_relationship', 'relationship', 'states', 0, 0, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\State\",\"table\":\"states\",\"type\":\"belongsTo\",\"column\":\"state_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 7),
(152, 21, 'order_belongsto_occasion_relationship', 'relationship', 'occasions', 0, 0, 1, 1, 1, 1, '{\"model\":\"App\\\\Models\\\\Occasion\",\"table\":\"occasions\",\"type\":\"belongsTo\",\"column\":\"occasion_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"categories\",\"pivot\":\"0\",\"taggable\":\"0\"}', 8),
(153, 22, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 1),
(154, 22, 'bank_name', 'text', 'Bank Name', 1, 1, 1, 1, 1, 1, '{}', 2),
(155, 22, 'image', 'image', 'Image', 0, 1, 1, 1, 1, 1, '{}', 3),
(156, 22, 'account_number', 'number', 'Account Number', 1, 1, 1, 1, 1, 1, '{}', 4),
(157, 22, 'account_number_with', 'text', 'Account Number With', 1, 1, 1, 1, 1, 1, '{}', 5),
(158, 22, 'name_of_owner', 'text', 'Name Of Owner', 1, 1, 1, 1, 1, 1, '{}', 6),
(159, 22, 'number_of_owner', 'number', 'Number Of Owner', 1, 1, 1, 1, 1, 1, '{}', 7),
(160, 22, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 8),
(161, 22, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 9),
(177, 1, 'email_verified_at', 'timestamp', 'Email Verified At', 0, 0, 0, 0, 0, 0, '{}', 6),
(178, 1, 'phone', 'text', 'Phone', 0, 1, 1, 1, 1, 1, '{}', 8),
(179, 1, 'singer_id', 'hidden', 'Singer Id', 0, 0, 0, 0, 0, 0, '{}', 13),
(180, 21, 'singer_id', 'text', 'Singer Id', 0, 0, 1, 1, 1, 1, '{}', 44),
(181, 21, 'company_type', 'text', 'Company Type', 0, 0, 1, 1, 1, 1, '{}', 30),
(182, 21, 'company_name', 'text', 'Company Name', 0, 0, 1, 1, 1, 1, '{}', 32),
(183, 21, 'commercial_registration_no', 'text', 'Commercial Registration No', 0, 0, 1, 1, 1, 1, '{}', 34),
(184, 21, 'company_owner_name', 'text', 'Company Owner Name', 0, 0, 1, 1, 1, 1, '{}', 36),
(185, 21, 'registration_id_number', 'text', 'Registration Id Number', 0, 0, 1, 1, 1, 1, '{}', 38),
(186, 21, 'director_name', 'text', 'Director Name', 0, 0, 1, 1, 1, 1, '{}', 40),
(187, 21, 'price', 'text', 'Price', 1, 1, 1, 1, 1, 1, '{}', 43),
(188, 21, 'concert', 'text', 'Concert', 0, 0, 1, 1, 1, 1, '{}', 46),
(189, 21, 'order_type', 'text', 'Order Type', 0, 1, 1, 1, 1, 1, '{}', 2),
(190, 21, 'permits', 'text', 'Permits', 0, 0, 1, 1, 1, 1, '{}', 46),
(191, 24, 'id', 'text', 'Id', 1, 0, 0, 0, 0, 0, '{}', 0),
(192, 24, 'name', 'text', 'Name', 0, 1, 1, 1, 1, 1, '{}', 3),
(193, 24, 'identity', 'text', 'Identity', 0, 1, 1, 1, 1, 1, '{}', 4),
(194, 24, 'birthday', 'text', 'Birthday', 0, 1, 1, 1, 1, 1, '{}', 5),
(195, 24, 'phone', 'text', 'Phone', 0, 1, 1, 1, 1, 1, '{}', 6),
(196, 24, 'order_id', 'text', 'Order id', 1, 1, 1, 1, 1, 1, '{}', 2),
(197, 24, 'created_at', 'timestamp', 'Created At', 0, 1, 1, 1, 0, 1, '{}', 7),
(198, 24, 'updated_at', 'timestamp', 'Updated At', 0, 0, 0, 0, 0, 0, '{}', 8),
(200, 21, 'reason_of_edit', 'text_area', 'Reason Of Edit', 0, 0, 1, 1, 1, 1, '{}', 47),
(201, 21, 'new_date', 'date', 'New Date', 0, 0, 1, 1, 1, 1, '{}', 48),
(202, 21, 'canceled', 'checkbox', 'Canceled', 0, 0, 1, 1, 1, 1, '{\"on\":\"Canceled\",\"off\":\"Active\",\"checked\":false}', 49),
(203, 21, 'closed', 'checkbox', 'Closed', 0, 0, 1, 1, 1, 1, '{\"on\":\"Closed\",\"off\":\"Opened\",\"checked\":false}', 50),
(204, 21, 'order_belongsto_user_relationship_1', 'relationship', 'Singer', 0, 1, 1, 1, 1, 1, '{\"model\":\"App\\\\User\",\"table\":\"users\",\"type\":\"belongsTo\",\"column\":\"singer_id\",\"key\":\"id\",\"label\":\"name\",\"pivot_table\":\"banks\",\"pivot\":\"0\",\"taggable\":\"0\"}', 52),
(205, 21, 'attach_proof', 'text', 'Attach Proof', 0, 1, 1, 1, 1, 1, '{}', 51);
-- --------------------------------------------------------
--
-- Table structure for table `data_types`
--
CREATE TABLE `data_types` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name_singular` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name_plural` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`model_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`policy_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`controller` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`generate_permissions` tinyint(1) NOT NULL DEFAULT '0',
`server_side` tinyint(4) NOT NULL DEFAULT '0',
`details` text COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `data_types`
--
INSERT INTO `data_types` (`id`, `name`, `slug`, `display_name_singular`, `display_name_plural`, `icon`, `model_name`, `policy_name`, `controller`, `description`, `generate_permissions`, `server_side`, `details`, `created_at`, `updated_at`) VALUES
(1, 'users', 'users', 'User', 'Users', 'voyager-person', 'App\\User', 'TCG\\Voyager\\Policies\\UserPolicy', 'TCG\\Voyager\\Http\\Controllers\\VoyagerUserController', NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"desc\",\"default_search_key\":null,\"scope\":\"currentUser\"}', '2019-03-09 09:42:51', '2019-03-21 19:41:04'),
(2, 'menus', 'menus', 'Menu', 'Menus', 'voyager-list', 'TCG\\Voyager\\Models\\Menu', NULL, '', '', 1, 0, NULL, '2019-03-09 09:42:51', '2019-03-09 09:42:51'),
(3, 'roles', 'roles', 'Role', 'Roles', 'voyager-lock', 'TCG\\Voyager\\Models\\Role', NULL, '', '', 1, 0, NULL, '2019-03-09 09:42:51', '2019-03-09 09:42:51'),
(4, 'categories', 'categories', 'Category', 'Categories', 'voyager-categories', 'TCG\\Voyager\\Models\\Category', NULL, '', '', 1, 0, NULL, '2019-03-09 09:45:13', '2019-03-09 09:45:13'),
(5, 'posts', 'posts', 'Post', 'Posts', 'voyager-news', 'TCG\\Voyager\\Models\\Post', 'TCG\\Voyager\\Policies\\PostPolicy', '', '', 1, 0, NULL, '2019-03-09 09:45:13', '2019-03-09 09:45:13'),
(6, 'pages', 'pages', 'Page', 'Pages', 'voyager-file-text', 'TCG\\Voyager\\Models\\Page', NULL, '', '', 1, 0, NULL, '2019-03-09 09:45:14', '2019-03-09 09:45:14'),
(8, 'occasions', 'occasions', 'Occasion', 'Occasions', NULL, 'App\\Models\\Occasion', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2019-03-09 16:21:31', '2019-03-10 12:05:44'),
(9, 'countries', 'countries', 'Country', 'Countries', NULL, 'App\\Models\\Country', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2019-03-10 10:17:15', '2019-03-10 12:05:29'),
(12, 'states', 'states', 'State', 'States', NULL, 'App\\Models\\State', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2019-03-10 11:04:35', '2019-03-10 12:08:18'),
(14, 'halls', 'halls', 'Hall', 'Halls', NULL, 'App\\Models\\Halls', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2019-03-10 11:26:19', '2019-03-10 12:05:36'),
(15, 'cities', 'cities', 'City', 'Cities', NULL, 'App\\Models\\City', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2019-03-10 12:04:54', '2019-03-10 12:14:11'),
(16, 'conditions', 'conditions', 'Condition', 'Conditions', NULL, 'App\\Models\\Condition', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null}', '2019-03-10 13:49:35', '2019-03-10 13:49:35'),
(17, 'rhythms', 'rhythms', 'Rhythm', 'Rhythms', NULL, 'App\\Models\\Rhythms', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null}', '2019-03-10 21:37:59', '2019-03-10 21:37:59'),
(18, 'machines', 'machines', 'Machine', 'Machines', NULL, 'App\\Models\\Machine', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null}', '2019-03-10 21:38:21', '2019-03-10 21:38:21'),
(19, 'prices', 'prices', 'Price', 'Prices', NULL, 'App\\Models\\Price', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null}', '2019-03-11 19:32:48', '2019-03-11 19:32:48'),
(21, 'orders', 'orders', 'Order', 'Orders', NULL, 'App\\Models\\Order', NULL, NULL, NULL, 1, 1, '{\"order_column\":\"order_type\",\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":\"currentSinger\"}', '2019-03-16 16:44:28', '2019-04-03 21:02:33'),
(22, 'banks', 'banks', 'Bank', 'Banks', NULL, 'App\\Models\\Bank', NULL, NULL, NULL, 1, 1, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null}', '2019-03-19 17:32:28', '2019-03-19 17:32:28'),
(24, 'grooms', 'grooms', 'Groom', 'Grooms', NULL, 'App\\Models\\Grooms', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null,\"order_direction\":\"asc\",\"default_search_key\":null,\"scope\":null}', '2019-04-03 12:09:57', '2019-04-03 12:27:11');
-- --------------------------------------------------------
--
-- Table structure for table `grooms`
--
CREATE TABLE `grooms` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`identity` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`birthday` date DEFAULT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`order_id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `grooms`
--
INSERT INTO `grooms` (`id`, `name`, `identity`, `birthday`, `phone`, `order_id`, `created_at`, `updated_at`) VALUES
(1, 'Hamish Brock', '4324234234234', '2001-03-22', '5345345345345', 41, '2019-04-03 12:03:59', '2019-04-03 12:03:59'),
(2, 'Brennan Monroe', '42342342', '2019-04-24', '4234234234234', 41, '2019-04-03 12:04:50', '2019-04-03 12:04:50'),
(3, 'Desiree Ball', '4125125125125', '2019-04-24', '123123123123123', 41, '2019-04-03 12:06:54', '2019-04-03 12:06:54'),
(4, 'Rhonda Beck', '423423', '2019-04-23', '42352352', 41, '2019-04-03 12:08:17', '2019-04-03 12:08:17'),
(5, 'Rigel Brady', '65464564', '2001-03-22', '346346346346346', 40, '2019-04-03 23:45:00', '2019-04-03 23:45:00'),
(6, 'Jada Hull', '5345345345', '2001-04-25', '6456456456', 40, '2019-04-03 23:54:00', '2019-04-03 23:54:00');
-- --------------------------------------------------------
--
-- Table structure for table `halls`
--
CREATE TABLE `halls` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `halls`
--
INSERT INTO `halls` (`id`, `created_at`, `updated_at`, `name`) VALUES
(1, '2019-03-12 18:54:25', '2019-03-12 18:54:25', 'qa3a'),
(2, '2019-03-12 18:54:41', '2019-03-12 18:54:41', 'qa3a2');
-- --------------------------------------------------------
--
-- Table structure for table `machines`
--
CREATE TABLE `machines` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `machines`
--
INSERT INTO `machines` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Machine1', '2019-03-10 21:42:14', '2019-03-10 21:42:14'),
(2, 'orge', '2019-03-10 21:42:32', '2019-03-10 21:42:32');
-- --------------------------------------------------------
--
-- Table structure for table `menus`
--
CREATE TABLE `menus` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `menus`
--
INSERT INTO `menus` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'admin', '2019-03-09 09:42:51', '2019-03-09 09:42:51');
-- --------------------------------------------------------
--
-- Table structure for table `menu_items`
--
CREATE TABLE `menu_items` (
`id` int(10) UNSIGNED NOT NULL,
`menu_id` int(10) UNSIGNED DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`target` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '_self',
`icon_class` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`order` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`route` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`parameters` text COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `menu_items`
--
INSERT INTO `menu_items` (`id`, `menu_id`, `title`, `url`, `target`, `icon_class`, `color`, `parent_id`, `order`, `created_at`, `updated_at`, `route`, `parameters`) VALUES
(1, 1, 'Dashboard', '', '_self', 'voyager-boat', '#000000', NULL, 1, '2019-03-09 09:42:51', '2019-03-14 16:35:44', 'voyager.dashboard', 'null'),
(2, 1, 'Media', '', '_self', 'voyager-images', '#000000', NULL, 4, '2019-03-09 09:42:51', '2019-03-14 16:36:18', 'voyager.media.index', 'null'),
(3, 1, 'Users', '', '_self', 'voyager-person', '#000000', NULL, 3, '2019-03-09 09:42:51', '2019-03-12 20:17:19', 'voyager.users.index', 'null'),
(4, 1, 'Roles', '', '_self', 'voyager-lock', '#000000', NULL, 2, '2019-03-09 09:42:51', '2019-03-14 16:35:55', 'voyager.roles.index', 'null'),
(5, 1, 'Tools', '', '_self', 'voyager-tools', '#000000', NULL, 8, '2019-03-09 09:42:51', '2019-03-14 16:36:31', NULL, ''),
(6, 1, 'Menu Builder', '', '_self', 'voyager-list', '#000000', 5, 1, '2019-03-09 09:42:51', '2019-03-14 16:36:50', 'voyager.menus.index', 'null'),
(7, 1, 'Database', '', '_self', 'voyager-data', NULL, 5, 2, '2019-03-09 09:42:51', '2019-03-10 21:39:53', 'voyager.database.index', NULL),
(8, 1, 'Compass', '', '_self', 'voyager-compass', NULL, 5, 3, '2019-03-09 09:42:51', '2019-03-10 21:39:53', 'voyager.compass.index', NULL),
(9, 1, 'BREAD', '', '_self', 'voyager-bread', NULL, 5, 4, '2019-03-09 09:42:51', '2019-03-10 21:39:53', 'voyager.bread.index', NULL),
(10, 1, 'Settings', '', '_self', 'voyager-settings', '#000000', NULL, 9, '2019-03-09 09:42:51', '2019-03-14 16:37:12', 'voyager.settings.index', 'null'),
(11, 1, 'Hooks', '', '_self', 'voyager-hook', NULL, 5, 5, '2019-03-09 09:42:52', '2019-03-10 21:39:53', 'voyager.hooks', NULL),
(12, 1, 'Categories', '', '_self', 'voyager-categories', '#000000', NULL, 7, '2019-03-09 09:45:13', '2019-03-21 23:38:21', 'voyager.categories.index', 'null'),
(13, 1, 'Posts', '', '_self', 'voyager-news', '#000000', NULL, 5, '2019-03-09 09:45:14', '2019-03-21 23:37:58', 'voyager.posts.index', 'null'),
(14, 1, 'Pages', '', '_self', 'voyager-file-text', '#000000', NULL, 6, '2019-03-09 09:45:14', '2019-03-21 23:38:09', 'voyager.pages.index', 'null'),
(15, 1, 'Occasions', '', '_self', 'voyager-music', '#000000', 25, 1, '2019-03-09 16:21:31', '2019-03-16 16:40:32', 'voyager.occasions.index', 'null'),
(16, 1, 'Countries', '', '_self', 'voyager-window-list', '#000000', 25, 2, '2019-03-10 10:17:15', '2019-03-12 20:19:51', 'voyager.countries.index', 'null'),
(19, 1, 'States', '', '_self', 'voyager-window-list', '#000000', 25, 3, '2019-03-10 11:04:35', '2019-03-14 16:26:03', 'voyager.states.index', 'null'),
(20, 1, 'Halls', '', '_self', 'voyager-handle', '#000000', 25, 4, '2019-03-10 11:26:19', '2019-03-14 16:26:03', 'voyager.halls.index', 'null'),
(21, 1, 'Cities', '', '_self', 'voyager-window-list', '#000000', 25, 5, '2019-03-10 12:04:54', '2019-03-14 16:26:03', 'voyager.cities.index', 'null'),
(22, 1, 'Conditions', '', '_self', 'voyager-receipt', '#000000', 25, 6, '2019-03-10 13:49:35', '2019-03-12 20:21:09', 'voyager.conditions.index', 'null'),
(23, 1, 'Rhythms', '', '_self', 'voyager-bell', '#000000', 25, 7, '2019-03-10 21:37:59', '2019-03-12 20:21:29', 'voyager.rhythms.index', 'null'),
(24, 1, 'Machines', '', '_self', 'voyager-hook', '#000000', 25, 8, '2019-03-10 21:38:21', '2019-03-12 20:22:15', 'voyager.machines.index', 'null'),
(25, 1, 'management', '', '_self', 'voyager-music', '#000000', NULL, 10, '2019-03-10 21:39:47', '2019-03-10 21:40:38', NULL, ''),
(26, 1, 'Prices', '', '_self', 'voyager-basket', '#000000', 25, 9, '2019-03-11 19:32:48', '2019-03-12 20:19:19', 'voyager.prices.index', 'null'),
(27, 1, 'Orders', '', '_self', 'voyager-credit-card', '#000000', NULL, 11, '2019-03-16 16:44:29', '2019-03-17 00:14:40', 'voyager.orders.index', 'null'),
(28, 1, 'Banks', '', '_self', 'voyager-credit-card', '#000000', 25, 10, '2019-03-19 17:32:28', '2019-03-19 17:54:02', 'voyager.banks.index', 'null'),
(29, 1, 'Newly Added Bridal', '', '_self', 'voyager-star-half', '#000000', NULL, 12, '2019-04-03 12:09:57', '2019-04-03 15:44:42', 'voyager.grooms.index', 'null'),
(30, 1, 'The hindsight', '/admin/orders?new_date=new_date', '_self', 'voyager-medal-rank-star', '#000000', NULL, 13, '2019-04-03 15:38:15', '2019-04-03 15:42:57', NULL, ''),
(31, 1, 'Closed Contracts', '/admin/orders?closed=closed', '_self', 'voyager-x', '#000000', NULL, 14, '2019-04-03 16:31:59', '2019-04-03 16:33:00', NULL, ''),
(32, 1, 'Contracts canceled', '/admin/orders?canceled=canceled', '_self', 'voyager-key', '#000000', NULL, 15, '2019-04-03 20:57:54', '2019-04-03 20:57:54', NULL, '');
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2016_01_01_000000_add_voyager_user_fields', 1),
(4, '2016_01_01_000000_create_data_types_table', 1),
(5, '2016_01_01_000000_create_pages_table', 1),
(6, '2016_01_01_000000_create_posts_table', 1),
(7, '2016_02_15_204651_create_categories_table', 1),
(8, '2016_05_19_173453_create_menu_table', 1),
(9, '2016_10_21_190000_create_roles_table', 1),
(10, '2016_10_21_190000_create_settings_table', 1),
(11, '2016_11_30_135954_create_permission_table', 1),
(12, '2016_11_30_141208_create_permission_role_table', 1),
(13, '2016_12_26_201236_data_types__add__server_side', 1),
(14, '2017_01_13_000000_add_route_to_menu_items_table', 1),
(15, '2017_01_14_005015_create_translations_table', 1),
(16, '2017_01_15_000000_make_table_name_nullable_in_permissions_table', 1),
(17, '2017_03_06_000000_add_controller_to_data_types_table', 1),
(18, '2017_04_11_000000_alter_post_nullable_fields_table', 1),
(19, '2017_04_21_000000_add_order_to_data_rows_table', 1),
(20, '2017_07_05_210000_add_policyname_to_data_types_table', 1),
(21, '2017_08_05_000000_add_group_to_settings_table', 1),
(22, '2017_11_26_013050_add_user_role_relationship', 1),
(23, '2017_11_26_015000_create_user_roles_table', 1),
(24, '2018_03_11_000000_add_user_settings', 1),
(25, '2018_03_14_000000_add_details_to_data_types_table', 1),
(26, '2018_03_16_000000_make_settings_value_nullable', 1),
(27, '2019_03_09_110458_create_cities_table', 1),
(28, '2019_03_09_110458_create_countries_table', 1),
(29, '2019_03_09_110458_create_orders_table', 1),
(30, '2019_03_09_110458_create_states_table', 1),
(31, '2019_03_09_110459_create_Conditions_table', 1),
(32, '2019_03_09_110459_create_Halls_table', 1),
(33, '2019_03_09_110459_create_Occasions_table', 1),
(34, '2019_03_09_110459_create_Remittances_table', 1),
(35, '2019_03_09_110459_create_contacts_table', 1),
(36, '2019_03_09_110459_create_prices_table', 1),
(37, '2019_03_09_110459_create_tunes_table', 1),
(38, '2019_03_09_110509_create_foreign_keys', 1),
(39, '2019_03_10_232834_create_machines_table', 2),
(40, '2019_03_10_233258_create_rhythms_table', 2),
(41, '2019_03_19_172203_create_banks_table', 3),
(42, '2019_04_03_132138_create_grooms_table', 4);
-- --------------------------------------------------------
--
-- Table structure for table `modrators`
--
CREATE TABLE `modrators` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(188) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `modrators`
--
INSERT INTO `modrators` (`id`, `name`, `email`, `password`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 'modratot', 'asdasda@yahoo.com', '$2y$10$TS15FM6X8eFxCQETbs3hpeoUAfIB9yHM.m8v8vj6GvShPtqgCyKGS', NULL, '2019-03-21 17:37:39', '2019-03-21 17:37:39'),
(2, 'ahmed', 'myhishamad2@gmail.com', '$2y$10$t/UpQhxqzyr1gpuTE4ErvOOOa7X/iXySv19w.aoK/NEhDDm2nPIy2', 4, '2019-03-21 19:09:14', '2019-03-21 19:09:14');
-- --------------------------------------------------------
--
-- Table structure for table `occasions`
--
CREATE TABLE `occasions` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `occasions`
--
INSERT INTO `occasions` (`id`, `created_at`, `updated_at`, `name`) VALUES
(1, '2019-03-10 12:13:00', '2019-03-10 12:31:06', 'esm el qa3a');
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE `orders` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`number_bridal` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`name_bridal` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`identity` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`birthday` date DEFAULT NULL,
`nationalty` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`identity_source` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`identity_image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`phone_bridal` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`singer_gender` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`singer_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`singer_name_optional` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`code_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`carol_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`hejry_date` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`date` date DEFAULT NULL,
`hotel_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`start_time` time DEFAULT NULL,
`end_time` time DEFAULT NULL,
`street_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`company_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`company_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`commercial_registration_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`company_owner_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`registration_id_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`director_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`price` int(11) NOT NULL,
`concert` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`order_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT 'personal',
`hall_id` int(10) UNSIGNED DEFAULT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`country_id` int(10) UNSIGNED NOT NULL,
`city_id` int(10) UNSIGNED NOT NULL,
`state_id` int(10) UNSIGNED NOT NULL,
`tune_id` int(10) UNSIGNED DEFAULT NULL,
`occasion_id` int(10) UNSIGNED DEFAULT NULL,
`rhythms` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
`machines` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
`contacts` longtext COLLATE utf8mb4_unicode_ci,
`agreements` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
`approved` tinyint(1) NOT NULL DEFAULT '0',
`singer_id` int(10) UNSIGNED DEFAULT NULL,
`permits` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`reason_of_edit` text COLLATE utf8mb4_unicode_ci,
`new_date` date DEFAULT NULL,
`canceled` int(1) DEFAULT NULL,
`closed` int(1) DEFAULT NULL,
`attach_proof` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `orders`
--
INSERT INTO `orders` (`id`, `created_at`, `updated_at`, `number_bridal`, `name_bridal`, `identity`, `birthday`, `nationalty`, `identity_source`, `identity_image`, `email_address`, `phone_bridal`, `singer_gender`, `singer_name`, `singer_name_optional`, `code_number`, `carol_type`, `hejry_date`, `date`, `hotel_name`, `start_time`, `end_time`, `street_name`, `company_type`, `company_name`, `commercial_registration_no`, `company_owner_name`, `registration_id_number`, `director_name`, `price`, `concert`, `order_type`, `hall_id`, `user_id`, `country_id`, `city_id`, `state_id`, `tune_id`, `occasion_id`, `rhythms`, `machines`, `contacts`, `agreements`, `approved`, `singer_id`, `permits`, `reason_of_edit`, `new_date`, `canceled`, `closed`, `attach_proof`) VALUES
(35, '2019-03-28 14:59:12', '2019-03-28 14:59:12', '2', 'Cameron Perry', 'Do et quaerat suscipit ea nobis nesciunt quia perspiciatis impedit ullam autem itaque consequat', NULL, 'اماراتي', 'Molestiae beatae aliqua Suscipit numquam veniam ea eum voluptatum dolore quia et consectetur aperi', 'identity/pVQgK6vKrYzYdgsSemvWg132ZTygVkLLhBOCN8R2.jpeg', 'diquxyhe@mailinator.net', '+1 (984) 844-3179', 'male', NULL, NULL, '9242', 'مطربة', NULL, NULL, 'hotel3', NULL, NULL, 'Nevada Woodward', NULL, NULL, NULL, NULL, NULL, NULL, 8000, NULL, 'personal', 2, 2, 1, 1, 1, NULL, 1, '{\"2\":\"\\u0627\\u064a\\u0642\\u0627\\u0639\\u0627\\u062a \\u0639\\u0627\\u062f\\u064a\\u0629\"}', '{\"2\":\"\\u0639\\u0627\\u0632\\u0641 \\u0627\\u0648\\u0631\\u062c\"}', '{\"contact_name\":[\"Pearl Fulton\"],\"contact_relation\":[\"\\u0627\\u062e\"],\"contact_phone\":[\"+1 (786) 613-1464\"]}', '{\"_token\":\"5gMpB5N63oN2JiwckBohHRHnWyiT3dudpYRfgtol\",\"sender_name\":\"Levi Summers\",\"relative_relation\":\"\\u0627\\u062e\",\"bank_name\":\"\\u0627\\u0644\\u0628\\u0646\\u0643 \\u0627\\u0644\\u0633\\u0639\\u0648\\u062f\\u064a\",\"account_number\":\"697\",\"sender_phone\":\"966500711887\"}', 0, 4, NULL, NULL, NULL, NULL, NULL, NULL),
(39, '2019-03-29 13:18:00', '2019-03-29 13:25:57', '256', 'hisham', 'Non sed deleniti unde nostrud provident ut', '2019-03-20', 'سعودي', 'Ut ut qui qui aliqua Asperiores sapiente ut deserunt officia aute', 'identity/xNLvLQT903nmVNhAlRJMcku6lsW0u89vWk5GCxyE.jpeg', 'adminweb@adminweb.com', '4703809312', 'female', 'Rylee Mcclain', 'Uma Howard', '7146', 'مطرب', '1440-06-17', '2019-02-20', 'hotel1', '17:16:00', '17:16:00', '111 Silicon Valley Road', NULL, NULL, NULL, NULL, NULL, NULL, 8000, NULL, 'personal', 1, 2, 1, 1, 1, NULL, 1, NULL, NULL, '{\"contact_name\":[\"Kirsten Elliott\"],\"contact_relation\":[\"\\u0627\\u062e\"],\"contact_phone\":[\"+1 (399) 107-8636\"]}', '{\"number_of_hits\":\"1\",\"price\":\"8000\",\"deposit\":\"3000\",\"remaining_amount\":\"5000\"}', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(40, '2019-04-02 09:42:00', '2019-04-03 23:57:43', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Courtney Bond', 'Zachery Watkins', '3975', NULL, NULL, '2019-03-17', NULL, '13:39:00', '03:39:00', 'Dieter Decker', 'تجارية', 'Harris Mccoy Co', '5345345345', 'Miranda and Warner Trading', '116', 'Michael Mueller', 8000, 'عيد ميلاد', 'companies', NULL, 2, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 4, NULL, 'ظروف خاصه', '2019-04-25', 1, 1, NULL),
(41, '2019-04-02 11:20:06', '2019-04-02 11:20:06', '88', 'Ramona Welch', 'Deleniti voluptatem Minima saepe asperiores sed impedit et reprehenderit', '2001-11-15', 'سعودي', 'Cum quasi sint commodo quia expedita autem exercitationem', 'identity/8k4rtVGpV0oGkXGgqsDi23T9xOFTfTBKmsmrX5CL.png', 'myfe@mailinator.com', '+1 (506) 537-6931', 'female', NULL, NULL, '5931', 'مطرب', '1440-06-08 00:00:00', '2019-02-15', 'hotel1', '15:19:00', '17:19:00', 'gfdg', NULL, NULL, NULL, NULL, NULL, NULL, 8000, NULL, 'personal', 1, 2, 1, 1, 1, NULL, 1, NULL, NULL, '{\"contact_name\":[\"Oprah Maxwell\"],\"contact_relation\":[\"\\u0627\\u062e\"],\"contact_phone\":[\"+1 (523) 901-3125\"]}', '{\"number_of_hits\":\"1\",\"price\":\"8000\",\"deposit\":\"3000\",\"remaining_amount\":\"5000\"}', 0, 4, NULL, NULL, NULL, NULL, NULL, NULL),
(42, '2019-04-06 18:07:29', '2019-04-06 18:07:29', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Allegra Lambert', 'Phoebe Wilkins', '1591', NULL, '1440-07-20 00:00:00', '2019-03-25', NULL, '20:07:00', '20:07:00', 'Venus Stark', 'تجارية', 'Mitchell and Rich Plc', '6546456456', 'Weber and Mccarty LLC', '303', 'Elaine Rosales', 8000, 'امسية طربية', 'companies', NULL, 3, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `pages`
--
CREATE TABLE `pages` (
`id` int(10) UNSIGNED NOT NULL,
`author_id` int(11) NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`excerpt` text COLLATE utf8mb4_unicode_ci,
`body` text COLLATE utf8mb4_unicode_ci,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`meta_description` text COLLATE utf8mb4_unicode_ci,
`meta_keywords` text COLLATE utf8mb4_unicode_ci,
`status` enum('ACTIVE','INACTIVE') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'INACTIVE',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `pages`
--
INSERT INTO `pages` (`id`, `author_id`, `title`, `excerpt`, `body`, `image`, `slug`, `meta_description`, `meta_keywords`, `status`, `created_at`, `updated_at`) VALUES
(1, 0, 'Hello World', 'Hang the jib grog grog blossom grapple dance the hempen jig gangway pressgang bilge rat to go on account lugger. Nelsons folly gabion line draught scallywag fire ship gaff fluke fathom case shot. Sea Legs bilge rat sloop matey gabion long clothes run a shot across the bow Gold Road cog league.', '<p>Hello World. Scallywag grog swab Cat o\'nine tails scuttle rigging hardtack cable nipper Yellow Jack. Handsomely spirits knave lad killick landlubber or just lubber deadlights chantey pinnace crack Jennys tea cup. Provost long clothes black spot Yellow Jack bilged on her anchor league lateen sail case shot lee tackle.</p>\n<p>Ballast spirits fluke topmast me quarterdeck schooner landlubber or just lubber gabion belaying pin. Pinnace stern galleon starboard warp carouser to go on account dance the hempen jig jolly boat measured fer yer chains. Man-of-war fire in the hole nipperkin handsomely doubloon barkadeer Brethren of the Coast gibbet driver squiffy.</p>', 'pages/page1.jpg', 'hello-world', 'Yar Meta Description', 'Keyword1, Keyword2', 'ACTIVE', '2019-03-10 11:47:41', '2019-03-10 11:47:41');
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `password_resets`
--
INSERT INTO `password_resets` (`email`, `token`, `created_at`) VALUES
('myhishamad2@gmail.com', '$2y$10$WtP4Z0w6LkwOEavBuRz4fePc71/z1tfpfItZDIJIbXR74pot.SRdK', '2019-03-24 00:28:02');
-- --------------------------------------------------------
--
-- Table structure for table `permissions`
--
CREATE TABLE `permissions` (
`id` bigint(20) UNSIGNED NOT NULL,
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`table_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `permissions`
--
INSERT INTO `permissions` (`id`, `key`, `table_name`, `created_at`, `updated_at`) VALUES
(1, 'browse_admin', NULL, '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(2, 'browse_bread', NULL, '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(3, 'browse_database', NULL, '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(4, 'browse_media', NULL, '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(5, 'browse_compass', NULL, '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(6, 'browse_menus', 'menus', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(7, 'read_menus', 'menus', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(8, 'edit_menus', 'menus', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(9, 'add_menus', 'menus', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(10, 'delete_menus', 'menus', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(11, 'browse_roles', 'roles', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(12, 'read_roles', 'roles', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(13, 'edit_roles', 'roles', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(14, 'add_roles', 'roles', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(15, 'delete_roles', 'roles', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(16, 'browse_users', 'users', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(17, 'read_users', 'users', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(18, 'edit_users', 'users', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(19, 'add_users', 'users', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(20, 'delete_users', 'users', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(21, 'browse_settings', 'settings', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(22, 'read_settings', 'settings', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(23, 'edit_settings', 'settings', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(24, 'add_settings', 'settings', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(25, 'delete_settings', 'settings', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(26, 'browse_categories', 'categories', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(27, 'read_categories', 'categories', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(28, 'edit_categories', 'categories', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(29, 'add_categories', 'categories', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(30, 'delete_categories', 'categories', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(31, 'browse_posts', 'posts', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(32, 'read_posts', 'posts', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(33, 'edit_posts', 'posts', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(34, 'add_posts', 'posts', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(35, 'delete_posts', 'posts', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(36, 'browse_pages', 'pages', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(37, 'read_pages', 'pages', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(38, 'edit_pages', 'pages', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(39, 'add_pages', 'pages', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(40, 'delete_pages', 'pages', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(41, 'browse_hooks', NULL, '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(42, 'browse_cities', 'cities', '2019-03-10 12:04:54', '2019-03-10 12:04:54'),
(43, 'read_cities', 'cities', '2019-03-10 12:04:54', '2019-03-10 12:04:54'),
(44, 'edit_cities', 'cities', '2019-03-10 12:04:54', '2019-03-10 12:04:54'),
(45, 'add_cities', 'cities', '2019-03-10 12:04:54', '2019-03-10 12:04:54'),
(46, 'delete_cities', 'cities', '2019-03-10 12:04:54', '2019-03-10 12:04:54'),
(47, 'browse_countries', 'countries', '2019-03-10 12:05:13', '2019-03-10 12:05:13'),
(48, 'read_countries', 'countries', '2019-03-10 12:05:13', '2019-03-10 12:05:13'),
(49, 'edit_countries', 'countries', '2019-03-10 12:05:13', '2019-03-10 12:05:13'),
(50, 'add_countries', 'countries', '2019-03-10 12:05:13', '2019-03-10 12:05:13'),
(51, 'delete_countries', 'countries', '2019-03-10 12:05:13', '2019-03-10 12:05:13'),
(52, 'browse_halls', 'halls', '2019-03-10 12:05:36', '2019-03-10 12:05:36'),
(53, 'read_halls', 'halls', '2019-03-10 12:05:36', '2019-03-10 12:05:36'),
(54, 'edit_halls', 'halls', '2019-03-10 12:05:36', '2019-03-10 12:05:36'),
(55, 'add_halls', 'halls', '2019-03-10 12:05:36', '2019-03-10 12:05:36'),
(56, 'delete_halls', 'halls', '2019-03-10 12:05:36', '2019-03-10 12:05:36'),
(57, 'browse_occasions', 'occasions', '2019-03-10 12:05:44', '2019-03-10 12:05:44'),
(58, 'read_occasions', 'occasions', '2019-03-10 12:05:44', '2019-03-10 12:05:44'),
(59, 'edit_occasions', 'occasions', '2019-03-10 12:05:44', '2019-03-10 12:05:44'),
(60, 'add_occasions', 'occasions', '2019-03-10 12:05:44', '2019-03-10 12:05:44'),
(61, 'delete_occasions', 'occasions', '2019-03-10 12:05:44', '2019-03-10 12:05:44'),
(62, 'browse_states', 'states', '2019-03-10 12:06:57', '2019-03-10 12:06:57'),
(63, 'read_states', 'states', '2019-03-10 12:06:57', '2019-03-10 12:06:57'),
(64, 'edit_states', 'states', '2019-03-10 12:06:57', '2019-03-10 12:06:57'),
(65, 'add_states', 'states', '2019-03-10 12:06:57', '2019-03-10 12:06:57'),
(66, 'delete_states', 'states', '2019-03-10 12:06:57', '2019-03-10 12:06:57'),
(67, 'browse_conditions', 'conditions', '2019-03-10 13:49:35', '2019-03-10 13:49:35'),
(68, 'read_conditions', 'conditions', '2019-03-10 13:49:35', '2019-03-10 13:49:35'),
(69, 'edit_conditions', 'conditions', '2019-03-10 13:49:35', '2019-03-10 13:49:35'),
(70, 'add_conditions', 'conditions', '2019-03-10 13:49:35', '2019-03-10 13:49:35'),
(71, 'delete_conditions', 'conditions', '2019-03-10 13:49:35', '2019-03-10 13:49:35'),
(72, 'browse_rhythms', 'rhythms', '2019-03-10 21:37:59', '2019-03-10 21:37:59'),
(73, 'read_rhythms', 'rhythms', '2019-03-10 21:37:59', '2019-03-10 21:37:59'),
(74, 'edit_rhythms', 'rhythms', '2019-03-10 21:37:59', '2019-03-10 21:37:59'),
(75, 'add_rhythms', 'rhythms', '2019-03-10 21:37:59', '2019-03-10 21:37:59'),
(76, 'delete_rhythms', 'rhythms', '2019-03-10 21:37:59', '2019-03-10 21:37:59'),
(77, 'browse_machines', 'machines', '2019-03-10 21:38:21', '2019-03-10 21:38:21'),
(78, 'read_machines', 'machines', '2019-03-10 21:38:21', '2019-03-10 21:38:21'),
(79, 'edit_machines', 'machines', '2019-03-10 21:38:21', '2019-03-10 21:38:21'),
(80, 'add_machines', 'machines', '2019-03-10 21:38:21', '2019-03-10 21:38:21'),
(81, 'delete_machines', 'machines', '2019-03-10 21:38:21', '2019-03-10 21:38:21'),
(82, 'browse_prices', 'prices', '2019-03-11 19:32:48', '2019-03-11 19:32:48'),
(83, 'read_prices', 'prices', '2019-03-11 19:32:48', '2019-03-11 19:32:48'),
(84, 'edit_prices', 'prices', '2019-03-11 19:32:48', '2019-03-11 19:32:48'),
(85, 'add_prices', 'prices', '2019-03-11 19:32:48', '2019-03-11 19:32:48'),
(86, 'delete_prices', 'prices', '2019-03-11 19:32:48', '2019-03-11 19:32:48'),
(87, 'browse_orders', 'orders', '2019-03-16 16:44:28', '2019-03-16 16:44:28'),
(88, 'read_orders', 'orders', '2019-03-16 16:44:28', '2019-03-16 16:44:28'),
(89, 'edit_orders', 'orders', '2019-03-16 16:44:28', '2019-03-16 16:44:28'),
(90, 'add_orders', 'orders', '2019-03-16 16:44:28', '2019-03-16 16:44:28'),
(91, 'delete_orders', 'orders', '2019-03-16 16:44:28', '2019-03-16 16:44:28'),
(92, 'browse_banks', 'banks', '2019-03-19 17:32:28', '2019-03-19 17:32:28'),
(93, 'read_banks', 'banks', '2019-03-19 17:32:28', '2019-03-19 17:32:28'),
(94, 'edit_banks', 'banks', '2019-03-19 17:32:28', '2019-03-19 17:32:28'),
(95, 'add_banks', 'banks', '2019-03-19 17:32:28', '2019-03-19 17:32:28'),
(96, 'delete_banks', 'banks', '2019-03-19 17:32:28', '2019-03-19 17:32:28'),
(97, 'browse_grooms', 'grooms', '2019-04-03 12:09:57', '2019-04-03 12:09:57'),
(98, 'read_grooms', 'grooms', '2019-04-03 12:09:57', '2019-04-03 12:09:57'),
(99, 'edit_grooms', 'grooms', '2019-04-03 12:09:57', '2019-04-03 12:09:57'),
(100, 'add_grooms', 'grooms', '2019-04-03 12:09:57', '2019-04-03 12:09:57'),
(101, 'delete_grooms', 'grooms', '2019-04-03 12:09:57', '2019-04-03 12:09:57');
-- --------------------------------------------------------
--
-- Table structure for table `permission_role`
--
CREATE TABLE `permission_role` (
`permission_id` bigint(20) UNSIGNED NOT NULL,
`role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `permission_role`
--
INSERT INTO `permission_role` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 3),
(1, 4),
(1, 5),
(2, 3),
(3, 3),
(4, 1),
(4, 3),
(5, 3),
(6, 1),
(6, 3),
(7, 1),
(7, 3),
(8, 1),
(8, 3),
(9, 1),
(9, 3),
(10, 1),
(10, 3),
(11, 1),
(11, 3),
(12, 1),
(12, 3),
(13, 1),
(13, 3),
(14, 1),
(14, 3),
(15, 3),
(16, 1),
(16, 3),
(16, 4),
(17, 1),
(17, 3),
(17, 4),
(18, 1),
(18, 3),
(18, 4),
(19, 1),
(19, 3),
(19, 4),
(20, 1),
(20, 3),
(20, 4),
(21, 1),
(21, 3),
(22, 1),
(22, 3),
(23, 1),
(23, 3),
(24, 1),
(24, 3),
(25, 1),
(25, 3),
(26, 3),
(27, 3),
(28, 3),
(29, 3),
(30, 3),
(31, 3),
(32, 3),
(33, 3),
(34, 3),
(35, 3),
(36, 3),
(37, 3),
(38, 3),
(39, 3),
(40, 3),
(41, 3),
(42, 1),
(42, 3),
(43, 1),
(43, 3),
(44, 1),
(44, 3),
(45, 1),
(45, 3),
(46, 1),
(46, 3),
(47, 1),
(47, 3),
(48, 1),
(48, 3),
(49, 1),
(49, 3),
(50, 1),
(50, 3),
(51, 1),
(51, 3),
(52, 1),
(52, 3),
(53, 1),
(53, 3),
(54, 1),
(54, 3),
(55, 1),
(55, 3),
(56, 1),
(56, 3),
(57, 1),
(57, 3),
(58, 1),
(58, 3),
(59, 1),
(59, 3),
(60, 1),
(60, 3),
(61, 1),
(61, 3),
(62, 1),
(62, 3),
(63, 1),
(63, 3),
(64, 1),
(64, 3),
(65, 1),
(65, 3),
(66, 1),
(66, 3),
(67, 1),
(67, 3),
(68, 1),
(68, 3),
(69, 1),
(69, 3),
(70, 1),
(70, 3),
(71, 1),
(71, 3),
(72, 1),
(72, 3),
(73, 1),
(73, 3),
(74, 1),
(74, 3),
(75, 1),
(75, 3),
(76, 1),
(76, 3),
(77, 1),
(77, 3),
(78, 1),
(78, 3),
(79, 1),
(79, 3),
(80, 1),
(80, 3),
(81, 1),
(81, 3),
(82, 1),
(82, 3),
(83, 1),
(83, 3),
(84, 1),
(84, 3),
(85, 1),
(85, 3),
(86, 1),
(86, 3),
(87, 1),
(87, 3),
(87, 4),
(87, 5),
(88, 1),
(88, 3),
(88, 4),
(88, 5),
(89, 1),
(89, 3),
(89, 4),
(89, 5),
(90, 1),
(90, 3),
(90, 4),
(90, 5),
(91, 1),
(91, 3),
(91, 4),
(91, 5),
(92, 1),
(92, 3),
(93, 1),
(93, 3),
(94, 1),
(94, 3),
(95, 1),
(95, 3),
(96, 1),
(96, 3),
(97, 1),
(97, 3),
(97, 4),
(97, 5),
(98, 1),
(98, 3),
(98, 4),
(98, 5),
(99, 1),
(99, 3),
(99, 4),
(99, 5),
(100, 1),
(100, 3),
(100, 4),
(100, 5),
(101, 1),
(101, 3),
(101, 4),
(101, 5);
-- --------------------------------------------------------
--
-- Table structure for table `posts`
--
CREATE TABLE `posts` (
`id` int(10) UNSIGNED NOT NULL,
`author_id` int(11) NOT NULL,
`category_id` int(11) DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`seo_title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`excerpt` text COLLATE utf8mb4_unicode_ci,
`body` text COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`meta_description` text COLLATE utf8mb4_unicode_ci,
`meta_keywords` text COLLATE utf8mb4_unicode_ci,
`status` enum('PUBLISHED','DRAFT','PENDING') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'DRAFT',
`featured` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `posts`
--
INSERT INTO `posts` (`id`, `author_id`, `category_id`, `title`, `seo_title`, `excerpt`, `body`, `image`, `slug`, `meta_description`, `meta_keywords`, `status`, `featured`, `created_at`, `updated_at`) VALUES
(1, 0, NULL, 'Lorem Ipsum Post', NULL, 'This is the excerpt for the Lorem Ipsum Post', '<p>This is the body of the lorem ipsum post</p>', 'posts/post1.jpg', 'lorem-ipsum-post', 'This is the meta description', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(2, 0, NULL, 'My Sample Post', NULL, 'This is the excerpt for the sample Post', '<p>This is the body for the sample post, which includes the body.</p>\n <h2>We can use all kinds of format!</h2>\n <p>And include a bunch of other stuff.</p>', 'posts/post2.jpg', 'my-sample-post', 'Meta Description for sample post', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(3, 0, NULL, 'Latest Post', NULL, 'This is the excerpt for the latest post', '<p>This is the body for the latest post</p>', 'posts/post3.jpg', 'latest-post', 'This is the meta description', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(4, 0, NULL, 'Yarr Post', NULL, 'Reef sails nipperkin bring a spring upon her cable coffer jury mast spike marooned Pieces of Eight poop deck pillage. Clipper driver coxswain galleon hempen halter come about pressgang gangplank boatswain swing the lead. Nipperkin yard skysail swab lanyard Blimey bilge water ho quarter Buccaneer.', '<p>Swab deadlights Buccaneer fire ship square-rigged dance the hempen jig weigh anchor cackle fruit grog furl. Crack Jennys tea cup chase guns pressgang hearties spirits hogshead Gold Road six pounders fathom measured fer yer chains. Main sheet provost come about trysail barkadeer crimp scuttle mizzenmast brig plunder.</p>\n<p>Mizzen league keelhaul galleon tender cog chase Barbary Coast doubloon crack Jennys tea cup. Blow the man down lugsail fire ship pinnace cackle fruit line warp Admiral of the Black strike colors doubloon. Tackle Jack Ketch come about crimp rum draft scuppers run a shot across the bow haul wind maroon.</p>\n<p>Interloper heave down list driver pressgang holystone scuppers tackle scallywag bilged on her anchor. Jack Tar interloper draught grapple mizzenmast hulk knave cable transom hogshead. Gaff pillage to go on account grog aft chase guns piracy yardarm knave clap of thunder.</p>', 'posts/post4.jpg', 'yarr-post', 'this be a meta descript', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2019-03-10 11:47:41', '2019-03-10 11:47:41');
-- --------------------------------------------------------
--
-- Table structure for table `prices`
--
CREATE TABLE `prices` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`price` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `prices`
--
INSERT INTO `prices` (`id`, `created_at`, `updated_at`, `price`) VALUES
(1, '2019-03-11 19:33:13', '2019-03-11 19:33:13', '8000'),
(2, '2019-03-11 19:33:20', '2019-03-11 19:33:20', '10000'),
(3, '2019-03-11 19:33:27', '2019-03-11 19:33:27', '15000'),
(4, '2019-03-11 19:33:34', '2019-03-11 19:33:34', '20000');
-- --------------------------------------------------------
--
-- Table structure for table `remittances`
--
CREATE TABLE `remittances` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`sender_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`relative_relation` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`bank_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`account_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`sender_phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`order_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `remittances`
--
INSERT INTO `remittances` (`id`, `created_at`, `updated_at`, `sender_name`, `relative_relation`, `bank_name`, `account_number`, `sender_phone`, `order_id`) VALUES
(1, '2019-03-28 14:59:12', '2019-03-28 14:59:12', 'Levi Summers', 'اخ', 'البنك السعودي', '697', '966500711887', 35),
(2, '2019-03-29 13:18:17', '2019-03-29 13:18:17', 'Stacy Summers', 'اخ', 'البنك السعودي', '214', '966580621314', 39),
(3, '2019-04-02 11:20:06', '2019-04-02 11:20:06', 'Porter Bradshaw', 'اخ', 'البنك السعودي', '519', '966551031660', 41);
-- --------------------------------------------------------
--
-- Table structure for table `rhythms`
--
CREATE TABLE `rhythms` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `rhythms`
--
INSERT INTO `rhythms` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'shabab 3eda', '2019-03-10 21:41:20', '2019-03-10 21:41:20'),
(2, 'normal rhythm', '2019-03-10 21:41:50', '2019-03-10 21:41:50');
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`id`, `name`, `display_name`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Administrator', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(2, 'user', 'Normal User', '2019-03-10 11:47:40', '2019-03-10 11:47:40'),
(3, 'developer', 'Developer', '2019-03-10 12:03:38', '2019-03-10 12:03:38'),
(4, 'singer', 'Singer', '2019-03-21 17:16:53', '2019-03-21 17:16:53'),
(5, 'moderator', 'Moderator', '2019-03-21 17:17:29', '2019-03-21 17:17:29');
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE `settings` (
`id` int(10) UNSIGNED NOT NULL,
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_ci,
`details` text COLLATE utf8mb4_unicode_ci,
`type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`order` int(11) NOT NULL DEFAULT '1',
`group` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`id`, `key`, `display_name`, `value`, `details`, `type`, `order`, `group`) VALUES
(1, 'site.title', 'Site Title', 'Marina', '', 'text', 1, 'Site'),
(2, 'site.description', 'Site Description', 'marina description', '', 'text', 2, 'Site'),
(3, 'site.logo', 'Site Logo', 'settings/March2019/ZRGL91nfdnPV4LMPr3xX.png', '', 'image', 3, 'Site'),
(4, 'site.google_analytics_tracking_id', 'Google Analytics Tracking ID', 'AIzaSyDa44Wo4rz0dzvTwgZG6DHdqgyCmMJkd0c', '', 'text', 4, 'Site'),
(5, 'admin.bg_image', 'Admin Background Image', 'settings/March2019/2wioKtNAweLMISesjVZH.png', '', 'image', 5, 'Admin'),
(6, 'admin.title', 'Admin Title', 'Marina', '', 'text', 1, 'Admin'),
(7, 'admin.description', 'Admin Description', 'Welcome to Marina Admin Panel', '', 'text', 2, 'Admin'),
(8, 'admin.loader', 'Admin Loader', 'settings/March2019/pF9iuJ0GFlShBbiQaOl6.png', '', 'image', 3, 'Admin'),
(9, 'admin.icon_image', 'Admin Icon Image', 'settings/March2019/8mOVDBGjfHdeQEfO5kHn.png', '', 'image', 4, 'Admin'),
(10, 'admin.google_analytics_client_id', 'Google Analytics Client ID (used for admin dashboard)', NULL, '', 'text', 1, 'Admin'),
(11, 'site.text_header', 'text header', 'فـرقــة مــاريـنـــا الـغــربـيـــة', NULL, 'text', 6, 'Site'),
(13, 'site.logo_text', 'Logo Text', 'settings/March2019/HNjf5pIWeoWIRyvGvCCO.png', NULL, 'image', 7, 'Site'),
(14, 'site.facebook', 'facebook', 'https://www.facebook.com/', NULL, 'text', 8, 'Site'),
(15, 'site.twitter', 'twitter', 'https://www.twitter.com', NULL, 'text', 9, 'Site'),
(16, 'site.instagram', 'instagram', 'https://www.instagram.com', NULL, 'text', 10, 'Site'),
(17, 'site.price_per_birdal', 'price per birdal', '50', NULL, 'text', 11, 'Site');
-- --------------------------------------------------------
--
-- Table structure for table `states`
--
CREATE TABLE `states` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`country_id` int(10) UNSIGNED NOT NULL,
`city_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `states`
--
INSERT INTO `states` (`id`, `created_at`, `updated_at`, `name`, `country_id`, `city_id`) VALUES
(1, '2019-03-10 12:48:00', '2019-03-17 00:07:24', 'state1', 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `translations`
--
CREATE TABLE `translations` (
`id` int(10) UNSIGNED NOT NULL,
`table_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`column_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`foreign_key` int(10) UNSIGNED NOT NULL,
`locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `translations`
--
INSERT INTO `translations` (`id`, `table_name`, `column_name`, `foreign_key`, `locale`, `value`, `created_at`, `updated_at`) VALUES
(1, 'data_types', 'display_name_singular', 5, 'pt', 'Post', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(2, 'data_types', 'display_name_singular', 6, 'pt', 'Página', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(3, 'data_types', 'display_name_singular', 1, 'pt', 'Utilizador', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(4, 'data_types', 'display_name_singular', 4, 'pt', 'Categoria', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(5, 'data_types', 'display_name_singular', 2, 'pt', 'Menu', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(6, 'data_types', 'display_name_singular', 3, 'pt', 'Função', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(7, 'data_types', 'display_name_plural', 5, 'pt', 'Posts', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(8, 'data_types', 'display_name_plural', 6, 'pt', 'Páginas', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(9, 'data_types', 'display_name_plural', 1, 'pt', 'Utilizadores', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(10, 'data_types', 'display_name_plural', 4, 'pt', 'Categorias', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(11, 'data_types', 'display_name_plural', 2, 'pt', 'Menus', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(12, 'data_types', 'display_name_plural', 3, 'pt', 'Funções', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(13, 'categories', 'slug', 1, 'pt', 'categoria-1', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(14, 'categories', 'name', 1, 'pt', 'Categoria 1', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(15, 'categories', 'slug', 2, 'pt', 'categoria-2', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(16, 'categories', 'name', 2, 'pt', 'Categoria 2', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(17, 'pages', 'title', 1, 'pt', 'Olá Mundo', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(18, 'pages', 'slug', 1, 'pt', 'ola-mundo', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(19, 'pages', 'body', 1, 'pt', '<p>Olá Mundo. Scallywag grog swab Cat o\'nine tails scuttle rigging hardtack cable nipper Yellow Jack. Handsomely spirits knave lad killick landlubber or just lubber deadlights chantey pinnace crack Jennys tea cup. Provost long clothes black spot Yellow Jack bilged on her anchor league lateen sail case shot lee tackle.</p>\r\n<p>Ballast spirits fluke topmast me quarterdeck schooner landlubber or just lubber gabion belaying pin. Pinnace stern galleon starboard warp carouser to go on account dance the hempen jig jolly boat measured fer yer chains. Man-of-war fire in the hole nipperkin handsomely doubloon barkadeer Brethren of the Coast gibbet driver squiffy.</p>', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(20, 'menu_items', 'title', 1, 'pt', 'Painel de Controle', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(21, 'menu_items', 'title', 2, 'pt', 'Media', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(22, 'menu_items', 'title', 13, 'pt', 'Publicações', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(23, 'menu_items', 'title', 3, 'pt', 'Utilizadores', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(24, 'menu_items', 'title', 12, 'pt', 'Categorias', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(25, 'menu_items', 'title', 14, 'pt', 'Páginas', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(26, 'menu_items', 'title', 4, 'pt', 'Funções', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(27, 'menu_items', 'title', 5, 'pt', 'Ferramentas', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(28, 'menu_items', 'title', 6, 'pt', 'Menus', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(29, 'menu_items', 'title', 7, 'pt', 'Base de dados', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(30, 'menu_items', 'title', 10, 'pt', 'Configurações', '2019-03-10 11:47:41', '2019-03-10 11:47:41'),
(31, 'data_types', 'display_name_singular', 9, 'ar', 'Country', '2019-03-10 12:05:13', '2019-03-10 12:05:13'),
(32, 'data_types', 'display_name_plural', 9, 'ar', 'Countries', '2019-03-10 12:05:13', '2019-03-10 12:05:13'),
(33, 'data_types', 'display_name_singular', 14, 'ar', 'Hall', '2019-03-10 12:05:36', '2019-03-10 12:05:36'),
(34, 'data_types', 'display_name_plural', 14, 'ar', 'Halls', '2019-03-10 12:05:36', '2019-03-10 12:05:36'),
(35, 'data_types', 'display_name_singular', 8, 'ar', 'Occasion', '2019-03-10 12:05:44', '2019-03-10 12:05:44'),
(36, 'data_types', 'display_name_plural', 8, 'ar', 'Occasions', '2019-03-10 12:05:44', '2019-03-10 12:05:44'),
(37, 'data_types', 'display_name_singular', 12, 'ar', 'State', '2019-03-10 12:06:57', '2019-03-10 12:06:57'),
(38, 'data_types', 'display_name_plural', 12, 'ar', 'States', '2019-03-10 12:06:57', '2019-03-10 12:06:57'),
(39, 'countries', 'name', 1, 'ar', 'السعودية', '2019-03-10 12:10:05', '2019-03-10 12:49:07'),
(40, 'occasions', 'name', 1, 'ar', 'زواج', '2019-03-10 12:13:03', '2019-03-10 12:31:06'),
(41, 'data_types', 'display_name_singular', 15, 'ar', 'City', '2019-03-10 12:14:11', '2019-03-10 12:14:11'),
(42, 'data_types', 'display_name_plural', 15, 'ar', 'Cities', '2019-03-10 12:14:11', '2019-03-10 12:14:11'),
(43, 'cities', 'name', 1, 'ar', 'مدينه1', '2019-03-10 12:15:23', '2019-03-10 12:48:34'),
(44, 'states', 'name', 1, 'ar', 'منطقه1', '2019-03-10 12:48:55', '2019-03-17 00:07:24'),
(45, 'conditions', 'condition', 1, 'ar', 'شرط', '2019-03-10 13:52:23', '2019-03-10 13:52:23'),
(46, 'conditions', 'condition', 2, 'ar', 'شرط2', '2019-03-10 13:52:32', '2019-03-10 13:52:32'),
(47, 'menu_items', 'title', 25, 'ar', 'التحكم', '2019-03-10 21:39:47', '2019-03-12 20:26:51'),
(48, 'rhythms', 'name', 1, 'ar', 'شباب عده', '2019-03-10 21:41:20', '2019-03-10 21:41:20'),
(49, 'rhythms', 'name', 2, 'ar', 'ايقاعات عادية', '2019-03-10 21:41:50', '2019-03-10 21:41:50'),
(50, 'machines', 'name', 1, 'ar', 'عازف عود', '2019-03-10 21:42:14', '2019-03-10 21:42:14'),
(51, 'machines', 'name', 2, 'ar', 'عازف اورج', '2019-03-10 21:42:32', '2019-03-10 21:42:32'),
(52, 'halls', 'name', 1, 'ar', 'قاعه1', '2019-03-12 18:54:25', '2019-03-12 18:54:25'),
(53, 'halls', 'name', 2, 'ar', 'قاعه2', '2019-03-12 18:54:41', '2019-03-12 18:54:41'),
(54, 'menu_items', 'title', 3, 'ar', 'الاعضاء', '2019-03-12 20:17:18', '2019-03-14 16:36:05'),
(55, 'menu_items', 'title', 26, 'ar', 'الاسعار المتاحة', '2019-03-12 20:18:29', '2019-03-12 20:25:51'),
(56, 'menu_items', 'title', 15, 'ar', 'المناسبات', '2019-03-12 20:19:25', '2019-03-12 20:22:44'),
(57, 'menu_items', 'title', 16, 'ar', 'الدول', '2019-03-12 20:19:50', '2019-03-12 20:23:51'),
(58, 'menu_items', 'title', 19, 'ar', 'المناطق', '2019-03-12 20:20:00', '2019-03-12 20:24:04'),
(59, 'menu_items', 'title', 20, 'ar', 'القاعات', '2019-03-12 20:20:24', '2019-03-12 20:24:43'),
(60, 'menu_items', 'title', 21, 'ar', 'المدن', '2019-03-12 20:20:39', '2019-03-12 20:24:18'),
(61, 'menu_items', 'title', 22, 'ar', 'شروط العقد', '2019-03-12 20:21:09', '2019-03-12 20:24:55'),
(62, 'menu_items', 'title', 23, 'ar', 'الإيقاعات', '2019-03-12 20:21:29', '2019-03-12 20:25:20'),
(63, 'menu_items', 'title', 24, 'ar', 'آلات', '2019-03-12 20:22:15', '2019-03-12 20:25:38'),
(64, 'menu_items', 'title', 1, 'ar', 'الرئيسية', '2019-03-14 16:35:43', '2019-03-14 16:35:43'),
(65, 'menu_items', 'title', 4, 'ar', 'الصلاحيات', '2019-03-14 16:35:55', '2019-03-14 16:35:55'),
(66, 'menu_items', 'title', 2, 'ar', 'مكتبة الصور', '2019-03-14 16:36:18', '2019-03-14 16:36:18'),
(67, 'menu_items', 'title', 5, 'ar', 'الادوات', '2019-03-14 16:36:31', '2019-03-14 16:36:31'),
(68, 'menu_items', 'title', 6, 'ar', 'بناء القائمة', '2019-03-14 16:36:50', '2019-03-14 16:36:50'),
(69, 'menu_items', 'title', 10, 'ar', 'الاعدادات', '2019-03-14 16:37:12', '2019-03-14 16:37:12'),
(70, 'data_types', 'display_name_singular', 21, 'ar', 'Order', '2019-03-16 16:45:42', '2019-03-16 16:45:42'),
(71, 'data_types', 'display_name_plural', 21, 'ar', 'Orders', '2019-03-16 16:45:42', '2019-03-16 16:45:42'),
(72, 'menu_items', 'title', 27, 'ar', 'الحجوزات', '2019-03-17 00:14:40', '2019-03-17 00:14:40'),
(73, 'banks', 'bank_name', 1, 'ar', 'مصرف الراجحي', '2019-03-19 17:34:43', '2019-03-19 17:34:43'),
(74, 'menu_items', 'title', 28, 'ar', 'الحسابات البنكية المتاحة', '2019-03-19 17:54:02', '2019-03-19 17:54:21'),
(79, 'menu_items', 'title', 30, 'ar', 'الافراح الماجلة', '2019-03-21 19:04:39', '2019-04-03 15:42:57'),
(80, 'data_types', 'display_name_singular', 1, 'ar', 'User', '2019-03-21 19:22:41', '2019-03-21 19:22:41'),
(81, 'data_types', 'display_name_plural', 1, 'ar', 'Users', '2019-03-21 19:22:41', '2019-03-21 19:22:41'),
(82, 'menu_items', 'title', 13, 'ar', 'المقالات', '2019-03-21 23:37:58', '2019-03-21 23:37:58'),
(83, 'menu_items', 'title', 14, 'ar', 'الصفحات', '2019-03-21 23:38:09', '2019-03-21 23:38:09'),
(84, 'menu_items', 'title', 12, 'ar', 'الاقسام', '2019-03-21 23:38:21', '2019-03-21 23:38:21'),
(85, 'data_types', 'display_name_singular', 24, 'ar', 'Groom', '2019-04-03 12:17:52', '2019-04-03 12:17:52'),
(86, 'data_types', 'display_name_plural', 24, 'ar', 'Grooms', '2019-04-03 12:17:52', '2019-04-03 12:17:52'),
(87, 'menu_items', 'title', 29, 'ar', 'العرسان المضافة حديثا', '2019-04-03 15:44:03', '2019-04-03 15:44:03'),
(88, 'menu_items', 'title', 31, 'ar', 'العقود المغلقة', '2019-04-03 16:31:59', '2019-04-03 16:33:00'),
(89, 'menu_items', 'title', 32, 'ar', 'العقود الملغاه', '2019-04-03 20:57:54', '2019-04-03 20:57:54');
-- --------------------------------------------------------
--
-- Table structure for table `tunes`
--
CREATE TABLE `tunes` (
`id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`role_id` bigint(20) UNSIGNED DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`avatar` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT 'users/default.png',
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`settings` text COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`singer_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `role_id`, `name`, `email`, `avatar`, `email_verified_at`, `password`, `phone`, `remember_token`, `settings`, `created_at`, `updated_at`, `singer_id`) VALUES
(2, 3, 'hisham', 'myhishamad2@gmail.com', 'users/March2019/vUxJ1H65SAwyLNYdbzWt.png', NULL, '$2y$10$KTN5dP05XKBmM6tnDgj8TOAJaBh3HjmaNFk0H6lzwO1eYqaeWnGYq', '966580621314', 'CHkGUGPnayedvFAlzUJQCro1NO7S7zWg2tfZ8lIsdLYgX7eqNQtmnmdlH8fj', '{\"locale\":null}', '2019-03-10 12:03:57', '2019-03-17 09:44:42', NULL),
(3, 1, 'admin', 'admin@admin.com', 'users/March2019/PNMPkrBQMHT2KK0tvVGn.png', NULL, '$2y$10$XRQYqdVk7JFwCUvkz4VG4eOi8euVPrgkfyrmkTZB7kv/5tps7wFyG', '966580621314', 'b1JjYbcNHTlteDGmao2SkU776Itxocg4vzjiotra58kVzSrh3fBLkZHWvZHC', '{\"locale\":null}', '2019-03-14 16:33:37', '2019-03-17 09:44:30', NULL),
(4, 4, 'singer', 'singer@gmail.com', 'users/March2019/hJShgXiplLB3Vum7wqBe.png', NULL, '$2y$10$By0GlEhhv0J70onu0LDE0OBsB7PmMqqzfc9sLY0mfl8JGenn2Hlea', NULL, 'cyeecnarESWKFnBjXsEnZcV2uuo5K6Md3VZ2Qi1idG3vttIkv1I565tIv1eZ', '{\"locale\":\"en\"}', '2019-03-21 19:01:43', '2019-04-03 20:23:16', 4),
(5, 5, 'moder gded', 'modrator@gmail.com', 'users/default.png', NULL, '$2y$10$rgZzg4T6Il8uvmNbLvKy4elbELP0oGO6CNLX0CdUP1LR.Qu9tCowq', '966580621314', 'seWE8B8zeGwAOYBV5K1wfhZrmL0bGsT8UwIYnzT7Db6faPoTN7HZ6ZHYkvVJ', '{\"locale\":null}', '2019-03-21 19:36:50', '2019-03-21 19:36:50', 4),
(8, 5, 'modrator2', 'modrator2@gmail.com', 'users/default.png', NULL, '$2y$10$gDjKmgiqJ1ZuTaCFsO76DeQcwTFlmdqYzVchrnfd1ouNFqf2cpW/.', '966580621314', NULL, '{\"locale\":null}', '2019-03-22 18:04:20', '2019-03-22 18:04:20', 4),
(10, 5, 'modrator3', 'modrator3@gmail.com', 'users/default.png', NULL, '$2y$10$0bqN/IIfsmqwii4DgDW4Y.6nlOglZCQ53wTQ3NWSDElSD5BgH2Zau', '966580621314', NULL, '{\"locale\":null}', '2019-03-22 18:08:09', '2019-03-22 18:08:09', 4),
(11, 4, 'مطرب2', 'singer2@gmail.com', 'users/default.png', NULL, '$2y$10$QS/HMB4sSHXm3G2uGVuLOeM9hJFmXsxj/E1dhL6O7ZaZjcvAIN0Ya', NULL, NULL, '{\"locale\":null}', '2019-04-03 20:23:44', '2019-04-03 20:23:44', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `user_roles`
--
CREATE TABLE `user_roles` (
`user_id` int(10) UNSIGNED NOT NULL,
`role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `banks`
--
ALTER TABLE `banks`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `categories_slug_unique` (`slug`),
ADD KEY `categories_parent_id_foreign` (`parent_id`);
--
-- Indexes for table `cities`
--
ALTER TABLE `cities`
ADD PRIMARY KEY (`id`),
ADD KEY `cities_country_id_foreign` (`country_id`);
--
-- Indexes for table `conditions`
--
ALTER TABLE `conditions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `contacts`
--
ALTER TABLE `contacts`
ADD PRIMARY KEY (`id`),
ADD KEY `contacts_order_id_foreign` (`order_id`);
--
-- Indexes for table `countries`
--
ALTER TABLE `countries`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `data_rows`
--
ALTER TABLE `data_rows`
ADD PRIMARY KEY (`id`),
ADD KEY `data_rows_data_type_id_foreign` (`data_type_id`);
--
-- Indexes for table `data_types`
--
ALTER TABLE `data_types`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `data_types_name_unique` (`name`),
ADD UNIQUE KEY `data_types_slug_unique` (`slug`);
--
-- Indexes for table `grooms`
--
ALTER TABLE `grooms`
ADD PRIMARY KEY (`id`),
ADD KEY `grooms_order_id_foreign` (`order_id`);
--
-- Indexes for table `halls`
--
ALTER TABLE `halls`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `machines`
--
ALTER TABLE `machines`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `menus`
--
ALTER TABLE `menus`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `menus_name_unique` (`name`);
--
-- Indexes for table `menu_items`
--
ALTER TABLE `menu_items`
ADD PRIMARY KEY (`id`),
ADD KEY `menu_items_menu_id_foreign` (`menu_id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `modrators`
--
ALTER TABLE `modrators`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `occasions`
--
ALTER TABLE `occasions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`id`),
ADD KEY `orders_user_id_foreign` (`user_id`),
ADD KEY `orders_country_id_foreign` (`country_id`),
ADD KEY `orders_city_id_foreign` (`city_id`),
ADD KEY `orders_state_id_foreign` (`state_id`),
ADD KEY `orders_tune_id_foreign` (`tune_id`);
--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `pages_slug_unique` (`slug`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
ADD PRIMARY KEY (`id`),
ADD KEY `permissions_key_index` (`key`);
--
-- Indexes for table `permission_role`
--
ALTER TABLE `permission_role`
ADD PRIMARY KEY (`permission_id`,`role_id`),
ADD KEY `permission_role_permission_id_index` (`permission_id`),
ADD KEY `permission_role_role_id_index` (`role_id`);
--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `posts_slug_unique` (`slug`);
--
-- Indexes for table `prices`
--
ALTER TABLE `prices`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `remittances`
--
ALTER TABLE `remittances`
ADD PRIMARY KEY (`id`),
ADD KEY `remittances_order_id_foreign` (`order_id`);
--
-- Indexes for table `rhythms`
--
ALTER TABLE `rhythms`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `roles_name_unique` (`name`);
--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `settings_key_unique` (`key`);
--
-- Indexes for table `states`
--
ALTER TABLE `states`
ADD PRIMARY KEY (`id`),
ADD KEY `states_country_id_foreign` (`country_id`),
ADD KEY `states_city_id_foreign` (`city_id`);
--
-- Indexes for table `translations`
--
ALTER TABLE `translations`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `translations_table_name_column_name_foreign_key_locale_unique` (`table_name`,`column_name`,`foreign_key`,`locale`);
--
-- Indexes for table `tunes`
--
ALTER TABLE `tunes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`),
ADD KEY `users_role_id_foreign` (`role_id`);
--
-- Indexes for table `user_roles`
--
ALTER TABLE `user_roles`
ADD PRIMARY KEY (`user_id`,`role_id`),
ADD KEY `user_roles_user_id_index` (`user_id`),
ADD KEY `user_roles_role_id_index` (`role_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `banks`
--
ALTER TABLE `banks`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `cities`
--
ALTER TABLE `cities`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `conditions`
--
ALTER TABLE `conditions`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `contacts`
--
ALTER TABLE `contacts`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `countries`
--
ALTER TABLE `countries`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `data_rows`
--
ALTER TABLE `data_rows`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=206;
--
-- AUTO_INCREMENT for table `data_types`
--
ALTER TABLE `data_types`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `grooms`
--
ALTER TABLE `grooms`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `halls`
--
ALTER TABLE `halls`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `machines`
--
ALTER TABLE `machines`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `menus`
--
ALTER TABLE `menus`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `menu_items`
--
ALTER TABLE `menu_items`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;
--
-- AUTO_INCREMENT for table `modrators`
--
ALTER TABLE `modrators`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `occasions`
--
ALTER TABLE `occasions`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;
--
-- AUTO_INCREMENT for table `pages`
--
ALTER TABLE `pages`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=102;
--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `prices`
--
ALTER TABLE `prices`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `remittances`
--
ALTER TABLE `remittances`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `rhythms`
--
ALTER TABLE `rhythms`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT for table `states`
--
ALTER TABLE `states`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `translations`
--
ALTER TABLE `translations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=90;
--
-- AUTO_INCREMENT for table `tunes`
--
ALTER TABLE `tunes`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
ADD CONSTRAINT `categories_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `cities`
--
ALTER TABLE `cities`
ADD CONSTRAINT `cities_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `contacts`
--
ALTER TABLE `contacts`
ADD CONSTRAINT `contacts_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `data_rows`
--
ALTER TABLE `data_rows`
ADD CONSTRAINT `data_rows_data_type_id_foreign` FOREIGN KEY (`data_type_id`) REFERENCES `data_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `grooms`
--
ALTER TABLE `grooms`
ADD CONSTRAINT `grooms_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `menu_items`
--
ALTER TABLE `menu_items`
ADD CONSTRAINT `menu_items_menu_id_foreign` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
ADD CONSTRAINT `orders_city_id_foreign` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `orders_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `orders_state_id_foreign` FOREIGN KEY (`state_id`) REFERENCES `states` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `orders_tune_id_foreign` FOREIGN KEY (`tune_id`) REFERENCES `tunes` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `permission_role`
--
ALTER TABLE `permission_role`
ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `remittances`
--
ALTER TABLE `remittances`
ADD CONSTRAINT `remittances_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `states`
--
ALTER TABLE `states`
ADD CONSTRAINT `states_city_id_foreign` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `states_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `users`
--
ALTER TABLE `users`
ADD CONSTRAINT `users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`);
--
-- Constraints for table `user_roles`
--
ALTER TABLE `user_roles`
ADD CONSTRAINT `user_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `user_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
/*!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 */;
| 50.893189
| 1,405
| 0.637153
|
e292ee496ab22ab65d70d9b09dc0649f94e63998
| 569
|
py
|
Python
|
pydsm/composition.py
|
jimmycallin/pydsm
|
3f8a6fc1492702dc265be09f8d60b1512c976f7f
|
[
"Apache-2.0"
] | 84
|
2015-03-05T12:27:41.000Z
|
2020-10-21T11:04:52.000Z
|
pydsm/composition.py
|
jimmycallin/pydsm
|
3f8a6fc1492702dc265be09f8d60b1512c976f7f
|
[
"Apache-2.0"
] | 2
|
2017-12-21T11:22:52.000Z
|
2019-12-12T18:01:08.000Z
|
pydsm/composition.py
|
jimmycallin/pydsm
|
3f8a6fc1492702dc265be09f8d60b1512c976f7f
|
[
"Apache-2.0"
] | 15
|
2015-03-24T08:48:27.000Z
|
2019-12-10T01:56:39.000Z
|
from pydsm.indexmatrix import IndexMatrix
def linear_additive(v1, v2, alpha=0.5, beta=0.5):
"""
Weighted elementwise addition.
"""
compword = str(v1.row2word[0]) + " " + str(v2.row2word[0])
comp = (alpha * v1) + (beta * v2)
comp.row2word = [compword]
return comp
def multiplicative(v1, v2, alpha=1, beta=1):
"""
Weighted elementwise multiplication.
"""
compword = str(v1.row2word[0]) + " " + str(v2.row2word[0])
comp = (alpha * v1) * (beta * v2)
comp.row2word = [compword]
return comp
__dsm__ = ['compose']
| 22.76
| 62
| 0.604569
|
bfe1e47ec69a67d445405b5225e8928eec9ce61c
| 16,004
|
sql
|
SQL
|
packaging/dbscripts/audit_log_sp.sql
|
hbraha/ovirt-engine
|
a6c17bd73d510d6b44ac72000c0ff686b484746c
|
[
"Apache-2.0"
] | 347
|
2015-01-20T14:13:21.000Z
|
2022-03-31T17:53:11.000Z
|
packaging/dbscripts/audit_log_sp.sql
|
hbraha/ovirt-engine
|
a6c17bd73d510d6b44ac72000c0ff686b484746c
|
[
"Apache-2.0"
] | 128
|
2015-05-22T19:14:32.000Z
|
2022-03-31T08:11:18.000Z
|
packaging/dbscripts/audit_log_sp.sql
|
hbraha/ovirt-engine
|
a6c17bd73d510d6b44ac72000c0ff686b484746c
|
[
"Apache-2.0"
] | 202
|
2015-01-04T06:20:49.000Z
|
2022-03-08T15:30:08.000Z
|
----------------------------------------------------------------
-- [audit_log] Table
--
CREATE OR REPLACE FUNCTION InsertAuditLog (
INOUT v_audit_log_id BIGINT,
v_log_time TIMESTAMP WITH TIME ZONE,
v_log_type INT,
v_log_type_name VARCHAR(100),
v_severity INT,
v_message TEXT,
v_user_id UUID,
v_user_name VARCHAR(255),
v_vds_id UUID,
v_vds_name VARCHAR(255),
v_vm_id UUID,
v_vm_name VARCHAR(255),
v_vm_template_id UUID,
v_vm_template_name VARCHAR(40),
v_storage_pool_id UUID,
v_storage_pool_name VARCHAR(40),
v_storage_domain_id UUID,
v_storage_domain_name VARCHAR(250),
v_cluster_id UUID,
v_cluster_name VARCHAR(255),
v_quota_id UUID,
v_quota_name VARCHAR(60),
v_correlation_id VARCHAR(50),
v_job_id UUID,
v_gluster_volume_id UUID,
v_gluster_volume_name VARCHAR(1000),
v_call_stack TEXT,
v_repeatable BOOLEAN,
v_brick_id UUID,
v_brick_path TEXT,
v_origin VARCHAR(25),
v_custom_event_id INT,
v_event_flood_in_sec INT,
v_custom_data TEXT
) AS $PROCEDURE$
DECLARE v_min_alert_severity INT;
BEGIN
v_min_alert_severity := 10;
-- insert regular log messages (non alerts)
IF (v_severity < v_min_alert_severity) THEN
INSERT INTO audit_log (
LOG_TIME,
log_type,
log_type_name,
severity,
message,
user_id,
user_name,
vds_id,
vds_name,
vm_id,
vm_name,
vm_template_id,
vm_template_name,
storage_pool_id,
storage_pool_name,
storage_domain_id,
storage_domain_name,
cluster_id,
cluster_name,
correlation_id,
job_id,
quota_id,
quota_name,
gluster_volume_id,
gluster_volume_name,
call_stack,
brick_id,
brick_path,
origin,
custom_event_id,
event_flood_in_sec,
custom_data
)
VALUES (
v_log_time,
v_log_type,
v_log_type_name,
v_severity,
v_message,
v_user_id,
v_user_name,
v_vds_id,
v_vds_name,
v_vm_id,
v_vm_name,
v_vm_template_id,
v_vm_template_name,
v_storage_pool_id,
v_storage_pool_name,
v_storage_domain_id,
v_storage_domain_name,
v_cluster_id,
v_cluster_name,
v_correlation_id,
v_job_id,
v_quota_id,
v_quota_name,
v_gluster_volume_id,
v_gluster_volume_name,
v_call_stack,
v_brick_id,
v_brick_path,
v_origin,
v_custom_event_id,
v_event_flood_in_sec,
v_custom_data
);
v_audit_log_id := CURRVAL('audit_log_seq');
ELSE IF (
v_repeatable
OR NOT EXISTS (
SELECT audit_log_id
FROM audit_log
WHERE vds_name = v_vds_name
AND log_type = v_log_type
AND NOT deleted
)
) THEN
INSERT INTO audit_log (
LOG_TIME,
log_type,
log_type_name,
severity,
message,
user_id,
user_name,
vds_id,
vds_name,
vm_id,
vm_name,
vm_template_id,
vm_template_name,
storage_pool_id,
storage_pool_name,
storage_domain_id,
storage_domain_name,
cluster_id,
cluster_name,
correlation_id,
job_id,
quota_id,
quota_name,
gluster_volume_id,
gluster_volume_name,
call_stack,
brick_id,
brick_path,
origin,
custom_event_id,
event_flood_in_sec,
custom_data
)
VALUES (
v_log_time,
v_log_type,
v_log_type_name,
v_severity,
v_message,
v_user_id,
v_user_name,
v_vds_id,
v_vds_name,
v_vm_id,
v_vm_name,
v_vm_template_id,
v_vm_template_name,
v_storage_pool_id,
v_storage_pool_name,
v_storage_domain_id,
v_storage_domain_name,
v_cluster_id,
v_cluster_name,
v_correlation_id,
v_job_id,
v_quota_id,
v_quota_name,
v_gluster_volume_id,
v_gluster_volume_name,
v_call_stack,
v_brick_id,
v_brick_path,
v_origin,
v_custom_event_id,
v_event_flood_in_sec,
v_custom_data
);
v_audit_log_id := CURRVAL('audit_log_seq');
ELSE
SELECT audit_log_id
INTO v_audit_log_id
FROM audit_log
WHERE vds_name = v_vds_name
AND log_type = v_log_type;
END IF;
END IF;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION DeleteAuditLog (v_audit_log_id BIGINT)
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = true
WHERE audit_log_id = v_audit_log_id;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION ClearAllAuditLogEvents (v_severity INT)
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = true
FROM ( SELECT * FROM audit_log
WHERE severity != v_severity
AND NOT deleted
FOR UPDATE) AS s
WHERE audit_log.audit_log_id = s.audit_log_id;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION DisplayAllAuditLogEvents (v_severity INT)
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = false
FROM ( SELECT * FROM audit_log
WHERE severity != v_severity
AND deleted
FOR UPDATE) AS s
WHERE audit_log.audit_log_id = s.audit_log_id;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION SetAllAuditLogAlerts (
v_severity INT,
v_value BOOLEAN
)
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = v_value
FROM ( SELECT * FROM audit_log
WHERE severity = v_severity
AND deleted != v_value
FOR UPDATE) AS s
WHERE audit_log.audit_log_id = s.audit_log_id;
END;$PROCEDURE$
LANGUAGE plpgsql;
-- Returns the events for which the user has direct permissions on
-- If the user has permissions only on a VM, the user will see only events for this VM
-- If the user has permissions on a cluster, he will see events from the cluster, the hosts and the VMS in the cluster
-- because each event has the cluster id of the entity that generates the event and we check to see if the user has
-- permissions on the cluster using the column cluster_id. Same holds true for data center
CREATE OR REPLACE FUNCTION GetAllFromAuditLog (
v_user_id UUID,
v_is_filtered BOOLEAN
)
RETURNS SETOF audit_log STABLE AS $PROCEDURE$
BEGIN
RETURN QUERY
SELECT *
FROM audit_log a
WHERE NOT deleted
AND (
NOT v_is_filtered
OR EXISTS (
SELECT 1
FROM user_vm_permissions_view pv,
user_object_permissions_view dpv
WHERE pv.user_id = v_user_id
AND pv.entity_id = a.vm_id
AND pv.entity_id = dpv.entity_id
)
OR EXISTS (
SELECT 1
FROM user_vm_template_permissions_view pv,
user_object_permissions_view dpv
WHERE pv.user_id = v_user_id
AND pv.entity_id = a.vm_template_id
AND pv.entity_id = dpv.entity_id
)
OR EXISTS (
SELECT 1
FROM user_vds_permissions_view pv,
user_object_permissions_view dpv
WHERE pv.user_id = v_user_id
AND pv.entity_id = a.vds_id
AND pv.entity_id = dpv.entity_id
)
OR EXISTS (
SELECT 1
FROM user_storage_pool_permissions_view pv,
user_object_permissions_view dpv
WHERE pv.user_id = v_user_id
AND pv.entity_id = a.storage_pool_id
AND pv.entity_id = dpv.entity_id
)
OR EXISTS (
SELECT 1
FROM user_storage_domain_permissions_view pv,
user_object_permissions_view dpv
WHERE pv.user_id = v_user_id
AND pv.entity_id = a.storage_domain_id
AND pv.entity_id = dpv.entity_id
)
OR EXISTS (
SELECT 1
FROM user_cluster_permissions_view pv,
user_object_permissions_view dpv
WHERE pv.user_id = v_user_id
AND pv.entity_id = a.cluster_id
AND pv.entity_id = dpv.entity_id
)
)
ORDER BY audit_log_id DESC;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION GetAuditLogByAuditLogId (v_audit_log_id BIGINT)
RETURNS SETOF audit_log STABLE AS $PROCEDURE$
BEGIN
RETURN QUERY
SELECT *
FROM audit_log
WHERE audit_log_id = v_audit_log_id;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION GetAuditLogByVMId (
v_vm_id UUID,
v_user_id UUID,
v_is_filtered BOOLEAN
)
RETURNS SETOF audit_log STABLE AS $PROCEDURE$
BEGIN
RETURN QUERY
SELECT *
FROM audit_log
WHERE NOT deleted
AND vm_id = v_vm_id
AND (
NOT v_is_filtered
OR EXISTS (
SELECT 1
FROM user_vm_permissions_view
WHERE user_id = v_user_id
AND entity_id = vm_id
)
);
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION GetAuditLogByVMTemplateId (
v_vm_template_id UUID,
v_user_id UUID,
v_is_filtered BOOLEAN
)
RETURNS SETOF audit_log STABLE AS $PROCEDURE$
BEGIN
RETURN QUERY
SELECT *
FROM audit_log
WHERE NOT deleted
AND vm_template_id = v_vm_template_id
AND (
NOT v_is_filtered
OR EXISTS (
SELECT 1
FROM user_vm_template_permissions_view
WHERE user_id = v_user_id
AND entity_id = vm_template_id
)
);
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION RemoveAuditLogByBrickIdLogType (
v_brick_id UUID,
v_audit_log_type INT
)
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = true
WHERE brick_id = v_brick_id
AND log_type = v_audit_log_type;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION GetAuditLogLaterThenDate (v_date TIMESTAMP WITH TIME ZONE)
RETURNS SETOF audit_log STABLE AS $PROCEDURE$
BEGIN
RETURN QUERY
SELECT *
FROM audit_log
WHERE NOT deleted
AND LOG_TIME >= v_date;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION DeleteAuditLogOlderThenDate (v_date TIMESTAMP WITH TIME ZONE)
RETURNS VOID AS $PROCEDURE$
DECLARE v_id BIGINT;
SWV_RowCount INT;
BEGIN
-- get first the id from which to remove in order to use index
SELECT audit_log_id
INTO v_id
FROM audit_log
WHERE LOG_TIME < v_date
ORDER BY audit_log_id DESC LIMIT 1;
-- check if there are candidates to remove
GET DIAGNOSTICS SWV_RowCount = ROW_COUNT;
IF (SWV_RowCount > 0) THEN
DELETE
FROM audit_log
WHERE audit_log_id <= v_id;
END IF;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION DeleteAuditAlertLogByVdsIDAndType (
v_vds_id UUID,
v_log_type INT
)
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = true
WHERE vds_id = v_vds_id
AND log_type = v_log_type;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION DeleteBackupRelatedAlerts ()
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = true
WHERE origin = 'oVirt'
AND log_type IN (
9022,
9023,
9026
);-- (ENGINE_NO_FULL_BACKUP, ENGINE_NO_WARM_BACKUP, ENGINE_BACKUP_FAILED)
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION DeleteAuditAlertLogByVolumeIDAndType (
v_gluster_volume_id UUID,
v_log_type INT
)
RETURNS VOID AS $PROCEDURE$
BEGIN
UPDATE audit_log
SET deleted = true
WHERE gluster_volume_id = v_gluster_volume_id
AND log_type = v_log_type;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION DeleteAuditLogAlertsByVdsID (
v_vds_id UUID,
v_delete_config_alerts BOOLEAN = true
)
RETURNS VOID AS $PROCEDURE$
DECLARE v_min_alert_severity INT;
v_no_config_alret_type INT;
v_no_max_alret_type INT;
BEGIN
v_min_alert_severity := 10;
v_no_config_alret_type := 9000;
v_no_max_alret_type := 9005;
IF (v_delete_config_alerts = true) THEN
UPDATE audit_log
SET deleted = true
WHERE vds_id = v_vds_id
AND severity >= v_min_alert_severity
AND log_type BETWEEN v_no_config_alret_type
AND v_no_max_alret_type;
ELSE
UPDATE audit_log
SET deleted = true
WHERE vds_id = v_vds_id
AND severity >= v_min_alert_severity
AND log_type BETWEEN v_no_config_alret_type + 1
AND v_no_max_alret_type;
END
IF ;END;$PROCEDURE$
LANGUAGE plpgsql;
/*
Used to find out how many seconds to wait after Start/Stop/Restart PM operations
v_vds_name - The host name
v_event - The event [USER_VDS_STOP | USER_VDS_START | USER_VDS_RESTART]
v_wait_for_sec - Configurable time in seconds to wait from last operation.
Returns : The number of seconds we have to wait (negative value means we can do the operation immediately)
*/
CREATE OR REPLACE FUNCTION get_seconds_to_wait_before_pm_operation (
v_vds_name VARCHAR(255),
v_event VARCHAR(100),
v_wait_for_sec INT
)
RETURNS INT STABLE AS $PROCEDURE$
DECLARE v_last_event_dt TIMESTAMP
WITH TIME zone;
DECLARE v_now_dt TIMESTAMP
WITH TIME zone;
BEGIN
IF EXISTS (
SELECT 1
FROM audit_log
WHERE vds_name = v_vds_name
AND log_type_name = v_event
) THEN
BEGIN
v_last_event_dt := log_time
FROM audit_log
WHERE vds_name = v_vds_name
AND log_type_name = v_event
ORDER BY audit_log_id DESC limit 1;
v_now_dt := CURRENT_TIMESTAMP;
RETURN cast((extract(epoch FROM v_last_event_dt) + v_wait_for_sec) - extract(epoch FROM v_now_dt) AS INT);
END;
ELSE
RETURN 0;
END
IF ;END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION GetAuditLogByOriginAndCustomEventId (
v_origin VARCHAR(255),
v_custom_event_id INT
)
RETURNS SETOF audit_log STABLE AS $PROCEDURE$
BEGIN
RETURN QUERY
SELECT *
FROM audit_log
WHERE origin = v_origin
AND custom_event_id = v_custom_event_id;
END;$PROCEDURE$
LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION GetAuditLogByVolumeIdAndType (
v_gluster_volume_id UUID,
v_log_type INT
)
RETURNS SETOF audit_log STABLE AS $PROCEDURE$
BEGIN
RETURN QUERY
SELECT *
FROM audit_log
WHERE gluster_volume_id = v_gluster_volume_id
AND log_type = v_log_type;
END;$PROCEDURE$
LANGUAGE plpgsql;
| 26.54063
| 118
| 0.605161
|
3489eeb907d264fac8e508d6b8f356939e49e14b
| 6,062
|
swift
|
Swift
|
SpaceX/ViewControllers/LaunchesViewController.swift
|
brunoguedes/SpaceX
|
c81d3fc7d5171203351357e986303dfdbe34e9d5
|
[
"MIT"
] | null | null | null |
SpaceX/ViewControllers/LaunchesViewController.swift
|
brunoguedes/SpaceX
|
c81d3fc7d5171203351357e986303dfdbe34e9d5
|
[
"MIT"
] | null | null | null |
SpaceX/ViewControllers/LaunchesViewController.swift
|
brunoguedes/SpaceX
|
c81d3fc7d5171203351357e986303dfdbe34e9d5
|
[
"MIT"
] | null | null | null |
//
// LaunchesViewController.swift
// SpaceX
//
// Created by Bruno Guedes on 20/10/19.
// Copyright © 2019 Bruno Guedes. All rights reserved.
//
import UIKit
import RxSwift
import RxCocoa
import RxDataSources
class LaunchesViewController: UIViewController {
private enum Constants {
static let title = NSLocalizedString("SpaceX Launches", comment: "LaunchesViewController Title")
static let sortByDateText = NSLocalizedString("Sort by Date", comment: "Sort by date segment control text")
static let sortByMissionNameText = NSLocalizedString("Sort by Mission Name", comment: "Sort by date segment control text")
static let noFilterText = NSLocalizedString("All Launches", comment: "No filter segment control text")
static let filterSuccessfulText = NSLocalizedString("Only Successful", comment: "Filter successful segment control text")
}
private let disposeBag = DisposeBag()
private let spaceXService: SpaceXService
private let launchSelectionHandler: (Int) -> Void
private let controlsView = UIView()
private let sortingSegmentedControl = UISegmentedControl(items: [Constants.sortByDateText, Constants.sortByMissionNameText])
private let filteringingSegmentedControl = UISegmentedControl(items: [Constants.noFilterText, Constants.filterSuccessfulText])
private let tableView = UITableView()
private let spinnerView = UIActivityIndicatorView(style: .large)
private let viewModel: LaunchesViewModel
private let launches: Observable<Launches>
private let filterOnlySuccessful = false
private let sortedBy: LaunchesViewModel.SortBy = .date
init(spaceXService: SpaceXService = SpaceXService(), launchSelectionHandler: @escaping (Int) -> Void) {
self.spaceXService = spaceXService
self.launchSelectionHandler = launchSelectionHandler
let launches = spaceXService.getLaunches()
self.viewModel = LaunchesViewModel(
launches: launches,
onlySuccessful: filteringingSegmentedControl.rx.selectedSegmentIndex.asObservable().map { return $0 == 0 ? false : true },
sortedBy: sortingSegmentedControl.rx.selectedSegmentIndex.asObservable().map { return $0 == 0 ? .date : .missionName }
)
self.launches = launches
super.init(nibName: nil, bundle: nil)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
self.title = Constants.title
tableView.register(LaunchTableViewCell.self, forCellReuseIdentifier: LaunchTableViewCell.reuseIdentifier)
setupUI()
setupBindings()
}
func setupUI() {
let stackView = UIStackView(arrangedSubviews: [controlsView, tableView])
stackView.axis = .vertical
stackView.distribution = .fill
stackView.alignment = .center
stackView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(stackView)
controlsView.backgroundColor = .systemBackground
sortingSegmentedControl.selectedSegmentIndex = 0
filteringingSegmentedControl.selectedSegmentIndex = 0
let controlsStackView = UIStackView(arrangedSubviews: [sortingSegmentedControl, filteringingSegmentedControl])
controlsStackView.axis = .vertical
controlsStackView.distribution = .equalSpacing
controlsStackView.alignment = .center
controlsStackView.spacing = .spacing2x
controlsStackView.isLayoutMarginsRelativeArrangement = true
controlsStackView.directionalLayoutMargins = NSDirectionalEdgeInsets(top: .spacing3x, leading: .spacing3x, bottom: .spacing3x, trailing: .spacing3x)
controlsStackView.backgroundColor = .systemBackground
controlsView.addPinned(subView: controlsStackView)
spinnerView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(spinnerView)
NSLayoutConstraint.activate([
stackView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),
stackView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),
stackView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
stackView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
controlsView.widthAnchor.constraint(equalTo: stackView.widthAnchor),
tableView.widthAnchor.constraint(equalTo: stackView.widthAnchor),
spinnerView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
spinnerView.centerYAnchor.constraint(equalTo: view.centerYAnchor)
])
}
func setupBindings() {
let dataSource = RxTableViewSectionedReloadDataSource<SectionOfLaunches>(
configureCell: { dataSource, tableView, indexPath, item in
guard let cell = tableView.dequeueReusableCell(withIdentifier: LaunchTableViewCell.reuseIdentifier, for: indexPath) as? LaunchTableViewCell else {
fatalError()
}
cell.configure(launchViewModel: item)
return cell
})
dataSource.titleForHeaderInSection = { dataSource, index in
return dataSource.sectionModels[index].header
}
viewModel.launchesBasicInfoBySection
.bind(to: tableView.rx.items(dataSource: dataSource))
.disposed(by: disposeBag)
tableView.rx
.itemSelected
.map { indexPath in
return dataSource[indexPath].launch.flightNumber
}
.subscribe(onNext: { [weak self] flightNumber in
self?.launchSelectionHandler(flightNumber)
})
.disposed(by: disposeBag)
spaceXService.isLoading
.bind(to: spinnerView.rx.isAnimating)
.disposed(by: disposeBag)
}
}
| 44.903704
| 162
| 0.692016
|
58683b6ddeaba9a58a8c9ffaeed3d90a2f0a97a4
| 447
|
css
|
CSS
|
src/components/App/App.module.css
|
t-1000-t/resume-language
|
f2eceaf8e4bd4cf5cabf9c70c6971355fd8cb3c4
|
[
"MIT"
] | null | null | null |
src/components/App/App.module.css
|
t-1000-t/resume-language
|
f2eceaf8e4bd4cf5cabf9c70c6971355fd8cb3c4
|
[
"MIT"
] | null | null | null |
src/components/App/App.module.css
|
t-1000-t/resume-language
|
f2eceaf8e4bd4cf5cabf9c70c6971355fd8cb3c4
|
[
"MIT"
] | null | null | null |
.mainApp {
border-radius: 3px;
margin: 48px auto;
height: 100vh;
width: 96%;
/* box-shadow: -2px 2px 2px 0px rgba(0, 0, 0, 0.1); */
opacity: 1;
}
/* @media screen and (min-width: 600px) {
width: 88%;
}
@media screen and (min-width: 1024px) {
width: 70%;
} */
/* .mainApp.in-focus {
box-shadow: -48px 48px 48px 0px rgba(0, 0, 0, 0.1);
transition: all 250ms ease-in-out;
transform: translate(0, 0) scale(1);
opacity: 1;
} */
| 21.285714
| 56
| 0.60179
|
437230aed0c11a106ec9d0418b59abb5eaf784a6
| 314
|
ts
|
TypeScript
|
src/lib/compilers/snowpack.ts
|
Richienb/esm-lint
|
67cb3864e18dc2bad7783fd3041aafd0fdf93a7b
|
[
"MIT"
] | null | null | null |
src/lib/compilers/snowpack.ts
|
Richienb/esm-lint
|
67cb3864e18dc2bad7783fd3041aafd0fdf93a7b
|
[
"MIT"
] | 1
|
2020-01-20T08:31:53.000Z
|
2020-01-21T22:54:31.000Z
|
src/lib/compilers/snowpack.ts
|
Richienb/esm-lint
|
67cb3864e18dc2bad7783fd3041aafd0fdf93a7b
|
[
"MIT"
] | null | null | null |
import path from "path"
import { cli as snowpack } from "snowpack"
import fs from "fs-extra"
export = async ({ scriptFile, dir }: { scriptFile: string, dir: string }) => {
const pkgFile = path.join(dir, "package.json")
await fs.writeJSON(pkgFile, {})
await snowpack([scriptFile])
await fs.remove(pkgFile)
}
| 24.153846
| 78
| 0.691083
|
b13dfc15e24cc51236454a5a55dc09cf8149cb9b
| 767
|
dart
|
Dart
|
profile_repository/lib/src/model/deposit.dart
|
tommydprogrammer/flutter_packages
|
d751cea0433c4a2504446c3cec37e90fce15b59e
|
[
"MIT"
] | null | null | null |
profile_repository/lib/src/model/deposit.dart
|
tommydprogrammer/flutter_packages
|
d751cea0433c4a2504446c3cec37e90fce15b59e
|
[
"MIT"
] | null | null | null |
profile_repository/lib/src/model/deposit.dart
|
tommydprogrammer/flutter_packages
|
d751cea0433c4a2504446c3cec37e90fce15b59e
|
[
"MIT"
] | null | null | null |
import 'package:json_annotation/json_annotation.dart';
part 'deposit.g.dart';
@JsonSerializable(fieldRename: FieldRename.snake)
class Deposit {
final int? userId;
final String? amount;
final String? currency;
final String? trxRef;
final int? status;
final String? updatedAt;
final String? createdAt;
final int? id;
final String? wallet;
final String? txnId;
final String? statusUrl;
final String? amountToPay;
const Deposit({
this.userId,
this.amount,
this.currency,
this.trxRef,
this.status,
this.updatedAt,
this.createdAt,
this.id,
this.wallet,
this.txnId,
this.statusUrl,
this.amountToPay,
});
factory Deposit.fromJson(Map<String, dynamic> json) =>
_$DepositFromJson(json);
}
| 20.184211
| 56
| 0.6897
|
8d16afe03c1835d170fcc58252b9b0a498f5364c
| 10,182
|
dart
|
Dart
|
lib/icons/hardware_icons.dart
|
bwu-dart/bwu_ng_elements
|
0a9f7239433b4207763c320c11ae6e3029386979
|
[
"MIT"
] | null | null | null |
lib/icons/hardware_icons.dart
|
bwu-dart/bwu_ng_elements
|
0a9f7239433b4207763c320c11ae6e3029386979
|
[
"MIT"
] | null | null | null |
lib/icons/hardware_icons.dart
|
bwu-dart/bwu_ng_elements
|
0a9f7239433b4207763c320c11ae6e3029386979
|
[
"MIT"
] | null | null | null |
/// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
/// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
/// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
/// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
/// Code distributed by Google as part of the polymer project is also
/// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
library bwu_ng_elements.icons.hardware;
import 'package:angular2/core.dart' show Component;
import 'package:bwu_ng_elements/icon.dart' show BwuIconSetSvg;
/// The material Hardware icons.
@Component(
selector: 'bwu-hardware-icons',
directives: const [BwuIconSetSvg],
host: const {'[style.display]': '"none"'},
template: '''
<bwu-iconset-svg name="hardware" >
<svg><defs>
<g #icon id="cast"><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z"/></g>
<g #icon id="cast-connected"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
<g #icon id="computer"><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/></g>
<g #icon id="desktop-mac"><path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7l-2 3v1h8v-1l-2-3h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H3V4h18v10z"/></g>
<g #icon id="desktop-windows"><path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"/></g>
<g #icon id="developer-board"><path d="M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9h2zm-4 10H4V5h14v14zM6 13h5v4H6zm6-6h4v3h-4zM6 7h5v5H6zm6 4h4v6h-4z"/></g>
<g #icon id="device-hub"><path d="M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"/></g>
<g #icon id="devices-other"><path d="M3 6h18V4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V6zm10 6H9v1.78c-.61.55-1 1.33-1 2.22s.39 1.67 1 2.22V20h4v-1.78c.61-.55 1-1.34 1-2.22s-.39-1.67-1-2.22V12zm-2 5.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM22 8h-6c-.5 0-1 .5-1 1v10c0 .5.5 1 1 1h6c.5 0 1-.5 1-1V9c0-.5-.5-1-1-1zm-1 10h-4v-8h4v8z"/></g>
<g #icon id="dock"><path d="M8 23h8v-2H8v2zm8-21.99L8 1c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM16 15H8V5h8v10z"/></g>
<g #icon id="gamepad"><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/></g>
<g #icon id="headset"><path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z"/></g>
<g #icon id="headset-mic"><path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h4v1h-7v2h6c1.66 0 3-1.34 3-3V10c0-4.97-4.03-9-9-9z"/></g>
<g #icon id="keyboard"><path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"/></g>
<g #icon id="keyboard-arrow-down"><path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"/></g>
<g #icon id="keyboard-arrow-left"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/></g>
<g #icon id="keyboard-arrow-right"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/></g>
<g #icon id="keyboard-arrow-up"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/></g>
<g #icon id="keyboard-backspace"><path d="M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"/></g>
<g #icon id="keyboard-capslock"><path d="M12 8.41L16.59 13 18 11.59l-6-6-6 6L7.41 13 12 8.41zM6 18h12v-2H6v2z"/></g>
<g #icon id="keyboard-hide"><path d="M20 3H4c-1.1 0-1.99.9-1.99 2L2 15c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 3h2v2h-2V6zm0 3h2v2h-2V9zM8 6h2v2H8V6zm0 3h2v2H8V9zm-1 2H5V9h2v2zm0-3H5V6h2v2zm9 7H8v-2h8v2zm0-4h-2V9h2v2zm0-3h-2V6h2v2zm3 3h-2V9h2v2zm0-3h-2V6h2v2zm-7 15l4-4H8l4 4z"/></g>
<g #icon id="keyboard-return"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/></g>
<g #icon id="keyboard-tab"><path d="M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"/></g>
<g #icon id="keyboard-voice"><path d="M12 15c1.66 0 2.99-1.34 2.99-3L15 6c0-1.66-1.34-3-3-3S9 4.34 9 6v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 15 6.7 12H5c0 3.42 2.72 6.23 6 6.72V22h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g>
<g #icon id="laptop"><path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/></g>
<g #icon id="laptop-chromebook"><path d="M22 18V3H2v15H0v2h24v-2h-2zm-8 0h-4v-1h4v1zm6-3H4V5h16v10z"/></g>
<g #icon id="laptop-mac"><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2H0c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2h-4zM4 5h16v11H4V5zm8 14c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
<g #icon id="laptop-windows"><path d="M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z"/></g>
<g #icon id="memory"><path d="M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2zm-4 6H7V7h10v10z"/></g>
<g #icon id="mouse"><path d="M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z"/></g>
<g #icon id="phone-android"><path d="M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3.25-3H6.75V4h10.5v14z"/></g>
<g #icon id="phone-iphone"><path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"/></g>
<g #icon id="phonelink"><path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/></g>
<g #icon id="phonelink-off"><path d="M22 6V4H6.82l2 2H22zM1.92 1.65L.65 2.92l1.82 1.82C2.18 5.08 2 5.52 2 6v11H0v3h17.73l2.35 2.35 1.27-1.27L3.89 3.62 1.92 1.65zM4 6.27L14.73 17H4V6.27zM23 8h-6c-.55 0-1 .45-1 1v4.18l2 2V10h4v7h-2.18l3 3H23c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1z"/></g>
<g #icon id="power-input"><path d="M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"/></g>
<g #icon id="router"><path d="M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z"/></g>
<g #icon id="scanner"><path d="M19.8 10.7L4.2 5l-.7 1.9L17.6 12H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5.5c0-.8-.5-1.6-1.2-1.8zM7 17H5v-2h2v2zm12 0H9v-2h10v2z"/></g>
<g #icon id="security"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></g>
<g #icon id="sim-card"><path d="M19.99 4c0-1.1-.89-2-1.99-2h-8L4 8v12c0 1.1.9 2 2 2h12.01c1.1 0 1.99-.9 1.99-2l-.01-16zM9 19H7v-2h2v2zm8 0h-2v-2h2v2zm-8-4H7v-4h2v4zm4 4h-2v-4h2v4zm0-6h-2v-2h2v2zm4 2h-2v-4h2v4z"/></g>
<g #icon id="smartphone"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
<g #icon id="speaker"><path d="M17 2H7c-1.1 0-2 .9-2 2v16c0 1.1.9 1.99 2 1.99L17 22c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 2c1.1 0 2 .9 2 2s-.9 2-2 2c-1.11 0-2-.9-2-2s.89-2 2-2zm0 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
<g #icon id="speaker-group"><path d="M18.2 1H9.8C8.81 1 8 1.81 8 2.8v14.4c0 .99.81 1.79 1.8 1.79l8.4.01c.99 0 1.8-.81 1.8-1.8V2.8c0-.99-.81-1.8-1.8-1.8zM14 3c1.1 0 2 .89 2 2s-.9 2-2 2-2-.89-2-2 .9-2 2-2zm0 13.5c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/><circle cx="14" cy="12.5" r="2.5"/><path d="M6 5H4v16c0 1.1.89 2 2 2h10v-2H6V5z"/></g>
<g #icon id="tablet"><path d="M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2zm-2 14H5V6h14v12z"/></g>
<g #icon id="tablet-android"><path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z"/></g>
<g #icon id="tablet-mac"><path d="M18.5 0h-14C3.12 0 2 1.12 2 2.5v19C2 22.88 3.12 24 4.5 24h14c1.38 0 2.5-1.12 2.5-2.5v-19C21 1.12 19.88 0 18.5 0zm-7 23c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm7.5-4H4V3h15v16z"/></g>
<g #icon id="toys"><path d="M12 12c0-3 2.5-5.5 5.5-5.5S23 9 23 12H12zm0 0c0 3-2.5 5.5-5.5 5.5S1 15 1 12h11zm0 0c-3 0-5.5-2.5-5.5-5.5S9 1 12 1v11zm0 0c3 0 5.5 2.5 5.5 5.5S15 23 12 23V12z"/></g>
<g #icon id="tv"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"/></g>
<g #icon id="videogame-asset"><path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2zm4.5 2c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4-3c-.83 0-1.5-.67-1.5-1.5S18.67 9 19.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
<g #icon id="watch"><path d="M20 12c0-2.54-1.19-4.81-3.04-6.27L16 0H8l-.95 5.73C5.19 7.19 4 9.45 4 12s1.19 4.81 3.05 6.27L8 24h8l.96-5.73C18.81 16.81 20 14.54 20 12zM6 12c0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6-6-2.69-6-6z"/></g>
</defs></svg>
</bwu-iconset-svg>
''')
class BwuHardwareIcons {}
| 135.76
| 369
| 0.657631
|
aec801d72543d07166ae02f6d399d470d79e9436
| 301
|
kt
|
Kotlin
|
src/main/kotlin/com/github/txuritan/mental/core/common/coremod/ModSetupMental.kt
|
Txuritan/mental
|
351b5e1c799d6c08f1e2502dd97dc99b7be726c3
|
[
"MIT"
] | null | null | null |
src/main/kotlin/com/github/txuritan/mental/core/common/coremod/ModSetupMental.kt
|
Txuritan/mental
|
351b5e1c799d6c08f1e2502dd97dc99b7be726c3
|
[
"MIT"
] | null | null | null |
src/main/kotlin/com/github/txuritan/mental/core/common/coremod/ModSetupMental.kt
|
Txuritan/mental
|
351b5e1c799d6c08f1e2502dd97dc99b7be726c3
|
[
"MIT"
] | null | null | null |
package com.github.txuritan.mental.core.common.coremod
import net.minecraftforge.fml.relauncher.IFMLCallHook
class ModSetupMental : IFMLCallHook {
override fun injectData(data: Map<String, Any>) {
}
@Throws(Exception::class)
override fun call(): Void? {
return null
}
}
| 21.5
| 54
| 0.704319
|
dd669ab2f973bbedca32547bccb938c63b16bc3c
| 2,649
|
java
|
Java
|
src/main/java/MyMain.java
|
apcs-assignments-fall2020/calculator-bot-jmskeoch
|
d791cbb14b4706966179a001f92dd49d5bc11eb2
|
[
"Apache-2.0"
] | null | null | null |
src/main/java/MyMain.java
|
apcs-assignments-fall2020/calculator-bot-jmskeoch
|
d791cbb14b4706966179a001f92dd49d5bc11eb2
|
[
"Apache-2.0"
] | null | null | null |
src/main/java/MyMain.java
|
apcs-assignments-fall2020/calculator-bot-jmskeoch
|
d791cbb14b4706966179a001f92dd49d5bc11eb2
|
[
"Apache-2.0"
] | null | null | null |
import java.util.Scanner;
public class MyMain {
// Calculates the median of the three inputs
public static int median(int a, int b, int c) {
if((a > b && a < c) || (a > c && a < b)) {
return a;
} else if((b > a && b < c) || (b > c && b < c)) {
return b;
} else {
return c;
}
}
// Returns the input with the larger absolute value
public static int magnitude(int a, int b) {
if(Math.abs(a) > Math.abs(b)) {
return a;
} else if(Math.abs(a) == Math.abs(b)) {
return a;
} else {
return b;
}
}
// Returns the "c" value from the Pythagorean theorem "a^2 + b^2 = c^2",
// where "a" and "b" are the inputs to the method
public static double pythagoras(int a, int b) {
double c;
c = Math.pow(a, 2) + Math.pow(b, 2);
return Math.sqrt(c);
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("What calculation would you like to run? (median, magnitude, pythagoras)");
String calculateThis = scanner.next();
//Run median method w/ inputs
if(calculateThis.equals("median")) {
System.out.println("What is your first variable? ");
int a = scanner.nextInt();
System.out.println("What is your second variable? ");
int b = scanner.nextInt();
System.out.println("What is your third variable? ");
int c = scanner.nextInt();
System.out.println("Calculating...");
System.out.println(median(a, b , c));
//Run magnitude method w/ inputs
} else if(calculateThis.equals("magnitude")) {
System.out.println("What is your first variable? ");
int a = scanner.nextInt();
System.out.println("What is your second variable? ");
int b = scanner.nextInt();
System.out.println("Calculating...");
System.out.println(magnitude(a, b));
//Run pythagoras method w/ inputs
} else if(calculateThis.equals("pythagoras")) {
System.out.println("What is your first variable? ");
int a = scanner.nextInt();
System.out.println("What is your second variable? ");
int b = scanner.nextInt();
System.out.println("Calculating...");
System.out.println(pythagoras(a, b));
//Unknown text
} else {
System.out.println("I do not understand, please re-run!");
}
scanner.close();
}
}
| 32.703704
| 102
| 0.534919
|
3210f0041a908fcf191ab2eb82e3003f5925225a
| 4,795
|
lua
|
Lua
|
lua/corpus/metadata.lua
|
tami5/corpus
|
6c794fd4cd74afd2f2a95f21e61e73411a7ab4b3
|
[
"MIT"
] | null | null | null |
lua/corpus/metadata.lua
|
tami5/corpus
|
6c794fd4cd74afd2f2a95f21e61e73411a7ab4b3
|
[
"MIT"
] | null | null | null |
lua/corpus/metadata.lua
|
tami5/corpus
|
6c794fd4cd74afd2f2a95f21e61e73411a7ab4b3
|
[
"MIT"
] | null | null | null |
-- Copyright 2015-present Greg Hurrell. All rights reserved.
-- Licensed under the terms of the MIT license.
--- TODO: would it be worth it to embed
--- https://github.com/exosite/lua-yaml/blob/master/yaml.lua?
local M = {}
---YAML Key-value pair pattern
local kv_pattern = [[\v^\s*(\w+)\s*:\s*(\S.{-})\s*$]]
---Given a list of key value pairs, update key with value
-- @param key string
-- @param value string
local set_kv_list = function (list, key, value)
for _, kv in ipairs(list) do
if kv[1] == key then kv[2] = value end
end
end
---Get value from key-value pair list
---@param list any
---@return string?
local get_kv_list = function(list, key)
for _, kv in ipairs(list) do
if kv[1] == key then return kv[2] end
end
end
---Check whether current line is the start of metadata block or not
---@param line string
---@return boolean: true if it's the start/end of metadata block
local is_block_delim = function(line)
return vim.fn.match(line, [[\v^---\s*$]]) ~= -1
end
---Convert Lua value to Yaml value
---@return string
local yaml_value = (function ()
local convert = {
['boolean'] = function (lua_value)
return vim.inspect(lua_value) -- yah maybe overkill :D
end,
['table'] = function(lua_value)
if vim.tbl_islist(lua_value) then
return ("[%s]"):format(table.concat(lua_value, ","))
end
end
}
return function (value)
return convert(type(value))(value)
end
end)
---Wrapper function for vim.fn.match for convenience.
---@param line string: line to match against
---@param pattern string: regex
---@return boolean: true if match
local match = function(line, pattern)
return vim.fn.match(line, pattern) ~= -1
end
--- Read current buffer and dump yaml block lines into a list
---@return table: list of string
M.raw = function()
if is_block_delim(vim.fn.getline(1)) then
local res = {}
local range = vim.fn.range(2, vim.fn.line('$'))
for _, i in ipairs(range) do
local line = vim.fn.getline(i)
if match(line, [[\v^\s*$]]) then
res[#res+1] = ''
elseif is_block_delim(line) then
return res
end
local match = vim.fn.matchlist(line, kv_pattern)
if #match == 0 then
return {}
end
res[#res+1] = match[1]
end
end
return {}
end
--- Read current buffer and returns a metadata as list of key values pairs
---@return table: eg: { {"title", "README"}, {"tags", "foo"} }
M.decode = function()
local res = {}
local raw = M.raw()
if #raw == 0 then return {} end
for _, line in ipairs(raw) do
local match = vim.fn.matchlist(line,kv_pattern)
if #match ~= 0 then
res[#res+1] = { match[2], match[3] }
end
end
return res
end
--- Encode lua table into yaml string
---@param metadata table: list of key-values pairs
---@return table: YAML string
M.encode = function(metadata)
local res = {"---"}
for _, kv in ipairs(metadata) do
local key, value = kv[1], kv[2]
if type(value) ~= "string" then
value = yaml_value(value)
end
table.insert(res, ("%s: %s"):format(key, value))
end
table.insert(res, "---")
return res
end
---Update title to match the filename (TODO: or the other way around)
---@param config table: file or user configuration
---@param path string: file path
---@param metadata table: file metadata
M.__update_title = function(config, path, metadata)
--- TODO: Check if title is different from file name
--- and if so update filename not fontmatter.
if config.autotitle ~= 1 then return end
local title = corpus.title_for_file(path)
if #metadata ~= 0 then
set_kv_list(metadata, "title", title)
else
metadata[#metadata+1] = {"title", title}
end
end
---Update tags to contain user or configuration tags
---@param config table: file or user configuration
---@param path string: file path
---@param metadata table: file metadata
M.__update_tags = function(config, path, metadata)
if not config.tags then return end
local tags = vim.split(get_kv_list(metadata, "tags") or "", " ")
for _, tag in ipairs(config.tags) do
if vim.fn.index(tags, tag) == -1 then
tags[#tags+1] = tag
end
end
set_kv_list(metadata, "tags", tags)
end
M.__update_buf = function(metadata)
local yaml = M.encode(metadata)
local raw = M.raw()
if #raw ~= 0 then
vim.fn.deletebufline('', 1, #raw +2)
end
vim.fn.append(0, yaml)
end
---Main function in metadata module. It update title, tags and metadata
---@param path string: filepath
M.update = function(path)
local config = corpus.config_for_file(path)
if config.autotitle ~= 1 and not config.tags then return end
local metadata = M.decode()
M.__update_title(config, path, metadata)
M.__update_tags(config, path, metadata)
M.__update_buf(metadata)
end
return M
| 26.202186
| 74
| 0.659228
|
e76a58c1e0a98d3b61260d77dcab9d553b94e6cc
| 10,631
|
php
|
PHP
|
application/controllers/myadminkw/Merchandise.php
|
yessika21289/project1
|
eafff6a83f70c5ea066021d9e42952e73a92d3f9
|
[
"MIT"
] | null | null | null |
application/controllers/myadminkw/Merchandise.php
|
yessika21289/project1
|
eafff6a83f70c5ea066021d9e42952e73a92d3f9
|
[
"MIT"
] | null | null | null |
application/controllers/myadminkw/Merchandise.php
|
yessika21289/project1
|
eafff6a83f70c5ea066021d9e42952e73a92d3f9
|
[
"MIT"
] | null | null | null |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Merchandise extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see https://codeigniter.com/user_guide/general/urls.html
*/
function index() {
$user = $this->session->userdata('logged_in');
if (isset($user)) {
$data['name'] = $this->session->userdata('username');
$data['is_authorized'] = $this->session->userdata('is_authorized');
$data['added_id'] = $this->session->flashdata('added_id');
$data['updated_id'] = $this->session->flashdata('updated_id');
$data['set_active'] = $this->session->flashdata('set_active');
$data['set_active_id'] = $this->session->flashdata('set_active_id');
$data['delete_confirm'] = $this->session->flashdata('delete_confirm');
$this->load->model('Merchandise_model');
$merchandise = $this->Merchandise_model->getData(NULL, 'all');
if (!empty($merchandise)) $data['merchandise'] = $merchandise;
$data['menu_active'] = 'merchandise';
$this->load->view('admin/admin_header', $data);
$this->load->view('admin/admin_left_menu');
$this->load->view('admin/admin_merchandise');
$this->load->view('admin/admin_footer');
} else {
redirect('myadminkw');
}
}
function add($merchandise_id = NULL) {
$user = $this->session->userdata('logged_in');
if (isset($user)) {
$user = $this->session->userdata('username');
$this->load->model('Merchandise_model');
$data['menu_active'] = 'add_merchandise';
if (!empty($_POST)) {
$now = time();
$error = '';
$merchandise_dir = '';
$merchandise_file = '';
$merchandise = array(
'price' => $_POST['price'],
'title' => $_POST['title'],
'desc' => $_POST['desc'],
);
$this->session->set_flashdata('merchandise', $merchandise);
// ======================================= UPLOAD ITEM IMAGE ============================================ //
if (!empty($_FILES['merchandise']['tmp_name'])) {
$merchandise_dir = "assets/merchandise/";
$merchandise_ext = strtolower(pathinfo($_FILES['merchandise']['name'], PATHINFO_EXTENSION));
$merchandise_file = $merchandise_dir . $now . '.' . $merchandise_ext;
if (is_dir($merchandise_dir) == 0) {
$error = $merchandise_dir . ' folder is not exist';
$this->session->set_flashdata('error_upload', $error);
redirect('myadminkw/Merchandise/add');
}
else if (!in_array($merchandise_ext, array('jpg', 'jpeg', 'png'))) {
$error = 'Only jpg/jpeg/png which are allowed.';
$this->session->set_flashdata('error_upload', $error);
redirect('myadminkw/Merchandise/add');
}
else {
if (move_uploaded_file($_FILES['merchandise']['tmp_name'], $merchandise_file)) {
$this->load->library('image_lib');
$config['image_library'] = 'gd2';
$config['source_image'] = $merchandise_file;
$config['width'] = 250;
$this->image_lib->initialize($config);
$this->image_lib->resize();
}
else {
$error = 'Upload image failed!';
$this->session->set_flashdata('error_upload', $error);
redirect('myadminkw/Merchandise/add');
}
}
}
// ========================================= ADD NEW ITEM ============================================= //
if (empty($_POST['merchandise_id'])) {
$added_merchandise_id = $this->Merchandise_model->add($user, $_POST, $merchandise_file);
if ($added_merchandise_id) {
$this->session->set_flashdata('added_id', $added_merchandise_id);
}
else {
if (!empty($merchandise_file)) unlink($merchandise_file);
}
}
// ======================================== UPDATE AN ITEM ============================================ //
else {
/*$merchandise = $this->Merchandise_model->getData($_POST['merchandise_id']);
if (!empty($merchandise[0]->image)) {
unlink($merchandise[0]->image);
}*/
$updated_merchandise_id = $this->Merchandise_model->update($user, $_POST, $merchandise_file);
if ($updated_merchandise_id) {
$this->session->set_flashdata('updated_id', $updated_merchandise_id);
}
else {
if (!empty($merchandise_file)) unlink($merchandise_file);
}
}
redirect('myadminkw/Merchandise');
}
// ========================================= PUBLISH / UNPUBLISH ============================================= //
elseif ($this->input->get('is_active') != NULL) {
$post['merchandise_id'] = $this->input->get('id');
$post['is_active'] = $this->input->get('is_active');
$set_active = $this->Merchandise_model->set_active($user, $post);
$this->session->set_flashdata('set_active', $set_active);
$this->session->set_flashdata('set_active_id', $post['merchandise_id']);
redirect('myadminkw/Merchandise');
}
// ========================================= goto MEMBER's form ============================================= //
else {
$data['name'] = $this->session->userdata('username');
$data['is_authorized'] = $this->session->userdata('is_authorized');
if (!empty($merchandise_id)) {
$merchandise = $this->Merchandise_model->getData($merchandise_id);
$data['merchandise'] = array(
'id' => $merchandise[0]->id,
'price' => $merchandise[0]->price,
'title' => $merchandise[0]->title,
'desc' => $merchandise[0]->description,
'image_url' => $merchandise[0]->image
);
}
if (!empty($this->session->flashdata('error_upload'))) {
$data['error_upload'] = $this->session->flashdata('error_upload');
$data['merchandise'] = $this->session->flashdata('merchandise');
}
$this->load->view('admin/admin_header', $data);
$this->load->view('admin/admin_left_menu');
$this->load->view('admin/admin_add_merchandise');
$this->load->view('admin/admin_footer');
}
} else {
redirect('myadminkw');
}
}
function delete($merchandise_id = NULL) {
$user = $this->session->userdata('logged_in');
if (isset($user)) {
$this->load->model('Merchandise_model');
if (!empty($merchandise_id)) {
$delete = $this->Merchandise_model->delete($merchandise_id);
if ($delete) $this->session->set_flashdata('delete_confirm', $delete);
redirect('myadminkw/Merchandise');
}
else redirect('myadminkw/Merchandise');
} else {
redirect('myadminkw');
}
}
function howtobuy() {
$user = $this->session->userdata('logged_in');
if (isset($user)) {
$data['name'] = $this->session->userdata('username');
$data['is_authorized'] = $this->session->userdata('is_authorized');
$data['add_confirm'] = $this->session->flashdata('add_confirm');
$data['update_confirm'] = $this->session->flashdata('update_confirm');
$data['set_active'] = $this->session->flashdata('set_active');
$data['set_active_id'] = $this->session->flashdata('set_active_id');
$data['delete_confirm'] = $this->session->flashdata('delete_confirm');
$data['menu_active'] = 'howtobuy';
$this->load->model('Merchandise_model');
$howtobuy = $this->Merchandise_model->get_howtobuy();
if (!empty($howtobuy)) $data['howtobuy'] = $howtobuy;
$save = isset($_POST['save']) ? $_POST['save'] : 0;
$clear = isset($_POST['clear']) ? $_POST['clear'] : 0;
if($save == 1) {
if(!empty($howtobuy)) {
$updated = $this->Merchandise_model->update_howtobuy($data['name'], $_POST);
if ($updated) $this->session->set_flashdata('update_confirm', 1);
redirect('myadminkw/Merchandise/howtobuy');
}
else {
$added = $this->Merchandise_model->add_howtobuy($data['name'], $_POST);
if ($added) $this->session->set_flashdata('add_confirm', 1);
redirect('myadminkw/Merchandise/howtobuy');
}
}
else {
$this->load->view('admin/admin_header', $data);
$this->load->view('admin/admin_left_menu');
$this->load->view('admin/admin_merchandise_howtobuy');
$this->load->view('admin/admin_footer');
}
} else {
redirect('myadminkw');
}
}
}
| 45.823276
| 125
| 0.470605
|
25abef223fd019352eb74ae896133291178ead46
| 3,099
|
cs
|
C#
|
007.FileIO/aliyun_dotnet_sdk_20150115/FileIO_ALIYUN/src/Domain/SetBucketRefererRequest.cs
|
chenxihoho/FirstFrame
|
0eea1c39f7c6135955c4418b0ebfae25d76352be
|
[
"Apache-2.0"
] | 3
|
2017-10-11T09:08:44.000Z
|
2019-08-26T03:40:49.000Z
|
007.FileIO/aliyun_dotnet_sdk_20150115/FileIO_ALIYUN/src/Domain/SetBucketRefererRequest.cs
|
chenxihoho/FirstFrame
|
0eea1c39f7c6135955c4418b0ebfae25d76352be
|
[
"Apache-2.0"
] | null | null | null |
007.FileIO/aliyun_dotnet_sdk_20150115/FileIO_ALIYUN/src/Domain/SetBucketRefererRequest.cs
|
chenxihoho/FirstFrame
|
0eea1c39f7c6135955c4418b0ebfae25d76352be
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright (C) Alibaba Cloud Computing
* All rights reserved.
*
* 版权所有 (C)阿里云计算有限公司
*/
using System;
using System.Collections.Generic;
using Aliyun.OpenServices.Properties;
using Aliyun.OpenServices.OpenStorageService.Utilities;
using Aliyun.OpenServices.Domain;
namespace Aliyun.OpenServices.OpenStorageService
{
/// <summary>
/// 设置指定Bucket的Referer白名单和是否允许referer字段为空的请求。
/// </summary>
public class SetBucketRefererRequest
{
private readonly IList<string> _refererList = new List<string>();
/// <summary>
/// 获取或者设置<see cref="OssObject" />所在<see cref="Bucket" />的名称。
/// </summary>
public string BucketName { get; private set; }
/// <summary>
/// 指定是否允许referer字段为空的请求访问。
/// </summary>
public bool AllowEmptyReferer { get; private set; }
/// <summary>
/// 获取或者设置需要删除的referer列表。
/// </summary>
public IList<string> RefererList
{
get { return _refererList; }
}
/// <summary>
/// 使用空的referer列表、允许referer为空的请求访问的构造函数。
/// </summary>
/// <param name="bucketName"><see cref="OssObject"/></param>
public SetBucketRefererRequest(string bucketName)
: this(bucketName, null, true)
{
}
/// <summary>
/// 使用指定的referer列表、允许referer为空的请求访问的构造函数。
/// </summary>
/// <param name="bucketName"><see cref="OssObject"/></param>
/// <param name="refererList">referer列表</param>
public SetBucketRefererRequest(string bucketName, IList<string> refererList)
: this(bucketName, refererList, true)
{
}
/// <summary>
/// 使用指定的referer列表、是否允许referer为空的请求访问的构造函数。
/// </summary>
/// <param name="bucketName"><see cref="OssObject"/></param>
/// <param name="refererList">referer列表</param>
/// <param name="allowEmptyReferer">是否允许referer为空的请求访问</param>
public SetBucketRefererRequest(string bucketName, IList<string> refererList, bool allowEmptyReferer)
{
if (string.IsNullOrEmpty(bucketName))
throw new ArgumentException(Resources.ExceptionIfArgumentStringIsNullOrEmpty, "bucketName");
if (!OssUtils.IsBucketNameValid(bucketName))
throw new ArgumentException(OssResources.BucketNameInvalid, "bucketName");
if (refererList != null)
{
foreach (var referer in refererList)
{
if (string.IsNullOrEmpty(referer))
continue;
_refererList.Add(referer);
}
}
BucketName = bucketName;
AllowEmptyReferer = allowEmptyReferer;
}
/// <summary>
/// 清空referer列表。
/// </summary>
public void ClearRefererList()
{
RefererList.Clear();
}
}
}
| 32.28125
| 109
| 0.555663
|
20f0373447bf3fb231e5a0ea7af660fbe852c3a1
| 1,375
|
py
|
Python
|
pramp/diff_between_two_strings.py
|
VVKot/leetcode-solutions
|
7d6e599b223d89a7861929190be715d3b3604fa4
|
[
"MIT"
] | 4
|
2019-04-22T11:57:36.000Z
|
2019-10-29T09:12:56.000Z
|
pramp/diff_between_two_strings.py
|
VVKot/coding-competitions
|
7d6e599b223d89a7861929190be715d3b3604fa4
|
[
"MIT"
] | null | null | null |
pramp/diff_between_two_strings.py
|
VVKot/coding-competitions
|
7d6e599b223d89a7861929190be715d3b3604fa4
|
[
"MIT"
] | null | null | null |
def diff_strings_rec(source, target, dp={}):
dp_key = (source, target)
if dp_key in dp:
return dp[dp_key]
if not source and not target:
result = []
dp[dp_key] = (0, result)
return dp[dp_key]
if not source:
result = ["+" + ch for ch in target]
dp[dp_key] = (len(target), result)
return dp[dp_key]
if not target:
result = ["-" + ch for ch in source]
dp[dp_key] = (len(source), result)
return dp[dp_key]
if source[0] == target[0]:
result = [source[0]]
num_edits, edits = diff_strings_rec(source[1:], target[1:], dp)
result.extend(edits)
dp[dp_key] = (num_edits, result)
return dp[dp_key]
else:
num_edits_del, edits_del = diff_strings_rec(source[1:], target, dp)
num_edits_ins, edits_ins = diff_strings_rec(source, target[1:], dp)
if num_edits_ins < num_edits_del:
result = ["+" + target[0]]
result.extend(edits_ins)
dp[dp_key] = (num_edits_ins + 1, result)
return dp[dp_key]
else:
result = ["-" + source[0]]
result.extend(edits_del)
dp[dp_key] = (num_edits_del + 1, result)
return dp[dp_key]
def diffBetweenTwoStrings(source, target):
_, edits = diff_strings_rec(source, target)
return edits
| 33.536585
| 75
| 0.565091
|
e2c02e4d4a3fd6dd660deefeeb55b4b7dd8d4f2b
| 2,265
|
py
|
Python
|
human_classification/setup_human_classification.py
|
shenkev/Exact-Inference-VAE-Robustness
|
37438df2d63b2de19b084153e6c68d528d533837
|
[
"MIT"
] | 3
|
2017-11-06T06:00:23.000Z
|
2017-12-01T20:51:07.000Z
|
human_classification/setup_human_classification.py
|
shenkev/Exact-Inference-VAE-Robustness
|
37438df2d63b2de19b084153e6c68d528d533837
|
[
"MIT"
] | null | null | null |
human_classification/setup_human_classification.py
|
shenkev/Exact-Inference-VAE-Robustness
|
37438df2d63b2de19b084153e6c68d528d533837
|
[
"MIT"
] | null | null | null |
import csv
from shutil import copyfile
import numpy as np
import pickle
imgs_to_check = 10
img_path = './out/'
classify_path = './human/'
header = ['orig_filename', 'orig_filetype', 'gt_class', 'target_class', 'classifier_class', 'new_filename', 'human_class']
myFile = open(classify_path + 'data.csv', 'w')
# This the lazy way to find out the gt_class and target_class, we assume the image indices match
data_path = 'adversarial_examples_v0.pckl'
f = open(data_path, 'rb')
attack_set, attack_set_labels, adversarial_examples, adversarial_targets = pickle.load(f)
f.close()
data_path = 'v0_target_7_old_class.pckl'
f = open(data_path, 'rb')
labels, gt_class, adv_class, vae_class, l2_class, latent_class, recon_class, mcmcmean_class, mcmcrandom_class = pickle.load(f)
f.close()
# Pick shuffled file names
total_imgs = imgs_to_check*3 # check best_l2, hmc_mean and adversarial img
new_imgnums = np.random.choice(range(1, total_imgs+1), total_imgs, replace=False)
with myFile:
writer = csv.writer(myFile)
writer.writerow(header)
for i in range(imgs_to_check):
# This code is pretty brittle to filename change but w.e.
img_num = str(i+1).zfill(3)
# L2
best_l2_img = '{}_best_l2.png'.format(img_num)
new_filename = "{}.png".format(str(new_imgnums[i*3]).zfill(3))
row = [best_l2_img, 'hmc_l2', attack_set_labels[i], adversarial_targets[i], l2_class[i], new_filename, -1]
writer.writerow(row)
copyfile(img_path + best_l2_img, classify_path + new_filename)
# mcmc mean
mcmc_mean = '{}_mcmcMean.png'.format(img_num)
new_filename = "{}.png".format(str(new_imgnums[i*3+1]).zfill(3))
row = [mcmc_mean, 'mcmc_mean', attack_set_labels[i], adversarial_targets[i], mcmcmean_class[i], new_filename, -1]
writer.writerow(row)
copyfile(img_path + mcmc_mean, classify_path + new_filename)
# adv. image
adv_img = '{}_x_adversarial.png'.format(img_num)
new_filename = "{}.png".format(str(new_imgnums[i*3+2]).zfill(3))
row = [adv_img, 'adv', attack_set_labels[i], adversarial_targets[i], adv_class[i], new_filename, -1]
writer.writerow(row)
copyfile(img_path + adv_img, classify_path + new_filename)
| 37.131148
| 126
| 0.696689
|
7f13c412ee2e3220ce0da1dae4ec6eb001a4f9a7
| 219
|
cs
|
C#
|
RamBaseApiSdk/Meta/Admittance.cs
|
urohde/RamBaseApiDotNetSdk
|
76998922ffa8929da118187a7f37cb32590ddae2
|
[
"MIT"
] | 6
|
2019-09-24T17:05:18.000Z
|
2021-09-17T07:10:12.000Z
|
RamBaseApiSdk/Meta/Admittance.cs
|
urohde/RamBaseApiDotNetSdk
|
76998922ffa8929da118187a7f37cb32590ddae2
|
[
"MIT"
] | 7
|
2020-01-07T08:20:24.000Z
|
2020-11-26T11:43:41.000Z
|
RamBaseApiSdk/Meta/Admittance.cs
|
urohde/RamBaseApiDotNetSdk
|
76998922ffa8929da118187a7f37cb32590ddae2
|
[
"MIT"
] | 2
|
2021-07-05T11:57:37.000Z
|
2021-08-19T12:00:38.000Z
|
namespace RamBase.Api.Sdk.Meta
{
public class Admittance
{
public string AccessDenied { get; set; }
public int AccessRuleId { get; set; }
public int ErrorMessageId { get; set; }
}
}
| 21.9
| 48
| 0.607306
|
bc005b8b24fcc760d6a5c2b1f021548b92c214aa
| 4,235
|
swift
|
Swift
|
CustomControls/customWidgets/ProgressViews/CircleProgressView.swift
|
wangjianquan/CustomControls
|
c955040473592522c19dc488fa167a9285b5a8dc
|
[
"Apache-2.0"
] | null | null | null |
CustomControls/customWidgets/ProgressViews/CircleProgressView.swift
|
wangjianquan/CustomControls
|
c955040473592522c19dc488fa167a9285b5a8dc
|
[
"Apache-2.0"
] | null | null | null |
CustomControls/customWidgets/ProgressViews/CircleProgressView.swift
|
wangjianquan/CustomControls
|
c955040473592522c19dc488fa167a9285b5a8dc
|
[
"Apache-2.0"
] | null | null | null |
//
// CircleProgressView.swift
// FaXinSwift
//
// Created by landixing on 2018/8/27.
// Copyright © 2018年 WJQ. All rights reserved.
//2
import UIKit
class CircleProgressView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
setUp()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setUp()
}
//MARK: --
@IBInspectable var progress : CGFloat = 0 {
didSet {
setNeedsDisplay()
}
}
// MARK: - 圆圈背景颜色
@IBInspectable var circleColor: UIColor?
// MARK: - 圆弧背景颜色
@IBInspectable var arcColor: UIColor?
// MARK: - title文字颜色
@IBInspectable var titleColor: UIColor?
// MARK: - subTitle文字颜色
@IBInspectable var subTitleColor: UIColor?
// MARK: - title 文字
@IBInspectable var title: String?
// MARK: - subTitle 文字
@IBInspectable var subTitle: String?
// MARK: - 背景圆圈 宽度
var circleLineWidth: CGFloat?
override func draw(_ rect: CGRect) {
super.draw(rect)
let maxWidth = self.frame.size.width < self.frame.size.height ? self.frame.size.width : self.frame.size.height
let center = CGPoint(x: maxWidth * 0.5, y: maxWidth * 0.5)
let radius = rect.width * 0.5 - 8
let startAngle = CGFloat(-Double.pi/2)
let endAngle = CGFloat(Double.pi * 2) * progress + startAngle
let basePath = UIBezierPath(arcCenter: center, radius: radius, startAngle: startAngle, endAngle: CGFloat(Double.pi * 2) + startAngle, clockwise: true)
basePath.lineWidth = circleLineWidth!
circleColor?.setStroke()
basePath.stroke()
let closePath = UIBezierPath(arcCenter: center, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
closePath.lineWidth = circleLineWidth!
arcColor?.setStroke()
closePath.lineCapStyle = .round //线条拐角
closePath.lineJoinStyle = .round //终点处理
closePath.stroke()
setUpTitle()
}
fileprivate func setUp() {
self.backgroundColor = UIColor.clear
circleColor = UIColor.orange
arcColor = UIColor.white
titleColor = UIColor.white
subTitleColor = UIColor.white
title = " "
subTitle = " "
circleLineWidth = 10
}
fileprivate func setUpTitle() {
let title = self.title
//段落格式
let textStyle = NSMutableParagraphStyle.default.mutableCopy() as? NSMutableParagraphStyle
textStyle?.lineBreakMode = .byWordWrapping
textStyle?.alignment = .center //水平居中
//构建属性集合
let attributes = [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 14), NSAttributedString.Key.paragraphStyle: textStyle!, NSAttributedString.Key.foregroundColor: titleColor!] as [NSAttributedString.Key : Any]
//获得size
let stringSize: CGSize = title!.size(withAttributes: attributes)
//垂直居中
let r = CGRect(x: (self.frame.size.width - stringSize.width) / 2.0, y: (self.frame.size.height - stringSize.height - 20) / 2.0, width: stringSize.width, height: stringSize.height)
title?.draw(in: r, withAttributes: attributes)
/*
**子标题
*/
let subtitle = self.subTitle
let subTextStyle = NSMutableParagraphStyle.default.mutableCopy() as? NSMutableParagraphStyle
subTextStyle?.lineBreakMode = .byWordWrapping
subTextStyle?.alignment = .center
//构建属性集合
let subAttributes = [NSAttributedString.Key.font:UIFont.boldSystemFont(ofSize: 16),NSAttributedString.Key.paragraphStyle:subTextStyle!, NSAttributedString.Key.foregroundColor:subTitleColor!] as [NSAttributedString.Key : Any]
let subStrSize : CGSize = subtitle!.size(withAttributes: subAttributes)
//垂直居中
let subR = CGRect(x: (self.frame.size.width - subStrSize.width) / 2.0, y: r.origin.y + stringSize.height + 8, width: subStrSize.width, height: subStrSize.height)
subtitle?.draw(in: subR, withAttributes: subAttributes)
}
}
| 33.085938
| 232
| 0.624085
|
9b144e495ca56fc83c4ff6af53aeb8ba62518dca
| 13,369
|
lua
|
Lua
|
deDE.localization.lua
|
StormforgedGuild/GDKPd_Reforged
|
018535381e232775ade0469e2cb643c0f354a6f1
|
[
"MIT"
] | null | null | null |
deDE.localization.lua
|
StormforgedGuild/GDKPd_Reforged
|
018535381e232775ade0469e2cb643c0f354a6f1
|
[
"MIT"
] | null | null | null |
deDE.localization.lua
|
StormforgedGuild/GDKPd_Reforged
|
018535381e232775ade0469e2cb643c0f354a6f1
|
[
"MIT"
] | null | null | null |
local L = LibStub("AceLocale-3.0"):NewLocale("GDKPd", "deDE")
if not L then return end
L["Allow multiple simultanous auctions"] = "Mehrere Auktionen gleichzeitig erlauben"
L["Always show the \"Hide\" button on bid frames"] = "Den \"Verstecken\"-Knopf auf Bietfenstern immer anzeigen"
L["Amount"] = "Menge"
L["Anchor balance window to status window"] = "Kontostandfenster an Statusfenster anbinden"
L["Announce auction start to raid warning"] = "Auktionsbeginn an Schlachtzugwarnung melden"
L["Announce & auto-auction"] = "Melden & auto-versteigern"
L["Announce bids to raid warning"] = "Gebote an Schlachtzugswarnung melden"
L["Announce loot"] = "Beute bekanntgeben"
L["Announce the current pot amount after each auction"] = "Momentanen Topf nach jeder Auktion bekanntgeben"
L["Any money subtracted from raid members is added to the pot and vice versa"] = "Von Mitgliedern abgezogenes Gold wird dem Topf hinzugefügt (und umgekehrt)"
L["Appearance options"] = "Aussehensoptionen"
L["Are you sure you want to mail %s gold to player %s?"] = "Sicher, dass %s gold an Spieler %s geschickt werden soll?"
L["Auction bid timeout refresh"] = "Auktionsauslauf-Erneuerungszeit"
L["Auction history"] = "Auktionsliste"
L["Auction note: %s"] = "Auktionsnotiz: %s"
L["Auction timeout"] = "Auktions-Ablaufzeit"
L["Auto-award loot to winner"] = "Beute dem Sieger automatisch zuteilen"
L["Auto bid"] = "Auto-bieten"
L["Award loot to Master Looter when auto-auctioning"] = "Beim automatischen Versteigern Beute an Plündermeister vergeben"
L["Balance"] = "Kontostand"
L["Behaviour options"] = "Verhaltensoptionen"
L["Bid"] = "Bieten"
L["Bid button re-enable delay"] = "Aktivierungsverzögerung für Bietknopf"
L["Broadcast rules"] = "Regeln bekanntgeben"
L["Cancel auction"] = "Auktion abbrechen"
L["Cannot start auction without Master Looter privileges."] = "Man kann keine Auktionen starten ohne Plündermeister zu sein!"
L[" |cffaa0000(Distribute: %dg)|r"] = "|cffaa0000(Verteilen: %dg)|r"
L["Control panel scale"] = "Kontrollfeld-Skalierung"
L["Countdown timer announce interval"] = "Intervall für Zeitankündigungen"
L["Current bid: "] = "Momentanes Gebot: "
L["Distribute"] = "Verteilen"
L["Do not announce"] = "Nicht bekanntgeben"
L["Do you want to save your pot or reset without saving? You can also add a note to the pot."] = "Soll der Topf vor dem zurücksetzen gespeichert werden? Mit dem Eingabefeld kann man vor dem Speichern eine Notiz hinzufügen."
L[ [=[Due to the changes to the addon message system implemented in patch 4.2, GDKPd is no longer able to communicate using its old version checking standard.
Thus, this version of GDKPd will only be able to send and receive version checks from and to versions 1.2.0 and above of GDKPd.
While all other functionalities of GDKPd should still be compatible with previous versions, we |cffff0000strongly recommend updating GDKPd to version 1.2.0 or above|r.]=] ] = [=[Weil sich das Addon-Nachrichtensystem mit Patch 4.2 geändert hat, kann GDKPd das bisherige Versionsprüfsystem nicht mehr verwenden.
Aus diesem Grund wird diese Version von GDKPd nur Versionsüberprüfungen an GDKPd-Versionen 1.2.0 und höher senden bzw. diese von diesen empfangen können. Zwar sollten alle anderen Funktionalitäten von GDKPd weiterhin mit bisherigen Versionen kompatibel sein, aber |cffff0000es ist dennoch dringend empfohlen, GDKPd auf Version 1.2.0 oder höher zu aktualisieren|r.]=] -- Needs review
L["Enable"] = "Aktivieren"
L["Enter the amount you want to add to player %s:"] = "Wie viel Gold soll Spieler %s hinzugefügt werden?"
L["Enter the amount you want to add to the pot:"] = "Gib die Menge ein, die du dem Topf hinzufügen willst:"
L["Enter the amount you want to subtract from player %s:"] = "Wie viel Gold soll Spieler %s abgezogen werden?"
L["Enter the amount you want to subtract from the pot:"] = "Gib die Menge ein, die du dem Topf abziehen willst."
L["Enter the maximum amount of money you want to bid on %s:"] = "Gib die Menge Gold an, die du höchstens auf %s bieten willst:"
L["Export"] = "Exportieren"
L["Frame alpha"] = "Fenster-Opazität"
L["Frame scale"] = "Fensterskalierung"
L["GDKPd auction history"] = "GDKPd Auktionsliste"
L["GDKPd auction history for %s"] = "GDKPd Auktionsverlauf für %s"
L[ [=[GDKPd: Drag to move
/gdkpd and check "Lock" to hide]=] ] = [=[GDKPd: Frei beweglich
/gdkpd und "Sperren", um zu verstecken]=]
L["Loot dropped: "] = "Beute:"
L["GDKPd: No detailed data available"] = "GDKPd: Keine Details verfügbar"
L["This raid uses GDKPd to faciliate its GDKP bidding process. While you can bid on items without having GDKPd installed, installing it provides you with a GUI bidding panel, auto bidding functions, auction timers, chat filtering and more!"] = "Dieser Schlachtzug verwendet GDKPd für seine Item-Auktionen! Man kann zwar auf Items bieten ohne GDKPd zu installieren, aber das AddOn bietet ein Biet-GUI, automatisches Bieten, Auktionstimer, Chatfilter und vieles mehr!"
L["GDKPd version %s. Packaged %s."] = "GDKPd Version %s. Erstellt %s."
L["Your version of GDKPd is outdated and no longer compatible with the raid leader's in one or more functionalities. In order to ensure smooth performance, please update GDKPd."] = "Deine Version von GDKPd ist veraltet und nicht mehr mit der des Schlachtzugleiters kompatibel. Um glatte Abläufe zu garantieren, ist es empfohlen, GDKPd zu aktualisieren."
L["Your version of GDKPd is slightly outdated compared to the raid leader's. Full compability should be possible, however, you might want to take some time and update GDKPd."] = "Deine Version von GDKPd ist leicht veraltet, allerdings noch mit der des Schlachtzugleiters kompatibel. Du könntest allerdings dir etwas Zeit nehmen und GDKPd aktualisieren."
L["Hide"] = "Verstecken"
L["Hide 'Auction cancelled' announcements"] = "\"Auktion abgebrochen\"-Nachrichten verstecken"
L["Hide 'Auction cancelled' announcements from raid warning"] = "\"Auktion abgebrochen\"-Nachrichten aus der Schlachtzugswarnung verstecken"
L["Hide 'Auction finished' announcements"] = "Verstecke 'Auktion abgeschlossen'-Ankündigungen"
L["Hide 'Bidding starts' announcements"] = "Verstecke 'Auktion beginnt'-Ankündigungen"
L["Hide 'Bidding starts' announcements from raid warning"] = "Verstecke 'Auktion beginnt'-Ankündigungen aus der Schlachtzugswarnung"
L["Hide chat messages"] = "Ankündigungen verstecken"
L["Hide 'Current pot:' announcements"] = "\"Momentaner Topf:\" Ankündigungen verstecken"
L["Hide frames in combat"] = "Fenster im Kampf verstecken"
L["Hide history window"] = "Verlauffenster verstecken"
L["Hide 'New highest bidder' announcements"] = "Verstecke 'Neues Höchstgebot'-Ankündigungen"
L["Hide players' bid messages"] = "Gebote der Spieler verstecken"
L["Hide status and balance windows"] = "Status und Kontostand verstecken"
L["Hide 'Time remaining' announcements"] = "Verstecke 'Verbleibende Zeit'-Ankündigungen"
L["Hide version check window"] = "Versionsfenster verstecken"
L["Highest bidder: %s"] = "Höchstbietender: %s"
L["History"] = "Verlauf"
L["iLvL ranges"] = "iLvL Abstände"
L["Item level settings"] = "Item-Level Einstg."
L["Item settings"] = "Item-Einstlg."
L["Itm"] = "Itm"
L["Link raid member balance to pot"] = "Kontostand mit Topf verbinden"
L["Lock"] = "Sperren"
L["Mail"] = "Brief"
L["Mail money"] = "Geld schicken"
L["Manual adjustment"] = "Manuelle Anpassung"
L["Minimum bid: "] = "Minimalgebot:"
L["Minimum increment"] = "Mindesterhöhung"
L["Minimum quality"] = "Minimalqualität"
L["Min increment"] = "Min. Erhöhung"
L["Notification options"] = "Benachrichtigungseinstellungen"
L["Notify outdated versions"] = "Veraltete Versionen benachrichtigen"
L["Notify outdated versions that are compatible with your version"] = "Veraltete Versionen, die mit deiner Version kompatibel sind benachrichtigen"
L["Notify outdated versions that aren't compatible with your version"] = "Veraltete Versionen, die nicht mit deiner Version kompatibel sind benachrichtigen"
L["Notify raid members that do not have GDKPd installed"] = "Schlachtzugsmitglieder, die GDKPd nicht installiert haben, benachrichtigen"
L["Per-item settings"] = "Pro-Item-Einstellungen"
L["Player balance"] = "Spieler-Ausgleich"
L["Please enter the itemID of an item you want to drop here:"] = "Bitte Gegenstands-ID eingeben:"
L["Pot export"] = "Export"
L["Pot size: %d|cffffd100g|r"] = "Topf: %d|cffffd100g|r"
L["Prevent dragging and hide anchor"] = "Ziehen verhindern und Anker verstecken"
L["Request version data"] = "Versions-Info anfordern"
L["Require confirmation when mailing pot shares"] = "Um Bestätigung fragen, wenn Gold per Post geschickt werden soll"
L["Restart auction"] = "Auktion neu starten"
L["Revert highest bid"] = "Höchstes Gebot rückgängig machen"
L["Rules"] = "Regeln"
L["Second bidder share"] = "Anteil des Zweitbietenden"
L["Show"] = "Zeigen"
L["Show addon frames"] = "Addonfenster anzeigen"
L["Show auction duration spiral"] = "Auktionsdauer als Spirale anzeigen"
L["Show countdown text on auction duration spiral"] = "Zeittext auf Spirale anzeigen"
L["Starting bid"] = "Anfangsgebot"
L["Stop bid"] = "Nicht mehr bieten"
L["The amount of seconds between each announcement of the remaining time"] = "Die Anzahl der Sekunden zwischen Ankündigungen der verbleibenden Zeit"
L["The amount of seconds that have to pass after a bid before the auction is closed"] = "Die Anzahl an Sekunden, die nach einem Gebot vergehen müssen, bevor die Auktion geschlossen wird"
L["The amount of seconds that have to pass before the auction is closed without bids recieved"] = "Die Anzahl der Sekunden, die vergehen müssen, damit die Auktion ohne erhaltene Gebote geschlossen wird."
L["Third bidder share"] = "Anteil des Drittbietenden"
L["This player does not have GDKPd running or his version of GDKPd does not yet support version checks."] = "Dieser Spieler hat GDKPd nicht installiert oder seine GDKPd-Version unterstützt keine Versionsüberprüfung."
L["This player has the same version of GDKPd as you do. Full compability is ensured."] = "Dieser Spieler hat dieselbe Version von GDKPd wie du. Kompatiblität ist sichergestellt."
L["This player's version of GDKPd is more advanced than yours. Please consult your Curse Client for updates or manually check the curse.com page."] = "Dieser Spieler hat eine aktuellere Version von GDKPd also du. Bitte überprüfe deinen Curse Client auf Updates oder lade diese manuell auf curse.com herunter."
L["This player's version of GDKPd is outdated and one or more functionalities are not compatible:"] = "Dieser Spieler hat eine veraltete Version von GDKPd und eine oder mehrere Funktionalitäten sind nicht kompatibel:"
L["This player's version of GDKPd is outdated. However, their version should be fully compatible with yours."] = "Dieser Spieler hat eine veraltete Version von GDKPd, die jedoch mit deiner kompatibel sein sollte."
L["This version of GDKPd was never functional due to internal errors."] = "Diese Version von GDKPd war aufgrund interner Fehler nie funktionsfähig"
L["This version's player balance window will be unable to recognize distributions by you."] = "Das Ausgleichsfenster dieser Version wird keine Verteilungen erkennen können, die du durchführst."
L["This version will be unable to recognize auctions cancelled by you."] = "Diese Version wird keine von dir abgebrochenen Auktionen erkennen"
L["This version will be unable to recognize auctions started by you."] = "Diese Version wird nicht in der Lage sein, von dir gestartete Auktionen zu erkennen"
L["This version will be unable to recognize version check requests by you. Version check requests sent by this version of GDKPd will not be answered."] = "Diese Version ist mit Versionsüberprüfungen der aktuellen Version nicht kompatibel. Versionsüberprüfungen von dieser Version von GDKPd können nicht beantwortet werden." -- Needs review
L[ [=[This will completely wipe your auction history and is IRREVERSIBLE.
Are you completely SURE you want to do this?]=] ] = [=[Das Löschen des Auktionsverlaufes ist permanent und der Verlauf ist unwiederbringlich verloren.
Auktionsverlauf wirklich löschen?]=]
L["Toggle zero balance"] = "Ausgeglichene Werte an/aus"
L["Use looting system loot threshold setting"] = "Grenze des Lootsystems verwenden"
L["Use slim bidding window even while Master Looter"] = "Schlankes Bietfenster als Plündermeister verwenden"
L["Version notifications"] = "Versions-Benachrichtigungen"
L["Versions"] = "Versionen"
L["Version status for player %s"] = "Versionsdaten für Spieler %s"
L["Visibility settings"] = "Anzeigeeinstellungen"
L[ [=[WARNING!
If you use the slim bidding frame, you will be unable to cancel auctions and revert bids!
Are you certain you want to do this?]=] ] = [=[ACHTUNG!
Das schlanke Bietfenster kann weder Auktionen abbrechen noch Gebote zurücksetzen!
Wirklich ändern?]=]
L["Wipe history"] = "Verlauf löschen"
L[ [=[You have looted a monster!
Do you want GDKPd to announce loot?]=] ] = [=[Monster geplündert!
Soll GDKPd Beute bekanntgeben?]=]
L[ [=[You have selected the current pot, size %d gold.
What do you want to do with this pot?]=] ] = [=[Du hast den aktuellen Topf ausgewählt, die Grösse ist %d Gold.
Was möchtest du mit dem Topf machen?]=]
L[ [=[You have selected the following pot:
%s, dated %s, size %d gold.
What do you want to do with this pot?]=] ] = [=[Folgender Topf ist ausgewählt:
%s vom %s, enthielt %d gold.
Was soll mit diesem Topf geschehen?]=]
| 85.152866
| 466
| 0.761762
|
da343ecd9b03c3ddedfd22445f8a61319f5a8170
| 190
|
php
|
PHP
|
src/Exceptions/ValidationError.php
|
benpdavison/mandrill-api-php
|
105f9dab433b1f5ae124bb0ce6796c4a739d79e6
|
[
"Apache-2.0"
] | null | null | null |
src/Exceptions/ValidationError.php
|
benpdavison/mandrill-api-php
|
105f9dab433b1f5ae124bb0ce6796c4a739d79e6
|
[
"Apache-2.0"
] | null | null | null |
src/Exceptions/ValidationError.php
|
benpdavison/mandrill-api-php
|
105f9dab433b1f5ae124bb0ce6796c4a739d79e6
|
[
"Apache-2.0"
] | null | null | null |
<?php
namespace Mandrill\Exceptions;
/**
* The parameters passed to the API call are invalid or not provided when required
*/
class ValidationError extends \Mandrill\Exceptions\Error
{
}
| 19
| 82
| 0.768421
|
f4daee6b4542bdf374c66f2651e3ca69562c2e43
| 555
|
ts
|
TypeScript
|
src/migrations/1641464276741-AddTwitchFollowersCountColumnInUsersTable.ts
|
butadpj/ga_backend
|
a031eaed1fa4391f04c8da25cc47afb2a7008745
|
[
"MIT"
] | null | null | null |
src/migrations/1641464276741-AddTwitchFollowersCountColumnInUsersTable.ts
|
butadpj/ga_backend
|
a031eaed1fa4391f04c8da25cc47afb2a7008745
|
[
"MIT"
] | null | null | null |
src/migrations/1641464276741-AddTwitchFollowersCountColumnInUsersTable.ts
|
butadpj/ga_backend
|
a031eaed1fa4391f04c8da25cc47afb2a7008745
|
[
"MIT"
] | null | null | null |
import {MigrationInterface, QueryRunner} from "typeorm";
export class AddTwitchFollowersCountColumnInUsersTable1641464276741 implements MigrationInterface {
name = 'AddTwitchFollowersCountColumnInUsersTable1641464276741'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "user" ADD "twitch_followers_count" integer`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "twitch_followers_count"`);
}
}
| 37
| 99
| 0.765766
|
ae7252447b0566c86112893d77b7777000c2d928
| 1,447
|
cs
|
C#
|
Assets/Scripts/ArmNail.cs
|
chishige1217200/mycrane
|
e6dfd8df2580ac59b026906c87332258dc32bba3
|
[
"MIT"
] | 1
|
2021-12-18T04:54:41.000Z
|
2021-12-18T04:54:41.000Z
|
Assets/Scripts/ArmNail.cs
|
chishige1217200/mycrane
|
e6dfd8df2580ac59b026906c87332258dc32bba3
|
[
"MIT"
] | 1
|
2021-02-05T00:37:07.000Z
|
2021-02-05T00:37:07.000Z
|
Assets/Scripts/ArmNail.cs
|
chishige1217200/Mycrane
|
af9f494486716113b0d41e1c06901bc06ad626a3
|
[
"MIT"
] | null | null | null |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ArmNail : MonoBehaviour
{
CraneManager craneManager;
BaseLifter lifter;
void OnTriggerEnter(Collider collider)
{
if (collider.tag == "Floor")
{
switch (craneManager.GetCType())
{
case 1:
case 5:
case 9:
if (craneManager.GetStatus() == 6)
{
Debug.Log("床");
lifter.DownForceStop();
craneManager.IncrimentStatus();
}
break;
case 4:
if (craneManager.GetStatus() == 8)
{
Debug.Log("床");
lifter.DownForceStop();
craneManager.IncrimentStatus();
}
break;
case 6:
if (craneManager.GetStatus() == 4)
{
Debug.Log("床");
lifter.DownForceStop();
craneManager.IncrimentStatus();
}
break;
}
}
}
public void SetManager(CraneManager c)
{
craneManager = c;
}
public void SetLifter(BaseLifter r)
{
lifter = r;
}
}
| 25.839286
| 55
| 0.398065
|
c8d0d65d4ebd17748c48e01f92d93466f4af8976
| 17,940
|
css
|
CSS
|
public/css/frontend_style.css
|
lathiyaf/offer
|
7960c7c6718467a35946f376fb5c5dc5203689a7
|
[
"MIT"
] | null | null | null |
public/css/frontend_style.css
|
lathiyaf/offer
|
7960c7c6718467a35946f376fb5c5dc5203689a7
|
[
"MIT"
] | 3
|
2021-03-10T05:40:00.000Z
|
2022-02-26T22:53:34.000Z
|
public/css/frontend_style.css
|
lathiyaf/offer
|
7960c7c6718467a35946f376fb5c5dc5203689a7
|
[
"MIT"
] | null | null | null |
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
font-size: 1rem;
font-family: 'Source Sans Pro', sans-serif;
color: #505050;
background-color: #f8f8f8;
}
h1,h2,h3,h4,h5,h6{
margin: 0;
margin-bottom: 15px;
color: #333333;
}
h1,.h1{
font-size: 1.5rem;
font-weight: 700;
}
h5,.h5{
font-size: 1.125rem;
font-weight: 600;
}
h6{
font-size: 1rem;
font-weight: 700;
letter-spacing: 0.02em;
}
p{
font-size: 0.8125rem;
letter-spacing: 0.03em;
margin-bottom: 10px;
}
.mr-2{
margin-right: 0.625rem;
}
.mb-2{
margin-bottom: 0.625rem;
}
.mt-3{
margin-top: 1rem;
}
.mt-3{
margin-top: 1rem;
}
.mb-0{
margin-bottom: 0 !important;
}
.mb-3{
margin-bottom: 1rem;
}
.main-app{
padding: 40px 30px;
}
.text-center{
text-align: center;
}
.text-left{
text-align: left;
}
.container-fluid{
padding-left: 15px;
padding-right: 15px;
}
.landing-page-section{
background-color: #fff;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
padding:20px 25px;
margin-bottom: 25px;
}
.landing-page-section h1{
padding-bottom: 10px;
border-bottom: 1px solid #E4E4E4;
}
.landing-row{
display: flex;
align-items: center;
flex-wrap: wrap;
margin-left: -15px;
margin-right: -15px;
margin-top: 30px;
margin-bottom: 30px;
}
.landing-item-img{
width: 25%;
padding-left: 15px;
padding-right: 15px;
}
.landing-item-text{
width: 50%;
padding-left: 15px;
padding-right: 15px;
}
.landing-item-text h6{
margin-bottom: 25px;
}
.list-group{
display: flex;
flex-direction: column;
padding-left: 0;
margin-bottom: 0;
list-style: none;
}
.list-group li{
position: relative;
display: block;
padding: 1.1rem 1.5rem;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid #E4E4E4;
display: flex;
align-items: center;
justify-content: space-between;
}
.list-group li i{
margin-left: 15px;
}
.text-highlighte{
font-size: 0.8125rem;
display: flex;
align-items: center;
letter-spacing: 0.03em;
}
.text-highlighte span{
min-width: 1.75rem;
width: 1.75rem;
height: 1.75rem;
display: flex;
align-items: center;
justify-content: center;
background-color: #505050;
color: #fff;
border-radius: 50%;
font-size: 0.8125rem;
font-weight: 600;
margin-right: 15px;
}
.text-highlighte span.active{
background-color: #27AC22;
}
.landing-page-notes{
background-color: #fff;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
padding:20px 25px;
}
.landing-page-notes ul{
margin: 0;
padding-left: 15px;
}
.landing-page-notes ul li{
margin-bottom: 0.5rem;
letter-spacing: 0.03em;
}
.landing-page-notes ul li a{
color: #00A9A2;
}
.app-popup{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
}
.app-popup .overlay{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4)
}
.app-popup-box{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index: 999;
max-width: 900px;
width: 90%;
background-color: #fff;
max-height: 85vh;
overflow-y: auto;
border-radius: 13px;
}
.app-popup-header{
border-bottom: 1px solid #E4E4E4;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.68rem 1.5rem;
}
.app-popup-header h6{
margin: 0;
}
.app-popup-header .close-icon{
font-size: 2rem;
color: #333333;
}
.app-popup-body{
padding: 1rem 1.5rem;
}
.app-popup-body h2{
margin-bottom: 5px;
}
.popup-item-row{
display: flex;
align-items: stretch;
justify-content: center;
margin-left: -10px;
margin-right: -10px;
}
.popup-item{
width: 50%;
padding-left: 10px;
padding-right: 10px;
}
.popup-item-card{
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-clip: border-box;
border: 1px solid #E4E4E4;
height: 100%;
padding: 1.2rem;
}
.popup-item-card .card-body{
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.popup-item-card .card-body p{
width: 95%;
margin-left: auto;
margin-right: auto;
line-height: 1.5;
}
.popup-item-card .card-footer{
padding-top: 1.2rem;
}
.img-rounded{
width: 3.4375rem;
height: 3.4375rem;
background-color: #00A9A2;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
border-radius: 50%;
margin-bottom: 1rem;
}
label{
font-size: 0.8125rem;
margin-bottom: 5px;
display: block;
}
select{
-webkit-appearance: none;
appearance: none;
border: 1px solid #D7DAE2;
font-size: 0.875rem;
color: #333333;
outline:none;
padding: 0.7rem 1rem;
border-radius: 4px;
background-image: url(small-down.png);
background-repeat: no-repeat;
background-position: center right 0.7rem;
padding-right: 1.5rem;
}
.btn{
font-size: 0.9375rem;
letter-spacing: 0.03em;
color: #fff;
background-color: #00A9A2;
border-radius: 4px;
display: inline-block;
text-decoration: none;
padding: 0.5rem 1.7rem;
border: 1px solid #00A9A2;
transition: all ease-in-out 0.3s;
cursor: pointer;
}
.btn:hover,.btn:focus{
background-color: transparent;
color: #00A9A2;
}
.btn.btn-light{
border-color: #D7DAE2;
background-color: transparent;
color: #4D4F5C;
}
.btn.btn-light:hover,.btn.btn-light:focus{
background-color: #D7DAE2;
}
.btn.btn-outline{
border-color: #00A9A2;
background-color: transparent;
color: #00A9A2;
}
.btn.btn-outline:hover,.btn.btn-light:focus{
background-color: #00A9A2;
color: #fff;
}
.input-group select{
width: 100%;
}
.main-menu ul{
list-style: none;
border-bottom: 1px solid #E4E4E4;
margin: 0;
padding: 0;
}
.main-menu ul li{
display: inline-block;
padding: 0 1rem;
}
.main-menu ul li a{
display: inline-block;
font-size: 0.9375rem;
color: #43425D;
opacity: 0.5;
text-decoration: none;
padding: 0.75rem 0;
border-bottom: 2px solid transparent;
}
.main-menu ul li.active a{
border-color: #00A9A2;
color: #00A9A2;
opacity: 1;
}
.offer-list-section h1{
margin-bottom: 5px;
}
.offer-list-item{
background-color: #fff;
padding: 1rem 1.5rem;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
margin-top: 2rem;
}
.search-group{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1rem;
}
button{
-webkit-appearance: none;
appearance: none;
}
.search-group .input-search{
font-size: 0.9375rem;
letter-spacing: 0.03em;
border-radius: 4px;
display: inline-block;
text-decoration: none;
padding: 0.7rem 1.2rem;
color: #333333;
box-shadow: none;
-webkit-appearance: none;
appearance: none;
outline: none;
border: 1px solid #D7DAE2;
width: 100%;
background-image: url(icon_search.png);
background-repeat: no-repeat;
background-position: center left 0.8rem;
padding-left: 2.5rem;
border-top-right-radius: 0;
border-bottom-right-radius: 0
}
.search-group .btn{
padding-top: 0.7rem;
padding-bottom: 0.7rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-left: -1px;
}
.offer-list{
width: 100%;
font-size: 0.8125rem;
letter-spacing: 0.03em;
}
.offer-list thead td{
font-weight: 600;
}
.offer-list td.name{
width: 25%;
}
.offer-list td.action{
width: 16%;
}
.offer-list td{
padding: 1rem;
border-bottom: 1px solid #D7DAE2;
}
span.list-active{
color: #27AC22;
}
span.list-inactive{
color: #DF2E2E;
}
.action-grop{
display: flex;
align-content: center;
}
.action-item{
width: 30px;
height: 30px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.action-item:not(:last-child){
margin-right: 15px;
}
.show-more{
text-decoration: none;
color: #00A9A2;
}
.dashboard-row{
margin-left: -1rem;
margin-right: -1rem;
display: flex;
flex-wrap: wrap;
}
.dashboard-item{
padding-left: 15px;
padding-right: 15px;
margin: 15px 0;
width: 20%;
}
.dashboard-card{
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.03);
background-color: #fff;
padding: 0.7rem;
height: 100%;
}
.icon-group{
display: flex;
align-items: center;
font-size: 1.625rem;
color: #333333;
font-weight: 600;
}
.icon-group span{
min-width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
background-color: #00A9A2;
margin-right: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.heding-list{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1.5rem;
}
.heding-list h1{
margin-bottom: 5px;
}
.heding-list a:not(:last-child){
margin-right: 15px;
}
.offer-create-row{
display: flex;
flex-wrap: wrap;
margin-left: -15px;
margin-right: -15px;
}
.offer-create-row > div{
padding-left: 15px;
padding-right: 15px;
}
.offer-create-item-main{
width: 70%;
}
.custom-tooltip{
position: relative;
margin-left: 5px;
display: inline-block;
vertical-align: middle;
cursor: pointer;
}
.tooltip-text{
position: absolute;
bottom: 100%;
width: 158px;
left: 50%;
transform: translateX(-50%);
z-index: 999;
background-color: #4D4F5C;
border-radius: 4px;
padding: 0.4rem;
font-size: 0.8rem;
color: #fff;
letter-spacing: 0.03em;
font-weight: 400;
opacity: 0;
visibility: hidden;
}
.custom-tooltip:hover .tooltip-text{
opacity: 1;
visibility: visible;
}
.offer-create-card{
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
background-color: #fff;
padding: 1.5625rem;
margin-bottom: 1.25rem;
}
.offer-create-card h6{
margin-bottom: 5px;
}
.offer-create-card p{
margin-bottom: 1rem;
}
.form-contorl{
border: 1px solid #D7DAE2;
border-radius: 4px;
width: 100%;
padding: 0.7rem 1rem;
outline: none;
font-size: 0.8125rem;
}
.offer-product p{
text-align: center;
color: rgba(0, 0, 0, 0.5);
}
.offer-product-item{
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 0;
border-bottom: 1px solid #F1F1F3;
}
.offer-product-item .offer-product-img{
display: flex;
align-items: center;
margin-bottom: 0;
}
.offer-product-item .offer-product-img img{
width: 2.75rem;
margin-right: 0.75rem;
}
.offer-price-row{
margin-left: -10px;
margin-right: -10px;
display: flex;
flex-wrap: wrap;
align-items: flex-end;
}
.offer-price-row > div{
padding-left: 10px;
padding-right: 10px;
}
.offer-price-item{
width: calc(50% - 30px);
}
.offer-price-remove{
padding-bottom: 0.35rem;
}
.input-group{
display: flex;
align-items: center;
}
.input-group input{
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group select{
width: auto;
padding-right: 2rem;
width: auto;
padding-right: 2rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-left: -1px;
}
.offer-create-item-side{
width: 30%;
}
.offer-create-card .help-img{
margin: 0 auto;
display: block;
margin-bottom: 5px;
}
.offer-create-footer{
margin-top: 2rem;
border: 1px solid #D7DAE2;
border-radius: 100px;
font-size: 0.8125rem;
letter-spacing: 0.03em;
padding: 0.65rem 1rem;
display: inline-flex;
align-items: center;
}
.offer-create-footer i{
margin-right: 7px;
font-size: 1.2rem;
}
.offer-create-footer a{
color: #00A9A2;
text-decoration: none;
margin-left: 7px;
}
.theme_content{
padding: 20px;
background-color: #ffffff;
}
.theme_content .theme-content-filed .form-control{
width: 30%;
margin-bottom: 15px;
}
.btn-danger{
background-color: #f05050;
border-color: #f05050;
}
.btn-danger:hover,
.btn-danger:focus{
color: #f05050;
}
.install-info{
margin-top: 25px;
padding: 10px 15px;
background-color: #d9edf7;
border-radius: 4px;
font-size: 1rem;
}
.install-info i{
margin-right: 5px;
}
.install-info a{
color: #00A9A2;
text-decoration: none;
}
.popup-container{
width: 90%;
max-width: 990px;
margin: 0 auto;
padding: 0;
background: white;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
max-height: 90vh;
overflow-y: auto;
display: none;
}
.popup-container .popup-head{
background: #F8F9FB;
border-bottom: 1px solid #E5E5E5;
padding: 10px 15px;
position: relative;
text-align: center;
}
.popup-container .popup-head h3{
margin-bottom: 5px;
}
.close{
position: absolute;
right: 15px;
top: 15px;
}
.close a{
font-size: 30px;
text-decoration: none;
color: #000;
}
.popup-body{
padding: 40px;
}
.popup-row{
display: flex;
justify-content: center;
margin-left: -15px;
margin-right: -15px;
}
.popup-row-item{
width: 33.33333333%;
padding-left: 15px;
padding-right: 15px;
}
.install-option{
border: 1px solid #cccccc;
width: 100%;
min-height: 100%;
display: flex;
flex-direction: column;
text-align: center;
padding: 15px;
}
.install-option.install-option-green{
background: rgba(0, 169, 163, 0.050);
border: 1px solid #00A9A2;
}
.install-option .logo{
margin-top: 28px;
margin-bottom: 15px;
}
.install-option .content{
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.install-option .content h4{
margin-bottom: 5px;
}
.install-option .content ul{
list-style: none;
padding: 0;
margin: 0;
}
.install-option .first-step-btn{
padding-top: 15px;
}
.install-option .first-step-btn .btn{
width: 100%;
}
.freeHassle{
background: #00A9A2;
color: white;
border-radius: 100px;
text-align: center;
font-size: 12px;
width: 50%;
margin: 0 auto;
margin-bottom: 10px;
line-height: 1;
padding: 3px;
}
.install-option-green .logo{
margin-top: 0;
}
.automatic_install_section{
width: 90%;
max-width: 990px;
margin: 0 auto;
padding: 0;
background: white;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
max-height: 90vh;
overflow-y: auto;
text-align: center;
}
.install_section-text{
padding: 15px;
}
.install_section-text .form-control{
width: 50%;
margin-bottom: 15px;
}
.install_section-text p{
margin-bottom: 15px;
}
.steps-box-row{
display: flex;
flex-wrap: wrap;
margin-left: -15px;
margin-right: -15px;
}
.steps-box-item{
padding-left: 15px;
padding-right: 15px;
width: 50%;
}
.card-box-steps{
background-color: #fff;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.card-box-steps .steps-heading{
padding: 15px 25px;
border-bottom: 1px solid #e8e9eb;
}
.card-box-steps .steps-heading h3{
margin-bottom: 0;
}
.card-box-body{
padding: 15px 25px;
}
.from-group{
display: flex;
flex-wrap: wrap;
margin-left: -10px;
margin-right: -10px;
}
.from-group-item{
width: 50%;
padding-left: 10px;
padding-right: 10px;
}
.from-input-group{
display: flex;
align-items: stretch;
}
.from-input-group input{
width: 110px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.from-input-group .input-group-addon{
margin-left: -1px;
display: flex;
align-items: center;
padding: 6px 12px;
color: #252525;
background-color: #f4f8fb;
border: 1px solid #dbe1e8;
border-radius:4px;
border-top-left-radius: 0;
border-bottom-right-radius: 0;
}
.preview-item{
background-color: #fff;
height: 100%;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.preview-item .preview-item-head{
padding: 15px 25px;
border-bottom: 1px solid #e8e9eb;
}
.preview-item .preview-item-head h3{
margin-bottom: 0;
}
.mb-4{
margin-bottom: 30px;
}
@media (max-width:1024px){
.steps-box-item{
width: 100%;
margin-bottom: 15px;
}
.steps-box-row.mb-4{
margin-bottom: 15px;
}
}
/*****faq page****/
.navbar-main{
text-align: center;
padding: 1rem;
background-color: #fff;
box-shadow: 0 0 40px rgba(0,0,0,.1);
}
.page-banner{
background-color: #00a9a2;
padding: 3.5rem 0.5rem;
}
.page-banner h3{
margin-bottom: 0;
color: #fff;
font-size: 1.5rem;
}
.vertical-tabs{
display: flex;
flex-wrap: wrap;
margin-left: -15px;
margin-right: -15px;
}
.tab-sidebar{
width: 25%;
padding-left: 15px;
padding-right: 15px;
}
.tab-contnt{
width: 75%;
padding-left: 15px;
padding-right: 15px;
}
.tab-sidebar ul{
margin: 0;
padding: 0;
list-style: none;
}
.tab-sidebar ul li:not(:last-child){
margin-bottom: -1px;
}
.tab-sidebar ul li .nav-link{
display: block;
padding: .5rem 1rem;
border: 1px solid #ccc;
text-decoration: none;
color: #000;
}
.tab-sidebar ul li .nav-link.active{
color: #00a9a2;
border-left: 3px solid #00a9a2;
}
.panel-heading .setup-items{
padding: 1.3rem 1.25rem;
cursor: pointer;
border: 1px solid rgba(0,0,0,.125);
margin-bottom: -1px;
display: flex;
font-weight: 600;
align-items: center;
justify-content: space-between;
}
.panel-heading .setup-items i{
font-size: 20px;
color: #000;
}
.panel-collapse{
margin-top: -1px;
padding: 1rem 1.25rem;
border: 1px solid rgba(0,0,0,.125);
display: none;
}
.panel-collapse img{
margin-bottom: 15px;
max-width: 100%;
display: block;
}
.tab-pane{
display: none;
}
.tab-pane.show{
display: block;
}
| 19.311087
| 50
| 0.619287
|
33af449c87194afe41fb0208cdcb2cbf3041c446
| 970
|
c
|
C
|
srcs/main.c
|
JeremyPouyet/CTemplateList
|
bf35df6ff647f92c8492e8968e54bc85a4c989db
|
[
"BSD-3-Clause"
] | 1
|
2015-02-05T13:04:59.000Z
|
2015-02-05T13:04:59.000Z
|
srcs/main.c
|
kashimsax/CTemplateList
|
bf35df6ff647f92c8492e8968e54bc85a4c989db
|
[
"BSD-3-Clause"
] | null | null | null |
srcs/main.c
|
kashimsax/CTemplateList
|
bf35df6ff647f92c8492e8968e54bc85a4c989db
|
[
"BSD-3-Clause"
] | null | null | null |
#include <stdlib.h>
#include <stdio.h>
#include "list_exemple_a.h"
#include "list_exemple_b.h"
/*
** Includes .c file containing the list for each possibilities
*/
#undef T
#define T t_a
#include "list.c"
#undef T
#define T t_b
#include "list.c"
#undef T
/*
** two simple fnuctions for my example
*/
static void init_link(t_a *l)
{
static int i = 0;
l->i = i++;
}
static void print_list(T_LIST(t_a) **l)
{
if (*l)
{
printf("i : %d\n", (*l)->value.i);
print_list(&(*l)->next);
}
}
/*
** Here, I create a list of 20 nodes
** Then, I delete some node
** FInally, I display my list and I delete it
*/
int main()
{
T_LIST(t_a) *la = NULL;
t_a *node = NULL;
unsigned int i;
for (i = 0 ; i < 20 ; ++i)
{
if (!(node = LIST_ADD_LAST(t_a)(&la)))
return (1);
init_link(node);
}
LIST_DEL_FIRST(t_a)(&la);
LIST_DEL_AT(t_a)(&la, 9);
LIST_DEL_LAST(t_a)(&la);
print_list(&la);
LIST_DEL_ALL(t_a)(&la);
return (0);
}
| 14.69697
| 62
| 0.596907
|
b98ee0d5525d8ead2111bd7bad09bfe34a8fd459
| 4,918
|
dart
|
Dart
|
lib/src/bip39_base.dart
|
InvertedX/bip39
|
e249a9bd7fd64b155ffef45a53336c5c8005a39d
|
[
"BSD-3-Clause"
] | null | null | null |
lib/src/bip39_base.dart
|
InvertedX/bip39
|
e249a9bd7fd64b155ffef45a53336c5c8005a39d
|
[
"BSD-3-Clause"
] | null | null | null |
lib/src/bip39_base.dart
|
InvertedX/bip39
|
e249a9bd7fd64b155ffef45a53336c5c8005a39d
|
[
"BSD-3-Clause"
] | null | null | null |
import 'dart:math';
import 'dart:typed_data';
import 'package:crypto/crypto.dart' show sha256;
import 'package:hex/hex.dart';
import 'utils/pbkdf2.dart';
import 'wordlists/english.dart';
const int _SIZE_BYTE = 255;
const _INVALID_MNEMONIC = 'Invalid mnemonic';
const _INVALID_ENTROPY = 'Invalid entropy';
const _INVALID_CHECKSUM = 'Invalid mnemonic checksum';
typedef Uint8List RandomBytes(int size);
Uint8List randomBytes(int size) {
final rng = Random.secure();
final bytes = Uint8List(size);
for (var i = 0; i < size; i++) {
bytes[i] = rng.nextInt(_SIZE_BYTE);
}
return bytes;
}
class Bip39 {
String mnemonic;
PBKDF2 pbkdf2;
Bip39({String mnemonic, String fromEntropy, fromBytes: Uint8List}) {
if (mnemonic != null) {
this.mnemonic = mnemonic;
this.getEntropy();
}
if (fromEntropy != null) {
this.mnemonic = Bip39.entropyToMnemonic(fromEntropy);
this.getEntropy();
}
}
Bip39 generateMnemonic(
{int strength = 128,
RandomBytes randomBytes = randomBytes,
String passphrase = ""}) {
assert(strength % 32 == 0);
final entropy = randomBytes(strength ~/ 8);
mnemonic = entropyToMnemonic(HEX.encode(entropy));
return this;
}
Uint8List toSeed({String passPhrase = ""}) {
if (mnemonic == null) {
throw new AssertionError(
"Invalid mnemonic, you need to pass or generate mnemonic");
}
return PBKDF2.process(mnemonic, passPhrase: passPhrase);
}
String getMnemonic() {
return mnemonic;
}
toSeedHEX({String passPhrase = ""}) {
return toSeed(passPhrase: passPhrase).map((byte) {
return byte.toRadixString(16).padLeft(2, '0');
}).join('');
}
bool validate() {
try {
getEntropy();
} catch (e) {
return false;
}
return true;
}
String getEntropy() {
if (mnemonic == null) {
throw new AssertionError(
"Invalid mnemonic, you need to pass or generate mnemonic");
}
var words = mnemonic.split(' ');
if (words.length % 3 != 0) {
throw new ArgumentError(_INVALID_MNEMONIC);
}
final wordlist = WORDLIST;
// convert word indices to 11 bit binary strings
final bits = words.map((word) {
final index = wordlist.indexOf(word);
if (index == -1) {
throw new ArgumentError(_INVALID_MNEMONIC);
}
return index.toRadixString(2).padLeft(11, '0');
}).join('');
// split the binary string into ENT/CS
final dividerIndex = (bits.length / 33).floor() * 32;
final entropyBits = bits.substring(0, dividerIndex);
final checksumBits = bits.substring(dividerIndex);
// calculate the checksum and compare
final regex = RegExp(r".{1,8}");
final entropyBytes = Uint8List.fromList(regex
.allMatches(entropyBits)
.map((match) => _binaryToByte(match.group(0)))
.toList(growable: false));
if (entropyBytes.length < 16) {
throw StateError(_INVALID_ENTROPY);
}
if (entropyBytes.length > 32) {
throw StateError(_INVALID_ENTROPY);
}
if (entropyBytes.length % 4 != 0) {
throw StateError(_INVALID_ENTROPY);
}
final newChecksum = _deriveChecksumBits(entropyBytes);
if (newChecksum != checksumBits) {
throw StateError(_INVALID_CHECKSUM);
}
return entropyBytes.map((byte) {
return byte.toRadixString(16).padLeft(2, '0');
}).join('');
}
static bool validateMnemonic(String mnemonic) {
try {
return Bip39(mnemonic: mnemonic).validate();
} catch (e) {
return false;
}
}
static String entropyToMnemonic(String entropyString) {
final entropy = HEX.decode(entropyString);
if (entropy.length < 16) {
throw ArgumentError(_INVALID_ENTROPY);
}
if (entropy.length > 32) {
throw ArgumentError(_INVALID_ENTROPY);
}
if (entropy.length % 4 != 0) {
throw ArgumentError(_INVALID_ENTROPY);
}
final entropyBits = _bytesToBinary(entropy);
final checksumBits = _deriveChecksumBits(entropy);
final bits = entropyBits + checksumBits;
final regex =
new RegExp(r".{1,11}", caseSensitive: false, multiLine: false);
final chunks = regex
.allMatches(bits)
.map((match) => match.group(0))
.toList(growable: false);
List<String> wordlist = WORDLIST;
String words =
chunks.map((binary) => wordlist[_binaryToByte(binary)]).join(' ');
return words;
}
static String _bytesToBinary(Uint8List bytes) {
return bytes.map((byte) => byte.toRadixString(2).padLeft(8, '0')).join('');
}
static int _binaryToByte(String binary) {
return int.parse(binary, radix: 2);
}
static String _deriveChecksumBits(Uint8List entropy) {
final ENT = entropy.length * 8;
final CS = ENT ~/ 32;
final hash = sha256.newInstance().convert(entropy);
return _bytesToBinary(Uint8List.fromList(hash.bytes)).substring(0, CS);
}
}
| 28.264368
| 79
| 0.643961
|
143987b8cb1be32221b65a60d6d6c775b4b26255
| 266
|
lua
|
Lua
|
MMOCoreORB/bin/scripts/object/custom_content/tangible/tcg/series4/consumable_falleens_fist.lua
|
V-Fib/FlurryClone
|
40e0ca7245ec31b3815eb6459329fd9e70f88936
|
[
"Zlib",
"OpenSSL"
] | 18
|
2017-02-09T15:36:05.000Z
|
2021-12-21T04:22:15.000Z
|
MMOCoreORB/bin/scripts/object/custom_content/tangible/tcg/series4/consumable_falleens_fist.lua
|
V-Fib/FlurryClone
|
40e0ca7245ec31b3815eb6459329fd9e70f88936
|
[
"Zlib",
"OpenSSL"
] | 61
|
2016-12-30T21:51:10.000Z
|
2021-12-10T20:25:56.000Z
|
MMOCoreORB/bin/scripts/object/custom_content/tangible/tcg/series4/consumable_falleens_fist.lua
|
V-Fib/FlurryClone
|
40e0ca7245ec31b3815eb6459329fd9e70f88936
|
[
"Zlib",
"OpenSSL"
] | 71
|
2017-01-01T05:34:38.000Z
|
2022-03-29T01:04:00.000Z
|
object_tangible_tcg_series4_consumable_falleens_fist = object_tangible_tcg_series4_shared_consumable_falleens_fist:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series4_consumable_falleens_fist, "object/tangible/tcg/series4/consumable_falleens_fist.iff")
| 53.2
| 141
| 0.913534
|
0b84bd54aad92823bd2e93f0ebd7b6fc7fdd7f13
| 34,038
|
dart
|
Dart
|
test/test_vector.dart
|
pbad-pades/SignDart
|
29a927eb7632d8a7ed08e9c98c4bd2f16d81130c
|
[
"BSD-3-Clause"
] | 3
|
2021-11-04T22:51:05.000Z
|
2022-01-25T22:27:02.000Z
|
test/test_vector.dart
|
pbad-pades/SignDart
|
29a927eb7632d8a7ed08e9c98c4bd2f16d81130c
|
[
"BSD-3-Clause"
] | null | null | null |
test/test_vector.dart
|
pbad-pades/SignDart
|
29a927eb7632d8a7ed08e9c98c4bd2f16d81130c
|
[
"BSD-3-Clause"
] | 1
|
2022-01-25T22:27:09.000Z
|
2022-01-25T22:27:09.000Z
|
import 'dart:typed_data';
final List<Uint8List> ed521PrivateKeyVector = [
Uint8List.fromList([
0xea, 0x17, 0x38, 0x71, 0x2e, 0x20, 0x80,
0xf0, 0xbf, 0xef, 0x35, 0x99, 0x33, 0x4f,
0x22, 0x5f, 0xdc, 0xdc, 0x9f, 0xd4, 0xdb,
0x05, 0x6d, 0x5e, 0xd6, 0x26, 0xb2, 0x6a,
0x7b, 0x97, 0x03, 0x59, 0xe5, 0x5f, 0xcb,
0x48, 0xc1, 0x34, 0xab, 0xa7, 0x82, 0x5d,
0x14, 0xa9, 0xf7, 0x10, 0x94, 0x73, 0x46,
0x29, 0x76, 0xc9, 0x5f, 0xd0, 0x9c, 0xe2,
0xa5, 0xb7, 0x44, 0x16, 0xa5, 0x97, 0x7f,
0x71, 0x04, 0xad
]),
Uint8List.fromList([
0x31, 0x9e, 0x75, 0x37, 0x6a, 0xdf, 0x38,
0x18, 0xa1, 0x34, 0xba, 0xd4, 0xef, 0xef,
0xa7, 0x97, 0xf6, 0x2a, 0x5b, 0xb2, 0x48,
0xaf, 0x88, 0x0d, 0xb6, 0x98, 0x44, 0x2f,
0xfd, 0x01, 0xb1, 0xd6, 0x87, 0x2f, 0xf6,
0x80, 0xc4, 0x28, 0xf1, 0xe6, 0x82, 0x9b,
0xdc, 0x6e, 0x07, 0x88, 0x46, 0x9c, 0x59,
0x2f, 0xf4, 0x67, 0x74, 0x15, 0x08, 0x2c,
0xc8, 0x37, 0xb5, 0xdd, 0x15, 0xf5, 0x35,
0xe6, 0xd9, 0x22
]),
Uint8List.fromList([
0x69, 0xcf, 0x56, 0x62, 0xba, 0x62, 0x35,
0x3f, 0x7f, 0x20, 0x38, 0x0f, 0x6f, 0xf0,
0x64, 0x59, 0x82, 0xa1, 0x0c, 0x23, 0x65,
0xea, 0xbf, 0xe6, 0x28, 0xf4, 0xef, 0x33,
0x74, 0x67, 0x3e, 0x01, 0xcf, 0x75, 0xe2,
0x8d, 0x3f, 0xd4, 0xda, 0x3c, 0x4a, 0x76,
0xed, 0x45, 0xb5, 0x2c, 0x81, 0xb5, 0xbc,
0xfd, 0x8e, 0x44, 0x27, 0x9e, 0xdb, 0x2f,
0x9b, 0xcc, 0x2b, 0xaa, 0xdd, 0xf4, 0x51,
0x7f, 0x77, 0x91
]),
Uint8List.fromList([
0xcf, 0x6a, 0xaf, 0xa1, 0x12, 0x16, 0xe0,
0x20, 0x11, 0x7c, 0x72, 0xfc, 0x47, 0x39,
0x1e, 0xba, 0x52, 0x57, 0xe5, 0xe0, 0x24,
0xff, 0xa6, 0x70, 0x05, 0x71, 0x97, 0xb5,
0x74, 0x2d, 0x43, 0x03, 0xdb, 0xfb, 0x1e,
0x99, 0xae, 0x57, 0xef, 0xaa, 0x3d, 0x50,
0xa9, 0x25, 0xe6, 0x0f, 0xce, 0xc7, 0x32,
0x93, 0x2e, 0x7f, 0x18, 0xe5, 0x5c, 0x74,
0x36, 0x90, 0x8a, 0x4a, 0x26, 0x44, 0x1b,
0x30, 0x08, 0xad
]),
Uint8List.fromList([
0xdb, 0x58, 0x19, 0x36, 0x46, 0xce, 0x4c,
0x65, 0x19, 0xe8, 0x45, 0xbf, 0xde, 0x91,
0x87, 0xee, 0xde, 0x69, 0x8c, 0x6e, 0x67,
0x08, 0x5a, 0x77, 0xc0, 0x08, 0xb0, 0x5d,
0x87, 0xdb, 0xc8, 0xf5, 0x70, 0xfb, 0x63,
0xbe, 0xc8, 0x84, 0x24, 0xa4, 0x9a, 0x32,
0xfa, 0x67, 0x05, 0x20, 0x44, 0x48, 0xb5,
0xb6, 0x97, 0xf4, 0x8f, 0x20, 0x98, 0x57,
0xba, 0xd9, 0xd5, 0xff, 0x5d, 0x69, 0xd8,
0x72, 0xa9, 0x4b
]),
Uint8List.fromList([
0x22, 0xbc, 0x59, 0x74, 0xfc, 0x08, 0xe7,
0x68, 0x33, 0x44, 0xe7, 0xf4, 0xf2, 0xf8,
0xae, 0x65, 0xf8, 0x17, 0x8c, 0x2d, 0x71,
0xbb, 0xc7, 0xa7, 0xa6, 0x9a, 0x01, 0x58,
0x85, 0xad, 0xd9, 0x7d, 0xbe, 0x0c, 0x27,
0x37, 0xec, 0xfd, 0x26, 0x4d, 0x71, 0x40,
0xb8, 0xc7, 0x21, 0x67, 0xd9, 0xdc, 0x64,
0x8a, 0xcc, 0xa1, 0xd7, 0x97, 0x5b, 0x1b,
0x99, 0x6d, 0x46, 0xaf, 0x0d, 0x78, 0x4b,
0x76, 0x9c, 0x29
]),
Uint8List.fromList([
0xa6, 0x8f, 0x0c, 0x18, 0x54, 0x5b, 0x3f,
0xde, 0xeb, 0xa5, 0xdf, 0x37, 0x23, 0xd2,
0x77, 0x3c, 0x6a, 0x70, 0xcb, 0x36, 0x6a,
0x85, 0xa4, 0xde, 0x5c, 0x6d, 0xb8, 0x03,
0xd2, 0x84, 0x41, 0x35, 0xf9, 0x00, 0x19,
0xfd, 0x06, 0xbb, 0xce, 0x5b, 0xe7, 0x64,
0xda, 0xa1, 0x7e, 0x00, 0x23, 0x9d, 0x8a,
0xe2, 0x7f, 0xf5, 0x06, 0x99, 0x0d, 0x88,
0xd0, 0xb4, 0x66, 0xce, 0x18, 0xa8, 0xb5,
0xb2, 0xf2, 0x56
]),
Uint8List.fromList([
0x44, 0x0b, 0xb8, 0xc4, 0xa8, 0xea, 0x54,
0xa5, 0x1f, 0x93, 0x12, 0xf0, 0x52, 0xe4,
0xdc, 0x1d, 0x3f, 0x21, 0x10, 0xa2, 0x12,
0x5a, 0x20, 0x43, 0x12, 0x0c, 0x67, 0x3d,
0xaa, 0xa6, 0x01, 0x91, 0x35, 0x8a, 0x13,
0x28, 0xf2, 0xb3, 0x7f, 0x4d, 0x96, 0xb5,
0x20, 0x9f, 0x04, 0x97, 0xde, 0x8b, 0x60,
0xbe, 0xfe, 0x93, 0xdd, 0xd3, 0x46, 0x0f,
0xbc, 0x28, 0x12, 0xa3, 0x8d, 0x38, 0x0b,
0xec, 0x87, 0x26
]),
];
final List<Uint8List> ed521PublicKeyVector = [
Uint8List.fromList([
0xc1, 0x92, 0x2a, 0x80, 0xcf, 0xad, 0x9e,
0xec, 0x69, 0x1b, 0x79, 0x09, 0xe8, 0xbe,
0xf9, 0x22, 0xe4, 0x0c, 0x0f, 0x0f, 0x86,
0xa4, 0x79, 0x3f, 0xac, 0x84, 0xd4, 0x42,
0x38, 0x85, 0x9c, 0x5d, 0x63, 0xc7, 0xe3,
0x3b, 0x03, 0xc2, 0x1f, 0xe9, 0xad, 0x2a,
0xc3, 0xc4, 0xd2, 0x28, 0x2b, 0xa4, 0x45,
0xdc, 0x51, 0x40, 0xde, 0x18, 0x6a, 0x9c,
0x58, 0x8c, 0x43, 0xa6, 0x7d, 0x87, 0xf3,
0x84, 0xd9, 0x80]
),
Uint8List.fromList([
0xe9, 0x5b, 0xe7, 0x73, 0xf7, 0xf3, 0x83,
0x23, 0x31, 0x30, 0xb8, 0x9e, 0x89, 0xb9,
0x49, 0xb8, 0x6f, 0x05, 0x1d, 0xef, 0x83,
0xad, 0x7a, 0x1f, 0x79, 0xb1, 0x86, 0x66,
0x53, 0x79, 0x93, 0x10, 0x4b, 0xa5, 0x2e,
0x58, 0xc8, 0x9b, 0x59, 0x42, 0x7a, 0x2f,
0x7c, 0xbe, 0x38, 0xa3, 0xbd, 0x3a, 0x38,
0x41, 0x41, 0x3f, 0x3f, 0x63, 0xbc, 0xec,
0x33, 0xd6, 0x48, 0x0f, 0xbf, 0xed, 0xc0,
0xff, 0x65, 0x01
]),
Uint8List.fromList([
0xdf, 0xfe, 0x70, 0x01, 0xfa, 0x2a, 0xf8,
0x09, 0xdc, 0xc6, 0xab, 0x94, 0x19, 0xcc,
0xe6, 0x3f, 0xa3, 0x81, 0x68, 0xfd, 0x43,
0xe0, 0x43, 0x35, 0x90, 0x76, 0x76, 0xcf,
0x94, 0xb6, 0x8b, 0x94, 0xf2, 0xed, 0x62,
0x48, 0xea, 0x82, 0xc4, 0x43, 0xdf, 0xa0,
0x5e, 0x2e, 0x50, 0x40, 0x10, 0x81, 0xf8,
0xa1, 0xd9, 0x53, 0x11, 0x41, 0xe6, 0xef,
0x01, 0x67, 0xc2, 0xcf, 0xd6, 0x09, 0x5c,
0x2b, 0xb0, 0x81
]),
Uint8List.fromList([
0x6a, 0x00, 0xc4, 0x88, 0xab, 0x20, 0xee,
0xa1, 0x4c, 0x2e, 0x08, 0x1f, 0xbb, 0x96,
0x4e, 0xaf, 0xd9, 0xad, 0x48, 0x2f, 0x8d,
0x0e, 0x2f, 0x33, 0x4d, 0xc0, 0x37, 0x8c,
0x0e, 0x6d, 0xd7, 0x04, 0xb6, 0x3e, 0x26,
0xa1, 0xd1, 0xc7, 0x4e, 0xf6, 0x21, 0x96,
0x86, 0x94, 0xae, 0x3a, 0x25, 0x2a, 0x59,
0x8b, 0x2b, 0x34, 0x51, 0xef, 0x6d, 0x08,
0xb8, 0x58, 0xb1, 0x3a, 0x4e, 0x83, 0xc9,
0xdf, 0x39, 0x00
]),
Uint8List.fromList([
0x9e, 0x85, 0xbe, 0x73, 0xd7, 0x35, 0xe5,
0xe8, 0x1f, 0xd7, 0xcb, 0x01, 0x6e, 0x54,
0x01, 0xf5, 0xb1, 0xc0, 0x70, 0x00, 0x84,
0x12, 0x48, 0xac, 0x3f, 0x78, 0xde, 0xc3,
0x21, 0x30, 0x77, 0x40, 0xe6, 0xe2, 0x2c,
0x10, 0xe6, 0x56, 0xef, 0xaa, 0x71, 0x03,
0xa1, 0xf1, 0x87, 0x3f, 0x68, 0xef, 0x5a,
0x1e, 0xd6, 0x29, 0x74, 0x1e, 0x32, 0x53,
0x1d, 0x77, 0x69, 0xc5, 0x46, 0xb9, 0x78,
0xb8, 0x23, 0x80
]),
Uint8List.fromList([
0x98, 0x6f, 0x86, 0x9d, 0xd9, 0x1e, 0xf5,
0x0f, 0x79, 0x96, 0xa2, 0x81, 0x6a, 0x61,
0x18, 0x53, 0x1c, 0x47, 0x0b, 0x6e, 0x86,
0x41, 0xca, 0xf8, 0xcb, 0xe0, 0x23, 0x5b,
0xf9, 0x4b, 0x62, 0xe5, 0x32, 0xc1, 0xb2,
0xa4, 0x19, 0xc0, 0x5a, 0xee, 0x5b, 0x69,
0x16, 0xdd, 0x70, 0x40, 0x1b, 0xe0, 0x52,
0x79, 0x08, 0x6c, 0xb0, 0xdd, 0xc1, 0x81,
0xcd, 0xd7, 0xf8, 0x85, 0x4c, 0x54, 0x20,
0x12, 0xa2, 0x01
]),
Uint8List.fromList([
0x6d, 0x6e, 0x81, 0x04, 0xc8, 0xf7, 0xdd,
0x79, 0x18, 0x0c, 0x42, 0x93, 0xeb, 0x72,
0x3a, 0x46, 0x6e, 0xa0, 0x32, 0x69, 0xe9,
0xac, 0xfb, 0x3c, 0xf2, 0x1d, 0x18, 0x04,
0x4a, 0x86, 0x3c, 0x7f, 0x7e, 0x60, 0xec,
0x03, 0x42, 0x68, 0x7e, 0xeb, 0x47, 0x80,
0xce, 0xd5, 0x52, 0x6b, 0x24, 0xde, 0x7e,
0x52, 0x32, 0x4b, 0x0f, 0xd6, 0x13, 0x9e,
0xf9, 0xae, 0xf3, 0xd9, 0x82, 0x5a, 0x37,
0x36, 0x8a, 0x00
]),
Uint8List.fromList([
0xd7, 0x18, 0x43, 0x3f, 0x5d, 0xa0, 0x17,
0x30, 0x24, 0xac, 0xca, 0xf7, 0x8c, 0xe3,
0x51, 0x8e, 0xb3, 0xb5, 0xa0, 0xbc, 0x35,
0x61, 0x6b, 0x02, 0x43, 0x8d, 0xe3, 0x73,
0x78, 0xb7, 0x42, 0x9c, 0x1a, 0xc0, 0x7b,
0xd8, 0x44, 0xf9, 0x6d, 0x68, 0x99, 0x1a,
0xb8, 0x38, 0x4e, 0x5e, 0x8f, 0x69, 0x34,
0x3c, 0x13, 0x01, 0x4f, 0x84, 0x39, 0xa4,
0xdc, 0x94, 0x00, 0xe0, 0xa0, 0x0a, 0x0a,
0x4b, 0xab, 0x81
]),
];
final List<Uint8List> ed521SignatureVector = [
Uint8List.fromList([
0xd2, 0x01, 0x59, 0x78, 0x55, 0xeb, 0x6d,
0x3d, 0x37, 0x89, 0x32, 0xb1, 0xdf, 0xf2,
0xe0, 0x43, 0xcc, 0x76, 0x90, 0xa0, 0xac,
0x25, 0xc4, 0x18, 0x1f, 0x16, 0xb9, 0x8f,
0x13, 0xd6, 0x46, 0xf4, 0x1a, 0xf3, 0xa6,
0xe7, 0xe3, 0x97, 0x3b, 0xb6, 0x0f, 0xcd,
0x55, 0xef, 0xab, 0x48, 0x01, 0x24, 0x36,
0x8b, 0xb5, 0x42, 0x7e, 0x5b, 0xe3, 0x40,
0xc0, 0xf6, 0xf1, 0xa5, 0xda, 0x6e, 0xed,
0xbf, 0x5d, 0x80, 0x36, 0x0b, 0x82, 0xf1,
0x84, 0xc1, 0x37, 0xe5, 0xbd, 0x74, 0x1f,
0xbb, 0x61, 0x16, 0x50, 0xc3, 0x85, 0x41,
0x4d, 0x68, 0x3f, 0xae, 0x55, 0x72, 0x0b,
0xf3, 0xcb, 0x0f, 0x69, 0x42, 0xa6, 0xf2,
0x92, 0x5c, 0xc9, 0xb9, 0x0e, 0x4e, 0x6b,
0x8e, 0x74, 0x7e, 0x9a, 0x0b, 0xaf, 0x5a,
0xc9, 0xb6, 0x15, 0x27, 0xca, 0xdd, 0x39,
0x7e, 0xcb, 0x83, 0x1b, 0x2c, 0x9c, 0x22,
0x39, 0x42, 0xb5, 0xea, 0x56, 0x00
]),
Uint8List.fromList([
0x31, 0xa8, 0x28, 0x4a, 0xaf, 0x67, 0x38,
0x97, 0x4a, 0x98, 0x1a, 0xa8, 0x80, 0x66,
0x95, 0x4f, 0xd4, 0xbb, 0x82, 0x44, 0x2e,
0xa7, 0xb7, 0xab, 0x45, 0xa2, 0x37, 0xeb,
0x7f, 0x17, 0x7a, 0x11, 0x28, 0xcf, 0x98,
0x05, 0x29, 0xe0, 0x36, 0x33, 0xb3, 0x32,
0xc4, 0x8e, 0x24, 0x5e, 0x7b, 0x7d, 0xe1,
0x2a, 0xc1, 0xa2, 0xae, 0x05, 0x3e, 0x2d,
0x37, 0x46, 0x72, 0x22, 0xb7, 0x2d, 0x12,
0xda, 0xd6, 0x81, 0xea, 0x05, 0x23, 0xcc,
0x32, 0x72, 0x4a, 0xfb, 0xaf, 0x27, 0xc0,
0x97, 0x3e, 0x78, 0x1f, 0xfb, 0x44, 0xa0,
0xb7, 0x66, 0x7e, 0xfd, 0x5b, 0x60, 0x66,
0x51, 0x40, 0x88, 0xdf, 0xed, 0x03, 0x58,
0x09, 0x5e, 0x34, 0xe7, 0xd8, 0x10, 0x55,
0x13, 0xf4, 0x6d, 0x99, 0x37, 0x61, 0x60,
0xf5, 0xef, 0x97, 0xab, 0xa9, 0x18, 0xee,
0x8d, 0xb8, 0x19, 0xbd, 0x35, 0xc3, 0x27,
0x3d, 0x24, 0xb6, 0x3e, 0x3d, 0x00
]),
Uint8List.fromList([
0xc4, 0xdd, 0x23, 0x63, 0x87, 0xbb, 0x9b,
0x35, 0xd6, 0x7f, 0x78, 0x52, 0x96, 0xb8,
0xf6, 0xe2, 0x89, 0x8c, 0xc0, 0x31, 0xdd,
0x87, 0x85, 0xe7, 0x1d, 0x90, 0x00, 0x25,
0x32, 0x63, 0xca, 0xcf, 0x4b, 0xc0, 0x9a,
0xb3, 0x7b, 0x20, 0x18, 0x4d, 0x6d, 0x5f,
0xd1, 0xc7, 0xe8, 0x47, 0x25, 0x51, 0xa0,
0xee, 0x45, 0xb9, 0x48, 0xeb, 0x41, 0xba,
0x54, 0x4a, 0x36, 0x2a, 0xe8, 0x35, 0x4c,
0xf5, 0x58, 0x01, 0x89, 0x88, 0xaa, 0x06,
0xe6, 0xab, 0x7d, 0x23, 0x3d, 0x4d, 0xed,
0x0d, 0x2e, 0xb6, 0x09, 0x43, 0xfe, 0x2d,
0x02, 0xfe, 0x25, 0x7b, 0xb7, 0x87, 0xd4,
0xcd, 0x86, 0xb1, 0x83, 0x78, 0x63, 0xf7,
0x75, 0x89, 0x24, 0x9f, 0xbf, 0x46, 0xb7,
0x1e, 0x03, 0x4b, 0xce, 0x05, 0x64, 0xce,
0xd7, 0x14, 0x9c, 0xa4, 0x6e, 0x5c, 0x40,
0x2d, 0x62, 0x72, 0x3f, 0x6a, 0xe9, 0xc4,
0xb1, 0xa4, 0x6a, 0xbe, 0x23, 0x00
]),
Uint8List.fromList([
0x28, 0x65, 0x67, 0x7a, 0x2e, 0x6b, 0xaf,
0xb6, 0xc5, 0xc6, 0xab, 0xe3, 0x80, 0x4a,
0x4c, 0x05, 0xd4, 0xb0, 0xdd, 0xfe, 0x6d,
0x1c, 0xd7, 0x7e, 0xa9, 0xfe, 0x91, 0x59,
0x70, 0x3d, 0x66, 0x2f, 0xc6, 0x33, 0xf7,
0xf7, 0x64, 0x75, 0xf0, 0x0c, 0xb8, 0x50,
0x52, 0x3e, 0x76, 0xd1, 0x78, 0xfc, 0x20,
0xc0, 0xae, 0x71, 0x4b, 0xdc, 0x08, 0x64,
0x73, 0x88, 0xd9, 0x33, 0xe8, 0xee, 0xf4,
0xd6, 0x6b, 0x80, 0x26, 0x04, 0xce, 0xfb,
0x93, 0xa5, 0x79, 0x34, 0x22, 0x68, 0xb3,
0x80, 0x11, 0x34, 0xa4, 0x30, 0x3a, 0x0d,
0x80, 0x67, 0x76, 0xe7, 0x80, 0x0e, 0xc8,
0xe4, 0x34, 0xad, 0x5e, 0x81, 0xf2, 0x36,
0xba, 0x27, 0xcd, 0x85, 0xff, 0x02, 0x1b,
0x52, 0x46, 0x7b, 0x4b, 0x19, 0x65, 0xee,
0xd6, 0x31, 0x9f, 0x0f, 0x10, 0x35, 0x0c,
0x0b, 0xd9, 0x71, 0xaa, 0xc4, 0xec, 0x82,
0xe1, 0x1c, 0xe3, 0xcb, 0x35, 0x00
]),
Uint8List.fromList([
0x46, 0x73, 0xb4, 0xff, 0x1e, 0x31, 0xe0,
0x50, 0x52, 0x08, 0xe0, 0xdf, 0xd1, 0xe6,
0x45, 0x04, 0x5b, 0x22, 0x3f, 0x37, 0xd3,
0xd0, 0xa3, 0xa9, 0x41, 0xf6, 0x2d, 0x79,
0xb7, 0x2d, 0x9c, 0xae, 0x14, 0x53, 0x18,
0xf9, 0x67, 0x01, 0xa8, 0x27, 0xe2, 0xbb,
0x7e, 0x7c, 0xb4, 0x65, 0x76, 0x85, 0xbb,
0xd1, 0x2f, 0x22, 0xbf, 0x67, 0xe2, 0x94,
0x00, 0x87, 0x3d, 0xbb, 0x4d, 0x3e, 0xd7,
0x45, 0xf8, 0x80, 0x2b, 0x29, 0x94, 0xa7,
0x60, 0x9c, 0x2d, 0x01, 0x17, 0x41, 0xd2,
0x90, 0x85, 0xfc, 0xc2, 0xa4, 0x5d, 0xb0,
0xe0, 0xa9, 0xe9, 0xa1, 0x91, 0xa0, 0xa3,
0xea, 0xf7, 0x61, 0x9d, 0x02, 0x5f, 0xb6,
0xe9, 0xc3, 0x0e, 0xff, 0x9e, 0xfd, 0x81,
0x27, 0x2c, 0x93, 0xd7, 0x94, 0x0f, 0x7e,
0xb0, 0xdf, 0xd3, 0xa9, 0x6c, 0x8f, 0x38,
0x5a, 0x6f, 0x84, 0x29, 0x65, 0x6b, 0x06,
0x31, 0x68, 0x47, 0xd1, 0x3d, 0x00
]),
Uint8List.fromList([
0x78, 0xbc, 0x83, 0xc7, 0x2f, 0x98, 0x67,
0x31, 0xf4, 0xb9, 0x09, 0x9e, 0x84, 0xbe,
0x88, 0x47, 0xc5, 0x34, 0x6c, 0x13, 0x1c,
0xab, 0xa6, 0x44, 0xfc, 0x1d, 0x7f, 0xd7,
0xec, 0xd4, 0xb9, 0xdc, 0x47, 0xb5, 0xa1,
0x5e, 0xe2, 0x88, 0xb2, 0xbc, 0x42, 0xa0,
0x7c, 0xb9, 0x5e, 0xc7, 0x48, 0x98, 0xa0,
0x60, 0xb3, 0x25, 0xb2, 0xe8, 0xc2, 0xca,
0x6e, 0x41, 0x21, 0xb3, 0x90, 0x69, 0x0b,
0x64, 0x8c, 0x81, 0x22, 0xdb, 0x7d, 0x33,
0x34, 0x99, 0xe1, 0xba, 0x1f, 0x7a, 0x2a,
0xd8, 0xd4, 0xd7, 0x2b, 0x7e, 0xb3, 0xe2,
0x5e, 0x75, 0x96, 0xd4, 0xae, 0x2e, 0xf2,
0x25, 0x61, 0xd5, 0x99, 0xc2, 0xb3, 0xe6,
0x9b, 0x48, 0x7d, 0x56, 0x9d, 0xe9, 0x4a,
0xbc, 0x6e, 0x6f, 0xc9, 0x89, 0x1d, 0x1f,
0xba, 0xfd, 0x8b, 0x15, 0xb7, 0x20, 0x7a,
0x87, 0xe5, 0xe5, 0xde, 0x40, 0xfd, 0x57,
0xfb, 0xff, 0x9f, 0xb2, 0x1a, 0x00
]),
Uint8List.fromList([
0x78, 0xa6, 0xa4, 0xb8, 0x98, 0x19, 0xb7,
0x29, 0xc3, 0xa0, 0x18, 0x41, 0x3d, 0x75,
0x53, 0xf9, 0xc8, 0x91, 0x20, 0xa3, 0x6e,
0x28, 0x0e, 0xd6, 0xaf, 0xab, 0xf2, 0x6e,
0x56, 0x32, 0x8b, 0x12, 0x1e, 0x11, 0xaa,
0x42, 0x92, 0x4c, 0x0f, 0xdd, 0xdd, 0x1c,
0x98, 0x67, 0xbc, 0x95, 0xee, 0x7f, 0xaa,
0xbb, 0x51, 0xbc, 0x88, 0x4c, 0x86, 0x2b,
0xee, 0xf7, 0xb7, 0x4e, 0xad, 0x70, 0x06,
0x27, 0x55, 0x00, 0xc1, 0xb9, 0xba, 0x9c,
0x37, 0x62, 0xc8, 0x0c, 0xc0, 0x2f, 0x71,
0xcd, 0x8e, 0x6b, 0x61, 0xb5, 0x58, 0x56,
0x9b, 0x6f, 0x1b, 0xb3, 0x7f, 0x23, 0x2a,
0x9d, 0x0e, 0xc9, 0x46, 0x61, 0xff, 0xa0,
0x46, 0xaa, 0x9c, 0xe0, 0x63, 0x17, 0x03,
0xdf, 0xb5, 0x97, 0x86, 0xaf, 0x68, 0xb9,
0x17, 0x28, 0x13, 0x37, 0xe2, 0x25, 0xf5,
0xf6, 0xd8, 0xc2, 0xd9, 0x7b, 0xd7, 0xe1,
0x7f, 0x0d, 0x83, 0x05, 0x2d, 0x00
]),
Uint8List.fromList([
0xfb, 0x78, 0x91, 0x49, 0x4c, 0xb9, 0x3d,
0xa8, 0xa4, 0x0a, 0x33, 0x95, 0x46, 0x9e,
0x2f, 0x35, 0x30, 0x27, 0xf8, 0xc8, 0x2c,
0x76, 0x21, 0xf2, 0x38, 0x62, 0x96, 0x2b,
0x05, 0x79, 0xff, 0x4c, 0x12, 0x4b, 0x8b,
0x20, 0x32, 0x49, 0xce, 0x13, 0xcb, 0x72,
0xff, 0x37, 0x33, 0x94, 0xec, 0x8a, 0x92,
0xa8, 0x2c, 0xf9, 0x77, 0xa3, 0x8c, 0x71,
0x36, 0xa9, 0xe3, 0xe5, 0x5f, 0x44, 0x49,
0xcd, 0x04, 0x01, 0x7c, 0x98, 0xbb, 0x40,
0xb8, 0x7e, 0x82, 0xa8, 0x3c, 0x7a, 0xa2,
0x70, 0x74, 0x87, 0xb2, 0xb7, 0x34, 0x48,
0xa5, 0xca, 0x92, 0xe2, 0x82, 0xec, 0xda,
0x40, 0xcc, 0x62, 0x36, 0xda, 0x0f, 0x44,
0x3a, 0x05, 0xf0, 0x94, 0x33, 0xc1, 0xbb,
0x52, 0xad, 0x6c, 0x96, 0xb7, 0xc0, 0xe5,
0xc7, 0x2a, 0x83, 0x32, 0x05, 0x53, 0xb9,
0x83, 0x77, 0xca, 0x97, 0xab, 0x56, 0x78,
0x33, 0xfa, 0x79, 0x32, 0x6e, 0x00
]),
];
final List<Uint8List> ed448PrivateKeyVector = [
Uint8List.fromList([
0x6c,0x82,0xa5,0x62,0xcb,0x80,0x8d,0x10,
0xd6,0x32,0xbe,0x89,0xc8,0x51,0x3e,0xbf,
0x6c,0x92,0x9f,0x34,0xdd,0xfa,0x8c,0x9f,
0x63,0xc9,0x96,0x0e,0xf6,0xe3,0x48,0xa3,
0x52,0x8c,0x8a,0x3f,0xcc,0x2f,0x04,0x4e,
0x39,0xa3,0xfc,0x5b,0x94,0x49,0x2f,0x8f,
0x03,0x2e,0x75,0x49,0xa2,0x00,0x98,0xf9,
0x5b]),
Uint8List.fromList([
0xc4,0xea,0xb0,0x5d,0x35,0x70,0x07,0xc6,
0x32,0xf3,0xdb,0xb4,0x84,0x89,0x92,0x4d,
0x55,0x2b,0x08,0xfe,0x0c,0x35,0x3a,0x0d,
0x4a,0x1f,0x00,0xac,0xda,0x2c,0x46,0x3a,
0xfb,0xea,0x67,0xc5,0xe8,0xd2,0x87,0x7c,
0x5e,0x3b,0xc3,0x97,0xa6,0x59,0x94,0x9e,
0xf8,0x02,0x1e,0x95,0x4e,0x0a,0x12,0x27,
0x4e]),
Uint8List.fromList([
0xcd,0x23,0xd2,0x4f,0x71,0x42,0x74,0xe7,
0x44,0x34,0x32,0x37,0xb9,0x32,0x90,0xf5,
0x11,0xf6,0x42,0x5f,0x98,0xe6,0x44,0x59,
0xff,0x20,0x3e,0x89,0x85,0x08,0x3f,0xfd,
0xf6,0x05,0x00,0x55,0x3a,0xbc,0x0e,0x05,
0xcd,0x02,0x18,0x4b,0xdb,0x89,0xc4,0xcc,
0xd6,0x7e,0x18,0x79,0x51,0x26,0x7e,0xb3,
0x28]),
Uint8List.fromList([
0x25,0x8c,0xdd,0x4a,0xda,0x32,0xed,0x9c,
0x9f,0xf5,0x4e,0x63,0x75,0x6a,0xe5,0x82,
0xfb,0x8f,0xab,0x2a,0xc7,0x21,0xf2,0xc8,
0xe6,0x76,0xa7,0x27,0x68,0x51,0x3d,0x93,
0x9f,0x63,0xdd,0xdb,0x55,0x60,0x91,0x33,
0xf2,0x9a,0xdf,0x86,0xec,0x99,0x29,0xdc,
0xcb,0x52,0xc1,0xc5,0xfd,0x2f,0xf7,0xe2,
0x1b]),
Uint8List.fromList([
0x7e,0xf4,0xe8,0x45,0x44,0x23,0x67,0x52,
0xfb,0xb5,0x6b,0x8f,0x31,0xa2,0x3a,0x10,
0xe4,0x28,0x14,0xf5,0xf5,0x5c,0xa0,0x37,
0xcd,0xcc,0x11,0xc6,0x4c,0x9a,0x3b,0x29,
0x49,0xc1,0xbb,0x60,0x70,0x03,0x14,0x61,
0x17,0x32,0xa6,0xc2,0xfe,0xa9,0x8e,0xeb,
0xc0,0x26,0x6a,0x11,0xa9,0x39,0x70,0x10,
0x0e]),
Uint8List.fromList([
0xd6,0x5d,0xf3,0x41,0xad,0x13,0xe0,0x08,
0x56,0x76,0x88,0xba,0xed,0xda,0x8e,0x9d,
0xcd,0xc1,0x7d,0xc0,0x24,0x97,0x4e,0xa5,
0xb4,0x22,0x7b,0x65,0x30,0xe3,0x39,0xbf,
0xf2,0x1f,0x99,0xe6,0x8c,0xa6,0x96,0x8f,
0x3c,0xca,0x6d,0xfe,0x0f,0xb9,0xf4,0xfa,
0xb4,0xfa,0x13,0x5d,0x55,0x42,0xea,0x3f,
0x01]),
Uint8List.fromList([
0x2e,0xc5,0xfe,0x3c,0x17,0x04,0x5a,0xbd,
0xb1,0x36,0xa5,0xe6,0xa9,0x13,0xe3,0x2a,
0xb7,0x5a,0xe6,0x8b,0x53,0xd2,0xfc,0x14,
0x9b,0x77,0xe5,0x04,0x13,0x2d,0x37,0x56,
0x9b,0x7e,0x76,0x6b,0xa7,0x4a,0x19,0xbd,
0x61,0x62,0x34,0x3a,0x21,0xc8,0x59,0x0a,
0xa9,0xce,0xbc,0xa9,0x01,0x4c,0x63,0x6d,
0xf5]),
Uint8List.fromList([
0x87,0x2d,0x09,0x37,0x80,0xf5,0xd3,0x73,
0x0d,0xf7,0xc2,0x12,0x66,0x4b,0x37,0xb8,
0xa0,0xf2,0x4f,0x56,0x81,0x0d,0xaa,0x83,
0x82,0xcd,0x4f,0xa3,0xf7,0x76,0x34,0xec,
0x44,0xdc,0x54,0xf1,0xc2,0xed,0x9b,0xea,
0x86,0xfa,0xfb,0x76,0x32,0xd8,0xbe,0x19,
0x9e,0xa1,0x65,0xf5,0xad,0x55,0xdd,0x9c,
0xe8])
];
final List<Uint8List> ed448PublicKeyVector = [
Uint8List.fromList([
0x5f,0xd7,0x44,0x9b,0x59,0xb4,0x61,0xfd,
0x2c,0xe7,0x87,0xec,0x61,0x6a,0xd4,0x6a,
0x1d,0xa1,0x34,0x24,0x85,0xa7,0x0e,0x1f,
0x8a,0x0e,0xa7,0x5d,0x80,0xe9,0x67,0x78,
0xed,0xf1,0x24,0x76,0x9b,0x46,0xc7,0x06,
0x1b,0xd6,0x78,0x3d,0xf1,0xe5,0x0f,0x6c,
0xd1,0xfa,0x1a,0xbe,0xaf,0xe8,0x25,0x61,
0x80]),
Uint8List.fromList([
0x43,0xba,0x28,0xf4,0x30,0xcd,0xff,0x45,
0x6a,0xe5,0x31,0x54,0x5f,0x7e,0xcd,0x0a,
0xc8,0x34,0xa5,0x5d,0x93,0x58,0xc0,0x37,
0x2b,0xfa,0x0c,0x6c,0x67,0x98,0xc0,0x86,
0x6a,0xea,0x01,0xeb,0x00,0x74,0x28,0x02,
0xb8,0x43,0x8e,0xa4,0xcb,0x82,0x16,0x9c,
0x23,0x51,0x60,0x62,0x7b,0x4c,0x3a,0x94,
0x80]),
Uint8List.fromList([
0xdc,0xea,0x9e,0x78,0xf3,0x5a,0x1b,0xf3,
0x49,0x9a,0x83,0x1b,0x10,0xb8,0x6c,0x90,
0xaa,0xc0,0x1c,0xd8,0x4b,0x67,0xa0,0x10,
0x9b,0x55,0xa3,0x6e,0x93,0x28,0xb1,0xe3,
0x65,0xfc,0xe1,0x61,0xd7,0x1c,0xe7,0x13,
0x1a,0x54,0x3e,0xa4,0xcb,0x5f,0x7e,0x9f,
0x1d,0x8b,0x00,0x69,0x64,0x47,0x00,0x14,
0x00]),
Uint8List.fromList([
0x3b,0xa1,0x6d,0xa0,0xc6,0xf2,0xcc,0x1f,
0x30,0x18,0x77,0x40,0x75,0x6f,0x5e,0x79,
0x8d,0x6b,0xc5,0xfc,0x01,0x5d,0x7c,0x63,
0xcc,0x95,0x10,0xee,0x3f,0xd4,0x4a,0xdc,
0x24,0xd8,0xe9,0x68,0xb6,0xe4,0x6e,0x6f,
0x94,0xd1,0x9b,0x94,0x53,0x61,0x72,0x6b,
0xd7,0x5e,0x14,0x9e,0xf0,0x98,0x17,0xf5,
0x80]),
Uint8List.fromList([
0xb3,0xda,0x07,0x9b,0x0a,0xa4,0x93,0xa5,
0x77,0x20,0x29,0xf0,0x46,0x7b,0xae,0xbe,
0xe5,0xa8,0x11,0x2d,0x9d,0x3a,0x22,0x53,
0x23,0x61,0xda,0x29,0x4f,0x7b,0xb3,0x81,
0x5c,0x5d,0xc5,0x9e,0x17,0x6b,0x4d,0x9f,
0x38,0x1c,0xa0,0x93,0x8e,0x13,0xc6,0xc0,
0x7b,0x17,0x4b,0xe6,0x5d,0xfa,0x57,0x8e,
0x80]),
Uint8List.fromList([
0xdf,0x97,0x05,0xf5,0x8e,0xdb,0xab,0x80,
0x2c,0x7f,0x83,0x63,0xcf,0xe5,0x56,0x0a,
0xb1,0xc6,0x13,0x2c,0x20,0xa9,0xf1,0xdd,
0x16,0x34,0x83,0xa2,0x6f,0x8a,0xc5,0x3a,
0x39,0xd6,0x80,0x8b,0xf4,0xa1,0xdf,0xbd,
0x26,0x1b,0x09,0x9b,0xb0,0x3b,0x3f,0xb5,
0x09,0x06,0xcb,0x28,0xbd,0x8a,0x08,0x1f,
0x00]),
Uint8List.fromList([
0x79,0x75,0x6f,0x01,0x4d,0xcf,0xe2,0x07,
0x9f,0x5d,0xd9,0xe7,0x18,0xbe,0x41,0x71,
0xe2,0xef,0x24,0x86,0xa0,0x8f,0x25,0x18,
0x6f,0x6b,0xff,0x43,0xa9,0x93,0x6b,0x9b,
0xfe,0x12,0x40,0x2b,0x08,0xae,0x65,0x79,
0x8a,0x3d,0x81,0xe2,0x2e,0x9e,0xc8,0x0e,
0x76,0x90,0x86,0x2e,0xf3,0xd4,0xed,0x3a,
0x00]),
Uint8List.fromList([
0xa8,0x1b,0x2e,0x8a,0x70,0xa5,0xac,0x94,
0xff,0xdb,0xcc,0x9b,0xad,0xfc,0x3f,0xeb,
0x08,0x01,0xf2,0x58,0x57,0x8b,0xb1,0x14,
0xad,0x44,0xec,0xe1,0xec,0x0e,0x79,0x9d,
0xa0,0x8e,0xff,0xb8,0x1c,0x5d,0x68,0x5c,
0x0c,0x56,0xf6,0x4e,0xec,0xae,0xf8,0xcd,
0xf1,0x1c,0xc3,0x87,0x37,0x83,0x8c,0xf4,
0x00])
];
final List<Uint8List> messageVector = [
Uint8List.fromList([
]),
Uint8List.fromList([
0x03]),
Uint8List.fromList([
0x0c,0x3e,0x54,0x40,0x74,0xec,0x63,0xb0,
0x26,0x5e,0x0c]),
Uint8List.fromList([
0x64,0xa6,0x5f,0x3c,0xde,0xdc,0xdd,0x66,
0x81,0x1e,0x29,0x15]),
Uint8List.fromList([
0x64,0xa6,0x5f,0x3c,0xde,0xdc,0xdd,0x66,
0x81,0x1e,0x29,0x15,0xe7]),
Uint8List.fromList([
0xbd,0x0f,0x6a,0x37,0x47,0xcd,0x56,0x1b,
0xdd,0xdf,0x46,0x40,0xa3,0x32,0x46,0x1a,
0x4a,0x30,0xa1,0x2a,0x43,0x4c,0xd0,0xbf,
0x40,0xd7,0x66,0xd9,0xc6,0xd4,0x58,0xe5,
0x51,0x22,0x04,0xa3,0x0c,0x17,0xd1,0xf5,
0x0b,0x50,0x79,0x63,0x1f,0x64,0xeb,0x31,
0x12,0x18,0x2d,0xa3,0x00,0x58,0x35,0x46,
0x11,0x13,0x71,0x8d,0x1a,0x5e,0xf9,0x44]),
Uint8List.fromList([
0x15,0x77,0x75,0x32,0xb0,0xbd,0xd0,0xd1,
0x38,0x9f,0x63,0x6c,0x5f,0x6b,0x9b,0xa7,
0x34,0xc9,0x0a,0xf5,0x72,0x87,0x7e,0x2d,
0x27,0x2d,0xd0,0x78,0xaa,0x1e,0x56,0x7c,
0xfa,0x80,0xe1,0x29,0x28,0xbb,0x54,0x23,
0x30,0xe8,0x40,0x9f,0x31,0x74,0x50,0x41,
0x07,0xec,0xd5,0xef,0xac,0x61,0xae,0x75,
0x04,0xda,0xbe,0x2a,0x60,0x2e,0xde,0x89,
0xe5,0xcc,0xa6,0x25,0x7a,0x7c,0x77,0xe2,
0x7a,0x70,0x2b,0x3a,0xe3,0x9f,0xc7,0x69,
0xfc,0x54,0xf2,0x39,0x5a,0xe6,0xa1,0x17,
0x8c,0xab,0x47,0x38,0xe5,0x43,0x07,0x2f,
0xc1,0xc1,0x77,0xfe,0x71,0xe9,0x2e,0x25,
0xbf,0x03,0xe4,0xec,0xb7,0x2f,0x47,0xb6,
0x4d,0x04,0x65,0xaa,0xea,0x4c,0x7f,0xad,
0x37,0x25,0x36,0xc8,0xba,0x51,0x6a,0x60,
0x39,0xc3,0xc2,0xa3,0x9f,0x0e,0x4d,0x83,
0x2b,0xe4,0x32,0xdf,0xa9,0xa7,0x06,0xa6,
0xe5,0xc7,0xe1,0x9f,0x39,0x79,0x64,0xca,
0x42,0x58,0x00,0x2f,0x7c,0x05,0x41,0xb5,
0x90,0x31,0x6d,0xbc,0x56,0x22,0xb6,0xb2,
0xa6,0xfe,0x7a,0x4a,0xbf,0xfd,0x96,0x10,
0x5e,0xca,0x76,0xea,0x7b,0x98,0x81,0x6a,
0xf0,0x74,0x8c,0x10,0xdf,0x04,0x8c,0xe0,
0x12,0xd9,0x01,0x01,0x5a,0x51,0xf1,0x89,
0xf3,0x88,0x81,0x45,0xc0,0x36,0x50,0xaa,
0x23,0xce,0x89,0x4c,0x3b,0xd8,0x89,0xe0,
0x30,0xd5,0x65,0x07,0x1c,0x59,0xf4,0x09,
0xa9,0x98,0x1b,0x51,0x87,0x8f,0xd6,0xfc,
0x11,0x06,0x24,0xdc,0xbc,0xde,0x0b,0xf7,
0xa6,0x9c,0xcc,0xe3,0x8f,0xab,0xdf,0x86,
0xf3,0xbe,0xf6,0x04,0x48,0x19,0xde,0x11]),
Uint8List.fromList([
0x6d,0xdf,0x80,0x2e,0x1a,0xae,0x49,0x86,
0x93,0x5f,0x7f,0x98,0x1b,0xa3,0xf0,0x35,
0x1d,0x62,0x73,0xc0,0xa0,0xc2,0x2c,0x9c,
0x0e,0x83,0x39,0x16,0x8e,0x67,0x54,0x12,
0xa3,0xde,0xbf,0xaf,0x43,0x5e,0xd6,0x51,
0x55,0x80,0x07,0xdb,0x43,0x84,0xb6,0x50,
0xfc,0xc0,0x7e,0x3b,0x58,0x6a,0x27,0xa4,
0xf7,0xa0,0x0a,0xc8,0xa6,0xfe,0xc2,0xcd,
0x86,0xae,0x4b,0xf1,0x57,0x0c,0x41,0xe6,
0xa4,0x0c,0x93,0x1d,0xb2,0x7b,0x2f,0xaa,
0x15,0xa8,0xce,0xdd,0x52,0xcf,0xf7,0x36,
0x2c,0x4e,0x6e,0x23,0xda,0xec,0x0f,0xbc,
0x3a,0x79,0xb6,0x80,0x6e,0x31,0x6e,0xfc,
0xc7,0xb6,0x81,0x19,0xbf,0x46,0xbc,0x76,
0xa2,0x60,0x67,0xa5,0x3f,0x29,0x6d,0xaf,
0xdb,0xdc,0x11,0xc7,0x7f,0x77,0x77,0xe9,
0x72,0x66,0x0c,0xf4,0xb6,0xa9,0xb3,0x69,
0xa6,0x66,0x5f,0x02,0xe0,0xcc,0x9b,0x6e,
0xdf,0xad,0x13,0x6b,0x4f,0xab,0xe7,0x23,
0xd2,0x81,0x3d,0xb3,0x13,0x6c,0xfd,0xe9,
0xb6,0xd0,0x44,0x32,0x2f,0xee,0x29,0x47,
0x95,0x2e,0x03,0x1b,0x73,0xab,0x5c,0x60,
0x33,0x49,0xb3,0x07,0xbd,0xc2,0x7b,0xc6,
0xcb,0x8b,0x8b,0xbd,0x7b,0xd3,0x23,0x21,
0x9b,0x80,0x33,0xa5,0x81,0xb5,0x9e,0xad,
0xeb,0xb0,0x9b,0x3c,0x4f,0x3d,0x22,0x77,
0xd4,0xf0,0x34,0x36,0x24,0xac,0xc8,0x17,
0x80,0x47,0x28,0xb2,0x5a,0xb7,0x97,0x17,
0x2b,0x4c,0x5c,0x21,0xa2,0x2f,0x9c,0x78,
0x39,0xd6,0x43,0x00,0x23,0x2e,0xb6,0x6e,
0x53,0xf3,0x1c,0x72,0x3f,0xa3,0x7f,0xe3,
0x87,0xc7,0xd3,0xe5,0x0b,0xdf,0x98,0x13,
0xa3,0x0e,0x5b,0xb1,0x2c,0xf4,0xcd,0x93,
0x0c,0x40,0xcf,0xb4,0xe1,0xfc,0x62,0x25,
0x92,0xa4,0x95,0x88,0x79,0x44,0x94,0xd5,
0x6d,0x24,0xea,0x4b,0x40,0xc8,0x9f,0xc0,
0x59,0x6c,0xc9,0xeb,0xb9,0x61,0xc8,0xcb,
0x10,0xad,0xde,0x97,0x6a,0x5d,0x60,0x2b,
0x1c,0x3f,0x85,0xb9,0xb9,0xa0,0x01,0xed,
0x3c,0x6a,0x4d,0x3b,0x14,0x37,0xf5,0x20,
0x96,0xcd,0x19,0x56,0xd0,0x42,0xa5,0x97,
0xd5,0x61,0xa5,0x96,0xec,0xd3,0xd1,0x73,
0x5a,0x8d,0x57,0x0e,0xa0,0xec,0x27,0x22,
0x5a,0x2c,0x4a,0xaf,0xf2,0x63,0x06,0xd1,
0x52,0x6c,0x1a,0xf3,0xca,0x6d,0x9c,0xf5,
0xa2,0xc9,0x8f,0x47,0xe1,0xc4,0x6d,0xb9,
0xa3,0x32,0x34,0xcf,0xd4,0xd8,0x1f,0x2c,
0x98,0x53,0x8a,0x09,0xeb,0xe7,0x69,0x98,
0xd0,0xd8,0xfd,0x25,0x99,0x7c,0x7d,0x25,
0x5c,0x6d,0x66,0xec,0xe6,0xfa,0x56,0xf1,
0x11,0x44,0x95,0x0f,0x02,0x77,0x95,0xe6,
0x53,0x00,0x8f,0x4b,0xd7,0xca,0x2d,0xee,
0x85,0xd8,0xe9,0x0f,0x3d,0xc3,0x15,0x13,
0x0c,0xe2,0xa0,0x03,0x75,0xa3,0x18,0xc7,
0xc3,0xd9,0x7b,0xe2,0xc8,0xce,0x5b,0x6d,
0xb4,0x1a,0x62,0x54,0xff,0x26,0x4f,0xa6,
0x15,0x5b,0xae,0xe3,0xb0,0x77,0x3c,0x0f,
0x49,0x7c,0x57,0x3f,0x19,0xbb,0x4f,0x42,
0x40,0x28,0x1f,0x0b,0x1f,0x4f,0x7b,0xe8,
0x57,0xa4,0xe5,0x9d,0x41,0x6c,0x06,0xb4,
0xc5,0x0f,0xa0,0x9e,0x18,0x10,0xdd,0xc6,
0xb1,0x46,0x7b,0xae,0xac,0x5a,0x36,0x68,
0xd1,0x1b,0x6e,0xca,0xa9,0x01,0x44,0x00,
0x16,0xf3,0x89,0xf8,0x0a,0xcc,0x4d,0xb9,
0x77,0x02,0x5e,0x7f,0x59,0x24,0x38,0x8c,
0x7e,0x34,0x0a,0x73,0x2e,0x55,0x44,0x40,
0xe7,0x65,0x70,0xf8,0xdd,0x71,0xb7,0xd6,
0x40,0xb3,0x45,0x0d,0x1f,0xd5,0xf0,0x41,
0x0a,0x18,0xf9,0xa3,0x49,0x4f,0x70,0x7c,
0x71,0x7b,0x79,0xb4,0xbf,0x75,0xc9,0x84,
0x00,0xb0,0x96,0xb2,0x16,0x53,0xb5,0xd2,
0x17,0xcf,0x35,0x65,0xc9,0x59,0x74,0x56,
0xf7,0x07,0x03,0x49,0x7a,0x07,0x87,0x63,
0x82,0x9b,0xc0,0x1b,0xb1,0xcb,0xc8,0xfa,
0x04,0xea,0xdc,0x9a,0x6e,0x3f,0x66,0x99,
0x58,0x7a,0x9e,0x75,0xc9,0x4e,0x5b,0xab,
0x00,0x36,0xe0,0xb2,0xe7,0x11,0x39,0x2c,
0xff,0x00,0x47,0xd0,0xd6,0xb0,0x5b,0xd2,
0xa5,0x88,0xbc,0x10,0x97,0x18,0x95,0x42,
0x59,0xf1,0xd8,0x66,0x78,0xa5,0x79,0xa3,
0x12,0x0f,0x19,0xcf,0xb2,0x96,0x3f,0x17,
0x7a,0xeb,0x70,0xf2,0xd4,0x84,0x48,0x26,
0x26,0x2e,0x51,0xb8,0x02,0x71,0x27,0x20,
0x68,0xef,0x5b,0x38,0x56,0xfa,0x85,0x35,
0xaa,0x2a,0x88,0xb2,0xd4,0x1f,0x2a,0x0e,
0x2f,0xda,0x76,0x24,0xc2,0x85,0x02,0x72,
0xac,0x4a,0x2f,0x56,0x1f,0x8f,0x2f,0x7a,
0x31,0x8b,0xfd,0x5c,0xaf,0x96,0x96,0x14,
0x9e,0x4a,0xc8,0x24,0xad,0x34,0x60,0x53,
0x8f,0xdc,0x25,0x42,0x1b,0xee,0xc2,0xcc,
0x68,0x18,0x16,0x2d,0x06,0xbb,0xed,0x0c,
0x40,0xa3,0x87,0x19,0x23,0x49,0xdb,0x67,
0xa1,0x18,0xba,0xda,0x6c,0xd5,0xab,0x01,
0x40,0xee,0x27,0x32,0x04,0xf6,0x28,0xaa,
0xd1,0xc1,0x35,0xf7,0x70,0x27,0x9a,0x65,
0x1e,0x24,0xd8,0xc1,0x4d,0x75,0xa6,0x05,
0x9d,0x76,0xb9,0x6a,0x6f,0xd8,0x57,0xde,
0xf5,0xe0,0xb3,0x54,0xb2,0x7a,0xb9,0x37,
0xa5,0x81,0x5d,0x16,0xb5,0xfa,0xe4,0x07,
0xff,0x18,0x22,0x2c,0x6d,0x1e,0xd2,0x63,
0xbe,0x68,0xc9,0x5f,0x32,0xd9,0x08,0xbd,
0x89,0x5c,0xd7,0x62,0x07,0xae,0x72,0x64,
0x87,0x56,0x7f,0x9a,0x67,0xda,0xd7,0x9a,
0xbe,0xc3,0x16,0xf6,0x83,0xb1,0x7f,0x2d,
0x02,0xbf,0x07,0xe0,0xac,0x8b,0x5b,0xc6,
0x16,0x2c,0xf9,0x46,0x97,0xb3,0xc2,0x7c,
0xd1,0xfe,0xa4,0x9b,0x27,0xf2,0x3b,0xa2,
0x90,0x18,0x71,0x96,0x25,0x06,0x52,0x0c,
0x39,0x2d,0xa8,0xb6,0xad,0x0d,0x99,0xf7,
0x01,0x3f,0xbc,0x06,0xc2,0xc1,0x7a,0x56,
0x95,0x00,0xc8,0xa7,0x69,0x64,0x81,0xc1,
0xcd,0x33,0xe9,0xb1,0x4e,0x40,0xb8,0x2e,
0x79,0xa5,0xf5,0xdb,0x82,0x57,0x1b,0xa9,
0x7b,0xae,0x3a,0xd3,0xe0,0x47,0x95,0x15,
0xbb,0x0e,0x2b,0x0f,0x3b,0xfc,0xd1,0xfd,
0x33,0x03,0x4e,0xfc,0x62,0x45,0xed,0xdd,
0x7e,0xe2,0x08,0x6d,0xda,0xe2,0x60,0x0d,
0x8c,0xa7,0x3e,0x21,0x4e,0x8c,0x2b,0x0b,
0xdb,0x2b,0x04,0x7c,0x6a,0x46,0x4a,0x56,
0x2e,0xd7,0x7b,0x73,0xd2,0xd8,0x41,0xc4,
0xb3,0x49,0x73,0x55,0x12,0x57,0x71,0x3b,
0x75,0x36,0x32,0xef,0xba,0x34,0x81,0x69,
0xab,0xc9,0x0a,0x68,0xf4,0x26,0x11,0xa4,
0x01,0x26,0xd7,0xcb,0x21,0xb5,0x86,0x95,
0x56,0x81,0x86,0xf7,0xe5,0x69,0xd2,0xff,
0x0f,0x9e,0x74,0x5d,0x04,0x87,0xdd,0x2e,
0xb9,0x97,0xca,0xfc,0x5a,0xbf,0x9d,0xd1,
0x02,0xe6,0x2f,0xf6,0x6c,0xba,0x87])
];
final List<Uint8List> ed448SignatureVector = [
Uint8List.fromList([
0x53,0x3a,0x37,0xf6,0xbb,0xe4,0x57,0x25,
0x1f,0x02,0x3c,0x0d,0x88,0xf9,0x76,0xae,
0x2d,0xfb,0x50,0x4a,0x84,0x3e,0x34,0xd2,
0x07,0x4f,0xd8,0x23,0xd4,0x1a,0x59,0x1f,
0x2b,0x23,0x3f,0x03,0x4f,0x62,0x82,0x81,
0xf2,0xfd,0x7a,0x22,0xdd,0xd4,0x7d,0x78,
0x28,0xc5,0x9b,0xd0,0xa2,0x1b,0xfd,0x39,
0x80,0xff,0x0d,0x20,0x28,0xd4,0xb1,0x8a,
0x9d,0xf6,0x3e,0x00,0x6c,0x5d,0x1c,0x2d,
0x34,0x5b,0x92,0x5d,0x8d,0xc0,0x0b,0x41,
0x04,0x85,0x2d,0xb9,0x9a,0xc5,0xc7,0xcd,
0xda,0x85,0x30,0xa1,0x13,0xa0,0xf4,0xdb,
0xb6,0x11,0x49,0xf0,0x5a,0x73,0x63,0x26,
0x8c,0x71,0xd9,0x58,0x08,0xff,0x2e,0x65,
0x26,0x00
]), Uint8List.fromList([
0x26,0xb8,0xf9,0x17,0x27,0xbd,0x62,0x89,
0x7a,0xf1,0x5e,0x41,0xeb,0x43,0xc3,0x77,
0xef,0xb9,0xc6,0x10,0xd4,0x8f,0x23,0x35,
0xcb,0x0b,0xd0,0x08,0x78,0x10,0xf4,0x35,
0x25,0x41,0xb1,0x43,0xc4,0xb9,0x81,0xb7,
0xe1,0x8f,0x62,0xde,0x8c,0xcd,0xf6,0x33,
0xfc,0x1b,0xf0,0x37,0xab,0x7c,0xd7,0x79,
0x80,0x5e,0x0d,0xbc,0xc0,0xaa,0xe1,0xcb,
0xce,0xe1,0xaf,0xb2,0xe0,0x27,0xdf,0x36,
0xbc,0x04,0xdc,0xec,0xbf,0x15,0x43,0x36,
0xc1,0x9f,0x0a,0xf7,0xe0,0xa6,0x47,0x29,
0x05,0xe7,0x99,0xf1,0x95,0x3d,0x2a,0x0f,
0xf3,0x34,0x8a,0xb2,0x1a,0xa4,0xad,0xaf,
0xd1,0xd2,0x34,0x44,0x1c,0xf8,0x07,0xc0,
0x3a,0x00
]), Uint8List.fromList([
0x1f,0x0a,0x88,0x88,0xce,0x25,0xe8,0xd4,
0x58,0xa2,0x11,0x30,0x87,0x9b,0x84,0x0a,
0x90,0x89,0xd9,0x99,0xaa,0xba,0x03,0x9e,
0xaf,0x3e,0x3a,0xfa,0x09,0x0a,0x09,0xd3,
0x89,0xdb,0xa8,0x2c,0x4f,0xf2,0xae,0x8a,
0xc5,0xcd,0xfb,0x7c,0x55,0xe9,0x4d,0x5d,
0x96,0x1a,0x29,0xfe,0x01,0x09,0x94,0x1e,
0x00,0xb8,0xdb,0xde,0xea,0x6d,0x3b,0x05,
0x10,0x68,0xdf,0x72,0x54,0xc0,0xcd,0xc1,
0x29,0xcb,0xe6,0x2d,0xb2,0xdc,0x95,0x7d,
0xbb,0x47,0xb5,0x1f,0xd3,0xf2,0x13,0xfb,
0x86,0x98,0xf0,0x64,0x77,0x42,0x50,0xa5,
0x02,0x89,0x61,0xc9,0xbf,0x8f,0xfd,0x97,
0x3f,0xe5,0xd5,0xc2,0x06,0x49,0x2b,0x14,
0x0e,0x00
]), Uint8List.fromList([
0x7e,0xee,0xab,0x7c,0x4e,0x50,0xfb,0x79,
0x9b,0x41,0x8e,0xe5,0xe3,0x19,0x7f,0xf6,
0xbf,0x15,0xd4,0x3a,0x14,0xc3,0x43,0x89,
0xb5,0x9d,0xd1,0xa7,0xb1,0xb8,0x5b,0x4a,
0xe9,0x04,0x38,0xac,0xa6,0x34,0xbe,0xa4,
0x5e,0x3a,0x26,0x95,0xf1,0x27,0x0f,0x07,
0xfd,0xcd,0xf7,0xc6,0x2b,0x8e,0xfe,0xaf,
0x00,0xb4,0x5c,0x2c,0x96,0xba,0x45,0x7e,
0xb1,0xa8,0xbf,0x07,0x5a,0x3d,0xb2,0x8e,
0x5c,0x24,0xf6,0xb9,0x23,0xed,0x4a,0xd7,
0x47,0xc3,0xc9,0xe0,0x3c,0x70,0x79,0xef,
0xb8,0x7c,0xb1,0x10,0xd3,0xa9,0x98,0x61,
0xe7,0x20,0x03,0xcb,0xae,0x6d,0x6b,0x8b,
0x82,0x7e,0x4e,0x6c,0x14,0x30,0x64,0xff,
0x3c,0x00
]), Uint8List.fromList([
0x6a,0x12,0x06,0x6f,0x55,0x33,0x1b,0x6c,
0x22,0xac,0xd5,0xd5,0xbf,0xc5,0xd7,0x12,
0x28,0xfb,0xda,0x80,0xae,0x8d,0xec,0x26,
0xbd,0xd3,0x06,0x74,0x3c,0x50,0x27,0xcb,
0x48,0x90,0x81,0x0c,0x16,0x2c,0x02,0x74,
0x68,0x67,0x5e,0xcf,0x64,0x5a,0x83,0x17,
0x6c,0x0d,0x73,0x23,0xa2,0xcc,0xde,0x2d,
0x80,0xef,0xe5,0xa1,0x26,0x8e,0x8a,0xca,
0x1d,0x6f,0xbc,0x19,0x4d,0x3f,0x77,0xc4,
0x49,0x86,0xeb,0x4a,0xb4,0x17,0x79,0x19,
0xad,0x8b,0xec,0x33,0xeb,0x47,0xbb,0xb5,
0xfc,0x6e,0x28,0x19,0x6f,0xd1,0xca,0xf5,
0x6b,0x4e,0x7e,0x0b,0xa5,0x51,0x92,0x34,
0xd0,0x47,0x15,0x5a,0xc7,0x27,0xa1,0x05,
0x31,0x00
]), Uint8List.fromList([
0x55,0x4b,0xc2,0x48,0x08,0x60,0xb4,0x9e,
0xab,0x85,0x32,0xd2,0xa5,0x33,0xb7,0xd5,
0x78,0xef,0x47,0x3e,0xeb,0x58,0xc9,0x8b,
0xb2,0xd0,0xe1,0xce,0x48,0x8a,0x98,0xb1,
0x8d,0xfd,0xe9,0xb9,0xb9,0x07,0x75,0xe6,
0x7f,0x47,0xd4,0xa1,0xc3,0x48,0x20,0x58,
0xef,0xc9,0xf4,0x0d,0x2c,0xa0,0x33,0xa0,
0x80,0x1b,0x63,0xd4,0x5b,0x3b,0x72,0x2e,
0xf5,0x52,0xba,0xd3,0xb4,0xcc,0xb6,0x67,
0xda,0x35,0x01,0x92,0xb6,0x1c,0x50,0x8c,
0xf7,0xb6,0xb5,0xad,0xad,0xc2,0xc8,0xd9,
0xa4,0x46,0xef,0x00,0x3f,0xb0,0x5c,0xba,
0x5f,0x30,0xe8,0x8e,0x36,0xec,0x27,0x03,
0xb3,0x49,0xca,0x22,0x9c,0x26,0x70,0x83,
0x39,0x00
]), Uint8List.fromList([
0xc6,0x50,0xdd,0xbb,0x06,0x01,0xc1,0x9c,
0xa1,0x14,0x39,0xe1,0x64,0x0d,0xd9,0x31,
0xf4,0x3c,0x51,0x8e,0xa5,0xbe,0xa7,0x0d,
0x3d,0xcd,0xe5,0xf4,0x19,0x1f,0xe5,0x3f,
0x00,0xcf,0x96,0x65,0x46,0xb7,0x2b,0xcc,
0x7d,0x58,0xbe,0x2b,0x9b,0xad,0xef,0x28,
0x74,0x39,0x54,0xe3,0xa4,0x4a,0x23,0xf8,
0x80,0xe8,0xd4,0xf1,0xcf,0xce,0x2d,0x7a,
0x61,0x45,0x2d,0x26,0xda,0x05,0x89,0x6f,
0x0a,0x50,0xda,0x66,0xa2,0x39,0xa8,0xa1,
0x88,0xb6,0xd8,0x25,0xb3,0x30,0x5a,0xd7,
0x7b,0x73,0xfb,0xac,0x08,0x36,0xec,0xc6,
0x09,0x87,0xfd,0x08,0x52,0x7c,0x1a,0x8e,
0x80,0xd5,0x82,0x3e,0x65,0xca,0xfe,0x2a,
0x3d,0x00
]), Uint8List.fromList([
0xe3,0x01,0x34,0x5a,0x41,0xa3,0x9a,0x4d,
0x72,0xff,0xf8,0xdf,0x69,0xc9,0x80,0x75,
0xa0,0xcc,0x08,0x2b,0x80,0x2f,0xc9,0xb2,
0xb6,0xbc,0x50,0x3f,0x92,0x6b,0x65,0xbd,
0xdf,0x7f,0x4c,0x8f,0x1c,0xb4,0x9f,0x63,
0x96,0xaf,0xc8,0xa7,0x0a,0xbe,0x6d,0x8a,
0xef,0x0d,0xb4,0x78,0xd4,0xc6,0xb2,0x97,
0x00,0x76,0xc6,0xa0,0x48,0x4f,0xe7,0x6d,
0x76,0xb3,0xa9,0x76,0x25,0xd7,0x9f,0x1c,
0xe2,0x40,0xe7,0xc5,0x76,0x75,0x0d,0x29,
0x55,0x28,0x28,0x6f,0x71,0x9b,0x41,0x3d,
0xe9,0xad,0xa3,0xe8,0xeb,0x78,0xed,0x57,
0x36,0x03,0xce,0x30,0xd8,0xbb,0x76,0x17,
0x85,0xdc,0x30,0xdb,0xc3,0x20,0x86,0x9e,
0x1a,0x00
])
];
| 40.473246
| 47
| 0.660938
|
c6da5e98e98673a58586fde93fd5e7d02a1727ac
| 1,342
|
py
|
Python
|
core/models/users.py
|
domlysi/django-rest-skeleton
|
33d8dd694b832dbbe6500318b17a0fbe0cdec9a0
|
[
"MIT"
] | null | null | null |
core/models/users.py
|
domlysi/django-rest-skeleton
|
33d8dd694b832dbbe6500318b17a0fbe0cdec9a0
|
[
"MIT"
] | null | null | null |
core/models/users.py
|
domlysi/django-rest-skeleton
|
33d8dd694b832dbbe6500318b17a0fbe0cdec9a0
|
[
"MIT"
] | null | null | null |
from django.contrib.auth import get_user_model
from django.contrib.auth.base_user import BaseUserManager
from django.contrib.auth.models import AbstractUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
class CustomUserManager(BaseUserManager):
def create_user(self, email, password=None):
"""
Creates and saves a User with the given email and password.
"""
get_user_model()
if not email:
raise ValueError('Users must have an email address')
user = self.model(
email=self.normalize_email(email),
)
user.set_password(password)
user.save(using=self._db)
return user
def create_superuser(self, email, password=None):
"""
Creates and saves a superuser with the given email and password.
"""
user = self.create_user(
email,
password=password,
)
user.is_staff = True
user.is_superuser = True
user.save(using=self._db)
return user
class CustomUser(AbstractUser):
username = None
email = models.EmailField(
verbose_name=_('Email address'),
max_length=255,
unique=True,
)
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = []
objects = CustomUserManager()
| 26.84
| 72
| 0.637854
|
39111104b43f613f4bc4bc74701bc8372f4b7bc4
| 1,126
|
py
|
Python
|
Results/ResultProcess.py
|
githubxuexixuexi/githubxuexixuexi
|
28a7baa68c16c32a0387422aafa881c147433dbd
|
[
"MIT"
] | null | null | null |
Results/ResultProcess.py
|
githubxuexixuexi/githubxuexixuexi
|
28a7baa68c16c32a0387422aafa881c147433dbd
|
[
"MIT"
] | null | null | null |
Results/ResultProcess.py
|
githubxuexixuexi/githubxuexixuexi
|
28a7baa68c16c32a0387422aafa881c147433dbd
|
[
"MIT"
] | 1
|
2020-12-01T11:05:53.000Z
|
2020-12-01T11:05:53.000Z
|
import pandas as pd
import json
file_dir = r"./Results/result.csv"
def top_process(data, n):
data.sort_values(by='confidence', ascending=False, inplace=True)
data_grouped = data.groupby("img_name").head(n)
return data_grouped
def thresh_process(data, thresh):
return data[data['confidence']>=thresh]
if __name__ =='__main__':
result = pd.read_csv(file_dir, header=None,
names=['img_name', 'class_label', 'confidence', 'xmin', 'ymin', 'xmax', 'ymax'])
#每张图只留置信度topN的预测结果
result = top_process(result, 2)
#每张图只留置信度大于阈值的预测结果
# result = thresh_process(result, 0.5)
# 把数据处理成提交格式的json
result_json = {}
grouped = result.groupby("class_label")
for value, group in grouped:
# print(group[['img_name', 'confidence', 'xmin', 'ymin', 'xmax', 'ymax']])
result_json[str(value)] = group[['img_name', 'confidence', 'xmin', 'ymin', 'xmax', 'ymax']].values.tolist()
with open("./result.json", 'w') as f:
json.dump(result_json, f, ensure_ascii=False)
print("数据写入json文件完成...")
| 26.809524
| 116
| 0.612789
|
06eeaf05d69eb47bd2f68d030a3ee4726240afd6
| 620
|
py
|
Python
|
examples/core/sendfile/process.py
|
rsms/smisk
|
f12a5606dfff49a15fa91448ff36652d60add4c0
|
[
"MIT"
] | 4
|
2015-11-05T11:51:12.000Z
|
2020-12-30T18:55:58.000Z
|
examples/core/sendfile/process.py
|
rsms/smisk
|
f12a5606dfff49a15fa91448ff36652d60add4c0
|
[
"MIT"
] | 5
|
2021-11-16T17:21:51.000Z
|
2021-11-16T17:22:09.000Z
|
examples/core/sendfile/process.py
|
rsms/smisk
|
f12a5606dfff49a15fa91448ff36652d60add4c0
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# encoding: utf-8
import sys, os
from smisk.core import *
class MyApp(Application):
def service(self):
if self.request.url.path[-4:] == '.jpg':
path = os.path.abspath(self.request.url.path.replace('..', '').lstrip('/'))
sys.stderr.write("Sending file %s\n" % path)
self.response.send_file(path)
else:
self.response.headers = ["Content-Type: text/html"]
self.response.write("An image which will be sent using X-Sendfile if supported:<br/>")
self.response.write('<img src="image.jpg" alt="" />')
try:
MyApp().run()
except KeyboardInterrupt:
pass
| 29.52381
| 92
| 0.645161
|
79c6a2b5d73a7a0bf49c0f0252cd18ab830fb251
| 2,719
|
php
|
PHP
|
connection/server/user_space_server.php
|
theochap/nepal_asa_sponsoring_website
|
6e301d59dab2400a9872ead901e0a1b17963c932
|
[
"CC-BY-3.0"
] | null | null | null |
connection/server/user_space_server.php
|
theochap/nepal_asa_sponsoring_website
|
6e301d59dab2400a9872ead901e0a1b17963c932
|
[
"CC-BY-3.0"
] | null | null | null |
connection/server/user_space_server.php
|
theochap/nepal_asa_sponsoring_website
|
6e301d59dab2400a9872ead901e0a1b17963c932
|
[
"CC-BY-3.0"
] | null | null | null |
<?php
session_start();
require_once '../../common/shared.php';
require_once '../../common/vendor/autoload.php';
#Connection à la bdd
require_once "../../common/connection_db.php";
$stripe = new \Stripe\StripeClient(
$config['stripe_secret_key']
);
$bdd = init();
$req = $bdd->prepare('SELECT id FROM parrains WHERE email = ?');
$req->execute(array($_SESSION['email']));
$id_parrain = $req->fetch()[0];
$_SESSION['id']=$id_parrain;
#Récupération des id de subscription :
$req = $bdd->prepare('SELECT id_subscription FROM parrains_abonnements WHERE id_parrain = ?');
$req->execute(array($id_parrain));
$subscriptions = array();
#Puis récupération des objets subscription :
$_SESSION['id_sub']=array();
$_SESSION['id_cust']=array();
$_SESSION['name']=array();
$_SESSION['line-1']=array();
$_SESSION['post-code']=array();
$_SESSION['city']=array();
$_SESSION['fin_amount']=array();
$_SESSION['interval']=array();
$_SESSION['last_pay']=array();
while($data = $req->fetch()){
$subscription = $stripe->subscriptions->retrieve(
$data['id_subscription'],
[]
);
array_push($subscriptions, $subscription);
}
foreach($subscriptions as $subscription){
$customer = $stripe->customers->retrieve(
$subscription->customer,
[]
);
$line_1 = $customer->address['line1'];
$postal_code = $customer->address['postal_code'];
$city = $customer->address['city'];
$final_amount = ($subscription->plan->amount / 100);
array_push($_SESSION['id_sub'],$subscription->id) ;
array_push($_SESSION['id_cust'],$subscription->customer);
array_push($_SESSION['name'],$customer->name);
array_push($_SESSION['line-1'],$line_1);
array_push($_SESSION['post-code'],$postal_code);
array_push($_SESSION['city'],$city);
array_push($_SESSION['fin_amount'],$final_amount);
array_push($_SESSION['interval'],$subscription->plan->interval);
$req = $bdd->prepare('SELECT COUNT(id_subscription) FROM parrains_recus_fiscaux WHERE id_subscription = ?');
$req->execute(array($subscription->id));
$data = $req->fetch()[0];
$req->closeCursor;
if($data == 0){
array_push($_SESSION['last_pay'], "Aucun reçu envoyé");
}
else{
$req = $bdd->prepare('SELECT date_dernier_recu FROM parrains_abonnements WHERE id_subscription = ?');
$req->execute(array($subscription->id));
array_push($_SESSION['last_pay'], $req->fetch()[0]);
$req->closeCursor;
}
}
header('Location: ../client/user_space.php');
$req->closeCursor();
?>
| 28.322917
| 116
| 0.614564
|
bb4b5702c5844cac7fb5d8835479da9a1e624a56
| 3,429
|
cs
|
C#
|
sdk/src/Services/CloudFront/Generated/Model/AssociateAliasRequest.cs
|
ChristopherButtars/aws-sdk-net
|
f33050e58133959457b66b95481257e4f17e67ce
|
[
"Apache-2.0"
] | 1,705
|
2015-01-15T19:41:21.000Z
|
2022-03-28T15:25:23.000Z
|
sdk/src/Services/CloudFront/Generated/Model/AssociateAliasRequest.cs
|
ChristopherButtars/aws-sdk-net
|
f33050e58133959457b66b95481257e4f17e67ce
|
[
"Apache-2.0"
] | 1,811
|
2015-01-05T19:40:22.000Z
|
2022-03-31T19:57:40.000Z
|
sdk/src/Services/CloudFront/Generated/Model/AssociateAliasRequest.cs
|
ChristopherButtars/aws-sdk-net
|
f33050e58133959457b66b95481257e4f17e67ce
|
[
"Apache-2.0"
] | 839
|
2015-01-17T12:51:09.000Z
|
2022-03-28T09:59:50.000Z
|
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudfront-2020-05-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudFront.Model
{
/// <summary>
/// Container for the parameters to the AssociateAlias operation.
/// Associates an alias (also known as a CNAME or an alternate domain name) with a CloudFront
/// distribution.
///
///
/// <para>
/// With this operation you can move an alias that’s already in use on a CloudFront distribution
/// to a different distribution in one step. This prevents the downtime that could occur
/// if you first remove the alias from one distribution and then separately add the alias
/// to another distribution.
/// </para>
///
/// <para>
/// To use this operation to associate an alias with a distribution, you provide the alias
/// and the ID of the target distribution for the alias. For more information, including
/// how to set up the target distribution, prerequisites that you must complete, and other
/// restrictions, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move">Moving
/// an alternate domain name to a different distribution</a> in the <i>Amazon CloudFront
/// Developer Guide</i>.
/// </para>
/// </summary>
public partial class AssociateAliasRequest : AmazonCloudFrontRequest
{
private string _alias;
private string _targetDistributionId;
/// <summary>
/// Gets and sets the property Alias.
/// <para>
/// The alias (also known as a CNAME) to add to the target distribution.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string Alias
{
get { return this._alias; }
set { this._alias = value; }
}
// Check to see if Alias property is set
internal bool IsSetAlias()
{
return this._alias != null;
}
/// <summary>
/// Gets and sets the property TargetDistributionId.
/// <para>
/// The ID of the distribution that you’re associating the alias with.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string TargetDistributionId
{
get { return this._targetDistributionId; }
set { this._targetDistributionId = value; }
}
// Check to see if TargetDistributionId property is set
internal bool IsSetTargetDistributionId()
{
return this._targetDistributionId != null;
}
}
}
| 35.350515
| 149
| 0.649752
|
8cea0c1112c54cb4f9933c54442f2e7ad1d27b7b
| 405
|
kt
|
Kotlin
|
data/src/main/java/com/heady/test/data/modules/categories/models/CategoryModel.kt
|
praveen-kanwar/Heady-AT
|
6e04500a6911946a612bed5786364980b294183a
|
[
"MIT"
] | null | null | null |
data/src/main/java/com/heady/test/data/modules/categories/models/CategoryModel.kt
|
praveen-kanwar/Heady-AT
|
6e04500a6911946a612bed5786364980b294183a
|
[
"MIT"
] | null | null | null |
data/src/main/java/com/heady/test/data/modules/categories/models/CategoryModel.kt
|
praveen-kanwar/Heady-AT
|
6e04500a6911946a612bed5786364980b294183a
|
[
"MIT"
] | null | null | null |
package com.heady.test.data.modules.categories.models
import com.google.gson.annotations.SerializedName
import com.heady.test.data.modules.products.models.ProductModel
import com.heady.test.domain.common.beans.IBean
data class CategoryModel(
val id: Int,
val name: String,
val products: List<ProductModel>,
@SerializedName("child_categories")
val childCategories: List<Int>
) : IBean
| 31.153846
| 63
| 0.777778
|
43827f1de9e4bf743d6234c8618a5de7d4688c9c
| 1,054
|
ts
|
TypeScript
|
types/json-rules-engine/json-rules-engine-tests.ts
|
felixfbecker/DefinitelyTyped
|
a2bceed52a36ba36a1b06038e616bb63b3fa9edc
|
[
"MIT"
] | 4
|
2019-05-11T17:00:43.000Z
|
2021-06-15T12:10:08.000Z
|
types/json-rules-engine/json-rules-engine-tests.ts
|
felixfbecker/DefinitelyTyped
|
a2bceed52a36ba36a1b06038e616bb63b3fa9edc
|
[
"MIT"
] | 1
|
2016-09-23T17:44:56.000Z
|
2016-09-23T17:44:56.000Z
|
types/json-rules-engine/json-rules-engine-tests.ts
|
felixfbecker/DefinitelyTyped
|
a2bceed52a36ba36a1b06038e616bb63b3fa9edc
|
[
"MIT"
] | 4
|
2019-05-11T17:00:45.000Z
|
2021-01-16T10:34:59.000Z
|
// NOTE: used from: https://github.com/CacheControl/json-rules-engine#basic-example
import { Engine } from "json-rules-engine";
interface PlayerStats {
personalFoulCount: number;
gameDuration: number;
}
const engine = new Engine();
engine.addRule({
conditions: {
any: [{
all: [{
fact: 'gameDuration',
operator: 'equal',
value: 40
}, {
fact: 'personalFoulCount',
operator: 'greaterThanInclusive',
value: 5
}]
}, {
all: [{
fact: 'gameDuration',
operator: 'equal',
value: 48
}, {
fact: 'personalFoulCount',
operator: 'greaterThanInclusive',
value: 6
}]
}]
},
event: {
type: 'fouledOut',
params: {
message: 'Player has fouled out!'
}
}
});
const facts: PlayerStats = {
gameDuration: 6,
personalFoulCount: 40,
};
engine.run(facts).then(results => {
results.events.map(event => event.params.message);
});
| 20.666667
| 83
| 0.528463
|
dfa56442ca7106e0462d0b9a4dffaa885fded892
| 5,680
|
cshtml
|
C#
|
src/JD.Invoicing.Web.Mvc/Views/PO/_EditPOModal.cshtml
|
IT-Evan/JD.Invoicing
|
15425d288f450bbbe78a1ad935255097750b6320
|
[
"MIT"
] | 4
|
2019-09-07T02:07:59.000Z
|
2020-10-13T01:28:05.000Z
|
src/JD.Invoicing.Web.Mvc/Views/PO/_EditPOModal.cshtml
|
IT-Evan/JD.Invoicing
|
15425d288f450bbbe78a1ad935255097750b6320
|
[
"MIT"
] | null | null | null |
src/JD.Invoicing.Web.Mvc/Views/PO/_EditPOModal.cshtml
|
IT-Evan/JD.Invoicing
|
15425d288f450bbbe78a1ad935255097750b6320
|
[
"MIT"
] | null | null | null |
@using JD.Invoicing.Web.Models.Common.Modals
@model JD.Invoicing.Web.Models.Purchase.EditPOModalViewModel
@{
Layout = null;
}
@Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("EditPO")))
<div class="modal-body">
<form name="POEditForm" role="form" novalidate class="form-validation">
<input type="hidden" name="Id" value="@Model.PO.Id" />
<div>
<div class="row clearfix">
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("OrderID")</label>
<input type="text" name="OrderID" value="@Model.PO.OrderID" class="form-control" required maxlength="50" />
</div>
</div>
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("OrderDate")</label>
<input type="text" name="OrderDate" value="@Model.PO.OrderDate" class="form-control" required maxlength="150" />
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("CreateName")</label>
<input type="text" name="CreateName" value="@Model.PO.CreateName" class="form-control" required maxlength="150" />
</div>
</div>
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("CreateDate")</label>
<input type="text" name="CreateDate" value="@Model.PO.CreateDate" class="form-control" required maxlength="200" />
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("CGNameID")</label>
<input type="text" name="CGNameID" value="@Model.PO.CGNameID" class="form-control" required maxlength="50" />
</div>
</div>
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("CGName")</label>
<input type="text" name="CGName" value="@Model.PO.CGName" class="form-control" required maxlength="50" />
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("Sup_id")</label>
<input type="text" name="Sup_id" value="@Model.PO.Sup_id" class="form-control" required maxlength="50" />
</div>
</div>
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("SupName")</label>
<input name="SupName" type="text" value="@Model.PO.SupName" class="form-control" required maxlength="50" />
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("BZ")</label>
<input name="BZ" type="text" value="@Model.PO.BZ" class="form-control" />
</div>
</div>
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("Status")</label>
<input name="Status" type="text" value="@Model.PO.Status" class="form-control" />
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="form-line">
<label class="form-label">@L("SHStatus")</label>
<input name="SHStatus" type="text" value="@Model.PO.SHStatus" class="form-control" required maxlength="200" />
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("CreateDate")</label>
<input name="CreateDate" type="text" value="@Model.PO.CreateDate" class="form-control" />
</div>
</div>
<div class="col-sm-6">
<div class="form-line">
<label class="form-label">@L("SHName")</label>
<input name="SHName" type="text" value="@Model.PO.SHName" class="form-control" />
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="form-line">
<label class="form-label">@L("PODetials")</label>
<input name="PODetials" type="text" value="@Model.PO.PODetials" class="form-control" />
</div>
</div>
</div>
</form>
</div>
@Html.Partial("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
<script src="~/view-resources/Views/PO/_EditPOModal.js" asp-append-version="true"></script>
| 49.391304
| 138
| 0.453169
|
2feb430313c15390658eada278d9e4577ae009c9
| 635
|
py
|
Python
|
src/kratos/migrations/0003_ambassadorinfo_user.py
|
mascot6699/MSHack-Hackathon-Management-Platform
|
f3782ad83d01de8ace99b55bdf4835d93ff18952
|
[
"MIT"
] | 2
|
2019-01-21T08:16:46.000Z
|
2019-01-26T10:02:48.000Z
|
src/kratos/migrations/0003_ambassadorinfo_user.py
|
mascot6699/MSHack-Hackathon-Management-Platform
|
f3782ad83d01de8ace99b55bdf4835d93ff18952
|
[
"MIT"
] | null | null | null |
src/kratos/migrations/0003_ambassadorinfo_user.py
|
mascot6699/MSHack-Hackathon-Management-Platform
|
f3782ad83d01de8ace99b55bdf4835d93ff18952
|
[
"MIT"
] | 1
|
2021-01-31T17:05:03.000Z
|
2021-01-31T17:05:03.000Z
|
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2019-01-20 02:45
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profiles', '0003_auto_20190120_0245'),
('kratos', '0002_auto_20190120_0112'),
]
operations = [
migrations.AddField(
model_name='ambassadorinfo',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='amb_user', to='profiles.Profile'),
),
]
| 27.608696
| 152
| 0.659843
|
650eb073092b07c58e7d4dd3598199938a0ece59
| 682
|
css
|
CSS
|
dist/css/chunk-b85da18a.79ba86ca.css
|
Lets-Go-together/go-funny-cms-front
|
0c66416967168198f389102c7c51b0f888700ce6
|
[
"MIT"
] | 10
|
2021-05-16T13:07:43.000Z
|
2022-01-27T06:09:06.000Z
|
dist/css/chunk-b85da18a.79ba86ca.css
|
Lets-Go-together/go-funny-cms-front
|
0c66416967168198f389102c7c51b0f888700ce6
|
[
"MIT"
] | null | null | null |
dist/css/chunk-b85da18a.79ba86ca.css
|
Lets-Go-together/go-funny-cms-front
|
0c66416967168198f389102c7c51b0f888700ce6
|
[
"MIT"
] | 2
|
2021-06-09T05:55:59.000Z
|
2022-01-27T06:09:37.000Z
|
.image-uploader img[data-v-1ccf5a9c]{width:102px;height:102px;-o-object-fit:cover;object-fit:cover}.ant-avatar-lg[data-v-1797c29a]{width:48px;height:48px;line-height:48px}.list-content-item[data-v-1797c29a]{color:rgba(0,0,0,.45);display:inline-block;vertical-align:middle;font-size:14px;margin-left:40px}.list-content-item span[data-v-1797c29a]{line-height:20px}.list-content-item p[data-v-1797c29a]{margin-top:4px;margin-bottom:0;line-height:22px}.operate[data-v-1797c29a]{margin-right:20px}.operate .filter .form[data-v-1797c29a]{float:right}.operate .button[data-v-1797c29a]{margin-top:23px;margin-bottom:23px}.ant-list-item>div[data-v-1797c29a]{width:100%;color:rgba(0,0,0,.45)}
| 682
| 682
| 0.782991
|
7dc76679f4ca73db454675753c1c14dab07a3f1b
| 12,264
|
css
|
CSS
|
public/html/dist/css/chunk-33a0a2e8.b1922017.css
|
idealead/adminAPI
|
d30543dcf7b04ae94929a8da8b0f33e735efddc6
|
[
"Apache-2.0"
] | null | null | null |
public/html/dist/css/chunk-33a0a2e8.b1922017.css
|
idealead/adminAPI
|
d30543dcf7b04ae94929a8da8b0f33e735efddc6
|
[
"Apache-2.0"
] | null | null | null |
public/html/dist/css/chunk-33a0a2e8.b1922017.css
|
idealead/adminAPI
|
d30543dcf7b04ae94929a8da8b0f33e735efddc6
|
[
"Apache-2.0"
] | null | null | null |
.uploadbtn[data-v-faa5fcee]{text-align:center;display:inline-block;overflow:hidden;margin:5px;position:relative}.uploadbtn p[data-v-faa5fcee]{position:absolute;bottom:5px;text-align:center;font-size:12px;width:100%;line-height:12px}.chosseImg[data-v-faa5fcee]{width:100px;height:100px;border-radius:5px;display:inline-block;margin:5px;overflow:hidden;position:relative;background-color:#cbcbcb;cursor:pointer}.chosseImg img[data-v-faa5fcee]{-o-object-fit:contain;object-fit:contain;width:100%;height:100%}.addPop_upload_demo .el-upload-list__item[data-v-faa5fcee]{width:17.7%;margin:0 1%;display:inline-block;border:1px solid #ce3939;margin-bottom:5px}.el-upload-list__item-thumbnail[data-v-faa5fcee]{width:auto}.el-upload-list__item-name[data-v-faa5fcee]{margin-right:10px}.addPop_upload_demo .el-upload__tip[data-v-faa5fcee]{margin:7px 0 15px 0}.el-upload__tip[data-v-faa5fcee]{display:inline-block;position:absolute;right:10%}.addPop_upload_demo .el-upload-list[data-v-faa5fcee]{width:calc(100% + 18px);height:calc(100% - 50px);overflow-y:auto;margin-top:10px}.uploadbtn .el-button[data-v-faa5fcee]{background-color:#fff;color:#ce3939;border:1px solid #ce3939}.uploadbtn .el-button[data-v-faa5fcee]:hover{background-color:#ce3939;color:#fff}.addPop_upload_demo[data-v-faa5fcee]{width:90%;height:100%;overflow:hidden;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateX(-9px);transform:translateX(-9px)}.addPop_back[data-v-faa5fcee]{display:inline-block;font-size:10px;color:#c9c9c9;margin-left:20px;cursor:pointer}.addPop_image_blcok[data-v-faa5fcee],.addPop_text_block[data-v-faa5fcee]{width:100%;text-align:center;position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.addPop_image_blcok[data-v-faa5fcee]{height:100%}.addPop_text_block input[data-v-faa5fcee]{outline:none;width:800px;height:30px;border:none;border-bottom:2px solid #ce3939;display:inline-block;font-size:16px;padding:0 5px}.addPop_submit[data-v-faa5fcee]{width:80px;height:30px;background-color:#ce3939;border-radius:30px;display:inline-block;font-size:16px;line-height:30px;color:#fff;margin-left:20px;cursor:pointer}.addPop[data-v-faa5fcee]{width:1300px;height:300px;position:fixed;bottom:0;left:50%;-webkit-transform:translateX(-50%) translateZ(0);transform:translateX(-50%) translateZ(0);border-top-right-radius:20px;border-top-left-radius:20px;background-color:#fff;-webkit-box-shadow:0 0 25px rgba(133,93,93,.5);box-shadow:0 0 25px rgba(133,93,93,.5);z-index:10}@media screen and (max-width:1700px){.addPop[data-v-faa5fcee]{width:1100px;height:300px}.addPop_text_block input[data-v-faa5fcee]{width:600px}}@media screen and (max-width:1500px){.addPop[data-v-faa5fcee]{width:1000px;height:270px}.addPop_text_block input[data-v-faa5fcee]{width:450px}}.addPop_block[data-v-faa5fcee]{width:100%;text-align:center;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.addPop_btn[data-v-faa5fcee]{display:inline-block;margin:0 30px;text-align:center;color:#c9c9c9;font-size:16px;cursor:pointer}.addPop_btn[data-v-faa5fcee]:hover{color:#ce3939}.addPop_textBtn:hover .addPop_addText[data-v-faa5fcee]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAABdCAMAAADwr5rxAAAA1VBMVEXOOTnOOTnOOTkAAADOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTn//////f366+vVVVX88/PPOzv99vb++/vmmpraZmb44+P44eHyy8vTTEz9+Pj55+f22NjttLTih4fcb2/VUlLQPz/xxsbnnp7ii4vccnLYX1/SSUnRRUXQQkL77e333Nz01NTwwsLvvLzssbHooqLff3/eeHjddXXYYmLttrbqqqrkkpLffHzWWlr99/f00dHqrKzaAOQfAAAAFXRSTlOqlt0AcUYx9u/Vv6IKyLKrfnpFHBSNLDQ5AAABwklEQVRo3u3WSW/bMBCGYaa0nWbpXn7Uvlu25N2xXcdbtrb//ydFDBAk9nl4CDDvZW4PBA1ISUjZubr4RN9l61pKIVvKUhe/pPiprPVFiktlr7Y4V/b6LpTFzlhnnXXWWWedddZZJ9Pnm2xrph09H3qRmXb0foDloZlW9FkGhBulrOh+FQC6dC3p/9Hkje3oboom/WduRR+HMC0mNvR5hpfCW9+Cvg8aOQF0d0qvD24bOKtWQDGi16cJEPb9CNDLnFx/0EBaq7gLeH1qPc8Afe+r+V0zhwNifVIAXqWU//gXcCa0+k3PnKObl3sSCO9o9akDBHtl2gVAEpPqkTbLnMZxfBh7QLGh1Gf/AGgnTZIkdTSgVy6hvitwnNen0wc9jaPMhsn0JwdA4bwWAOhOyPRIN9y2rl1TXe9Sc1NS6bNSQ4/8txc1BrCMaXR/GwDO4eQrFUQDEv1pqKHX/vuTGwFYVST6yAOCR/W+eAF4PRI900CZH2+iB+iSRI8chA8nq9gvqJ7dHZXr04Of33fXlfpIf9iss84666yzzjrrrNPqn5W9fohvyl4d0TlXthJSyLatd/P1utHl79aVoO+sLaV8BqKIwHiUm1wCAAAAAElFTkSuQmCC)}.addPop_imageBtn:hover .addPop_addImage[data-v-faa5fcee]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAABdCAMAAADwr5rxAAAA7VBMVEXOOTnOOTnOOTnOOTkAAADOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTnOOTn////55+f//f3++vrZZGTQQkLUU1P88PDzzs7yyMjnn5/ssbHVVlbPOzv99vb77e3xxsbQPj7OOjrllpb88/P339/uuLjttLThhobggYHfe3vSSEjPPDz33Nz22dnnnJzYYmLXXl7VVFTTTEzSS0v55ub44uL11NTuu7vqqqrppKTkj4/cbm7aaGjWWlr+/Pz00NDppqbdc3Paa2vTTk7RRUXvwMDrra2RShs0AAAAFnRSTlPSqt3DABzoy14G88GdiQ/ckHlzSTYphVTluQAAAhtJREFUaN7t19mO2jAUgGHTmgE6S3cfTDIJDNkXkhD2fd9n3v9xmqpCgosJUmpLVeX/KsrFd+GcyDbCOP+l8IF9hcc8xgh//0T4dPcDozwvPOGf0CPh1zdUIPzKIUT49VHoQhe60IUudKEL/f/WJbVC09N3zay6PNPhVuPIyqYPHBcqW9OsvpdZ9QBaYTY9bIG7WD+ntfKBqtn0NwX8JkmvO4ZRNr2hQMe6oT+rUM6mvyhQk2/ofa56nYEu1To9bvrS0/WWZJOrhl1pyEKXXyFpZl2td8f0RtMjA/3Upon+evkJVhMdAPQeA12rQdIiJufsdQvAMP2FzEAng1273bn4r+IGgCodBxabmTmt1xfrokkKeD12E3mdNYfK3OalN1UwJMJU12Tt/LRUYBuz1OtOY9qoRX37tz6jFYcw1KOJToHqxsR3wmingNFnqIdlCq5nAMBGN4wKgKOx0w9jAH/ZOwRvbQpJbvKWmd40Kcyamq3Fcv0QOE6wkgk7feGCeTzPS2xZsUbY6QMV9L3Ga/cIXPBPhJf+soFI46aHrcaA9a59PnHIxKoPbR4njrkB1SFJzV4q4GXT91ug0323K71XVwraoE+z6XI0AqCVtChQc5VJTwpGFNLbVHskqz6cj8vpTUL7H73ZCP1PQhe60IVOiNCFLvS/6B7dE37l0FfCryJ6uiO8QiWEf34mfEJ5jDAuFR9y7HsoljD+BUfQ71Xuf+3EAAAAAElFTkSuQmCC)}.addPop_addBtn[data-v-faa5fcee]{width:93px;height:93px;background-repeat:no-repeat;background-size:cover;margin-bottom:10px;-webkit-transition:background-image .4s;transition:background-image .4s}.addPop_addText[data-v-faa5fcee]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAABdCAMAAADwr5rxAAAAb1BMVEXu7u7u7u7u7u4AAADu7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7JycnNzc3MzMzs7Ozo6Ojj4+PPz8/m5ubc3Nzg4ODT09PX19fr6+vZ2dnV1dXq6uozCGbOAAAAFHRSTlOq3ZYARsJxMfbv1aKSfAr83LIcFLb5y10AAAF1SURBVGje7dbHbsMwDAZgtXJGs7q0reH1/s9YU20q1LmShwL8AcOKD18EkpEjpDycT0/oedvtb1IKuX9VNDl9SNEpsuyk2Cm6dOKo6HIVijDPrLPOOuuss84666yj6S6VDHcafSw2wZ1Gz1b3ERYU+li01pNSNHqwq957RaNPeo3NikT3vYYUR6JnXWMDhe6K/s7gcPXWUwNXxNfdADUPUPuEr0fYdlYJhnJE14E1vn6JzZh6+53eC+SQ9VBnsS1Q9bblpcBQ4uq13OF3Mk1E1VM9YSIkW+gAkt56qk1vzHrBsveIetCb2IymQ0+3mR2a7g2A5h4LHwKanoDLi/9JPWwGLH0ELblWqAx9jRg6YG3C21vKJoei+7LtoqsnZUDRk32YwAiPBhS9wEaXv50Y4BnO3s3j6yhYrL371M9+O0aTmYP6T/+wWWedddZZZ5111lnHzEW8KLpcBeXmD+JwVFQRUsiOqjbvt1WXn/uzwM+lk1J+ASJHlSPYilVQAAAAAElFTkSuQmCC)}.addPop_addImage[data-v-faa5fcee]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAABdCAMAAADwr5rxAAAAdVBMVEXu7u7u7u7u7u7u7u4AAADu7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7JycnT09Pp6ens7OzNzc3MzMzl5eXb29vY2NjQ0NDh4eHd3d3V1dXn5+fj4+NCo4b5AAAAF3RSTlPSqt3DABzLi14G88GdD+vp49x5c0k2KeOjKGwAAAGgSURBVGje7dfbTtwwEIBhb+s9Fei5nbEnY2d8yPs/Io5AwN5kkbElBP5vEkXKF2kUO4rSen88fGnf4bjXWum/36BP3/9ptS94p37cqSP06486QL92SkG/vg596EMf+tCHPvShf2zdGbwSz1Sr08x4LQlUp9tYcLOZrHydHgQ5ZruVS+X5dXqZSyLYzk04Vev+mm7N59ad97mbvgizOLiMsqMWOiUsXS5K641MybbQpeCXL6eTdRVzbjEZj6X4Qs9SaJMitdDJi/gXOM2IxllqMvfC5XwxF0bJvd53KpPy0E0vomusP58tjIZa6jbOafbBPlxfB9NQD8JYYkkxBM/ItqEepiI/PoDXg4d2upOyUpfs4iy4xp7a6WQeNxki60KM0RG00yOjeZozlVruwOV+Xrp9PQJjom76jBigmx5ktv10ygQ9dD+hIdhuYZQ6fTHrKnJbRUFOdTqFCa9nXJVeegVvMtTq5GXaTsJ7/bMZ+kNDH/rQhw4w9KEP/Q3dqBvo1079hn6d1N1P6JU6K/3/F/RJ7bXS+ny63bXv9nTW+h4WL/erDhGXBwAAAABJRU5ErkJggg==)}.addPop_close[data-v-faa5fcee]{position:absolute;width:62px;height:62px;right:-20px;top:-20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAMAAABEH1h2AAAAulBMVEUAAAAzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzNAQEAzMzN1dXVNTU3KysqoqKjm5uaWlpbs7Oz8/Pz39/fi4uJkZGRWVlbT09P09PTx8fHX19eenp6Kior5+fnPz8+ysrLe3t7Dw8O+vr6BgYH////POTnPPj745OTzysrww8PQQEDttbXUT0/YXV3qqqr77e323Nz22trkkpLjjY2SvhXiAAAALnRSTlMABhULJQ9OKyA+MVscOWZWSEM1bmCHdMWn4pvo+/Xdf3jN8e7SopP3yrHZv7mOO51VOAAAA11JREFUSMe1l+d24jAQhcMCchGSLVyw6SW9KG2zJFve/7V2LIkMJoPj/Mg9JzmQ8M29I9todPId6px0rLrdrn3xFdpwoL6ReVlV6LT0rcgfNfVthTbGlh34vt+z8v2BqWAjNFk7eACk54XhEBSGngclBq5AgzXCXjgUQaBUHMdKBUKEUAELHKctPAxUzFjEjSLGYhVABVPA8nTXYG3gGNBUJtn5eHye5VJCiRgK9HwbgGwbaLD2QoB5moxHE+20WRW55FBgCAFo3tE9TyjG5WI00zVNT++ggLIBDE/SoYijdHmpCc0zGbEAeYoOwLq40LRuEs6gAf/j+iGdrPRRlYuK7xm+TncdvSx1g9ZZWuUfOB5xuGKeYDyf6EbNMl7x0L6Jj9GBjqNkrj/RGvIL2z7iLroc6U9VJpEaQnxnj+aMj3UL3UgT39ij+VBFyVq3UcZj4VX2++YBS28bmMc/eP+g/Q7vhSrK926X7faxRj8/3P/WO92Bven+PTt0nl7hp98e7n891umf+P4U7D0fcZNdTjTq5d7ySD/hP6d5pGx6zM4zrSkeaVSB6e26i5hjduQJ2qUXNr3LLpg81SSPNGqDzZOtI0/QINN8HZ9qin+laJ1xs3Y7PAyiRGuCByGNOufxEPHqpllqQv8AfyH+PrZ417kDnhOfgr7x+pE4HR6v91+Kh/DKhselm1H0k36h+AWs/AFekrQm+SQKQnPd8Ym5JGmSn+Bt474sYn5G0TQ/Shl+YbjHfUnRyL8dLrzFsflrjdo6GvlnfDdL8IHdNV9P/7qtaNTT62F2/Lpw6ZONbqXpYi87PrJp0Q6/tOve38ONvSzb0BdLNK/tUTybtsCLFM337YNW8VeSqdCY7+Fun/l8k5snPMYt8nCLlatmepLbDdaYIw7xHT9q9AY6MNE/jBfQvuGL4+s3ShzdP6DtcGP4NCtpeDOW0TvdaRjrigkxltyCdSyQJnjoHybSiMuz6zpcXiUpWAsPaZrvhRAACizPRvO1sS1XxUICrEQIa440PVDDMC7cTCxlksOvlHPGVDXRIk3zNgAUMBM5i0DMzeMORvpIAFPAnAdACn4EsN5XzhPuNOKFIM+dRQiYLuAqDHyngWURbhJxEgMW4dYVUIDSME27EqgvH2Lb6T/qpD8F72U/8wAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-size:cover;cursor:pointer;-webkit-transition:background-image .5s;transition:background-image .5s}.addPop_close[data-v-faa5fcee]:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAMAAABEH1h2AAABQVBMVEUAAAAzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzP9/f0zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzNNTU3Kyso8PDzm5uZDQ0P39/fi4uKmpqZzc3NkZGRWVlb8/Pzz8/PT09OUlJSenp6Kiop3d3f5+fnw8PDt7e3r6+vPz8+ysrKrq6uYmJjX19fW1tbDw8OBgYHo6Oje3t7d3d3AwMC7u7vOOTn////++/vcb2/66en9+Pjhg4PddXXVVFTRQkLPPDz00tLllpbkj4/TS0v88fHxxsbXW1vVVlb439/bbGz55OTuubnpo6PiiIjZY2P99fXzzMzvv7/on5/dd3f22dn119fts7Pmm5vXXV3qqaneeHjFMnw9AAAARXRSTlMAAwYKDhQXERokISg9MFNELVczHE5KQEf+WzY5HmIrZWhedMVs4m/13aeGf3j78M2aopOJ9+zp58qxqZzS0b+O5NrYu7apMmN4AAAFO0lEQVRIx5WX11rbQBCFk7ig3qxiFUtywYSS3nvVQBoGAgkQQnp9/wfIzEqy8LcRIeeGIv17zs7u2rOnanX6iGpfqifPkBqNM0z0j5OzyKGahej3E47AWCLnWq12W0C1263WHI3BRjgJjGxbiCRJFGVZFEUpEto4wj8HKGBiRTk2VMsKAstSjVgWpQ6NwAaop3O4I8mGGoSKq+ue5+m6qwSWIYs0ACaoAnDBMTaDA0X3bE0zTd/3TU2zHV0JVBqgNgAFR2shIhhZv5eOly5fvHP5yiDt9U3bc0NVloRWkwWoo6XYQtjsje8Mr3ch17ULi4PE1zw3MCjA33ii51od0Qh1hJeHCzCjc3cfJL6tY4Co4Lmq4bRlVfG03srNwvfZxs7Oxv4qMJ1d6pmOYpX8LE3JO7KlOGayeJWhB2vrGdPkcPMboLr3R77t5vysPaPJ2/HHFwD1cS+b0c93FGh+uZ/zTcZX5o1GSxCJXpnH1/bXMk5vNvDB+SXGd1rEz05cMpAe3MCXvlNqXptYhIUrfVtRRaGIX0WP4sAzR2eR3spqtPYB/Zd9JzQkNv0KnxNEy9WSIdIvslodbuP8R6YeUHyyL81Z9P4dpDezY7SH+e/3bFcVmX1lLlu6OTgP8Ck7Vpu4fld8L0T7KZ6b270nuNrrNdzbn/nPj7h/Eo3smw1MX86czK9OJz7Z2H01Q79chTf5+mH8B76Hs8f0Bd7qxKHTvwWwO8mYXq/Cs1ez9PPi73cAdxNbMaRWs8Axu+pqKS75+6zQi27OV/RauX3w/AxM3WLp86mz7EsAH2jmPF/RJNz/i30nkGnrEE51p+xV2Suep6n493q2Ekd57XHqUYx1v1ftt4rn6ewQt16quYZEOKscLpuWXAc4zDieo7MJ1n6g6bR0JU6VOwewnnH8VklX2gW4QrUjfFr4EcDzLON44OgMT+5l37NEocRFVTdXALa5vfYLpotZaQfgIm0codko3XHP8TjNG4r687iY41X4VZ5+foDzf8uHL+delW4B4PXMa19Y1V5w/DOA5Rk8wvOWzAPs8XTG8et4Zkd45iTCadvM0Ynp3QTY5GmeXwO4kWhKvm2KTRt4/iX8eK5e+l3QPH8AMOw5YdwpcVw5C1euC93X/Bkr+fLR5Fm5bnON4sC2JJr8I4Af1c7K6Yp/WWVfGOV7tjH9uKAjh+m3y2279bUqI4O2JtWyDfHAGXTgGE6Tx/Ta6BrA5+wfeol1XzZZdsKL9FGM9ou4c94cT6/vA9wkc4myF3hhn+LSf12vI8tPuqsrZF7UPU+f2/tLeGjfTY6htwBgsTQnvLJXXbt3m74g6/n3+PhCoumWLJA54aV9Rw70/EvuU13+H9RjjE0vjKOpefUtF4eemVJzsPvX+r3ewUcPB76D0VnZK5zFlwziyX/1gAsweb9N3kSrojBtDyp71l54ZnIb6wfbn1/NOG/tA2o4IrpoLo7iJR9iY7U0D6SNz2uvJoTube6ssvbuYmLO0DxPbZ2fLl6HQs8/QKGFp+O+5hFdNVYcL8WB62j99NLjLhzV/K0xdnXUVjLvcuI8L6uhjgMkK5eGZ893yXb+wu3lFLtaXbGoqa1pisuGWoyt0HVs0+8laToepGmCHbHmIGyIUXuG5njWU4uxSh25Y2tMNvbjbmgZZF3f0DOeAtAAsmHRfcB1dddVwsAyYlESqJsn+pirTHGT6Uh0GzFUVHEXQecmZ103AN2FOpHEFHWEI1ehE9/E6CqGauX3MHJG/cc9kAZhIPkS/P+3UCbuHnvSUf4F/gGrje1Ji+JMdgAAAABJRU5ErkJggg==)}.fade-enter-active[data-v-faa5fcee],.fade-leave-active[data-v-faa5fcee]{-webkit-transition:opacity .5s;transition:opacity .5s}.fade-enter[data-v-faa5fcee],.fade-leave-to[data-v-faa5fcee]{opacity:0}.upDown-enter-active[data-v-faa5fcee],.upDown-leave-active[data-v-faa5fcee]{-webkit-transition:bottom .5s;transition:bottom .5s}.upDown-enter[data-v-faa5fcee],.upDown-leave-to[data-v-faa5fcee]{bottom:-350px}
| 12,264
| 12,264
| 0.906556
|
6de44ed557c707e4c88c76781aafab957099e100
| 104
|
h
|
C
|
demos/trace_categories.h
|
winter-loo/perfetto
|
0838748c5fe62c3aaf16c448134c51de86164fd1
|
[
"Apache-2.0"
] | null | null | null |
demos/trace_categories.h
|
winter-loo/perfetto
|
0838748c5fe62c3aaf16c448134c51de86164fd1
|
[
"Apache-2.0"
] | null | null | null |
demos/trace_categories.h
|
winter-loo/perfetto
|
0838748c5fe62c3aaf16c448134c51de86164fd1
|
[
"Apache-2.0"
] | null | null | null |
#pragma once
#include "perfetto/tracing.h"
PERFETTO_DEFINE_CATEGORIES(
perfetto::Category("base")
);
| 14.857143
| 29
| 0.759615
|
f4ee12ba33020c4d3a10c1d8e5fe65a3a2bbed42
| 6,181
|
swift
|
Swift
|
PlaygroundBook/Sources/LiveViewController_1_2.swift
|
tuanthatsmyname/wwdc-submission
|
b68cb515ee4b43a1c1cbe7c727ec109d9c1dd5a8
|
[
"MIT"
] | null | null | null |
PlaygroundBook/Sources/LiveViewController_1_2.swift
|
tuanthatsmyname/wwdc-submission
|
b68cb515ee4b43a1c1cbe7c727ec109d9c1dd5a8
|
[
"MIT"
] | null | null | null |
PlaygroundBook/Sources/LiveViewController_1_2.swift
|
tuanthatsmyname/wwdc-submission
|
b68cb515ee4b43a1c1cbe7c727ec109d9c1dd5a8
|
[
"MIT"
] | null | null | null |
//
// See LICENSE folder for this template’s licensing information.
//
// Abstract:
// Provides supporting functions for setting up a live view.
//
import UIKit
import Foundation
import PlaygroundSupport
public class LiveViewController_1_2: LiveViewController {
@IBOutlet weak var terminalTextView: UITextView!
var timer: Timer!
var terminal: Terminal!
var counter = 0
var terminalSettings: TerminalSettings!
public override func viewDidLoad() {
super.viewDidLoad()
setupTerminalSettings()
setupTerminalTextView()
showPrompt()
}
private func setupTerminalSettings() {
if let settings = DataManager.loadTerminalSettings() {
terminalSettings = settings
} else {
terminalSettings = TerminalSettings()
}
terminal = Terminal(currentPath: terminalSettings.currentPath, username: terminalSettings.username)
}
private func setupTerminalTextView() {
view.backgroundColor = terminalSettings.backgroundColor
terminalTextView.backgroundColor = .clear
terminalTextView.isEditable = false
// terminalTextView.isUserInteractionEnabled = false
}
private func showPrompt() {
if let terminalHistory = DataManager.loadTerminalHistory() {
terminalTextView.attributedText = terminalHistory
animateCursor()
} else {
timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { timer in
if self.counter % 2 == 0 {
let attributedString = NSMutableAttributedString(attributedString: self.terminalSettings.prompt)
attributedString.append(NSMutableAttributedString(string: "│", attributes: self.terminalSettings.normalAttributes))
self.terminalTextView.attributedText = attributedString
} else {
self.terminalTextView.attributedText = self.terminalSettings.prompt
}
self.counter += 1
}
}
}
private func executeCommand(command: String) {
timer.invalidate()
var index = 0
let _ = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: true) { timer in
if index < command.count {
let attributedText = NSMutableAttributedString(attributedString: self.terminalTextView.attributedText)
// deleting "|" from the prompt animation
if index == 0, attributedText.string.last! == "│" {
attributedText.deleteCharacters(in: NSRange(location: attributedText.length - 1, length: 1))
}
// deleting "|" from the type animation
if index != 0 {
attributedText.deleteCharacters(in: NSRange(location: attributedText.length - 1, length: 1))
}
attributedText.append(NSMutableAttributedString(string: String(command.characters[index]) + "│", attributes: self.terminalSettings.normalAttributes))
self.terminalTextView.attributedText = attributedText
}
index += 1
if index == command.count + 3 {
timer.invalidate()
let attributedText = NSMutableAttributedString(attributedString: self.terminalTextView.attributedText)
// deleting "|" from the type animation
attributedText.deleteCharacters(in: NSRange(location: attributedText.length - 1, length: 1))
attributedText.append(NSMutableAttributedString(string: "\n"))
if let result = self.terminal.execute(command: command) {
attributedText.append(NSMutableAttributedString(string: result, attributes: self.terminalSettings.normalAttributes))
attributedText.append(NSMutableAttributedString(string: "\n"))
}
self.terminalSettings.currentPath = self.terminal.currentPath
attributedText.append(self.terminalSettings.prompt)
self.terminalTextView.attributedText = attributedText
if self.terminalTextView.contentSize.height > self.terminalTextView.frame.height {
let range = NSMakeRange(self.terminalTextView.attributedText.length - 1, 1)
self.terminalTextView.scrollRangeToVisible(range)
}
DataManager.saveTerminalHistory(from: attributedText)
DataManager.saveTerminalSettings(of: self.terminalSettings)
self.animateCursor()
}
}
}
private func animateCursor() {
counter = 0
timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { timer in
if self.counter % 2 == 0 {
let attributedText = NSMutableAttributedString(attributedString: self.terminalTextView.attributedText)
attributedText.append(NSMutableAttributedString(string: "│", attributes: self.terminalSettings.normalAttributes))
self.terminalTextView.attributedText = attributedText
} else {
let attributedText = NSMutableAttributedString(attributedString: self.terminalTextView.attributedText)
attributedText.deleteCharacters(in: NSRange(location: attributedText.length - 1, length: 1))
self.terminalTextView.attributedText = attributedText
}
self.counter += 1
}
}
override public func receive(_ message: PlaygroundValue) {
guard case .data(let messageData) = message else { return }
do {
if let command = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(messageData) as? String {
executeCommand(command: command)
}
} catch let error { fatalError("\(error) Unable to receive the message from the Playground page") }
}
}
| 41.483221
| 165
| 0.613978
|
01da5b84384a44bed2390b6702792efb35e588b9
| 1,492
|
html
|
HTML
|
drivers/src/java/scriptella/driver/velocity/package.html
|
YN-Soong/scriptetl
|
1df606af802ceb782be2fdbf64bfe611bd95f1ee
|
[
"Apache-2.0"
] | 100
|
2015-02-05T00:01:53.000Z
|
2022-03-21T07:01:41.000Z
|
drivers/src/java/scriptella/driver/velocity/package.html
|
YN-Soong/scriptetl
|
1df606af802ceb782be2fdbf64bfe611bd95f1ee
|
[
"Apache-2.0"
] | 31
|
2015-02-05T00:36:20.000Z
|
2022-02-14T22:42:21.000Z
|
drivers/src/java/scriptella/driver/velocity/package.html
|
YN-Soong/scriptetl
|
1df606af802ceb782be2fdbf64bfe611bd95f1ee
|
[
"Apache-2.0"
] | 48
|
2015-01-05T06:42:19.000Z
|
2021-10-05T20:19:32.000Z
|
<body>
<h1>Velocity Adapter for Scriptella.</h1>
This driver allows to integrate velocity templates into script files.
<p>The content inside scipt elements managed by this driver is evaluated by Velocity engine and the output
is sent to the URL specified as connection parameter.</p>
<h2>General information</h2>
<table>
<tr>
<td><b>Driver class:</b></td><td><code>scriptella.driver.velocity.Driver</code></td>
</tr>
<tr>
<td><b>URL:</b></td><td><code>URL to send output to. URIs are resolved relative to a script file directory.</code></td>
</tr>
<tr>
<td><b>Runtime dependencies:</b></td><td><code><a href="http://www.ibiblio.org/pub/packages/maven2/velocity/velocity-dep/1.4/velocity-dep-1.4.jar">velocity-dep-1.4.jar</a></code></td>
</tr>
</table>
<h2>Driver Specific Properties</h2>
<table border="1">
<tr>
<th>Name</th>
<th>Description</th>
<th>Required</th>
</tr>
<tr>
<td>encoding</td>
<td>Character encoding for output streams.</td>
<td>No, the JVM default charset is used.</td>
</tr>
</table>
<h2>Example</h2>
<code><pre>
<connection driver="scriptella.spi.velocity.Driver" url="report.html">
encoding=UTF-8;
</connection>
</pre></code>
Registers a velocity connection which renders its output to a file report.html in the same directory
where the script file resides. UTF-8 is used to encode output.
</body>
| 34.697674
| 192
| 0.644102
|
45818cdcb96e7fe82fa16f435b9aa64604f2e478
| 36,019
|
py
|
Python
|
regular_language/fa.py
|
ShoYamanishi/nlpregex
|
795b36d5a2fad8bc25264b2093ffa9c3723b282b
|
[
"MIT"
] | 1
|
2021-12-03T07:20:18.000Z
|
2021-12-03T07:20:18.000Z
|
regular_language/fa.py
|
ShoYamanishi/nlpregex
|
795b36d5a2fad8bc25264b2093ffa9c3723b282b
|
[
"MIT"
] | null | null | null |
regular_language/fa.py
|
ShoYamanishi/nlpregex
|
795b36d5a2fad8bc25264b2093ffa9c3723b282b
|
[
"MIT"
] | null | null | null |
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import nlpregex.abs_graph.double_link
import nlpregex.abs_graph.node
import nlpregex.abs_graph.edge
import nlpregex.abs_graph.graph
from graphviz import Digraph
import re
import subprocess
import os
SYM_EPSILON = "<eps>"
# @class FA
#
# Represents a finite-state automaton FA=(A, S, s, D, F) where
# A: set of alphabets
# S: set of states
# s: start state
# F: set of final states
# D: S x A -> S: Transition from a state to the next upon
# receiving an alphabet.
#
# It is represented by directed graph FA=(N,E).
# N: set of states in FANode.
# E: represents transition D in FAEdge.
#
# The transition is defined as in_token and out_token.
# Epsilon transition is represented by empty string ''.
#
#
# Standalone functions
# --------------------
#
# - DFA_from_NFA( nfa , optimize = False)
#
# generates an equivalent DFA from given NFA
# It assumes the availability of the following commands and libs from OpenFST.
# - fstcompile
# - fstdeterminize
# - fstrmepsilon
# - fstminimize
# - fstprint
#
# @param nfa : input NFA
# @param optimize : True if you want to run fstminimize
# it will change the relative position of output token
# relative to the input token.
# @return DFA in FA.
#
#
#
# # Following functions are provided to generate a primitive automata.
#
#
# - make_unit_epsilon()#
#
# creates an FA that has the unit epsilon transition only
# s ---[eps]---> f
#
#
# - make_unit_transition(in_token, out_token):
#
# creates an FA that accepts a single token.
#
# s --- in_token/out_token ---> f
#
#
# - ttsp_concatenate( S )
#
# creates an FA which accepts the sequence serially in the
# FAs specified in S in that order.
# Let S = [Sstart, S2, S3, ..., Send]
# Then the resultant FA's start state is Start's start, and
# the final states correspond to the final states of Send.
#
# Sstart.s ---<Sstart>---> n1 ---<S2>---> n2 ... ---<Send>--->Send.F
#
#
# - ttsp_bundle( P )
#
# creates an FA which accepts any sequence by FA specified in P.
# Let P = [P1, P2, ..., PN]
#
# +---<P1>---+
# | |
# s-+---<P2>---+-F
# | ... ... |
# | |
# +---<Pn>---+
#
#
# - enclose_in_cycle( g, plus_or_star )
#
# Make the FA a Kleene closure or a positive closure.
#
# @param g : FA to be processed
# @param plus_or_star : '+' - add a backward edge from f to s.
# '*' - add a backward edge and forward edge
#
# Add a backward edge from the finish node to the start node
#
# ________ ________
# / \ / \
# s----------f => s_new -<eps>-> s----------f -<eps>-> f_new
# \________/ | ^\________/| ^
# | | | |
# | --<eps>--- |
# --------------<eps>----------------
# ('*')
#
# # Convertion to/from OpenFST
#
# FA has a functionality to convert to/from OpenFST text format files.
#
# FST's text representation consists of three files.
#
# - FST file
# This describest the graph structure and their edges.
# It consists of three parts.
#
# The first part has the following line.
#
# 0 dst_node_id in_sym_id [out_sym_id] [weight]
#
# The first 0 represents the intial node ID and it is reserved for
# the initial state.
#
# The second part has the follwing format per line.
#
# src_node_id dst_node_id in_sym_id [out_sym_id] [weight]
#
# They are all decimal numbers.
# The src_node_id in the first line designates the start state.
#
# The third part has the following format per line.
#
# final_node_id
#
# - Input symbol file
# This describest the mapping from in_sym_id in the FST file to an actual symbol.
# Each line has the following format.
# in_sym_id in_sym_str
#
# 0 is reserved for epsilon and it is by customary the first line as follows.
#
# 0 <eps>
#
# - Output symbol file
# This describest the mapping from out_sym_id in the FST file to an actual symbol.
# It has the same format as the input symbol file.
#
# To avoid potential problems caused by certain characters in unicode in in_token and out_token of FAEdge,
# we make a mapping from the strings in in_token/out_token to in_sym_str/out_sym_str.
#
# The mapping from in_token/out_token to in_sym_str/out_sym_str is as follows
#
# in_token/out_token <===> in_sym{:08d}".format(id) / out_sym{:08d}".format(id)
#
#
# The conversion is provided by the following two member functions of FA.
#
#
# Conversion to OpenFST:
# ( str0, str1, str2, str3, str4 ) = FA.to_open_fst()
#
# str0 : contents of FST file for OpenFST
# str1 : contents of Input symbol file for OpenFST
# str2 : contents of Output symbol file for OpenFST
# str3 : contents of mapping from in_sym_str to real in_token
# str4 : contents of mapping from out_sym_str to real out_token
#
#
# Conversion from OpenFST:
# FA.from_open_fst( fst, sym_in, sym_out )
#
# FA must be empty before calling this.
# @param fst : conetnts of OpenFST file (text version, not compiled binary version.)
# @param sym_in : mapping from in_sym_str to real in_token
# @param sym_out : mapping from out_sym_str to real out_token
#
class FANode(nlpregex.abs_graph.node.BaseNode):
def __init__( self ):
super().__init__()
self.start_node = False
self.final_node = False
self.node_id = 0
class FAEdge(nlpregex.abs_graph.edge.BaseEdge):
def __init__(self):
super().__init__()
self.in_token = ""
self.out_token = ""
def is_epsilon(self):
return self.in_token == ""
class FA(nlpregex.abs_graph.graph.BaseGraph):
def __init__(self):
super().__init__()
self.start_node = None
self.final_nodes = []
self.re_balanced_token_patten = re.compile( r'^\[(PRE|POST) [0-9]+\]$' )
def set_start_node( self, n ):
self.start_node = n
n.srart_node = True
def get_start_node( self ):
return self.start_node
def remove_start_node( self ):
if self.start_node:
n = self.start_node
n.srart_node = False
return n
else:
return None
def add_final_node( self, n ):
self.final_nodes.append( n )
n.final_node = True
def first_final_node( self ):
if len( self.final_nodes ) != 0:
return self.final_nodes[0]
else:
return None
def remove_final_nodes( self ):
final_nodes_copy = self.final_nodes
self.final_nodes = []
for n in final_nodes_copy:
n.final_node = False
return final_nodes_copy
def draw( self, comment_string, show_out_token = False, view_now = True, out_format = "svg" ):
self.reassign_node_ids()
g_dot = Digraph( comment = comment_string )
g_dot.graph_attr['rankdir'] = 'LR'
for n in self.nodes():
label_out = str(n.node_id)
if n in self.final_nodes:
g_dot.node( str(n.node_id), label=label_out, shape='doublecircle' )
else:
g_dot.node( str(n.node_id), label=label_out, shape='circle' )
for e in self.directed_edges():
e.in_token
in_token = e.in_token.replace('"', '')
out_token = e.out_token.replace('"', '')
if in_token == "":
in_token = "ε"
if out_token == "":
out_token = "ε"
if show_out_token:
label_out = '"' +in_token + " / " + out_token + '"'
else:
label_out = '"' + in_token + '"'
g_dot.edge( str(e.src_node.node_id), str(e.dst_node.node_id), label=label_out )
for n in self.nodes():
delattr( n, 'node_id' )
g_dot.render( comment_string, view=view_now, format=out_format )
def reassign_node_ids(self):
node_id = 1
for n in self.nodes():
if n == self.start_node:
n.node_id = 0
else:
n.node_id = node_id
node_id += 1
# This FA must be empty before calling this.
# @param
# lines : List of phrases
def from_flat_list( self, lines ):
s_f_created = False
lines = lines.split("\n")
for line in lines:
fields = line.strip().split()
fields_cleaned = []
for e in fields:
if len(e)>0:
fields_cleaned.append(e)
if len(fields_cleaned)== 1:
if not s_f_created:
s = FANode()
s.add_to_graph(self)
self.set_start_node(s)
f = FANode()
f.add_to_graph(self)
self.add_final_node(f)
s_f_created = True
e = FAEdge()
e.in_token = fields[0]
e.out_token = fields[0]
e.add_to_graph( self, s, f, "directed" )
elif len(fields_cleaned) > 1:
if not s_f_created:
s = FANode()
s.add_to_graph(self)
self.set_start_node(s)
f = FANode()
f.add_to_graph(self)
self.add_final_node(f)
s_f_created = True
prev_node = s
for i in range(0, len(fields_cleaned)-1):
n = FANode()
n.add_to_graph(self)
e = FAEdge()
e.in_token = fields_cleaned[i]
e.out_token = fields_cleaned[i]
e.add_to_graph( self, prev_node, n, "directed" )
prev_node = n
e = FAEdge()
e.in_token = fields_cleaned[-1]
e.out_token = fields_cleaned[-1]
e.add_to_graph( self, prev_node, f, "directed" )
self.reassign_node_ids()
#
# Generates file contents that describes this FA for OpenFST.
#
# @param retain_balanced_in_token :
# True : in_token is passed as is.
# False : if in_token matches '^\[(PRE|POST) [0-9]+\]$'
# then it will be replaced with ''
# This must be set to False for decoder.
#
# @return
#
# fst_str : file content for OpenFST in AT&T FSM format
# It consists of three parts. (Optional weights are not shown.)
#
# First part. (Initial state and its transitions)
# 0 <new state id> <open fst in_token> <open fst out_token>
#
# Second part.
# <cur state id> <new state id> <open fst in_token> <open fst out_token>
#
# Third part
# <final state>
# NOTE: Id 0 is reserved for the initial state.
#
# fst_sym_in_str : file content for OpenFST symbol table for in tokens.
# fst_sym_out_str : file content for OpenFST symbol table for out tokens.
# Format:
# <open fst token> <token ID>
# NOTE: ID 0 is reserved for epsilon transition.
#
# real_sym_in_str : file content to convert OpenFST token ID to the real token ID
# real_sym_out_str : file content to convert OpenFST token ID to the real token ID
# Format:
# <open fst token><TAB><real token>
# NOTE: Those last two files are needed for re_tool.FA.FA to restore info.
#
# NOTE The reason for the last two files is to avoid potential issues around
# unicodes in OpenFST.
#
def to_open_fst( self, retain_balanced_in_token = True ):
self.reassign_node_ids()
# Create symbol tables.
# As OpenFST does not handle unicode well, we
# arrenge two tables for each of in_tokens and out_tokens.
sym_map_in , sym_id_in = self.create_in_token_map()
sym_map_out , sym_id_out = self.create_out_token_map()
fst_str = self.create_fst_file( sym_map_in, sym_map_out, retain_balanced_in_token )
fst_sym_in_str , real_sym_in_str = self.create_in_sym_files ( sym_map_in, sym_id_in )
fst_sym_out_str , real_sym_out_str = self.create_out_sym_files( sym_map_out, sym_id_out )
return [ fst_str, fst_sym_in_str, fst_sym_out_str, real_sym_in_str, real_sym_out_str ]
#
# Generates file contents that describes this FA for OpenFST.
# It uses the symbol tables defined in another FA specified by fa_base
#
# @param real_sym_in_str : file content to convert OpenFST token ID to the real token ID
# @param real_sym_out_str : file content to convert OpenFST token ID to the real token ID
# Format:
# <open fst token><TAB><real token>
# NOTE: Those last two files are needed for re_tool.FA.FA to restore info.
#
# @return : file content for OpenFST in AT&T FSM format
#
# NOTE This implementation is not optimal.
#
def to_open_fst_using_existing_sym_map( self, real_sym_in_str, real_sym_out_str, retain_balanced_in_token = False ):
self.reassign_node_ids()
real_to_openfst_in = self.create_reverse_token_map_from_string( real_sym_in_str )
real_to_openfst_out = self.create_reverse_token_map_from_string( real_sym_in_str )
out_str = ''
# First part
# cur_state new_state in_token/out_token
# We don't use real tokens store in in_token and out_token
# to avoid unicode related issues in OpenFST.
# Instead, we use ID also as symbol.
for e in self.directed_edges():
if e.src_node.node_id == 0:
out_str += str(e.src_node.node_id)
out_str += "\t"
out_str += str(e.dst_node.node_id)
out_str += "\t"
if retain_balanced_in_token:
out_str += real_to_openfst_in[ e.in_token ]
elif not re.match( self.re_balanced_token_patten, e.in_token ):
out_str += real_to_openfst_in[ e.in_token ]
else:
# Epsilon
out_str += real_to_openfst_in[ '' ]
out_str += "\t"
out_str += real_to_openfst_out[ e.out_token ]
out_str += "\n"
# Second part
for e in self.directed_edges():
if e.src_node.node_id != 0:
out_str += str(e.src_node.node_id)
out_str += "\t"
out_str += str(e.dst_node.node_id)
out_str += "\t"
if retain_balanced_in_token:
out_str += real_to_openfst_in[ e.in_token ]
elif not re.match( self.re_balanced_token_patten, e.in_token ):
out_str += real_to_openfst_in[ e.in_token ]
else:
# Epsilon
out_str += real_to_openfst_in[ '' ]
out_str += "\t"
out_str += real_to_openfst_out[ e.out_token ]
out_str += "\n"
# Third part
# List of final states.
for f in self.final_nodes:
out_str += str(f.node_id)
out_str += "\n"
return out_str
# This FA must be empty before calling this.
# @param
# fst : OpenFST file (text version, not compiled binary version.)
# sym_in : Real symbol file content for in_tokens
# sym_out : Real symbol file content for out_tokens
def from_open_fst( self, fst, sym_in, sym_out ):
fst_cleaned = self.remove_comments(fst)
sym_in_cleaned = self.remove_comments(sym_in)
sym_out_cleaned = self.remove_comments(sym_out)
sym_map_in = self.create_token_map_from_string(sym_in_cleaned)
sym_map_out = self.create_token_map_from_string(sym_out_cleaned)
node_set, final_node_set = self.get_node_sets_from_fst_file(fst_cleaned)
node_map = {}
for id in node_set:
n = FANode()
n.add_to_graph(self)
node_map[id] = n
if id == 0:
self.start_node = n
if id in final_node_set:
self.final_nodes.append(n)
edge_list = self.get_edge_list_from_fst_file(fst_cleaned)
for quad in edge_list:
src_id = int(quad[0])
dst_id = int(quad[1])
openfst_in_token = quad[2]
openfst_out_token = quad[3]
e = FAEdge()
e.in_token = sym_map_in [ openfst_in_token ]
e.out_token = sym_map_out [ openfst_out_token ]
e.add_to_graph( self, node_map[src_id], node_map[dst_id], "directed" )
self.reassign_node_ids()
# Create two sym files. One for OpenFST, the other for real mapping
#
# Open FST symbol file format:
# <open fst token> <id>
#
# Real symbol file format
# <open fst token><TAB><real token>
#
def create_in_sym_files( self, sym_map, max_id_plus_one ):
out_str_fst = ''
out_str_fst += (SYM_EPSILON + " 0\n")
for i in range (1, max_id_plus_one):
out_str_fst += self.open_fst_in_sym_from_id( i )
out_str_fst += "\t"
out_str_fst += str( i )
out_str_fst += "\n"
out_str_real = ''
for k in sym_map:
out_str_real += self.open_fst_in_sym_from_id( sym_map[k] )
out_str_real += "\t"
out_str_real += k
out_str_real += "\n"
return out_str_fst, out_str_real
def create_out_sym_files( self, sym_map, max_id_plus_one ):
out_str_fst = ''
out_str_fst += (SYM_EPSILON + " 0\n")
for i in range (1, max_id_plus_one):
out_str_fst += self.open_fst_out_sym_from_id( i )
out_str_fst += "\t"
out_str_fst += str( i )
out_str_fst += "\n"
out_str_real = ''
for k in sym_map:
out_str_real += self.open_fst_out_sym_from_id( sym_map[k] )
out_str_real += "\t"
out_str_real += k
out_str_real += "\n"
return out_str_fst, out_str_real
def create_fst_file( self, sym_map_in, sym_map_out, retain_balanced_in_token = True ):
out_str = ''
# First part
# cur_state new_state in_token/out_token
# We don't use real tokens store in in_token and out_token
# to avoid unicode related issues in OpenFST.
# Instead, we use ID also as symbol.
for e in self.directed_edges():
if e.src_node.node_id == 0:
out_str += str(e.src_node.node_id)
out_str += "\t"
out_str += str(e.dst_node.node_id)
out_str += "\t"
if retain_balanced_in_token:
out_str += self.open_fst_in_sym_from_id( sym_map_in [ e.in_token ] )
elif not re.match( self.re_balanced_token_patten, e.in_token ):
out_str += self.open_fst_in_sym_from_id( sym_map_in [ e.in_token ] )
else:
# Epsilon
out_str += self.open_fst_in_sym_from_id( sym_map_in [ '' ] )
out_str += "\t"
out_str += self.open_fst_out_sym_from_id( sym_map_out[ e.out_token ] )
out_str += "\n"
# Second part
for e in self.directed_edges():
if e.src_node.node_id != 0:
out_str += str(e.src_node.node_id)
out_str += "\t"
out_str += str(e.dst_node.node_id)
out_str += "\t"
if retain_balanced_in_token:
out_str += self.open_fst_in_sym_from_id( sym_map_in [ e.in_token ] )
elif not re.match( self.re_balanced_token_patten, e.in_token ):
out_str += self.open_fst_in_sym_from_id( sym_map_in [ e.in_token ] )
else:
# Epsilon
out_str += self.open_fst_in_sym_from_id( sym_map_in [ '' ] )
out_str += "\t"
out_str += self.open_fst_out_sym_from_id( sym_map_out[ e.out_token ] )
out_str += "\n"
# Third part
# List of final states.
for f in self.final_nodes:
out_str += str(f.node_id)
out_str += "\n"
return out_str
# k : token v(string): id (integer)
def create_in_token_map(self):
sym_map = {}
token_id = 1
sym_map[""] = 0 # epsilon
for e in self.directed_edges():
if not e.in_token in sym_map:
sym_map[e.in_token]= token_id
token_id += 1
# map, the max id + 1
return sym_map, token_id
def create_out_token_map(self):
sym_map = {}
token_id = 1
sym_map[""] = 0 # epsilon
for e in self.directed_edges():
if not e.out_token in sym_map:
sym_map[e.out_token]= token_id
token_id += 1
# map, the max id + 1
return sym_map, token_id
# k : open fst token v: real token
def create_token_map_from_string( self, sym_str ):
sym_map = {}
lines = sym_str.split("\n")
for line in lines:
if line == '':
continue
fields = line.strip().split("\t")
if len(fields) == 2:
openfst_sym = fields[0]
real_sym = fields[1]
sym_map[openfst_sym] = real_sym
elif len(fields) == 1:
openfst_sym = fields[0]
sym_map[openfst_sym] = ""
return sym_map
def create_reverse_token_map_from_string( self, sym_str ):
sym_map = {}
lines = sym_str.split("\n")
for line in lines:
if line == '':
continue
fields = line.strip().split("\t")
if len(fields) == 2:
openfst_sym = fields[0]
real_sym = fields[1]
sym_map[real_sym] = openfst_sym
elif len(fields) == 1:
openfst_sym = fields[0]
sym_map[''] = openfst_sym
return sym_map
def get_node_sets_from_fst_file( self, fst ):
node_set = set()
final_node_set = set()
lines = fst.split("\n")
for line in lines:
fields = line.strip().split("\t")
if len(fields) >= 4:
node_set.add( int(fields[0]) )
node_set.add( int(fields[1]) )
elif len(fields) >= 1 and fields[0]:
node_set.add( int(fields[0]) )
final_node_set.add( int(fields[0]) )
return node_set, final_node_set
def open_fst_in_sym_from_id( self, id ):
if id == 0:
return SYM_EPSILON
else:
return "in_sym{:08d}".format(id)
def open_fst_out_sym_from_id( self, id ):
if id == 0:
return SYM_EPSILON
else:
return "out_sym{:08d}".format(id)
def get_id_from_open_fst_sym( self, sym_str ):
if sym_str == SYM_EPSILON:
return 0
else:
num_part = re.sub( r'(in|out)_sym0+', '', sym_str)
return int(num_part)
def get_edge_list_from_fst_file( self, fst ):
edge_list = []
lines = fst.split('\n')
for line in lines:
fields = line.strip().split("\t")
if len(fields) >= 2:
quad = []
quad.append(int(fields[0]))
quad.append(int(fields[1]))
quad.append(fields[2])
quad.append(fields[3])
edge_list.append(quad)
return edge_list
# Removes /**/, //... and #...
# Comments can be best handled separately from the parser.
def remove_comments( self, s ):
def replacer(match):
s = match.group(0)
if s.startswith('/'):
return " "
elif s.startswith('#'):
return ""
else:
return s
pattern = re.compile(
r'^#.*?$|//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
re.DOTALL | re.MULTILINE
)
return re.sub(pattern, replacer, s)
# Make a FA that has only one epsilon transition from s to f.
def make_unit_epsilon():
g_new = FA()
s_new = FANode() # start node
f_new = FANode() # final node
s_new.add_to_graph( g_new )
f_new.add_to_graph( g_new )
e = FAEdge()
e.in_token = ""
e.out_token = ""
e.add_to_graph( g_new, s_new, f_new, "directed" )
g_new.set_start_node( s_new )
g_new.add_final_node( f_new )
g_new.reassign_node_ids()
return g_new
def make_unit_transition( in_token, out_token ):
g_new = FA()
s_new = FANode() # start node
f_new = FANode() # final node
s_new.add_to_graph( g_new )
f_new.add_to_graph( g_new )
e = FAEdge()
e.in_token = in_token
e.out_token = out_token
e.add_to_graph( g_new, s_new, f_new, "directed" )
g_new.set_start_node( s_new )
g_new.add_final_node( f_new )
g_new.reassign_node_ids()
return g_new
def unify_nodes_start_and_final( g, f, s ):
E = s.out_neighbors()
AN = [ e.other_node_of(s) for e in E ]
s.remove_from_graph()
for i in range( 0, len(E) ):
E[i].add_to_graph( g, f, AN[i], "directed" )
def unify_nodes_two_starts( g, s_retain, s_discarded ):
E = s_discarded.out_neighbors()
AN = [ e.other_node_of(s_discarded) for e in E ]
s_discarded.remove_from_graph()
for i in range( 0, len(E) ):
E[i].add_to_graph( g, s_retain, AN[i], "directed" )
def unify_nodes_two_finals( g, f_retain, f_discarded ):
E = f_discarded.in_neighbors()
AN = [ e.other_node_of(f_discarded) for e in E ]
f_discarded.remove_from_graph()
for i in range( 0, len(E) ):
E[i].add_to_graph( g, AN[i], f_retain, "directed" )
# Concatenate the TTSP graphs in the list S serially.
def ttsp_concatenate( S ):
g_new = FA()
# Transfer the nodes and edges of S to g_new
for g in S:
g_new.transfer_from( g )
# Af this point g.start_node and g.final_nodes
# still hold valid nodes.
g_new.set_start_node ( S[ 0].get_start_node() )
g_new.add_final_node ( S[-1].first_final_node() )
current_final_node = S[ 0].first_final_node()
for g in S[1:]:
# f: current_final_node
# s: g.start_node
# --> --> --> -->
# \ / \ /
# ---->(f)...(s)---> => ---->f--->
# / \ / \
# --> --> --> -->
unify_nodes_start_and_final( g_new, current_final_node, g.get_start_node() )
current_final_node = g.first_final_node()
g.remove_start_node()
g.remove_final_nodes()
g_new.reassign_node_ids()
return g_new
# Bundle the TTSP graphs in the list P in parallel
def ttsp_bundle( P ):
g_new = FA()
# Transfer the nodes and edges of S to g_new
for g in P:
g_new.transfer_from( g )
s_new = FANode() # start node
f_new = FANode() # final node
s_new.add_to_graph(g_new)
f_new.add_to_graph(g_new)
g_new.set_start_node( s_new )
g_new.add_final_node( f_new )
for g in P:
# s: g.start_node
# +-------> +------->
# s_new -+-------> +------->
# +-------> +------->
# => s_new -+
# +-------> +------->
# s -+-------> +------->
# +-------> +------->
unify_nodes_two_starts ( g_new, s_new, g.get_start_node() )
unify_nodes_two_finals ( g_new, f_new, g.first_final_node() )
g.remove_start_node()
g.remove_final_nodes()
g_new.reassign_node_ids()
return g_new
#
# ________ ________
# / \ / \
# s----------f => s_new -<eps>-> s----------f -<eps>-> f_new
# \________/ | ^\________/| ^
# | | | |
# | --<eps>--- |
# --------------<eps>----------------
# ('*')
#
def enclose_in_cycle( g, plus_or_star ):
s_new = FANode() # start node
f_new = FANode() # final node
s_new.add_to_graph(g)
f_new.add_to_graph(g)
e = FAEdge()
e.in_token = ""
e.out_token = ""
e.add_to_graph( g, s_new, g.start_node, "directed" )
for f in g.final_nodes:
e = FAEdge()
e.in_token = ""
e.out_token = ""
e.add_to_graph( g, f, f_new,"directed" )
e_back = FAEdge()
e_back.in_token = ""
e_back.out_token = ""
e_back.add_to_graph( g, f, g.start_node, "directed" )
g.start_node = s_new
g.final_nodes = [f_new]
if plus_or_star == '*':
e = FAEdge()
e.in_token = ""
e.out_token = ""
e.add_to_graph( g, s_new, f_new, "directed" )
return g
# Generates an equivalent DFA from given NFA
# It assumes the availability of the following commands and libs from OpenFST.
# - fstcompile
# - fstdeterminize
# - fstrmepsilon
# - fstminimize
# - fstprint
#
# @param nfa : input NFA
# @param optimize : True if you want to run fstminimize
# it will change the relative position of output token
# relative to the input token.
def DFA_from_NFA( nfa , optimize = False):
nfa_contents = nfa.to_open_fst( retain_balanced_in_token = True )
nfa_fst_str = nfa_contents[0]
fst_sym_in_str = nfa_contents[1]
fst_sym_out_str = nfa_contents[2]
real_sym_in_str = nfa_contents[3]
real_sym_out_str = nfa_contents[4]
with open( 'nfa_fst.txt', 'w', encoding='utf-8' ) as nfa_fst_fh:
nfa_fst_fh.write( nfa_fst_str )
with open( 'fst_sym_in.txt', 'w', encoding='utf-8' ) as fst_sym_in_fh:
fst_sym_in_fh.write( fst_sym_in_str )
with open( 'fst_sym_out.txt', 'w', encoding='utf-8' ) as fst_sym_out_fh:
fst_sym_out_fh.write( fst_sym_out_str )
subprocess.run([ "fstcompile", "--isymbols=fst_sym_in.txt", "--osymbols=fst_sym_out.txt", "nfa_fst.txt", "nfa.fst" ])
subprocess.run([ "fstdeterminize", "nfa.fst", "dfa.fst" ])
subprocess.run([ "fstrmepsilon", "dfa.fst", "dfa_epsremoved.fst" ])
if optimize:
subprocess.run([ "fstminimize", "dfa_epsremoved.fst", "dfa_minimized.fst" ])
subprocess.run([ "fstrmepsilon", "dfa_minimized.fst", "dfa_minimized_epsremoved.fst" ])
subprocess.run([ "fstprint", "--isymbols=fst_sym_in.txt", "--osymbols=fst_sym_out.txt", "dfa_minimized.fst", "dfa_fst.txt" ])
else:
subprocess.run([ "fstprint", "--isymbols=fst_sym_in.txt", "--osymbols=fst_sym_out.txt", "dfa_epsremoved.fst", "dfa_fst.txt" ])
with open('dfa_fst.txt', 'r', encoding='utf-8') as dfa_fst_fh:
dfa_fst_str = dfa_fst_fh.read()
dfa = FA()
dfa.from_open_fst( dfa_fst_str, real_sym_in_str, real_sym_out_str )
os.remove( "nfa_fst.txt" )
os.remove( "nfa.fst" )
os.remove( "dfa.fst" )
os.remove( "dfa_epsremoved.fst" )
if optimize:
os.remove( "dfa_minimized.fst" )
os.remove( "dfa_minimized_epsremoved.fst" )
os.remove( "fst_sym_in.txt" )
os.remove( "fst_sym_out.txt" )
return dfa
# It decodes given sequence of input tokens
# into a sequence of output tokens.
#
# It first creates a single-path FA (fa_input) that corresponds to
# the list of input tokes makking the output
# tokens the same as input.
# Then it composes FA (fa_base) into FA using OpenFST's fstcompose.
# The resultant FA (fa_output) will be either empty (not accepted)
# or a single path.
# If fa_output is not empty, it traverses fa_output to collect output tokens.
#
# @param fa_base : FA
#
# @param in_tokens : list of input_tokens
#
# @return list of output_tokens
# None if the input is not accepted
#
def decode( fa_base , in_tokens):
sym_map_in , sym_id_in = fa_base.create_in_token_map()
fa_list = []
for t in in_tokens:
if t in sym_map_in:
fa_list.append( make_unit_transition( t, t ) )
else:
# Token not found in the symbol table
# of fa_base. Rejecting
return None
fa_input = ttsp_concatenate( fa_list )
fa_base_contents = fa_base.to_open_fst( retain_balanced_in_token = False )
fa_base_fst_str = fa_base_contents[0]
fa_base_fst_sym_in_str = fa_base_contents[1]
fa_base_fst_sym_out_str = fa_base_contents[2]
fa_base_real_sym_in_str = fa_base_contents[3]
fa_base_real_sym_out_str = fa_base_contents[4]
fa_input_fst_str = fa_input.to_open_fst_using_existing_sym_map( fa_base_real_sym_in_str, fa_base_real_sym_out_str, retain_balanced_in_token = False )
with open( 'fa_base_fst.txt', 'w', encoding='utf-8' ) as fa_base_fst_fh:
fa_base_fst_fh.write( fa_base_fst_str )
with open( 'fst_sym_in.txt', 'w', encoding='utf-8' ) as fst_sym_in_fh:
fst_sym_in_fh.write( fa_base_fst_sym_in_str )
with open( 'fst_sym_out.txt', 'w', encoding='utf-8' ) as fst_sym_out_fh:
fst_sym_out_fh.write( fa_base_fst_sym_out_str )
with open( 'fa_input_fst.txt', 'w', encoding='utf-8' ) as fa_input_fst_fh:
fa_input_fst_fh.write( fa_input_fst_str )
subprocess.run([ "fstcompile", "--isymbols=fst_sym_in.txt", "--osymbols=fst_sym_out.txt", "fa_base_fst.txt", "fa_base.fst" ])
subprocess.run([ "fstcompile", "--isymbols=fst_sym_in.txt", "--osymbols=fst_sym_in.txt", "fa_input_fst.txt", "fa_input.fst" ])
subprocess.run([ "fstcompose", "fa_input.fst", "fa_base.fst", "fa_output.fst" ])
subprocess.run([ "fstprint", "--isymbols=fst_sym_in.txt", "--osymbols=fst_sym_out.txt", "fa_output.fst", "fa_output_fst.txt" ])
with open('fa_output_fst.txt', 'r', encoding='utf-8') as fa_output_fst_fh:
fa_output_fst_str = fa_output_fst_fh.read()
os.remove( "fa_base_fst.txt" )
os.remove( "fa_base.fst" )
os.remove( "fst_sym_in.txt" )
os.remove( "fst_sym_out.txt" )
os.remove( "fa_input_fst.txt" )
os.remove( "fa_input.fst" )
os.remove( "fa_output_fst.txt" )
os.remove( "fa_output.fst" )
fa_output = FA()
fa_output.from_open_fst( fa_output_fst_str, fa_base_real_sym_in_str, fa_base_real_sym_out_str )
if fa_output.num_nodes() == 0:
return None
cur_s = fa_output.start_node
output_tokens = []
while cur_s not in fa_output.final_nodes:
edges = cur_s.out_neighbors()
e = edges[0]
next_s = e.other_node_of(cur_s)
if e.out_token != '':
output_tokens.append( e.out_token )
cur_s = next_s
return output_tokens
| 30.654468
| 153
| 0.557178
|
38c520ab4689bcbc4e67625aa6314e6aa72688e1
| 2,472
|
sql
|
SQL
|
SQL/EDEN/User Edit Membership.sql
|
MMeaney/General-Code
|
f55575e0e5c5f4733f6e6b480bfb2103565009f5
|
[
"Apache-1.1"
] | null | null | null |
SQL/EDEN/User Edit Membership.sql
|
MMeaney/General-Code
|
f55575e0e5c5f4733f6e6b480bfb2103565009f5
|
[
"Apache-1.1"
] | null | null | null |
SQL/EDEN/User Edit Membership.sql
|
MMeaney/General-Code
|
f55575e0e5c5f4733f6e6b480bfb2103565009f5
|
[
"Apache-1.1"
] | null | null | null |
-- *******************************************
-- *** Update user organisation memebership
USE [EdenSSO-PRD]
-- 7C310BE0-C20F-DE11-B526-0022642A33B2 EPA STG Org
-- 66298E85-AC36-4634-A8FF-5D7383204F7B Barry Houlihan
-- 566E449A-AC49-4365-BD52-943B73FB10D6 Maurice Meaney
BEGIN TRANSACTION
INSERT INTO dbo.OrganisationMembership
VALUES(
NEWID()
, '7C310BE0-C20F-DE11-B526-0022642A33B2'
, '66298E85-AC36-4634-A8FF-5D7383204F7B'
, '14-OCT-2015'
, '14-OCT-2015'
, '566E449A-AC49-4365-BD52-943B73FB10D6'
, 0
, 0
, 0
, 1
)
COMMIT TRANSACTION
--ROLLBACK TRANSACTION
SELECT * FROM dbo.UserProfile WHERE UserId = 'EB2BE35C-06F1-4E44-8901-02EF200D6F1B'
SELECT * FROM dbo.OrganisationMembership WHERE UserId = 'EB2BE35C-06F1-4E44-8901-02EF200D6F1B'
-- *******************************************
-- *** User details
SELECT DISTINCT
UPR.Email AS [EdenEmail]
, UPR.Username AS [EdenUsername]
, ORG.Name AS [Organisation]
, MDL.Name AS [Module]
, MAU.Active AS [ModActive]
, UMB.PasswordExpiration
, UPR.Email2 AS [CRMEmail]
, OTY.Name AS [OrganisationType]
, UPR.Active
, LTRIM(RTRIM(UPR.FirstName)) + ' ' + LTRIM(RTRIM(UPR.LastName)) AS [Name]
, LTRIM(RTRIM(APRV.FirstName)) + ' ' + LTRIM(RTRIM(APRV.LastName)) AS [ApprovedBy]
--, NOTF.Data AS [Notification]
--, NOTF.EmailSentOn
--, NTDF.Name AS [NotificationDefinition]
--, EVT.Name AS [EventType]
, UPR.*
, ORG.*
--, UMB.*
--, MDL.*
FROM dbo.UserProfile UPR
LEFT JOIN dbo.UserMembership UMB ON UMB.UserId = UPR.UserId
LEFT JOIN dbo.OrganisationMembership OMB ON OMB.UserId = UPR.UserId
LEFT JOIN dbo.Organisation ORG ON ORG.OrganisationId = OMB.OrganisationId
LEFT JOIN dbo.OrganisationType OTY ON OTY.OrganisationTypeId = ORG.OrganisationTypeId
LEFT JOIN dbo.ModuleAuthorisation MAU ON MAU.UserId = OMB.UserID
LEFT JOIN dbo.UserProfile APRV ON APRV.UserId = MAU.LastUpdatedBy
LEFT JOIN dbo.Module MDL ON MDL.ModuleId = MAU.ModuleId
LEFT JOIN dbo.Notification NOTF ON NOTF.AddresseeUserId = UPR.UserId
LEFT JOIN dbo.NotificationDefinition NTDF ON NTDF.NotificationDefinitionId = NOTF.NotificationDefinition
LEFT JOIN dbo.EventType EVT ON EVT.EventTypeId = NTDF.EventTypeId
WHERE UPR.Email LIKE '%b.houlihan@epa.ie%'
--WHERE UPR.Phone LIKE '%45%439464%'
ORDER BY UMB.PasswordExpiration, UPR.Email, MDL.Name, OTY.Name, ORG.Name
| 34.816901
| 105
| 0.675971
|
6b53999f6fbf4cd2cbd1e8ff33fb7f650e94f342
| 1,191
|
js
|
JavaScript
|
template/tests/utils.js
|
revathskumar/cra-template-web
|
74d77bc00cff59ff43baa5d306d03376a13cd123
|
[
"MIT"
] | 3
|
2020-01-31T13:29:33.000Z
|
2020-02-02T05:47:37.000Z
|
template/tests/utils.js
|
revathskumar/cra-template-web
|
74d77bc00cff59ff43baa5d306d03376a13cd123
|
[
"MIT"
] | null | null | null |
template/tests/utils.js
|
revathskumar/cra-template-web
|
74d77bc00cff59ff43baa5d306d03376a13cd123
|
[
"MIT"
] | null | null | null |
// test/utils.js
import React from "react";
import { render } from '@testing-library/react';
import { Provider } from "react-redux";
import { Router, MemoryRouter } from "react-router-dom";
import { createMemoryHistory } from "history";
import { configureStore } from "store";
const store = configureStore({});
const reduxRender = (node, options = {}) => {
return render(
<div className="App">
<Provider store={options.store || store}>
{node}
</Provider>
</div>,
options
);
};
const customRender = (node, options = {}) => {
return reduxRender(
<MemoryRouter
initialEntries={options.initialEntries || []}
initialIndex={options.initialIndex || 0}>
{node}
</MemoryRouter>,
options
);
};
const routerRender = (ui, { route = "/", ...renderOptions } = {}) => {
const history = createMemoryHistory({ initialEntries: [route] });
const utils = reduxRender(<Router history={history}>{ui}</Router>, renderOptions);
return {
...utils,
history,
};
};
// re-export everything
export * from '@testing-library/react';;
// override render method
export { customRender as render, routerRender, reduxRender, store };
| 24.8125
| 84
| 0.643157
|
ca937e16d52fb856919f0f76fd2a3d5bb3174d3c
| 2,181
|
sql
|
SQL
|
Scripts/s-12-tr-actualizar-notificacion-prueba.sql
|
cgiovvnni/Car-Control-Online
|
604a873fca2ad1d3c601f1746b503bb7e5c1c94d
|
[
"MIT"
] | null | null | null |
Scripts/s-12-tr-actualizar-notificacion-prueba.sql
|
cgiovvnni/Car-Control-Online
|
604a873fca2ad1d3c601f1746b503bb7e5c1c94d
|
[
"MIT"
] | null | null | null |
Scripts/s-12-tr-actualizar-notificacion-prueba.sql
|
cgiovvnni/Car-Control-Online
|
604a873fca2ad1d3c601f1746b503bb7e5c1c94d
|
[
"MIT"
] | null | null | null |
--@Autor: Rodrigo Lopez López - Carlos Giovanni Martínez Gutiérrez
--@Fecha creación: 18/06/2020
--@Descripción: Proyecto Final 'Trigger Update Prueba'
Prompt copiando imagenes
!rm -rf /tmp/bd
!mkdir -p /tmp/bd
!chmod 777 /tmp/bd
!cp imagenes/licencia-* /tmp/bd
!chmod 755 /tmp/bd/licencia-*
Prompt =================================================
Prompt Prueba 1.
Prompt Actualizando la fecha de envio de una notificacion con numero igual a 3
Prompt ==================================================
declare
v_codigo number;
v_mensaje varchar2(1000);
begin
update notificacion
set fecha_envio = sysdate
where notificacion_id = 1;
raise_application_error(-20001,
' ERROR: El trigger debió evitar la actualización de la fecha de envio');
exception
when others then
v_codigo := sqlcode;
v_mensaje := sqlerrm;
dbms_output.put_line('Codigo: ' || v_codigo);
dbms_output.put_line('Mensaje: ' || v_mensaje);
if v_codigo = -20010 then
dbms_output.put_line('OK, prueba 1 Exitosa.');
else
dbms_output.put_line('ERROR, se obtuvo excepción no esperada');
raise;
end if;
end;
/
show errors
Prompt =================================================
Prompt Prueba 2.
Prompt Actualizando la fecha de envio de una notificacion con numero menor a 3
Prompt ==================================================
declare
v_num_notificacion_anterior number;
v_num_notificacion_nuevo number;
begin
select num_notificacion
into v_num_notificacion_anterior
from notificacion
where notificacion_id = 5;
update notificacion
set fecha_envio = sysdate
where notificacion_id = 5;
select num_notificacion
into v_num_notificacion_nuevo
from notificacion
where notificacion_id = 5;
if v_num_notificacion_anterior + 1 = v_num_notificacion_nuevo then
dbms_output.put_line('OK, prueba 2 Exitosa.');
else
raise_application_error(-20002,
' ERROR: El trigger debió aumentar en uno el numero de notificacion');
end if;
end;
/
show errors
Prompt Prueba concluida, Haciendo Rollback para limpiar la BD.
rollback;
| 26.597561
| 79
| 0.646492
|
8e63d02876abc96682049428898f0c65034b9305
| 4,797
|
h
|
C
|
src/generic/stage2/streaming_structural_parser.h
|
casperisfine/simdjson
|
af18d5ed81c617c89efa85c7444c97b6f0b316d5
|
[
"Apache-2.0"
] | 1
|
2021-11-10T01:07:30.000Z
|
2021-11-10T01:07:30.000Z
|
src/generic/stage2/streaming_structural_parser.h
|
casperisfine/simdjson
|
af18d5ed81c617c89efa85c7444c97b6f0b316d5
|
[
"Apache-2.0"
] | null | null | null |
src/generic/stage2/streaming_structural_parser.h
|
casperisfine/simdjson
|
af18d5ed81c617c89efa85c7444c97b6f0b316d5
|
[
"Apache-2.0"
] | 1
|
2020-06-26T01:11:51.000Z
|
2020-06-26T01:11:51.000Z
|
namespace stage2 {
struct streaming_structural_parser: structural_parser {
really_inline streaming_structural_parser(dom_parser_implementation &_parser) : structural_parser(_parser, _parser.next_structural_index) {}
// override to add streaming
WARN_UNUSED really_inline error_code start(ret_address_t finish_parser) {
// If there are no structurals left, return EMPTY
if (structurals.at_end(parser.n_structural_indexes)) {
return parser.error = EMPTY;
}
log_start();
init();
// Capacity ain't no thang for streaming, so we don't check it.
// Advance to the first character as soon as possible
advance_char();
// Push the root scope (there is always at least one scope)
if (start_document(finish_parser)) {
return parser.error = DEPTH_ERROR;
}
return SUCCESS;
}
// override to add streaming
WARN_UNUSED really_inline error_code finish() {
if ( structurals.past_end(parser.n_structural_indexes) ) {
log_error("IMPOSSIBLE: past the end of the JSON!");
return parser.error = TAPE_ERROR;
}
end_document();
parser.next_structural_index = uint32_t(structurals.next_structural_index());
if (depth != 0) {
log_error("Unclosed objects or arrays!");
return parser.error = TAPE_ERROR;
}
if (parser.containing_scope[depth].tape_index != 0) {
log_error("IMPOSSIBLE: root scope tape index did not start at 0!");
return parser.error = TAPE_ERROR;
}
return SUCCESS;
}
};
} // namespace stage2
/************
* The JSON is parsed to a tape, see the accompanying tape.md file
* for documentation.
***********/
WARN_UNUSED error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept {
this->doc = &_doc;
static constexpr stage2::unified_machine_addresses addresses = INIT_ADDRESSES();
stage2::streaming_structural_parser parser(*this);
error_code result = parser.start(addresses.finish);
if (result) { return result; }
//
// Read first value
//
switch (parser.structurals.current_char()) {
case '{':
FAIL_IF( parser.start_object(addresses.finish) );
goto object_begin;
case '[':
FAIL_IF( parser.start_array(addresses.finish) );
goto array_begin;
case '"':
FAIL_IF( parser.parse_string() );
goto finish;
case 't': case 'f': case 'n':
FAIL_IF( parser.parse_single_atom() );
goto finish;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
FAIL_IF(
parser.structurals.with_space_terminated_copy([&](const uint8_t *copy, size_t idx) {
return parser.parse_number(©[idx], false);
})
);
goto finish;
case '-':
FAIL_IF(
parser.structurals.with_space_terminated_copy([&](const uint8_t *copy, size_t idx) {
return parser.parse_number(©[idx], true);
})
);
goto finish;
default:
parser.log_error("Document starts with a non-value character");
goto error;
}
//
// Object parser parsers
//
object_begin:
switch (parser.advance_char()) {
case '"': {
FAIL_IF( parser.parse_string(true) );
goto object_key_parser;
}
case '}':
parser.end_object();
goto scope_end;
default:
parser.log_error("Object does not start with a key");
goto error;
}
object_key_parser:
if (parser.advance_char() != ':' ) { parser.log_error("Missing colon after key in object"); goto error; }
parser.increment_count();
parser.advance_char();
GOTO( parser.parse_value(addresses, addresses.object_continue) );
object_continue:
switch (parser.advance_char()) {
case ',':
if (parser.advance_char() != '"' ) { parser.log_error("Key string missing at beginning of field in object"); goto error; }
FAIL_IF( parser.parse_string(true) );
goto object_key_parser;
case '}':
parser.end_object();
goto scope_end;
default:
parser.log_error("No comma between object fields");
goto error;
}
scope_end:
CONTINUE( parser.parser.ret_address[parser.depth] );
//
// Array parser parsers
//
array_begin:
if (parser.advance_char() == ']') {
parser.end_array();
goto scope_end;
}
parser.increment_count();
main_array_switch:
/* we call update char on all paths in, so we can peek at parser.c on the
* on paths that can accept a close square brace (post-, and at start) */
GOTO( parser.parse_value(addresses, addresses.array_continue) );
array_continue:
switch (parser.advance_char()) {
case ',':
parser.increment_count();
parser.advance_char();
goto main_array_switch;
case ']':
parser.end_array();
goto scope_end;
default:
parser.log_error("Missing comma between array values");
goto error;
}
finish:
return parser.finish();
error:
return parser.error();
}
| 28.384615
| 142
| 0.675839
|
b075b6528ec38dd0f3c1dc8eee8f9573ac7d477a
| 4,188
|
py
|
Python
|
client.py
|
CSBonLaboratory/COVID19-Vaccination-Monitor
|
773d351081bdcb26e3f0903828b57d5773a2bdb7
|
[
"MIT"
] | null | null | null |
client.py
|
CSBonLaboratory/COVID19-Vaccination-Monitor
|
773d351081bdcb26e3f0903828b57d5773a2bdb7
|
[
"MIT"
] | null | null | null |
client.py
|
CSBonLaboratory/COVID19-Vaccination-Monitor
|
773d351081bdcb26e3f0903828b57d5773a2bdb7
|
[
"MIT"
] | null | null | null |
from pymongo import MongoClient
import matplotlib.pyplot as plt
import sys
mongo_client = None
patients = None
db = None
vacCenters = None
counties = None
personnel = None
conditions = None
def main():
global mongo_client
global db
global patients
global vacCenters
global counties
global personnel
global conditions
mongo_client = MongoClient(host="localhost", port = 27017)
print(mongo_client)
db = mongo_client["projectDB"]
print('Database init ' + str(db))
patients = db["patients"]
print("Patients collection started " + str(patients))
personnel = db["personnel"]
print("Personnel collection started " + str(personnel))
vacCenters = db["vacCenter"]
print("VaccCenters collection started " + str(vacCenters))
counties = db["counties"]
print("Counties collection started" + str(counties))
conditions = db["medicalRisks"]
print("Condition collection started " + str(conditions))
mongoConsole()
def mongoConsole():
print("Available commands:")
print("distrib ---> get distribution of vaccination centers across counties")
print("workers ---> get leaderboard of workers with the most hours per day")
print("vaccines ---> get number of vaccines per county")
print("personnel <id : int of vaccCenter> ---> get distribution of personnel of the chosen vacCenter based on their position")
while 1:
for line in sys.stdin:
command = line.rstrip()
tokens = command.split()
print(tokens)
if 'distrib' == tokens[0]:
vacCenterDistribution()
if 'workers' == tokens[0]:
getWorkers()
if 'vaccines' == tokens[0]:
getVaccinesPerCounty()
if 'personnel' == tokens[0]:
getPersonnelDistribution(int(tokens[1]))
def vacCenterDistribution():
res = db.vacCenter.aggregate(
[
{"$group" : {"_id" : "$county","frequency" : {"$sum" : 1}}},
]
)
freq_dict = {}
for e in res:
if e["_id"] not in freq_dict:
freq_dict[e["_id"]] = 1
else:
freq_dict[e["_id"]] += 1
county_list = freq_dict.keys()
freq_list = []
for k in county_list:
freq_list.append(freq_dict[k])
fig, ax = plt.subplots()
ax.pie(freq_list, labels=county_list, autopct='%.1f%%')
ax.set_title('Distribution of vaccination centers across counties')
plt.show()
def getWorkers():
workers = db["workingLeaderboard"]
res = workers.find().sort("value", -1)
work_names_list = []
work_hours_list = []
for e in res:
work_names_list.append(e["_id"])
work_hours_list.append(e["value"])
fig = plt.figure(figsize = (24, 10))
plt.bar(work_names_list, work_hours_list, color ='green',width = 0.5)
plt.xlabel("Name of workers")
plt.ylabel("Number of hours")
plt.title("Total number of working hours per day")
plt.show()
return None
def getVaccinesPerCounty():
no_vaccines = db["nrVaccinesCounty"]
res = no_vaccines.find()
vaccine_name_list = []
vaccine_freq_list = []
for e in res:
print(e)
vaccine_name_list.append(e["_id"])
vaccine_freq_list.append(e["value"])
fig, ax = plt.subplots()
ax.pie(vaccine_freq_list, labels=vaccine_name_list, autopct='%.1f%%')
ax.set_title('Vaccine types')
plt.show()
def getPersonnelDistribution(vacCenter_id):
print(vacCenter_id)
center = vacCenters.find_one({"_id" : vacCenter_id})
if center == None:
print("No vaccination center with this id")
return None
medics_no = len(center["org"]["medics"])
nurser_no = len(center["org"]["nurses"])
clerks_no = len(center["org"]["clerks"])
values = [medics_no,nurser_no,clerks_no]
tags = ["Medics", "Nurses", "Clerks"]
fig, ax = plt.subplots()
ax.pie(values, labels=tags, autopct='%.1f%%')
ax.set_title('Distribution of personnel in vaccination center ' + str(vacCenter_id))
plt.show()
if __name__ == '__main__':
main()
| 23.396648
| 130
| 0.616762
|
7f6d10cbe3da40b2630eb5f996a4c24c59f0f8f7
| 4,496
|
php
|
PHP
|
application/modules/department/views/assign_employee_view.php
|
fajardokarl/aims
|
b7c19a93f5cfe87295dc545683c1f5e85f49ac07
|
[
"MIT"
] | null | null | null |
application/modules/department/views/assign_employee_view.php
|
fajardokarl/aims
|
b7c19a93f5cfe87295dc545683c1f5e85f49ac07
|
[
"MIT"
] | null | null | null |
application/modules/department/views/assign_employee_view.php
|
fajardokarl/aims
|
b7c19a93f5cfe87295dc545683c1f5e85f49ac07
|
[
"MIT"
] | null | null | null |
<div class="row" id='showtable'>
<div class="col-md-12">
<div class="portlet light " id="departmentmasterlist">
<div class="portlet-title">
<div class="caption font-green-sharp">
<i class="fa fa-users font-green-sharp"></i>
<span class="caption-subject bold uppercase"> Department Master List</span>
<?php echo isset($_SESSION['dept_id']) ? $_SESSION['dept_id']: ""; ?>
</div>
<div class="actions">
<button style="align:right;" type="button" class="btn btn-circle green" id="addnew" onclick="location.href='<?=base_url()?>department/new/'"><i class="fa fa-plus"> </i>Add Department</button>
</div>
</div>
<div class="portlet-body">
<table class="tblmasterlist table table-hover assign_employee" id="tblmasterlist" >
<thead>
<tr>
<th>Department ID</th>
<th>Department Name</th>
<th>Department Head</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<!-- <script type="text/javascript">
$('#example').dataTable( {
'columns': [
null,
null,
null,
{
'data': 'first_name', // can be null or undefined
'defaultContent': '<i>Not set</i>'
}
]
} );
</script> -->
<tbody>
<?php
for($i=0;$i<count($records);$i++){ ?>
<tr data-deptid="<?php echo $records[$i]['department_id']; ?>" data-url="<?=base_url();?>employee/">
<td><?php echo $records[$i]['department_id'];?></td>
<td><?php echo $records[$i]['department_name'];?></td>
<td><?php if( !(empty($manager)) ) {
for($ii=0;$ii<count($manager);$ii++) {
if( $manager[$ii]['department_id'] == $i+1 ) {
echo $manager[$ii]['lastname'] . ", " . $manager[$ii]['firstname'];
break;
} else {
if( $ii == (count($manager) - 1) ) echo "";
// return null;
}
}
} else {
echo "";
}
?></td>
<?php // print_r($manager); ?>
<!-- <td><button id="btnSelectEmployee" name="btnSelectEmployee" class="btn btn-circle green-jungle" type="button" data-toggle="modal" data-target="#modal_select_employee" value="<?php echo $records[$i]['department_id']; ?>">Edit</button></td> -->
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="modal_select_employee" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" id="closeLot" data-dismiss="modal" ></button>
<h3 class="modal-title font-blue-dark bold"><span class="caption-subject bold uppercase"></i>Employee List<span id="lidss"></span> <span id="lotdescN"> </span> <span id="slid" style="display:none;"></span><span id="slids" style="display:none;"></span></h3>
</div>
<div class="modal-body">
<div class="portlet grey-cascade box">
<div class="portlet-title">
<div class="caption">
<span class="caption-subject">Select Employee</span>
</div>
</div>
<div class="portlet-body">
<div class="table-scrollable">
<table class="table table-condensed table-hover" id="tbl_employee_modal">
<thead>
<tr>
<th> ID </th>
<th> Name </th>
<th> Department </th>
<th> Status </th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
| 42.415094
| 274
| 0.431717
|
a1774b78f6a3adced93775ab6ab9727faeab8146
| 471
|
tsx
|
TypeScript
|
src/presentation/components/atoms/WidthManager.tsx
|
mlkmd/pokemon-wordle-solver
|
ca5b1853f31c7a6bc22ce28afd6fc598b7156ea1
|
[
"MIT"
] | null | null | null |
src/presentation/components/atoms/WidthManager.tsx
|
mlkmd/pokemon-wordle-solver
|
ca5b1853f31c7a6bc22ce28afd6fc598b7156ea1
|
[
"MIT"
] | 20
|
2022-03-06T06:54:04.000Z
|
2022-03-22T00:08:40.000Z
|
src/presentation/components/atoms/WidthManager.tsx
|
mlkmd/pokemon-wordle-solver
|
ca5b1853f31c7a6bc22ce28afd6fc598b7156ea1
|
[
"MIT"
] | null | null | null |
import Style from 'presentation/components/atoms/WidthManager.module.scss';
import { ComponentProps, FC, ReactNode } from 'react';
import classnames from 'classnames';
import { Box } from '@mui/material';
type Props = ComponentProps<typeof Box>;
const WidthManager: FC<Props> = ({ children, className, ...props }) => {
return (
<Box {...props} className={classnames(Style.widthManager, className)}>
{children}
</Box>
);
};
export default WidthManager;
| 31.4
| 75
| 0.70276
|
43eecac3537b4799309d7e13b962b69459cad828
| 2,081
|
tsx
|
TypeScript
|
frontend/src/pages/SignUp/index.tsx
|
gabrielgsa/gobarber
|
3b3ef0cf018c9480426e629b5639137d0122b684
|
[
"MIT"
] | 1
|
2020-07-15T02:22:13.000Z
|
2020-07-15T02:22:13.000Z
|
frontend/src/pages/SignUp/index.tsx
|
gabrielgsa/gobarber
|
3b3ef0cf018c9480426e629b5639137d0122b684
|
[
"MIT"
] | 3
|
2022-02-19T05:34:33.000Z
|
2022-03-30T22:38:56.000Z
|
frontend/src/pages/SignUp/index.tsx
|
gabrielsanttana/gobarber
|
34e22909b0152179c10be02fe85239a57225341a
|
[
"MIT"
] | null | null | null |
import React, {useCallback, useRef} from 'react';
import {FiArrowLeft, FiLock, FiMail} from 'react-icons/fi';
import {FormHandles} from '@unform/core';
import {Form} from '@unform/web';
import * as Yup from 'yup';
import {Container, Content, Background} from './styles';
import logo from '../../assets/logo.svg';
import Button from '../../components/Button';
import Input from '../../components/Input';
import getValidationErrors from '../../utils/getValidationErrors';
const Signup: React.FC = () => {
const formRef = useRef<FormHandles>(null);
const handleSubmit = useCallback(async (formData: object) => {
formRef.current?.setErrors({});
try {
const dataValidationSchema = Yup.object().shape({
username: Yup.string().required('Nome obrigatório'),
email: Yup.string()
.email('Digite um e-mail válido')
.required('E-mail obrigatório'),
password: Yup.string().min(
6,
'A senha deve conter no mínimo 6 dígitos',
),
});
await dataValidationSchema.validate(formData, {
abortEarly: false,
});
} catch (error) {
const validationErrors = getValidationErrors(error);
formRef.current?.setErrors(validationErrors);
}
}, []);
return (
<Container>
<Background />
<Content>
<img src={logo} alt="logo" />
<Form ref={formRef} initialData={{}} onSubmit={handleSubmit}>
<h1>Faça seu cadastro</h1>
<Input
name="username"
type="text"
placeholder="Nome"
autoFocus
icon={FiMail}
/>
<Input name="email" type="email" placeholder="E-mail" icon={FiMail} />
<Input
name="password"
type="password"
placeholder="Senha"
icon={FiLock}
/>
<Button type="submit">Cadastrar</Button>
</Form>
<a href="/">
<FiArrowLeft />
Voltar para login
</a>
</Content>
</Container>
);
};
export default Signup;
| 26.679487
| 80
| 0.568957
|
7058e5483415f07bfe73aaceec1b934c7477b1b9
| 140
|
cpp
|
C++
|
Source/FSDEngine/Private/RemappedProperties.cpp
|
Dr-Turtle/DRG_ModPresetManager
|
abd7ff98a820969504491a1fe68cf2f9302410dc
|
[
"MIT"
] | 8
|
2021-07-10T20:06:05.000Z
|
2022-03-04T19:03:50.000Z
|
Source/FSDEngine/Private/RemappedProperties.cpp
|
Dr-Turtle/DRG_ModPresetManager
|
abd7ff98a820969504491a1fe68cf2f9302410dc
|
[
"MIT"
] | 9
|
2022-01-13T20:49:44.000Z
|
2022-03-27T22:56:48.000Z
|
Source/FSDEngine/Private/RemappedProperties.cpp
|
Dr-Turtle/DRG_ModPresetManager
|
abd7ff98a820969504491a1fe68cf2f9302410dc
|
[
"MIT"
] | 2
|
2021-07-10T20:05:42.000Z
|
2022-03-14T17:05:35.000Z
|
#include "RemappedProperties.h"
FRemappedProperties::FRemappedProperties() {
this->CellSize = EPreviewCellSize::PRV_CELL_SIZE_12_5;
}
| 20
| 58
| 0.785714
|
38a3706349b4872ed0b811057ebe7c1bb2a00326
| 39
|
php
|
PHP
|
libraries/@/output.php
|
iamfat/qf
|
07966ce6fc299b8f8adb73fe5e7d82d2612bdde5
|
[
"MIT"
] | 1
|
2016-09-26T07:32:42.000Z
|
2016-09-26T07:32:42.000Z
|
libraries/@/output.php
|
liyu001989/qf
|
fcfdefa98eb6a8e8087edf68d2c8a1f0beb0b6b7
|
[
"MIT"
] | 9
|
2015-01-21T09:08:36.000Z
|
2018-08-15T06:17:22.000Z
|
libraries/@/output.php
|
liyu001989/qf
|
fcfdefa98eb6a8e8087edf68d2c8a1f0beb0b6b7
|
[
"MIT"
] | 19
|
2015-01-08T05:35:50.000Z
|
2020-03-20T03:17:13.000Z
|
<?php
class Output extends _Output {}
| 9.75
| 31
| 0.717949
|
3dbdbb9efbb054f1849e9d9741c75f37c355ba2e
| 23,608
|
swift
|
Swift
|
Arithmetic Drill/ArithmeticViewController.swift
|
tkumata/Arithmetic-Drill
|
04fe800cbf906f4bba8230f4fc31e62413bfb7d1
|
[
"Unlicense",
"MIT"
] | 1
|
2020-03-11T10:11:01.000Z
|
2020-03-11T10:11:01.000Z
|
Arithmetic Drill/ArithmeticViewController.swift
|
tkumata/Arithmetic-Drill
|
04fe800cbf906f4bba8230f4fc31e62413bfb7d1
|
[
"Unlicense",
"MIT"
] | null | null | null |
Arithmetic Drill/ArithmeticViewController.swift
|
tkumata/Arithmetic-Drill
|
04fe800cbf906f4bba8230f4fc31e62413bfb7d1
|
[
"Unlicense",
"MIT"
] | null | null | null |
//
// ArithmeticViewController.swift
// Arithmetic Drill
//
// Created by KUMATA Tomokatsu on 2016/11/07.
// Copyright © 2016 KUMATA Tomokatsu. All rights reserved.
//
import UIKit
import AVFoundation
import AudioToolbox.AudioServices
import MultipeerConnectivity
class ArithmeticViewController: UIViewController, UITextFieldDelegate, KeyboardDelegate, MCSessionDelegate, MCNearbyServiceAdvertiserDelegate, MCNearbyServiceBrowserDelegate, MCBrowserViewControllerDelegate {
// Read User Default
let userData = UserDefaults.standard
var maskedAnswer: Int = 0, userAnswer: Int = 0
var timer: Timer!
var timerCounter: Int = 11
var score: Int = 0, hiscore: Int = 0
var hiAccuracyRate: Double = 0.0
var questionNumber: Int = 0, questionCorrect: Int = 0, questionIncorrect: Int = 0
var accuracyRate: Double = 0.0
// Initialize variable from User Default.
var settingsLevel: Int = 5
var settingsBurstMode: Bool = false
var settingsDisable10: Bool = false
var settingsKukuMode: Bool = false
var settingContinue: Bool = false
// Image of result of checking answer.
var imageView: UIImageView!
// Sound of answer is correct.
var player: AVAudioPlayer?
// Peer connectivity.
let serviceType = "ArithmeticDrill"
let myPeerId = MCPeerID(displayName: UIDevice.current.name)
var mySession: MCSession!
var serviceAdvertiser: MCNearbyServiceAdvertiser!
var serviceAdvertiserAssistant: MCAdvertiserAssistant!
var browser: MCNearbyServiceBrowser!
// Outlet
@IBOutlet weak var scoreLabel: UILabel!
@IBOutlet weak var hiscoreLabel: UILabel!
@IBOutlet weak var questionLabel: UILabel!
@IBOutlet weak var messageLabel: UILabel!
@IBOutlet weak var userAnswerTxtField: UITextField!
@IBOutlet weak var vsModeButtonOutlet: UIButton!
// Action
// MARK: - Start multipeer browsing.
@IBAction func vsModeButtonAction(_ sender: UIButton) {
let Browser = MCBrowserViewController(serviceType: serviceType, session: mySession)
Browser.delegate = self
present(Browser, animated: true)
}
// MARK: - When tap Next Question button.
@IBAction func nextQuestionButton(_ sender: Any) {
// Stop and initialize timer when timer moves already.
stopTimer()
// MARK: Prepare textfield.
userAnswerTxtField.isEnabled = true
userAnswerTxtField.becomeFirstResponder()
messageLabel.text = ""
// MARK: Initialize
var questionString: String = ""
var leftTerm1: Int = 0
var leftTerm2: Int = 0
var mathSymbolNum: Int = 3
var mathSymbol: String = ""
var rightTerm: Int = 0
if settingsKukuMode {
settingsLevel = 1
}
// MARK: Make question parts.
switch settingsLevel {
case 1:
leftTerm1 = Int(arc4random_uniform(9)+1) // 0~8 + 1 = 1~9
leftTerm2 = Int(arc4random_uniform(9)+1)
case 2:
leftTerm1 = Int(arc4random_uniform(15)+1) // 0~14 + 1 = 1~15
leftTerm2 = Int(arc4random_uniform(15)+1)
case 3:
leftTerm1 = Int(arc4random_uniform(15)+1) // 0~14 + 1 = 1~15
leftTerm2 = Int(arc4random_uniform(15)+1)
case 4:
leftTerm1 = Int(arc4random_uniform(20)+1) // 0~19 + 1 = 1~20
leftTerm2 = Int(arc4random_uniform(20)+1)
case 5:
leftTerm1 = Int(arc4random_uniform(16)+5) // 0~15 + 5 = 5~20
leftTerm2 = Int(arc4random_uniform(16)+5)
case 6:
leftTerm1 = Int(arc4random_uniform(21)+5) // 0~20 + 5 = 5~25
leftTerm2 = Int(arc4random_uniform(21)+5)
case 7:
leftTerm1 = Int(arc4random_uniform(36)+5) // 0~35 + 5 = 5~40
leftTerm2 = Int(arc4random_uniform(36)+5)
case 8:
leftTerm1 = Int(arc4random_uniform(49)+5) // 0~40 + 5 = 5~50
leftTerm2 = Int(arc4random_uniform(49)+5)
case 9:
leftTerm1 = Int(arc4random_uniform(56)+5) // 0~55 + 5 = 5~60
leftTerm2 = Int(arc4random_uniform(56)+5)
case 10:
leftTerm1 = Int(arc4random_uniform(51)+5) // 0~50 + 10 = 10~60
leftTerm2 = Int(arc4random_uniform(51)+5)
default:
leftTerm1 = Int(arc4random_uniform(16)+5) // same a level 5
leftTerm2 = Int(arc4random_uniform(16)+5)
}
// MARK: Make mathematic symbol.
if settingsLevel > 0 && settingsLevel < 3 {
mathSymbolNum = Int(arc4random_uniform(2))
} else {
mathSymbolNum = Int(arc4random_uniform(3))
}
if settingsKukuMode {
mathSymbolNum = 2
}
switch mathSymbolNum {
case 0:
rightTerm = leftTerm1 + leftTerm2
mathSymbol = "+"
case 1:
rightTerm = leftTerm1 - leftTerm2
mathSymbol = "-"
case 2:
rightTerm = leftTerm1 * leftTerm2
mathSymbol = "*"
default:
rightTerm = leftTerm1 + leftTerm2
mathSymbol = "+"
}
// MARK: Decide masking part.
let maskNumber = Int(arc4random_uniform(3)) // 0, 1, 2
// MARK: Display question.
switch maskNumber {
case 0:
maskedAnswer = leftTerm1
questionString = "X " + mathSymbol + " " + String(leftTerm2) + " = " + String(rightTerm)
case 1:
maskedAnswer = leftTerm2
questionString = String(leftTerm1) + " " + mathSymbol + " X" + " = " + String(rightTerm)
case 2:
maskedAnswer = rightTerm
questionString = String(leftTerm1) + " " + mathSymbol + " " + String(leftTerm2) + " = X"
default:
maskedAnswer = leftTerm2
questionString = "X " + mathSymbol + " " + String(leftTerm2) + " = " + String(rightTerm)
}
self.questionLabel.text = questionString
// MARK: Make timer or not.
if settingsDisable10 == false {
timerCounter = 11
timer = Timer.scheduledTimer(timeInterval: 1.0,
target: self,
selector: #selector(self.update),
userInfo: nil,
repeats: true)
timer.fire()
} else {
timerCounter = 1
}
}
// MARK: - View did load
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
// Attributes.
// Question label.
questionLabel.text = ""
// Message label.
messageLabel.text = ""
messageLabel.layer.cornerRadius = 10.0
messageLabel.layer.borderWidth = 1.0
messageLabel.layer.borderColor = UIColor(red: 230/255, green: 230/255, blue: 230/255, alpha: 1.0).cgColor
// VS mode button attributes.
vsModeButtonOutlet.layer.borderWidth = 1.0
vsModeButtonOutlet.layer.cornerRadius = 5.0
vsModeButtonOutlet.layer.borderColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1.0).cgColor
vsModeButtonOutlet.tintColor = .white
vsModeButtonOutlet.backgroundColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1.0)
// Read settings in User Default.
settingsLevel = userData.integer(forKey: "LEVEL")
settingsBurstMode = userData.bool(forKey: "BURSTMODE")
settingsDisable10 = userData.bool(forKey: "DISABLE10")
settingsKukuMode = userData.bool(forKey: "99MODE")
settingContinue = userData.bool(forKey: "CONTINUE")
// Restore score and accuracy rate.
if settingContinue {
score = userData.integer(forKey: "SCORE")
questionNumber = userData.integer(forKey: "QNUM")
questionCorrect = userData.integer(forKey: "CORRECTNUM")
accuracyRate = Double(questionCorrect * 100 / questionNumber)
scoreLabel.text = "Score: " + String(score) + "(" + String(accuracyRate) + "%)"
} else {
scoreLabel.text = "Score: 0(0.0%)"
}
// Restore hiscore and hight accuracy rate.
hiscore = userData.integer(forKey: "HISCORE")
hiAccuracyRate = userData.double(forKey: "HIRATE")
hiscoreLabel.text = "HiScore: " + String(hiscore) + "(" + String(hiAccuracyRate) + "%)"
// textfield delegate.
userAnswerTxtField.delegate = self
// textfield unavailable when starting.
userAnswerTxtField.isEnabled = false
// Initialize custom keyboard.
let keyboardView = Keyboard(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
keyboardView.delegate = self
userAnswerTxtField.inputView = keyboardView
// Multipeer Connectivity.
mySession = MCSession(peer: myPeerId, securityIdentity: nil, encryptionPreference: .required)
mySession.delegate = self
serviceAdvertiserAssistant = MCAdvertiserAssistant(serviceType: serviceType, discoveryInfo: nil, session: mySession)
serviceAdvertiserAssistant.start()
// Finaly, start arithmetic drill.
nextQuestionButton(self)
}
// MARK: - MCAdvertiser.
func advertiser(_ advertiser: MCNearbyServiceAdvertiser, didNotStartAdvertisingPeer error: Error) {
}
func advertiser(_ advertiser: MCNearbyServiceAdvertiser, didReceiveInvitationFromPeer peerID: MCPeerID, withContext context: Data?, invitationHandler: @escaping(Bool, MCSession?) -> Void) {
}
// MARK: - MCBrowser.
func browser(_ browser: MCNearbyServiceBrowser, foundPeer peerID: MCPeerID, withDiscoveryInfo info: [String : String]?) {
}
func browser(_ browser: MCNearbyServiceBrowser, didNotStartBrowsingForPeers error: Error) {
}
func browser(_ browser: MCNearbyServiceBrowser, lostPeer peerID: MCPeerID) {
}
func browserViewControllerDidFinish(_ browserViewController: MCBrowserViewController) {
dismiss(animated: true)
}
func browserViewControllerWasCancelled(_ browserViewController: MCBrowserViewController) {
dismiss(animated: true)
}
// MARK: - MCSession.
func session(_ session: MCSession, didReceive data: Data, fromPeer peerID: MCPeerID) {
// 対戦中の得点のやりとりはここに
DispatchQueue.main.async { [unowned self] in
// "data: NSData" is recieved data.
var dataToUInt8: UInt8 = 0
data.copyBytes(to: &dataToUInt8, count: MemoryLayout<UInt8>.size)
let damage = Int(dataToUInt8)
//print("receive damage: " + String(damage))
// Image effect.
self.receiveDamageEffect()
// Update score.
self.score -= damage
self.accuracyRate = Double(self.questionCorrect * 100 / self.questionNumber)
self.scoreLabel.text = "Score: " + String(self.score) + "(" + String(self.accuracyRate) + "%)"
}
}
// MARK: MCSession status
func session(_ session: MCSession, peer peerID: MCPeerID, didChange state: MCSessionState) {
switch state {
case MCSessionState.connected:
//print("Connected: \(peerID.displayName)")
// VS mode button attributes.
vsModeButtonOutlet.layer.borderWidth = 1.0
vsModeButtonOutlet.layer.cornerRadius = 5.0
vsModeButtonOutlet.layer.borderColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1.0).cgColor
vsModeButtonOutlet.tintColor = .blue
vsModeButtonOutlet.backgroundColor = .white
case MCSessionState.connecting:
//print("Connecting: \(peerID.displayName)")
// VS mode button attributes.
vsModeButtonOutlet.layer.borderWidth = 1.0
vsModeButtonOutlet.layer.cornerRadius = 5.0
vsModeButtonOutlet.layer.borderColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1.0).cgColor
vsModeButtonOutlet.tintColor = .blue
vsModeButtonOutlet.backgroundColor = .white
case MCSessionState.notConnected:
//print("Not Connected: \(peerID.displayName)")
// VS mode button attributes.
vsModeButtonOutlet.layer.borderWidth = 1.0
vsModeButtonOutlet.layer.cornerRadius = 5.0
vsModeButtonOutlet.layer.borderColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1.0).cgColor
vsModeButtonOutlet.tintColor = .white
vsModeButtonOutlet.backgroundColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1.0)
}
}
// Received a byte stream from remote peer
func session(_ session: MCSession, didReceive stream: InputStream, withName streamName: String, fromPeer peerID: MCPeerID){
}
// Start receiving a resource from remote peer
func session(_ session: MCSession, didStartReceivingResourceWithName resourceName: String, fromPeer peerID: MCPeerID, with progress: Progress){
}
// Finished receiving a resource from remote peer and saved the content in a temporary location - the app is responsible for moving the file to a permanent location within its sandbox
func session(_ session: MCSession, didFinishReceivingResourceWithName resourceName: String, fromPeer peerID: MCPeerID, at localURL: URL?, withError error: Error?) {
}
// Found a nearby advertising peer
func browser(browser: MCNearbyServiceBrowser!, foundPeer peerID: MCPeerID!, withDiscoveryInfo info: [NSObject : AnyObject]!){
}
// A nearby peer has stopped advertising
func browser(browser: MCNearbyServiceBrowser!, lostPeer peerID: MCPeerID!){
}
//Type 'MPCManager' does not comform to protocol 'MCNearbyServiceAdvertiserDelegate'
// Incoming invitation request. Call the invitationHandler block with YES and a valid session to connect the inviting peer to the session.
func advertiser(advertiser: MCNearbyServiceAdvertiser!, didReceiveInvitationFromPeer peerID: MCPeerID!, withContext context: NSData!, invitationHandler: ((Bool, MCSession?) -> Void)!){
}
// MARK: - Send data via MCSession.
func sendPoint(point: Int) {
var p = NSInteger(point)
let data = NSData(bytes: &p, length: MemoryLayout<NSInteger>.size)
if mySession.connectedPeers.count > 0 {
do {
try mySession.send(data as Data, toPeers: mySession.connectedPeers, with: .reliable)
//print("send damage point.")
} catch let error as NSError {
print(error)
}
}
}
// MARK: required method for keyboard delegate protocol
func keyWasTapped(character: String) {
userAnswerTxtField.insertText(character)
}
func keyDone() {
view.endEditing(true)
}
func backspace() {
userAnswerTxtField.deleteBackward()
}
// MARK: - didReceiveMemoryWarning
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK: - View will disappear
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
stopTimer()
serviceAdvertiserAssistant.stop()
settingsBurstMode = false
userAnswerTxtField.isEnabled = false
userAnswerTxtField.resignFirstResponder()
if settingsBurstMode && questionNumber > 1 {
questionNumber -= 1
userData.set(questionNumber, forKey: "QNUM")
}
}
// MARK: - 入力終了(キーボードが退場) = 答え合わせ
@available(iOS 10.0, *)
func textFieldDidEndEditing(_ textField: UITextField, reason: UITextFieldDidEndEditingReason) {
var tmpMessage: String = ""
// MARK: Stop timer.
stopTimer()
// MARK: Increase number.
questionNumber += 1
// MARK: Unavailable textfield.
userAnswerTxtField.isEnabled = false
userAnswerTxtField.resignFirstResponder()
// MARK: Get textfield value.
let userAnswerText = textField.text! as NSString
// Convert cast.
userAnswer = (userAnswerText as NSString).integerValue
// MARK: Check answer.
if (self.maskedAnswer == userAnswer) {
// Correct
questionCorrect += 1
if timerCounter > 0 {
score += timerCounter
tmpMessage = "Correct"
sendPoint(point: timerCounter)
}
// Bonus point
if timerCounter > 7 {
score += 10
tmpMessage += " and bounus point"
}
// Display image
if settingsBurstMode == false {
checkResultImage(result: true)
// Play sound. If silend mode, vibrate.
playSound(result: true)
}
} else {
// Incorrect
questionIncorrect += 1
if timerCounter == 0 {
tmpMessage = "Time up"
} else {
tmpMessage = "Incorrect\n" + String(maskedAnswer)
}
// Display image
if settingsBurstMode == false && userAnswer != 0 {
checkResultImage(result: false)
// Play sound. If silend mode, vibrate.
playSound(result: false)
}
}
// MARK: Display message.
messageLabel.text = tmpMessage
// MARK: Overwrite score with accuracy rate
if questionCorrect > 0 && questionNumber > 0 {
// Update score.
accuracyRate = Double(questionCorrect * 100 / questionNumber)
scoreLabel.text = "Score: " + String(score) + "(" + String(accuracyRate) + "%)"
// Save result to User Default.
userData.set(score, forKey: "SCORE")
userData.set(questionNumber, forKey: "QNUM")
userData.set(questionCorrect, forKey: "CORRECTNUM")
// Update hiscore.
if score > hiscore {
hiscore = score
hiscoreLabel.text = "HiScore: " + String(hiscore) + "(" + String(accuracyRate) + "%)"
userData.set(hiscore, forKey: "HISCORE")
userData.set(accuracyRate, forKey: "HIRATE")
}
}
// Burst mode
if settingsBurstMode {
nextQuestionButton(self)
}
}
// MARK: - When tap return key.
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
userAnswerTxtField.resignFirstResponder()
return true
}
// MARK: - Function which updates timer.
@objc func update(tm: Timer) {
if timerCounter == 0 {
stopTimer()
view.endEditing(true)
} else {
timerCounter -= 1
self.messageLabel.text = String(timerCounter) + " sec left"
}
}
// MARK: - Function which stops timer.
func stopTimer() {
if (timer != nil) {
timer.invalidate()
timer = nil
}
}
// MARK: - Function which appears image on screen.
func checkResultImage(result: Bool) {
var fileName: String = ""
if result == true {
fileName = "Yes.png"
} else {
fileName = "No.png"
}
// Add image to sub view.
let X = view.frame.width / 2 - view.frame.width * 0.65 / 2
let Y = view.frame.height / 2 - view.frame.height * 0.65 / 2
let rect = CGRect(x: X, y: Y, width: view.frame.width*0.65, height: view.frame.height*0.65)
imageView = UIImageView(frame: rect)
imageView.contentMode = .scaleAspectFit
imageView.image = UIImage(named: fileName)
imageView.alpha = 0
self.view.addSubview(imageView)
// Animate view.
UIView.animate(
withDuration: 0.5,
delay: 0,
options: [.curveEaseInOut],
animations: {
self.imageView.alpha = 1.0
},
completion: {(finished: Bool) in
self.fadeOutImage(self.imageView)
})
}
// MARK: - Image when receive damage at VS mode.
// TODO: 上の答え合わせ結果画像と合わせてクラスにしよう。
func receiveDamageEffect() {
let imgFileName: String = "down.png"
// Add image to sub view.
let X = view.frame.width / 2 - view.frame.width * 0.65 / 2
let Y = view.frame.height / 2 - view.frame.height * 0.65 / 2
let rect = CGRect(x: X, y: Y, width: view.frame.width*0.65, height: view.frame.height*0.65)
imageView = UIImageView(frame: rect)
imageView.contentMode = .scaleAspectFit
imageView.image = UIImage(named: imgFileName)
imageView.alpha = 0
self.view.addSubview(imageView)
// Animate view.
UIView.animate(
withDuration: 0.1,
delay: 0,
options: [.curveEaseInOut],
animations: {
self.imageView.alpha = 1.0
},
completion: {(finished: Bool) in
self.fadeOutImage(self.imageView)
})
}
// MARK: - Function which remove image on screen.
func fadeOutImage(_ view: UIView) {
UIView.animate(
withDuration: 1.0,
delay: 0.5,
options: [.curveEaseInOut],
animations: {
view.alpha = 0.0
},
completion: {(finished: Bool) in
view.removeFromSuperview()
})
}
// MARK: Function which remove image on screen.
func removeResultImage() {
if imageView != nil {
imageView.removeFromSuperview()
}
}
// MARK: - Function which play sound.
func playSound(result: Bool) {
var soundFile: NSDataAsset!
if result == true {
soundFile = NSDataAsset(name: "chime")
} else {
soundFile = NSDataAsset(name: "boo")
}
do {
player = try AVAudioPlayer(data: soundFile.data, fileTypeHint: AVFileType.mp3.rawValue)
guard let player = player else { return }
player.prepareToPlay()
player.play()
// Vibration.
// Um, I seem this is bad idea.
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
AudioServicesPlayAlertSound(kSystemSoundID_Vibrate)
} catch let error {
print(error.localizedDescription)
}
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
| 36.042748
| 208
| 0.58692
|
31a50209d459b3f12e35d8ebe719f425ae062f60
| 1,849
|
go
|
Go
|
core/kv/kvdb/kvdb_instance.go
|
bigdot123456/xuperunion
|
f5a1be94c4a126d8d09a8aef87bf9d585c5d4d40
|
[
"Apache-2.0"
] | 1
|
2021-01-07T05:23:02.000Z
|
2021-01-07T05:23:02.000Z
|
core/kv/kvdb/kvdb_instance.go
|
bigdot123456/xuperunion
|
f5a1be94c4a126d8d09a8aef87bf9d585c5d4d40
|
[
"Apache-2.0"
] | 3
|
2021-01-26T06:42:01.000Z
|
2021-03-17T12:11:56.000Z
|
core/kv/kvdb/kvdb_instance.go
|
bigdot123456/xuperunion
|
f5a1be94c4a126d8d09a8aef87bf9d585c5d4d40
|
[
"Apache-2.0"
] | 1
|
2020-09-22T01:29:19.000Z
|
2020-09-22T01:29:19.000Z
|
package kvdb
import (
"github.com/xuperchain/xuperchain/core/common/log"
"github.com/xuperchain/xuperchain/core/pluginmgr"
)
// KVParameter structure for kv instance parameters
type KVParameter struct {
DBPath string
KVEngineType string
MemCacheSize int
FileHandlersCacheSize int
OtherPaths []string
}
// GetDBPath return the value of DBPath
func (param *KVParameter) GetDBPath() string {
return param.DBPath
}
// GetKVEngineType return the value of KVEngineType
func (param *KVParameter) GetKVEngineType() string {
return param.KVEngineType
}
// GetMemCacheSize return the value of MemCacheSize
func (param *KVParameter) GetMemCacheSize() int {
return param.MemCacheSize
}
// GetFileHandlersCacheSize return the value of FileHandlersCacheSize
func (param *KVParameter) GetFileHandlersCacheSize() int {
return param.FileHandlersCacheSize
}
// GetOtherPaths return the value of OtherPaths
func (param *KVParameter) GetOtherPaths() []string {
return param.OtherPaths
}
// NewKVDBInstance instance an object of kvdb
func NewKVDBInstance(param *KVParameter) (Database, error) {
plgMgr, plgErr := pluginmgr.GetPluginMgr()
if plgErr != nil {
log.Warn("fail to get plugin manager")
return nil, plgErr
}
var baseDB Database
soInst, err := plgMgr.PluginMgr.CreatePluginInstance("kv", param.GetKVEngineType())
if err != nil {
log.Warn("fail to create plugin instance", "kvtype", param.GetKVEngineType())
return nil, err
}
baseDB = soInst.(Database)
err = baseDB.Open(param.GetDBPath(), map[string]interface{}{
"cache": param.GetMemCacheSize(),
"fds": param.GetFileHandlersCacheSize(),
"dataPaths": param.GetOtherPaths(),
})
if err != nil {
log.Warn("fail to open leveldb", "dbPath", param.GetDBPath(), "err", err)
return nil, err
}
return baseDB, nil
}
| 27.191176
| 84
| 0.731206
|
2ca8bf7920d8e128693ae3ed97a5c01327b488e1
| 4,639
|
py
|
Python
|
src/kvt/augmentation/spec_augmentation.py
|
Ynakatsuka/nishika-22
|
72994cab16486b3a26686642ad72a29b6761b46d
|
[
"BSD-2-Clause"
] | 4
|
2022-02-01T05:04:53.000Z
|
2022-02-02T04:16:31.000Z
|
src/kvt/augmentation/spec_augmentation.py
|
Ynakatsuka/nishika-22
|
72994cab16486b3a26686642ad72a29b6761b46d
|
[
"BSD-2-Clause"
] | null | null | null |
src/kvt/augmentation/spec_augmentation.py
|
Ynakatsuka/nishika-22
|
72994cab16486b3a26686642ad72a29b6761b46d
|
[
"BSD-2-Clause"
] | null | null | null |
# Ref: https://bit.ly/3HMbEc6
import numpy as np
import torch
import torch.nn as nn
class DropStripes(nn.Module):
def __init__(self, dim, drop_width, stripes_num):
"""Drop stripes.
Args:
dim: int, dimension along which to drop
drop_width: int, maximum width of stripes to drop
stripes_num: int, how many stripes to drop
"""
super(DropStripes, self).__init__()
assert dim in [2, 3] # dim 2: time; dim 3: frequency
self.dim = dim
self.drop_width = drop_width
self.stripes_num = stripes_num
def forward(self, input):
"""input: (batch_size, channels, time_steps, freq_bins)"""
assert input.ndimension() == 4
if self.training is False:
return input
else:
batch_size = input.shape[0]
total_width = input.shape[self.dim]
shuffle_batch = input[
torch.randint(low=0, high=batch_size, size=(batch_size,))
]
for n in range(batch_size):
self.transform_slice(input[n], total_width, shuffle_batch[n])
return input
def transform_slice(self, e, total_width, s):
"""e, s: (channels, time_steps, freq_bins)"""
for _ in range(self.stripes_num):
distance = torch.randint(low=0, high=self.drop_width, size=(1,))[0]
bgn = torch.randint(low=0, high=total_width - distance, size=(1,))[
0
]
if self.dim == 2:
e[:, bgn : bgn + distance, :] = 0
elif self.dim == 3:
e[:, :, bgn : bgn + distance] = 0
class MixStripes(DropStripes):
def transform_slice(self, e, total_width, s):
"""e, s: (channels, time_steps, freq_bins)"""
for _ in range(self.stripes_num):
distance = torch.randint(low=0, high=self.drop_width, size=(1,))[0]
bgn = torch.randint(low=0, high=total_width - distance, size=(1,))[
0
]
if self.dim == 2:
e[:, bgn : bgn + distance, :] = (
e[:, bgn : bgn + distance, :]
+ s[:, bgn : bgn + distance, :]
) / 2
elif self.dim == 3:
e[:, :, bgn : bgn + distance] = (
e[:, :, bgn : bgn + distance]
+ s[:, :, bgn : bgn + distance]
) / 2
class CutStripes(DropStripes):
def transform_slice(self, e, total_width, s):
"""e, s: (channels, time_steps, freq_bins)"""
for _ in range(self.stripes_num):
distance = torch.randint(low=0, high=self.drop_width, size=(1,))[0]
bgn = torch.randint(low=0, high=total_width - distance, size=(1,))[
0
]
if self.dim == 2:
e[:, bgn : bgn + distance, :] = s[:, bgn : bgn + distance, :]
elif self.dim == 3:
e[:, :, bgn : bgn + distance] = s[:, :, bgn : bgn + distance]
class SpecAugmentationPlusPlus(nn.Module):
def __init__(
self,
time_drop_width,
time_stripes_num,
freq_drop_width,
freq_stripes_num,
method="zm",
):
"""SpecAugment++.
https://arxiv.org/pdf/2103.16858.pdf
Args:
time_drop_width: int
time_stripes_num: int
freq_drop_width: int
freq_stripes_num: int
"""
super(SpecAugmentationPlusPlus, self).__init__()
assert method in ("zm", "mm", "cm")
if method == "zm":
dropper = DropStripes
elif method == "mm":
dropper = MixStripes
elif method == "cm":
dropper = CutStripes
self.time_dropper = dropper(
dim=2, drop_width=time_drop_width, stripes_num=time_stripes_num
)
self.freq_dropper = dropper(
dim=3, drop_width=freq_drop_width, stripes_num=freq_stripes_num
)
def forward(self, input):
x = self.time_dropper(input)
x = self.freq_dropper(x)
return x
if __name__ == "__main__":
torch.manual_seed(0)
random_state = np.random.RandomState(0)
np_data = random_state.normal(size=(10, 4, 640, 64))
pt_data = torch.Tensor(np_data)
spec_augmenter = SpecAugmentationPlusPlus(
time_drop_width=64,
time_stripes_num=2,
freq_drop_width=16,
freq_stripes_num=2,
)
# Training stage
spec_augmenter.train() # set to spec_augmenter.eval() for evaluation
result = spec_augmenter(pt_data)
print(result.shape)
| 29.360759
| 79
| 0.538047
|
9bc3d682c0bd1db0d51a0e1567f1b941b36ca95b
| 2,159
|
dart
|
Dart
|
src/lib/main.dart
|
YahArt/flutter-local-notification
|
8f0f87c6bbc18228aeec56c1f22868577536d3d6
|
[
"MIT"
] | null | null | null |
src/lib/main.dart
|
YahArt/flutter-local-notification
|
8f0f87c6bbc18228aeec56c1f22868577536d3d6
|
[
"MIT"
] | null | null | null |
src/lib/main.dart
|
YahArt/flutter-local-notification
|
8f0f87c6bbc18228aeec56c1f22868577536d3d6
|
[
"MIT"
] | null | null | null |
import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
FlutterLocalNotificationsPlugin();
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
const AndroidInitializationSettings initializationSettingsAndroid =
AndroidInitializationSettings('app_icon');
final InitializationSettings initializationSettings =
InitializationSettings(android: initializationSettingsAndroid);
await flutterLocalNotificationsPlugin.initialize(initializationSettings,
onSelectNotification: (String payload) async {
if (payload != null) {
debugPrint('notification payload: $payload');
}
});
runApp(NotificationApp());
}
class NotificationApp extends StatefulWidget {
NotificationApp();
@override
_NotificationAppState createState() => _NotificationAppState();
}
class _NotificationAppState extends State<NotificationApp> {
Future<void> _showNotification() async {
const AndroidNotificationDetails androidPlatformChannelSpecifics =
AndroidNotificationDetails(
'your channel id', 'your channel name', 'your channel description',
importance: Importance.max,
priority: Priority.high,
showWhen: true);
const NotificationDetails platformChannelSpecifics =
NotificationDetails(android: androidPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(
0, 'plain title', 'plain body', platformChannelSpecifics,
payload: 'some payload');
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Home Widget'),
centerTitle: true,
),
floatingActionButton: FloatingActionButton(
onPressed: () async {
await _showNotification();
},
child: Icon(Icons.time_to_leave),
),
body: Center(
child: Container(
child: Text('Home Widget'),
),
),
),
);
}
}
| 30.408451
| 79
| 0.695692
|
a38382a406c1adaadf17064ac6ea3980d6580a34
| 3,795
|
java
|
Java
|
Maze Project/maze-runner/src/maze/algo/solving/Node.java
|
sajjadgol/DSA
|
176b6c6e812c27866d04deed836b92b6566449a2
|
[
"MIT"
] | 10
|
2021-03-03T05:57:59.000Z
|
2022-03-05T04:52:49.000Z
|
Maze Project/maze-runner/src/maze/algo/solving/Node.java
|
sajjadgol/DSA
|
176b6c6e812c27866d04deed836b92b6566449a2
|
[
"MIT"
] | 3
|
2021-01-16T17:58:22.000Z
|
2021-01-24T14:23:21.000Z
|
Maze Project/maze-runner/src/maze/algo/solving/Node.java
|
sajjadgol/DSA
|
176b6c6e812c27866d04deed836b92b6566449a2
|
[
"MIT"
] | 5
|
2020-11-10T21:30:05.000Z
|
2021-02-09T08:41:18.000Z
|
package maze.algo.solving;
import java.util.Objects;
/**
* This class stores an information about the particular
* node in a node grid. It is used in the
* <a href="https://en.wikipedia.org/wiki/A*_search_algorithm">
* A* search algorithm</a> implementation.
* <p>
* A node stores an information about the cost of the path from
* the start node to it and the estimated cost of the path from
* it to the end node and calculates the final cost through it.
*
* @author Philipp Malkovsky
* @see Fugitive
*/
class Node {
/**
* The cost of moving to neighboring nodes.
*/
private static final int EDGE_COST = 1;
/**
* The vertical coordinate of this node in a grid.
*/
private final int row;
/**
* The horizontal coordinate of this node in a grid.
*/
private final int column;
/**
* Indicates if this node is a wall.
*/
private final boolean isWall;
/**
* A parent node is saved to reconstruct a path if
* it goes through this node. If node has no parent
* its parent is equal to this node, i.e.
* {@code node == node.getParent()}.
*/
private Node parent;
/**
* The cost of the path from the start node to this node.
*/
private int g;
/**
* The estimated cost of the path from this node to the end node.
*/
private int h;
/**
* The final cost of the path from the start node to the end node
* through this node.
*/
private int f;
/**
* Creates a new node with given row and column and sets its parent
* to itself.
*
* @param row a row of a new node
* @param column a column of a new node
* @param isWall true if a node is a wall, false otherwise
*/
Node(int row, int column, boolean isWall) {
this.row = row;
this.column = column;
this.isWall = isWall;
parent = this;
}
int getRow() {
return row;
}
int getColumn() {
return column;
}
boolean isWall() {
return isWall;
}
Node getParent() {
return parent;
}
int getFinalCost() {
return f;
}
/**
* Calculates the estimated cost of the path from this node to the
* end node. This implementation uses a
* <a href="https://en.wikipedia.org/wiki/Taxicab_geometry">
* Manhattan distance</a> to calculate the heuristic.
*
* @param node a node to estimate a distance to
*/
void calcHeuristicTo(Node node) {
this.h = Math.abs(node.row - this.row)
+ Math.abs(node.column - this.column);
}
/**
* Checks if the path through the given node is better
* (i.e. cheaper) than the current path.
*
* @param node the node to compare
* @return true if better, false otherwise
*/
boolean hasBetterPath(Node node) {
return node.g + EDGE_COST < this.g;
}
/**
* Updates the path such that the given node becomes the
* new parent and recalculates the final cost through it.
*
* @param node the new parent
*/
void updatePath(Node node) {
this.parent = node;
this.g = node.g + EDGE_COST;
f = g + h;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
var node = (Node) o;
return row == node.row &&
column == node.column &&
isWall == node.isWall;
}
@Override
public int hashCode() {
return Objects.hash(row, column, isWall);
}
}
| 25.469799
| 72
| 0.560474
|
fa7a7614a3e05e1605ac92b79eba0e457cd595d8
| 7,150
|
cpp
|
C++
|
src/mame/drivers/pimps.cpp
|
Robbbert/messui
|
49b756e2140d8831bc81335298ee8c5471045e79
|
[
"BSD-3-Clause"
] | 26
|
2015-03-31T06:25:51.000Z
|
2021-12-14T09:29:04.000Z
|
src/mame/drivers/pimps.cpp
|
Robbbert/messui
|
49b756e2140d8831bc81335298ee8c5471045e79
|
[
"BSD-3-Clause"
] | null | null | null |
src/mame/drivers/pimps.cpp
|
Robbbert/messui
|
49b756e2140d8831bc81335298ee8c5471045e79
|
[
"BSD-3-Clause"
] | 10
|
2015-03-27T05:45:51.000Z
|
2022-02-04T06:57:36.000Z
|
// license:BSD-3-Clause
// copyright-holders:Robbbert
/***************************************************************************
P.I.M.P.S. (Personal Interactive MicroProcessor System)
2009-12-06 Skeleton driver.
No schematics or hardware info available.
http://www.classiccmp.org/dunfield/pimps/index.htm
Commands:
A xxxx xxxx - Assemble (from editor file): origin destination
D xxxx,xxxx - Dump memory to host port
E - Enter editor
A - Append at end of file
C - Clear memory file (reqires ESCAPE to confirm)
D xx - Delete line number xx
I xx - Insert at line xx
L xx xx - List range of lines
Q - Query: Display highest used address
X - eXit editor (requires ESCAPE to confirm)
$ xxxx xxxx - exit directly to assembler
F - set for Full-duplex host operation
G xxxx - Go (execute) at address
H - set for Half-duplex host operation
M xxxx,xxxx - Display a range of memory (hex dump)
P xx xx-[xx.] - display/Edit I/O Port
S xxxx - Substitute data into memory
T - Transparent link to host (Ctrl-A exits)
U - set host Uart parameters (8251 control registers)
V - Virtual memory (Not used on PIMPS board)
Notes:
The 'D'ump command outputs memory to the host in some form of Intel
HEX records, and waits for line-feed from the host before proceeding.
The 'V'irtual memory function was to control an EPROM emulator which
was part of the original design (see Chucks notes below) and was not
used on the PIMPS board.
Editor:
Operates in HEXIDECIMAL line numbers. Only supports up to 256 lines
(01-00). You must enter full two-digit number when prompted.
You MUST 'C'lear the memory file before you begin, otherwise you will
be editing random memory content.
Assembler:
Comment is an INSTRUCTION! - this means that you need to put at least
one space before and after ';' when entering a line comment.
Does not understand DECIMAL numbers. It understands character constants
('c' and 'cc') and hex numbers ($xx or $xxxx).
8-bit values MUST contain two hex digits or one quoted character. 16-bit
constants MUST contain four hex digits or two quoted characters.
Use 'S' instead of 'SP', eg: LXI S,$1000
Only EQU, DB, DW and END directives are supported. An END statement is
REQUIRED (otherwise you get the message '?tab-ful' as it fills the symbol
table with garbage occuring in memory after the end of the file).
RST instructions are implemented as 8 separate 'RST0'-'RST8' memonics.
****************************************************************************/
#include "emu.h"
#include "cpu/i8085/i8085.h"
#include "machine/clock.h"
#include "machine/i8251.h"
#include "bus/rs232/rs232.h"
class pimps_state : public driver_device
{
public:
pimps_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_rom(*this, "roms")
, m_ram(*this, "mainram")
{ }
void pimps(machine_config &config);
private:
void io_map(address_map &map);
void mem_map(address_map &map);
virtual void machine_reset() override;
memory_passthrough_handler *m_rom_shadow_tap;
required_device<cpu_device> m_maincpu;
required_region_ptr<u8> m_rom;
required_shared_ptr<u8> m_ram;
};
void pimps_state::mem_map(address_map &map)
{
map(0x0000, 0xefff).ram().share("mainram");
map(0xf000, 0xffff).rom().region("roms", 0);
}
void pimps_state::io_map(address_map &map)
{
map.unmap_value_high();
map(0xf0, 0xf1).rw("uart1", FUNC(i8251_device::read), FUNC(i8251_device::write));
map(0xf2, 0xf3).rw("uart2", FUNC(i8251_device::read), FUNC(i8251_device::write));
}
/* Input ports */
static INPUT_PORTS_START( pimps )
INPUT_PORTS_END
void pimps_state::machine_reset()
{
address_space &program = m_maincpu->space(AS_PROGRAM);
program.install_rom(0x0000, 0x07ff, m_rom); // do it here for F3
m_rom_shadow_tap = program.install_read_tap(0xf000, 0xf7ff, "rom_shadow_r",[this](offs_t offset, u8 &data, u8 mem_mask)
{
if (!machine().side_effects_disabled())
{
// delete this tap
m_rom_shadow_tap->remove();
// reinstall ram over the rom shadow
m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x07ff, m_ram);
}
// return the original data
return data;
});
}
// baud is not documented, we will use 9600
static DEVICE_INPUT_DEFAULTS_START( terminal ) // set up terminal to default to 9600, 7 bits, even parity
DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_7 )
DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_EVEN )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
DEVICE_INPUT_DEFAULTS_END
void pimps_state::pimps(machine_config &config)
{
I8085A(config, m_maincpu, 2_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &pimps_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &pimps_state::io_map);
clock_device &uart_clock(CLOCK(config, "uart_clock", 153'600));
uart_clock.signal_handler().set("uart1", FUNC(i8251_device::write_txc));
uart_clock.signal_handler().append("uart1", FUNC(i8251_device::write_rxc));
uart_clock.signal_handler().append("uart2", FUNC(i8251_device::write_txc));
uart_clock.signal_handler().append("uart2", FUNC(i8251_device::write_rxc));
i8251_device &uart1(I8251(config, "uart1", 0));
uart1.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd));
uart1.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr));
uart1.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts));
rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, "terminal"));
rs232a.rxd_handler().set("uart1", FUNC(i8251_device::write_rxd));
rs232a.dsr_handler().set("uart1", FUNC(i8251_device::write_dsr));
rs232a.cts_handler().set("uart1", FUNC(i8251_device::write_cts));
rs232a.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); // must be exactly here
i8251_device &uart2(I8251(config, "uart2", 0));
uart2.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd));
uart2.dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr));
uart2.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts));
rs232_port_device &rs232b(RS232_PORT(config, "rs232b", default_rs232_devices, nullptr));
rs232b.rxd_handler().set("uart2", FUNC(i8251_device::write_rxd));
rs232b.dsr_handler().set("uart2", FUNC(i8251_device::write_dsr));
rs232b.cts_handler().set("uart2", FUNC(i8251_device::write_cts));
}
/* ROM definition */
ROM_START( pimps )
ROM_REGION( 0x1000, "roms", 0 )
ROM_LOAD( "pimps.bin", 0x0000, 0x1000, CRC(5da1898f) SHA1(d20e31d0981a1f54c83186dbdfcf4280e49970d0))
ROM_END
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
COMP( 197?, pimps, 0, 0, pimps, pimps, pimps_state, empty_init, "Henry Colford", "P.I.M.P.S.", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) // terminal beeps
| 37.239583
| 170
| 0.714406
|
463f9d1b438cf6d91015b96acb582fd80c5283a6
| 261
|
phpt
|
PHP
|
ext/spl/tests/bug70852.phpt
|
thiagooak/php-src
|
4006c0008e2b9646540a427b830dd46c11458786
|
[
"PHP-3.01"
] | 24
|
2015-01-19T05:48:51.000Z
|
2022-02-22T17:40:07.000Z
|
ext/spl/tests/bug70852.phpt
|
thiagooak/php-src
|
4006c0008e2b9646540a427b830dd46c11458786
|
[
"PHP-3.01"
] | 10
|
2020-03-09T13:40:46.000Z
|
2020-06-04T12:31:43.000Z
|
ext/spl/tests/bug70852.phpt
|
thiagooak/php-src
|
4006c0008e2b9646540a427b830dd46c11458786
|
[
"PHP-3.01"
] | 4
|
2020-04-04T16:37:05.000Z
|
2020-08-18T16:54:49.000Z
|
--TEST--
Bug #70852 Segfault getting NULL offset of an ArrayObject
--FILE--
<?php
$y = new ArrayObject();
var_dump($y[NULL]);
var_dump($y[NULL]++);
?>
--EXPECTF--
Notice: Undefined index: in %s on line %d
NULL
Notice: Undefined index: in %s on line %d
NULL
| 16.3125
| 57
| 0.670498
|
d1bd38a239f673488efc65b540d9155134263c72
| 21,799
|
cs
|
C#
|
NetDimension.NanUI.XP/ChromiumFX/Generated/Remote/CfrApp.cs
|
0XC8/NanUI
|
4a3fdc5eea132de683a4cd69a8824835da6ec12b
|
[
"MIT"
] | 12
|
2018-10-13T14:45:10.000Z
|
2021-05-28T01:51:33.000Z
|
NetDimension.NanUI.XP/ChromiumFX/Generated/Remote/CfrApp.cs
|
mxq00812314/NanUI
|
4a3fdc5eea132de683a4cd69a8824835da6ec12b
|
[
"MIT"
] | null | null | null |
NetDimension.NanUI.XP/ChromiumFX/Generated/Remote/CfrApp.cs
|
mxq00812314/NanUI
|
4a3fdc5eea132de683a4cd69a8824835da6ec12b
|
[
"MIT"
] | 6
|
2017-04-27T20:39:32.000Z
|
2020-02-29T06:25:50.000Z
|
// Copyright (c) 2014-2015 Wolfgang Borgsmüller
// 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 copyright holder nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Generated file. Do not edit.
using System;
namespace Chromium.Remote {
using Event;
/// <summary>
/// Implement this structure to provide handler implementations. Methods will be
/// called by the process and/or thread indicated.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public class CfrApp : CfrBase {
internal static CfrApp Wrap(IntPtr proxyId) {
if(proxyId == IntPtr.Zero) return null;
var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;
lock(weakCache) {
var cfrObj = (CfrApp)weakCache.Get(proxyId);
if(cfrObj == null) {
cfrObj = new CfrApp(proxyId);
weakCache.Add(proxyId, cfrObj);
}
return cfrObj;
}
}
internal static IntPtr CreateRemote() {
var call = new CfxAppCtorRenderProcessCall();
call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
return call.__retval;
}
internal void raise_OnBeforeCommandLineProcessing(object sender, CfrOnBeforeCommandLineProcessingEventArgs e) {
var handler = m_OnBeforeCommandLineProcessing;
if(handler == null) return;
handler(this, e);
e.m_isInvalid = true;
}
internal void raise_OnRegisterCustomSchemes(object sender, CfrOnRegisterCustomSchemesEventArgs e) {
var handler = m_OnRegisterCustomSchemes;
if(handler == null) return;
handler(this, e);
e.m_isInvalid = true;
}
internal void raise_GetResourceBundleHandler(object sender, CfrGetResourceBundleHandlerEventArgs e) {
var handler = m_GetResourceBundleHandler;
if(handler == null) return;
handler(this, e);
e.m_isInvalid = true;
}
internal void raise_GetRenderProcessHandler(object sender, CfrGetRenderProcessHandlerEventArgs e) {
var handler = m_GetRenderProcessHandler;
if(handler == null) return;
handler(this, e);
e.m_isInvalid = true;
}
private CfrApp(IntPtr proxyId) : base(proxyId) {}
public CfrApp() : base(CreateRemote()) {
connection.weakCache.Add(proxyId, this);
}
/// <summary>
/// Provides an opportunity to view and/or modify command-line arguments before
/// processing by CEF and Chromium. The |ProcessType| value will be NULL for
/// the browser process. Do not keep a reference to the CfrCommandLine
/// object passed to this function. The CfrSettings.CommandLineArgsDisabled
/// value can be used to start with an NULL command-line object. Any values
/// specified in CfrSettings that equate to command-line arguments will be set
/// before this function is called. Be cautious when using this function to
/// modify command-line arguments for non-browser processes as this may result
/// in undefined behavior including crashes.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public event CfrOnBeforeCommandLineProcessingEventHandler OnBeforeCommandLineProcessing {
add {
if(m_OnBeforeCommandLineProcessing == null) {
var call = new CfxOnBeforeCommandLineProcessingActivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
m_OnBeforeCommandLineProcessing += value;
}
remove {
m_OnBeforeCommandLineProcessing -= value;
if(m_OnBeforeCommandLineProcessing == null) {
var call = new CfxOnBeforeCommandLineProcessingDeactivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
}
}
CfrOnBeforeCommandLineProcessingEventHandler m_OnBeforeCommandLineProcessing;
/// <summary>
/// Provides an opportunity to register custom schemes. Do not keep a reference
/// to the |Registrar| object. This function is called on the main thread for
/// each process and the registered schemes should be the same across all
/// processes.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public event CfrOnRegisterCustomSchemesEventHandler OnRegisterCustomSchemes {
add {
if(m_OnRegisterCustomSchemes == null) {
var call = new CfxOnRegisterCustomSchemesActivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
m_OnRegisterCustomSchemes += value;
}
remove {
m_OnRegisterCustomSchemes -= value;
if(m_OnRegisterCustomSchemes == null) {
var call = new CfxOnRegisterCustomSchemesDeactivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
}
}
CfrOnRegisterCustomSchemesEventHandler m_OnRegisterCustomSchemes;
/// <summary>
/// Return the handler for resource bundle events. If
/// CfrSettings.PackLoadingDisabled is true (1) a handler must be returned.
/// If no handler is returned resources will be loaded from pack files. This
/// function is called by the browser and render processes on multiple threads.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public event CfrGetResourceBundleHandlerEventHandler GetResourceBundleHandler {
add {
if(m_GetResourceBundleHandler == null) {
var call = new CfxGetResourceBundleHandlerActivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
m_GetResourceBundleHandler += value;
}
remove {
m_GetResourceBundleHandler -= value;
if(m_GetResourceBundleHandler == null) {
var call = new CfxGetResourceBundleHandlerDeactivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
}
}
CfrGetResourceBundleHandlerEventHandler m_GetResourceBundleHandler;
/// <summary>
/// Return the handler for functionality specific to the render process. This
/// function is called on the render process main thread.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public event CfrGetRenderProcessHandlerEventHandler GetRenderProcessHandler {
add {
if(m_GetRenderProcessHandler == null) {
var call = new CfxGetRenderProcessHandlerActivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
m_GetRenderProcessHandler += value;
}
remove {
m_GetRenderProcessHandler -= value;
if(m_GetRenderProcessHandler == null) {
var call = new CfxGetRenderProcessHandlerDeactivateRenderProcessCall();
call.sender = proxyId;
call.RequestExecution(this);
}
}
}
CfrGetRenderProcessHandlerEventHandler m_GetRenderProcessHandler;
internal override void OnDispose(IntPtr proxyId) {
connection.weakCache.Remove(proxyId);
}
}
namespace Event {
/// <summary>
/// Provides an opportunity to view and/or modify command-line arguments before
/// processing by CEF and Chromium. The |ProcessType| value will be NULL for
/// the browser process. Do not keep a reference to the CfrCommandLine
/// object passed to this function. The CfrSettings.CommandLineArgsDisabled
/// value can be used to start with an NULL command-line object. Any values
/// specified in CfrSettings that equate to command-line arguments will be set
/// before this function is called. Be cautious when using this function to
/// modify command-line arguments for non-browser processes as this may result
/// in undefined behavior including crashes.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public delegate void CfrOnBeforeCommandLineProcessingEventHandler(object sender, CfrOnBeforeCommandLineProcessingEventArgs e);
/// <summary>
/// Provides an opportunity to view and/or modify command-line arguments before
/// processing by CEF and Chromium. The |ProcessType| value will be NULL for
/// the browser process. Do not keep a reference to the CfrCommandLine
/// object passed to this function. The CfrSettings.CommandLineArgsDisabled
/// value can be used to start with an NULL command-line object. Any values
/// specified in CfrSettings that equate to command-line arguments will be set
/// before this function is called. Be cautious when using this function to
/// modify command-line arguments for non-browser processes as this may result
/// in undefined behavior including crashes.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public class CfrOnBeforeCommandLineProcessingEventArgs : CfrEventArgs {
bool ProcessTypeFetched;
string m_ProcessType;
bool CommandLineFetched;
CfrCommandLine m_CommandLine;
internal CfrOnBeforeCommandLineProcessingEventArgs(ulong eventArgsId) : base(eventArgsId) {}
/// <summary>
/// Get the ProcessType parameter for the <see cref="CfrApp.OnBeforeCommandLineProcessing"/> render process callback.
/// </summary>
public string ProcessType {
get {
CheckAccess();
if(!ProcessTypeFetched) {
ProcessTypeFetched = true;
var call = new CfxOnBeforeCommandLineProcessingGetProcessTypeRenderProcessCall();
call.eventArgsId = eventArgsId;
call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
m_ProcessType = call.value;
}
return m_ProcessType;
}
}
/// <summary>
/// Get the CommandLine parameter for the <see cref="CfrApp.OnBeforeCommandLineProcessing"/> render process callback.
/// </summary>
public CfrCommandLine CommandLine {
get {
CheckAccess();
if(!CommandLineFetched) {
CommandLineFetched = true;
var call = new CfxOnBeforeCommandLineProcessingGetCommandLineRenderProcessCall();
call.eventArgsId = eventArgsId;
call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
m_CommandLine = CfrCommandLine.Wrap(call.value);
}
return m_CommandLine;
}
}
public override string ToString() {
return String.Format("ProcessType={{{0}}}, CommandLine={{{1}}}", ProcessType, CommandLine);
}
}
/// <summary>
/// Provides an opportunity to register custom schemes. Do not keep a reference
/// to the |Registrar| object. This function is called on the main thread for
/// each process and the registered schemes should be the same across all
/// processes.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public delegate void CfrOnRegisterCustomSchemesEventHandler(object sender, CfrOnRegisterCustomSchemesEventArgs e);
/// <summary>
/// Provides an opportunity to register custom schemes. Do not keep a reference
/// to the |Registrar| object. This function is called on the main thread for
/// each process and the registered schemes should be the same across all
/// processes.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public class CfrOnRegisterCustomSchemesEventArgs : CfrEventArgs {
bool RegistrarFetched;
CfrSchemeRegistrar m_Registrar;
internal CfrOnRegisterCustomSchemesEventArgs(ulong eventArgsId) : base(eventArgsId) {}
/// <summary>
/// Get the Registrar parameter for the <see cref="CfrApp.OnRegisterCustomSchemes"/> render process callback.
/// </summary>
public CfrSchemeRegistrar Registrar {
get {
CheckAccess();
if(!RegistrarFetched) {
RegistrarFetched = true;
var call = new CfxOnRegisterCustomSchemesGetRegistrarRenderProcessCall();
call.eventArgsId = eventArgsId;
call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
m_Registrar = CfrSchemeRegistrar.Wrap(call.value);
}
return m_Registrar;
}
}
public override string ToString() {
return String.Format("Registrar={{{0}}}", Registrar);
}
}
/// <summary>
/// Return the handler for resource bundle events. If
/// CfrSettings.PackLoadingDisabled is true (1) a handler must be returned.
/// If no handler is returned resources will be loaded from pack files. This
/// function is called by the browser and render processes on multiple threads.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public delegate void CfrGetResourceBundleHandlerEventHandler(object sender, CfrGetResourceBundleHandlerEventArgs e);
/// <summary>
/// Return the handler for resource bundle events. If
/// CfrSettings.PackLoadingDisabled is true (1) a handler must be returned.
/// If no handler is returned resources will be loaded from pack files. This
/// function is called by the browser and render processes on multiple threads.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public class CfrGetResourceBundleHandlerEventArgs : CfrEventArgs {
private bool returnValueSet;
internal CfrGetResourceBundleHandlerEventArgs(ulong eventArgsId) : base(eventArgsId) {}
/// <summary>
/// Set the return value for the <see cref="CfrApp.GetResourceBundleHandler"/> render process callback.
/// Calling SetReturnValue() more then once per callback or from different event handlers will cause an exception to be thrown.
/// </summary>
public void SetReturnValue(CfrResourceBundleHandler returnValue) {
if(returnValueSet) {
throw new CfxException("The return value has already been set");
}
var call = new CfxGetResourceBundleHandlerSetReturnValueRenderProcessCall();
call.eventArgsId = eventArgsId;
call.value = CfrObject.Unwrap(returnValue);
call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
returnValueSet = true;
}
}
/// <summary>
/// Return the handler for functionality specific to the render process. This
/// function is called on the render process main thread.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public delegate void CfrGetRenderProcessHandlerEventHandler(object sender, CfrGetRenderProcessHandlerEventArgs e);
/// <summary>
/// Return the handler for functionality specific to the render process. This
/// function is called on the render process main thread.
/// </summary>
/// <remarks>
/// See also the original CEF documentation in
/// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_app_capi.h">cef/include/capi/cef_app_capi.h</see>.
/// </remarks>
public class CfrGetRenderProcessHandlerEventArgs : CfrEventArgs {
private bool returnValueSet;
internal CfrGetRenderProcessHandlerEventArgs(ulong eventArgsId) : base(eventArgsId) {}
/// <summary>
/// Set the return value for the <see cref="CfrApp.GetRenderProcessHandler"/> render process callback.
/// Calling SetReturnValue() more then once per callback or from different event handlers will cause an exception to be thrown.
/// </summary>
public void SetReturnValue(CfrRenderProcessHandler returnValue) {
if(returnValueSet) {
throw new CfxException("The return value has already been set");
}
var call = new CfxGetRenderProcessHandlerSetReturnValueRenderProcessCall();
call.eventArgsId = eventArgsId;
call.value = CfrObject.Unwrap(returnValue);
call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
returnValueSet = true;
}
}
}
}
| 47.492375
| 146
| 0.623056
|
451ee02d35fd7392e9e25c44099937594bd864d7
| 413
|
asm
|
Assembly
|
programs/oeis/300/A300222.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/300/A300222.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/300/A300222.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A300222: In ternary (base-3) representation of n, replace 1's with 0's.
; 0,0,2,0,0,2,6,6,8,0,0,2,0,0,2,6,6,8,18,18,20,18,18,20,24,24,26,0,0,2,0,0,2,6,6,8,0,0,2,0,0,2,6,6,8,18,18,20,18,18,20,24,24,26,54,54,56,54,54,56,60,60,62,54,54,56,54,54,56,60,60,62,72,72,74,72,72,74,78,78,80,0,0,2,0,0,2,6,6,8,0,0,2,0,0,2,6,6,8,18
mov $1,$0
seq $1,244042 ; In ternary representation of n, replace 2's with 0's.
sub $0,$1
| 59
| 247
| 0.62954
|