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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ebf00a2438aa9fd4d6019c972371090c4a672cd7
| 65
|
css
|
CSS
|
client/src/components/game/instructions/instruction.component.css
|
ichikareman2/project-werewolf
|
a3a8fef401178f5a73faa4d8821b1cff293c3d55
|
[
"MIT"
] | 2
|
2020-04-12T21:21:38.000Z
|
2020-04-12T23:22:43.000Z
|
client/src/components/game/instructions/instruction.component.css
|
ichikareman2/project-werewolf
|
a3a8fef401178f5a73faa4d8821b1cff293c3d55
|
[
"MIT"
] | 2
|
2020-04-24T05:14:53.000Z
|
2022-03-02T08:10:06.000Z
|
client/src/components/game/instructions/instruction.component.css
|
ichikareman2/project-werewolf
|
a3a8fef401178f5a73faa4d8821b1cff293c3d55
|
[
"MIT"
] | null | null | null |
.game-instruction {
display: block;
margin: 12px auto;
}
| 13
| 22
| 0.630769
|
af6502f8ef37bfce8b8fd0684617ab40fb040b5c
| 1,118
|
sql
|
SQL
|
app-core/service/src/main/resources/liquibase/v1/20210317-01-init_main_tables.sql
|
m1cron/films_catalog
|
3f99a86bcd98b4e5fc11da0903a0a9d7e00d9151
|
[
"MIT"
] | 2
|
2021-01-02T20:29:51.000Z
|
2021-01-03T13:43:05.000Z
|
app-core/service/src/main/resources/liquibase/v1/20210317-01-init_main_tables.sql
|
m1cron/films_catalog
|
3f99a86bcd98b4e5fc11da0903a0a9d7e00d9151
|
[
"MIT"
] | null | null | null |
app-core/service/src/main/resources/liquibase/v1/20210317-01-init_main_tables.sql
|
m1cron/films_catalog
|
3f99a86bcd98b4e5fc11da0903a0a9d7e00d9151
|
[
"MIT"
] | 1
|
2021-07-30T18:35:14.000Z
|
2021-07-30T18:35:14.000Z
|
CREATE TABLE films (
"id" BIGSERIAL,
"title" VARCHAR(100) NOT NULL,
"year" INTEGER,
"genre" VARCHAR(20),
"watched" BOOLEAN DEFAULT FALSE NOT NULL,
"status" VARCHAR(10) DEFAULT 'ACTIVE' NOT NULL,
"created" TIMESTAMP NOT NULL DEFAULT now(),
"updated" TIMESTAMP NOT NULL DEFAULT now(),
UNIQUE ("title"),
PRIMARY KEY ("id")
);
CREATE TABLE users (
"id" BIGSERIAL,
"username" VARCHAR(255) NOT NULL,
"email" VARCHAR(255),
"password" VARCHAR(255) NOT NULL,
"first_name" VARCHAR(50),
"last_name" VARCHAR(100),
"status" VARCHAR(10) DEFAULT 'ACTIVE' NOT NULL,
"created" TIMESTAMP WITHOUT TIME ZONE DEFAULT now(),
"updated" TIMESTAMP WITHOUT TIME ZONE DEFAULT now(),
UNIQUE ("username"),
PRIMARY KEY ("id")
);
CREATE TABLE actors (
"id" BIGSERIAL,
"first_name" VARCHAR(50),
"last_name" VARCHAR(100),
"status" VARCHAR(10) DEFAULT 'ACTIVE' NOT NULL,
"created" TIMESTAMP WITHOUT TIME ZONE DEFAULT now(),
"updated" TIMESTAMP WITHOUT TIME ZONE DEFAULT now(),
UNIQUE ("first_name", "last_name"),
PRIMARY KEY ("id")
);
| 30.216216
| 56
| 0.647585
|
58af17e5a52dd127fcf79c647e521cd6be91a582
| 4,260
|
php
|
PHP
|
application/views/student/footer.php
|
adhilahamed333/campus
|
9614dac5a365ff9fc1405a34226a10b7b3870861
|
[
"MIT"
] | null | null | null |
application/views/student/footer.php
|
adhilahamed333/campus
|
9614dac5a365ff9fc1405a34226a10b7b3870861
|
[
"MIT"
] | null | null | null |
application/views/student/footer.php
|
adhilahamed333/campus
|
9614dac5a365ff9fc1405a34226a10b7b3870861
|
[
"MIT"
] | null | null | null |
<!-- footer start here -->
<div class="footer-agile">
<div class="container">
<div class="footer-btm-agileinfo">
<div class="col-md-3 col-xs-3 footer-grid w3social">
<h3>Our Links</h3>
<ul>
<li><a href="">Home</a></li>
<li><a href="" >About</a></li>
<li><a href="">Portfolio</a></li>
<li><a href="">Contact Us</a></li>
</ul>
</div>
<div class="col-md-3 col-xs-3 footer-grid">
<h3>Contact Info</h3>
<ul>
<li><i class="fa fa-map-marker"></i>+012 345 6789</li>
<li><i class="fa fa-fax"></i>+987 654 3210</li>
<li><i class="fa fa-phone"></i>St, NY 10002, Idukki.</li>
<li><i class="fa fa-envelope-o"></i><a href="">campus@example.com</a></li>
</ul>
</div>
<div class="col-md-6 col-xs-6 footer-grid footer-review">
<h3>About us</h3>
<p>For all our students</p>
<p class="w3l-para-mk">We present</p>
</div>
<div class="clearfix"> </div>
</div>
<div class="footer-agilem">
<div class="col-sm-8 col-xs-9 copy-w3lsright">
<p>© 2020 CAMPUS. All rights reserved | Design by <a href="">CAMPUS</a></p>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- //footer end here -->
<!-- FlexSlider -->
<script defer src="<?php echo base_url(); ?>assets/assets2/js/jquery.flexslider.js"></script>
<script type="text/javascript">
$(window).load(function(){
$('.flexslider').flexslider({
animation: "slide",
start: function(slider){
$('body').removeClass('loading');
}
});
});
</script>
<!-- End-slider-script -->
<!-- Flexisel-js for-testimonials -->
<script type="text/javascript">
$(window).load(function() {
$("#flexiselDemo1").flexisel({
visibleItems:1,
animationSpeed: 1000,
autoPlay: false,
autoPlaySpeed: 3000,
pauseOnHover: true,
enableResponsiveBreakpoints: true,
responsiveBreakpoints: {
portrait: {
changePoint:480,
visibleItems: 1
},
landscape: {
changePoint:640,
visibleItems:1
},
tablet: {
changePoint:768,
visibleItems: 1
}
}
});
});
</script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/assets2/js/jquery.flexisel.js"></script>
<!-- Flexisel-js for-testimonials -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!-- stats -->
<script src="<?php echo base_url(); ?>assets/assets2/js/jquery.waypoints.min.js"></script>
<script src="<?php echo base_url(); ?>assets/assets2/js/jquery.countup.js"></script>
<script>
$('.counter').countUp();
</script>
<!-- //stats -->
<!-- start-smooth-scrolling -->
<script src="<?php echo base_url(); ?>assets/assets2/js/SmoothScroll.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/assets2/js/move-top.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/assets2/js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
</script>
<!-- //end-smooth-scrolling -->
<!-- smooth-scrolling-of-move-up -->
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({ easingType: 'easeOutQuart' });
});
</script>
<script>
$(document).ready(function() {
$('#staff').DataTable();
} );
</script>
<script src="<?php echo base_url(); ?>assets/assets2/datatables/dataTables.bootstrap4.min.js"></script>
<script src="<?php echo base_url(); ?>assets/assets2/datatables/jquery.dataTables.min.js"></script>
<!-- //smooth-scrolling-of-move-up -->
<script src="<?php echo base_url(); ?>assets/assets2/js/bootstrap.js"></script>
</body>
</html>
| 30.869565
| 113
| 0.5723
|
1ba15d861ef6ccb1c47bf13f1b0761d8be6daf03
| 5,790
|
rb
|
Ruby
|
omf-resctl/ruby/omf-resctl/omf_driver/atheros.rb
|
nathansamson/OMF
|
1e8470d7699a5599bc9ef540b8d569d36595baa5
|
[
"MIT"
] | 1
|
2015-06-21T09:50:24.000Z
|
2015-06-21T09:50:24.000Z
|
omf-resctl/ruby/omf-resctl/omf_driver/atheros.rb
|
nathansamson/OMF
|
1e8470d7699a5599bc9ef540b8d569d36595baa5
|
[
"MIT"
] | null | null | null |
omf-resctl/ruby/omf-resctl/omf_driver/atheros.rb
|
nathansamson/OMF
|
1e8470d7699a5599bc9ef540b8d569d36595baa5
|
[
"MIT"
] | null | null | null |
#
# Copyright (c) 2006-2009 National ICT Australia (NICTA), Australia
#
# Copyright (c) 2004-2009 WINLAB, Rutgers University, USA
#
# 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.
#
#
# = atheros.rb
#
# == Description
#
# This file defines the class AtherosDevice which is a sub-class of
# WirelessDevice.
#
require 'omf-resctl/omf_driver/wireless'
#
# This class represents an Atheros device
#
class AtherosDevice < WirelessDevice
# Default version of the supported wireless tools
DEFAULT_WIFI_TOOL_VERSION = 29
#
# Create and set up a new AtherosDevice instance
#
def initialize(logicalName, deviceName)
super(logicalName, deviceName)
@driver = 'ath_pci'
@wlanconfig = '/sbin/wlanconfig'
@iwconfig = '/sbin/iwconfig'
@iwpriv = '/sbin/iwpriv'
@toolVersion = getToolVersion
end
#
# Return the version of the madwifi tools
#
# [Return] the versions of the madwifi tools
#
def getToolVersion()
cmd = "#{@wlanconfig} --version | head -n 1 | awk '{print $4}'"
version = `#{cmd}`
if !($?.success?) || (version.to_i == 0)
debug "Could not determine Wireless Tool version! Default to version: "+
"#{DEFAULT_WIFI_TOOL_VERSION}"
return DEFAULT_WIFI_TOOL_VERSION
else
debug "Wireless Tool version: #{version.to_i}"
return version.to_i
end
end
#
# Return the specific command required to configure a given property of this
# device. When a property does not exist for this device, check if it does
# for its super-class.
#
# - prop = the property to configure
# - value = the value to configure that property to
#
def getConfigCmd(prop, value)
@propertyList[prop.to_sym] = value
case prop
when 'type'
# 'value' defines type of operation
type = case
when value == 'a' then 1
when value == 'b' then 2
when value == 'g' then 3
else
raise "Unknown type. Should be 'a', 'b', or 'g'."
end
return "#{@iwpriv} #{@deviceName} mode #{type}"
when "mode"
mode = case
when value == 'master' then 'ap'
when value == 'Master' then 'ap'
when value == 'managed' then 'sta'
when value == 'Managed' then 'sta'
when value == 'ad-hoc' then 'adhoc'
when value == 'Ad-Hoc' then 'adhoc'
when value == 'adhoc' then 'adhoc'
when value == 'AdHoc' then 'adhoc'
when value == 'monitor' then 'monitor'
when value == 'Monitor' then 'monitor'
else
raise "Unknown mode '#{value}'. Should be 'master', 'managed', or 'adhoc'."
end
# - Recent version of MADWIFI driver requires us to use 'wlanconfig' to
# destroy and recreate the wireless device when changing its mode of
# operation.
# - Also when there are more than one wireless card on the node, we
# have to retrieve the 'base device' name of the card being used
# By default, the madwifi config file on the node agents at NICTA
# assigns the device 'ath0' to the card 'wifi0', and 'ath1' to the
# card 'wifi1' (This is set in '/etc/init.d/atheros'. If you modified
# this config file on your on ORBIT deployment, the following lines
# must be changed accordingly)
baseDevice = case
when @deviceName == 'ath0' then 'wifi0'
when @deviceName == 'ath1' then 'wifi1'
else
raise "Unknown device name '#{@deviceName}'."
end
if (@toolVersion < DEFAULT_WIFI_TOOL_VERSION)
# Backward compatibility: NodeAgent will run with previous MADWIFI
# drivers
return "#{@iwconfig} #{@deviceName} mode #{mode}"
else
return "#{@wlanconfig} #{@deviceName} destroy ; #{@wlanconfig} "+
"#{@deviceName} create wlandev #{baseDevice} wlanmode #{mode}"
end
when "essid"
@essid = value
return "#{@iwconfig} #{@deviceName} essid #{value}"
when "rts"
return "#{@iwconfig} #{@deviceName} rts #{value}"
when "rate"
return "#{@iwconfig} #{@deviceName} rate #{value}"
when "frequency"
return "#{@iwconfig} #{@deviceName} freq #{value}"
when "channel"
return "#{@iwconfig} #{@deviceName} channel #{value}"
when "tx_power"
return "echo #{value} > /proc/sys/dev/#{@deviceName}/txpowlimit"
end
super
end
def get_property_value(prop)
# Note: for now we are returning values set by a CONFIGURE command
# when refactoring the device handling scheme, we may want to query
# the system here to find out the real value of the property
result = super(prop)
result = @propertyList[prop] if !result
return result
end
end
| 34.260355
| 87
| 0.644905
|
ff372348dda9a78275398d026afaf3cecf36de91
| 4,374
|
py
|
Python
|
anvage/__main__.py
|
Grelot/anvage
|
3a763d428adbb6c401214fb0fb981ec60ae14f01
|
[
"MIT"
] | null | null | null |
anvage/__main__.py
|
Grelot/anvage
|
3a763d428adbb6c401214fb0fb981ec60ae14f01
|
[
"MIT"
] | null | null | null |
anvage/__main__.py
|
Grelot/anvage
|
3a763d428adbb6c401214fb0fb981ec60ae14f01
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
#===============================================================================
#INFORMATION
#===============================================================================
# Codes for vcfsynonymous
#
# CEFE - EPHE - RESERVEBENEFIT 2021
# Guerin Pierre-Edouard
#
# ANVAGE is a toolkit to process GFF3 VCF and FASTA files together
# ANVAGE is a python3 program.
#
# git repository : https://github.com/Grelot/anvage
#
#==============================================================================
#MODULES
#==============================================================================
## Standard library imports
import os
import sys
import argparse
## Third party imports (bioinformatics)
import gffutils
import pyfaidx
from Bio.Seq import Seq
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
import vcf
## Local applications import
from anvage.arguments import parse_args
from anvage.objets import CdsSeq
from anvage.selectAnnotatedVariants import variant_position_within
from anvage.selectAnnotatedVariants import select_annotation_type
from anvage.dbfasta2CdsSeq import dbfasta2CdsSeq
from anvage.synonymous import is_synonymous
from anvage.flankingSequences import vcf_flanking_sequences
def main():
args = parse_args()
## read FASTA genome file
fasta = pyfaidx.Fasta(args.genome)
## read VCF file
vcf_reader = list(vcf.Reader(open(args.vcf, 'r')))
## commands
#### SELECT COMMAND
if args.command == 'select':
print("read VCF and select variants located on annotated '"+args.selectionAnnotationType+"' genome regions...", end="")
dbfnFile = 'currentgff.db'
## read GFF3 file
if os.path.exists(dbfnFile):
os.remove(dbfnFile)
db = gffutils.create_db(args.annotation, dbfn=dbfnFile)
## list of selected type annotated region
annotationRegionList = select_annotation_type(db, fasta, args.selectionAnnotationType)
## write variant VCF into annotated region
vcf_writer_annotated = vcf.Writer(open(args.output_prefix+'_'+args.selectionAnnotationType+'.vcf', 'w'), vcf.Reader(open(args.vcf, 'r')))
for variant in vcf_reader:
for region in annotationRegionList:
if variant_position_within(variant, region):
vcf_writer_annotated.write_record(variant)
break
#### SYNONYMOUS COMMAND
elif args.command == 'synonymous':
print("read VCF and detect synonymous and non-synonymous coding variants...", end="")
dbfnFile = 'currentgff.db'
## read GFF3 file
if os.path.exists(dbfnFile):
os.remove(dbfnFile)
db = gffutils.create_db(args.annotation, dbfn=dbfnFile)
## From the genome(GFF3, FASTA),
## extract a list of CDS (coding sequences) objects
cdsSeqList = dbfasta2CdsSeq(db, fasta)
## check wether variant is within a CDS
vcf_writer_synonymous = vcf.Writer(open(args.output_prefix+'_synonymous.vcf', 'w'), vcf.Reader(open(args.vcf, 'r')))
vcf_writer_non_synonymous = vcf.Writer(open(args.output_prefix+'_nonsynonymous.vcf', 'w'), vcf.Reader(open(args.vcf, 'r')))
for variant in vcf_reader:
#print(variant.CHROM, variant.POS, variant.REF, variant.ALT[0])
for cdsSeq in cdsSeqList:
if variant_position_within(variant, cdsSeq):
#print("cds #", i)
#print(variant.CHROM,variant.POS, "|", cdsSeq.seqid, cdsSeq.start, cdsSeq.end)
if is_synonymous(variant, cdsSeq):
vcf_writer_synonymous.write_record(variant)
else:
vcf_writer_non_synonymous.write_record(variant)
break
#### FLANK COMMAND
elif args.command == 'flank':
print("read VCF and extract flanking sequences of variants from the genome...", end= "")
windowsSize = args.windowsSize
sequences = vcf_flanking_sequences(vcf_reader, fasta, windowsSize)
with open(args.output_prefix+"_flanking.fasta", "w") as output_handle:
SeqIO.write(sequences, output_handle, "fasta")
else:
print("Au revoir !")
sys.exit(0)
print("done")
if __name__ == '__main__':
main()
| 39.763636
| 145
| 0.607682
|
5f4e8d6fe7928fd703adaed052d7555810780290
| 372
|
sql
|
SQL
|
custom/Scripts_DBACA/jobs_status2.sql
|
omegazip/dba_scripts
|
9c7fc8a60cce5f50a4eac3cb9f4da2461fe86267
|
[
"FSFAP"
] | null | null | null |
custom/Scripts_DBACA/jobs_status2.sql
|
omegazip/dba_scripts
|
9c7fc8a60cce5f50a4eac3cb9f4da2461fe86267
|
[
"FSFAP"
] | null | null | null |
custom/Scripts_DBACA/jobs_status2.sql
|
omegazip/dba_scripts
|
9c7fc8a60cce5f50a4eac3cb9f4da2461fe86267
|
[
"FSFAP"
] | 4
|
2019-07-12T23:22:53.000Z
|
2021-06-10T05:07:01.000Z
|
-- status de job x job
col interval for a30
col what for a80
col user for a20
col THIS_DATE for a19
col last_date for a19
col next_date for a19
alter session set nls_date_format='dd-mm-yyyy hh24:mi:ss';
select job,schema_user "user",FAILURES,last_date,this_date,next_date,broken,interval,what
from dba_jobs where upper (what) like upper ('%&jobwhat%')
order by what, job;
| 31
| 89
| 0.782258
|
a324378ce46580a33771ef8b4d0bbec173cec121
| 4,887
|
c
|
C
|
bin/mbus-tcp-raw-send.c
|
mhei/libmbus
|
2dea1b99f3e3f11786a56ffe12780078adfd1112
|
[
"BSD-3-Clause"
] | null | null | null |
bin/mbus-tcp-raw-send.c
|
mhei/libmbus
|
2dea1b99f3e3f11786a56ffe12780078adfd1112
|
[
"BSD-3-Clause"
] | null | null | null |
bin/mbus-tcp-raw-send.c
|
mhei/libmbus
|
2dea1b99f3e3f11786a56ffe12780078adfd1112
|
[
"BSD-3-Clause"
] | null | null | null |
//------------------------------------------------------------------------------
// Copyright (C) 2012, Robert Johansson, Raditex AB
// All rights reserved.
//
// rSCADA
// http://www.rSCADA.se
// info@rscada.se
//
//------------------------------------------------------------------------------
#include <string.h>
#include <stdio.h>
#include <mbus/mbus.h>
static int debug = 0;
//------------------------------------------------------------------------------
// Execution starts here:
//------------------------------------------------------------------------------
int
main(int argc, char **argv)
{
mbus_frame reply, request;
mbus_frame_data reply_data;
mbus_handle *handle = NULL;
char *host, *addr_str, matching_addr[16], *file = NULL;
long port;
int address, result;
FILE *fp = NULL;
size_t buff_len, len;
unsigned char raw_buff[4096], buff[4096];
memset((void *)&reply, 0, sizeof(mbus_frame));
memset((void *)&reply_data, 0, sizeof(mbus_frame_data));
if (argc == 4)
{
host = argv[1];
port = atol(argv[2]);
addr_str = argv[3];
debug = 0;
}
else if (argc == 5 && strcmp(argv[1], "-d") == 0)
{
host = argv[2];
port = atol(argv[3]);
addr_str = argv[4];
debug = 1;
}
else if (argc == 5)
{
host = argv[1];
port = atol(argv[2]);
addr_str = argv[3];
file = argv[4];
debug = 0;
}
else if (argc == 6 && strcmp(argv[1], "-d") == 0)
{
host = argv[2];
port = atol(argv[3]);
addr_str = argv[4];
file = argv[5];
debug = 1;
}
else
{
fprintf(stderr, "usage: %s [-d] host port mbus-address [file]\n", argv[0]);
fprintf(stderr, " optional flag -d for debug printout\n");
fprintf(stderr, " optional argument file for file. if omitted read from stdin\n");
return 0;
}
if ((port < 0) || (port > 0xFFFF))
{
fprintf(stderr, "Invalid port: %ld\n", port);
return 1;
}
if ((handle = mbus_context_tcp(host, port)) == NULL)
{
fprintf(stderr, "Could not initialize M-Bus context: %s\n", mbus_error_str());
return 1;
}
if (debug)
{
mbus_register_send_event(handle, &mbus_dump_send_event);
mbus_register_recv_event(handle, &mbus_dump_recv_event);
}
if (mbus_connect(handle) == -1)
{
fprintf(stderr, "Failed to setup connection to M-bus gateway\n%s\n", mbus_error_str());
return 1;
}
if (mbus_is_secondary_address(addr_str))
{
// secondary addressing
int ret;
ret = mbus_select_secondary_address(handle, addr_str);
if (ret == MBUS_PROBE_COLLISION)
{
fprintf(stderr, "%s: Error: The address mask [%s] matches more than one device.\n", __PRETTY_FUNCTION__, addr_str);
return 1;
}
else if (ret == MBUS_PROBE_NOTHING)
{
fprintf(stderr, "%s: Error: The selected secondary address does not match any device [%s].\n", __PRETTY_FUNCTION__, addr_str);
return 1;
}
else if (ret == MBUS_PROBE_ERROR)
{
fprintf(stderr, "%s: Error: Failed to select secondary address [%s].\n", __PRETTY_FUNCTION__, addr_str);
return 1;
}
address = MBUS_ADDRESS_NETWORK_LAYER;
}
else
{
// primary addressing
address = atoi(addr_str);
}
//
// read hex data from file or stdin
//
if (file != NULL)
{
if ((fp = fopen(file, "r")) == NULL)
{
fprintf(stderr, "%s: failed to open '%s'\n", __PRETTY_FUNCTION__, file);
return 1;
}
}
else
{
fp = stdin;
}
memset(raw_buff, 0, sizeof(raw_buff));
len = fread(raw_buff, 1, sizeof(raw_buff), fp);
if (fp != stdin)
{
fclose(fp);
}
buff_len = mbus_hex2bin(buff,sizeof(buff),raw_buff,sizeof(raw_buff));
//
// attempt to parse the input data
//
result = mbus_parse(&request, buff, buff_len);
if (result < 0)
{
fprintf(stderr, "mbus_parse: %s\n", mbus_error_str());
return 1;
}
else if (result > 0)
{
fprintf(stderr, "mbus_parse: need %d more bytes\n", result);
return 1;
}
//
// send the request
//
if (mbus_send_frame(handle, &request) == -1)
{
fprintf(stderr, "Failed to send mbus frame: %s\n", mbus_error_str());
return 1;
}
//
// this should be option:
//
if (mbus_recv_frame(handle, &reply) != MBUS_RECV_RESULT_OK)
{
fprintf(stderr, "Failed to receive M-Bus response frame: %s\n", mbus_error_str());
return 1;
}
mbus_disconnect(handle);
mbus_context_free(handle);
return 0;
}
| 24.807107
| 138
| 0.508083
|
da9cd9dbf520e07868c6346822b30e5f8eccf394
| 3,913
|
rb
|
Ruby
|
extensions/admin_ui/classes/httpcontroller.rb
|
pr0d1r2/beef
|
dce234197754fe5b736ec4848a2094a178671176
|
[
"MIT"
] | null | null | null |
extensions/admin_ui/classes/httpcontroller.rb
|
pr0d1r2/beef
|
dce234197754fe5b736ec4848a2094a178671176
|
[
"MIT"
] | null | null | null |
extensions/admin_ui/classes/httpcontroller.rb
|
pr0d1r2/beef
|
dce234197754fe5b736ec4848a2094a178671176
|
[
"MIT"
] | null | null | null |
#
# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Extension
module AdminUI
#
# Handle HTTP requests and call the relevant functions in the derived classes
#
class HttpController
attr_accessor :headers, :status, :body, :paths, :currentuser, :params
C = BeEF::Core::Models::Command
CM = BeEF::Core::Models::CommandModule
Z = BeEF::Core::Models::HookedBrowser
#
# Class constructor. Takes data from the child class and populates itself with it.
#
def initialize(data = {})
@erubis = nil
@status = 200 if data['status'].nil?
@headers = {'Content-Type' => 'text/html; charset=UTF-8'} if data['headers'].nil?
if data['paths'].nil? and self.methods.include? "index"
@paths = {'index' => '/'}
else
@paths = data['paths']
end
end
#
# Handle HTTP requests and call the relevant functions in the derived classes
#
def run(request, response)
@request = request
@params = request.params
@session = BeEF::Extension::AdminUI::Session.instance
auth_url = '/ui/authentication'
# test if session is unauth'd and whether the auth functionality is requested
if not @session.valid_session?(@request) and not self.class.eql?(BeEF::Extension::AdminUI::Controllers::Authentication)
@body = ''
@status = 302
@headers = {'Location' => auth_url}
return
end
# get the mapped function (if it exists) from the derived class
path = request.path_info
(print_error "path is invalid";return) if not BeEF::Filters.is_valid_path_info?(path)
function = @paths[path] || @paths[path + '/'] # check hash for '<path>' and '<path>/'
(print_error "path does not exist";return) if function.nil?
# call the relevant mapped function
function.call
# build the template filename and apply it - if the file exists
function_name = function.name # used for filename
class_s = self.class.to_s.sub('BeEF::Extension::AdminUI::Controllers::', '').downcase # used for directory name
template_ui = "#{$root_dir}/extensions/admin_ui/controllers/#{class_s}/#{function_name}.html"
@eruby = Erubis::FastEruby.new(File.read(template_ui)) if File.exists? template_ui # load the template file
@body = @eruby.result(binding()) if not @eruby.nil? # apply template and set the response
# set appropriate content-type 'application/json' for .json files
@headers['Content-Type']='application/json; charset=UTF-8' if request.path =~ /\.json$/
# set content type
if @headers['Content-Type'].nil?
@headers['Content-Type']='text/html; charset=UTF-8' # default content and charset type for all pages
@headers['Content-Type']='application/json; charset=UTF-8' if request.path =~ /\.json$/
end
end
# Constructs a redirect script
def script_redirect(location) "<script> document.location=\"#{location}\"</script>" end
# Constructs a html script tag
def script_tag(filename) "<script src=\"#{$url}/ui/media/javascript/#{filename}\" type=\"text/javascript\"></script>" end
# Constructs a html stylesheet tag
def stylesheet_tag(filename) "<link rel=\"stylesheet\" href=\"#{$url}/ui/media/css/#{filename}\" type=\"text/css\" />" end
# Constructs a hidden html nonce tag
def nonce_tag
@session = BeEF::Extension::AdminUI::Session.instance
"<input type=\"hidden\" name=\"nonce\" id=\"nonce\" value=\"" + @session.get_nonce + "\"/>"
end
private
@eruby
# Unescapes a URL-encoded string.
def unescape(s); s.tr('+', ' ').gsub(/%([\da-f]{2})/in){[$1].pack('H*')} end
end
end
end
end
| 36.231481
| 126
| 0.639918
|
829b98ba78951b0d3ed24229de8810aba0c610f6
| 3,308
|
rs
|
Rust
|
dsa/tests/signature.rs
|
RustCrypto/signature-algorithms
|
b8f48bd9de6f533f05f9a90c8596ff8e4be876f8
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
dsa/tests/signature.rs
|
RustCrypto/signature-algorithms
|
b8f48bd9de6f533f05f9a90c8596ff8e4be876f8
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
dsa/tests/signature.rs
|
RustCrypto/signature-algorithms
|
b8f48bd9de6f533f05f9a90c8596ff8e4be876f8
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
#![allow(deprecated)]
use digest::Digest;
use dsa::{consts::DSA_1024_160, Components, Signature, SigningKey};
use pkcs8::der::{Decode, Encode};
use rand::{CryptoRng, RngCore, SeedableRng};
use rand_chacha::ChaCha8Rng;
use sha2::Sha256;
use signature::{DigestVerifier, RandomizedDigestSigner};
/// Seed used for the ChaCha8 RNG
const SEED: u64 = 0x2103_1949;
/// Message to be signed/verified
const MESSAGE: &[u8] = b"test";
/// Message signed by this crate using the keys generated by this CSPRNG
///
/// This signature was generated using the keys generated by this CSPRNG (the per-message `k` component was also generated using the CSPRNG)
const MESSAGE_SIGNATURE_CRATE_ASN1: &[u8] = &[
0x30, 0x2C, 0x02, 0x14, 0x45, 0x1D, 0xE5, 0x76, 0x21, 0xD8, 0xFD, 0x76, 0xC1, 0x6F, 0x45, 0x4E,
0xDE, 0x5F, 0x09, 0x79, 0x76, 0x52, 0xF3, 0xA5, 0x02, 0x14, 0x53, 0x60, 0xE6, 0xB7, 0xF0, 0xCF,
0xAE, 0x49, 0xB1, 0x58, 0x5C, 0xCF, 0x5F, 0x3F, 0x94, 0x49, 0x21, 0xA0, 0xBF, 0xD2,
];
/// Message signed by OpenSSL using the keys generated by this CSPRNG
///
/// This signature was generated using the SHA-256 digest
const MESSAGE_SIGNATURE_OPENSSL_ASN1: &[u8] = &[
0x30, 0x2C, 0x02, 0x14, 0x6D, 0xB3, 0x8E, 0xAF, 0x97, 0x13, 0x7E, 0x07, 0xFF, 0x24, 0xB8, 0x66,
0x97, 0x18, 0xE1, 0x6F, 0xD7, 0x9A, 0x28, 0x2D, 0x02, 0x14, 0x47, 0x8C, 0x0B, 0x96, 0x51, 0x08,
0x08, 0xC8, 0x34, 0x9D, 0x0D, 0x41, 0xC7, 0x73, 0x0F, 0xB5, 0x9C, 0xBB, 0x00, 0x34,
];
/// Get the seeded CSPRNG
fn seeded_csprng() -> impl CryptoRng + RngCore {
ChaCha8Rng::seed_from_u64(SEED)
}
/// Generate a DSA keypair using a seeded CSPRNG
fn generate_deterministic_keypair() -> SigningKey {
let mut rng = seeded_csprng();
let components = Components::generate(&mut rng, DSA_1024_160);
SigningKey::generate(&mut rng, components)
}
#[test]
fn decode_encode_signature() {
let signature_openssl =
Signature::from_der(MESSAGE_SIGNATURE_OPENSSL_ASN1).expect("Failed to decode signature");
let encoded_signature_openssl = signature_openssl
.to_vec()
.expect("Failed to encode signature");
assert_eq!(MESSAGE_SIGNATURE_OPENSSL_ASN1, encoded_signature_openssl);
let signature_crate =
Signature::from_der(MESSAGE_SIGNATURE_CRATE_ASN1).expect("Failed to decode signature");
let encoded_signature_crate = signature_crate
.to_vec()
.expect("Failed to encode signature");
assert_eq!(MESSAGE_SIGNATURE_CRATE_ASN1, encoded_signature_crate);
}
#[test]
fn sign_message() {
let signing_key = generate_deterministic_keypair();
let generated_signature =
signing_key.sign_digest_with_rng(seeded_csprng(), Sha256::new().chain_update(MESSAGE));
let expected_signature =
Signature::from_der(MESSAGE_SIGNATURE_CRATE_ASN1).expect("Failed to decode signature");
assert_eq!(generated_signature, expected_signature);
}
#[test]
fn verify_signature() {
let signing_key = generate_deterministic_keypair();
let verifying_key = signing_key.verifying_key();
let signature = Signature::from_der(MESSAGE_SIGNATURE_OPENSSL_ASN1)
.expect("Failed to parse ASN.1 representation of the test signature");
assert!(verifying_key
.verify_digest(Sha256::new().chain_update(MESSAGE), &signature)
.is_ok());
}
| 36.755556
| 140
| 0.718259
|
544e4fa33b6944396599faea51bf789a5cf06471
| 6,100
|
rb
|
Ruby
|
lib/asana/resources/workspace.rb
|
rocco-haro/ruby-asana
|
f02337260770bf0c438652b8894ecff9954d91cd
|
[
"MIT"
] | null | null | null |
lib/asana/resources/workspace.rb
|
rocco-haro/ruby-asana
|
f02337260770bf0c438652b8894ecff9954d91cd
|
[
"MIT"
] | null | null | null |
lib/asana/resources/workspace.rb
|
rocco-haro/ruby-asana
|
f02337260770bf0c438652b8894ecff9954d91cd
|
[
"MIT"
] | 1
|
2020-05-13T02:22:16.000Z
|
2020-05-13T02:22:16.000Z
|
### WARNING: This file is auto-generated by the asana-api-meta repo. Do not
### edit it manually.
module Asana
module Resources
# A _workspace_ is the highest-level organizational unit in Asana. All projects
# and tasks have an associated workspace.
#
# An _organization_ is a special kind of workspace that represents a company.
# In an organization, you can group your projects into teams. You can read
# more about how organizations work on the Asana Guide.
# To tell if your workspace is an organization or not, check its
# `is_organization` property.
#
# Over time, we intend to migrate most workspaces into organizations and to
# release more organization-specific functionality. We may eventually deprecate
# using workspace-based APIs for organizations. Currently, and until after
# some reasonable grace period following any further announcements, you can
# still reference organizations in any `workspace` parameter.
class Workspace < Resource
attr_reader :id
attr_reader :gid
attr_reader :resource_type
attr_reader :name
attr_reader :is_organization
class << self
# Returns the plural name of the resource.
def plural_name
'workspaces'
end
# Returns the full workspace record for a single workspace.
#
# id - [Id] Globally unique identifier for the workspace or organization.
#
# options - [Hash] the request I/O options.
def find_by_id(client, id, options: {})
self.new(parse(client.get("/workspaces/#{id}", options: options)).first, client: client)
end
# Returns the compact records for all workspaces visible to the authorized user.
#
# per_page - [Integer] the number of records to fetch per page.
# options - [Hash] the request I/O options.
def find_all(client, per_page: 20, options: {})
params = { limit: per_page }.reject { |_,v| v.nil? || Array(v).empty? }
Collection.new(parse(client.get("/workspaces", params: params, options: options)), type: self, client: client)
end
end
# A specific, existing workspace can be updated by making a PUT request on
# the URL for that workspace. Only the fields provided in the data block
# will be updated; any unspecified fields will remain unchanged.
#
# Currently the only field that can be modified for a workspace is its `name`.
#
# Returns the complete, updated workspace record.
#
# options - [Hash] the request I/O options.
# data - [Hash] the attributes to post.
def update(options: {}, **data)
refresh_with(parse(client.put("/workspaces/#{gid}", body: data, options: options)).first)
end
# Retrieves objects in the workspace based on an auto-completion/typeahead
# search algorithm. This feature is meant to provide results quickly, so do
# not rely on this API to provide extremely accurate search results. The
# result set is limited to a single page of results with a maximum size,
# so you won't be able to fetch large numbers of results.
#
# resource_type - [Enum] The type of values the typeahead should return. You can choose from
# one of the following: custom_field, project, tag, task, and user.
# Note that unlike in the names of endpoints, the types listed here are
# in singular form (e.g. `task`). Using multiple types is not yet supported.
#
# type - [Enum] **Deprecated: new integrations should prefer the resource_type field.**
#
# query - [String] The string that will be used to search for relevant objects. If an
# empty string is passed in, the API will currently return an empty
# result set.
#
# count - [Number] The number of results to return. The default is `20` if this
# parameter is omitted, with a minimum of `1` and a maximum of `100`.
# If there are fewer results found than requested, all will be returned.
#
# per_page - [Integer] the number of records to fetch per page.
# options - [Hash] the request I/O options.
def typeahead(resource_type: nil, type: nil, query: nil, count: nil, per_page: 20, options: {})
params = { resource_type: resource_type || type, query: query, count: count, limit: per_page }.reject { |_,v| v.nil? || Array(v).empty? }
Collection.new(parse(client.get("/workspaces/#{gid}/typeahead", params: params, options: options)), type: Resource, client: client)
end
# The user can be referenced by their globally unique user ID or their email address.
# Returns the full user record for the invited user.
#
# user - [String] An identifier for the user. Can be one of an email address,
# the globally unique identifier for the user, or the keyword `me`
# to indicate the current user making the request.
#
# options - [Hash] the request I/O options.
# data - [Hash] the attributes to post.
def add_user(user: required("user"), options: {}, **data)
with_params = data.merge(user: user).reject { |_,v| v.nil? || Array(v).empty? }
User.new(parse(client.post("/workspaces/#{gid}/addUser", body: with_params, options: options)).first, client: client)
end
# The user making this call must be an admin in the workspace.
# Returns an empty data record.
#
# user - [String] An identifier for the user. Can be one of an email address,
# the globally unique identifier for the user, or the keyword `me`
# to indicate the current user making the request.
#
# options - [Hash] the request I/O options.
# data - [Hash] the attributes to post.
def remove_user(user: required("user"), options: {}, **data)
with_params = data.merge(user: user).reject { |_,v| v.nil? || Array(v).empty? }
client.post("/workspaces/#{gid}/removeUser", body: with_params, options: options) && true
end
end
end
end
| 45.864662
| 145
| 0.658197
|
747caa38962c0b7ca8d388b2da438f9970cd68a8
| 1,267
|
css
|
CSS
|
src/app/login/login.component.css
|
Techinnoveta/ngVetaDashboard
|
eadbe9c66234f861f08ad98ae3369766a9e137be
|
[
"MIT"
] | null | null | null |
src/app/login/login.component.css
|
Techinnoveta/ngVetaDashboard
|
eadbe9c66234f861f08ad98ae3369766a9e137be
|
[
"MIT"
] | null | null | null |
src/app/login/login.component.css
|
Techinnoveta/ngVetaDashboard
|
eadbe9c66234f861f08ad98ae3369766a9e137be
|
[
"MIT"
] | null | null | null |
div{
text-align: center;
}
h1{
font-size: 50px !important;
font-weight: 300;
}
h2{
font-size: 16px !important;
font-weight: 200;
margin-bottom: 60px;
}
form{
margin-top: 75px;
}
input{
margin-top: 20px;
font-weight: 200;
}
.button_submit{
width: 150px;
margin: 0 auto;
cursor: pointer;
background-color: #0079ca;
color: #fffdfd;
}
.error{
color:darkred;
font-weight: 400;
font-size: 15px;
margin-top: 10px;
margin-bottom: 10px;
}
.login {
min-height: calc(100vh - 180px);
}
.login-container{
position: relative;
width: 300px;
margin: 80px auto;
padding: 20px 40px 40px;
text-align: center;
background: rgb(15, 29, 40);
border: 1px solid #3c3838fc;
}
.login-container::before,.login-container::after{
content: "";
position: absolute;
width: 100%;height: 100%;
top: 3.5px;left: 0;
background: rgb(27, 53, 73);
z-index: -1;
-webkit-transform: rotateZ(6deg);
-moz-transform: rotateZ(6deg);
-ms-transform: rotateZ(6deg);
border: 1px solid #3c3838fc;
}
.login-container::after{
top: 5px;
z-index: -2;
-webkit-transform: rotateZ(-6deg);
-moz-transform: rotateZ(-6deg);
-ms-transform: rotateZ(-6deg);
}
.row {
margin-left: 0px;
margin-right: 0px;
}
| 15.45122
| 49
| 0.63457
|
6d512502b4823dd648144626950d888209ece506
| 5,885
|
lua
|
Lua
|
gamemode/vgui_helpmenu.lua
|
tucono/thestalker
|
23519138a06fe876199075cecd38ce157bb12193
|
[
"MIT"
] | 1
|
2021-05-29T22:52:13.000Z
|
2021-05-29T22:52:13.000Z
|
gamemode/vgui_helpmenu.lua
|
nuke-makes-games/thestalker
|
23519138a06fe876199075cecd38ce157bb12193
|
[
"MIT"
] | null | null | null |
gamemode/vgui_helpmenu.lua
|
nuke-makes-games/thestalker
|
23519138a06fe876199075cecd38ce157bb12193
|
[
"MIT"
] | 1
|
2021-03-27T13:53:39.000Z
|
2021-03-27T13:53:39.000Z
|
local PANEL = {}
PANEL.Text = { "<html><body style=\"background-color:DimGray;\">",
"<p style=\"font-family:tahoma;color:red;font-size:25;text-align:center\"><b>READ THIS!</b></p>",
"<p style=\"font-family:verdana;color:black;font-size:10px;text-align:left\">",
"<b><u>Unit 8 Gameplay:</u></b> You are part of a team tasked with finding and eliminating a genetic anomaly only known as The Stalker. You haven't been briefed on the origins of this creature but you have been informed that ",
"it is barely visible to the naked eye and is highly aggressive.<br><br>",
"<b>Drones:</b> If you are killed as a soldier, you will respawn shortly after as a drone. As a drone, you can locate the stalker using your built-in range scanner (right click) and if a drone locks on to the Stalker ",
"(left click), it will sound an alarm and briefly enable its built in particle beam weapon.<br><br>",
"<b>Battery Power:</b> As a soldier, you have limited battery power. Using your flashlight will deplete your battery. If you empty your battery completely, it will take longer to recharge.<br><br>",
"<b>Your Loadout:</b> Press F2 as a soldier to open the loadout menu. Changes you make will take effect when you spawn next.<br><br>",
"<b>Secondary Item - Glock 19:</b> This sidearm is very useful if you find yourself running out of ammo often. It has unlimited ammo.<br><br>",
"<b>Secondary Item - Seeker Drone:</b> When deployed, this drone will hover around, scanning for lifeforms. It will sound off if it finds any unusual heat signatures.<br><br>",
"<b>Secondary Item - Optic Range Scanner:</b> This scanner will detect the location of the Stalker when used (primary fire). It consumes battery power with each use.<br><br>",
"<b>Secondary Item - Portable Sensor:</b> This sensor can be placed to block off passages and detect the location of the Stalker. Use it in places where it cannot be bypassed for maximum efficiency.<br><br>",
"<b>Utility - Ammunition Pack:</b> An option preferred by those who are less conservative with ammo.<br><br>",
"<b>Utility - Laser Module:</b> In addition to accurately marking where your shots will land, this utility can also help detect the Stalker if you manage to point your weapon directly at it.<br><br>",
"<b>Utility - Dual Cell Battery:</b> This utility amplifies your flashlight and improves your battery recharge rate.<br><br>",
"<b>Utility - Automedic System:</b> An integrated morphine injector for your armor which activates when you are injured.<br><br><br>",
"<b><u>The Stalker Gameplay:</u></b> You must use cunning and stealth to eliminate Unit 8 before they are able to overwhelm you. You are strongest when targeting solitary prey.<br><br>",
"<b>Health and Ability Power:</b> As the Stalker, each ability draws on your mental power. Your mental power constantly regenerates unless you are using ESP. ",
"Your health slowly deteriorates over time but you regain health by killing players and ripping apart corpses. You thrive on bloodshed.<br><br>",
"<b>Jumping and Clinging:</b> Press your sprint key (default SHIFT) to jump great distances. Press it again when you're facing a wall in midair to cling to the wall.<br><br>",
"<b>Extrasensory Perception:</b> As the Stalker, you can toggle ESP using your flashlight key (default F). This allows you to see the health of your enemies.<br><br>",
"<b>The Ability Menu:</b> To open your ability menu as the Stalker, hold down your use button (default E) and use your mouse to select an ability. Right click to use your abilities once the menu is closed.<br><br>",
"<b>Ability - Scream:</b> Use this ability when cornered or surrounded by enemies to maximise its usefulness. Screaming then leaping away is a great escape technique.<br><br>",
"<b>Ability - Mind Flay:</b> Use this ability to disorient a lone soldier. This ability is great for picking off stragglers.<br><br>",
"<b>Ability - Telekinesis:</b> Use this ability to attack enemies from a distance and kill multiple soldiers when they are grouped. Right click an object to possess it, then right click your target to launch it.<br><br>",
"<b>Ability - Blood Thirst:</b> Use this ability to increase your melee power and leech life with your attacks. This ability increases your healing from dismembering corpses as well.<br>" }
PANEL.ButtonText = { "Holy Shit I Don't Care",
"I Didn't Read Any Of That",
"That's A Lot Of Words",
"I'd Rather Just Whine For Help",
"Just Wanna Play Video Games",
"Who Gives A Shit?",
"Help Menus Are For Nerds",
"I Thought This Was A Roleplay Server",
"I Don't Like Reading",
"TL;DR",
"Click Me" }
function PANEL:Init()
//self:SetTitle( "" )
//self:ShowCloseButton( false )
self:ChooseParent()
local text = ""
for k,v in pairs( self.Text ) do
text = text .. v
end
self.Label = vgui.Create( "HTML", self )
self.Label:SetHTML( text )
self.Button = vgui.Create( "DButton", self )
self.Button:SetText( table.Random( self.ButtonText ) )
self.Button.OnMousePressed = function()
self:Remove()
end
end
function PANEL:ChooseParent()
end
function PANEL:GetPadding()
return 5
end
function PANEL:PerformLayout()
local x,y = self:GetPadding(), self:GetPadding() + 10
self.Label:SetSize( self:GetWide() - ( self:GetPadding() * 2 ) - 5, self:GetTall() - 50 )
self.Label:SetPos( x + 5, y + 5 )
self.Button:SetSize( 250, 20 )
self.Button:SetPos( self:GetWide() * 0.5 - self.Button:GetWide() * 0.5, self:GetTall() - 30 )
self:SizeToContents()
end
function PANEL:Paint()
draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 255 ) )
draw.RoundedBox( 4, 1, 1, self:GetWide() - 2, self:GetTall() - 2, Color( 150, 150, 150, 150 ) )
draw.SimpleText( "Help Menu", "Header", self:GetWide() * 0.5, 10, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
end
derma.DefineControl( "HelpMenu", "A help menu.", PANEL, "DPanel" )
| 57.696078
| 227
| 0.723874
|
821c16894314ac35a2b897be5159a75f94a784fe
| 28,096
|
rs
|
Rust
|
compiler/src/backend/llvm/wrapper.rs
|
aviansie-ben/yet-another-static-java-compiler
|
9207c1579e0f555ff1cd83a09b380f7415270d36
|
[
"MIT"
] | 2
|
2020-09-28T18:13:22.000Z
|
2020-10-14T20:32:45.000Z
|
compiler/src/backend/llvm/wrapper.rs
|
aviansie-ben/yet-another-static-java-compiler
|
9207c1579e0f555ff1cd83a09b380f7415270d36
|
[
"MIT"
] | null | null | null |
compiler/src/backend/llvm/wrapper.rs
|
aviansie-ben/yet-another-static-java-compiler
|
9207c1579e0f555ff1cd83a09b380f7415270d36
|
[
"MIT"
] | null | null | null |
use std::ffi::{CStr, CString};
use std::marker::PhantomData;
use std::os::raw::c_char;
use itertools::Itertools;
use llvm_sys::{LLVMIntPredicate, LLVMRealPredicate, LLVMModuleFlagBehavior};
use llvm_sys::bit_writer::*;
use llvm_sys::core::*;
use llvm_sys::debuginfo::*;
use llvm_sys::prelude::*;
#[derive(Debug)]
pub struct LLVMContext(LLVMContextRef);
impl LLVMContext {
pub fn new() -> LLVMContext {
LLVMContext(unsafe {
LLVMContextCreate()
})
}
pub unsafe fn from_raw(ptr: LLVMContextRef) -> LLVMContext {
LLVMContext(ptr)
}
pub fn ptr(&self) -> LLVMContextRef {
self.0
}
pub fn create_module(&self, name: &str) -> LLVMModule {
let name = CString::new(name).unwrap();
unsafe {
LLVMModule::from_raw(
self,
LLVMModuleCreateWithNameInContext(name.as_ptr(), self.ptr()),
name
)
}
}
pub fn create_builder(&self) -> LLVMBuilder {
unsafe {
LLVMBuilder::from_raw(self, LLVMCreateBuilderInContext(self.ptr()))
}
}
}
impl Drop for LLVMContext {
fn drop(&mut self) {
unsafe {
LLVMContextDispose(self.ptr());
};
}
}
#[derive(Debug)]
pub struct LLVMModule<'a>(&'a LLVMContext, LLVMModuleRef, CString);
impl <'a> LLVMModule<'a> {
pub unsafe fn from_raw(ctx: &'a LLVMContext, ptr: LLVMModuleRef, name: CString) -> LLVMModule<'a> {
LLVMModule(ctx, ptr, name)
}
pub fn ctx(&self) -> &'a LLVMContext {
self.0
}
pub fn ptr(&self) -> LLVMModuleRef {
self.1
}
pub fn add_function(&self, name: &CStr, func_ty: LLVMTypeRef) -> LLVMFunctionValue<'a> {
unsafe {
LLVMFunctionValue::from_val_unchecked(LLVMValue::from_raw(
LLVMAddFunction(self.ptr(), name.as_ptr(), func_ty)
))
}
}
pub fn add_flag(&self, behavior: LLVMModuleFlagBehavior, name: &str, metadata: LLVMMetadata<'a>) {
unsafe {
LLVMAddModuleFlag(self.ptr(), behavior, name.as_ptr() as *const c_char, name.len(), metadata.ptr())
}
}
pub fn write_bitcode_to_file(&self, file: &str) -> Result<(), i32> {
unsafe {
let file = CString::new(file).unwrap();
match LLVMWriteBitcodeToFile(self.ptr(), file.as_ptr()) {
0 => Result::Ok(()),
err => Result::Err(err)
}
}
}
pub fn create_di_builder(&self) -> LLVMDIBuilder<'a> {
unsafe {
LLVMDIBuilder::from_raw(self.ctx(), LLVMCreateDIBuilder(self.ptr()))
}
}
}
impl <'a> Drop for LLVMModule<'a> {
fn drop(&mut self) {
unsafe {
LLVMDisposeModule(self.ptr());
};
}
}
#[derive(Debug, Clone, Copy)]
pub struct LLVMValue<'a>(PhantomData<&'a LLVMContext>, LLVMValueRef);
impl <'a> LLVMValue<'a> {
pub unsafe fn from_raw(ptr: LLVMValueRef) -> LLVMValue<'a> {
LLVMValue(PhantomData, ptr)
}
pub fn ptr(&self) -> LLVMValueRef {
self.1
}
}
#[derive(Debug, Clone, Copy)]
pub struct LLVMPhiValue<'a>(LLVMValue<'a>);
impl <'a> LLVMPhiValue<'a> {
pub unsafe fn from_val_unchecked(val: LLVMValue<'a>) -> LLVMPhiValue<'a> {
LLVMPhiValue(val)
}
pub fn into_val(self) -> LLVMValue<'a> {
self.0
}
pub fn add_incoming(&self, incoming: &[(LLVMBasicBlockRef, LLVMValue<'a>)]) {
let mut incoming_blocks = Vec::with_capacity(incoming.len());
let mut incoming_values = Vec::with_capacity(incoming.len());
for (block, val) in incoming.iter() {
incoming_blocks.push(*block);
incoming_values.push(val.ptr());
};
unsafe {
LLVMAddIncoming(self.into_val().ptr(), incoming_values.as_mut_ptr(), incoming_blocks.as_mut_ptr(), incoming.len() as u32);
};
}
}
#[derive(Debug, Clone, Copy)]
pub struct LLVMFunctionValue<'a>(LLVMValue<'a>);
impl <'a> LLVMFunctionValue<'a> {
pub unsafe fn from_val_unchecked(val: LLVMValue<'a>) -> LLVMFunctionValue<'a> {
LLVMFunctionValue(val)
}
pub fn into_val(self) -> LLVMValue<'a> {
self.0
}
pub fn set_subprogram(&self, subprogram: LLVMMetadata<'a>) {
unsafe {
LLVMSetSubprogram(self.into_val().ptr(), subprogram.ptr());
}
}
}
#[derive(Debug, Clone, Copy)]
pub struct LLVMMetadata<'a>(PhantomData<&'a LLVMContext>, LLVMMetadataRef);
impl <'a> LLVMMetadata<'a> {
pub unsafe fn from_raw(ptr: LLVMMetadataRef) -> LLVMMetadata<'a> {
LLVMMetadata(PhantomData, ptr)
}
pub fn from_value(val: LLVMValue<'a>) -> LLVMMetadata<'a> {
unsafe {
LLVMMetadata::from_raw(LLVMValueAsMetadata(val.ptr()))
}
}
pub fn ptr(&self) -> LLVMMetadataRef {
self.1
}
}
#[derive(Debug)]
pub struct LLVMTemporaryMetadata<'a>(LLVMMetadata<'a>);
impl <'a> LLVMTemporaryMetadata<'a> {
pub unsafe fn from_metadata_unchecked(metadata: LLVMMetadata<'a>) -> LLVMTemporaryMetadata<'a> {
LLVMTemporaryMetadata(metadata)
}
pub unsafe fn as_metadata(&self) -> LLVMMetadata<'a> {
self.0
}
pub fn replace_all_uses_with(self, metadata: LLVMMetadata<'a>) {
unsafe {
LLVMMetadataReplaceAllUsesWith(self.as_metadata().ptr(), metadata.ptr());
std::mem::forget(self);
}
}
}
impl <'a> Drop for LLVMTemporaryMetadata<'a> {
fn drop(&mut self) {
unsafe {
LLVMDisposeTemporaryMDNode(self.as_metadata().ptr())
}
}
}
#[derive(Debug)]
pub struct LLVMDIBuilder<'a>(&'a LLVMContext, LLVMDIBuilderRef);
impl <'a> LLVMDIBuilder<'a> {
pub unsafe fn from_raw(ctx: &'a LLVMContext, ptr: LLVMDIBuilderRef) -> LLVMDIBuilder<'a> {
LLVMDIBuilder(ctx, ptr)
}
pub fn ctx(&self) -> &'a LLVMContext {
self.0
}
pub fn ptr(&self) -> LLVMDIBuilderRef {
self.1
}
unsafe fn wrap_metadata(&self, metadata: LLVMMetadataRef) -> LLVMMetadata<'a> {
LLVMMetadata::from_raw(metadata)
}
pub fn create_file(&self, file: &str, dir: &str) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateFile(
self.ptr(),
file.as_ptr() as *const c_char,
file.len(),
dir.as_ptr() as *const c_char,
dir.len()
))
}
}
pub fn create_compile_unit(&self, lang: LLVMDWARFSourceLanguage, file: LLVMMetadata<'a>, producer: &str, is_optimized: bool, kind: LLVMDWARFEmissionKind) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateCompileUnit(
self.ptr(),
lang,
file.ptr(),
producer.as_ptr() as *const c_char,
producer.len(),
if is_optimized { 1 } else { 0 },
std::ptr::null_mut(),
0,
0,
std::ptr::null_mut(),
0,
kind,
0,
0,
0
))
}
}
pub fn create_function(
&self,
scope: LLVMMetadata<'a>,
file: LLVMMetadata<'a>,
line: u32,
name: &str,
linkage_name: &str,
return_type: Option<LLVMMetadata<'a>>,
param_types: &[LLVMMetadata<'a>],
is_definition: bool,
flags: LLVMDIFlags,
is_optimized: bool
) -> LLVMMetadata<'a> {
unsafe {
let mut types = itertools::repeat_n(return_type.map_or(std::ptr::null_mut(), |ty| ty.ptr()), 1)
.chain(param_types.iter().map(|ty| ty.ptr()))
.collect_vec();
let ty = LLVMDIBuilderCreateSubroutineType(self.ptr(), file.ptr(), types.as_mut_ptr(), types.len() as u32, LLVMDIFlags::LLVMDIFlagZero);
self.wrap_metadata(LLVMDIBuilderCreateFunction(
self.ptr(),
scope.ptr(),
name.as_ptr() as *const c_char,
name.len(),
linkage_name.as_ptr() as *const c_char,
linkage_name.len(),
file.ptr(),
line,
ty,
0,
if is_definition { 1 } else { 0 },
line,
flags,
if is_optimized { 1 } else { 0 }
))
}
}
pub fn create_lexical_block(&self, scope: LLVMMetadata<'a>, file: Option<LLVMMetadata<'a>>, line: u32, col: u32) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateLexicalBlock(
self.ptr(),
scope.ptr(),
file.map_or(std::ptr::null_mut(), |file| file.ptr()),
line,
col
))
}
}
pub fn create_auto_variable(
&self,
scope: LLVMMetadata<'a>,
name: &str,
file: Option<LLVMMetadata<'a>>,
line: u32,
ty: LLVMMetadata<'a>,
always_preserve: bool,
flags: LLVMDIFlags,
align_bits: u32
) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateAutoVariable(
self.ptr(),
scope.ptr(),
name.as_ptr() as *const c_char,
name.len(),
file.map_or(std::ptr::null_mut(), |file| file.ptr()),
line,
ty.ptr(),
if always_preserve { 1 } else { 0 },
flags,
align_bits
))
}
}
pub fn create_debug_location(&self, line: u32, col: u32, scope: LLVMMetadata<'a>, inlined_at: Option<LLVMMetadata<'a>>) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateDebugLocation(
self.0.ptr(),
line,
col,
scope.ptr(),
inlined_at.map_or(std::ptr::null_mut(), |m| m.ptr())
))
}
}
pub fn create_unspecified_type(&self, name: &str) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateUnspecifiedType(self.ptr(), name.as_ptr() as *const c_char, name.len()))
}
}
pub fn create_basic_type(&self, name: &str, size_bits: u64, encoding: u32, flags: LLVMDIFlags) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateBasicType(
self.ptr(),
name.as_ptr() as *const c_char,
name.len(),
size_bits,
encoding,
flags
))
}
}
pub fn create_pointer_type(&self, pointee: LLVMMetadata<'a>, size_bits: u64, align_bits: u32, addr_space: u32, name: Option<&str>) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreatePointerType(
self.ptr(),
pointee.ptr(),
size_bits,
align_bits,
addr_space,
name.map_or(std::ptr::null(), |name| name.as_ptr() as *const c_char),
name.map_or(0, |name| name.len())
))
}
}
pub fn create_member_type(
&self,
scope: LLVMMetadata<'a>,
name: &str,
file: LLVMMetadata<'a>,
line: u32,
size_bits: u64,
align_bits: u32,
offset_bits: u64,
flags: LLVMDIFlags,
ty: LLVMMetadata<'a>
) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateMemberType(
self.ptr(),
scope.ptr(),
name.as_ptr() as *const c_char,
name.len(),
file.ptr(),
line,
size_bits,
align_bits,
offset_bits,
flags,
ty.ptr()
))
}
}
pub fn create_struct_type(
&self,
scope: LLVMMetadata<'a>,
name: &str,
file: LLVMMetadata<'a>,
line: u32,
size_bits: u64,
align_bits: u32,
flags: LLVMDIFlags,
derived_from: Option<LLVMMetadata<'a>>,
elements: &[LLVMMetadata<'a>],
runtime_lang: u32,
vtable_holder: Option<LLVMMetadata<'a>>,
unique_id: &str
) -> LLVMMetadata<'a> {
unsafe {
let mut elements = elements.iter().map(|e| e.ptr()).collect_vec();
self.wrap_metadata(LLVMDIBuilderCreateStructType(
self.ptr(),
scope.ptr(),
name.as_ptr() as *const c_char,
name.len(),
file.ptr(),
line,
size_bits,
align_bits,
flags,
derived_from.map_or(std::ptr::null_mut(), |derived_from| derived_from.ptr()),
elements.as_mut_ptr(),
elements.len() as u32,
runtime_lang,
vtable_holder.map_or(std::ptr::null_mut(), |vtable_holder| vtable_holder.ptr()),
unique_id.as_ptr() as *const c_char,
unique_id.len()
))
}
}
pub fn create_array_type(&self, size_bits: u64, align_bits: u32, ty: LLVMMetadata<'a>, subscripts: &[LLVMMetadata<'a>]) -> LLVMMetadata<'a> {
unsafe {
let mut subscripts = subscripts.iter().map(|s| s.ptr()).collect_vec();
self.wrap_metadata(LLVMDIBuilderCreateArrayType(self.ptr(), size_bits, align_bits, ty.ptr(), subscripts.as_mut_ptr(), subscripts.len() as u32))
}
}
pub fn create_inheritance(&self, ty: LLVMMetadata<'a>, base_ty: LLVMMetadata<'a>, base_off: u64, vbptr_off: u32, flags: LLVMDIFlags) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateInheritance(self.ptr(), ty.ptr(), base_ty.ptr(), base_off, vbptr_off, flags))
}
}
pub fn create_expression(&self, instrs: &[u64]) -> LLVMMetadata<'a> {
unsafe {
self.wrap_metadata(LLVMDIBuilderCreateExpression(self.ptr(), instrs.as_ptr() as *mut i64, instrs.len()))
}
}
pub fn create_temporary(&self) -> LLVMTemporaryMetadata<'a> {
unsafe {
LLVMTemporaryMetadata::from_metadata_unchecked(self.wrap_metadata(LLVMTemporaryMDNode(self.ctx().ptr(), std::ptr::null_mut(), 0)))
}
}
pub fn finalize(&self) {
unsafe {
LLVMDIBuilderFinalize(self.ptr());
}
}
}
impl <'a> Drop for LLVMDIBuilder<'a> {
fn drop(&mut self) {
unsafe {
LLVMDisposeDIBuilder(self.ptr())
}
}
}
#[derive(Debug)]
pub struct LLVMBuilder<'a>(&'a LLVMContext, LLVMBuilderRef);
const EMPTY_VALUE_NAME: *const c_char = b"\0".as_ptr() as *const c_char;
fn cstr_or_empty(cstr: &Option<CString>) -> *const c_char {
cstr.as_ref().map(|s| s.as_ptr()).unwrap_or(EMPTY_VALUE_NAME)
}
impl <'a> LLVMBuilder<'a> {
pub unsafe fn from_raw(ctx: &'a LLVMContext, ptr: LLVMBuilderRef) -> LLVMBuilder<'a> {
LLVMBuilder(ctx, ptr)
}
pub fn ptr(&self) -> LLVMBuilderRef {
self.1
}
unsafe fn wrap_value(&self, val: LLVMValueRef) -> LLVMValue<'a> {
LLVMValue::from_raw(val)
}
pub fn set_current_debug_location(&self, loc: Option<LLVMMetadata<'a>>) {
unsafe {
LLVMSetCurrentDebugLocation(self.ptr(), loc.map_or(std::ptr::null_mut(), |loc| LLVMMetadataAsValue(self.0.ptr(), loc.ptr())));
}
}
pub fn build_struct_gep(&self, val: LLVMValue<'a>, idx: u32, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildStructGEP(self.ptr(), val.ptr(), idx, cstr_or_empty(&name)))
}
}
pub fn build_gep(&self, val: LLVMValue<'a>, idxs: &[LLVMValue<'a>], name: Option<CString>) -> LLVMValue<'a> {
unsafe {
let mut idxs = idxs.iter().map(|idx| idx.ptr()).collect_vec();
self.wrap_value(LLVMBuildGEP(self.ptr(), val.ptr(), idxs.as_mut_ptr(), idxs.len() as u32, cstr_or_empty(&name)))
}
}
pub fn build_pointer_cast(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildPointerCast(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_int_to_ptr(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildIntToPtr(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_ptr_to_int(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildPtrToInt(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_load(&self, addr: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildLoad(self.ptr(), addr.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_store(&self, val: LLVMValue<'a>, addr: LLVMValue<'a>) {
unsafe {
self.wrap_value(LLVMBuildStore(self.ptr(), val.ptr(), addr.ptr()));
}
}
pub fn build_bit_cast(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildBitCast(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_int_cast(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildIntCast(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_int_cast_2(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, signed: bool, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildIntCast2(self.ptr(), val.ptr(), ty, signed as i32, cstr_or_empty(&name)))
}
}
pub fn build_sext(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildSExt(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_trunc(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildTrunc(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_si_to_fp(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildSIToFP(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_fp_to_si(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFPToSI(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_fpext(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFPExt(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_fptrunc(&self, val: LLVMValue<'a>, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFPTrunc(self.ptr(), val.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_phi(&self, ty: LLVMTypeRef, name: Option<CString>) -> LLVMPhiValue<'a> {
unsafe {
LLVMPhiValue::from_val_unchecked(self.wrap_value(LLVMBuildPhi(self.ptr(), ty, cstr_or_empty(&name))))
}
}
pub fn build_neg(&self, val: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildNeg(self.ptr(), val.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_not(&self, val: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildNot(self.ptr(), val.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_fneg(&self, val: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFNeg(self.ptr(), val.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_fcmp(&self, pred: LLVMRealPredicate, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFCmp(self.ptr(), pred, lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_select(&self, cond: LLVMValue<'a>, true_val: LLVMValue<'a>, false_val: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildSelect(self.ptr(), cond.ptr(), true_val.ptr(), false_val.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_add(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildAdd(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_nuw_add(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildNUWAdd(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_sub(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildSub(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_nuw_sub(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildNUWSub(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_mul(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildMul(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_sdiv(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildSDiv(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_srem(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildSRem(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_and(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildAnd(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_or(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildOr(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_xor(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildXor(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_ashr(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildAShr(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_lshr(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildLShr(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_shl(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildShl(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_icmp(&self, pred: LLVMIntPredicate, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildICmp(self.ptr(), pred, lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_fadd(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFAdd(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_fsub(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFSub(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_fmul(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFMul(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_fdiv(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFDiv(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_frem(&self, lhs: LLVMValue<'a>, rhs: LLVMValue<'a>, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildFRem(self.ptr(), lhs.ptr(), rhs.ptr(), cstr_or_empty(&name)))
}
}
pub fn build_call(&self, func: LLVMValue<'a>, args: &[LLVMValue<'a>], name: Option<CString>) -> LLVMValue<'a> {
unsafe {
let mut args = args.iter().map(|arg| arg.ptr()).collect_vec();
self.wrap_value(LLVMBuildCall(self.ptr(), func.ptr(), args.as_mut_ptr(), args.len() as u32, cstr_or_empty(&name)))
}
}
pub fn build_br(&self, block: LLVMBasicBlockRef) {
unsafe {
self.wrap_value(LLVMBuildBr(self.ptr(), block));
}
}
pub fn build_cond_br(&self, cond: LLVMValue<'a>, true_block: LLVMBasicBlockRef, false_block: LLVMBasicBlockRef) {
unsafe {
self.wrap_value(LLVMBuildCondBr(self.ptr(), cond.ptr(), true_block, false_block));
}
}
pub fn build_switch(&self, val: LLVMValue<'a>, cases: &[(LLVMValue<'a>, LLVMBasicBlockRef)], default: LLVMBasicBlockRef) {
unsafe {
let switch = self.wrap_value(LLVMBuildSwitch(self.ptr(), val.ptr(), default, cases.len() as u32));
for (val, tgt) in cases.iter().copied() {
LLVMAddCase(switch.ptr(), val.ptr(), tgt);
};
}
}
pub fn build_unreachable(&self) {
unsafe {
self.wrap_value(LLVMBuildUnreachable(self.ptr()));
}
}
pub fn build_ret_void(&self) {
unsafe {
self.wrap_value(LLVMBuildRetVoid(self.ptr()));
}
}
pub fn build_ret(&self, val: LLVMValue<'a>) {
unsafe {
self.wrap_value(LLVMBuildRet(self.ptr(), val.ptr()));
}
}
pub fn build_alloca(&self, ty: LLVMTypeRef, name: Option<CString>) -> LLVMValue<'a> {
unsafe {
self.wrap_value(LLVMBuildAlloca(self.ptr(), ty, cstr_or_empty(&name)))
}
}
pub fn build_dbg_declare(&self, di_builder: &LLVMDIBuilder<'a>, storage: LLVMValue<'a>, var: LLVMMetadata<'a>, expr: LLVMMetadata<'a>) {
unsafe {
self.wrap_value(LLVMDIBuilderInsertDeclareAtEnd(
di_builder.ptr(),
storage.ptr(),
var.ptr(),
expr.ptr(),
LLVMValueAsMetadata(LLVMGetCurrentDebugLocation(self.ptr())),
LLVMGetInsertBlock(self.ptr())
));
}
}
}
impl <'a> Drop for LLVMBuilder<'a> {
fn drop(&mut self) {
unsafe {
LLVMDisposeBuilder(self.ptr());
};
}
}
| 33.093051
| 179
| 0.559226
|
ef166f34144a8efcff2d6fe52ac53a245b73c5d2
| 797
|
c
|
C
|
test/src/expect.c
|
dodgez/parce
|
a873a3518bfc5ec7601d881d6b2eba1e9ee55b2d
|
[
"MIT"
] | null | null | null |
test/src/expect.c
|
dodgez/parce
|
a873a3518bfc5ec7601d881d6b2eba1e9ee55b2d
|
[
"MIT"
] | null | null | null |
test/src/expect.c
|
dodgez/parce
|
a873a3518bfc5ec7601d881d6b2eba1e9ee55b2d
|
[
"MIT"
] | null | null | null |
#include "expect.h"
void run_suite(char* name) {
printf("\n%s:\n", name);
}
void run_test(char* name) {
TEST_NAME = name;
HAS_TEST_PASSED = TEST_PASSED;
}
void end_test() {
if (HAS_TEST_PASSED == TEST_PASSED) {
printf("\t-/ %s\n", TEST_NAME);
}
}
void end_suite() {
printf("\n");
}
int expect_equal_int(int a, int b) {
if (a == b) {
return TEST_PASSED;
} else {
HAS_TEST_PASSED = TEST_FAILED;
printf("\txx %s expected %d to equal %d\n", TEST_NAME, a, b);
return TEST_FAILED;
}
}
int expect_equal_str(char* a, char* b) {
if (strcmp(a, b) == 0) {
return TEST_PASSED;
} else {
HAS_TEST_PASSED = TEST_FAILED;
printf("\txx %s expected %s to equal %s\n", TEST_NAME, a, b);
return TEST_FAILED;
}
}
| 19.439024
| 66
| 0.579674
|
28c50fd82e5f5666c99b6393896c67fa61d930a3
| 145
|
sql
|
SQL
|
testdata/1.0.0/Feature1/FuncViewStoredProcedureTrigger/01_TestFunc.sql
|
Hviid/DBMigrator
|
dd0619fea3469623bf44242e02d5668631b02f86
|
[
"MIT"
] | 3
|
2019-04-15T05:19:52.000Z
|
2021-01-05T05:57:55.000Z
|
testdata/1.0.0/Feature1/FuncViewStoredProcedureTrigger/01_TestFunc.sql
|
Hviid/DBMigrator
|
dd0619fea3469623bf44242e02d5668631b02f86
|
[
"MIT"
] | 21
|
2016-09-06T06:38:25.000Z
|
2021-11-29T08:51:29.000Z
|
testdata/1.0.0/Feature1/FuncViewStoredProcedureTrigger/01_TestFunc.sql
|
Hviid/DBMigrator
|
dd0619fea3469623bf44242e02d5668631b02f86
|
[
"MIT"
] | 4
|
2016-09-07T04:41:52.000Z
|
2017-03-12T04:19:18.000Z
|
CREATE FUNCTION TestFunc (@LastName varchar(255))
RETURNS varchar(255)
AS BEGIN
RETURN @LastName + (SELECT TOP(1) LastName FROM Tester)
END
| 29
| 56
| 0.751724
|
a7c9b2b93d82f8a6108f59a6f791571ff7806990
| 3,999
|
css
|
CSS
|
src/pages/404.css
|
DarinLevesque/DL-cms
|
be6204315c90115473159448af8e5f469829d044
|
[
"MIT"
] | 1
|
2020-07-27T22:49:43.000Z
|
2020-07-27T22:49:43.000Z
|
src/pages/404.css
|
DarinLevesque/DL-cms
|
be6204315c90115473159448af8e5f469829d044
|
[
"MIT"
] | null | null | null |
src/pages/404.css
|
DarinLevesque/DL-cms
|
be6204315c90115473159448af8e5f469829d044
|
[
"MIT"
] | null | null | null |
@import url(https://fonts.googleapis.com/css?family=Gilda+Display);
html {
background: radial-gradient(#000, #111);
color: white;
overflow: hidden;
height: 100%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.static {
width: 100%;
height: 100%;
position: relative;
margin: 0;
padding: 0;
top: -100px;
opacity: 0.05;
z-index: 230;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
user-drag: none;
}
.error {
text-align: center;
font-family: 'Gilda Display', serif;
font-size: 95px;
font-style: italic;
text-align: center;
width: 100px;
height: 60px;
line-height: 60px;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: -60px;
right: 0;
-webkit-animation: noise 2s linear infinite;
animation: noise 2s linear infinite;
overflow: default;
}
.error:after {
content: '404';
font-family: 'Gilda Display', serif;
font-size: 100px;
font-style: italic;
text-align: center;
width: 150px;
height: 60px;
line-height: 60px;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
opacity: 0;
color: blue;
-webkit-animation: noise-1 .2s linear infinite;
animation: noise-1 .2s linear infinite;
}
.info {
text-align: center;
font-family: 'Gilda Display', serif;
font-size: 15px;
font-style: italic;
text-align: center;
width: 200px;
height: 60px;
line-height: 60px;
margin: auto;
position: absolute;
top: 140px;
bottom: 0;
left: 0;
right: 0;
-webkit-animation: noise-3 1s linear infinite;
animation: noise-3 1s linear infinite;
}
.error:before {
content: '404';
font-family: 'Gilda Display', serif;
font-size: 100px;
font-style: italic;
text-align: center;
width: 100px;
height: 60px;
line-height: 60px;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
opacity: 0;
color: red;
-webkit-animation: noise-2 .2s linear infinite;
animation: noise-2 .2s linear infinite;
}
@-webkit-keyframes noise-1 {
0%, 20%, 40%, 60%, 70%, 90% {opacity: 0;}
10% {opacity: .1;}
50% {opacity: .5; left: -6px;}
80% {opacity: .3;}
100% {opacity: .6; left: 2px;}
}
@keyframes noise-1 {
0%, 20%, 40%, 60%, 70%, 90% {opacity: 0;}
10% {opacity: .1;}
50% {opacity: .5; left: -6px;}
80% {opacity: .3;}
100% {opacity: .6; left: 2px;}
}
@-webkit-keyframes noise-2 {
0%, 20%, 40%, 60%, 70%, 90% {opacity: 0;}
10% {opacity: .1;}
50% {opacity: .5; left: 6px;}
80% {opacity: .3;}
100% {opacity: .6; left: -2px;}
}
@keyframes noise-2 {
0%, 20%, 40%, 60%, 70%, 90% {opacity: 0;}
10% {opacity: .1;}
50% {opacity: .5; left: 6px;}
80% {opacity: .3;}
100% {opacity: .6; left: -2px;}
}
@-webkit-keyframes noise {
0%, 3%, 5%, 42%, 44%, 100% {opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1);}
4.3% {opacity: 1; -webkit-transform: scaleY(1.7); transform: scaleY(1.7);}
43% {opacity: 1; -webkit-transform: scaleX(1.5); transform: scaleX(1.5);}
}
@keyframes noise {
0%, 3%, 5%, 42%, 44%, 100% {opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1);}
4.3% {opacity: 1; -webkit-transform: scaleY(1.7); transform: scaleY(1.7);}
43% {opacity: 1; -webkit-transform: scaleX(1.5); transform: scaleX(1.5);}
}
@-webkit-keyframes noise-3 {
0%,3%,5%,42%,44%,100% {opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1);}
4.3% {opacity: 1; -webkit-transform: scaleY(4); transform: scaleY(4);}
43% {opacity: 1; -webkit-transform: scaleX(10) rotate(60deg); transform: scaleX(10) rotate(60deg);}
}
@keyframes noise-3 {
0%,3%,5%,42%,44%,100% {opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1);}
4.3% {opacity: 1; -webkit-transform: scaleY(4); transform: scaleY(4);}
43% {opacity: 1; -webkit-transform: scaleX(10) rotate(60deg); transform: scaleX(10) rotate(60deg);}
}
| 24.090361
| 101
| 0.615154
|
f452c0f3fc0b6ad441f753cd623c569d2cb2968f
| 331
|
cs
|
C#
|
src/LibraryApp.Core/Authorization/PermissionChecker.cs
|
bartvanhoey/ABP_LibraryApp
|
3f419e869195791e7eae95fd41ee57a69337a15c
|
[
"MIT"
] | null | null | null |
src/LibraryApp.Core/Authorization/PermissionChecker.cs
|
bartvanhoey/ABP_LibraryApp
|
3f419e869195791e7eae95fd41ee57a69337a15c
|
[
"MIT"
] | 9
|
2020-09-06T21:51:37.000Z
|
2022-03-02T05:12:15.000Z
|
src/LibraryApp.Core/Authorization/PermissionChecker.cs
|
bartvanhoey/ABP_LibraryApp
|
3f419e869195791e7eae95fd41ee57a69337a15c
|
[
"MIT"
] | null | null | null |
using Abp.Authorization;
using LibraryApp.Authorization.Roles;
using LibraryApp.Authorization.Users;
namespace LibraryApp.Authorization
{
public class PermissionChecker : PermissionChecker<Role, User>
{
public PermissionChecker(UserManager userManager)
: base(userManager)
{
}
}
}
| 22.066667
| 66
| 0.700906
|
73923541c0ddcf772ee28279ce381758b2b179d4
| 754
|
sql
|
SQL
|
chapter05-slick/conf/evolutions/localdb/1.sql
|
sslee05/playframework
|
6165c32fa2380e1fe7be05032b7bcbda45f26c38
|
[
"Apache-2.0"
] | null | null | null |
chapter05-slick/conf/evolutions/localdb/1.sql
|
sslee05/playframework
|
6165c32fa2380e1fe7be05032b7bcbda45f26c38
|
[
"Apache-2.0"
] | null | null | null |
chapter05-slick/conf/evolutions/localdb/1.sql
|
sslee05/playframework
|
6165c32fa2380e1fe7be05032b7bcbda45f26c38
|
[
"Apache-2.0"
] | null | null | null |
# --- !Ups
CREATE TABLE PRODUCTS (
ID LONG PRIMARY KEY AUTO_INCREMENT,
EAN LONG,
NAME VARCHAR,
DESCRIPTION VARCHAR
);
CREATE TABLE WAREHOUSES (
ID LONG,
NAME VARCHAR
);
CREATE TABLE STOCK_ITEMS (
ID LONG,
PRODUCT_ID LONG,
WAREHOUSE_ID LONG,
QUANTITY LONG
);
INSERT INTO PRODUCTS (ID,EAN,NAME,DESCRIPTION) VALUES (1,12345,'A','TEST A');
INSERT INTO PRODUCTS (ID,EAN,NAME,DESCRIPTION) VALUES (2,22345,'B','TEST B');
INSERT INTO PRODUCTS (ID,EAN,NAME,DESCRIPTION) VALUES (3,32345,'C','TEST C');
INSERT INTO PRODUCTS (ID,EAN,NAME,DESCRIPTION) VALUES (4,42345,'D','TEST D');
INSERT INTO PRODUCTS (ID,EAN,NAME,DESCRIPTION) VALUES (5,52345,'E','TEST E');
# --- !Downs
DROP TABLE PRODUCTS;
DROP TABLE WAREHOUSES;
DROP TABLE STOCK_ITEMS;
| 25.133333
| 77
| 0.712202
|
27fb5ad96ccfdef9b9c231e307ae5db5d5a42e97
| 475
|
sql
|
SQL
|
coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_1_0_logs/s2s/procfunpacks/dw_get_narr_users_all_mod.sql
|
mrudulpolus/kc
|
55f529e5ff0985f3bf5247e2a1e63c5dec07f560
|
[
"ECL-2.0"
] | null | null | null |
coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_1_0_logs/s2s/procfunpacks/dw_get_narr_users_all_mod.sql
|
mrudulpolus/kc
|
55f529e5ff0985f3bf5247e2a1e63c5dec07f560
|
[
"ECL-2.0"
] | null | null | null |
coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_1_0_logs/s2s/procfunpacks/dw_get_narr_users_all_mod.sql
|
mrudulpolus/kc
|
55f529e5ff0985f3bf5247e2a1e63c5dec07f560
|
[
"ECL-2.0"
] | null | null | null |
-- This procedure selects all users for the proposal from the OSP$NARRATIVE_USERS_RIGHTS
-- Input: Proposal Number
-- Created by Ramesh B NAir
create or replace procedure dw_get_narr_users_all_mod
( AW_PROP_NO IN osp$eps_prop_user_roles.proposal_number%TYPE,
cur_generic IN OUT result_sets.cur_generic) is
begin
open cur_generic for
SELECT *
FROM OSP$NARRATIVE_USER_RIGHTS
WHERE PROPOSAL_NUMBER = AW_PROP_NO
ORDER BY MODULE_NUMBER, USER_ID;
end;
/
| 20.652174
| 88
| 0.783158
|
c79db0a3550b4163bb002a7bdaa08815ceeba97f
| 4,561
|
dart
|
Dart
|
lib/src/generated/google/dataflow/v1beta3/snapshots.pbgrpc.dart
|
peiffer-innovations/grpc_googleapis
|
b36cb71289ed0714a7246bc6f8db84ad1551d39a
|
[
"MIT"
] | null | null | null |
lib/src/generated/google/dataflow/v1beta3/snapshots.pbgrpc.dart
|
peiffer-innovations/grpc_googleapis
|
b36cb71289ed0714a7246bc6f8db84ad1551d39a
|
[
"MIT"
] | null | null | null |
lib/src/generated/google/dataflow/v1beta3/snapshots.pbgrpc.dart
|
peiffer-innovations/grpc_googleapis
|
b36cb71289ed0714a7246bc6f8db84ad1551d39a
|
[
"MIT"
] | null | null | null |
///
// Generated code. Do not modify.
// source: google/dataflow/v1beta3/snapshots.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
import 'dart:async' as $async;
import 'dart:core' as $core;
import 'package:grpc/service_api.dart' as $grpc;
import 'snapshots.pb.dart' as $0;
export 'snapshots.pb.dart';
class SnapshotsV1Beta3Client extends $grpc.Client {
static final _$getSnapshot =
$grpc.ClientMethod<$0.GetSnapshotRequest, $0.Snapshot>(
'/google.dataflow.v1beta3.SnapshotsV1Beta3/GetSnapshot',
($0.GetSnapshotRequest value) => value.writeToBuffer(),
($core.List<$core.int> value) => $0.Snapshot.fromBuffer(value));
static final _$deleteSnapshot =
$grpc.ClientMethod<$0.DeleteSnapshotRequest, $0.DeleteSnapshotResponse>(
'/google.dataflow.v1beta3.SnapshotsV1Beta3/DeleteSnapshot',
($0.DeleteSnapshotRequest value) => value.writeToBuffer(),
($core.List<$core.int> value) =>
$0.DeleteSnapshotResponse.fromBuffer(value));
static final _$listSnapshots =
$grpc.ClientMethod<$0.ListSnapshotsRequest, $0.ListSnapshotsResponse>(
'/google.dataflow.v1beta3.SnapshotsV1Beta3/ListSnapshots',
($0.ListSnapshotsRequest value) => value.writeToBuffer(),
($core.List<$core.int> value) =>
$0.ListSnapshotsResponse.fromBuffer(value));
SnapshotsV1Beta3Client($grpc.ClientChannel channel,
{$grpc.CallOptions? options,
$core.Iterable<$grpc.ClientInterceptor>? interceptors})
: super(channel, options: options, interceptors: interceptors);
$grpc.ResponseFuture<$0.Snapshot> getSnapshot($0.GetSnapshotRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$getSnapshot, request, options: options);
}
$grpc.ResponseFuture<$0.DeleteSnapshotResponse> deleteSnapshot(
$0.DeleteSnapshotRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$deleteSnapshot, request, options: options);
}
$grpc.ResponseFuture<$0.ListSnapshotsResponse> listSnapshots(
$0.ListSnapshotsRequest request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$listSnapshots, request, options: options);
}
}
abstract class SnapshotsV1Beta3ServiceBase extends $grpc.Service {
$core.String get $name => 'google.dataflow.v1beta3.SnapshotsV1Beta3';
SnapshotsV1Beta3ServiceBase() {
$addMethod($grpc.ServiceMethod<$0.GetSnapshotRequest, $0.Snapshot>(
'GetSnapshot',
getSnapshot_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.GetSnapshotRequest.fromBuffer(value),
($0.Snapshot value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.DeleteSnapshotRequest,
$0.DeleteSnapshotResponse>(
'DeleteSnapshot',
deleteSnapshot_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.DeleteSnapshotRequest.fromBuffer(value),
($0.DeleteSnapshotResponse value) => value.writeToBuffer()));
$addMethod(
$grpc.ServiceMethod<$0.ListSnapshotsRequest, $0.ListSnapshotsResponse>(
'ListSnapshots',
listSnapshots_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.ListSnapshotsRequest.fromBuffer(value),
($0.ListSnapshotsResponse value) => value.writeToBuffer()));
}
$async.Future<$0.Snapshot> getSnapshot_Pre($grpc.ServiceCall call,
$async.Future<$0.GetSnapshotRequest> request) async {
return getSnapshot(call, await request);
}
$async.Future<$0.DeleteSnapshotResponse> deleteSnapshot_Pre(
$grpc.ServiceCall call,
$async.Future<$0.DeleteSnapshotRequest> request) async {
return deleteSnapshot(call, await request);
}
$async.Future<$0.ListSnapshotsResponse> listSnapshots_Pre(
$grpc.ServiceCall call,
$async.Future<$0.ListSnapshotsRequest> request) async {
return listSnapshots(call, await request);
}
$async.Future<$0.Snapshot> getSnapshot(
$grpc.ServiceCall call, $0.GetSnapshotRequest request);
$async.Future<$0.DeleteSnapshotResponse> deleteSnapshot(
$grpc.ServiceCall call, $0.DeleteSnapshotRequest request);
$async.Future<$0.ListSnapshotsResponse> listSnapshots(
$grpc.ServiceCall call, $0.ListSnapshotsRequest request);
}
| 40.008772
| 212
| 0.696339
|
05f312519fc5fad1728e3fef8ed06d8f6095b010
| 7,862
|
py
|
Python
|
silk/tests/openthread/ot_test_multi_hop_traffic.py
|
tzm41/silk
|
7f047547afa847714bb0a57c96a9f387d5f0b1c7
|
[
"Apache-2.0"
] | 1
|
2020-03-06T04:02:19.000Z
|
2020-03-06T04:02:19.000Z
|
silk/tests/openthread/ot_test_multi_hop_traffic.py
|
qilinkang/silk-1
|
ab7d3f96f74dd89a1517018f2619cb08190fe2f9
|
[
"Apache-2.0"
] | 52
|
2019-08-15T18:20:05.000Z
|
2021-11-05T23:02:02.000Z
|
silk/tests/openthread/ot_test_multi_hop_traffic.py
|
qilinkang/silk-1
|
ab7d3f96f74dd89a1517018f2619cb08190fe2f9
|
[
"Apache-2.0"
] | 8
|
2019-07-01T18:57:11.000Z
|
2022-03-16T14:41:00.000Z
|
# Copyright 2020 Google LLC
#
# 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
#
# https://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.
"""Test traffic over multi-hop in a network with chain topology.
"""
import enum
import random
import time
import unittest
import silk.hw.hw_resource as hwr
import silk.node.fifteen_four_dev_board as ffdb
import silk.tests.testcase as testcase
from silk.config import wpan_constants as wpan
from silk.node.wpan_node import WpanCredentials
from silk.tools import wpan_table_parser
from silk.tools.wpan_util import verify, verify_within
from silk.unit_tests.test_utils import random_string
from silk.utils import process_cleanup
hwr.global_instance()
NUM_ROUTERS = 4
NUM_FED_CHILDREN = 2
NUM_SED_CHILDREN = 4
MSG_LENS = [40, 100, 400, 800, 1000]
ROUTER_TABLE_WAIT_TIME = 30
INVALID_ROUTER_ID = 63
POLL_INTERVAL = 500
class TestMultiHopTraffic(testcase.TestCase):
# Test description:
#
# Traffic over multi-hop in a network with chain topology
#
# r1 ----- r2 ---- r3 ----- r4
# /\ | | /\
# / \ | | / \
# fed1 sed1 sed2 sed3 sed4 fed4
#
#
# Traffic flow:
# - From first router to last router
# - From SED child of last router to SED child of first router
# - From FED child of first router to FED child of last router
#
# The test verifies the following:
# - Verifies Address Query process to routers and FEDs.
# - Verifies Mesh Header frame forwarding over multiple routers.
# - Verifies forwarding of large IPv6 messages (1000 bytes) requiring lowpan fragmentation.
@classmethod
def hardware_select(cls: 'TestMultiHopTraffic'):
cls.routers = []
cls.sed_children = []
cls.fed_children = []
for _ in range(NUM_ROUTERS):
cls.routers.append(ffdb.ThreadDevBoard())
cls.sed_children.append(ffdb.ThreadDevBoard())
for _ in range(NUM_FED_CHILDREN):
cls.fed_children.append(ffdb.ThreadDevBoard())
cls.all_nodes = cls.routers + cls.sed_children + cls.fed_children
@classmethod
@testcase.setup_class_decorator
def setUpClass(cls: 'TestMultiHopTraffic'):
# Check and clean up wpantund process if any left over
process_cleanup.ps_cleanup()
cls.hardware_select()
for device in cls.all_nodes:
device.set_logger(cls.logger)
cls.add_test_device(device)
device.set_up()
cls.network_data = WpanCredentials(network_name="SILK-{0:04X}".format(random.randint(0, 0xffff)),
psk="00112233445566778899aabbccdd{0:04x}".format(random.randint(0, 0xffff)),
channel=random.randint(11, 25),
fabric_id="{0:06x}dead".format(random.randint(0, 0xffffff)))
cls.thread_sniffer_init(cls.network_data.channel)
@classmethod
@testcase.teardown_class_decorator
def tearDownClass(cls: 'TestMultiHopTraffic'):
for device in cls.device_list:
device.tear_down()
@testcase.setup_decorator
def setUp(self):
pass
@testcase.teardown_decorator
def tearDown(self):
pass
@testcase.test_method_decorator
def test01_Pairing(self):
# Allowlist routers with their corresponding sleepy children
for index in range(NUM_ROUTERS):
self.routers[index].allowlist_node(self.sed_children[index])
self.sed_children[index].allowlist_node(self.routers[index])
# Allowlist a FED child for the first and last routers
self.routers[0].allowlist_node(self.fed_children[0])
self.fed_children[0].allowlist_node(self.routers[0])
self.routers[-1].allowlist_node(self.fed_children[-1])
self.fed_children[-1].allowlist_node(self.routers[-1])
# Allowlist routers at [index-1] and [index]
for index in range(1, NUM_ROUTERS):
self.routers[index - 1].allowlist_node(self.routers[index])
self.routers[index].allowlist_node(self.routers[index - 1])
self.routers[0].form(self.network_data, "router")
self.routers[0].permit_join(60)
self.wait_for_completion(self.device_list)
self.logger.info(self.routers[0].ip6_lla)
self.logger.info(self.routers[0].ip6_thread_ula)
self.network_data.xpanid = self.routers[0].xpanid
self.network_data.panid = self.routers[0].panid
self.sed_children[0].join(self.network_data, "sleepy-end-device")
self.sed_children[0].set_sleep_poll_interval(POLL_INTERVAL)
for index in range(1, NUM_ROUTERS):
self.routers[index].join(self.network_data, "router")
self.sed_children[index].join(self.network_data, "sleepy-end-device")
self.sed_children[index].set_sleep_poll_interval(POLL_INTERVAL)
self.wait_for_completion(self.device_list)
for index in range(NUM_FED_CHILDREN):
self.fed_children[index].join(self.network_data, "end-node")
self.wait_for_completion(self.device_list)
for index in range(1, NUM_ROUTERS):
self.assertTrue(self.routers[index].get(wpan.WPAN_NODE_TYPE) == wpan.NODE_TYPE_ROUTER)
@testcase.test_method_decorator
def test02_verify_link(self):
# Wait till first router has either established a link or
# has a valid "next hop" towards all other routers.
r1_rloc = int(self.routers[0].getprop(wpan.WPAN_THREAD_RLOC16), 16)
def check_r1_router_table():
router_table = self.routers[0].get(wpan.WPAN_THREAD_ROUTER_TABLE)
router_table = wpan_table_parser.parse_router_table_result(router_table)
self.assertEqual(len(router_table), NUM_ROUTERS)
for entry in router_table:
verify(entry.rloc16 == r1_rloc or entry.is_link_established() or entry.next_hop != INVALID_ROUTER_ID)
verify_within(check_r1_router_table, ROUTER_TABLE_WAIT_TIME)
@testcase.test_method_decorator
def test03_Transmit_Receive(self):
# Send from the first router in the chain to the last one.
# Send from the SED child of the last router to the SED child of the first
# router.
# Send from the FED child of the first router to the FED child of the last
# router.
class AddressType(enum.Enum):
MLA = 0
addresses = [
(self.routers[0], self.routers[-1], AddressType.MLA, AddressType.MLA),
(self.sed_children[-1], self.sed_children[0], AddressType.MLA, AddressType.MLA),
(self.fed_children[0], self.fed_children[-1], AddressType.MLA, AddressType.MLA),
]
timeout = 5
delay = 1
for i, (src, dst, src_address, dst_address) in enumerate(addresses):
port = random.randint(10000 + i * 100, 10099 + i * 100)
for msg_length in MSG_LENS:
message = random_string(msg_length)
src_address = src.ip6_mla
dst_address = dst.ip6_mla
dst.receive_udp_data(port, message, timeout)
time.sleep(delay)
src.send_udp_data(dst_address, port, message, src_address)
time.sleep(timeout - delay)
if __name__ == "__main__":
unittest.main()
| 37.980676
| 119
| 0.662808
|
0ed54e2967df278ae0b60296824bf5361374246f
| 485
|
lua
|
Lua
|
game/test_objects/enemy/flying_entity_controller.lua
|
Saviorium/platformer-framework
|
c5f7ce2188b86874a032ab171ede10f4562c599c
|
[
"CC-BY-3.0"
] | null | null | null |
game/test_objects/enemy/flying_entity_controller.lua
|
Saviorium/platformer-framework
|
c5f7ce2188b86874a032ab171ede10f4562c599c
|
[
"CC-BY-3.0"
] | 4
|
2020-10-22T22:32:07.000Z
|
2021-04-18T22:43:44.000Z
|
game/test_objects/enemy/flying_entity_controller.lua
|
Saviorium/platformer-framework
|
c5f7ce2188b86874a032ab171ede10f4562c599c
|
[
"CC-BY-3.0"
] | 1
|
2020-09-10T19:37:01.000Z
|
2020-09-10T19:37:01.000Z
|
local Class = require "lib.hump.class"
local ObjectController = require "engine.controls.object_controller"
local FlyingEntityController = Class {
__includes = ObjectController,
init = function(self, entity, inputManager)
ObjectController.init(self, inputManager)
self.entity = entity
self.inputManager = inputManager
end
}
function FlyingEntityController:reactToInputs(inputs)
self.entity:move(inputs.move)
end
return FlyingEntityController
| 26.944444
| 68
| 0.756701
|
c9b3b576ee9ff8c937e3c9d9feac4f0af22efba9
| 1,512
|
tsx
|
TypeScript
|
src/components/backdrop.tsx
|
leosdibella/endure
|
62cc594a130fc197a8c4dc4640f11e20a4375ed1
|
[
"MIT"
] | null | null | null |
src/components/backdrop.tsx
|
leosdibella/endure
|
62cc594a130fc197a8c4dc4640f11e20a4375ed1
|
[
"MIT"
] | null | null | null |
src/components/backdrop.tsx
|
leosdibella/endure
|
62cc594a130fc197a8c4dc4640f11e20a4375ed1
|
[
"MIT"
] | null | null | null |
import React, { PureComponent } from 'react';
import { BackdropState } from '../classes/backdropState';
import { IBackdropProps } from '../interfaces/iBackdropProps';
import { Theme } from '../utilities/enum';
import { fillArray } from '../utilities/shared';
import '../styles/backdrop.scss';
export class Backdrop extends PureComponent<IBackdropProps, BackdropState> {
private static readonly binderHoles: JSX.Element[] = fillArray(BackdropState.numberOfBinderHoles, i => {
return <div key={i}
className='backdrop-binder-hole'>
</div>;
});
public readonly state: BackdropState = new BackdropState();
public componentDidUpdate(): void {
this.setState(new BackdropState());
}
public render(): JSX.Element {
const lines: JSX.Element[] = fillArray(this.state.numberOfLines, i => {
return <div key={i}
className='backdrop-line'>
</div>;
});
return <div className={`backdrop ${Theme[this.props.theme]}`}>
<div className='backdrop-left-margin'>
<div className='backdrop-binder-holes'>
{Backdrop.binderHoles}
</div>
</div>
<div className='backdrop-right-margin'>
</div>
<div className='backdrop-lines'>
{lines}
</div>
</div>;
}
}
| 36
| 108
| 0.541667
|
f5e4dc2e7463381718bcdab134695c323f4ee132
| 253
|
css
|
CSS
|
public/stylesheets/front/print.css
|
Radio/theatres-node
|
9116c2b0248a7861706104f2065daf2141eb311b
|
[
"MIT"
] | 1
|
2017-03-27T09:17:11.000Z
|
2017-03-27T09:17:11.000Z
|
public/stylesheets/front/print.css
|
Radio/theatres-node
|
9116c2b0248a7861706104f2065daf2141eb311b
|
[
"MIT"
] | null | null | null |
public/stylesheets/front/print.css
|
Radio/theatres-node
|
9116c2b0248a7861706104f2065daf2141eb311b
|
[
"MIT"
] | null | null | null |
.no-print{display:none}a{text-decoration:none;border:0 none}a[href]:after{content:none !important}.filters-col{display:none}.scrolled .main-header{position:relative}.scrolled .main-header h1{padding-left:0;padding-right:0}.scrolled .poster{margin-top:0}
| 253
| 253
| 0.798419
|
bc214b0d27cc2c70adc2169fe5c51d2d65ba4141
| 182
|
sql
|
SQL
|
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/pg_twophase/switch_ckpt_b/trigger_sql/sql/create_heap_bitmap_index_template_b0.sql
|
khuddlefish/gpdb
|
2d20bae838c5ed433eecf6ecceca1b8dd5221197
|
[
"PostgreSQL",
"Apache-2.0"
] | 1
|
2017-09-15T06:09:56.000Z
|
2017-09-15T06:09:56.000Z
|
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/pg_twophase/switch_ckpt_b/trigger_sql/sql/create_heap_bitmap_index_template_b0.sql
|
guofengrichard/gpdb
|
29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3
|
[
"PostgreSQL",
"Apache-2.0"
] | 6
|
2018-08-04T07:51:37.000Z
|
2018-11-26T07:09:44.000Z
|
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/pg_twophase/switch_ckpt_b/trigger_sql/sql/create_heap_bitmap_index_template_b0.sql
|
guofengrichard/gpdb
|
29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3
|
[
"PostgreSQL",
"Apache-2.0"
] | 1
|
2018-12-04T09:13:57.000Z
|
2018-12-04T09:13:57.000Z
|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
CREATE INDEX pg2_heap_bitmap_idx1_b0 ON pg2_heap_table_bitmap_index_b0 USING bitmap (numeric_col);
| 36.4
| 98
| 0.873626
|
e70fa76b4f42eb5a5b90829d6db10d0eee931d98
| 1,861
|
php
|
PHP
|
controllers/AdminCategoryController.php
|
TomLepsky/testshop
|
060eb0d1b55f11ebf6932fcdfcbc50e39af92d75
|
[
"Apache-2.0"
] | null | null | null |
controllers/AdminCategoryController.php
|
TomLepsky/testshop
|
060eb0d1b55f11ebf6932fcdfcbc50e39af92d75
|
[
"Apache-2.0"
] | null | null | null |
controllers/AdminCategoryController.php
|
TomLepsky/testshop
|
060eb0d1b55f11ebf6932fcdfcbc50e39af92d75
|
[
"Apache-2.0"
] | null | null | null |
<?php
class AdminCategoryController extends Admin {
public function actionIndex() {
self::checkAdmin();
$categoriesList = array();
$categoriesList = Category::getCategoriesListAdmin();
require_once(ROOT . '/views/admin_category/index.php');
return true;
}
public function actionUpdate($categoryId) {
self::checkAdmin();
$category = Category::getCategoryById($categoryId);
if (isset($_POST['submit'])) {
$newCategory['name'] = $_POST['name'];
$newCategory['sort_order'] = $_POST['sort_order'];
$newCategory['status'] = $_POST['status'];
$errors = false;
if (!isset($newCategory['name']) || empty($newCategory['name']))
$errors[] = 'wrong data';
if ($errors == false) {
Category::updateCategoryById($categoryId, $newCategory);
header('Location: /admin/category');
}
}
require_once(ROOT . '/views/admin_category/update.php');
return true;
}
public function actionCreate() {
self::checkAdmin();
if (isset($_POST['submit'])) {
$newCategory['name'] = $_POST['name'];
$newCategory['sort_order'] = $_POST['sort_order'];
$newCategory['status'] = $_POST['status'];
$errors = false;
if (!isset($newCategory['name']) || empty($newCategory['name']))
$errors[] = 'Empty or wrong field!! >_<';
if ($errors == false) {
Category::createCategory($newCategory);
header('Location: /admin/category');
}
}
require_once(ROOT . '/views/admin_category/create.php');
return true;
}
public function actionDelete($categoryId) {
self::checkAdmin();
if (isset($_POST['submit'])) {
Category::deleteCategoryById($categoryId);
header('Location: /admin/category/');
}
require_once(ROOT . '/views/admin_category/delete.php');
return true;
}
}
?>
| 18.989796
| 68
| 0.612037
|
4d55bbdca668fcf0e5f786ebf71bd5ea5928c844
| 12,961
|
cs
|
C#
|
Assets/Scripts/postGame/spawnPeople.cs
|
IvanNik17/InfectionGame
|
ab6b56adab3ee26365691ef33a61b0d3df3da47f
|
[
"MIT"
] | 1
|
2020-11-04T02:16:11.000Z
|
2020-11-04T02:16:11.000Z
|
Assets/Scripts/postGame/spawnPeople.cs
|
IvanNik17/InfectionGame
|
ab6b56adab3ee26365691ef33a61b0d3df3da47f
|
[
"MIT"
] | null | null | null |
Assets/Scripts/postGame/spawnPeople.cs
|
IvanNik17/InfectionGame
|
ab6b56adab3ee26365691ef33a61b0d3df3da47f
|
[
"MIT"
] | null | null | null |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class spawnPeople : MonoBehaviour
{
public GameObject raycasterObj;
public GameObject colliderSpace;
public GameObject personPrefab;
public List<GameObject> allSickPeople;
public float radBetweenPeople = 2f;
public Material[] possibleConditions;
public List<GameObject> positionMarkers;
List<GameObject> healthyPeople;
public GameObject positionPrefab;
Vector3 spaceSize;
Vector3 spacePosition;
Vector3 personSize;
float timer;
public float spawnTime = 3f;
float spawnOverTimer = 0f;
float maxTimeToWait = 2f;
int xNumber;
int zNumber;
List<GameObject> allPossibleObjs;
List<Vector3> emptySpaces;
List<bool> isStillEmpty;
List<int> sickOrNot;
public int numEmpty = 0;
public int numberOfPeople = 30;
public int numberSick = 10;
List<int> chosenIds;
List<List<int>> sickThroughTime;
//public int daysPassed;
public int maxDays;
public int currDay;
// Start is called before the first frame update
void Start()
{
//numberOfPeople = (int)(numEmpty / 0.2f);
//numEmpty = 5;
//Check if area is big enough
float areaOfAllSpawnPos = (float)(numberOfPeople) * (Mathf.PI * radBetweenPeople * radBetweenPeople);
Debug.Log(areaOfAllSpawnPos + " ? " + colliderSpace.transform.localScale.x * colliderSpace.transform.localScale.z);
if (areaOfAllSpawnPos >= colliderSpace.transform.localScale.x * colliderSpace.transform.localScale.z)
{
float sizeDelta = areaOfAllSpawnPos - (colliderSpace.transform.localScale.x * colliderSpace.transform.localScale.z);
sizeDelta += radBetweenPeople * 5;
sizeDelta = Mathf.Sqrt(sizeDelta);
Vector3 newArea = new Vector3(sizeDelta, 0, sizeDelta);
colliderSpace.transform.localScale += newArea;
}
positionMarkers = new List<GameObject>();
healthyPeople = new List<GameObject>();
allSickPeople = new List<GameObject>();
isStillEmpty = new List<bool>();
chosenIds = new List<int>();
sickOrNot = new List<int>();
sickThroughTime = new List<List<int>>();
spaceSize = colliderSpace.transform.localScale;
spacePosition = colliderSpace.transform.position;
int posCounter = 0;
while (posCounter <= (numberOfPeople))
{
Vector3 spawnPos_caster = spacePosition + new Vector3(Random.Range(-spaceSize.x / 2, spaceSize.x / 2), 10, Random.Range(-spaceSize.z / 2, spaceSize.z / 2));
raycasterObj.transform.position = spawnPos_caster;
Debug.DrawRay(raycasterObj.transform.position, -raycasterObj.transform.up * 1000f, Color.red);
RaycastHit hit;
int layerMask = 1 << 8;
if (Physics.Raycast(raycasterObj.transform.position, -raycasterObj.transform.up, out hit, Mathf.Infinity, layerMask))
{
int layerMaskPeople = 1 << 10;
Collider[] hitColliders = Physics.OverlapSphere(hit.point, radBetweenPeople, layerMaskPeople);
if (hitColliders.Length == 0)
{
GameObject spawnPosCurr = Instantiate(positionPrefab, hit.point, Quaternion.identity);
positionMarkers.Add(spawnPosCurr);
posCounter++;
}
}
}
int counter = 0;
while (numberOfPeople > 0)
{
int index = Random.Range(0, positionMarkers.Count - 1);
Vector3 curPos = positionMarkers[index].transform.position;
curPos.y += 1;
Destroy(positionMarkers[index]);
positionMarkers.RemoveAt(index);
GameObject currHealthy = Instantiate(personPrefab, curPos, Quaternion.identity);
healthyPeople.Add(currHealthy);
sickThroughTime.Add(new List<int>());
sickOrNot.Add(0);
changeMaterial(0, currHealthy);
numberOfPeople--;
counter++;
}
while (numberSick >= 0)
{
for (int i = 0; i < healthyPeople.Count; i++)
{
List<int> currList = sickThroughTime[i];
currList.Add(sickOrNot[i]);
sickThroughTime[i] = currList;
}
bool isSet = false;
while (!isSet)
{
int index = Random.Range(0, healthyPeople.Count - 1);
if (!chosenIds.Contains(index))
{
//Vector3 curPos = healthyPeople[index].transform.position;
//curPos.y += 10;
GameObject currPerson = healthyPeople[index];
//currPerson.transform.position = curPos;
//currPerson.tag = "kids";
// changeMaterial(2, currPerson);
sickOrNot[index] = 1;
numberSick--;
chosenIds.Add(index);
isSet = true;
}
}
}
//Debug.Log(sickThroughTime[0].Count);
//while (numEmpty > 0)
//{
// int index = Random.Range(0, positionMarkers.Count - 1);
// Vector3 curPos = positionMarkers[index].transform.position;
// curPos.y += 10;
// Destroy(positionMarkers[index]);
// positionMarkers.RemoveAt(index);
// GameObject currSick = Instantiate(personPrefab, curPos, Quaternion.identity);
// allSickPeople.Add(currSick);
// changeMaterial(2, currSick);
// numEmpty--;
//}
//for (int i = 0; i < positionMarkers.Count; i++)
//{
// isStillEmpty.Add(true);
//}
//personSize = personPrefab.transform.localScale;
//allSickPeople = new List<GameObject>();
//emptySpaces = new List<Vector3>();
//isStillEmpty = new List<bool>();
//xNumber = (int)Mathf.Round(spaceSize.x / personSize.x);
//zNumber = (int)Mathf.Round(spaceSize.z / personSize.z);
//allPossibleObjs = new List<GameObject>();
//for (int i = 0; i <= xNumber; i+=5)
//{
// float xPos = (spacePosition.x - spaceSize.x/2) + (personSize.x) * i;
// for (int j = 0; j <= zNumber; j+=5)
// {
// //int emptyChance = Random.Range(0, 2);
// //if (emptyChance == 0)
// //{
// // continue;
// //}
// float zPos = (spacePosition.z - spaceSize.z / 2) + (personSize.z) * j;
// GameObject currPerson = Instantiate(personPrefab, new Vector3(xPos,1,zPos ), Quaternion.identity);
// currPerson.GetComponent<Rigidbody>().isKinematic = true;
// currPerson.layer = 9;
// changeMaterial(0, currPerson);
// allPossibleObjs.Add(currPerson);
// isStillEmpty.Add(true);
// }
//}
//while (numEmpty>0)
//{
// int index = Random.Range(0, allPossibleObjs.Count - 1);
// emptySpaces.Add(allPossibleObjs[index].transform.position);
// Destroy(allPossibleObjs[index]);
// allPossibleObjs.RemoveAt(index);
// numEmpty--;
//}
}
// Update is called once per frame
void FixedUpdate()
{
timer += Time.fixedDeltaTime;
List<int> currDayVals = new List<int>();
for (int i = 0; i < sickOrNot.Count; i++)
{
currDayVals.Add(sickThroughTime[i][currDay]);
sickOrNot[i] = sickThroughTime[i][currDay];
}
//List<int> test = sickThroughTime[currDay];
//string str = "";
//for (int i = 0; i < test.Count; i++)
//{
// str += " | " + test[i];
//}
//Debug.Log(str);
for (int i = 0; i < healthyPeople.Count; i++)
{
if (sickOrNot[i] == 0)
{
changeMaterial(0, healthyPeople[i]);
}
else if (sickOrNot[i] == 1)
{
changeMaterial(2, healthyPeople[i]);
}
}
if (timer >= spawnTime)
{
//for (int i = 0; i < positionMarkers.Count; i++)
//{
// if (isStillEmpty[i])
// {
// Vector3 spawnPos = positionMarkers[i].transform.position;
// spawnPos.y = 20;
// raycasterObj.transform.position = spawnPos;
// GameObject sickPerson = Instantiate(personPrefab, raycasterObj.transform.position, Quaternion.identity);
// sickPerson.tag = "kids";
// changeMaterial(2, sickPerson);
// //allSickPeople.Add(sickPerson);
// //Destroy(positionMarkers[i]);
// //positionMarkers.RemoveAt(i);
// isStillEmpty[i] = false;
// break;
// }
//}
//if (numberSick > 0)
//{
// for (int i = 0; i < healthyPeople.Count; i++)
// {
// List<int> currList = sickThroughTime[i];
// currList.Add(sickOrNot[i]);
// sickThroughTime[i] = currList;
// }
// bool isSet = false;
// while (!isSet)
// {
// int index = Random.Range(0, healthyPeople.Count - 1);
// if (!chosenIds.Contains(index))
// {
// //Vector3 curPos = healthyPeople[index].transform.position;
// //curPos.y += 10;
// GameObject currPerson = healthyPeople[index];
// //currPerson.transform.position = curPos;
// //currPerson.tag = "kids";
// // changeMaterial(2, currPerson);
// sickOrNot[index] = 1;
// numberSick--;
// chosenIds.Add(index);
// isSet = true;
// }
// }
//}
//int numToSpawn = 3;
//int counter = 0;
//while (counter <= numToSpawn)
//{
// bool foundEmptyPos = false;
// spawnOverTimer += Time.fixedDeltaTime;
// while (!foundEmptyPos || spawnOverTimer >= maxTimeToWait)
// {
// Vector3 spawnPos_caster = spacePosition + new Vector3(Random.Range(-spaceSize.x / 2, spaceSize.x / 2), 10, Random.Range(-spaceSize.z / 2, spaceSize.z / 2));
// raycasterObj.transform.position = spawnPos_caster;
// Debug.DrawRay(raycasterObj.transform.position, -raycasterObj.transform.up * 1000f, Color.red);
// RaycastHit hit;
// int layerMask = 1 << 8;
// if (Physics.Raycast(raycasterObj.transform.position, -raycasterObj.transform.up, out hit, Mathf.Infinity, layerMask))
// {
// int layerMaskPeople = 1 << 9;
// Collider[] hitColliders = Physics.OverlapSphere(hit.point, radBetweenPeople, layerMaskPeople);
// if (hitColliders.Length == 0)
// {
// GameObject houseCurr = Instantiate(personPrefab, raycasterObj.transform.position, Quaternion.identity);
// allPeople.Add(houseCurr);
// foundEmptyPos = true;
// counter++;
// spawnOverTimer = 0;
// }
// }
// }
//}
timer = 0;
}
}
public void changeMaterial(int condition, GameObject objChangeMat)
{
switch (condition)
{
case 0:
objChangeMat.transform.GetComponentInChildren<Renderer>().material = possibleConditions[0];
break;
case 1:
objChangeMat.transform.GetComponentInChildren<Renderer>().material = possibleConditions[1];
break;
case 2:
objChangeMat.transform.GetComponentInChildren<Renderer>().material = possibleConditions[2];
break;
default:
break;
}
}
}
| 24.13594
| 178
| 0.503973
|
4d6959c12dc7cf096b03fb728cb1274d28dc67fe
| 1,204
|
cs
|
C#
|
src/csharp/VoterWatch/VoterWatch/dataclasses/votingdata.cs
|
SiliconHoller/open-precincts
|
bf0d9786e4473fd223bbaf0872f10a962550b884
|
[
"MIT"
] | null | null | null |
src/csharp/VoterWatch/VoterWatch/dataclasses/votingdata.cs
|
SiliconHoller/open-precincts
|
bf0d9786e4473fd223bbaf0872f10a962550b884
|
[
"MIT"
] | null | null | null |
src/csharp/VoterWatch/VoterWatch/dataclasses/votingdata.cs
|
SiliconHoller/open-precincts
|
bf0d9786e4473fd223bbaf0872f10a962550b884
|
[
"MIT"
] | null | null | null |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
namespace VoterWatch.dataclasses
{
[DataContract]
public class votemethod
{
[DataMember]
public int methodid { get; set; }
[DataMember]
public string name { get; set; }
[DataMember]
public int seq { get; set; }
[DataMember]
public string descr { get; set; }
}
[DataContract]
public class tallytype
{
[DataMember]
public int typeid { get; set; }
[DataMember]
public string name { get; set; }
[DataMember]
public int seq { get; set; }
[DataMember]
public string descr { get; set; }
}
[DataContract]
public class tally
{
[DataMember]
public int tallyid { get; set; }
[DataMember]
public string name { get; set; }
[DataMember]
public int ttypeid { get; set; }
[DataMember]
public string descr { get; set; }
[DataMember]
public DateTime tstart { get; set; }
[DataMember]
public DateTime tend { get; set; }
}
}
| 23.153846
| 44
| 0.55897
|
af3534a2a861870ac487e93e48edfb17b14c485c
| 508
|
py
|
Python
|
hashes.py
|
sorrge/goviaji
|
6a9c1da82c7db2ddfbed374b1950f048d9d72fa3
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | 4
|
2019-02-17T04:14:26.000Z
|
2020-11-29T07:23:56.000Z
|
hashes.py
|
sorrge/goviaji
|
6a9c1da82c7db2ddfbed374b1950f048d9d72fa3
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
hashes.py
|
sorrge/goviaji
|
6a9c1da82c7db2ddfbed374b1950f048d9d72fa3
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
import random
hash_mask = 0xffffffffffffffff
combinator_value = 0xa0cf5a622e18b479
def new_hash():
return random.getrandbits(64)
def combine_hashes(h1, h2):
return h1 ^ ((h2 + combinator_value + (h1 << 6) + (h1 >> 2)) & hash_mask)
hashes_for_idx = []
def get_hash_for_idx(idx1, idx2):
while idx1 >= len(hashes_for_idx):
hashes_for_idx.append([])
while idx2 >= len(hashes_for_idx[idx1]):
hashes_for_idx[idx1].append(new_hash())
return hashes_for_idx[idx1][idx2]
| 19.538462
| 77
| 0.685039
|
e73b8826276cacc4424fb83d5ab523ed92ac85e5
| 3,394
|
php
|
PHP
|
resources/views/inc/navbar.blade.php
|
KingMike100/getit
|
6fac139a9509604bdd5120d7e89a95208a469359
|
[
"MIT"
] | null | null | null |
resources/views/inc/navbar.blade.php
|
KingMike100/getit
|
6fac139a9509604bdd5120d7e89a95208a469359
|
[
"MIT"
] | 6
|
2020-07-17T15:53:51.000Z
|
2022-02-26T14:46:51.000Z
|
resources/views/inc/navbar.blade.php
|
KingMike100/getit
|
6fac139a9509604bdd5120d7e89a95208a469359
|
[
"MIT"
] | null | null | null |
<nav class="navbar navbar-default navbar-fixed-top">
<div class="navbar-inverse">
<div class="container">
<div class="navbar-header">
<a href="/"> <img src="{{asset('imgt/getit.png')}}" height="53" width="100"></a>
<a class="navbar-brand" href="/">
</a>
</div>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" style="padding-right: 200px" class="form-control" placeholder="Find services">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
@if(Auth::check())
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
role="button" aria-haspopup="true" aria-expanded="false">
Sales & Orders<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="{{ route('order.showSelling', Auth::user()->id) }}">My Sellings</a></li>
<li><a href="{{ route('order.show', Auth::user()->id) }}">My Orders</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
role="button" aria-haspopup="true" aria-expanded="false">
{{ Auth::user()->name }} <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="{{ route('user', Auth::user()->name) }}">My Profile</a></li>
<li role="separator" class="divider"></li>
<li>
<a href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Logout
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST"
style="display: none;">
{{ csrf_field() }}
</form>
</li>
</ul>
</li>
@else
<li>
<a href="{{ route('login') }}">Login</a>
</li>
<li>
<a href="{{ route('register') }}">Register</a>
</li>
@endif
</ul>
</div>
</div>
{{-- <div id="category">
<div class="container">
<ul class="nav navbar-nav">
<li><a href="">Graphics & Design</a></li>
<li><a href="">Digital Marketing</a></li>
<li><a href="">Video & Animation</a></li>
<li><a href="">Music & Audio</a></li>
<li><a href="">Programming & Tech</a></li>
</ul>
</div>
</div> --}}
</nav>
| 46.493151
| 117
| 0.362994
|
694256462a1c98d70c9caf4cc0bca97aeb5f007d
| 5,017
|
dart
|
Dart
|
lib/weightvalues.dart
|
ephrine/Ayurvedic-Unit-Converter
|
b7762fc0a7030acc55067a35536173e90333f627
|
[
"MIT"
] | null | null | null |
lib/weightvalues.dart
|
ephrine/Ayurvedic-Unit-Converter
|
b7762fc0a7030acc55067a35536173e90333f627
|
[
"MIT"
] | null | null | null |
lib/weightvalues.dart
|
ephrine/Ayurvedic-Unit-Converter
|
b7762fc0a7030acc55067a35536173e90333f627
|
[
"MIT"
] | null | null | null |
List<String> weightList = [
'Ratti',
'Gunja',
'Masa',
'Karsa',
'Sukti',
'Palam',
'Prasrti',
'Kudava',
'Manika',
'Prastha',
'Adhaka',
'Drona',
'Surpa',
'Droni',
'Tola',
'Vahi',
'Khari',
'Tula',
'Bhara',
'Tak',
'Dhan',
'Jau',
'Siki',
'Kancha',
'Chhattank',
'Seer',
'Pav',
'Adh-Pav',
'Adher',
'Ser',
'Savaser',
'Dhaser',
'Paseri',
'Adisari',
'Bhari',
'Daseri',
'Pasri',
'Maund',
'Parmanu',
'Marichi',
'Tundal',
'Yava',
'Dhavanshi',
'Lal sarshap',
'Shaan',
'kol',
'Dhanyamash',
'Dam'
];
List<String> sciValueList = [
'Ounce(troy)',
'Ounce(avdp)',
'Pound(Troy)',
'Pound(avdp)',
'Pound(metric)',
'Penny',
'Grams',
'Kilogram',
'MiliGram',
'MicroGram',
'Megagram',
'Slug',
'Stone',
'ton-assay(long)',
'ton-assay(short)',
'ton(long)',
'ton(short)',
'ton metric',
'Hundredweight(long)',
'Hundredweight(short)',
'Carat',
'Point',
'dram(avdp)',
'dram(troy)',
'Grain(metric)',
'Grain(troy)'
];
List<String> sciDesc=[
"A troy ounce is a unit of measure used for weighing precious metals that dates back to the Middle Ages. Originally used in Troyes, France, one troy ounce is equal to 31.21 grams, according to the U.K. ... The troy ounce is often abbreviated to read 't oz' or 'oz",
" ",
" "
];
List<String> ayurValDesc=[
"1 Ratti (Ratti is the seed of the 'Abrus precatorius'. It is a red seed with a black spot at one end. Abul Fazl refers to it as 'Surkh' in Ain-i-Akbari.).",
"It is a small plant (Abrus precatorius) bearing a red and black berry. It forms the smallest of the jeweler's weights, and is considered as equal to three barleycorns.",
"A masha is a traditional Indian unit of massIt is Type of pulse, now standardized as 0.97 grams (0.034 oz). 1 tola = 12 masha, 180 grains, or 11.6638038 grams (0.41142857 oz) P. 4.5 masha = 8 ratti or 0.97 grams considerd as 1 gram",
"Karsa is the unit of weight roughly equal to 12 grams or 0.42 ounces.",
"Sukti is Ayurvedic unit of measurement It is type of pearl,used to measure weight. and is equal to 24 grams or 2 Karsa",
"Palam is Ayurvedic unit of measurement ,used to measure weight. and is equal to 48 grams or 2 sukti or 4 Karsa.",
"Prasrti is Ayurvedic unit of measurement ,used to measure weight. and is equal to 96 grams or 4 sukti.or 2 Palam.",
"Kudava is Ayurvedic unit of measurement Which Is corn measure of two payali ,used to measure weight. and is equal to 192 grams or 2 Prasrti,4 Palam,8 Sukti and 16 karsa.",
"Manika is Ayurvedic unit of measurement ,used to measure weight. and is equal to 384 grams or 2 Kudava,4 Prasrti,8 Palam,16 Sukti and 32 karsa.",
"Prastha is Ayurvedic unit of measurement ,used to measure weight. and is equal to 768 grams or 2 Manika,4 Kudava,8 Prasrti,16 Palam,32 Sukti and 64 karsa.",
"Adhaka is Ayurvedic unit of measurement ,used to measure weight. and is equal to 3072 grams or 4 Prastha.",
"Drona is equal to 12228 Grams and 4 Adhaka ,used to store Ghee.",
" ",
" ",
"Tola equal to karsa ,1 masa and is used to measure gold and silver like metals.",
" ",
" ",
" ",
"1 bhara is equal to 96 grams and is ayurvedic weght measurement.",
"384 rice grain or 96 dhan equal to 1 tak. and its modern equivalent is 3 grams.",
"4 grain of rice together constitute 1 dhan. ,also it is equal to 1 wheat berry. and its modern equivalent is 0.03125 gram",
"jau is the barley corn and was used at the time of akbar to measure weight that are small and is equal to 0.0648 grams.",
" ",
" ",
"16th part of a Ser, where 1 Ser is equals to 0.9331 Kilograms",
"1 seer is approximately equal to 1 kilogram in modern unit and it is equal to 933.1 gram and made up of 4 pav",
"1 pav is one fourth part of 1 ser or one kilogram and is equal to 233.275 grams but in modern days it is considerd as equal to 250 grams as approx.",
"adh-pav is actually adha pav i..e half of one pav and is equal to 116 grams approx",
"adher means half of 1 ser and it contain 2 pav . it is modernly considerd as 500 grams as half of 1 kilogram but is acually equal to 466.55 grams",
"1 seer is approximately equal to 1 kilogram in modern unit and it is equal to 933.1 gram and made up of 4 pav",
"1 ser + 1 pav is equal to savaser usually in modern days considerd as 1125 grams but actually is equal to 1250 grams",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"Parmanu is the small unit of measuring weight in from ayurved.It consists of 1.6 grams in 1 parmanu",
"an ancient unit used for measuring weight and its modern equivalent is 320 grams",
" ",
" ",
"an ancient unit used for measuring weight and its modern equivalent is 50 grams",
" ",
"an ancient unit used for measuring small quantities of weight and its modern equivalent is 3 grams",
"an ancient unit used for measuring small quantities of weight and its modern equivalent is 6 grams",
" ",
"The Dam was copper coin used as a weight as well as currency"
];
| 36.355072
| 267
| 0.676899
|
4bf4297f07aee54ab2165143fd863d5003b02917
| 1,709
|
go
|
Go
|
server/error.go
|
wjl198435/doods
|
6b409dfc8936adedff24d2713dc342003e9dd9c6
|
[
"MIT"
] | 274
|
2019-08-02T16:30:28.000Z
|
2022-03-08T14:31:28.000Z
|
server/error.go
|
wjl198435/doods
|
6b409dfc8936adedff24d2713dc342003e9dd9c6
|
[
"MIT"
] | 67
|
2019-09-02T21:14:08.000Z
|
2022-01-04T14:13:24.000Z
|
server/error.go
|
Raven283/gorestapi
|
d3c8a62ccf97f7cf7874e20d84912d73de2b705f
|
[
"MIT"
] | 42
|
2019-10-12T00:08:35.000Z
|
2022-01-06T09:23:18.000Z
|
package server
import (
"net/http"
"github.com/go-chi/render"
)
// ErrResponse is a generic struct for returning a standard error document
type ErrResponse struct {
Err error `json:"-"` // low-level runtime error
HTTPStatusCode int `json:"-"` // http response status code
StatusText string `json:"status"` // user-level status message
AppCode int64 `json:"code,omitempty"` // application-specific error code
ErrorText string `json:"error,omitempty"` // application-level error message, for debugging
}
// ErrNotFound is a pre-built not-found error
var ErrNotFound = &ErrResponse{HTTPStatusCode: 404, StatusText: "Resource not found."}
// Render is the Renderer for ErrResponse struct
func (e *ErrResponse) Render(w http.ResponseWriter, r *http.Request) error {
render.Status(r, e.HTTPStatusCode)
return nil
}
// ErrInvalidRequest is used to indicate an error on user input (with wrapped error)
func ErrInvalidRequest(err error) render.Renderer {
var errorText string
if err != nil {
errorText = err.Error()
}
return &ErrResponse{
Err: err,
HTTPStatusCode: http.StatusBadRequest,
StatusText: "Invalid request.",
ErrorText: errorText,
}
}
// ErrInternalLog will log an error and return a generic server error to the user
func (s *Server) ErrInternalLog(err error) render.Renderer {
s.logger.Errorw("Server Error", "error", err)
return ErrInternal(err)
}
// ErrInternal returns a generic server error to the user
func ErrInternal(err error) render.Renderer {
return &ErrResponse{
Err: err,
HTTPStatusCode: http.StatusInternalServerError,
StatusText: "Server Error.",
ErrorText: "Server Error.",
}
}
| 29.982456
| 93
| 0.716208
|
b00a46d6fb4cb8d1890e40be553af4147d2cca11
| 485
|
py
|
Python
|
course-2/session-4/working_with_files_3.py
|
robmarano/nyu-python
|
4406f157e6d6a63e512ed1595f56dcb65c5d8526
|
[
"MIT"
] | 2
|
2018-06-01T12:51:10.000Z
|
2020-06-02T15:55:00.000Z
|
course-2/session-4/working_with_files_3.py
|
robmarano/nyu-python
|
4406f157e6d6a63e512ed1595f56dcb65c5d8526
|
[
"MIT"
] | null | null | null |
course-2/session-4/working_with_files_3.py
|
robmarano/nyu-python
|
4406f157e6d6a63e512ed1595f56dcb65c5d8526
|
[
"MIT"
] | 1
|
2018-06-21T23:18:51.000Z
|
2018-06-21T23:18:51.000Z
|
#!/usr/bin/env python3
# how to pickle data
import os
import pickle
a = b'12345678'
b = b'9abcdef'
print('a = {}; b = {}'.format(a,b))
# write data to file
cwd = os.getcwd()
file_name = os.path.join(cwd,'program_state.bin')
with open(file_name,'wb+') as f:
pickle.dump(a,f)
pickle.dump(b,f)
a = b'9abcdef'
b = b'12345678'
print('a = {}; b = {}'.format(a,b))
with open(file_name,'rb') as f:
a = pickle.load(f)
b = pickle.load(f)
print('a = {}; b = {}'.format(a,b))
| 18.653846
| 49
| 0.597938
|
f47209e065de57482f930c793f9d6a357797a478
| 104
|
ts
|
TypeScript
|
src/environments/environment.prod.ts
|
CapeAnnTechnology/sso
|
b348b85b9086d6c1014337e919e288c72867f8d4
|
[
"BSD-3-Clause"
] | null | null | null |
src/environments/environment.prod.ts
|
CapeAnnTechnology/sso
|
b348b85b9086d6c1014337e919e288c72867f8d4
|
[
"BSD-3-Clause"
] | null | null | null |
src/environments/environment.prod.ts
|
CapeAnnTechnology/sso
|
b348b85b9086d6c1014337e919e288c72867f8d4
|
[
"BSD-3-Clause"
] | null | null | null |
export const environment = {
production: true,
REGISTER_URI: 'http://172.16.1.25:4200/register',
};
| 20.8
| 51
| 0.692308
|
7aa41a4ead97875b40c149919e7c84854e846197
| 510
|
cs
|
C#
|
PlannerApp.Shared/Models/PlanRequest.cs
|
julivanespi/PlannerApp
|
8aa3cbc3cad7f5b57451ec2069b06332929446db
|
[
"MIT"
] | null | null | null |
PlannerApp.Shared/Models/PlanRequest.cs
|
julivanespi/PlannerApp
|
8aa3cbc3cad7f5b57451ec2069b06332929446db
|
[
"MIT"
] | null | null | null |
PlannerApp.Shared/Models/PlanRequest.cs
|
julivanespi/PlannerApp
|
8aa3cbc3cad7f5b57451ec2069b06332929446db
|
[
"MIT"
] | null | null | null |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Text;
namespace PlannerApp.Shared.Models
{
public class PlanRequest
{
public string Id { get; set; }
[Required]
[StringLength(100)]
public string Title { get; set; }
[StringLength(256)]
public string Description { get; set; }
public Stream CoverFile { get; set; }
public string FileName { get; set; }
}
}
| 20.4
| 47
| 0.635294
|
df8ff3d644c65318a018f921c09b0c468006d265
| 8,265
|
cs
|
C#
|
src/LiteWebSocket/Routing/MessageControllerResolver.cs
|
goldenass/LiteWebSocket
|
bd0d2937497c992734417ddff2bf835551c3d6da
|
[
"MIT"
] | null | null | null |
src/LiteWebSocket/Routing/MessageControllerResolver.cs
|
goldenass/LiteWebSocket
|
bd0d2937497c992734417ddff2bf835551c3d6da
|
[
"MIT"
] | null | null | null |
src/LiteWebSocket/Routing/MessageControllerResolver.cs
|
goldenass/LiteWebSocket
|
bd0d2937497c992734417ddff2bf835551c3d6da
|
[
"MIT"
] | null | null | null |
using LiteWebSocket.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LiteWebSocket.Routing;
using LiteWebSocket.Exceptions;
using System.Reflection;
using System.Threading.Tasks;
using LiteWebSocket.Filters;
namespace LiteWebSocket.Routing
{
public class MessageControllerResolver
{
protected Dictionary<MethodInfo, Type> _registredHandlers;
protected Dictionary<string, Type> _supportedTypes;
protected IMessageNameResolutionConvention _messageConvention;
protected IMessageControllerResolutionConvention _controllerConvention;
protected IMessageSerializer _serializer;
protected IServiceProvider _serviceProvider;
public MessageControllerResolver(
IMessageSerializer serializer,
IMessageControllerResolutionConvention controllerConvention,
IMessageNameResolutionConvention messageConvention,
IServiceProvider serviceProvider)
{
_registredHandlers = new Dictionary<MethodInfo, Type>();
_supportedTypes = new Dictionary<string, Type>();
_serializer = serializer;
_messageConvention = messageConvention;
_controllerConvention = controllerConvention;
_serviceProvider = serviceProvider;
}
protected IEnumerable<IFilter> GetFilters(MethodInfo action)
{
List<IFilter> results = new List<IFilter>();
results.AddRange(LiteWebSocketDefaults.Filters);
results.AddRange(action.DeclaringType.GetCustomAttributes().Where(p => p is IFilter).Select(p => p as IFilter));
results.AddRange(action.GetCustomAttributes().Where(p => p is IFilter).Select(p => p as IFilter));
return results;
}
protected Action<ActionContext> WrapAction(MethodInfo method, object target, Message arg)
{
if (typeof(Task).IsAssignableFrom(method.ReturnType))
return null;
if (method.ReturnType == typeof(void))
return ctx => { };
else if (typeof(IOperationResult).IsAssignableFrom(method.ReturnType))
return ctx => { ctx.Results.AddRange((method.Invoke(target, new object[] { arg }) as IOperationResult).GetMessages()); };
else
return null;//TODO: maybe an exception would be better
}
protected Func<ActionContext, Task> WrapActionAsync(MethodInfo method, object target, Message arg)
{
if (!typeof(Task).IsAssignableFrom(method.ReturnType))
return null;//TODO: maybe an exception would be better
else if (method.ReturnType.IsGenericType && typeof(IOperationResult).IsAssignableFrom(method.ReturnType.GetGenericArguments().First()))
return async ctx =>
{
ctx.Results.AddRange((await (method.Invoke(target, new object[] { arg }) as Task<IOperationResult>)).GetMessages());
};
else
return async ctx =>
{
await (method.Invoke(target, new object[] { arg }) as Task);
};
}
protected Action<ActionContext> WrapFilter(Action<ActionContext> handler, IFilter filter)
{
return (ActionContext ctx) =>
{
filter.Accept(handler, ctx);
};
}
protected Func<ActionContext, Task> WrapFilterAsync(Func<ActionContext, Task> handler, IFilter filter)
{
return async (ActionContext ctx) =>
{
await filter.AcceptAsync(handler, ctx);
};
}
protected async Task ExecuteAction(MethodInfo method, MessageController target, Message message, OperationContext ctx)
{
IEnumerable<IFilter> filters = GetFilters(method);
object func = null;
if ((func = WrapAction(method, target, message)) != null)
{
Action<ActionContext> action = func as Action<ActionContext>;
if (filters != null)
{
foreach (IFilter item in filters)
{
action = WrapFilter(action, item);
}
}
ActionContext a_ctx = new ActionContext(target, method, message, ctx);
action(a_ctx);
ctx.AddResult(a_ctx.Results);
}
else if ((func = WrapActionAsync(method, target, message)) != null)
{
Func<ActionContext, Task> action = func as Func<ActionContext, Task>;
if (filters != null)
{
foreach (IFilter item in filters)
{
action = WrapFilterAsync(action, item);
}
}
ActionContext a_ctx = new ActionContext(target, method, message, ctx);
await action(a_ctx);
ctx.AddResult(a_ctx.Results);
}
else
throw new Exception(); //TODO: decide which exception
}
protected async virtual Task<IEnumerable<Message>> AcceptMessage(Message message)
{
if (!_registredHandlers.Values.Any(p => p == message.GetType()))
throw new NotSupportedMessageTypeException($"type: {message.GetType().FullName}");
List<MethodInfo> mts = _registredHandlers.Where(p => p.Value == message.GetType()).Select(p=>p.Key).ToList();
Dictionary<MethodInfo, MessageController> ctrls = mts.ToDictionary(p=>p, p => _serviceProvider.GetService(p.DeclaringType) as MessageController);
OperationContext ctx = GetContext();
foreach (KeyValuePair<MethodInfo, MessageController> item in ctrls)
{
await ExecuteAction(item.Key, item.Value, message, ctx);
}
return ctx.Results;
}
//TODO: verify if it is necessary
public string AcceptSerializedBulk(string messages)
{
IEnumerable<Message> msgs = _serializer.Deserialize(messages, _supportedTypes);
if (msgs == null)
return null;
List<Task<IEnumerable<Message>>> _results = new List<Task<IEnumerable<Message>>>();
foreach (Message item in msgs)
{
_results.Add(AcceptMessage(item));
}
return _serializer.Serialize(_results.Select(p=>p.ConfigureAwait(false).GetAwaiter().GetResult()).SelectMany(p=>p), _supportedTypes);
}
protected OperationContext GetContext()
{
return (OperationContext)_serviceProvider.GetService(typeof(OperationContext));
}
public void AddSupportedMessage<T>() where T : Message
{
RouteData data = _messageConvention.GetRouteData<T>();
if (!_supportedTypes.ContainsKey(data.MessageType))
_supportedTypes.Add(data.MessageType, typeof(T));
}
public void RemoveSupportedMessage<T>() where T : Message
{
RouteData data = _messageConvention.GetRouteData<T>();
_supportedTypes.Remove(data.MessageType);
}
public void ClearSupportedMessage()
{
_supportedTypes.Clear();
}
public void RegisterController<T>() where T : MessageController
{
foreach (KeyValuePair<MethodInfo, Type> item in _controllerConvention.GetControllerActions<T>())
{
if (!_registredHandlers.ContainsKey(item.Key))
{
_registredHandlers.Add(item.Key, item.Value);
}
}
}
public void UnregisterController<T>() where T : MessageController
{
foreach (KeyValuePair<MethodInfo, Type> item in _controllerConvention.GetControllerActions<T>())
{
_registredHandlers.Remove(item.Key);
}
}
public void ClearRegisteredControllers()
{
_registredHandlers.Clear();
}
}
}
| 38.263889
| 157
| 0.588869
|
14d16bd821aec4f86f47ea73d40438c2d6ef4d91
| 1,478
|
ts
|
TypeScript
|
public/ProvidedServices/providedservices.ts
|
BPJohn/beauticianApp
|
78a31e00e83967d0f247eadfd68e912b9a95b1b9
|
[
"MIT"
] | null | null | null |
public/ProvidedServices/providedservices.ts
|
BPJohn/beauticianApp
|
78a31e00e83967d0f247eadfd68e912b9a95b1b9
|
[
"MIT"
] | null | null | null |
public/ProvidedServices/providedservices.ts
|
BPJohn/beauticianApp
|
78a31e00e83967d0f247eadfd68e912b9a95b1b9
|
[
"MIT"
] | null | null | null |
import express = require('express');
let router = express.Router();
let providedservices =[{
serviceID:1,
shortDescription:"Basic Hair Cut",
fullDescription:"Our Hair Stylest will cut and style your scalp and or facial hair to any style you request",
cost:1500,
ImageUrl:"haircut icon"
},
{
serviceID:2,
shortDescription:"Expert Syling",
fullDescription:"Our Expert Hair Stylest shampoo and message your scalp and gently blow dry and syle your hail to your request",
cost:3500,
ImageUrl:"Syling icon"
},
{
serviceID:3,
shortDescription:"Hair Dying and Frosting",
fullDescription:"Proffectional Hair coloring including frosting hieghtlights and grey removal including mustash and beards ",
cost:2000,
ImageUrl:"coloring icon"
},
{
serviceID:4,
shortDescription:"Fingernails and Pedicure",
fullDescription:"Proffectional Fingernails and Toenail polishing and styling",
cost:1500,
ImageUrl:"nail polish icon"
}];
router.get('/providedservices', function (req ,res,next){
res.json(providedservices);
});
router.get('/providedservices/:serviceID',function (req,res,next){
let id = parseInt(req.params['id']);
let proService = findproService(id);
if (proService){
res.json(proService);
}else {
res.sendStatus(404);
}
});
function findproService(id:number){
let matches = providedservices.filter((proService)=> {
return proService.serviceID == id;
});
return matches.length ? matches[0]:null;
}
export = router ;
| 28.423077
| 130
| 0.730717
|
a377ba113a6c87f6bc9b31d6e6720cd10fc0bafe
| 1,291
|
dart
|
Dart
|
lib/src/report/models/test_suite_report.dart
|
peiffer-innovations/automated_testing_framework_models
|
612cdd837576ffae1c6333ebfea55c87f8997901
|
[
"MIT"
] | 1
|
2022-01-23T00:08:03.000Z
|
2022-01-23T00:08:03.000Z
|
lib/src/report/models/test_suite_report.dart
|
peiffer-innovations/automated_testing_framework_models
|
612cdd837576ffae1c6333ebfea55c87f8997901
|
[
"MIT"
] | null | null | null |
lib/src/report/models/test_suite_report.dart
|
peiffer-innovations/automated_testing_framework_models
|
612cdd837576ffae1c6333ebfea55c87f8997901
|
[
"MIT"
] | null | null | null |
import 'package:automated_testing_framework_models/automated_testing_framework_models.dart';
/// A summary of all the results from all the runs in a single test suite.
class TestSuiteReport {
final List<TestSuiteResult?> _results = [];
/// Returns all the results from the list.
List<TestSuiteResult?> get results => List.unmodifiable(_results);
/// Returns the number of tests that passed all steps.
int get numTestsPassed {
var passed = 0;
for (var result in _results) {
if (result?.numStepsPassed == result?.numStepsTotal) {
passed++;
}
}
return passed;
}
/// Returns the test device info from the test suite. This assumes that the
/// device hasn't changed during the entire run so it will return the first
/// non-null instance from any of the results.
TestDeviceInfo? get deviceInfo {
var infos = _results.where((result) => result?.deviceInfo != null);
var info = infos.isNotEmpty == true ? infos.first?.deviceInfo : null;
return info;
}
/// Returns [true] if, and only if, all tests passed.
bool get success => numTestsPassed == _results.length;
/// Adds a [TestReport] to the overall summary.
void addTestReport(TestReport report) =>
_results.add(TestSuiteResult.fromTestReport(report));
}
| 33.102564
| 92
| 0.699458
|
aec2ae34ede4b062bd617d24fa4834f81d5cbf42
| 301
|
lua
|
Lua
|
AzurLaneData/zh-CN/view/level/cell/transportcellview.lua
|
FlandreCirno/AzurLaneWikiUtilitiesManual
|
b525fd9086dd716bb65848a8cd0635b261ab6fdf
|
[
"MIT"
] | null | null | null |
AzurLaneData/zh-CN/view/level/cell/transportcellview.lua
|
FlandreCirno/AzurLaneWikiUtilitiesManual
|
b525fd9086dd716bb65848a8cd0635b261ab6fdf
|
[
"MIT"
] | null | null | null |
AzurLaneData/zh-CN/view/level/cell/transportcellview.lua
|
FlandreCirno/AzurLaneWikiUtilitiesManual
|
b525fd9086dd716bb65848a8cd0635b261ab6fdf
|
[
"MIT"
] | null | null | null |
class("TransportCellView", import(".OniCellView")).Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1)
slot0.tfHp = slot0.tf:Find("hp")
slot0.tfHpText = slot0.tf:Find("hp/text")
slot0.tfFighting = slot0.tf:Find("fighting")
end
return class("TransportCellView", import(".OniCellView"))
| 30.1
| 81
| 0.727575
|
b915b5e949c529384ce7f04bca8b8933bf6b9dce
| 674
|
css
|
CSS
|
src/pages/Characters.css
|
thiagomoreirafreitas/react-breaking_bad
|
4462c422230b45bcc0f14fb232dcf82e9bc0f2cd
|
[
"MIT"
] | null | null | null |
src/pages/Characters.css
|
thiagomoreirafreitas/react-breaking_bad
|
4462c422230b45bcc0f14fb232dcf82e9bc0f2cd
|
[
"MIT"
] | 4
|
2020-09-07T09:38:16.000Z
|
2022-02-18T11:06:42.000Z
|
src/pages/Characters.css
|
thiagomoreirafreitas/react-breaking_bad
|
4462c422230b45bcc0f14fb232dcf82e9bc0f2cd
|
[
"MIT"
] | null | null | null |
.banner-characters{
width: 100%;
position: relative;
background-position-x: 50%;
background-image:linear-gradient(to top, #000 0%, transparent 58%), url(../assets/charactersbb.png);
background-size:cover;
background-repeat:no-repeat;
}
@media (min-width: 768px) {
.banner-characters{
width: auto;
/* height: 100vh; */
position: relative;
background-image:linear-gradient(to top, #000 0%, transparent 58%), url(../assets/charactersbb.png);
background-size:cover;
background-repeat:no-repeat;
}
}
h3{
text-align: center;
font-weight: 900;
line-height: 1;
color: #ffffff;
}
| 24.071429
| 108
| 0.621662
|
a32d4db4d7df9033ce8d9efb2776edaa03deab6a
| 9,406
|
java
|
Java
|
src/main/java/io/github/jonestimd/swing/component/FilterField.java
|
jonestimd/swing-extensions
|
611adcaa4e1910555103a61daae1ccff7c73135a
|
[
"MIT"
] | 5
|
2021-01-07T20:57:22.000Z
|
2022-03-28T02:17:27.000Z
|
src/main/java/io/github/jonestimd/swing/component/FilterField.java
|
jonestimd/swing-extensions
|
611adcaa4e1910555103a61daae1ccff7c73135a
|
[
"MIT"
] | 3
|
2019-11-24T02:37:02.000Z
|
2021-08-13T20:15:59.000Z
|
src/main/java/io/github/jonestimd/swing/component/FilterField.java
|
jonestimd/swing-extensions
|
611adcaa4e1910555103a61daae1ccff7c73135a
|
[
"MIT"
] | null | null | null |
// The MIT License (MIT)
//
// Copyright (c) 2019 Timothy D. Jones
//
// 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.
package io.github.jonestimd.swing.component;
import java.awt.Color;
import java.awt.event.KeyEvent;
import java.util.List;
import java.util.PrimitiveIterator.OfInt;
import java.util.ResourceBundle;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.IntStream;
import javax.swing.JTextPane;
import javax.swing.event.CaretEvent;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultHighlighter.DefaultHighlightPainter;
import javax.swing.text.Highlighter.HighlightPainter;
import javax.swing.text.MutableAttributeSet;
import javax.swing.text.Style;
import javax.swing.text.StyleConstants;
import io.github.jonestimd.swing.ComponentResources;
import io.github.jonestimd.swing.DocumentConsumerAdapter;
import io.github.jonestimd.swing.SwingResource;
import io.github.jonestimd.swing.filter.BasicFilterParser;
import io.github.jonestimd.swing.filter.FilterParser;
import io.github.jonestimd.swing.filter.FilterSource;
import io.github.jonestimd.swing.table.sort.BeanModelRowSorter;
import io.github.jonestimd.util.Resources;
import io.github.jonestimd.util.Streams;
/**
* A text pane that allows the user to enter a filter expression. When the text changes it is parsed by a
* {@link FilterParser}. When the text is successfully parsed a property change event is fired for the parsed
* predicate. When parsing fails the fields background color is changed to the specified {@code errorBackground}.
* Operators are typed using the {@code Ctrl} key and are displayed with a bold font. When the caret is at a parenthesis
* the matching parenthesis is highlighted. This component supports the following operators.
* <ul>
* <li>grouping: ()</li>
* <li>not: !</li>
* <li>and: &</li>
* <li>or: | (displayed as │)</li>
* </ul>
* <p>This component can be used with a {@link BeanModelRowSorter} to filter the rows displayed in a table.</p>
* @param <T> the parameter type of the parsed predicate
*/
public class FilterField<T> extends JTextPane implements FilterSource {
/** Property name for predicate property change events. */
public static final String PREDICATE_PROPERTY = "FilterField.predicate";
private final Style plainStyle = getStyle("default");
private final Style boldStyle = addStyle("bold", plainStyle);
private final HighlightPainter highlightPainter = new DefaultHighlightPainter(Color.CYAN);
private Object highlightKey;
private final FilterParser<T> filterParser;
private final Color normalBackground;
private final Color errorBackground;
private Predicate<T> predicate;
private final String operatorKeys;
private final String operatorSymbols;
private final char groupStart;
private final char groupEnd;
/**
* Construct a filter field using the specified {@code filterParser}.
* @param bundle provides filter operator keys and symbols
* @param filterParser the filter parser
* @param errorBackground the background color to use when parsing fails
*/
public FilterField(ResourceBundle bundle, FilterParser<T> filterParser, Color errorBackground) {
this.filterParser = filterParser;
this.normalBackground = getBackground();
this.errorBackground = errorBackground;
this.operatorKeys = Resources.join(bundle, "filter.operator.key.");
this.operatorSymbols = Resources.join(bundle, "filter.operator.symbol.");
this.groupStart = SwingResource.FILTER_OPERATOR_SYMBOL_GROUP_START.getChar();
this.groupEnd = SwingResource.FILTER_OPERATOR_SYMBOL_GROUP_END.getChar();
StyleConstants.setBold(boldStyle, true);
StyleConstants.setForeground(boldStyle, Color.BLUE);
addCaretListener(this::caretUpdate);
getDocument().addDocumentListener(new DocumentConsumerAdapter(this::updateFilter));
}
private void caretUpdate(CaretEvent event) {
if (highlightKey != null) {
getHighlighter().removeHighlight(highlightKey);
highlightKey = null;
}
int dot = event.getDot();
if (dot > 0) {
try {
if (getText(dot - 1, 1).equals("(") && isOperator(dot - 1)) {
highlight(IntStream.range(dot, getText().length()).iterator(), groupEnd, groupStart);
}
else if (getText(dot - 1, 1).equals(")") && isOperator(dot - 1)) {
highlight(Streams.reverseRange(dot - 1, 0).iterator(), groupStart, groupEnd);
}
} catch (BadLocationException e) {
throw new RuntimeException(e);
}
}
}
private void updateFilter(String text) {
setToolTipText(null);
try {
predicate = filterParser.parse(this);
firePropertyChange(PREDICATE_PROPERTY, null, predicate);
setBackground(normalBackground);
} catch (Exception ex) {
predicate = null;
setToolTipText(ex.getMessage());
setBackground(errorBackground);
firePropertyChange(PREDICATE_PROPERTY, null, null);
}
}
/**
* Highlight the matching parenthesis.
* @param iterator character indexes to search for the match
* @param highlight parenthesis to find and highlight
* @param pair opposing parenthesis
*/
private void highlight(OfInt iterator, char highlight, char pair) throws BadLocationException {
int depth = 0;
String text = getText();
while (iterator.hasNext()) {
int i = iterator.nextInt();
if (text.charAt(i) == pair && isOperator(i)) depth++;
else if (text.charAt(i) == highlight && isOperator(i) && depth-- == 0) {
highlightKey = getHighlighter().addHighlight(i, i + 1, highlightPainter);
break;
}
}
}
@Override
public boolean isOperator(int index) {
return StyleConstants.isBold(getStyledDocument().getCharacterElement(index).getAttributes());
}
@Override
protected void processComponentKeyEvent(KeyEvent e) {
if (e.getID() == KeyEvent.KEY_TYPED) {
int index = operatorKeys.indexOf(e.getKeyChar());
if (index >= 0 && e.isControlDown()) {
setInputAttributes(boldStyle);
replaceSelection(operatorSymbols.substring(index, index + 1));
setInputAttributes(plainStyle);
e.consume();
}
}
else {
setInputAttributes(plainStyle);
super.processComponentKeyEvent(e);
}
}
private void setInputAttributes(Style style) {
MutableAttributeSet attributes = getInputAttributes();
attributes.removeAttributes(attributes);
attributes.addAttributes(style);
}
/**
* Get the predicate for the current filter text.
*/
public Predicate<T> getFilter() {
return predicate;
}
/**
* Get the list of filter terms. Useful for highlighting matches.
*/
public List<String> getTerms() {
return filterParser.getTerms();
}
public static <T> Builder<T> builder(FilterParser<T> filterParser) {
return new Builder<>(filterParser);
}
public static <T> Builder<T> builder(Function<String, Predicate<T>> predicateFactory) {
return new Builder<>(new BasicFilterParser<>(predicateFactory));
}
public static class Builder<T> {
private final FilterParser<T> filterParser;
private ResourceBundle bundle = ComponentResources.BUNDLE;
private Color errorBackground = (Color) ComponentResources.BUNDLE.getObject("filter.invalid.background");
public Builder(FilterParser<T> filterParser) {
this.filterParser = filterParser;
}
public Builder<T> bundle(ResourceBundle bundle) {
this.bundle = bundle;
return this;
}
public Builder<T> errorBackground(Color errorBackground) {
this.errorBackground = errorBackground;
return this;
}
public FilterField<T> build() {
return new FilterField<>(bundle, filterParser, errorBackground);
}
}
}
| 40.718615
| 120
| 0.680948
|
cda65a999ac40eb84f9d8d2fe57ef97d508f52b7
| 3,282
|
cs
|
C#
|
src/RestHook.Host/Areas/RestHook/Pages/NewCallbackUrl.cshtml.cs
|
ghstahl/P7.RestHook
|
bfa15fa277a733b86d03204b7295ed8a4b242781
|
[
"MIT"
] | null | null | null |
src/RestHook.Host/Areas/RestHook/Pages/NewCallbackUrl.cshtml.cs
|
ghstahl/P7.RestHook
|
bfa15fa277a733b86d03204b7295ed8a4b242781
|
[
"MIT"
] | null | null | null |
src/RestHook.Host/Areas/RestHook/Pages/NewCallbackUrl.cshtml.cs
|
ghstahl/P7.RestHook
|
bfa15fa277a733b86d03204b7295ed8a4b242781
|
[
"MIT"
] | null | null | null |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;
using P7.RestHook;
using P7.RestHook.ClientManagement;
using P7.RestHook.ClientManagement.Models;
using P7.RestHook.Models;
namespace RestHookHost.Areas.RestHook.Pages
{
public class NewCallbackUrlInputModel
{
public int Number { get; set; }
[Required]
[Display(Name = "Callback Url")]
[Url]
public string CallbackUrl { get; set; }
[Required]
[Display(Name = "Items")] public List<SelectListItem> Items =>
Enumerable.Range(1, 3).Select(x => new SelectListItem
{
Value = x.ToString(),
Text = $"Text {x.ToString()}"
}).ToList();
}
public class NewCallbackUrlModel : PageModel
{
[BindProperty] public string ClientId { get; set; }
private IRestHookClientManagementStore _restHookClientManagementStore;
[BindProperty] public NewCallbackUrlInputModel Input { get; set; }
[BindProperty] public string ReturnUrl { get; set; }
public NewCallbackUrlModel(IRestHookClientManagementStore restHookClientManagementStore)
{
_restHookClientManagementStore = restHookClientManagementStore;
}
public async void OnGetAsync(string newCallbackUrlClientId,
string newCallbackUrlReturnUrl = null)
{
ClientId = newCallbackUrlClientId;
Input = new NewCallbackUrlInputModel();
ReturnUrl = newCallbackUrlReturnUrl ?? "/RestHook";
}
public async Task<IActionResult> OnPostAsync(
string returnUrl = null)
{
returnUrl = returnUrl ?? Url.Content("~/");
if (ModelState.IsValid)
{
var userId = User.Claims
.FirstOrDefault(x => x.Type == "normailzed_id").Value;
var result =
await _restHookClientManagementStore.FindHookClientAsync(userId,ClientId);
var record = result.Data;
// make sure we are not double adding.
var eventName = Input.Items[Input.Number-1].Text;
/*
var foundHookRecord = record.HookRecords.FirstOrDefault(hookRecord =>
(hookRecord.EventName == eventName && string.Compare(hookRecord.CallbackUrl, Input.CallbackUrl,
StringComparison.OrdinalIgnoreCase) == 0));
if (foundHookRecord == null)
{
var result2 =
await _restHookClientManagementStore.AddHookRecordAsync(userId, new HookRecord()
{
CallbackUrl = Input.CallbackUrl,
ClientId = ClientId,
EventName = eventName
});
}
*/
return LocalRedirect($"{returnUrl}");
}
// If we got this far, something failed, redisplay form
return Page();
}
}
}
| 35.290323
| 115
| 0.5844
|
7b0bbf83938edff178ca1e8033caee69984a9893
| 369
|
rb
|
Ruby
|
db/migrate/20170725064712_create_assignments.rb
|
Luey-Ny0ike/school_system
|
5c1a142cb0e3223e5a81fda8b4c007b60578baca
|
[
"MIT"
] | 1
|
2021-06-17T09:14:34.000Z
|
2021-06-17T09:14:34.000Z
|
db/migrate/20170725064712_create_assignments.rb
|
Luey-Ny0ike/school_system
|
5c1a142cb0e3223e5a81fda8b4c007b60578baca
|
[
"MIT"
] | null | null | null |
db/migrate/20170725064712_create_assignments.rb
|
Luey-Ny0ike/school_system
|
5c1a142cb0e3223e5a81fda8b4c007b60578baca
|
[
"MIT"
] | 2
|
2017-07-24T08:40:25.000Z
|
2017-07-31T08:29:22.000Z
|
class CreateAssignments < ActiveRecord::Migration[5.1]
def change
create_table(:assignments) do |t|
t.column(:level, :int)
t.column(:stream, :varchar, :limit=>50)
t.column(:subject, :varchar, :limit=>30)
t.column(:teacher_id,:int)
t.column(:content, :string)
t.column(:due_date, :datetime)
t.timestamps
end
end
end
| 26.357143
| 54
| 0.631436
|
7967c9d4109f1de1dae735a008a5a0582a74acb7
| 3,468
|
php
|
PHP
|
views/navbar.php
|
selch9876/Hair-Clinic
|
db1da7147f9f176832fb7ae13eb85f17fa77cf2b
|
[
"MIT"
] | null | null | null |
views/navbar.php
|
selch9876/Hair-Clinic
|
db1da7147f9f176832fb7ae13eb85f17fa77cf2b
|
[
"MIT"
] | null | null | null |
views/navbar.php
|
selch9876/Hair-Clinic
|
db1da7147f9f176832fb7ae13eb85f17fa77cf2b
|
[
"MIT"
] | null | null | null |
<?php
session_start();
ob_start();
if (!isset($_SESSION['admin_name'])) {
header("Location: login.php");
}
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HAIR CLINIC ADMIN</title>
<!-- Google Font: Source Sans Pro -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
<!-- Font Awesome -->
<link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" href="../plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- Tempusdominus Bootstrap 4 -->
<link rel="stylesheet" href="../plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css">
<!-- JQVMap -->
<link rel="stylesheet" href="../plugins/jqvmap/jqvmap.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
<!-- overlayScrollbars -->
<link rel="stylesheet" href="../plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="../plugins/daterangepicker/daterangepicker.css">
<!-- summernote -->
<link rel="stylesheet" href="../plugins/summernote/summernote-bs4.min.css">
<!-- customizable -->
<link rel="stylesheet" href="../dist/css/adminlte.css">
<!-- CKEditor -->
<link rel="stylesheet" href="../node_modules/ckeditor4/samples/css/samples.css">
<link rel="stylesheet" href="../node_modules\ckeditor4\samples\toolbarconfigurator/lib/codemirror/neo.css">
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
<!-- Navbar -->
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- Left navbar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="../index.php" class="nav-link">Anasayfa</a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="customers.php" class="nav-link">Kullanıcılar</a>
</li>
</ul>
<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<!-- Notifications Dropdown Menu -->
<li class="nav-item " >
<a class="nav-link btn btn-danger" href="logout.php" >Çıkış
<i class="fas fa-exclamation-circle" ></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
<i class="fas fa-expand-arrows-alt"></i>
</a>
</li>
<!--
<li class="nav-item">
<a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
<i class="fas fa-th-large"></i>
</a>
</li>-->
</ul>
</nav>
<!-- /.navbar -->
| 38.533333
| 122
| 0.61707
|
5aeb1e469b76d56169d27ffccd7f079a51571ca9
| 4,248
|
cs
|
C#
|
CrypPlugins/LatticeCrypto/Models/VectorND.cs
|
ekzyis/CrypTool-2
|
1af234b4f74486fbfeb3b3c49228cc36533a8c89
|
[
"Apache-2.0"
] | 12
|
2021-09-29T14:50:06.000Z
|
2022-03-31T15:01:21.000Z
|
CrypPlugins/LatticeCrypto/Models/VectorND.cs
|
ekzyis/CrypTool-2
|
1af234b4f74486fbfeb3b3c49228cc36533a8c89
|
[
"Apache-2.0"
] | 15
|
2021-12-24T22:53:49.000Z
|
2021-12-25T10:03:13.000Z
|
CrypPlugins/LatticeCrypto/Models/VectorND.cs
|
ekzyis/CrypTool-2
|
1af234b4f74486fbfeb3b3c49228cc36533a8c89
|
[
"Apache-2.0"
] | 10
|
2021-10-17T19:46:51.000Z
|
2022-03-18T02:57:57.000Z
|
using System;
using System.Linq;
using System.Numerics;
namespace LatticeCrypto.Models
{
public class VectorND
{
public readonly BigInteger[] values;
public int dim;
public VectorND(BigInteger[] values)
{
this.values = values;
dim = values.Length;
}
public VectorND(int length)
{
values = new BigInteger[length];
dim = length;
}
private double length = -1;
public double Length
{
get
{
if (length == -1)
{
length = Math.Sqrt((double)LengthSquared);
}
return length;
}
}
private BigInteger lengthSquared = new BigInteger(-1);
public BigInteger LengthSquared
{
get
{
if (lengthSquared == -1)
{
lengthSquared = values.Aggregate<BigInteger, BigInteger>(0, (current, v) => current + BigInteger.Pow(v, 2));
}
return lengthSquared;
}
}
public static BigInteger Sqrt(BigInteger n)
{
if (n == 0)
{
return 0;
}
if (n > 0)
{
int bitLength = Convert.ToInt32(Math.Ceiling(BigInteger.Log(n, 2)));
BigInteger root = BigInteger.One << (bitLength / 2);
while (!IsSqrt(n, root))
{
root += n / root;
root /= 2;
}
return root;
}
throw new ArithmeticException("NaN");
}
private static bool IsSqrt(BigInteger n, BigInteger root)
{
BigInteger lowerBound = root * root;
BigInteger upperBound = (root + 1) * (root + 1);
return (n >= lowerBound && n < upperBound);
}
public static VectorND operator +(VectorND v1, VectorND v2)
{
return v1.Add(v2);
}
public VectorND Add(VectorND v2)
{
VectorND result = new VectorND(values.Length);
for (int i = 0; i < dim; i++)
{
result.values[i] = values[i] + v2.values[i];
}
return result;
}
public static VectorND operator -(VectorND v1, VectorND v2)
{
return v1.Subtract(v2);
}
public VectorND Subtract(VectorND v2)
{
VectorND result = new VectorND(values.Length);
for (int i = 0; i < dim; i++)
{
result.values[i] = values[i] - v2.values[i];
}
return result;
}
public static BigInteger operator *(VectorND v1, VectorND v2)
{
return v1.Multiply(v2);
}
public BigInteger Multiply(VectorND v2)
{
BigInteger result = 0;
for (int i = 0; i < dim; i++)
{
result += values[i] * v2.values[i];
}
return result;
}
public static VectorND operator *(VectorND v1, BigInteger scalar)
{
return v1.Multiply(scalar);
}
public VectorND Multiply(BigInteger scalar)
{
VectorND result = new VectorND(values.Length);
for (int i = 0; i < dim; i++)
{
result.values[i] = values[i] * scalar;
}
return result;
}
public double AngleBetween(VectorND v2)
{
return Math.Acos(((double)Multiply(v2) / (Length * v2.Length))) * (180 / Math.PI);
}
public override string ToString()
{
string vector = FormatSettings.VectorTagOpen;
for (int i = 0; i < values.Length; i++)
{
vector += values[i];
if (i < values.Length - 1)
{
vector += FormatSettings.VectorSeparator + " ";
}
}
vector += FormatSettings.VectorTagClosed;
return vector;
}
}
}
| 25.136095
| 128
| 0.448446
|
8513f87b36f5a36a0c4f6166eed1c7d0c8decd20
| 525
|
cs
|
C#
|
OU Game Jam 2021 - One Enemy/Assets/Scripts/Phase1/Phase1Spawner.cs
|
Xerner/OU-Game-Jam-2021
|
6164e913c0f6bbba9e52abcec96bc153ebf3e78e
|
[
"MIT"
] | null | null | null |
OU Game Jam 2021 - One Enemy/Assets/Scripts/Phase1/Phase1Spawner.cs
|
Xerner/OU-Game-Jam-2021
|
6164e913c0f6bbba9e52abcec96bc153ebf3e78e
|
[
"MIT"
] | null | null | null |
OU Game Jam 2021 - One Enemy/Assets/Scripts/Phase1/Phase1Spawner.cs
|
Xerner/OU-Game-Jam-2021
|
6164e913c0f6bbba9e52abcec96bc153ebf3e78e
|
[
"MIT"
] | null | null | null |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Phase1Spawner : MonoBehaviour
{
private float spawnTimer = 0f;
[SerializeField]
private GameObject projectile;
[SerializeField][Range(1,4)]
private float spawnDelay = 3f;
private void Update()
{
spawnTimer += Time.deltaTime;
if(spawnTimer >= spawnDelay)
{
Instantiate(projectile, transform.position, transform.rotation);
spawnTimer = 0;
}
}
}
| 22.826087
| 76
| 0.651429
|
7af5199fa6a22ae91224e6c7e106179bed4b5714
| 531
|
cs
|
C#
|
source/DasBlog.Tests/UnitTests/UnitTestsConstants.cs
|
Boldbayar/dasblog-core-master
|
d0b9dea4ee2c67978afb838d94026c37d8bfa4bf
|
[
"MIT"
] | null | null | null |
source/DasBlog.Tests/UnitTests/UnitTestsConstants.cs
|
Boldbayar/dasblog-core-master
|
d0b9dea4ee2c67978afb838d94026c37d8bfa4bf
|
[
"MIT"
] | null | null | null |
source/DasBlog.Tests/UnitTests/UnitTestsConstants.cs
|
Boldbayar/dasblog-core-master
|
d0b9dea4ee2c67978afb838d94026c37d8bfa4bf
|
[
"MIT"
] | 1
|
2019-06-29T18:26:16.000Z
|
2019-06-29T18:26:16.000Z
|
using System.IO;
namespace DasBlog.Tests.UnitTests
{
public class UnitTestsConstants
{
private static readonly DirectoryInfo root = new DirectoryInfo(DasBlog.Tests.Support.Common.Utils.GetProjectBinaryDirectory());
public static string TestContentLocation { get { return new DirectoryInfo(Path.Combine(root.Parent.FullName, "netcoreapp2.1/TestContent")).FullName; } }
public static string TestLoggingLocation { get { return new DirectoryInfo(Path.Combine(root.Parent.FullName, "netcoreapp2.1/logs")).FullName; } }
}
}
| 37.928571
| 154
| 0.787194
|
33a1ebd0d2d6a168b03409c9a0a2adfdfb723376
| 2,358
|
go
|
Go
|
norx.go
|
Yawning/norx
|
fa677fda67f007abe6a7ee7d4b5407998f66ec52
|
[
"CC0-1.0"
] | 1
|
2018-03-18T22:32:44.000Z
|
2018-03-18T22:32:44.000Z
|
norx.go
|
Yawning/norx
|
fa677fda67f007abe6a7ee7d4b5407998f66ec52
|
[
"CC0-1.0"
] | null | null | null |
norx.go
|
Yawning/norx
|
fa677fda67f007abe6a7ee7d4b5407998f66ec52
|
[
"CC0-1.0"
] | null | null | null |
// norx.go - High-level interface
//
// To the extent possible under law, Yawning Angel has waived all copyright
// and related or neighboring rights to the software, using the Creative
// Commons "CC0" public domain dedication. See LICENSE or
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
package norx
import "crypto/subtle"
const (
// KeySize is the size of a key in bytes.
KeySize = 32
// NonceSize is the size of a nonce in bytes.
NonceSize = 32
// TagSize is the size of an authentication tag in bytes.
TagSize = 32
// Version is the version of the NORX specification implemented.
Version = "3.0"
)
func aeadEncrypt(l int, c, a, m, z, nonce, key []byte) []byte {
var k [bytesK]byte
s := &state{rounds: l}
mLen := len(m)
ret, out := sliceForAppend(c, mLen+bytesT)
copy(k[:], key)
hardwareAccelImpl.initFn(s, k[:], nonce)
hardwareAccelImpl.absorbDataFn(s, a, tagHeader)
hardwareAccelImpl.encryptDataFn(s, out, m)
hardwareAccelImpl.absorbDataFn(s, z, tagTrailer)
hardwareAccelImpl.finalizeFn(s, out[mLen:], k[:])
burnUint64s(s.s[:])
burnBytes(k[:])
return ret
}
func aeadDecrypt(l int, m, a, c, z, nonce, key []byte) ([]byte, bool) {
var k [bytesK]byte
var tag [bytesT]byte
s := &state{rounds: l}
cLen := len(c)
if cLen < bytesT {
return nil, false
}
mLen := cLen - bytesT
ret, out := sliceForAppend(m, mLen)
copy(k[:], key)
hardwareAccelImpl.initFn(s, k[:], nonce)
hardwareAccelImpl.absorbDataFn(s, a, tagHeader)
hardwareAccelImpl.decryptDataFn(s, out, c[:mLen])
hardwareAccelImpl.absorbDataFn(s, z, tagTrailer)
hardwareAccelImpl.finalizeFn(s, tag[:], k[:])
srcTag := c[mLen:]
ok := subtle.ConstantTimeCompare(srcTag, tag[:]) == 1
if !ok && mLen > 0 { // burn decrypted plaintext on auth failure
burnBytes(out[:mLen])
ret = nil
}
burnUint64s(s.s[:])
burnBytes(k[:])
return ret, ok
}
// Shamelessly stolen from the Go runtime library.
func sliceForAppend(in []byte, n int) (head, tail []byte) {
if total := len(in) + n; cap(in) >= total {
head = in[:total]
} else {
head = make([]byte, total)
copy(head, in)
}
tail = head[len(in):]
return
}
func init() {
if KeySize != bytesK {
panic("BUG: KeySize != paramK/8")
}
if NonceSize != paramN/8 {
panic("BUG: NonceSize != paramN/8")
}
if TagSize != bytesT {
panic("BUG: TagSize != bytesT")
}
}
| 23.117647
| 75
| 0.670483
|
cab78ad89115f67dd34dbe989ce43e3d8df75a43
| 2,465
|
cs
|
C#
|
src/SysX.Text.Json/Serialization/DelegatingJsonConverter.cs
|
kevinarthurackerman/SysX
|
579ff46a7b071233bbeed2eb65816fe13951c24f
|
[
"MIT"
] | 1
|
2021-11-22T22:28:38.000Z
|
2021-11-22T22:28:38.000Z
|
src/SysX.Text.Json/Serialization/DelegatingJsonConverter.cs
|
kevinarthurackerman/SysX
|
579ff46a7b071233bbeed2eb65816fe13951c24f
|
[
"MIT"
] | null | null | null |
src/SysX.Text.Json/Serialization/DelegatingJsonConverter.cs
|
kevinarthurackerman/SysX
|
579ff46a7b071233bbeed2eb65816fe13951c24f
|
[
"MIT"
] | 1
|
2022-02-03T12:56:12.000Z
|
2022-02-03T12:56:12.000Z
|
namespace SysX.Text.Json.Serialization.Identifiers;
/// <summary>
/// Converter to delegate to another converter.
/// </summary>
public class DelegatingJsonConverter<TValue, TSerializableValue> : JsonConverter<TValue>
{
private readonly Func<TValue?, TSerializableValue?> convertToSerializable;
private readonly Func<TSerializableValue?, TValue?> convertFromSerializable;
public DelegatingJsonConverter()
{
if(!Cast.CanCast<TValue, TSerializableValue>() || !Cast.CanCast<TSerializableValue, TValue>())
{
throw new NotSupportedException($"{typeof(TValue)} and {typeof(TSerializableValue)} must be castable to each other, or conversion functions must be provided in the constructor.");
}
convertToSerializable = x => Cast.Value<TValue, TSerializableValue>(x);
convertFromSerializable = x => Cast.Value<TSerializableValue, TValue>(x);
}
public DelegatingJsonConverter(Func<TValue?, TSerializableValue?> convertToSerializable, Func<TSerializableValue?, TValue?> convertFromSerializable)
{
EnsureArg.IsNotNull(convertToSerializable, nameof(convertToSerializable));
EnsureArg.IsNotNull(convertFromSerializable, nameof(convertFromSerializable));
this.convertToSerializable = convertToSerializable;
this.convertFromSerializable = convertFromSerializable;
}
public override TValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
EnsureArg.IsNotNull(typeToConvert, nameof(typeToConvert));
EnsureArg.IsNotNull(options, nameof(options));
var converter = (JsonConverter<TSerializableValue>)options.GetConverter(typeof(TSerializableValue));
var serializableValue = converter.Read(ref reader, typeToConvert, options);
return convertFromSerializable(serializableValue);
}
public override void Write(Utf8JsonWriter writer, TValue value, JsonSerializerOptions options)
{
EnsureArg.IsNotNull(writer, nameof(writer));
EnsureArg.IsNotNull(options, nameof(options));
var converter = (JsonConverter<TSerializableValue>)options.GetConverter(typeof(TSerializableValue));
var serializableValue = convertToSerializable(value);
#pragma warning disable CS8604 // Possible null reference argument.
converter.Write(writer, serializableValue, options);
#pragma warning restore CS8604 // Possible null reference argument.
}
}
| 43.245614
| 191
| 0.746045
|
0b27f58af747f60c625b608d96be3d1c073659cc
| 41
|
swift
|
Swift
|
Playgrounds/SwiftOperators.playground/section-2.swift
|
johnnyclem/intro-to-ios
|
8919a75be6147befc086bd1811f3c8e9622312f7
|
[
"MIT"
] | null | null | null |
Playgrounds/SwiftOperators.playground/section-2.swift
|
johnnyclem/intro-to-ios
|
8919a75be6147befc086bd1811f3c8e9622312f7
|
[
"MIT"
] | null | null | null |
Playgrounds/SwiftOperators.playground/section-2.swift
|
johnnyclem/intro-to-ios
|
8919a75be6147befc086bd1811f3c8e9622312f7
|
[
"MIT"
] | null | null | null |
import UIKit
let b = 10
var a = 5
a = b
| 6.833333
| 12
| 0.585366
|
a362ab7c025d70317de11455d1b11b16501e65f0
| 2,538
|
java
|
Java
|
app/src/main/java/com/kunzisoft/keepass/database/save/PwDbInnerHeaderOutputV4.java
|
grimpy/KeePassDX
|
88ac2ecf98938dcd42eb3a4c67140ef39ad4ffab
|
[
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null |
app/src/main/java/com/kunzisoft/keepass/database/save/PwDbInnerHeaderOutputV4.java
|
grimpy/KeePassDX
|
88ac2ecf98938dcd42eb3a4c67140ef39ad4ffab
|
[
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null |
app/src/main/java/com/kunzisoft/keepass/database/save/PwDbInnerHeaderOutputV4.java
|
grimpy/KeePassDX
|
88ac2ecf98938dcd42eb3a4c67140ef39ad4ffab
|
[
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null |
/*
* Copyright 2017 Brian Pellin.
*
* This file is part of KeePass DX.
*
* KeePassDroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* KeePassDroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with KeePassDroid. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.kunzisoft.keepass.database.save;
import com.kunzisoft.keepass.database.PwDatabaseV4;
import com.kunzisoft.keepass.database.PwDbHeaderV4;
import com.kunzisoft.keepass.database.security.ProtectedBinary;
import com.kunzisoft.keepass.stream.LEDataOutputStream;
import com.kunzisoft.keepass.utils.MemUtil;
import java.io.IOException;
import java.io.OutputStream;
public class PwDbInnerHeaderOutputV4 {
private PwDatabaseV4 db;
private PwDbHeaderV4 header;
private LEDataOutputStream los;
public PwDbInnerHeaderOutputV4(PwDatabaseV4 db, PwDbHeaderV4 header, OutputStream os) {
this.db = db;
this.header = header;
this.los = new LEDataOutputStream(os);
}
public void output() throws IOException {
los.write(PwDbHeaderV4.PwDbInnerHeaderV4Fields.InnerRandomStreamID);
los.writeInt(4);
los.writeInt(header.innerRandomStream.id);
int streamKeySize = header.innerRandomStreamKey.length;
los.write(PwDbHeaderV4.PwDbInnerHeaderV4Fields.InnerRandomstreamKey);
los.writeInt(streamKeySize);
los.write(header.innerRandomStreamKey);
for (ProtectedBinary protectedBinary : db.getBinPool().binaries()) {
byte flag = PwDbHeaderV4.KdbxBinaryFlags.None;
if (protectedBinary.isProtected()) {
flag |= PwDbHeaderV4.KdbxBinaryFlags.Protected;
}
los.write(PwDbHeaderV4.PwDbInnerHeaderV4Fields.Binary);
los.writeInt((int) protectedBinary.length() + 1); // TODO verify
los.write(flag);
MemUtil.readBytes(protectedBinary.getData(),
buffer -> los.write(buffer));
}
los.write(PwDbHeaderV4.PwDbInnerHeaderV4Fields.EndOfHeader);
los.writeInt(0);
}
}
| 35.25
| 91
| 0.70725
|
bb35e1df4fbcc231c2c7584fdcaa0b38ca5f1776
| 287
|
cs
|
C#
|
SmokeMe/Attributes/IgnoreAttribute.cs
|
42skillz/SmokeMe
|
8ac966af004b330833bc418d0d0d0d6bff9dbc02
|
[
"Apache-2.0"
] | 8
|
2020-12-20T22:15:24.000Z
|
2022-01-05T18:42:16.000Z
|
SmokeMe/Attributes/IgnoreAttribute.cs
|
42skillz/SmokeMe
|
8ac966af004b330833bc418d0d0d0d6bff9dbc02
|
[
"Apache-2.0"
] | 7
|
2021-03-23T17:02:02.000Z
|
2021-05-14T15:29:07.000Z
|
SmokeMe/Attributes/IgnoreAttribute.cs
|
42skillz/SmokeMe
|
8ac966af004b330833bc418d0d0d0d6bff9dbc02
|
[
"Apache-2.0"
] | null | null | null |
using System;
namespace SmokeMe
{
/// <summary>
/// Tell SmokeMe lib to ignore a Smoke Test (i.e.: a <see cref="SmokeTest"/> type).
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class IgnoreAttribute : Attribute
{
}
}
| 23.916667
| 87
| 0.641115
|
cb8a5d9a2b94d8e8c87e783861cde23f05e03f40
| 46,821
|
html
|
HTML
|
src/main/webapp/templates/lizhi/front/tag.html
|
qiukj/kfcms
|
9dad0bf6bb1f034ae0377e3aebb9b52920290a53
|
[
"Apache-2.0"
] | null | null | null |
src/main/webapp/templates/lizhi/front/tag.html
|
qiukj/kfcms
|
9dad0bf6bb1f034ae0377e3aebb9b52920290a53
|
[
"Apache-2.0"
] | null | null | null |
src/main/webapp/templates/lizhi/front/tag.html
|
qiukj/kfcms
|
9dad0bf6bb1f034ae0377e3aebb9b52920290a53
|
[
"Apache-2.0"
] | null | null | null |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>TAG标签-天天励志</title>
<meta name="keywords" content="#" />
<meta name="description" content="#" />
<link rel="stylesheet" type="text/css" href="/templets/pc/css/common.css">
</head>
<body class="bgno">
<div class="a-page">
<div class="header">
<div class="logo fl"><a href="/"><img src="/templets/pc/img/logo.png" alt="天天励志"></a></div>
<ul class="link fr">
<li><a href="/" rel="nofollow">网站首页</a></li>
<li><a href="/about/" rel="nofollow">了解我们</a></li>
<li><a href="/sitemap.html" rel="nofollow">网站地图</a></li>
<li><a href="/tougao/" rel="nofollow">投稿帮助</a></li>
<li class="active"><a href="/tag/tags.html">TAG标签</a></li>
<li><a href="javascript:vod(0);" rel="nofollow" onclick="qqemail();" style="text-decoration:none;">问题反馈</a></li>
</ul>
</div>
<div class="a-box">
<div class="a-left fl">
<ul>
<li class="active"><a href="/about/" rel="nofollow">关于我们</a></li>
<li><a href="/service/" rel="nofollow">服务条款</a></li>
<li><a href="/contact/" rel="nofollow">联系方式</a></li>
<li><a href="javascript:vod(0);" rel="nofollow" onclick="qqemail();" style="text-decoration:none;">问题反馈</a></li>
</ul>
</div>
<div class="a-right fr">
<h3><span>TAG标签</span></h3>
<div class="a-con">
<a href='/tag/lizhiwenzhang/' class='tagc1'>励志文章</a>
<a href='/tag/lizhitianxia/' class='tagc1'>励志天下</a>
<a href='/tag/rensheng/' class='tagc1'>人生</a>
<a href='/tag/lizhimingyan/' class='tagc1'>励志名言</a>
<a href='/tag/jingdianwenzhang/' class='tagc1'>经典文章</a>
<a href='/tag/zheli/' class='tagc1'>哲理</a>
<a href='/tag/duanwenxue/' class='tagc1'>短文学</a>
<a href='/tag/zhengnengliang/' class='tagc1'>正能量</a>
<a href='/tag/lizhi/' class='tagc1'>励志</a>
<a href='/tag/renshengzheli/' class='tagc1'>人生哲理</a>
<a href='/tag/mingyanjingxuan/' class='tagc1'>名言精选</a>
<a href='/tag/chenggong/' class='tagc1'>成功</a>
<a href='/tag/nuli/' class='tagc1'>努力</a>
<a href='/tag/shenghuo/' class='tagc1'>生活</a>
<a href='/tag/chuangye/' class='tagc1'>创业</a>
<a href='/tag/mengxiang/' class='tagc1'>梦想</a>
<a href='/tag/shengming/' class='tagc1'>生命</a>
<a href='/tag/xiaoxuezuowen/' class='tagc1'>小学作文</a>
<a href='/tag/jianchi/' class='tagc1'>坚持</a>
<a href='/tag/xingfu/' class='tagc1'>幸福</a>
<a href='/tag/jili/' class='tagc1'>激励</a>
<a href='/tag/shijie/' class='tagc1'>世界</a>
<a href='/tag/shijian/' class='tagc1'>时间</a>
<a href='/tag/geyanjingxuan/' class='tagc1'>格言精选</a>
<a href='/tag/pengyouquan/' class='tagc1'>朋友圈</a>
<a href='/tag/fendou/' class='tagc1'>奋斗</a>
<a href='/tag/nvren/' class='tagc1'>女人</a>
<a href='/tag/xuanze/' class='tagc1'>选择</a>
<a href='/tag/qingchun/' class='tagc1'>青春</a>
<a href='/tag/kuaile/' class='tagc1'>快乐</a>
<a href='/tag/chengchang/' class='tagc1'>成长</a>
<a href='/tag/gaibian/' class='tagc1'>改变</a>
<a href='/tag/guli/' class='tagc1'>鼓励</a>
<a href='/tag/gongzuo/' class='tagc1'>工作</a>
<a href='/tag/haizi/' class='tagc1'>孩子</a>
<a href='/tag/zhufuyu/' class='tagc1'>祝福语</a>
<a href='/tag/shibai/' class='tagc1'>失败</a>
<a href='/tag/youxiu/' class='tagc1'>优秀</a>
<a href='/tag/bieren/' class='tagc1'>别人</a>
<a href='/tag/gaokao/' class='tagc1'>高考</a>
<a href='/tag/mingyun/' class='tagc1'>命运</a>
<a href='/tag/pengyou/' class='tagc1'>朋友</a>
<a href='/tag/zhenxi/' class='tagc1'>珍惜</a>
<a href='/tag/dushu/' class='tagc1'>读书</a>
<a href='/tag/aiqing/' class='tagc1'>爱情</a>
<a href='/tag/xuexi/' class='tagc1'>学习</a>
<a href='/tag/jianqiang/' class='tagc1'>坚强</a>
<a href='/tag/fangqi/' class='tagc1'>放弃</a>
<a href='/tag/fumu/' class='tagc1'>父母</a>
<a href='/tag/gushi/' class='tagc1'>故事</a>
<a href='/tag/shiguang/' class='tagc1'>时光</a>
<a href='/tag/baoyuan/' class='tagc1'>抱怨</a>
<a href='/tag/lizhiyulu/' class='tagc1'>励志语录</a>
<a href='/tag/hunyin/' class='tagc1'>婚姻</a>
<a href='/tag/xiuyang/' class='tagc1'>修养</a>
<a href='/tag/suiyue/' class='tagc1'>岁月</a>
<a href='/tag/weixin/' class='tagc1'>微信</a>
<a href='/tag/laoban/' class='tagc1'>老板</a>
<a href='/tag/nianqingren/' class='tagc1'>年轻人</a>
<a href='/tag/jihui/' class='tagc1'>机会</a>
<a href='/tag/ganwu/' class='tagc1'>感悟</a>
<a href='/tag/zhuanqian/' class='tagc1'>赚钱</a>
<a href='/tag/laoshi/' class='tagc1'>老师</a>
<a href='/tag/daxue/' class='tagc1'>大学</a>
<a href='/tag/xiwang/' class='tagc1'>希望</a>
<a href='/tag/xiguan/' class='tagc1'>习惯</a>
<a href='/tag/mubiao/' class='tagc1'>目标</a>
<a href='/tag/zhichang/' class='tagc1'>职场</a>
<a href='/tag/congming/' class='tagc1'>聪明</a>
<a href='/tag/qingshang/' class='tagc1'>情商</a>
<a href='/tag/xiangxin/' class='tagc1'>相信</a>
<a href='/tag/qingxu/' class='tagc1'>情绪</a>
<a href='/tag/zhihui/' class='tagc1'>智慧</a>
<a href='/tag/meihao/' class='tagc1'>美好</a>
<a href='/tag/chengshu/' class='tagc1'>成熟</a>
<a href='/tag/xihuan/' class='tagc1'>喜欢</a>
<a href='/tag/xintai/' class='tagc1'>心态</a>
<a href='/tag/shehui/' class='tagc1'>社会</a>
<a href='/tag/nianqing/' class='tagc1'>年轻</a>
<a href='/tag/kaishi/' class='tagc1'>开始</a>
<a href='/tag/jiaoyang/' class='tagc1'>教养</a>
<a href='/tag/mimang/' class='tagc1'>迷茫</a>
<a href='/tag/daxuesheng/' class='tagc1'>大学生</a>
<a href='/tag/biye/' class='tagc1'>毕业</a>
<a href='/tag/jiehun/' class='tagc1'>结婚</a>
<a href='/tag/nengli/' class='tagc1'>能力</a>
<a href='/tag/lixiang/' class='tagc1'>理想</a>
<a href='/tag/taidu/' class='tagc1'>态度</a>
<a href='/tag/zixin/' class='tagc1'>自信</a>
<a href='/tag/dengdai/' class='tagc1'>等待</a>
<a href='/tag/zhifu/' class='tagc1'>致富</a>
<a href='/tag/shanliang/' class='tagc1'>善良</a>
<a href='/tag/ganen/' class='tagc1'>感恩</a>
<a href='/tag/jiandan/' class='tagc1'>简单</a>
<a href='/tag/jingli/' class='tagc1'>经历</a>
<a href='/tag/dongxi/' class='tagc1'>东西</a>
<a href='/tag/lizhigushi/' class='tagc1'>励志故事</a>
<a href='/tag/nanren/' class='tagc1'>男人</a>
<a href='/tag/qinfen/' class='tagc1'>勤奋</a>
<a href='/tag/qiangda/' class='tagc1'>强大</a>
<a href='/tag/yangguang/' class='tagc1'>阳光</a>
<a href='/tag/piqi/' class='tagc1'>脾气</a>
<a href='/tag/gudu/' class='tagc1'>孤独</a>
<a href='/tag/sikao/' class='tagc1'>思考</a>
<a href='/tag/benpao/' class='tagc1'>奔跑</a>
<a href='/tag/ziji/' class='tagc1'>自己</a>
<a href='/tag/xuehui/' class='tagc1'>学会</a>
<a href='/tag/weixiao/' class='tagc1'>微笑</a>
<a href='/tag/xianshi/' class='tagc1'>现实</a>
<a href='/tag/cuozhe/' class='tagc1'>挫折</a>
<a href='/tag/zunzhong/' class='tagc1'>尊重</a>
<a href='/tag/meili/' class='tagc1'>美丽</a>
<a href='/tag/jiaoyu/' class='tagc1'>教育</a>
<a href='/tag/guniang/' class='tagc1'>姑娘</a>
<a href='/tag/jiji/' class='tagc1'>积极</a>
<a href='/tag/kunnan/' class='tagc1'>困难</a>
<a href='/tag/yonggan/' class='tagc1'>勇敢</a>
<a href='/tag/qizhi/' class='tagc1'>气质</a>
<a href='/tag/nijing/' class='tagc1'>逆境</a>
<a href='/tag/tongku/' class='tagc1'>痛苦</a>
<a href='/tag/linghun/' class='tagc1'>灵魂</a>
<a href='/tag/nvpengyou/' class='tagc1'>女朋友</a>
<a href='/tag/fuqin/' class='tagc1'>父亲</a>
<a href='/tag/muqin/' class='tagc1'>母亲</a>
<a href='/tag/zibei/' class='tagc1'>自卑</a>
<a href='/tag/xinqing/' class='tagc1'>心情</a>
<a href='/tag/fannao/' class='tagc1'>烦恼</a>
<a href='/tag/ganqing/' class='tagc1'>感情</a>
<a href='/tag/zengjing/' class='tagc1'>曾经</a>
<a href='/tag/xuesheng/' class='tagc1'>学生</a>
<a href='/tag/huozhuo/' class='tagc1'>活着</a>
<a href='/tag/ganxie/' class='tagc1'>感谢</a>
<a href='/tag/ganjue/' class='tagc1'>感觉</a>
<a href='/tag/xinling/' class='tagc1'>心灵</a>
<a href='/tag/daoli/' class='tagc1'>道理</a>
<a href='/tag/shouhuo/' class='tagc1'>收获</a>
<a href='/tag/wenti/' class='tagc1'>问题</a>
<a href='/tag/shengyi/' class='tagc1'>生意</a>
<a href='/tag/zilv/' class='tagc1'>自律</a>
<a href='/tag/zuoren/' class='tagc1'>做人</a>
<a href='/tag/taoyan/' class='tagc1'>讨厌</a>
<a href='/tag/shiqing/' class='tagc1'>事情</a>
<a href='/tag/renxing/' class='tagc1'>人性</a>
<a href='/tag/muqinjie/' class='tagc1'>母亲节</a>
<a href='/tag/renpin/' class='tagc1'>人品</a>
<a href='/tag/nvsheng/' class='tagc1'>女生</a>
<a href='/tag/fengjing/' class='tagc1'>风景</a>
<a href='/tag/jingshen/' class='tagc1'>精神</a>
<a href='/tag/liyou/' class='tagc1'>理由</a>
<a href='/tag/mama/' class='tagc1'>妈妈</a>
<a href='/tag/duanwujie/' class='tagc1'>端午节</a>
<a href='/tag/liliang/' class='tagc1'>力量</a>
<a href='/tag/nianling/' class='tagc1'>年龄</a>
<a href='/tag/biaobai/' class='tagc1'>表白</a>
<a href='/tag/yongyuan/' class='tagc1'>永远</a>
<a href='/tag/yongqi/' class='tagc1'>勇气</a>
<a href='/tag/rudang/' class='tagc1'>入党</a>
<a href='/tag/xinnian/' class='tagc1'>信念</a>
<a href='/tag/geju/' class='tagc1'>格局</a>
<a href='/tag/kunan/' class='tagc1'>苦难</a>
<a href='/tag/shixian/' class='tagc1'>实现</a>
<a href='/tag/touzi/' class='tagc1'>投资</a>
<a href='/tag/mayun/' class='tagc1'>马云</a>
<a href='/tag/nvhai/' class='tagc1'>女孩</a>
<a href='/tag/jingdianyulu/' class='tagc1'>经典语录</a>
<a href='/tag/lingdao/' class='tagc1'>领导</a>
<a href='/tag/duhougan/' class='tagc1'>读后感</a>
<a href='/tag/gongping/' class='tagc1'>公平</a>
<a href='/tag/yuanxiaojie/' class='tagc1'>元宵节</a>
<a href='/tag/weilai/' class='tagc1'>未来</a>
<a href='/tag/renshi/' class='tagc1'>认识</a>
<a href='/tag/shangdi/' class='tagc1'>上帝</a>
<a href='/tag/jujue/' class='tagc1'>拒绝</a>
<a href='/tag/yali/' class='tagc1'>压力</a>
<a href='/tag/gaosan/' class='tagc1'>高三</a>
<a href='/tag/jiqiao/' class='tagc1'>技巧</a>
<a href='/tag/qiongren/' class='tagc1'>穷人</a>
<a href='/tag/wanmei/' class='tagc1'>完美</a>
<a href='/tag/renmen/' class='tagc1'>人们</a>
<a href='/tag/tongxue/' class='tagc1'>同学</a>
<a href='/tag/renlei/' class='tagc1'>人类</a>
<a href='/tag/wennuan/' class='tagc1'>温暖</a>
<a href='/tag/zhonggao/' class='tagc1'>忠告</a>
<a href='/tag/lijie/' class='tagc1'>理解</a>
<a href='/tag/ziyou/' class='tagc1'>自由</a>
<a href='/tag/fangxiang/' class='tagc1'>方向</a>
<a href='/tag/qinggan/' class='tagc1'>情感</a>
<a href='/tag/chunjie/' class='tagc1'>春节</a>
<a href='/tag/xuexiao/' class='tagc1'>学校</a>
<a href='/tag/youyi/' class='tagc1'>友谊</a>
<a href='/tag/caifu/' class='tagc1'>财富</a>
<a href='/tag/mingyanjingju/' class='tagc1'>名言警句</a>
<a href='/tag/gounian/' class='tagc1'>狗年</a>
<a href='/tag/zitai/' class='tagc1'>姿态</a>
<a href='/tag/xinshang/' class='tagc1'>欣赏</a>
<a href='/tag/juli/' class='tagc1'>距离</a>
<a href='/tag/jinbu/' class='tagc1'>进步</a>
<a href='/tag/wanlu/' class='tagc1'>弯路</a>
<a href='/tag/jiannan/' class='tagc1'>艰难</a>
<a href='/tag/fuchu/' class='tagc1'>付出</a>
<a href='/tag/pingfan/' class='tagc1'>平凡</a>
<a href='/tag/jingcai/' class='tagc1'>精彩</a>
<a href='/tag/tiankong/' class='tagc1'>天空</a>
<a href='/tag/lushang/' class='tagc1'>路上</a>
<a href='/tag/jiazhi/' class='tagc1'>价值</a>
<a href='/tag/ziran/' class='tagc1'>自然</a>
<a href='/tag/kuanrong/' class='tagc1'>宽容</a>
<a href='/tag/renzhen/' class='tagc1'>认真</a>
<a href='/tag/jiqing/' class='tagc1'>激情</a>
<a href='/tag/piaoliang/' class='tagc1'>漂亮</a>
<a href='/tag/changshi/' class='tagc1'>尝试</a>
<a href='/tag/mijue/' class='tagc1'>秘诀</a>
<a href='/tag/xiaoshou/' class='tagc1'>销售</a>
<a href='/tag/shengri/' class='tagc1'>生日</a>
<a href='/tag/pingyong/' class='tagc1'>平庸</a>
<a href='/tag/leguan/' class='tagc1'>乐观</a>
<a href='/tag/chibang/' class='tagc1'>翅膀</a>
<a href='/tag/li/' class='tagc1'>魅力</a>
<a href='/tag/yihan/' class='tagc1'>遗憾</a>
<a href='/tag/shaonian/' class='tagc1'>少年</a>
<a href='/tag/shili/' class='tagc1'>实力</a>
<a href='/tag/renmai/' class='tagc1'>人脉</a>
<a href='/tag/jifa/' class='tagc1'>激发</a>
<a href='/tag/shuohua/' class='tagc1'>说话</a>
<a href='/tag/jiyu/' class='tagc1'>机遇</a>
<a href='/tag/xingdong/' class='tagc1'>行动</a>
<a href='/tag/mafan/' class='tagc1'>麻烦</a>
<a href='/tag/guanli/' class='tagc1'>管理</a>
<a href='/tag/xinyang/' class='tagc1'>信仰</a>
<a href='/tag/chenmo/' class='tagc1'>沉默</a>
<a href='/tag/neixin/' class='tagc1'>内心</a>
<a href='/tag/xianmu/' class='tagc1'>羡慕</a>
<a href='/tag/lianai/' class='tagc1'>恋爱</a>
<a href='/tag/zheteng/' class='tagc1'>折腾</a>
<a href='/tag/cuowu/' class='tagc1'>错误</a>
<a href='/tag/wangji/' class='tagc1'>忘记</a>
<a href='/tag/sinian/' class='tagc1'>思念</a>
<a href='/tag/dajia/' class='tagc1'>大家</a>
<a href='/tag/xinli/' class='tagc1'>心里</a>
<a href='/tag/lunyu/' class='tagc1'>论语</a>
<a href='/tag/yuandan/' class='tagc1'>元旦</a>
<a href='/tag/funvjie/' class='tagc1'>妇女节</a>
<a href='/tag/gaoxing/' class='tagc1'>高兴</a>
<a href='/tag/xiuxing/' class='tagc1'>修行</a>
<a href='/tag/fuyang/' class='tagc1'>富养</a>
<a href='/tag/fuweng/' class='tagc1'>富翁</a>
<a href='/tag/quanzi/' class='tagc1'>圈子</a>
<a href='/tag/shouji/' class='tagc1'>手机</a>
<a href='/tag/shandai/' class='tagc1'>善待</a>
<a href='/tag/langfei/' class='tagc1'>浪费</a>
<a href='/tag/shiye/' class='tagc1'>事业</a>
<a href='/tag/chuangyezhe/' class='tagc1'>创业者</a>
<a href='/tag/sixiang/' class='tagc1'>思想</a>
<a href='/tag/jintian/' class='tagc1'>今天</a>
<a href='/tag/shenti/' class='tagc1'>身体</a>
<a href='/tag/zuoyouming/' class='tagc1'>座右铭</a>
<a href='/tag/chengji/' class='tagc1'>成绩</a>
<a href='/tag/sajiao/' class='tagc1'>撒娇</a>
<a href='/tag/kanke/' class='tagc1'>坎坷</a>
<a href='/tag/youqu/' class='tagc1'>有趣</a>
<a href='/tag/shengqi/' class='tagc1'>生气</a>
<a href='/tag/haipa/' class='tagc1'>害怕</a>
<a href='/tag/xingyun/' class='tagc1'>幸运</a>
<a href='/tag/qingrenjie/' class='tagc1'>情人节</a>
<a href='/tag/zeren/' class='tagc1'>责任</a>
<a href='/tag/guanxin/' class='tagc1'>关心</a>
<a href='/tag/huiyi/' class='tagc1'>回忆</a>
<a href='/tag/zhufu/' class='tagc1'>祝福</a>
<a href='/tag/kaixin/' class='tagc1'>开心</a>
<a href='/tag/qidai/' class='tagc1'>期待</a>
<a href='/tag/xingge/' class='tagc1'>性格</a>
<a href='/tag/renjiguanxi/' class='tagc1'>人际关系</a>
<a href='/tag/caihua/' class='tagc1'>才华</a>
<a href='/tag/likai/' class='tagc1'>离开</a>
<a href='/tag/zhengqu/' class='tagc1'>争取</a>
<a href='/tag/pinbo/' class='tagc1'>拼搏</a>
<a href='/tag/yishu/' class='tagc1'>艺术</a>
<a href='/tag/zhongnian/' class='tagc1'>中年</a>
<a href='/tag/qiaobusi/' class='tagc1'>乔布斯</a>
<a href='/tag/mianli/' class='tagc1'>勉励</a>
<a href='/tag/zhongkao/' class='tagc1'>中考</a>
<a href='/tag/fuqinjie/' class='tagc1'>父亲节</a>
<a href='/tag/fuqi/' class='tagc1'>夫妻</a>
<a href='/tag/lijiacheng/' class='tagc1'>李嘉诚</a>
<a href='/tag/xinxin/' class='tagc1'>信心</a>
<a href='/tag/furen/' class='tagc1'>富人</a>
<a href='/tag/reqing/' class='tagc1'>热情</a>
<a href='/tag/nongcun/' class='tagc1'>农村</a>
<a href='/tag/yangzhu/' class='tagc1'>养猪</a>
<a href='/tag/tianfu/' class='tagc1'>天赋</a>
<a href='/tag/houhui/' class='tagc1'>后悔</a>
<a href='/tag/anquangan/' class='tagc1'>安全感</a>
<a href='/tag/jieguo/' class='tagc1'>结果</a>
<a href='/tag/shiwang/' class='tagc1'>失望</a>
<a href='/tag/shufu/' class='tagc1'>舒服</a>
<a href='/tag/jieju/' class='tagc1'>结局</a>
<a href='/tag/wenrou/' class='tagc1'>温柔</a>
<a href='/tag/jiekou/' class='tagc1'>借口</a>
<a href='/tag/zhanzheng/' class='tagc1'>战争</a>
<a href='/tag/zhizu/' class='tagc1'>知足</a>
<a href='/tag/xinren/' class='tagc1'>信任</a>
<a href='/tag/zhizhuo/' class='tagc1'>执着</a>
<a href='/tag/erzi/' class='tagc1'>儿子</a>
<a href='/tag/yinggai/' class='tagc1'>应该</a>
<a href='/tag/faxian/' class='tagc1'>发现</a>
<a href='/tag/heshang/' class='tagc1'>和尚</a>
<a href='/tag/zenyang/' class='tagc1'>怎样</a>
<a href='/tag/mingrenmingyan/' class='tagc1'>名人名言</a>
<a href='/tag/fengxian/' class='tagc1'>奉献</a>
<a href='/tag/liuqiangdong/' class='tagc1'>刘强东</a>
<a href='/tag/yuangong/' class='tagc1'>员工</a>
<a href='/tag/kunjing/' class='tagc1'>困境</a>
<a href='/tag/jiankang/' class='tagc1'>健康</a>
<a href='/tag/guanxi/' class='tagc1'>关系</a>
<a href='/tag/jinqian/' class='tagc1'>金钱</a>
<a href='/tag/jiaowang/' class='tagc1'>交往</a>
<a href='/tag/jijixiangshang/' class='tagc1'>积极向上</a>
<a href='/tag/lvxing/' class='tagc1'>旅行</a>
<a href='/tag/qianneng/' class='tagc1'>潜能</a>
<a href='/tag/shimian/' class='tagc1'>世面</a>
<a href='/tag/yiyi/' class='tagc1'>意义</a>
<a href='/tag/banzhuren/' class='tagc1'>班主任</a>
<a href='/tag/yuedu/' class='tagc1'>阅读</a>
<a href='/tag/biyesheng/' class='tagc1'>毕业生</a>
<a href='/tag/yanjing/' class='tagc1'>眼睛</a>
<a href='/tag/youeryuan/' class='tagc1'>幼儿园</a>
<a href='/tag/jiayou/' class='tagc1'>加油</a>
<a href='/tag/nver/' class='tagc1'>女儿</a>
<a href='/tag/sa/' class='tagc1'>潇洒</a>
<a href='/tag/heian/' class='tagc1'>黑暗</a>
<a href='/tag/rizi/' class='tagc1'>日子</a>
<a href='/tag/taiyang/' class='tagc1'>太阳</a>
<a href='/tag/chaju/' class='tagc1'>差距</a>
<a href='/tag/jiaolv/' class='tagc1'>焦虑</a>
<a href='/tag/shejiao/' class='tagc1'>社交</a>
<a href='/tag/zige/' class='tagc1'>资格</a>
<a href='/tag/huaqian/' class='tagc1'>花钱</a>
<a href='/tag/shengcun/' class='tagc1'>生存</a>
<a href='/tag/yunqi/' class='tagc1'>运气</a>
<a href='/tag/jingjie/' class='tagc1'>境界</a>
<a href='/tag/yanjie/' class='tagc1'>眼界</a>
<a href='/tag/xijie/' class='tagc1'>细节</a>
<a href='/tag/xiangfa/' class='tagc1'>想法</a>
<a href='/tag/siwei/' class='tagc1'>思维</a>
<a href='/tag/putongren/' class='tagc1'>普通人</a>
<a href='/tag/pinqiong/' class='tagc1'>贫穷</a>
<a href='/tag/zhuanzhu/' class='tagc1'>专注</a>
<a href='/tag/jizhi/' class='tagc1'>极致</a>
<a href='/tag/zhexue/' class='tagc1'>哲学</a>
<a href='/tag/duchu/' class='tagc1'>独处</a>
<a href='/tag/yangzi/' class='tagc1'>样子</a>
<a href='/tag/anyi/' class='tagc1'>安逸</a>
<a href='/tag/pinming/' class='tagc1'>拼命</a>
<a href='/tag/zuguo/' class='tagc1'>祖国</a>
<a href='/tag/xinzhong/' class='tagc1'>心中</a>
<a href='/tag/yangzhi/' class='tagc1'>养殖</a>
<a href='/tag/chuangxin/' class='tagc1'>创新</a>
<a href='/tag/monan/' class='tagc1'>磨难</a>
<a href='/tag/zhengqian/' class='tagc1'>挣钱</a>
<a href='/tag/zaoanxinyu/' class='tagc1'>早安心语</a>
<a href='/tag/weimei/' class='tagc1'>唯美</a>
<a href='/tag/weishang/' class='tagc1'>微商</a>
<a href='/tag/xinlingjitang/' class='tagc1'>心灵鸡汤</a>
<a href='/tag/jimo/' class='tagc1'>寂寞</a>
<a href='/tag/wending/' class='tagc1'>稳定</a>
<a href='/tag/shengyin/' class='tagc1'>声音</a>
<a href='/tag/mishi/' class='tagc1'>迷失</a>
<a href='/tag/daan/' class='tagc1'>答案</a>
<a href='/tag/zhuiqiu/' class='tagc1'>追求</a>
<a href='/tag/wen/' class='tagc1'>温馨</a>
<a href='/tag/qianjin/' class='tagc1'>前进</a>
<a href='/tag/bawo/' class='tagc1'>把握</a>
<a href='/tag/lihun/' class='tagc1'>离婚</a>
<a href='/tag/pingjia/' class='tagc1'>评价</a>
<a href='/tag/qiyejia/' class='tagc1'>企业家</a>
<a href='/tag/zhongyao/' class='tagc1'>重要</a>
<a href='/tag/nixi/' class='tagc1'>逆袭</a>
<a href='/tag/shiyuzhu/' class='tagc1'>史玉柱</a>
<a href='/tag/dangyuan/' class='tagc1'>党员</a>
<a href='/tag/jiating/' class='tagc1'>家庭</a>
<a href='/tag/wutai/' class='tagc1'>舞台</a>
<a href='/tag/zhengming/' class='tagc1'>证明</a>
<a href='/tag/chuangzao/' class='tagc1'>创造</a>
<a href='/tag/mingyan/' class='tagc1'>名言</a>
<a href='/tag/wenhua/' class='tagc1'>文化</a>
<a href='/tag/mingtian/' class='tagc1'>明天</a>
<a href='/tag/pinwei/' class='tagc1'>品味</a>
<a href='/tag/tuandui/' class='tagc1'>团队</a>
<a href='/tag/jieshou/' class='tagc1'>接受</a>
<a href='/tag/duli/' class='tagc1'>独立</a>
<a href='/tag/chengxin/' class='tagc1'>诚信</a>
<a href='/tag/zhixingli/' class='tagc1'>执行力</a>
<a href='/tag/jiaoshi/' class='tagc1'>教师</a>
<a href='/tag/zhongqiujie/' class='tagc1'>中秋节</a>
<a href='/tag/xiaoxuesheng/' class='tagc1'>小学生</a>
<a href='/tag/nanpengyou/' class='tagc1'>男朋友</a>
<a href='/tag/shijian/' class='tagc1'>实践</a>
<a href='/tag/zhoumo/' class='tagc1'>周末</a>
<a href='/tag/langman/' class='tagc1'>浪漫</a>
<a href='/tag/duilian/' class='tagc1'>对联</a>
<a href='/tag/shengrikuaile/' class='tagc1'>生日快乐</a>
<a href='/tag/licai/' class='tagc1'>理财</a>
<a href='/tag/shengrizhufu/' class='tagc1'>生日祝福</a>
<a href='/tag/kaoshi/' class='tagc1'>考试</a>
<a href='/tag/nainai/' class='tagc1'>奶奶</a>
<a href='/tag/gongzuojihua/' class='tagc1'>工作计划</a>
<a href='/tag/peiyang/' class='tagc1'>培养</a>
<a href='/tag/quanliyifu/' class='tagc1'>全力以赴</a>
<a href='/tag/jingdiantaici/' class='tagc1'>经典台词</a>
<a href='/tag/xiyouji/' class='tagc1'>西游记</a>
<a href='/tag/wufa/' class='tagc1'>无法</a>
<a href='/tag/yanzhong/' class='tagc1'>眼中</a>
<a href='/tag/songgei/' class='tagc1'>送给</a>
<a href='/tag/zenme/' class='tagc1'>怎么</a>
<a href='/tag/[db:guanjianzi]/' class='tagc1'>[db:关键字]</a>
<a href='/tag/didi/' class='tagc1'>弟弟</a>
<a href='/tag/rongyi/' class='tagc1'>容易</a>
<a href='/tag/gaodu/' class='tagc1'>高度</a>
<a href='/tag/qiantu/' class='tagc1'>前途</a>
<a href='/tag/landuo/' class='tagc1'>懒惰</a>
<a href='/tag/xiulian/' class='tagc1'>修炼</a>
<a href='/tag/dongli/' class='tagc1'>动力</a>
<a href='/tag/zuohao/' class='tagc1'>做好</a>
<a href='/tag/yongxin/' class='tagc1'>用心</a>
<a href='/tag/guangming/' class='tagc1'>光明</a>
<a href='/tag/guihua/' class='tagc1'>规划</a>
<a href='/tag/ruodian/' class='tagc1'>弱点</a>
<a href='/tag/tongshi/' class='tagc1'>同事</a>
<a href='/tag/zhidao/' class='tagc1'>知道</a>
<a href='/tag/jianyi/' class='tagc1'>建议</a>
<a href='/tag/zhiye/' class='tagc1'>职业</a>
<a href='/tag/jilei/' class='tagc1'>积累</a>
<a href='/tag/chengshi/' class='tagc1'>城市</a>
<a href='/tag/digu/' class='tagc1'>低谷</a>
<a href='/tag/tuoyanzheng/' class='tagc1'>拖延症</a>
<a href='/tag/jingzhi/' class='tagc1'>精致</a>
<a href='/tag/qiangzhe/' class='tagc1'>强者</a>
<a href='/tag/kongju/' class='tagc1'>恐惧</a>
<a href='/tag/laoren/' class='tagc1'>老人</a>
<a href='/tag/benshi/' class='tagc1'>本事</a>
<a href='/tag/beiju/' class='tagc1'>悲剧</a>
<a href='/tag/renge/' class='tagc1'>人格</a>
<a href='/tag/yingxiong/' class='tagc1'>英雄</a>
<a href='/tag/shenke/' class='tagc1'>深刻</a>
<a href='/tag/haopengyou/' class='tagc1'>好朋友</a>
<a href='/tag/jiali/' class='tagc1'>家里</a>
<a href='/tag/ruozhe/' class='tagc1'>弱者</a>
<a href='/tag/shijian/' class='tagc1'>世间</a>
<a href='/tag/zhencheng/' class='tagc1'>真诚</a>
<a href='/tag/ziben/' class='tagc1'>资本</a>
<a href='/tag/renxin/' class='tagc1'>人心</a>
<a href='/tag/jueding/' class='tagc1'>决定</a>
<a href='/tag/yao/' class='tagc1'>炫耀</a>
<a href='/tag/jianshi/' class='tagc1'>见识</a>
<a href='/tag/caiwu/' class='tagc1'>财务</a>
<a href='/tag/yuminhong/' class='tagc1'>俞敏洪</a>
<a href='/tag/huijia/' class='tagc1'>回家</a>
<a href='/tag/nanhai/' class='tagc1'>男孩</a>
<a href='/tag/huibao/' class='tagc1'>回报</a>
<a href='/tag/luoyonghao/' class='tagc1'>罗永浩</a>
<a href='/tag/shangji/' class='tagc1'>商机</a>
<a href='/tag/nvxing/' class='tagc1'>女性</a>
<a href='/tag/lirun/' class='tagc1'>利润</a>
<a href='/tag/kongzhi/' class='tagc1'>控制</a>
<a href='/tag/jingyan/' class='tagc1'>经验</a>
<a href='/tag/renqing/' class='tagc1'>人情</a>
<a href='/tag/xiangyu/' class='tagc1'>相遇</a>
<a href='/tag/gufu/' class='tagc1'>辜负</a>
<a href='/tag/qiangua/' class='tagc1'>牵挂</a>
<a href='/tag/zhenxiang/' class='tagc1'>真相</a>
<a href='/tag/yanlei/' class='tagc1'>眼泪</a>
<a href='/tag/gandong/' class='tagc1'>感动</a>
<a href='/tag/lixing/' class='tagc1'>理性</a>
<a href='/tag/nanguo/' class='tagc1'>难过</a>
<a href='/tag/wenhouyu/' class='tagc1'>问候语</a>
<a href='/tag/shengli/' class='tagc1'>胜利</a>
<a href='/tag/zhuangtai/' class='tagc1'>状态</a>
<a href='/tag/pingdan/' class='tagc1'>平淡</a>
<a href='/tag/youshi/' class='tagc1'>优势</a>
<a href='/tag/kaopu/' class='tagc1'>靠谱</a>
<a href='/tag/mianzi/' class='tagc1'>面子</a>
<a href='/tag/lingwu/' class='tagc1'>领悟</a>
<a href='/tag/renshengganwu/' class='tagc1'>人生感悟</a>
<a href='/tag/yulu/' class='tagc1'>语录</a>
<a href='/tag/reai/' class='tagc1'>热爱</a>
<a href='/tag/weizhi/' class='tagc1'>位置</a>
<a href='/tag/jinli/' class='tagc1'>尽力</a>
<a href='/tag/renshenggeyan/' class='tagc1'>人生格言</a>
<a href='/tag/nianji/' class='tagc1'>年纪</a>
<a href='/tag/chuxi/' class='tagc1'>出息</a>
<a href='/tag/guanjun/' class='tagc1'>冠军</a>
<a href='/tag/hushi/' class='tagc1'>胡适</a>
<a href='/tag/aiguo/' class='tagc1'>爱国</a>
<a href='/tag/rennai/' class='tagc1'>忍耐</a>
<a href='/tag/jiaodu/' class='tagc1'>角度</a>
<a href='/tag/xiansheng/' class='tagc1'>先生</a>
<a href='/tag/didiao/' class='tagc1'>低调</a>
<a href='/tag/kongzi/' class='tagc1'>孔子</a>
<a href='/tag/yuanyin/' class='tagc1'>原因</a>
<a href='/tag/yuwang/' class='tagc1'>欲望</a>
<a href='/tag/shihe/' class='tagc1'>适合</a>
<a href='/tag/zisi/' class='tagc1'>自私</a>
<a href='/tag/hanyang/' class='tagc1'>涵养</a>
<a href='/tag/fuze/' class='tagc1'>负责</a>
<a href='/tag/hequn/' class='tagc1'>合群</a>
<a href='/tag/xiaoji/' class='tagc1'>消极</a>
<a href='/tag/kewang/' class='tagc1'>渴望</a>
<a href='/tag/chidu/' class='tagc1'>尺度</a>
<a href='/tag/kongxu/' class='tagc1'>空虚</a>
<a href='/tag/duoluo/' class='tagc1'>堕落</a>
<a href='/tag/jiejing/' class='tagc1'>捷径</a>
<a href='/tag/baorong/' class='tagc1'>包容</a>
<a href='/tag/baochi/' class='tagc1'>保持</a>
<a href='/tag/mifeng/' class='tagc1'>蜜蜂</a>
<a href='/tag/chuangyexiangmu/' class='tagc1'>创业项目</a>
<a href='/tag/pingguo/' class='tagc1'>苹果</a>
<a href='/tag/xianggu/' class='tagc1'>香菇</a>
<a href='/tag/lajiao/' class='tagc1'>辣椒</a>
<a href='/tag/guojia/' class='tagc1'>国家</a>
<a href='/tag/xunzhao/' class='tagc1'>寻找</a>
<a href='/tag/wulun/' class='tagc1'>无论</a>
<a href='/tag/qinai/' class='tagc1'>亲爱</a>
<a href='/tag/wenzi/' class='tagc1'>文字</a>
<a href='/tag/jishi/' class='tagc1'>即使</a>
<a href='/tag/daziran/' class='tagc1'>大自然</a>
<a href='/tag/fangshi/' class='tagc1'>方式</a>
<a href='/tag/yongheng/' class='tagc1'>永恒</a>
<a href='/tag/yingzi/' class='tagc1'>影子</a>
<a href='/tag/shujia/' class='tagc1'>暑假</a>
<a href='/tag/gushici/' class='tagc1'>古诗词</a>
<a href='/tag/sanxiaxiang/' class='tagc1'>三下乡</a>
<a href='/tag/luxun/' class='tagc1'>鲁迅</a>
<a href='/tag/shengdanjie/' class='tagc1'>圣诞节</a>
<a href='/tag/baobao/' class='tagc1'>宝宝</a>
<a href='/tag/dongzhi/' class='tagc1'>冬至</a>
<a href='/tag/tongnian/' class='tagc1'>童年</a>
<a href='/tag/pingfandeshijie/' class='tagc1'>平凡的世界</a>
<a href='/tag/jiaoshijie/' class='tagc1'>教师节</a>
<a href='/tag/jiejie/' class='tagc1'>姐姐</a>
<a href='/tag/baba/' class='tagc1'>爸爸</a>
<a href='/tag/xiongdi/' class='tagc1'>兄弟</a>
<a href='/tag/baoxi/' class='tagc1'>报喜</a>
<a href='/tag/xue/' class='tagc1'>雪</a>
<a href='/tag/ertongjie/' class='tagc1'>儿童节</a>
<a href='/tag/juhua/' class='tagc1'>菊花</a>
<a href='/tag/chuntian/' class='tagc1'>春天</a>
<a href='/tag/jianxin/' class='tagc1'>艰辛</a>
<a href='/tag/anquan/' class='tagc1'>安全</a>
<a href='/tag/qifu/' class='tagc1'>欺负</a>
<a href='/tag/liyanhong/' class='tagc1'>李彦宏</a>
<a href='/tag/changshi/' class='tagc1'>常识</a>
<a href='/tag/suzhi/' class='tagc1'>素质</a>
<a href='/tag/chuse/' class='tagc1'>出色</a>
<a href='/tag/zhiming/' class='tagc1'>致命</a>
<a href='/tag/yuanze/' class='tagc1'>原则</a>
<a href='/tag/lengjing/' class='tagc1'>冷静</a>
<a href='/tag/renzhengfei/' class='tagc1'>任正非</a>
<a href='/tag/chengjiu/' class='tagc1'>成就</a>
<a href='/tag/kaoyan/' class='tagc1'>考验</a>
<a href='/tag/zhuoyue/' class='tagc1'>卓越</a>
<a href='/tag/youya/' class='tagc1'>优雅</a>
<a href='/tag/yexin/' class='tagc1'>野心</a>
<a href='/tag/jiejue/' class='tagc1'>解决</a>
<a href='/tag/chenggongzhe/' class='tagc1'>成功者</a>
<a href='/tag/qiongyang/' class='tagc1'>穷养</a>
<a href='/tag/xiangchu/' class='tagc1'>相处</a>
<a href='/tag/mianshi/' class='tagc1'>面试</a>
<a href='/tag/chengshi/' class='tagc1'>诚实</a>
<a href='/tag/shuijue/' class='tagc1'>睡觉</a>
<a href='/tag/zanmei/' class='tagc1'>赞美</a>
<a href='/tag/wancheng/' class='tagc1'>完成</a>
<a href='/tag/qianli/' class='tagc1'>潜力</a>
<a href='/tag/zhishi/' class='tagc1'>知识</a>
<a href='/tag/jingzi/' class='tagc1'>镜子</a>
<a href='/tag/fuerdai/' class='tagc1'>富二代</a>
<a href='/tag/jingzheng/' class='tagc1'>竞争</a>
<a href='/tag/zhuding/' class='tagc1'>注定</a>
<a href='/tag/cuiruo/' class='tagc1'>脆弱</a>
<a href='/tag/manglu/' class='tagc1'>忙碌</a>
<a href='/tag/kefu/' class='tagc1'>克服</a>
<a href='/tag/yuanliang/' class='tagc1'>原谅</a>
<a href='/tag/ningjing/' class='tagc1'>宁静</a>
<a href='/tag/manzu/' class='tagc1'>满足</a>
<a href='/tag/jianding/' class='tagc1'>坚定</a>
<a href='/tag/jidu/' class='tagc1'>嫉妒</a>
<a href='/tag/duishou/' class='tagc1'>对手</a>
<a href='/tag/fengyu/' class='tagc1'>风雨</a>
<a href='/tag/yijiu/' class='tagc1'>依旧</a>
<a href='/tag/meitian/' class='tagc1'>每天</a>
<a href='/tag/yiran/' class='tagc1'>依然</a>
<a href='/tag/jieshi/' class='tagc1'>解释</a>
<a href='/tag/haohao/' class='tagc1'>好好</a>
<a href='/tag/yuanyi/' class='tagc1'>愿意</a>
<a href='/tag/tianxia/' class='tagc1'>天下</a>
<a href='/tag/guocheng/' class='tagc1'>过程</a>
<a href='/tag/haoyun/' class='tagc1'>好运</a>
<a href='/tag/yibeizi/' class='tagc1'>一辈子</a>
<a href='/tag/weiqu/' class='tagc1'>委屈</a>
<a href='/tag/guwu/' class='tagc1'>鼓舞</a>
<a href='/tag/goutong/' class='tagc1'>沟通</a>
<a href='/tag/guzhang/' class='tagc1'>鼓掌</a>
<a href='/tag/shashibiya/' class='tagc1'>莎士比亚</a>
<a href='/tag/fenshou/' class='tagc1'>分手</a>
<a href='/tag/xinli/' class='tagc1'>心理</a>
<a href='/tag/lvtu/' class='tagc1'>旅途</a>
<a href='/tag/zhangailing/' class='tagc1'>张爱玲</a>
<a href='/tag/kaoyan/' class='tagc1'>考研</a>
<a href='/tag/mingyanmingju/' class='tagc1'>名言名句</a>
<a href='/tag/anwei/' class='tagc1'>安慰</a>
<a href='/tag/liaotian/' class='tagc1'>聊天</a>
<a href='/tag/tuoyan/' class='tagc1'>拖延</a>
<a href='/tag/zhenli/' class='tagc1'>真理</a>
<a href='/tag/jiaobu/' class='tagc1'>脚步</a>
<a href='/tag/zaoan/' class='tagc1'>早安</a>
<a href='/tag/changjiu/' class='tagc1'>长久</a>
<a href='/tag/xinku/' class='tagc1'>辛苦</a>
<a href='/tag/fenjin/' class='tagc1'>奋进</a>
<a href='/tag/mosheng/' class='tagc1'>陌生</a>
<a href='/tag/chaojia/' class='tagc1'>吵架</a>
<a href='/tag/limao/' class='tagc1'>礼貌</a>
<a href='/tag/gudan/' class='tagc1'>孤单</a>
<a href='/tag/yongbao/' class='tagc1'>拥抱</a>
<a href='/tag/pingjing/' class='tagc1'>平静</a>
<a href='/tag/xinjing/' class='tagc1'>心境</a>
<a href='/tag/juewang/' class='tagc1'>绝望</a>
<a href='/tag/huangyan/' class='tagc1'>谎言</a>
<a href='/tag/tiaozhan/' class='tagc1'>挑战</a>
<a href='/tag/wanan/' class='tagc1'>晚安</a>
<a href='/tag/yujian/' class='tagc1'>遇见</a>
<a href='/tag/yongyou/' class='tagc1'>拥有</a>
<a href='/tag/haoren/' class='tagc1'>好人</a>
<a href='/tag/zongjiao/' class='tagc1'>宗教</a>
<a href='/tag/chufa/' class='tagc1'>出发</a>
<a href='/tag/yanjiang/' class='tagc1'>演讲</a>
<a href='/tag/qishi/' class='tagc1'>启示</a>
<a href='/tag/xiaoren/' class='tagc1'>小人</a>
<a href='/tag/beizi/' class='tagc1'>杯子</a>
<a href='/tag/wuqing/' class='tagc1'>无情</a>
<a href='/tag/tiantang/' class='tagc1'>天堂</a>
<a href='/tag/ziwei/' class='tagc1'>滋味</a>
<a href='/tag/guilv/' class='tagc1'>规律</a>
<a href='/tag/touru/' class='tagc1'>投入</a>
<a href='/tag/mianju/' class='tagc1'>面具</a>
<a href='/tag/beida/' class='tagc1'>北大</a>
<a href='/tag/beiai/' class='tagc1'>悲哀</a>
<a href='/tag/qiji/' class='tagc1'>奇迹</a>
<a href='/tag/xiezi/' class='tagc1'>鞋子</a>
<a href='/tag/huanying/' class='tagc1'>欢迎</a>
<a href='/tag/jingzhengli/' class='tagc1'>竞争力</a>
<a href='/tag/dianhua/' class='tagc1'>电话</a>
<a href='/tag/zuowei/' class='tagc1'>作为</a>
<a href='/tag/tiancai/' class='tagc1'>天才</a>
<a href='/tag/tuibian/' class='tagc1'>蜕变</a>
<a href='/tag/tuhao/' class='tagc1'>土豪</a>
<a href='/tag/biji/' class='tagc1'>笔记</a>
<a href='/tag/danao/' class='tagc1'>大脑</a>
<a href='/tag/cizhi/' class='tagc1'>辞职</a>
<a href='/tag/banjiaoshi/' class='tagc1'>绊脚石</a>
<a href='/tag/ouran/' class='tagc1'>偶然</a>
<a href='/tag/xingdongli/' class='tagc1'>行动力</a>
<a href='/tag/qiye/' class='tagc1'>企业</a>
<a href='/tag/daijia/' class='tagc1'>代价</a>
<a href='/tag/bazhang/' class='tagc1'>巴掌</a>
<a href='/tag/jinzhang/' class='tagc1'>紧张</a>
<a href='/tag/xiaolv/' class='tagc1'>效率</a>
<a href='/tag/gongzi/' class='tagc1'>工资</a>
<a href='/tag/hezuo/' class='tagc1'>合作</a>
<a href='/tag/zhudong/' class='tagc1'>主动</a>
<a href='/tag/qingchunlizhi/' class='tagc1'>青春励志</a>
<a href='/tag/zhongxin/' class='tagc1'>重新</a>
<a href='/tag/genyuan/' class='tagc1'>根源</a>
<a href='/tag/tuilu/' class='tagc1'>退路</a>
<a href='/tag/mogui/' class='tagc1'>魔鬼</a>
<a href='/tag/zizun/' class='tagc1'>自尊</a>
<a href='/tag/paoqi/' class='tagc1'>抛弃</a>
<a href='/tag/wuneng/' class='tagc1'>无能</a>
<a href='/tag/chenggonglizhi/' class='tagc1'>成功励志</a>
<a href='/tag/dizi/' class='tagc1'>弟子</a>
<a href='/tag/haha/' class='tagc1'>哈哈</a>
<a href='/tag/shuxue/' class='tagc1'>数学</a>
<a href='/tag/guanzhong/' class='tagc1'>观众</a>
<a href='/tag/huxi/' class='tagc1'>呼吸</a>
<a href='/tag/bixu/' class='tagc1'>必须</a>
<a href='/tag/zhansheng/' class='tagc1'>战胜</a>
<a href='/tag/wushu/' class='tagc1'>无数</a>
<a href='/tag/juhua/' class='tagc1'>句话</a>
<a href='/tag/zouxiang/' class='tagc1'>走向</a>
<a href='/tag/qipian/' class='tagc1'>欺骗</a>
<a href='/tag/yeye/' class='tagc1'>爷爷</a>
<a href='/tag/wuhui/' class='tagc1'>无悔</a>
<a href='/tag/zuotian/' class='tagc1'>昨天</a>
<a href='/tag/jiaoshi/' class='tagc1'>教室</a>
<a href='/tag/yuzhou/' class='tagc1'>宇宙</a>
<a href='/tag/xiangrikui/' class='tagc1'>向日葵</a>
<a href='/tag/lianxi/' class='tagc1'>联系</a>
<a href='/tag/biaoqian/' class='tagc1'>标签</a>
<a href='/tag/zhongzi/' class='tagc1'>种子</a>
<a href='/tag/huanjing/' class='tagc1'>环境</a>
<a href='/tag/lizhi/' class='tagc1'>理智</a>
<a href='/tag/suyang/' class='tagc1'>素养</a>
<a href='/tag/fugui/' class='tagc1'>富贵</a>
<a href='/tag/zhuanbian/' class='tagc1'>转变</a>
<a href='/tag/jiaoyin/' class='tagc1'>脚印</a>
<a href='/tag/kuanshu/' class='tagc1'>宽恕</a>
<a href='/tag/youmo/' class='tagc1'>幽默</a>
<a href='/tag/zhangfu/' class='tagc1'>丈夫</a>
<a href='/tag/zhuren/' class='tagc1'>主人</a>
<a href='/tag/nuli/' class='tagc1'>奴隶</a>
<a href='/tag/renshu/' class='tagc1'>认输</a>
<a href='/tag/shuji/' class='tagc1'>书籍</a>
<a href='/tag/manman/' class='tagc1'>慢慢</a>
<a href='/tag/meigui/' class='tagc1'>玫瑰</a>
<a href='/tag/chaoxiao/' class='tagc1'>嘲笑</a>
<a href='/tag/yiwai/' class='tagc1'>意外</a>
<a href='/tag/bangjia/' class='tagc1'>绑架</a>
<a href='/tag/renxing/' class='tagc1'>任性</a>
<a href='/tag/daode/' class='tagc1'>道德</a>
<a href='/tag/panbi/' class='tagc1'>攀比</a>
<a href='/tag/chifan/' class='tagc1'>吃饭</a>
<a href='/tag/diedao/' class='tagc1'>跌倒</a>
<a href='/tag/nvzi/' class='tagc1'>女子</a>
<a href='/tag/fazhan/' class='tagc1'>发展</a>
<a href='/tag/cunguan/' class='tagc1'>村官</a>
<a href='/tag/chulu/' class='tagc1'>出路</a>
<a href='/tag/kaidian/' class='tagc1'>开店</a>
<a href='/tag/shanji/' class='tagc1'>山鸡</a>
<a href='/tag/baiditan/' class='tagc1'>摆地摊</a>
<a href='/tag/qifa/' class='tagc1'>启发</a>
<a href='/tag/putao/' class='tagc1'>葡萄</a>
<a href='/tag/tuzi/' class='tagc1'>兔子</a>
<a href='/tag/tezhi/' class='tagc1'>特质</a>
<a href='/tag/heizhu/' class='tagc1'>黑猪</a>
<a href='/tag/qi/' class='tagc1'>乞丐</a>
<a href='/tag/baoli/' class='tagc1'>暴利</a>
<a href='/tag/nongmin/' class='tagc1'>农民</a>
<a href='/tag/shucai/' class='tagc1'>蔬菜</a>
<a href='/tag/mimi/' class='tagc1'>秘密</a>
<a href='/tag/jueze/' class='tagc1'>抉择</a>
<a href='/tag/panshiyi/' class='tagc1'>潘石屹</a>
<a href='/tag/funengliang/' class='tagc1'>负能量</a>
<a href='/tag/quyue/' class='tagc1'>取悦</a>
<a href='/tag/zhiliang/' class='tagc1'>质量</a>
<a href='/tag/beijing/' class='tagc1'>北京</a>
<a href='/tag/zhouhong/' class='tagc1'>周鸿祎</a>
<a href='/tag/wuliao/' class='tagc1'>无聊</a>
<a href='/tag/koumen/' class='tagc1'>抠门</a>
<a href='/tag/zengguofan/' class='tagc1'>曾国藩</a>
<a href='/tag/yuanli/' class='tagc1'>远离</a>
<a href='/tag/tonghua/' class='tagc1'>童话</a>
<a href='/tag/biaozhun/' class='tagc1'>标准</a>
<a href='/tag/miren/' class='tagc1'>迷人</a>
<a href='/tag/qingxing/' class='tagc1'>清醒</a>
<a href='/tag/likaifu/' class='tagc1'>李开复</a>
<a href='/tag/chugui/' class='tagc1'>出轨</a>
<a href='/tag/gongwuyuan/' class='tagc1'>公务员</a>
<a href='/tag/leijun/' class='tagc1'>雷军</a>
<a href='/tag/zhizhe/' class='tagc1'>智者</a>
<a href='/tag/wangluo/' class='tagc1'>网络</a>
<a href='/tag/wunai/' class='tagc1'>无奈</a>
<a href='/tag/dinglei/' class='tagc1'>丁磊</a>
<a href='/tag/jinqu/' class='tagc1'>进取</a>
<a href='/tag/ditou/' class='tagc1'>低头</a>
<a href='/tag/daqi/' class='tagc1'>打气</a>
<a href='/tag/sifa/' class='tagc1'>司法</a>
<a href='/tag/shengnver/' class='tagc1'>生女儿</a>
<a href='/tag/deyu/' class='tagc1'>德育</a>
<a href='/tag/yinle/' class='tagc1'>音乐</a>
<a href='/tag/guoqingjie/' class='tagc1'>国庆节</a>
<a href='/tag/yiyuan/' class='tagc1'>医院</a>
<a href='/tag/zhongqiu/' class='tagc1'>中秋</a>
<a href='/tag/guwen/' class='tagc1'>古文</a>
<a href='/tag/guxiang/' class='tagc1'>故乡</a>
<a href='/tag/shiju/' class='tagc1'>诗句</a>
<a href='/tag/renshi/' class='tagc1'>人事</a>
<a href='/tag/qinghua/' class='tagc1'>情话</a>
<a href='/tag/jingse/' class='tagc1'>景色</a>
<a href='/tag/aiyinsitan/' class='tagc1'>爱因斯坦</a>
<a href='/tag/hushijie/' class='tagc1'>护士节</a>
<a href='/tag/tuanyuan/' class='tagc1'>团员</a>
<a href='/tag/yingxiao/' class='tagc1'>营销</a>
<a href='/tag/yuanfang/' class='tagc1'>远方</a>
<a href='/tag/bangongshi/' class='tagc1'>办公室</a>
<a href='/tag/manyue/' class='tagc1'>满月</a>
<a href='/tag/jinian/' class='tagc1'>鸡年</a>
<a href='/tag/nvyou/' class='tagc1'>女友</a>
<a href='/tag/huiji/' class='tagc1'>会计</a>
<a href='/tag/zhufuduanxin/' class='tagc1'>祝福短信</a>
<a href='/tag/qingwa/' class='tagc1'>青蛙</a>
<a href='/tag/qiutian/' class='tagc1'>秋天</a>
<a href='/tag/gongsi/' class='tagc1'>公司</a>
<a href='/tag/daoqian/' class='tagc1'>道歉</a>
<a href='/tag/jianjunjie/' class='tagc1'>建军节</a>
<a href='/tag/wanwu/' class='tagc1'>万物</a>
<a href='/tag/dashu/' class='tagc1'>大树</a>
<a href='/tag/yougan/' class='tagc1'>有感</a>
<a href='/tag/yinsu/' class='tagc1'>因素</a>
<a href='/tag/shitou/' class='tagc1'>石头</a>
<a href='/tag/shiying/' class='tagc1'>适应</a>
<a href='/tag/kuajiang/' class='tagc1'>夸奖</a>
<a href='/tag/naixin/' class='tagc1'>耐心</a>
<a href='/tag/weida/' class='tagc1'>伟大</a>
<a href='/tag/zhangxiao/' class='tagc1'>张小娴</a>
<a href='/tag/kaolv/' class='tagc1'>考虑</a>
<a href='/tag/neihan/' class='tagc1'>内涵</a>
<a href='/tag/ruguo/' class='tagc1'>如果</a>
<a href='/tag/zixinxin/' class='tagc1'>自信心</a>
<a href='/tag/yanse/' class='tagc1'>颜色</a>
<a href='/tag/xinji/' class='tagc1'>心机</a>
<a href='/tag/jijie/' class='tagc1'>季节</a>
<a href='/tag/hanhan/' class='tagc1'>韩寒</a>
<a href='/tag/zuoshi/' class='tagc1'>做事</a>
<a href='/tag/lizhigeyan/' class='tagc1'>励志格言</a>
<a href='/tag/guimi/' class='tagc1'>闺蜜</a>
<a href='/tag/zhuanye/' class='tagc1'>专业</a>
<a href='/tag/fencun/' class='tagc1'>分寸</a>
<a href='/tag/canku/' class='tagc1'>残酷</a>
<a href='/tag/jiaoyou/' class='tagc1'>交友</a>
<a href='/tag/liu/' class='tagc1'>刘墉</a>
<a href='/tag/xiangshou/' class='tagc1'>享受</a>
<a href='/tag/qinlao/' class='tagc1'>勤劳</a>
<a href='/tag/taobi/' class='tagc1'>逃避</a>
<a href='/tag/fuyan/' class='tagc1'>敷衍</a>
<a href='/tag/laonian/' class='tagc1'>老年</a>
<a href='/tag/beiwei/' class='tagc1'>卑微</a>
<a href='/tag/pinpai/' class='tagc1'>品牌</a>
<a href='/tag/jianglai/' class='tagc1'>将来</a>
<a href='/tag/zainan/' class='tagc1'>灾难</a>
<a href='/tag/zunyan/' class='tagc1'>尊严</a>
<a href='/tag/shanghai/' class='tagc1'>伤害</a>
<a href='/tag/qian/' class='tagc1'>钱</a>
<a href='/tag/chuxin/' class='tagc1'>初心</a>
<a href='/tag/weidao/' class='tagc1'>味道</a>
<a href='/tag/bijiao/' class='tagc1'>比较</a>
<a href='/tag/huofa/' class='tagc1'>活法</a>
<a href='/tag/zuihao/' class='tagc1'>最好</a>
<a href='/tag/lengnuan/' class='tagc1'>冷暖</a>
<a href='/tag/xiangnian/' class='tagc1'>想念</a>
<a href='/tag/juejing/' class='tagc1'>绝境</a>
<a href='/tag/jizhu/' class='tagc1'>记住</a>
<a href='/tag/qizi/' class='tagc1'>妻子</a>
<a href='/tag/yundong/' class='tagc1'>运动</a>
<a href='/tag/gaobie/' class='tagc1'>告别</a>
<a href='/tag/gaogui/' class='tagc1'>高贵</a>
<a href='/tag/zhenshi/' class='tagc1'>真实</a>
<a href='/tag/hongchen/' class='tagc1'>红尘</a>
<a href='/tag/canren/' class='tagc1'>残忍</a>
<a href='/tag/dixian/' class='tagc1'>底线</a>
<a href='/tag/xiushen/' class='tagc1'>修身</a>
<a href='/tag/ai/' class='tagc1'>爱</a>
<a href='/tag/qinren/' class='tagc1'>亲人</a>
<a href='/tag/huaxia/' class='tagc1'>华夏</a>
<a href='/tag/yuanchuang/' class='tagc1'>原创</a>
<a href='/tag/lanqiu/' class='tagc1'>篮球</a>
<a href='/tag/xiangqian/' class='tagc1'>向前</a>
<a href='/tag/zisha/' class='tagc1'>自杀</a>
<a href='/tag/fangfa/' class='tagc1'>方法</a>
<a href='/tag/laogong/' class='tagc1'>老公</a>
<a href='/tag/zhongcheng/' class='tagc1'>忠诚</a>
<a href='/tag/jieduan/' class='tagc1'>阶段</a>
<a href='/tag/zhuanzai/' class='tagc1'>转载</a>
<a href='/tag/junzi/' class='tagc1'>君子</a>
<a href='/tag/lishi/' class='tagc1'>历史</a>
<a href='/tag/shiwu/' class='tagc1'>事物</a>
<a href='/tag/sanwen/' class='tagc1'>散文</a>
<a href='/tag/tangseng/' class='tagc1'>唐僧</a>
<a href='/tag/mingyue/' class='tagc1'>明月</a>
<a href='/tag/riji/' class='tagc1'>日记</a>
<a href='/tag/wanshang/' class='tagc1'>晚上</a>
<a href='/tag/shiren/' class='tagc1'>世人</a>
<a href='/tag/shengchang/' class='tagc1'>生长</a>
<a href='/tag/libai/' class='tagc1'>李白</a>
<a href='/tag/xinlai/' class='tagc1'>信赖</a>
<a href='/tag/mingbai/' class='tagc1'>明白</a>
<a href='/tag/nuanxin/' class='tagc1'>暖心</a>
<a href='/tag/kuanghuan/' class='tagc1'>狂欢</a>
<a href='/tag/huihuang/' class='tagc1'>辉煌</a>
<a href='/tag/canlan/' class='tagc1'>灿烂</a>
<a href='/tag/fangshou/' class='tagc1'>放手</a>
<a href='/tag/yiwang/' class='tagc1'>遗忘</a>
<a href='/tag/jietuo/' class='tagc1'>解脱</a>
<a href='/tag/laopo/' class='tagc1'>老婆</a>
<a href='/tag/xiaohua/' class='tagc1'>笑话</a>
<a href='/tag/wuzhi/' class='tagc1'>无知</a>
<a href='/tag/qianxing/' class='tagc1'>前行</a>
<a href='/tag/liulang/' class='tagc1'>流浪</a>
<a href='/tag/zhenxin/' class='tagc1'>真心</a>
<a href='/tag/zaihu/' class='tagc1'>在乎</a>
<a href='/tag/siwang/' class='tagc1'>死亡</a>
<a href='/tag/zaijian/' class='tagc1'>再见</a>
<a href='/tag/fanhua/' class='tagc1'>繁华</a>
<a href='/tag/meide/' class='tagc1'>美德</a>
<a href='/tag/jinshen/' class='tagc1'>谨慎</a>
<a href='/tag/huaijiu/' class='tagc1'>怀旧</a>
<a href='/tag/danding/' class='tagc1'>淡定</a>
<a href='/tag/jiaren/' class='tagc1'>家人</a>
<a href='/tag/lengmo/' class='tagc1'>冷漠</a>
<a href='/tag/tianmi/' class='tagc1'>甜蜜</a>
<a href='/tag/tiaojian/' class='tagc1'>条件</a>
<a href='/tag/changda/' class='tagc1'>长大</a>
<a href='/tag/duidai/' class='tagc1'>对待</a>
<a href='/tag/chengshou/' class='tagc1'>承受</a>
<a href='/tag/qingshi/' class='tagc1'>轻视</a>
<a href='/tag/libie/' class='tagc1'>离别</a>
<a href='/tag/qinqing/' class='tagc1'>亲情</a>
<a href='/tag/xinxi/' class='tagc1'>欣喜</a>
<a href='/tag/wananxinyu/' class='tagc1'>晚安心语</a>
<a href='/tag/congrong/' class='tagc1'>从容</a>
<a href='/tag/nuoruo/' class='tagc1'>懦弱</a>
<a href='/tag/ruanruo/' class='tagc1'>软弱</a>
<a href='/tag/huanxing/' class='tagc1'>唤醒</a>
<a href='/tag/jianyi/' class='tagc1'>坚毅</a>
<a href='/tag/pinfu/' class='tagc1'>贫富</a>
<a href='/tag/tanran/' class='tagc1'>坦然</a>
<a href='/tag/jingli/' class='tagc1'>精力</a>
<a href='/tag/huanghun/' class='tagc1'>黄昏</a>
<a href='/tag/anxin/' class='tagc1'>安心</a>
<a href='/tag/qianbei/' class='tagc1'>谦卑</a>
<a href='/tag/ziwo/' class='tagc1'>自我</a>
<a href='/tag/youmei/' class='tagc1'>优美</a>
<a href='/tag/tiexin/' class='tagc1'>贴心</a>
<a href='/tag/shuxi/' class='tagc1'>熟悉</a>
<a href='/tag/houguo/' class='tagc1'>后果</a>
<a href='/tag/xiaohao/' class='tagc1'>消耗</a>
<a href='/tag/jieshu/' class='tagc1'>结束</a>
<a href='/tag/neixiang/' class='tagc1'>内向</a>
<a href='/tag/jiaoqing/' class='tagc1'>交情</a>
<a href='/tag/luren/' class='tagc1'>路人</a>
<a href='/tag/quzhe/' class='tagc1'>曲折</a>
<a href='/tag/zizhili/' class='tagc1'>自制力</a>
<a href='/tag/shangxin/' class='tagc1'>伤心</a>
<a href='/tag/yilai/' class='tagc1'>依赖</a>
<a href='/tag/dise/' class='tagc1'>底色</a>
<a href='/tag/peiban/' class='tagc1'>陪伴</a>
<a href='/tag/_178/' class='tagc1'>彷徨</a>
<a href='/tag/huairen/' class='tagc1'>坏人</a>
<a href='/tag/nuoyan/' class='tagc1'>诺言</a>
<a href='/tag/chuanghu/' class='tagc1'>窗户</a>
<a href='/tag/yin/' class='tagc1'>阴霾</a>
<a href='/tag/shangtong/' class='tagc1'>伤痛</a>
<a href='/tag/yanzhi/' class='tagc1'>颜值</a>
<a href='/tag/wenxinwukui/' class='tagc1'>问心无愧</a>
<a href='/tag/mingmei/' class='tagc1'>明媚</a>
<a href='/tag/anlian/' class='tagc1'>暗恋</a>
<a href='/tag/zhinian/' class='tagc1'>执念</a>
<a href='/tag/kepa/' class='tagc1'>可怕</a>
<a href='/tag/wuzhi/' class='tagc1'>物质</a>
<a href='/tag/huochai/' class='tagc1'>火柴</a>
<a href='/tag/guize/' class='tagc1'>规则</a>
<a href='/tag/jiaoji/' class='tagc1'>交际</a>
<a href='/tag/chuchou/' class='tagc1'>出丑</a>
<a href='/tag/guanmian/' class='tagc1'>冠冕</a>
<a href='/tag/benqian/' class='tagc1'>本钱</a>
<a href='/tag/tianzhen/' class='tagc1'>天真</a>
<a href='/tag/baofu/' class='tagc1'>包袱</a>
<a href='/tag/toujiang/' class='tagc1'>投降</a>
<a href='/tag/lequ/' class='tagc1'>乐趣</a>
<a href='/tag/nvshen/' class='tagc1'>女神</a>
<a href='/tag/liyi/' class='tagc1'>礼仪</a>
<a href='/tag/tianxing/' class='tagc1'>天性</a>
<a href='/tag/xianzhuang/' class='tagc1'>现状</a>
<a href='/tag/guoren/' class='tagc1'>国人</a>
<a href='/tag/chongzi/' class='tagc1'>虫子</a>
<a href='/tag/qi/' class='tagc1'>崛起</a>
<a href='/tag/yuanwang/' class='tagc1'>愿望</a>
<a href='/tag/weizhuang/' class='tagc1'>伪装</a>
<a href='/tag/cunmin/' class='tagc1'>村民</a>
<a href='/tag/shenqi/' class='tagc1'>神奇</a>
<a href='/tag/mangren/' class='tagc1'>盲人</a>
<a href='/tag/xiegei/' class='tagc1'>写给</a>
<a href='/tag/shinian/' class='tagc1'>十年</a>
<a href='/tag/bingqie/' class='tagc1'>并且</a>
<a href='/tag/xuehua/' class='tagc1'>雪花</a>
<a href='/tag/tianyanmiyu/' class='tagc1'>甜言蜜语</a>
<a href='/tag/jijing/' class='tagc1'>寂静</a>
<a href='/tag/duanxin/' class='tagc1'>短信</a>
<a href='/tag/mayi/' class='tagc1'>蚂蚁</a>
<a href='/tag/youyong/' class='tagc1'>游泳</a>
<a href='/tag/shangke/' class='tagc1'>上课</a>
<a href='/tag/kaichu/' class='tagc1'>开出</a>
<a href='/tag/baifen/' class='tagc1'>百分</a>
<a href='/tag/kuaiqian/' class='tagc1'>块钱</a>
<a href='/tag/liuyue/' class='tagc1'>六月</a>
<a href='/tag/tianshang/' class='tagc1'>天上</a>
<a href='/tag/boshi/' class='tagc1'>博士</a>
<a href='/tag/fangfo/' class='tagc1'>仿佛</a>
<a href='/tag/bangmang/' class='tagc1'>帮忙</a>
<a href='/tag/dangchu/' class='tagc1'>当初</a>
<a href='/tag/changchang/' class='tagc1'>常常</a>
<a href='/tag/renqun/' class='tagc1'>人群</a>
<a href='/tag/gaosu/' class='tagc1'>告诉</a>
<a href='/tag/shier/' class='tagc1'>时而</a>
<a href='/tag/benshu/' class='tagc1'>本书</a>
<a href='/tag/zhandou/' class='tagc1'>战斗</a>
<a href='/tag/wuren/' class='tagc1'>无人</a>
<a href='/tag/majiang/' class='tagc1'>麻将</a>
<a href='/tag/zaiye/' class='tagc1'>再也</a>
<a href='/tag/shiqu/' class='tagc1'>逝去</a>
<a href='/tag/baogui/' class='tagc1'>宝贵</a>
<a href='/tag/huodong/' class='tagc1'>活动</a>
<a href='/tag/shengsi/' class='tagc1'>生死</a>
</div>
</div>
<div class="copyright clear">Copyright © 2017-2018 tiantianlizhi.cn All Rights Reserved. 冀ICP备14004780号-3 <script src="https://s19.cnzz.com/z_stat.php?id=1271312128&web_id=1271312128" language="JavaScript"></script>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript">function qqemail(){ childWindow =window.open('http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=44824482@qq.com','newwindow','height=450,width=800,top=150,left=280,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');}</script>
| 44.804785
| 285
| 0.622605
|
bb8abfe3c30c15e1b933bea7bb12d8e14faff55a
| 468
|
cs
|
C#
|
src/UCenterApi.AspNetCore/UCenterApiMiddlewareExtensions.cs
|
yiyungent/UCenterApi
|
462c8191c23c598b607b0caf661026bd68c9861c
|
[
"MIT"
] | 1
|
2020-09-10T07:20:46.000Z
|
2020-09-10T07:20:46.000Z
|
src/UCenterApi.AspNetCore/UCenterApiMiddlewareExtensions.cs
|
yiyungent/UCenterApi
|
462c8191c23c598b607b0caf661026bd68c9861c
|
[
"MIT"
] | null | null | null |
src/UCenterApi.AspNetCore/UCenterApiMiddlewareExtensions.cs
|
yiyungent/UCenterApi
|
462c8191c23c598b607b0caf661026bd68c9861c
|
[
"MIT"
] | 1
|
2020-09-10T07:20:47.000Z
|
2020-09-10T07:20:47.000Z
|
using System;
using Microsoft.AspNetCore.Builder;
namespace UCenterApi.AspNetCore
{
public static class UCenterApiMiddlewareExtensions
{
public static IApplicationBuilder UseUCenterApi(this IApplicationBuilder builder)
{
builder.MapWhen(m => m.Request.Path.StartsWithSegments("/api/UCenterApi", StringComparison.OrdinalIgnoreCase), app => app.UseMiddleware<UCenterApiMiddleware>());
return builder;
}
}
}
| 29.25
| 173
| 0.715812
|
a7b4d3026a0ec1c72178b5be019575f002d99925
| 15,740
|
css
|
CSS
|
Front/css/modaal.css
|
arthurgregoryo/RPGzone
|
b027b3bc9d843b477c208333418f582dd471ac60
|
[
"MIT"
] | 1
|
2020-08-07T14:19:10.000Z
|
2020-08-07T14:19:10.000Z
|
Front/css/modaal.css
|
arthurgregoryo/RPGzone
|
b027b3bc9d843b477c208333418f582dd471ac60
|
[
"MIT"
] | 1
|
2020-04-12T15:44:03.000Z
|
2020-04-12T15:44:03.000Z
|
Front/css/modaal.css
|
arthurgregoryo/RPGzone
|
b027b3bc9d843b477c208333418f582dd471ac60
|
[
"MIT"
] | 2
|
2020-04-12T02:44:45.000Z
|
2020-05-05T12:02:23.000Z
|
/*!
Modaal - accessible modals - v0.4.4
by Humaan, for all humans.
http://humaan.com
*/
.modaal-noscroll {
overflow: hidden;
}
.modaal-accessible-hide {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
padding: 0 !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
overflow: hidden;
}
.modaal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
opacity: 0;
background: rgba(0, 0, 0,.5);
backdrop-filter: blur(8px);
}
.modaal-wrapper {
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
overflow: auto;
opacity: 1;
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.modaal-wrapper * {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-backface-visibility: hidden;
}
.modaal-wrapper .modaal-close {
border: none;
background: transparent;
padding: 0;
-webkit-appearance: none;
}
.modaal-wrapper.modaal-start_none {
display: none;
opacity: 1;
}
.modaal-wrapper.modaal-start_fade {
opacity: 0;
}
.modaal-wrapper *[tabindex="0"] {
outline: none !important;
}
.modaal-wrapper.modaal-fullscreen {
overflow: hidden;
}
.modaal-outer-wrapper {
display: table;
position: relative;
width: 100%;
height: 100%;
}
.modaal-fullscreen .modaal-outer-wrapper {
display: block;
}
.modaal-inner-wrapper {
display: table-cell;
width: 100%;
height: 100%;
position: relative;
vertical-align: middle;
text-align: center;
padding: 80px 25px;
}
.modaal-fullscreen .modaal-inner-wrapper {
padding: 0;
display: block;
vertical-align: top;
}
.modaal-container {
position: relative;
display: inline-block;
width: 100%;
margin: auto;
text-align: left;
color: #000;
max-width: 1000px;
border-radius: 0px;
background: #fff;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
cursor: auto;
border-radius: 8px;
}
.modaal-container.is_loading {
height: 100px;
width: 100px;
overflow: hidden;
}
.modaal-fullscreen .modaal-container {
max-width: none;
height: 100%;
overflow: auto;
}
.modaal-close {
position: fixed;
right: 20px;
top: 20px;
color: #fff;
cursor: pointer;
opacity: 1;
width: 50px;
height: 50px;
background: rgba(0, 0, 0, 0);
border-radius: 100%;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.modaal-close:focus,
.modaal-close:hover {
outline: none;
background: #fff;
}
.modaal-close:focus:before,
.modaal-close:focus:after,
.modaal-close:hover:before,
.modaal-close:hover:after {
background: #b93d0c;
}
.modaal-close span {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
padding: 0 !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
overflow: hidden;
}
.modaal-close:before,
.modaal-close:after {
display: block;
content: " ";
position: absolute;
top: 14px;
left: 23px;
width: 4px;
height: 22px;
border-radius: 4px;
background: #fff;
-webkit-transition: background 0.2s ease-in-out;
transition: background 0.2s ease-in-out;
}
.modaal-close:before {
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.modaal-close:after {
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.modaal-fullscreen .modaal-close {
background: #afb7bc;
right: 10px;
top: 10px;
}
.modaal-content-container {
padding: 30px;
}
.modaal-confirm-wrap {
padding: 30px 0 0;
text-align: center;
font-size: 0;
}
.modaal-confirm-btn {
font-size: 14px;
display: inline-block;
margin: 0 10px;
vertical-align: middle;
cursor: pointer;
border: none;
background: transparent;
}
.modaal-confirm-btn.modaal-ok {
padding: 10px 15px;
color: #fff;
background: #555;
border-radius: 3px;
-webkit-transition: background 0.2s ease-in-out;
transition: background 0.2s ease-in-out;
}
.modaal-confirm-btn.modaal-ok:hover {
background: #2f2f2f;
}
.modaal-confirm-btn.modaal-cancel {
text-decoration: underline;
}
.modaal-confirm-btn.modaal-cancel:hover {
text-decoration: none;
color: #2f2f2f;
}
.modaal-instagram .modaal-container {
width: auto;
background: transparent;
box-shadow: none !important;
}
.modaal-instagram .modaal-content-container {
padding: 0;
background: transparent;
}
.modaal-instagram .modaal-content-container > blockquote {
width: 1px !important;
height: 1px !important;
opacity: 0 !important;
}
.modaal-instagram iframe {
opacity: 0;
margin: -6px !important;
border-radius: 0 !important;
width: 1000px !important;
max-width: 800px !important;
box-shadow: none !important;
-webkit-animation: instaReveal 1s linear forwards;
animation: instaReveal 1s linear forwards;
}
.modaal-image .modaal-inner-wrapper {
padding-left: 140px;
padding-right: 140px;
}
.modaal-image .modaal-container {
width: auto;
max-width: 100%;
}
.modaal-gallery-wrap {
position: relative;
color: #fff;
}
.modaal-gallery-item {
display: none;
}
.modaal-gallery-item img {
display: block;
}
.modaal-gallery-item.is_active {
display: block;
}
.modaal-gallery-label {
position: absolute;
left: 0;
width: 100%;
margin: 20px 0 0;
font-size: 18px;
text-align: center;
color: #fff;
}
.modaal-gallery-label:focus {
outline: none;
}
.modaal-gallery-control {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
opacity: 1;
cursor: pointer;
color: #fff;
width: 50px;
height: 50px;
background: rgba(0, 0, 0, 0);
border: none;
border-radius: 100%;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.modaal-gallery-control.is_hidden {
opacity: 0;
cursor: default;
}
.modaal-gallery-control:focus,
.modaal-gallery-control:hover {
outline: none;
background: #fff;
}
.modaal-gallery-control:focus:before,
.modaal-gallery-control:focus:after,
.modaal-gallery-control:hover:before,
.modaal-gallery-control:hover:after {
background: #afb7bc;
}
.modaal-gallery-control span {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
padding: 0 !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
overflow: hidden;
}
.modaal-gallery-control:before,
.modaal-gallery-control:after {
display: block;
content: " ";
position: absolute;
top: 16px;
left: 25px;
width: 4px;
height: 18px;
border-radius: 4px;
background: #fff;
-webkit-transition: background 0.2s ease-in-out;
transition: background 0.2s ease-in-out;
}
.modaal-gallery-control:before {
margin: -5px 0 0;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.modaal-gallery-control:after {
margin: 5px 0 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.modaal-gallery-next-inner {
left: 100%;
margin-left: 40px;
}
.modaal-gallery-next-outer {
right: 45px;
}
.modaal-gallery-prev:before,
.modaal-gallery-prev:after {
left: 22px;
}
.modaal-gallery-prev:before {
margin: 5px 0 0;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.modaal-gallery-prev:after {
margin: -5px 0 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.modaal-gallery-prev-inner {
right: 100%;
margin-right: 40px;
}
.modaal-gallery-prev-outer {
left: 45px;
}
.modaal-video-wrap {
margin: auto 50px;
position: relative;
}
.modaal-video-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
background: #000;
max-width: 1300px;
margin-left: auto;
margin-right: auto;
}
.modaal-video-container iframe,
.modaal-video-container object,
.modaal-video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.modaal-iframe .modaal-content {
width: 100%;
height: 100%;
}
.modaal-iframe-elem {
width: 100%;
height: 100%;
display: block;
}
.modaal-loading-spinner {
background: none;
position: absolute;
width: 200px;
height: 200px;
top: 50%;
left: 50%;
margin: -100px 0 0 -100px;
-webkit-transform: scale(0.25);
-ms-transform: scale(0.25);
transform: scale(0.25);
}
.modaal-loading-spinner > div {
width: 24px;
height: 24px;
margin-left: 4px;
margin-top: 4px;
position: absolute;
}
.modaal-loading-spinner > div > div {
width: 100%;
height: 100%;
border-radius: 15px;
background: #fff;
}
.modaal-loading-spinner > div:nth-of-type(1) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
.modaal-loading-spinner > div:nth-of-type(2) > div,
.modaal-loading-spinner > div:nth-of-type(3) > div {
-ms-animation: modaal-loading-spinner 1s linear infinite;
-moz-animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation: modaal-loading-spinner 1s linear infinite;
-o-animation: modaal-loading-spinner 1s linear infinite;
}
.modaal-loading-spinner > div:nth-of-type(1) {
-ms-transform: translate(84px, 84px) rotate(45deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(45deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(45deg) translate(70px, 0);
}
.modaal-loading-spinner > div:nth-of-type(2) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: .12s;
animation-delay: .12s;
}
.modaal-loading-spinner > div:nth-of-type(2) {
-ms-transform: translate(84px, 84px) rotate(90deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(90deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(90deg) translate(70px, 0);
}
.modaal-loading-spinner > div:nth-of-type(3) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: .25s;
animation-delay: .25s;
}
.modaal-loading-spinner > div:nth-of-type(4) > div,
.modaal-loading-spinner > div:nth-of-type(5) > div {
-ms-animation: modaal-loading-spinner 1s linear infinite;
-moz-animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation: modaal-loading-spinner 1s linear infinite;
-o-animation: modaal-loading-spinner 1s linear infinite;
}
.modaal-loading-spinner > div:nth-of-type(3) {
-ms-transform: translate(84px, 84px) rotate(135deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(135deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(135deg) translate(70px, 0);
}
.modaal-loading-spinner > div:nth-of-type(4) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: .37s;
animation-delay: .37s;
}
.modaal-loading-spinner > div:nth-of-type(4) {
-ms-transform: translate(84px, 84px) rotate(180deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(180deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(180deg) translate(70px, 0);
}
.modaal-loading-spinner > div:nth-of-type(5) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: .5s;
animation-delay: .5s;
}
.modaal-loading-spinner > div:nth-of-type(6) > div,
.modaal-loading-spinner > div:nth-of-type(7) > div {
-ms-animation: modaal-loading-spinner 1s linear infinite;
-moz-animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation: modaal-loading-spinner 1s linear infinite;
-o-animation: modaal-loading-spinner 1s linear infinite;
}
.modaal-loading-spinner > div:nth-of-type(5) {
-ms-transform: translate(84px, 84px) rotate(225deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(225deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(225deg) translate(70px, 0);
}
.modaal-loading-spinner > div:nth-of-type(6) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: .62s;
animation-delay: .62s;
}
.modaal-loading-spinner > div:nth-of-type(6) {
-ms-transform: translate(84px, 84px) rotate(270deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(270deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(270deg) translate(70px, 0);
}
.modaal-loading-spinner > div:nth-of-type(7) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: .75s;
animation-delay: .75s;
}
.modaal-loading-spinner > div:nth-of-type(7) {
-ms-transform: translate(84px, 84px) rotate(315deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(315deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(315deg) translate(70px, 0);
}
.modaal-loading-spinner > div:nth-of-type(8) > div {
-webkit-animation: modaal-loading-spinner 1s linear infinite;
animation: modaal-loading-spinner 1s linear infinite;
-webkit-animation-delay: .87s;
animation-delay: .87s;
}
.modaal-loading-spinner > div:nth-of-type(8) {
-ms-transform: translate(84px, 84px) rotate(360deg) translate(70px, 0);
-webkit-transform: translate(84px, 84px) rotate(360deg) translate(70px, 0);
transform: translate(84px, 84px) rotate(360deg) translate(70px, 0);
}
@media only screen and (min-width: 1400px) {
.modaal-video-container {
padding-bottom: 0;
height: 731px;
}
}
@media only screen and (max-width: 1140px) {
.modaal-image .modaal-inner-wrapper {
padding-left: 25px;
padding-right: 25px;
}
.modaal-gallery-control {
top: auto;
bottom: 20px;
-webkit-transform: none;
-ms-transform: none;
transform: none;
background: rgba(0, 0, 0, 0.7);
}
.modaal-gallery-control:before,
.modaal-gallery-control:after {
background: #fff;
}
.modaal-gallery-next {
left: auto;
right: 20px;
}
.modaal-gallery-prev {
left: 20px;
right: auto;
}
}
@media screen and (max-width: 900px) {
.modaal-instagram iframe {
width: 500px !important;
}
}
@media only screen and (max-width: 600px) {
.modaal-instagram iframe {
width: 280px !important;
}
}
@media screen and (max-height: 1100px) {
.modaal-instagram iframe {
width: 700px !important;
}
}
@media screen and (max-height: 1000px) {
.modaal-inner-wrapper {
padding-top: 60px;
padding-bottom: 60px;
}
.modaal-instagram iframe {
width: 600px !important;
}
}
@media screen and (max-height: 900px) {
.modaal-instagram iframe {
width: 500px !important;
}
.modaal-video-container {
max-width: 900px;
max-height: 510px;
}
}
@media only screen and (max-height: 820px) {
.modaal-gallery-label {
display: none;
}
}
@keyframes instaReveal {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes instaReveal {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes modaal-loading-spinner {
0% {
opacity: 1;
-ms-transform: scale(1.5);
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
opacity: .1;
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes modaal-loading-spinner {
0% {
opacity: 1;
-ms-transform: scale(1.5);
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
opacity: .1;
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
}
| 20.025445
| 76
| 0.706163
|
7978e10b6befa838b9bf1d54a2156dde05c0ca56
| 2,006
|
php
|
PHP
|
application/views/usuarios/usuarios_actualizar_clave_form.php
|
jhonnycgarcia/proyecto_cuc
|
ed78ec7ebb44458f6b95a196536db59e9250c77a
|
[
"MIT"
] | null | null | null |
application/views/usuarios/usuarios_actualizar_clave_form.php
|
jhonnycgarcia/proyecto_cuc
|
ed78ec7ebb44458f6b95a196536db59e9250c77a
|
[
"MIT"
] | null | null | null |
application/views/usuarios/usuarios_actualizar_clave_form.php
|
jhonnycgarcia/proyecto_cuc
|
ed78ec7ebb44458f6b95a196536db59e9250c77a
|
[
"MIT"
] | null | null | null |
<div class="box box-default">
<div class="box-body"> <!-- Box-Body -->
<?php
echo form_open($form_action
,array(
'id' => 'form_usuarios'
,'class' => 'form-horizontal'
)
);
?>
<fieldset>
<div class="form-group" id="c_clave">
<label for="clave_actual" class="control-label col-md-2">Clave Actual:</label>
<div class="col-md-10">
<?=
form_password('clave_actual',$clave_actual,array('class'=>'form-control','placeholder'=>'Clave Actual:'))
?>
<?= form_error('clave_actual');?>
</div>
</div>
<div class="form-group" id="c_clave">
<label for="clave_nueva" class="control-label col-md-2">Clave Nueva:</label>
<div class="col-md-10">
<?=
form_password('clave_nueva',$clave_nueva,array('class'=>'form-control','placeholder'=>'Clave Actual:'))
?>
<?= form_error('clave_nueva');?>
</div>
</div>
<div class="form-group" id="c_re_clave">
<label for="re_clave" class="control-label col-md-2">Confirmar clave:</label>
<div class="col-md-10">
<?=
form_password('re_clave',$re_clave,array('class'=>'form-control','placeholder'=>'Confirmar clave:'))
?>
<?= form_error('re_clave');?>
</div>
</div>
<div>
<?php
echo form_hidden('id_usuario',$id_usuario);
?>
</div>
<div class="form-group">
<div class="col-md-3 col-md-offset-2">
<button class="btn btn-primary"><?= ( isset($btn_action ) )?$btn_action:'Procesar'; ?></button>
<?php
$btn_cancelar = array('class' => 'btn btn-danger');
echo anchor('Usuarios','Cancelar',$btn_cancelar);
?>
</div>
</div>
</fieldset>
<?= form_close(); ?>
</div> <!-- /Box-Body -->
</div>
<!-- Your Page Content Here -->
<script>
var _base_url = "<?= base_url(); ?>";
</script>
| 31.84127
| 117
| 0.519442
|
a44fc6ab4f9cdf7fa7ea3e41f63a2d5bbe616804
| 4,581
|
php
|
PHP
|
app/ClashApi.php
|
bll44/coc
|
2016809aaaef9470ec41bd996b24ddf38d7686bb
|
[
"MIT"
] | null | null | null |
app/ClashApi.php
|
bll44/coc
|
2016809aaaef9470ec41bd996b24ddf38d7686bb
|
[
"MIT"
] | null | null | null |
app/ClashApi.php
|
bll44/coc
|
2016809aaaef9470ec41bd996b24ddf38d7686bb
|
[
"MIT"
] | null | null | null |
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Clan;
use App\Member;
use App\League;
use App\Location;
class ClashApi extends Model
{
private $curl;
public $lastResponse;
public function __construct()
{
$this->curl = new \anlutro\cURL\cURL;
}
public function getClanByTag($tag)
{
$request = $this->curl->newJsonRequest('GET', env('CLASH_BASE_API_URL').'/clans/' . urlencode($tag), array())
->setHeader('authorization', 'Bearer ' . env('CLASH_API_KEY'));
$response = $request->send();
// 2nd param 'true' converts returned json object into associative php array
$decodedResponse = json_decode($response, true);
$this->lastResponse = $decodedResponse;
$clan = $this->buildClanObject($response);
return $clan;
}
public function getClanByName($name)
{
$request = $this->curl->newJsonRequest('GET', env('CLASH_BASE_API_URL').'/clans?name=' . trim($name), array())
->setHeader('authorization', 'Bearer ' . env('CLASH_API_KEY'));
$response = $request->send();
// 2nd param 'true' converts returned json object into associative php array
$decodedResponse = json_decode($response, true);
$this->lastResponse = $decodedResponse;
$clanResults = array();
foreach($decodedResponse as $item)
{
$clanResults[] = $this->buildClanObject($item);
}
return $clanResults;
}
private function buildClanObject($item)
{
$clan = new Clan;
$clan->tag = $item['tag'];
$clan->name = $item['name'];
$clan->type = $item['type'];
$clan->description = $item['description'];
$clan->location_id = $item['location']['id'];
$clan->badge_small = $item['badgeUrls']['small'];
$clan->badge_medium = $item['badgeUrls']['medium'];
$clan->badge_large = $item['badgeUrls']['large'];
$clan->warFrequency = $item['warFrequency'];
$clan->clanLevel = $item['clanLevel'];
$clan->warWins = $item['warWins'];
$clan->warWinStreak = $item['warWinStreak'];
$clan->clanPoints = $item['clanPoints'];
$clan->requiredTrophies = $item['requiredTrophies'];
$clan->memberCount = $item['members'];
return $clan;
}
public function getClanMembersByTag($tag)
{
$request = $this->curl->newJsonRequest('GET', env('CLASH_BASE_API_URL').'/clans/' . urlencode($tag) . '/members', array())
->setHeader('authorization', 'Bearer ' . env('CLASH_API_KEY'));
$response = $request->send();
$decodedResponse = json_decode($response, true);
$this->lastResponse = $decodedResponse;
$members = array();
foreach($decodedResponse['items'] as $item)
{
$member = new Member;
$member->tag = $item['tag'];
$member->name = $item['name'];
$member->role = $item['role'];
$member->expLevel = $item['expLevel'];
$member->league_id = $item['league']['id'];
$member->trophies = $item['trophies'];
$member->clanRank = $item['clanRank'];
$member->previousClanRank = $item['previousClanRank'];
$member->donations = $item['donations'];
$member->donationsReceived = $item['donationsReceived'];
$members[] = $member;
}
return $members;
}
public function getLeagues()
{
$request = $this->curl->newJsonRequest('GET', env('CLASH_BASE_API_URL').'/leagues', array())
->setHeader('authorization', 'Bearer ' . env('CLASH_API_KEY'));
$response = $request->send();
$decodedResponse = json_decode($response, true);
$this->lastResponse = $decodedResponse;
$leagues = array();
foreach($decodedResponse['items'] as $item)
{
$league = new League;
$league->league_id = $item['id'];
$league->name = $item['name'];
$league->icon_small = $item['iconUrls']['small'];
$league->icon_tiny = $item['iconUrls']['tiny'];
if(isset($item['iconUrls']['medium']))
$league->icon_medium = $item['iconUrls']['medium'];
else
$league->icon_medium = null;
$leagues[] = $league;
}
return $leagues;
}
public function getLocations()
{
$request = $this->curl->newJsonRequest('GET', env('CLASH_BASE_API_URL').'/locations', array())
->setHeader('authorization', 'Bearer ' . env('CLASH_API_KEY'));
$response = $request->send();
$decodedResponse = json_decode($response, true);
$this->lastResponse = $decodedResponse;
$locations = array();
foreach($decodedResponse['items'] as $item)
{
$location = new Location;
$location->location_id = $item['id'];
$location->name = $item['name'];
$location->isCountry = $item['isCountry'];
if($location->isCountry)
$location->countryCode = $item['countryCode'];
else
$location->countryCode = null;
$locations[] = $location;
}
return $locations;
}
}
| 28.993671
| 124
| 0.650731
|
3f8d0e75aefee6bf75db44be82ff939cde3f32e8
| 503
|
php
|
PHP
|
common/behaviors/FormattedError.php
|
vampir2236/cities.ru
|
df83d5203aa71f46de49441badd7f3ddd1b829b4
|
[
"BSD-3-Clause"
] | null | null | null |
common/behaviors/FormattedError.php
|
vampir2236/cities.ru
|
df83d5203aa71f46de49441badd7f3ddd1b829b4
|
[
"BSD-3-Clause"
] | null | null | null |
common/behaviors/FormattedError.php
|
vampir2236/cities.ru
|
df83d5203aa71f46de49441badd7f3ddd1b829b4
|
[
"BSD-3-Clause"
] | null | null | null |
<?php
namespace common\behaviors;
use yii\base\Behavior;
use yii\helpers\Html;
class FormattedError extends Behavior
{
/**
* Получение ошибок валидации в нужном формате для отобржения
* на клиенте
* @return array
*/
public function getFormattedError()
{
$result = [];
foreach ($this->owner->getErrors() as $attribute => $errors) {
$result[Html::getInputId($this->owner, $attribute)] = $errors;
}
return $result;
}
}
| 17.964286
| 74
| 0.600398
|
e75d18a055e9e5c43ea07394de8f040e0ac6bd45
| 5,849
|
php
|
PHP
|
app/Http/Controllers/PerusahaanController.php
|
161710167/lanjutanproject
|
42e625ff8b80cc69c36de176934608acb5ff5ba3
|
[
"MIT"
] | null | null | null |
app/Http/Controllers/PerusahaanController.php
|
161710167/lanjutanproject
|
42e625ff8b80cc69c36de176934608acb5ff5ba3
|
[
"MIT"
] | null | null | null |
app/Http/Controllers/PerusahaanController.php
|
161710167/lanjutanproject
|
42e625ff8b80cc69c36de176934608acb5ff5ba3
|
[
"MIT"
] | null | null | null |
<?php
namespace App\Http\Controllers;
use App\Perusahaan;
use App\User;
use File;
use Illuminate\Http\Request;
use Session;
class PerusahaanController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
$p = Perusahaan::with('User')->get();
return view('perusahaan.index',compact('p'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$o = User::all();
return view('perusahaan.create',compact('o'));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request,[
'nama' => 'required|',
'logo' => 'required|',
'deskripsi' => 'required|',
'kategori' => 'required|',
'subkategori' => 'required|',
'judul' => 'required|',
'gaji' => 'required|',
'tgl_mulai' => 'required|',
'email' => 'required|unique:perusahaans',
'telepon' => 'required|',
'user_id' => 'required|'
]);
$p = new Perusahaan;
$p->nama = $request->nama;
$p->logo = $request->logo;
$p->deskripsi = $request->deskripsi;
$p->kategori = $request->kategori;
$p->subkategori = $request->subkategori;
$p->judul = $request->judul;
$p->gaji = $request->gaji;
$p->tgl_mulai = $request->tgl_mulai;
$p->email = $request->email;
$p->telepon = $request->telepon;
$p->user_id = $request->user_id;
//upload foto
if($request->hasfile('logo')){
$file =$request ->file('logo');
$destinationPath = public_path().'/assets/admin/images/loker/';
$filename = str_random(6).'_'.$file->getClientOriginalName();
$uploadSucsess =$file -> move($destinationPath,$filename);
$p->logo = $filename;
}
// attach fungsinya untuk melampirkan data,yang dilampirkan disini ialah data dari method Pesanan
// yang ada di model Perusahaan
Session::flash("flash_notification", [
"level"=>"success",
"message"=>"Berhasil menyimpan <b>$p->logo</b>"
]);
$p->save();
return redirect()->route('perusahaan.index');
}
/**
* Display the specified resource.
*
* @param \App\Perusahaan $perusahaan
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$p = Perusahaan::findOrFail($id);
return view('perusahaan.show',compact('p'));
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Perusahaan $perusahaan
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$p = Perusahaan::findOrFail($id);
$o= User::all();
$selectedo = Perusahaan::findOrFail($id)->user_id;
return view('perusahaan.edit',compact('p','o','selectedo'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Perusahaan $perusahaan
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$this->validate($request,[
'nama' => 'required|',
'logo' => 'required|',
'deskripsi' => 'required|',
'kategori' => 'required|',
'subkategori' => 'required|',
'judul' => 'required|',
'gaji' => 'required|',
'tgl_mulai' => 'required|',
'email' => 'required|',
'telepon' => 'required|',
'user_id' => 'required|'
]);
$p = Perusahaan::findOrFail($id);
$p->nama = $request->nama;
$p->logo = $request->logo;
$p->deskripsi = $request->deskripsi;
$p->kategori = $request->kategori;
$p->subkategori = $request->subkategori;
$p->judul = $request->judul;
$p->gaji = $request->gaji;
$p->tgl_mulai = $request->tgl_mulai;
$p->email = $request->email;
$p->telepon = $request->telepon;
$p->user_id = $request->user_id;
//edit upload foto
if($request->hasfile('logo')){
$file =$request ->file('logo');
$destinationPath = public_path().'/assets/admin/images/loker/';
$filename = str_random(6).'_'.$file->getClientOriginalName();
$uploadSucsess =$file -> move($destinationPath,$filename);
//hapus foto lama jika ada
if($p->logo) {
$old_foto =$p->logo;
$filepath = public_path() . DIRECTORY_SEPARATOR .'/assets/admin/images/loker/' . DIRECTORY_SEPARATOR . $p->logo;
try{
File::delete($filepath);
} catch (FileNotFoundException $e){
//file sudah di hapus/tidak ada
}
}
$p->logo = $filename;
}
$p->save();
return redirect()->route('perusahaan.index');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Perusahaan $perusahaan
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$p = Perusahaan::findOrFail($id);
$p->delete();
Session::flash("flash_notification", [
"level"=>"success",
"message"=>"Data Berhasil dihapus"
]);
return redirect()->route('perusahaan.index');
}
}
| 30.149485
| 129
| 0.519747
|
df06a0897590290fa99920804c7165a459a7bec4
| 386
|
cs
|
C#
|
src/Unrect.Strategies/Offset/OffsetStrategy.cs
|
jasonmcboyd/Unrect
|
f129f48fd9e3dabdcb22bbfda458d7e18509863a
|
[
"MIT"
] | null | null | null |
src/Unrect.Strategies/Offset/OffsetStrategy.cs
|
jasonmcboyd/Unrect
|
f129f48fd9e3dabdcb22bbfda458d7e18509863a
|
[
"MIT"
] | null | null | null |
src/Unrect.Strategies/Offset/OffsetStrategy.cs
|
jasonmcboyd/Unrect
|
f129f48fd9e3dabdcb22bbfda458d7e18509863a
|
[
"MIT"
] | null | null | null |
using Unrect.Core;
namespace Unrect.Strategies
{
internal class OffsetStrategy<TSpace> : IOffsetStrategy<TSpace>
{
public OffsetStrategy(ISizeStrategy<TSpace> strategy)
{
Strategy = strategy;
}
private ISizeStrategy<TSpace> Strategy { get; }
public Offset GetOffset(ISpace<TSpace> availableSpace) => new Offset(Strategy.GetSize(availableSpace));
}
}
| 22.705882
| 107
| 0.722798
|
2cac0da0a49a3e8ee4b606cad9fb9d6ce4f947bc
| 4,770
|
py
|
Python
|
grove/grove_PM2_5_HM3301.py
|
Hansen0314/grove.py
|
8edbf4678d7634623d9279bce5a8b73f32c56325
|
[
"MIT"
] | 122
|
2018-12-04T16:42:32.000Z
|
2022-03-16T09:15:07.000Z
|
grove/grove_PM2_5_HM3301.py
|
Hansen0314/grove.py
|
8edbf4678d7634623d9279bce5a8b73f32c56325
|
[
"MIT"
] | 28
|
2019-03-27T19:26:25.000Z
|
2022-03-30T04:49:54.000Z
|
grove/grove_PM2_5_HM3301.py
|
Hansen0314/grove.py
|
8edbf4678d7634623d9279bce5a8b73f32c56325
|
[
"MIT"
] | 91
|
2018-06-30T06:35:23.000Z
|
2022-03-20T14:56:15.000Z
|
#
# Library for Grove - PM2.5 PM10 detect sensor (HM3301)
#
'''
## License
The MIT License (MIT)
Copyright (C) 2018 Seeed Technology Co.,Ltd.
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.
'''
from smbus2 import SMBus , i2c_msg
from smbus2 import SMBusWrapper
import time
HM3301_DEFAULT_I2C_ADDR = 0x40
SELECT_I2C_ADDR = 0x88
DATA_CNT = 29
class Seeed_HM3301(object):
def __init__(self,bus_nr = 1):
self.PM_1_0_conctrt_std = 0 # PM1.0 Standard particulate matter concentration Unit:ug/m3
self.PM_2_5_conctrt_std = 0 # PM2.5 Standard particulate matter concentration Unit:ug/m3
self.PM_10_conctrt_std = 0 # PM10 Standard particulate matter concentration Unit:ug/m3
self.PM_1_0_conctrt_atmosph = 0 #PM1.0 Atmospheric environment concentration ,unit:ug/m3
self.PM_2_5_conctrt_atmosph = 0 #PM2.5 Atmospheric environment concentration ,unit:ug/m3
self.PM_10_conctrt_atmosph = 0 #PM10 Atmospheric environment concentration ,unit:ug/m3
with SMBusWrapper(bus_nr) as bus:
write = i2c_msg.write(HM3301_DEFAULT_I2C_ADDR,[SELECT_I2C_ADDR])
bus.i2c_rdwr(write)
def read_data(self):
with SMBusWrapper(1) as bus:
read = i2c_msg.read(HM3301_DEFAULT_I2C_ADDR,DATA_CNT)
bus.i2c_rdwr(read)
return list(read)
def check_crc(self,data):
sum = 0
for i in range(DATA_CNT-1):
sum += data[i]
sum = sum & 0xff
#print(sum)
#print(data[28])
return (sum==data[28])
def parse_data(self,data):
self.PM_1_0_conctrt_std = data[4]<<8 | data[5]
self.PM_2_5_conctrt_std = data[6]<<8 | data[7]
self.PM_10_conctrt_std = data[8]<<8 | data[9]
self.PM_1_0_conctrt_atmosph = data[10]<<8 | data[11]
self.PM_2_5_conctrt_atmosph = data[12]<<8 | data[13]
self.PM_10_conctrt_atmosph = data[14]<<8 | data[15]
print("PM1.0 Standard particulate matter concentration Unit:ug/m3 = %d" %self.PM_1_0_conctrt_std)
print("PM2.5 Standard particulate matter concentration Unit:ug/m3 = %d" %self.PM_2_5_conctrt_std)
print("PM10 Standard particulate matter concentration Unit:ug/m3 = %d" %self.PM_10_conctrt_std)
print("PM1.0 Atmospheric environment concentration ,unit:ug/m3 = %d" %self.PM_1_0_conctrt_atmosph)
print("PM2.5 Atmospheric environment concentration ,unit:ug/m3 = %d" %self.PM_2_5_conctrt_atmosph)
print("PM10 Atmospheric environment concentration ,unit:ug/m3 = %d" %self.PM_10_conctrt_atmosph)
print(" ")
print(" ")
print(" ")
'''
with SMBusWrapper(1) as bus:
write=i2c_msg.write(0x40,[0x88])
bus.i2c_rdwr(write)
while(1):
read = i2c_msg.read(0x40,29)
bus.i2c_rdwr(read)
data = list(read)
print type(data)
print data
time.sleep(1)
'''
def main():
print("################### NOTICE!!!! ############################")
print("####### Please set the I2c speed to 20khz ####")
print("####### sudo vim /boot/config.txt ####")
print("####### add content : dtparam=i2c_arm_baudrate=20000 ####")
print("####### sudo reboot ####")
print("################### NOTICE!!!! ############################")
print(" ")
print(" ")
print(" ")
hm3301 = Seeed_HM3301()
time.sleep(.1)
while 1:
data = hm3301.read_data()
#print data
if(hm3301.check_crc(data) != True):
print("CRC error!")
hm3301.parse_data(data)
time.sleep(3)
if __name__ == '__main__':
main()
| 35.073529
| 106
| 0.632285
|
320e745d9580c98dc762f51ab325f6555265dbd3
| 1,870
|
dart
|
Dart
|
lib/src/messaging/worker_response.dart
|
mbaumgartenbr/storage_worker
|
88a5129b757e0f872e3d419ecf1f8f5e7898a8d9
|
[
"MIT"
] | null | null | null |
lib/src/messaging/worker_response.dart
|
mbaumgartenbr/storage_worker
|
88a5129b757e0f872e3d419ecf1f8f5e7898a8d9
|
[
"MIT"
] | null | null | null |
lib/src/messaging/worker_response.dart
|
mbaumgartenbr/storage_worker
|
88a5129b757e0f872e3d419ecf1f8f5e7898a8d9
|
[
"MIT"
] | null | null | null |
part of messaging;
class WorkerResponse {
const WorkerResponse({
required this.type,
required this.data,
this.message,
});
final String type;
final WorkerData data;
/// If [message] is not null, this response is a FAILURE.
final String? message;
Map<String, dynamic> toMap() => {
'type': type,
'data': data.toMap(),
if (message != null) 'message': message,
};
factory WorkerResponse.fromMap(Map<String, dynamic> map) {
return WorkerResponse(
type: map['type'],
data: WorkerData.fromMap(map['data']),
message: map['message'],
);
}
String toJson() => jsonEncode(toMap());
factory WorkerResponse.fromJson(String json) {
return WorkerResponse.fromMap(jsonDecode(json));
}
WorkerResponse.open({
required String storeName,
this.message,
}) : type = Operation.open,
data = WorkerData(storeName: storeName);
WorkerResponse.close({
required String storeName,
this.message,
}) : type = Operation.close,
data = WorkerData(storeName: storeName);
WorkerResponse.read({
required String storeName,
required String key,
required String? object,
this.message,
}) : type = Operation.read,
data = WorkerData(storeName: storeName, key: key, object: object);
WorkerResponse.write({
required String storeName,
required String key,
this.message,
}) : type = Operation.write,
data = WorkerData(storeName: storeName, key: key);
WorkerResponse.delete({
required String storeName,
required String key,
this.message,
}) : type = Operation.delete,
data = WorkerData(storeName: storeName, key: key);
WorkerResponse.failure({
required String storeName,
required this.message,
}) : type = Operation.failure,
data = WorkerData(storeName: storeName);
}
| 24.605263
| 74
| 0.650267
|
4b039cbbe984c9f537a59e7f0a046e8b073782fc
| 1,773
|
swift
|
Swift
|
MarvelCharacters/MarvelCharacters/Character/CharacterViewController.swift
|
kerekesmarton/Marvel
|
afc6d74a725cffefbc2df9ded7988b8812ec8689
|
[
"MIT"
] | 1
|
2021-08-13T08:09:15.000Z
|
2021-08-13T08:09:15.000Z
|
MarvelCharacters/MarvelCharacters/Character/CharacterViewController.swift
|
kerekesmarton/Marvel
|
afc6d74a725cffefbc2df9ded7988b8812ec8689
|
[
"MIT"
] | null | null | null |
MarvelCharacters/MarvelCharacters/Character/CharacterViewController.swift
|
kerekesmarton/Marvel
|
afc6d74a725cffefbc2df9ded7988b8812ec8689
|
[
"MIT"
] | null | null | null |
//
// CharacterViewController.swift
// MarvelCharacters
//
// Created by Marton Kerekes on 06/01/2020.
// Copyright © 2020 Marton Kerekes. All rights reserved.
//
import Foundation
import IosCore
import Presentation
class CharacterViewController: SegmentedHeaderViewController, CharacterPresentationOutput {
var presenter: CharacterPresenting!
override func viewDidLoad() {
super.viewDidLoad()
enableCoverView = false
presenter.viewReady()
}
override func applyStyle() {
super.applyStyle()
}
var headerView: CharacterHeaderViewProtocol? {
return contentView as? CharacterHeaderViewProtocol
}
override func setupContentView(_ _mainScrollView: UIScrollView) {
let nib = UINib(nibName: String(describing: CharacterHeaderView.self), bundle: Bundle(for: CharacterHeaderView.self))
let views = nib.instantiate(withOwner: self, options: nil)
if let _characterHeaderView = views.first as? CharacterHeaderView {
_mainScrollView.addSubview(_characterHeaderView)
contentView = _characterHeaderView
}
}
func reload() {
headerView?.profileTapClosure = { [weak self] in
self?.presenter.didTapProfileImage(referenceViewable: self?.headerView)
}
let newSegments = presenter.segments()
if newSegments != segments as? [CharacterSegmentedContent] {
segments = newSegments
}
}
func setTitle(_ title: String) {
self.title = title
}
func setImage(url: URL) {
headerView?.setProfileImage(url: url)
}
func setHeader(description: String) {
headerView?.setText(description)
}
}
| 28.142857
| 125
| 0.654822
|
0d92faf873bba4f83984eb76caf9372b73451f97
| 18,803
|
cs
|
C#
|
Sources/Languages/DxTBLang.Designer.cs
|
daerlnaxe/DxTBoxCore
|
41601ce9adf2b9939ed998ecda3a365096d4797d
|
[
"MIT"
] | 2
|
2021-01-08T16:11:01.000Z
|
2021-02-09T10:26:14.000Z
|
Sources/Languages/DxTBLang.Designer.cs
|
daerlnaxe/DxTBoxCore
|
41601ce9adf2b9939ed998ecda3a365096d4797d
|
[
"MIT"
] | null | null | null |
Sources/Languages/DxTBLang.Designer.cs
|
daerlnaxe/DxTBoxCore
|
41601ce9adf2b9939ed998ecda3a365096d4797d
|
[
"MIT"
] | null | null | null |
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DxTBoxCore.Languages {
using System;
/// <summary>
/// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
/// </summary>
// Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
// à l'aide d'un outil, tel que ResGen ou Visual Studio.
// Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
// avec l'option /str ou régénérez votre projet VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class DxTBLang {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal DxTBLang() {
}
/// <summary>
/// Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DxTBoxCore.Languages.DxTBLang", typeof(DxTBLang).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Remplace la propriété CurrentUICulture du thread actuel pour toutes
/// les recherches de ressources à l'aide de cette classe de ressource fortement typée.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à All.
/// </summary>
public static string All {
get {
return ResourceManager.GetString("All", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Browse.
/// </summary>
public static string Browse {
get {
return ResourceManager.GetString("Browse", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Cancel.
/// </summary>
public static string Cancel {
get {
return ResourceManager.GetString("Cancel", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Handle all future cases like this one. .
/// </summary>
public static string Check_All {
get {
return ResourceManager.GetString("Check_All", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Collision.
/// </summary>
public static string Collision {
get {
return ResourceManager.GetString("Collision", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Current.
/// </summary>
public static string Current {
get {
return ResourceManager.GetString("Current", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Current.
/// </summary>
public static string Current_Word {
get {
return ResourceManager.GetString("Current_Word", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Delete.
/// </summary>
public static string Delete {
get {
return ResourceManager.GetString("Delete", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Desktop.
/// </summary>
public static string Desktop {
get {
return ResourceManager.GetString("Desktop", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Destination.
/// </summary>
public static string Destination {
get {
return ResourceManager.GetString("Destination", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Documents.
/// </summary>
public static string Documents {
get {
return ResourceManager.GetString("Documents", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Downloads.
/// </summary>
public static string Downloads {
get {
return ResourceManager.GetString("Downloads", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Edit.
/// </summary>
public static string Edit {
get {
return ResourceManager.GetString("Edit", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Error.
/// </summary>
public static string Error {
get {
return ResourceManager.GetString("Error", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à File.
/// </summary>
public static string File {
get {
return ResourceManager.GetString("File", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à File name.
/// </summary>
public static string File_Name {
get {
return ResourceManager.GetString("File_Name", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Pictures.
/// </summary>
public static string Images {
get {
return ResourceManager.GetString("Images", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à To develop tree, enter a link then hit ctrl+G.
/// </summary>
public static string Inf_LinkOrChoose {
get {
return ResourceManager.GetString("Inf_LinkOrChoose", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Information.
/// </summary>
public static string Information {
get {
return ResourceManager.GetString("Information", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Left Pic.
/// </summary>
public static string Left_Pic {
get {
return ResourceManager.GetString("Left_Pic", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Music.
/// </summary>
public static string Music {
get {
return ResourceManager.GetString("Music", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Never show me that again.
/// </summary>
public static string NeverShow {
get {
return ResourceManager.GetString("NeverShow", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à New document.
/// </summary>
public static string New_Doc {
get {
return ResourceManager.GetString("New_Doc", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à No.
/// </summary>
public static string No {
get {
return ResourceManager.GetString("No", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à No longer ask the question.
/// </summary>
public static string NoLongerAsk {
get {
return ResourceManager.GetString("NoLongerAsk", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à None.
/// </summary>
public static string None {
get {
return ResourceManager.GetString("None", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à OK.
/// </summary>
public static string OK {
get {
return ResourceManager.GetString("OK", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Optical Drive.
/// </summary>
public static string Optical_Drive {
get {
return ResourceManager.GetString("Optical_Drive", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à OverWrite.
/// </summary>
public static string OverWrite {
get {
return ResourceManager.GetString("OverWrite", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Pass.
/// </summary>
public static string Pass {
get {
return ResourceManager.GetString("Pass", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Passwords are different !.
/// </summary>
public static string Pass_Different {
get {
return ResourceManager.GetString("Pass_Different", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Pivot.
/// </summary>
public static string Pivot {
get {
return ResourceManager.GetString("Pivot", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Do you really want to close ?.
/// </summary>
public static string Q_Want_Close {
get {
return ResourceManager.GetString("Q_Want_Close", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Question.
/// </summary>
public static string Question {
get {
return ResourceManager.GetString("Question", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Remove.
/// </summary>
public static string Remove {
get {
return ResourceManager.GetString("Remove", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Rename.
/// </summary>
public static string Rename {
get {
return ResourceManager.GetString("Rename", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Right Pic.
/// </summary>
public static string Right_Pic {
get {
return ResourceManager.GetString("Right_Pic", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Save.
/// </summary>
public static string Save {
get {
return ResourceManager.GetString("Save", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Save Under.
/// </summary>
public static string Save_Under {
get {
return ResourceManager.GetString("Save_Under", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Select.
/// </summary>
public static string Select {
get {
return ResourceManager.GetString("Select", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Selected.
/// </summary>
public static string Selected {
get {
return ResourceManager.GetString("Selected", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Show Password.
/// </summary>
public static string ShowPassword {
get {
return ResourceManager.GetString("ShowPassword", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Size it too short < .
/// </summary>
public static string SizeShort {
get {
return ResourceManager.GetString("SizeShort", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Source.
/// </summary>
public static string Source {
get {
return ResourceManager.GetString("Source", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Stop.
/// </summary>
public static string Stop {
get {
return ResourceManager.GetString("Stop", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Submit.
/// </summary>
public static string Submit {
get {
return ResourceManager.GetString("Submit", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Total.
/// </summary>
public static string Total {
get {
return ResourceManager.GetString("Total", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Trash.
/// </summary>
public static string Trash {
get {
return ResourceManager.GetString("Trash", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Delete this file.
/// </summary>
public static string Trash_FileTitle {
get {
return ResourceManager.GetString("Trash_FileTitle", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Would you want to delete this ?.
/// </summary>
public static string Trash_Question {
get {
return ResourceManager.GetString("Trash_Question", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Type.
/// </summary>
public static string Type {
get {
return ResourceManager.GetString("Type", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Unwanted.
/// </summary>
public static string Unwanted {
get {
return ResourceManager.GetString("Unwanted", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Validate.
/// </summary>
public static string Validate {
get {
return ResourceManager.GetString("Validate", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Videos.
/// </summary>
public static string Videos {
get {
return ResourceManager.GetString("Videos", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Warning.
/// </summary>
public static string Warning {
get {
return ResourceManager.GetString("Warning", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Yes.
/// </summary>
public static string Yes {
get {
return ResourceManager.GetString("Yes", resourceCulture);
}
}
}
}
| 33.103873
| 173
| 0.518375
|
548a107e54be2929cf633439ab57a01d0d684980
| 638
|
lua
|
Lua
|
src/states/PlayState.lua
|
d5f6/minesweeper
|
f1ac0e3e4277df316a888a5ef64d83cde5730d9d
|
[
"MIT"
] | null | null | null |
src/states/PlayState.lua
|
d5f6/minesweeper
|
f1ac0e3e4277df316a888a5ef64d83cde5730d9d
|
[
"MIT"
] | null | null | null |
src/states/PlayState.lua
|
d5f6/minesweeper
|
f1ac0e3e4277df316a888a5ef64d83cde5730d9d
|
[
"MIT"
] | null | null | null |
--[[
PlayState Class
]]
PlayState = Class{__includes = BaseState}
function PlayState:init()
self.time = 120
self.gameGrid = GameGrid(GRID_WIDTH, GRID_HEIGHT)
Timer.every(1, function()
self.time = self.time - 1
if self.time == 0 then
gStateMachine:change('game-over', {
gameGrid = self.gameGrid
})
end
end)
end
function PlayState:update(dt)
self.gameGrid:update(dt)
end
function PlayState:render()
love.graphics.clear(0.2, 0.2, 0.2, 1)
love.graphics.print(tostring(self.time))
love.graphics.printf(self.gameGrid.score, 0, 0, VIRTUAL_WIDTH, 'right')
self.gameGrid:render()
end
| 18.764706
| 73
| 0.675549
|
1c3decfc5dd7ec53388eec6cfaaf6c894c83975d
| 461
|
cql
|
SQL
|
input/cql/ANCDT20.cql
|
workcartersmith/smart-anc
|
bbcd1026cceae3408e3f548eb46787f4d4c4b45d
|
[
"CC0-1.0"
] | 7
|
2021-08-13T22:32:16.000Z
|
2022-03-23T11:34:00.000Z
|
input/cql/ANCDT20.cql
|
workcartersmith/smart-anc
|
bbcd1026cceae3408e3f548eb46787f4d4c4b45d
|
[
"CC0-1.0"
] | 14
|
2019-12-02T20:28:15.000Z
|
2020-10-13T15:17:42.000Z
|
input/cql/ANCDT20.cql
|
workcartersmith/smart-anc
|
bbcd1026cceae3408e3f548eb46787f4d4c4b45d
|
[
"CC0-1.0"
] | 3
|
2021-06-22T15:35:01.000Z
|
2021-08-11T19:42:07.000Z
|
library ANCDT20
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
include ANCConfig called Config
include ANCConcepts called Cx
include ANCDataElements called PatientData
include ANCContactDataElements called ContactData
context Patient
/*
"Hepatitis C test result" = "Hepatitis C positive"
*/
define "Should Conduct hepatitis C positive counselling":
ContactData."Hepatitis C test result" in Cx."Hepatitis C Test Result - Positive Choices"
| 24.263158
| 90
| 0.802603
|
4fa419ab16ddf1e939747d45bd6608b9cc08e959
| 120
|
rb
|
Ruby
|
lib/technology/icons.rb
|
ethirajsrinivasan/technology-icons
|
547d0bab87c30a63c45ac5241fe51730bdf2dd40
|
[
"MIT"
] | null | null | null |
lib/technology/icons.rb
|
ethirajsrinivasan/technology-icons
|
547d0bab87c30a63c45ac5241fe51730bdf2dd40
|
[
"MIT"
] | null | null | null |
lib/technology/icons.rb
|
ethirajsrinivasan/technology-icons
|
547d0bab87c30a63c45ac5241fe51730bdf2dd40
|
[
"MIT"
] | 1
|
2020-10-19T13:27:46.000Z
|
2020-10-19T13:27:46.000Z
|
require "technology/icons/version"
module Technology
module Icons
class Engine < Rails::Engine
end
end
end
| 13.333333
| 34
| 0.725
|
8293660b4f5cc01e42d8b5ee28d952dd09160af4
| 2,203
|
kt
|
Kotlin
|
shared/src/main/kotlin/security/RequestFilter.kt
|
auroredea/tock
|
ab69a38c68aec7004c653fde5951e7aeb1462c59
|
[
"Apache-2.0"
] | null | null | null |
shared/src/main/kotlin/security/RequestFilter.kt
|
auroredea/tock
|
ab69a38c68aec7004c653fde5951e7aeb1462c59
|
[
"Apache-2.0"
] | null | null | null |
shared/src/main/kotlin/security/RequestFilter.kt
|
auroredea/tock
|
ab69a38c68aec7004c653fde5951e7aeb1462c59
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright (C) 2017/2019 e-voyageurs technologies
*
* 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 ai.tock.shared.security
import io.vertx.core.http.HttpServerRequest
fun createRequestFilter(allowedIps: Set<String>?, xAuthToken: String?): RequestFilter = RequestFiltersComposer(
listOfNotNull(
allowedIps
?.mapNotNull { ip -> ip.trim().takeUnless { it.isEmpty() } }
?.toSet()
?.takeUnless { it.isEmpty() }
?.let { IPRequestFilter(it) },
xAuthToken
?.takeUnless { it.isBlank() }
?.let { XAuthTokenRequestFilter(it.trim()) }
)
)
/**
* A request filter is used to filter an incoming request.
*/
interface RequestFilter {
/**
* Returns true is the request is accepted, false either.
*/
fun accept(request: HttpServerRequest): Boolean
}
internal class RequestFiltersComposer(private val filters: List<RequestFilter>) : RequestFilter {
override fun accept(request: HttpServerRequest): Boolean {
return filters.all { it.accept(request) }
}
}
internal class IPRequestFilter(private val allowedIps: Set<String>) : RequestFilter {
override fun accept(request: HttpServerRequest): Boolean {
val directIp = request.remoteAddress().host()
val forwardedIp = request.getHeader("X-Forwarded-For")?.split(",")?.lastOrNull()?.trim()
return allowedIps.contains(directIp) || allowedIps.contains(forwardedIp)
}
}
internal class XAuthTokenRequestFilter(private val token: String) : RequestFilter {
override fun accept(request: HttpServerRequest): Boolean {
return token == request.getHeader("X-Auth-Token")
}
}
| 33.378788
| 111
| 0.690422
|
4c64d90917578b8c64fee450caf2bfb14524f96e
| 8,106
|
lua
|
Lua
|
client/Classes/Element/DynamicMenu/C_MenuButton.c.lua
|
StiviiK/iLife
|
e4b905260d53b5fea47317c48176c77b30f08195
|
[
"MIT"
] | null | null | null |
client/Classes/Element/DynamicMenu/C_MenuButton.c.lua
|
StiviiK/iLife
|
e4b905260d53b5fea47317c48176c77b30f08195
|
[
"MIT"
] | null | null | null |
client/Classes/Element/DynamicMenu/C_MenuButton.c.lua
|
StiviiK/iLife
|
e4b905260d53b5fea47317c48176c77b30f08195
|
[
"MIT"
] | 2
|
2021-02-17T05:19:51.000Z
|
2021-02-24T05:31:29.000Z
|
local screenX, screenY = guiGetScreenSize()
C_MenuButton = {}
C_MenuButton.new = function(_text, _width, _height, _rr, _rg, _rb, _br, _bg, _bb, _tr, _tg, _tb)
assert(type(_text) == "string", "'Text' ist not a valid text!")
assert(type(_width) == "number", "'Width' is not a valid number!")
assert(type(_height) == "number", "'Width' is not a valid number!")
--Rectangle Color
assert(type(_rr) == "number" and _rr >= 0 and _rr <= 255, "'RR' is not a valid unsigned 8 bit number!")
assert(type(_rg) == "number" and _rg >= 0 and _rg <= 255, "'RG' is not a valid unsigned 8 bit number!")
assert(type(_rb) == "number" and _rb >= 0 and _rb <= 255, "'RB' is not a valid unsigned 8 bit number!")
--Border Color
assert(type(_br) == "number" and _br >= 0 and _br <= 255, "'BR' is not a valid unsigned 8 bit number!")
assert(type(_bg) == "number" and _bg >= 0 and _bg <= 255, "'BG' is not a valid unsigned 8 bit number!")
assert(type(_bb) == "number" and _bb >= 0 and _bb <= 255, "'BB' is not a valid unsigned 8 bit number!")
--Text Color
assert(type(_tr) == "number" and _tr >= 0 and _tr <= 255, "'TR' is not a valid unsigned 8 bit number!")
assert(type(_tg) == "number" and _tg >= 0 and _tg <= 255, "'TG' is not a valid unsigned 8 bit number!")
assert(type(_tb) == "number" and _tb >= 0 and _tb <= 255, "'TB' is not a valid unsigned 8 bit number!")
local this = {
text = _text,
rr = _rr,
rg = _rg,
rb = _rb,
br = _br,
bg = _bg,
bb = _bb,
tr = _tr,
tg = _tg,
tb = _tb
}
local x = 0
local y = 0
local width = _width
local height = _height
local alpha = 0
local state = "fadedOut"
local mouseClickFunction = function() end
local mouseEnterFunction = function() end
local mouseLeaveFunction = function() end
local buttonFadedOutFunction = function() end
local buttonFadedInFunction = function() end
local instanceAlive = true
--X
---------------------------------------------------------------------------------------------------
function this.getX()
return x
end
function this.setX(_x)
assert(type(_x) == "number", "'X' ist not a valid number!")
x = _x
end
--Y
---------------------------------------------------------------------------------------------------
function this.getY()
return y
end
function this.setY(_y)
assert(type(_y) == "number", "'Y' ist not a valid number!")
y = _y
end
--Width
---------------------------------------------------------------------------------------------------
function this.getWidth()
return width
end
function this.setWidth(_width)
assert(type(_width) == "number", "'Width' ist not a valid number!")
width = _width
end
--Height
---------------------------------------------------------------------------------------------------
function this.getHeight()
return height
end
function this.setHeight(_height)
assert(type(_height) == "number", "'Height' ist not a valid number!")
height = _height
end
--Alpha
---------------------------------------------------------------------------------------------------
function this.getAlpha()
return alpha
end
function this.setAlpha(_alpha)
assert(type(_alpha) == "number", "'Alpha' ist not a valid number!")
alpha = _alpha
end
--State
---------------------------------------------------------------------------------------------------
function this.getState()
return state
end
function this.setState(_state)
assert(_state == "fadedOut" or _state == "fadingIn" or _state == "fadedIn" or _state == "fadingOut", "No valid 'state'!")
state = _state
end
--Event functions
---------------------------------------------------------------------------------------------------
--click
function this.triggerMouseClickFunction()
mouseClickFunction()
end
function this.addMouseClickFunction(func)
assert(type(func) == "function", "'Func' ist not a valid function!")
mouseClickFunction = func
end
function this.removeMouseClickFunction()
mouseClickFunction = function() end
end
--mouse enter
function this.triggerMouseEnterFunction()
mouseEnterFunction()
end
function this.addMouseEnterFunction(func)
assert(type(func) == "function", "'Func' ist not a valid function!")
mouseEnterFunction = func
end
function this.removedMouseEnterFunction()
mouseEnterFunction = function() end
end
--mouse leave
function this.triggerMouseLeaveFunction()
mouseLeaveFunction()
end
function this.addMouseLeaveFunctionfunc(func)
assert(type(func) == "function", "'Func' ist not a valid function!")
mouseLeaveFunction = func
end
function this.removedMouseLeaveFunction()
mouseLeaveFunction = function() end
end
-- returns the type of the object
function this.getType()
return "button"
end
--fadedIn
function this.triggerButtonFadedInFunction()
buttonfadedInFunction()
end
function this.addButtonFadedInFunction(func)
assert(type(func) == "function", "'Func' ist not a valid function!")
buttonFadedInFunction = func
end
function this.removedButtonFadedInFunction()
buttonFadedInFunction = function() end
end
--fadedOut
function this.triggerButtonFadedOutFunction()
buttonfadedOutFunction()
end
function this.addButtonFadedOutFunction(func)
assert(type(func) == "function", "'Func' ist not a valid function!")
buttonFadedOutFunction = func
end
function this.removedButtonFadedOutFunction()
buttonFadedOutFunction = function() end
end
-- returns the type of the object
function this.getType()
return "button"
end
-- this function changes just the render values but dont renders the button itselfs
function this.fadeButton(fade, frames, pixelPerFrame, alphaPerFrame)
if (instanceAlive) then
assert(type(fade) == "boolean", "'Fade' is not a valid boolean!")
assert(type(frames) == "number", "'Frames' is not a valid number!")
assert(type(pixelPerFrame) == "number", "'PixelPerFrame' is not a valid number!")
assert(type(alphaPerFrame) == "number" and alphaPerFrame >= 0 and alphaPerFrame <= 255, "'AlphaPerFrame' is not a valid unsigned 8 bit number!")
if (fade) then -- block for fading out
if (state == "fadedIn") then
state = "fadingOut"
addEventHandler("onClientRender", getRootElement(), function()
if not (instanceAlive) then
removeEventHandler("onClientRender", getRootElement(), debug.getinfo(1,"f").func)
else
if (this.getX() <= screenX / 2 - width / 2 - frames * pixelPerFrame) then
state = "fadedOut"
this.setAlpha(0)
removeEventHandler("onClientRender", getRootElement(), debug.getinfo(1,"f").func)
buttonFadedOutFunction()
else -- freeze alpha when 0
this.setX(this.getX() - pixelPerFrame)
local alpha = this.getAlpha()
if (alpha >= 0 + alphaPerFrame) then
this.setAlpha(this.getAlpha() - alphaPerFrame)
elseif (alpha < 0 + alphaPerFrame) and (alpha > 0) then
this.setAlpha(0)
end
end
end
end
)
end
elseif not (fade) then -- block for fading in
if (state == "fadedOut") then
state = "fadingIn"
this.setX((screenX / 2 - width / 2) + (frames * pixelPerFrame))
addEventHandler("onClientRender", getRootElement(), function()
if not (instanceAlive) then
removeEventHandler("onClientRender", getRootElement(), debug.getinfo(1,"f").func)
else
if (this.getX() <= screenX / 2 - width / 2) then
state = "fadedIn"
removeEventHandler("onClientRender", getRootElement(), debug.getinfo(1,"f").func)
buttonFadedInFunction()
else -- freeze alpha when max alpha
this.setX(this.getX() - pixelPerFrame)
local alpha = this.getAlpha()
if (alpha <= 255 - alphaPerFrame) then
this.setAlpha(this.getAlpha() + alphaPerFrame)
elseif (alpha < 255) and (alpha > alpha - alphaPerFrame) then
this.setAlpha(255)
end
end
end
end
)
end
end
end
end
function this.delete()
instanceAlive = false
this = nil
end
return this
end
| 29.476364
| 147
| 0.608562
|
5d8526bbc9ca05b3cea9dc75b261669fe244cff1
| 6,971
|
hpp
|
C++
|
Code/Foundation/Common/Containers/SlotMap.hpp
|
WelderUpdates/WelderEngineRevamp
|
1c665239566e9c7156926852f7952948d9286d7d
|
[
"MIT"
] | 3
|
2022-02-11T10:34:33.000Z
|
2022-02-24T17:44:17.000Z
|
Code/Foundation/Common/Containers/SlotMap.hpp
|
WelderUpdates/WelderEngineRevamp
|
1c665239566e9c7156926852f7952948d9286d7d
|
[
"MIT"
] | null | null | null |
Code/Foundation/Common/Containers/SlotMap.hpp
|
WelderUpdates/WelderEngineRevamp
|
1c665239566e9c7156926852f7952948d9286d7d
|
[
"MIT"
] | null | null | null |
// MIT Licensed (see LICENSE.md).
#pragma once
#include "ContainerCommon.hpp"
#include "Memory/Allocator.hpp"
namespace Zero
{
/// Intrusive slot map container. Uses an array of slots combined with
// a unique id. Value Type MUST be a pointer.
template <typename keyType, typename dataType, typename slotPolicy, typename Allocator = DefaultAllocator>
class Slotmap : public AllocationContainer<Allocator>
{
public:
typedef dataType data_type;
typedef dataType* pointer;
typedef const dataType* const_pointer;
typedef dataType& reference;
typedef const dataType& const_reference;
typedef ptrdiff_t difference_type;
typedef Slotmap<keyType, dataType, slotPolicy> this_type;
typedef AllocationContainer<Allocator> base_type;
using base_type::mAllocator;
static const size_t InvalidSlotIndex = 0xFFFFFFFF;
pointer mData;
data_type mNextFree;
size_t mLargestSize;
size_t mMaxSize;
size_t mSize;
pointer mBegin;
pointer mEnd;
Slotmap()
{
mSize = 0;
mMaxSize = 0;
mLargestSize = 0;
mNextFree = nullptr;
mBegin = nullptr;
mEnd = nullptr;
mData = nullptr;
}
~Slotmap()
{
Deallocate();
}
// The range/iterator for this container may not be intuitive.
// We move over an array of slots just like iterating over
// array of object pointers. The difference is that
// invalid slots must be skipped over.
struct range
{
public:
typedef dataType value_type;
typedef data_type FrontResult;
range(pointer b, pointer e, this_type* owner) : begin(b), end(e), owner(owner)
{
}
bool Empty()
{
return begin == end;
}
// NOT a reference
data_type Front()
{
ErrorIf(Empty(), "Accessed empty range.");
return *begin;
}
void PopFront()
{
ErrorIf(Empty(), "Popped empty range.");
++begin;
// Skip over slots
begin = owner->SkipInvalid(begin, end);
}
range& All()
{
return *this;
}
const range& All() const
{
return *this;
}
private:
pointer begin;
pointer end;
this_type* owner;
};
range All()
{
pointer begin = PointerBegin();
pointer end = PointerEnd();
begin = SkipInvalid(begin, end);
return range(begin, end, this);
}
bool IsValid(data_type objPointer)
{
if (objPointer == nullptr)
return false;
size_t* valueTableBase = (size_t*)mBegin;
size_t* endOfValueTable = (size_t*)mEnd;
if ((size_t*)objPointer < endOfValueTable && (size_t*)objPointer >= valueTableBase)
return false;
else
return true;
}
data_type FindValue(keyType& id)
{
// Get the slot index from the id
size_t slotIndex = id.GetSlot();
if (slotIndex > mMaxSize)
return nullptr;
// Get the value from the table
data_type objPointer = mData[slotIndex];
// This value may be a part of the internal free slot list
// not a valid object pointer
if (IsValid(objPointer))
{
// The pointer is valid by it may point to a object
// that has replaced the deleted object in the slot.
// Check to see if the id is equal.
keyType& foundId = slotPolicy::AccessId(objPointer);
// Use operator equals for the id.
if (foundId == id)
{
// id and object match this is correct object
return objPointer;
}
}
return nullptr;
}
range Find(keyType& id)
{
if (mData == nullptr)
return range(PointerEnd(), PointerEnd(), this);
data_type value = FindValue(id);
if (value == nullptr)
return range(PointerEnd(), PointerEnd(), this);
else
{
pointer b = PointerBegin() + id.GetSlot();
return range(b, b + 1, this);
}
}
/// Is the container empty?
bool Empty()
{
return mSize == 0;
}
// How many elements are stored in the container.
size_t Size()
{
return mSize;
}
void Clear()
{
mSize = 0;
InitializeSlots(0, mMaxSize);
}
void Erase(keyType& eraseId)
{
// This slot index is now free
size_t slotIndex = eraseId.GetSlot();
ErrorIf(slotIndex > mMaxSize, "Invalid slot index.");
// Get the value from the table
data_type pointer = mData[slotIndex];
keyType& foundId = slotPolicy::AccessId(pointer);
if (foundId == eraseId)
{
AddToFreeList(eraseId.GetSlot());
// Reduce the size
--mSize;
#ifdef ZeroDebug
eraseId.GetSlot() = InvalidSlotIndex;
#endif
}
}
void Erase(data_type objectToErase)
{
keyType& eraseId = slotPolicy::AccessId(objectToErase);
return Erase(eraseId);
}
void Deallocate()
{
if (mMaxSize != 0)
{
mAllocator.Deallocate(mData, mMaxSize * sizeof(data_type));
mSize = 0;
mMaxSize = 0;
mData = nullptr;
mNextFree = nullptr;
}
}
// Must already have a unique id
void Insert(data_type object)
{
keyType& insertKey = slotPolicy::AccessId(object);
if (mNextFree == nullptr)
{
// Need more slots
size_t currentSize = mMaxSize;
size_t newMaxSize = mMaxSize * 2;
if (newMaxSize == 0)
newMaxSize = 4;
pointer newTable = (pointer)mAllocator.Allocate(newMaxSize * sizeof(dataType));
// Copy over old elements
if (mMaxSize != 0)
{
mAllocator.MemCopy(newTable, mData, mMaxSize * sizeof(dataType));
mAllocator.Deallocate(mData, mMaxSize * sizeof(data_type));
}
mData = newTable;
mMaxSize = newMaxSize;
InitializeSlots(currentSize, newMaxSize);
mBegin = mData;
mEnd = mData + mMaxSize;
}
size_t* base = (size_t*)mBegin;
size_t index = (size_t*)mNextFree - base;
mNextFree = *(data_type*)mNextFree;
insertKey.Slot = index;
mData[index] = object;
// increase the size
++mSize;
// increase the watermark size
if (mSize > mLargestSize)
mLargestSize = mSize;
}
private:
void InitializeSlots(size_t startIndex, size_t endIndex)
{
for (size_t i = startIndex; i < endIndex - 1; ++i)
{
data_type next = (data_type)&mData[i + 1];
mData[i] = next;
}
mData[endIndex - 1] = nullptr;
mNextFree = (data_type)&mData[startIndex];
}
void AddToFreeList(size_t slotIndex)
{
// Get a pointer to the slot
size_t* base = (size_t*)mBegin;
size_t* next = base + slotIndex;
// Set it to the current free and the next
// free to this one.
mData[slotIndex] = (data_type)mNextFree;
mNextFree = (data_type)next;
}
pointer SkipInvalid(pointer cur, pointer end)
{
// While not at the end of the list
// and the slot is invalid move the pointer forward.
while (cur != end && !IsValid(*cur))
++cur;
return cur;
}
pointer PointerBegin()
{
return mBegin;
}
pointer PointerEnd()
{
return mEnd;
}
// non copyable
Slotmap(const Slotmap& other);
void operator=(const Slotmap& other);
};
} // namespace Zero
| 22.130159
| 106
| 0.629465
|
dd241b078200435b791dda8d3216f3cf7d0d4d81
| 959
|
lua
|
Lua
|
utils/_actions/hue.lua
|
asmagill/hammerspoon-config-take2
|
53148f9e960eb9d5f3467f16c955f8c256da58a3
|
[
"MIT"
] | 27
|
2017-11-05T19:01:44.000Z
|
2021-09-17T15:08:57.000Z
|
utils/_actions/hue.lua
|
zhangaz1/hammerspoon-config-take2
|
3cf7deadbe010a4890c935b1a48d1037fadfd857
|
[
"MIT"
] | 3
|
2018-04-05T08:24:30.000Z
|
2020-04-30T05:51:52.000Z
|
utils/_actions/hue.lua
|
asmagill/hammerspoon-config-take2
|
53148f9e960eb9d5f3467f16c955f8c256da58a3
|
[
"MIT"
] | 3
|
2019-01-13T07:07:05.000Z
|
2021-07-04T06:23:48.000Z
|
local hue = require("hs._asm.hue")
local timer = require("hs.timer")
local module = {}
local waitForDefault = timer.waitUntil(function()
return hue.default ~= nil
end, function(t)
waitForDefault = nil
local _groupMappings = {}
for k,v in pairs(hue.default:get("/groups")) do
_groupMappings[v.name] = k
end
module.livingRoom = function(state)
if type(state) == "nil" then
local ans = hue.default:get("/groups/" .. _groupMappings["Living Room"]).state
return ans.all_on, ans.any_on
else
local change = {}
if type(state) == "number" then change.bri = state end
if type(state) == "boolean" then change.on = state end
if type(state) == "table" then change = state end
return hue.default:put("/groups/" .. _groupMappings["Living Room"] .. "/action", change)
end
end
_lr = module.livingRoom
end)
return module
| 29.060606
| 100
| 0.600626
|
2c35d47af136555335b19681ee4048483a0676d0
| 1,425
|
py
|
Python
|
tests/decomposition_tests.py
|
gf712/PyML
|
83849ff6e1c1bbcf9b87826ef673fb34622a0539
|
[
"MIT"
] | 4
|
2018-11-23T07:45:51.000Z
|
2020-12-29T19:32:06.000Z
|
tests/decomposition_tests.py
|
gf712/PyML
|
83849ff6e1c1bbcf9b87826ef673fb34622a0539
|
[
"MIT"
] | 18
|
2017-11-16T08:32:42.000Z
|
2017-12-27T15:19:58.000Z
|
tests/decomposition_tests.py
|
gf712/PyML
|
83849ff6e1c1bbcf9b87826ef673fb34622a0539
|
[
"MIT"
] | 3
|
2018-10-31T17:09:22.000Z
|
2020-03-02T22:40:23.000Z
|
import unittest
from pyml.decomposition import PCA
from pyml.datasets import load_iris
class PCATest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.X, cls.y = load_iris()
cls.decomposer = PCA()
cls.decomposer.train(X=cls.X)
def test_PCA_n_components(self):
self.assertEqual(self.decomposer.n_components, 4)
def test_PCA_eigenvalues(self):
self.assertCountEqual(self.decomposer.eigenvalues, [4.1966751631979795, 0.24062861448333198,
0.07800041537352681, 0.023525140278494793])
def test_PCA_eigenvectors(self):
self.assertAlmostEqual(self.decomposer.eigenvectors[0][2], 0.5809972798275975)
def test_PCA_transform(self):
self.assertAlmostEqual(self.decomposer.transform(self.X)[1][2], 0.203521425006)
def test_PCA_train_transform(self):
self.assertAlmostEqual(self.decomposer.train_transform(self.X)[1][2], 0.203521425006)
def test_PCA_inverse(self):
R = self.decomposer.train_transform(self.X)
self.assertAlmostEqual(self.decomposer.inverse(R)[1][2], self.X[1][2])
def test_PCA_explained_var(self):
self.assertAlmostEqual(self.decomposer.explained_variance[0], 4.1966751631979795)
def test_PCA_explained_var_ratio(self):
self.assertAlmostEqual(self.decomposer.explained_variance_ratio[0], 0.9246162071742684)
| 36.538462
| 103
| 0.705965
|
9290b4cfcd4c4a46667090cd1d26bbe27e588aac
| 412
|
sql
|
SQL
|
db/stored-procedures/SetContextData.sql
|
amosvoron/edipi
|
099c2dc50b312396aa20205c2470ef5b721b6b59
|
[
"MIT"
] | null | null | null |
db/stored-procedures/SetContextData.sql
|
amosvoron/edipi
|
099c2dc50b312396aa20205c2470ef5b721b6b59
|
[
"MIT"
] | null | null | null |
db/stored-procedures/SetContextData.sql
|
amosvoron/edipi
|
099c2dc50b312396aa20205c2470ef5b721b6b59
|
[
"MIT"
] | null | null | null |
/*
Object: dbo.SetContectData
Description: Sets CONTEXT_INFO variable associated with the current session or connection.
*/
CREATE PROCEDURE [dbo].[SetContextData]
@DATA As varchar(128)
AS
DECLARE @CONTEXT_INFO varbinary(128);
SELECT @CONTEXT_INFO =
Cast(Cast(@DATA As varchar(127)) +
Space(128) As binary(128)); -- add WHITESPACE up to fill up 128 bytes
SET CONTEXT_INFO @CONTEXT_INFO;
GO
| 17.166667
| 90
| 0.735437
|
b016e2c584208861ca322d61510efbf05a87efb1
| 5,050
|
py
|
Python
|
src/market_watcher/common.py
|
mcf-long-short/ibkr-options-volatility-trading
|
2942456b1023618ac3f9741405029d9d3b08be13
|
[
"MIT"
] | 28
|
2021-06-05T23:55:50.000Z
|
2022-03-30T01:09:22.000Z
|
src/market_watcher/common.py
|
sarangab/ibkr-options-volatility-trading
|
2942456b1023618ac3f9741405029d9d3b08be13
|
[
"MIT"
] | 1
|
2021-06-05T10:45:14.000Z
|
2021-06-05T10:45:14.000Z
|
src/market_watcher/common.py
|
sarangab/ibkr-options-volatility-trading
|
2942456b1023618ac3f9741405029d9d3b08be13
|
[
"MIT"
] | 8
|
2021-06-08T06:42:02.000Z
|
2021-11-15T18:35:38.000Z
|
import time
from enum import Enum
import yaml
from yahoofinancials import YahooFinancials
from market_watcher.config import context
class STRATEGIES(Enum):
LONG_STRADDLE = "long straddle"
SHORT_STRADDLE = "short straddle"
def get_terget_stocks(file_path):
"""Reads target stocks for long/short straddle strategies."""
try:
with open(file_path) as f:
target_stocks = yaml.load(f, Loader=yaml.FullLoader)
return target_stocks
except Exception as e:
print(e)
def get_email_config():
"""Returns email notifier related configuration."""
email_config = {}
email_config["hostname"] = context.config["SMTP_HOSTNAME"]
email_config["port"] = context.config["SMTP_PORT"]
email_config["username"] = context.config["SMTP_USERNAME"]
email_config["password"] = context.config["SMTP_PASSWORD"]
email_config["sender"] = context.config["EMAIL_SENDER"]
email_config["recipients"] = context.config["EMAIL_RECIPIENTS"]
return email_config
def get_pnl_threashold_config():
"""Returns strategy alert configuration."""
pnl_threashold = {}
pnl_threashold["LONG_THRESHOLD"] = float(context.config["LONG_THRESHOLD"])
pnl_threashold["SHORT_THRESHOLD"] = float(context.config["SHORT_THRESHOLD"])
return pnl_threashold
def get_slack_config():
slack_config = {}
slack_config["long url"] = context.config["SLACK_LONG_WEBHOOK"]
slack_config["short url"] = context.config["SLACK_SHORT_WEBHOOK"]
return slack_config
class MarketWatcherEngine:
"""MarketWatcher core engine logic for scarping financial data."""
def __init__(self, target_stocks=None, notifiers=None):
self.target_stocks = target_stocks
self.notifiers = notifiers
pnl_threashold_config = get_pnl_threashold_config()
self.long_threshlold = pnl_threashold_config["LONG_THRESHOLD"]
self.short_threshlold = pnl_threashold_config["SHORT_THRESHOLD"]
self.daily_pnls = None
def search_for_intestment_opportunities(self):
# Update interval for sending email notifications
update_timeout = int(context.config["UPDATE_TIMEOUT"])
# Remaining time until email alert
remaining_seconds = update_timeout
while context.running:
if remaining_seconds > 0:
remaining_seconds -= 1
time.sleep(1)
else:
remaining_seconds = update_timeout
self.process_latest_market_movements()
def process_latest_market_movements(self):
"""Goes through each target stock and checks if there is a
potential invetment opportunity.
If the opportunity is found trader is notified about it though email
noticication stating which options trading strategy trader should
implement.
"""
self.daily_pnls = self.get_daily_pnls()
investment_opportunities = []
for ticker in self.target_stocks:
if self.is_investment_opportunity(
self.target_stocks[ticker]["strategy"], abs(self.daily_pnls[ticker])
):
investment_opportunities.append(ticker)
investment_data = self.get_investment_data(investment_opportunities)
self.notify(investment_data)
return investment_data
def notify(self, investment_data):
"""Sends investment updates to subscribed notifiers."""
if self.notifiers:
for notifier in self.notifiers:
notifier.notify(investment_data)
def get_daily_pnls(self):
"""Returns daily pnls"""
target_stocks = list(self.target_stocks.keys())
yahoo_financials_target_stocks = YahooFinancials(target_stocks)
return yahoo_financials_target_stocks.get_current_percent_change()
def get_investment_data(self, investment_opportunities):
"""Returns two dictionaries that contain investment data for both strategies"""
long_straddle = {}
short_straddle = {}
for ticker in investment_opportunities:
if STRATEGIES.LONG_STRADDLE.value == self.target_stocks[ticker]["strategy"]:
long_straddle[ticker] = self.daily_pnls[ticker]
elif (
STRATEGIES.SHORT_STRADDLE.value
== self.target_stocks[ticker]["strategy"]
):
short_straddle[ticker] = self.daily_pnls[ticker]
return {
STRATEGIES.LONG_STRADDLE.value: long_straddle,
STRATEGIES.SHORT_STRADDLE.value: short_straddle,
}
def is_investment_opportunity(self, strategy, abs_daily_pnl):
"""Check if the stock is applicable for one of the options trading strategies."""
if STRATEGIES.LONG_STRADDLE.value == strategy:
if abs_daily_pnl > self.long_threshlold:
return True
elif STRATEGIES.SHORT_STRADDLE.value == strategy:
if abs_daily_pnl < self.short_threshlold:
return True
return False
| 34.827586
| 89
| 0.676634
|
1334a231788bc74cc63e09d821c50403dd9b26ae
| 466
|
rb
|
Ruby
|
app/controllers/projects/builds_controller.rb
|
smile0913/gitlabhq
|
a7f114b1368fd11dba036f67b2ef66c2bf39f02a
|
[
"MIT"
] | 1
|
2021-04-08T12:17:34.000Z
|
2021-04-08T12:17:34.000Z
|
app/controllers/projects/builds_controller.rb
|
smile0913/gitlabhq
|
a7f114b1368fd11dba036f67b2ef66c2bf39f02a
|
[
"MIT"
] | null | null | null |
app/controllers/projects/builds_controller.rb
|
smile0913/gitlabhq
|
a7f114b1368fd11dba036f67b2ef66c2bf39f02a
|
[
"MIT"
] | 1
|
2020-11-04T05:26:42.000Z
|
2020-11-04T05:26:42.000Z
|
class Projects::BuildsController < Projects::ApplicationController
before_action :authorize_read_build!
def index
redirect_to namespace_project_jobs_path(project.namespace, project)
end
def show
redirect_to namespace_project_job_path(project.namespace, project, job)
end
def raw
redirect_to raw_namespace_project_job_path(project.namespace, project, job)
end
private
def job
@job ||= project.builds.find(params[:id])
end
end
| 21.181818
| 79
| 0.770386
|
af657aad155897d3c17e06bce26c4cee7d31f327
| 46
|
py
|
Python
|
test.py
|
angel-2022cal/PyPoll_with_Python
|
d249376f787c131787210fde6e758b2591ea3555
|
[
"MIT"
] | null | null | null |
test.py
|
angel-2022cal/PyPoll_with_Python
|
d249376f787c131787210fde6e758b2591ea3555
|
[
"MIT"
] | null | null | null |
test.py
|
angel-2022cal/PyPoll_with_Python
|
d249376f787c131787210fde6e758b2591ea3555
|
[
"MIT"
] | null | null | null |
print("test")
type(3)
ballots = 1,342
ballots
| 11.5
| 15
| 0.695652
|
4d26a6c3ad8e45515871ef1bc32970e5e8813e38
| 370
|
cs
|
C#
|
DesignPatternsCore/Program.cs
|
yellow-dart/DesignPatterns
|
2668ed168395f533fa674df5993f2253d3c7be86
|
[
"MIT"
] | null | null | null |
DesignPatternsCore/Program.cs
|
yellow-dart/DesignPatterns
|
2668ed168395f533fa674df5993f2253d3c7be86
|
[
"MIT"
] | null | null | null |
DesignPatternsCore/Program.cs
|
yellow-dart/DesignPatterns
|
2668ed168395f533fa674df5993f2253d3c7be86
|
[
"MIT"
] | null | null | null |
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using DesignPatternsCore.FactoryPattern;
namespace DesignPatternsCore
{
class Program
{
public static void Main()
{
var player = PlayerFactory.LoadPlayer();
var monster = MonsterFactory.CreateRandomMonster();
}
}
}
| 19.473684
| 63
| 0.667568
|
0de56624e955fc3846080ac34e345421ba80df0e
| 543
|
cs
|
C#
|
Fishing Legends/Assets/Scripts/Login/SignInPageBehaviour.cs
|
PolyPlus/FishingLegends
|
9a210cddcbc9e224be6d6830bf52b88e79b68fdd
|
[
"Apache-2.0"
] | null | null | null |
Fishing Legends/Assets/Scripts/Login/SignInPageBehaviour.cs
|
PolyPlus/FishingLegends
|
9a210cddcbc9e224be6d6830bf52b88e79b68fdd
|
[
"Apache-2.0"
] | null | null | null |
Fishing Legends/Assets/Scripts/Login/SignInPageBehaviour.cs
|
PolyPlus/FishingLegends
|
9a210cddcbc9e224be6d6830bf52b88e79b68fdd
|
[
"Apache-2.0"
] | null | null | null |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SignInPageBehaviour : MonoBehaviour
{
[SerializeField]
private InputField username;
[SerializeField]
private InputField password;
[SerializeField]
private Canvas LogInCanvas;
public void OnClickGoBack()
{
LogInCanvas.gameObject.SetActive(true);
this.gameObject.SetActive(false);
}
public void OnClickSignIn()
{
Debug.Log("SignIn Pulsado" );
}
}
| 19.392857
| 48
| 0.686924
|
0dbeb9ef94763c1e3f7888d861b8ab0c6b7ca8ee
| 1,438
|
cs
|
C#
|
WinRT XAML Toolkit - 1.3.6.0 - Source.zip/WinRTXamlToolkit.Composition/WriteableBitmapRenderExtensions.cs
|
prabaprakash/Media_Player
|
5fef07ae55295cdc1f684e9151f2ac78f16515f3
|
[
"OML"
] | 1
|
2020-04-12T07:26:53.000Z
|
2020-04-12T07:26:53.000Z
|
WinRT XAML Toolkit - 1.3.6.0 - Source.zip/WinRTXamlToolkit.Composition/WriteableBitmapRenderExtensions.cs
|
prabaprakash/Media-Player
|
5fef07ae55295cdc1f684e9151f2ac78f16515f3
|
[
"OML"
] | null | null | null |
WinRT XAML Toolkit - 1.3.6.0 - Source.zip/WinRTXamlToolkit.Composition/WriteableBitmapRenderExtensions.cs
|
prabaprakash/Media-Player
|
5fef07ae55295cdc1f684e9151f2ac78f16515f3
|
[
"OML"
] | null | null | null |
using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Imaging;
namespace WinRTXamlToolkit.Composition
{
// Thanks to Christoph Wille and his WinRT-snippets
// https://github.com/christophwille/winrt-snippets/tree/master/RenderTextToBitmap
// http://stackoverflow.com/questions/9151615/how-does-one-use-a-memory-stream-instead-of-files-when-rendering-direct2d-images
public static class WriteableBitmapRenderExtensions
{
//Do not use the below extension as it is slower than the one that follows
//public static async Task Render(this WriteableBitmap wb, FrameworkElement fe)
//{
// var ms = await RenderToPngStream(fe);
// using (var msrandom = new MemoryRandomAccessStream(ms))
// {
// await wb.SetSourceAsync(msrandom);
// }
//}
public static async Task<WriteableBitmap> Render(FrameworkElement fe)
{
using (var engine = new CompositionEngine())
{
return await engine.RenderToWriteableBitmap(fe);
}
}
public static async Task<MemoryStream> RenderToPngStream(FrameworkElement fe)
{
using (var engine = new CompositionEngine())
{
return await engine.RenderToPngStream(fe);
}
}
}
}
| 32.681818
| 130
| 0.637691
|
72ad59a4f988d4edbfa08762192d52e06e59d315
| 2,157
|
cs
|
C#
|
UI/Docking/DockingGroupBehavior.cs
|
Invivoo-software/xcomponent.ui
|
3d90ba1003268cbcc11f692cb0d8e6e796e86ebd
|
[
"Apache-2.0"
] | 2
|
2015-12-22T16:19:20.000Z
|
2016-08-02T19:20:32.000Z
|
UI/Docking/DockingGroupBehavior.cs
|
xcomponent/xcomponent.ui
|
3d90ba1003268cbcc11f692cb0d8e6e796e86ebd
|
[
"Apache-2.0"
] | 3
|
2015-07-23T09:07:16.000Z
|
2015-08-14T13:12:46.000Z
|
UI/Docking/DockingGroupBehavior.cs
|
Invivoo-software/xcomponent.ui
|
3d90ba1003268cbcc11f692cb0d8e6e796e86ebd
|
[
"Apache-2.0"
] | null | null | null |
using System;
using System.Windows;
using System.Windows.Interactivity;
using Syncfusion.Windows.Tools.Controls;
namespace XComponent.Common.UI.Docking
{
public class DockingGroupBehavior : Behavior<FrameworkElement>
{
protected override void OnAttached()
{
if (!XCDocking.IsLoadingLayout)
{
if (string.IsNullOrWhiteSpace(this.GroupName)) throw new ArgumentException("Missing argument", "GroupName");
if (this.DockSide == DockSide.Tabbed || this.DockSide == DockSide.None) throw new ArgumentException("Invalid value", "DockSide");
var groupElement = LogicalTreeHelper.FindLogicalNode(Application.Current.MainWindow, this.GroupName);
if (groupElement == null)
{
this.AssociatedObject.Name = this.GroupName;
DockingManager.SetState(this.AssociatedObject, DockState.Dock);
DockingManager.SetSideInDockedMode(this.AssociatedObject, this.DockSide);
}
else
{
DockingManager.SetSideInDockedMode(this.AssociatedObject, DockSide.Tabbed);
DockingManager.SetTargetNameInDockedMode(this.AssociatedObject, this.GroupName);
}
}
base.OnAttached();
}
public static readonly DependencyProperty GroupNameProperty = DependencyProperty.Register(
"GroupName", typeof (string), typeof (DockingGroupBehavior), new PropertyMetadata(default(string)));
public string GroupName
{
get { return (string) GetValue(GroupNameProperty); }
set { SetValue(GroupNameProperty, value); }
}
public static readonly DependencyProperty DockSideProperty = DependencyProperty.Register(
"DockSide", typeof (DockSide), typeof (DockingGroupBehavior), new PropertyMetadata(default(DockSide)));
public DockSide DockSide
{
get { return (DockSide) GetValue(DockSideProperty); }
set { SetValue(DockSideProperty, value); }
}
}
}
| 39.944444
| 145
| 0.629115
|
0dde5a8bd40a2700b138ea26ec40b6f80051e60f
| 1,958
|
cs
|
C#
|
test/BuildMaster.Net.Tests/Variables/Release/BuildMasterClientShould.cs
|
lvermeulen/BuildMaster.Net
|
f9fad0a9480dd7c0dee07a85d59ba877e5ed7085
|
[
"MIT"
] | null | null | null |
test/BuildMaster.Net.Tests/Variables/Release/BuildMasterClientShould.cs
|
lvermeulen/BuildMaster.Net
|
f9fad0a9480dd7c0dee07a85d59ba877e5ed7085
|
[
"MIT"
] | 38
|
2017-06-05T11:55:29.000Z
|
2017-07-09T17:19:50.000Z
|
test/BuildMaster.Net.Tests/Variables/Release/BuildMasterClientShould.cs
|
lvermeulen/BuildMaster.Net
|
f9fad0a9480dd7c0dee07a85d59ba877e5ed7085
|
[
"MIT"
] | null | null | null |
using System.Threading.Tasks;
using BuildMaster.Net.Common.Models;
using Xunit;
// ReSharper disable CheckNamespace
namespace BuildMaster.Net.Tests
{
public partial class BuildMasterClientShould
{
[Theory]
[InlineData("TestApplication", "0.0.3")]
public async Task GetAllReleaseConfigurationVariables(string applicationName, string releaseNumber)
{
var results = await _client.GetAllReleaseConfigurationVariables(applicationName, releaseNumber).ConfigureAwait(false);
Assert.NotNull(results);
Assert.NotEmpty(results);
}
[Theory]
[InlineData("TestApplication", "0.0.3", "ReleaseVariableTemp2")]
public async Task GetSingleReleaseConfigurationVariable(string applicationName, string releaseNumber, string variableName)
{
string result = await _client.GetSingleReleaseConfigurationVariable(applicationName, releaseNumber, variableName).ConfigureAwait(false);
Assert.NotNull(result);
}
[Theory]
[InlineData("TestApplication", "0.0.3", "ReleaseVariableTemp2")]
public async Task SetSingleReleaseConfigurationVariable(string applicationName, string releaseNumber, string variableName)
{
bool result = await _client.SetSingleReleaseConfigurationVariable(applicationName, releaseNumber, new Variable { Name = variableName, Value = $"{System.DateTime.UtcNow}" }).ConfigureAwait(false);
Assert.True(result);
}
[Theory]
[InlineData("TestApplication", "0.0.3", "ReleaseVariableTemp2")]
public async Task DeleteSingleReleaseConfigurationVariable(string applicationName, string releaseNumber, string variableName)
{
bool result = await _client.DeleteSingleReleaseConfigurationVariable(applicationName, releaseNumber, variableName).ConfigureAwait(false);
Assert.True(result);
}
}
}
| 39.959184
| 207
| 0.70429
|
a138f9c34b5592e596c9f4fcb5e27f1ecfa469f9
| 6,709
|
tsx
|
TypeScript
|
gui/src/kg/components/kg/KgHomePage.tsx
|
tetherless-world/mcs-portal
|
740a319916b86c765a117fe08b8f8299930ed5d1
|
[
"MIT"
] | 2
|
2020-08-28T01:30:22.000Z
|
2021-07-13T20:53:24.000Z
|
gui/src/kg/components/kg/KgHomePage.tsx
|
tetherless-world/mcs-apps
|
740a319916b86c765a117fe08b8f8299930ed5d1
|
[
"MIT"
] | 115
|
2020-07-07T19:38:20.000Z
|
2020-12-17T20:10:39.000Z
|
gui/src/kg/components/kg/KgHomePage.tsx
|
tetherless-world/mcs-apps
|
740a319916b86c765a117fe08b8f8299930ed5d1
|
[
"MIT"
] | null | null | null |
import * as React from "react";
import {KgSearchBox} from "kg/components/kg/search/KgSearchBox";
import {KgFrame} from "kg/components/frame/KgFrame";
import {
Button,
Container,
createStyles,
Grid,
List,
ListItem,
ListItemText,
makeStyles,
Typography,
} from "@material-ui/core";
import {kgId} from "shared/api/kgId";
import {useQuery} from "@apollo/react-hooks";
import {KgHomePageQuery} from "kg/api/queries/types/KgHomePageQuery";
import * as KgHomePageQueryDocument from "kg/api/queries/KgHomePageQuery.graphql";
import {KgSourceSelect} from "kg/components/kg/search/KgSourceSelect";
import {KgSearchQuery, StringFilter} from "kg/api/graphqlGlobalTypes";
import {KgSearchLink} from "shared/components/kg/search/KgSearchLink";
import {KgSearchForm} from "kg/components/kg/search/KgSearchForm";
import {Link} from "react-router-dom";
import {Hrefs} from "shared/Hrefs";
import {HrefsContext} from "shared/HrefsContext";
// Constants
const CONCEPT_NET_SOURCE_ID = "CN";
const WORD_NET_SOURCE_ID = "WN";
const useStyles = makeStyles((theme) =>
createStyles({
container: {
paddingTop: theme.spacing(5),
},
sourceSelectContainer: {
display: "inline-flex",
verticalAlign: "top",
},
sourceSelectSelect: {
paddingLeft: "1em",
width: "24em",
},
title: {
fontFamily: "Hiragino Maru Gothic Pro",
},
primaryText: {
color: theme.palette.primary.main,
},
})
);
const ExampleNodeLabelListItem: React.FunctionComponent<React.PropsWithChildren<{
nodeLabel: string;
}>> = ({children, nodeLabel}) => {
const hrefs = React.useContext<Hrefs>(HrefsContext);
return (
<ListItem>
<ListItemText>
<Link to={hrefs.kg({id: kgId}).nodeLabel({label: nodeLabel})}>
{children}
</Link>
</ListItemText>
</ListItem>
);
};
const ExampleSearchListItem: React.FunctionComponent<React.PropsWithChildren<{
query: KgSearchQuery;
}>> = ({children, query}) => (
<ListItem>
<ListItemText>
<KgSearchLink query={query}>{children}</KgSearchLink>
</ListItemText>
</ListItem>
);
export const KgHomePage: React.FunctionComponent = () => {
const classes = useStyles();
const query = useQuery<KgHomePageQuery>(KgHomePageQueryDocument, {
variables: {kgId},
});
const [sourcesFilter, setSourcesFilter] = React.useState<StringFilter | null>(
null
);
return (
<KgFrame hideNavbarSearchBox={true} {...query}>
{({data}) => {
const sources = data.kgById.sources;
return (
<KgSearchForm>
{({onChangeSearchBoxValue, onSubmit}) => (
<Container maxWidth="lg" className={classes.container}>
<Grid container direction="column" spacing={3}>
<Grid item>
<Typography variant="h2" className={classes.title}>
Common Sense Knowledge Graph
</Typography>
</Grid>
<Grid item>
{data && (
<Grid container direction="column" spacing={2}>
<Grid item>
<KgSearchBox
allSources={data.kgById.sources}
autoFocus
filters={
sourcesFilter
? {sourceIds: sourcesFilter}
: undefined
}
onChange={onChangeSearchBoxValue}
onSubmit={onSubmit}
placeholder="Search a word or try a query"
/>
</Grid>
<Grid item>
<KgSourceSelect
containerClassName={classes.sourceSelectContainer}
onChange={setSourcesFilter}
selectClassName={classes.sourceSelectSelect}
sources={sources}
value={sourcesFilter || undefined}
></KgSourceSelect>
</Grid>
<Grid item>
<Grid container direction="row">
<Grid item>
<Button
color="primary"
type="submit"
variant="contained"
>
Search
</Button>
</Grid>
</Grid>
</Grid>
</Grid>
)}
</Grid>
<Grid item>
<h2>Examples:</h2>
<List>
<ExampleNodeLabelListItem nodeLabel="food">
Nodes with the label "food"
</ExampleNodeLabelListItem>
<ExampleNodeLabelListItem nodeLabel="beer">
Nodes with the label "beer"
</ExampleNodeLabelListItem>
<ExampleSearchListItem query={{text: "animal"}}>
Nodes relating to "animal"
</ExampleSearchListItem>
{sources.some(
(source) => source.id === CONCEPT_NET_SOURCE_ID
) ? (
<ExampleSearchListItem
query={{
filters: {
sourceIds: {include: [CONCEPT_NET_SOURCE_ID]},
},
}}
>
All nodes in ConceptNet
</ExampleSearchListItem>
) : null}
{sources.some(
(source) => source.id === WORD_NET_SOURCE_ID
) ? (
<ExampleSearchListItem
query={{
filters: {
sourceIds: {include: [WORD_NET_SOURCE_ID]},
},
}}
>
All nodes in WordNet
</ExampleSearchListItem>
) : null}
</List>
</Grid>
</Grid>
</Container>
)}
</KgSearchForm>
);
}}
</KgFrame>
);
};
| 34.229592
| 82
| 0.463705
|
db796eaef016e85c338aed1447d14b202ce7972b
| 6,207
|
php
|
PHP
|
resources/views/admin/task/form/form.blade.php
|
alifakbarr/karyawan-app
|
99c2be01734ab07f99821413e8418f163bbac160
|
[
"MIT"
] | null | null | null |
resources/views/admin/task/form/form.blade.php
|
alifakbarr/karyawan-app
|
99c2be01734ab07f99821413e8418f163bbac160
|
[
"MIT"
] | null | null | null |
resources/views/admin/task/form/form.blade.php
|
alifakbarr/karyawan-app
|
99c2be01734ab07f99821413e8418f163bbac160
|
[
"MIT"
] | null | null | null |
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label fw-bold">Nama Proyek</label>
<input type="text" class="form-control" name="judul" id="exampleFormControlInput1" placeholder="Judul proyek" value="{{ old('judul') ?? $task->judul }}">
@error('judul')
<div class="nama text-danger mt-1">
{{ $message }}
</div>
@enderror
</div>
<div class="input-group mb-3">
<span class="input-group-text">Mulai</span>
<input type="date" class="form-control" placeholder="Username" aria-label="Username" name="start" value="{{ old('start') ?? $task->start }}">
<span class="input-group-text">Akhir</span>
<input type="date" class="form-control" placeholder="Server" aria-label="Server" name="deadLine" value="{{ old('deadLine') ?? $task->deadLine }}">
</div>
@error('start')
<div class="nama text-danger mt-1">
{{ $message }}
</div>
@enderror
@error('deadLine')
<div class="nama text-danger mt-1">
{{ $message }}
</div>
@enderror
<div class="mb-3">
<label class="form-label fw-bold">Keterangan Proyek</label>
<textarea class="form-control" id="editor" rows="1" name="keterangan" placeholder="keterangan proyek" >{{ old('keterangan') ?? $task->keterangan }}</textarea>
@error('keterangan')
<div class="nama text-danger mt-1">
{{ $message }}
</div>
@enderror
<table class="table">
<thead>
<tr>
<th scope="col">Bagian</th>
<th scope="col">Karyawan</th>
<th scope="col">
<button class="btn btn-sm btn-success">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-plus" viewBox="0 0 16 16">
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
</svg>
</button>
</th>
</tr>
</thead>
<tbody>
@php ($no = 4)
@for ($i = 0; $i < $no; $i++)
<tr>
<td>
<select class="form-select mb-1" aria-label="Default select example">
<option selected>Pilih bagian</option>
<option value="1">UI/UX</option>
<option value="2">Frontend</option>
<option value="3">Backend</option>
<option value="4">Analisis Database</option>
</select>
<div class="input-group mb-1">
<span class="input-group-text">Mulai</span>
<input type="date" class="form-control" placeholder="Username" aria-label="Username">
<span class="input-group-text">Akhir</span>
<input type="date" class="form-control" placeholder="Server" aria-label="Server">
</div>
</td>
<td>
<table class="table">
<thead>
<tr>
<th scope="col">Tambah Karyawan</th>
<th scope="col">
<button class="btn btn-sm btn-success">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-plus" viewBox="0 0 16 16">
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
</svg>
</button>
</th>
</tr>
</thead>
<tbody>
@php ($no2=2)
@for ($j = 0; $j < $no2; $j++)
<tr>
<td>
<select class="form-select me-2" aria-label="Default select example">
<option selected>Pilih Karyawan</option>
<option value="1">Canisius Renandatta | Senior Programmer</option>
<option value="2">Rachmad Firmansyah | Senior Programmer</option>
<option value="4">Alif Akbar Irdhobilla | Senior Programmer</option>
<option value="3">Wahyu Kharisma Pujiono | Programmer Mobile</option>
<option value="8">Anhar Setiawan | Senior Programmer</option>
<option value="8">Aldo Reghan | Senior Programmer</option>
<option value="5">Fajar Aminullah | UI/UX</option>
<option value="7">Muhammad Endi | UI/UX</option>
<option value="6">Bagus Kurniawan | Analisis Database</option>
<option value="6">Ulfah Malihatin | Analisis Database</option>
</select>
</td>
<td>
<button class="btn btn-sm btn-danger">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-dash-lg" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 8Z"/>
</svg>
</button>
</td>
</tr>
@endfor
</tbody>
</table>
</td>
<td>
<button class="btn btn-sm btn-danger">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-dash-lg" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 8Z"/>
</svg>
</button>
</td>
</tr>
@endfor
</tbody>
</table>
{{--
@foreach (['belum_diambil' => "Belum Diambil", 'sudah_diambil' => "Sudah Diambil"] as $status =>$sts)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="status" id="" value="{{ $status }}" {{ old('status', $task->status) == $status ? "checked" : "" }}>
<label class="form-check-label" for="">{{ $sts }}</label>
</div>
@endforeach --}}
</div>
| 46.320896
| 162
| 0.49122
|
05c8d90271e273d1aff20a7f21b48850767cfc82
| 2,853
|
py
|
Python
|
NetTrade/Notes/RealNotes.py
|
zpoint/NetTrade
|
f05fb674ff4dedc782f53b4b09d6bfae09c215fc
|
[
"MIT"
] | 27
|
2019-04-30T05:35:07.000Z
|
2021-12-09T13:10:44.000Z
|
NetTrade/Notes/RealNotes.py
|
zpoint/NetTrade
|
f05fb674ff4dedc782f53b4b09d6bfae09c215fc
|
[
"MIT"
] | null | null | null |
NetTrade/Notes/RealNotes.py
|
zpoint/NetTrade
|
f05fb674ff4dedc782f53b4b09d6bfae09c215fc
|
[
"MIT"
] | 10
|
2019-03-24T14:03:14.000Z
|
2022-02-02T03:06:50.000Z
|
import time
from ..ExcelDataUtil.xlsxDataGetter import XlsxDataGetter
from ..ExcelDataUtil.xlsxDataWriter import XlsxDataWriter
from ..Util.dateUtil import timestamp2datetime
from ..Variables.Status import Status
class RealNotes(object):
def __init__(self, code, strategy, **kwargs):
self.file_name = code + ".xlsx"
self.code = code
self.strategy = strategy
self.operation_history = None
self.kwargs = kwargs
def pr_status(self):
if self.operation_history is None:
self.init_strategy()
self.strategy.print_status()
def calc_next_val(self):
if self.operation_history is None:
self.init_strategy()
tup_buy, tup_sell = self.strategy.calc_next_buy_sell_val()
buy_value, buy_shares, buy_money = tup_buy
print("\n\n下次买入价格: %-8s\t买入份额: %-8s\t买入金额: %-8s" % (buy_value, buy_shares, buy_money))
if tup_sell:
sell_value, sell_shares, sell_money = tup_sell
print("下次卖出价格: %-8s\t卖出份额: %-8s\t卖出金额: %-8s\n\n" % (sell_value, sell_shares, sell_money))
else:
print("份额已卖完,无下次卖出价格\n")
def buy(self, value, shares, ts=None):
operation_history = XlsxDataGetter.get_data(self.file_name, raise_if_not_exist=False)
# "value", "shares", "money", "date_str", "status", "timestamp"]
if shares % 100 != 0:
raise ValueError("请输入100的整数倍份额")
money = shares * value
if ts is None:
ts = int(time.time())
operation_history.append((value, shares, money, timestamp2datetime(ts), Status.BUY, ts))
XlsxDataWriter.write_data(self.file_name, operation_history)
def sell(self, value, shares, ts=None):
operation_history = XlsxDataGetter.get_data(self.file_name)
if ts is None:
ts = int(time.time())
operation_history.append((value, shares, value * shares, timestamp2datetime(ts), Status.SELL, ts))
XlsxDataWriter.write_data(self.file_name, operation_history)
def init_strategy(self):
self.operation_history = XlsxDataGetter.get_data(self.file_name)
self.strategy = self.strategy(self.operation_history, **self.kwargs)
def calc_curr_val(self, value):
if self.operation_history is None:
self.init_strategy()
tup_buy, tup_sell = self.strategy.calc_curr_buy_sell_val(value)
if tup_buy is not None:
buy_value, buy_shares, buy_money = tup_buy
print("\n当前净值跌幅过大,需要加大买入, 价格: %-8s\t买入份额: %-8s\t买入金额: %-8s" % (buy_value, buy_shares, buy_money))
elif tup_sell is not None:
sell_value, sell_shares, sell_money = tup_sell
print("当前净值涨幅过大: 需要加大卖出,价格: %-8s\t卖出份额: %-8s\t卖出金额: %-8s\n" % (sell_value, sell_shares, sell_money))
else:
print("\n当前净值波动在合理范围内\n")
| 42.58209
| 112
| 0.651244
|
6dc1ca34162e288236a324338a10b61547f470e6
| 1,894
|
h
|
C
|
AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/APLRUDiskCache.h
|
ceekay1991/AliPayForDebug
|
5795e5db31e5b649d4758469b752585e63e84d94
|
[
"MIT"
] | 5
|
2020-03-29T12:08:37.000Z
|
2021-05-26T05:20:11.000Z
|
AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/APLRUDiskCache.h
|
ceekay1991/AliPayForDebug
|
5795e5db31e5b649d4758469b752585e63e84d94
|
[
"MIT"
] | null | null | null |
AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/APLRUDiskCache.h
|
ceekay1991/AliPayForDebug
|
5795e5db31e5b649d4758469b752585e63e84d94
|
[
"MIT"
] | 5
|
2020-04-17T03:24:04.000Z
|
2022-03-30T05:42:17.000Z
|
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <objc/NSObject.h>
#import "APCacheProtocol-Protocol.h"
@class APLRUMemoryCache, NSString;
@protocol APLRUDiskCacheProtocol, OS_dispatch_queue;
@interface APLRUDiskCache : NSObject <APCacheProtocol>
{
long long _capacity;
long long _removeSemaphore;
id <APLRUDiskCacheProtocol> _proxy;
NSObject<OS_dispatch_queue> *_detachedDBQueue;
APLRUMemoryCache *_memoryCache;
_Bool _crypted;
_Bool _userDependent;
NSString *_name;
}
+ (id)sharedPreferencesOfLibraryCaches;
+ (id)sharedPreferencesOfTmp;
+ (id)sharedPreferences;
@property(readonly, nonatomic) _Bool userDependent; // @synthesize userDependent=_userDependent;
@property(readonly, nonatomic) _Bool crypted; // @synthesize crypted=_crypted;
@property(readonly, nonatomic) NSString *name; // @synthesize name=_name;
@property(readonly, nonatomic) long long capacity; // @synthesize capacity=_capacity;
- (void).cxx_destruct;
- (void)removeObjectsWithKeys:(id)arg1;
- (void)removeObjectsWithSqlLike:(id)arg1;
- (void)addObjects:(id)arg1;
- (void)removeAllObjects;
- (void)removeObjectForKey:(id)arg1;
- (void)doRemoveObjectForKey:(id)arg1;
- (id)objectForKey:(id)arg1;
- (void)setObject:(id)arg1 forKey:(id)arg2 expire:(double)arg3;
- (void)setObject:(id)arg1 forKey:(id)arg2;
- (void)enqueue:(CDUnknownBlockType)arg1;
- (void)currentUserUpdated:(id)arg1;
- (void)updateTableName;
- (void)dealloc;
- (id)initWithName:(id)arg1 capacity:(long long)arg2 userDependent:(_Bool)arg3 crypted:(_Bool)arg4;
// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;
@end
| 33.22807
| 99
| 0.758712
|
fd6081ef793f46b174ce86168a1892e467e7fb4c
| 2,412
|
sql
|
SQL
|
db/banana-app.sql
|
ilhamfi27/ctis_banana
|
83f26cadb0f761e90e7a8aaa04daf2a13c68c5d7
|
[
"MIT"
] | null | null | null |
db/banana-app.sql
|
ilhamfi27/ctis_banana
|
83f26cadb0f761e90e7a8aaa04daf2a13c68c5d7
|
[
"MIT"
] | null | null | null |
db/banana-app.sql
|
ilhamfi27/ctis_banana
|
83f26cadb0f761e90e7a8aaa04daf2a13c68c5d7
|
[
"MIT"
] | null | null | null |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Jan 2019 pada 08.12
-- Versi server: 10.1.34-MariaDB
-- Versi PHP: 7.2.7
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: `banana-app`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `cuaca`
--
CREATE TABLE `cuaca` (
`id_sensor` varchar(50) NOT NULL,
`kelembapan` double NOT NULL,
`angin` double NOT NULL,
`suhu` double NOT NULL,
`curah_hujan` double NOT NULL,
`cuaca` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `laporan`
--
CREATE TABLE `laporan` (
`id_lokasi` varchar(50) NOT NULL,
`waktu_kejadian` time NOT NULL,
`deskripsi` text NOT NULL,
`kategori_kejadian` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `lokasi`
--
CREATE TABLE `lokasi` (
`id_sensor` varchar(50) NOT NULL,
`nama` text NOT NULL,
`longitude` double NOT NULL,
`latitude` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `cuaca`
--
ALTER TABLE `cuaca`
ADD KEY `iddaerah` (`id_sensor`);
--
-- Indeks untuk tabel `laporan`
--
ALTER TABLE `laporan`
ADD KEY `iddaerah` (`id_lokasi`);
--
-- Indeks untuk tabel `lokasi`
--
ALTER TABLE `lokasi`
ADD PRIMARY KEY (`id_sensor`);
--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--
--
-- Ketidakleluasaan untuk tabel `cuaca`
--
ALTER TABLE `cuaca`
ADD CONSTRAINT `cuaca_ibfk_1` FOREIGN KEY (`id_sensor`) REFERENCES `lokasi` (`id_sensor`);
--
-- Ketidakleluasaan untuk tabel `laporan`
--
ALTER TABLE `laporan`
ADD CONSTRAINT `laporan_ibfk_1` FOREIGN KEY (`id_lokasi`) REFERENCES `lokasi` (`id_sensor`);
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 */;
| 22.333333
| 94
| 0.6534
|
cc8447b30e1212948f75569027fd5bb669e4b17f
| 64
|
rb
|
Ruby
|
config/initializers/mail.rb
|
zombiepaladin/scoreboard
|
ca436949e24538d866068632840cf40b001bb7e7
|
[
"MIT"
] | null | null | null |
config/initializers/mail.rb
|
zombiepaladin/scoreboard
|
ca436949e24538d866068632840cf40b001bb7e7
|
[
"MIT"
] | null | null | null |
config/initializers/mail.rb
|
zombiepaladin/scoreboard
|
ca436949e24538d866068632840cf40b001bb7e7
|
[
"MIT"
] | null | null | null |
ActionMailer::Base.smtp_settings = {
# Set up mailer here
}
| 16
| 36
| 0.6875
|
dfc200cedf84836214017d663ff68875cb19cb8c
| 5,090
|
rb
|
Ruby
|
spec/unit/lib/manifestly/entity/checklist_run_step_spec.rb
|
firespring/manifestly-ruby
|
90b85c18cf1a5bc09055ea9d500904dbfbd5bc72
|
[
"Apache-2.0"
] | null | null | null |
spec/unit/lib/manifestly/entity/checklist_run_step_spec.rb
|
firespring/manifestly-ruby
|
90b85c18cf1a5bc09055ea9d500904dbfbd5bc72
|
[
"Apache-2.0"
] | 1
|
2018-11-13T21:50:30.000Z
|
2018-11-13T21:50:30.000Z
|
spec/unit/lib/manifestly/entity/checklist_run_step_spec.rb
|
firespring/manifestly-ruby
|
90b85c18cf1a5bc09055ea9d500904dbfbd5bc72
|
[
"Apache-2.0"
] | 1
|
2019-02-11T15:57:40.000Z
|
2019-02-11T15:57:40.000Z
|
require 'spec_helper'
require 'manifestly'
describe Manifestly::Entity::ChecklistRunStep do
let(:instance) { described_class.new(checklist_run, data) }
let(:checklist_run) { OpenStruct.new(location: run_location, id: run_id) }
let(:run_location) { random }
let(:run_id) { random }
let(:data) { {} }
before :each do
allow(checklist_run).to receive(:is_a?).with(Manifestly::Entity::ChecklistRun).and_return(true)
end
describe '::parent_class' do
subject { described_class.parent_class }
it 'returns ChecklistRun' do
expect(subject).to eq Manifestly::Entity::ChecklistRun
end
end
describe '::endoint_target' do
subject { described_class.endpoint_target }
it 'returns :steps' do
expect(subject).to eq :run_steps
end
end
describe '.header_step=' do
subject { instance.header_step = header_step }
context 'header_step is true' do
let(:header_step) { true }
it 'sets header step to true' do
subject
expect(instance.header_step).to be_truthy
end
end
context 'header_step is false' do
let(:header_step) { false }
it 'sets header step to false' do
subject
expect(instance.header_step).to be_falsey
end
end
context 'header_step is nil' do
let(:header_step) { nil }
it 'sets header step to nil' do
subject
expect(instance.header_step).to be_falsey
end
end
context 'header_step is an object' do
let(:header_step) { Object.new }
it 'sets header step to false' do
subject
expect(instance.header_step).to be_falsey
end
end
end
describe '.complete' do
subject { instance.complete }
let(:client) { Object.new }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the complete path' do
instance.instance_variable_set(:@steps, nil)
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/complete")
subject
expect(instance.instance_variable_get(:@steps)).to be_nil
end
end
describe '.uncomplete' do
subject { instance.uncomplete }
let(:client) { Object.new }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the uncomplete path' do
instance.instance_variable_set(:@steps, nil)
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/uncomplete")
subject
expect(instance.instance_variable_get(:@steps)).to be_nil
end
end
describe '.skip' do
subject { instance.skip }
let(:client) { Object.new }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the skip path' do
instance.instance_variable_set(:@steps, nil)
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/skip")
subject
expect(instance.instance_variable_get(:@steps)).to be_nil
end
end
describe '.unskip' do
subject { instance.unskip }
let(:client) { Object.new }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the unskip path' do
instance.instance_variable_set(:@steps, nil)
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/unskip")
subject
expect(instance.instance_variable_get(:@steps)).to be_nil
end
end
describe '.add_data' do
subject { instance.add_data(value) }
let(:client) { Object.new }
let(:value) { random }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the data path' do
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/data", params: anything)
subject
end
end
describe '.add_picture' do
subject { instance.add_picture(value) }
let(:client) { Object.new }
let(:value) { random }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the picture path' do
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/picture", params: anything)
subject
end
end
describe '.add_comment' do
subject { instance.add_comment(value) }
let(:client) { Object.new }
let(:value) { random }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the comment path' do
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/comments", params: anything)
subject
end
end
describe '.assign' do
subject { instance.assign(value) }
let(:client) { Object.new }
let(:value) { random }
before :each do
allow(described_class).to receive(:client).and_return(client)
end
it 'calls the assign path' do
expect(client).to receive(:post).with("#{instance.location}/#{instance.id}/assign", params: anything)
subject
end
end
end
| 25.969388
| 109
| 0.657171
|
c9b57e679e28dfde04fdb281e7369df2a0b47057
| 2,150
|
ts
|
TypeScript
|
frontend/src/app/auth/auth-guard.service.ts
|
manos-mark/restful-prototype-asset-management
|
219c37587a4787d940cd2ee090389f0e037030a7
|
[
"CC0-1.0"
] | null | null | null |
frontend/src/app/auth/auth-guard.service.ts
|
manos-mark/restful-prototype-asset-management
|
219c37587a4787d940cd2ee090389f0e037030a7
|
[
"CC0-1.0"
] | null | null | null |
frontend/src/app/auth/auth-guard.service.ts
|
manos-mark/restful-prototype-asset-management
|
219c37587a4787d940cd2ee090389f0e037030a7
|
[
"CC0-1.0"
] | null | null | null |
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, CanActivateChild } from '@angular/router';
import { AuthService } from './auth.service';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { WindowPopService } from '../shared/window-pop/window-pop.service';
@Injectable()
export class AuthGuard implements CanActivate, CanActivateChild {
constructor(private authService: AuthService,
private router: Router,
private windowPopService: WindowPopService) {}
canActivate(route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
return this.authService.isAuthenticated()
.then(
(authenticated: boolean) => {
if (authenticated) {
if (!this.authService.getCurrentUser().acceptedCookies) {
this.windowPopService.setTitle("Cookies");
this.windowPopService.setContext("This site uses cookies");
this.windowPopService.setDetails("Do you accept?");
this.windowPopService.setCookiesToDB(true);
this.windowPopService.activate();
}
return true;
} else {
this.router.navigate(['/login']);
return false;
}
}
);
}
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
return this.canActivate(route, state);
}
// canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
// if (this.authService.isAuthenticated()) {
// return this.authService.isAuthenticated();
// } else {
// this.router.navigate(['/login'])
// return false;
// }
// }
// canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
// return this.canActivate(route, state);
// }
}
| 42.156863
| 117
| 0.572093
|
72b37e6420257a68d5c207625e437e8374ce2252
| 492
|
cs
|
C#
|
C#1/Loops-Homework/02. NotDivBy3and7/NotDivBy3and7.cs
|
kaizer04/Telerik-Academy-2013-2014
|
f78b20b936b50ab9e4d9b9d87dc04dc8fc524e15
|
[
"MIT"
] | null | null | null |
C#1/Loops-Homework/02. NotDivBy3and7/NotDivBy3and7.cs
|
kaizer04/Telerik-Academy-2013-2014
|
f78b20b936b50ab9e4d9b9d87dc04dc8fc524e15
|
[
"MIT"
] | null | null | null |
C#1/Loops-Homework/02. NotDivBy3and7/NotDivBy3and7.cs
|
kaizer04/Telerik-Academy-2013-2014
|
f78b20b936b50ab9e4d9b9d87dc04dc8fc524e15
|
[
"MIT"
] | null | null | null |
/*Write a program that prints all the numbers from 1 to N, that are not divisible by 3 and 7 at the same time.*/
using System;
class NotDivBy3and7
{
static void Main()
{
Console.Write("Please, enter to which number, you want to print numbers not divisible by 3 and 7\nn = ");
uint n = uint.Parse(Console.ReadLine());
for (uint i = 1; i <= n; i++)
{
if (!((i % 3 != 0) || (i % 7 != 0)))
Console.WriteLine(i);
}
}
}
| 28.941176
| 113
| 0.54878
|
57b811a2166805577593cd4d00b6be883f392fb4
| 599
|
kts
|
Kotlin
|
mvi-test/build.gradle.kts
|
MTomczynski/MVI
|
7259b2d776152e578d5727f51bb0c718837e2948
|
[
"MIT"
] | 5
|
2021-04-14T11:21:32.000Z
|
2021-08-06T17:49:24.000Z
|
mvi-test/build.gradle.kts
|
mtomczynski/MVI
|
7259b2d776152e578d5727f51bb0c718837e2948
|
[
"MIT"
] | null | null | null |
mvi-test/build.gradle.kts
|
mtomczynski/MVI
|
7259b2d776152e578d5727f51bb0c718837e2948
|
[
"MIT"
] | 2
|
2021-10-03T11:10:13.000Z
|
2022-02-23T17:38:18.000Z
|
plugins {
id("android-library-plugin")
id(AndroidConfig.Plugin.mavenPublish)
}
afterEvaluate {
publishing {
publications {
register("release", MavenPublication::class) {
from(components.findByName("release"))
groupId = "com.tomcz.mvi.test"
artifactId = "mvi-test"
version = "0.04"
}
}
}
}
dependencies {
implementation(project(":mvi-core"))
kotlin()
coroutines()
implementation(Libs.JUnit.jupiter)
implementation(Libs.Jetbrains.Coroutines.Test.coroutines)
}
| 23.96
| 61
| 0.584307
|
e8308e3475cb6dd0b6c74b644a26c177a8aca18a
| 637
|
cs
|
C#
|
DCISDBManager/DCISDBManager/objLib/MasterMaintenance/Consignee.cs
|
Ruke45/DLibrary
|
13bc4b86176ef15d57a82ed91db7db43813d8949
|
[
"Apache-2.0"
] | 1
|
2020-07-19T00:23:37.000Z
|
2020-07-19T00:23:37.000Z
|
DCISDBManager/DCISDBManager/objLib/MasterMaintenance/Consignee.cs
|
Ruke45/DLibrary
|
13bc4b86176ef15d57a82ed91db7db43813d8949
|
[
"Apache-2.0"
] | null | null | null |
DCISDBManager/DCISDBManager/objLib/MasterMaintenance/Consignee.cs
|
Ruke45/DLibrary
|
13bc4b86176ef15d57a82ed91db7db43813d8949
|
[
"Apache-2.0"
] | null | null | null |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DCISDBManager.objLib.MasterMaintenance
{
public class Consignee
{
String Code;
public string Code_
{
get { return Code; }
set { Code = value; }
}
String Description;
public string Description_
{
get { return Description; }
set { Description = value; }
}
String IsActive;
public string Is_Active
{
get { return IsActive; }
set { IsActive = value; }
}
}
}
| 18.2
| 48
| 0.525903
|
fdc1fedf98745a197a4d6c6b3f2606e154f6a45a
| 1,721
|
css
|
CSS
|
modules/xerte/parent_templates/Nottingham/common_html5/css/mobileStyles.css
|
jameshenderson12/xerteonlinetoolkits
|
3eca5c76e3982092d5d91676deec2e0069379d29
|
[
"Apache-2.0"
] | 49
|
2015-01-06T14:56:00.000Z
|
2022-01-26T07:35:16.000Z
|
modules/xerte/parent_templates/Nottingham/common_html5/css/mobileStyles.css
|
jameshenderson12/xerteonlinetoolkits
|
3eca5c76e3982092d5d91676deec2e0069379d29
|
[
"Apache-2.0"
] | 950
|
2015-01-04T20:57:59.000Z
|
2022-03-30T09:07:29.000Z
|
modules/xerte/parent_templates/Nottingham/common_html5/css/mobileStyles.css
|
jameshenderson12/xerteonlinetoolkits
|
3eca5c76e3982092d5d91676deec2e0069379d29
|
[
"Apache-2.0"
] | 62
|
2015-02-11T09:00:05.000Z
|
2022-03-23T15:28:48.000Z
|
/**
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MOBILE LAYOUT CSS */
body {
overflow: hidden;
}
#x_mainHolder {
width: 100%;
height: 100%;
}
/* headerBlock scrolls with pageHolder on mobiles rather than being fixed */
#x_headerBlock {
position: relative;
}
#x_pageHolder {
position: relative;
overflow: hidden;
}
#x_mobileScroll {
height: 100%;
overflow: auto;
}
#x_pageDiv .x_floatLeft {
clear: both;
}
#x_pageDiv .x_floatRight, #x_pageDiv .x_floatLeft {
float: none;
}
.width40, .width50, .width60, .width80, .width100 {
width: 100%;
}
.mobileAlign {
text-align: center;
}
/* displays as one column on mobiles */
.splitScreen .left {
width: 100%;
height: auto;
}
.splitScreen .right {
height: auto;
margin-left: 0px;
padding-top: 10px;
margin-top: 10px;
}
.splitScreen .left .panel {
margin-left: 0px;
height: auto;
}
.splitScreen .right .panel {
margin-right: 0px;
height: auto;
}
.panel {
margin-bottom: 10px;
}
| 19.781609
| 76
| 0.710633
|
167d30ecb9f1df549a341c2c1567bcb886989e08
| 559
|
dart
|
Dart
|
lib/features/image_process/domain/use_cases/image_process/get_string_buffer.dart
|
dhimasdewanto/convert_image_to_ascii
|
5e10cdd8acf5f2da539fdd82d6e6367c5f8f6baf
|
[
"BSD-3-Clause"
] | 8
|
2021-03-14T15:39:51.000Z
|
2021-11-03T07:06:47.000Z
|
lib/features/image_process/domain/use_cases/image_process/get_string_buffer.dart
|
dhimasdewanto/convert_image_to_ascii
|
5e10cdd8acf5f2da539fdd82d6e6367c5f8f6baf
|
[
"BSD-3-Clause"
] | null | null | null |
lib/features/image_process/domain/use_cases/image_process/get_string_buffer.dart
|
dhimasdewanto/convert_image_to_ascii
|
5e10cdd8acf5f2da539fdd82d6e6367c5f8f6baf
|
[
"BSD-3-Clause"
] | 1
|
2021-11-03T07:06:50.000Z
|
2021-11-03T07:06:50.000Z
|
import 'dart:io';
import 'package:flutter/foundation.dart';
import '../../../../settings/domain/models/settings_model.dart';
import '../../models/image_result_model.dart';
import 'get_string_buffer/process_string_buffer.dart';
class GetStringBuffer {
Future<ImageResultModel> call(GetStringBufferParams params) async {
return compute(processStringBuffer, params);
}
}
class GetStringBufferParams {
GetStringBufferParams({
required this.imageFile,
required this.settings,
});
final File imageFile;
final SettingsModel settings;
}
| 22.36
| 69
| 0.751342
|
2da53bb43fd6c6aa78ea7aa06e8650e139441d78
| 4,787
|
go
|
Go
|
abciapp/service/deliver/begin_block.go
|
bcbchain/bcbchain
|
24d451d160fee58e9bb836f08b943a2108d5dbba
|
[
"Apache-2.0"
] | 20
|
2019-01-14T09:53:10.000Z
|
2021-05-03T21:00:26.000Z
|
abciapp/service/deliver/begin_block.go
|
bcbchain/bcbchain
|
24d451d160fee58e9bb836f08b943a2108d5dbba
|
[
"Apache-2.0"
] | null | null | null |
abciapp/service/deliver/begin_block.go
|
bcbchain/bcbchain
|
24d451d160fee58e9bb836f08b943a2108d5dbba
|
[
"Apache-2.0"
] | 5
|
2019-08-22T10:02:00.000Z
|
2021-04-10T03:34:02.000Z
|
package deliver
import (
"github.com/bcbchain/bcbchain/common/statedbhelper"
"github.com/bcbchain/bcbchain/smcrunctl/adapter"
"github.com/bcbchain/sdk/sdk/std"
"github.com/bcbchain/bclib/types"
"bytes"
"github.com/bcbchain/bclib/jsoniter"
"container/list"
"fmt"
abci "github.com/bcbchain/bclib/tendermint/abci/types"
)
//BCBeginBlock beginblock implementation of app
func (app *AppDeliver) BCBeginBlock(req abci.RequestBeginBlock) (abci.ResponseBeginBlock, map[string][]byte) {
transID, _ := statedbhelper.NewCommittableTransactionID()
app.transID = transID
app.txID = statedbhelper.NewTx(transID)
app.logger.Info("Recv ABCI interface: BeginBlock", "height", req.Header.Height, "transID", app.transID)
//Checking app state
app.getAndVerifyAppState(req.Header)
//Init app members
app.appState.BlockHeight = req.Header.Height
app.appState.BeginBlock = req
app.hashList = list.New().Init()
app.sponser = req.Header.ProposerAddress
app.rewarder = req.Header.RewardAddress
app.blockHash = req.Hash
app.blockHeader = req.Header
// Reset fee & rewards for the block
app.fee = 0
app.rewards = map[string]int64{}
app.rewardStrategy = statedbhelper.GetRewardStrategy(app.transID, app.txID, app.blockHeader.Height)
//statedbhelper.BeginBlock(transID)
//app.logger.Debug("SetAppState", "new appState", app.appState)
// Set the last app state due to SDK depends on it to check/get block data,
// update it when commit
//statedbhelper.SetWorldAppState(transID, app.txID, app.appState)
// call smcrunsvc to initChain or updateChain smart contract
r, txBuffer := app.initOrUpdateSMC()
if r.Code != types.CodeOK {
return abci.ResponseBeginBlock{Code: r.Code, Log: r.Log}, nil
}
return abci.ResponseBeginBlock{Code: types.CodeOK}, txBuffer
}
func (app *AppDeliver) getAndVerifyAppState(blockHeader abci.Header) {
app.appState = statedbhelper.GetWorldAppState(app.transID, app.txID)
app.logger.Debug("WorldAppState",
"height", app.appState.BlockHeight,
"LastBlockHash", app.appState.AppHash)
// Checking on new block height
if blockHeader.Height != app.appState.BlockHeight+1 {
app.logger.Fatal("Block height does not match",
"abci_height", app.appState.BlockHeight,
"block_height", blockHeader.Height)
panic("Block height does not match")
}
// Checking on app hash
if !bytes.EqualFold(blockHeader.LastAppHash, app.appState.AppHash) {
app.logger.Fatal("App hash does not match",
"abci_app_hash", app.appState.AppHash,
"block_last_app_hash", blockHeader.LastAppHash)
panic(fmt.Sprintf("App hash does not match, req.Header.LastAppHash %x:%d, app.appState.AppHash:%x:%d",
blockHeader.LastAppHash, blockHeader.Height, app.appState.AppHash, app.appState.BlockHeight))
}
}
func (app *AppDeliver) initOrUpdateSMC() (result *types.Response, txBuffer map[string][]byte) {
app.logger.Info("initOrUpdateSMC")
result = new(types.Response)
result.Code = types.CodeOK
contractsWithHeight := statedbhelper.GetContractsWithHeight(app.transID, app.txID, app.appState.BlockHeight)
if len(contractsWithHeight) == 0 {
app.logger.Debug("No contracts need to be initialized")
return
}
for _, v := range contractsWithHeight {
app.txID = statedbhelper.NewTx(app.transID)
contract := statedbhelper.GetContract(v.ContractAddr)
if contract == nil {
result.Code = types.ErrLogicError
result.Log = "can not get smart contract to initChain or updateChain when begin block"
return
}
app.logger.Debug("This contract need to init:", contract)
mgr := adapter.GetInstance()
result = mgr.InitOrUpdateSMC(app.transID, app.txID, app.blockHeader, v.ContractAddr, contract.Owner, v.IsUpgrade)
if result.Code != types.CodeOK {
app.logger.Info(fmt.Sprintf("[transID=%d][txID=%d]init/update chain failed", app.transID, app.txID), "error", result.Log)
app.forbidContract(v.ContractAddr)
result.Code = types.CodeOK
}
var stateTx []byte
stateTx, txBuffer = statedbhelper.CommitTx(app.transID, app.txID)
if stateTx != nil {
app.calcDeliverHash(nil, nil, stateTx)
}
}
return
}
// forbidContract - forbid contract if initChain/updateChain failed
func (app *AppDeliver) forbidContract(contractAddr types.Address) {
contract := statedbhelper.GetContract(contractAddr)
contract.LoseHeight = app.blockHeader.Height
statedbhelper.SetContract(app.transID, app.txID, contract)
v, err := statedbhelper.GetFromDB(std.KeyOfMineContracts())
if err != nil {
panic(err)
}
if len(v) == 0 {
return
}
var mines []std.MineContract
err = jsoniter.Unmarshal(v, &mines)
if err != nil {
panic(err)
}
for index, mine := range mines {
if mine.Address == contractAddr {
mines = append(mines[:index], mines[index+1:]...)
break
}
}
statedbhelper.SetMineContract(app.transID, app.txID, mines)
}
| 32.787671
| 124
| 0.744725
|
2f7663cf5851adfe910ac3646fbfb9a3dbba4c74
| 413
|
sql
|
SQL
|
dataactvalidator/config/sqlrules/fabs43_detached_award_financial_assistance_1.sql
|
dael-victoria-reyes/data-act-broker-backend
|
f83c7cad29cac24d95f45a262710dc1564de7dc1
|
[
"CC0-1.0"
] | 1
|
2019-06-22T21:53:16.000Z
|
2019-06-22T21:53:16.000Z
|
dataactvalidator/config/sqlrules/fabs43_detached_award_financial_assistance_1.sql
|
dael-victoria-reyes/data-act-broker-backend
|
f83c7cad29cac24d95f45a262710dc1564de7dc1
|
[
"CC0-1.0"
] | null | null | null |
dataactvalidator/config/sqlrules/fabs43_detached_award_financial_assistance_1.sql
|
dael-victoria-reyes/data-act-broker-backend
|
f83c7cad29cac24d95f45a262710dc1564de7dc1
|
[
"CC0-1.0"
] | null | null | null |
-- For foreign places of performance (PrimaryPlaceOfPerformanceCountryCode is not USA),
-- PrimaryPlaceOfPerformanceCongressionalDistrict must be blank.
SELECT
row_number,
place_of_perform_country_c,
place_of_performance_congr
FROM detached_award_financial_assistance
WHERE submission_id = {0}
AND UPPER(place_of_perform_country_c) <> 'USA'
AND COALESCE(place_of_performance_congr, '') <> '';
| 37.545455
| 87
| 0.799031
|
a0abdc4c437ab2a14a0afe41482ad1ecc8e97217
| 1,022
|
swift
|
Swift
|
SafariExtension/SafariExtensionHandler.swift
|
zhangsp1949/auto-reload
|
103197513750eea7010c6d4d9f02b1dddf29a810
|
[
"MIT"
] | null | null | null |
SafariExtension/SafariExtensionHandler.swift
|
zhangsp1949/auto-reload
|
103197513750eea7010c6d4d9f02b1dddf29a810
|
[
"MIT"
] | null | null | null |
SafariExtension/SafariExtensionHandler.swift
|
zhangsp1949/auto-reload
|
103197513750eea7010c6d4d9f02b1dddf29a810
|
[
"MIT"
] | null | null | null |
//
// SafariExtensionHandler.swift
// AutoReload
//
// Created by Garrett Johnson on 9/23/18.
// Copyright © 2018 Garrett Johnson.
//
import SafariServices
class SafariExtensionHandler: SFSafariExtensionHandler {
override func validateToolbarItem(in window: SFSafariWindow, validationHandler: @escaping ((Bool, String) -> Void)) {
// This is called when Safari's state changed in some way that would require the extension's toolbar item to be validated again.
SafariExtensionViewController.shared.updateToolbarIcon(window: window)
validationHandler(true, "")
}
override func popoverWillShow(in window: SFSafariWindow) {
SafariExtensionViewController.shared.loadPopover(window: window)
}
override func popoverDidClose(in window: SFSafariWindow) {
SafariExtensionViewController.shared.stopCountdownTimer()
}
override func popoverViewController() -> SFSafariExtensionViewController {
return SafariExtensionViewController.shared
}
}
| 34.066667
| 136
| 0.741683
|
6061fc098a038147d19fa3f0053ebec5d8edd0b4
| 369
|
h
|
C
|
hardware/compilateur/parser/ExpressionList.h
|
sebastienhouzet/nabaztag-source-code
|
65197ea668e40fadb35d8ebd0aeb512311f9f547
|
[
"MIT"
] | 3
|
2017-09-24T14:43:04.000Z
|
2020-05-28T11:42:54.000Z
|
hardware/compilateur/parser/ExpressionList.h
|
sebastienhouzet/nabaztag-source-code
|
65197ea668e40fadb35d8ebd0aeb512311f9f547
|
[
"MIT"
] | null | null | null |
hardware/compilateur/parser/ExpressionList.h
|
sebastienhouzet/nabaztag-source-code
|
65197ea668e40fadb35d8ebd0aeb512311f9f547
|
[
"MIT"
] | 8
|
2016-04-09T03:46:26.000Z
|
2021-11-26T21:42:01.000Z
|
#ifndef __EXPRESSION_LIST__
#define __EXPRESSION_LIST__
#include <iostream>
#include <list>
#include <string>
#include <utility>
#include "Debug.h"
#include "Expression.h"
class ExpressionList : public Expression {
public:
ExpressionList() : Expression() {
}
string toString(void);
void addElt(Expression *e);
private:
list<Expression *> elements;
};
#endif
| 14.76
| 42
| 0.737127
|
da3cc348002fc04410a75460ebb876cf35e8e2b3
| 983
|
php
|
PHP
|
fuel/app/config/parser.php
|
Hung-Phan-Mulodo/Tour-Training
|
aaca39f2087212b54c5803f632a5bb5d1a6f2dbd
|
[
"MIT"
] | null | null | null |
fuel/app/config/parser.php
|
Hung-Phan-Mulodo/Tour-Training
|
aaca39f2087212b54c5803f632a5bb5d1a6f2dbd
|
[
"MIT"
] | 4
|
2018-03-06T03:51:23.000Z
|
2018-03-19T04:01:46.000Z
|
fuel/app/config/parser.php
|
Hung-Phan-Mulodo/Tour-Training
|
aaca39f2087212b54c5803f632a5bb5d1a6f2dbd
|
[
"MIT"
] | null | null | null |
<?php
return array(
'extensions' => array(
'php' => 'View',
// 'smarty' => 'View_Smarty', // we want .tpl, not .smarty
'tpl' => array('class' => 'View_Smarty', 'extension' => 'tpl'),
),
'View_Smarty' => array(
'include' => APPPATH.'vendor'.DS.'Smarty'.DS.'Smarty'.DS.'libs'.DS.'Smarty.class.php',
'delimiters' => array('{', '}'),
'environment' => array(
'compile_dir' => APPPATH.'tmp'.DS.'Smarty'.DS.'templates_c'.DS,
'config_dir' => APPPATH.'tmp'.DS.'Smarty'.DS.'configs'.DS,
'cache_dir' => APPPATH.'cache'.DS.'Smarty'.DS,
'caching' => false,
'cache_lifetime' => 0,
'force_compile' => true, // debug!
'compile_check' => true,
'debugging' => false,
'autoload_filters' => array(),
'default_modifiers' => array(),
),
),
);
| 40.958333
| 100
| 0.456765
|
1bbe0c74d509d88047f5fa870d9e6e644792fe29
| 94
|
udf
|
SQL
|
bifurcatedArtery_files/dp0/FFF/Fluent/libudf/win64/3ddp_node/user_nt.udf
|
spsvision/bifurcatedArtery
|
33d33b011c7707fd496cf77620bb61a2e13fd03a
|
[
"MIT"
] | null | null | null |
bifurcatedArtery_files/dp0/FFF/Fluent/libudf/win64/3ddp_node/user_nt.udf
|
spsvision/bifurcatedArtery
|
33d33b011c7707fd496cf77620bb61a2e13fd03a
|
[
"MIT"
] | null | null | null |
bifurcatedArtery_files/dp0/FFF/Fluent/libudf/win64/3ddp_node/user_nt.udf
|
spsvision/bifurcatedArtery
|
33d33b011c7707fd496cf77620bb61a2e13fd03a
|
[
"MIT"
] | null | null | null |
CSOURCES= $(SRC)vinlet_udf.c
HSOURCES=
VERSION=3ddp_node
PARALLEL_NODE=ibmmpi
GPU_SUPPORT=off
| 15.666667
| 28
| 0.840426
|