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
5b59152ddf7e051ae179d521ed46f348cd2386a2
2,560
h
C
unicpp/unicode_data.h
codeschlosser/unicpp
cdfbce8c4e00b66e92987627fd513e4b7c04a992
[ "0BSD" ]
null
null
null
unicpp/unicode_data.h
codeschlosser/unicpp
cdfbce8c4e00b66e92987627fd513e4b7c04a992
[ "0BSD" ]
null
null
null
unicpp/unicode_data.h
codeschlosser/unicpp
cdfbce8c4e00b66e92987627fd513e4b7c04a992
[ "0BSD" ]
null
null
null
#pragma once #include <map> #include <string_view> #include <unordered_map> #include <vector> #include <stdint.h> namespace unicpp { enum class GeneralCategory : uint64_t { None = 0LL, Lu = 1LL << 1, Ll = 1LL << 2, Lt = 1LL << 3, Lm = 1LL << 4, Lo = 1LL << 5, Mn = 1LL << 6, Mc = 1LL << 7, Me = 1LL << 8, Nd = 1LL << 9, Nl = 1LL << 10, No = 1LL << 11, Pc = 1LL << 12, Pd = 1LL << 13, Ps = 1LL << 14, Pe = 1LL << 15, Pi = 1LL << 16, Pf = 1LL << 17, Po = 1LL << 18, Sm = 1LL << 19, Sc = 1LL << 20, Sk = 1LL << 21, So = 1LL << 22, Zs = 1LL << 23, Zl = 1LL << 24, Zp = 1LL << 25, Cc = 1LL << 26, Cf = 1LL << 27, Cs = 1LL << 28, Co = 1LL << 29, Cn = 1LL << 30, LC = Lu | Ll | Lt, L = Lu | Ll | Lt | Lm | Lo, M = Mn | Mc | Me, N = Nd | Nl | No, P = Pc | Pd | Ps | Pe | Pi | Pf | Po, S = Sm | Sc | Sk | So, Z = Zs | Zl | Zp, C = Cc | Cf | Cs | Co | Cn, }; enum class BidiClass { None, L, R, AL, EN, ES, ET, AN, CS, NSM, BN, B, S, WS, ON, LRE, LRO, RLE, RLO, PDF, LRI, RLI, FSI, PDI, }; enum class NumericType { None, Decimal, Digit, Numeric, }; enum class DecompositionTag { None, Font, // A font variant (e.g. a blackletter form). NoBreak, // A no-break version of a space or hyphen. Initial, // An initial presentation form (Arabic). Medial, // A medial presentation form (Arabic). Final, // A final presentation form (Arabic). Isolated, // An isolated presentation form (Arabic). Circle, // An encircled form. Super, // A superscript form. Sub, // A subscript form. Vertical, // A vertical layout presentation form. Wide, // A wide (or zenkaku) compatibility character. Narrow, // A narrow (or hankaku) compatibility character. Small, // A small variant form (CNS compatibility). Square, // A CJK squared font variant. Fraction, // A vulgar fraction form. Compat, // Otherwise unspecified compatibility character. }; struct Decomposition { DecompositionTag tag; std::u32string_view characters; }; extern const std::unordered_map<char32_t, char32_t> kUpperMap; extern const std::unordered_map<char32_t, char32_t> kLowerMap; extern const std::map<char32_t, GeneralCategory> kGeneralCategoryRangeMap; extern const std::map<char32_t, BidiClass> kBidiClassRangeMap; extern const std::unordered_map<char32_t, NumericType> kNumericTypeMap; extern const std::unordered_map<char32_t, Decomposition> kDecompositionMap; } // namespace unicpp
21.157025
75
0.596875
d7aa0298a9c1ae6c391d392f03e45ecbfba474e7
2,299
ps1
PowerShell
Configurations/vmwFolder/cf02-vCenter-Folder.ps1
lucdekens/vSphereDSC
37d0f7e851a148dea7a0a8acfa6a734a3796450e
[ "MIT" ]
42
2016-06-05T00:30:29.000Z
2021-02-11T20:46:56.000Z
Configurations/vmwFolder/cf02-vCenter-Folder.ps1
lucdekens/vSphereDSC
37d0f7e851a148dea7a0a8acfa6a734a3796450e
[ "MIT" ]
4
2016-06-05T14:05:53.000Z
2016-08-30T02:57:08.000Z
Configurations/vmwFolder/cf02-vCenter-Folder.ps1
lucdekens/vSphereDSC
37d0f7e851a148dea7a0a8acfa6a734a3796450e
[ "MIT" ]
11
2016-08-26T22:45:08.000Z
2020-04-19T19:02:52.000Z
enum Ensure { Absent Present } $tgtName = 'vEng.local.lab' $configName = 'Vmw' Configuration $configName { param( [System.Management.Automation.PSCredential]$Credential ) Import-DscResource -ModuleName vSphereDSC Node $AllNodes.NodeName { $number = 0 foreach($folder in $Node.Folders) { $number++ $folderName = "Folder$number" VmwFolder $folderName { Name = $folder.FolderName Path = $folder.Path Ensure = $folder.Ensure Type = $folder.Type vServer = $Allnodes.Server vCredential = $Allnodes.Credential } } } } #region VCSA Account $vcUser = '<your VCSA user>' $vcPswd = '<your VCSA user password>' $sVcCred = @{ TypeName = 'System.Management.Automation.PSCredential' ArgumentList = $vcUser,(ConvertTo-SecureString -String $vcPswd -AsPlainText -Force) } $vcCred = New-Object @sVcCred #endregion $ConfigData = @{ AllNodes = @( @{ NodeName = '*' Server = 'vcsa.local.lab' Credential = $vcCred PSDscAllowPlainTextPassword=$true PSDscAllowDomainUser = $true }, @{ NodeName = $configName Folders = @( @{ FolderName = 'Folder1' Path = '/' Type = 'Yellow' Ensure = [Ensure]::Absent }, @{ FolderName = 'Folder2' Path = 'Datacenters' Type = 'Blue' Ensure = [Ensure]::Present } ) } ) } . "$(Split-Path $MyInvocation.MyCommand.Path)\..\Tools\Get-TargetGuid.ps1" $guid = Get-TargetGuid -TargetName $tgtName Invoke-Expression "$($configName) -ConfigurationData `$configData -OutputPath '.\DSC'" $pullShare = '\\pull\DSCService\Configuration\' $mof = ".\DSC\$($configName).mof" $tgtMof = "$pullshare\$guid.mof" Copy-Item -Path $mof -Destination $tgtMof New-DSCChecksum $tgtMof -Force # For testing with Start-DscCOnfiguration Copy-Item -Path $mof -Destination ".\DSC\$($tgtName.Split('.')[0]).mof"
25.544444
87
0.527621
c7d863108e925b53444156a87d044609f6e8465f
273
py
Python
otp/login/LoginBase.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
81
2018-04-08T18:14:24.000Z
2022-01-11T07:22:15.000Z
otp/login/LoginBase.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
4
2018-09-13T20:41:22.000Z
2022-01-08T06:57:00.000Z
otp/login/LoginBase.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
26
2018-05-26T12:49:27.000Z
2021-09-11T09:11:59.000Z
class LoginBase(): freeTimeExpires = -1 def __init__(self, cr): self.cr = cr def sendLoginMsg(self, loginName, password, createFlag): pass def getErrorCode(self): return 0 def needToSetParentPassword(self): return 0
17.0625
60
0.615385
404df5454145b172654d322a6a8aa1b28c826af8
3,324
py
Python
tackerclient/tacker/v1_0/nfvo/nsd.py
SSU-DCN/python-tackerclient
771973a3f66f08fa05b3d0702a81df9ec0b35219
[ "Apache-2.0" ]
20
2015-10-18T02:56:36.000Z
2021-10-12T13:37:58.000Z
tackerclient/tacker/v1_0/nfvo/nsd.py
openstack/python-tackerclient
b7f27c3dc6a8ec747d13698a3ced1dc5cc162389
[ "Apache-2.0" ]
null
null
null
tackerclient/tacker/v1_0/nfvo/nsd.py
openstack/python-tackerclient
b7f27c3dc6a8ec747d13698a3ced1dc5cc162389
[ "Apache-2.0" ]
16
2016-03-18T08:37:28.000Z
2021-07-19T05:28:16.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import yaml from oslo_serialization import jsonutils from tackerclient.i18n import _ from tackerclient.tacker import v1_0 as tackerV10 _NSD = "nsd" class ListNSD(tackerV10.ListCommand): """List NSDs that belong to a given tenant.""" resource = _NSD list_columns = ['id', 'name', 'template_source', 'description'] def get_parser(self, prog_name): parser = super(ListNSD, self).get_parser(prog_name) parser.add_argument( '--template-source', help=_("List NSD with specified template source. Available \ options are 'onboared' (default), 'inline' or 'all'"), action='store', default='onboarded') return parser def args2search_opts(self, parsed_args): search_opts = super(ListNSD, self).args2search_opts(parsed_args) template_source = parsed_args.template_source if parsed_args.template_source: search_opts.update({'template_source': template_source}) return search_opts class ShowNSD(tackerV10.ShowCommand): """Show information of a given NSD.""" resource = _NSD class CreateNSD(tackerV10.CreateCommand): """Create a NSD.""" resource = _NSD remove_output_fields = ["attributes"] def add_known_arguments(self, parser): parser.add_argument('--nsd-file', help='Specify NSD file', required=True) parser.add_argument( 'name', metavar='NAME', help='Set a name for the NSD') parser.add_argument( '--description', help='Set a description for the NSD') def args2body(self, parsed_args): body = {self.resource: {}} nsd = None with open(parsed_args.nsd_file) as f: nsd = yaml.safe_load(f.read()) tackerV10.update_dict(parsed_args, body[self.resource], ['tenant_id', 'name', 'description']) if nsd: body[self.resource]['attributes'] = {'nsd': nsd} return body class DeleteNSD(tackerV10.DeleteCommand): """Delete a given NSD.""" resource = _NSD class ShowTemplateNSD(tackerV10.ShowCommand): """Show template of a given NSD.""" resource = _NSD def run(self, parsed_args): self.log.debug('run(%s)', parsed_args) template = None data = self.get_data(parsed_args) try: attributes_index = data[0].index('attributes') attributes_json = data[1][attributes_index] template = jsonutils.loads(attributes_json).get('nsd', None) except (IndexError, TypeError, ValueError) as e: self.log.debug('Data handling error: %s', str(e)) print(template or _('Unable to display NSD template!'))
32.910891
75
0.643502
fb546cc800dfe8c40cc55d001a0ea22c328750ba
169
java
Java
pet-clinic-data/src/main/java/com/kyotoyx/petclinic/services/PetService.java
kyotoyx/pet-clinic
b27e53e9edb6b8a9a988ab0a5d65f5b907341fec
[ "Apache-2.0" ]
null
null
null
pet-clinic-data/src/main/java/com/kyotoyx/petclinic/services/PetService.java
kyotoyx/pet-clinic
b27e53e9edb6b8a9a988ab0a5d65f5b907341fec
[ "Apache-2.0" ]
null
null
null
pet-clinic-data/src/main/java/com/kyotoyx/petclinic/services/PetService.java
kyotoyx/pet-clinic
b27e53e9edb6b8a9a988ab0a5d65f5b907341fec
[ "Apache-2.0" ]
null
null
null
package com.kyotoyx.petclinic.services; import com.kyotoyx.petclinic.model.Pet; import java.util.Set; public interface PetService extends CrudService<Pet, Long> { }
16.9
60
0.792899
40148c6b514cdd48180c673060f1159147f5605a
21,509
py
Python
torchdistill/models/special.py
AhmedHussKhalifa/torchdistill
071089765f95aa09da9573039ac2bd54f47cea1e
[ "MIT" ]
null
null
null
torchdistill/models/special.py
AhmedHussKhalifa/torchdistill
071089765f95aa09da9573039ac2bd54f47cea1e
[ "MIT" ]
null
null
null
torchdistill/models/special.py
AhmedHussKhalifa/torchdistill
071089765f95aa09da9573039ac2bd54f47cea1e
[ "MIT" ]
null
null
null
import os import numpy as np import torch from torch import nn from torch.nn import functional from torch.jit.annotations import Tuple, List from torchdistill.common.constant import def_logger from torchdistill.models.util import wrap_if_distributed, load_module_ckpt, save_module_ckpt, redesign_model logger = def_logger.getChild(__name__) SPECIAL_CLASS_DICT = dict() def register_special_module(cls): SPECIAL_CLASS_DICT[cls.__name__] = cls return cls class SpecialModule(nn.Module): def __init__(self): super().__init__() def post_forward(self, *args, **kwargs): pass def post_process(self, *args, **kwargs): pass @register_special_module class EmptyModule(SpecialModule): def __init__(self, **kwargs): super().__init__() def forward(self, *args, **kwargs): return args[0] if isinstance(args, tuple) and len(args) == 1 else args class Paraphraser4FactorTransfer(nn.Module): """ Paraphraser for factor transfer described in the supplementary material of "Paraphrasing Complex Network: Network Compression via Factor Transfer" """ @staticmethod def make_tail_modules(num_output_channels, uses_bn): leaky_relu = nn.LeakyReLU(0.1) if uses_bn: return [nn.BatchNorm2d(num_output_channels), leaky_relu] return [leaky_relu] @classmethod def make_enc_modules(cls, num_input_channels, num_output_channels, kernel_size, stride, padding, uses_bn): return [ nn.Conv2d(num_input_channels, num_output_channels, kernel_size, stride=stride, padding=padding), *cls.make_tail_modules(num_output_channels, uses_bn) ] @classmethod def make_dec_modules(cls, num_input_channels, num_output_channels, kernel_size, stride, padding, uses_bn): return [ nn.ConvTranspose2d(num_input_channels, num_output_channels, kernel_size, stride=stride, padding=padding), *cls.make_tail_modules(num_output_channels, uses_bn) ] def __init__(self, k, num_input_channels, kernel_size=3, stride=1, padding=1, uses_bn=True): super().__init__() self.paraphrase_rate = k num_enc_output_channels = int(num_input_channels * k) self.encoder = nn.Sequential( *self.make_enc_modules(num_input_channels, num_input_channels, kernel_size, stride, padding, uses_bn), *self.make_enc_modules(num_input_channels, num_enc_output_channels, kernel_size, stride, padding, uses_bn), *self.make_enc_modules(num_enc_output_channels, num_enc_output_channels, kernel_size, stride, padding, uses_bn) ) self.decoder = nn.Sequential( *self.make_dec_modules(num_enc_output_channels, num_enc_output_channels, kernel_size, stride, padding, uses_bn), *self.make_dec_modules(num_enc_output_channels, num_input_channels, kernel_size, stride, padding, uses_bn), *self.make_dec_modules(num_input_channels, num_input_channels, kernel_size, stride, padding, uses_bn) ) def forward(self, z): if self.training: return self.decoder(self.encoder(z)) return self.encoder(z) class Translator4FactorTransfer(nn.Sequential): """ Translator for factor transfer described in the supplementary material of "Paraphrasing Complex Network: Network Compression via Factor Transfer" Note that "the student translator has the same three convolution layers as the paraphraser" """ def __init__(self, num_input_channels, num_output_channels, kernel_size=3, stride=1, padding=1, uses_bn=True): super().__init__( *Paraphraser4FactorTransfer.make_enc_modules(num_input_channels, num_input_channels, kernel_size, stride, padding, uses_bn), *Paraphraser4FactorTransfer.make_enc_modules(num_input_channels, num_output_channels, kernel_size, stride, padding, uses_bn), *Paraphraser4FactorTransfer.make_enc_modules(num_output_channels, num_output_channels, kernel_size, stride, padding, uses_bn) ) @register_special_module class Teacher4FactorTransfer(SpecialModule): """ Teacher for factor transfer proposed in "Paraphrasing Complex Network: Network Compression via Factor Transfer" """ def __init__(self, teacher_model, minimal, input_module_path, paraphraser_params, paraphraser_ckpt, uses_decoder, device, device_ids, distributed, **kwargs): super().__init__() if minimal is None: minimal = dict() special_teacher_model = build_special_module(minimal, teacher_model=teacher_model) model_type = 'original' teacher_ref_model = teacher_model if special_teacher_model is not None: teacher_ref_model = special_teacher_model model_type = type(teacher_ref_model).__name__ self.teacher_model = redesign_model(teacher_ref_model, minimal, 'teacher', model_type) self.input_module_path = input_module_path self.paraphraser = \ wrap_if_distributed(Paraphraser4FactorTransfer(**paraphraser_params), device, device_ids, distributed) self.ckpt_file_path = paraphraser_ckpt if os.path.isfile(self.ckpt_file_path): map_location = {'cuda:0': 'cuda:{}'.format(device_ids[0])} if distributed else device load_module_ckpt(self.paraphraser, map_location, self.ckpt_file_path) self.uses_decoder = uses_decoder def forward(self, *args): with torch.no_grad(): return self.teacher_model(*args) def post_forward(self, io_dict): if self.uses_decoder and not self.paraphraser.training: self.paraphraser.train() self.paraphraser(io_dict[self.input_module_path]['output']) def post_process(self, *args, **kwargs): save_module_ckpt(self.paraphraser, self.ckpt_file_path) @register_special_module class Student4FactorTransfer(SpecialModule): """ Student for factor transfer proposed in "Paraphrasing Complex Network: Network Compression via Factor Transfer" """ def __init__(self, student_model, input_module_path, translator_params, device, device_ids, distributed, **kwargs): super().__init__() self.student_model = wrap_if_distributed(student_model, device, device_ids, distributed) self.input_module_path = input_module_path self.translator = \ wrap_if_distributed(Translator4FactorTransfer(**translator_params), device, device_ids, distributed) def forward(self, *args): return self.student_model(*args) def post_forward(self, io_dict): self.translator(io_dict[self.input_module_path]['output']) @register_special_module class Connector4DAB(SpecialModule): """ Connector proposed in "Knowledge Transfer via Distillation of Activation Boundaries Formed by Hidden Neurons" """ @staticmethod def build_connector(conv_params_config, bn_params_config=None): module_list = [nn.Conv2d(**conv_params_config)] if bn_params_config is not None and len(bn_params_config) > 0: module_list.append(nn.BatchNorm2d(**bn_params_config)) return nn.Sequential(*module_list) def __init__(self, student_model, connectors, device, device_ids, distributed, **kwargs): super().__init__() self.student_model = wrap_if_distributed(student_model, device, device_ids, distributed) io_path_pairs = list() self.connector_dict = nn.ModuleDict() for connector_key, connector_params in connectors.items(): connector = self.build_connector(connector_params['conv_params'], connector_params.get('bn_params', None)) self.connector_dict[connector_key] = wrap_if_distributed(connector, device, device_ids, distributed) io_path_pairs.append((connector_key, connector_params['io'], connector_params['path'])) self.io_path_pairs = io_path_pairs def forward(self, x): return self.student_model(x) def post_forward(self, io_dict): for connector_key, io_type, module_path in self.io_path_pairs: self.connector_dict[connector_key](io_dict[module_path][io_type]) class Regressor4VID(nn.Module): def __init__(self, in_channels, middle_channels, out_channels, eps, init_pred_var, **kwargs): super().__init__() self.regressor = nn.Sequential( nn.Conv2d(in_channels, middle_channels, kernel_size=1, stride=1, padding=0, bias=False), nn.ReLU(inplace=True), nn.Conv2d(middle_channels, middle_channels, kernel_size=1, stride=1, padding=0, bias=False), nn.ReLU(inplace=True), nn.Conv2d(middle_channels, out_channels, kernel_size=1, stride=1, padding=0, bias=False), ) self.soft_plus_param = \ nn.Parameter(np.log(np.exp(init_pred_var - eps) - 1.0) * torch.ones(out_channels)) self.eps = eps self.init_pred_var = init_pred_var def forward(self, student_feature_map): pred_mean = self.regressor(student_feature_map) pred_var = torch.log(1.0 + torch.exp(self.soft_plus_param)) + self.eps pred_var = pred_var.view(1, -1, 1, 1) return pred_mean, pred_var @register_special_module class VariationalDistributor4VID(SpecialModule): """ "Variational Information Distillation for Knowledge Transfer" """ def __init__(self, student_model, regressors, device, device_ids, distributed, **kwargs): super().__init__() self.student_model = wrap_if_distributed(student_model, device, device_ids, distributed) io_path_pairs = list() self.regressor_dict = nn.ModuleDict() for regressor_key, regressor_params in regressors.items(): regressor = Regressor4VID(**regressor_params) self.regressor_dict[regressor_key] = wrap_if_distributed(regressor, device, device_ids, distributed) io_path_pairs.append((regressor_key, regressor_params['io'], regressor_params['path'])) self.io_path_pairs = io_path_pairs def forward(self, x): return self.student_model(x) def post_forward(self, io_dict): for regressor_key, io_type, module_path in self.io_path_pairs: self.regressor_dict[regressor_key](io_dict[module_path][io_type]) @register_special_module class Linear4CCKD(SpecialModule): """ Fully-connected layer to cope with a mismatch of feature representations of teacher and student network for "Correlation Congruence for Knowledge Distillation" """ def __init__(self, input_module, linear_params, device, device_ids, distributed, teacher_model=None, student_model=None, **kwargs): super().__init__() is_teacher = teacher_model is not None if not is_teacher: student_model = wrap_if_distributed(student_model, device, device_ids, distributed) self.model = teacher_model if is_teacher else student_model self.is_teacher = is_teacher self.input_module_path = input_module['path'] self.input_module_io = input_module['io'] self.linear = wrap_if_distributed(nn.Linear(**linear_params), device, device_ids, distributed) def forward(self, x): if self.is_teacher: with torch.no_grad(): return self.model(x) return self.model(x) def post_forward(self, io_dict): flat_outputs = torch.flatten(io_dict[self.input_module_path][self.input_module_io], 1) self.linear(flat_outputs) class Normalizer4CRD(nn.Module): def __init__(self, linear, power=2): super().__init__() self.linear = linear self.power = power def forward(self, x): z = self.linear(x) norm = z.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power) out = z.div(norm) return out @register_special_module class Linear4CRD(SpecialModule): """ "Contrastive Representation Distillation" Refactored https://github.com/HobbitLong/RepDistiller/blob/master/crd/memory.py """ def __init__(self, input_module_path, linear_params, device, device_ids, distributed, power=2, teacher_model=None, student_model=None, **kwargs): super().__init__() is_teacher = teacher_model is not None if not is_teacher: student_model = wrap_if_distributed(student_model, device, device_ids, distributed) self.model = teacher_model if is_teacher else student_model self.is_teacher = is_teacher self.empty = nn.Sequential() self.input_module_path = input_module_path linear = nn.Linear(**linear_params) self.normalizer = wrap_if_distributed(Normalizer4CRD(linear, power=power), device, device_ids, distributed) def forward(self, x, supp_dict): # supp_dict is given to be hooked and stored in io_dict self.empty(supp_dict) if self.is_teacher: with torch.no_grad(): return self.model(x) return self.model(x) def post_forward(self, io_dict): flat_outputs = torch.flatten(io_dict[self.input_module_path]['output'], 1) self.normalizer(flat_outputs) @register_special_module class HeadRCNN(SpecialModule): def __init__(self, head_rcnn, **kwargs): super().__init__() tmp_ref_model = kwargs.get('teacher_model', None) ref_model = kwargs.get('student_model', tmp_ref_model) if ref_model is None: raise ValueError('Either student_model or teacher_model has to be given.') self.transform = ref_model.transform self.seq = redesign_model(ref_model, head_rcnn, 'R-CNN', 'HeadRCNN') def forward(self, images, targets=None): original_image_sizes = torch.jit.annotate(List[Tuple[int, int]], []) for img in images: val = img.shape[-2:] assert len(val) == 2 original_image_sizes.append((val[0], val[1])) images, targets = self.transform(images, targets) return self.seq(images.tensors) @register_special_module class SSWrapper4SSKD(SpecialModule): """ Semi-supervision wrapper for "Knowledge Distillation Meets Self-Supervision" """ def __init__(self, input_module, feat_dim, ss_module_ckpt, device, device_ids, distributed, freezes_ss_module=False, teacher_model=None, student_model=None, **kwargs): super().__init__() is_teacher = teacher_model is not None if not is_teacher: student_model = wrap_if_distributed(student_model, device, device_ids, distributed) self.model = teacher_model if is_teacher else student_model self.is_teacher = is_teacher self.input_module_path = input_module['path'] self.input_module_io = input_module['io'] ss_module = nn.Sequential( nn.Linear(feat_dim, feat_dim), nn.ReLU(inplace=True), nn.Linear(feat_dim, feat_dim) ) self.ckpt_file_path = ss_module_ckpt if os.path.isfile(self.ckpt_file_path): map_location = {'cuda:0': 'cuda:{}'.format(device_ids[0])} if distributed else device load_module_ckpt(ss_module, map_location, self.ckpt_file_path) self.ss_module = ss_module if is_teacher and freezes_ss_module \ else wrap_if_distributed(ss_module, device, device_ids, distributed) def forward(self, x): if self.is_teacher: with torch.no_grad(): return self.model(x) return self.model(x) def post_forward(self, io_dict): flat_outputs = torch.flatten(io_dict[self.input_module_path][self.input_module_io], 1) self.ss_module(flat_outputs) def post_process(self, *args, **kwargs): save_module_ckpt(self.ss_module, self.ckpt_file_path) @register_special_module class VarianceBranch4PAD(SpecialModule): """ Variance branch wrapper for "Prime-Aware Adaptive Distillation" """ def __init__(self, student_model, input_module, feat_dim, var_estimator_ckpt, device, device_ids, distributed, **kwargs): super().__init__() self.student_model = wrap_if_distributed(student_model, device, device_ids, distributed) self.input_module_path = input_module['path'] self.input_module_io = input_module['io'] var_estimator = nn.Sequential( nn.Linear(feat_dim, feat_dim), nn.BatchNorm1d(feat_dim) ) self.ckpt_file_path = var_estimator_ckpt if os.path.isfile(self.ckpt_file_path): map_location = {'cuda:0': 'cuda:{}'.format(device_ids[0])} if distributed else device load_module_ckpt(var_estimator, map_location, self.ckpt_file_path) self.var_estimator = wrap_if_distributed(var_estimator, device, device_ids, distributed) def forward(self, x): return self.student_model(x) def post_forward(self, io_dict): embed_outputs = io_dict[self.input_module_path][self.input_module_io].flatten(1) self.var_estimator(embed_outputs) def post_process(self, *args, **kwargs): save_module_ckpt(self.var_estimator, self.ckpt_file_path) class AttentionBasedFusion(nn.Module): """ Attention based fusion module in "Distilling Knowledge via Knowledge Review" Refactored https://github.com/dvlab-research/ReviewKD/blob/master/ImageNet/models/reviewkd.py """ def __init__(self, in_channel, mid_channel, out_channel, uses_attention): super().__init__() self.conv1 = nn.Sequential( nn.Conv2d(in_channel, mid_channel, kernel_size=1, bias=False), nn.BatchNorm2d(mid_channel), ) self.conv2 = nn.Sequential( nn.Conv2d(mid_channel, out_channel, kernel_size=3, stride=1, padding=1, bias=False), nn.BatchNorm2d(out_channel), ) self.attention_conv = None if not uses_attention \ else nn.Sequential(nn.Conv2d(mid_channel*2, 2, kernel_size=1), nn.Sigmoid()) nn.init.kaiming_uniform_(self.conv1[0].weight, a=1) nn.init.kaiming_uniform_(self.conv2[0].weight, a=1) def forward(self, x, y=None, size=None): x = self.conv1(x) if self.attention_conv is not None: n, _, h, w = x.shape # upsample residual features y = functional.interpolate(y, (size, size), mode='nearest') # fusion z = torch.cat([x, y], dim=1) z = self.attention_conv(z) x = (x * z[:, 0].view(n, 1, h, w) + y * z[:, 1].view(n, 1, h, w)) y = self.conv2(x) return y, x @register_special_module class Student4KnowledgeReview(SpecialModule): """ Student for knowledge review proposed in "Distilling Knowledge via Knowledge Review" Refactored https://github.com/dvlab-research/ReviewKD/blob/master/ImageNet/models/reviewkd.py """ def __init__(self, student_model, abfs, device, device_ids, distributed, sizes=None, **kwargs): super().__init__() self.student_model = wrap_if_distributed(student_model, device, device_ids, distributed) if sizes is None: sizes = [1, 7, 14, 28, 56] self.sizes = sizes abf_list = nn.ModuleList() num_abfs = len(abfs) io_path_pairs = list() for idx, abf_config in enumerate(abfs): abf = wrap_if_distributed(AttentionBasedFusion(uses_attention=idx < num_abfs - 1, **abf_config['params']), device, device_ids, distributed) abf_list.append(abf) io_path_pairs.append((abf_config['io'], abf_config['path'])) self.abf_modules = abf_list[::-1] self.io_path_pairs = io_path_pairs[::-1] def forward(self, *args): return self.student_model(*args) def post_forward(self, io_dict): feature_maps = [io_dict[module_path][io_type] for io_type, module_path in self.io_path_pairs] out_features, res_features = self.abf_modules[0](feature_maps[0]) if len(self.sizes) > 1: for features, abf, size in zip(feature_maps[1:], self.abf_modules[1:], self.sizes[1:]): out_features, res_features = abf(features, res_features, size) def get_special_module(class_name, *args, **kwargs): if class_name not in SPECIAL_CLASS_DICT: logger.info('No special module called `{}` is registered.'.format(class_name)) return None instance = SPECIAL_CLASS_DICT[class_name](*args, **kwargs) return instance def build_special_module(model_config, **kwargs): special_model_config = model_config.get('special', dict()) special_model_type = special_model_config.get('type', None) if special_model_type is not None: special_model_params_config = special_model_config.get('params', None) if special_model_params_config is None: special_model_params_config = dict() return get_special_module(special_model_type, **kwargs, **special_model_params_config) return None
42.17451
120
0.675206
260c68a4e5d73ecf19ced217af6249a73107fdb7
8,043
java
Java
chrome/browser/util/android/java/src/org/chromium/chrome/browser/util/AndroidTaskUtils.java
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
chrome/browser/util/android/java/src/org/chromium/chrome/browser/util/AndroidTaskUtils.java
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
chrome/browser/util/android/java/src/org/chromium/chrome/browser/util/AndroidTaskUtils.java
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.util; import android.app.ActivityManager; import android.app.ActivityManager.AppTask; import android.app.ActivityManager.RecentTaskInfo; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.ResolveInfo; import android.net.Uri; import android.text.TextUtils; import android.util.Log; import android.util.Pair; import org.chromium.base.ContextUtils; import org.chromium.base.PackageManagerUtils; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; /** * Deals with Document-related API calls. */ public class AndroidTaskUtils { public static final String TAG = "DocumentUtilities"; // Typically the number of tasks returned by getRecentTasks will be around 3 or less - the // Chrome Launcher Activity, a Tabbed Activity task, and the home screen on older Android // versions. However, theoretically this task list could be unbounded, so limit it to a number // that won't cause Chrome to blow up in degenerate cases. private static final int MAX_NUM_TASKS = 100; /** * Finishes tasks other than the one with the given ID that were started with the given data * in the Intent, removing those tasks from Recents and leaving a unique task with the data. * @param data Passed in as part of the Intent's data when starting the Activity. * @param canonicalTaskId ID of the task will be the only one left with the ID. * @return Intent of one of the tasks that were finished. */ public static Intent finishOtherTasksWithData(Uri data, int canonicalTaskId) { if (data == null) return null; String dataString = data.toString(); Context context = ContextUtils.getApplicationContext(); ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.AppTask> tasksToFinish = new ArrayList<ActivityManager.AppTask>(); for (ActivityManager.AppTask task : manager.getAppTasks()) { RecentTaskInfo taskInfo = getTaskInfoFromTask(task); if (taskInfo == null) continue; int taskId = taskInfo.id; Intent baseIntent = taskInfo.baseIntent; String taskData = baseIntent == null ? null : taskInfo.baseIntent.getDataString(); if (TextUtils.equals(dataString, taskData) && (taskId == -1 || taskId != canonicalTaskId)) { tasksToFinish.add(task); } } return finishAndRemoveTasks(tasksToFinish); } private static Intent finishAndRemoveTasks(List<ActivityManager.AppTask> tasksToFinish) { Intent removedIntent = null; for (ActivityManager.AppTask task : tasksToFinish) { Log.d(TAG, "Removing task with duplicated data: " + task); removedIntent = getBaseIntentFromTask(task); task.finishAndRemoveTask(); } return removedIntent; } /** * Returns the RecentTaskInfo for the task, if the ActivityManager succeeds in finding the task. * @param task AppTask containing information about a task. * @return The RecentTaskInfo associated with the task, or null if it couldn't be found. */ public static RecentTaskInfo getTaskInfoFromTask(AppTask task) { RecentTaskInfo info = null; try { info = task.getTaskInfo(); } catch (IllegalArgumentException e) { Log.e(TAG, "Failed to retrieve task info: ", e); } return info; } /** * Returns the baseIntent of the RecentTaskInfo associated with the given task. * @param task Task to get the baseIntent for. * @return The baseIntent, or null if it couldn't be retrieved. */ public static Intent getBaseIntentFromTask(AppTask task) { RecentTaskInfo info = getTaskInfoFromTask(task); return info == null ? null : info.baseIntent; } /** * Given an AppTask retrieves the task component name. * @param task The app task to use. * @return Fully qualified component name name or null if we were not able to * determine it. */ public static String getTaskComponentName(AppTask task) { RecentTaskInfo info = getTaskInfoFromTask(task); if (info == null) return null; Intent baseIntent = info.baseIntent; if (baseIntent == null) { return null; } else if (baseIntent.getComponent() != null) { return baseIntent.getComponent().getClassName(); } else { ResolveInfo resolveInfo = PackageManagerUtils.resolveActivity(baseIntent, 0); if (resolveInfo == null) return null; return resolveInfo.activityInfo.name; } } /** * Get all recent tasks with component name matching any of the given names. * @param context the Android Context * @param componentsAccepted the set of names accepted * @return all matching recent {@link AppTask} and their respective {@link RecentTaskInfo} */ public static Set<Pair<AppTask, RecentTaskInfo>> getRecentAppTasksMatchingComponentNames( Context context, Set<String> componentsAccepted) { HashSet<Pair<AppTask, RecentTaskInfo>> matchingTasks = new HashSet<>(); ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); for (AppTask task : manager.getAppTasks()) { RecentTaskInfo info = AndroidTaskUtils.getTaskInfoFromTask(task); if (info == null) continue; String componentName = AndroidTaskUtils.getTaskComponentName(task); if (componentsAccepted.contains(componentName)) { matchingTasks.add(Pair.create(task, info)); } } return matchingTasks; } /** * Get all recent tasks infos with component name matching any of the given names. * @param context the Android Context * @param componentsAccepted the set of names accepted * @return all matching {@link RecentTaskInfo}s */ public static Set<RecentTaskInfo> getRecentTaskInfosMatchingComponentNames( Context context, Set<String> componentsAccepted) throws SecurityException { HashSet<RecentTaskInfo> matchingInfos = new HashSet<>(); final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); // getRecentTasks is deprecated, but still returns your app's tasks, and does so // without needing an extra IPC for each task you want to get the info for. It also // includes some known-safe tasks like the home screen on older Android versions, but // that's fine for this purpose. List<ActivityManager.RecentTaskInfo> tasks = activityManager.getRecentTasks(MAX_NUM_TASKS, 0); if (tasks != null) { for (ActivityManager.RecentTaskInfo task : tasks) { // Note that Android documentation lies, and TaskInfo#origActivity does not // actually return the target of an alias, so we have to explicitly check // for the target component of the base intent, which will have been set to // the Activity that launched, in order to make this check more robust. ComponentName component = task.baseIntent.getComponent(); if (component == null) continue; if (componentsAccepted.contains(component.getClassName()) && component.getPackageName().equals(context.getPackageName())) { matchingInfos.add(task); } } } return matchingInfos; } }
42.555556
100
0.668159
98e57170a34976270ccd757540dcfbf61bdecfe4
104
sql
SQL
src/test/resources/sql/revoke/6dbc25a8.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
66
2018-06-15T11:34:03.000Z
2022-03-16T09:24:49.000Z
src/test/resources/sql/revoke/6dbc25a8.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
13
2019-03-19T11:56:28.000Z
2020-08-05T04:20:50.000Z
src/test/resources/sql/revoke/6dbc25a8.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
28
2019-01-05T19:59:02.000Z
2022-03-24T11:55:50.000Z
-- file:rolenames.sql ln:426 expect:true REVOKE ALL PRIVILEGES ON FUNCTION testagg5(int2) FROM "Public"
34.666667
62
0.788462
16009417087c0b088da2cb05b0ca93f40749f26d
15,339
c
C
ext/hal/nxp/mcux/drivers/imx/fsl_sai_edma.c
SebastianBoe/fw-nrfconnect-zephyr
c74c0ef21daf7594b5c4d531e75cc72bae29f9b7
[ "Apache-2.0" ]
7,482
2015-01-01T09:23:08.000Z
2022-03-31T19:34:05.000Z
ext/hal/nxp/mcux/drivers/imx/fsl_sai_edma.c
SebastianBoe/fw-nrfconnect-zephyr
c74c0ef21daf7594b5c4d531e75cc72bae29f9b7
[ "Apache-2.0" ]
2,543
2015-01-09T02:01:34.000Z
2022-03-31T23:10:14.000Z
ext/hal/nxp/mcux/drivers/imx/fsl_sai_edma.c
SebastianBoe/fw-nrfconnect-zephyr
c74c0ef21daf7594b5c4d531e75cc72bae29f9b7
[ "Apache-2.0" ]
4,645
2015-01-06T07:05:31.000Z
2022-03-31T18:21:50.000Z
/* * Copyright (c) 2015, Freescale Semiconductor, Inc. * Copyright 2016-2017 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include "fsl_sai_edma.h" /* Component ID definition, used by tools. */ #ifndef FSL_COMPONENT_ID #define FSL_COMPONENT_ID "platform.drivers.sai_edma" #endif /******************************************************************************* * Definitations ******************************************************************************/ /* Used for 32byte aligned */ #define STCD_ADDR(address) (edma_tcd_t *)(((uint32_t)(address) + 32) & ~0x1FU) static I2S_Type *const s_saiBases[] = I2S_BASE_PTRS; /*<! Structure definition for uart_edma_private_handle_t. The structure is private. */ typedef struct _sai_edma_private_handle { I2S_Type *base; sai_edma_handle_t *handle; } sai_edma_private_handle_t; enum _sai_edma_transfer_state { kSAI_Busy = 0x0U, /*!< SAI is busy */ kSAI_Idle, /*!< Transfer is done. */ }; /*<! Private handle only used for internally. */ static sai_edma_private_handle_t s_edmaPrivateHandle[ARRAY_SIZE(s_saiBases)][2]; /******************************************************************************* * Prototypes ******************************************************************************/ /*! * @brief Get the instance number for SAI. * * @param base SAI base pointer. */ static uint32_t SAI_GetInstance(I2S_Type *base); /*! * @brief SAI EDMA callback for send. * * @param handle pointer to sai_edma_handle_t structure which stores the transfer state. * @param userData Parameter for user callback. * @param done If the DMA transfer finished. * @param tcds The TCD index. */ static void SAI_TxEDMACallback(edma_handle_t *handle, void *userData, bool done, uint32_t tcds); /*! * @brief SAI EDMA callback for receive. * * @param handle pointer to sai_edma_handle_t structure which stores the transfer state. * @param userData Parameter for user callback. * @param done If the DMA transfer finished. * @param tcds The TCD index. */ static void SAI_RxEDMACallback(edma_handle_t *handle, void *userData, bool done, uint32_t tcds); /******************************************************************************* * Code ******************************************************************************/ static uint32_t SAI_GetInstance(I2S_Type *base) { uint32_t instance; /* Find the instance index from base address mappings. */ for (instance = 0; instance < ARRAY_SIZE(s_saiBases); instance++) { if (s_saiBases[instance] == base) { break; } } assert(instance < ARRAY_SIZE(s_saiBases)); return instance; } static void SAI_TxEDMACallback(edma_handle_t *handle, void *userData, bool done, uint32_t tcds) { sai_edma_private_handle_t *privHandle = (sai_edma_private_handle_t *)userData; sai_edma_handle_t *saiHandle = privHandle->handle; /* If finished a blcok, call the callback function */ memset(&saiHandle->saiQueue[saiHandle->queueDriver], 0, sizeof(sai_transfer_t)); saiHandle->queueDriver = (saiHandle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE; if (saiHandle->callback) { (saiHandle->callback)(privHandle->base, saiHandle, kStatus_SAI_TxIdle, saiHandle->userData); } /* If all data finished, just stop the transfer */ if (saiHandle->saiQueue[saiHandle->queueDriver].data == NULL) { /* Disable DMA enable bit */ SAI_TxEnableDMA(privHandle->base, kSAI_FIFORequestDMAEnable, false); EDMA_AbortTransfer(handle); } } static void SAI_RxEDMACallback(edma_handle_t *handle, void *userData, bool done, uint32_t tcds) { sai_edma_private_handle_t *privHandle = (sai_edma_private_handle_t *)userData; sai_edma_handle_t *saiHandle = privHandle->handle; /* If finished a blcok, call the callback function */ memset(&saiHandle->saiQueue[saiHandle->queueDriver], 0, sizeof(sai_transfer_t)); saiHandle->queueDriver = (saiHandle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE; if (saiHandle->callback) { (saiHandle->callback)(privHandle->base, saiHandle, kStatus_SAI_RxIdle, saiHandle->userData); } /* If all data finished, just stop the transfer */ if (saiHandle->saiQueue[saiHandle->queueDriver].data == NULL) { /* Disable DMA enable bit */ SAI_RxEnableDMA(privHandle->base, kSAI_FIFORequestDMAEnable, false); EDMA_AbortTransfer(handle); } } void SAI_TransferTxCreateHandleEDMA( I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle) { assert(handle && dmaHandle); uint32_t instance = SAI_GetInstance(base); /* Zero the handle */ memset(handle, 0, sizeof(*handle)); /* Set sai base to handle */ handle->dmaHandle = dmaHandle; handle->callback = callback; handle->userData = userData; /* Set SAI state to idle */ handle->state = kSAI_Idle; s_edmaPrivateHandle[instance][0].base = base; s_edmaPrivateHandle[instance][0].handle = handle; /* Need to use scatter gather */ EDMA_InstallTCDMemory(dmaHandle, (edma_tcd_t *)(STCD_ADDR(handle->tcd)), SAI_XFER_QUEUE_SIZE); /* Install callback for Tx dma channel */ EDMA_SetCallback(dmaHandle, SAI_TxEDMACallback, &s_edmaPrivateHandle[instance][0]); } void SAI_TransferRxCreateHandleEDMA( I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle) { assert(handle && dmaHandle); uint32_t instance = SAI_GetInstance(base); /* Zero the handle */ memset(handle, 0, sizeof(*handle)); /* Set sai base to handle */ handle->dmaHandle = dmaHandle; handle->callback = callback; handle->userData = userData; /* Set SAI state to idle */ handle->state = kSAI_Idle; s_edmaPrivateHandle[instance][1].base = base; s_edmaPrivateHandle[instance][1].handle = handle; /* Need to use scatter gather */ EDMA_InstallTCDMemory(dmaHandle, STCD_ADDR(handle->tcd), SAI_XFER_QUEUE_SIZE); /* Install callback for Tx dma channel */ EDMA_SetCallback(dmaHandle, SAI_RxEDMACallback, &s_edmaPrivateHandle[instance][1]); } void SAI_TransferTxSetFormatEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz) { assert(handle && format); /* Configure the audio format to SAI registers */ SAI_TxSetFormat(base, format, mclkSourceClockHz, bclkSourceClockHz); /* Get the tranfer size from format, this should be used in EDMA configuration */ if (format->bitWidth == 24U) { handle->bytesPerFrame = 4U; } else { handle->bytesPerFrame = format->bitWidth / 8U; } /* Update the data channel SAI used */ handle->channel = format->channel; /* Clear the channel enable bits unitl do a send/receive */ base->TCR3 &= ~I2S_TCR3_TCE_MASK; #if defined(FSL_FEATURE_SAI_FIFO_COUNT) && (FSL_FEATURE_SAI_FIFO_COUNT > 1) handle->count = FSL_FEATURE_SAI_FIFO_COUNT - format->watermark; #else handle->count = 1U; #endif /* FSL_FEATURE_SAI_FIFO_COUNT */ } void SAI_TransferRxSetFormatEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz) { assert(handle && format); /* Configure the audio format to SAI registers */ SAI_RxSetFormat(base, format, mclkSourceClockHz, bclkSourceClockHz); /* Get the tranfer size from format, this should be used in EDMA configuration */ if (format->bitWidth == 24U) { handle->bytesPerFrame = 4U; } else { handle->bytesPerFrame = format->bitWidth / 8U; } /* Update the data channel SAI used */ handle->channel = format->channel; /* Clear the channel enable bits unitl do a send/receive */ base->RCR3 &= ~I2S_RCR3_RCE_MASK; #if defined(FSL_FEATURE_SAI_FIFO_COUNT) && (FSL_FEATURE_SAI_FIFO_COUNT > 1) handle->count = format->watermark; #else handle->count = 1U; #endif /* FSL_FEATURE_SAI_FIFO_COUNT */ } status_t SAI_TransferSendEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer) { assert(handle && xfer); edma_transfer_config_t config = {0}; uint32_t destAddr = SAI_TxGetDataRegisterAddress(base, handle->channel); /* Check if input parameter invalid */ if ((xfer->data == NULL) || (xfer->dataSize == 0U)) { return kStatus_InvalidArgument; } if (handle->saiQueue[handle->queueUser].data) { return kStatus_SAI_QueueFull; } /* Change the state of handle */ handle->state = kSAI_Busy; /* Update the queue state */ handle->transferSize[handle->queueUser] = xfer->dataSize; handle->saiQueue[handle->queueUser].data = xfer->data; handle->saiQueue[handle->queueUser].dataSize = xfer->dataSize; handle->queueUser = (handle->queueUser + 1) % SAI_XFER_QUEUE_SIZE; /* Prepare edma configure */ EDMA_PrepareTransfer(&config, xfer->data, handle->bytesPerFrame, (void *)destAddr, handle->bytesPerFrame, handle->count * handle->bytesPerFrame, xfer->dataSize, kEDMA_MemoryToPeripheral); /* Store the initially configured eDMA minor byte transfer count into the SAI handle */ handle->nbytes = handle->count * handle->bytesPerFrame; EDMA_SubmitTransfer(handle->dmaHandle, &config); /* Start DMA transfer */ EDMA_StartTransfer(handle->dmaHandle); /* Enable DMA enable bit */ SAI_TxEnableDMA(base, kSAI_FIFORequestDMAEnable, true); /* Enable SAI Tx clock */ SAI_TxEnable(base, true); /* Enable the channel FIFO */ base->TCR3 |= I2S_TCR3_TCE(1U << handle->channel); return kStatus_Success; } status_t SAI_TransferReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer) { assert(handle && xfer); edma_transfer_config_t config = {0}; uint32_t srcAddr = SAI_RxGetDataRegisterAddress(base, handle->channel); /* Check if input parameter invalid */ if ((xfer->data == NULL) || (xfer->dataSize == 0U)) { return kStatus_InvalidArgument; } if (handle->saiQueue[handle->queueUser].data) { return kStatus_SAI_QueueFull; } /* Change the state of handle */ handle->state = kSAI_Busy; /* Update queue state */ handle->transferSize[handle->queueUser] = xfer->dataSize; handle->saiQueue[handle->queueUser].data = xfer->data; handle->saiQueue[handle->queueUser].dataSize = xfer->dataSize; handle->queueUser = (handle->queueUser + 1) % SAI_XFER_QUEUE_SIZE; /* Prepare edma configure */ EDMA_PrepareTransfer(&config, (void *)srcAddr, handle->bytesPerFrame, xfer->data, handle->bytesPerFrame, handle->count * handle->bytesPerFrame, xfer->dataSize, kEDMA_PeripheralToMemory); /* Store the initially configured eDMA minor byte transfer count into the SAI handle */ handle->nbytes = handle->count * handle->bytesPerFrame; EDMA_SubmitTransfer(handle->dmaHandle, &config); /* Start DMA transfer */ EDMA_StartTransfer(handle->dmaHandle); /* Enable DMA enable bit */ SAI_RxEnableDMA(base, kSAI_FIFORequestDMAEnable, true); /* Enable the channel FIFO */ base->RCR3 |= I2S_RCR3_RCE(1U << handle->channel); /* Enable SAI Rx clock */ SAI_RxEnable(base, true); return kStatus_Success; } void SAI_TransferAbortSendEDMA(I2S_Type *base, sai_edma_handle_t *handle) { assert(handle); /* Disable dma */ EDMA_AbortTransfer(handle->dmaHandle); /* Disable the channel FIFO */ base->TCR3 &= ~I2S_TCR3_TCE_MASK; /* Disable DMA enable bit */ SAI_TxEnableDMA(base, kSAI_FIFORequestDMAEnable, false); /* Disable Tx */ SAI_TxEnable(base, false); /* Reset the FIFO pointer, at the same time clear all error flags if set */ base->TCSR |= (I2S_TCSR_FR_MASK | I2S_TCSR_SR_MASK); base->TCSR &= ~I2S_TCSR_SR_MASK; /* Handle the queue index */ memset(&handle->saiQueue[handle->queueDriver], 0, sizeof(sai_transfer_t)); handle->queueDriver = (handle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE; /* Set the handle state */ handle->state = kSAI_Idle; } void SAI_TransferAbortReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle) { assert(handle); /* Disable dma */ EDMA_AbortTransfer(handle->dmaHandle); /* Disable the channel FIFO */ base->RCR3 &= ~I2S_RCR3_RCE_MASK; /* Disable DMA enable bit */ SAI_RxEnableDMA(base, kSAI_FIFORequestDMAEnable, false); /* Disable Rx */ SAI_RxEnable(base, false); /* Reset the FIFO pointer, at the same time clear all error flags if set */ base->RCSR |= (I2S_RCSR_FR_MASK | I2S_RCSR_SR_MASK); base->RCSR &= ~I2S_RCSR_SR_MASK; /* Handle the queue index */ memset(&handle->saiQueue[handle->queueDriver], 0, sizeof(sai_transfer_t)); handle->queueDriver = (handle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE; /* Set the handle state */ handle->state = kSAI_Idle; } void SAI_TransferTerminateSendEDMA(I2S_Type *base, sai_edma_handle_t *handle) { assert(handle); /* Abort the current transfer */ SAI_TransferAbortSendEDMA(base, handle); /* Clear all the internal information */ memset(handle->tcd, 0U, sizeof(handle->tcd)); memset(handle->saiQueue, 0U, sizeof(handle->saiQueue)); memset(handle->transferSize, 0U, sizeof(handle->transferSize)); handle->queueUser = 0U; handle->queueDriver = 0U; } void SAI_TransferTerminateReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle) { assert(handle); /* Abort the current transfer */ SAI_TransferAbortReceiveEDMA(base, handle); /* Clear all the internal information */ memset(handle->tcd, 0U, sizeof(handle->tcd)); memset(handle->saiQueue, 0U, sizeof(handle->saiQueue)); memset(handle->transferSize, 0U, sizeof(handle->transferSize)); handle->queueUser = 0U; handle->queueDriver = 0U; } status_t SAI_TransferGetSendCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count) { assert(handle); status_t status = kStatus_Success; if (handle->state != kSAI_Busy) { status = kStatus_NoTransferInProgress; } else { *count = (handle->transferSize[handle->queueDriver] - (uint32_t)handle->nbytes * EDMA_GetRemainingMajorLoopCount(handle->dmaHandle->base, handle->dmaHandle->channel)); } return status; } status_t SAI_TransferGetReceiveCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count) { assert(handle); status_t status = kStatus_Success; if (handle->state != kSAI_Busy) { status = kStatus_NoTransferInProgress; } else { *count = (handle->transferSize[handle->queueDriver] - (uint32_t)handle->nbytes * EDMA_GetRemainingMajorLoopCount(handle->dmaHandle->base, handle->dmaHandle->channel)); } return status; }
31.692149
118
0.657866
72450a46f3155416fe4f10e7330ba23ef7b7658d
4,415
dart
Dart
lib/shared/widgets/avatar_widget.dart
renatovalente5/CM---FITon
2500a42b02868bef97d5e1cf0180efb457ea30d1
[ "MIT" ]
null
null
null
lib/shared/widgets/avatar_widget.dart
renatovalente5/CM---FITon
2500a42b02868bef97d5e1cf0180efb457ea30d1
[ "MIT" ]
null
null
null
lib/shared/widgets/avatar_widget.dart
renatovalente5/CM---FITon
2500a42b02868bef97d5e1cf0180efb457ea30d1
[ "MIT" ]
null
null
null
import 'dart:math'; import 'package:badges/badges.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:line_icons/line_icons.dart'; import 'package:step_progress_indicator/step_progress_indicator.dart'; import '../../core.dart'; class AvatarWidget extends StatelessWidget { const AvatarWidget({ this.photoURL, this.membership, this.progress = 0, this.color, this.isHideProgressBar = false, this.width = 85, this.heroTag, Key key, }) : super(key: key); final String photoURL; final String heroTag; final String membership; final int progress; final Color color; final bool isHideProgressBar; final double width; Widget emptyPhoto() { return Hero( tag: "empty-avatar" + (heroTag ?? Random().nextInt(100).toString()), child: CircleAvatar( backgroundColor: Colors.white, maxRadius: 70, child: Center( child: Icon( LineIcons.alternateUser, size: 50, // ignore: deprecated_member_use color: Get.theme.accentColor, ), ), ), ); } Widget emptyPhotoBorder() { return Container( decoration: BoxDecoration( shape: BoxShape.circle, border: Border.all( // ignore: deprecated_member_use color: Get.theme.accentColor, width: 1, )), child: Hero( tag: "empty-avatar-border" + (heroTag ?? Random().nextInt(100).toString()), child: CircleAvatar( backgroundColor: Colors.white, maxRadius: 70, child: Center( child: Icon( LineIcons.alternateUser, size: 70, // ignore: deprecated_member_use color: Get.theme.accentColor, ), ), ), ), ); } @override Widget build(BuildContext context) { return SizedBox( width: width, child: isHideProgressBar ? photoURL?.isEmpty ?? true ? emptyPhotoBorder() : Hero( tag: "avatar" + (heroTag ?? Random().nextInt(100).toString()), child: CircleAvatar( maxRadius: 60, backgroundColor: Colors.white, backgroundImage: NetworkImage(photoURL), ), ) : Stack( children: [ CircularStepProgressIndicator( padding: 0, currentStep: progress, totalSteps: 100, selectedStepSize: 3.7, width: 70, height: 70, startingAngle: 2.3, selectedColor: kFirstColor, unselectedColor: Color(0xFF252638), roundedCap: (_, __) => true, child: Center( child: photoURL?.isEmpty ?? true ? emptyPhoto() : Hero( tag: "avatar" + (heroTag ?? Random().nextInt(100).toString()), child: CircleAvatar( maxRadius: 27, backgroundColor: Colors.white, backgroundImage: NetworkImage(photoURL), ), ), ), ), Positioned( bottom: 10, right: 0, child: Badge( shape: BadgeShape.square, animationType: BadgeAnimationType.scale, padding: const EdgeInsets.symmetric( horizontal: 6, vertical: 2.2), borderSide: const BorderSide(color: Colors.white, width: 2), // badgeColor: color ?? Colors.yellow[600], badgeColor: kFirstColor, borderRadius: BorderRadius.circular(13), elevation: 0, // badgeContent: Text( // membership ?? "Free", // style: const TextStyle(color: Colors.white, fontSize: 10), // ), ), ), ], ), ); } }
30.874126
83
0.473613
6e06936b00db901c82e42684d9d88f28cbc25e82
878
html
HTML
_includes/post_preview_small.html
okfde/datenschule.de
62f45ae6ff3228357fd4f5a9dd236535f3b5c8c5
[ "MIT" ]
6
2016-08-08T06:56:50.000Z
2020-06-28T21:45:17.000Z
_includes/post_preview_small.html
okfde/datenschule.de
62f45ae6ff3228357fd4f5a9dd236535f3b5c8c5
[ "MIT" ]
9
2016-05-03T16:41:05.000Z
2022-02-26T03:28:37.000Z
_includes/post_preview_small.html
okfde/datenschule.de
62f45ae6ff3228357fd4f5a9dd236535f3b5c8c5
[ "MIT" ]
1
2016-09-01T12:03:23.000Z
2016-09-01T12:03:23.000Z
{% assign post=include.post %} {% assign url=post.url |replace_first:'/','' %} {% if post.picture %}<a href="{{ site.baseurl }}/{{ url }}" class="post-img-wrap"><img class="post-img" src="{{ post.picture.src }}" alt="{{ post.title | xml_escape}}"></a>{% endif %} <a href="{{ site.baseurl }}/{{ url }}" class="post-title">{{post.title | truncatewords: 8 }}</a> <p class="post-excerpt">{{ post.excerpt | markdownify | strip_html | truncatewords: 16 }}</p> <p class="post-meta"> {% t blog.author_by %} {% assign authors = "" | split:"|" %} {% if post.author %}{% assign authors = authors | push: post.author %}{% endif %} {% for a in post.authors %}{% assign authors = authors | push: a %}{% endfor %} {% for author in authors %}{{author}}{% unless forloop.last %} {% t blog.and %} {% endunless %}{% endfor %}<br/> {% t blog.on_date %} {{ post.date | date:"%d.%m.%Y" }} </p>
62.714286
183
0.591116
425100b4f203434315657097aea27a5e16f88242
973
swift
Swift
RSignatureVerifier/Logger.swift
imaginaris/ios-signatureverifier
fd7d18e19545c2ae3be162c95108e970b89a5dbe
[ "MIT" ]
null
null
null
RSignatureVerifier/Logger.swift
imaginaris/ios-signatureverifier
fd7d18e19545c2ae3be162c95108e970b89a5dbe
[ "MIT" ]
11
2021-04-01T07:30:41.000Z
2021-11-09T08:10:30.000Z
RSignatureVerifier/Logger.swift
imaginaris/ios-signatureverifier
fd7d18e19545c2ae3be162c95108e970b89a5dbe
[ "MIT" ]
1
2021-03-30T21:42:24.000Z
2021-03-30T21:42:24.000Z
import os extension OSLog { static let sdk = OSLog(category: "Signature Verifier SDK") private convenience init(category: String, bundle: Bundle = Bundle(for: Logger.self)) { let identifier = bundle.infoDictionary?["CFBundleIdentifier"] as? String self.init(subsystem: (identifier ?? "").appending(".logs"), category: category) } } internal class Logger { /// Debug class func d(_ message: String) { #if DEBUG print("🔍 \(message)") #endif } /// Verbose class func v(_ message: String) { #if DEBUG // Disabled by default to prevent spamming apps with verbose logging. // In future this could be made switchable via plist. // print("🔍 \(message)") #endif } /// Error class func e(_ message: String) { #if DEBUG print("❌ \(message)") #else os_log("%@", log: OSLog.sdk, type: .error, message) #endif } }
25.605263
91
0.578623
3dc7ced01c91b59f0392b392bc829cb316957699
6,945
dart
Dart
example/lib/home_controls.dart
meitarazar/serayon_sliding_switcher
79babacfaffaafe27dc3ab14039fc827964c5aa0
[ "BSD-3-Clause" ]
null
null
null
example/lib/home_controls.dart
meitarazar/serayon_sliding_switcher
79babacfaffaafe27dc3ab14039fc827964c5aa0
[ "BSD-3-Clause" ]
null
null
null
example/lib/home_controls.dart
meitarazar/serayon_sliding_switcher
79babacfaffaafe27dc3ab14039fc827964c5aa0
[ "BSD-3-Clause" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:serayon_sliding_switcher/serayon_sliding_switcher.dart'; class HomeControls extends StatefulWidget { final String title; const HomeControls({Key? key, required this.title}) : super(key: key); @override State<HomeControls> createState() => _HomeControlsState(); } class _HomeControlsState extends State<HomeControls> with SlidingSwitcherListener { // this is final SlidingSwitcherController _fabController = SlidingSwitcherController( initDirection: SlideOutDirection.left, ); void changeState(SliderState state) => _fabController.state = state; void changeDirection(SlideOutDirection direction) => _fabController.direction = direction; @override void onChangedState(SliderState oldState, SliderState newState) => setState(() {}); @override void onChangeDirection(SlideOutDirection oldDirection, SlideOutDirection newDirection) => setState(() {}); @override void initState() { _fabController.addListener(this); super.initState(); } @override void dispose() { _fabController.removeListener(this); super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), leading: IconButton(onPressed: () => Navigator.pop(context), icon: const Icon(Icons.arrow_back)), ), body: Container( alignment: Alignment.topCenter, padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ const Padding( padding: EdgeInsets.only(top: 16.0), child: Text( 'Change direction', ), ), Padding( padding: const EdgeInsets.only(top: 8.0), child: FractionallySizedBox( widthFactor: 0.75, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ MyActionButton( icon: Icons.arrow_left, isActive: _fabController.direction == SlideOutDirection.left, onPressed: () => changeDirection(SlideOutDirection.left), ), MyActionButton( icon: Icons.arrow_drop_up, isActive: _fabController.direction == SlideOutDirection.up, onPressed: () => changeDirection(SlideOutDirection.up), ), MyActionButton( icon: Icons.arrow_drop_down, isActive: _fabController.direction == SlideOutDirection.down, onPressed: () => changeDirection(SlideOutDirection.down), ), MyActionButton( icon: Icons.arrow_right, isActive: _fabController.direction == SlideOutDirection.right, onPressed: () => changeDirection(SlideOutDirection.right), ), ], ), ), ), const Padding( padding: EdgeInsets.only(top: 24.0), child: Text( 'Change state', ), ), Padding( padding: const EdgeInsets.only(top: 8.0), child: FractionallySizedBox( widthFactor: 0.75, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ MyElevatedButton( text: 'None', isActive: _fabController.state == SliderState.none, onPressed: () => changeState(SliderState.none), ), MyElevatedButton( text: 'First', isActive: _fabController.state == SliderState.first, onPressed: () => changeState(SliderState.first), ), MyElevatedButton( text: 'Second', isActive: _fabController.state == SliderState.second, onPressed: () => changeState(SliderState.second), ), ], ), ), ), Padding( padding: const EdgeInsets.only(top: 64.0), child: SlidingSwitcherWidget( slidingStateController: _fabController, firstChild: Container( padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), decoration: ShapeDecoration( shape: const StadiumBorder(), color: Colors.amberAccent.shade700, ), child: const Text( 'I\'m the first widget state :D', style: TextStyle(color: Colors.black), ), ), secondChild: Container( padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), decoration: ShapeDecoration( shape: const StadiumBorder(), color: Colors.deepOrangeAccent.shade700, ), child: const Text( 'I\'m the second widget state :P', style: TextStyle(color: Colors.white), ), ), ), ), ], ), ), ); } } class MyActionButton extends StatelessWidget { final bool isActive; final IconData icon; final VoidCallback? onPressed; const MyActionButton({Key? key, required this.isActive, required this.icon, this.onPressed}) : super(key: key); @override Widget build(BuildContext context) { return ElevatedButton( child: Icon( icon, color: isActive ? Colors.black : Colors.white, ), style: ElevatedButton.styleFrom( primary: isActive ? Colors.amber : null, shape: const CircleBorder(), padding: const EdgeInsets.all(8.0), ), onPressed: onPressed, ); } } class MyElevatedButton extends StatelessWidget { final bool isActive; final String text; final VoidCallback? onPressed; const MyElevatedButton({Key? key, required this.isActive, required this.text, this.onPressed}) : super(key: key); @override Widget build(BuildContext context) { return ElevatedButton( child: Text( text, style: TextStyle( color: isActive ? Colors.black : null, ), ), style: ElevatedButton.styleFrom( primary: isActive ? Colors.amber : null, ), onPressed: onPressed, ); } }
33.878049
115
0.538229
418ef52a08adba9725a20c6959c1b0ba581bd4c7
2,842
lua
Lua
maniaf4-menu/mania_ui/cl_rounded.lua
Prepager/gmodstore-archive
594616376dd49bed402143e537d2f7257ebca373
[ "MIT" ]
12
2021-09-15T20:44:06.000Z
2022-03-06T18:21:55.000Z
maniaf4-menu/mania_ui/cl_rounded.lua
Prepager/gmodstore-archive
594616376dd49bed402143e537d2f7257ebca373
[ "MIT" ]
null
null
null
maniaf4-menu/mania_ui/cl_rounded.lua
Prepager/gmodstore-archive
594616376dd49bed402143e537d2f7257ebca373
[ "MIT" ]
6
2022-01-21T08:23:47.000Z
2022-03-18T16:31:37.000Z
--[[--------------------------------------------------------- Variables -----------------------------------------------------------]] local PANEL = {} --[[--------------------------------------------------------- Function: DrawCircle -----------------------------------------------------------]] function PANEL:AllowItemInput(bool) --> Variables self.itemInput = bool end --[[--------------------------------------------------------- Function: DrawCircle -----------------------------------------------------------]] function PANEL:DrawCircle( x, y, radius, seg ) local cir = {} table.insert(cir, {x = x, y = y}) for i = 0, seg do local a = math.rad((i / seg) * -360) table.insert(cir, {x = x + math.sin(a) * radius, y = y + math.cos(a) * radius}) end local a = math.rad( 0 ) table.insert(cir, {x = x + math.sin(a) * radius, y = y + math.cos(a) * radius}) surface.DrawPoly(cir) end --[[--------------------------------------------------------- Function: Paint -----------------------------------------------------------]] function PANEL:Paint(w, h) --> Valid if !IsValid(self.item) then return end --> Stencils render.ClearStencil() render.SetStencilEnable(true) render.SetStencilWriteMask(1) render.SetStencilTestMask(1) render.SetStencilFailOperation(STENCILOPERATION_REPLACE) render.SetStencilPassOperation(STENCILOPERATION_ZERO) render.SetStencilZFailOperation(STENCILOPERATION_ZERO) render.SetStencilCompareFunction(STENCILCOMPARISONFUNCTION_NEVER) render.SetStencilReferenceValue(1) draw.NoTexture() surface.SetDrawColor(Color(0, 0, 0, 255)) self:DrawCircle(w/2, h/2, h/2, math.max(w,h)/2) render.SetStencilFailOperation(STENCILOPERATION_ZERO) render.SetStencilPassOperation(STENCILOPERATION_REPLACE) render.SetStencilZFailOperation(STENCILOPERATION_ZERO) render.SetStencilCompareFunction(STENCILCOMPARISONFUNCTION_EQUAL) render.SetStencilReferenceValue(1) self.item:PaintManual() render.SetStencilEnable(false) render.ClearStencil() end --[[--------------------------------------------------------- Function: PerformLayout -----------------------------------------------------------]] function PANEL:PerformLayout() --> Valid if !IsValid(self.item) then --> Timer timer.Simple(1, function() self:PerformLayout() end) --> Return return end --> Item self.item:SetSize(self:GetWide(), self:GetTall()) --> Input if self.itemInput then self.item:SetMouseInputEnabled(true) else self.item:SetMouseInputEnabled(false) end end --[[--------------------------------------------------------- Define: ManiaFrame -----------------------------------------------------------]] derma.DefineControl('ManiaRounded', 'ManiaRounded', PANEL, 'DPanel')
26.314815
82
0.521464
1f2099890a78875c186ff1d2748f4ec6a227cc24
139
css
CSS
src/pages/destination/components/main/main.css
ni864450591/myyydapp
358d425150f7cb2815b19be009f8121eb2bf8780
[ "MIT" ]
null
null
null
src/pages/destination/components/main/main.css
ni864450591/myyydapp
358d425150f7cb2815b19be009f8121eb2bf8780
[ "MIT" ]
null
null
null
src/pages/destination/components/main/main.css
ni864450591/myyydapp
358d425150f7cb2815b19be009f8121eb2bf8780
[ "MIT" ]
null
null
null
.tab-layout{ width: 76px; height: 100%; background-color: #fafafa; } .content-layout{ flex:1; overflow-y: auto; }
12.636364
30
0.568345
53d6158320e8b44382c14b1aa9220e8f916ee7e7
2,984
java
Java
src/main/java/net/fortuna/ical4j/connector/local/AbstractLocalObjectStore.java
psnippen/ical4j-connector
e6d9fa48cbd99931b9a3907995c71c050613e0ab
[ "BSD-3-Clause" ]
10
2015-04-17T14:31:14.000Z
2020-02-03T19:00:15.000Z
src/main/java/net/fortuna/ical4j/connector/local/AbstractLocalObjectStore.java
psnippen/ical4j-connector
e6d9fa48cbd99931b9a3907995c71c050613e0ab
[ "BSD-3-Clause" ]
37
2016-02-02T08:54:20.000Z
2022-02-17T01:15:41.000Z
src/main/java/net/fortuna/ical4j/connector/local/AbstractLocalObjectStore.java
psnippen/ical4j-connector
e6d9fa48cbd99931b9a3907995c71c050613e0ab
[ "BSD-3-Clause" ]
13
2015-06-17T01:33:49.000Z
2020-07-07T11:18:43.000Z
package net.fortuna.ical4j.connector.local; import net.fortuna.ical4j.connector.ObjectNotFoundException; import net.fortuna.ical4j.connector.ObjectStore; import net.fortuna.ical4j.connector.ObjectStoreException; import net.fortuna.ical4j.model.Calendar; import java.io.File; import java.io.IOException; import java.util.List; public abstract class AbstractLocalObjectStore<C extends AbstractLocalObjectCollection<?>> implements ObjectStore<C> { private final File root; AbstractLocalObjectStore(File root) { if (root.exists() && !root.isDirectory()) { throw new IllegalArgumentException("Root must be a directory"); } this.root = root; } protected File getRoot() { return root; } @Override public boolean connect() throws ObjectStoreException { return false; } @Override public boolean connect(String username, char[] password) throws ObjectStoreException { return false; } @Override public void disconnect() throws ObjectStoreException { } @Override public boolean isConnected() { return false; } @Override public C addCollection(String id) throws ObjectStoreException { File collectionDir = new File(root, id); if ((collectionDir.exists() && !collectionDir.isDirectory()) || (!collectionDir.exists() && !collectionDir.mkdirs())) { throw new ObjectStoreException("Unable to initialise collection"); } C collection = null; try { collection = getCollection(id); } catch (ObjectNotFoundException e) { collection = newCollection(id); } return collection; } protected abstract C newCollection(String id); @Override public C addCollection(String id, String displayName, String description, String[] supportedComponents, Calendar timezone) throws ObjectStoreException { C collection = addCollection(id); try { collection.setDisplayName(displayName); collection.setDescription(description); collection.setSupportedComponents(supportedComponents); collection.setTimeZone(timezone); } catch (IOException e) { throw new ObjectStoreException(e); } return collection; } @Override public C removeCollection(String id) throws ObjectStoreException, ObjectNotFoundException { return null; } @Override public C getCollection(String id) throws ObjectStoreException, ObjectNotFoundException { File collectionDir = new File(root, id); if (!collectionDir.exists() || !collectionDir.isDirectory()) { throw new ObjectNotFoundException("Unable to retrieve collection"); } return newCollection(id); } @Override public List<C> getCollections() throws ObjectStoreException, ObjectNotFoundException { return null; } }
30.44898
156
0.667895
8649839aa0c2c921a9821cd89e7f853d2624889c
257
go
Go
test/compare/testdata/program_tests/builtin13.go
zapateo/scriggo
92062fc515661d920c655731b146e40e5b0edec6
[ "BSD-3-Clause" ]
294
2021-09-15T13:28:31.000Z
2022-03-02T21:45:58.000Z
test/compare/testdata/program_tests/builtin13.go
zapateo/scriggo
92062fc515661d920c655731b146e40e5b0edec6
[ "BSD-3-Clause" ]
45
2021-09-15T15:28:59.000Z
2022-03-24T08:55:13.000Z
test/compare/testdata/program_tests/builtin13.go
zapateo/scriggo
92062fc515661d920c655731b146e40e5b0edec6
[ "BSD-3-Clause" ]
14
2021-09-17T04:30:17.000Z
2021-12-28T10:54:47.000Z
// run package main import ( "fmt" ) func main() { m := map[string]int{} fmt.Print(len(m)) m["one"] = 1 fmt.Print(len(m)) m["one"] = 1 m["one"] = 2 fmt.Print(len(m)) m["one"] = 1 m["two"] = 2 m["three"] = 3 m["five"] = 4 fmt.Print(len(m)) }
11.173913
22
0.505837
1fd9c45a1c341cdf5a809c6361f86b7fd960bfa4
1,453
css
CSS
styles/main.css
aneekm/aneekm.github.io
3016fdd7edf56538282e4ac8872da945da78d1b1
[ "MIT" ]
null
null
null
styles/main.css
aneekm/aneekm.github.io
3016fdd7edf56538282e4ac8872da945da78d1b1
[ "MIT" ]
1
2021-01-21T21:55:21.000Z
2021-01-21T21:55:21.000Z
styles/main.css
aneekm/aneekm.github.io
3016fdd7edf56538282e4ac8872da945da78d1b1
[ "MIT" ]
1
2020-09-30T23:43:54.000Z
2020-09-30T23:43:54.000Z
html { margin: 0; padding: 0; height: 100%; width: 100%; } body { font-family: "Open Sans", sans-serif; font-size: 100%; color: #303336; background-color: #ffffff; margin: 0; padding: 0; height: 100%; width: 100%; display: flex; flex-flow: column nowrap; } .title { flex: 1 0 auto; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 95%; margin: 0 auto; } .name { font-family: "Ubuntu", sans-serif; font-size: 3em; font-weight: 700; color: #88001a; margin: 0; } .subtext { font-family: "Raleway", sans-serif; font-size: 1em; color: #86898c; } .all-links { flex: 0 0 auto; width: 100%; display: flex; flex-direction: column; margin: 0; padding: 15px; color: #303336; } .links { align-self: center; text-align: center; width: 95%; margin-bottom: 2%; } .links a { padding: 0 1%; text-decoration: none; font-size: 1em; color: #88001a; transition: color .3s; } .links a:hover { color: #ec4339; } ::selection { color: #ffffff; background-color: #88001a; } @media all and (min-width: 600px) { .name {font-size: 5em;} .subtext {font-size: 1.8em;} .topnav a {font-size: 1.8em;} .links a {font-size: 1.2em;} } @media all and (min-width: 1024px) { .name {font-size: 8em;} .subtext {font-size: 3em;} .topnav a {font-size: 2em;} .links a {font-size: 1.5em;} }
13.330275
39
0.603579
1bf63eaf7fa3aad37c4a01f10080478f373b129c
859
dart
Dart
lib/org.markdown4j/codeblockemitter.dart
billy1380/markdown4f
811c2898f7a63417c3fd5e4b22759e9ed22936b4
[ "Apache-2.0" ]
null
null
null
lib/org.markdown4j/codeblockemitter.dart
billy1380/markdown4f
811c2898f7a63417c3fd5e4b22759e9ed22936b4
[ "Apache-2.0" ]
null
null
null
lib/org.markdown4j/codeblockemitter.dart
billy1380/markdown4f
811c2898f7a63417c3fd5e4b22759e9ed22936b4
[ "Apache-2.0" ]
null
null
null
import 'package:markdown4f/com.github.rjeschke.txtmark/blockemitter.dart'; class CodeBlockEmitter implements BlockEmitter { @override void emitBlock(StringBuffer out, List<String> lines, String meta) { out.write("<pre><code"); if (meta.length > 0) { out.write(" class=\"" + meta + "\""); } out.write(">"); for (final String s in lines) { for (int i = 0; i < s.length; i++) { final String c = s[i]; switch (c) { case '&': out.write("&amp;"); break; case '<': out.write("&lt;"); break; case '>': out.write("&gt;"); break; default: out.write(c); break; } } out.write('\n'); } out.write("</code></pre>\n"); } }
25.264706
75
0.447031
a04698311d1ed44c1821d6fece5f8987ca5449cf
642
sql
SQL
custom/Script_OracleBase/Monitoring/pipes.sql
omegazip/dba_scripts
9c7fc8a60cce5f50a4eac3cb9f4da2461fe86267
[ "FSFAP" ]
null
null
null
custom/Script_OracleBase/Monitoring/pipes.sql
omegazip/dba_scripts
9c7fc8a60cce5f50a4eac3cb9f4da2461fe86267
[ "FSFAP" ]
null
null
null
custom/Script_OracleBase/Monitoring/pipes.sql
omegazip/dba_scripts
9c7fc8a60cce5f50a4eac3cb9f4da2461fe86267
[ "FSFAP" ]
4
2019-07-12T23:22:53.000Z
2021-06-10T05:07:01.000Z
-- ----------------------------------------------------------------------------------- -- File Name : http://www.oracle-base.com/dba/monitoring/pipes.sql -- Author : Tim Hall -- Description : Displays a list of all database pipes. -- Requirements : Access to the V$ views. -- Call Syntax : @pipes -- Last Modified: 15/07/2000 -- ----------------------------------------------------------------------------------- SET LINESIZE 500 SET PAGESIZE 1000 SET VERIFY OFF SELECT a.ownerid "Owner", Substr(name,1,40) "Name", type "Type", pipe_size "Size" FROM v$db_pipes a ORDER BY 1,2; SET PAGESIZE 14 SET VERIFY ON
30.571429
86
0.487539
014505c274ac785a0292e26ee868b1a9444f05ec
2,286
rs
Rust
src/implementation/mdd/shallow/mod.rs
xgillard/ddo
300be0213e66e784415207273e6dc6f4971020a9
[ "MIT" ]
34
2020-02-21T20:27:12.000Z
2022-03-08T12:14:56.000Z
src/implementation/mdd/shallow/mod.rs
vcoppe/ddo
2d79e37d0746477242a1399d10d9fcb279fcdd7d
[ "MIT" ]
1
2021-05-04T11:29:46.000Z
2021-05-06T15:55:26.000Z
src/implementation/mdd/shallow/mod.rs
vcoppe/ddo
2d79e37d0746477242a1399d10d9fcb279fcdd7d
[ "MIT" ]
4
2020-02-26T01:28:17.000Z
2021-05-05T10:35:02.000Z
// Copyright 2020 Xavier Gillard // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //! This module and its sub modules provide the structures required to implement //! a _shallow_ MDDs (flat or pooled). //! //! A shallow MDD representation is one that only maintains a ”slice” of the //! actual DD it stands for. This slice comprises only two layers from the MDD: //! the current layer and the next layer. All the previous layers are forgotten //! and the nodes belonging to the ”slice” only need to keep track of their //! single best parent in order to be able to recover the solution maximizing //! the objective function. //! //! # Note //! This is a perfectly sound and memory efficient way of representing MDDs to //! implement a branch-and-bound DDO solver. However, this memory efficiency //! comes at a price: precious information is lost when the older layers are //! forgotten. And this information loss is precisely what prevents a shallow //! MDD representation from exploiting local bounds. So if you intend to use //! local bounds -- and we advise you to do so, because the impact is sometimes //! dramatic ! -- you should instead use the deep mdd representation which is //! the default in this crate. pub mod utils; pub mod flat; pub mod pooled;
54.428571
83
0.759843
0ed81391f2fd45cbeaa0cafffbba2c7123d0c5fd
102
sql
SQL
elasticsearch/elasticsearch-jdbc-2.2.1.0/src/test/resources/org/xbib/elasticsearch/jdbc/strategy/standard/sqlite/create-jobtables.sql
guanguans/Yii2-guanguans
832970797b608170c6b3dbb721cd46c2a05571bd
[ "MIT" ]
2
2016-02-19T06:57:12.000Z
2016-02-19T06:58:55.000Z
elasticsearch/elasticsearch-jdbc-2.2.1.0/src/test/resources/org/xbib/elasticsearch/jdbc/strategy/standard/sqlite/create-jobtables.sql
guanguans/Yii2-guanguans
832970797b608170c6b3dbb721cd46c2a05571bd
[ "MIT" ]
10
2020-04-13T01:54:22.000Z
2020-08-09T09:56:09.000Z
elasticsearch/elasticsearch-jdbc-2.2.1.0/src/test/resources/org/xbib/elasticsearch/jdbc/strategy/standard/sqlite/create-jobtables.sql
guanguans/Yii2-guanguans
832970797b608170c6b3dbb721cd46c2a05571bd
[ "MIT" ]
null
null
null
create table "products" ("_job" integer, "name" varchar(32), "amount" integer, "price" decimal(22,4))
51
101
0.696078
64dbc343ad6113741b3116ed0d8b988a099f72d5
2,830
java
Java
addOns/viewstate/src/main/java/org/zaproxy/zap/extension/viewstate/zap/utils/ViewState.java
theamanrawat/zap-extensions
38271747467f3c18e6c2125b6a8095ce7cf3cd60
[ "Apache-2.0" ]
623
2015-05-07T10:47:49.000Z
2022-03-28T21:15:00.000Z
addOns/viewstate/src/main/java/org/zaproxy/zap/extension/viewstate/zap/utils/ViewState.java
theamanrawat/zap-extensions
38271747467f3c18e6c2125b6a8095ce7cf3cd60
[ "Apache-2.0" ]
1,466
2015-05-11T11:49:43.000Z
2022-03-31T16:51:56.000Z
addOns/viewstate/src/main/java/org/zaproxy/zap/extension/viewstate/zap/utils/ViewState.java
theamanrawat/zap-extensions
38271747467f3c18e6c2125b6a8095ce7cf3cd60
[ "Apache-2.0" ]
801
2015-05-07T10:48:05.000Z
2022-03-28T21:15:02.000Z
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2016 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.zaproxy.zap.extension.viewstate.zap.utils; import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class ViewState { private static Logger logger = LogManager.getLogger(ViewState.class); private String type; protected String value; protected String name; public ViewState(String val, String type, String name) { this.value = val; this.type = type; this.name = name; } public String getType() { return this.type; } public String getValue() { return this.value; } public String getName() { return this.name; } public byte[] getDecodedValue() { byte[] val = null; try { if (getType().equalsIgnoreCase(ASPViewState.KEY)) { ASPViewState avs = (ASPViewState) this; val = avs.decode(); } if (getType().equalsIgnoreCase(JSFViewState.KEY)) { JSFViewState jvs = (JSFViewState) this; ByteArrayOutputStream b = new ByteArrayOutputStream(); ObjectOutputStream o = new ObjectOutputStream(b); o.writeObject(jvs.decode()); val = b.toString().getBytes(); } } catch (Exception e) { logger.error("Exception in getDecodedValue(): {}", e.getMessage(), e); } return val; } public String getEncodedValue(byte[] plain) { String val = null; try { if (getType().equalsIgnoreCase(ASPViewState.KEY)) { ASPViewState avs = (ASPViewState) this; val = avs.encode(plain); } if (getType().equalsIgnoreCase(JSFViewState.KEY)) { JSFViewState jvs = (JSFViewState) this; val = jvs.encode(plain); } } catch (Exception e) { logger.error("Exception in getEncodedValue(): {}", e.getMessage(), e); } return val; } }
31.444444
82
0.612721
414c51b7fdeb52735a6f160077227737950214b3
4,021
ps1
PowerShell
src/Functions/Public/iaas/Get-vRANetworkIPRange.ps1
sammcgeown/PowervRA
2c38cd6c49201c241bb679f156e790d8acb7cb2e
[ "MIT" ]
85
2016-03-21T22:13:31.000Z
2022-01-13T21:27:28.000Z
src/Functions/Public/iaas/Get-vRANetworkIPRange.ps1
sammcgeown/PowervRA
2c38cd6c49201c241bb679f156e790d8acb7cb2e
[ "MIT" ]
214
2016-03-22T12:40:59.000Z
2022-01-30T15:49:36.000Z
src/Functions/Public/iaas/Get-vRANetworkIPRange.ps1
sammcgeown/PowervRA
2c38cd6c49201c241bb679f156e790d8acb7cb2e
[ "MIT" ]
62
2016-05-10T04:33:20.000Z
2021-09-30T10:51:56.000Z
function Get-vRANetworkIPRange { <# .SYNOPSIS Get a vRA Network IP Ranges .DESCRIPTION Get a vRA Network IP Ranges .PARAMETER Id The ID of the vRA Network IP Ranges .PARAMETER Name The Name of the vRA Network IP Ranges .INPUTS System.String .OUTPUTS System.Management.Automation.PSObject .EXAMPLE Get-vRANetworkIPRange .EXAMPLE Get-vRANetworkIPRange -Id '3492a6e8-r5d4-1293-b6c4-39037ba693f9' .EXAMPLE Get-vRANetworkIPRange -Name 'TestNetworkIPRange' #> [CmdletBinding(DefaultParameterSetName="Standard")][OutputType('System.Management.Automation.PSObject')] Param ( [Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,ParameterSetName="ById")] [ValidateNotNullOrEmpty()] [String[]]$Id, [Parameter(Mandatory=$true,ParameterSetName="ByName")] [ValidateNotNullOrEmpty()] [String[]]$Name ) begin { $APIUrl = '/iaas/api/network-ip-ranges' function CalculateOutput([PSCustomObject]$NetworkIPRange) { [PSCustomObject] @{ Owner = $NetworkIPRange.owner Description = $NetworkIPRange.description Tags = $NetworkIPRange.tags ExternalId = $NetworkIPRange.externalId Name = $NetworkIPRange.name Id = $NetworkIPRange.id CreatedAt = $NetworkIPRange.createdAt UpdatedAt = $NetworkIPRange.updatedAt OrganizationId = $NetworkIPRange.orgId StartIPAddress = $NetworkIPRange.startIPAddress EndIPAddress = $NetworkIPRange.endIPAddress IPVersion = $NetworkIPRange.ipVersion Links = $NetworkIPRange._links } } } process { try { switch ($PsCmdlet.ParameterSetName) { # --- Get Network IP Range by Id 'ById' { foreach ($NetworkIPRangeId in $Id){ $URI = "$($APIUrl)?`$filter=id eq '$($NetworkIPRangeId)'" $Response = Invoke-vRARestMethod -Method GET -URI $URI -Verbose:$VerbosePreference foreach ($NetworkIPRange in $Response.content) { CalculateOutput $NetworkIPRange } } break } # --- Get Network IP Range by Name 'ByName' { foreach ($NetworkIPRangeName in $Name){ $URI = "$($APIUrl)?`$filter=name eq '$($NetworkIPRangeName)'" $Response = Invoke-vRARestMethod -Method GET -URI $URI -Verbose:$VerbosePreference foreach ($NetworkIPRange in $Response.content) { CalculateOutput $NetworkIPRange } } break } # --- No parameters passed so return all Network IP Ranges 'Standard' { $URI = $APIUrl $Response = Invoke-vRARestMethod -Method GET -URI $URI -Verbose:$VerbosePreference foreach ($NetworkIPRange in $Response.content) { CalculateOutput $NetworkIPRange } } } } catch [Exception]{ throw } } end { } }
32.427419
126
0.465556
2a78d231ae76c131fa06adb485d7fdb0885616d7
8,969
java
Java
TuitionReimbursementManagementSystem/src/main/java/com/trms/controller/FormController.java
2010USFJava/JenSquaredP1
f2705a2db7e5623e8a3bccaca4b84052a5bc36d4
[ "MIT" ]
1
2020-11-23T21:07:30.000Z
2020-11-23T21:07:30.000Z
TuitionReimbursementManagementSystem/src/main/java/com/trms/controller/FormController.java
2010USFJava/JenSquaredP1
f2705a2db7e5623e8a3bccaca4b84052a5bc36d4
[ "MIT" ]
null
null
null
TuitionReimbursementManagementSystem/src/main/java/com/trms/controller/FormController.java
2010USFJava/JenSquaredP1
f2705a2db7e5623e8a3bccaca4b84052a5bc36d4
[ "MIT" ]
1
2020-11-23T21:13:44.000Z
2020-11-23T21:13:44.000Z
package com.trms.controller; import java.io.IOException; import java.sql.SQLException; import java.time.LocalDate; import java.time.Period; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.trms.beans.Employee; import com.trms.beans.Form; import com.trms.beans.Form.eventType; import com.trms.beans.Form.formStatus; import com.trms.beans.Form.gradeFormat; import com.trms.dao.EmployeeDao; import com.trms.dao.FormDao; import com.trms.daoimpl.EmployeeDaoImpl; import com.trms.daoimpl.FormDaoImpl; public class FormController { static FormDao fdao = new FormDaoImpl(); static EmployeeDao edao = new EmployeeDaoImpl(); public static String newForm(HttpServletRequest req) throws SQLException, JsonProcessingException { if (!req.getMethod().equals("POST")) { return "html/form.html"; } Employee e = (Employee) req.getSession().getAttribute("currentuser"); ObjectMapper om = new ObjectMapper(); LocalDate submissionDate = LocalDate.parse(req.getParameter("todaysdate")); try { String etype = om.writeValueAsString(req.getParameter("eventtype")); eventType eventtype = om.readValue(etype, eventType.class); String eventname = req.getParameter("eventname"); String desc = req.getParameter("eventdescription"); LocalDate eventdate = LocalDate.parse(req.getParameter("eventdate")); String eventtime = req.getParameter("eventtime"); double tmissed = Double.valueOf(req.getParameter("timemissed")); String eloc = req.getParameter("eventlocation"); double rcost = Double.valueOf(req.getParameter("reimbursementcost")); String gfor = om.writeValueAsString(req.getParameter("gradeformat")); gradeFormat gformat = om.readValue(gfor, gradeFormat.class); double pgrad = Double.valueOf(req.getParameter("passinggrade")); double ramou = 0; switch (eventtype) { case UCOURSE: ramou = (rcost * .80); break; case SEMINAR: ramou = (rcost * .60); break; case CERTPREP: ramou = (rcost * .75); break; case CERT: ramou = (rcost); break; case TECHTRAINING: ramou = (rcost * .90); break; case OTHER: ramou = (rcost * .30); break; default: ramou = 0; } Boolean preapp = Boolean.valueOf(req.getParameter("preapproval")); Period intervalPeriod = Period.between(submissionDate, eventdate); Boolean urgent = false; if (intervalPeriod.getDays() <= 14) { urgent = true; } Boolean attf = Boolean.valueOf(req.getParameter("attachedfile")); Form f = new Form(e.getEid(), 0, submissionDate, eventtype, eventname, desc, eventdate, eventtime, tmissed, eloc, rcost, gformat, pgrad, ramou, preapp, urgent, formStatus.PENDING, attf, false, false, false, null, null); int fid=fdao.newForm(f); EmployeeController.afterSendForm(req, fid); } catch (JsonParseException ex) { ex.printStackTrace(); } catch (JsonMappingException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } return HomeController.home(req); } public static void getUrgentPending(int eid, HttpServletRequest req, HttpServletResponse res) throws JsonProcessingException, IOException { System.out.println("In getUrgentPending"); try { List<Form> fList = fdao.getUrgentPendingForms(eid); res.getWriter().write(new ObjectMapper().writeValueAsString(fList)); } catch (SQLException e) { e.printStackTrace(); } } public static void getNonUrgentPending(int eid, HttpServletRequest req, HttpServletResponse res) throws JsonProcessingException, IOException { System.out.println("In getNonUrgentPending"); try { List<Form> fList = fdao.getNonUrgentPendingForms(eid); res.getWriter().write(new ObjectMapper().writeValueAsString(fList)); } catch (SQLException e) { e.printStackTrace(); } } public static void getClosed(int eid, HttpServletRequest req, HttpServletResponse res) throws JsonProcessingException, IOException { System.out.println("In getClosed"); try { List<Form> fList = fdao.getClosedForms(eid); res.getWriter().write(new ObjectMapper().writeValueAsString(fList)); } catch (SQLException e) { e.printStackTrace(); } } public static List<Form> getUrgSup(int supid, HttpServletRequest req, HttpServletResponse res) throws SQLException { System.out.println("in geturgsup"); List<Integer> eList = new ArrayList<Integer>(); eList = fdao.getEidFromDSup(supid); List<Form> fList = new ArrayList<Form>(); List<Form> fullList = new ArrayList<Form>(); if (eList != null) { for (Integer e : eList) { fList = fdao.getUrgentPendingForms(e); for(int i=0;i<fList.size();i++) { fullList.add(fList.get(i)); } } } System.out.println("getUrgSup: "+fullList); return fullList; } public static List<Form> getNonUrgSup(int supid, HttpServletRequest req, HttpServletResponse res) throws SQLException { System.out.println("in getnonurgsup"); List<Integer> eList = new ArrayList<Integer>(); eList = fdao.getEidFromDSup(supid); List<Form> fList = new ArrayList<Form>(); List<Form> fullList = new ArrayList<Form>(); if (eList != null) { for (Integer e : eList) { fList = fdao.getNonUrgentPendingForms(e); for(int i=0;i<fList.size();i++) { fullList.add(fList.get(i)); } } } return fullList; } public static List<Form> getClosedSup(int supid, HttpServletRequest req, HttpServletResponse res) throws SQLException { System.out.println("in getclosedsup"); List<Integer> eList = new ArrayList<Integer>(); eList = fdao.getEidFromDSup(supid); List<Form> fList = new ArrayList<Form>(); List<Form> fullList = new ArrayList<Form>(); if (eList != null) { for (Integer e : eList) { fList = fdao.getNonUrgentPendingForms(e); for(int i=0;i<fList.size();i++) { fullList.add(fList.get(i)); } } } return fullList; } public static List<Form> getUrgDH(int dhid, HttpServletRequest req, HttpServletResponse res) throws SQLException { List<Integer> eList = new ArrayList<Integer>(); eList = fdao.getEidFromDH(dhid); List<Form> fList = new ArrayList<Form>(); List<Form> fullList = new ArrayList<Form>(); if (eList != null) { for (Integer e : eList) { fList = fdao.getNonUrgentPendingForms(e); for(int i=0;i<fList.size();i++) { fullList.add(fList.get(i)); } } } return fullList; } public static List<Form> getNonUrgDH(int dhid, HttpServletRequest req, HttpServletResponse res) throws SQLException { List<Integer> eList = new ArrayList<Integer>(); eList = fdao.getEidFromDH(dhid); List<Form> fList = new ArrayList<Form>(); List<Form> fullList = new ArrayList<Form>(); if (eList != null) { for (Integer e : eList) { fList = fdao.getNonUrgentPendingForms(e); for(int i=0;i<fList.size();i++) { fullList.add(fList.get(i)); } } } return fullList; } public static List<Form> getClosedDH(int dhid, HttpServletRequest req, HttpServletResponse res) throws SQLException { List<Integer> eList = new ArrayList<Integer>(); eList = fdao.getEidFromDH(dhid); List<Form> fList = new ArrayList<Form>(); List<Form> fullList = new ArrayList<Form>(); if (eList != null) { for (Integer e : eList) { fList = fdao.getClosedForms(e); for(int i=0;i<fList.size();i++) { fullList.add(fList.get(i)); } } } return fullList; } public static void getAllUrg(HttpServletRequest req, HttpServletResponse res) throws SQLException, JsonProcessingException, IOException { System.out.println("In getAllUrg"); List<Form> fList = fdao.getAllUrgentPendingForms(); res.getWriter().write(new ObjectMapper().writeValueAsString(fList)); } public static void getAllNonUrg(HttpServletRequest req, HttpServletResponse res) throws SQLException, JsonProcessingException, IOException { System.out.println("In getAllNonUrg"); List<Form> fList = fdao.getAllNonUrgentPendingForms(); res.getWriter().write(new ObjectMapper().writeValueAsString(fList)); } public static void getAllClosed(HttpServletRequest req, HttpServletResponse res) throws SQLException, JsonProcessingException, IOException { System.out.println("In getAllClosed"); List<Form> fList = fdao.getAllClosedForms(); res.getWriter().write(new ObjectMapper().writeValueAsString(fList)); } public static Form getFormByEId(int eventid, HttpServletRequest req, HttpServletResponse res) throws SQLException, JsonProcessingException, IOException { Form f = fdao.getFormByEventid(eventid); res.getWriter().write(new ObjectMapper().writeValueAsString(f)); return f; } public static void updateFormStatus(HttpServletRequest req, HttpServletResponse res, int fid) { } }
33.718045
154
0.718475
14555caf46b88b77b044b4a5f3684dba2b402af1
182
ps1
PowerShell
dnxmon/publish.ps1
pnewhook/dnxmon
cf4dfb48f83b38bf256afda91d83c52100cdd03b
[ "Apache-2.0" ]
null
null
null
dnxmon/publish.ps1
pnewhook/dnxmon
cf4dfb48f83b38bf256afda91d83c52100cdd03b
[ "Apache-2.0" ]
null
null
null
dnxmon/publish.ps1
pnewhook/dnxmon
cf4dfb48f83b38bf256afda91d83c52100cdd03b
[ "Apache-2.0" ]
null
null
null
dnu pack --configuration release $latestNupkg = Get-ChildItem -Exclude *symbols* bin\release\*.nupkg | sort-object name -descending | select -First 1 nuget push $latestNupkg.FullName
60.666667
116
0.785714
43d4974ab89ed5bf936e025ad8e488d95c8ad5d0
2,650
swift
Swift
ReadingList_Screenshots/Screenshots.swift
mohsinalimat/ReadingList
bdfc0dd4e6b18614627ace469f800a49c9ae3464
[ "MIT" ]
1
2018-03-27T06:20:23.000Z
2018-03-27T06:20:23.000Z
ReadingList_Screenshots/Screenshots.swift
mohsinalimat/ReadingList
bdfc0dd4e6b18614627ace469f800a49c9ae3464
[ "MIT" ]
null
null
null
ReadingList_Screenshots/Screenshots.swift
mohsinalimat/ReadingList
bdfc0dd4e6b18614627ace469f800a49c9ae3464
[ "MIT" ]
null
null
null
import XCTest class Screenshots: XCTestCase { override func setUp() { super.setUp() continueAfterFailure = false let app = ReadingListApplication() setupSnapshot(app) app.launchArguments.append(contentsOf: ["--UITests_PopulateData", "--UITests_Screenshots", "-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryXL"]) app.launch() sleep(5) app.setBarcodeSimulation(.normal) } func testSnapshot() { // Screenshot is designed for iOS 11 only guard #available(iOS 11.0, *) else { return } let app = ReadingListApplication() app.clickTab(.toRead) let isIpad = app.navigationBars.count == 2 if isIpad { app.tables.cells.element(boundBy: 2).tap() } snapshot("0_ToReadList") app.clickTab(.finished) app.tables.staticTexts["Finished"].swipeUp() app.tables.staticTexts["The Color Purple"].tap() snapshot("1_BookDetails") if !isIpad { // go back app.navigationBars["The Color Purple"].buttons["Finished"].tap() } if isIpad { app.tables.staticTexts["The Great Gatsby"].tap() app.tables.staticTexts["Finished"].swipeDown() } app.navigationBars["Finished"].buttons["Add"].tap() app.sheets["Add New Book"].buttons["Scan Barcode"].tap() snapshot("2_ScanBarcode") app.navigationBars["Scan Barcode"].buttons["Cancel"].tap() app.tabBars.buttons["Finished"].tap() app.tables.element(boundBy: 0).swipeDown() let yourLibrarySearchField = app.searchFields["Your Library"] yourLibrarySearchField.tap() yourLibrarySearchField.typeText("Orwell") app.buttons["Done"].tap() if isIpad { app.tables.staticTexts["1984"].tap() } snapshot("3_SearchFinished") app.buttons["Cancel"].tap() if isIpad { app.tables.cells.element(boundBy: 3).tap() } app.navigationBars["Finished"].buttons["Edit"].tap() app.tables.cells.element(boundBy: 3).tap() app.tables.cells.element(boundBy: 6).tap() app.tables.cells.element(boundBy: 7).tap() snapshot("4_BulkEdit") app.tabBars.buttons["Organise"].tap() app.tables.cells.element(boundBy: 0).tap() if isIpad { app.tables.cells.element(boundBy: 6).tap() } else { app.swipeUp() } snapshot("5_Organise") } }
31.176471
167
0.57283
8ecb9632a3dbf2171d51b46622c321b530f8b72d
1,483
podspec
Ruby
LQTableViewManager.podspec
anonymous-qsh/LQTableViewManager
26ba9febd733d84113a120482108915d7a85d88b
[ "MIT" ]
1
2019-03-26T07:54:48.000Z
2019-03-26T07:54:48.000Z
LQTableViewManager.podspec
anonymous-qsh/LQTableViewManager
26ba9febd733d84113a120482108915d7a85d88b
[ "MIT" ]
null
null
null
LQTableViewManager.podspec
anonymous-qsh/LQTableViewManager
26ba9febd733d84113a120482108915d7a85d88b
[ "MIT" ]
null
null
null
Pod::Spec.new do |s| s.name = 'LQTableViewManager' s.version = '2.1.3' s.authors = { 'Little Queen' => 'anonymous.qsh@gmail.com' } s.homepage = 'https://github.com/anonymous-qsh/LQTableViewManager' s.summary = 'Powerful data driven content manager for UITableView based on RETableViewManager.' s.source = { :git => 'https://github.com/anonymous-qsh/LQTableViewManager.git', :tag => s.version.to_s } s.license = { :type => "MIT", :file => "LICENSE" } s.platform = :ios, '8.0' s.requires_arc = true s.source_files = 'LQTableViewManager/Cells', 'LQTableViewManager/Items', 'LQTableViewManager', 'LQTableViewManager/Controllers', 'LQTableViewManager/Utils', 'LQTableViewManager/Utils/KNActionSheet', 'LQTableViewManager/Views' s.public_header_files = 'LQTableViewManager/Cells/*.h', 'LQTableViewManager/*.h', 'LQTableViewManager/Items/*.h', 'LQTableViewManager/Controllers/*.h', 'LQTableViewManager/Utils/*.h', 'LQTableViewManager/Utils/KNActionSheet/*.h', 'LQTableViewManager/Views/*.h' s.resource_bundle = { 'LQTableViewManager' => 'LQTableViewManager/Resources/*' } s.preserve_paths = 'LQTableViewManager/Resources' s.ios.deployment_target = '8.0' s.dependency 'REFormattedNumberField', '~> 1.1.5' s.dependency 'REValidation', '~> 0.1.4' s.dependency 'Masonry' s.dependency 'BlocksKit' s.dependency 'SDWebImage', '4.4.6' s.dependency 'MBProgressHUD' s.dependency 'LQUIColor', '0.1.0' end
52.964286
262
0.699258
08215e89349b162d391e6e28976c3743c403270d
3,943
asm
Assembly
Appl/Preferences/PrefMgr/prefmgr.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Preferences/PrefMgr/prefmgr.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Preferences/PrefMgr/prefmgr.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: PrefMgr FILE: prefmgr.asm REVISION HISTORY: Name Date Description ---- ---- ----------- cheng 2/90 Initial version DESCRIPTION: This file contains the PrefMgr application $Id: prefmgr.asm,v 1.2 98/02/15 19:24:58 gene Exp $ ------------------------------------------------------------------------------@ ;------------------------------------------------------------------------------ ; Conditional-compilation options ;------------------------------------------------------------------------------ _SIMPLE = 0 ; this is NOT the simple version! PREFMGR = -1 ;------------------------------------------------------------------------------ ; Common GEODE stuff ;------------------------------------------------------------------------------ include stdapp.def include Internal/prodFeatures.def include library.def ; for modules include lmem.def include timer.def include chunkarr.def include assert.def include file.def ; for file routines include fileEnum.def ; for file enum routines include initfile.def include input.def include system.def ; for UtilHex32ToAscii include thread.def include timedate.def include char.def include drive.def include disk.def include vm.def ; for VM tests include localize.def ; for Resources file include medium.def ; for modem stuff include Objects/inputC.def include Internal/im.def include Internal/geodeStr.def ;------------------------------------------------------------------------------ ; Libraries used ;------------------------------------------------------------------------------ UseLib Objects/vTextC.def include Objects/Text/tCtrlC.def UseLib spool.def UseLib Internal/spoolInt.def UseLib spell.def UseLib config.def UseDriver Internal/mouseDr.def UseDriver Internal/serialDr.def UseDriver Internal/parallDr.def UseDriver Internal/printDr.def ;------------------------------------------------------------------------------ ; CONSTANTS ;------------------------------------------------------------------------------ include prefConstant.def include prefmgrConstant.def include prefmgrClass.def include prefmgrMacros.def include prefmgrApplication.def ;------------------------------------------------------------------------------ ; Resources ;------------------------------------------------------------------------------ ; forward-declare VisOpen/VisClose handlers so .rdef will assemble... global VisOpenSerialOptions:far global VisOpenPrinter:far global VisOpenModem:far global VisOpenText:far global TextCloseEditBox:far global VisOpenChooseDictionary:far include prefmgr.rdef ;------------------------------------------------------------------------------ ; Definitions & ForceRef's to avoid spurious warnings ;------------------------------------------------------------------------------ include prefmgrVariable.def include prefVariable.def ;------------------------------------------------------------------------------ ; Code ;------------------------------------------------------------------------------ PrinterAndModemCode segment resource include prefmgrModem.asm include prefmgrPrinter.asm include prefmgrSerial.asm include prefPrinter.asm ; common code PrinterAndModemCode ends CommonCode segment resource include prefmgrText.asm include prefmgrModule.asm include prefmgrModuleList.asm include prefmgrReboot.asm include prefmgrApplication.asm include customSpin.asm include prefmgrDialogGroup.asm include prefmgrTitledSummons.asm include commonUtils.asm include prefmgrDynamic.asm include prefmgrFormats.asm include prefmgrMtdHan.asm include prefmgrUtils.asm include prefmgrInitExit.asm CommonCode ends
27.193103
80
0.517626
c1d5cc21aa22bf60c840a2f93763730912faf8c6
60
asm
Assembly
audio/sfx/snare4_4.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
audio/sfx/snare4_4.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
audio/sfx/snare4_4.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
SFX_Snare4_4_Ch7: unknownnoise0x20 0, 129, 51 endchannel
12
28
0.8
e64906284cebb3d15b2f44a1439bcc660506af72
394
go
Go
controllers/users/users_controller.go
jcarlosjl/bookstore_user-api
61a7fe40b562ea965d4234d8025091ff83585f05
[ "MIT" ]
null
null
null
controllers/users/users_controller.go
jcarlosjl/bookstore_user-api
61a7fe40b562ea965d4234d8025091ff83585f05
[ "MIT" ]
null
null
null
controllers/users/users_controller.go
jcarlosjl/bookstore_user-api
61a7fe40b562ea965d4234d8025091ff83585f05
[ "MIT" ]
null
null
null
package users import ( "net/http" "github.com/gin-gonic/gin" ) //CreateUser method func CreateUser(c *gin.Context) { c.String(http.StatusNotImplemented, "Implement me!") } //GetUser method func GetUser(c *gin.Context) { c.String(http.StatusNotImplemented, "Implement me!") } //SearchUser method func SearchUser(c *gin.Context) { c.String(http.StatusNotImplemented, "Implement me!") }
17.130435
53
0.730964
b1a666ffcaaa374b6b026c651e423d91bef26745
5,817
dart
Dart
lib/view/screens/home/home_screen.dart
Afroz-Shaikh/happify-app
273567f6422756a74274ae724aebdbecd13cdb69
[ "MIT" ]
null
null
null
lib/view/screens/home/home_screen.dart
Afroz-Shaikh/happify-app
273567f6422756a74274ae724aebdbecd13cdb69
[ "MIT" ]
1
2021-10-21T14:33:52.000Z
2021-10-21T14:33:52.000Z
lib/view/screens/home/home_screen.dart
Afroz-Shaikh/happify-app
273567f6422756a74274ae724aebdbecd13cdb69
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:happify_app/controller/question_controller.dart'; import 'package:happify_app/utilities/utilities.dart'; import 'package:happify_app/view/screens/home/profile_screen.dart'; import 'package:happify_app/view/screens/home/status_screen.dart'; import 'package:happify_app/view/screens/pageview/pageview_screen.dart'; import 'package:happify_app/view/widgets/button/custom.button.dart'; import 'package:happify_app/view/widgets/images/custom_image_view.dart'; class HomeScreen extends StatefulWidget { HomeScreen({Key? key}) : super(key: key); @override _HomeScreenState createState() => _HomeScreenState(); } class _HomeScreenState extends State<HomeScreen> { int currentIndex = 0; final screens = [Home(), StatusScreen(), ProfileScreen()]; @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return WillPopScope( onWillPop: () async { setState(() { currentIndex = 0; }); return false; }, child: Scaffold( body: screens[currentIndex], bottomNavigationBar: BottomNavigationBar( currentIndex: currentIndex, backgroundColor: ColorUtilities.blueTextColor, selectedItemColor: Colors.white, unselectedItemColor: Colors.white.withOpacity(.60), selectedFontSize: 14, unselectedFontSize: 14, onTap: (index) { setState(() { currentIndex = index; }); }, items: [ BottomNavigationBarItem( label: "Home", icon: CustomImageView( imageUrl: currentIndex == 0 ? AssetUtilities.homeSelected : AssetUtilities.homeUnselected, isFromAssets: true, height: 16, ), ), BottomNavigationBarItem( label: "Stats", icon: CustomImageView( imageUrl: currentIndex == 1 ? AssetUtilities.statusSelected : AssetUtilities.statusUnselected, isFromAssets: true, height: 16, ), ), BottomNavigationBarItem( label: "Profile", icon: CustomImageView( imageUrl: currentIndex == 2 ? AssetUtilities.profileSelected : AssetUtilities.profileUnselected, isFromAssets: true, height: 16, ), ), ], ), ), ); } } class Home extends StatefulWidget { const Home({Key? key}) : super(key: key); @override _HomeState createState() => _HomeState(); } class _HomeState extends State<Home> { QuestionsController _questionsController = Get.find(tag: QuestionsController().toString()); @override void initState() { _questionsController.getTodayEntry(); super.initState(); } @override Widget build(BuildContext context) { return GetBuilder<QuestionsController>( init: _questionsController, builder: (_) => Padding( padding: EdgeInsets.all(16), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( height: 50, margin: EdgeInsets.symmetric(vertical: 20), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "Happify", textAlign: TextAlign.center, style: FontStyleUtilities.h22( fontColor: ColorUtilities.blueTextColor, fontWeight: FWT.bold), ), // IconButton(onPressed: () {}, icon: Icon(Icons.list_rounded)) ], ), ), Text( "Welcome back!", textAlign: TextAlign.center, style: FontStyleUtilities.h22( fontColor: ColorUtilities.primaryTextColor, fontWeight: FWT.bold, ), ), SizedBox( height: 50, ), Container( padding: EdgeInsets.all(16), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "Answer some Questions & tell us about your day", textAlign: TextAlign.center, style: FontStyleUtilities.h18( fontColor: ColorUtilities.primaryTextColor, fontWeight: FWT.semiBold, ), ), Container( height: 200, child: CustomImageView( imageUrl: AssetUtilities.questionImage)), CustomButton( title: "Get Started", width: 250, onButtonTap: () { Get.to(PageviewScreen()); }) ], ), height: 359, decoration: BoxDecoration( color: ColorUtilities.whiteTextColor, borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( color: ColorUtilities.greyboxColor, blurRadius: 5, spreadRadius: 2) ]), ), ], ), ), ); } }
31.61413
81
0.513323
964b8a105c7ee84194aa4b4aecf45c6dd303bd3e
3,371
php
PHP
application/views/_partial/footer.php
BocahGabut/POS
12ec42054ef666b818e010ea99e04e042223fdc1
[ "MIT" ]
null
null
null
application/views/_partial/footer.php
BocahGabut/POS
12ec42054ef666b818e010ea99e04e042223fdc1
[ "MIT" ]
null
null
null
application/views/_partial/footer.php
BocahGabut/POS
12ec42054ef666b818e010ea99e04e042223fdc1
[ "MIT" ]
null
null
null
<!-- BEGIN: Footer--> <footer class="footer footer-static footer-light navbar-shadow"> <p class="clearfix blue-grey lighten-2 mb-0"><span class="float-md-left d-block d-md-inline-block mt-25">COPYRIGHT &copy; 2019<a class="text-bold-800 grey darken-2" href="https://1.envato.market/pixinvent_portfolio" target="_blank">RESTU,</a>All rights Reserved</span> </p> </footer> <script src="<?php echo base_url(); ?>assets/template/vendors/js/vendors.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/ui/jquery.sticky.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/core/app-menu.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/core/app.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/components.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/customizer.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/footer.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/pages/dashboard-analytics.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/pdfmake.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/vfs_fonts.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/datatables.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/datatables.buttons.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/buttons.html5.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/buttons.print.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/buttons.bootstrap.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/tables/datatable/datatables.bootstrap4.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/datatables/datatable.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/modal/components-modal.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/pickers/dateTime/pick-a-datetime.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/pickers/pickadate/picker.date.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/extensions/toastr.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/extensions/toastr.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/extensions/sweet-alerts.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/extensions/sweetalert2.all.min.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/rupiah.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/live-search.js"></script> <script src="<?php echo base_url(); ?>assets/template/vendors/js/forms/validation/jqBootstrapValidation.js"></script> <script src="<?php echo base_url(); ?>assets/template/js/scripts/forms/validation/form-validation.js"></script> <script> function goBack() { window.history.back() } </script>
76.613636
270
0.731534
ad85cb463ffdca5acaa8ee7ab119bc7fade20d65
6,142
swift
Swift
Sources/Swift/String+Additions.swift
Cemoo/FCExtensionKit
53aaf5e2471d4f0b486c03e7963e8a0e901a09a0
[ "MIT" ]
null
null
null
Sources/Swift/String+Additions.swift
Cemoo/FCExtensionKit
53aaf5e2471d4f0b486c03e7963e8a0e901a09a0
[ "MIT" ]
null
null
null
Sources/Swift/String+Additions.swift
Cemoo/FCExtensionKit
53aaf5e2471d4f0b486c03e7963e8a0e901a09a0
[ "MIT" ]
null
null
null
// // String+Additions.swift // FCExtensionKit // // Created by Fatih Çimen on 20.11.2019. // Copyright © 2019 Fatih Çimen. All rights reserved. // import CommonCrypto import UIKit // MARK: - Date Coverters public extension String { /// Converts date string to remaining time var remainingTime: String? { guard let dateRangeEnd = self.date() else { return nil } let dateRangeStart = Date() let components = Calendar.current.dateComponents([.day, .hour, .minute, .second], from: dateRangeStart, to: dateRangeEnd) if let day = components.day, day > 0 { return "\(day) Gün \(components.hour ?? 00):\(components.minute ?? 00):\(components.second ?? 00)" }else { return "\(components.hour ?? 00):\(components.minute ?? 00):\(components.second ?? 00)" } } /// String Date to Date /// /// - Parameter format: Date Format /// - Returns: Corverted Date func date(format: String? = "yyyy-MM-dd'T'HH:mm:ss") -> Date? { let dateFormatter = DateFormatter() dateFormatter.dateFormat = format dateFormatter.timeZone = TimeZone.current return dateFormatter.date(from: self) } } // MARK: - String Helpers public extension String { static let empty = "" static let newline = "\n" static let whitespace = " " var length: Int { return self.count } /// Trims Whitespaces and Newlines var trimmed: String { return trimmingCharacters(in: .whitespacesAndNewlines) } /// Trims trailing and leading whitespaces var trimmedLeadingAndLeading: String { return self.replacingOccurrences(of: "(^\\s+)|(\\s+)$", with: "", options: .regularExpression) } /// Converts String to NSString var ns: NSString { return self as NSString } var floatValue: Float { return ns.floatValue } var integerValue: Int { return ns.integerValue } var nib: UINib { return UINib(nibName: self, bundle: .main) } /// A Boolean value indicating whether the collection is not empty. var isNotEmpty: Bool { return length > 0 } /// Converts formatted double var toDouble: Double { let formatter = NumberFormatter() formatter.decimalSeparator = "," let grade = formatter.number(from: self) guard let doubleGrade = grade?.doubleValue else { return 0.0 } return doubleGrade } /// Init with optional character /// - Parameter c: Optinal Character init?(_ c: Character?) { guard let c = c else { return nil } self.init(c) } } // MARK: - Crypto public extension String { var sha1: String? { guard let data = self.data(using: .utf8) else { return nil } var hash: [UInt8] = [UInt8](repeating: 0, count: Int(CC_SHA1_DIGEST_LENGTH)) let baseAddress = data.withUnsafeBytes { return $0.baseAddress } CC_SHA1(baseAddress, CC_LONG(data.count), &hash) return hash.map { String(format: "%02x", $0) }.joined() } } // MARK: - HTML public extension String { /// Converts HTML to NSMutableAttributedString var html2AttributedString: NSMutableAttributedString? { let options: [NSAttributedString.DocumentReadingOptionKey: Any] = [.documentType: NSAttributedString.DocumentType.html, .characterEncoding: String.Encoding.utf8.rawValue] guard let data = data(using: .utf8), let attributedString = try? NSMutableAttributedString(data: data, options: options, documentAttributes: nil) else { return nil } let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = .left paragraphStyle.lineBreakMode = .byWordWrapping attributedString.addAttribute(.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attributedString.length)) return attributedString } } // MARK: - URL Helpers public extension String { private static let charSet = CharacterSet(charactersIn: "!*'();:@&=+$,/?%#[]^ ").inverted /// Encodes URL var urlEncoded: String? { let allowedCharacterSet = String.charSet return self.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) } /// Decodes URL Spaces var urlDecoded: String? { return self.replacingOccurrences(of: "+", with: " ").removingPercentEncoding } /// String to URL var url: URL? { if let url = URL(string: self) { return url } var set = CharacterSet() set.formUnion(.urlHostAllowed) set.formUnion(.urlPathAllowed) set.formUnion(.urlQueryAllowed) set.formUnion(.urlFragmentAllowed) return self.addingPercentEncoding(withAllowedCharacters: set).flatMap { URL(string: $0) } } } // MARK: - Label public extension String { /// Returns label's height /// /// - Parameters: /// - width: Label's width /// - font: Used font /// - numberOfLines: Number of lines /// - lineBreakMode: Line break mode /// - Returns: Height func getLabelHeight(width: CGFloat, font: UIFont, numberOfLines: Int = 0, lineBreakMode: NSLineBreakMode = .byWordWrapping) -> CGFloat { let label = UILabel(frame: .zero) label.width = width label.numberOfLines = numberOfLines label.lineBreakMode = lineBreakMode label.font = font label.text = self label.sizeToFit() return label.height } }
30.71
129
0.571801
d01b465cc7dbc6f4c328b79b411bf4234ce25dea
429
rb
Ruby
lib/rest-more.rb
godfat/rest-more
3eb2b834f6c6c513e9dc488bd866c931a67aafd2
[ "Apache-2.0" ]
14
2015-01-13T11:54:24.000Z
2019-06-12T20:10:59.000Z
lib/rest-more.rb
godfat/rest-more
3eb2b834f6c6c513e9dc488bd866c931a67aafd2
[ "Apache-2.0" ]
1
2015-02-21T21:31:20.000Z
2015-02-22T11:48:45.000Z
lib/rest-more.rb
godfat/rest-more
3eb2b834f6c6c513e9dc488bd866c931a67aafd2
[ "Apache-2.0" ]
6
2015-02-20T17:25:39.000Z
2018-08-15T16:36:22.000Z
require 'rest-core' module RestCore autoload :Dropbox , 'rest-core/client/dropbox' autoload :Facebook , 'rest-core/client/facebook' autoload :Github , 'rest-core/client/github' autoload :Instagram , 'rest-core/client/instagram' autoload :Linkedin , 'rest-core/client/linkedin' autoload :StackExchange, 'rest-core/client/stackexchange' autoload :Twitter , 'rest-core/client/twitter' end
33
59
0.703963
2ef392903e25f481c191e51063efa8baae9be0a7
155
sql
SQL
www/administrator/components/com_sppagebuilder/sql/updates/mysql/3.3-2018-06-28.sql
project-sunbird/sunbird-cms-website
bf55108c72040e63700e9df29bc7116fbde24496
[ "MIT" ]
null
null
null
www/administrator/components/com_sppagebuilder/sql/updates/mysql/3.3-2018-06-28.sql
project-sunbird/sunbird-cms-website
bf55108c72040e63700e9df29bc7116fbde24496
[ "MIT" ]
1
2022-02-10T21:24:17.000Z
2022-02-10T21:24:17.000Z
www/administrator/components/com_sppagebuilder/sql/updates/mysql/3.3-2018-06-28.sql
project-sunbird/sunbird-cms-website
bf55108c72040e63700e9df29bc7116fbde24496
[ "MIT" ]
2
2020-03-05T09:24:37.000Z
2021-02-19T04:19:37.000Z
ALTER TABLE `#__sppagebuilder` ADD `attribs` varchar(5120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '[]' AFTER `checked_out_time`;
155
155
0.806452
90c360f1f9de7372f63bd4be872c6b44a814289d
1,019
py
Python
versionfield/forms.py
willseward/django-versionfield3
4ae365fb42f38a02c77d317cba3fef22806f2b24
[ "Unlicense" ]
null
null
null
versionfield/forms.py
willseward/django-versionfield3
4ae365fb42f38a02c77d317cba3fef22806f2b24
[ "Unlicense" ]
null
null
null
versionfield/forms.py
willseward/django-versionfield3
4ae365fb42f38a02c77d317cba3fef22806f2b24
[ "Unlicense" ]
null
null
null
from builtins import str from django import forms from django.forms.widgets import TextInput from .version import Version from .constants import DEFAULT_NUMBER_BITS from .utils import convert_version_int_to_string class VersionField(forms.IntegerField): widget = TextInput def __init__(self, number_bits=DEFAULT_NUMBER_BITS, **kwargs): self.number_bits = number_bits return super(VersionField, self).__init__(**kwargs) def to_python(self, value): """ Verifies that value can be converted to a Version object """ if not value: return None if isinstance(value, str): return int(Version(value, self.number_bits)) return Version(convert_version_int_to_string(value, self.number_bits), self.number_bits) def widget_attrs(self, widget): attrs = super(VersionField, self).widget_attrs(widget) attrs['pattern'] = '^' + (r'(\d+\.)?' * (len(self.number_bits) - 1)) + r'(\*|\d+)$' return attrs
30.878788
96
0.675172
53af2af2e7fbc5ba94ae131cda65bb4c06de4981
6,959
java
Java
trader-common-services/src/main/java/trader/service/stats/StatsItemAggregationEntry.java
internetbroker/java-trader
86e943088a07d95fe5cfdc8e8543ec138bd45bd8
[ "Apache-2.0" ]
68
2018-11-21T07:11:51.000Z
2022-03-28T02:19:11.000Z
trader-common-services/src/main/java/trader/service/stats/StatsItemAggregationEntry.java
internetbroker/java-trader
86e943088a07d95fe5cfdc8e8543ec138bd45bd8
[ "Apache-2.0" ]
7
2018-12-24T11:49:24.000Z
2021-08-15T05:37:55.000Z
trader-common-services/src/main/java/trader/service/stats/StatsItemAggregationEntry.java
internetbroker/java-trader
86e943088a07d95fe5cfdc8e8543ec138bd45bd8
[ "Apache-2.0" ]
42
2018-11-21T07:14:18.000Z
2021-12-22T11:30:59.000Z
package trader.service.stats; import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; import java.time.Instant; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 采样数据的归并类 */ public class StatsItemAggregationEntry implements StatsItemAggregation { private static final Logger logger = LoggerFactory.getLogger(StatsItemAggregationEntry.class); private static final MathContext VALUE_CONTEXT = new MathContext(2, RoundingMode.HALF_UP); /** * 最长采样数据保存时间: 1 hour */ private static final int MAX_KEEP_SAMPLE_VALUE_SECONDS = 3600; private StatsItem item; private long adjustFactor; private long lastAggregateTime; /** * 根据顺序排列的采样数据列表 */ private LinkedList<SampleValueEntry> sampleValues = new LinkedList<>(); private Map<String, Object> aggregatedValues = new HashMap<>();; public static class SampleValueEntry { /** * 采样时间 */ long sampleTime; /** * 原始值 */ double sampleValue; /** * 修正值: 只对可重新启动的累积值生效 */ double adjustedSampleValue; SampleValueEntry(long sampleTime, double sampleValue, double adjustedSampleValue) { this.sampleTime = sampleTime; this.sampleValue = sampleValue; this.adjustedSampleValue = adjustedSampleValue; } SampleValueEntry(long sampleTime, double sampleValue) { this(sampleTime, sampleValue, sampleValue); } /** * 采样时间(秒) */ public long getTime() { return sampleTime; } /** * 调整后采样值 */ public double getValue() { return adjustedSampleValue; } } public StatsItemAggregationEntry(StatsItem item) { this.item = item; } @Override public StatsItem getItem() { return item; } @Override public long getLastAggregateTime() { return lastAggregateTime; } @Override public synchronized long getLastSampleTime() { if ( sampleValues.isEmpty()) { return 0; } return sampleValues.getLast().getTime(); } @Override public Map<String, Object> getAggregatedValues() { return aggregatedValues; } public synchronized void aggregate(long sampleTime, double sampleValue) { preprocessSampleValue(sampleTime, sampleValue); //删除过期数据 while(!sampleValues.isEmpty()) { SampleValueEntry first = sampleValues.peek(); if ( (sampleTime - first.sampleTime)>MAX_KEEP_SAMPLE_VALUE_SECONDS ) { sampleValues.poll(); }else { break; } } //重新计算 if ( item.getType()==StatsItemType.Cumulative ) { aggregateCumulativeValues(); }else { aggregateInstantValues(); } lastAggregateTime = Instant.now().getEpochSecond(); } private void preprocessSampleValue(long sampleTime, double sampleValue) { if ( item.getType()==StatsItemType.Cumulative && item.isCumulativeOnRestart()) { SampleValueEntry lastValue = sampleValues.peekLast(); long sampleLong = (long)sampleValue; if ( lastValue!=null && sampleLong>0 && (long)lastValue.getValue() > (sampleLong+adjustFactor) ) { long prevFactor = adjustFactor; adjustFactor += sampleLong; logger.info("Stats item "+item.getKey()+" changed adjust factor to : "+adjustFactor+", prev: "+prevFactor+", added: "+sampleLong); } sampleValues.offer(new SampleValueEntry(sampleTime, sampleValue, (adjustFactor+sampleValue))); }else { sampleValues.offer(new SampleValueEntry(sampleTime, sampleValue)); } } /** * 计算即时数据 */ private void aggregateInstantValues() { SampleValueEntry lastEntry = sampleValues.peekLast(); if ( lastEntry==null ) { return; } aggregatedValues.put(KEY_LAST_5_MINUTE_AVG_VALUE, getInstantAvgValue(sampleValues, 5)); aggregatedValues.put(KEY_LAST_15_MINUTE_AVG_VALUE, getInstantAvgValue(sampleValues, 15)); aggregatedValues.put(KEY_LAST_60_MINUTE_AVG_VALUE, getInstantAvgValue(sampleValues, 60)); aggregatedValues.put(KEY_LAST_VALUE, lastEntry.getValue()); } /** * 计算累积数据 */ private void aggregateCumulativeValues() { SampleValueEntry lastEntry = sampleValues.peekLast(); if ( lastEntry==null ) { return; } aggregatedValues.put(KEY_LAST_5_MINUTE_AVG_VALUE, getCumulativeAvgValuePerMinute(sampleValues, 5)); aggregatedValues.put(KEY_LAST_15_MINUTE_AVG_VALUE, getCumulativeAvgValuePerMinute(sampleValues, 15)); aggregatedValues.put(KEY_LAST_60_MINUTE_AVG_VALUE, getCumulativeAvgValuePerMinute(sampleValues, 60)); aggregatedValues.put(KEY_LAST_VALUE, lastEntry.getValue()); } /** * 计算方式: 统计区间内的数据, 计算平均数 */ private double getInstantAvgValue(LinkedList<SampleValueEntry> values, int averageMinutes) { double tv = 0; int tc = 0; SampleValueEntry lastEntry=null; for( Iterator<SampleValueEntry> it=values.descendingIterator(); it.hasNext(); ) { SampleValueEntry entry = it.next(); if( lastEntry==null ) { lastEntry = entry; } if ( (lastEntry.getTime()-entry.getTime())>averageMinutes*60 ) { break; } tv += entry.getValue(); tc++; } BigDecimal v = new BigDecimal(tv, VALUE_CONTEXT); BigDecimal av = v.divide(new BigDecimal(tc), RoundingMode.HALF_UP); return av.doubleValue(); } /** * 计算方式: 区间内开始结束两个数据, 计算差值的分钟平均. */ private double getCumulativeAvgValuePerMinute(LinkedList<SampleValueEntry> values, int maxMinutes) { SampleValueEntry lastEntry = values.peekLast(); SampleValueEntry firstEntry = lastEntry; for( Iterator<SampleValueEntry> it=values.descendingIterator(); it.hasNext(); ) { //从后向前逆序 SampleValueEntry entry = it.next(); if ( (lastEntry.getTime()-entry.getTime())>maxMinutes*60 ) { break; } firstEntry = entry; } BigDecimal v = new BigDecimal((lastEntry.getValue()-firstEntry.getValue()), VALUE_CONTEXT); long minutes = ((lastEntry.getTime()-firstEntry.getTime())+30) / 60; if ( minutes<=0 ) { minutes = 1; } BigDecimal av = v.divide(new BigDecimal(minutes), RoundingMode.HALF_UP); return av.doubleValue(); } }
30.52193
146
0.613738
8754744c6ff04edd886ff30fb1bba644439a2efe
1,241
html
HTML
src/applications/blog/templates/blog/blog.html
KatsiarynaPr/Project_KPI
a4f96970d7fd0bd533773c38e04bae9d28072620
[ "MIT" ]
null
null
null
src/applications/blog/templates/blog/blog.html
KatsiarynaPr/Project_KPI
a4f96970d7fd0bd533773c38e04bae9d28072620
[ "MIT" ]
5
2021-04-06T18:31:32.000Z
2021-06-09T18:31:40.000Z
src/applications/blog/templates/blog/blog.html
KatsiarynaPr/Project_KPI
a4f96970d7fd0bd533773c38e04bae9d28072620
[ "MIT" ]
null
null
null
{% extends "_base.html" %} {% load static %} {% block main %} {% if not user.is_anonymous %} <script src="{% static 'blog/scripts/blog.js' %}"></script> {% endif %} {{ob}} <h1>All posts</h1> {% if not user.is_anonymous %} <form method="post" action="/b/new/"> {% csrf_token %} <p> <label for="id_title">Title</label> <input id="id_title" type="text" name="title"> </p> <p> <label for="id_content">Content</label> <textarea id="id_title" name="content"></textarea> </p> <button type="submit">Create Post</button> </form> {% endif %} {% if user.is_superuser %} <p> <form action="/b/wipe/" method="post"> {% csrf_token %} <button id="wipe_id" type="submit">Reset Post</button> </form> </p> {% endif %} {% for post in object_list %} <article> <h2>{{ post.title }}</h2> <p>{{ post.content }}</p> <p>{{ post.created_at }}</p> <span class="likes liked" onclick="like(this, {{ post.pk }});">{{ post.nr_likes }}</span> <p> {{ post.author.username }} </p> <p> {{ post.author.email }} </p> <p> <form action="post/{{ post.pk }}/" method="get"> {% csrf_token %} <button id="post_id" type="submit">Read Post</button> </p> </form> </article> {% endfor %} {% endblock %}
23.865385
91
0.571313
0e5c5a765cea84ab2338def2093e4ff6d2eaf88f
4,656
html
HTML
com/radityalabs/Python/origin/movie/18992.html
radityagumay/BenchmarkSentimentAnalysis_2
e509a4e749271da701ce9da1d9f16cdd78dcdf40
[ "Apache-2.0" ]
3
2017-06-08T01:17:55.000Z
2019-06-02T10:52:36.000Z
com/radityalabs/Python/origin/movie/18992.html
radityagumay/BenchmarkSentimentAnalysis_2
e509a4e749271da701ce9da1d9f16cdd78dcdf40
[ "Apache-2.0" ]
null
null
null
com/radityalabs/Python/origin/movie/18992.html
radityagumay/BenchmarkSentimentAnalysis_2
e509a4e749271da701ce9da1d9f16cdd78dcdf40
[ "Apache-2.0" ]
null
null
null
<HTML><HEAD> <TITLE>Review for Clockwatchers (1997)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0118866">Clockwatchers (1997)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Cheng-Jih+Chen">Cheng-Jih Chen</A></H3><HR WIDTH="40%" SIZE="4"> <P> Recently, about 2PM, I had this choice: I could continue watching the Yankee game -- it was about the 4th inning, the Yankees had scored a couple of runs, Cone was pitching well, but I wasn't paying that much attention -- or I could also see a movie.</P> <P>I was thinking of seeing "Deep Impact", mainly to see the big tidal wave (I had noted the wave didn't seem to go much past, say, Fulton Street, so I thought the Upper West Side would remain dry, but, really, I had to confirm this), but with mixed reviews, I wasn't sure if I was up to seeing a couple hours of people being reconciled with their family members and working out various personal issues before the comet hits.</P> <P>[I actually am not sure how the movie ends, if the big comet hits or not. I think it'd be funny if it didn't hit, but no one told the folks living in the big cave. The could emerge two years later to find a Walmart next to the entrance. Laughter would ensue.]</P> <P>So, skipping over "Deep Impact", I sat down down and watched "Clockwatchers", one of those low-budget indies (it has to be since Parker Posey is in it; before I'd use Steve Buscemi as the litmus test appears, but now that he's appeared in the other big comet/meteor movie, "Armageddon", this assay method is now in doubt). This is a neat film, very fun, especially in the first hour or so. Basically, it's the story of four 20-something temps working in a depressing office.</P> <P>The central character is Iris starts off the movie as a shy observer, watching her fellow temps go about trying to kill time, meet men, etc. In many cases, they're just going through life's motions: one of them is getting married to someone who apparently just gives her expensive gifts, a second claims to be an actress, though nothing apparently comes from her auditions, and the third is there trying to get a permanent job. This third one, played by Parker Posey, verbalizes the existential doubts they all seem to have: as a temp, they can vanish and no one would notice or care. Her quest for a permanent job, or at very least a recommendation, is her desire to leave a mark in the world.</P> <P>Things take a darker turn when the job she'd been gunning for, executive assistant, is given to a mousy new hire. At the same time, someone starts stealing things from the office -- paperweights, books, the personal effects people have to decorate their cubicles, a very special ball of rubberbands -- and suspicion falls automatically on the temps. As pressure mounts on them, as they're put under more careful scrutiny, the work friendships they had formed shows cracks.</P> <P>I don't find the film to be, say, a critique of the modern American workplace, though it shows a lot of the absurd little things that happen in offices. It's not Dilbert. Rather, the idea of people existing in a void, unconnected in any meaningful way and going through the motions of life, is its main theme, and the vagaries and darknesses of the modern American workplace is simply the most opportune setting for this existential limbo. The office is where people look for deep connections in this significant social space and fail to find it; for this film the particulars of unconnectedness are distilled into these temps.</P> <P>Anyway, "Clockwatchers" is a good movie, very funny in parts. Currently, it's on one of the cable movie channels this month.</P> <P>Later, I turned on CNN, and notice that the Yankees had won. I suppose it was a good game.</P> <HR><P CLASS=flush><SMALL>The review above was posted to the <A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR> The Internet Movie Database accepts no responsibility for the contents of the review and has no editorial control. Unless stated otherwise, the copyright belongs to the author.<BR> Please direct comments/criticisms of the review to relevant newsgroups.<BR> Broken URLs inthe reviews are the responsibility of the author.<BR> The formatting of the review is likely to differ from the original due to ASCII to HTML conversion. </SMALL></P> <P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P> </P></BODY></HTML>
59.692308
203
0.763531
8a1aeccba2115dc024e6527068f14b57f16eb887
4,000
rs
Rust
src/nonparametric/point_process/dirichlet_process/pitman_yor_process/gibbs_sampler.rs
OpenSciDK/probability-rs
921d3d358a2a719d7a0ddf521e5fc1c7782d7d88
[ "Apache-2.0" ]
1
2021-03-14T10:15:29.000Z
2021-03-14T10:15:29.000Z
src/nonparametric/point_process/dirichlet_process/pitman_yor_process/gibbs_sampler.rs
OpenSciDK/probability-rs
921d3d358a2a719d7a0ddf521e5fc1c7782d7d88
[ "Apache-2.0" ]
42
2021-11-01T13:50:57.000Z
2022-03-22T05:26:46.000Z
src/nonparametric/point_process/dirichlet_process/pitman_yor_process/gibbs_sampler.rs
OpenSciDK/probability-rs
921d3d358a2a719d7a0ddf521e5fc1c7782d7d88
[ "Apache-2.0" ]
null
null
null
use std::collections::HashSet; use crate::*; use crate::{nonparametric::*, Distribution}; use rand::prelude::*; use rayon::prelude::*; /// # Pitman-Yor process pub struct PitmanYorGibbsSampler<'a, L, T, U, G0> where L: Distribution<Value = T, Condition = U>, T: RandomVariable, U: RandomVariable, G0: Distribution<Value = U, Condition = ()>, { base: &'a PitmanYorProcessParams<G0, U>, switch: &'a ClusterSwitch<U>, x: &'a [T], likelihood: &'a L, } impl<'a, L, T, U, G0> PitmanYorGibbsSampler<'a, L, T, U, G0> where L: Distribution<Value = T, Condition = U>, T: RandomVariable, U: RandomVariable, G0: Distribution<Value = U, Condition = ()>, { pub fn new( base: &'a PitmanYorProcessParams<G0, U>, s: &'a ClusterSwitch<U>, value: &'a [T], likelihood: &'a L, ) -> Self { Self { base, switch: s, x: value, likelihood, } } fn sample_s( &self, x: &T, new_theta: &U, switch: &ClusterSwitch<U>, rng: &mut dyn RngCore, ) -> Result<PitmanYorGibbsSample, DistributionError> { let likelihood_condition = |s: &PitmanYorGibbsSample| { Ok(match *s { PitmanYorGibbsSample::Existing(k) => SwitchedParams::Key(k), PitmanYorGibbsSample::New => SwitchedParams::Direct(new_theta.clone()), }) }; let likelihood = self .likelihood .switch(switch.theta()) .condition(likelihood_condition); let prior_condition = |_: &()| { Ok(PitmanYorGibbsParams::new( self.base, switch.s_inv(), switch.s().len(), )) }; let prior = PitmanYorGibbs::new().condition(prior_condition); let posterior = DiscretePosterior::new( likelihood, prior, switch .s_inv() .par_iter() .map(|(&si, _)| PitmanYorGibbsSample::Existing(si)) .chain(rayon::iter::once(PitmanYorGibbsSample::New)) .collect::<HashSet<PitmanYorGibbsSample>>(), ); posterior.sample(x, rng) } fn sample_theta( &self, x_in_k: &Vec<T>, proposal: &impl Distribution<Value = U, Condition = U>, ) -> Result<U, DistributionError> { let x_likelihood = vec![self.likelihood.clone(); x_in_k.len()] .into_iter() .only_value_joint(); let mh_sampler = MetropolisHastingsSampler::new(x_in_k, &x_likelihood, &self.base.g0.distr, proposal); let mut rng = thread_rng(); mh_sampler.sample(4, self.base.g0.distr.sample(&(), &mut rng)?, &mut rng) } pub fn step_sample( &self, proposal: &impl Distribution<Value = U, Condition = U>, rng: &mut dyn RngCore, ) -> Result<ClusterSwitch<U>, DistributionError> { let n = self.switch.s().len(); let mut ret = self.switch.clone(); for remove_index in 0..n { let new_theta = self.base.g0.distr.sample(&(), rng)?; ret.remove(remove_index); let sampled = self.sample_s(&self.x[remove_index], &new_theta, &ret, rng)?; let si = ret.set_s(remove_index, sampled); if !ret.theta().contains_key(&si) { ret.theta_mut().insert(si, new_theta); } } *ret.theta_mut() = ret .s_inv() .par_iter() .map(|(&k, indice)| -> Result<_, DistributionError> { let x_in_k = indice .par_iter() .map(|&i| self.x[i].clone()) .collect::<Vec<_>>(); let theta_k = self.sample_theta(&x_in_k, proposal)?; Ok((k, theta_k)) }) .collect::<Result<_, _>>()?; Ok(ret) } }
28.368794
97
0.515
2d8d2725141ea33b1aeb9c40ca025c8b34a62d6b
4,396
html
HTML
docs/case-studies/index.html
containscafeine/telepresence
261c73a00947e5be18d1ba5b6597474f920338d0
[ "Apache-2.0" ]
null
null
null
docs/case-studies/index.html
containscafeine/telepresence
261c73a00947e5be18d1ba5b6597474f920338d0
[ "Apache-2.0" ]
null
null
null
docs/case-studies/index.html
containscafeine/telepresence
261c73a00947e5be18d1ba5b6597474f920338d0
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Case Studies - Telepresence</title> <meta name="description" content="Telepresence: a local development environment for a remote Kubernetes cluster"> <meta name="keywords" content="Telepresence, Kubernetes, microservices"> <meta name="author" content="Datawire.io"> <link rel="shortcut icon" href="/favicon.ico"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,900" type="text/css" media="all" /> <link rel="stylesheet" href="/styles/home.css"> <!--[if lte IE 8]> <script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2-legacy.js"></script> <![endif]--> <script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js"></script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KMVFH7G');</script> <!-- End Google Tag Manager --> </head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KMVFH7G" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <header class="white-bg"> <a class="datawire-link" target="_blank" href="https://www.datawire.io"> <img alt="Datawire" src="/images/datawire-logo.svg"> </a> <ul class="main-navigation"> <li> <a href="/">Home</a> </li> <li> <a href="/tutorials/docker">Get Started</a> </li> <li> <a href="/discussion/overview">Docs</a> </li> <li> <a href="/case-studies">Case Studies</a> </li> <li> <a target="_blank" href="https://github.com/datawire/telepresence">GitHub</a> </li> <li> <a target="_blank" href="https://gitter.im/datawire/telepresence">Need Help?</a> </li> </ul> </header> <div class="bg-white page-title"> <div class="container"> <h1>Telepresence Case Studies</h1> </div> </div> <div class="case-studies-bg bg-gray padding-bottom-75"> <div class="container"> <div class="case-studies"> <a class="case-study" href="/case-studies/verloop"> <div> <img src="https://www.datawire.io/wp-content/uploads/2018/03/verloop-logo.png"> </div> <span class="case-study-btn">View Case Study</span> </a> <a class="case-study" href="/case-studies/sight-machine"> <div> <img src="https://www.datawire.io/wp-content/uploads/2018/03/logo_sight_machine-300x206.png"> </div> <span class="case-study-btn">View Case Study</span> </a> <a class="case-study" href="https://datawire.com/contact"> <div> <p>Have a Telepresence story to share?</p> </div> <span class="case-study-btn">Contact Us</span> </a> </div> </div> </div> <footer class="white-bg"> <ul class="main-navigation flex-center"> <li> <a href="/">Home</a> </li> <li> <a href="/tutorials/kubernetes">Get Started</a> </li> <li> <a href="/discussion/overview">Docs</a> </li> <li> <a href="/case-studies">Case Studies</a> </li> <li> <a target="_blank" href="https://github.com/datawire/telepresence">GitHub</a> </li> <li> <a target="_blank" href="https://gitter.im/datawire/telepresence">Need Help?</a> </li> </ul> </footer> <script async defer src="https://buttons.github.io/buttons.js"></script> <script src="/js/jquery-3.2.1.min.js"></script> </body> </html>
36.941176
117
0.560965
9254ce87862101a05b296b345a97952af46cb10c
311
swift
Swift
Ranges.playground/Contents.swift
Sajjon/Playgrounds
42484b2f791107f01d8c0237c8184efd11254fbc
[ "Apache-2.0" ]
null
null
null
Ranges.playground/Contents.swift
Sajjon/Playgrounds
42484b2f791107f01d8c0237c8184efd11254fbc
[ "Apache-2.0" ]
null
null
null
Ranges.playground/Contents.swift
Sajjon/Playgrounds
42484b2f791107f01d8c0237c8184efd11254fbc
[ "Apache-2.0" ]
null
null
null
//: Playground - noun: a place where people can play import UIKit var str = "Hello, playground" let range: Range<Double> = Range(0.0..<10.0) let min = range.lowerBound let max = range.upperBound let slider = UISlider() print(slider.value) print(slider.maximumValue) slider.value = 237 print(slider.value)
17.277778
52
0.729904
c65f4d08827a3c3374ca34b93d5e9f9354254857
635
rb
Ruby
app/graphql/types/contact_type.rb
JamesAndresCM/jwt-graphql
7438d0825a72fd1e228ddf00eb36fbb21ea037aa
[ "MIT" ]
null
null
null
app/graphql/types/contact_type.rb
JamesAndresCM/jwt-graphql
7438d0825a72fd1e228ddf00eb36fbb21ea037aa
[ "MIT" ]
20
2020-05-22T16:46:07.000Z
2022-03-31T00:35:12.000Z
app/graphql/types/contact_type.rb
JamesAndresCM/jwt-graphql
7438d0825a72fd1e228ddf00eb36fbb21ea037aa
[ "MIT" ]
null
null
null
# frozen_string_literal: true module Types class ContactType < BaseObject field :id, ID, null: false field :account_id, ID, null: false, camelize: false field :email, String, null: true field :phone, String, null: true field :identifier, String, null: true field :name, String, null: true field :contact_type, Int, null: true, camelize: false field :created_at_at, DateTimeType, null: false, camelize: false field :last_sent_survey, DateTimeType, null: true, camelize: false field :guides, [Types::DispatchGuideType], null: false field :account, Types::AccountType, null: false end end
35.277778
70
0.710236
d27f30d9efb34adbedfbcaca1d6fd2d50337320b
333
php
PHP
resources/views/posts/index.blade.php
KamauAdrian/projectD
d127c7c5419fb56b92bc15f31949e16f2bd27108
[ "MIT" ]
null
null
null
resources/views/posts/index.blade.php
KamauAdrian/projectD
d127c7c5419fb56b92bc15f31949e16f2bd27108
[ "MIT" ]
null
null
null
resources/views/posts/index.blade.php
KamauAdrian/projectD
d127c7c5419fb56b92bc15f31949e16f2bd27108
[ "MIT" ]
null
null
null
@extends('layouts.master') @include('layouts.nav') @section('content') <center> <b><h2>Index page</h2></b> </center> <a href="{{route('create posts')}}"> <button class="btn btn-info btn-lg">New Post</button> </a> @foreach($posts as $post) @include('posts.post') @endforeach @endsection
25.615385
61
0.57958
6ef0c0adc26d8d326531dc4a85423e5c97c6b106
1,491
dart
Dart
lib/flutter_plugin_tts.dart
XYliang/Flutter_plugin_tts
af09c78aabf6e36a71703da69faffe27860621ac
[ "MIT" ]
13
2019-05-16T12:07:25.000Z
2020-07-27T03:47:44.000Z
lib/flutter_plugin_tts.dart
XYliang/Flutter_plugin_tts
af09c78aabf6e36a71703da69faffe27860621ac
[ "MIT" ]
5
2019-07-21T07:16:43.000Z
2020-06-13T02:34:07.000Z
lib/flutter_plugin_tts.dart
XYliang/Flutter_plugin_tts
af09c78aabf6e36a71703da69faffe27860621ac
[ "MIT" ]
5
2019-07-08T07:25:13.000Z
2020-10-22T03:48:59.000Z
import 'dart:async'; import 'package:flutter/services.dart'; class FlutterPluginTts { static const MethodChannel _channel = const MethodChannel('flutter_plugin_tts'); static Future<String> get platformVersion async { final String version = await _channel.invokeMethod('getPlatformVersion'); return version; } static Future<bool> isLanguageAvailable (String language) async { final bool languageAvailable = await _channel.invokeMethod('isLanguageAvailable', <String, Object>{ 'language': language}); return languageAvailable; } static Future<bool> setLanguage (String language) async { final bool isSet = await _channel.invokeMethod('setLanguage', <String, Object>{ 'language': language}); return isSet; } static Future<List<String>> getAvailableLanguages () => _channel.invokeMethod('getAvailableLanguages').then((result) => result.cast<String>()); static void speak (String text) => _channel.invokeMethod('speak', <String, Object>{ 'text': text}); // Only iOS Platform static void speakWithDuration (double interval) => _channel.invokeMethod('speakWithDuration', <String, Object>{ 'duration' : interval }); static void stop() async { _channel.invokeMethod('stop'); } static void shutdown() async { _channel.invokeMethod('shutdown'); } static void setSpeechRate(double rate) async { _channel.invokeMethod('setSpeechRate', <String, Object>{ 'rate': rate.toString() }); } }
29.82
145
0.707579
995d04c25c7aee1d5af66e72cd150f07f94c5104
760
c
C
cards.c
karagenit/euchre
41985dd49862650fed439f303d516338ea127c77
[ "MIT" ]
null
null
null
cards.c
karagenit/euchre
41985dd49862650fed439f303d516338ea127c77
[ "MIT" ]
null
null
null
cards.c
karagenit/euchre
41985dd49862650fed439f303d516338ea127c77
[ "MIT" ]
null
null
null
#include "cards.h" /* This is basically a singleton container * of all of the possible cards. Things like "hands" * can simply be an array of 5 ints which point to the * index in this array for that card, so we don't have * to malloc new Card structs every time. Also makes * comparing cards easier. */ Card cards[CARDS] = { {1, 1}, // 0 {1, 2}, // 1 {1, 3}, // 2 {1, 4}, // 3 {1, 5}, // 4 {1, 7}, // 5 {1, 8}, // 6 {2, 3}, // 7 {2, 4}, // 8 {2, 5}, // 9 {2, 7}, // 10 {2, 8}, // 11 {3, 3}, // 12 {3, 4}, // 13 {3, 5}, // 14 {3, 6}, // 15 {3, 7}, // 16 {3, 8}, // 17 {4, 3}, // 18 {4, 4}, // 19 {4, 5}, // 20 {4, 6}, // 21 {4, 7}, // 22 {4, 8}, // 23 };
19.487179
54
0.426316
6b048ee7c1c07414c9e05d6e00dd4910bfe3cc4e
294
swift
Swift
AnimalFriends/AnimalFriendsApp.swift
chunyayang/animal-friends
beba8b3ccc6c67d89bda4983533fcd6a357c2f7e
[ "MIT" ]
null
null
null
AnimalFriends/AnimalFriendsApp.swift
chunyayang/animal-friends
beba8b3ccc6c67d89bda4983533fcd6a357c2f7e
[ "MIT" ]
null
null
null
AnimalFriends/AnimalFriendsApp.swift
chunyayang/animal-friends
beba8b3ccc6c67d89bda4983533fcd6a357c2f7e
[ "MIT" ]
null
null
null
/* The top-level definition of the app. */ import SwiftUI @main struct AnimalFriendsApp: App { @StateObject private var modelData = ModelData() var body: some Scene { WindowGroup { ContentView() .environmentObject(modelData) } } }
16.333333
52
0.591837
46fe47f65561568ecdf5282a0b04c37fee50a0e7
831
css
CSS
public/css/globe.css
angeliquehuige/laravel-web
427f4d2a459d51cbd3e4aa0b33b9b4c4b4b0ab84
[ "MIT" ]
null
null
null
public/css/globe.css
angeliquehuige/laravel-web
427f4d2a459d51cbd3e4aa0b33b9b4c4b4b0ab84
[ "MIT" ]
3
2021-05-11T02:48:21.000Z
2022-02-26T23:21:53.000Z
public/css/globe.css
ajbhuige/laravel-web
427f4d2a459d51cbd3e4aa0b33b9b4c4b4b0ab84
[ "MIT" ]
null
null
null
html, body, #viewDiv, #container { padding: 0; margin: 0; height: 100%; width: 100%; font-family: "Montserrat", sans-serif; } body { background: radial-gradient(#5dbcd2, #f4f4f4); } #viewDiv canvas { filter: saturate(1.2) drop-shadow(0 0 20px white); } /* popup styling */ .esri-popup__content { margin: 0; } .esri-popup__header-title { font-size: 18px; } .esri-popup__footer { display: none; } .esri-feature__main-container .popupImage { max-height: 250px; overflow: hidden; } .popupImage > img { width: 100%; } .popupImageCaption { text-align: center; font-size: 0.9em; padding: 0.1em 1.5em 0; } .popupDescription { padding: 2em; } p.info { margin-bottom: 2em; font-size: 1.1em; } .popupDescription > p:last-child { margin-bottom: 0; }
13.403226
54
0.620939
e7c40e164e18290c2f0a73c4a757d30978137b95
935
sql
SQL
src/shared.database/Environment/Tables/MachineApplication.sql
pvandervelde/Sherlock
dae01042481e3be54101e11c36ab293709585940
[ "Apache-2.0" ]
1
2015-01-18T04:05:05.000Z
2015-01-18T04:05:05.000Z
src/shared.database/Environment/Tables/MachineApplication.sql
pvandervelde/Sherlock
dae01042481e3be54101e11c36ab293709585940
[ "Apache-2.0" ]
4
2015-04-07T20:40:37.000Z
2015-05-31T01:43:56.000Z
src/shared.database/Environment/Tables/MachineApplication.sql
pvandervelde/Sherlock
dae01042481e3be54101e11c36ab293709585940
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------- -- <copyright company="Sherlock"> -- Copyright 2013 Sherlock. Licensed under the Apache License, Version 2.0. -- </copyright> ------------------------------------------------------------------------------- CREATE TABLE [Environments].[MachineApplication] ( [pk_MachineApplicationId] INT NOT NULL PRIMARY KEY IDENTITY, [fk_MachineId] NVARCHAR(50) NOT NULL, [fk_ApplicationId] INT NOT NULL, CONSTRAINT [FK_MachineApplication_ToMachine] FOREIGN KEY ([fk_MachineId]) REFERENCES [Environments].[Machine]([pk_MachineId]) ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT [FK_MachineApplication_ToApplication] FOREIGN KEY ([fk_ApplicationId]) REFERENCES [Environments].[Application]([pk_ApplicationId]) ON DELETE NO ACTION ON UPDATE NO ACTION, )
40.652174
81
0.562567
50d6bfefa8fb49e99a2ae1028a75a0a2ffff174c
6,657
swift
Swift
SearchableTable/Classes/SearchableTable.swift
twh2898/SearchableTable
207db1469f1a09e074f174b7ddc34d2b4dbf98db
[ "MIT" ]
null
null
null
SearchableTable/Classes/SearchableTable.swift
twh2898/SearchableTable
207db1469f1a09e074f174b7ddc34d2b4dbf98db
[ "MIT" ]
null
null
null
SearchableTable/Classes/SearchableTable.swift
twh2898/SearchableTable
207db1469f1a09e074f174b7ddc34d2b4dbf98db
[ "MIT" ]
null
null
null
// // SearchableTable.swift // AlertFactory // // Created by Thomas Harrison on 8/23/21. // import AlertFactory import UIKit import os extension DateFormatter { static let appPrettyFormat = "MMM dd, yyyy h:mm a" } /// Methods for `SearchableTableViewController` to access data. public protocol SearchableTableDelegate { /// Get the number of rows in the table. func numberOfRows() -> Int /// Get the name for an item at index `row`. func name(for row: Int) -> String /// Get the date for an item at index `row`. func date(for row: Int) -> Date /// Action for adding an item with `name`. func searchTable(add name: String) /// Action for selecting an item at index `row`. This is typically used to navigate to the item. func searchTable(select row: Int) /// Action for deleting an item at index `row`. func searchTable(delete row: Int) /// Action for renaming an item at index `row` to `name`. func searchTable(rename row: Int, to name: String) } /// `UITableViewController` with a `UISearchBar` that manages filtering and editing items. open class SearchableTableViewController: UITableViewController, UISearchBarDelegate { private var filterData: [Int] = [] private var searchBar: UISearchBar = UISearchBar() /// The search text. Call `SearchableTableViewController.reload() `after changing to show the new search results. public var searchText: String = "" /// Delegate provides data to the `SearchableTableViewController`. public var delegate: SearchableTableDelegate! /// Should the table exit edit mode after a rename is complete. public var stopEditAfterRename: Bool = false open override func viewDidLoad() { super.viewDidLoad() tableView = UITableView(frame: tableView.frame, style: .grouped) tableView.accessibilityIdentifier = "SearchableTable" tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell") tableView.dataSource = self searchBar.searchBarStyle = UISearchBar.Style.default searchBar.placeholder = "Search" searchBar.sizeToFit() searchBar.isTranslucent = false searchBar.delegate = self tableView.tableHeaderView = searchBar tableView.allowsSelectionDuringEditing = true let newButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(newItemAction)) view.backgroundColor = .systemBackground navigationItem.rightBarButtonItems = [editButtonItem, newButtonItem] } open override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) reload() } /// Reload, sort and filter all table rows with search text as the filter. open func reload() { let items = (0..<delegate.numberOfRows()).sorted { a, b in delegate.date(for: a) > delegate.date(for: b) } if searchText.isEmpty { filterData = items } else { let lowerSearchTerm = searchText.lowercased() filterData = filterData.filter { calibration in calibration.description.lowercased().contains(lowerSearchTerm) } } tableView.reloadData() } /// Handles the navigation bar add button action. @objc open func newItemAction(_ sender: Any) { let alertFactory = AlertFactory(title: "Enter a name", message: "Please enter a name", confirmLabel: "Create") let alert = alertFactory.prompt( confirmAction: { name in guard let name = name, !name.isEmpty else { self.alert(title: "Empty Name", message: "The name was empty") return } self.delegate.searchTable(add: name) self.reload() }) present(alert, animated: true, completion: nil) } open func editItemAction(for row: Int) { self.prompt( title: "Enter a name", message: "Please enter a new name", placeholder: "Name", defaultValue: delegate.name(for: row), confirmAction: { name in guard let name = name else { self.alert(title: "Error", message: "An error occurred while trying to handle the name.") return } guard !name.isEmpty else { self.alert(title: "Empty Name", message: "The name must not be empty") return } self.delegate.searchTable(rename: row, to: name) self.reload() if self.stopEditAfterRename { self.tableView.isEditing = false } }) } // MARK: Table Override public override func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle { .delete } public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { filterData.count } public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = UITableViewCell(style: .subtitle, reuseIdentifier: "cell") cell.accessoryType = .disclosureIndicator let item = filterData[indexPath.row] cell.textLabel?.text = delegate.name(for: item) let dateFormatterPrint = DateFormatter() dateFormatterPrint.dateFormat = DateFormatter.appPrettyFormat cell.detailTextLabel?.text = dateFormatterPrint.string(from: delegate.date(for: item)) return cell } public override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if tableView.isEditing { editItemAction(for: filterData[indexPath.row]) } else { delegate.searchTable(select: filterData[indexPath.row]) } } public override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { delegate.searchTable(delete: filterData[indexPath.row]) reload() } } // MARK: SearchBar Override public func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { self.searchText = searchText reload() } public func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { } public func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { } }
33.791878
144
0.641881
85cf3d9ac4e5c94cb79eefe8151accddac280445
4,325
js
JavaScript
src/actions/fund.js
investdigital/investdigital-website
452e1010ad2bf48b646583e6a2c415c1c22a2911
[ "MIT" ]
1
2018-02-12T05:02:38.000Z
2018-02-12T05:02:38.000Z
src/actions/fund.js
investdigital/investdigital-website
452e1010ad2bf48b646583e6a2c415c1c22a2911
[ "MIT" ]
null
null
null
src/actions/fund.js
investdigital/investdigital-website
452e1010ad2bf48b646583e6a2c415c1c22a2911
[ "MIT" ]
null
null
null
/** * Created by fengxiaoli on 2017/12/16. */ import axios from 'axios'; import { browserHistory, hashHistory } from 'react-router'; import { ROOT_URLCF, FUND_SUBMISSION, USER_FUND_MY, START_FUND_GOOD, All_FUND_LIST, FUND_DETAIL, FUND_DETAIL_MESSAGE, FUND_DETAIL_CHANGE, getAuthorizedHeader, requestError } from './types'; /** * 基金发行 */ export function fetchFundSubmission({formdata}, callback) { console.log(formdata); return function (dispatch) { // axios.post(`${ROOT_URLCF}/fund/issue`, {formDate}, { headers: getAuthorizedHeader() } ) axios({ method: 'post', url: `${ROOT_URLCF}/fund/issue `, data: formdata, headers: getAuthorizedHeader() }).then(response => { // console.log('基金发行'); // console.log(response); if (response.data.status == 1) { callback(); } else { callback(response.data.message); } dispatch({ type: FUND_SUBMISSION, payload: response }); }) .catch(err => dispatch(requestError(err.message))); }; } /** * 我的基金 */ export function fetchFundMy({userId, pageNum, pageSize}, callback) { // console.log(); return function (dispatch) { axios.get(`${ROOT_URLCF}/fund/myFunds?userId=${userId}&pageNum=${pageNum}&pageSize=${pageSize}`, { headers: getAuthorizedHeader() } ) .then(response => { console.log('我的基金'); console.log(response); dispatch({ type: USER_FUND_MY, payload: response }); }) .catch(err => dispatch(requestError(err.message))); }; } /** * 明星基金产品 */ export function fetchStartFund(callback) { // console.log(); return function (dispatch) { axios.get(`${ROOT_URLCF}/fund/starFunds`, { headers: getAuthorizedHeader() } ) .then(response => { console.log('明星基金产品'); console.log(response); dispatch({ type: START_FUND_GOOD, payload: response }); }) .catch(err => dispatch(requestError(err.message))); }; } /** * 基金排行榜全部基金 */ export function fetchAllFund({ pageNum, pageSize}, callback) { console.log(`${pageNum}, ${pageSize}`); return function (dispatch) { axios.get(`${ROOT_URLCF}/fund/allFunds?pageNum=${pageNum}&pageSize=${pageSize}`, { headers: getAuthorizedHeader() } ) .then(response => { console.log('全部基金'); console.log(response); dispatch({ type: All_FUND_LIST, payload: response }); }) .catch(err => dispatch(requestError(err.message))); }; } /** * 基金详情 */ export function fetchFundDetail({fundId}, callback) { // console.log(); return function (dispatch) { axios.get(`${ROOT_URLCF}/fund/fundInfo?fundId=${fundId}`, { headers: getAuthorizedHeader() } ) .then(response => { console.log('基金详情'); console.log(response); dispatch({ type: FUND_DETAIL, payload: response }); }) .catch(err => dispatch(requestError(err.message))); }; } /** * 基金详情留言板 */ export function fetchFundComment({ fundId, pageNum, pageSize}) { // console.log(); return function (dispatch) { axios.get(`${ROOT_URLCF}/fund/comment?fundId=${fundId}&pageNum=${pageNum}&pageSize=${pageSize}`, { headers: getAuthorizedHeader() } ) .then(response => { console.log('基金详情留言板'); console.log(response); dispatch({ type: FUND_DETAIL_MESSAGE, payload: response }); }) .catch(err => dispatch(requestError(err.message))); }; } /** * 基金详情走势 */ export function fetchFundDetailChange({fundId}, callback) { // console.log(); return function (dispatch) { axios.get(`${ROOT_URLCF}/fund/fundInfo?fundId=${fundId}`, { headers: getAuthorizedHeader() } ) .then(response => { console.log('基金详情基金走势'); console.log(response); dispatch({ type: FUND_DETAIL_CHANGE, payload: response }); }) .catch(err => dispatch(requestError(err.message))); }; }
30.244755
141
0.558844
83c73ab2cbf4a0e69904ace5cb2dbf889b15781e
338
go
Go
go/signals/main.go
immortal/sandbox
761645c11399b15f624104accdf39688faf96a04
[ "BSD-3-Clause" ]
null
null
null
go/signals/main.go
immortal/sandbox
761645c11399b15f624104accdf39688faf96a04
[ "BSD-3-Clause" ]
1
2020-06-25T03:59:50.000Z
2020-06-25T03:59:50.000Z
go/signals/main.go
immortal/sandbox
761645c11399b15f624104accdf39688faf96a04
[ "BSD-3-Clause" ]
null
null
null
package main import ( "fmt" "os" "os/signal" "time" ) func main() { fmt.Printf("Pid = %+v\n", os.Getpid()) c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, os.Kill) select { // kill -2 , kill -INT case s := <-c: fmt.Printf("Got signal: %d", s) os.Exit(0) case <-time.After(30 * time.Second): os.Exit(1) } }
14.695652
40
0.576923
1baa84b29f239e6905e4d39170ebba0a26555683
636
ps1
PowerShell
powershell/migration.ps1
craignicholson/iisreview
0186584d8d06687b15e96967beafaf94728c3cfa
[ "MIT" ]
null
null
null
powershell/migration.ps1
craignicholson/iisreview
0186584d8d06687b15e96967beafaf94728c3cfa
[ "MIT" ]
null
null
null
powershell/migration.ps1
craignicholson/iisreview
0186584d8d06687b15e96967beafaf94728c3cfa
[ "MIT" ]
null
null
null
import-module ServerManager Add-WindowsFeature File-Services, ` FS-FileServer, ` Web-Http-Redirect, ` Web-DAV-Publishing, ` Web-Custom-Logging, ` Web-Log-Libraries, ` Web-ODBC-Logging, ` Web-Request-Monitor, ` Web-Http-Tracing, ` Web-Dyn-Compression, ` Web-Digest-Auth, ` Web-IP-Security, ` Web-Windows-Auth, ` Web-Net-Ext, ` Web-Asp-Net, ` Web-CGI, ` Web-Includes, ` Web-WebSockets, ` Web-Ftp-Server, ` Web-Ftp-Service, ` Web-Mgmt-Compat, ` Web-Metabase, ` Web-Scripting-Tools, ` NET-Framework-Features, ` NET-Framework-Core, ` NET-HTTP-Activation, ` PowerShell-V2, ` WAS, ` WAS-Process-Model, ` WAS-NET-Environment, ` WAS-Config-APIs
19.875
35
0.718553
40a596dfed3accae626706296c654500e4e2913c
620
py
Python
rest/addresses/list-post-example-1/list-post-example-1.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
234
2016-01-27T03:04:38.000Z
2022-02-25T20:13:43.000Z
rest/addresses/list-post-example-1/list-post-example-1.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
351
2016-04-06T16:55:33.000Z
2022-03-10T18:42:36.000Z
rest/addresses/list-post-example-1/list-post-example-1.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
494
2016-03-30T15:28:20.000Z
2022-03-28T19:39:36.000Z
# Download the Python helper library from twilio.com/docs/python/install import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_AUTH_TOKEN'] client = Client(account_sid, auth_token) app = client.addresses.create( customer_name="Customer 123", street="1 Hasselhoff Lane", city="Berlin", region="Berlin", postal_code="10875", iso_country="DE", friendly_name="Billing - Customer 123" ) print(app.sid)
28.181818
72
0.743548
2695a188d0530efcd22ce0e133a781c5b5b5e8fe
825
java
Java
tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/generator/parameters/LambdaCodeParameter.java
chirrindul/tcMenu
65350d69873e30d3f8bdae842ab7f630c112c25f
[ "Apache-2.0" ]
160
2018-06-09T12:03:04.000Z
2022-03-22T11:04:59.000Z
tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/generator/parameters/LambdaCodeParameter.java
chirrindul/tcMenu
65350d69873e30d3f8bdae842ab7f630c112c25f
[ "Apache-2.0" ]
173
2018-05-04T06:44:47.000Z
2022-03-20T13:49:12.000Z
tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/generator/parameters/LambdaCodeParameter.java
chirrindul/tcMenu
65350d69873e30d3f8bdae842ab7f630c112c25f
[ "Apache-2.0" ]
16
2018-12-13T19:33:28.000Z
2022-02-09T21:56:28.000Z
/* * Copyright (c) 2016-2020 https://www.thecoderscorner.com (Nutricherry LTD). * This product is licensed under an Apache license, see the LICENSE file in the top-level directory. * */ package com.thecoderscorner.menu.editorui.generator.parameters; import com.thecoderscorner.menu.editorui.generator.plugin.FunctionDefinition; /** * describes a parameter that is provided in the form of a lambda function. In order to define * a lambda we provide it's parameters and any function calls within the lambda block. */ public class LambdaCodeParameter extends CodeParameter { private final LambdaDefinition lambda; public LambdaCodeParameter(LambdaDefinition lambda) { super(null, true, ""); this.lambda = lambda; } public LambdaDefinition getLambda() { return lambda; } }
31.730769
101
0.73697
4b57f2878423d3527127903900a8734f85e3776d
3,171
kt
Kotlin
core/src/jvmTest/kotlin/se/gustavkarlsson/conveyor/actions/LiveActionTest.kt
awesome-android-library-and-tools/conveyor
cc05b69c7eb259c999b158e8d0e095183674b1da
[ "MIT" ]
5
2020-09-05T09:23:21.000Z
2021-10-10T15:09:33.000Z
core/src/jvmTest/kotlin/se/gustavkarlsson/conveyor/actions/LiveActionTest.kt
awesome-android-library-and-tools/conveyor
cc05b69c7eb259c999b158e8d0e095183674b1da
[ "MIT" ]
40
2020-09-08T20:11:49.000Z
2022-02-06T11:52:45.000Z
core/src/jvmTest/kotlin/se/gustavkarlsson/conveyor/actions/LiveActionTest.kt
awesome-android-library-and-tools/conveyor
cc05b69c7eb259c999b158e8d0e095183674b1da
[ "MIT" ]
2
2020-09-02T08:12:39.000Z
2021-04-24T20:21:06.000Z
package se.gustavkarlsson.conveyor.actions import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import kotlinx.coroutines.test.runBlockingTest import org.spekframework.spek2.Spek import org.spekframework.spek2.style.specification.describe import se.gustavkarlsson.conveyor.StoreFlow import se.gustavkarlsson.conveyor.test.TestStoreFlow import strikt.api.expectThat import strikt.assertions.containsExactly import strikt.assertions.isEmpty object LiveActionTest : Spek({ val initialValue = 0 val flow by memoized { TestStoreFlow(initialValue) } describe("A test action") { val subject by memoized { TestLiveAction() } it("does not collect when store subscriber count is 0") { runBlockingTest { val launchJob = launch { subject.execute(flow) } flow.emit(1) launchJob.cancel() } expectThat(subject.collected).isEmpty() } it("collects current value when store subscribe count turns positive") { runBlockingTest { val launchJob = launch { subject.execute(flow) } flow.storeSubscriberCount.value = 1 launchJob.cancel() } expectThat(subject.collected).containsExactly(initialValue) } it("does not collect current value again when store subscribe count changes between positive values") { runBlockingTest { val launchJob = launch { subject.execute(flow) } flow.storeSubscriberCount.value = 1 flow.storeSubscriberCount.value = 2 launchJob.cancel() } expectThat(subject.collected).containsExactly(initialValue) } it("collects current value again when store subscribe count changes between positive and 0") { runBlockingTest { val launchJob = launch { subject.execute(flow) } flow.storeSubscriberCount.value = 1 flow.storeSubscriberCount.value = 0 flow.storeSubscriberCount.value = 1 launchJob.cancel() } expectThat(subject.collected).containsExactly(initialValue, initialValue) } it("collects subsequent values when store subscribe count is positive") { runBlockingTest { val launchJob = launch { subject.execute(flow) } flow.storeSubscriberCount.value = 1 flow.emit(1) flow.emit(2) launchJob.cancel() } expectThat(subject.collected).containsExactly(initialValue, 1, 2) } } }) private class TestLiveAction : LiveAction<Int>() { private val _collected = mutableListOf<Int>() val collected: List<Int> = _collected override suspend fun onLive(storeFlow: StoreFlow<Int>) { storeFlow.collect { state -> _collected += state } } }
34.096774
111
0.589719
e183b1a61ce420360a453aa50d194c27f0d48727
226
swift
Swift
LazyManCore/Models/Quality.swift
inickt/LazyMan-iOS
70688562f6ac5ce29aae328d0d0c6c07121bf30d
[ "MIT" ]
70
2018-04-21T18:34:39.000Z
2022-03-31T16:10:03.000Z
LazyManCore/Models/Quality.swift
tylerwolf35/LazyMan-iOS
644ec27c3f8760eff38a62947481dc110e266b60
[ "MIT" ]
62
2018-04-22T01:43:22.000Z
2022-03-23T00:14:37.000Z
LazyManCore/Models/Quality.swift
tylerwolf35/LazyMan-iOS
644ec27c3f8760eff38a62947481dc110e266b60
[ "MIT" ]
19
2018-05-13T03:17:21.000Z
2022-03-31T14:35:09.000Z
// // Quality.swift // LazyManCore // // Created by Nick Thompson on 4/18/19. // Copyright © 2019 Nick Thompson. All rights reserved. // import Foundation public enum Quality: Int { case auto = 0 case best = 1 }
15.066667
56
0.650442
ddd7facfb6e8347eeee40e86bc992e75c2059fe8
16,048
php
PHP
src/Module/BackendFileUsage.php
fritzmg/contao-file-helper-bundle
ae9781712f1ad1df3fafab2b8ce7d6b87a462517
[ "MIT" ]
7
2020-02-29T08:13:07.000Z
2020-12-27T10:05:46.000Z
src/Module/BackendFileUsage.php
fritzmg/contao-file-helper-bundle
ae9781712f1ad1df3fafab2b8ce7d6b87a462517
[ "MIT" ]
6
2020-03-19T06:25:28.000Z
2022-03-22T09:59:33.000Z
src/Module/BackendFileUsage.php
fritzmg/contao-file-helper-bundle
ae9781712f1ad1df3fafab2b8ce7d6b87a462517
[ "MIT" ]
1
2021-11-22T08:23:34.000Z
2021-11-22T08:23:34.000Z
<?php declare(strict_types=1); /* * This file is part of markenzoo/contao-file-helper-bundle. * * Copyright (c) 2021 markenzoo eG * * @package markenzoo/contao-file-helper-bundle * @author Felix Kästner <kaestner@markenzoo.de> * @copyright 2021 markenzoo eG * @license https://github.com/markenzoo/contao-file-helper-bundle/blob/master/LICENSE MIT License */ namespace Markenzoo\ContaoFileHelperBundle\Module; use Contao\Backend; use Contao\BackendTemplate; use Contao\BackendUser; use Contao\Config; use Contao\Controller; use Contao\CoreBundle\Exception\AccessDeniedException; use Contao\Database; use Contao\Database\Result; use Contao\Database\Statement; use Contao\Date; use Contao\Dbafs; use Contao\Environment; use Contao\File; use Contao\FilesModel; use Contao\Idna; use Contao\Input; use Contao\Model; use Contao\Model\Collection; use Contao\Model\QueryBuilder; use Contao\RequestToken; use Contao\StringUtil; use Contao\System; use Symfony\Component\HttpFoundation\Response; class BackendFileUsage extends Backend { /** * Database Tables to skip in search. * * @var array */ private const FILTER = ['tl_files', 'tl_search', 'tl_search_index', 'tl_undo', 'tl_version']; /** * File. * * @var string */ protected $strFile; /** * Database Instance. * * @var Database */ private $database; /** * Initialize the controller. * * 1. Import the user * 2. Call the parent constructor * 3. Authenticate the user * 4. Load the language files * DO NOT CHANGE THIS ORDER! */ public function __construct() { $this->import(BackendUser::class, 'User'); parent::__construct(); if (!System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER')) { System::log('No Authentication', __METHOD__, TL_GENERAL); throw new AccessDeniedException('Access denied'); } System::loadLanguageFile('default'); $strFile = Input::get('src', true); $strFile = base64_decode($strFile, true); $strFile = ltrim(rawurldecode($strFile), '/'); $this->strFile = $strFile; // get a handle to the database $this->database = Database::getInstance(); if (!\is_array($GLOBALS['TL_CSS'])) { $GLOBALS['TL_CSS'] = []; } $GLOBALS['TL_CSS'][] = 'bundles/contaofilehelper/css/backend-file-helper.css'; System::loadLanguageFile('default'); System::loadLanguageFile('modules'); System::loadLanguageFile('tl_files'); } /** * Run the controller and parse the template. * * @return Response the http response of the controller */ public function run(): Response { if ('' === $this->strFile) { exit('No file given'); } // Make sure there are no attempts to hack the file system if (preg_match('@^\.+@', $this->strFile) || preg_match('@\.+/@', $this->strFile) || preg_match('@(://)+@', $this->strFile)) { exit('Invalid file name'); } // Limit preview to the files directory if (!preg_match('@^'.preg_quote(Config::get('uploadPath'), '@').'@i', $this->strFile)) { exit('Invalid path'); } $rootDir = System::getContainer()->getParameter('kernel.project_dir'); // Check whether the file exists if (!file_exists($rootDir.'/'.$this->strFile)) { exit('File not found'); } // Check whether the file is mounted (thanks to Marko Cupic) if (!$this->User->hasAccess($this->strFile, 'filemounts')) { exit('Permission denied'); } // Open the download dialogue if (Input::get('download')) { $objFile = new File($this->strFile); $objFile->sendToBrowser(); } /** @var BackendTemplate $objTemplate */ $objTemplate = new BackendTemplate('be_file_usage'); /** @var FilesModel $objModel */ $objModel = FilesModel::findByPath($this->strFile); // Add the resource (see #6880) if (null === $objModel && Dbafs::shouldBeSynchronized($this->strFile)) { $objModel = Dbafs::addResource($this->strFile); } if (null !== $objModel) { $objTemplate->uuid = StringUtil::binToUuid($objModel->uuid); // see #5211 } // Add the file info /** @var File $objFile */ $objFile = new File($this->strFile); // Image if ($objFile->isImage) { $objTemplate->isImage = true; $objTemplate->width = $objFile->viewWidth; $objTemplate->height = $objFile->viewHeight; $objTemplate->src = $this->urlEncode($this->strFile); $objTemplate->dataUri = $objFile->dataUri; } // Meta data if (($objModel = FilesModel::findByPath($this->strFile)) instanceof FilesModel) { $arrMeta = StringUtil::deserialize($objModel->meta); if (\is_array($arrMeta)) { System::loadLanguageFile('languages'); $objTemplate->meta = $arrMeta; $objTemplate->languages = (object) $GLOBALS['TL_LANG']['LNG']; } } $objTemplate->href = ampersand(Environment::get('request')).'&amp;download=1'; $objTemplate->filesize = $this->getReadableSize($objFile->filesize).' ('.number_format($objFile->filesize, 0, $GLOBALS['TL_LANG']['MSC']['decimalSeparator'], $GLOBALS['TL_LANG']['MSC']['thousandsSeparator']).' Byte)'; $arrUsages = []; // get all tables from the database, we can't rely on Contao Models since that won't include usage in extensions $arrTables = $this->database->listTables(); // remove tables we don't want to search in $arrTables = array_filter($arrTables, function ($table) { return !\in_array($table, self::FILTER, true); }); foreach ($arrTables as $strTable) { $arrFields = $this->database->listFields($strTable); foreach ($arrFields as $arrField) { if ('binary' === $arrField['type']) { $usage = $this->find($strTable, $arrField['name'], $objModel->uuid, [], true); if (!empty($usage)) { $arrUsages[$strTable] = $usage; } } elseif ('blob' === $arrField['type']) { $usage = $this->find($strTable, $arrField['name'], $objModel->uuid); if (!empty($usage)) { $arrUsages[$strTable] = $usage; continue; } $usage = $this->find($strTable, $arrField['name'], StringUtil::binToUuid($objModel->uuid)); if (!empty($usage)) { $arrUsages[$strTable] = $usage; continue; } } elseif (\in_array($arrField['type'], ['varchar', 'mediumtext', 'longtext'], true)) { // find by name - e.g. <a href="*">...</a> $usage = $this->find($strTable, $arrField['name'], $objModel->path); if (!empty($usage)) { $arrUsages[$strTable] = $usage; continue; } // find by uuid - e.g. {{file::*}} $usage = $this->find($strTable, $arrField['name'], StringUtil::binToUuid($objModel->uuid)); if (!empty($usage)) { $arrUsages[$strTable] = $usage; continue; } } } } $objTemplate->usage = $arrUsages; $objTemplate->icon = $objFile->icon; $objTemplate->mime = $objFile->mime; $objTemplate->ctime = Date::parse(Config::get('datimFormat'), $objFile->ctime); $objTemplate->mtime = Date::parse(Config::get('datimFormat'), $objFile->mtime); $objTemplate->atime = Date::parse(Config::get('datimFormat'), $objFile->atime); $objTemplate->path = StringUtil::specialchars($this->strFile); $objTemplate->theme = Backend::getTheme(); $objTemplate->base = Environment::get('base'); $objTemplate->language = $GLOBALS['TL_LANGUAGE']; $objTemplate->title = StringUtil::specialchars($this->strFile); if (version_compare(VERSION, '4.9', '>=')) { $objTemplate->host = Backend::getDecodedHostname(); } else { $objTemplate->host = static::getDecodedHostname(); } $objTemplate->charset = Config::get('characterSet'); $objTemplate->labels = (object) $GLOBALS['TL_LANG']['MSC']; $objTemplate->download = StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['fileDownload']); return $objTemplate->getResponse(); } /** * Get a Name for a given key form global language configuration. * * @return string the name */ public static function getUsageName(string $strEntry): string { if ('tl_news' === $strEntry) { // FIXME: Contao maps the table `tl_news` to `Artikel` in german $strEntry = 'news'; } // get the name from global modules name if (($name = static::getLanguageEntry($strEntry))) { return $name; } // Try to infer the Name if ('tl_' === substr($strEntry, 0, 3)) { $do = substr($strEntry, 3); if ('theme' === $do) { $do = 'themes'; } if (($name = static::getLanguageEntry($do))) { return $name; } if (false !== ($pos = strpos($do, '_', 3))) { $do = substr($do, 0, $pos); if (($name = static::getLanguageEntry($do))) { return $name; } } } // No Name Found return $GLOBALS['TL_LANG']['tl_files']['custom_usage']; } /** * Return the decoded host name. * * @return string */ public static function getDecodedHostname() { $host = Environment::get('host'); if (0 === strncmp($host, 'xn--', 4)) { $host = Idna::decode($host); } return $host; } /** * Try to get the key from the default Contao Modules. * * @return string|null the language entry or `false` if not found */ protected static function getLanguageEntry(string $strEntry): ?string { $modules = ['MOD', 'FMD', 'CTE']; foreach ($modules as $module) { if (isset($GLOBALS['TL_LANG'][$module][$strEntry])) { if (\is_array($GLOBALS['TL_LANG'][$module][$strEntry])) { return $GLOBALS['TL_LANG'][$module][$strEntry][0]; } if (\is_string($GLOBALS['TL_LANG'][$module][$strEntry])) { return $GLOBALS['TL_LANG'][$module][$strEntry]; } } } return null; } /** * Find records by various criteria. * * @param mixed $strTable The database table * @param mixed $strColumn The property name * @param mixed $varValue The property value * @param array $arrOptions An optional options array * * @return Model[] An array of models found * * @psalm-return array<array-key, Model> */ protected function find($strTable, $strColumn, $varValue, array $arrOptions = [], bool $exact = false): array { $arrOptions = array_merge( [ 'table' => $strTable, 'column' => $strColumn, ], $exact ? ['value' => $varValue] : ['like' => '%'.$varValue.'%'], $arrOptions ); $strQuery = static::buildFindQuery($arrOptions); /** @var Statement $objStatement */ $objStatement = $this->database->prepare($strQuery); /** @var Result $objResult */ $objResult = $objStatement->execute($exact ? $arrOptions['value'] : $arrOptions['like']); $arrModels = static::createCollectionFromDbResult($objResult, $strTable); if (empty($arrModels)) { return $arrModels; } if ('tl_content' === $strTable) { $arrParentModels = []; foreach ($arrModels as $objModel) { /** @var string $strModel */ $strModel = Model::getClassFromTable($objModel->ptable); if (class_exists($strModel)) { /** @var Model $objParentModel */ $objParentModel = $strModel::findById($objModel->pid); if (null !== $objParentModel) { // generate backend urls to edit the object $objParentModel->backendUrl = static::buildBackendUrl($objParentModel, $strTable, $objModel->id); // add the model to the array of models $arrParentModels[] = $objParentModel; } } } return $arrParentModels; } // generate backend urls to edit the objects foreach ($arrModels as $objModel) { $objModel->backendUrl = static::buildBackendUrl($objModel, $strTable, $objModel->id); } return $arrModels; } /** * Generate a route to edit the object. * * @param Model $objModel The model object * @param string $strTable The table name where this model is used * @param string $id The id of the object to edit * * @return string A backend route */ protected static function buildBackendUrl(Model $objModel, string $strTable, string $id): string { /** @var string $strModel */ $strModel = \get_class($objModel); $do = $strModel::getTable(); if ('tl_' === substr($do, 0, 3)) { $do = substr($do, 3); if (false !== ($pos = strpos($do, '_', 3))) { $do = substr($do, 0, $pos); } } else { return ''; } if ('theme' === $do || 'module' === $do) { $do = 'themes'; } $container = System::getContainer(); $framework = $container->get('contao.framework'); /** @var RequestToken $requestToken */ $requestToken = $framework->getAdapter(RequestToken::class); return $container->get('router')->generate('contao_backend', [ 'do' => $do, 'act' => 'edit', 'table' => $strTable, 'id' => $id, 'ref' => $container->get('request_stack')->getCurrentRequest()->attributes->get('_contao_referer_id'), 'rt' => $requestToken->get(), ]); } /** * Build a query based on the given options. * * @param array $arrOptions The options array * * @return string The query string */ protected static function buildFindQuery(array $arrOptions) { $strQuery = QueryBuilder::find($arrOptions); // LIKE condition if (isset($arrOptions['like'])) { $strQuery = preg_replace('/=\?/i', ' LIKE ?', $strQuery); } return $strQuery; } /** * Create a new array containing a Model array of the database result. * * @param Result $objResult The database result object * @param string $strTable The table name * * @return Model[] An array of models found */ protected static function createCollectionFromDbResult(Result $objResult, $strTable) { try { $modelCollection = Collection::createFromDbResult($objResult, $strTable); return $modelCollection->getModels(); } catch (\Throwable $th) { return []; } } }
32.885246
225
0.536578
fb3b4b52585678a86039f97008a9c61801334e18
927
java
Java
src/main/java/io/asfjava/ui/addons/schema/decorators/DatePickerSchemaDecorator.java
JsonSchema-JavaUI/sf-java-ui-addons
dcaa5d84566f277f06fdec9ef84d18d71dc809c1
[ "MIT" ]
2
2017-06-09T19:11:35.000Z
2020-12-07T15:11:29.000Z
src/main/java/io/asfjava/ui/addons/schema/decorators/DatePickerSchemaDecorator.java
JsonSchema-JavaUI/sf-java-ui-addons
dcaa5d84566f277f06fdec9ef84d18d71dc809c1
[ "MIT" ]
null
null
null
src/main/java/io/asfjava/ui/addons/schema/decorators/DatePickerSchemaDecorator.java
JsonSchema-JavaUI/sf-java-ui-addons
dcaa5d84566f277f06fdec9ef84d18d71dc809c1
[ "MIT" ]
2
2017-06-09T18:00:09.000Z
2019-11-19T10:24:16.000Z
package io.asfjava.ui.addons.schema.decorators; import com.fasterxml.jackson.databind.BeanProperty; import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat; import com.fasterxml.jackson.module.jsonSchema.JsonSchema; import com.fasterxml.jackson.module.jsonSchema.types.StringSchema; import io.asfjava.ui.addons.forms.DatePicker; import io.asfjava.ui.core.schema.decorators.SchemaDecorator; public class DatePickerSchemaDecorator implements SchemaDecorator { public void customizeSchema(BeanProperty property, JsonSchema jsonschema) { DatePicker annotation = property.getAnnotation(DatePicker.class); if (annotation != null) { if (annotation.title() != null) { ((StringSchema) jsonschema).setTitle(annotation.title()); } ((StringSchema) jsonschema).setFormat(JsonValueFormat.DATE); } } public String getAnnotation() { return DatePicker.class.getName(); } }
35.653846
77
0.773463
6d64a908bb81f7c81a71bff9f81baf137fd0569b
1,795
sql
SQL
spring-data/spring-data-acl/src/test/resources/schema-hsqldb.sql
fingerprints/spring-profile
bcf691dcb4d3f25417f8feb3b2194f0c26aac267
[ "Apache-2.0" ]
1
2015-12-30T08:12:49.000Z
2015-12-30T08:12:49.000Z
spring-data/spring-data-acl/src/test/resources/schema-hsqldb.sql
fingerprints/spring-profile
bcf691dcb4d3f25417f8feb3b2194f0c26aac267
[ "Apache-2.0" ]
null
null
null
spring-data/spring-data-acl/src/test/resources/schema-hsqldb.sql
fingerprints/spring-profile
bcf691dcb4d3f25417f8feb3b2194f0c26aac267
[ "Apache-2.0" ]
null
null
null
drop table acl_entry IF EXISTS; drop table acl_object_identity IF EXISTS; drop table acl_class IF EXISTS; drop table acl_sid IF EXISTS; drop table person IF EXISTS; create table person (id bigint generated by default as identity(start with 100) not null primary key, name varchar_ignorecase(100)); create table acl_sid (id bigint generated by default as identity(start with 100) not null primary key, principal boolean not null, sid varchar_ignorecase(100) not null, constraint unique_uk_1 unique(sid,principal) ); create table acl_class (id bigint generated by default as identity(start with 100) not null primary key, class varchar_ignorecase(100) not null, constraint unique_uk_2 unique(class) ); create table acl_object_identity ( id bigint generated by default as identity(start with 100) not null primary key, object_id_class bigint not null, object_id_identity bigint not null, parent_object bigint, owner_sid bigint not null, entries_inheriting boolean not null, constraint unique_uk_3 unique(object_id_class,object_id_identity), constraint foreign_fk_1 foreign key(parent_object)references acl_object_identity(id), constraint foreign_fk_2 foreign key(object_id_class)references acl_class(id), constraint foreign_fk_3 foreign key(owner_sid)references acl_sid(id) ); create table acl_entry ( id bigint generated by default as identity(start with 100) not null primary key, acl_object_identity bigint not null,ace_order int not null,sid bigint not null, mask integer not null,granting boolean not null,audit_success boolean not null, audit_failure boolean not null, constraint unique_uk_4 unique(acl_object_identity,ace_order), constraint foreign_fk_4 foreign key(acl_object_identity) references acl_object_identity(id), constraint foreign_fk_5 foreign key(sid) references acl_sid(id) );
149.583333
573
0.833426
d0f5cae88432f3407bc9aa83e224073156022400
762
kt
Kotlin
old_baser/baser/src/main/java/work/shion/baser/android/IStrictModeAttacher.kt
tshion/XAppRecipe
1bd854f0621a0a102c07b7a85f5718cc0c01f5b8
[ "MIT" ]
null
null
null
old_baser/baser/src/main/java/work/shion/baser/android/IStrictModeAttacher.kt
tshion/XAppRecipe
1bd854f0621a0a102c07b7a85f5718cc0c01f5b8
[ "MIT" ]
21
2020-09-19T13:43:47.000Z
2021-05-08T03:43:39.000Z
old_baser/baser/src/main/java/work/shion/baser/android/IStrictModeAttacher.kt
tshion/XAppRecipe
1bd854f0621a0a102c07b7a85f5718cc0c01f5b8
[ "MIT" ]
null
null
null
package work.shion.baser.android import android.os.StrictMode /** * StrictMode の機能付与 * @see <a href="https://developer.android.com/reference/android/os/StrictMode">StrictMode</a> */ interface IStrictModeAttacher { /** * ThreadPolicy のセットアップ */ fun setupThreadPolicy() { StrictMode.ThreadPolicy.Builder() .detectAll() .penaltyLog() .build() .also { policy -> StrictMode.setThreadPolicy(policy) } } /** * VmPolicy のセットアップ */ fun setupVmPolicy() { StrictMode.VmPolicy.Builder() .detectAll() .penaltyLog() .build() .also { policy -> StrictMode.setVmPolicy(policy) } } }
22.411765
94
0.547244
46708f0ca248e98e6edd4a2cf8da6dac687852de
12,051
swift
Swift
Sources/SwiftSDAIap242/entity-ap242/G/gps_filtration_specification.swift
tsun7170/SwiftSDAIap242
d55ebf21abd4b85915a515aa8fa56dad7b5d059f
[ "MIT" ]
1
2021-11-23T08:46:37.000Z
2021-11-23T08:46:37.000Z
Sources/SwiftSDAIap242/entity-ap242/G/gps_filtration_specification.swift
tsun7170/SwiftSDAIap242
d55ebf21abd4b85915a515aa8fa56dad7b5d059f
[ "MIT" ]
null
null
null
Sources/SwiftSDAIap242/entity-ap242/G/gps_filtration_specification.swift
tsun7170/SwiftSDAIap242
d55ebf21abd4b85915a515aa8fa56dad7b5d059f
[ "MIT" ]
null
null
null
/* file: gps_filtration_specification.swift generated: Mon Jan 3 16:32:52 2022 */ /* This file was generated by the EXPRESS to Swift translator "exp2swift", derived from STEPcode (formerly NIST's SCL). exp2swift version: v.1.0.1, derived from stepcode v0.8 as of 2019/11/23 WARNING: You probably don't want to edit it since your modifications will be lost if exp2swift is used to regenerate it. */ import SwiftSDAIcore extension AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { //MARK: -ENTITY DEFINITION in EXPRESS /* ENTITY gps_filtration_specification; base_target : gps_filtration_specification_target; filter_data : LIST [1 : ?] OF gps_filter; (* observed by gps_filter.owner *) END_ENTITY; -- gps_filtration_specification (line:17337 file:ap242ed2_mim_lf_v1.101.TY.exp) */ //MARK: - ALL DEFINED ATTRIBUTES /* ENTITY(SELF) gps_filtration_specification ATTR: base_target, TYPE: gps_filtration_specification_target -- EXPLICIT ATTR: filter_data, TYPE: LIST [1 : ?] OF gps_filter -- EXPLICIT -- observed by ENTITY(1): gps_filter, ATTR: owner, TYPE: gps_filtration_specification */ //MARK: - Partial Entity public final class _gps_filtration_specification : SDAI.PartialEntity { public override class var entityReferenceType: SDAI.EntityReference.Type { eGPS_FILTRATION_SPECIFICATION.self } //ATTRIBUTES /// EXPLICIT ATTRIBUTE public internal(set) var _base_target: sGPS_FILTRATION_SPECIFICATION_TARGET // PLAIN EXPLICIT ATTRIBUTE /// EXPLICIT ATTRIBUTE (OBSERVED) public internal(set) var _filter_data: SDAI.LIST<eGPS_FILTER>/*[1:nil]*/ { // OBSERVED EXPLICIT ATTRIBUTE get { return __filter_data.copy() } // getter set { var newValue = newValue let observer = SDAI.EntityReferenceObserver(referencer: self, observerCode: _filter_data__observer.self) newValue.configure(with: observer) observer.observe(removing: SDAI.UNWRAP(seq:__filter_data.entityReferences), adding: SDAI.UNWRAP(seq: newValue.entityReferences) ) } // setter } /// backing storage for observed attribute private var __filter_data: SDAI.LIST<eGPS_FILTER>/*[1:nil]*/ /// attribute observer code internal class _filter_data__observer: SDAI.EntityReferenceObserver.ObserverCode { final override class func observe<RemovingEntities: Sequence, AddingEntities: Sequence>( referencer: SDAI.PartialEntity, removing: RemovingEntities, adding: AddingEntities ) where RemovingEntities.Element: SDAI.EntityReference, AddingEntities.Element: SDAI.EntityReference { for referencedComplex in removing.map({ $0.complexEntity }) { for referencerOwner in referencer.owners { //OBSERVING ENTITY: eGPS_FILTER referencedComplex.partialEntityInstance(_gps_filter.self)? ._owner__observeRemovedReference(in: referencerOwner) } } for referencedComplex in adding.map({ $0.complexEntity }) { for referencerOwner in referencer.owners { //OBSERVING ENTITY: eGPS_FILTER referencedComplex.partialEntityInstance(_gps_filter.self)? ._owner__observeAddedReference(in: referencerOwner) } } } final override class func observe(newReferencerOwner referencerOwner: SDAI.ComplexEntity) { guard let attrValue = referencerOwner.partialEntityInstance(_gps_filtration_specification.self)?._filter_data else { return } for referencedComplex in attrValue.entityReferences.map({ $0.complexEntity }) { //OBSERVING ENTITY: eGPS_FILTER referencedComplex.partialEntityInstance(_gps_filter.self)? ._owner__observeAddedReference(in: referencerOwner) } } final override class func observe(leavingReferencerOwner referencerOwner: SDAI.ComplexEntity) { guard let attrValue = referencerOwner.partialEntityInstance(_gps_filtration_specification.self)?._filter_data else { return } for referencedComplex in attrValue.entityReferences.map({ $0.complexEntity }) { //OBSERVING ENTITY: eGPS_FILTER referencedComplex.partialEntityInstance(_gps_filter.self)? ._owner__observe(leavingReferencerOwner: referencerOwner) } } } public override var typeMembers: Set<SDAI.STRING> { var members = Set<SDAI.STRING>() members.insert(SDAI.STRING(Self.typeName)) return members } //VALUE COMPARISON SUPPORT public override func hashAsValue(into hasher: inout Hasher, visited complexEntities: inout Set<SDAI.ComplexEntity>) { super.hashAsValue(into: &hasher, visited: &complexEntities) self._base_target.value.hashAsValue(into: &hasher, visited: &complexEntities) self._filter_data.value.hashAsValue(into: &hasher, visited: &complexEntities) } public override func isValueEqual(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool { guard let rhs = rhs as? Self else { return false } if !super.isValueEqual(to: rhs, visited: &comppairs) { return false } if let comp = self._base_target.value.isValueEqualOptionally(to: rhs._base_target.value, visited: &comppairs) { if !comp { return false } } else { return false } if let comp = self._filter_data.value.isValueEqualOptionally(to: rhs._filter_data.value, visited: &comppairs) { if !comp { return false } } else { return false } return true } public override func isValueEqualOptionally(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool? { guard let rhs = rhs as? Self else { return false } var result: Bool? = true if let comp = super.isValueEqualOptionally(to: rhs, visited: &comppairs) { if !comp { return false } } else { result = nil } if let comp = self._base_target.value.isValueEqualOptionally(to: rhs._base_target.value, visited: &comppairs) { if !comp { return false } } else { result = nil } if let comp = self._filter_data.value.isValueEqualOptionally(to: rhs._filter_data.value, visited: &comppairs) { if !comp { return false } } else { result = nil } return result } //EXPRESS IMPLICIT PARTIAL ENTITY CONSTRUCTOR public init(BASE_TARGET: sGPS_FILTRATION_SPECIFICATION_TARGET, FILTER_DATA: SDAI.LIST<eGPS_FILTER>/*[1: nil]*/ ) { self._base_target = BASE_TARGET self.__filter_data = FILTER_DATA super.init(asAbstructSuperclass:()) self._filter_data.configure(with: SDAI.EntityReferenceObserver(referencer: self, observerCode: _filter_data__observer.self)) } //p21 PARTIAL ENTITY CONSTRUCTOR public required convenience init?(parameters: [P21Decode.ExchangeStructure.Parameter], exchangeStructure: P21Decode.ExchangeStructure) { let numParams = 2 guard parameters.count == numParams else { exchangeStructure.error = "number of p21 parameters(\(parameters.count)) are different from expected(\(numParams)) for entity(\(Self.entityName)) constructor"; return nil } guard case .success(let p0) = exchangeStructure.recoverRequiredParameter(as: sGPS_FILTRATION_SPECIFICATION_TARGET.self, from: parameters[0]) else { exchangeStructure.add(errorContext: "while recovering parameter #0 for entity(\(Self.entityName)) constructor"); return nil } guard case .success(let p1) = exchangeStructure.recoverRequiredParameter(as: SDAI.LIST<eGPS_FILTER>.self, from: parameters[1]) else { exchangeStructure.add(errorContext: "while recovering parameter #1 for entity(\(Self.entityName)) constructor"); return nil } self.init( BASE_TARGET: p0, FILTER_DATA: p1 ) } /// broadcasting a new complex entity becoming an owner of the partial entity final public override func broadcast(addedToComplex complex: SDAI.ComplexEntity) { _filter_data__observer.observe(newReferencerOwner: complex) } /// broadcasting a complex entity withdrawing an owner of the partial entity final public override func broadcast(removedFromComplex complex: SDAI.ComplexEntity) { _filter_data__observer.observe(leavingReferencerOwner: complex) } } //MARK: - Entity Reference /** ENTITY reference - EXPRESS: ```express ENTITY gps_filtration_specification; base_target : gps_filtration_specification_target; filter_data : LIST [1 : ?] OF gps_filter; (* observed by gps_filter.owner *) END_ENTITY; -- gps_filtration_specification (line:17337 file:ap242ed2_mim_lf_v1.101.TY.exp) ``` */ public final class eGPS_FILTRATION_SPECIFICATION : SDAI.EntityReference { //MARK: PARTIAL ENTITY public override class var partialEntityType: SDAI.PartialEntity.Type { _gps_filtration_specification.self } public let partialEntity: _gps_filtration_specification //MARK: SUPERTYPES public var super_eGPS_FILTRATION_SPECIFICATION: eGPS_FILTRATION_SPECIFICATION { return self } // [1] //MARK: SUBTYPES //MARK: ATTRIBUTES /// __EXPLICIT(OBSERVED)__ attribute /// - origin: SELF( ``eGPS_FILTRATION_SPECIFICATION`` ) public var FILTER_DATA: SDAI.LIST<eGPS_FILTER>/*[1:nil]*/ { get { return SDAI.UNWRAP( self.partialEntity._filter_data ) } set(newValue) { let partial = self.partialEntity partial._filter_data = SDAI.UNWRAP(newValue) } } /// __EXPLICIT__ attribute /// - origin: SELF( ``eGPS_FILTRATION_SPECIFICATION`` ) public var BASE_TARGET: sGPS_FILTRATION_SPECIFICATION_TARGET { get { return SDAI.UNWRAP( self.partialEntity._base_target ) } set(newValue) { let partial = self.partialEntity partial._base_target = SDAI.UNWRAP(newValue) } } //MARK: INITIALIZERS public convenience init?(_ entityRef: SDAI.EntityReference?) { let complex = entityRef?.complexEntity self.init(complex: complex) } public required init?(complex complexEntity: SDAI.ComplexEntity?) { guard let partial = complexEntity?.partialEntityInstance(_gps_filtration_specification.self) else { return nil } self.partialEntity = partial super.init(complex: complexEntity) } public required convenience init?<G: SDAIGenericType>(fromGeneric generic: G?) { guard let entityRef = generic?.entityReference else { return nil } self.init(complex: entityRef.complexEntity) } public convenience init?<S: SDAISelectType>(_ select: S?) { self.init(possiblyFrom: select) } public convenience init?(_ complex: SDAI.ComplexEntity?) { self.init(complex: complex) } //SIMPLE ENTITY REFERENCE public convenience init?(_ partial:_gps_filtration_specification) { let complex = SDAI.ComplexEntity(entities:[partial]) self.init(complex: complex) } //MARK: DICTIONARY DEFINITION public class override var entityDefinition: SDAIDictionarySchema.EntityDefinition { _entityDefinition } private static let _entityDefinition: SDAIDictionarySchema.EntityDefinition = createEntityDefinition() private static func createEntityDefinition() -> SDAIDictionarySchema.EntityDefinition { let entityDef = SDAIDictionarySchema.EntityDefinition(name: "GPS_FILTRATION_SPECIFICATION", type: self, explicitAttributeCount: 2) //MARK: SUPERTYPE REGISTRATIONS entityDef.add(supertype: eGPS_FILTRATION_SPECIFICATION.self) //MARK: ATTRIBUTE REGISTRATIONS entityDef.addAttribute(name: "FILTER_DATA", keyPath: \eGPS_FILTRATION_SPECIFICATION.FILTER_DATA, kind: .explicit, source: .thisEntity, mayYieldEntityReference: true) entityDef.addAttribute(name: "BASE_TARGET", keyPath: \eGPS_FILTRATION_SPECIFICATION.BASE_TARGET, kind: .explicit, source: .thisEntity, mayYieldEntityReference: true) return entityDef } } }
40.575758
185
0.712057
69d36a1dae94ecf3a85eabcd48d8313c31353e83
1,272
asm
Assembly
programs/oeis/256/A256871.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/256/A256871.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/256/A256871.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A256871: a(n) = 2^(n-1)*(2^n+11). ; 6,13,30,76,216,688,2400,8896,34176,133888,529920,2108416,8411136,33599488,134307840,537051136,2147844096,8590655488,34361180160,137441837056,549761581056,2199034789888,8796116090880,35184418226176,140737580630016,562950137970688,2251800182784000,9007199992938496,36028798495358976,144115191028645888,576460758209003520,2305843021024854016,9223372060477095936,36893488194663743488,147573952684165693440,590295810547684212736,2361183241812779728896,9444732966495204671488,37778931864468990197760,151115727454852303814656,604462909813361901305856,2417851639241352977317888,9671406556941222653460480,38685626227716512102219776,154742504910769291385634816,618970019642883651496050688,2475880078571147577891225600,9903520314283816255378948096,39614081257133716909143883776,158456325028531771411831717888,633825300114120893197839237120,2535301200456471187892381679616,10141204801825859981771576180736,40564819207303390387490403647488,162259276829213462470769812439040,649037107316853651724695645454336,2596148429267414210582015373213696,10384593717069656049694527075647488,41538374868278622613511039468175360,166153499473114487283510020203872256,664613997892457942792971805477830656 mov $1,2 pow $1,$0 add $1,6 bin $1,2 sub $1,15 mov $0,$1
127.2
1,177
0.913522
6b84665ea781c268d7a55ffa445fdb23124b11e6
309
h
C
projects/text/assets.gen.h
krzykun/sifteo-api-extended
9a598de7460d370878a8dce9e1c4c2951d6fc677
[ "MIT" ]
null
null
null
projects/text/assets.gen.h
krzykun/sifteo-api-extended
9a598de7460d370878a8dce9e1c4c2951d6fc677
[ "MIT" ]
null
null
null
projects/text/assets.gen.h
krzykun/sifteo-api-extended
9a598de7460d370878a8dce9e1c4c2951d6fc677
[ "MIT" ]
1
2021-05-29T07:34:55.000Z
2021-05-29T07:34:55.000Z
/* * Generated by STIR. Do not edit by hand. */ #include <sifteo/asset.h> #pragma once extern Sifteo::AssetGroup CustomGroup; extern const Sifteo::AssetImage WhiteImage; extern const Sifteo::AssetImage CustomImage; extern Sifteo::AssetGroup IconAssets; extern const Sifteo::AssetImage Icon;
22.071429
45
0.744337
40e3d4771a550f0dc3c30ccbc3fe9266c16146ed
312
py
Python
ipyvolume/traittypes.py
gridbugs/ipyvolume
71eded3085ed5f00a961c90db8b84fde13a6dee3
[ "MIT" ]
1,784
2017-01-24T08:20:07.000Z
2022-02-10T21:19:43.000Z
ipyvolume/traittypes.py
gridbugs/ipyvolume
71eded3085ed5f00a961c90db8b84fde13a6dee3
[ "MIT" ]
378
2017-02-17T17:14:16.000Z
2022-02-07T21:06:38.000Z
ipyvolume/traittypes.py
gridbugs/ipyvolume
71eded3085ed5f00a961c90db8b84fde13a6dee3
[ "MIT" ]
232
2017-01-24T08:20:35.000Z
2022-01-30T04:08:48.000Z
from traitlets import TraitType import PIL.Image class Image(TraitType): """A trait for PIL images.""" default_value = None info_text = 'a PIL Image object' def validate(self, obj, value): if isinstance(value, PIL.Image.Image): return value self.error(obj, value)
20.8
46
0.644231
53a9edcf4ce6502ef5b7074809817775efbdc9d4
3,067
java
Java
main/common/web/src/main/java/de/tweerlei/spring/web/service/impl/RequestSettingsServiceImpl.java
tweerlei/dbgrazer
18db81ca9a5cc8a6436bd614f20e64ee10dad6d9
[ "Apache-2.0" ]
3
2020-05-28T13:50:48.000Z
2021-09-26T03:05:18.000Z
main/common/web/src/main/java/de/tweerlei/spring/web/service/impl/RequestSettingsServiceImpl.java
tweerlei/dbgrazer
18db81ca9a5cc8a6436bd614f20e64ee10dad6d9
[ "Apache-2.0" ]
1
2022-02-16T01:18:43.000Z
2022-02-16T01:18:43.000Z
main/common/web/src/main/java/de/tweerlei/spring/web/service/impl/RequestSettingsServiceImpl.java
tweerlei/dbgrazer
18db81ca9a5cc8a6436bd614f20e64ee10dad6d9
[ "Apache-2.0" ]
1
2021-12-15T13:11:49.000Z
2021-12-15T13:11:49.000Z
/* * Copyright 2018 tweerlei Wruck + Buchmeier GbR - http://www.tweerlei.de/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package de.tweerlei.spring.web.service.impl; import java.util.Locale; import java.util.TimeZone; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.ui.context.Theme; import org.springframework.ui.context.ThemeSource; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.ThemeResolver; import de.tweerlei.spring.web.handler.TimeZoneResolver; import de.tweerlei.spring.web.service.RequestSettingsService; /** * Default impl. * * @author Robert Wruck */ //@Service("requestSettingsService") public class RequestSettingsServiceImpl implements RequestSettingsService { private final LocaleResolver localeResolver; private final ThemeResolver themeResolver; private final ThemeSource themeSource; private final TimeZoneResolver timeZoneResolver; /** * Constructor * @param localeResolver LocaleResolver * @param themeResolver ThemeResolver * @param timeZoneResolver TimeZoneResolver * @param themeSource ThemeSource */ @Autowired public RequestSettingsServiceImpl(LocaleResolver localeResolver, ThemeResolver themeResolver, TimeZoneResolver timeZoneResolver, ThemeSource themeSource) { this.localeResolver = localeResolver; this.themeResolver = themeResolver; this.themeSource = themeSource; this.timeZoneResolver = timeZoneResolver; } public Locale getLocale(HttpServletRequest request) { return (localeResolver.resolveLocale(request)); } public String getThemeName(HttpServletRequest request) { return (themeResolver.resolveThemeName(request)); } public Theme getTheme(HttpServletRequest request) { return (themeSource.getTheme(getThemeName(request))); } public TimeZone getTimeZone(HttpServletRequest request) { return (timeZoneResolver.resolveTimeZone(request)); } public void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale) { localeResolver.setLocale(request, response, locale); } public void setThemeName(HttpServletRequest request, HttpServletResponse response, String themeName) { themeResolver.setThemeName(request, response, themeName); } public void setTimeZone(HttpServletRequest request, HttpServletResponse response, TimeZone timeZone) { timeZoneResolver.setTimeZone(request, response, timeZone); } }
31.295918
101
0.789697
fb760e413c49369bd5118f7f8fc2da76187cd6b5
2,645
java
Java
src/main/java/darks/learning/common/minispantree/PrimMiniSpanTree.java
tgreiser/darks-learning
e21635e80543e0dc308173e2a2fee4ec0737fd34
[ "Apache-2.0" ]
18
2015-05-08T02:36:43.000Z
2020-05-04T18:17:33.000Z
src/main/java/darks/learning/common/minispantree/PrimMiniSpanTree.java
tgreiser/darks-learning
e21635e80543e0dc308173e2a2fee4ec0737fd34
[ "Apache-2.0" ]
2
2018-09-12T21:12:27.000Z
2018-09-12T21:34:01.000Z
src/main/java/darks/learning/common/minispantree/PrimMiniSpanTree.java
tgreiser/darks-learning
e21635e80543e0dc308173e2a2fee4ec0737fd34
[ "Apache-2.0" ]
7
2015-06-12T11:31:53.000Z
2018-09-12T23:10:58.000Z
/** * * Copyright 2014 The Darks Learning Project (Liu lihua) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package darks.learning.common.minispantree; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; /** * Build minimum span tree by Prim algorithm * * @author lihua.llh * */ public class PrimMiniSpanTree<T, E> extends MiniSpanTree<T, E> { List<Integer> selectNodes; Set<Integer> remainNodes; List<GraphEdge<E>> targetEdges; /** * {@inheritDoc} */ @Override public void initialize(GraphBuilder<T, E> builder) { super.initialize(builder); selectNodes = new ArrayList<Integer>(); remainNodes = new HashSet<Integer>(); targetEdges = new LinkedList<GraphEdge<E>>(); for (int i = 0 ; i < nodes.size(); i++) { remainNodes.add(i); } } /** * {@inheritDoc} */ @Override public void buildTree(int startIndex) { selectNodes.add(startIndex); remainNodes.remove(startIndex); for (int i = 0; i < nodes.size() - 1; i++) { GraphEdge<E> minEdge = null; Integer newIndex = null; for (Integer remainIndex : remainNodes) { for (Integer selectIndex : selectNodes) { GraphEdge<E> edge = edges.get(selectIndex, remainIndex); if (edge != null) { if (minEdge == null || edge.getWeight() < minEdge.getWeight()) { newIndex = remainIndex; minEdge = edge; } } } } if (newIndex != null && minEdge != null) { remainNodes.remove(newIndex); selectNodes.add(newIndex); targetEdges.add(minEdge); } } } /** * {@inheritDoc} */ @Override public List<Integer> getResultNodesIndex() { return selectNodes; } /** * {@inheritDoc} */ @Override public List<? extends GraphNode<T>> getResultNodes() { List<GraphNode<T>> result = new ArrayList<GraphNode<T>>(selectNodes.size()); for (Integer index : selectNodes) { result.add(nodes.get(index)); } return result; } /** * {@inheritDoc} */ @Override public List<? extends GraphEdge<E>> getResultEdges() { return targetEdges; } }
20.992063
78
0.658601
fbd30d43db29e496d27c2ae37efcc3b2d7ea7770
31,499
java
Java
src/main/java/com/irurueta/geometry/estimators/CircleRobustEstimator.java
albertoirurueta/irurueta-geometry
a0e9165de15e07ab391f23bba924cbd1ef5582f9
[ "Apache-2.0" ]
null
null
null
src/main/java/com/irurueta/geometry/estimators/CircleRobustEstimator.java
albertoirurueta/irurueta-geometry
a0e9165de15e07ab391f23bba924cbd1ef5582f9
[ "Apache-2.0" ]
1
2020-10-13T11:22:33.000Z
2021-12-11T14:50:34.000Z
src/main/java/com/irurueta/geometry/estimators/CircleRobustEstimator.java
albertoirurueta/irurueta-geometry
a0e9165de15e07ab391f23bba924cbd1ef5582f9
[ "Apache-2.0" ]
1
2021-01-06T04:22:39.000Z
2021-01-06T04:22:39.000Z
/* * Copyright (C) 2015 Alberto Irurueta Carro (alberto@irurueta.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.irurueta.geometry.estimators; import com.irurueta.geometry.Circle; import com.irurueta.geometry.Point2D; import com.irurueta.numerical.robust.RobustEstimatorException; import com.irurueta.numerical.robust.RobustEstimatorMethod; import java.util.List; /** * This is an abstract class for algorithms to robustly find the best circle * that fits in a collection of 2D points. * Implementations of this class should be able to detect and discard outliers * in order to find the best solution. */ @SuppressWarnings("DuplicatedCode") public abstract class CircleRobustEstimator { /** * Minimum number of 2D points required to estimate a circle. */ public static final int MINIMUM_SIZE = 3; /** * Default amount of progress variation before notifying a change in * estimation progress. By default this is set to 5%. */ public static final float DEFAULT_PROGRESS_DELTA = 0.05f; /** * Minimum allowed value for progress delta. */ public static final float MIN_PROGRESS_DELTA = 0.0f; /** * Maximum allowed value for progress delta. */ public static final float MAX_PROGRESS_DELTA = 1.0f; /** * Constant defining default confidence of the estimated result, which is * 99%. This means that with a probability of 99% estimation will be * accurate because chosen sub-samples will be inliers. */ public static final double DEFAULT_CONFIDENCE = 0.99; /** * Default maximum allowed number of iterations. */ public static final int DEFAULT_MAX_ITERATIONS = 5000; /** * Minimum allowed confidence value. */ public static final double MIN_CONFIDENCE = 0.0; /** * Maximum allowed confidence value. */ public static final double MAX_CONFIDENCE = 1.0; /** * Minimum allowed number of iterations. */ public static final int MIN_ITERATIONS = 1; /** * Default robust estimator method when none is provided. */ public static final RobustEstimatorMethod DEFAULT_ROBUST_METHOD = RobustEstimatorMethod.PROMedS; /** * Listener to be notified of events such as when estimation starts, ends * or its progress significantly changes. */ protected CircleRobustEstimatorListener mListener; /** * Indicates if this estimator is locked because an estimation is being * computed. */ protected volatile boolean mLocked; /** * Amount of progress variation before notifying a progress change during * estimation. */ protected float mProgressDelta; /** * Amount of confidence expressed as a value between 0.0 and 1.0 (which is * equivalent to 100%). The amount of confidence indicates the probability * that the estimated result is correct. Usually this value will be close * to 1.0, but not exactly 1.0. */ protected double mConfidence; /** * Maximum allowed number of iterations. When the maximum number of * iterations is exceeded, result will not be available, however an * approximate result will be available for retrieval. */ protected int mMaxIterations; /** * List of points to be used to estimate a circle. Provided list must have * a size greater or equal than MINIMUM_SIZE. */ protected List<Point2D> mPoints; /** * Constructor. */ protected CircleRobustEstimator() { mProgressDelta = DEFAULT_PROGRESS_DELTA; mConfidence = DEFAULT_CONFIDENCE; mMaxIterations = DEFAULT_MAX_ITERATIONS; } /** * Constructor. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. */ protected CircleRobustEstimator(final CircleRobustEstimatorListener listener) { mListener = listener; mProgressDelta = DEFAULT_PROGRESS_DELTA; mConfidence = DEFAULT_CONFIDENCE; mMaxIterations = DEFAULT_MAX_ITERATIONS; } /** * Constructor with points. * * @param points 2D points to estimate a circle. * @throws IllegalArgumentException if provided list of points don't have * a size greater or equal than MINIMUM_SIZE. */ protected CircleRobustEstimator(final List<Point2D> points) { mProgressDelta = DEFAULT_PROGRESS_DELTA; mConfidence = DEFAULT_CONFIDENCE; mMaxIterations = DEFAULT_MAX_ITERATIONS; internalSetPoints(points); } /** * Constructor. * * @param points 2D points to estimate a circle. * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @throws IllegalArgumentException if provided list of points don't have * a size greater or equal than MINIMUM_SIZE. */ protected CircleRobustEstimator(final CircleRobustEstimatorListener listener, final List<Point2D> points) { mListener = listener; mProgressDelta = DEFAULT_PROGRESS_DELTA; mConfidence = DEFAULT_CONFIDENCE; mMaxIterations = DEFAULT_MAX_ITERATIONS; internalSetPoints(points); } /** * Returns reference to listener to be notified of events such as when * estimation starts, ends or its progress significantly changes. * * @return listener to be notified of events. */ public CircleRobustEstimatorListener getListener() { return mListener; } /** * Sets listener to be notified of events such as when estimation starts, * ends or its progress significantly changes. * * @param listener listener to be notified of events. * @throws LockedException if robust estimator is locked. */ public void setListener(final CircleRobustEstimatorListener listener) throws LockedException { if (isLocked()) { throw new LockedException(); } mListener = listener; } /** * Indicates whether listener has been provided and is available for * retrieval. * * @return true if available, false otherwise. */ public boolean isListenerAvailable() { return mListener != null; } /** * Indicates if this instance is locked because estimation is being computed * * @return true if locked, false otherwise. */ public boolean isLocked() { return mLocked; } /** * Returns amount of progress variation before notifying a progress change * during estimation. * * @return amount of progress variation before notifying a progress change * during estimation. */ public float getProgressDelta() { return mProgressDelta; } /** * Sets amount of progress variation before notifying a progress change * during estimation. * * @param progressDelta amount of progress variation before notifying a * progress change during estimation. * @throws IllegalArgumentException if progress delta is less than zero or * greater than 1. * @throws LockedException if this estimator is locked because an estimation * is being computed. */ public void setProgressDelta(final float progressDelta) throws LockedException { if (isLocked()) { throw new LockedException(); } if (progressDelta < MIN_PROGRESS_DELTA || progressDelta > MAX_PROGRESS_DELTA) { throw new IllegalArgumentException(); } mProgressDelta = progressDelta; } /** * Returns amount of confidence expressed as a value between 0.0 and 1.0 * (which is equivalent to 100%). The amount of confidence indicates the * probability that the estimated result is correct. Usually this value will * be close to 1.0, but not exactly 1.0. * * @return amount of confidence as a value between 0.0 and 1.0. */ public double getConfidence() { return mConfidence; } /** * Sets amount of confidence expressed as a value between 0.0 and 1.0 (which * is equivalent to 100%). The amount of confidence indicates the * probability that the estimated result is correct. Usually this value will * be close to 1.0, but not exactly 1.0. * * @param confidence confidence to be set as a value between 0.0 and 1.0. * @throws IllegalArgumentException if provided value is not between 0.0 and * 1.0. * @throws LockedException if this estimator is locked because an estimator * is being computed. */ public void setConfidence(final double confidence) throws LockedException { if (isLocked()) { throw new LockedException(); } if (confidence < MIN_CONFIDENCE || confidence > MAX_CONFIDENCE) { throw new IllegalArgumentException(); } mConfidence = confidence; } /** * Returns maximum allowed number of iterations. If maximum allowed number * of iterations is achieved without converging to a result when calling * estimate(), a RobustEstimatorException will be raised. * * @return maximum allowed number of iterations. */ public int getMaxIterations() { return mMaxIterations; } /** * Sets maximum allowed number of iterations. When the maximum number of * iterations is exceeded, result will not be available, however an * approximate result will be available for retrieval. * * @param maxIterations maximum allowed number of iterations to be set. * @throws IllegalArgumentException if provided value is less than 1. * @throws LockedException if this estimator is locked because an estimation * is being computed. */ public void setMaxIterations(final int maxIterations) throws LockedException { if (isLocked()) { throw new LockedException(); } if (maxIterations < MIN_ITERATIONS) { throw new IllegalArgumentException(); } mMaxIterations = maxIterations; } /** * Returns list of points to be used to estimate a circle. * Provided list must have a size greater or equal than MINIMUM_SIZE. * * @return list of points to be used to estimate a circle. */ public List<Point2D> getPoints() { return mPoints; } /** * Sets list of points to be used to estimate a circle. * Provided list must have a size greater or equal than MINIMUM_SIZE. * * @param points list of points to be used to estimate a circle. * @throws IllegalArgumentException if provided list of points don't have * a size greater or equal than MINIMUM_SIZE. * @throws LockedException if estimator is locked because a computation is * already in progress. */ public void setPoints(final List<Point2D> points) throws LockedException { if (isLocked()) { throw new LockedException(); } internalSetPoints(points); } /** * Indicates if estimator is ready to start the circle estimation. * This is true when a minimum if MINIMUM_SIZE points are available. * * @return true if estimator is ready, false otherwise. */ public boolean isReady() { return mPoints != null && mPoints.size() >= MINIMUM_SIZE; } /** * Returns quality scores corresponding to each point. * The larger the score value the better the quality of the point measure. * This implementation always returns null. * Subclasses using quality scores must implement proper behaviour. * * @return quality scores corresponding to each point. */ public double[] getQualityScores() { return null; } /** * Sets quality scores corresponding to each point. * The larger the score value the better the quality of the point sample. * This implementation makes no action. * Subclasses using quality scores must implement proper behaviour. * * @param qualityScores quality scores corresponding to each sampled point. * @throws LockedException if robust estimator is locked because an * estimation is already in progress. * @throws IllegalArgumentException if provided quality scores length is * smaller than MINIMUM_SIZE (i.e. 3 samples). */ public void setQualityScores(final double[] qualityScores) throws LockedException { } /** * Creates a circle robust estimator based on 2D point samples and using * provided robust estimator method. * * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. */ public static CircleRobustEstimator create(final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(); case MSAC: return new MSACCircleRobustEstimator(); case PROSAC: return new PROSACCircleRobustEstimator(); case PROMedS: return new PROMedSCircleRobustEstimator(); case RANSAC: default: return new RANSACCircleRobustEstimator(); } } /** * Creates a circle robust estimator based on 2D point samples and using * provided points and robust estimator method. * * @param points 2D points to estimate a circle. * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have a * size greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create( final List<Point2D> points, final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(points); case MSAC: return new MSACCircleRobustEstimator(points); case PROSAC: return new PROSACCircleRobustEstimator(points); case PROMedS: return new PROMedSCircleRobustEstimator(points); case RANSAC: default: return new RANSACCircleRobustEstimator(points); } } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener, final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(listener); case MSAC: return new MSACCircleRobustEstimator(listener); case PROSAC: return new PROSACCircleRobustEstimator(listener); case PROMedS: return new PROMedSCircleRobustEstimator(listener); case RANSAC: default: return new RANSACCircleRobustEstimator(listener); } } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener and points. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @param points 2D points to estimate a circle. * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have a * size greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener, final List<Point2D> points, final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(listener, points); case MSAC: return new MSACCircleRobustEstimator(listener, points); case PROSAC: return new PROSACCircleRobustEstimator(listener, points); case PROMedS: return new PROMedSCircleRobustEstimator(listener, points); case RANSAC: default: return new RANSACCircleRobustEstimator(listener, points); } } /** * Creates a circle robust estimator based on 2D point samples and using * provided robust estimator method. * * @param qualityScores quality scores corresponding to each provided point. * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided quality scores length is * smaller than MINIMUM_SIZE (i.e. 3 points). */ public static CircleRobustEstimator create( final double[] qualityScores, final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(); case MSAC: return new MSACCircleRobustEstimator(); case PROSAC: return new PROSACCircleRobustEstimator(qualityScores); case PROMedS: return new PROMedSCircleRobustEstimator(qualityScores); case RANSAC: default: return new RANSACCircleRobustEstimator(); } } /** * Creates a circle robust estimator based on 2D point samples and using * provided points and robust estimator method. * * @param points 2D points to estimate a circle. * @param qualityScores quality scores corresponding to each provided point. * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have * the same size as the list of provided quality scores, or it their size * is not greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create( final List<Point2D> points, final double[] qualityScores, final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(points); case MSAC: return new MSACCircleRobustEstimator(points); case PROSAC: return new PROSACCircleRobustEstimator(points, qualityScores); case PROMedS: return new PROMedSCircleRobustEstimator(points, qualityScores); case RANSAC: default: return new RANSACCircleRobustEstimator(points); } } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @param qualityScores quality scores corresponding to each provided point. * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided quality scores length is * smaller than MINIMUM_SIZE (i.e. 3 points). */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener, final double[] qualityScores, final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(listener); case MSAC: return new MSACCircleRobustEstimator(listener); case PROSAC: return new PROSACCircleRobustEstimator(listener, qualityScores); case PROMedS: return new PROMedSCircleRobustEstimator(listener, qualityScores); case RANSAC: default: return new RANSACCircleRobustEstimator(listener); } } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener and points. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @param points 2D points to estimate a circle. * @param qualityScores quality scores corresponding to each provided point. * @param method method of a robust estimator algorithm to estimate best * circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have * the same size as the list of provided quality scores, or it their size * is not greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener, final List<Point2D> points, final double[] qualityScores, final RobustEstimatorMethod method) { switch (method) { case LMedS: return new LMedSCircleRobustEstimator(listener, points); case MSAC: return new MSACCircleRobustEstimator(listener, points); case PROSAC: return new PROSACCircleRobustEstimator(listener, points, qualityScores); case PROMedS: return new PROMedSCircleRobustEstimator(listener, points, qualityScores); case RANSAC: default: return new RANSACCircleRobustEstimator(listener, points); } } /** * Creates a circle robust estimator based on 2D point samples and using * default robust estimator method. * * @return an instance of a circle robust estimator. */ public static CircleRobustEstimator create() { return create(DEFAULT_ROBUST_METHOD); } /** * Creates a circle robust estimator based on 2D point samples and using * provided points and default robust estimator method. * * @param points 2D points to estimate a circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have a * size greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create(final List<Point2D> points) { return create(points, DEFAULT_ROBUST_METHOD); } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener and default robust estimator method. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @return an instance of a circle robust estimator. */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener) { return create(listener, DEFAULT_ROBUST_METHOD); } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener and points and default robust estimator method. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @param points 2D points to estimate a circle. * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have a * size greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener, final List<Point2D> points) { return create(listener, points, DEFAULT_ROBUST_METHOD); } /** * Creates a circle robust estimator based on 2D point samples and using * default robust estimator method. * * @param qualityScores quality scores corresponding to each provided point * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided quality scores length is * smaller than MINIMUM_SIZE (i.e. 3 points). */ public static CircleRobustEstimator create(final double[] qualityScores) { return create(qualityScores, DEFAULT_ROBUST_METHOD); } /** * Creates a circle robust estimator based on 2D point samples and using * provided points and default estimator method. * * @param points 2D points to estimate a circle. * @param qualityScores quality scores corresponding to each provided point * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have * the same size as the list of provided quality scores, or if their size * is not greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create( final List<Point2D> points, final double[] qualityScores) { return create(points, qualityScores, DEFAULT_ROBUST_METHOD); } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener and default estimator method. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @param qualityScores quality scores corresponding to each provided point * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided quality scores length is * smaller than MINIMUM_SIZE (i.e. 3 points). */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener, final double[] qualityScores) { return create(listener, qualityScores, DEFAULT_ROBUST_METHOD); } /** * Creates a circle robust estimator based on 2D point samples and using * provided listener and points and default estimator method. * * @param listener listener to be notified of events such as when estimation * starts, ends or its progress significantly changes. * @param points 2D points to estimate a circle. * @param qualityScores quality scores corresponding to each provided point * @return an instance of a circle robust estimator. * @throws IllegalArgumentException if provided list of points don't have * the same size as the list of provided quality scores, or if their size * is not greater or equal than MINIMUM_SIZE. */ public static CircleRobustEstimator create( final CircleRobustEstimatorListener listener, final List<Point2D> points, final double[] qualityScores) { return create(listener, points, qualityScores, DEFAULT_ROBUST_METHOD); } /** * Estimates a circle using a robust estimator and the best set of 2D points * that fit into the locus of the estimated circle found using the robust * estimator. * * @return a circle. * @throws LockedException if robust estimator is locked because an * estimation is already in progress. * @throws NotReadyException if provided input data is not enough to start * the estimation. * @throws RobustEstimatorException if estimation fails for any reason * (i.e. numerical instability, no solution available, etc). */ public abstract Circle estimate() throws LockedException, NotReadyException, RobustEstimatorException; /** * Returns method being used for robust estimation. * * @return method being used for robust estimation. */ public abstract RobustEstimatorMethod getMethod(); /** * Internal method to set lists of points to be used to estimate a circle. * This method does not check whether estimator is locked or not. * * @param points list of points to be used to estimate a circle. * @throws IllegalArgumentException if provided list of points doesn't have * a size greater or equal than MINIMUM_SIZE. */ private void internalSetPoints(final List<Point2D> points) { if (points.size() < MINIMUM_SIZE) { throw new IllegalArgumentException(); } mPoints = points; } /** * Computes the residual between a circle and a point. * * @param c a circle. * @param point a 2D point. * @return residual. */ protected double residual(final Circle c, final Point2D point) { point.normalize(); return c.getDistance(point); } }
39.771465
110
0.63256
2656220af53c0160f9694eaf0338af3a1932e1db
19,231
java
Java
src/main/java/de/kreth/clubhelperbackend/config/DatabaseConfiguration.java
markuskreth/ClubhelperClientNonBoot
cc84a683dee64136d759bca18cfa7363c3838d7c
[ "MIT" ]
null
null
null
src/main/java/de/kreth/clubhelperbackend/config/DatabaseConfiguration.java
markuskreth/ClubhelperClientNonBoot
cc84a683dee64136d759bca18cfa7363c3838d7c
[ "MIT" ]
null
null
null
src/main/java/de/kreth/clubhelperbackend/config/DatabaseConfiguration.java
markuskreth/ClubhelperClientNonBoot
cc84a683dee64136d759bca18cfa7363c3838d7c
[ "MIT" ]
null
null
null
package de.kreth.clubhelperbackend.config; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import de.kreth.dbmanager.ColumnDefinition; import de.kreth.dbmanager.DataType; import de.kreth.dbmanager.Database; import de.kreth.dbmanager.DatabaseType; import de.kreth.dbmanager.TableDefinition; import de.kreth.dbmanager.UniqueConstraint; public class DatabaseConfiguration { private static final String PERSON_ID_FK_NAME = "person_id"; private static final int LATEST_VERSION = 10; private final Logger logger; private final DatabaseType dbType; private List<TableDefinition> allTables; private TableDefinition person; private TableDefinition contact; private TableDefinition relative; private TableDefinition adress; private TableDefinition attendance; private TableDefinition version; private TableDefinition deletedEntries; private TableDefinition group; private TableDefinition persongroup; private TableDefinition startpass; private TableDefinition startrecht; private final List<MyStatement> statements; private int fromVersion; public DatabaseConfiguration(int fromVersion) { this(fromVersion, DatabaseType.MYSQL); } public DatabaseConfiguration(int fromVersion, DatabaseType dbType) { this.fromVersion = fromVersion; this.dbType = dbType; statements = new ArrayList<>(); logger = LoggerFactory.getLogger(getClass()); switch (fromVersion) { case 0 : createAll(); createWith(person, contact, relative, adress, attendance, version, deletedEntries, group, persongroup, startpass, startrecht); createAttendenceUniqueConstraint(); createForeignkeysForMainTables(); addForeignKey(startrecht, "startpass_id", startpass, "id"); addForeignKey(startpass, "person_id", person, "id"); break; case 1 : createAll(); createWith(deletedEntries, group, persongroup); addDeletedColumn(person, contact, relative, adress, attendance, version, startpass); addAuthColumns(person); statements.add(new DirectStatement( "INSERT INTO `groupDef`(`name`,`changed`,`created`)VALUES('ADMIN',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)")); addUniquePersonGroup(); addDeleteColumnStm(person, new ColumnDefinition(DataType.TEXT, "type", "NOT NULL")); createAttendenceUniqueConstraint(); break; case 2 : createAll(); createWith(startpass); addDeletedColumn(person, contact, relative, adress, attendance, version, deletedEntries, group, persongroup); addAuthColumns(person); statements.add(new DirectStatement( "INSERT INTO `groupDef`(`name`,`changed`,`created`)VALUES('ADMIN',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)")); addUniqueGroupName(); addUniquePersonGroup(); addDeleteColumnStm(person, new ColumnDefinition(DataType.TEXT, "type", "NOT NULL")); createAttendenceUniqueConstraint(); break; case 3 : createAll(); createWith(startpass); addAuthColumns(person); statements.add(new DirectStatement( "INSERT INTO `groupDef`(`name`,`changed`,`created`)VALUES('ADMIN',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)")); addUniqueGroupName(); addUniquePersonGroup(); addDeleteColumnStm(person, new ColumnDefinition(DataType.TEXT, "type", "NOT NULL")); createAttendenceUniqueConstraint(); break; case 4 : createWith(startpass); addUniqueGroupName(); addUniquePersonGroup(); addDeleteColumnStm(person, new ColumnDefinition(DataType.TEXT, "type", "NOT NULL")); createAttendenceUniqueConstraint(); break; case 5 : createAll(); createWith(startpass); addDeleteColumnStm(person, new ColumnDefinition(DataType.TEXT, "type", "NOT NULL")); createAttendenceUniqueConstraint(); break; case 6 : createAll(); createWith(startpass); createAttendenceUniqueConstraint(); changeIdNamesInAllTables(); break; case 7 : createAll(); createWith(startpass); changeIdNamesInAllTables(); break; case 8 : createAll(); createWith(startpass, startrecht); addForeignKey(startrecht, "startpass_id", startpass, "id"); addForeignKey(startpass, "person_id", person, "id"); createForeignkeysForMainTables(); break; case 9 : createAll(); createForeignkeysForMainTables(); break; } if (fromVersion != LATEST_VERSION && logger.isInfoEnabled()) { logger.info("Prepared Datebase update from Version " + fromVersion + " to Version " + LATEST_VERSION); } } private void createForeignkeysForMainTables() { addForeignKey(contact, "person_id", person, "id"); addForeignKey(relative, "person1", person, "id"); addForeignKey(relative, "person2", person, "id"); addForeignKey(persongroup, "person_id", person, "id"); addForeignKey(persongroup, "group_id", group, "id"); addForeignKey(attendance, "person_id", person, "id"); addForeignKey(adress, "person_id", person, "id"); } private void addForeignKey(TableDefinition foreignTable, String foreignColumn, TableDefinition targetTable, String targetColumn) { throwExecptionIfColumnNotContained(foreignTable, foreignColumn); throwExecptionIfColumnNotContained(targetTable, targetColumn); StringBuilder sql = new StringBuilder("ALTER TABLE ") .append(foreignTable.getTableName()) .append(" ADD FOREIGN KEY (").append(foreignColumn) .append(") REFERENCES ").append(targetTable.getTableName()) .append("(").append(targetColumn).append(")"); add(sql.toString()); } private void throwExecptionIfColumnNotContained( TableDefinition foreignTable, String foreignColumn) { for (Iterator<ColumnDefinition> iterator = foreignTable.getColumns() .iterator(); iterator.hasNext();) { ColumnDefinition def = iterator.next(); if (def.getColumnName().equals(foreignColumn)) { return; } } throw new IllegalArgumentException(foreignTable + " does not contain column with name " + foreignColumn); } public List<TableDefinition> getAllTables() { return Collections.unmodifiableList(allTables); } public TableDefinition getPerson() { return person; } public TableDefinition getContact() { return contact; } public TableDefinition getRelative() { return relative; } public TableDefinition getAdress() { return adress; } public TableDefinition getAttendance() { return attendance; } public TableDefinition getVersion() { return version; } public TableDefinition getDeletedEntries() { return deletedEntries; } public TableDefinition getGroup() { return group; } public TableDefinition getPersongroup() { return persongroup; } public TableDefinition getStartpass() { return startpass; } public TableDefinition getStartrecht() { return startrecht; } private void changeIdNamesInAllTables() { String format = "ALTER TABLE %s CHANGE _id id INTEGER NOT NULL AUTO_INCREMENT"; for (TableDefinition def : allTables) { String sql = String.format(format, def.getTableName()); statements.add(new DirectStatement(sql)); } } private void createAttendenceUniqueConstraint() { ColumnDefinition[] columns = new ColumnDefinition[2]; attendance.getColumns().forEach(col -> { if (PERSON_ID_FK_NAME.equals(col.getColumnName())) { columns[0] = col; } else if ("on_date".equals(col.getColumnName())) { columns[1] = col; } }); statements.add( new AddConstraint(attendance, new UniqueConstraint(columns))); } private void addDeleteColumnStm(TableDefinition table, ColumnDefinition columnDefinition) { statements.add(new DropColumnStatement(table, columnDefinition)); } private void addDeleteColumn(List<ColumnDefinition> columns) { columns.add(new ColumnDefinition(DataType.DATETIME, "deleted", " DEFAULT null")); } private void addUniqueGroupName() { statements.add(new DirectStatement( "delete n1 from groupDef n1, groupDef n2 WHERE n1._id >n2._id AND n1.name = n2.name")); statements.add(new DirectStatement("ALTER TABLE `groupDef` \n" + "ADD UNIQUE INDEX `groupname_UNIQUE` (`name` ASC);")); } private void addUniquePersonGroup() { statements.add(new DirectStatement( "delete n1 from persongroup n1, persongroup n2 WHERE n1._id >n2._id AND n1.person_id = n2.person_id AND n1.group_id = n2.group_id;")); add("ALTER TABLE `persongroup` \n" + "ADD UNIQUE INDEX `unique_person_group` (`person_id` ASC, `group_id` ASC);"); } private void add(String sql) { statements.add(new DirectStatement(sql)); } private void addAuthColumns(TableDefinition... defs) { for (TableDefinition t : defs) { statements.add(new AddColumnStatement(t, new ColumnDefinition( DataType.TEXT, "username", "DEFAULT NULL"))); statements.add(new AddColumnStatement(t, new ColumnDefinition( DataType.TEXT, "password", "DEFAULT NULL"))); } } private void addDeletedColumn(TableDefinition... defs) { for (TableDefinition t : defs) { statements.add(new AddColumnStatement(t, new ColumnDefinition( DataType.DATETIME, "deleted", " DEFAULT null"))); } } private void createWith(TableDefinition... defs) { for (TableDefinition d : defs) { statements.add(new CreateTableStatement(d)); } } private void createAll() { List<ColumnDefinition> columns = createPersonColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); person = new TableDefinition("person", dbType, columns); columns = createContactColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); contact = new TableDefinition("contact", dbType, columns); columns = createRelativeColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); relative = new TableDefinition("relative", dbType, columns); columns = createAdressColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); adress = new TableDefinition("adress", dbType, columns); columns = createAttendanceColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); attendance = new TableDefinition("ATTENDANCE".toLowerCase(), dbType, columns); ColumnDefinition colVersion = new ColumnDefinition(DataType.INTEGER, "version", "NOT NULL"); columns = new ArrayList<ColumnDefinition>(); columns.add(colVersion); version = new TableDefinition("version", dbType, columns); columns = createDeletedEntriesColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); deletedEntries = new TableDefinition("deleted_entries", dbType, columns); columns = createGroupColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); group = new TableDefinition("groupDef", dbType, columns); columns = createPersonGroupColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); persongroup = new TableDefinition("persongroup", dbType, columns); columns = createStartpassColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); startpass = new TableDefinition("startpaesse", dbType, columns); columns = createStartrechtColumns(); addCreateChangeColumn(columns); addDeleteColumn(columns); startrecht = new TableDefinition("startpass_startrechte", dbType, columns); allTables = Arrays.asList(person, contact, relative, adress, attendance, version, deletedEntries, group, persongroup, startpass, startrecht); } private List<ColumnDefinition> createStartrechtColumns() { ColumnDefinition colStartpassId = new ColumnDefinition(DataType.INTEGER, "startpass_id", "NOT NULL"); ColumnDefinition colStartRechtVerein = new ColumnDefinition( DataType.VARCHAR100, "verein_name", "NOT NULL"); ColumnDefinition colStartRechtFachgebiet = new ColumnDefinition( DataType.VARCHAR25, "fachgebiet", "NOT NULL"); ColumnDefinition colGueltigVon = new ColumnDefinition(DataType.DATETIME, "startrecht_beginn", "NOT NULL"); ColumnDefinition colGueltigBis = new ColumnDefinition(DataType.DATETIME, "startrecht_ende", "NOT NULL"); List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(colStartpassId); columns.add(colStartRechtVerein); columns.add(colStartRechtFachgebiet); columns.add(colGueltigVon); columns.add(colGueltigBis); return columns; } private List<ColumnDefinition> createStartpassColumns() { ColumnDefinition colPersonId = new ColumnDefinition(DataType.INTEGER, PERSON_ID_FK_NAME, "NOT NULL"); ColumnDefinition colStartpassNr = new ColumnDefinition( DataType.VARCHAR25, "startpass_nr", "NOT NULL UNIQUE"); List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(colPersonId); columns.add(colStartpassNr); return columns; } private List<ColumnDefinition> createGroupColumns() { ColumnDefinition colTableName = new ColumnDefinition( DataType.VARCHAR255, "name", "NOT NULL UNIQUE"); List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(colTableName); return columns; } private List<ColumnDefinition> createPersonGroupColumns() { ColumnDefinition colPersonId = new ColumnDefinition(DataType.INTEGER, PERSON_ID_FK_NAME, "NOT NULL"); ColumnDefinition colGroupId = new ColumnDefinition(DataType.INTEGER, "group_id", "NOT NULL"); List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(colPersonId); columns.add(colGroupId); return columns; } private List<ColumnDefinition> createDeletedEntriesColumns() { ColumnDefinition colTableName = new ColumnDefinition(DataType.VARCHAR25, "tablename", "NOT NULL"); ColumnDefinition colEntryId = new ColumnDefinition(DataType.INTEGER, "entryId", "NOT NULL"); List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(colTableName); columns.add(colEntryId); return columns; } private List<ColumnDefinition> createAttendanceColumns() { ColumnDefinition colOnDate = new ColumnDefinition(DataType.DATETIME, "on_date"); ColumnDefinition colPersonId = new ColumnDefinition(DataType.INTEGER, PERSON_ID_FK_NAME, "NOT NULL"); List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(colOnDate); columns.add(colPersonId); return columns; } private List<ColumnDefinition> createAdressColumns() { ColumnDefinition colAdress1 = new ColumnDefinition(DataType.TEXT, "adress1"); ColumnDefinition colAdress2 = new ColumnDefinition(DataType.TEXT, "adress2"); ColumnDefinition colPlz = new ColumnDefinition(DataType.TEXT, "plz"); ColumnDefinition colCity = new ColumnDefinition(DataType.TEXT, "city"); ColumnDefinition colPersonId = new ColumnDefinition(DataType.INTEGER, PERSON_ID_FK_NAME, "NOT NULL"); List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(colAdress1); columns.add(colAdress2); columns.add(colPlz); columns.add(colCity); columns.add(colPersonId); return columns; } private List<ColumnDefinition> createRelativeColumns() { List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add( new ColumnDefinition(DataType.INTEGER, "person1", "NOT NULL")); columns.add( new ColumnDefinition(DataType.INTEGER, "person2", "NOT NULL")); columns.add(new ColumnDefinition(DataType.TEXT, "TO_PERSON2_RELATION")); columns.add(new ColumnDefinition(DataType.TEXT, "TO_PERSON1_RELATION")); return columns; } private List<ColumnDefinition> createContactColumns() { List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(new ColumnDefinition(DataType.TEXT, "type", "NOT NULL")); columns.add(new ColumnDefinition(DataType.TEXT, "value")); columns.add(new ColumnDefinition(DataType.INTEGER, PERSON_ID_FK_NAME, "NOT NULL")); return columns; } private List<ColumnDefinition> createPersonColumns() { List<ColumnDefinition> columns = new ArrayList<ColumnDefinition>(); columns.add(new ColumnDefinition(DataType.TEXT, "prename", "NOT NULL")); columns.add(new ColumnDefinition(DataType.TEXT, "surname")); columns.add(new ColumnDefinition(DataType.DATETIME, "birth")); columns.add(new ColumnDefinition(DataType.TEXT, "username", "DEFAULT NULL")); columns.add(new ColumnDefinition(DataType.TEXT, "password", "DEFAULT NULL")); return columns; } private void addCreateChangeColumn(List<ColumnDefinition> columns) { columns.add(new ColumnDefinition(DataType.DATETIME, "changed")); columns.add(new ColumnDefinition(DataType.DATETIME, "created")); } public void executeOn(Database db) throws SQLException { for (MyStatement stm : statements) { String sql = stm.getSql(); if (logger.isDebugEnabled()) { logger.debug(sql); } try { db.execSQL(sql); } catch (SQLException ex) { throw new SQLException("Error on: " + sql, ex); } } String sql; if (fromVersion == 0) { sql = "INSERT INTO version(version) VALUES (" + LATEST_VERSION + ")"; } else { sql = "UPDATE version SET version=" + LATEST_VERSION; } if (fromVersion != LATEST_VERSION) { if (logger.isDebugEnabled()) { logger.debug(sql); } db.execSQL(sql); if (logger.isInfoEnabled()) { logger.info("Updated database to version " + LATEST_VERSION); } } else { if (logger.isInfoEnabled()) { logger.info("Database was up to date."); } } } private class DropColumnStatement extends AddColumnStatement { public DropColumnStatement(TableDefinition def, ColumnDefinition col) { super(def, col); } @Override public String getSql() { return de.kreth.dbmanager.DbManager.createSqlDropColumns(def, col); } } private class AddColumnStatement extends CreateTableStatement { protected ColumnDefinition col; public AddColumnStatement(TableDefinition def, ColumnDefinition col) { super(def); this.col = col; } @Override public String getSql() { return de.kreth.dbmanager.DbManager.createSqlAddColumns(def, col); } @Override public String toString() { return getClass().getSimpleName() + " " + col + " to " + def; } } private class AddConstraint extends CreateTableStatement { private UniqueConstraint constraint; public AddConstraint(TableDefinition def, UniqueConstraint constraint) { super(def); this.constraint = constraint; } @Override public String getSql() { return de.kreth.dbmanager.DbManager.createUniqueConstraint(def, constraint); } } private class CreateTableStatement implements MyStatement { protected TableDefinition def; public CreateTableStatement(TableDefinition def) { this.def = def; } @Override public String getSql() { return de.kreth.dbmanager.DbManager.createSqlStatement(def); } @Override public String toString() { return getClass().getSimpleName() + " " + def; } } private class DirectStatement implements MyStatement { private String sql; public DirectStatement(String sql) { super(); this.sql = sql; } @Override public String getSql() { return sql; } @Override public String toString() { return sql; } } private interface MyStatement { String getSql(); } }
28.918797
138
0.735115
56da5c0a0d1eca2dd06c710132737ca5ffdf0b53
158
ts
TypeScript
unified-tasklist-angular-common/projects/common/src/lib/usertaskform.component.ts
phactum-at/unified-tasklist-angular-showcase
4ee5ee683b4807e4fe4819403e5af437de222805
[ "Apache-2.0" ]
2
2021-04-28T16:48:28.000Z
2021-09-28T02:59:00.000Z
unified-tasklist-angular-common/projects/common/src/lib/usertaskform.component.ts
phactum-at/unified-tasklist-angular-showcase
4ee5ee683b4807e4fe4819403e5af437de222805
[ "Apache-2.0" ]
null
null
null
unified-tasklist-angular-common/projects/common/src/lib/usertaskform.component.ts
phactum-at/unified-tasklist-angular-showcase
4ee5ee683b4807e4fe4819403e5af437de222805
[ "Apache-2.0" ]
1
2021-04-28T17:22:19.000Z
2021-04-28T17:22:19.000Z
export interface UserTaskFormComponent { taskId: string; tenant: string; formKey: string; readOnly: boolean; task: any; // type has to be defined }
19.75
40
0.71519
f07b043e271471be2b35cb22503d63d12af2440e
3,111
py
Python
detection.py
aar0npham/FuryColorDetection
5a8ae6a5f9dc8ccf42c78d4f29038e4e6889a858
[ "Apache-2.0" ]
null
null
null
detection.py
aar0npham/FuryColorDetection
5a8ae6a5f9dc8ccf42c78d4f29038e4e6889a858
[ "Apache-2.0" ]
null
null
null
detection.py
aar0npham/FuryColorDetection
5a8ae6a5f9dc8ccf42c78d4f29038e4e6889a858
[ "Apache-2.0" ]
null
null
null
# import modules import numpy as np import argparse import cv2 # construct the argument parse and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-b", "--buffer", type=int, default=64, help="max buffer size") args = vars(ap.parse_args()) # define the lower and upper boundaries of the colors in the HSV color space lower = {'red': (166, 84, 141), 'green': (66, 122, 129), 'blue': (97, 100, 117), 'yellow': (23, 59, 119), 'orange': (0, 50, 80)} # assign new item lower['blue'] = (93, 10, 0) upper = {'red': (186, 255, 255), 'green': (86, 255, 255), 'blue': (117, 255, 255), 'yellow': (54, 255, 255), 'orange': (20, 255, 255)} # define standard colors for circle around the object colors = {'red': (0, 0, 255), 'green': (0, 255, 0), 'blue': (255, 0, 0), 'yellow': (0, 255, 217), 'orange': (0, 140, 255)} camera = cv2.VideoCapture(0 + cv2.CAP_DSHOW) # keep looping while True: # grab the current frame (grabbed, frame) = camera.read() # resize the frame, blur it, and convert it to the HSV # color space frame = cv2.resize(frame, (640, 480)) blurred = cv2.GaussianBlur(frame, (11, 11), 0) hsv = cv2.cvtColor(blurred, cv2.COLOR_BGR2HSV) # for each color in dictionary check object in frame for key, value in upper.items(): # construct a mask for the color from dictionary`1, then perform # a series of dilations and erosions to remove any small # blobs left in the mask kernel = np.ones((9, 9), np.uint8) mask = cv2.inRange(hsv, lower[key], upper[key]) mask = cv2.morphologyEx(mask, cv2.MORPH_OPEN, kernel) mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel) # find contours in the mask and initialize the current # (x, y) center of the ball cnts = cv2.findContours(mask.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)[-2] center = None # only proceed if at least one contour was found if len(cnts) > 0: # find the largest contour in the mask, then use # it to compute the minimum enclosing circle and # centroid c = max(cnts, key=cv2.contourArea) ((x, y), radius) = cv2.minEnclosingCircle(c) M = cv2.moments(c) center = (int(M["m10"] / M["m00"]), int(M["m01"] / M["m00"])) # only proceed if the radius meets a minimum size. Correct this value for your obect's size if radius > 0.5: # draw the circle and centroid on the frame, # then update the list of tracked points cv2.circle(frame, (int(x), int(y)), int(radius), colors[key], 2) cv2.putText(frame, key, (int(x - radius), int(y - radius)), cv2.FONT_HERSHEY_SIMPLEX, 0.6, colors[key], 2) # show the frame to our screen cv2.imshow("Frame", frame) key = cv2.waitKey(1) & 0xFF # if the 'q' key is pressed, stop the loop if key == ord("q"): break # cleanup the camera and close any open windows camera.release() cv2.destroyAllWindows()
40.402597
175
0.603664
0af1172a08a84b672af585890eed939c68c3681c
1,879
asm
Assembly
sem1/asc/Quad_10/main.asm
itsbratu/bachelor
b3bcae07fc8297fb0557a4bf752b20c6104c2563
[ "MIT" ]
null
null
null
sem1/asc/Quad_10/main.asm
itsbratu/bachelor
b3bcae07fc8297fb0557a4bf752b20c6104c2563
[ "MIT" ]
null
null
null
sem1/asc/Quad_10/main.asm
itsbratu/bachelor
b3bcae07fc8297fb0557a4bf752b20c6104c2563
[ "MIT" ]
null
null
null
bits 32 global start extern exit , printf import exit msvcrt.dll import printf msvcrt.dll segment data use32 class=data s dq 85aa145cf23ca213h bit db -1 nr dd 0 copie dd -1 mesaj_afisare db "Numarul de 10 din s este : %d" , 0 segment code use32 class=code start: mov esi , s mov ecx , 2 parcurgere: lodsd mov dword[copie] , ecx mov ecx , 32 shiftare: xor ebx , ebx shr eax , 1 adc ebx , 0 cmp ebx , 1 je might_be xor edx , edx mov byte[bit] , dl jmp final might_be: xor edx , edx mov dl , byte[bit] cmp dl , 0 je increment xor edx , edx mov dl , -1 mov byte[bit] , dl jmp final increment: xor edx , edx mov edx ,dword[nr] inc edx mov dword[nr] , edx xor edx , edx mov dl , -1 mov byte[bit] , dl final: loop shiftare mov ecx , dword[copie] loop parcurgere xor eax , eax mov eax , dword[nr] push dword eax push dword mesaj_afisare call [printf] add esp , 4 * 2 push dword 0 call [exit]
25.391892
56
0.335285
30b3dbfe19e1e12ff4423e4b5e90108f11a3e686
1,176
dart
Dart
lib/model/news.dart
vassilux/whatsupworld
df83240489187aae73a92adf54bc0d034b45e6ab
[ "MIT" ]
null
null
null
lib/model/news.dart
vassilux/whatsupworld
df83240489187aae73a92adf54bc0d034b45e6ab
[ "MIT" ]
null
null
null
lib/model/news.dart
vassilux/whatsupworld
df83240489187aae73a92adf54bc0d034b45e6ab
[ "MIT" ]
null
null
null
class News { String status; String error; int totalResults; List<Article> articles; News({this.status, this.articles}); News.fromJson(Map<String, dynamic> newsJson) : status = newsJson['status'], articles = List.from(newsJson['articles']) .map((article) => Article.fromJson(article)) .toList(), totalResults = newsJson['totalResults'], error = newsJson['error']; } class Article { Source source; String author; String title; String description; String urlToImage; String url; String publishedAt; String content; Article.fromJson(Map<String, dynamic> articleJson) : source = Source.fromJson(articleJson['source']), author = articleJson['author'], title = articleJson['title'], description = articleJson['description'], urlToImage = articleJson['urlToImage'], url = articleJson['url'], publishedAt = articleJson['publishedAt'], content = articleJson['content']; } class Source { String id; String name; Source.fromJson(Map<String, dynamic> sourceJson) : id = sourceJson['id'], name = sourceJson['name']; }
25.021277
56
0.637755
e7e9d221f1fcec4aa818bff540aa8cfe75c86d5f
1,026
py
Python
examples/example_wait_for.py
plun1331/discord.py-components-1
a31b1a0cfbd31b98d01e910ed905c9c70afe0c3e
[ "MIT" ]
1
2021-08-07T18:40:36.000Z
2021-08-07T18:40:36.000Z
examples/example_wait_for.py
plun1331/discord.py-components-1
a31b1a0cfbd31b98d01e910ed905c9c70afe0c3e
[ "MIT" ]
null
null
null
examples/example_wait_for.py
plun1331/discord.py-components-1
a31b1a0cfbd31b98d01e910ed905c9c70afe0c3e
[ "MIT" ]
null
null
null
from discord.ext.commands import Bot from discord_components import DiscordComponents, Button, ButtonStyle, InteractionType from asyncio import TimeoutError bot = Bot("!") @bot.event async def on_ready(): DiscordComponents(bot) print(f"Logged in as {bot.user}!") @bot.command() async def waitforclick(ctx): m = await ctx.send( "Buttons waiting for a click", components=[ Button(style=ButtonStyle.red, label="Click Me!"), ], ) def check(res): return ctx.author == res.user and res.channel == ctx.channel try: res = await bot.wait_for("button_click", check=check, timeout=15) await res.respond( type=InteractionType.ChannelMessageWithSource, content=f"{res.component.label} pressed" ) except TimeoutError: await m.edit( "Prompt timed out!", components=[ Button(style=ButtonStyle.red, label="Timed out!", disabled=True), ], ) bot.run("TOKEN")
24.428571
99
0.621832
e52114bb1849e0f24a0150c69bc980484561caee
1,710
ts
TypeScript
src/module/account/dto/create-account.dto.ts
leoan96/cinema-account-microservice
927ffa4332fe4f13550c0371936de422a9e68309
[ "CC0-1.0" ]
null
null
null
src/module/account/dto/create-account.dto.ts
leoan96/cinema-account-microservice
927ffa4332fe4f13550c0371936de422a9e68309
[ "CC0-1.0" ]
null
null
null
src/module/account/dto/create-account.dto.ts
leoan96/cinema-account-microservice
927ffa4332fe4f13550c0371936de422a9e68309
[ "CC0-1.0" ]
null
null
null
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { IsEmail, IsIn, IsOptional, IsString, Length, MaxLength, } from 'class-validator'; // custom validation (https://dev.to/avantar/custom-validation-with-database-in-nestjs-gao) export class CreateAccountDTO { @ApiProperty({ description: 'first name', type: 'string', example: 'Arvy' }) @IsString() @Length(0, 747) firstName: string; @ApiProperty({ description: 'last name', type: 'string', example: 'Pomfrey', }) @IsString() @Length(0, 747) lastName: string; @ApiProperty({ description: 'password', type: 'string', example: '2YAphqhvpu&!cFq5zL27Bwe*D@Xpi9', }) @IsString() @Length(8, 50) password: string; @ApiProperty({ description: 'email', type: 'string', example: 'apomfrey0@paypal.com', }) @IsEmail() @MaxLength(50) email: string; @ApiProperty({ description: 'phone', type: 'string', example: '233-117-9340', }) @IsString() @Length(11, 12) phone: string; @ApiProperty({ description: 'gender', type: 'string', enum: ['female', 'male'], example: 'female', }) @IsString() @IsIn(['female', 'male']) gender: string; @ApiPropertyOptional({ description: 'avatar', type: 'string', example: 'https://image.flaticon.com/icons/png/512/2922/2922688.png', }) @IsString() @MaxLength(200) @IsOptional() avatar: string; @ApiPropertyOptional({ description: 'language', type: 'string', example: 'en', }) @IsString() @IsOptional() @IsIn(['en', 'cn', 'ms']) language?: string; } export class CreateAccountRoleDTO extends CreateAccountDTO { role: [string]; }
19.431818
91
0.626901
dd7ed8fa24be71679abdfbade0472adb69f8ae39
3,708
go
Go
pkg/proxy/proxy.go
reefassistant/apex-proxy
6ca08732ddf7b9bc2f3bc07d04589f367e4a4469
[ "Apache-2.0" ]
null
null
null
pkg/proxy/proxy.go
reefassistant/apex-proxy
6ca08732ddf7b9bc2f3bc07d04589f367e4a4469
[ "Apache-2.0" ]
null
null
null
pkg/proxy/proxy.go
reefassistant/apex-proxy
6ca08732ddf7b9bc2f3bc07d04589f367e4a4469
[ "Apache-2.0" ]
1
2022-01-27T09:46:09.000Z
2022-01-27T09:46:09.000Z
package proxy import ( "fmt" "net" "net/http" "net/http/httputil" "net/url" "go.skymeyer.dev/app" "go.uber.org/zap" "go.reefassistant.com/apex-proxy/pkg/logger" ) var ( XMLEndpoints = []string{ "/cgi-bin/datalog.xml", "/cgi-bin/outlog.xml", "/cgi-bin/status.xml", } JSONEndpoints = []string{ "/cgi-bin/datalog.json", "/cgi-bin/outlog.json", "/cgi-bin/status.json", } localhostRanges = []string{ "127.0.0.0/8", "::1/128", } privateRanges = []string{ "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7", // RFC-4193 Unique Local Addresses "fec0::/10", // RFC-3879 Site Local Addresses (deprecated) } ) // New creates a new Apex proxy handler. func New(endpoint string, opts ...ProxyOption) (*Apex, error) { // Default proxy setup apex := &Apex{ acesssListCacheSize: 1000, allowedURLs: make(map[string]struct{}), allowedIPs: localhostRanges, } // Apply options for _, opt := range opts { opt(apex) } // Parse Apex endpoint URL target, err := url.Parse(endpoint) if err != nil { return nil, err } // Setup IP access list accessList, err := NewAccessList(apex.allowedIPs, apex.acesssListCacheSize) if err != nil { return nil, err } apex.accessList = accessList // Setup reverse proxy apex.proxy = httputil.NewSingleHostReverseProxy(target) apex.proxy.ModifyResponse = apex.modifyResponse apex.proxy.ErrorHandler = apex.errorHandler return apex, nil } // Apex proxy handler. type Apex struct { proxy *httputil.ReverseProxy accessList *AccessList acesssListCacheSize int allowedIPs []string allowedURLs map[string]struct{} } // ServeHTTP implements http.Handler. func (a *Apex) ServeHTTP(w http.ResponseWriter, r *http.Request) { log := logger.Context(r.Context()) w.Header().Set("server", fmt.Sprintf("apex-proxy %s", app.Version)) // Derive source IP from reported remote address, no proxy support source, _, err := net.SplitHostPort(r.RemoteAddr) if err != nil { http.Error(w, "forbidden", http.StatusForbidden) log.Error("no remote ip found") return } // Is source IP is allowed ? if !a.accessList.Contains(source) { http.Error(w, "forbidden", http.StatusForbidden) log.Warn("ip blocked", zap.String("source", source)) return } log.Debug("ip allowed", zap.String("source", source)) // Is method allowed ? if r.Method != "GET" { http.Error(w, "forbidden", http.StatusForbidden) log.Warn("method blocked", zap.String("method", r.Method)) return } // Is URL allowed ? if _, ok := a.allowedURLs[r.URL.Path]; !ok { http.Error(w, "forbidden", http.StatusForbidden) log.Warn("url blocked", zap.String("url", r.URL.Path)) return } log.Debug("url allowed", zap.String("url", r.URL.Path)) // Handle the request through the reverse proxy a.proxy.ServeHTTP(w, r) } // httputil.ReverseProxy.ErrorHandler implementation func (a *Apex) errorHandler(w http.ResponseWriter, r *http.Request, err error) { logger.Context(r.Context()).Error( "proxy error", zap.String("error", err.Error()), ) rid, _ := logger.RequestIDFrom(r.Context()) http.Error(w, fmt.Sprintf("request-id=%s", rid), http.StatusServiceUnavailable) } // httputil.ReverseProxy.ModifyResponse implementation func (a *Apex) modifyResponse(resp *http.Response) error { // TODO: implement caching and/or add rate limiting per source ip // TODO: add data obfuscation like hiding serial number and software version return nil } // addURLs is a helper to initialize the allowed URLs into a map. func (a *Apex) addURLs(urls []string) { for _, u := range urls { if u, err := url.Parse(u); err == nil { a.allowedURLs[u.Path] = struct{}{} } } }
24.556291
80
0.675836
96ff1e14dd62ae9f3fd1319f27c27403b94e479d
6,509
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_1154.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_1154.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_1154.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x6110, %rsi lea addresses_normal_ht+0x18e10, %rdi clflush (%rdi) nop nop nop dec %r8 mov $66, %rcx rep movsq xor $22955, %rsi lea addresses_A_ht+0xc10, %rdx nop nop nop nop nop inc %r8 movl $0x61626364, (%rdx) nop nop dec %r8 lea addresses_A_ht+0xea10, %rdi clflush (%rdi) nop nop nop nop cmp %r14, %r14 mov (%rdi), %ecx nop and %r8, %r8 lea addresses_UC_ht+0x4190, %r14 nop nop nop nop and $12673, %rcx movb $0x61, (%r14) nop sub %rcx, %rcx lea addresses_WC_ht+0x1be10, %r8 nop nop xor %rcx, %rcx movw $0x6162, (%r8) nop nop nop nop add $348, %r10 lea addresses_WC_ht+0xd99c, %rcx nop nop and $18763, %r10 mov $0x6162636465666768, %rdi movq %rdi, %xmm4 movups %xmm4, (%rcx) nop nop nop sub $45645, %r8 lea addresses_WT_ht+0x2530, %rcx nop nop nop sub $60132, %rsi mov (%rcx), %r14 and $12085, %r8 lea addresses_A_ht+0x1c94c, %r10 nop nop nop cmp $23336, %rcx movb (%r10), %dl nop nop nop and %rdi, %rdi lea addresses_WC_ht+0x15e10, %rdi nop nop cmp $23370, %rdx movb $0x61, (%rdi) nop nop nop inc %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r15 push %r8 push %r9 push %rdi push %rdx // Store lea addresses_D+0x13610, %r15 nop nop nop nop xor $27061, %rdi movb $0x51, (%r15) nop nop nop nop inc %rdx // Load lea addresses_A+0xe3cd, %r10 nop sub %r14, %r14 movb (%r10), %r15b nop nop nop nop and $60938, %r15 // Faulty Load lea addresses_D+0x8610, %r8 nop nop nop nop inc %rdx movaps (%r8), %xmm4 vpextrq $1, %xmm4, %r9 lea oracles, %r10 and $0xff, %r9 shlq $12, %r9 mov (%r10,%r9,1), %r9 pop %rdx pop %rdi pop %r9 pop %r8 pop %r15 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 11, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
35.375
2,999
0.653403
59f50c943a89adac268c5cddaf851ca4ae279a91
507
sql
SQL
Books.sql
tomztz/SQL-Pet-Clinic
d0013bb78b31212c84f004476023a257e1f0bb76
[ "MIT" ]
null
null
null
Books.sql
tomztz/SQL-Pet-Clinic
d0013bb78b31212c84f004476023a257e1f0bb76
[ "MIT" ]
null
null
null
Books.sql
tomztz/SQL-Pet-Clinic
d0013bb78b31212c84f004476023a257e1f0bb76
[ "MIT" ]
null
null
null
CREATE TABLE PETCLINIC.books ( Appointment_id int NOT NULL, Client_id int NOT NULL, PRIMARY KEY (Appointment_id,Client_id), UNIQUE KEY Appointment_id_UNIQUE (Appointment_id), UNIQUE KEY Client_id_UNIQUE (Client_id), FOREIGN KEY (Appointment_id) REFERENCES appointment (Appointment_id), FOREIGN KEY (Client_id) REFERENCES client (Client_id) ); INSERT INTO books(Appointment_id,Client_id) VALUES (10000001,0001), (10000002,0002), (10000003,0003), (10000004,0004), (10000005,0005);
29.823529
71
0.761341
9bf43095de1588d9134897ef61f668f76c47e40d
4,971
js
JavaScript
modules/faq.js
ehsansayrafi/live-countdown-bot
2eea406940f80098f7f431c10f463d27411e8417
[ "MIT" ]
34
2020-08-14T15:10:48.000Z
2022-02-21T00:56:22.000Z
modules/faq.js
ehsansayrafi/live-countdown-bot
2eea406940f80098f7f431c10f463d27411e8417
[ "MIT" ]
33
2020-05-17T06:41:57.000Z
2022-03-26T04:05:47.000Z
modules/faq.js
ehsansayrafi/live-countdown-bot
2eea406940f80098f7f431c10f463d27411e8417
[ "MIT" ]
42
2020-07-13T08:26:45.000Z
2022-03-31T17:29:53.000Z
export const faq = { del: { q: "How do I delete a countdown?", a: "Just delete the message sent by the bot.", }, exact: { q: "Why does `!countdown 1day` not count down 24 hours?", a: "This is because countdowns end exactly at 12AM GMT. If you'd like exactly 24 hours, use `!countdown 24hours`", }, delmsg: { q: "Can the bot automatically delete the original message?", a: "Yes, you need to give it the `MANAGE_MESSAGES` permission.", }, tz: [ { q: "What is the default timezone of the bot?", a: "GMT/UTC", by: "TheMissing';'#6957", }, { q: "Format to define your time-zone with reference to UTC/GMT", a: `\`UTC +/- 0x00\` 'x' being your zone offset. Example for a countdown in: *GMT+5: \`!countdown 7:30 pm GMT+0500\`* *UTC-6: \`!countdown 7:30 pm UTC-0600\`*`, by: "Cerberus#9388", }, ], restrict: [ { q: "Can you restrict bot usage to specific roles?", a: "No.", }, { q: "How can you restrict bot usage for now?", a: "Restrict the bot to a specific channel and only allow certain roles permissions to post in it.", by: "Cerberus#9388", }, ], "1hr": { q: "Is the EST or CET or PT timezones 1 hour off?", a: "No, use EDT or CEST or PDT instead.", }, prefix: { q: "How do I change the prefix for the bot?", a: `Type the following command: \`!setprefix\` followed by whatever you want your prefix to be. For example, if I wanted my prefix to be \`$\`, I would type \`!setprefix $\``, by: "Loco Musician#0801", }, timeleft: { q: "How do I see the time left?", a: "The bot edits the original message as the time passes by.", }, max: { q: "What is the maximum number of countdowns I can have?", a: "You can have 5 inline countdowns per message, and you get 2 messages per channel, so that's a total of 10 countdowns per channel.", }, tagrole: { q: "How do I tag a role once the countdown is over?", a: "Syntax: `!countdown tag ROLE_NAME DATE/TIME`", }, seconds: { q: "Can the bot show seconds?", a: "No, as this would violate Discord's API rate limits.", }, precision: { q: "Why does the bot only show days/hours?", a: "As the countdown grows nearer, the precision improves. If the countdown is less than:\n" + `2 days -> show minutes 2 weeks -> show hours else show weeks/days`, }, simple: { q: "I hear you're looking for a simple request structure.", a: "Simple request structures can look as follows:\n" + "```!countdown <#> <minutes/hours/days/months>```\n" + "```!countdown <tag> <month> <day>, <time> <zone>```\n\n" + "Realistic examples look as follows:\n" + "```!countdown 5days```\n" + "```!countdown tagme June 25, 3:00 PM CDT```", }, complex: { q: "I hear you're looking for a complex request structure.", a: "Complex request structures can look as follows:\n" + "```<txt>!!countdown <#> <minutes/hours/days/months>!<txt>```\n" + "```<txt>!!countdown <tag> <month> <day>, <time> <zone>!<txt>```\n\n" + "Realistic examples look as follows:\n" + "```My countdown: !!countdown 5days! Yay!```\n" + "```My countdown: !!countdown June 25, 3:00 PM CDT! Yay!```\n\n", }, qna1: { q: "Need more info? You've come to the right place! Here's some answers to commonly asked questions. Check page 2 if you don't find your answer here.", a: "~ You can stop or delete the countdown by deleting the message the bot reply to your request.\n" + "~ Sometimes the bot is looking for 24 hours instead of a day.\n" + "~ Give the bot `MANAGE_MESSAGES` to allow it to delete your requests. \n" + "~ The bots default time zone is UTC but can be modified in the countdown request.\n" + "~ The bot can only be made role specific by setting up a channel that only people with a certain role can type in.\n" + "~ Daylight savings applies to timezones (CST/CDT).", }, qna2: { q: "Didn't find your answer? Its sure to be here somewhere..", a: "~ Change prefix using `!setprefix` followed by your desired prefix.\n" + "~ The message the bot replies with is the countdown, pin it or make the bot its own channel so it doesnt get lost.\n" + "~ You can have 5 inline countdowns per post. Up to 2 posts per channel. For a total of 10 per channel.\n" + "~ To tag people use `tag Username`. Sometimes @mentions dont work.\n" + "~ Due to rate limits the bot cannot show seconds.\n" + "~ The bot reduces update intervals towards the middle of countdowns. It's still spot on, it just doesn't update as often when people are likely not looking at it.", }, qna3: { q: "Still didn't find your answer?", a: "Head over to our discord and someone will be able to assist you.\n" + "https://discord.com/invite/b2fY4z4xBY", }, };
39.768
171
0.615369
227a33052abf93699d5cc03bdd3e897e8d53d582
2,052
htm
HTML
_data/Vol08_Ch0401-0429/HRS0428/HRS_0428-0805.htm
bronsonavila/hrsscraper
ecbb1048ab284af361fae78adb481eff554b067a
[ "MIT" ]
1
2019-02-22T10:35:29.000Z
2019-02-22T10:35:29.000Z
_data/Vol08_Ch0401-0429/HRS0428/HRS_0428-0805.htm
bronsonavila/hrsscraper
ecbb1048ab284af361fae78adb481eff554b067a
[ "MIT" ]
null
null
null
_data/Vol08_Ch0401-0429/HRS0428/HRS_0428-0805.htm
bronsonavila/hrsscraper
ecbb1048ab284af361fae78adb481eff554b067a
[ "MIT" ]
null
null
null
<div class="WordSection1"> <p class="RegularParagraphs"> <b>§428-805 Articles of termination.</b> (a) At any time after dissolution and winding up, and when all debts, liabilities, and obligations of the limited liability company have been paid and discharged, or adequate provision has been made therefor, and all remaining property and assets of the limited liability company, if any, have been distributed to its members, a limited liability company may terminate its existence by delivering for filing with the director articles of termination stating:</p> <p class="1Paragraph"> (1) The name of the company;</p> <p class="1Paragraph"> (2) The dates the notice of intent to terminate was published pursuant to section 428-808 and the name of the newspaper publishing the notice, or a statement that publication was not made;</p> <p class="1Paragraph"> (3) That all debts, obligations, and liabilities of the limited liability company have been paid and discharged or that adequate provision has been made therefor;</p> <p class="1Paragraph"> (4) That all of the remaining property and assets of the limited liability company, if any, have been distributed among its members in accordance with their respective rights and interests;</p> <p class="1Paragraph"> (5) That there are no suits pending against the limited liability company in any court, or that adequate provision has been made for the satisfaction of any judgment, order, or decree which may be entered against it in any pending suit; and</p> <p class="1Paragraph"> (6) That the company's business has been wound up and the legal existence of the company has been terminated.</p> <p class="RegularParagraphs"> (b) The existence of a limited liability company is terminated upon the filing of the articles of termination or upon a later effective date which shall be not later than thirty days after the date of filing of the articles of termination, if specified in the articles of termination. [L 1996, c 92, pt of §1; am L 2000, c 219, §74]</p> <p class="RegularParagraphs"></p> </div>
186.545455
533
0.780214
3be797c0809a768d5597727eae404278a77b1183
469
h
C
sonarr-ios/Navigation/Controllers/SNRSheetNavigationViewController.h
hhs4harry/sonarr-ios
9ebefee400f58ecbfd4beb53d4ffdd63d0a71f12
[ "MIT" ]
2
2017-03-28T06:48:01.000Z
2020-02-08T07:31:35.000Z
sonarr-ios/Navigation/Controllers/SNRSheetNavigationViewController.h
hhs4harry/sonarr-ios
9ebefee400f58ecbfd4beb53d4ffdd63d0a71f12
[ "MIT" ]
null
null
null
sonarr-ios/Navigation/Controllers/SNRSheetNavigationViewController.h
hhs4harry/sonarr-ios
9ebefee400f58ecbfd4beb53d4ffdd63d0a71f12
[ "MIT" ]
null
null
null
// // SNRSheetNavigationViewController.h // sonarr-ios // // Created by Harry Singh on 30/03/17. // Copyright © 2017 Harry Singh. All rights reserved. // #import <UIKit/UIKit.h> #import "SNRNavigationViewController.h" @class MZFormSheetContentSizingNavigationControllerAnimator; @interface SNRSheetNavigationViewController : SNRNavigationViewController @property (nonatomic, strong, readonly) MZFormSheetContentSizingNavigationControllerAnimator *animator; @end
27.588235
103
0.808102
e8573c17dd3f4a4e170ed6f72139687905d6f693
751
kt
Kotlin
kryptoprefs/src/main/java/com/kryptoprefs/preferences/KryptoPreferences.kt
rumboalla/KryptoPrefs
89f3fb446db36dba2c890201d16589c65f59f5c9
[ "MIT" ]
34
2019-11-12T11:58:54.000Z
2021-12-16T14:22:31.000Z
kryptoprefs/src/main/java/com/kryptoprefs/preferences/KryptoPreferences.kt
rumboalla/KryptoPrefs
89f3fb446db36dba2c890201d16589c65f59f5c9
[ "MIT" ]
1
2021-06-11T03:13:29.000Z
2021-06-11T03:13:29.000Z
kryptoprefs/src/main/java/com/kryptoprefs/preferences/KryptoPreferences.kt
rumboalla/KryptoPrefs
89f3fb446db36dba2c890201d16589c65f59f5c9
[ "MIT" ]
4
2019-11-19T07:37:02.000Z
2021-01-23T12:46:26.000Z
package com.kryptoprefs.preferences import android.content.SharedPreferences interface KryptoPrefs { fun putString(key: String, value: String?): KryptoPrefs fun putBoolean(key: String, value: Boolean?): KryptoPrefs fun putInt(key: String, value: Int?): KryptoPrefs fun putLong(key: String, value: Long?): KryptoPrefs fun getString(key: String, defaultValue: String?): String? fun getBoolean(key: String, defaultValue: Boolean): Boolean fun getInt(key: String, defaultValue: Int): Int fun getLong(key: String, defaultValue: Long): Long fun remove(key: String): KryptoPrefs fun contains(key: String): Boolean fun clear() fun name(): String fun sharedPreferences(): SharedPreferences }
22.088235
63
0.712383
9319450cc2a892ad6147633a5dd77732c8d0b57f
21
kt
Kotlin
idea/testData/kdoc/navigate/stdlibFunction.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
337
2020-05-14T00:40:10.000Z
2022-02-16T23:39:07.000Z
idea/testData/kdoc/navigate/stdlibFunction.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
92
2020-06-10T23:17:42.000Z
2020-09-25T10:50:13.000Z
idea/testData/kdoc/navigate/stdlibFunction.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
54
2016-02-29T16:27:38.000Z
2020-12-26T15:02:23.000Z
fun fo<caret>o() { }
7
18
0.52381
6a11d6673e8866660911f45c9b721bbf755f308a
1,504
swift
Swift
Source/Frame/ID3PictureType.swift
andriypohorilko/ID3TagEditor
78456c8b2f97284a1612a851ccf266c181cadf43
[ "MIT" ]
138
2018-03-06T16:19:00.000Z
2022-03-25T21:30:08.000Z
Source/Frame/ID3PictureType.swift
andriypohorilko/ID3TagEditor
78456c8b2f97284a1612a851ccf266c181cadf43
[ "MIT" ]
75
2018-04-26T12:00:55.000Z
2022-02-23T21:27:19.000Z
Source/Frame/ID3PictureType.swift
andriypohorilko/ID3TagEditor
78456c8b2f97284a1612a851ccf266c181cadf43
[ "MIT" ]
38
2018-04-03T04:05:40.000Z
2022-02-06T07:52:22.000Z
// // ID3PictureType.swift // // Created by Fabrizio Duroni on 04/03/2018. // 2018 Fabrizio Duroni. // import Foundation /** An enum that describes the ID3 picture type supported. */ public enum ID3PictureType: UInt8, Equatable, Hashable, CaseIterable { /// Other image. case other = 0x00 /// File icon image. case fileIcon = 0x01 /// Other file icon image. case otherFileIcon = 0x02 /// Front cover image. case frontCover = 0x03 /// Back cover image. case backCover = 0x04 /// LeafketPage image. case leafletPage = 0x05 /// Media image. case media = 0x06 /// Lead artist image image. case leadArtistLeadPerformerSoloist = 0x07 /// Artist image image. case artistPerformer = 0x08 /// Conductor image. case conductor = 0x09 /// Orchestra/band image. case bandOrchestra = 0x0A /// Composer image. case composer = 0x0B /// Lyricist Text Writer image. case lyricistTextWriter = 0x0C /// Recording location image. case recordingLocation = 0x0D /// During recording image. case duringRecording = 0x0E /// Performance image. case duringPerformance = 0x0F /// Movie image. case movieVideoScreenCapture = 0x10 /// ABrightColouredFish image. case aBrightColouredFish = 0x11 /// Illustration image. case illustration = 0x12 /// Band logo image. case bandArtistLogotype = 0x13 /// Publisher logo image. case publisherStudioLogotype = 0x14 }
26.385965
70
0.661569
36960c1bdd1ce83a838f6b2a9acf2169feebd866
190
sql
SQL
municipal-services/pt-services-v2/src/main/resources/db/migration/main/V20190403172537__eg_pt_index_searchparam_ddl.sql
pradeepkumarcm-egov/DIGIT-Dev
d8fb601fae6d919d2386f36b36dfc7fde77ebd4f
[ "MIT" ]
11
2021-04-22T13:18:00.000Z
2021-07-13T06:24:48.000Z
municipal-services/pt-services-v2/src/main/resources/db/migration/main/V20190403172537__eg_pt_index_searchparam_ddl.sql
pradeepkumarcm-egov/DIGIT-Dev
d8fb601fae6d919d2386f36b36dfc7fde77ebd4f
[ "MIT" ]
940
2019-12-03T10:55:53.000Z
2022-03-16T18:37:25.000Z
municipal-services/pt-services-v2/src/main/resources/db/migration/main/V20190403172537__eg_pt_index_searchparam_ddl.sql
pradeepkumarcm-egov/DIGIT-Dev
d8fb601fae6d919d2386f36b36dfc7fde77ebd4f
[ "MIT" ]
35
2020-06-01T14:20:53.000Z
2021-09-23T07:16:47.000Z
CREATE INDEX IF NOT EXISTS idx_eg_pt_property_v2_status ON eg_pt_property_v2(status); CREATE INDEX IF NOT EXISTS idx_eg_pt_propertydetail_v2_accountId ON eg_pt_propertydetail_v2(accountId);
63.333333
103
0.884211
7dbf52b538e8f191557cc776002299dc4fe11d18
630
kt
Kotlin
common/src/mobileMain/kotlin/jp/gree/techcon/common/util/FlowUtil.kt
hitomi-sasaki/techcon-app
da8d30a38e4e9f97c1dbcf97427a751de3ac4638
[ "MIT" ]
null
null
null
common/src/mobileMain/kotlin/jp/gree/techcon/common/util/FlowUtil.kt
hitomi-sasaki/techcon-app
da8d30a38e4e9f97c1dbcf97427a751de3ac4638
[ "MIT" ]
null
null
null
common/src/mobileMain/kotlin/jp/gree/techcon/common/util/FlowUtil.kt
hitomi-sasaki/techcon-app
da8d30a38e4e9f97c1dbcf97427a751de3ac4638
[ "MIT" ]
null
null
null
package jp.gree.techcon.common.util import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import kotlinx.io.core.Closeable fun <T> Flow<T>.wrap(): CFlow<T> = CFlow(this) class CFlow<T>(private val origin: Flow<T>) : Flow<T> by origin { fun watch(block: (T) -> Unit): Closeable { val scope = CoroutineScopeBuilder().build() val job = scope.launch { collect { block(it) } } return object : Closeable { override fun close() { job.cancel() } } } }
24.230769
65
0.57619
8974e2e8985d14e5e70fe3a3e88fb9aab9e3a68d
2,801
swift
Swift
IdFramework/Classes/UI Components/LargeHeader/LargeHeader.swift
idanisra/IdFramework
a1ddc345dad2fed1cbde476eb7f4c0b1ecc7f60a
[ "MIT" ]
null
null
null
IdFramework/Classes/UI Components/LargeHeader/LargeHeader.swift
idanisra/IdFramework
a1ddc345dad2fed1cbde476eb7f4c0b1ecc7f60a
[ "MIT" ]
null
null
null
IdFramework/Classes/UI Components/LargeHeader/LargeHeader.swift
idanisra/IdFramework
a1ddc345dad2fed1cbde476eb7f4c0b1ecc7f60a
[ "MIT" ]
null
null
null
// // LargeHeader.swift // OnceUponAMeat // // Created by Idan Israel on 04/08/2020. // Copyright © 2020 Idan Israel. All rights reserved. // import UIKit /// MARK: - LargeHeaderProtocol protocol LargeHeaderProtocol { /// MARK: - Functions func backPressed() } /// MARK: - LargeHeader public class LargeHeader: UIView { /// MARK: - Outlets @IBOutlet var contentView: UIView! @IBOutlet weak var headerView: UIView! @IBOutlet weak var title: UILabel! @IBOutlet weak var headerHeightView: NSLayoutConstraint! @IBOutlet weak var titleBottomConstraint: NSLayoutConstraint! @IBOutlet weak var titleTralingConstraint: NSLayoutConstraint! @IBOutlet weak var navigationButtonTopConstraint: NSLayoutConstraint! @IBOutlet weak var navigationBarHorizontalConstraint: NSLayoutConstraint! @IBOutlet weak var rightButton: UIButton! @IBOutlet weak var rightLabelButton: UIButton! @IBOutlet weak var leftButton: UIButton! @IBOutlet weak var leftLabelButton: UIButton! /// MARK: - Variables var delegate: LargeHeaderProtocol? /// MARK: - Actions @IBAction func buttonPressed(_ sender: UIButton) { self.delegate?.backPressed() } /// MARK: - Init override init(frame: CGRect) { super.init(frame: frame) self.commonInit() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.commonInit() } func commonInit(){ Bundle.main.loadNibNamed("LargeHeader", owner: self, options: nil) self.addSubview(self.contentView) self.contentView.frame = self.bounds self.contentView.autoresizingMask = [ .flexibleHeight, .flexibleWidth ] self.setButtonImage(imageName: "Back", color: .white, button: self.rightButton) self.setButtonImage(imageName: "Forward", color: .white, button: self.leftButton) } /// MARK: - Public Functions public func setButtonImage(imageName: String, color: UIColor, button: UIButton) { let origImage = UIImage(named: imageName) let tintedImage = origImage?.withRenderingMode(.alwaysTemplate) button.setImage(tintedImage, for: .normal) button.tintColor = color } public func enableBackButtton(vc: UIViewController, buttonTitle: String, isRight: Bool = true) { let selectedLabelButton = isRight ? self.rightLabelButton : self.leftLabelButton let selectedButton = isRight ? self.rightButton : self.leftButton self.delegate = vc as? LargeHeaderProtocol selectedLabelButton?.isHidden = false selectedButton?.isHidden = false selectedLabelButton?.setTitle(buttonTitle, for: .normal) } }
31.47191
100
0.670832
af6a5298f3caf8ce717a62c1d8d876117a33a28d
3,128
swift
Swift
Tests/SwmCoreTests/Polynomials/LaurentPolynomialTests.swift
taketo1024/ProtocolOrientedAlgebra
ae48c2ce78b64952a99776643f0aaf253eb315a0
[ "MIT" ]
124
2018-04-08T02:07:17.000Z
2021-05-15T23:28:23.000Z
Tests/SwmCoreTests/Polynomials/LaurentPolynomialTests.swift
taketo1024/ProtocolOrientedAlgebra
ae48c2ce78b64952a99776643f0aaf253eb315a0
[ "MIT" ]
2
2018-09-15T01:47:15.000Z
2019-09-21T14:18:02.000Z
Tests/SwmCoreTests/Polynomials/LaurentPolynomialTests.swift
taketo1024/ProtocolOrientedAlgebra
ae48c2ce78b64952a99776643f0aaf253eb315a0
[ "MIT" ]
9
2018-04-08T01:52:39.000Z
2020-07-07T18:31:28.000Z
// // PolynomialTests.swift // SwiftyKnotsTests // // Created by Taketo Sano on 2018/04/10. // import XCTest @testable import SwmCore class LaurentPolynomialTests: XCTestCase { struct _x: PolynomialIndeterminate { static let symbol: String = "x" } typealias A = LaurentPolynomial<𝐙, _x> typealias B = LaurentPolynomial<𝐐, _x> func testInitFromInt() { let a = A(from: 3) XCTAssertEqual(a, A(elements: [0: 3])) } func testInitFromIntLiteral() { let a: A = 3 XCTAssertEqual(a, A(elements: [0: 3])) } func testProperties() { let a = A(elements: [-2: 3, -1: 4, 1: 5]) XCTAssertEqual(a.leadCoeff, 5) XCTAssertEqual(a.leadTerm, A(elements: [1: 5])) XCTAssertEqual(a.constTerm, .zero) XCTAssertEqual(a.leadExponent, 1) // XCTAssertEqual(a.lowestExponent, -2) XCTAssertEqual(a.degree, 1) } func testSum() { let a = A(elements: [-1: 1, 0: 2, 1: 3]) let b = A(elements: [-2: 1, 0: 2]) XCTAssertEqual(a + b, A(elements: [-2: 1, -1: 1, 0: 4, 1: 3])) } func testZero() { let a = A(elements: [-1: 1, 0: 2, 1: 3]) XCTAssertEqual(a + A.zero, a) XCTAssertEqual(A.zero + a, a) } func testNeg() { let a = A(elements: [-1: 1, 0: 2, 1: 3]) XCTAssertEqual(-a, A(elements: [-1: -1, 0: -2, 1: -3])) } func testMul() { let a = A(elements: [-1: 1, 0: 2, 1: 3]) let b = A(elements: [-1: 3, 0: 4]) XCTAssertEqual(a * b, A(elements: [-2: 3, -1: 10, 0: 17, 1: 12])) } func testId() { let a = A(elements: [-1: 1, 0: 2, 1: 3]) let e = A.identity XCTAssertEqual(a * e, a) XCTAssertEqual(e * a, a) } func testInv() { let a = A(-1) XCTAssertEqual(a.inverse!, a) let b = A(elements: [-3: 1]) XCTAssertEqual(b.inverse!, A(elements: [3: 1])) let c = A(elements: [-4: -1]) XCTAssertEqual(c.inverse!, A(elements: [4: -1])) let d = A(elements: [0: 1, 1: 1]) XCTAssertNil(d.inverse) } func testPow() { let a = A(elements: [-1: 1, 0: 2]) XCTAssertEqual(a.pow(0), A.identity) XCTAssertEqual(a.pow(1), a) XCTAssertEqual(a.pow(2), A(elements: [-2: 1, -1: 4, 0: 4])) XCTAssertEqual(a.pow(3), A(elements: [-3: 1, -2: 6, -1: 12, 0: 8])) } func testDerivative() { let a = A(elements: [-2: 1, -1: 2, 0: 3, 1: 4, 2: 5]) XCTAssertEqual(a.derivative, A(elements: [-3: -2, -2: -2, -1: 0, 0: 4, 1: 10])) } func testEvaluate() { let a = A(elements: [-1: 1, 0: 2, 1: 3]) XCTAssertEqual(a.evaluate(by: -1), -2) let b = B(elements: [-1: 1, 0: 2, 1: 3]) XCTAssertEqual(b.evaluate(by: 2), 17./2) } func testIsMonic() { let a = A(elements: [-1: 1, 0: 2, 1: 1]) XCTAssertTrue(a.isMonic) let b = A(elements: [-1: 1, 0: 2, 1: 3]) XCTAssertFalse(b.isMonic) } }
27.928571
87
0.495205
d2a4a1bdeb724eeed784a911ea0fe705055ee8db
1,218
php
PHP
vendor/dmore/behat-chrome-extension/tests/Behat/ServiceContainer/ChromeExtensionTest.php
vbjitendra/jenkins-example
ce332ce0afa3d91af7c36b8a101eec43a225c1f3
[ "MIT" ]
4
2019-05-10T21:03:36.000Z
2019-11-26T02:27:07.000Z
vendor/dmore/behat-chrome-extension/tests/Behat/ServiceContainer/ChromeExtensionTest.php
vbjitendra/jenkins-example
ce332ce0afa3d91af7c36b8a101eec43a225c1f3
[ "MIT" ]
8
2019-11-15T17:18:15.000Z
2022-03-24T14:40:40.000Z
vendor/dmore/behat-chrome-extension/tests/Behat/ServiceContainer/ChromeExtensionTest.php
kemarjackson26/SuperMart
d07f70156097cb82464de19f2bd6a9b83295ce93
[ "MIT" ]
1
2019-10-05T09:59:34.000Z
2019-10-05T09:59:34.000Z
<?php namespace tests\Behat\ServiceContainer; use Behat\MinkExtension\ServiceContainer\MinkExtension; use Behat\Testwork\ServiceContainer\ExtensionManager; use DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension; use DMore\ChromeExtension\Behat\ServiceContainer\Driver\ChromeFactory; use PHPUnit\Framework\TestCase; class ChromeExtensionTest extends TestCase { /** @var ChromeExtension */ private $extension; public function setUp() { $this->extension = new ChromeExtension(); } public function testConfigKey() { $this->assertSame('chrome', $this->extension->getConfigKey()); } public function testItRegistersMinkDriver() { $mink_extension = $this->createMock(MinkExtension::class); $mink_extension->expects($this->once())->method('getConfigKey')->will($this->returnValue('mink')); $extension_manager = new ExtensionManager([$mink_extension]); $mink_extension->expects($this->once())->method('registerDriverFactory') ->with($this->callback(function ($factory) { return $factory instanceof ChromeFactory; })); $this->extension->initialize($extension_manager); } }
32.052632
106
0.696223
c48bb1c35d1ec28ab00d2bb16162bbf1ce04d603
485
sql
SQL
db/migrations/sqlite/000051_create_ffi_events_table.up.sql
calbritt/firefly
3cf5f35fbee391908459ad2d9d8e794ab8f5219f
[ "Apache-2.0" ]
73
2021-09-24T22:31:57.000Z
2022-03-29T19:06:33.000Z
db/migrations/sqlite/000051_create_ffi_events_table.up.sql
calbritt/firefly
3cf5f35fbee391908459ad2d9d8e794ab8f5219f
[ "Apache-2.0" ]
351
2021-09-23T18:51:16.000Z
2022-03-31T15:02:23.000Z
db/migrations/sqlite/000051_create_ffi_events_table.up.sql
calbritt/firefly
3cf5f35fbee391908459ad2d9d8e794ab8f5219f
[ "Apache-2.0" ]
34
2021-09-23T15:44:59.000Z
2022-03-30T14:11:33.000Z
CREATE TABLE ffievents ( seq INTEGER PRIMARY KEY AUTOINCREMENT, id UUID NOT NULL, interface_id UUID NULL, namespace VARCHAR(64) NOT NULL, name VARCHAR(1024) NOT NULL, pathname VARCHAR(1024) NOT NULL, description TEXT NOT NULL, params TEXT NOT NULL ); CREATE UNIQUE INDEX ffievents_pathname ON ffievents(interface_id,pathname);
37.307692
75
0.54433
3f2e1f7c2e6f1b1eeaa4abf448546ae8b1d66078
3,715
kt
Kotlin
src/main/kotlin/com/charylin/game/model/Tank.kt
GitLqr/game-tank
437ee515e3456679b178223dcc9ef5004cf40857
[ "MIT" ]
1
2020-11-18T01:38:04.000Z
2020-11-18T01:38:04.000Z
src/main/kotlin/com/charylin/game/model/Tank.kt
GitLqr/game-tank
437ee515e3456679b178223dcc9ef5004cf40857
[ "MIT" ]
null
null
null
src/main/kotlin/com/charylin/game/model/Tank.kt
GitLqr/game-tank
437ee515e3456679b178223dcc9ef5004cf40857
[ "MIT" ]
null
null
null
package com.charylin.game.model import com.charylin.game.Config import com.charylin.game.business.Attackable import com.charylin.game.business.Blockable import com.charylin.game.business.Movable import com.charylin.game.business.Sufferable import com.charylin.game.enums.Direction import org.itheima.kotlin.game.core.Painter /** * @author LQR * @time 2020/11/18 * @desc 坦克 */ class Tank(override var x: Int, override var y: Int) : Movable, Blockable, Sufferable { override val width: Int = Config.block override val height: Int = Config.block override var currentDirection: Direction = Direction.UP override val speed: Int = 8 // 坦克不可以走的方向 private var badDirection: Direction? = null // 血量 override var blood: Int = 20 override fun draw() { // 根据坦克的方向进行绘制 // 方式一: // when (currentDirection) { // Direction.UP -> Painter.drawImage("img/tank_u.gif", x, y) // Direction.DOWN -> Painter.drawImage("img/tank_d.gif", x, y) // Direction.LEFT -> Painter.drawImage("img/tank_l.gif", x, y) // Direction.RIGHT -> Painter.drawImage("img/tank_r.gif", x, y) // } // 方式二: val imagePath = when (currentDirection) { Direction.UP -> "img/tank_u.gif" Direction.DOWN -> "img/tank_d.gif" Direction.LEFT -> "img/tank_l.gif" Direction.RIGHT -> "img/tank_r.gif" } Painter.drawImage(imagePath, x, y) } fun move(direction: Direction) { // 判断是否是往要碰撞的方向走 if (this.badDirection == direction) { return } // 当前方向,和希望移动的方向不一致时,只做方向改变 if (this.currentDirection != direction) { this.currentDirection = direction return } // 坦克坐标需要发生变化 // 根据不同的方向,改变对应的坐标 when (currentDirection) { Direction.UP -> y -= speed Direction.DOWN -> y += speed Direction.LEFT -> x -= speed Direction.RIGHT -> x += speed } // 越界判断 if (x < 0) x = 0 if (x > Config.gameWidth - width) x = Config.gameWidth - width if (y < 0) y = 0 if (y > Config.gameHeight - height) y = Config.gameHeight - height } override fun notifyCollision(direction: Direction?, block: Blockable?) { this.badDirection = direction } /** * 发射子弹 */ fun shot(): Bullet { return Bullet(this, currentDirection) { bulletWidth, bulletHeight -> val tankX = x val tankY = y val tankWidth = width val tankHeight = height var bulletX = 0 var bulletY = 0 // 计算子弹真实的坐标 when (currentDirection) { Direction.UP -> { bulletX = tankX + (tankWidth - bulletWidth) / 2 bulletY = tankY - bulletHeight / 2 } Direction.DOWN -> { bulletX = tankX + (tankWidth - bulletWidth) / 2 bulletY = tankY + tankHeight - bulletHeight / 2 } Direction.LEFT -> { bulletX = tankX - bulletWidth / 2 bulletY = tankY + (tankHeight - bulletHeight) / 2 } Direction.RIGHT -> { bulletX = tankX + tankWidth - bulletWidth / 2 bulletY = tankY + (tankHeight - bulletHeight) / 2 } } Pair(bulletX, bulletY) } } override fun notifySuffer(attackable: Attackable): Array<View>? { blood -= attackable.attackPower return arrayOf(Blast(x, y)) } }
30.203252
87
0.541588
2dc7ce30107d5dbeae72b112d5fe393129d10379
111
sql
SQL
SQL/Availability/UpdateOffContractUnits.sql
jaymegordo/SMSEventLog
c4836793709f501d4aa4b84819931c167f14d9b3
[ "MIT" ]
1
2020-11-14T23:58:47.000Z
2020-11-14T23:58:47.000Z
SQL/Availability/UpdateOffContractUnits.sql
jaymegordo/SMSEventLog
c4836793709f501d4aa4b84819931c167f14d9b3
[ "MIT" ]
93
2021-03-02T18:27:05.000Z
2022-03-30T18:48:09.000Z
SQL/Availability/UpdateOffContractUnits.sql
jaymegordo/SMSEventLog
c4836793709f501d4aa4b84819931c167f14d9b3
[ "MIT" ]
null
null
null
Update b Set OffContract=1 From udfMaxUnitSMR() a Inner Join UnitID b On a.Unit=b.Unit Where a.MaxSMR > 70000
18.5
59
0.765766
4e79be876c02d34986d5c5a10cd873e9b24ee728
97
asm
Assembly
lab3_test_harness/test/state_data_in/15.asm
Zaydax/PipelineProcessor
f45f7d1a245f291218d53a7f16fd7f98a50ce47e
[ "MIT" ]
2
2017-03-05T17:40:26.000Z
2017-03-15T01:41:25.000Z
lab3_test_harness/test/state_data_in/15.asm
Zaydax/PipelineProcessor
f45f7d1a245f291218d53a7f16fd7f98a50ce47e
[ "MIT" ]
null
null
null
lab3_test_harness/test/state_data_in/15.asm
Zaydax/PipelineProcessor
f45f7d1a245f291218d53a7f16fd7f98a50ce47e
[ "MIT" ]
null
null
null
.ORIG x1234 STB R7, R6, x4 STB R7, R6, x4 STB R7, R6, x4 STB R7, R6, x4 STB R7, R6, x4 .END
12.125
15
0.587629
bef9fdbf6c614371779fec8d76ff69ff791b6a13
425
rs
Rust
03-test-tokio-redis/examples/hello-redis.rs
nickjbenson/theseus
d5badf8e1553a3f04b49224580dd1f506184458f
[ "Unlicense" ]
null
null
null
03-test-tokio-redis/examples/hello-redis.rs
nickjbenson/theseus
d5badf8e1553a3f04b49224580dd1f506184458f
[ "Unlicense" ]
null
null
null
03-test-tokio-redis/examples/hello-redis.rs
nickjbenson/theseus
d5badf8e1553a3f04b49224580dd1f506184458f
[ "Unlicense" ]
null
null
null
use mini_redis::{client, Result}; #[tokio::main] pub async fn main() -> Result<()> { // Open a connection to the mini-redis server. let mut client = client::connect("127.0.0.1:1337").await?; // Set the key "hello" to "world". client.set("hello", "world".into()).await?; // Get key "hello". let result = client.get("hello").await?; println!("Got back key's value from the server: {:?}", result); Ok(()) }
23.611111
65
0.614118
4760e5123bfb5ef55ad5b0dbae3549c9c0608471
455
ps1
PowerShell
Examples/SpreadsheetCells/ExcelFunctions.ps1
dacarab/ImportExcel
58ab93a6ebd8a4b302459cd77b97388067cb79ec
[ "Apache-2.0" ]
null
null
null
Examples/SpreadsheetCells/ExcelFunctions.ps1
dacarab/ImportExcel
58ab93a6ebd8a4b302459cd77b97388067cb79ec
[ "Apache-2.0" ]
null
null
null
Examples/SpreadsheetCells/ExcelFunctions.ps1
dacarab/ImportExcel
58ab93a6ebd8a4b302459cd77b97388067cb79ec
[ "Apache-2.0" ]
1
2019-02-13T14:04:16.000Z
2019-02-13T14:04:16.000Z
. ..\New-PSItem.ps1 rm *.xlsx $( New-PSItem =2%/12 60 500000 "=pmt(rate,nper,pv)" (echo rate nper pv pmt) New-PSItem =3%/12 60 500000 "=pmt(rate,nper,pv)" New-PSItem =4%/12 60 500000 "=pmt(rate,nper,pv)" New-PSItem =5%/12 60 500000 "=pmt(rate,nper,pv)" New-PSItem =6%/12 60 500000 "=pmt(rate,nper,pv)" New-PSItem =7%/12 60 500000 "=pmt(rate,nper,pv)" ) | Export-Excel functions.xlsx -AutoNameRange -AutoSize -Show
37.916667
77
0.61978
77aaf54139cdb1ed22a3280c70dcb602aee23e8d
6,890
rs
Rust
services/mgmt/securityinsights/src/package_2021_03_preview_only/models.rs
simongdavies/azure-sdk-for-rust
8d275a30e7cd857e38809c651516fc21e51c5ba0
[ "MIT" ]
null
null
null
services/mgmt/securityinsights/src/package_2021_03_preview_only/models.rs
simongdavies/azure-sdk-for-rust
8d275a30e7cd857e38809c651516fc21e51c5ba0
[ "MIT" ]
1
2021-05-05T16:43:42.000Z
2021-05-05T16:43:42.000Z
services/mgmt/securityinsights/src/package_2021_03_preview_only/models.rs
simongdavies/azure-sdk-for-rust
8d275a30e7cd857e38809c651516fc21e51c5ba0
[ "MIT" ]
1
2021-05-28T09:32:25.000Z
2021-05-28T09:32:25.000Z
#![doc = "generated by AutoRust 0.1.0"] #![allow(non_camel_case_types)] #![allow(unused_imports)] use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SettingList { pub value: Vec<Settings>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Settings { #[serde(flatten)] pub resource_with_etag: ResourceWithEtag, pub kind: settings::Kind, } pub mod settings { use super::*; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum Kind { EyesOn, EntityAnalytics, Ueba, } } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EyesOn { #[serde(flatten)] pub settings: Settings, #[serde(default, skip_serializing_if = "Option::is_none")] pub properties: Option<EyesOnSettingsProperties>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EyesOnSettingsProperties { #[serde(rename = "isEnabled", skip_serializing)] pub is_enabled: Option<bool>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EntityAnalytics { #[serde(flatten)] pub settings: Settings, #[serde(default, skip_serializing_if = "Option::is_none")] pub properties: Option<EntityAnalyticsProperties>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EntityAnalyticsProperties { #[serde(rename = "isEnabled", skip_serializing)] pub is_enabled: Option<bool>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Ueba { #[serde(flatten)] pub settings: Settings, #[serde(default, skip_serializing_if = "Option::is_none")] pub properties: Option<UebaProperties>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UebaProperties { #[serde(rename = "dataSources", default, skip_serializing_if = "Vec::is_empty")] pub data_sources: Vec<UebaDataSources>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum UebaDataSources { AuditLogs, AzureActivity, SecurityEvent, SigninLogs, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OnboardingRequest { #[serde(rename = "customerManagedKey", default, skip_serializing_if = "Option::is_none")] pub customer_managed_key: Option<bool>, #[serde(rename = "eyesOn", default, skip_serializing_if = "Option::is_none")] pub eyes_on: Option<bool>, #[serde(default, skip_serializing_if = "Option::is_none")] pub sku: Option<Sku>, #[serde(rename = "entityAnalytics", default, skip_serializing_if = "Option::is_none")] pub entity_analytics: Option<EntityAnalyticsOnboardingParameters>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Sku { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option<sku::Name>, #[serde(rename = "capacityReservationLevel", default, skip_serializing_if = "Option::is_none")] pub capacity_reservation_level: Option<i32>, } pub mod sku { use super::*; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum Name { #[serde(rename = "PerGB")] PerGb, CapacityReservation, } } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EntityAnalyticsOnboardingParameters { #[serde(default, skip_serializing_if = "Option::is_none")] pub enabled: Option<bool>, #[serde(rename = "uebaDataSources", default, skip_serializing_if = "Option::is_none")] pub ueba_data_sources: Option<UebaProperties>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OperationsList { #[serde(rename = "nextLink", skip_serializing)] pub next_link: Option<String>, pub value: Vec<Operation>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Operation { #[serde(default, skip_serializing_if = "Option::is_none")] pub display: Option<operation::Display>, #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option<String>, #[serde(default, skip_serializing_if = "Option::is_none")] pub origin: Option<String>, } pub mod operation { use super::*; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Display { #[serde(default, skip_serializing_if = "Option::is_none")] pub description: Option<String>, #[serde(default, skip_serializing_if = "Option::is_none")] pub operation: Option<String>, #[serde(default, skip_serializing_if = "Option::is_none")] pub provider: Option<String>, #[serde(default, skip_serializing_if = "Option::is_none")] pub resource: Option<String>, } } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudError { #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option<CloudErrorBody>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudErrorBody { #[serde(skip_serializing)] pub code: Option<String>, #[serde(skip_serializing)] pub message: Option<String>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ResourceWithEtag { #[serde(skip_serializing)] pub id: Option<String>, #[serde(skip_serializing)] pub name: Option<String>, #[serde(rename = "type", skip_serializing)] pub type_: Option<String>, #[serde(default, skip_serializing_if = "Option::is_none")] pub etag: Option<String>, #[serde(rename = "systemData", skip_serializing)] pub system_data: Option<SystemData>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SystemData { #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")] pub created_by: Option<String>, #[serde(rename = "createdByType", default, skip_serializing_if = "Option::is_none")] pub created_by_type: Option<system_data::CreatedByType>, #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")] pub created_at: Option<String>, #[serde(rename = "lastModifiedBy", default, skip_serializing_if = "Option::is_none")] pub last_modified_by: Option<String>, #[serde(rename = "lastModifiedByType", default, skip_serializing_if = "Option::is_none")] pub last_modified_by_type: Option<system_data::LastModifiedByType>, #[serde(rename = "lastModifiedAt", default, skip_serializing_if = "Option::is_none")] pub last_modified_at: Option<String>, } pub mod system_data { use super::*; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum CreatedByType { User, Application, ManagedIdentity, Key, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum LastModifiedByType { User, Application, ManagedIdentity, Key, } }
36.84492
99
0.696807
cb0a05e2f69cfba17bfa7cfc60ad18be1eb35178
97,302
sql
SQL
eapi.sql
mahmoudali29/api
25f013f14ef026215e1789c40e75608629213f96
[ "MIT" ]
1
2018-04-19T14:57:05.000Z
2018-04-19T14:57:05.000Z
eapi.sql
mahmoudali29/api
25f013f14ef026215e1789c40e75608629213f96
[ "MIT" ]
null
null
null
eapi.sql
mahmoudali29/api
25f013f14ef026215e1789c40e75608629213f96
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 02, 2018 at 04:29 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; 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: `eapi` -- -- -------------------------------------------------------- -- -- 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 (10, '2014_10_12_000000_create_users_table', 1), (11, '2014_10_12_100000_create_password_resets_table', 1), (12, '2016_06_01_000001_create_oauth_auth_codes_table', 1), (13, '2016_06_01_000002_create_oauth_access_tokens_table', 1), (14, '2016_06_01_000003_create_oauth_refresh_tokens_table', 1), (15, '2016_06_01_000004_create_oauth_clients_table', 1), (16, '2016_06_01_000005_create_oauth_personal_access_clients_table', 1), (17, '2018_04_22_115544_create_products_table', 1), (18, '2018_04_22_115706_create_reviews_table', 1); -- -------------------------------------------------------- -- -- Table structure for table `oauth_access_tokens` -- CREATE TABLE `oauth_access_tokens` ( `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` int(11) DEFAULT NULL, `client_id` int(11) NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `scopes` text COLLATE utf8mb4_unicode_ci, `revoked` tinyint(1) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `expires_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `oauth_access_tokens` -- INSERT INTO `oauth_access_tokens` (`id`, `user_id`, `client_id`, `name`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) VALUES ('4f965c6a8d297be2d371d9b02c2eda4ec133391c8eabb479c8d1261d5dc0b31b8c96f5e0c0515926', 5, 2, NULL, '[]', 0, '2018-05-02 11:17:24', '2018-05-02 11:17:24', '2019-05-02 13:17:24'); -- -------------------------------------------------------- -- -- Table structure for table `oauth_auth_codes` -- CREATE TABLE `oauth_auth_codes` ( `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` int(11) NOT NULL, `client_id` int(11) NOT NULL, `scopes` text COLLATE utf8mb4_unicode_ci, `revoked` tinyint(1) NOT NULL, `expires_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `oauth_clients` -- CREATE TABLE `oauth_clients` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(11) DEFAULT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `secret` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `redirect` text COLLATE utf8mb4_unicode_ci NOT NULL, `personal_access_client` tinyint(1) NOT NULL, `password_client` tinyint(1) NOT NULL, `revoked` tinyint(1) 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 `oauth_clients` -- INSERT INTO `oauth_clients` (`id`, `user_id`, `name`, `secret`, `redirect`, `personal_access_client`, `password_client`, `revoked`, `created_at`, `updated_at`) VALUES (1, NULL, 'Laravel Personal Access Client', 'Z1GpDEecsrAwGhfx8FkRztB3ecgQa6QzNYhiRvPm', 'http://localhost', 1, 0, 0, '2018-05-02 11:12:51', '2018-05-02 11:12:51'), (2, NULL, 'Laravel Password Grant Client', 'J8zeiAHfCtQUltEaiSqiegyIUiUJUoSayt5yhEWw', 'http://localhost', 0, 1, 0, '2018-05-02 11:12:51', '2018-05-02 11:12:51'); -- -------------------------------------------------------- -- -- Table structure for table `oauth_personal_access_clients` -- CREATE TABLE `oauth_personal_access_clients` ( `id` int(10) UNSIGNED NOT NULL, `client_id` int(11) 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 `oauth_personal_access_clients` -- INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES (1, 1, '2018-05-02 11:12:51', '2018-05-02 11:12:51'); -- -------------------------------------------------------- -- -- Table structure for table `oauth_refresh_tokens` -- CREATE TABLE `oauth_refresh_tokens` ( `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `revoked` tinyint(1) NOT NULL, `expires_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `oauth_refresh_tokens` -- INSERT INTO `oauth_refresh_tokens` (`id`, `access_token_id`, `revoked`, `expires_at`) VALUES ('7002a7deee59397e356399fa754f8371a7216123a05cacece74c73e88b5b0b78a3b1f02333a148e0', '4f965c6a8d297be2d371d9b02c2eda4ec133391c8eabb479c8d1261d5dc0b31b8c96f5e0c0515926', 0, '2019-05-02 13:17:24'); -- -------------------------------------------------------- -- -- 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; -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `detail` text COLLATE utf8mb4_unicode_ci NOT NULL, `price` int(11) NOT NULL, `stock` int(11) NOT NULL, `discount` int(11) NOT NULL, `user_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 `products` -- INSERT INTO `products` (`id`, `name`, `detail`, `price`, `stock`, `discount`, `user_id`, `created_at`, `updated_at`) VALUES (1, 'consectetur', 'Doloremque dolor eum et aut et distinctio. Expedita amet aliquid doloremque qui iure. Occaecati qui voluptatibus sit quo consequuntur perferendis. In consectetur quos et rem doloremque.', 849, 7, 9, 1, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (2, 'sed', 'Est et provident ut tenetur. Laudantium ullam magnam excepturi quo. Vero hic quia asperiores et veritatis. Possimus qui laudantium et nesciunt.', 583, 6, 29, 1, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (3, 'porro', 'Occaecati sapiente voluptate sit. Porro et saepe accusamus est est omnis id qui. Temporibus necessitatibus quis eum debitis magnam aut assumenda itaque. Nam voluptas et rerum architecto accusantium earum.', 721, 0, 24, 1, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (4, 'minus', 'Rem nobis nesciunt quis harum cum repellat. Atque aperiam consequatur commodi nihil voluptates quas necessitatibus unde. Repudiandae fugiat eum soluta asperiores quod et.', 143, 5, 11, 2, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (5, 'dolor', 'Consequuntur quos sed rerum qui a sapiente consequatur. Eaque sunt quo pariatur possimus consequuntur ratione. Illum numquam occaecati possimus et qui.', 735, 1, 5, 4, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (6, 'ea', 'Dicta nulla quaerat in quia quo harum. Accusantium labore voluptatem doloribus ipsa recusandae mollitia sint sit. Sed eligendi ea sapiente nihil. Eius perferendis quia est quaerat est ipsam.', 1000, 9, 22, 3, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (7, 'quidem', 'Rerum qui ut fugiat dolores nostrum quidem corporis. Est atque quo totam itaque sint. Facilis tempore voluptatem et.', 125, 2, 20, 4, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (8, 'perspiciatis', 'Rerum sit omnis sint et. Ea aut nobis et id incidunt eius. Illum in necessitatibus sit voluptate.', 417, 6, 28, 1, '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (9, 'test', 'New Updated.', 590, 9, 3, 5, '2018-05-02 10:43:51', '2018-05-02 11:19:32'), (10, 'autem', 'Ut laborum sit et. Accusantium quo dicta quibusdam facilis hic. Qui impedit quis qui ratione qui qui sit. Optio voluptatem impedit dolore aut eos praesentium. Sint neque voluptas aut et non.', 346, 5, 17, 3, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (11, 'officia', 'Consequatur perferendis at fuga. Reprehenderit sit ipsam quisquam facere non nostrum ea commodi. Repudiandae et impedit quos quo. Reprehenderit ullam ipsa sit eos alias qui.', 770, 5, 12, 4, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (12, 'consequatur', 'Voluptatum veniam facere fuga veniam vitae odio repellendus. Repellendus qui hic in aut temporibus. Qui assumenda ut et. Ut ab voluptatibus quia nihil maxime et expedita.', 543, 6, 11, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (13, 'a', 'Qui fugit quibusdam incidunt nihil consequatur. Omnis odio deleniti eum dolores consequatur. Numquam temporibus impedit corrupti consectetur vitae aut consequuntur. Est quia est consectetur ipsa tempore.', 339, 1, 6, 5, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (14, 'ea', 'Praesentium soluta ut corporis alias facere. Repudiandae rerum mollitia porro libero. Architecto dolorem libero delectus. Est numquam dolor alias ea.', 931, 4, 20, 4, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (15, 'in', 'Repellendus voluptates culpa labore eum excepturi suscipit a. Et aut nam veniam odit blanditiis ea consectetur ut. Occaecati rerum qui ut ea fuga error cum. Cum quae laudantium magnam aut iste.', 470, 1, 19, 4, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (16, 'corrupti', 'Pariatur cupiditate id ratione neque explicabo quia autem molestiae. Suscipit possimus iure et repellendus maxime ullam. Consequuntur necessitatibus sunt ullam quam odio laborum. Sint reprehenderit consectetur eos distinctio qui perspiciatis expedita.', 317, 7, 24, 3, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (17, 'non', 'Quia voluptatem reprehenderit accusamus voluptates. Necessitatibus itaque tempora pariatur neque deserunt iusto ut. Itaque sit reiciendis eveniet itaque quidem sed est. Ab ea quia laborum dolorum. Occaecati eaque ea labore rerum incidunt et.', 566, 0, 16, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (18, 'provident', 'Qui recusandae inventore voluptas est. Necessitatibus quidem reprehenderit est praesentium natus cum tenetur id. Officia fugit sapiente ut sed quia. Veritatis eum maxime aut sapiente.', 237, 5, 12, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (19, 'eos', 'Doloribus earum accusamus aut doloribus perferendis. Totam rerum corporis eligendi. Consectetur exercitationem est enim dolorum voluptatem itaque. Iure a qui nihil occaecati.', 661, 1, 12, 4, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (20, 'cumque', 'Fugiat quo rerum necessitatibus voluptates vero asperiores. Sed et mollitia praesentium sed quia veniam.', 462, 1, 26, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (21, 'unde', 'Laudantium aut in neque facere vitae possimus nobis. Iure omnis iusto fuga amet. Delectus sit asperiores aliquam rerum provident. Est saepe vel voluptas qui.', 715, 7, 11, 1, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (22, 'quia', 'Magni aut doloremque architecto. Voluptas natus sapiente voluptatem voluptas harum id voluptas. Veritatis quisquam similique ipsam pariatur.', 675, 5, 24, 5, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (23, 'culpa', 'Quia quis et nemo veritatis rerum fugiat. Necessitatibus impedit aut ad aut. Aliquam sint et delectus.', 228, 6, 17, 5, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (24, 'ea', 'Ad omnis placeat voluptatibus. Quia illum quia nemo impedit laborum nihil rerum. Provident sunt alias et quae illum.', 316, 7, 19, 1, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (25, 'eum', 'Porro quia est vel eum adipisci veniam. Possimus ab nemo necessitatibus itaque expedita. Qui culpa veritatis dignissimos.', 468, 8, 2, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (26, 'harum', 'Ut incidunt hic accusantium magni omnis eos. Inventore sit quos aliquam ratione. Quisquam et quibusdam beatae omnis molestias. Consequatur vitae repudiandae reprehenderit.', 444, 3, 27, 4, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (27, 'enim', 'Vero nihil iure porro et sit non. A voluptate quo et perferendis sint dolore vero.', 237, 2, 5, 5, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (28, 'est', 'Quod laboriosam quisquam rerum sapiente quos vero ipsam. Sunt odit eos laboriosam fugit repudiandae. Dolorem non veritatis nostrum praesentium vero consequatur.', 962, 2, 4, 5, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (29, 'animi', 'Adipisci quisquam optio maxime porro. Saepe est exercitationem corporis dolorem dolores neque nemo ipsum. Dolores excepturi eos exercitationem eaque dignissimos iure quidem.', 395, 8, 5, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (30, 'dicta', 'Ad voluptatem at commodi autem. Ex consequatur aperiam harum. Quidem dolorem maiores sed qui.', 354, 1, 3, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (31, 'recusandae', 'Quam sit aut libero optio. Non illum vel nam nemo et autem. Quia quia et tempora minima aut dicta commodi. Aperiam magni aperiam corporis expedita doloribus quis. Odit quas sit laudantium qui nemo doloremque illo.', 451, 4, 10, 1, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (32, 'perspiciatis', 'Fugit soluta inventore molestiae corporis consequatur. Sint voluptatem quia voluptas harum soluta. Voluptas ut aut dolorem repellendus ut error in.', 714, 5, 23, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (33, 'itaque', 'Eum at inventore pariatur reiciendis et quo. Iusto ut vitae aperiam nostrum. Vero ut ut pariatur pariatur sit alias.', 702, 9, 13, 3, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (34, 'voluptatem', 'Quia et ut qui voluptas. Quam facere sint ipsam est id. Unde ea est est repudiandae molestiae. Labore repudiandae aut ab voluptates eveniet rerum. Excepturi totam laboriosam inventore non.', 443, 1, 30, 1, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (35, 'maxime', 'Minus dolorem quo sit ut. Et adipisci distinctio amet voluptas et qui sed similique. Quibusdam temporibus aut qui enim occaecati vel saepe vitae.', 262, 7, 15, 3, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (36, 'unde', 'Maxime reiciendis cum sunt enim porro. Et illo voluptatum molestias blanditiis labore. Et quas omnis maxime quas exercitationem voluptate cumque. Consequatur incidunt temporibus aut suscipit sed sequi.', 521, 0, 9, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (37, 'dolores', 'Quam quas delectus aperiam. Vitae consectetur quidem quo. Id et dolorem ipsa magnam.', 335, 2, 13, 1, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (38, 'et', 'Numquam ducimus nihil quo doloribus est officia. Tenetur in tenetur nihil dignissimos aliquam. Ad amet temporibus temporibus aut veniam eius error. Vitae fugiat perspiciatis et sint sequi.', 415, 9, 15, 4, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (39, 'qui', 'Quia odit voluptas veritatis. Ullam animi excepturi sed ut sunt. Natus animi qui accusantium molestiae. Impedit animi laudantium voluptates necessitatibus dicta sunt. Commodi nulla enim ut.', 140, 8, 23, 4, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (40, 'maiores', 'Consequatur quae unde a fugit ipsa. Quasi deleniti excepturi blanditiis asperiores consequatur. Neque animi natus similique vitae earum aliquid hic.', 699, 2, 16, 1, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (41, 'incidunt', 'Unde doloribus nesciunt animi qui quisquam illo laboriosam sed. Et occaecati alias ut quis. Sunt neque est dolor similique corporis. Quisquam doloribus aperiam omnis reprehenderit quos.', 327, 4, 7, 3, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (42, 'dolorem', 'Voluptatem dolore debitis molestiae expedita. Ullam officiis et itaque repudiandae. Voluptate est ut optio quia.', 919, 7, 16, 2, '2018-05-02 10:43:51', '2018-05-02 10:43:51'), (43, 'cumque', 'Accusantium voluptas tempora labore. Nihil earum nihil qui rerum. Et a culpa et earum in.', 482, 7, 25, 2, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (44, 'eos', 'Fuga est deleniti voluptas architecto velit enim. Eligendi velit sit aliquam beatae. Sit ut est ut.', 901, 9, 20, 2, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (45, 'voluptates', 'Placeat natus est dignissimos dolor ullam non. Explicabo dolores reprehenderit consectetur vel consequatur sed. Consequatur est ipsum voluptatum. Maiores numquam accusantium tempora.', 854, 4, 15, 5, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (46, 'placeat', 'Nesciunt et dolores architecto autem quisquam et aut. Impedit eius non autem consequatur sunt sed dolores. Velit iste deserunt aliquam quia. Nisi expedita ab soluta nemo debitis asperiores.', 869, 5, 2, 3, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (47, 'asperiores', 'Necessitatibus ipsum ad molestias dolorem aut maiores in voluptatem. Est sit eos debitis et. Aliquam dolores at sunt voluptas quisquam adipisci laborum.', 449, 7, 3, 3, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (48, 'quae', 'Iste perspiciatis et et et. Voluptas perferendis necessitatibus magnam est assumenda. Accusantium quasi quas accusamus.', 888, 9, 9, 4, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (49, 'eligendi', 'Et tempore magni sed consequatur sapiente et. Molestias deserunt temporibus at hic incidunt non sed. Et est qui asperiores qui dolorem.', 250, 4, 11, 1, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (50, 'iste', 'Ipsum et id libero non voluptatem asperiores. Commodi officia dolor sed. Deleniti et quia dolor ut enim. Dolorem alias et temporibus ut est consequatur.', 882, 4, 3, 1, '2018-05-02 10:43:52', '2018-05-02 10:43:52'); -- -------------------------------------------------------- -- -- Table structure for table `reviews` -- CREATE TABLE `reviews` ( `id` int(10) UNSIGNED NOT NULL, `product_id` int(10) UNSIGNED NOT NULL, `customer` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `review` text COLLATE utf8mb4_unicode_ci NOT NULL, `star` int(11) 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 `reviews` -- INSERT INTO `reviews` (`id`, `product_id`, `customer`, `review`, `star`, `created_at`, `updated_at`) VALUES (1, 2, 'Rosalia Rice', 'Illo omnis laborum placeat dolorum. Deleniti recusandae consequuntur saepe nisi quo. Voluptatem et ratione qui. Ea sapiente ut sed placeat.', 5, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (2, 46, 'Yoshiko Strosin', 'Enim voluptatem non repellendus animi. Deleniti et aspernatur enim nulla dignissimos. Rem repudiandae laboriosam dolor ut dolore non natus.', 1, '2018-05-02 10:43:52', '2018-05-02 10:43:52'), (3, 5, 'Mikayla Kuvalis', 'Labore consectetur nemo minima est et est. Excepturi rerum aut quia assumenda.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (4, 2, 'Chester Ferry DDS', 'Voluptas ut dolor dolores tenetur nesciunt provident. Sunt consequatur nihil a aut dolores reprehenderit consequatur. Eveniet rerum magnam eligendi eligendi ut.', 4, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (5, 6, 'Diego Hermiston', 'Odit ut dolor suscipit quisquam aut autem numquam. Porro placeat occaecati soluta tempora. Est vero expedita error veniam. Non dignissimos expedita in et sequi.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (6, 12, 'Cory Rosenbaum', 'Nobis recusandae neque dignissimos corrupti eaque et odio. Accusamus quidem in dolorum consequatur magnam sint. Dolorem quas sed sed adipisci.', 3, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (7, 15, 'Kristoffer Upton', 'Et eum explicabo accusantium voluptatem rerum sint. Vitae dolorem nesciunt quisquam sed totam id. Quod sed similique dolor aut aut et.', 4, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (8, 29, 'Quinton Bogan III', 'Veritatis qui soluta minima nobis molestiae. Quia est et dicta molestiae et maiores.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (9, 22, 'Annamarie Champlin III', 'Aut qui et maiores consectetur cupiditate perferendis. Incidunt magni ratione maxime voluptatem eum molestiae. Eligendi qui accusamus hic quisquam aut. Aliquid eos laboriosam ipsa eligendi.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (10, 7, 'Miss Bridie Prosacco III', 'Porro numquam enim et perferendis. Quos minima eos tenetur tempora earum. Reiciendis sunt voluptate aliquid officiis saepe.', 4, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (11, 5, 'Dylan Jacobs', 'Deleniti et magni magnam ipsam eum minima. Sunt harum ut ipsam non qui ea facilis. Non omnis itaque ut in magni debitis quaerat.', 1, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (12, 38, 'Wilhelmine Kilback', 'Quis et iure et pariatur inventore. Quam rerum et voluptatem quaerat quasi molestiae. Quasi itaque quia labore voluptates ad earum suscipit architecto. Facere repellat tenetur quia distinctio nobis consectetur.', 3, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (13, 34, 'Prof. Scot Reichel', 'Ut ut qui omnis rerum. Modi animi illo doloribus illo est adipisci odit. Odio doloribus incidunt saepe et voluptatum. Natus magni reprehenderit qui ipsum dicta asperiores nulla. Optio dolores qui necessitatibus dolorum.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (14, 22, 'Javier Jones', 'Tempore consequatur magnam aliquam eius facere sit. Eos quidem magni rerum et. Et fugit dolores voluptate iure id quia minus asperiores. Nemo quasi qui officia molestiae non eos facilis.', 2, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (15, 26, 'Prof. Al Boyer', 'Commodi corrupti consequuntur nam fuga perferendis hic vel. Vel nesciunt cupiditate ex maxime debitis. Vel dolor deserunt vero.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (16, 5, 'Prof. Jules Haag', 'At est fugit distinctio amet. Reprehenderit sed nam saepe et velit eos. Esse beatae dolorum perferendis est neque. Animi vel nesciunt blanditiis eos ratione.', 2, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (17, 2, 'Electa Abbott', 'Aspernatur veritatis voluptatibus aut vero. Tenetur et corporis officiis aliquam repudiandae. Nisi autem in voluptas dolorem. Et facere fugiat molestiae aut nostrum.', 2, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (18, 35, 'Linnea Herzog', 'Eius quia ullam et non velit. Quis quas perspiciatis qui nihil quis qui optio earum. Aspernatur eligendi nam id natus. Voluptatibus quas quo ducimus culpa.', 4, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (19, 11, 'Claude Ferry', 'Aut amet enim ipsa. Fuga aut omnis et id. Nihil cupiditate nisi voluptatum tempore perferendis quia autem.', 2, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (20, 16, 'Miss Enola Mueller Sr.', 'Autem saepe quam culpa nobis rerum dolorem excepturi. Saepe impedit cum quia deserunt voluptatem. Soluta nihil cumque aut quidem asperiores maiores. Dolorum id ratione illo nulla eum.', 3, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (21, 26, 'Nat Streich', 'Deleniti omnis eaque aut voluptatem consequatur praesentium facilis ipsa. Quisquam aut reiciendis accusamus id voluptatem voluptas ea. Quos ratione adipisci id itaque. Illum odio rerum ut dicta.', 5, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (22, 5, 'Joyce Hartmann', 'Ipsa possimus cum dolorem quo maxime. Aut autem commodi tenetur fugiat quam vero et. Nam ut nostrum autem reiciendis.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (23, 10, 'Ms. Allison Barrows', 'Architecto inventore sint molestiae repellat. Illum enim sequi fugit dolor nisi. Quae dolor dolor ullam quia. Libero reiciendis corporis quo.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (24, 35, 'Soledad Schaden', 'Eum repudiandae eum aut dolorem culpa. Dolores excepturi libero et nihil voluptatibus quo saepe. Ut magnam dolorem nam eius qui et. Ut molestias voluptatem qui qui sed excepturi magnam.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (25, 22, 'Sage Glover III', 'Dicta dolorum sed eius nisi est animi. Labore asperiores ab repellendus pariatur officia vel alias. Omnis aliquid animi culpa nam totam. Minima excepturi quia aperiam sapiente adipisci porro.', 4, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (26, 28, 'Eveline Crooks', 'Aut sapiente iusto ut totam qui. Ipsa fugiat consectetur enim maxime rerum. Velit quaerat enim atque repellendus dolores. Sed fugiat aut dolore est vel adipisci velit nostrum.', 2, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (27, 7, 'Nigel Turner', 'Sequi eum exercitationem labore qui enim. Voluptas harum rerum cupiditate porro deleniti pariatur vel. Autem inventore nihil et repellat.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (28, 48, 'Kane Gerhold II', 'Harum voluptatibus eum et consequatur aliquid dolorem qui. Quos facilis ex voluptas officiis magni. Quo quia rerum ea.', 5, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (29, 28, 'Dr. Richard Kemmer Jr.', 'Ea eum distinctio ducimus aut impedit quibusdam. Ratione et labore quisquam veniam eligendi. Est assumenda consectetur dolorem qui cupiditate eligendi iste. Cupiditate perspiciatis consequatur laudantium neque id et ipsa saepe.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (30, 21, 'Erna Lehner', 'Eum suscipit aut consectetur et a officia aut. Rem enim atque iste laudantium maiores incidunt voluptas officia. Aut voluptates voluptas minus optio iusto voluptatum.', 4, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (31, 19, 'Darrick Fay', 'Est omnis et et optio. Rerum at tempore ea quis sequi voluptatem quaerat.', 1, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (32, 20, 'Irma Reinger I', 'Accusantium eos ut cupiditate consequatur id. Itaque deleniti nesciunt consectetur commodi minus in ad. Quia ex ducimus cumque id numquam suscipit. Mollitia reprehenderit officiis voluptate veritatis harum et. Nemo qui quo quia placeat veniam ut magni est.', 1, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (33, 31, 'Prof. Karolann Schulist', 'Deserunt vel minima expedita. Beatae nesciunt nemo nemo aspernatur quibusdam quos reiciendis iure. Illum consequatur quae earum vel quia sed voluptates. Voluptas et nam in vel eos enim.', 2, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (34, 10, 'Marianne Feil II', 'Quasi quia aut atque exercitationem harum. Omnis vel quasi atque similique omnis accusamus et accusantium. Molestiae facilis magni beatae et qui. Soluta minima magni mollitia qui ratione iste quos ducimus.', 1, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (35, 29, 'Patrick Yundt', 'Corporis ut labore aut reiciendis totam odit. Voluptate dolore minima perspiciatis consequuntur sapiente necessitatibus. Repellendus sit vero consequatur minima saepe aliquid eos.', 0, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (36, 11, 'Esperanza Russel', 'Quas suscipit voluptas quasi quas assumenda culpa provident cupiditate. Architecto vero ab neque officia quidem quam. Qui aut incidunt et molestiae alias. Autem non accusantium minus et omnis.', 2, '2018-05-02 10:43:53', '2018-05-02 10:43:53'), (37, 40, 'Prof. Hayden Thiel', 'Est neque aut dolorem sint adipisci voluptatem laboriosam minus. Voluptatibus quia enim officia dolores nesciunt cupiditate. Eum autem aspernatur iusto sunt voluptatem. Officiis harum voluptatem quis quisquam aperiam nemo.', 4, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (38, 47, 'Janiya Marvin', 'Voluptas quae tempora perferendis eos ut reprehenderit. Quos odit ullam fugit molestiae adipisci molestias enim. Consequatur est sed quia aut quia.', 2, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (39, 17, 'Dr. Maverick Marvin PhD', 'Voluptas soluta rerum minus minus harum distinctio error. Architecto voluptas accusantium et. Rem est ut corporis et.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (40, 21, 'Prof. Rosendo Dach IV', 'Sed dignissimos reiciendis et minima. Omnis fugit sed earum. Est non et voluptatum sed sed fugiat voluptatem.', 4, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (41, 16, 'Mekhi Botsford', 'Harum odio ullam minus voluptas aut ut tempora. Minus quis minus eum non ducimus optio saepe ut. Facere consequatur enim officiis corrupti corporis.', 3, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (42, 49, 'Dana Kohler', 'Accusantium in quos voluptatem rerum eveniet. Autem asperiores quo in delectus inventore quae ab. Qui sed similique praesentium quis ut eos qui.', 5, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (43, 23, 'Velva Volkman', 'Est fuga eum explicabo nostrum quis beatae. Omnis laudantium est excepturi perspiciatis provident. Iure iusto distinctio cupiditate vero magni unde deserunt. Ut nulla sed ea assumenda aut sit.', 1, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (44, 18, 'Prof. Charlie Kuhn V', 'Eum ut dolorem repudiandae. Et asperiores cupiditate non est. Inventore qui temporibus officia voluptate fugiat corrupti aut. Aliquam in eum fugit facilis laborum quis.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (45, 32, 'Ben Ritchie', 'Hic ab numquam officiis dolore. Iste quod exercitationem iste omnis alias delectus quia. Et consequatur provident voluptatibus est facilis cupiditate.', 5, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (46, 44, 'Mr. Jessie Leannon I', 'Eaque et et nostrum reiciendis earum mollitia perspiciatis. Voluptatem magnam sit quae culpa eligendi et molestiae. Similique cumque dolorum et et. Sed velit sed quia.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (47, 39, 'Elza Parker', 'Aut nihil qui officia quod eius sed. Non quidem excepturi consequuntur. Molestias rerum minima sit quo doloremque. Rerum quidem alias eius voluptatibus.', 4, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (48, 38, 'Flossie Hansen', 'Vero voluptatem quam consequatur explicabo. Officia numquam amet sit ratione voluptas dolor earum. Voluptatem dolores sapiente vel modi sint facere iure. Eveniet consequatur ut occaecati eaque quo asperiores. Et esse sed sit dolorem excepturi.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (49, 28, 'Gertrude Daugherty', 'Molestiae velit autem ea nihil modi et esse. Eum quidem quod eum in rerum non. Qui sed sapiente et non.', 1, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (50, 15, 'Isaiah Hauck Jr.', 'Eum ut ut ipsa earum officia voluptas. Perferendis provident quas voluptatem qui omnis sed distinctio. Veritatis sed id sit.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (51, 31, 'Miss Kailyn Blick II', 'Suscipit hic voluptatibus culpa voluptatem amet. Minima porro odio iure nihil quo distinctio aspernatur. Qui et voluptate molestias similique aut dolor ad aperiam. Assumenda voluptates libero odit.', 3, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (52, 50, 'Nina Walter', 'Aut reprehenderit laudantium porro sapiente molestias quos. Blanditiis itaque numquam deleniti consequatur facere ullam et beatae. Ut earum accusantium placeat dolor. In illo quidem est fuga et beatae.', 5, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (53, 46, 'Micheal Rau IV', 'A illo explicabo consequatur labore nisi maxime id. Dignissimos maxime et sint accusantium rerum culpa rerum. Doloremque aspernatur doloremque tenetur quidem consequatur facilis. Et debitis suscipit est ipsa quibusdam harum tempore.', 1, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (54, 36, 'Agnes Eichmann', 'Voluptas enim sint quae et quia voluptate. Quaerat voluptate possimus ut. Nostrum est itaque iure.', 1, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (55, 43, 'Julia Lindgren DDS', 'Nisi facilis et cum ut ad et. Tempora quia iste vel. Et quia totam deleniti ad et ducimus. In enim architecto facilis.', 2, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (56, 38, 'Amya Auer III', 'Temporibus ut nihil adipisci ut impedit. Sint odio eum nemo illum commodi harum. Ipsam et beatae odit ipsum minus eum voluptatibus.', 3, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (57, 15, 'Eda Koss', 'Sed nesciunt ipsum hic nemo magnam explicabo dolorem. Voluptas consequuntur natus dolore.', 2, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (58, 46, 'Prof. Hermina Bayer', 'Atque recusandae nobis deserunt numquam nemo quis. Repellat vel vero autem rerum. Iste quia sit voluptatem et totam hic.', 3, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (59, 21, 'Jordan D\'Amore', 'Explicabo est rerum praesentium. Consequatur ipsum quod voluptate. Libero ipsam animi nesciunt consequatur non.', 3, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (60, 31, 'Jared Jacobi', 'In sapiente nihil cupiditate ab tempora. Esse perspiciatis quis laboriosam sed nihil dolorem. Molestiae totam tempora aspernatur sunt quia at ipsum totam. Doloremque cum tenetur omnis.', 4, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (61, 16, 'Yvette Krajcik', 'Repellat voluptatum sit dolores qui vel nisi vel. Pariatur illum fuga exercitationem vel. Eaque quia repudiandae illum harum deleniti laborum. Voluptatem rem voluptatibus debitis velit qui ipsam qui.', 2, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (62, 11, 'Mariam Hamill', 'Qui sapiente iure assumenda repellendus totam. Ea omnis aut qui. Occaecati omnis possimus adipisci. Iusto ducimus laborum mollitia odit autem.', 5, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (63, 11, 'Walker Bartell I', 'Illo dicta quas ratione qui et. Optio distinctio sit quia. Quia harum mollitia aspernatur libero doloribus placeat. Doloremque quia quisquam odio explicabo voluptate odio voluptas.', 5, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (64, 12, 'Angeline Hahn DVM', 'Est ut et aut sit. Commodi nihil possimus perspiciatis et. Ut consequatur provident provident et ad numquam vel.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (65, 5, 'Bernadine Waters IV', 'Praesentium et qui blanditiis omnis nesciunt veritatis consequatur. Nihil incidunt sed enim aspernatur qui cumque et. Explicabo est ea molestiae qui incidunt esse delectus. Sit quis magni sequi. Voluptatem ut ut aperiam assumenda itaque.', 5, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (66, 11, 'Heath Predovic', 'Error necessitatibus maiores alias et. Necessitatibus quia sit sunt exercitationem. Sit sunt non voluptatibus qui ut assumenda et.', 1, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (67, 23, 'Aryanna Grant DDS', 'Sed ducimus est quasi sed. Odio consectetur recusandae est. Possimus aut excepturi dignissimos iure. Nihil amet aspernatur libero nisi reiciendis rerum tempore sunt.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (68, 25, 'Mr. Triston Cartwright', 'Qui debitis voluptas ad et et quia ipsa. Minima quaerat voluptatum non omnis. Est occaecati dignissimos saepe veritatis rerum.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (69, 21, 'Lilian Grant III', 'Ut cupiditate harum nostrum deleniti explicabo qui nisi. Maxime est sit qui consequatur. Quia facilis facere suscipit dolor ut deserunt. Cupiditate consequatur aut sapiente quos veniam voluptatem ad.', 0, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (70, 40, 'Golden Johns', 'Iusto temporibus sit omnis atque neque. Nulla tenetur illo et. Dolorem assumenda harum placeat doloribus placeat qui aliquam. Excepturi totam quia veritatis est nihil aperiam.', 3, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (71, 25, 'Mr. Oren Ortiz DVM', 'Repellendus dolores et veniam quae. Quaerat dicta ut tenetur consectetur minima. Alias consequatur velit at ipsum. Dolor blanditiis quam repudiandae qui voluptas consequatur.', 3, '2018-05-02 10:43:54', '2018-05-02 10:43:54'), (72, 32, 'Twila Torp', 'Ipsam non quidem sit dignissimos nulla. Voluptatem a nam sint et amet. Eaque velit accusantium sit iusto.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (73, 22, 'Angela Ledner', 'Deleniti fugiat odit enim ut sed omnis. Eos ea nobis dolor ab magni. Deserunt numquam exercitationem officiis molestias dolorum.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (74, 9, 'Celia Kozey DDS', 'Praesentium atque ea magni officiis. Aut cumque porro neque repudiandae omnis amet neque. Ea et culpa voluptatibus quia laboriosam qui. Dolorem suscipit molestiae omnis distinctio velit. Rerum facilis eveniet veritatis sunt eum.', 0, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (75, 40, 'Prof. Janet Schuster III', 'Dolores ullam quo omnis facere. Autem saepe dolorem ab repudiandae aut natus ad facilis. Qui quia quia nostrum. Autem omnis eligendi et mollitia est magni ipsum.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (76, 33, 'Maryjane Wyman DDS', 'Modi ut aliquid fugiat voluptatibus delectus consequuntur. Quia iste qui labore maiores error facere aut facere. Sint velit nihil est ipsum quidem alias. Voluptatem sit quibusdam voluptatem voluptas quia dignissimos.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (77, 44, 'Bessie Schowalter', 'Voluptates aliquid dolorem at voluptatibus. Rerum ab non ut atque dicta repellendus laboriosam. Sit eligendi laudantium minus porro consectetur.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (78, 37, 'Camylle Reinger', 'Et magni tempora quia explicabo praesentium. Commodi sit ad eum. Veniam et ad doloribus vel minima vero. Exercitationem ad minima excepturi quaerat laudantium.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (79, 37, 'Jamaal Fahey', 'Repellendus amet quos sed voluptatem eum. Quos et ut a dolorum. Eum et inventore voluptatem est sunt.', 0, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (80, 30, 'Elinore Hamill', 'Voluptatum sit veniam voluptas laboriosam qui est sint. Eum officia amet molestias deleniti eum. Tempore ut sunt numquam ex sunt praesentium. Consequatur praesentium rerum ab vitae eius et fugit.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (81, 21, 'Reyna Kulas', 'Eum a dolores voluptas qui ab laudantium explicabo. Soluta accusantium aut cumque explicabo laborum ut sint. Cupiditate rerum non suscipit quis fugit. Repellat quae fugit sequi architecto. Maiores ut laborum autem totam ducimus voluptatum.', 0, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (82, 31, 'Virgie Blanda', 'Aut temporibus facilis qui debitis expedita perspiciatis. Provident voluptatem eum voluptates tenetur qui. Soluta culpa aut facere qui voluptatem magnam iusto.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (83, 42, 'Prof. Celia Cruickshank', 'Consectetur est modi et laboriosam id velit. Dolor sint consequatur aliquid dignissimos ipsam voluptatem. Error et ut aperiam omnis deserunt. Ducimus molestiae quasi earum iusto maxime in recusandae.', 0, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (84, 5, 'German Goldner', 'Non quia in eaque officiis ipsa eos. Voluptas nobis et illo nihil beatae consequuntur voluptate veritatis.', 0, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (85, 11, 'Prof. John Heidenreich', 'Consequatur dolores modi enim alias et. Doloribus ut enim et voluptas ipsa quis maxime.', 4, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (86, 4, 'Ernestina Pfeffer', 'Tempore quidem omnis maxime et. Nostrum dicta id ut dolore cumque natus. Voluptas tempore odit accusantium aut nobis rerum.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (87, 10, 'Asia Corkery I', 'Recusandae et pariatur rerum in neque. Ab ipsa voluptates recusandae voluptates magnam dolores est. Excepturi dignissimos repellat fugiat quia modi nemo quas. Minima deleniti doloribus blanditiis in nobis placeat.', 3, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (88, 25, 'Lupe Bosco', 'Aut necessitatibus recusandae quisquam quo et debitis quis. Quidem molestiae officia dicta. Quia nemo et velit eos qui ipsam. Nihil distinctio quod nihil esse facilis.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (89, 7, 'Prof. Adelbert Littel', 'Voluptas quasi voluptates magni deleniti sequi. Consequuntur et esse mollitia. Sed veniam ipsam ea magni quam error. Omnis praesentium iste et consectetur eos unde suscipit.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (90, 43, 'Antonio Bergnaum', 'Et inventore quos maiores id et unde. Provident repudiandae laboriosam rerum facilis non. Sed laudantium sint ut ut aperiam. Expedita explicabo amet alias architecto est vel laboriosam.', 4, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (91, 28, 'Ryder Cronin', 'Culpa ducimus aliquid eligendi voluptatem veniam. Saepe sit maxime rem. Illum magni autem non occaecati aut odit pariatur.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (92, 13, 'Mike Feil', 'Eos fuga voluptate enim minus. Et molestiae rerum aut dolor mollitia unde quae. Sint dolores maxime quia reiciendis. Incidunt consectetur et quas laudantium natus.', 3, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (93, 33, 'Kimberly Haley', 'Deleniti dolores quos et. Ut necessitatibus tempora tempore repudiandae voluptate cum ea totam. Sint ipsa tempora quia sunt illum similique pariatur. Dolor maiores odit nobis omnis repudiandae unde atque. Dignissimos ut odit debitis molestiae laudantium pariatur id excepturi.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (94, 39, 'Madaline Jacobson III', 'Deleniti rerum placeat maxime sed quos et. Soluta qui omnis optio maxime sint sequi. Ipsam voluptatem vitae est et aut non dolore voluptas. Rerum repellat et voluptatibus nam.', 4, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (95, 7, 'Prof. Margaretta Hansen III', 'Reprehenderit et eius molestiae modi a voluptatem ut aperiam. Tempore porro ea dolore repellat. Praesentium ex unde suscipit consequuntur occaecati labore dignissimos. Repudiandae ad quia eius ut aut omnis eius.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (96, 44, 'Prof. Loren Schuster MD', 'Libero libero itaque suscipit ex ad tempora eos. Consequatur ea sunt neque nesciunt quia. Vel qui voluptas dolor rerum est quia beatae. Ipsum deleniti et amet commodi sequi est unde.', 2, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (97, 20, 'Ms. Yoshiko Hilpert', 'Voluptate dolorum quam assumenda accusamus sed et voluptatibus. Autem sit et qui assumenda et quam. Corrupti a at perferendis est. Aut aperiam eligendi consequuntur iure consequatur animi a. Quis quod nemo aliquam qui deserunt perspiciatis quasi enim.', 3, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (98, 18, 'Ofelia Mraz', 'Molestias optio nam esse quod eaque delectus. Suscipit rerum ab sit et deserunt nulla cum. Voluptatibus voluptates et alias veritatis autem error aperiam praesentium.', 5, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (99, 17, 'Dr. Ansel Nienow V', 'Et vel eligendi soluta sunt quibusdam. Necessitatibus dolor numquam quia deleniti aperiam assumenda dolorem. Et labore omnis omnis eveniet sit veritatis aliquid.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (100, 7, 'Seth Wiegand', 'Sint ea corporis illum. Id ipsam rerum doloribus qui. Nihil ut nulla delectus perspiciatis.', 0, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (101, 19, 'Mauricio Hermiston', 'Sapiente architecto consectetur quis reiciendis dolor. Id magni eligendi voluptatem iste pariatur neque reprehenderit. Rerum asperiores et recusandae ipsa harum corporis.', 1, '2018-05-02 10:43:55', '2018-05-02 10:43:55'), (102, 30, 'Mrs. Joelle Maggio DVM', 'Iste dolor vel pariatur et repellat. Laboriosam sit exercitationem voluptas placeat ratione aut. Vel sed accusantium amet doloribus reiciendis. Fugit qui sed et et vel necessitatibus nemo.', 4, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (103, 1, 'King Roob', 'At temporibus suscipit voluptatum fugiat. Laudantium architecto natus cumque ut dolor possimus quo. Nesciunt voluptatem animi nemo. Qui aliquam quia eum ut.', 3, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (104, 30, 'Damien Deckow I', 'Necessitatibus cum laudantium nam qui qui quod id. Autem est cumque in doloribus provident fuga vel. Autem similique dolorem at sit. Consequatur mollitia dolores dolorem aliquam sapiente. Ea non quos neque quo.', 1, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (105, 3, 'Dr. Clifton Aufderhar', 'Esse natus quo ut id illum est odit. Amet ut explicabo omnis quis voluptas consectetur ea. Illo ea et recusandae culpa illum atque minima.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (106, 21, 'Lew Lebsack', 'Reprehenderit sit et corrupti ad. Ut iste nostrum quam aliquam voluptatem voluptatem. Et id architecto omnis et.', 0, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (107, 2, 'Mr. Urban Balistreri', 'Vero voluptatem itaque sit eaque. Quis aut et temporibus eaque voluptates qui.', 1, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (108, 37, 'Mrs. Shanel Rau', 'Aut quam sunt sunt distinctio numquam laborum dolores ut. Provident dicta et recusandae. Sequi eligendi repellat aut exercitationem modi incidunt ut animi. Ut earum accusamus vero nam.', 0, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (109, 25, 'Dr. Rene Fritsch', 'Consequatur fugiat deleniti unde ut. Mollitia cum rerum enim aut. Architecto deserunt rerum excepturi vitae labore.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (110, 33, 'Allen Franecki II', 'Optio earum ipsam ipsam inventore molestiae aut et. Unde nisi tenetur similique numquam quidem animi iste. Vero nobis et vel beatae et cumque nulla. Cupiditate nisi odit eaque asperiores.', 1, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (111, 47, 'Burdette Harber PhD', 'Aut cupiditate quo aut excepturi nostrum et. Reiciendis iusto non et fugiat totam magnam voluptatem atque. Voluptas praesentium vel deleniti ipsa reiciendis quia quibusdam maxime. Eius commodi ipsa architecto.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (112, 36, 'Alycia Smith', 'Consequuntur et veritatis quis nam iste cumque. Fugiat recusandae qui sint ut nam. Ipsum corporis expedita vel corporis corporis. Consequuntur neque asperiores vel et ipsam aut ab.', 3, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (113, 25, 'Lauretta Kertzmann', 'Autem et omnis minus ab unde at dolor quia. Perferendis commodi non debitis. Ut rerum dolorem in et reprehenderit.', 3, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (114, 50, 'Ms. Janiya Abshire', 'Voluptatibus eveniet dolores consequatur cupiditate et. Nisi facilis voluptates sed corrupti magni officiis. Pariatur iure ducimus sint aut commodi quos. Ab et ea et aut.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (115, 12, 'Maegan Goodwin', 'Sunt nihil consequatur quas laborum facilis doloremque eos. Praesentium aut praesentium laboriosam doloribus. Sit sed cumque doloribus.', 1, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (116, 3, 'Cecile Renner MD', 'In sed itaque dolore quia. Quo vero debitis rem mollitia fugiat eos assumenda. Aut odio est necessitatibus assumenda. Neque minus eos et a ipsam.', 3, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (117, 10, 'Dr. Ofelia Hudson MD', 'Dolorem et commodi quo odit. Repellat repellendus consequatur inventore ut autem. Vero rerum consequatur sapiente voluptatum nobis suscipit.', 5, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (118, 44, 'Mr. Turner Kessler', 'Dolor quis ducimus nostrum et eos autem laborum. Ratione qui omnis aut enim.', 4, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (119, 45, 'Amber VonRueden I', 'Molestiae recusandae est ad consequatur qui totam tempore suscipit. Eos commodi recusandae ut maiores earum voluptatem voluptas.', 0, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (120, 48, 'Lesly Terry', 'Vitae voluptas aperiam omnis autem omnis est. Animi ut optio eius dicta nobis nihil sed impedit. Atque atque voluptas quae nulla omnis id. Modi dolore perspiciatis quia in sequi deserunt. Aspernatur natus quis optio incidunt sit ut.', 5, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (121, 25, 'Miss Aurore Prosacco', 'Debitis harum quasi molestias saepe nulla. Qui saepe suscipit architecto repudiandae quidem architecto quia. Doloribus in consequuntur omnis culpa.', 5, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (122, 4, 'Leonel Kirlin', 'Consequatur repellendus minus libero repudiandae minus illo rerum. Et voluptas est quo consequuntur magnam fugiat. Quo illum natus consequatur cupiditate quis. Est cupiditate consequatur rem maxime recusandae.', 0, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (123, 41, 'Josie Schiller', 'Reprehenderit non officia velit blanditiis quo corporis sed. Molestias molestiae voluptatem optio itaque quo ut at quia. Quaerat facilis quae culpa omnis atque fugiat recusandae. Eum in asperiores atque.', 3, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (124, 44, 'Selina Klocko', 'Non architecto quam amet sapiente corrupti. Doloribus officia unde voluptas eaque. Eos ipsam iste non doloremque consequatur.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (125, 19, 'Ms. Ashtyn Crona', 'Assumenda sed quia dolores ut asperiores incidunt ex. Impedit reprehenderit mollitia reprehenderit magnam. Et nulla autem omnis atque rerum unde. Minima velit eos enim ipsa velit totam nisi quis.', 1, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (126, 8, 'Aleen Hickle', 'Enim et exercitationem qui rerum ab ut excepturi. Ad sunt illum enim dolore placeat corrupti aliquam est. Quia voluptatem dolor ut consequatur cum consequatur. Velit cumque ab quia corrupti.', 5, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (127, 18, 'Idella Bosco', 'Facere in autem quia fugit non consequatur. Nihil suscipit reprehenderit iure dolore maxime. Eum quasi earum et architecto. Sed quis voluptatibus optio molestiae consequatur. Error odio ut accusamus.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (128, 29, 'Dr. Freeman Jakubowski II', 'Aspernatur ut tempore ducimus deserunt harum. Qui id rerum quasi aspernatur. Tempora velit officia qui sit aut fugiat qui. Sit est velit non id.', 0, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (129, 40, 'Leanne Barton', 'Aspernatur debitis voluptatibus corrupti quia. Aperiam aut ducimus id debitis eligendi. Totam cupiditate non accusantium consequatur ipsa ab rem vel.', 5, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (130, 20, 'Prof. Zetta Huels', 'Eveniet repudiandae qui libero ullam aut numquam est. Dolor beatae blanditiis aliquid molestiae nostrum vero. Quam atque quos molestias laudantium natus necessitatibus. Officia qui atque sed.', 4, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (131, 38, 'Dr. Darrin Tromp II', 'Harum qui est minus est eos qui nisi esse. At ipsam dolores porro minima ut. Aut dicta fugiat sunt ut perspiciatis earum. Facere mollitia aut in eius.', 5, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (132, 7, 'Murl Ankunding III', 'Ut libero consequatur fugit facilis. Aut quia ut recusandae asperiores fugiat et. In voluptate doloremque explicabo saepe.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (133, 41, 'Edna Nolan', 'Est iure tenetur eum voluptatem ut. Sunt eligendi quisquam non aut nisi non.', 0, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (134, 35, 'Mireille Okuneva', 'Dolorem itaque nobis nam facilis. Consequatur voluptatibus ipsum corrupti doloribus. Sed qui velit soluta voluptatem maxime. Ea et dolorum eum maiores quis vero dolores.', 1, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (135, 7, 'Dr. Braeden Paucek', 'Nihil rerum cumque corrupti alias sint perferendis recusandae deleniti. Placeat omnis aut tempore dolor voluptatem iste assumenda. Minus dolore ipsa veritatis veniam aut iure qui ex.', 2, '2018-05-02 10:43:56', '2018-05-02 10:43:56'), (136, 49, 'Cortez Swift', 'Omnis est assumenda est laborum et modi molestias. Expedita molestiae voluptas laudantium voluptatibus aliquid ut rerum adipisci. Possimus harum architecto veniam ipsa facere.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (137, 45, 'Toby Lowe', 'Illo eos voluptates qui et enim. Laboriosam voluptas quae qui eveniet repudiandae nobis. Molestiae dolor autem laborum beatae.', 4, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (138, 7, 'Micheal Koepp', 'Beatae dolorem labore consectetur totam repudiandae ut. Eos assumenda iusto consequuntur. Ratione vel fuga animi et facere nihil. Quasi recusandae ut consectetur at itaque.', 1, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (139, 5, 'Aileen Yundt', 'Et a rerum repellat. Vel blanditiis qui et veniam fugit natus. Aliquam voluptas velit quo pariatur.', 2, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (140, 18, 'Dr. Cristal Kutch DDS', 'Aut molestiae non eos. Et suscipit qui porro provident consequatur animi ut a. Veritatis temporibus voluptatem nam aut sunt voluptatum.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (141, 33, 'Katelyn Zieme', 'Et aut velit consectetur quas labore asperiores vel. Sint eos natus eaque illo ipsa rerum asperiores. Dignissimos sunt quisquam reiciendis omnis accusantium odio hic. Reiciendis alias et dolores qui rerum quam fugiat nisi. Tempore soluta nulla repellat.', 4, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (142, 6, 'Emilia Grant', 'Sunt non et consequatur quos itaque voluptatem. Ex et hic in dolore asperiores ut et. Est reprehenderit aut deleniti eveniet occaecati vel necessitatibus harum.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (143, 9, 'Reymundo Metz', 'Impedit aut ad qui rem. Tempora est repudiandae porro tenetur omnis. Dolorum consequuntur ad nisi nesciunt dolorem. Sunt ut qui modi.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (144, 7, 'Silas Schinner', 'Sit dolores nam quod quia. Amet autem debitis qui sed. Nihil voluptatem temporibus amet atque minus recusandae. Officiis rerum consequuntur aut explicabo suscipit qui molestiae.', 3, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (145, 19, 'Felton Kub', 'Aut ut at ut dolores. Eos dolore maiores quae nemo assumenda vel sed. Alias sapiente in aliquam nihil molestiae sed dolore. Facilis eligendi repellat mollitia excepturi ea. Distinctio omnis nesciunt assumenda ut.', 3, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (146, 38, 'Norbert Lueilwitz', 'Voluptate dolorem eos ipsum quo dolorum. Nesciunt et est voluptatem voluptatem. Itaque totam vero et fugit vero temporibus laboriosam laboriosam. Facere enim qui asperiores quis qui minus aut.', 2, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (147, 14, 'Mitchell Walter', 'Ipsum fugit quo et dolor nulla. Nulla fuga rerum voluptatem commodi earum. Illo esse expedita vero aliquid quos perferendis in. Illo repellendus veniam corrupti repellendus aut. Nihil minima dolores numquam sed consequatur est.', 1, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (148, 23, 'German Kunde', 'Cumque expedita nesciunt voluptatem fuga ab. Dignissimos voluptatem doloremque consequatur ex in rerum. Cupiditate explicabo rem veniam asperiores. Eius id sit est fugit voluptatem itaque.', 1, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (149, 32, 'Fausto Dicki DDS', 'Ut delectus fugit dignissimos officiis magnam est eum assumenda. Molestias et sed omnis quisquam eum odio tempora. Consequuntur modi omnis totam magni quidem perferendis odio.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (150, 33, 'Dejah Kub DDS', 'Pariatur necessitatibus cum expedita qui sit. Architecto a aut excepturi labore cupiditate minima iste. Pariatur et optio quia aut.', 4, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (151, 17, 'Laurel Nicolas', 'Illo qui et tempora nihil quia. Ipsa labore quos nisi eum non expedita dignissimos libero. Aut aperiam dignissimos sint incidunt dolores maiores omnis. Assumenda itaque dolorum saepe asperiores dolor.', 1, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (152, 42, 'Barbara Gibson III', 'Voluptatibus ea odio architecto. Suscipit ut consequatur doloremque enim est placeat quos. Aliquam alias rem quos voluptatum unde voluptatem blanditiis.', 1, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (153, 39, 'Torrey McKenzie III', 'Nostrum et magni eum et beatae tempore. Doloribus minus illum qui aut qui enim. Voluptatem culpa dolore velit ea pariatur dolores. Deserunt totam ipsam aspernatur reiciendis.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (154, 1, 'Michale Hilpert', 'Voluptatem aut tempore inventore repudiandae odio reiciendis. Temporibus ut et non ut in amet officiis. Eos quo vel reiciendis qui.', 0, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (155, 17, 'Mazie Ratke MD', 'Id fugiat placeat dolores voluptatem fugiat sit nam. Veniam animi molestias doloremque voluptatibus quisquam qui. Vel sit velit consequatur. Culpa officiis qui molestiae vel.', 4, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (156, 39, 'Emerson Keeling I', 'Provident eius dolores nobis dolorem voluptas. Sed non eos vel numquam. Maxime quasi praesentium et laudantium.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (157, 28, 'Norval Erdman', 'Omnis aut porro sit suscipit exercitationem sed. Accusantium recusandae et mollitia sint. Consequatur et velit iste itaque. Ut perferendis quia quia mollitia dolorum et aspernatur accusamus.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (158, 5, 'Lilyan Glover', 'Voluptatibus illo ut libero ut minima quae consequuntur. Quia similique a ducimus officia est sit illum. Laborum dignissimos alias aut laboriosam accusantium maiores vel. Eaque impedit esse consequatur omnis.', 3, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (159, 16, 'Gaylord Kutch', 'Aut autem maiores saepe reprehenderit. Voluptates molestiae fugiat libero unde quod quo. Cupiditate deserunt explicabo eum quae officia laborum nihil. Officia enim sit sed in.', 2, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (160, 35, 'Amos Dare', 'Et hic ut dignissimos rerum nihil rerum. Explicabo quidem maiores repellat. Aut non esse provident corporis laborum aut. Fugiat vero velit facere delectus occaecati alias id.', 0, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (161, 39, 'Wilfredo Hartmann II', 'Et reiciendis eaque molestias eveniet. Debitis quam ea eligendi corrupti officiis.', 1, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (162, 19, 'Maximo Schoen', 'Iure vitae et asperiores. Ut ea ea earum id voluptates. Qui rerum eum omnis fugit molestiae. Sint id quis laudantium illo. Consequatur quia inventore et fugiat qui esse.', 0, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (163, 33, 'Mr. Barry Schowalter IV', 'Recusandae possimus eligendi commodi nobis ut maiores iure. Non eligendi sed quis facere. Consequatur quidem harum iste ipsum doloribus nulla. Sit nostrum non autem et sunt.', 3, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (164, 33, 'Evert Friesen', 'Qui et ipsum rerum est possimus. Molestias non aliquid cum laboriosam. Voluptatum ab aliquam qui et consequatur consequatur qui. Numquam sed eos neque illo voluptate fuga.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (165, 49, 'Ida Lang', 'Rerum libero quam dolorum omnis et in hic vel. Laboriosam excepturi ducimus quia earum. Ab mollitia voluptas suscipit dolorem dolor sit rerum. Officiis voluptate nihil alias.', 1, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (166, 23, 'Prof. Adolph Stehr IV', 'Id molestiae dolorem modi beatae dolores. Iste ut distinctio repudiandae delectus et. Amet voluptatem qui veritatis placeat sapiente doloremque illo. Maiores et tenetur corporis suscipit sunt facilis.', 2, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (167, 10, 'Savannah Renner', 'Error fugiat atque dolores architecto voluptatem ipsa fugit. Maxime et est qui occaecati.', 5, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (168, 17, 'Joshua Towne', 'Id tempora veritatis autem suscipit. Ut nulla nobis sapiente facere porro totam nesciunt. Consequatur recusandae esse rerum voluptate nihil. Quia harum possimus velit ut reprehenderit ipsum.', 2, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (169, 8, 'George Stiedemann', 'Sapiente similique fugiat facere. Voluptatem optio sed et deserunt facilis rem et. Deleniti architecto delectus sit nostrum quos sint. Temporibus perspiciatis accusantium id rerum praesentium commodi aut.', 2, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (170, 44, 'Miss Lacy Ledner', 'Magnam sint modi dolores. Molestias fuga exercitationem et. Dolore et asperiores molestiae velit ad quae. Illum qui et voluptatem id facere magni veritatis.', 2, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (171, 37, 'Thomas McGlynn V', 'Ab ut illo tenetur qui mollitia vero. Quis qui et est quaerat fugiat eius quos voluptatum. Et velit quos placeat. Adipisci fugit distinctio eaque quia alias ea qui a.', 0, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (172, 6, 'Helmer Jerde', 'Nulla earum expedita laboriosam. Dolor sequi vel qui et. Ducimus necessitatibus fuga consequatur et et est nisi sit. Molestiae et sint eum voluptatibus qui sequi et.', 4, '2018-05-02 10:43:57', '2018-05-02 10:43:57'), (173, 22, 'Rudy VonRueden', 'Placeat expedita consequuntur molestias rerum et dicta id qui. Aliquam perspiciatis et velit voluptas perferendis quasi et rerum. Et corrupti voluptatibus temporibus delectus recusandae sequi ea autem.', 1, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (174, 10, 'Jane Turner', 'Facere fugiat dignissimos molestiae voluptatem in. Beatae nobis rem illo labore sed.', 0, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (175, 43, 'Dr. Royal Hegmann IV', 'Ut eum repellendus nisi quaerat facere sequi odio. Eaque delectus et facere. Exercitationem enim facere et omnis.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (176, 31, 'Torrance Welch DVM', 'Omnis rerum dicta at ipsa ducimus. Magni voluptate et accusamus dolore accusantium tempora porro. Id totam blanditiis eum facere voluptatem suscipit aut. Quo dolor aut nobis facilis at culpa omnis.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (177, 36, 'Ms. Janis Morissette', 'Et voluptate repellat aut. Quas maxime beatae aspernatur ea velit. Ad omnis quia reiciendis ut cumque. Aspernatur modi architecto eos non quia earum quam velit.', 0, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (178, 50, 'Mr. Ervin Harvey', 'Eveniet placeat accusantium cumque maiores dicta. Ut velit ab id eos facere exercitationem et. Assumenda quam deleniti ut pariatur ut blanditiis ea.', 5, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (179, 25, 'Reina Parisian', 'Quos reiciendis temporibus qui culpa molestias. Officiis doloribus aut temporibus recusandae. Consectetur voluptatem animi quo rerum aut necessitatibus numquam. Ipsam iste nostrum debitis culpa ut omnis.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (180, 29, 'Joanie Huel', 'Molestias beatae exercitationem molestiae atque. Amet dolores illum molestias accusamus rem. Ea ullam eos sunt laboriosam magni et aut.', 2, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (181, 2, 'Miss Lelah Terry', 'Ipsa deleniti sapiente dolor quasi eos. Et quo voluptates architecto error voluptas incidunt. Aut voluptatibus assumenda exercitationem placeat minima rerum a saepe. Nostrum voluptas recusandae enim dignissimos.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (182, 6, 'Meaghan Parker DDS', 'Eos ea ipsa laborum dicta neque. Et accusantium ad et dolores.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (183, 46, 'Linnie Botsford MD', 'Perferendis eius deserunt cum. Quasi neque ea et sunt omnis molestias. Pariatur assumenda aperiam quo eos ad aut aut. Laboriosam et numquam eaque reiciendis neque quia. Corrupti officia consequatur ab.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (184, 44, 'Tania Donnelly III', 'Exercitationem doloremque quod qui illum tempore sunt. Quia consequuntur nam beatae et quo. Fugit consequatur recusandae ipsum voluptatem corrupti maiores quis. At saepe et dolore sit.', 1, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (185, 12, 'Nicholas Kling', 'Ea sit sed aut porro. Voluptatem sapiente quia quam saepe quia voluptatem provident. Dolores blanditiis sit sit porro ut et temporibus. Cupiditate voluptatem ut voluptas quisquam eveniet et sunt magnam.', 5, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (186, 14, 'Syble Sauer DDS', 'Et illo eos voluptatem veniam quas aut. Nesciunt molestias earum pariatur commodi quo sint. Sed et quis fugit perspiciatis est cumque quod voluptatem. Occaecati alias et quas ab odit nihil dolorem.', 5, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (187, 23, 'Rebekah Wunsch Sr.', 'Consequuntur praesentium ipsam pariatur sed impedit autem. Perspiciatis culpa ut dolor. Magnam nemo natus voluptas est omnis ea eos.', 4, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (188, 22, 'Maybell Kunze', 'Iusto delectus ab aspernatur. Est ab alias qui dolorem sunt. Amet non eum recusandae provident aut molestiae reiciendis.', 5, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (189, 33, 'Prof. Kathryne Cole MD', 'Sit officiis nisi quis fugiat dolores. Quia et iure quos fuga repellat. Assumenda est esse eligendi. Corrupti officiis ipsam iusto esse cumque.', 4, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (190, 49, 'Dr. Ricardo Jaskolski I', 'Optio architecto quibusdam voluptatem qui. Dolores alias ut enim aut. Laboriosam ut molestiae repellat harum consectetur assumenda. Culpa ut voluptatem ut ab.', 5, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (191, 19, 'Adrian Kuhic', 'Provident rerum pariatur assumenda ea id non. Voluptatum fuga eum blanditiis sit fugit cumque rerum quasi. Alias commodi ea totam et. Ea error odit in sequi quia esse amet.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (192, 34, 'Prof. Cleveland Ortiz I', 'Id neque nesciunt omnis. Qui ea optio quisquam facere. Magni commodi veniam et aut nihil voluptas. Qui nostrum laboriosam vero tempore. Quisquam nostrum quia enim praesentium distinctio.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (193, 13, 'Mr. Harley Schumm MD', 'Illo temporibus minima cum et dolores voluptate quo qui. Vitae consequatur fugit natus illum. Aliquam sapiente ut deserunt qui.', 1, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (194, 31, 'Dr. Lisandro Padberg', 'Quibusdam unde in aut dolor et voluptate ut. Voluptatem deserunt tenetur voluptas quae molestiae. Numquam sint maiores optio qui mollitia.', 1, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (195, 44, 'Gardner Muller', 'Commodi quas ab qui ratione. Ipsa possimus dolorem debitis itaque.', 0, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (196, 48, 'Ms. Dandre Sanford Jr.', 'Odit dolores eos qui nisi. Laudantium modi beatae numquam corporis odit dicta ducimus. Voluptatem aut itaque maiores alias voluptas aut.', 1, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (197, 6, 'Estrella Johnson', 'Eius ipsum et fugit magnam atque temporibus. Nam voluptas culpa et non. Voluptatem nulla nesciunt modi omnis ratione deserunt praesentium. Fuga qui quia porro dicta. Tempore necessitatibus saepe quia aperiam in.', 0, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (198, 30, 'Jaunita Lang', 'Nostrum architecto voluptatum doloribus maxime modi eum. Beatae error nobis vel et ipsum nesciunt quaerat dolorum. Quaerat reprehenderit accusamus iste reprehenderit placeat. A harum quos et ut voluptatem quos. Voluptatibus quibusdam sunt reprehenderit nostrum necessitatibus.', 0, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (199, 11, 'Ansley Lynch', 'Rerum suscipit sequi quis perferendis quia aut totam. Velit fuga ut est quibusdam. Fugit et ipsa sit est ullam.', 3, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (200, 6, 'Mr. Roger Torphy DDS', 'Qui atque ipsum est neque. Rerum non blanditiis maiores in. Voluptates enim corporis porro autem qui nostrum.', 5, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (201, 38, 'Samanta Boyle', 'Mollitia ea et autem debitis ex voluptatem. Illo consequatur aliquam rem exercitationem nobis. Facere aut amet explicabo voluptatum nobis qui dolores.', 4, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (202, 45, 'Jermaine Hirthe I', 'Dolores est aspernatur veritatis eos minus. Voluptas omnis tempora ad voluptatem consequatur fugiat explicabo. Magni qui et qui quas enim ut.', 4, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (203, 34, 'Prof. Damaris Gottlieb', 'Libero hic vel natus voluptatibus. Consequatur vel quia labore maiores esse magni. Pariatur dolor est expedita voluptatem. Deserunt sed tempore ipsa hic saepe excepturi neque. Sunt officia reprehenderit unde id asperiores nobis.', 0, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (204, 8, 'Prof. Oswaldo Gleason III', 'Temporibus ex consequatur tempora unde mollitia ut dolor. Similique eligendi non nobis et explicabo velit consequatur. Ea est accusantium quia omnis sunt et.', 5, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (205, 33, 'Trevor Ritchie II', 'Non est impedit dolorum. Qui sed sint qui fugiat ullam tempore. Ut amet maiores aperiam non.', 2, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (206, 45, 'Sheila Runte', 'Qui et ipsa nobis sit est. Voluptates expedita omnis nobis eaque voluptatem velit non. Velit debitis tempora at.', 0, '2018-05-02 10:43:58', '2018-05-02 10:43:58'); INSERT INTO `reviews` (`id`, `product_id`, `customer`, `review`, `star`, `created_at`, `updated_at`) VALUES (207, 46, 'Josiane Schowalter', 'Illo aut tenetur possimus. Est eaque ex magnam esse laborum molestias sint. Ad asperiores exercitationem aut aliquid provident fuga. Adipisci aspernatur explicabo quam molestias voluptatibus est eveniet.', 4, '2018-05-02 10:43:58', '2018-05-02 10:43:58'), (208, 16, 'Laury Kris', 'Et eum consequuntur sed. Adipisci quis accusamus omnis cupiditate debitis soluta. Saepe perspiciatis et quam facere dignissimos eaque dolor velit. Optio recusandae facilis est similique quas in.', 2, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (209, 28, 'Leonel Huel', 'Voluptatem ex modi et id sed. Atque voluptatem aut quis.', 2, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (210, 11, 'Mrs. Cara Anderson', 'Qui molestiae quia sed accusantium. Aut pariatur vel officia in qui ad.', 0, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (211, 46, 'Ella Hodkiewicz', 'Itaque aperiam quia maxime enim natus mollitia. Qui nobis est similique rerum qui rem iste. Sit doloremque dolores ullam perferendis tenetur saepe.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (212, 17, 'Zoila Osinski', 'Laborum labore aut saepe dolores enim nihil placeat. Sunt est natus modi et quia nemo et. Eveniet voluptatum ut aut praesentium consequuntur sit. Veniam nam ex exercitationem illo. Maxime mollitia similique dolorum unde.', 2, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (213, 12, 'Wellington Buckridge', 'Repellendus blanditiis tenetur quis sed vero. Neque reiciendis voluptates voluptatem est dolor qui aut id. Esse qui aliquid fugiat voluptate. Ut necessitatibus maxime eaque cupiditate nihil animi in.', 5, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (214, 21, 'Lonnie Kuvalis Jr.', 'Rem qui saepe atque est quia commodi et. Ut omnis rerum ea reiciendis. Omnis dignissimos alias quae veritatis assumenda omnis animi aut. Iusto excepturi sequi placeat sed suscipit nihil et.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (215, 44, 'Eva Wolf', 'Animi quis molestias et et nemo excepturi voluptatibus error. Et corrupti dolor quia repudiandae repellat eum commodi. Deleniti veniam eos et rerum consequatur. Enim velit in est nemo animi fugiat.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (216, 34, 'Jayne Jacobson', 'Est incidunt non vero sapiente neque. Commodi voluptas et natus facilis. Est itaque explicabo at ut sunt rerum vero.', 0, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (217, 32, 'Rodrigo Schaden', 'Autem sit autem non tempore natus nulla excepturi. Consequatur in suscipit eum rerum odit. Iste voluptatem voluptate sint blanditiis quod.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (218, 21, 'Mrs. Heath Towne', 'Sit at consectetur dolorem eveniet iusto. Iusto et eaque quae enim. Optio ut esse fugiat ea non corrupti excepturi.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (219, 36, 'Harmon Quigley', 'Voluptatum repudiandae aperiam porro iure. Accusantium aliquid quia omnis eligendi. Qui nobis perspiciatis et ipsum quas.', 2, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (220, 50, 'Rosalee Spencer', 'Quidem nulla modi et. Minima id consequatur reiciendis enim.', 5, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (221, 39, 'Curtis Bradtke', 'Repellat velit ipsa occaecati alias nisi et. Est aspernatur autem cum tenetur. Suscipit magni sit culpa suscipit repellendus eos saepe. Voluptas consequatur explicabo voluptatum nisi rerum repudiandae unde. Natus dolores id illo ex magnam maxime est.', 3, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (222, 13, 'Cloyd Mraz', 'Est labore omnis quam veritatis. Vitae et consequatur animi et. Sed nisi earum illo hic et ea.', 2, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (223, 36, 'Prof. Lucas Weber', 'Vel sed sed perferendis perspiciatis nam. Voluptas necessitatibus quo ipsum error nisi fugit nihil. Maxime molestiae et sapiente molestias. Dolorem dolore dolores praesentium dolor.', 5, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (224, 12, 'Mrs. Mina Bechtelar', 'Facilis culpa dolorem amet consectetur. Soluta sint non et provident. Et soluta iure temporibus aut. Numquam sunt totam aut necessitatibus rerum.', 1, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (225, 31, 'Stewart Walsh DVM', 'Fuga sed recusandae omnis voluptates voluptates quos recusandae fugiat. Omnis aut dolorem eos suscipit. Eligendi ut repellendus laboriosam aut ut quis voluptate.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (226, 35, 'Heber Jast', 'A quaerat labore accusamus qui eos autem a. Excepturi non consequatur maiores fugit. Tenetur ullam modi repellendus veritatis. Aut rerum cupiditate beatae occaecati eum perferendis cupiditate.', 0, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (227, 24, 'Laurie Bailey', 'Cum repellat ut fuga aut. Et fugit aut quam est cupiditate sapiente quam. Sunt vel tenetur dolores amet fuga eos commodi nihil.', 2, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (228, 40, 'Kadin Osinski', 'Ut saepe sint perferendis. Velit possimus in ipsum quod aut. Ut iure qui ea a tenetur. Inventore facere aut fugiat possimus ut laboriosam dolor.', 3, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (229, 32, 'Randal Maggio', 'Optio asperiores autem sint quos eum ut. Eius deserunt qui saepe. Pariatur harum velit et illo aliquam delectus.', 0, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (230, 50, 'Granville Heller', 'Quam possimus porro et dolorem. Id labore rerum ut culpa facere accusantium velit. Porro laudantium id optio quo et enim. Ut doloremque maxime commodi voluptatem nobis.', 2, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (231, 50, 'Myrtis Morissette', 'Illo nulla inventore ea quas provident perferendis. Explicabo dolore dolore eum. Nobis eius dolorum libero animi explicabo id pariatur. Vel perferendis at ipsam voluptatem unde et. Vel incidunt minus sed non non odio.', 1, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (232, 33, 'Hilma Murphy', 'Quo rerum et ipsum est ut qui. Veritatis rerum provident qui deserunt officiis et soluta.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (233, 18, 'Mr. Dell Runolfsdottir DVM', 'Possimus perferendis placeat ipsam aperiam dolorum aut dicta. Sequi fuga amet soluta labore autem. Laudantium necessitatibus minima fugiat eveniet consequatur assumenda aspernatur.', 0, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (234, 40, 'Terrell Gaylord', 'Quibusdam doloribus et architecto dolorem ex ut rerum. Eligendi dolore deleniti neque esse provident. Alias velit et assumenda magni sint quia aut. Omnis laudantium iusto qui dolore dolores nostrum.', 1, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (235, 17, 'Eula Wintheiser', 'Non rerum itaque vel ea consequatur. Et voluptas natus perspiciatis porro et eaque minima. In molestiae recusandae deleniti et. Qui laborum dolorem sunt vel.', 5, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (236, 5, 'Marques Ondricka', 'Deleniti non possimus unde perspiciatis. Dolor omnis ut aut tenetur eos recusandae dolores. Et mollitia dolorem sed sed dolore pariatur. Eaque neque nulla natus iusto.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (237, 19, 'Ms. Margarete Pacocha', 'Enim optio quaerat ut qui vero explicabo. Odio quidem ut vero ab dicta aut eveniet velit. Eos iste culpa nobis in culpa molestiae.', 0, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (238, 27, 'Coleman Dibbert', 'Et eligendi ducimus distinctio eveniet dolorem aut. Accusamus repudiandae tempore ut molestiae quos. Asperiores eos illum doloremque sunt.', 0, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (239, 8, 'Arianna Balistreri', 'Eum ea esse eum. Excepturi voluptatem eum natus doloribus.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (240, 3, 'Amina Sanford', 'Veritatis deleniti commodi eaque consequatur. Dolorum ea qui vero sunt. Quia accusantium fugit consectetur perspiciatis.', 1, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (241, 35, 'Emil Schumm', 'Eos ipsa non rem eveniet enim. Voluptatum sunt quas maiores non. Temporibus expedita nihil eveniet nisi. Molestiae quia distinctio iusto ut.', 4, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (242, 21, 'Frederick Kiehn IV', 'Aperiam commodi in iste ut cumque aut nihil. Ipsa totam modi aperiam quidem voluptate quaerat. Quae perspiciatis quasi eveniet qui.', 5, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (243, 33, 'Elinor Crona V', 'Et ut id nihil est qui vel. Quasi aut earum nihil ut cupiditate in. Velit sunt blanditiis adipisci eum eius placeat sunt commodi.', 1, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (244, 16, 'Mr. Donato Jast', 'Modi dolorem quas veritatis aliquid. Est voluptas voluptatem minima adipisci odio. Et debitis perspiciatis ipsam sit. Praesentium velit explicabo sit possimus ut repudiandae et nobis.', 5, '2018-05-02 10:43:59', '2018-05-02 10:43:59'), (245, 17, 'Korey Pfeffer Sr.', 'Itaque cum eum laboriosam debitis odio nulla adipisci totam. Quod nulla enim iusto atque molestiae nihil reiciendis. Quibusdam deleniti sed qui explicabo commodi voluptatem magni est. Autem fugit debitis minima voluptatem et. Minima et quia deleniti quaerat.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (246, 19, 'Vita Padberg', 'Tempore dolorem fugiat ratione. Minus totam molestiae doloremque repellendus amet ut saepe velit. Laboriosam consequatur quia vitae et rerum necessitatibus repudiandae vitae.', 2, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (247, 15, 'Kelsi Legros', 'Tenetur et quibusdam provident laborum quo. Ullam blanditiis inventore repellendus. Veniam nemo aut deleniti consectetur consectetur velit praesentium. Laudantium soluta quos magni ratione adipisci ipsum sed. Eos debitis at porro qui laboriosam blanditiis.', 3, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (248, 15, 'Lewis Greenholt', 'Consequatur qui incidunt architecto. Quia aut fugit dolor. Est ipsa et omnis amet voluptatum. Hic rerum ipsum quasi vel blanditiis labore. Eum deserunt voluptate sequi sint deserunt veritatis praesentium.', 2, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (249, 39, 'Tracy Bayer', 'Atque nesciunt velit soluta molestiae. Sequi qui facilis qui possimus ab est voluptatem. Non aut reiciendis voluptatem.', 4, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (250, 10, 'Precious Reichel MD', 'Sit esse officia nesciunt id tempora dignissimos laboriosam ut. Perferendis nostrum praesentium perferendis rem animi et. Accusamus molestiae dolores quibusdam delectus. Consequatur provident debitis nobis molestias eum deleniti delectus.', 2, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (251, 34, 'Alyce Ortiz', 'Ut culpa qui deleniti vel eos totam ut. Magnam vel aut magnam nostrum laborum.', 1, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (252, 35, 'Mr. Wyatt Tillman', 'Suscipit ipsam fuga voluptatem non. Provident id et vitae et quis repellendus. Delectus id dolor amet dolorem.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (253, 17, 'Wilford Homenick', 'Voluptates beatae inventore ad occaecati recusandae quia unde quia. Fuga hic beatae quis repellat recusandae repellat rem. Rerum at voluptatem aut nisi molestiae sit rerum. Id itaque beatae quia id impedit et laborum.', 4, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (254, 23, 'Rosario Russel', 'Et iste atque velit. Enim quibusdam velit hic sunt. Exercitationem eius possimus sit blanditiis ullam voluptatem.', 1, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (255, 44, 'Gustave Erdman', 'Blanditiis sunt ut qui quisquam. Sint necessitatibus vel eveniet distinctio aut voluptate. Distinctio explicabo tempora expedita voluptatem ut. Sint quod enim est distinctio nihil magni. Quis deserunt et numquam quisquam facilis.', 4, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (256, 42, 'Wyatt Beier Sr.', 'Sunt quasi cum nihil molestias illum perspiciatis. At optio velit tempora quod eaque aliquam. Rerum voluptatibus et iste repellendus. Aut eveniet fugit quasi quaerat atque similique aliquam consectetur.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (257, 27, 'Mr. Ian Mosciski PhD', 'Laborum magni consequuntur molestiae provident aut tempora ducimus. Fuga culpa laudantium fuga ipsum quia ut. Eius consequatur rem quod vero tenetur qui.', 0, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (258, 14, 'Logan Ebert', 'Ut dolor ut voluptatum fuga ea officiis similique. Debitis doloribus numquam reprehenderit corporis quis. Consequatur autem explicabo sint velit. Nemo voluptates consequuntur ipsa est.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (259, 19, 'Prof. Cletus Kub I', 'Pariatur distinctio odit omnis delectus rerum ab. Qui ipsum porro quo id iure qui. Autem delectus ipsa cupiditate aut vitae quae qui. Non dolores magnam et aut non esse sapiente sit.', 3, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (260, 35, 'Dr. Abbie O\'Hara PhD', 'Aperiam laboriosam in ex laudantium enim id et amet. Sit quasi quod repudiandae reiciendis voluptas voluptate. Est totam dolorem labore aliquam labore. Tempore ratione et est et iste laudantium. Voluptas rerum blanditiis dolores qui odio.', 3, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (261, 11, 'Reyes Dicki', 'Ex nostrum tempore quia consectetur voluptate. Facilis iure dolore magnam hic incidunt magni. Corporis veniam perferendis deleniti.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (262, 6, 'Reilly Herman DDS', 'Cumque quis et sint consectetur error. Voluptas sed quia recusandae dolorem perspiciatis ipsa. Id ut eum culpa molestiae provident debitis maxime. Qui et velit at amet voluptas error.', 1, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (263, 9, 'Prof. Ray Pouros', 'At eum odit suscipit blanditiis rerum. Sint qui voluptas quos eligendi quas sit eveniet. Sunt accusamus laborum magnam et. Necessitatibus sit amet quod praesentium.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (264, 10, 'Carlo Luettgen DVM', 'Quasi eos tempore aperiam id quia officiis inventore sed. Ut maxime accusamus sunt. Veritatis ab explicabo voluptatem dicta. Harum ut minus est ea ipsa adipisci.', 1, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (265, 30, 'Marty Mueller', 'Ut in nihil consequatur ut alias et qui. In maxime asperiores et quidem. Et qui natus et saepe necessitatibus provident dolor consequatur.', 0, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (266, 20, 'Jayce Gerhold', 'Nobis enim exercitationem dolorem rerum aliquid. Dolorem quia sapiente totam nihil officia nihil.', 2, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (267, 33, 'Dr. Adella Hoppe II', 'Magni dolorem commodi quidem quia expedita omnis commodi illum. Voluptas numquam assumenda quae est quo ut. Commodi voluptas dolorum et enim nihil fugiat.', 3, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (268, 44, 'Rae Jacobi', 'Eligendi ut a quibusdam. Laborum unde et sed optio est. Atque minus fugit deserunt ut consequatur animi et. Vel saepe et sed in.', 3, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (269, 20, 'Nyasia Kessler', 'Iste quis autem rem aut eius ipsa et. Tempora aspernatur et error non eligendi. Sed molestias ut necessitatibus et dolorem.', 1, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (270, 4, 'Dr. Louisa Runolfsdottir PhD', 'Voluptas deserunt laboriosam officia delectus dolor cupiditate quis. Necessitatibus quis et sed omnis. Iusto fuga maxime mollitia fuga laborum vitae. Molestias occaecati ut incidunt ipsa.', 1, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (271, 1, 'Kavon Corkery', 'Doloribus ipsum at delectus voluptatibus atque assumenda. Nihil placeat quia quas repudiandae non. Magni maxime alias non deleniti et perferendis vel praesentium. Nulla est et recusandae magnam totam eius.', 4, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (272, 15, 'Prof. Alvis Champlin I', 'Ut cupiditate aut aspernatur hic ut accusantium earum. Necessitatibus labore voluptates corporis dignissimos. Modi nobis nihil nihil exercitationem placeat ea corrupti.', 2, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (273, 26, 'Tad Witting MD', 'Veritatis sed dignissimos iste harum sit voluptatem laborum voluptatibus. Ut expedita eius omnis fuga et veritatis. Voluptatem quia quaerat ea deserunt officiis.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (274, 32, 'Sierra Thompson', 'Est aut debitis fuga voluptatem tenetur voluptatem aliquam. Eos quis in occaecati sed sed. Quisquam et quia ad iste consequatur.', 0, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (275, 27, 'Warren Kohler Sr.', 'Voluptas similique praesentium odit. In officiis ut libero omnis. Sunt quo ut doloremque ex. Adipisci dolorem incidunt illum voluptas fugit impedit est. Ut recusandae voluptas iusto sint cum ea fugiat.', 1, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (276, 49, 'Ms. Aubree Harvey DDS', 'Ut ipsam enim quia. Voluptatem non odio perspiciatis nihil sit. Autem odit exercitationem ipsa aut ea.', 3, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (277, 32, 'Mr. Bradford Tillman V', 'Nihil nam repellendus est molestiae esse fugit mollitia animi. Qui aliquid quisquam optio modi veniam fugiat et ipsam. Numquam voluptatem porro amet vel deleniti.', 2, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (278, 30, 'Lysanne Metz', 'Quod quam eligendi saepe. Nam consequuntur libero iure qui et officia qui. Debitis vel veniam dolorem dicta modi. Laboriosam qui autem ratione.', 0, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (279, 4, 'Prof. Shanny Hintz', 'Minima adipisci natus laborum. Itaque ad doloremque alias autem ut nobis. Ea velit sunt velit voluptas dolore.', 2, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (280, 23, 'Marcelina Ferry', 'Doloribus eos sit necessitatibus excepturi id molestias ut. Aut voluptas doloribus dignissimos corporis repellendus quis quam est. Sunt perspiciatis nobis odit et. Quo officiis mollitia asperiores molestiae ea rerum unde sed.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (281, 3, 'Mose Veum', 'Voluptates nam alias consectetur quia aut ut dicta sed. Id qui sit consequuntur consequuntur optio quasi culpa. Qui aliquid laboriosam et et corporis placeat.', 5, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (282, 3, 'Mr. Donnie Strosin V', 'Libero quae alias sapiente voluptatem laboriosam. Magni occaecati quia vitae dolores enim quibusdam. Et illo sit molestiae doloremque.', 3, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (283, 3, 'Janice Kuphal', 'Est non at sed laudantium placeat libero. Quam eaque neque ab. Fuga porro at beatae molestiae. Voluptate incidunt amet molestias ad et dignissimos ad.', 0, '2018-05-02 10:44:00', '2018-05-02 10:44:00'), (284, 36, 'Prof. Elenor Koepp DDS', 'Iste ea veritatis laborum sequi aut quasi fugit natus. Aut aspernatur consequatur ipsum soluta excepturi earum dicta. Ut corporis error voluptatem ullam magnam non nobis.', 3, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (285, 22, 'Mrs. Adella Harris', 'Illo hic officia voluptatem sunt ut. Harum qui ea doloribus consequuntur. Quas maxime itaque quos suscipit est.', 4, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (286, 1, 'Micah Mills', 'Consequatur dolore perspiciatis voluptatum. Accusantium omnis quisquam voluptatibus est atque voluptas. Qui est in aut numquam excepturi ipsam enim.', 4, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (287, 1, 'Dr. Stephany Sporer Sr.', 'Voluptas doloribus et eos corrupti. Iusto voluptates voluptate ullam dignissimos at veniam. Earum nobis ducimus non et omnis eum blanditiis voluptas. Pariatur voluptas quisquam et voluptas nulla iure fugit.', 1, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (288, 43, 'Juanita Anderson', 'Deserunt veniam omnis quis molestiae aspernatur. Molestiae qui illum placeat et corporis laudantium in. Eum deleniti velit qui eum odit. Ea sunt aliquam nihil aut numquam dolor reprehenderit.', 1, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (289, 42, 'Geoffrey Wisoky', 'Itaque fuga officiis animi distinctio ut qui dolores. Dolorem reiciendis repudiandae animi ut eos a. Repellendus rerum numquam officia libero et minima. Veniam facilis perspiciatis necessitatibus voluptatem.', 4, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (290, 21, 'Janae Raynor II', 'Et qui doloremque odio sunt quia dolorem rem. Nobis deserunt quo veritatis sequi eligendi.', 4, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (291, 49, 'Alexis Cruickshank', 'Maxime assumenda voluptatem voluptas aut voluptas. Et et et itaque hic enim aut dicta.', 4, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (292, 43, 'Jerod Lockman DVM', 'Quibusdam modi et atque et minima assumenda. Dolor ratione minus nihil. Repudiandae natus laborum ratione qui sequi molestiae.', 4, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (293, 34, 'Mrs. Jeanne Pacocha', 'Qui assumenda aspernatur dolore accusantium assumenda quisquam ex. Quis repudiandae reprehenderit minus eos ut doloribus. Inventore nihil et rerum reiciendis pariatur. Dolores nulla atque rerum. Inventore et repudiandae ut eos dolores ipsam ducimus.', 2, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (294, 28, 'Dr. Angela Franecki PhD', 'Expedita dolor consequatur tenetur ad. Libero fuga eaque velit qui. Repellendus ipsa ut accusantium dolores at autem officia. Nesciunt itaque doloremque similique tenetur voluptatem.', 1, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (295, 17, 'Georgette Glover', 'Ut atque consequatur non ut necessitatibus. Repudiandae blanditiis voluptas quia quae autem. Dolores distinctio qui aut ut velit. Deleniti expedita dolor culpa eaque dolor.', 2, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (296, 3, 'Prof. Monique Homenick', 'Quisquam voluptatibus nesciunt amet reprehenderit ea corrupti earum. Perferendis iure iusto debitis explicabo nostrum. Officia aspernatur aut vitae consequatur. Ratione at non quidem.', 3, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (297, 47, 'Dr. Barrett Ledner', 'Ut est qui aut repellat. Sed eligendi aut dolor et. Eligendi similique facere molestiae voluptatem vel vel voluptas. A perspiciatis iusto ducimus alias repellat impedit ipsam.', 1, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (298, 1, 'Leda Effertz', 'Et consequatur suscipit non est. Doloremque tenetur officia voluptatibus suscipit mollitia totam. Dolores et itaque officiis consequatur sunt. Officia nulla ea nihil est sit.', 3, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (299, 29, 'Roosevelt Goldner', 'Praesentium ut ipsum expedita sunt. Repudiandae et distinctio praesentium non aperiam. Consectetur hic dolores repellat.', 1, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (300, 43, 'Manuel Quitzon', 'Quisquam magnam quam aliquam. Nobis quidem voluptatem quae suscipit. Aut veritatis voluptas quia odit quia et qui.', 1, '2018-05-02 10:44:01', '2018-05-02 10:44:01'), (301, 38, 'mahmoud', 'test', 4, '2018-05-02 11:53:52', '2018-05-02 11:53:52'), (302, 38, 'mahmoud', 'test', 4, '2018-05-02 11:54:37', '2018-05-02 11:54:37'), (303, 38, 'mahmoud', 'test', 4, '2018-05-02 11:55:10', '2018-05-02 11:55:10'), (304, 38, 'mahmoud', 'test', 4, '2018-05-02 11:55:19', '2018-05-02 11:55:19'), (305, 38, 'mahmoud', 'test', 4, '2018-05-02 11:55:25', '2018-05-02 11:55:25'), (306, 38, 'mahmoud', 'test', 4, '2018-05-02 11:55:53', '2018-05-02 11:55:53'), (307, 38, 'mahmoud', 'test', 4, '2018-05-02 11:56:18', '2018-05-02 11:56:18'), (308, 4, 'mahmoud', 'test', 4, '2018-05-02 11:57:02', '2018-05-02 11:57:02'), (311, 4, 'nasr', 'Test', 4, '2018-05-02 12:22:41', '2018-05-02 12:22:41'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) 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 `users` -- INSERT INTO `users` (`id`, `name`, `email`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Dr. Celestino Schneider I', 'nannie44@example.com', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', 'UzFo14MuT3', '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (2, 'Johnathon Auer', 'larkin.herman@example.com', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', '5e8c3jCUqa', '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (3, 'Dr. Elian Lesch I', 'morissette.devon@example.org', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', '4TVFrPaAwB', '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (4, 'Adrienne Maggio', 'beth.dare@example.org', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', 'YCNKfv3fhx', '2018-05-02 10:43:50', '2018-05-02 10:43:50'), (5, 'Carmen Dare', 'wellington81@example.com', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', 'JPW6kReJWg', '2018-05-02 10:43:50', '2018-05-02 10:43:50'); -- -- Indexes for dumped tables -- -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `oauth_access_tokens` -- ALTER TABLE `oauth_access_tokens` ADD PRIMARY KEY (`id`), ADD KEY `oauth_access_tokens_user_id_index` (`user_id`); -- -- Indexes for table `oauth_auth_codes` -- ALTER TABLE `oauth_auth_codes` ADD PRIMARY KEY (`id`); -- -- Indexes for table `oauth_clients` -- ALTER TABLE `oauth_clients` ADD PRIMARY KEY (`id`), ADD KEY `oauth_clients_user_id_index` (`user_id`); -- -- Indexes for table `oauth_personal_access_clients` -- ALTER TABLE `oauth_personal_access_clients` ADD PRIMARY KEY (`id`), ADD KEY `oauth_personal_access_clients_client_id_index` (`client_id`); -- -- Indexes for table `oauth_refresh_tokens` -- ALTER TABLE `oauth_refresh_tokens` ADD PRIMARY KEY (`id`), ADD KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`), ADD KEY `products_user_id_index` (`user_id`); -- -- Indexes for table `reviews` -- ALTER TABLE `reviews` ADD PRIMARY KEY (`id`), ADD KEY `reviews_product_id_index` (`product_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; -- -- AUTO_INCREMENT for table `oauth_clients` -- ALTER TABLE `oauth_clients` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `oauth_personal_access_clients` -- ALTER TABLE `oauth_personal_access_clients` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51; -- -- AUTO_INCREMENT for table `reviews` -- ALTER TABLE `reviews` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=312; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- Constraints for dumped tables -- -- -- Constraints for table `products` -- ALTER TABLE `products` ADD CONSTRAINT `products_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `reviews` -- ALTER TABLE `reviews` ADD CONSTRAINT `reviews_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE; COMMIT; /*!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 */;
132.383673
356
0.737467
967905a593872b79f992f4f15abf883ef1dc2085
1,749
php
PHP
routes/web.php
Marderon123/TFG-Mario-Alexander
2e920c35be7900d69501eaaaca5b88f2d56792cc
[ "MIT" ]
1
2021-11-16T16:41:30.000Z
2021-11-16T16:41:30.000Z
routes/web.php
Marderon123/TFG-Mario-Alexander
2e920c35be7900d69501eaaaca5b88f2d56792cc
[ "MIT" ]
null
null
null
routes/web.php
Marderon123/TFG-Mario-Alexander
2e920c35be7900d69501eaaaca5b88f2d56792cc
[ "MIT" ]
null
null
null
<?php use App\Http\Controllers\UsersController; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Auth; /* |-------------------------------------------------------------------------- | 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('index'); }); /* Route::get('/admin', ['middleware' => 'EsAdmin'], function () { return view('admin'); }); Route::get('/user', ['middleware' => 'auth'], function () { return view('user'); });*/ Auth::routes(); //Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); Route::get('/user', [App\Http\Controllers\ClientController::class, 'index'])->name('user'); //Route::group(['prefix' =>'admin', 'as' => 'admin'], function(){}); Route::get('/admin', [App\Http\Controllers\AdminController::class, 'index'])->name('admin'); Route::resource('/dashboard/users', 'App\Http\Controllers\UsersController'); Route::resource('/dashboard/posts', 'App\Http\Controllers\UsersPostsController'); Route::resource('/dashboard/graphics', 'App\Http\Controllers\GraphicsController'); Route::resource('/dashboard/password', 'App\Http\Controllers\PasswordController'); /*Route::resource('/dashboard/users', UsersController::class)->names([ 'index' => '/dashboard/users', 'store' => '/dashboard/users', 'edit' => '/dashboard/users/{{$usuario->id}}', ]);*/ //Route::get('/user', [App\Http\Controllers\ClientController::class, 'index'])->name('user');
31.232143
93
0.619783
fadf6d09b885d82719a5d237803e1bf66a80b144
1,902
swift
Swift
Tests/DatadogTests/Datadog/Core/System/BatteryStatusProviderTests.swift
kennonkwok/dd-sdk-ios
b927435fd74a6eba2ca556fdc8eeca256d8dadca
[ "Apache-2.0" ]
93
2020-03-02T16:40:33.000Z
2022-03-26T19:22:59.000Z
Tests/DatadogTests/Datadog/Core/System/BatteryStatusProviderTests.swift
kennonkwok/dd-sdk-ios
b927435fd74a6eba2ca556fdc8eeca256d8dadca
[ "Apache-2.0" ]
259
2020-03-05T17:48:24.000Z
2022-03-29T14:17:57.000Z
Tests/DatadogTests/Datadog/Core/System/BatteryStatusProviderTests.swift
kennonkwok/dd-sdk-ios
b927435fd74a6eba2ca556fdc8eeca256d8dadca
[ "Apache-2.0" ]
60
2020-03-04T20:07:59.000Z
2022-03-30T13:27:08.000Z
/* * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2019-2020 Datadog, Inc. */ import XCTest @testable import Datadog class BatteryStatusProviderTests: XCTestCase { func testWhenInstantiated_itEnablesBatteryMonitoring() { let expectation = self.expectation(description: "call configuration block") let mobileDevice: MobileDevice = .mockWith( enableBatteryStatusMonitoring: { expectation.fulfill() } ) _ = BatteryStatusProvider(mobileDevice: mobileDevice) waitForExpectations(timeout: 1, handler: nil) } func testWhenDeinitialized_itResetsBatteryMonitoring() { let expectation = self.expectation(description: "call configuration block") let mobileDevice: MobileDevice = .mockWith( resetBatteryStatusMonitoring: { expectation.fulfill() } ) autoreleasepool { _ = BatteryStatusProvider(mobileDevice: mobileDevice) } waitForExpectations(timeout: 1, handler: nil) } // swiftlint:disable trailing_whitespace func testItReturnsCurrentBatteryStatus() { let mobileDevice: MobileDevice = .mockWith( currentBatteryStatus: { BatteryStatus( state: .charging, level: 0.5, isLowPowerModeEnabled: false ) } ) let batteryStatusProvider = BatteryStatusProvider(mobileDevice: mobileDevice) XCTAssertEqual(batteryStatusProvider.current.state, .charging) XCTAssertEqual(batteryStatusProvider.current.level, 0.5) XCTAssertFalse(batteryStatusProvider.current.isLowPowerModeEnabled) } // swiftlint:enable trailing_whitespace }
33.368421
117
0.677182