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
sequencelengths
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
sequencelengths
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
sequencelengths
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
da797e037e68820838a37acf2b6c54b13bbad83e
808
php
PHP
src/Entry/IteratorEntry.php
resumenext/container
f14aa08c0a60cc43ad1c6d5f3c0e403dce0e8c36
[ "MIT" ]
null
null
null
src/Entry/IteratorEntry.php
resumenext/container
f14aa08c0a60cc43ad1c6d5f3c0e403dce0e8c36
[ "MIT" ]
null
null
null
src/Entry/IteratorEntry.php
resumenext/container
f14aa08c0a60cc43ad1c6d5f3c0e403dce0e8c36
[ "MIT" ]
null
null
null
<?php namespace ResumeNext\Container\Entry; use Interop\Container\ContainerInterface; use Iterator; use ResumeNext\Container\Exception\RuntimeException; use ResumeNext\Container\ResolverInterface; class IteratorEntry implements ResolverInterface { /** @var \Iterator */ protected $iterator; /** * Constructor * * @param \Iterator $iterator */ public function __construct(Iterator $iterator) { $this->iterator = $iterator; } public function resolve(ContainerInterface $container) { $ret = null; if ($this->iterator->valid()) { $ret = $this->iterator->current(); $this->iterator->next(); } else { throw new RuntimeException(sprintf( "Invalid position of iterator \"%s\".", get_class($this->iterator) )); } return $ret; } } /* vi:set ts=4 sw=4 noet: */
18.363636
57
0.685644
54a34eed4b78e087796361fa7f2a0f77cc49b9f6
2,846
rb
Ruby
lib/spork.rb
zapnap/rdocinfo
9fc012daee5c8be4686193373a0e732167dbc281
[ "MIT" ]
4
2016-05-09T12:29:50.000Z
2019-06-15T17:04:20.000Z
lib/spork.rb
zapnap/rdocinfo
9fc012daee5c8be4686193373a0e732167dbc281
[ "MIT" ]
2
2019-03-31T22:02:09.000Z
2021-04-29T09:52:13.000Z
lib/spork.rb
zapnap/rdocinfo
9fc012daee5c8be4686193373a0e732167dbc281
[ "MIT" ]
1
2016-07-24T16:28:26.000Z
2016-07-24T16:28:26.000Z
# A way to cleanly handle process forking in Sinatra when using Passenger, aka "sporking some code". # This will allow you to properly execute some code asynchronously, which otherwise does not work correctly. # # Written by Ron Evans # More info at http://deadprogrammersociety.com # # Mostly lifted from the Spawn plugin for Rails (http://github.com/tra/spawn) # but with all of the Rails stuff removed.... cause you are using Sinatra. If you are using Rails, Spawn is # what you need. If you are using something else besides Sinatra that is Rack-based under Passenger, and you are having trouble with # asynch processing, let me know if spork helped you. # module Spork # things to close in child process @@resources = [] def self.resources @@resources end # set the resource to disconnect from in the child process (when forking) def self.resource_to_close(resource) @@resources << resource end # close all the resources added by calls to resource_to_close def self.close_resources @@resources.each do |resource| resource.close if resource && resource.respond_to?(:close) && !resource.closed? end @@resources = [] end # actually perform the fork... er, spork # valid options are: # :priority => to set the process priority of the child # :logger => a logger object to use from the child # :no_detach => true if you want to keep the child process under the parent control. usually you do NOT want this def self.spork(options={}) logger = options[:logger] logger.debug "spork> parent PID = #{Process.pid}" if logger child = fork do begin start = Time.now logger.debug "spork> child PID = #{Process.pid}" if logger # set the nice priority if needed Process.setpriority(Process::PRIO_PROCESS, 0, options[:priority]) if options[:priority] # disconnect from the rack Spork.close_resources # run the block of code that takes so long yield rescue => ex logger.error "spork> Exception in child[#{Process.pid}] - #{ex.class}: #{ex.message}" if logger ensure logger.info "spork> child[#{Process.pid}] took #{Time.now - start} sec" if logger # this form of exit doesn't call at_exit handlers exit!(0) end end # detach from child process (parent may still wait for detached process if they wish) Process.detach(child) unless options[:no_detach] return child end end # Patch to work with passenger if defined? Passenger::Rack::RequestHandler class Passenger::Rack::RequestHandler alias_method :orig_process_request, :process_request def process_request(env, input, output) Spork.resource_to_close(input) Spork.resource_to_close(output) orig_process_request(env, input, output) end end end
34.707317
132
0.695362
6764ddf4697f2d5ff36ba3bd12bc675eb3c6a250
427
sh
Shell
centos-ai/python-kaldiasr/doit.sh
gooofy/zamia-dist
bee79239ea0c56ef2d8c3ab2cb99821f0b19646e
[ "Apache-2.0" ]
1
2020-05-11T19:24:19.000Z
2020-05-11T19:24:19.000Z
centos-ai/python-kaldiasr/doit.sh
gooofy/zamia-dist
bee79239ea0c56ef2d8c3ab2cb99821f0b19646e
[ "Apache-2.0" ]
2
2020-05-11T19:20:20.000Z
2020-05-20T13:32:51.000Z
centos-ai/python-kaldiasr/doit.sh
gooofy/zamia-dist
bee79239ea0c56ef2d8c3ab2cb99821f0b19646e
[ "Apache-2.0" ]
2
2019-01-18T10:56:51.000Z
2021-05-22T05:28:45.000Z
#!/bin/sh VERSION=0.5.2 rm -rf py-kaldi-asr-${VERSION} py-kaldi-asr-${VERSION}.tar.gz pushd py-kaldi-asr make clean README.md popd cp -r py-kaldi-asr py-kaldi-asr-${VERSION} tar cfvz py-kaldi-asr-${VERSION}.tar.gz py-kaldi-asr-${VERSION} rm -rf py-kaldi-asr-${VERSION} rm -rf ~/rpmbuild mkdir -p ~/rpmbuild/SOURCES cp * ~/rpmbuild/SOURCES rpmbuild -ba --clean python-kaldiasr.spec rm -f py-kaldi-asr-${VERSION}.tar.gz
17.791667
63
0.700234
1aca5354b65e3b709fef9e104be7f5feeb2a1eb2
2,959
py
Python
recordings/delete_recording.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
1
2018-11-23T20:11:27.000Z
2018-11-23T20:11:27.000Z
recordings/delete_recording.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
recordings/delete_recording.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
# *** Delete a Recording *** # Code based on https://www.twilio.com/docs/voice/api/recording # Download Python 3 from https://www.python.org/downloads/ # Download the Twilio helper library from https://www.twilio.com/docs/python/install import os from twilio.rest import Client # from datetime import datetime | not required for this example import logging #write requests & responses from Twilio to log file, useful, IMHO, for debugging: logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', filename='/usr/local/twilio/python3/sdkv6x/recordings/logs/twilio_recordings.log', filemode='a') # Your Account Sid and Auth Token from twilio.com/console & stored in Mac OS ~/.bash_profile in this example account_sid = os.environ.get('$TWILIO_ACCOUNT_SID') auth_token = os.environ.get('$TWILIO_AUTH_TOKEN') client = Client(account_sid, auth_token) # A list of recording parameters & their permissable values, comment out (#) those lines not required client.recordings('RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx').delete() # print list of all recording properties to console, useful for learning info available you can work with? #print(recording.account_sid) #print(recording.api_version) #print(recording.call_sid) #print(recording.channels) #print(recording.conference_sid) #print(recording.date_created) #print(recording.date_updated) #print(recording.duration) #print(recording.encryption_details) #print(recording.error_code) #print(recording.price) #print(recording.price_unit) #print(recording.sid) #print(recording.source) #print(recording.start_time) #print(recording.status) #print(recording.uri) # create variable for this record #cdr = (recording.sid) #open *.log file with cdr var as filename... #f = open("/usr/local/twilio/python3/sdkv6x/recording/logs/" + str( cdr ) + ".log", "a") # write list of all message properties to above file... #f.write("Account SID : " + str(recording.account_sid) + "\n") #f.write("API Version : " + str(recording.api_version) + "\n") #f.write("Call SID : " + str(recording.call_sid) + "\n") #f.write("Channels : " + str(recording.channels) + "\n") #f.write("Conference SID : " + str(recording.conference_sid) + "\n") #f.write("Date Created : " + str(recording.date_created) + "\n") #f.write("Date Updated : " + str(recording.date_updated) + "\n") #f.write("Duration : " + str(recording.duration) + "\n") #f.write("Encryption Details : " + str(recording.encryption_details) + "\n") #f.write("Error Code : " + str(recording.error_code) + "\n") #f.write("Price : " + str(recording.price) + "\n") #f.write("Price Unit : " + str(recording.price_unit) + "\n") #f.write("SID : " + str(recording.sid) + "\n") #f.write("Source : " + str(recording.source) + "\n") #f.write("Start Time : " + str(recording.start_time) + "\n") #f.write("Status : " + str(recording.status) + "\n") #f.write("URI : " + str(recording.uri) + "\n") #f.close()
45.523077
109
0.707672
7a0759d1bb18fc2f697cbf6d44a31559ba1deb80
354
dart
Dart
lib/yust_store.dart
janneskoehler/yust_web
f587b79206ca57de6157cee31ad39f5cf80a8510
[ "BSD-3-Clause" ]
1
2019-10-09T10:49:31.000Z
2019-10-09T10:49:31.000Z
lib/yust_store.dart
janneskoehler/yust_web
f587b79206ca57de6157cee31ad39f5cf80a8510
[ "BSD-3-Clause" ]
1
2019-09-04T09:38:56.000Z
2019-09-04T10:40:06.000Z
lib/yust_store.dart
janneskoehler/yust_web
f587b79206ca57de6157cee31ad39f5cf80a8510
[ "BSD-3-Clause" ]
null
null
null
// import 'package:scoped_model/scoped_model.dart'; import 'models/yust_user.dart'; enum AuthState { waiting, signedIn, signedOut, } // class YustStore extends Model { // not supported class YustStore { AuthState authState; YustUser currUser; void setState(void Function() f) { f(); // notifyListeners(); // not supported } }
16.857143
51
0.683616
ddd19690c741142fe003602779c7515b42efe079
470
java
Java
018_Object Class/Object.toStringMethod/src/main/java/com/hardik/javase/App.java
hardikhirapara91/java-se-core
70612e511ca16f5b454ff78a789a07ba3c765656
[ "MIT" ]
1
2017-07-11T05:22:07.000Z
2017-07-11T05:22:07.000Z
018_Object Class/Object.toStringMethod/src/main/java/com/hardik/javase/App.java
hardikhirapara91/java-se-core
70612e511ca16f5b454ff78a789a07ba3c765656
[ "MIT" ]
null
null
null
018_Object Class/Object.toStringMethod/src/main/java/com/hardik/javase/App.java
hardikhirapara91/java-se-core
70612e511ca16f5b454ff78a789a07ba3c765656
[ "MIT" ]
null
null
null
package com.hardik.javase; import com.hardik.javase.model.User; /** * Real Use of Object.toString() Method * * @author HARDIK HIRAPARA */ public class App { /** * App Main method * * @param args */ public static void main(String[] args) { User user = new User(); user.setUserId(101); user.setUserName("test"); user.setFirstName("Test"); user.setLastName("User"); System.out.println(user); // It will print data instead of hash-code } }
16.785714
70
0.655319
817d337a4d6c327cecf03069947d84714710fcdd
4,310
php
PHP
app/Http/Controllers/GiftCardController.php
sakibrahmancuet/ezpos
5183f88e36f3f386a9c2f73f70e4ebde7cde5dac
[ "MIT" ]
null
null
null
app/Http/Controllers/GiftCardController.php
sakibrahmancuet/ezpos
5183f88e36f3f386a9c2f73f70e4ebde7cde5dac
[ "MIT" ]
3
2020-04-30T12:26:14.000Z
2021-01-05T15:17:31.000Z
app/Http/Controllers/GiftCardController.php
sakibrahmancuet/ezpos
5183f88e36f3f386a9c2f73f70e4ebde7cde5dac
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers; use App\Enumaration\GiftCardStatus; use App\Model\Customer; use App\Model\GiftCard; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class GiftCardController extends Controller { public function GetGiftCardForm() { $customers = Customer::all(); return view('gift_cards.new_gift_card', ["customers" => $customers]); } public function AddGiftCard(Request $request) { $this->validate($request,[ "gift_card_number"=>"required|unique:gift_cards", "value"=>"required|numeric", ]); GiftCard::create($request->except('_token')); return redirect()->route('gift_card_list'); } public function GetGiftCardList() { $gift_cards = GiftCard::with('customer')->get(); return view('gift_cards.gift_card_list', ["gift_cards" => $gift_cards]); } public function EditGiftCardGet($gift_card_id) { $giftCardInfo = GiftCard::where('id',$gift_card_id)->first(); $customers = Customer::all(); return view('gift_cards.gift_card_edit', ['gift_card' => $giftCardInfo,"customers"=>$customers]); } public function EditGiftCardPost(Request $request, $gift_card_id) { $this->validate($request,[ "gift_card_number"=>"required|unique:gift_cards,gift_card_number,".$gift_card_id, "value"=>"required|numeric", ]); $giftCard = GiftCard::where("id", "=", $gift_card_id)->first(); $giftCard->update($request->except('_token')); if($request->status==null) $giftCard->update([ "status"=>GiftCardStatus::$INACTIVE ]); else $giftCard->update([ "status"=>GiftCardStatus::$ACTIVE ]); return redirect()->route('gift_card_list'); } public function DeleteGiftCardGet($gift_card_id){ $giftCard = GiftCard::where("id",$gift_card_id)->first(); $giftCard->delete(); return redirect()->route('gift_card_list'); } public function UseGiftCard(Request $request){ $gift_card_number = $request->gift_card_number; $due = $request->due; if(GiftCard::where("gift_card_number",$gift_card_number)->exists()){ $gift_card = GiftCard::where("gift_card_number",$gift_card_number)->first(); if($gift_card->status==GiftCardStatus::$ACTIVE){ if($gift_card->value>0){ $previous_value = $gift_card->value; if($due<=$gift_card->value){ $gift_card->value -= $due; $gift_card->save(); $current_value = $gift_card->value; $value_deducted = $previous_value-$current_value; $due = $due-$value_deducted; return response()->json(["success"=>true,"due"=>$due, "value_deducted"=>$value_deducted,"current_value"=>$current_value]); }else{ $gift_card->value -= $previous_value; $gift_card->save(); $current_value = $gift_card->value; $value_deducted = $previous_value-$current_value; $due = $due-$value_deducted; return response()->json(["success"=>true,"due"=>$due, "value_deducted"=>$value_deducted,"current_value"=>$current_value]); } } else return response()->json(["success"=>false,"message"=>"Low balance on gift card."],200); } else return response()->json(["success"=>false,"message"=>"Gift card is not active."],200); }else return response()->json(["success"=>false,"message"=>"Invalid gift card number."],200); } public function DeleteGiftCards(Request $request){ $gift_card_list = $request->id_list; if(DB::table('gift_cards')->whereIn('id',$gift_card_list)->delete()) return response()->json(["success"=>true],200); return response()->json(["success"=>false],200); } }
29.319728
107
0.5529
872b9af93450e6063a6621908f1291d4dbafb5cd
244
rb
Ruby
app.rb
jeffsdev/rubySinatra-scrabble
8b07b265bf0f6355f29733001ad2398114a24c57
[ "MIT" ]
null
null
null
app.rb
jeffsdev/rubySinatra-scrabble
8b07b265bf0f6355f29733001ad2398114a24c57
[ "MIT" ]
null
null
null
app.rb
jeffsdev/rubySinatra-scrabble
8b07b265bf0f6355f29733001ad2398114a24c57
[ "MIT" ]
null
null
null
require('sinatra') require('sinatra/reloader') require('./lib/scrabble.rb') get('/') do File.read(File.join('public', 'main.css')) erb(:index) end get('/scrabble') do @scrabble = params.fetch('scrabble').scrabble() erb(:scrabble) end
17.428571
49
0.668033
9e2a0ad141398e2e968ca2935b406e192eacee93
219
cs
C#
src/modules/rover/rover.domain/Models/Coordinate.cs
samuele-cozzi/2021-MarsRover
ea6d9ae038baa0ed941a3cb06c4bb5117cbbb94c
[ "MIT" ]
null
null
null
src/modules/rover/rover.domain/Models/Coordinate.cs
samuele-cozzi/2021-MarsRover
ea6d9ae038baa0ed941a3cb06c4bb5117cbbb94c
[ "MIT" ]
6
2021-11-24T22:41:16.000Z
2021-12-14T00:29:58.000Z
src/modules/rover/rover.domain/Models/Coordinate.cs
samuele-cozzi/2021-marsrover
ea6d9ae038baa0ed941a3cb06c4bb5117cbbb94c
[ "MIT" ]
null
null
null
namespace rover.domain.Models { public class Coordinate { public double Latitude { get; set; } public double Longitude { get; set; } public double AngularPrecision { get; set; } } }
21.9
52
0.611872
fbb0c28cd9d3fd4b5ff30bf7a85d8e6006686c58
10,352
h
C
driver/umd/include/kmd/armchina_aipu.h
dejsha01/armchina-zhouyi
5de86bbdb5dc4184df4348d64cd152db0dbf9a96
[ "MIT" ]
null
null
null
driver/umd/include/kmd/armchina_aipu.h
dejsha01/armchina-zhouyi
5de86bbdb5dc4184df4348d64cd152db0dbf9a96
[ "MIT" ]
null
null
null
driver/umd/include/kmd/armchina_aipu.h
dejsha01/armchina-zhouyi
5de86bbdb5dc4184df4348d64cd152db0dbf9a96
[ "MIT" ]
null
null
null
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* Copyright (c) 2018-2021 Arm Technology (China) Co., Ltd. All rights reserved. */ #ifndef __UAPI_MISC_ARMCHINA_AIPU_H__ #define __UAPI_MISC_ARMCHINA_AIPU_H__ #include <linux/types.h> #include <linux/ioctl.h> /* * In the following member descriptions, * [must] mean that the fields must be filled by user mode driver any way. * [alloc] mean that the buffer(s) represented by the fields must be allocated * by user mode driver before calling IOCTL. * [kmd] mean that the fields should be filled by kernel mode driver * if the calls are successful. */ /** * emum aipu_arch - AIPU architecture number * @AIPU_ARCH_ZHOUYI: AIPU architecture is Zhouyi. * * This enum is used to indicate the architecture of an AIPU core in the system. */ enum aipu_arch { AIPU_ARCH_ZHOUYI = 0, }; /** * emum aipu_isa_version - AIPU ISA version number * @AIPU_ISA_VERSION_ZHOUYI_V1: AIPU ISA version is Zhouyi v1. * @AIPU_ISA_VERSION_ZHOUYI_V2: AIPU ISA version is Zhouyi v2. * @AIPU_ISA_VERSION_ZHOUYI_V3: AIPU ISA version is Zhouyi v3. * * Zhouyi architecture has multiple ISA versions released. * This enum is used to indicate the ISA version of an AIPU core in the system. */ enum aipu_isa_version { AIPU_ISA_VERSION_ZHOUYI_V1 = 1, AIPU_ISA_VERSION_ZHOUYI_V2 = 2, AIPU_ISA_VERSION_ZHOUYI_V3 = 3, }; /** * struct aipu_core_cap - Capability of an AIPU core * @core_id: [kmd] Core ID * @arch: [kmd] Architecture number * @version: [kmd] ISA version number * @config: [kmd] Configuration number * @info: [kmd] Debugging information * * For example, Z2-1104: * arch == AIPU_ARCH_ZHOUYI (0) * version == AIPU_ISA_VERSION_ZHOUYI_V2 (2) * config == 1104 */ struct aipu_core_cap { __u32 core_id; __u32 arch; __u32 version; __u32 config; struct aipu_debugger_info { __u64 reg_base; /* External register base address (physical) */ } info; }; /** * struct aipu_cap - Common capability of the AIPU core(s) * @core_cnt: [kmd] Count of AIPU core(s) in the system * @is_homogeneous: [kmd] IS homogeneous AIPU system or not (1/0) * @core_cap: [kmd] Capability of the single AIPU core * * AIPU driver supports the management of multiple AIPU cores in the system. * This struct is used to indicate the common capability of all AIPU core(s). * User mode driver should get this capability via AIPU_IOCTL_QUERYCAP command. * If the core count is 1, the per-core capability is in the core_cap member; * otherwise user mode driver should get all the per-core capabilities as the * core_cnt indicates via AIPU_IOCTL_QUERYCORECAP command. */ struct aipu_cap { __u32 core_cnt; __u32 is_homogeneous; struct aipu_core_cap core_cap; }; /** * enum aipu_mm_data_type - Data/Buffer type * @AIPU_MM_DATA_TYPE_NONE: No type * @AIPU_MM_DATA_TYPE_TEXT: Text (instructions) * @AIPU_MM_DATA_TYPE_RODATA: Read-only data (parameters) * @AIPU_MM_DATA_TYPE_STACK: Stack * @AIPU_MM_DATA_TYPE_STATIC: Static data (weights) * @AIPU_MM_DATA_TYPE_REUSE: Reuse data (feature maps) */ enum aipu_mm_data_type { AIPU_MM_DATA_TYPE_NONE, AIPU_MM_DATA_TYPE_TEXT, AIPU_MM_DATA_TYPE_RODATA, AIPU_MM_DATA_TYPE_STACK, AIPU_MM_DATA_TYPE_STATIC, AIPU_MM_DATA_TYPE_REUSE, }; /** * struct aipu_buf_desc - Buffer description. * @pa: [kmd] Buffer physical base address * @dev_offset: [kmd] Device offset used in mmap * @bytes: [kmd] Buffer size in bytes */ struct aipu_buf_desc { __u64 pa; __u64 dev_offset; __u64 bytes; }; /** * struct aipu_buf_request - Buffer allocation request structure. * @bytes: [must] Buffer size to allocate (in bytes) * @align_in_page: [must] Buffer address alignment (must be a power of 2) * @data_type: [must] Type of data in this buffer/Type of this buffer * @desc: [kmd] Descriptor of the successfully allocated buffer */ struct aipu_buf_request { __u64 bytes; __u32 align_in_page; __u32 data_type; struct aipu_buf_desc desc; }; /** * enum aipu_job_execution_flag - Flags for AIPU's executions * @AIPU_JOB_EXEC_FLAG_NONE: No flag * @AIPU_JOB_EXEC_FLAG_SRAM_MUTEX: The job uses SoC SRAM exclusively. */ enum aipu_job_execution_flag { AIPU_JOB_EXEC_FLAG_NONE = 0x0, AIPU_JOB_EXEC_FLAG_SRAM_MUTEX = 0x1, }; /** * struct aipu_job_desc - Description of a job to be scheduled. * @is_defer_run: Reserve an AIPU core for this job and defer the running of it * @version_compatible:Is this job compatible on AIPUs with different ISA version * @core_id: ID of the core requested to reserve for the deferred job * @do_trigger: Trigger the previously scheduled deferred job to run * @aipu_arch: [must] Target device architecture * @aipu_version: [must] Target device ISA version * @aipu_config: [must] Target device configuration * @start_pc_addr: [must] Address of the start PC * @intr_handler_addr: [must] Address of the AIPU interrupt handler * @data_0_addr: [must] Address of the 0th data buffer * @data_1_addr: [must] Address of the 1th data buffer * @job_id: [must] ID of this job * @enable_prof: Enable performance profiling counters in SoC (if any) * @enable_asid: Enable ASID feature * @enable_poll_opt: Enable optimizations for job status polling * @exec_flag: Combinations of execution flags * * For fields is_defer_run/do_trigger/enable_prof/enable_asid/enable_poll_opt, * set them to be 1/0 to enable/disable the corresponding operations. */ struct aipu_job_desc { __u32 is_defer_run; __u32 version_compatible; __u32 core_id; __u32 do_trigger; __u32 aipu_arch; __u32 aipu_version; __u32 aipu_config; __u64 start_pc_addr; __u64 intr_handler_addr; __u64 data_0_addr; __u64 data_1_addr; __u32 job_id; __u32 enable_prof; __u32 enable_asid; __u32 enable_poll_opt; __u32 exec_flag; }; /** * struct aipu_job_status_desc - Jod execution status. * @job_id: [kmd] Job ID * @thread_id: [kmd] ID of the thread scheduled this job * @state: [kmd] Execution state: done or exception * @pdata: [kmd] External profiling results */ struct aipu_job_status_desc { __u32 job_id; __u32 thread_id; #define AIPU_JOB_STATE_DONE 0x1 #define AIPU_JOB_STATE_EXCEPTION 0x2 __u32 state; struct aipu_ext_profiling_data { __s64 execution_time_ns; /* [kmd] Execution time */ __u32 rdata_tot_msb; /* [kmd] Total read transactions (MSB) */ __u32 rdata_tot_lsb; /* [kmd] Total read transactions (LSB) */ __u32 wdata_tot_msb; /* [kmd] Total write transactions (MSB) */ __u32 wdata_tot_lsb; /* [kmd] Total write transactions (LSB) */ __u32 tot_cycle_msb; /* [kmd] Total cycle counts (MSB) */ __u32 tot_cycle_lsb; /* [kmd] Total cycle counts (LSB) */ } pdata; }; /** * struct aipu_job_status_query - Query status of (a) job(s) scheduled before. * @max_cnt: [must] Maximum number of job status to query * @of_this_thread: [must] Get status of jobs scheduled by this thread/all threads share fd (1/0) * @status: [alloc] Pointer to an array (length is max_cnt) to store the status * @poll_cnt: [kmd] Count of the successfully polled job(s) */ struct aipu_job_status_query { __u32 max_cnt; __u32 of_this_thread; struct aipu_job_status_desc *status; __u32 poll_cnt; }; /** * struct aipu_io_req - AIPU core IO operations request. * @core_id: [must] Core ID * @offset: [must] Register offset * @rw: [must] Read or write operation * @value: [must]/[kmd] Value to be written/value readback */ struct aipu_io_req { __u32 core_id; __u32 offset; enum aipu_rw_attr { AIPU_IO_READ, AIPU_IO_WRITE } rw; __u32 value; }; /* * AIPU IOCTL List */ #define AIPU_IOCTL_MAGIC 'A' /** * DOC: AIPU_IOCTL_QUERY_CAP * * @Description * * ioctl to query the common capability of AIPUs * * User mode driver should call this before calling AIPU_IOCTL_QUERYCORECAP. */ #define AIPU_IOCTL_QUERY_CAP _IOR(AIPU_IOCTL_MAGIC, 0, struct aipu_cap) /** * DOC: AIPU_IOCTL_QUERY_CORE_CAP * * @Description * * ioctl to query the capability of an AIPU core * * User mode driver only need to call this when the core count returned by AIPU_IOCTL_QUERYCAP > 1. */ #define AIPU_IOCTL_QUERY_CORE_CAP _IOR(AIPU_IOCTL_MAGIC, 1, struct aipu_core_cap) /** * DOC: AIPU_IOCTL_REQ_BUF * * @Description * * ioctl to request to allocate a coherent buffer * * This fails if kernel driver cannot find a free buffer meets the size/alignment request. */ #define AIPU_IOCTL_REQ_BUF _IOWR(AIPU_IOCTL_MAGIC, 2, struct aipu_buf_request) /** * DOC: AIPU_IOCTL_FREE_BUF * * @Description * * ioctl to request to free a coherent buffer allocated by AIPU_IOCTL_REQBUF * */ #define AIPU_IOCTL_FREE_BUF _IOW(AIPU_IOCTL_MAGIC, 3, struct aipu_buf_desc) /** * DOC: AIPU_IOCTL_DISABLE_SRAM * * @Description * * ioctl to disable the management of SoC SRAM in kernel driver * * This fails if the there is no SRAM in the system or the SRAM has already been allocated. */ #define AIPU_IOCTL_DISABLE_SRAM _IO(AIPU_IOCTL_MAGIC, 4) /** * DOC: AIPU_IOCTL_ENABLE_SRAM * * @Description * * ioctl to enable the management of SoC SRAM in kernel driver disabled by AIPU_IOCTL_DISABLE_SRAM */ #define AIPU_IOCTL_ENABLE_SRAM _IO(AIPU_IOCTL_MAGIC, 5) /** * DOC: AIPU_IOCTL_SCHEDULE_JOB * * @Description * * ioctl to schedule a user job to kernel mode driver for execution * * This is a non-blocking operation therefore user mode driver should check the job status * via AIPU_IOCTL_QUERY_STATUS. */ #define AIPU_IOCTL_SCHEDULE_JOB _IOW(AIPU_IOCTL_MAGIC, 6, struct aipu_job_desc) /** * DOC: AIPU_IOCTL_QUERY_STATUS * * @Description * * ioctl to query the execution status of one or multiple scheduled job(s) */ #define AIPU_IOCTL_QUERY_STATUS _IOWR(AIPU_IOCTL_MAGIC, 7, struct aipu_job_status_query) /** * DOC: AIPU_IOCTL_KILL_TIMEOUT_JOB * * @Description * * ioctl to kill a timeout job and clean it from kernel mode driver. */ #define AIPU_IOCTL_KILL_TIMEOUT_JOB _IOW(AIPU_IOCTL_MAGIC, 8, __u32) /** * DOC: AIPU_IOCTL_REQ_IO * * @Description * * ioctl to read/write an external register of an AIPU core. */ #define AIPU_IOCTL_REQ_IO _IOWR(AIPU_IOCTL_MAGIC, 9, struct aipu_io_req) #endif /* __UAPI_MISC_ARMCHINA_AIPU_H__ */
30.994012
99
0.727685
433bf2f4edcffe01f9d587c95cef9a1e697e40da
1,280
ts
TypeScript
packages/runtime/container-runtime/src/test/summarizerHandle.spec.ts
jamesbond004/FluidFramework
cab1c1701e0c65c6cacc98f9341d72fbaf7da1c1
[ "MIT" ]
3,743
2020-09-08T19:18:12.000Z
2022-03-31T15:09:22.000Z
packages/runtime/container-runtime/src/test/summarizerHandle.spec.ts
jamesbond004/FluidFramework
cab1c1701e0c65c6cacc98f9341d72fbaf7da1c1
[ "MIT" ]
4,337
2020-09-08T19:55:22.000Z
2022-03-31T23:06:48.000Z
packages/runtime/container-runtime/src/test/summarizerHandle.spec.ts
FFHixio/FluidFramework
183216acf0ddeec9d97e503c173e25104bbe1688
[ "MIT" ]
379
2020-09-08T19:48:36.000Z
2022-03-31T19:52:50.000Z
/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { strict as assert } from "assert"; import { IFluidHandleContext, IFluidHandle, IFluidLoadable, } from "@fluidframework/core-interfaces"; import { SummarizerHandle } from "../summarizerHandle"; const mockHandleContext: IFluidHandleContext = { absolutePath: "", isAttached: false, IFluidHandleContext: undefined as any, attachGraph: () => { throw new Error("Method not implemented."); }, resolveHandle: () => { throw new Error("Method not implemented."); }, }; class MockSummarizer implements IFluidLoadable { public get IFluidLoadable() { return this; } public get handle() { return new SummarizerHandle(this, "", mockHandleContext); } } describe("SummarizerHandle", () => { let handle: IFluidHandle | undefined; beforeEach(async () => { const summarizer = new MockSummarizer(); handle = summarizer.handle; }); it("get should fail", async () => { try { await handle?.get(); } catch (e) { assert(e.message === "Do not try to get a summarizer object from the handle. Reference it directly."); } }); });
29.090909
114
0.635156
38b12914cc3362e8251a1b9effc1a28d4c7e49eb
14,675
php
PHP
resources/views/Corporate/Setting/Function/customer_fee.blade.php
ngonmypro/CALLBACK
0ead162223c98f94678ecf8a440a13e47c7b08b7
[ "MIT" ]
null
null
null
resources/views/Corporate/Setting/Function/customer_fee.blade.php
ngonmypro/CALLBACK
0ead162223c98f94678ecf8a440a13e47c7b08b7
[ "MIT" ]
null
null
null
resources/views/Corporate/Setting/Function/customer_fee.blade.php
ngonmypro/CALLBACK
0ead162223c98f94678ecf8a440a13e47c7b08b7
[ "MIT" ]
null
null
null
{{-- Customer Fee Form --}} <div id="" class="row mx-auto mb-4"> <div class="col-12 p-0"> <div class="card" style="border: none;"> <form id="customer_fee_form" action="{{ url('Corporate/Setting/CustomerFee') }}" method="POST" class="form"> {{-- {!! json_encode($data->customer_fee) !!} --}} {{ csrf_field() }} <input type="hidden" name="corp_code" value="{{ $corp_code }}"> <div class="card-header" style="border: none;"> <h4 class="mb-0 py-1"> <span class="template-text">{{__('corpsetting.customer_fee')}}</span> </h4> </div> <div class="card-body px-4 pt-4 pb-2" style="border: none;"> <div class="col-12" id="item-wrapper"> <div class="row"> <div class="col-12 text-right"> <button type="button" id="add" class="btn btn-outline-success"> <i class="fa fa-plus" aria-hidden="true"></i><span>{{__('corpsetting.add')}}</span> </button> </div> </div> @if (isset($data->customer_fee->config) && is_array(json_decode($data->customer_fee->config))) @php $i = 0; $data->customer_fee->config = json_decode($data->customer_fee->config); @endphp @foreach ($data->customer_fee->config as $item) @if (!isset($item->payment_channel) || !isset($item->type) || !isset($item->value)) @php break; @endphp @endif <div class="row py-3 border-bottom items"> <div class="col-12"> {{-- PAYMENT_CHANNEL --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-payment_channel')}}</label> <select data-input="{{ $item->payment_channel }}" class="form-control" name="payment_channel[]"> <option selected="selected">PLEASE SELECT</option> @if($channel_name != NULL) @foreach($channel_name as $i => $channel) <option value="{{ $channel }}">{{ strtoupper($channel) }}</option> @endforeach @endif </select> </div> </div> </div> {{-- TYPE --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-type')}}</label> <select data-input="{{ $item->type }}" class="form-control" name="type[]"> <option></option> <option value="FLAT">{{__('corpsetting.customer_fee-field-type-flat')}}</option> <option value="PERCENTAGE">{{__('corpsetting.customer_fee-field-type-percentage')}}</option> </select> </div> </div> </div> {{-- VALUE --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-value')}}</label> <div class="input-group"> <input type="number" name="value[]" value="{{ $item->value }}" class="form-control"> </div> </div> </div> </div> </div> @if ($i !== 0) <div class="col-12 text-right"> <button type="button" class="remove btn btn-outline-danger"> <i class="fa fa-trash"></i><span>{{__('corpsetting.remove')}}</span> </button> </div> @endif </div> @php $i++; @endphp @endforeach @else <div class="row py-3 border-bottom items"> <div class="col-12"> {{-- PAYMENT_CHANNEL --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-payment_channel')}}</label> <select class="form-control" name="payment_channel[]"> <option></option> <option value="PROMPT_PAY">{{__('corpsetting.customer_fee-field-payment_channel-pp')}}</option> <option value="CREDIT_CARD">{{__('corpsetting.customer_fee-field-payment_channel-cc')}}</option> </select> </div> </div> </div> {{-- TYPE --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-type')}}</label> <select class="form-control" name="type[]"> <option></option> <option value="FLAT">{{__('corpsetting.customer_fee-field-type-flat')}}</option> <option value="PERCENTAGE">{{__('corpsetting.customer_fee-field-type-percentage')}}</option> </select> </div> </div> </div> {{-- VALUE --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-value')}}</label> <div class="input-group"> <input type="number" name="value[]" class="form-control"> </div> </div> </div> </div> </div> </div> @endif </div> {{-- SUMIT FORM --}} <div class="row py-2 mt-5"> <div class="col-12 text-right"> <div class="form-group"> @Permission(CORPORATE_MANAGEMENT.VIEW) @if (isset($corp_code) && !blank($corp_code)) <a href="{{ url('Corporate')}}" class="btn bg-gradient-danger">{{__('common.cancel')}}</a> @else <a onclick="window.history.back()" class="btn bg-gradient-danger">{{__('common.cancel')}}</a> @endif @EndPermission <button type="submit" class="btn btn-outline-primary">{{__('corpsetting.save')}}</button> </div> </div> </div> </div> </form> </div> </div> </div> <section class="d-none" id="item-clonable"> <div class="row py-3 border-bottom items"> <div class="col-12"> {{-- PAYMENT_CHANNEL --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-payment_channel')}}</label> <select class="form-control" name="payment_channel[]"> <option selected="selected">PLEASE SELECT</option> @if($channel_name != NULL) @foreach($channel_name as $i => $channel) <option value="{{ $channel }}">{{ strtoupper($channel) }}</option> @endforeach @endif </select> </div> </div> </div> {{-- TYPE --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-type')}}</label> <select class="form-control" name="type[]"> <option></option> <option value="FLAT">{{__('corpsetting.customer_fee-field-type-flat')}}</option> <option value="PERCENTAGE">{{__('corpsetting.customer_fee-field-type-percentage')}}</option> </select> </div> </div> </div> {{-- VALUE --}} <div class="row py-2"> <div class="col-12"> <div class="form-group"> <label>{{__('corpsetting.customer_fee-field-value')}}</label> <div class="input-group"> <input type="number" name="value[]" class="form-control"> </div> </div> </div> </div> </div> <div class="col-12 text-right"> <button type="button" class="remove btn btn-outline-danger"> <i class="fa fa-trash"></i><span>Remove</span> </button> </div> </div> </section> @section('script.eipp.corp-setting.customer_fee') {!! JsValidator::formRequest('App\Http\Requests\CorpCustomerFeeRequest', '#customer_fee_form') !!} <script> let customer = {} customer.init = () => { // re-initial select-option $('#customer_fee_form select[name^=type]').each(function() { $(this).val($(this).data('input')) }) $('#customer_fee_form select[name^=payment_channel]').each(function() { $(this).val($(this).data('input')) }) } $(document).ready(function() { customer.init() $(document).on('click', '#customer_fee_form #add', function() { const elem = $('#item-clonable').children().clone() $('#customer_fee_form #item-wrapper').append(elem) }) $(document).on('click', '.remove', function() { $(this).parents().closest('.items').first().remove() }) // $(document).on('change', '#customer_fee_form select[name^=payment_channel]', function() { // const val = $(this).val() // if (val !== '') { // $( '#customer_fee_form select[name^=payment_channel] option' ).not( $(this).children('option') ).each(function () { // if ( this.value === val ) { // this.disabled = true // DISABLED ALL, EXCEPT SELF // } // }) // } // }) // $(document).on('focus', '#customer_fee_form select[name^=payment_channel]', function() { // let values = [] // $( '#customer_fee_form select[name^=payment_channel] option:selected' ).each(function () { // values.push(this.value) // }) // $( '#customer_fee_form select[name^=payment_channel] option' ).each(function (item) { // if ( values.indexOf( $(this).val() ) === -1 ) { // this.disabled = false // } else if ( !$(this).is(':selected') ) { // this.disabled = true // } // }) // }) }) </script> @endsection
51.132404
148
0.340716
b7fdee8ba4a123bb8f6d75080f9429935dc739c1
266
cs
C#
src/FluentCineworld/Listings/GetDates/BodyDto.cs
lewishenson/FluentCineworld
aacf58a6120fb56d30616311bd1045e381a8f1c6
[ "MIT" ]
null
null
null
src/FluentCineworld/Listings/GetDates/BodyDto.cs
lewishenson/FluentCineworld
aacf58a6120fb56d30616311bd1045e381a8f1c6
[ "MIT" ]
20
2015-03-20T23:24:29.000Z
2022-02-21T23:47:46.000Z
src/FluentCineworld/Listings/GetDates/BodyDto.cs
lewishenson/FluentCineworld
aacf58a6120fb56d30616311bd1045e381a8f1c6
[ "MIT" ]
null
null
null
using System; using System.Collections.Generic; using System.Text.Json.Serialization; namespace FluentCineworld.Listings.GetDates { internal class BodyDto { [JsonPropertyName("dates")] public IEnumerable<DateTime> Dates { get; set; } } }
22.166667
56
0.710526
836003bfd6218f65c834216c222fda266d2e67e7
4,545
ts
TypeScript
packages/framework-debug-gui/src/app/views/http/request/http-request.component.ts
Rush/deepkit-framework
60a50d64d553fa2adc316481e1cfeda8873771de
[ "MIT" ]
467
2020-09-15T18:51:20.000Z
2022-03-31T23:29:15.000Z
packages/framework-debug-gui/src/app/views/http/request/http-request.component.ts
Rush/deepkit-framework
60a50d64d553fa2adc316481e1cfeda8873771de
[ "MIT" ]
113
2020-09-14T21:03:36.000Z
2022-03-31T20:02:05.000Z
packages/framework-debug-gui/src/app/views/http/request/http-request.component.ts
Rush/deepkit-framework
60a50d64d553fa2adc316481e1cfeda8873771de
[ "MIT" ]
32
2020-09-17T22:29:44.000Z
2022-03-31T14:06:22.000Z
/* * Deepkit Framework * Copyright (C) 2021 Deepkit UG, Marc J. Schmidt * * This program is free software: you can redistribute it and/or modify * it under the terms of the MIT License. * * You should have received a copy of the MIT License along with this program. */ import { ChangeDetectorRef, Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ControllerClient } from '../../../client'; import { EntitySubject } from '@deepkit/rpc'; import { DebugRequest, Workflow } from '@deepkit/framework-debug-api'; @Component({ template: ` <ng-container *ngIf="request|async as request"> <div class="header"> <h3>#{{request.id}}</h3> <div class="text-selection">{{request.method}} {{request.url}}</div> <div class="text-selection">Status {{request.statusCode}}</div> <div class="text-selection">{{request.created|date:'medium'}}</div> <div class="text-selection">Response time: {{time(request.times['http'])}}</div> </div> <div> <dui-button-group> <dui-tab-button [active]="true">Overview</dui-tab-button> <dui-tab-button>Events (5)</dui-tab-button> <dui-tab-button>Queries (5)</dui-tab-button> <dui-tab-button>Mails</dui-tab-button> <dui-tab-button>Message Bus</dui-tab-button> <dui-tab-button>Logs</dui-tab-button> </dui-button-group> </div> <div class="workflow" style="height: 250px; margin-bottom: 10px; overflow: auto" class="overlay-scrollbar-small" *ngIf="httpWorkflow"> <app-workflow [workflow]="httpWorkflow"> <ng-container *ngFor="let placeName of httpWorkflow.places"> <app-workflow-card [name]="placeName" class="valid" *ngIf="request.times['workflow/http/' + placeName]"> <div style="color: var(--text-light)">{{time(request.times['workflow/http/' + placeName])}}</div> </app-workflow-card> <app-workflow-card [name]="placeName" class="invalid" *ngIf="undefined === request.times['workflow/http/' + placeName]"> </app-workflow-card> </ng-container> </app-workflow> </div> //total db time: split in query time & serialization time //total message bus time //workflow times //event times //session user & storage //resolved route //request body & header //response body & header //triggered events //created services in DI //template render times for each render(), so we see bottlenecks easily //logs by levels //database queries: query time, serialization time //message bus events <div class="logs"> Logs </div> </ng-container> `, styles: [` app-workflow >>> .node.invalid { color: var(--text-light); } app-workflow >>> .node.valid { border: 0; } app-workflow >>> .node.valid::after { content: ''; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border: 1px solid var(--color-green); opacity: 0.3; } `] }) export class HttpRequestComponent { public request?: EntitySubject<DebugRequest>; public httpWorkflow?: Workflow; constructor( protected activatedRoute: ActivatedRoute, protected controllerClient: ControllerClient, protected cd: ChangeDetectorRef, ) { activatedRoute.params.subscribe((p) => { setTimeout(() => this.loadRequest(Number(p.id))); }); } public time(took?: number): string { if (took === undefined) return '-'; if (took >= 1000) return (took / 1000).toFixed(3) + 's'; return (took).toFixed(3) + 'ms'; } protected async loadRequest(id: number) { // const requests = await this.controllerClient.getHttpRequests(); // this.request = requests.getEntitySubject(id); this.httpWorkflow = await this.controllerClient.getWorkflow('http'); this.cd.detectChanges(); } }
36.653226
146
0.546535
c67bdfd28fa559a2c1849bcda9c3209bd53a2a71
1,204
py
Python
dero/pdf.py
whoopnip/dero
62e081b341cc711ea8e1578e7c65b581eb74fa3f
[ "MIT" ]
null
null
null
dero/pdf.py
whoopnip/dero
62e081b341cc711ea8e1578e7c65b581eb74fa3f
[ "MIT" ]
3
2020-03-24T17:57:46.000Z
2021-02-02T22:25:37.000Z
dero/pdf.py
whoopnip/dero
62e081b341cc711ea8e1578e7c65b581eb74fa3f
[ "MIT" ]
null
null
null
import os from typing import Sequence, List from pdfrw import PdfReader, PdfWriter from PyPDF2 import PdfFileMerger def strip_pages_pdf(indir, infile, outdir=None, outfile=None, numpages=1, keep=False): ''' Deletes the first pages from a PDF. Omit outfile name to replace. Default is one page. If option keep is specified, keeps first pages of PDF, dropping rest. ''' if outfile is None: outfile = infile if outdir is None: outdir = indir output = PdfWriter() inpath = os.path.join(indir,infile) outpath = os.path.join(outdir,outfile) for i, page in enumerate(PdfReader(inpath).pages): if not keep: if i > (numpages - 1): output.addpage(page) if keep: if i <= (numpages - 1): output.addpage(page) output.write(outpath) def merge_pdfs(pdf_paths: Sequence[str], out_path: str): merger = PdfFileMerger() for pdf in pdf_paths: merger.append(pdf) merger.write(out_path) def pdf_filenames_in_folder(folder: str) -> List[str]: pdf_files = [file for file in next(os.walk(folder))[2] if file.endswith('.pdf')] return pdf_files
25.617021
90
0.640365
fa42ef4deac58b2d606dbbc6f317092b55bc10da
689
swift
Swift
JWTCodable/Extensions/Extensions.swift
knottx/JWTCodable
37689181969a2df1abe642be41d5163e3a97fa8f
[ "MIT" ]
2
2021-04-06T04:52:27.000Z
2021-07-07T20:10:49.000Z
JWTCodable/Extensions/Extensions.swift
knottx/JWTCodable
37689181969a2df1abe642be41d5163e3a97fa8f
[ "MIT" ]
null
null
null
JWTCodable/Extensions/Extensions.swift
knottx/JWTCodable
37689181969a2df1abe642be41d5163e3a97fa8f
[ "MIT" ]
null
null
null
// // JWTDecoderExtension.swift // JWTDecoder // // Created by Visarut Tippun on 31/3/21. // Copyright © 2021 knottx. All rights reserved. // import Foundation extension Array { func getElement(at index: Int) -> Element? { let isValidIndex = index >= 0 && index < count return isValidIndex ? self[index] : nil } } extension Dictionary { func data(option: JSONSerialization.WritingOptions = .prettyPrinted) throws -> Data { return try JSONSerialization.data(withJSONObject: self, options: option) } } extension Data { func asString(enoding: String.Encoding = .utf8) -> String? { return String(data: self, encoding: .utf8) } }
23.758621
89
0.66328
1724464e5f13bc18b456e1d53729e4887682c41f
653
cpp
C++
CourseContent/construct-destruct/Cat.cpp
ejrach/course-cplusplus
bc646ea3a2294d1d0b897d214845925fca848002
[ "MIT" ]
null
null
null
CourseContent/construct-destruct/Cat.cpp
ejrach/course-cplusplus
bc646ea3a2294d1d0b897d214845925fca848002
[ "MIT" ]
null
null
null
CourseContent/construct-destruct/Cat.cpp
ejrach/course-cplusplus
bc646ea3a2294d1d0b897d214845925fca848002
[ "MIT" ]
null
null
null
// // Cat.cpp // construct-destruct // // Created by Eric on 7/9/19. // Copyright © 2019 Eric. All rights reserved. // #include <stdio.h> #include <iostream> #include "Cat.h" using namespace std; //Defining the constructor --> ClassName::Constructor Cat::Cat(){ cout << "Cat created" << endl; happy = true; //proper place to intiailze the property is in the constructor } //Defining the destructor. Memory will be given back to the operating system Cat::~Cat(){ cout << "Cat destroyed" << endl; } void Cat::speak(){ if(happy){ cout << "Meow!" << endl; } else{ cout << "Sssss" << endl; } }
18.657143
86
0.603369
4cd064bd8d8c6222c2b0e95b60ef666a49b368e3
3,295
py
Python
server.py
joonahn/taxonomy-assign-frontend
d1e881892b77f7f05801b9674003e7f6872e5c80
[ "MIT" ]
null
null
null
server.py
joonahn/taxonomy-assign-frontend
d1e881892b77f7f05801b9674003e7f6872e5c80
[ "MIT" ]
null
null
null
server.py
joonahn/taxonomy-assign-frontend
d1e881892b77f7f05801b9674003e7f6872e5c80
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import os.path import shutil import json from flask import current_app, request BASE_DIR = os.path.dirname(__file__) MEDIA_ROOT = os.path.join(BASE_DIR, 'media') UPLOAD_DIRECTORY = os.path.join(MEDIA_ROOT, 'upload') CHUNKS_DIRECTORY = os.path.join(MEDIA_ROOT, 'chunks') # Utils ################## def make_response(status=200, content=None): """ Construct a response to an upload request. Success is indicated by a status of 200 and { "success": true } contained in the content. Also, content-type is text/plain by default since IE9 and below chokes on application/json. For CORS environments and IE9 and below, the content-type needs to be text/html. """ return current_app.response_class(json.dumps(content, indent=None if request.is_xhr else 2), mimetype='text/plain') def validate(attrs): """ No-op function which will validate the client-side data. Werkzeug will throw an exception if you try to access an attribute that does not have a key for a MultiDict. """ try: #required_attributes = ('qquuid', 'qqfilename') #[attrs.get(k) for k,v in attrs.items()] return True except Exception as e: return False def handle_delete(uuid): """ Handles a filesystem delete based on UUID.""" location = os.path.join(UPLOAD_DIRECTORY, uuid) print(uuid) print(location) shutil.rmtree(location) def handle_upload(f, attrs): """ Handle a chunked or non-chunked upload. """ chunked = False dest_folder = os.path.join(UPLOAD_DIRECTORY, attrs['qquuid']) dest = os.path.join(dest_folder, attrs['qqfilename']) # Chunked if 'qqtotalparts' in attrs and int(attrs['qqtotalparts']) > 1: chunked = True dest_folder = os.path.join(CHUNKS_DIRECTORY, attrs['qquuid']) dest = os.path.join(dest_folder, attrs['qqfilename'], str(attrs['qqpartindex'])) save_upload(f, dest) if chunked and (int(attrs['qqtotalparts']) - 1 == int(attrs['qqpartindex'])): combine_chunks(attrs['qqtotalparts'], attrs['qqtotalfilesize'], source_folder=os.path.dirname(dest), dest=os.path.join(UPLOAD_DIRECTORY, attrs['qquuid'], attrs['qqfilename'])) shutil.rmtree(os.path.dirname(os.path.dirname(dest))) def save_upload(f, path): """ Save an upload. Uploads are stored in media/uploads """ if not os.path.exists(os.path.dirname(path)): os.makedirs(os.path.dirname(path)) with open(path, 'wb+') as destination: destination.write(f.read()) def combine_chunks(total_parts, total_size, source_folder, dest): """ Combine a chunked file into a whole file again. Goes through each part , in order, and appends that part's bytes to another destination file. Chunks are stored in media/chunks Uploads are saved in media/uploads """ if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) with open(dest, 'wb+') as destination: for i in range(int(total_parts)): part = os.path.join(source_folder, str(i)) with open(part, 'rb') as source: destination.write(source.read())
31.990291
110
0.654021
3ab4720712e6073dedbedb2ecc1b7c32bc6f819f
6,144
dart
Dart
lib/page/kasusDuniaPage.dart
jeprikarel/PantauCovid19
52b5635b13d5a0aca34abc5862454aeb07b741fa
[ "MIT" ]
null
null
null
lib/page/kasusDuniaPage.dart
jeprikarel/PantauCovid19
52b5635b13d5a0aca34abc5862454aeb07b741fa
[ "MIT" ]
null
null
null
lib/page/kasusDuniaPage.dart
jeprikarel/PantauCovid19
52b5635b13d5a0aca34abc5862454aeb07b741fa
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:pantaucovid19/components/customCard.dart'; import 'package:pantaucovid19/components/customDivider.dart'; import 'package:pantaucovid19/components/infoCard.dart'; import 'package:pantaucovid19/connection/pantauCovid19Http.dart'; import 'package:pantaucovid19/model/countryApiModel.dart'; import 'package:pantaucovid19/model/valueApiModel.dart'; import 'package:latlong/latlong.dart'; import 'package:loading_animations/loading_animations.dart'; class KasusDuniaPage extends StatefulWidget { @override _KasusDuniaPageState createState() => _KasusDuniaPageState(); } class _KasusDuniaPageState extends State<KasusDuniaPage> { final MapController _controller = MapController(); List<CountryApi> _listCorona = []; void getListCorona() async { _listCorona = (await PantauCovid19Http().getStatusDunia()) ?? []; setState(() {}); } @override void initState() { getListCorona(); super.initState(); } @override Widget build(BuildContext context) { return Stack( children: <Widget>[ FlutterMap( options: MapOptions(zoom: 4, minZoom: 4), mapController: _controller, layers: [ TileLayerOptions( tileProvider: NonCachingNetworkTileProvider(), urlTemplate: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}@2x.png/?access_token=pk.eyJ1Ijoibml6d2FyIiwiYSI6ImNqbzJpMG1vNzBta3Qza210bjU3eG1lMGUifQ.28m4gM6M7inknP_vQjFEuA", additionalOptions: { 'accessToken': 'pk.eyJ1Ijoibml6d2FyIiwiYSI6ImNqbzJpMG1vNzBta3Qza210bjU3eG1lMGUifQ.28m4gM6M7inknP_vQjFEuA', 'id': 'mapbox.streets', }, ), MarkerLayerOptions( markers: _listCorona .map( (e) => Marker( width: 30, height: 30, point: LatLng(e.attributes.lat, e.attributes.long), builder: (context) => Transform( transform: Matrix4.translationValues(0, -12, 0), child: InkWell( onTap: () { showDialog( context: context, builder: (context) { return AlertDialog( title: Text(e.attributes.countryRegion), content: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, children: <Widget>[ Text("Positif : ${e.attributes.confirmed}"), Text("Sembuh : ${e.attributes.recovered}"), Text("Meninggal : ${e.attributes.deaths}"), ], ), actions: <Widget>[ FlatButton( child: Text("Tutup"), onPressed: () { Navigator.pop(context); }, ) ], ); }); }, child: Container( child: Icon( Icons.place, size: 24, color: Colors.red, ), ), ), ), ), ) .toList()), ], ), Container( height: 84, padding: const EdgeInsets.all(8.0), child: Row( children: <Widget>[ Expanded(child: _positifCoronaWidget()), RowDivider(), Expanded(child: _sembuhCoronaWidget()), RowDivider(), Expanded(child: _meninggalCoronaWidget()), ], ), ), ], ); } Widget _positifCoronaWidget() { return FutureBuilder<ValueApi>( future: PantauCovid19Http().getPositif(), builder: (BuildContext context, AsyncSnapshot<ValueApi> snapshot) { if (snapshot.hasData) return InfoCard( title: "Positif Corona", value: snapshot.data.value, color: Colors.yellow[800], ); else return _loadingCard(context); }, ); } Widget _sembuhCoronaWidget() { return FutureBuilder<ValueApi>( future: PantauCovid19Http().getSembuh(), builder: (BuildContext context, AsyncSnapshot<ValueApi> snapshot) { if (snapshot.hasData) return InfoCard( title: "Sembuh", value: snapshot.data.value, color: Colors.green, ); else return _loadingCard(context); }, ); } Widget _meninggalCoronaWidget() { return FutureBuilder<ValueApi>( future: PantauCovid19Http().getMeninggal(), builder: (BuildContext context, AsyncSnapshot<ValueApi> snapshot) { if (snapshot.hasData) return InfoCard( title: "Meninggal", value: snapshot.data.value, color: Colors.red ); else return _loadingCard(context); }, ); } Widget _loadingCard(context) { return CustomCard( padding: EdgeInsets.all(10), child: LoadingFlipping.circle( size: 30, borderSize: 3, borderColor: Theme.of(context).primaryColor, ), ); } }
35.310345
188
0.477865
a108e812e1174b30becd404f2df63e704a440c81
2,107
ts
TypeScript
test/objectSet.spec.ts
KoichiKiyokawa/minidash
d1c8a9f3699b5648fec3b201d9d557ec65995534
[ "MIT" ]
9
2021-05-07T19:47:24.000Z
2022-02-16T13:45:08.000Z
test/objectSet.spec.ts
KoichiKiyokawa/minidash
d1c8a9f3699b5648fec3b201d9d557ec65995534
[ "MIT" ]
126
2021-04-30T01:23:39.000Z
2022-03-31T18:44:26.000Z
test/objectSet.spec.ts
KoichiKiyokawa/rhodash
d1c8a9f3699b5648fec3b201d9d557ec65995534
[ "MIT" ]
null
null
null
import { objectSet } from '../src/index' describe('default use case', () => { describe('assign to an empty object or array', () => { it(`objectSet({}, 'a.b.c[0]', 1) is { a: { b: { c: [1] } } }`, () => { expect(objectSet({}, 'a.b.c[0]', 1)).toEqual({ a: { b: { c: [1] } } }) }) it(`objectSet({}, 'a.b.c.0', 1) is { a: { b: { c: [1] } } }`, () => { expect(objectSet({}, 'a.b.c.0', 1)).toEqual({ a: { b: { c: [1] } } }) }) it(`objectSet({}, 'a.b.c0', 1) is { a: { b: { c0: 1 } } }`, () => { expect(objectSet({}, 'a.b.c0', 1)).toEqual({ a: { b: { c0: 1 } } }) }) it(`objectSet({}, 'a.b.0c', 1) is { a: { b: { "0c": 1 } } }`, () => { expect(objectSet({}, 'a.b.0c', 1)).toEqual({ a: { b: { '0c': 1 } } }) }) it(`objectSet([], '0', 1) is [1]`, () => { expect(objectSet([], '0', 1)).toEqual([1]) }) it(`objectSet([], '0.a', 1) is [{ a: 1 }]`, () => { expect(objectSet([], '0.a', 1)).toEqual([{ a: 1 }]) }) }) describe('merge objects', () => { it(`objectSet({ a: 1 }, 'a', 2) is { a: 2 }`, () => { expect(objectSet({ a: 1 }, 'a.b', 2)).toEqual({ a: { b: 2 } }) }) it(`objectSet({ a: 1 }, 'a.b', 2) is { a: { b: 2 } }`, () => { expect(objectSet({ a: 1 }, 'a.b', 2)).toEqual({ a: { b: 2 } }) }) it(`objectSet({ a: [{ b: 1 }] }, 'a.0.b.c', 2) is { a: [{ b: { c: 2 } }] }`, () => { expect(objectSet({ a: [{ b: 1 }] }, 'a.0.b.c', 2)).toEqual({ a: [{ b: { c: 2 } }] }) }) }) }) describe('edge case', () => { it('an empty string is in the path', () => { expect(objectSet({}, 'a[""].0', 1)).toEqual({ a: { '': [1] } }) expect(objectSet({}, "a[''].0", 1)).toEqual({ a: { '': [1] } }) expect(objectSet({}, 'a[``].0', 1)).toEqual({ a: { '``': [1] } }) }) it('path is an empty string', () => { expect(objectSet({}, '', 1)).toEqual({}) }) it(`set object path to an array`, () => { const result: any = objectSet([], 'a.b', 1) expect(Array.isArray(result)).toBe(true) expect(result['a']).toEqual({ b: 1 }) expect(result['a']['b']).toEqual(1) }) })
38.309091
90
0.407689
da2d45efbe08b6c6f2441474b27307a40ce8ce0b
908
php
PHP
src/Urbem/PatrimonialBundle/Controller/HomeController.php
evandojunior/urbem3.0
ba8d54109e51e82b689d1881e582fb0bce4375e0
[ "MIT" ]
null
null
null
src/Urbem/PatrimonialBundle/Controller/HomeController.php
evandojunior/urbem3.0
ba8d54109e51e82b689d1881e582fb0bce4375e0
[ "MIT" ]
null
null
null
src/Urbem/PatrimonialBundle/Controller/HomeController.php
evandojunior/urbem3.0
ba8d54109e51e82b689d1881e582fb0bce4375e0
[ "MIT" ]
1
2020-01-29T20:35:57.000Z
2020-01-29T20:35:57.000Z
<?php namespace Urbem\PatrimonialBundle\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\Request; use Urbem\CoreBundle\Controller\BaseController; class HomeController extends BaseController { /** * @param Request $request * @return \Symfony\Component\HttpFoundation\Response */ public function indexAction(Request $request) { $this->setBreadCrumb(); return $this->render('PatrimonialBundle::Home/index.html.twig'); } public function configuracaoAction(Request $request) { $this->setBreadCrumb(); return $this->render('PatrimonialBundle::Patrimonial/Configuracao/home.html.twig'); } public function compraAction(Request $request) { $this->setBreadCrumb(); return $this->render('PatrimonialBundle::Compras/Configuracao/home.html.twig'); } }
26.705882
91
0.704846
321e7e621d0d0a90bb80b320355e4a9b0afab137
4,832
rs
Rust
src/lib.rs
xarvic/panoramix
db65b4d9cc928baad25aa7bbb9a0a4b7926628ba
[ "MIT" ]
17
2021-03-03T08:55:38.000Z
2022-03-31T09:31:44.000Z
src/lib.rs
xarvic/panoramix
db65b4d9cc928baad25aa7bbb9a0a4b7926628ba
[ "MIT" ]
2
2021-08-29T12:47:55.000Z
2022-03-31T17:31:01.000Z
src/lib.rs
xarvic/panoramix
db65b4d9cc928baad25aa7bbb9a0a4b7926628ba
[ "MIT" ]
2
2021-03-04T22:20:44.000Z
2021-08-29T12:35:32.000Z
//! Panoramix is an experimental GUI framework for the Rust programming language. //! //! This framework is **data-driven and declarative**, drawing some inspiration from [React](https://github.com/facebook/react), and implemented on top of the [Druid](https://github.com/linebender/druid) toolkit. //! //! It aims to use **simple, idiomatic Rust**: Panoramix doesn't use unsafe code, cells, mutexes, or DSL macros. //! //! //! ## Getting started //! //! Here is our "hello world" example: //! //! ```no_run //! use panoramix::elements::{Button, Label}; //! use panoramix::{component, Column, CompCtx, Element, Metadata, NoEvent, RootHandler}; //! //! #[component] //! fn HelloBox(ctx: &CompCtx, _props: ()) -> impl Element<Event = NoEvent> { //! let md = ctx.use_metadata::<NoEvent, ()>(); //! Column!( //! Label::new("Hello world!"), //! Button::new("Say hello").on_click(md, |_, _| { //! println!("Hello world"); //! }) //! ) //! } //! //! fn main() -> Result<(), panoramix::PlatformError> { //! RootHandler::new(HelloBox) //! .with_tracing(true) //! .launch() //! } //! ``` //! //! To understand this example, let's define a few terms: //! //! - A **Widget** is the fundamental unit of GUI; for instance, a text field and a label are both widgets. You've probably seen the term if you've used other GUI frameworks. //! - An **Element** is a lightweight description of a Widget. In our example, [`Button::new`](elements::Button::new) and [`Label::new`](elements::Label::new) both return elements. The [`Column`] macro is similar to `vec![]` - it takes an arbitrary number of elements and returns a container element. //! - Some elements have builder methods, that return new elements. Eg: [`Button::on_click`](elements::Button::on_click). //! - A **Component** is a user-written function that takes **Props** as parameters and returns a tree of elements (or, more accurately, an arbitrary element that may or may not contain other elements). In our example, `HelloBox` is a component. By convention, components always have a CamelCase name. //! //! In Panoramix, you don't directly manipulate **widgets**; instead, you write **components** that return **elements**. The framework calls your components, gets a tree of elements, and builds a matching widget tree for you. When some event changes the application state, the framework calls your components again, gets a new element tree, and edits the widget tree accordingly. //! //! As such, the root of your Panoramix application will usually look like: //! //! ```no_run //! // main.rs //! //! use panoramix::elements::{Button, ButtonClick}; //! use panoramix::{component, CompCtx, Element, NoEvent, RootHandler}; //! //! #[derive(Debug, Default, Clone, PartialEq)] //! struct ApplicationState { //! // ... //! } //! //! #[component] //! fn MyRootComponent(ctx: &CompCtx, _props: ()) -> impl Element<Event = NoEvent> { //! // ... //! # panoramix::elements::EmptyElement::new() //! } //! //! fn main() -> Result<(), panoramix::PlatformError> { //! RootHandler::new(MyRootComponent) //! .with_tracing(true) //! .launch() //! } //! ``` //! //! For information on how to write a component, see [these tutorials](tutorials). mod ctx; mod element_tree; mod glue; mod metadata; mod root_handler; mod widget_sequence; pub mod test_harness; pub mod elements; pub mod widgets; pub mod flex; pub use panoramix_derive::component; pub use crate::ctx::CompCtx; pub use element_tree::{Element, ElementExt}; pub use metadata::{Metadata, NoEvent}; pub use root_handler::{PlatformError, RootHandler, RootWidget}; /// Traits and type used internally to compute the GUI. /// /// The end user should never manipulate these types directly; but someone wanting to /// create a custom element might need to. pub mod internals { // Note: These items are declared together in files, but are exported separately here // to have a clean separation in the documentation between the items required to write // a GUI and the items required to create a GUI element. pub use crate::ctx::{ProcessEventCtx, ReconcileCtx}; pub use crate::element_tree::VirtualDom; pub use crate::glue::{Action, DruidAppData, GlobalEventCx, WidgetId}; pub use crate::widget_sequence::{FlexWidget, WidgetSequence}; } /// Dummy modules, with tutorials integrated to the doc. pub mod tutorials { #[doc = include_str!("../tutorials/01_writing_a_component.md")] pub mod t_01_writing_a_component {} #[doc = include_str!("../tutorials/02_event_handling.md")] pub mod t_02_event_handling {} #[doc = include_str!("../tutorials/03_local_state.md")] pub mod t_03_local_state {} #[doc = include_str!("../tutorials/speedrun_tutorial.md")] pub mod t_speedrun_tutorial {} }
40.605042
379
0.679636
8c38e535d6fad063f6368a241d8136b1c064c4b7
8,988
sql
SQL
eas .sql
cakecom/eas
c7800131d7669e2165ccfab84a564ba84649fe42
[ "MIT" ]
null
null
null
eas .sql
cakecom/eas
c7800131d7669e2165ccfab84a564ba84649fe42
[ "MIT" ]
2
2021-02-02T20:36:46.000Z
2022-02-19T04:55:12.000Z
eas .sql
cakecom/eas
c7800131d7669e2165ccfab84a564ba84649fe42
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 19, 2020 at 08:50 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `eas` -- -- -------------------------------------------------------- -- -- Table structure for table `assessments` -- CREATE TABLE `assessments` ( `id` bigint(20) UNSIGNED NOT NULL, `user_id` int(11) DEFAULT NULL, `time_management` int(11) DEFAULT NULL, `quality_of_work` int(11) DEFAULT NULL, `creativity` int(11) DEFAULT NULL, `team_work` int(11) DEFAULT NULL, `discipline` int(11) DEFAULT NULL, `score` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `quarter_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `failed_jobs` -- CREATE TABLE `failed_jobs` ( `id` bigint(20) UNSIGNED NOT NULL, `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4, '2014_10_12_000000_create_users_table', 1), (5, '2014_10_12_100000_create_password_resets_table', 1), (6, '2019_08_19_000000_create_failed_jobs_table', 1), (7, '2020_07_14_131054_create_assessments_table', 2), (8, '2020_07_14_131109_create_requests_table', 2), (11, '2020_07_16_181727_create_requests_table', 3), (14, '2020_07_17_094603_create_quarters_table', 4), (16, '2020_07_17_164223_add_quarters_id_to_assessments_table', 5), (17, '2020_07_17_190201_add_quarter_id_to_requests_table', 6), (19, '2020_07_17_214254_add_column_to_requests_table', 7); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `quarters` -- CREATE TABLE `quarters` ( `id` bigint(20) UNSIGNED NOT NULL, `quarter` int(11) DEFAULT NULL, `date` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `success` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `requests` -- CREATE TABLE `requests` ( `id` bigint(20) UNSIGNED NOT NULL, `user_id` int(11) DEFAULT NULL, `status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `quarter_id` int(11) DEFAULT NULL, `score` int(11) DEFAULT NULL, `time_manage` int(11) DEFAULT NULL, `quality` int(11) DEFAULT NULL, `creativity` int(11) DEFAULT NULL, `discipline` int(11) DEFAULT NULL, `team_work` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` bigint(20) UNSIGNED NOT NULL, `type` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `type`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 2, 'Manager', '[email protected]', NULL, '$2y$10$OMZ35lyK4F5XRgbKxmPd3uezLpqi9a5zGl7gCqIBmsISCDehkew3y', NULL, '2020-07-13 13:42:22', '2020-07-13 13:42:22'), (2, 1, 'Director', '[email protected]', NULL, '$2y$10$Qw0dfXOLFdaIudja34Qkw.aaIF0ppAQ/JJ9nrWaGsCiIPvfwzxVVK', NULL, '2020-07-13 13:42:42', '2020-07-13 13:42:42'), (3, 0, 'Employee', '[email protected]', NULL, '$2y$10$3e9.atiSE9n1xhpwIiFm7uGQ1z6IFMf5cQJ06Fpf6HQ4CoyklMw36', NULL, '2020-07-13 13:43:23', '2020-07-13 13:43:23'), (4, 0, 'employee2', '[email protected]', NULL, '$2y$10$L/LazPVDdwUXgEZWRzR5y.iy/of0ubZ9BK8NQ.zBeVsSgy4tSoGr6', NULL, '2020-07-15 11:26:56', '2020-07-15 11:26:56'), (5, 0, 'employee3', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'), (6, 0, 'employee4', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'), (7, 0, 'employee5', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'), (9, 0, 'employee7', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'), (10, 0, 'employee8', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'), (11, 0, 'employee9', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'), (12, 0, 'employee10', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'), (13, 0, 'employee6', '[email protected]', NULL, '$2y$10$VjAFLXRFv7mB5tgptDL8wOlBwLvnCpx8zT8jeGZ/mSSVJhVpIF46i', NULL, '2020-07-15 11:27:22', '2020-07-15 11:27:22'); -- -- Indexes for dumped tables -- -- -- Indexes for table `assessments` -- ALTER TABLE `assessments` ADD PRIMARY KEY (`id`); -- -- Indexes for table `failed_jobs` -- ALTER TABLE `failed_jobs` ADD PRIMARY KEY (`id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `quarters` -- ALTER TABLE `quarters` ADD PRIMARY KEY (`id`); -- -- Indexes for table `requests` -- ALTER TABLE `requests` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `assessments` -- ALTER TABLE `assessments` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; -- -- AUTO_INCREMENT for table `failed_jobs` -- ALTER TABLE `failed_jobs` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; -- -- AUTO_INCREMENT for table `quarters` -- ALTER TABLE `quarters` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `requests` -- ALTER TABLE `requests` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47; 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 */;
34.045455
166
0.699488
586b85f44ecc77f07d2e9b58cbe5c861039291df
842
css
CSS
frontend/modules/user/assets/css/editProfile.css
coodesoft/social.radioalbum
8d83e506fcc825f66e5373bc61fad1f9c1997455
[ "BSD-3-Clause" ]
null
null
null
frontend/modules/user/assets/css/editProfile.css
coodesoft/social.radioalbum
8d83e506fcc825f66e5373bc61fad1f9c1997455
[ "BSD-3-Clause" ]
null
null
null
frontend/modules/user/assets/css/editProfile.css
coodesoft/social.radioalbum
8d83e506fcc825f66e5373bc61fad1f9c1997455
[ "BSD-3-Clause" ]
null
null
null
#editProfile .tab-pane>div{float:none;margin:15px auto 0}#editProfile ul li.active>a{border-top:1px solid transparent}#editProfile ul li>a{color:#222020;padding:10px 22px}#editProfile ul li>a:hover{color:#bbffbb;background:#222020}#personalInfoPanel img{width:100%}#socialInfoPanel textarea{resize:vertical}#visibilityInfoPanel .edit-opt{border-bottom:1px solid #b1b1b1;padding-bottom:5px;padding-top:5px}@media (max-width:680px){#visibilityInfoPanel .form-group>label{max-width:100%;font-size:12px}}#visibilityInfoPanel .visibility-option{display:inline-block;float:right}#visibilityInfoPanel .visibility-option label{margin:0 20px}#visibilityInfoPanel .visibility-option label input{width:20px;height:20px}#visibilityInfoPanel #statusDesc div{float:right;margin:0 4px}.edit-profile-area{padding-left:0 !important;padding-right:0 !important}
842
842
0.82304
c506f85b934642c80a9a8da2e8963345e7fdff37
838
css
CSS
style.css
tf2manu994/manmeetgill.com
24d797306f1d1ab86e39124ebf46520df78e7fea
[ "MIT" ]
null
null
null
style.css
tf2manu994/manmeetgill.com
24d797306f1d1ab86e39124ebf46520df78e7fea
[ "MIT" ]
null
null
null
style.css
tf2manu994/manmeetgill.com
24d797306f1d1ab86e39124ebf46520df78e7fea
[ "MIT" ]
null
null
null
footer { position: fixed; bottom: 0; width: 100%; max-height: 50px; color: #fff; text-align: center; background: rgba(0, 0, 0, 0.5); z-index:9999 } footer img { opacity: 0.75 } footer img:hover { opacity: 1.0 } footer a { text-decoration: none } .navbar-right { float: right; justify-content: flex-end } .navbar-left { float: left; flex-grow: 1; justify-content: flex-start } .sn { display: none; } .bg-0 { background-color: #f3f3f3; } .bg-1 { background-color: #fff1b0; } .bg-2 { background-color: #eaffab; } .bg-3 { background-color: #abffca; } .bg-4 { background-color: #abffff; } .bg-5 { background-color: #abc3ff; } .bg-6 { background-color: #cbafff; } .bg-7 { background-color: #fa5765; } .bg-8 { background-color: #d4d4d4; } .bg-9 { background-color: #ababab; }
12.507463
33
0.610979
a12237dab25cd94ec27d16149be371e53fc14f9b
1,366
tsx
TypeScript
src/components/pinterest/pinterest-board.tsx
high1/solid-social
8f88e277eb142ffb5e1c809217c2125571040c02
[ "MIT" ]
8
2021-12-25T13:16:49.000Z
2022-03-14T15:04:03.000Z
src/components/pinterest/pinterest-board.tsx
high1/solid-social
8f88e277eb142ffb5e1c809217c2125571040c02
[ "MIT" ]
null
null
null
src/components/pinterest/pinterest-board.tsx
high1/solid-social
8f88e277eb142ffb5e1c809217c2125571040c02
[ "MIT" ]
1
2022-02-09T09:38:45.000Z
2022-02-09T09:38:45.000Z
import { JSX, mergeProps } from 'solid-js'; import { GeneralObserver } from 'components/general-observer'; import { handlePinterestBuild } from 'components/pinterest/utilities'; import { createTestId } from 'utilities'; export type PinterestBoardProperties = { /** Pinterest link */ pinterestLink: string; /** Width for the board */ width?: number; /** Height for the board */ height?: number; /** Size of the thumbnails */ imageWidth?: number; /** The type of board */ variant?: 'board' | 'user'; }; export const PinterestBoard = (properties: PinterestBoardProperties): JSX.Element => { const properties_ = mergeProps( { width: 400, height: 250, imageWidth: 80, variant: 'board', }, properties ); return ( <GeneralObserver onEnter={handlePinterestBuild}> {/* eslint-disable-next-line jsx-a11y/anchor-has-content */} <a class="pinterest-board" {...createTestId('pinterest-board')} data-pin-do={`embed${properties_.variant .charAt(0) .toUpperCase()}${properties_.variant.slice(1)}`} data-pin-board-width={properties_.width} data-pin-scale-height={properties_.height} data-pin-scale-width={properties_.imageWidth} href={`//www.pinterest.com/${properties_.pinterestLink}`} /> </GeneralObserver> ); };
29.695652
86
0.642753
4bce00ddc28f957aff2df0e4347a3212fea03caa
5,942
ps1
PowerShell
Public/d4c-registration.ps1
mwilco03/psfalcon
f3702d492bb5dfe37ebca0210e72366d1fdea939
[ "Unlicense" ]
null
null
null
Public/d4c-registration.ps1
mwilco03/psfalcon
f3702d492bb5dfe37ebca0210e72366d1fdea939
[ "Unlicense" ]
null
null
null
Public/d4c-registration.ps1
mwilco03/psfalcon
f3702d492bb5dfe37ebca0210e72366d1fdea939
[ "Unlicense" ]
null
null
null
function Get-FalconDiscoverAzureAccount { [CmdletBinding(DefaultParameterSetName = '/cloud-connect-azure/entities/account/v1:get')] param( [Parameter(ParameterSetName = '/cloud-connect-azure/entities/account/v1:get', Mandatory = $true, Position = 1)] [ValidatePattern('^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$')] [array] $Ids, [Parameter(ParameterSetName = '/cloud-connect-azure/entities/account/v1:get', Position = 2)] [ValidateSet('full', 'dry')] [string] $ScanType ) begin { $Fields = @{ ScanType = 'scan-type' } } process { $Param = @{ Command = $MyInvocation.MyCommand.Name Endpoint = $PSCmdlet.ParameterSetName Inputs = Update-FieldName -Fields $Fields -Inputs $PSBoundParameters Format = @{ Query = @('ids', 'scan-type') } } Invoke-Falcon @Param } } function Get-FalconDiscoverGcpAccount { [CmdletBinding(DefaultParameterSetName = '/cloud-connect-gcp/entities/account/v1:get')] param( [Parameter(ParameterSetName = '/cloud-connect-gcp/entities/account/v1:get', Mandatory = $true, Position = 1)] [ValidatePattern('^\d{10,}$')] [array] $Ids, [Parameter(ParameterSetName = '/cloud-connect-gcp/entities/account/v1:get', Position = 2)] [ValidateSet('full', 'dry')] [string] $ScanType ) begin { $Fields = @{ ScanType = 'scan-type' } } process { $Param = @{ Command = $MyInvocation.MyCommand.Name Endpoint = $PSCmdlet.ParameterSetName Inputs = Update-FieldName -Fields $Fields -Inputs $PSBoundParameters Format = @{ Query = @('ids', 'scan-type') } } Invoke-Falcon @Param } } function New-FalconDiscoverAzureAccount { [CmdletBinding(DefaultParameterSetName = '/cloud-connect-azure/entities/account/v1:post')] param( [Parameter(ParameterSetName = '/cloud-connect-azure/entities/account/v1:post', Position = 1)] [ValidatePattern('^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$')] [string] $SubscriptionId, [Parameter(ParameterSetName = '/cloud-connect-azure/entities/account/v1:post', Position = 2)] [ValidatePattern('^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$')] [string] $TenantId ) begin { $Fields = @{ SubscriptionId = 'subscription_id' TenantId = 'tenant_id' } } process { $Param = @{ Command = $MyInvocation.MyCommand.Name Endpoint = $PSCmdlet.ParameterSetName Inputs = Update-FieldName -Fields $Fields -Inputs $PSBoundParameters Format = @{ Body = @{ resources = @('subscription_id', 'tenant_id') }} } Invoke-Falcon @Param } } function New-FalconDiscoverGcpAccount { [CmdletBinding(DefaultParameterSetName = '/cloud-connect-gcp/entities/account/v1:post')] param( [Parameter(ParameterSetName = '/cloud-connect-gcp/entities/account/v1:post', Mandatory = $true, Position = 1)] [ValidatePattern('^\d{12}$')] [string] $ParentId ) begin { $Fields = @{ ParentId = 'parent_id' } } process { $Param = @{ Command = $MyInvocation.MyCommand.Name Endpoint = $PSCmdlet.ParameterSetName Inputs = Update-FieldName -Fields $Fields -Inputs $PSBoundParameters Format = @{ Body = @{ resources = @('parent_id') }} } Invoke-Falcon @Param } } function Receive-FalconDiscoverAzureScript { [CmdletBinding(DefaultParameterSetName = '/cloud-connect-azure/entities/user-scripts-download/v1:get')] param( [Parameter(ParameterSetName = '/cloud-connect-azure/entities/user-scripts-download/v1:get', Mandatory = $true, Position = 1)] [ValidatePattern('^*\.sh$')] [ValidateScript({ if (Test-Path $_) { throw "An item with the specified name $_ already exists." } else { $true } })] [string] $Path ) process { $Param = @{ Command = $MyInvocation.MyCommand.Name Endpoint = $PSCmdlet.ParameterSetName Inputs = $PSBoundParameters Headers = @{ Accept = 'application/octet-stream' } Format = @{ Outfile = 'path' } } Invoke-Falcon @Param } } function Receive-FalconDiscoverGcpScript { [CmdletBinding(DefaultParameterSetName = '/cloud-connect-gcp/entities/user-scripts-download/v1:get')] param( [Parameter(ParameterSetName = '/cloud-connect-gcp/entities/user-scripts-download/v1:get', Mandatory = $true, Position = 1)] [ValidatePattern('^*\.sh$')] [ValidateScript({ if (Test-Path $_) { throw "An item with the specified name $_ already exists." } else { $true } })] [string] $Path ) process { $Param = @{ Command = $MyInvocation.MyCommand.Name Endpoint = $PSCmdlet.ParameterSetName Inputs = $PSBoundParameters Headers = @{ Accept = 'application/octet-stream' } Format = @{ Outfile = 'path' } } Invoke-Falcon @Param } } function Update-FalconDiscoverAzureAccount { [CmdletBinding(DefaultParameterSetName = '/cloud-connect-azure/entities/client-id/v1:patch')] param( [Parameter(ParameterSetName = '/cloud-connect-azure/entities/client-id/v1:patch', Mandatory = $true, Position = 1)] [ValidatePattern('^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$')] [string] $Id ) process { $Param = @{ Command = $MyInvocation.MyCommand.Name Endpoint = $PSCmdlet.ParameterSetName Inputs = $PSBoundParameters Format = @{ Query = @('id') } } Invoke-Falcon @Param } }
37.1375
108
0.579266
e23ea09191611c776ca86add869974ab529717e1
921
js
JavaScript
src/Routes.js
gastonpedraza08/frontend-challenge-storydots
a247baaf6787bf9aabff1fe809bd00d2e6b5dc62
[ "MIT", "Unlicense" ]
null
null
null
src/Routes.js
gastonpedraza08/frontend-challenge-storydots
a247baaf6787bf9aabff1fe809bd00d2e6b5dc62
[ "MIT", "Unlicense" ]
null
null
null
src/Routes.js
gastonpedraza08/frontend-challenge-storydots
a247baaf6787bf9aabff1fe809bd00d2e6b5dc62
[ "MIT", "Unlicense" ]
null
null
null
import React from 'react'; import { BrowserRouter as Router, Routes, Route, } from 'react-router-dom'; import Home from './pages/Home'; import Admin from './pages/Admin'; import EditProduct from './pages/EditProduct'; import AddProduct from './pages/AddProduct'; import Product from './pages/Product'; import Login from './pages/Login'; import AppBar from './components/AppBar'; export default function AppRoutes() { return ( <Router> <AppBar /> <Routes> <Route path="/admin" exact element={<Admin />} /> <Route path="/admin/edit/product/:productId" exact element={<EditProduct />} /> <Route path="/admin/add/product" exact element={<AddProduct />} /> <Route path="/login" exact element={<Login />} /> <Route path="/product/:productId" exact element={<Product />} /> <Route path="/" exact element={<Home />} /> </Routes> </Router> ); }
29.709677
87
0.631922
ae5382875338f55e4c71b1207fe1ea4bc3c75710
4,385
cs
C#
src/WebWeChat/Im/Actions/WebwxInitAction.cs
h0730303779/WebQQWeChat
cecfd5deb7843ad5a9b0546ae4f073b9a7cd5413
[ "MIT" ]
133
2016-11-01T06:18:45.000Z
2022-02-20T05:28:39.000Z
src/WebWeChat/Im/Actions/WebwxInitAction.cs
h0730303779/WebQQWeChat
cecfd5deb7843ad5a9b0546ae4f073b9a7cd5413
[ "MIT" ]
11
2016-11-02T02:35:51.000Z
2020-01-07T02:08:09.000Z
src/WebWeChat/Im/Actions/WebwxInitAction.cs
huoshan12345/WebQQWeChat
cecfd5deb7843ad5a9b0546ae4f073b9a7cd5413
[ "MIT" ]
75
2016-11-08T14:19:36.000Z
2021-07-03T08:12:25.000Z
using System.ComponentModel; using System.Threading.Tasks; using FclEx.Extensions; using HttpAction.Core; using HttpAction.Event; using Newtonsoft.Json.Linq; using WebWeChat.Im.Core; namespace WebWeChat.Im.Actions { /// <summary> /// 微信初始化 /// 获取初始化信息(账号头像信息、聊天好友、阅读等) /// </summary> [Description("微信初始化")] public class WebwxInitAction : WebWeChatAction { public WebwxInitAction(IWeChatContext context, ActionEventListener listener = null) : base(context, listener) { } protected override HttpRequestItem BuildRequest() { var url = string.Format(ApiUrls.WebwxInit, Session.BaseUrl, Session.PassTicket, Session.Skey, Timestamp); var req = new HttpRequestItem(HttpMethodType.Post, url); var obj = new { Session.BaseRequest }; /* { "BaseRequest": { "DeviceId": "e650946746417762", "Skey": "@crypt_c498484a_1d7a344b3232380eb1aa33c16690399a", "Sid": "PhHAnhCRcFDCA219", "Uin": "463678295" } } */ req.StringData = obj.ToJson(); req.ContentType = HttpConstants.JsonContentType; return req; } protected override Task<ActionEvent> HandleResponse(HttpResponseItem responseItem) { /* { "BaseResponse": { "Ret": 0, "ErrMsg": "" }, "Count": 11, "ContactList": [...], "SyncKey": { "Count": 4, "List": [ { "Key": 1, "Val": 635705559 }, ... ] }, "User": { "Uin": xxx, "UserName": xxx, "NickName": xxx, "HeadImgUrl": xxx, "RemarkName": "", "PYInitial": "", "PYQuanPin": "", "RemarkPYInitial": "", "RemarkPYQuanPin": "", "HideInputBarFlag": 0, "StarFriend": 0, "Sex": 1, "Signature": "Apt-get install B", "AppAccountFlag": 0, "VerifyFlag": 0, "ContactFlag": 0, "WebWxPluginSwitch": 0, "HeadImgFlag": 1, "SnsFlag": 17 }, "ChatSet": xxx, "SKey": xxx, "ClientVersion": 369297683, "SystemTime": 1453124908, "GrayScale": 1, "InviteStartCount": 40, "MPSubscribeMsgCount": 2, "MPSubscribeMsgList": [...], "ClickReportInterval": 600000 } */ /* 本次ContactList里只有10个好友or群组,应该是最近的10个活跃对象(个数不是固定的); 另外,可以通过UserName来区分好友or群组,一个”@”为好友,两个”@”为群组。 MPSubscribeMsg为公众号推送的阅读文章 User其实就是自己账号信息(用在顶部的头像) */ var str = responseItem.ResponseString; if (!str.IsNullOrEmpty()) { var json = JObject.Parse(str); if (json["BaseResponse"]["Ret"].ToString() == "0") { Session.SyncKey = json["SyncKey"]; // Session.SyncKeyStr = Session.SyncKey["List"].ToArray().Select(m => $"{m["Key"]}_{m["Val"]}").JoinWith("|"); Session.UserToken = json["User"]; return NotifyOkEventAsync(); } else { throw new WeChatException(WeChatErrorCode.ResponseError, json["BaseResponse"]["ErrMsg"].ToString()); } } throw WeChatException.CreateException(WeChatErrorCode.ResponseError); } } }
36.239669
130
0.411174
74eb0dc81c59af8701024fa2dc6db479c3ee766a
786
swift
Swift
framework/FidzupCMPTests/VendorList/CMPFeatureTests.swift
Fidzup/fidzup-gdpr-cmp-ios
d2fc704daf56f37a3f9cf57ab2062463bbd0db15
[ "CC-BY-3.0" ]
null
null
null
framework/FidzupCMPTests/VendorList/CMPFeatureTests.swift
Fidzup/fidzup-gdpr-cmp-ios
d2fc704daf56f37a3f9cf57ab2062463bbd0db15
[ "CC-BY-3.0" ]
null
null
null
framework/FidzupCMPTests/VendorList/CMPFeatureTests.swift
Fidzup/fidzup-gdpr-cmp-ios
d2fc704daf56f37a3f9cf57ab2062463bbd0db15
[ "CC-BY-3.0" ]
null
null
null
// // CMPFeatureTests.swift // FidzupCMPTests // // Created by Loïc GIRON DIT METAZ on 04/05/2018. // Copyright © 2018 Smart AdServer. // // This software is distributed under the Creative Commons Legal Code, Attribution 3.0 Unported license. // Check the LICENSE file for more information. // import XCTest @testable import FidzupCMP class CMPFeatureTests: XCTestCase { func testFeatureIsEquatable() { let feature1 = CMPFeature(id: 1, name: "name1", description: "description1") let feature2 = CMPFeature(id: 1, name: "name1", description: "description1") let feature3 = CMPFeature(id: 3, name: "name3", description: "description3") XCTAssertEqual(feature1, feature2) XCTAssertNotEqual(feature1, feature3) } }
29.111111
105
0.687023
2fe1221279ada81bc4cdeabd08c1041b7e58a591
891
py
Python
scripts/build_tag.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
2,740
2017-10-03T23:19:01.000Z
2022-03-30T15:16:39.000Z
scripts/build_tag.py
holzschu/coremltools
5ece9069a1487d5083f00f56afe07832d88e3dfa
[ "BSD-3-Clause" ]
1,057
2017-10-05T22:47:01.000Z
2022-03-31T23:51:15.000Z
scripts/build_tag.py
holzschu/coremltools
5ece9069a1487d5083f00f56afe07832d88e3dfa
[ "BSD-3-Clause" ]
510
2017-10-04T19:22:28.000Z
2022-03-31T12:16:52.000Z
#!/usr/bin/env python # # Copyright (c) 2021, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause # Construct a valid wheel build tag with ``git describe``. # # We do this with python because it is available and much more straightforward # than doing it in the shell. import subprocess import os.path def main(): # ensure that no matter where this script is called, it reports git info # for the working directory where it has been checked out git_dir = os.path.dirname(__file__) version_str = subprocess.check_output( ["git", "-C", git_dir, "describe", "--tags"], text=True ) build_tag = version_str.split("-", maxsplit=1)[1].replace("-", "_").strip() print(build_tag) if __name__ == "__main__": main()
29.7
82
0.693603
2597616911de717dffc1ad4ca6988e35a68a7db3
2,039
cs
C#
pioneer/js.pioneer.webapi/Services/Class/AuditTrialService.cs
bharathkumarms/pioneer
b52e73837667826d8ff6a555c521646e583b7217
[ "Apache-2.0" ]
null
null
null
pioneer/js.pioneer.webapi/Services/Class/AuditTrialService.cs
bharathkumarms/pioneer
b52e73837667826d8ff6a555c521646e583b7217
[ "Apache-2.0" ]
null
null
null
pioneer/js.pioneer.webapi/Services/Class/AuditTrialService.cs
bharathkumarms/pioneer
b52e73837667826d8ff6a555c521646e583b7217
[ "Apache-2.0" ]
null
null
null
using System; using System.Collections.Generic; using System.Threading.Tasks; using js.pioneer.repository; using js.pioneer.model; using js.pioneer.utils; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.AspNetCore.Http; namespace js.pioneer.webapi { public class AuditTrialService : IAuditTrialService { private IAuditTrialRepository _auditTrialRepository; private readonly AppSettings _appSettings; readonly ILogger<AuditTrialService> _log; private readonly IHttpContextAccessor _httpContextAccessor; private ISession _session => _httpContextAccessor.HttpContext.Session; public AuditTrialService(IOptions<AppSettings> appSettings, ILogger<AuditTrialService> log, IAuditTrialRepository auditTrialRepository, IHttpContextAccessor httpContextAccessor) { _auditTrialRepository = auditTrialRepository; _appSettings = appSettings.Value; _log = log; _httpContextAccessor = httpContextAccessor; } public async Task Insert(string subscriptionNo, string message) { try { await _auditTrialRepository.Insert(BuildAuditTrialObject(subscriptionNo, message)); } catch (Exception ex) { throw ex; } } private AuditTrial BuildAuditTrialObject(string subscriptionNo, string message) { try { var user = _session.GetObjectFromJson<User>("User"); var modal = new AuditTrial { Date = DateTime.UtcNow, Description = message, SubscriptionNo = subscriptionNo, UserNameWhoUpdated = user.UserName }; return modal; } catch (Exception ex) { throw ex; } } } }
29.985294
99
0.597352
2ca91b0aa9d3e42d8b32e86e3d6b0212f8923519
762
py
Python
03. DP/70. Climbing Stairs.py
KLumy/Basic-Algorithm
e52e4200c1955a9062569814ff3418dd06666845
[ "MIT" ]
1
2021-01-22T15:58:32.000Z
2021-01-22T15:58:32.000Z
03. DP/70. Climbing Stairs.py
KLumy/Basic-Algorithm
e52e4200c1955a9062569814ff3418dd06666845
[ "MIT" ]
null
null
null
03. DP/70. Climbing Stairs.py
KLumy/Basic-Algorithm
e52e4200c1955a9062569814ff3418dd06666845
[ "MIT" ]
null
null
null
from functools import cache from collections import defaultdict class Solution: # Top-Down # def climbStairs(self, n: int): # @cache # def makeSteps(x: int): # if x == 0: # return 0 # if x == 1: # return 1 # if x == 2: # return 2 # return makeSteps(x - 1) + makeSteps(x - 2) # return makeSteps(n) # Buttom-Up def climbStairs(self, n: int): cache = defaultdict(int) cache[1] = 1 cache[2] = 2 for i in range(3, n + 1): cache[i] = cache[i - 1] + cache[i - 2] return cache[n] if __name__ == "__main__": s = Solution() i = 3 o = s.climbStairs(i) print(o)
20.594595
56
0.464567
9c8c50c956a3238bb8c19435b706758f7666527e
526
lua
Lua
scripts/zones/Windurst_Waters_[S]/npcs/Yassi-Possi.lua
PaulAnthonyReitz/topaz
ffa3a785f86ffdb2f6a5baf9895b649e3e3de006
[ "FTL" ]
6
2021-06-01T04:17:10.000Z
2021-06-01T04:32:21.000Z
scripts/zones/Windurst_Waters_[S]/npcs/Yassi-Possi.lua
PaulAnthonyReitz/topaz
ffa3a785f86ffdb2f6a5baf9895b649e3e3de006
[ "FTL" ]
5
2020-04-10T19:33:53.000Z
2021-06-27T17:50:05.000Z
scripts/zones/Windurst_Waters_[S]/npcs/Yassi-Possi.lua
PaulAnthonyReitz/topaz
ffa3a785f86ffdb2f6a5baf9895b649e3e3de006
[ "FTL" ]
2
2020-04-11T16:56:14.000Z
2021-06-26T12:21:12.000Z
----------------------------------- -- Area: Windurst Waters (S) -- NPC: Yassi-Possi -- Type: Item Deliverer -- !pos 153.992 -0.001 -18.687 94 ----------------------------------- local ID = require("scripts/zones/Windurst_Waters_[S]/IDs") ----------------------------------- function onTrade(player,npc,trade) end function onTrigger(player,npc) player:showText(npc, ID.text.YASSI_POSSI_DIALOG) player:openSendBox() end function onEventUpdate(player,csid,option) end function onEventFinish(player,csid,option) end
22.869565
59
0.596958
bb5ef988e1062303a180c23be82038a6b3d63bc0
807
cs
C#
RxFlow/Properties/AssemblyInfo.cs
ugaya40/RxFlow
02783900f26a974909b03756fd05330a2bdb1b67
[ "MIT" ]
21
2015-02-26T12:53:51.000Z
2021-04-27T10:52:06.000Z
RxFlow/Properties/AssemblyInfo.cs
ugaya40/RxFlow
02783900f26a974909b03756fd05330a2bdb1b67
[ "MIT" ]
null
null
null
RxFlow/Properties/AssemblyInfo.cs
ugaya40/RxFlow
02783900f26a974909b03756fd05330a2bdb1b67
[ "MIT" ]
4
2016-05-18T14:11:25.000Z
2022-01-22T13:38:17.000Z
using System.Reflection; using System.Resources; // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 // アセンブリに関連付けられている情報を変更するには、 // これらの属性値を変更してください。 [assembly: AssemblyTitle("RxFlow")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("RxFlow")] [assembly: AssemblyCopyright("Copyright (C) Masanori Onoue(@ugaya40) 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguage("ja")] // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: // // メジャー バージョン // マイナー バージョン // ビルド番号 // リビジョン // // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.2.*")] [assembly: AssemblyFileVersion("0.2.2015.226")]
26.9
77
0.71995
070301ce043d46046a9d30ad380b888c777d4aed
4,878
cc
C++
cpp/data/ops/broadcast.cc
propaganda-gold/deeprev
0c6ccf83131a879ed858acdb0675e75ebf2f2d3d
[ "BSD-3-Clause" ]
null
null
null
cpp/data/ops/broadcast.cc
propaganda-gold/deeprev
0c6ccf83131a879ed858acdb0675e75ebf2f2d3d
[ "BSD-3-Clause" ]
2
2021-05-11T16:29:38.000Z
2022-01-22T12:28:49.000Z
cpp/data/ops/broadcast.cc
propaganda-gold/deeprev
0c6ccf83131a879ed858acdb0675e75ebf2f2d3d
[ "BSD-3-Clause" ]
null
null
null
#include "data/ops/broadcast.h" #include "data/globals.h" #include "data/ops/resource.h" #include "data/ops/time.h" #include "util/cassandra_logging.h" #include "util/includes.h" #include "util/mongo_adapter.h" #include "util/protos.h" #include "util/re.h" #include "util/uuid.h" namespace vectorbook { using BroadcastTokens = RepeatedPtrField<Broadcast::Token>; namespace { bool IsUrl(const string &token) { string http_regex = R"(^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$)"; vector<string> matches = re::FindAllMatches(token, http_regex); return matches.size() > 0; } // If 'url' is a url, this will return a string-valued id to a Resource. Option<string> OptionallyResolveLink(const string &url) { auto is_url = IsUrl(url); if (is_url) { auto id = ResourceIdFromUrl(url); ASSERT_OK(id); return *id; } else { return Null(); } } Option<Broadcast::Token> CreateToken(const string &raw_token) { Broadcast::Token result; result.set_word(raw_token); auto link_opt = OptionallyResolveLink(raw_token); ASSERT_OK(link_opt); if (link_opt.has_value()) { result.set_resource(*link_opt); } return result; } Option<BroadcastTokens> TokenizeTextarea(const string &textarea) { BroadcastTokens result; auto parts = Split(textarea); for (const string &raw_token : parts) { auto token = CreateToken(raw_token); ASSERT_OK(token); *result.Add() = *token; } return result; } Option<Broadcast::ReferenceInfo> BroadcastToInfo(const Broadcast &broadcast) { Broadcast::ReferenceInfo result; result.set_id(broadcast.id()); if (broadcast.rendering_data().has_resource()) { *result.mutable_resource() = broadcast.rendering_data().resource(); } *result.mutable_basic_data() = broadcast.basic_data(); auto producer_user = data::user_map()->const_get(broadcast.basic_data().producer()); ASSERT_EXISTS(producer_user); result.set_producer_name(producer_user->user_name()); return result; } Option<Broadcast::RenderingData> CreateRenderingData(const Broadcast::BasicData &basic_data) { Broadcast::RenderingData result; auto token_seq = TokenizeTextarea(basic_data.textarea()); ASSERT_EXISTS(token_seq); *result.mutable_token() = *token_seq; for (const auto &token : *token_seq) { if (token.has_resource()) { auto resource = data::resource_map()->const_get(token.resource()); ASSERT_EXISTS(resource); *result.mutable_resource() = *resource; break; } } result.set_time_created(CurrentTimeInfo()); if (basic_data.has_reference()) { auto reference = data::broadcast_map()->const_get(basic_data.reference()); ASSERT_EXISTS(reference); auto reference_info = BroadcastToInfo(*reference); ASSERT_EXISTS(reference_info); *result.mutable_reference_info() = *reference_info; } Print_value(basic_data.producer()); // auto producer_user = data::user_map()->const_get(basic_data.producer()); // ASSERT_EXISTS(producer_user); // result.set_producer_user_name(producer_user->user_name()); const string database_name = "test"; const string collection_name = "users"; const string id = basic_data.producer(); Print_value(database_name); Print_value(collection_name); Print_value(id); auto document = mongodb::FindById("test", "users", basic_data.producer()); ASSERT_EXISTS(document); std::cout << bsoncxx::to_json(*document) << "\n"; result.set_producer_user_name("MrHack"); return result; } } // namespace Option<Broadcast> BuildBroadcast(const Broadcast::BasicData &basic_data) { Broadcast result; auto uuid = FreshTimeUUID(); ASSERT_OK(uuid); result.set_id(*uuid); *result.mutable_basic_data() = basic_data; auto rendering_data = CreateRenderingData(basic_data); ASSERT_OK(rendering_data); if (basic_data.has_producer()) { // producer user name // auto producer_id = // data::user_name_map()->const_get(basic_data.producer()); // ASSERT_EXISTS(producer_id); // auto producer_user = // data::user_map()->const_get(basic_data.producer()); // ASSERT_EXISTS(producer_user); } *result.mutable_rendering_data() = *rendering_data; ASSERT_SUCCEEDS(data::broadcast_map()->put(*uuid, result)); ASSERT_SUCCEEDS(data::broadcast_set()->insert(*uuid)); ASSERT_SUCCEEDS(data::unsorted_broadcast_queue()->append(*uuid)); ASSERT_SUCCEEDS( data::broadcast_history(basic_data.producer())->append(*uuid)); auto uq = data::unsorted_broadcast_queue(); auto size = uq->size(); ASSERT_OK(size); // auto json = ProtoToJsonString(result); // ASSERT_OK(json); // Print_value(*json); ASSERT_SUCCEEDS( WriteToCassandra("keyspace1.broadcast", *uuid, result.DebugString())); return result; } } // namespace vectorbook
29.563636
131
0.698852
15988351a665171339ad1a8a4778acd7c2303cef
52
rb
Ruby
app/graphql/types/enum/base.rb
KoolTurnip/kitsu-server
ee6b6ebad06ab9f5af01380c006bf7cec91f56c2
[ "Apache-2.0" ]
null
null
null
app/graphql/types/enum/base.rb
KoolTurnip/kitsu-server
ee6b6ebad06ab9f5af01380c006bf7cec91f56c2
[ "Apache-2.0" ]
null
null
null
app/graphql/types/enum/base.rb
KoolTurnip/kitsu-server
ee6b6ebad06ab9f5af01380c006bf7cec91f56c2
[ "Apache-2.0" ]
null
null
null
class Types::Enum::Base < GraphQL::Schema::Enum end
17.333333
47
0.730769
2c731f5e1e5ba092ea9a2847f22ec68719bf7455
1,723
py
Python
vae.py
alanoMartins/vae_tf2
b276e0a2cb855bb6b177889d8e7949dce5ccf402
[ "Apache-2.0" ]
null
null
null
vae.py
alanoMartins/vae_tf2
b276e0a2cb855bb6b177889d8e7949dce5ccf402
[ "Apache-2.0" ]
null
null
null
vae.py
alanoMartins/vae_tf2
b276e0a2cb855bb6b177889d8e7949dce5ccf402
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf from tensorflow import keras from net import encoder, decoder class VAE(keras.Model): def __init__(self, input_shape, latent_shape): super(VAE, self).__init__() self.latent_shape = latent_shape self.encoder = encoder(input_shape, latent_shape) self.decoder = decoder(latent_shape) def call(self, input_features): code = self.encoder(input_features) reconstructed = self.decoder(code) return reconstructed def random_sample(self, eps=None): if eps is None: eps = tf.random.normal(shape=(10, self.latent_shape)) return self.decoder(eps) @tf.function def compute_loss(self, x, trainable=True): z_mean, z_var, z = self.encoder(x, trainable) reconstructor = self.decoder(z, trainable) loss = tf.reduce_mean(keras.losses.binary_crossentropy(x, reconstructor)) loss *= x.shape[1] * x.shape[2] * x.shape[3] kl_loss = 1 + z_var - tf.square(z_mean) - tf.exp(z_var) kl_loss = tf.reduce_mean(kl_loss) kl_loss *= -0.5 total_loss = loss + kl_loss return [total_loss, loss, kl_loss] @tf.function def train_step(self, data): with tf.GradientTape() as tape: total_loss, loss, kl_loss = self.compute_loss(data) grads = tape.gradient(total_loss, self.trainable_weights) self.optimizer.apply_gradients(zip(grads, self.trainable_weights)) return {"total_loss": total_loss, "kl_loss": kl_loss} @tf.function def test_step(self, data): total_loss, loss, kl_loss = self.compute_loss(data, trainable=False) return {"total_loss": total_loss, "kl_loss": kl_loss}
33.134615
81
0.655252
be9d4488e75d13a6bad52facae4a66a8f72cc4f2
1,864
ts
TypeScript
src/logging/analytics.ts
NetanelBrauner/caspion
9843129d46c87ba0c8d911fb95b6e85b8f916024
[ "MIT" ]
53
2021-06-27T19:13:26.000Z
2022-03-17T21:23:54.000Z
src/logging/analytics.ts
NetanelBrauner/caspion
9843129d46c87ba0c8d911fb95b6e85b8f916024
[ "MIT" ]
167
2019-06-30T15:12:01.000Z
2021-04-28T12:22:09.000Z
src/logging/analytics.ts
NetanelBrauner/caspion
9843129d46c87ba0c8d911fb95b6e85b8f916024
[ "MIT" ]
14
2020-04-29T10:46:48.000Z
2021-05-04T15:28:42.000Z
import Analytics from 'analytics-node'; import { machineId } from 'node-machine-id'; import { BudgetTrackingEventEmitter, EventNames } from '@/backend/eventEmitters/EventEmitter'; const analytics = SEGMENT_WRITE_KEY ? new Analytics(SEGMENT_WRITE_KEY) : null; type EventProperties = Record<string, string | number | boolean | undefined>; const EVENTS_TO_TRACK: EventNames[] = [ EventNames.IMPORT_PROCESS_START, EventNames.IMPORTER_START, EventNames.IMPORTER_ERROR, EventNames.IMPORTER_END, EventNames.IMPORT_PROCESS_END, EventNames.EXPORT_PROCESS_START, EventNames.EXPORTER_START, EventNames.EXPORTER_ERROR, EventNames.EXPORTER_END, EventNames.EXPORT_PROCESS_END, EventNames.GENERAL_ERROR, ]; export async function trackPage(pageName: string, properties?: EventProperties) { const event = await buildEvent(properties); analytics?.page({ name: pageName, ...event }); } export async function trackEvent(eventType: string, properties?: EventProperties) { const event = await buildEvent(properties); analytics?.track({ ...event, event: eventType }); } export async function initAnalyticsEventHandling(eventEmitter: BudgetTrackingEventEmitter) { eventEmitter.onAny(((eventName, eventData) => { if (EVENTS_TO_TRACK.includes(eventName)) { trackEvent(eventName.toString(), { name: eventData?.vendorId, accountType: eventData?.accountType, isError: !!eventData?.error }); } })); } async function buildEvent(properties?: EventProperties) { const id = await getMachineId(); return { anonymousId: id, properties: { env: process.env.NODE_ENV, ...properties } }; } let machineIdCached; async function getMachineId() { if (machineIdCached) { return machineIdCached; } machineIdCached = await machineId(); return machineIdCached; }
26.253521
94
0.728541
05bf9c6752c44e7ab5b60ca375c194113e706f0e
650
py
Python
Problems/Study Plans/Dynamic Programming/Dynamic Programming I/21_arithmetic_slices.py
andor2718/LeetCode
59874f49085818e6da751f1cc26867b31079d35d
[ "BSD-3-Clause" ]
1
2022-01-17T19:51:15.000Z
2022-01-17T19:51:15.000Z
Problems/Study Plans/Dynamic Programming/Dynamic Programming I/21_arithmetic_slices.py
andor2718/LeetCode
59874f49085818e6da751f1cc26867b31079d35d
[ "BSD-3-Clause" ]
null
null
null
Problems/Study Plans/Dynamic Programming/Dynamic Programming I/21_arithmetic_slices.py
andor2718/LeetCode
59874f49085818e6da751f1cc26867b31079d35d
[ "BSD-3-Clause" ]
null
null
null
# https://leetcode.com/problems/arithmetic-slices/ class Solution: def numberOfArithmeticSlices(self, nums: list[int]) -> int: arithmetic_slices = 0 if len(nums) <= 2: return arithmetic_slices last_diff = nums[1] - nums[0] last_increment = 0 for idx in range(2, len(nums)): curr_diff = nums[idx] - nums[idx - 1] curr_increment = 0 if curr_diff == last_diff: curr_increment = last_increment + 1 arithmetic_slices += curr_increment last_diff, last_increment = curr_diff, curr_increment return arithmetic_slices
36.111111
65
0.603077
0a66c692867dfd5dc5be0bad9599b0d99ddef9e6
1,234
cs
C#
MOE.Common/Models/DetectorEventCountAggregation.cs
AndreRSanchez/ATSPM
dd282d98148818ff7ac44edce1f26efae27f7ea4
[ "Apache-2.0" ]
51
2017-08-29T18:14:16.000Z
2022-02-23T18:28:35.000Z
MOE.Common/Models/DetectorEventCountAggregation.cs
AndreRSanchez/ATSPM
dd282d98148818ff7ac44edce1f26efae27f7ea4
[ "Apache-2.0" ]
91
2017-08-31T18:38:59.000Z
2022-03-23T18:42:54.000Z
MOE.Common/Models/DetectorEventCountAggregation.cs
AndreRSanchez/ATSPM
dd282d98148818ff7ac44edce1f26efae27f7ea4
[ "Apache-2.0" ]
40
2017-08-29T22:35:38.000Z
2022-03-28T17:46:58.000Z
using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using CsvHelper.Configuration; namespace MOE.Common.Models { //public class DetectorEventCountAggregation : Aggregation public class DetectorEventCountAggregation { //[Key] //[DatabaseGenerated(DatabaseGeneratedOption.Identity)] //public int Id { get; set; } [Key] [Required] [Column(Order = 0)] public DateTime BinStartTime { get; set; } [Key] [Required] [Column(Order = 1)] public int DetectorPrimaryId { get; set; } [Required] [Column(Order = 2)] public int EventCount { get; set; } public sealed class DetectorEventCountAggregationClassMap : ClassMap<DetectorEventCountAggregation> { public DetectorEventCountAggregationClassMap() { // Map(m => m.Id).Name("Record Number"); Map(m => m.BinStartTime).Name("Bin Start Time"); Map(m => m.DetectorPrimaryId).Name("Detector Primary ID"); Map(m => m.EventCount).Name("Event Count"); } } } }
29.380952
91
0.58671
41853f85fb7d18d6a35bb93e0f41709e362ef8d6
1,736
ps1
PowerShell
SharePointDsc/Examples/Resources/SPUserProfileSyncConnection/1-Example.ps1
Fiander/SharePointDsc
375ed199e702133c4d29f7bf86944aa5959e1b36
[ "MIT" ]
39
2019-12-27T12:42:35.000Z
2022-03-23T11:03:31.000Z
SharePointDsc/Examples/Resources/SPUserProfileSyncConnection/1-Example.ps1
Fiander/SharePointDsc
375ed199e702133c4d29f7bf86944aa5959e1b36
[ "MIT" ]
250
2019-11-27T09:34:32.000Z
2022-03-31T10:03:29.000Z
SharePointDsc/Examples/Resources/SPUserProfileSyncConnection/1-Example.ps1
Fiander/SharePointDsc
375ed199e702133c4d29f7bf86944aa5959e1b36
[ "MIT" ]
29
2019-12-03T17:18:15.000Z
2022-02-15T20:48:42.000Z
<#PSScriptInfo .VERSION 1.0.0 .GUID 80d306fa-8bd4-4a8d-9f7a-bf40df95e661 .AUTHOR DSC Community .COMPANYNAME DSC Community .COPYRIGHT DSC Community contributors. All rights reserved. .TAGS .LICENSEURI https://github.com/dsccommunity/SharePointDsc/blob/master/LICENSE .PROJECTURI https://github.com/dsccommunity/SharePointDsc .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES .RELEASENOTES Updated author, copyright notice, and URLs. .PRIVATEDATA #> <# .DESCRIPTION This example adds a new user profile sync connection to the specified user profile service app #> Configuration Example { param ( [Parameter(Mandatory = $true)] [PSCredential] $SetupAccount, [Parameter(Mandatory = $true)] [PSCredential] $ConnectionAccount ) Import-DscResource -ModuleName SharePointDsc node localhost { SPUserProfileSyncConnection MainDomain { UserProfileService = "User Profile Service Application" Forest = "contoso.com" Name = "Contoso" ConnectionCredentials = $ConnectionAccount Server = "server.contoso.com" UseSSL = $false IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") ExcludedOUs = @("OU=Notes Usersa,DC=Contoso,DC=com") Force = $false ConnectionType = "ActiveDirectory" PsDscRunAsCredential = $SetupAccount } } }
22.842105
79
0.599078
2fa001f28c15e5ad76c80ee0befd53ed583f7da5
1,843
sql
SQL
db/sql/update/2.8-2.9.sql
kapeels/ohmage-server
01589b9085a7fbcbba750db27a0f44fa373f673a
[ "Apache-2.0" ]
13
2015-03-30T14:16:25.000Z
2022-02-01T14:57:45.000Z
db/sql/update/2.8-2.9.sql
kapeels/ohmage-server
01589b9085a7fbcbba750db27a0f44fa373f673a
[ "Apache-2.0" ]
113
2015-01-30T17:43:48.000Z
2017-08-03T04:43:35.000Z
db/sql/update/2.8-2.9.sql
kapeels/ohmage-server
01589b9085a7fbcbba750db27a0f44fa373f673a
[ "Apache-2.0" ]
30
2015-01-26T12:38:55.000Z
2022-02-01T09:31:07.000Z
-- Update the R server. UPDATE preference SET p_value = 'http://rdev.mobilizingcs.org/R/call/Mobilize/' WHERE p_key = 'visualization_server_address'; -- Alter the Mobility table by droping the timestamp. ALTER TABLE mobility DROP COLUMN msg_timestamp; -- Update the Mobility table by adding the UUID. ALTER TABLE mobility ADD COLUMN uuid CHAR(36) NOT NULL; UPDATE mobility SET uuid=UUID() WHERE uuid=''; ALTER TABLE mobility ADD CONSTRAINT UNIQUE (uuid); -- Alter the survey response table by droping the timestamp. ALTER TABLE survey_response DROP COLUMN msg_timestamp; -- Alter the survey response table by adding the UUID. ALTER TABLE survey_response ADD COLUMN uuid CHAR(36) NOT NULL; UPDATE survey_response SET uuid=UUID() WHERE uuid=''; ALTER TABLE survey_response ADD CONSTRAINT UNIQUE (uuid); -- Update the preference table to add the new preference indicating whether or -- not a privileged user in a class can view the Mobility data for everyone -- else in that class. INSERT INTO preference VALUES ('privileged_user_in_class_can_view_others_mobility', 'true'), ('mobility_enabled', 'true'); -- We probably want to drop the pre-existing constraints for Mobility and -- survey responses, but try as I might I couldn't find any documentation on -- how to do it. ALTER TABLE's DROP CONSTRAINT appears to not be implemented in -- MySQL 5.1. -- Note: The data will be corrupt. There was a change to the way location, -- survey response, launch context, and Mobility data was stored involving the -- timestamp, time, and timezone. The timestamp was dropped from each of these -- and the time and timezone added if one or both did not previously exist. In -- order to update the database, each of these objects will need to be removed -- from the database, updated with a script, and reinserted back into the -- database.
48.5
125
0.771026
a9e150c759a96ebf65398a3269d6c909f32d8b80
4,186
php
PHP
src/Yuga/Models/Console/MakeScaffoldCommand.php
malibroug/yuga-framework
7840a0b7656f940bad91faeb663f48fc9bfe389b
[ "MIT" ]
3
2019-04-29T14:18:48.000Z
2022-01-02T04:18:56.000Z
src/Yuga/Models/Console/MakeScaffoldCommand.php
malibroug/yuga-framework
7840a0b7656f940bad91faeb663f48fc9bfe389b
[ "MIT" ]
null
null
null
src/Yuga/Models/Console/MakeScaffoldCommand.php
malibroug/yuga-framework
7840a0b7656f940bad91faeb663f48fc9bfe389b
[ "MIT" ]
3
2019-07-28T14:20:34.000Z
2021-11-24T05:31:49.000Z
<?php namespace Yuga\Models\Console; use Yuga\Console\Command; use Yuga\Support\FileLocator; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputArgument; class MakeScaffoldCommand extends Command { use CanCreate, CanUpdate, CanShowDetails, CanDelete, CanDisplay, CreateRoutes, CreateControllers, CreateMigrations; protected $name = 'scaffold'; /** * The console command description. * * @var string */ protected $description = 'Make a scaffold using Elegant Model composition'; /** * The console command Help text */ protected $help = "This command creates a number of files for you, they include:\n\t<info>*Views</info>\n\t<info>*Controllers</info>\n\t<info>*Routes</info>\n\t<info>*Migrations</info>\nBased on how you define your model"; /** * Execute the console command. * * @return void */ public function handle() { $modelStrings = $this->input->getOption('models'); $directory = $this->input->getOption('dir'); if ($modelStrings == 'all') { $path = path() . 'app' . DIRECTORY_SEPARATOR . $directory . DIRECTORY_SEPARATOR; foreach (glob($path . '*.php') as $model) { require_once $model; } $models = (new FileLocator)->getClassesOfNamespace(env('APP_NAMESPACE', 'App'). '\\' . $directory); } else { $models = \explode(',', $modelStrings); $models = array_map(function ($model) { return env('APP_NAMESPACE', 'App') . '\\Models\\' . $model; }, $models); } $this->formsCreator($models); $this->info('scaffold was made successfully.'); } protected function formsCreator(array $models = []) { foreach ($models as $model) { $modelInstance = new $model; if (property_exists($modelInstance, 'scaffold')) { // make all the create forms $this->makeCreateForm($modelInstance); // make all the update forms $this->makeUpdateForm($modelInstance); // make all the details pages $this->makeDetailsForm($modelInstance); // make all the index pages $this->makeIndexForm($modelInstance); // make all the delete pages $this->makeDeleteForm($modelInstance); // process routes $this->processRoutes($modelInstance); // process controllers $this->processControllers($modelInstance); if ($this->option('migrations') == 'yes') { // process migrations $this->processMigrations($modelInstance); } } } $this->layoutMvc(); } protected function layoutMvc() { $temp = 'layouts/app.temp'; $layout = 'layouts/app.hax.php'; if (!is_dir($directory = path('resources/views/layouts'))) { mkdir($directory, 0755, true); } if (file_exists($view = path('resources/views/' . $layout)) && !$this->option('force')) { if ($this->confirm("The [{$view}] view already exists. Do you want to replace it?")) { copy(__DIR__.'/temps/scaffold/' . $temp, $view); } } else { copy(__DIR__.'/temps/scaffold/' . $temp, $view); } } /** * Get the console command options. * * @return array */ protected function getOptions() { return [ ['models', null, InputOption::VALUE_OPTIONAL, 'The names of all models whose scaffold are to be created (separated by commas).', 'all'], ['dir', null, InputOption::VALUE_OPTIONAL, 'The name of the folder where your models reside inside of the app folder.', 'Models'], ['force', null, InputOption::VALUE_OPTIONAL, 'Overwrite existing files.', false], ['migrations', null, InputOption::VALUE_OPTIONAL, 'Whether or not migrations should be created.', 'yes'] ]; } }
37.044248
226
0.561634
6e5090281652c46b5f9a14c2a724d74c0238e077
207
sql
SQL
tdc-api/src/main/resources/db/migration/2021/V20210705__Heartbeat.sql
moriya-tech/thedevconf
67beabaea79ce4211b35e6707308d870039fb274
[ "Info-ZIP" ]
null
null
null
tdc-api/src/main/resources/db/migration/2021/V20210705__Heartbeat.sql
moriya-tech/thedevconf
67beabaea79ce4211b35e6707308d870039fb274
[ "Info-ZIP" ]
null
null
null
tdc-api/src/main/resources/db/migration/2021/V20210705__Heartbeat.sql
moriya-tech/thedevconf
67beabaea79ce4211b35e6707308d870039fb274
[ "Info-ZIP" ]
null
null
null
CREATE TABLE `Heartbeat` ( `uuid` char(36) NOT NULL, `acceptTime` datetime(6) DEFAULT NULL, `payload` varchar(255) DEFAULT NULL, `sourceIP` varchar(255) DEFAULT NULL, PRIMARY KEY (`uuid`) ) ;
25.875
41
0.666667
5af4036fb0eb59216ed8685ae04396d4e3f5277e
9,496
cs
C#
src/AddIns/Analysis/UnitTesting/Test/Tree/TwoTestClassesInDifferentNamespacesTestFixture.cs
dongdapeng110/SharpDevelopTest
0339adff83ca9589e700593e6d5d1e7658e7e951
[ "MIT" ]
11
2015-05-14T08:36:05.000Z
2021-10-06T06:43:47.000Z
src/AddIns/Analysis/UnitTesting/Test/Tree/TwoTestClassesInDifferentNamespacesTestFixture.cs
denza/SharpDevelop
406354bee0e349186868288447f23301a679c95c
[ "MIT" ]
null
null
null
src/AddIns/Analysis/UnitTesting/Test/Tree/TwoTestClassesInDifferentNamespacesTestFixture.cs
denza/SharpDevelop
406354bee0e349186868288447f23301a679c95c
[ "MIT" ]
10
2015-04-08T09:02:32.000Z
2020-03-01T16:03:28.000Z
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Collections.Generic; using System.Windows.Forms; using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Project; using ICSharpCode.UnitTesting; using NUnit.Framework; using UnitTesting.Tests.Utils; namespace UnitTesting.Tests.Tree { /// <summary> /// Tests that when a namespace tree node has a class and another /// namespace as a child the image index is updated correctly. /// </summary> [TestFixture] public class TwoTestClassesInDifferentNamesTestFixture { Solution solution; ExtTreeNode rootNode; TreeNodeCollection nodes; DummyParserServiceTestTreeView dummyTreeView; TestTreeView treeView; MSBuildBasedProject project; MockClass testClass1; MockClass testClass2; ExtTreeNode projectNamespaceNode; TestProject testProject; MockProjectContent projectContent; MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() { solution = new Solution(new MockProjectChangeWatcher()); // Create a project to display in the test tree view. project = new MockCSharpProject(solution, "TestProject"); ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project); nunitFrameworkReferenceItem.Include = "NUnit.Framework"; ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem); // Add a test class with a TestFixture attributes. projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; testClass1 = new MockClass(projectContent, "Project.Tests.MyTestFixture"); testClass1.Attributes.Add(new MockAttribute("TestFixture")); projectContent.Classes.Add(testClass1); testClass2 = new MockClass(projectContent, "Project.MyTestFixture"); testClass2.Attributes.Add(new MockAttribute("TestFixture")); projectContent.Classes.Add(testClass2); testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); dummyTreeView = new DummyParserServiceTestTreeView(testFrameworks); dummyTreeView.ProjectContentForProject = projectContent; // Load the projects into the test tree view. treeView = dummyTreeView as TestTreeView; solution.Folders.Add(project); treeView.AddSolution(solution); nodes = treeView.Nodes; rootNode = (ExtTreeNode)treeView.Nodes[0]; treeView.SelectedNode = rootNode; testProject = treeView.SelectedTestProject; } [TearDown] public void TearDown() { if (treeView != null) { treeView.Dispose(); } } public void ExpandRootNode() { // Expand the root node so any child nodes are lazily created. rootNode.Expanding(); projectNamespaceNode = (ExtTreeNode)rootNode.Nodes[0]; } [Test] public void TestClass2PassedAfterTestClass1Failed() { ExpandRootNode(); TestClass testClass1 = testProject.TestClasses["Project.Tests.MyTestFixture"]; testClass1.Result = TestResultType.Failure; TestClass testClass2 = testProject.TestClasses["Project.MyTestFixture"]; testClass2.Result = TestResultType.Success; Assert.AreEqual(TestTreeViewImageListIndex.TestFailed, (TestTreeViewImageListIndex)projectNamespaceNode.ImageIndex); } [Test] public void TestClass2PassedAfterTestClass1Ignored() { ExpandRootNode(); TestClass testClass1 = testProject.TestClasses["Project.Tests.MyTestFixture"]; testClass1.Result = TestResultType.Ignored; TestClass testClass2 = testProject.TestClasses["Project.MyTestFixture"]; testClass2.Result = TestResultType.Success; Assert.AreEqual(TestTreeViewImageListIndex.TestIgnored, (TestTreeViewImageListIndex)projectNamespaceNode.ImageIndex); } [Test] public void ExpandProjectNodeAfterOnePassOneFail() { TestClass testClass1 = testProject.TestClasses["Project.Tests.MyTestFixture"]; testClass1.Result = TestResultType.Failure; TestClass testClass2 = testProject.TestClasses["Project.MyTestFixture"]; testClass2.Result = TestResultType.Success; ExpandRootNode(); Assert.AreEqual(TestTreeViewImageListIndex.TestFailed, (TestTreeViewImageListIndex)projectNamespaceNode.ImageIndex); } [Test] public void AddNewClass() { ExtTreeNode projectNamespaceNode = ExpandProjectNamespaceNode(); ExtTreeNode testsNamespaceNode = ExpandTestsNamespaceNode(); MockClass mockClass = new MockClass(projectContent, "Project.Tests.MyNewTestFixture"); mockClass.Attributes.Add(new MockAttribute("TestFixture")); TestClass newTestClass = new TestClass(mockClass, testFrameworks); testProject.TestClasses.Add(newTestClass); ExtTreeNode newTestClassNode = null; foreach (ExtTreeNode node in testsNamespaceNode.Nodes) { if (node.Text == "MyNewTestFixture") { newTestClassNode = node; break; } } newTestClass.Result = TestResultType.Failure; // New test class node should be added to the test namespace node. Assert.AreEqual(2, testsNamespaceNode.Nodes.Count); Assert.IsNotNull(newTestClassNode); // Make sure the namespace node image index is affected by the // new test class added. Assert.AreEqual(TestTreeViewImageListIndex.TestFailed, (TestTreeViewImageListIndex)testsNamespaceNode.SelectedImageIndex); // Project namespace node should have two child nodes, one for the // Tests namespace and one test class node. Assert.AreEqual(2, projectNamespaceNode.Nodes.Count); } /// <summary> /// Tests that the test class is removed from the tree. /// </summary> [Test] public void RemoveClass() { AddNewClass(); ExtTreeNode projectNamespaceNode = ExpandProjectNamespaceNode(); ExtTreeNode testsNamespaceNode = ExpandTestsNamespaceNode(); // Reset the new TestClass result after it was modified // in the AddNewClass call. TestClass newTestClass = testProject.TestClasses["Project.Tests.MyNewTestFixture"]; newTestClass.Result = TestResultType.None; // Locate the class we are going to remove. TestClass testClass = testProject.TestClasses["Project.Tests.MyTestFixture"]; testProject.TestClasses.Remove(testClass); ExtTreeNode testClassNode = null; foreach (ExtTreeNode node in testsNamespaceNode.Nodes) { if (node.Text == "MyTestFixture") { testClassNode = node; break; } } testClass.Result = TestResultType.Failure; Assert.AreEqual(1, testsNamespaceNode.Nodes.Count); Assert.IsNull(testClassNode); // Make sure the namespace node image index is NOT affected by the // test class just removed. Assert.AreEqual(TestTreeViewImageListIndex.TestNotRun, (TestTreeViewImageListIndex)testsNamespaceNode.SelectedImageIndex); // Check that the test class does not affect the project namespace node // image index either. Assert.AreEqual(TestTreeViewImageListIndex.TestNotRun, (TestTreeViewImageListIndex)projectNamespaceNode.ImageIndex); } /// <summary> /// Tests that after all the child nodes from a namespace node are removed /// the namespace node removes itself. /// </summary> [Test] public void RemoveNamespaceNode() { ExtTreeNode projectNamespaceNode = ExpandProjectNamespaceNode(); ExtTreeNode testsNamespaceNode = ExpandTestsNamespaceNode(); // Locate the class we are going to remove. TestClass testClass = testProject.TestClasses["Project.Tests.MyTestFixture"]; testProject.TestClasses.Remove(testClass); ExtTreeNode testClassNode = null; foreach (ExtTreeNode node in testsNamespaceNode.Nodes) { if (node.Text == "MyTestFixture") { testClassNode = node; break; } } Assert.IsNull(testClassNode); // Project namespace node should only have one child node. Assert.AreEqual(1, projectNamespaceNode.Nodes.Count); Assert.AreEqual("MyTestFixture", projectNamespaceNode.Nodes[0].Text); } [Test] public void RemoveClassFromNamespaceNodeWithNonClassNodeChildren() { ExtTreeNode projectNamespaceNode = ExpandProjectNamespaceNode(); ExtTreeNode testsNamespaceNode = ExpandTestsNamespaceNode(); // Add a dummy tree node to the tests namespace node to make // sure the TestNamespaceTreeNode handles non-TestClassTreeNode // children when removing a class. testsNamespaceNode.Nodes.Insert(0, new ExtTreeNode()); // Locate the class we are going to remove. TestClass testClass = testProject.TestClasses["Project.Tests.MyTestFixture"]; testProject.TestClasses.Remove(testClass); ExtTreeNode testClassNode = null; foreach (ExtTreeNode node in testsNamespaceNode.Nodes) { if (node.Text == "MyTestFixture") { testClassNode = node; break; } } Assert.IsNull(testClassNode); Assert.AreEqual(1, testsNamespaceNode.Nodes.Count); } ExtTreeNode ExpandProjectNamespaceNode() { ExpandRootNode(); foreach (ExtTreeNode node in rootNode.Nodes) { if (node.Text == "Project") { node.Expanding(); return node; } } return null; } ExtTreeNode ExpandTestsNamespaceNode() { ExtTreeNode projectNamespaceNode = ExpandProjectNamespaceNode(); foreach (ExtTreeNode childNode in projectNamespaceNode.Nodes) { if (childNode.Text == "Tests") { childNode.Expanding(); return childNode; } } return null; } } }
33.55477
125
0.747578
6ae957bb73647cbd55b5a5a3bfcdcf33a77c2d9c
466
c
C
img/x.c
mikelovic/MPPT-Charger_Software
d1e5dd32c01e778c4b46ecf73e457780f6f5e4b2
[ "Apache-2.0" ]
2
2019-10-07T15:04:16.000Z
2019-11-06T12:04:22.000Z
img/x.c
Abdulkadir-Muhendis/charge-controller-firmware
987a6d8894f91dc2f930b79eec531a4b551295b6
[ "Apache-2.0" ]
null
null
null
img/x.c
Abdulkadir-Muhendis/charge-controller-firmware
987a6d8894f91dc2f930b79eec531a4b551295b6
[ "Apache-2.0" ]
2
2017-05-18T15:20:27.000Z
2022-03-11T17:37:16.000Z
//------------------------------------------------------------------------------ // File generated by LCD Assistant // http://en.radzio.dxp.pl/bitmap_converter/ //------------------------------------------------------------------------------ const unsigned char x [] = { 0x08, 0x08, 0x08, 0x08, 0x00, 0x41, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x41, 0x00, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
46.6
95
0.44206
7fd330a22a1098fa9cab73af19793a3ae45d277e
8,668
php
PHP
src/Buseta/BodegaBundle/Entity/Movimiento.php
yainel/cloaked-bear
dd0a697d0ea4ef40843c9d0b37bcbdc8cc619cff
[ "MIT" ]
null
null
null
src/Buseta/BodegaBundle/Entity/Movimiento.php
yainel/cloaked-bear
dd0a697d0ea4ef40843c9d0b37bcbdc8cc619cff
[ "MIT" ]
null
null
null
src/Buseta/BodegaBundle/Entity/Movimiento.php
yainel/cloaked-bear
dd0a697d0ea4ef40843c9d0b37bcbdc8cc619cff
[ "MIT" ]
null
null
null
<?php namespace Buseta\BodegaBundle\Entity; use Buseta\BodegaBundle\Interfaces\DateTimeAwareInterface; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * Movimiento. * * @ORM\Table(name="d_movimiento") * @ORM\Entity(repositoryClass="Buseta\BodegaBundle\Entity\Repository\MovimientoRepository") */ class Movimiento implements DateTimeAwareInterface { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\ManyToOne(targetEntity="Buseta\BodegaBundle\Entity\Bodega") */ private $almacenOrigen; /** * @ORM\ManyToOne(targetEntity="Buseta\BodegaBundle\Entity\Bodega") */ private $almacenDestino; /** * @var \DateTime * * @ORM\Column(name="fechaMovimiento", type="date") */ private $fechaMovimiento; /** * @var \Doctrine\Common\Collections\ArrayCollection * * @ORM\OneToMany(targetEntity="Buseta\BodegaBundle\Entity\MovimientosProductos", mappedBy="movimiento", cascade={"all"}) * @Assert\Valid() */ private $movimientos_productos; /** * @var string * * @ORM\Column(name="moved_by", type="string", nullable=true) */ private $movidoPor; /** * @var string * * @ORM\Column(name="document_status", type="string") */ private $estadoDocumento; /** * @var \DateTime * * @ORM\Column(name="created", type="datetime") */ private $created; /** * @var \HatueySoft\SecurityBundle\Entity\User * * @ORM\ManyToOne(targetEntity="HatueySoft\SecurityBundle\Entity\User") * @ORM\JoinColumn(name="createdBy_id") */ private $createdBy; /** * @var \DateTime * * @ORM\Column(name="updated", type="datetime", nullable=true) */ private $updated; /** * HatueySoft\SecurityBundle\Entity\User * * @ORM\ManyToOne(targetEntity="HatueySoft\SecurityBundle\Entity\User") * @ORM\JoinColumn(name="updatedBy_id") */ private $updatedBy; /** * @var \DateTime * * @ORM\Column(name="deleted", type="datetime", nullable=true) */ private $deleted; /** * @var \HatueySoft\SecurityBundle\Entity\User * * @ORM\ManyToOne(targetEntity="HatueySoft\SecurityBundle\Entity\User") * @ORM\JoinColumn(name="deletedBy_id") */ private $deletedBy; /** * Get id. * * @return integer */ public function getId() { return $this->id; } /** * Set fechaMovimiento. * * @param \DateTime $fechaMovimiento * * @return Movimiento */ public function setFechaMovimiento($fechaMovimiento) { $this->fechaMovimiento = $fechaMovimiento; return $this; } /** * Get fechaMovimiento. * * @return \DateTime */ public function getFechaMovimiento() { return $this->fechaMovimiento; } /** * Set almacenOrigen. * * @param \Buseta\BodegaBundle\Entity\Bodega $almacenOrigen * * @return Movimiento */ public function setAlmacenOrigen(\Buseta\BodegaBundle\Entity\Bodega $almacenOrigen = null) { $this->almacenOrigen = $almacenOrigen; return $this; } /** * Get almacenOrigen. * * @return \Buseta\BodegaBundle\Entity\Bodega */ public function getAlmacenOrigen() { return $this->almacenOrigen; } /** * Set almacenDestino. * * @param \Buseta\BodegaBundle\Entity\Bodega $almacenDestino * * @return Movimiento */ public function setAlmacenDestino(\Buseta\BodegaBundle\Entity\Bodega $almacenDestino = null) { $this->almacenDestino = $almacenDestino; return $this; } /** * Get almacenDestino. * * @return \Buseta\BodegaBundle\Entity\Bodega */ public function getAlmacenDestino() { return $this->almacenDestino; } /** * Add movimientos_productos. * * @param \Buseta\BodegaBundle\Entity\MovimientosProductos $movimientosProductos * * @return Movimiento */ public function addMovimientosProducto(\Buseta\BodegaBundle\Entity\MovimientosProductos $movimientosProductos) { $movimientosProductos->setMovimiento($this); $this->movimientos_productos[] = $movimientosProductos; return $this; } /** * Remove movimientos_productos. * * @param \Buseta\BodegaBundle\Entity\MovimientosProductos $movimientosProductos */ public function removeMovimientosProducto(\Buseta\BodegaBundle\Entity\MovimientosProductos $movimientosProductos) { $this->movimientos_productos->removeElement($movimientosProductos); } /** * Get movimientos_productos. * * @return \Doctrine\Common\Collections\Collection */ public function getMovimientosProductos() { return $this->movimientos_productos; } /** * Set estado_documento * * @param string $estadoDocumento * * @return Movimiento */ public function setEstadoDocumento($estadoDocumento) { $this->estadoDocumento = $estadoDocumento; return $this; } /** * Get estado_documento * * @return string */ public function getEstadoDocumento() { return $this->estadoDocumento; } /** * Constructor */ public function __construct() { $this->movimientos_productos = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Set movidoPor * * @param string $movidoPor * * @return Movimiento */ public function setMovidoPor($movidoPor) { $this->movidoPor = $movidoPor; return $this; } /** * Get movidoPor * * @return string */ public function getMovidoPor() { return $this->movidoPor; } /** * Set created * * @param \DateTime $created * * @return Movimiento */ public function setCreated(\DateTime $created) { $this->created = $created; return $this; } /** * Get created * * @return \DateTime */ public function getCreated() { return $this->created; } /** * Set updated * * @param \DateTime $updated * * @return Movimiento */ public function setUpdated(\DateTime $updated) { $this->updated = $updated; return $this; } /** * Get updated * * @return \DateTime */ public function getUpdated() { return $this->updated; } /** * Set deleted * * @param \DateTime $deleted * * @return Movimiento */ public function setDeleted($deleted) { $this->deleted = $deleted; return $this; } /** * Get deleted * * @return \DateTime */ public function getDeleted() { return $this->deleted; } /** * Set createdBy * * @param \HatueySoft\SecurityBundle\Entity\User $createdBy * * @return Movimiento */ public function setCreatedBy(\HatueySoft\SecurityBundle\Entity\User $createdBy = null) { $this->createdBy = $createdBy; return $this; } /** * Get createdBy * * @return \HatueySoft\SecurityBundle\Entity\User */ public function getCreatedBy() { return $this->createdBy; } /** * Set updatedBy * * @param \HatueySoft\SecurityBundle\Entity\User $updatedBy * * @return Movimiento */ public function setUpdatedBy(\HatueySoft\SecurityBundle\Entity\User $updatedBy = null) { $this->updatedBy = $updatedBy; return $this; } /** * Get updatedBy * * @return \HatueySoft\SecurityBundle\Entity\User */ public function getUpdatedBy() { return $this->updatedBy; } /** * Set deletedBy * * @param \HatueySoft\SecurityBundle\Entity\User $deletedBy * * @return Movimiento */ public function setDeletedBy(\HatueySoft\SecurityBundle\Entity\User $deletedBy = null) { $this->deletedBy = $deletedBy; return $this; } /** * Get deletedBy * * @return \HatueySoft\SecurityBundle\Entity\User */ public function getDeletedBy() { return $this->deletedBy; } }
20.252336
125
0.580065
12c59c7ae54c2e597fd829edee6986fdb29b140a
596
cs
C#
_no_namespace/PesronalMotionPlayData.cs
SinsofSloth/RF5-global-metadata
2bbf6e4a0d2cb91ac5177b20b569c023a1f07949
[ "MIT" ]
1
2021-06-21T11:34:02.000Z
2021-06-21T11:34:02.000Z
_no_namespace/PesronalMotionPlayData.cs
SinsofSloth/RF5-global-metadata
2bbf6e4a0d2cb91ac5177b20b569c023a1f07949
[ "MIT" ]
null
null
null
_no_namespace/PesronalMotionPlayData.cs
SinsofSloth/RF5-global-metadata
2bbf6e4a0d2cb91ac5177b20b569c023a1f07949
[ "MIT" ]
null
null
null
[Serializable] public class PesronalMotionPlayData // TypeDefIndex: 7024 { // Fields [SerializeField] // RVA: 0x162830 Offset: 0x162931 VA: 0x162830 public FaceType FaceType; // 0x10 [SerializeField] // RVA: 0x162840 Offset: 0x162941 VA: 0x162840 public EmotionType EmotionType; // 0x14 [SerializeField] // RVA: 0x162850 Offset: 0x162951 VA: 0x162850 public VoiceGroup VoiceGroup; // 0x18 [SerializeField] // RVA: 0x162860 Offset: 0x162961 VA: 0x162860 public float TransitionDuration; // 0x1C // Methods // RVA: 0x1FE2530 Offset: 0x1FE2631 VA: 0x1FE2530 public void .ctor() { } }
29.8
64
0.743289
2d2dd11b4d0db8d591522820c02bd8b23d08b433
12,392
kt
Kotlin
languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/requests/JavaHttpRequestRenderer.kt
nkuehn/rmf-codegen
beb8b25a11be682f3db13ade3e18d8893aeb124c
[ "Apache-2.0" ]
null
null
null
languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/requests/JavaHttpRequestRenderer.kt
nkuehn/rmf-codegen
beb8b25a11be682f3db13ade3e18d8893aeb124c
[ "Apache-2.0" ]
null
null
null
languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/requests/JavaHttpRequestRenderer.kt
nkuehn/rmf-codegen
beb8b25a11be682f3db13ade3e18d8893aeb124c
[ "Apache-2.0" ]
null
null
null
package io.vrap.codegen.languages.javalang.client.builder.requests import com.google.inject.Inject import io.vrap.codegen.languages.extensions.resource import io.vrap.codegen.languages.extensions.toComment import io.vrap.codegen.languages.extensions.toRequestName import io.vrap.codegen.languages.java.base.JavaSubTemplates import io.vrap.codegen.languages.java.base.extensions.* import io.vrap.rmf.codegen.io.TemplateFile import io.vrap.rmf.codegen.rendring.MethodRenderer import io.vrap.rmf.codegen.rendring.utils.escapeAll import io.vrap.rmf.codegen.rendring.utils.keepIndentation import io.vrap.rmf.codegen.types.VrapObjectType import io.vrap.rmf.codegen.types.VrapScalarType import io.vrap.rmf.codegen.types.VrapType import io.vrap.rmf.codegen.types.VrapTypeProvider import io.vrap.rmf.raml.model.resources.Method import io.vrap.rmf.raml.model.types.QueryParameter import io.vrap.rmf.raml.model.util.StringCaseFormat import org.eclipse.emf.ecore.EObject /** * Query parameters with this annotation should be ignored by JVM sdk. */ const val PLACEHOLDER_PARAM_ANNOTATION = "placeholderParam" class JavaHttpRequestRenderer @Inject constructor(override val vrapTypeProvider: VrapTypeProvider) : MethodRenderer, JavaObjectTypeExtensions, JavaEObjectTypeExtensions { override fun render(type: Method): TemplateFile { val vrapType = vrapTypeProvider.doSwitch(type as EObject) as VrapObjectType val content = """ |package ${vrapType.`package`.toJavaPackage()}; | |import io.vrap.rmf.base.client.utils.Utils; |import io.vrap.rmf.base.client.utils.json.VrapJsonUtils; | |import java.io.InputStream; |import java.io.IOException; | |import java.net.URI; |import java.nio.file.Files; | |import java.time.Duration; |import java.util.ArrayList; |import java.util.List; |import java.util.Map; |import java.util.HashMap; |import java.util.stream.Collectors; |import java.util.concurrent.CompletableFuture; |import io.vrap.rmf.base.client.utils.Generated; | |import java.io.UnsupportedEncodingException; |import java.net.URLEncoder; |import io.vrap.rmf.base.client.*; |${type.imports()} | |import static io.vrap.rmf.base.client.utils.ClientUtils.blockingWait; | |<${type.toComment().escapeAll()}> |<${JavaSubTemplates.generatedAnnotation}> |public class ${type.toRequestName()} extends ApiMethod\<${type.toRequestName()}\> { | | <${type.fields()}> | | <${type.constructor()}> | | <${type.copyConstructor()}> | | <${type.createRequestMethod()}> | | <${type.executeBlockingMethod()}> | | <${type.executeMethod()}> | | <${type.pathArgumentsGetters()}> | | <${type.queryParamsGetters()}> | | <${type.pathArgumentsSetters()}> | | <${type.queryParamsSetters()}> |} """.trimMargin() .keepIndentation() return TemplateFile( relativePath = "${vrapType.`package`}.${type.toRequestName()}".replace(".", "/") + ".java", content = content ) } private fun Method.constructor(): String? { val constructorArguments = mutableListOf("final ApiHttpClient apiHttpClient") val constructorAssignments = mutableListOf("super(apiHttpClient);") this.pathArguments().map { "String $it" }.forEach { constructorArguments.add(it) } this.pathArguments().map { "this.$it = $it;" }.forEach { constructorAssignments.add(it) } if(this.bodies != null && this.bodies.isNotEmpty()){ if(this.bodies[0].type.toVrapType() is VrapObjectType) { val methodBodyVrapType = this.bodies[0].type.toVrapType() as VrapObjectType val methodBodyArgument = "${methodBodyVrapType.`package`.toJavaPackage()}.${methodBodyVrapType.simpleClassName} ${methodBodyVrapType.simpleClassName.decapitalize()}" constructorArguments.add(methodBodyArgument) val methodBodyAssignment = "this.${methodBodyVrapType.simpleClassName.decapitalize()} = ${methodBodyVrapType.simpleClassName.decapitalize()};" constructorAssignments.add(methodBodyAssignment) }else { constructorArguments.add("com.fasterxml.jackson.databind.JsonNode jsonNode") constructorAssignments.add("this.jsonNode = jsonNode;") } } return """ |public ${this.toRequestName()}(${constructorArguments.joinToString(separator = ", ")}) { | <${constructorAssignments.joinToString(separator = "\n")}> |} """.trimMargin().keepIndentation() } private fun Method.copyConstructor(): String? { val constructorAssignments = mutableListOf("super(t);") this.pathArguments().map { "this.$it = t.$it;" }.forEach { constructorAssignments.add(it) } if(this.bodies != null && this.bodies.isNotEmpty()){ if(this.bodies[0].type.toVrapType() is VrapObjectType) { val methodBodyVrapType = this.bodies[0].type.toVrapType() as VrapObjectType val methodBodyAssignment = "this.${methodBodyVrapType.simpleClassName.decapitalize()} = t.${methodBodyVrapType.simpleClassName.decapitalize()};" constructorAssignments.add(methodBodyAssignment) } else { constructorAssignments.add("this.jsonNode = t.jsonNode;") } } return """ |public ${this.toRequestName()}(${this.toRequestName()} t) { | <${constructorAssignments.joinToString(separator = "\n")}> |} """.trimMargin().keepIndentation() } private fun Method.fields(): String? { val pathArgs = this.pathArguments().map { "private String $it;" }.joinToString(separator = "\n") val body: String = if(this.bodies != null && this.bodies.isNotEmpty()){ if(this.bodies[0].type.toVrapType() is VrapObjectType){ val methodBodyVrapType = this.bodies[0].type.toVrapType() as VrapObjectType "private ${methodBodyVrapType.`package`.toJavaPackage()}.${methodBodyVrapType.simpleClassName} ${methodBodyVrapType.simpleClassName.decapitalize()};" }else { "private com.fasterxml.jackson.databind.JsonNode jsonNode;" } }else{ "" } return """| |<$pathArgs> | |<$body> """.trimMargin() } private fun QueryParameter.fieldName(): String { return StringCaseFormat.LOWER_CAMEL_CASE.apply(this.name.replace(".", "-")) } private fun Method.pathArguments() : List<String> { return this.resource().fullUri.variables.toList() } private fun Method.createRequestMethod() : String { val pathArguments = this.pathArguments().map { "{$it}" } var stringFormat = this.resource().fullUri.template pathArguments.forEach { stringFormat = stringFormat.replace(it, "%s") } val stringFormatArgs = pathArguments .map { it.replace("{", "").replace("}", "") } .map { "this.$it" } .joinToString(separator = ", ") val bodyName : String? = if(this.bodies != null && this.bodies.isNotEmpty()){ if(this.bodies[0].type.toVrapType() is VrapObjectType) { val methodBodyVrapType = this.bodies[0].type.toVrapType() as VrapObjectType methodBodyVrapType.simpleClassName.decapitalize() }else { "jsonNode" } }else { null } val requestPathGeneration : String = """ |List<String> params = new ArrayList<>(getQueryParamUriStrings()); |String httpRequestPath = String.format("$stringFormat", $stringFormatArgs); |if(!params.isEmpty()){ | httpRequestPath += "?" + String.join("&", params); |} """.trimMargin().escapeAll() val bodySetter: String = if(bodyName != null){ if(this.bodies[0].type.isFile()) """ |try { | return new ApiHttpRequest(ApiHttpMethod.${this.method.name}, URI.create(httpRequestPath), getHeaders(), Files.readAllBytes(file.toPath())); |} catch (Exception e) { | e.printStackTrace(); |} |""".trimMargin() else """ |try { | final byte[] body = apiHttpClient().getSerializerService().toJsonByteArray($bodyName); | return new ApiHttpRequest(ApiHttpMethod.${this.method.name}, URI.create(httpRequestPath), getHeaders(), body); |} catch(Exception e) { | e.printStackTrace(); |} |""".trimMargin() } else "" return """ |public ApiHttpRequest createHttpRequest() { | <$requestPathGeneration> | $bodySetter | return new ApiHttpRequest(ApiHttpMethod.${this.method.name}, URI.create(httpRequestPath), getHeaders(), null); |} """.trimMargin() } private fun Method.executeBlockingMethod() : String { return """ |public ApiHttpResponse\<${this.javaReturnType(vrapTypeProvider)}\> executeBlocking(){ | return executeBlocking(Duration.ofSeconds(60)); |} | |public ApiHttpResponse\<${this.javaReturnType(vrapTypeProvider)}\> executeBlocking(Duration timeout){ | return blockingWait(execute(), timeout); |} """.trimMargin() } private fun Method.executeMethod() : String { return """ |public CompletableFuture\<ApiHttpResponse\<${this.javaReturnType(vrapTypeProvider)}\>\> execute(){ | return apiHttpClient().execute(this.createHttpRequest(), ${this.javaReturnType(vrapTypeProvider)}.class); |} """.trimMargin() } private fun Method.pathArgumentsGetters() : String = this.pathArguments() .map { "public String get${it.capitalize()}() {return this.$it;}" } .joinToString(separator = "\n") private fun Method.pathArgumentsSetters() : String = this.pathArguments() .map { "public void set${it.capitalize()}(final String $it) { this.$it = $it; }" } .joinToString(separator = "\n\n") private fun Method.queryParamsGetters() : String = this.queryParameters .filter { it.getAnnotation(PLACEHOLDER_PARAM_ANNOTATION, true) == null } .map { """ |public List<String> get${it.fieldName().capitalize()}() { | return this.getQueryParam("${it.fieldName()}"); |} """.trimMargin().escapeAll() } .joinToString(separator = "\n\n") private fun Method.queryParamsSetters() : String = this.queryParameters .filter { it.getAnnotation(PLACEHOLDER_PARAM_ANNOTATION, true) == null } .map { """ |public ${this.toRequestName()} with${it.fieldName().capitalize()}(final ${it.type.toVrapType().simpleName()} ${it.fieldName()}){ | return new ${this.toRequestName()}(this).addQueryParam("${it.fieldName()}", ${it.fieldName()}); |} """.trimMargin().escapeAll() } .joinToString(separator = "\n\n") private fun Method.imports(): String { return this.queryParameters .map { it.type.toVrapType() } .filter { it !is VrapScalarType } .map { getImportsForType(it) } .filter { !it.isNullOrBlank() } .map { "import ${it};" } .joinToString(separator = "\n") } }
42.731034
181
0.581908
cd0f7108214a06d0b9f1d50451da7ece8a1cba13
334
cs
C#
HackerNewsUwp/Network/Internal/IHackerNewsApi.cs
Fyzxs/HackerNewsReaderUwp
862247b843f166df7faee9758013b8252e9acb88
[ "MIT" ]
null
null
null
HackerNewsUwp/Network/Internal/IHackerNewsApi.cs
Fyzxs/HackerNewsReaderUwp
862247b843f166df7faee9758013b8252e9acb88
[ "MIT" ]
null
null
null
HackerNewsUwp/Network/Internal/IHackerNewsApi.cs
Fyzxs/HackerNewsReaderUwp
862247b843f166df7faee9758013b8252e9acb88
[ "MIT" ]
null
null
null
using System.Net.Http; using System.Threading.Tasks; using Refit; namespace HackerNewsUwp.Network.Internal { public interface IHackerNewsApi { [Get("/topstories.json")] Task<HttpResponseMessage> TopStories(); [Get("/item/{itemId}.json")] Task<HttpResponseMessage> Item(string itemId); } }
22.266667
54
0.673653
14e694164e66153dfa25fc04f8d39d144138024b
277
ts
TypeScript
src/entities/treebase.entity.ts
dichakho/roomify-api
52407338bfebcd300822d2d5168421b18fd362c0
[ "MIT" ]
null
null
null
src/entities/treebase.entity.ts
dichakho/roomify-api
52407338bfebcd300822d2d5168421b18fd362c0
[ "MIT" ]
null
null
null
src/entities/treebase.entity.ts
dichakho/roomify-api
52407338bfebcd300822d2d5168421b18fd362c0
[ "MIT" ]
1
2021-01-22T14:31:00.000Z
2021-01-22T14:31:00.000Z
import { IsOptional, IsInt } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; import { BaseEntity } from './base.entity'; export abstract class TreeBase extends BaseEntity { @ApiProperty({ example: 0 }) @IsOptional() @IsInt() parentId: number; }
25.181818
52
0.703971
d1531b4adbec4ca75c42cb34a6d6fa7c3a3d7b36
318
html
HTML
controlpanel/frontend/jinja2/includes/datasource-access-form.html
ministryofjustice/analytics-platform-control-panel-public
289143280ed79a05be470d57dc3b1fd9179758cf
[ "MIT" ]
null
null
null
controlpanel/frontend/jinja2/includes/datasource-access-form.html
ministryofjustice/analytics-platform-control-panel-public
289143280ed79a05be470d57dc3b1fd9179758cf
[ "MIT" ]
93
2021-08-09T16:09:59.000Z
2022-03-28T16:13:31.000Z
controlpanel/frontend/jinja2/includes/datasource-access-form.html
ministryofjustice/analytics-platform-control-panel-public
289143280ed79a05be470d57dc3b1fd9179758cf
[ "MIT" ]
2
2021-03-30T15:13:24.000Z
2021-04-11T06:26:09.000Z
{% from "includes/list-field.html" import list_field_textarea %} {% macro data_access_paths_textarea(field) -%} <div class="govuk-form-group panel panel-border-narrow js-list-field"> {{ list_field_textarea(field.name, field.label, field.help_text, field.value() or "", field.errors) }} </div> {%- endmacro %}
39.75
106
0.713836
6d184fad6e1d00430b1c789000ef8adb984b2f30
1,511
ts
TypeScript
src/user/user.controller.ts
nesimer/blog-api
1b9017852424a8240bb4ac2aa8ccd139b5108176
[ "MIT" ]
1
2019-01-11T07:39:10.000Z
2019-01-11T07:39:10.000Z
src/user/user.controller.ts
nesimer/blog-api
1b9017852424a8240bb4ac2aa8ccd139b5108176
[ "MIT" ]
5
2021-05-07T04:46:15.000Z
2022-02-12T07:18:22.000Z
src/user/user.controller.ts
nesimer/blog-api
1b9017852424a8240bb4ac2aa8ccd139b5108176
[ "MIT" ]
null
null
null
import { Body, Controller, Get, HttpStatus, Param, Post, Put, UseGuards, ValidationPipe, } from '@nestjs/common'; import { ApiBearerAuth, ApiOperation, ApiResponse, ApiUseTags, } from '@nestjs/swagger'; import { JwtAuthGuard } from './../auth/auth.guard'; import { UserPostInDto } from './user-post-in.dto'; import { UserService } from './user.service'; @ApiUseTags('User') @ApiBearerAuth() @UseGuards(new JwtAuthGuard()) @Controller('user') export class UserController { constructor(private readonly userService: UserService) {} @Post() @ApiOperation({ title: 'Create an user' }) @ApiResponse({ status: HttpStatus.OK, description: 'User créé', }) async create( @Body(new ValidationPipe({ whitelist: true })) dto: UserPostInDto, ) { return this.userService.create(dto); } @Get(':id') @ApiOperation({ title: 'Get a user by id' }) @ApiResponse({ status: HttpStatus.OK, description: 'User trouvé et retourné', }) @ApiResponse({ status: HttpStatus.NOT_FOUND, description: 'User non trouvé :/ ', }) async getById(@Param('id') id: string) { return this.userService.getById(id); } @Put(':id') @ApiOperation({ title: 'Update an user' }) @ApiResponse({ status: HttpStatus.OK, description: 'User trouvé et mis à jour', }) async updateById( @Param('id') id: string, @Body(new ValidationPipe({ whitelist: true })) dto: UserPostInDto, ) { return this.userService.updateById(id, dto); } }
21.898551
70
0.65321
249254423a6614e28118cea95ef86d6cd844bcbe
8,003
php
PHP
backend/themes/themes1/layouts/main.php
camiloruizvidal/autonoma
9781981910d744065800ecabe3a48cbac0263739
[ "BSD-3-Clause" ]
null
null
null
backend/themes/themes1/layouts/main.php
camiloruizvidal/autonoma
9781981910d744065800ecabe3a48cbac0263739
[ "BSD-3-Clause" ]
null
null
null
backend/themes/themes1/layouts/main.php
camiloruizvidal/autonoma
9781981910d744065800ecabe3a48cbac0263739
[ "BSD-3-Clause" ]
null
null
null
<?php use yii\helpers\Html; use yii\widgets\Menu; use yii\widgets\Breadcrumbs; use yii\bootstrap\Nav; use common\widgets\Alert; use backend\assets\AppAsset; use yii\bootstrap\NavBar; /** * @var $this \yii\base\View * @var $content string */ // $this->registerAssetBundle('app'); AppAsset::register($this); ?> <?php $this->beginPage(); ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Bootstrap Core CSS --> <link href="<?php echo $this->theme->baseUrl ?>/css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS --> <link href="<?php echo $this->theme->baseUrl ?>/css/business-casual.css" rel="stylesheet"> <!-- Fonts --> <link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic" rel="stylesheet" type="text/css"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <style id="tfeditor-style"> body { background-image: url("image/au.jpeg"); } .brand, .address-bar{ background-color: rgba(0,0,0,0.5); } </style> <title><?= Html::encode($this->title) ?></title> <?php $this->head() ?> </head> <body> <?php $this->beginBody() ?> <div class="brand"><?php echo Html::encode(\Yii::$app->name); ?></div> <div class="address-bar">Somos Autonomos</div> <!-- Navigation --> <nav class="navbar navbar-default" role="navigation"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <!-- navbar-brand is hidden on larger screens, but visible when the menu is collapsed --> <a class="navbar-brand" href="#"><?php echo Html::encode(\Yii::$app->name); ?></a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <?php NavBar::begin([ ]); $menuItems = [ ['label' => 'Home', 'url' => ['/site/index']], ['label' => 'Jurado', 'options' => ['class' => 'treeview-menu'], 'items' => [ ['label' => 'Ver Jurados', 'url' => ['/jurado/index'], 'visible' => Yii::$app->user->can('Secretario')], ['label' => 'Asignar Jurados action', 'url' => ['/jurado-has-proyecto/index'], 'visible' => Yii::$app->user->can( 'Secretario')], ], ], //['label' => 'Jurado', 'url' => ['/jurado/index'], 'visible' => Yii::$app->user->can('Secretario')], ['label' => 'Sustentacion', 'url' => ['/sustentacion-final/index'], 'visible' => Yii::$app->user->can('Secretario')], ['label' => 'Anteproyecto', 'url' => ['/anteproyecto/index'], 'visible' => Yii::$app->user->can('Secretario')], ['label' => 'Anteproyecto', 'url' => ['/anteproyecto/veranteproyecto'], 'visible' => Yii::$app->user->can('Estudiante')], // asi se estbalece que usuario puede ver que menu 'visible' => Yii::$app->user->can('Estudiante') ['label' => 'Proyecto', 'url' => ['/proyecto/index'], 'visible' => Yii::$app->user->can( 'Secretario')], ['label' => 'Asignae jurado', 'url' => ['/jurado-has-proyecto/index'], 'visible' => Yii::$app->user->can( 'Secretario')], ['label' => 'Proyecto', 'url' => ['/proyecto/verproyecto'], 'visible' => Yii::$app->user->can('Estudiante')], ['label' => 'Conocimiento', 'url' => ['/conocimiento/index']], ]; if (Yii::$app->user->isGuest) { $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; } else { $menuItems[] = '<li>' . Html::beginForm(['/site/logout'], 'post') . Html::submitButton( 'Logout (' . Yii::$app->user->identity->username . ')', ['class' => 'btn navbar-nav navbar-left '] ) . Html::endForm() . '</li>'; } echo Nav::widget([ 'options' => ['class' => 'navbar-nav navbar-left'], 'items' => $menuItems, ]); NavBar::end(); ?> </div> <!-- /.navbar-collapse --> </div> <!-- /.container --> </nav> <div class="container"> <div class="row"> <div class="box"> <div class="col-lg-12 text-center"> <div id="carousel-example-generic" class="carousel slide"> <!-- Indicators --> <ol class="carousel-indicators hidden-xs"> <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-generic" data-slide-to="1"></li> <li data-target="#carousel-example-generic" data-slide-to="2"></li> </ol> <!-- Wrapper for slides --> <div class="carousel-inner"> <div class="item active"> <img class="img-responsive img-full" src="https://i.imgur.com/XAOnnJK.jpg" alt=""> </div> <div class="item"> <img class="img-responsive img-full" src="http://i.imgur.com/5eGXvu6.jpg" alt=""> </div> <div class="item"> <img class="img-responsive img-full" src="https://i.imgur.com/7KT8ny3.jpg" alt=""> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> <span class="icon-prev"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" data-slide="next"> <span class="icon-next"></span> </a> </div> </div> </div> </div> <div class="row"> <div class="box"> <div class="col-lg-12"> <?php echo $content; ?> </div> </div> </div> </div> <!-- /.container --> <!-- jQuery --> <script src="<?php echo $this->theme->baseUrl ?>/js/jquery.js"></script> <!-- Bootstrap Core JavaScript --> <script src="<?php echo $this->theme->baseUrl ?>/js/bootstrap.min.js"></script> <!-- Script to Activate the Carousel --> <script> $('.carousel').carousel({ interval: 5000 }); </script> <?php $this->endBody(); ?> </body> </html> <?php $this->endPage(); ?>
40.624365
172
0.482069
e729157d64b09145506dac84294d746cf5e70f0f
7,428
php
PHP
src/Lunr/Spark/Facebook/Api.php
pprkut/lunr
6bb94cb6e1a835b8571ba7adf4a731ef30305da4
[ "MIT" ]
null
null
null
src/Lunr/Spark/Facebook/Api.php
pprkut/lunr
6bb94cb6e1a835b8571ba7adf4a731ef30305da4
[ "MIT" ]
null
null
null
src/Lunr/Spark/Facebook/Api.php
pprkut/lunr
6bb94cb6e1a835b8571ba7adf4a731ef30305da4
[ "MIT" ]
null
null
null
<?php /** * This file contains low level API methods for Facebook. * * PHP Version 5.4 * * @package Lunr\Spark\Facebook * @author Heinz Wiesinger <[email protected]> * @copyright 2013-2018, M2Mobi BV, Amsterdam, The Netherlands * @license http://lunr.nl/LICENSE MIT License */ namespace Lunr\Spark\Facebook; use Requests_Exception; use Requests_Exception_HTTP; /** * Low level Facebook API methods for Spark */ abstract class Api { /** * Shared instance of the CentralAuthenticationStore * @var \Lunr\Spark\CentralAuthenticationStore */ protected $cas; /** * Shared instance of a Logger class. * @var \Psr\Log\LoggerInterface */ protected $logger; /** * Shared instance of the Requests_Session class. * @var \Requests_Session */ protected $http; /** * Requested fields of the profile. * @var Array */ protected $fields; /** * Facebook resource identifier * @var String */ protected $id; /** * Returned data. * @var Array */ protected $data; /** * Boolean flag whether an access token was used for the request. * @var Boolean */ protected $used_access_token; /** * Constructor. * * @param \Lunr\Spark\CentralAuthenticationStore $cas Shared instance of the credentials store * @param \Psr\Log\LoggerInterface $logger Shared instance of a Logger class. * @param \Requests_Session $http Shared instance of the Requests_Session class. */ public function __construct($cas, $logger, $http) { $this->cas = $cas; $this->logger = $logger; $this->http = $http; $this->id = ''; $this->fields = []; $this->data = []; $this->used_access_token = FALSE; } /** * Destructor. */ public function __destruct() { unset($this->cas); unset($this->logger); unset($this->http); unset($this->id); unset($this->fields); unset($this->data); unset($this->used_access_token); } /** * Get access to shared credentials. * * @param string $key Credentials key * * @return mixed $return Value of the chosen key */ public function __get($key) { switch ($key) { case 'app_id': case 'app_secret': case 'app_secret_proof': case 'access_token': return $this->cas->get('facebook', $key); default: return NULL; } } /** * Set shared credentials. * * @param string $key Key name * @param string $value Value to set * * @return void */ public function __set($key, $value) { switch ($key) { case 'app_id': case 'app_secret': $this->cas->add('facebook', $key, $value); break; case 'access_token': $this->cas->add('facebook', $key, $value); $this->cas->add('facebook', 'app_secret_proof', hash_hmac('sha256', $value, $this->app_secret)); break; default: break; } } /** * Set the resource ID. * * @param string $id Facebook resource ID * * @return void */ public function set_id($id) { $this->id = $id; } /** * Specify the user profile fields that should be retrieved. * * @param array $fields Fields to retrieve * * @return void */ public function set_fields($fields) { if (is_array($fields) === FALSE) { return; } $this->fields = $fields; } /** * Fetch and parse results as though they were a query string. * * @param string $url API URL * @param array $params Array of parameters for the API request * @param string $method Request method to use, either 'get' or 'post' * * @return array $parts Array of return values */ protected function get_url_results($url, $params = [], $method = 'get') { $method = strtoupper($method); $parts = []; try { $response = $this->http->request($url, [], $params, $method); parse_str($response->body, $parts); $response->throw_for_status(); } catch (Requests_Exception_HTTP $e) { $parts = []; $message = json_decode($response->body, TRUE); $error = $message['error']; $context = [ 'message' => $error['message'], 'code' => $error['code'], 'type' => $error['type'], 'request' => $response->url ]; $this->logger->warning('Facebook API Request ({request}) failed, {type} ({code}): {message}', $context); } catch (Requests_Exception $e) { $context = [ 'message' => $e->getMessage(), 'request' => $url ]; $this->logger->warning('Facebook API Request ({request}) failed: {message}', $context); } unset($response); return $parts; } /** * Fetch and parse results as though they were a query string. * * @param string $url API URL * @param array $params Array of parameters for the API request * @param string $method Request method to use, either 'get' or 'post' * * @return array $parts Array of return values */ protected function get_json_results($url, $params = [], $method = 'get') { $method = strtoupper($method); $result = []; try { $response = $this->http->request($url, [], $params, $method); $result = json_decode($response->body, TRUE); $response->throw_for_status(); } catch (Requests_Exception_HTTP $e) { $error = $result['error']; $result = []; $context = [ 'message' => $error['message'], 'code' => $error['code'], 'type' => $error['type'], 'request' => $response->url ]; $this->logger->warning('Facebook API Request ({request}) failed, {type} ({code}): {message}', $context); } catch (Requests_Exception $e) { $context = [ 'message' => $e->getMessage(), 'request' => $url ]; $this->logger->warning('Facebook API Request ({request}) failed: {message}', $context); } unset($response); return $result; } /** * Fetch the resource information from Facebook. * * @param string $url API URL * @param array $params Array of parameters for the API request * * @return void */ protected function fetch_data($url, $params = []) { if ($this->access_token !== NULL) { $params['access_token'] = $this->access_token; $params['appsecret_proof'] = $this->app_secret_proof; $this->used_access_token = TRUE; } else { $this->used_access_token = FALSE; } if (empty($this->fields) === FALSE) { $params['fields'] = implode(',', $this->fields); } $this->data = $this->get_json_results($url, $params); } } ?>
25.179661
139
0.52154
24c133cf801df67556d291fb7150fbef1d7b6980
3,574
php
PHP
application/views/dashboard/tpl/profile_details.php
lionlone/take
26d4681a3e4411114d42614dc80eb6ec0db12722
[ "MIT" ]
null
null
null
application/views/dashboard/tpl/profile_details.php
lionlone/take
26d4681a3e4411114d42614dc80eb6ec0db12722
[ "MIT" ]
null
null
null
application/views/dashboard/tpl/profile_details.php
lionlone/take
26d4681a3e4411114d42614dc80eb6ec0db12722
[ "MIT" ]
null
null
null
<div class="side-body padding-top"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-4"> </div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-4"> <div class="text-center"> <h5 class="content-group">Thông tin tài khoản </h5></div> <div class="form-group has-feedback has-feedback-left"> <div class="form-group field-updateform-name required"> <input type="text" id="updateform-name" class="form-control" name="form[username]" autofocus="" value="<?= $user; ?>" placeholder="Họ và tên" readonly=""> <p class="help-block help-block-error"></p> </div> <div class="form-control-feedback"> <i class="icon-user-check text-muted"></i> </div> </div> <div class="form-group has-feedback has-feedback-left"> <div class="form-group field-updateform-name required"> <input type="text" id="updateform-name" class="form-control" name="form[username]" autofocus="" value="<?= $name; ?>" placeholder="Họ và tên" readonly=""> <p class="help-block help-block-error"></p> </div> <div class="form-control-feedback"> <i class="icon-user-check text-muted"></i> </div> </div> <div class="form-group has-feedback has-feedback-left"> <div class="form-group field-updateform-phone required"> <input type="text" id="updateform-phone" class="form-control" name="form[phone]" value="<?= $phone; ?>" autofocus="" placeholder="Số điện thoại" readonly=""> <p class="help-block help-block-error"></p> </div> <div class="form-control-feedback"> <i class="icon-phone text-muted"></i> </div> </div> <div class="form-group has-feedback has-feedback-left"> <div class="form-group field-updateform-email required"> <input type="text" id="updateform-email" class="form-control" name="form[email]" value="<?= $email; ?>" autofocus="" placeholder="[email protected]" readonly=""> <p class="help-block help-block-error"></p> </div> <div class="form-control-feedback"> <i class="icon-mention text-muted"></i> </div> </div> <div class="form-group has-feedback has-feedback-left"> <div class="form-group field-updateform-bank required"> <input type="text" id="updateform-bank" class="form-control" name="form[bank]" value="<?= $bank; ?>" autofocus="" placeholder="Số tài khoản Vietcombank" readonly=""> <p class="help-block help-block-error"></p> </div> <div class="form-control-feedback"> <i class="icon-credit-card text-muted"></i> </div> </div> <div class="form-group has-feedback has-feedback-left"> <div class="form-group field-updateform-refuser required"> <input type="text" id="updateform-refuser" class="form-control" name="form[refUser]" value="<?= $referral; ?>" autofocus="" placeholder="Người giới thiệu" readonly=""> <p class="help-block help-block-error"></p> </div> <div class="form-control-feedback"> <i class="icon-user-check text-muted"></i> </div> </div> <div class="content-divider text-muted form-group"><span></span> </div> </div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-4"> </div> </div>
48.958904
179
0.561276
385d24463ffe65bbfd90fc32541f89a7a356ef33
5,791
php
PHP
templates/coselectionform.php
ioigoume/simplesamlphp-module-coselection
2a05e150faecaa83ffff20326037be0a174bd71b
[ "Apache-2.0" ]
null
null
null
templates/coselectionform.php
ioigoume/simplesamlphp-module-coselection
2a05e150faecaa83ffff20326037be0a174bd71b
[ "Apache-2.0" ]
null
null
null
templates/coselectionform.php
ioigoume/simplesamlphp-module-coselection
2a05e150faecaa83ffff20326037be0a174bd71b
[ "Apache-2.0" ]
null
null
null
<?php use SimpleSAML\Module; /** * Template form for attribute selection. * * Parameters: * - 'srcMetadata': Metadata/configuration for the source. * - 'dstMetadata': Metadata/configuration for the destination. * - 'yesTarget': Target URL for the yes-button. This URL will receive a POST request. * - 'yesData': Parameters which should be included in the yes-request. * - 'noTarget': Target URL for the no-button. This URL will receive a GET request. * - 'noData': Parameters which should be included in the no-request. * - 'attributes': The attributes which are about to be released. * - 'sppp': URL to the privacy policy of the destination, or FALSE. * * @package SimpleSAMLphp */ assert('is_array($this->data["srcMetadata"])'); assert('is_array($this->data["dstMetadata"])'); assert('is_string($this->data["yesTarget"])'); assert('is_array($this->data["yesData"])'); assert('is_string($this->data["noTarget"])'); assert('is_array($this->data["noData"])'); assert('is_array($this->data["attributes"])'); // assert('is_array($this->data["hiddenAttributes"])'); assert('is_array($this->data["selectco"])'); assert('$this->data["sppp"] === false || is_string($this->data["sppp"])'); // Parse parameters if (array_key_exists('name', $this->data['srcMetadata'])) { $srcName = $this->data['srcMetadata']['name']; } elseif (array_key_exists('OrganizationDisplayName', $this->data['srcMetadata'])) { $srcName = $this->data['srcMetadata']['OrganizationDisplayName']; } else { $srcName = $this->data['srcMetadata']['entityid']; } if (is_array($srcName)) { $srcName = $this->t($srcName); } if (array_key_exists('name', $this->data['dstMetadata'])) { $dstName = $this->data['dstMetadata']['name']; } elseif (array_key_exists('OrganizationDisplayName', $this->data['dstMetadata'])) { $dstName = $this->data['dstMetadata']['OrganizationDisplayName']; } else { $dstName = $this->data['dstMetadata']['entityid']; } if (is_array($dstName)) { $dstName = $this->t($dstName); } $srcName = htmlspecialchars($srcName); $dstName = htmlspecialchars($dstName); $attributes = $this->data['attributes']; $selectCos = $this->data['selectco']; $this->data['header'] = $this->t('{coselection:coselection:co_selection_header}'); $this->data['head'] = '<link rel="stylesheet" type="text/css" href="/' . $this->data['baseurlpath'] . 'module.php/coselection/resources/css/style.css" />' . "\n"; $this->includeAtTemplateBase('includes/header.php'); ?> <p> <?php if (array_key_exists('descr_purpose', $this->data['dstMetadata'])) { echo '<br>' . $this->t('{coselection:coselection:co_selection_purpose}', array( 'SPNAME' => $dstName, 'SPDESC' => $this->getTranslation(SimpleSAMLUtilsArrays::arrayize($this->data['dstMetadata']['descr_purpose'], 'en')) , )); } echo '<h3 id="attributeheader">' . $this->t('{coselection:coselection:co_selection_cos_header}', array( 'SPNAME' => $dstName, 'IDPNAME' => $srcName )) . '</h3>'; if (!empty($this->data['intro'])) { echo '<h4 id="intro_header">'.$this->data['intro'].'</h4>'; // } else { // echo $this->t('{coselection:coselection:co_selection_accept}', array( // 'SPNAME' => $dstName, // 'IDPNAME' => $srcName // )); } // echo presentCos($selectCos); echo "<script type=\"text/javascript\" src=\"" . htmlspecialchars(Module::getModuleURL('coselection/resources/js/jquery-3.3.1.slim.min.js')) . "\"></script>"; echo "<script type=\"text/javascript\" src=\"" . htmlspecialchars(Module::getModuleURL('coselection/resources/js/attributeselector.js')) . "\"></script>"; ?> </p> <!-- Form that will be sumbitted on Yes --> <form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>"> <p style="margin: 1em"> <?php foreach($this->data['yesData'] as $name => $value) { echo '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'; } echo presentCos($selectCos); //echo '<input type="hidden" name="coSelection" />'; ?> </p> <button type="submit" name="yes" class="btn" id="yesbutton"> <?php echo htmlspecialchars($this->t('{coselection:coselection:yes}')) ?> </button> </form> <!-- Form that will be submitted on cancel--> <form style="display: inline; margin-left: .5em;" action="<?php echo htmlspecialchars($this->data['logoutLink']); ?>" method="get"> <?php foreach($this->data['logoutData'] as $name => $value) { echo ('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'); } ?> <button type="submit" class="btn" name="no" id="nobutton"> <?php echo htmlspecialchars($this->t('{coselection:coselection:no}')) ?> </button> </form> <?php if ($this->data['sppp'] !== false) { echo "<p>" . htmlspecialchars($this->t('{coselection:coselection:co_selection_privacy_policy}')) . " "; echo "<a target='_blank' href='" . htmlspecialchars($this->data['sppp']) . "'>" . $dstName . "</a>"; echo "</p>"; } /** * Recursive co array listing function * * @param array $attributes Attributes to be presented * @param string $nameParent Name of parent element * * @return string HTML representation of the attributes */ function presentCos($selectCos) { $str= '<div>'; $str.= '<ul style="list-style-type: none">'; foreach($selectCos as $id => $name) { // create the radio buttons $str .= '<li><input class="attribute-selection" style="margin-right: 10px" type="radio" value="'.$id.':'.$name.'" name="coSelection">'.$name.'<br></li>'; } // end foreach $str.= '</ul>'; $str.= '</div>'; return $str; } $this->includeAtTemplateBase('includes/footer.php');
35.746914
162
0.640477
d03e365c096704d2170a00459cf6bb1fb6dde5d3
557
cpp
C++
Implementation/Project/src/AST/ASTSTMT/ASTWhileNode.cpp
migueldingli1997/CPS2000-Compiler-Theory-and-Practice-Assignment
6843fc5822d6faedb2970ebc260f1adaacb4b3c8
[ "MIT" ]
null
null
null
Implementation/Project/src/AST/ASTSTMT/ASTWhileNode.cpp
migueldingli1997/CPS2000-Compiler-Theory-and-Practice-Assignment
6843fc5822d6faedb2970ebc260f1adaacb4b3c8
[ "MIT" ]
null
null
null
Implementation/Project/src/AST/ASTSTMT/ASTWhileNode.cpp
migueldingli1997/CPS2000-Compiler-Theory-and-Practice-Assignment
6843fc5822d6faedb2970ebc260f1adaacb4b3c8
[ "MIT" ]
null
null
null
#include "ASTWhileNode.h" #include "../ASTExprNode.h" #include "ASTBlockNode.h" namespace AST { ASTWhileNode::ASTWhileNode(const ASTExprNode *expr, const ASTBlockNode *block) : expr(expr), block(block) {} const ASTExprNode *ASTWhileNode::getExpr() const { return expr; } const ASTBlockNode *ASTWhileNode::getBlock() const { return block; } void ASTWhileNode::Accept(VST::Visitor *v) const { v->visit(this); } ASTWhileNode::~ASTWhileNode(void) { delete expr; delete block; } }
22.28
112
0.637343
070339ac6512dd14de48e3a760cf0b3ef95bbcf1
109,674
css
CSS
images/a24_files/2546fe2f8d7a.css
arfarr35/web
18c86a70b44c54e37675aada68c7452a6c5a3a68
[ "CC-BY-3.0" ]
null
null
null
images/a24_files/2546fe2f8d7a.css
arfarr35/web
18c86a70b44c54e37675aada68c7452a6c5a3a68
[ "CC-BY-3.0" ]
null
null
null
images/a24_files/2546fe2f8d7a.css
arfarr35/web
18c86a70b44c54e37675aada68c7452a6c5a3a68
[ "CC-BY-3.0" ]
null
null
null
.v9tJq{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;margin:0 auto 30px;max-width:935px;width:100%}.VfzDr{margin-bottom:0}.Y2E37{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;margin-top:0}._73Lbs{border-bottom:1px solid #dbdbdb;border-bottom:1px solid rgba(var(--b6a,219,219,219),1)}.rkEop,.rVFdb{font-weight:600}.rkEop+.PF4EG{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);display:block}.rkEop+.VIsJD{margin-top:13px}.rVFdb{text-align:left}.VIsJD,.rkEop{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:14px;line-height:24px}.zwlfE{color:#262626;color:rgba(var(--i1d,38,38,38),1);-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;min-width:0}._4dMfM{display:block;margin-left:auto;margin-right:auto}.XjzKX{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}.-vDIg{display:block}.-vDIg:empty{display:none}.Izmjl{border-top:none}.Izmjl .rkEop{max-width:640px}.thEYr{display:block}.thEYr,.BY3EC,._862NM{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-left:20px}.RMWG5,.Q46SR{background:0 0;border:0;margin:0;padding:0}.ffKix{max-width:240px}.rhpdm{display:inline;font-weight:600}.vtbgv,.HVbuG{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.HVbuG{border-bottom:none;margin-bottom:24px;padding-bottom:0}.NP414,.NP414::before{background:#fff;background:rgba(var(--d87,255,255,255),1)}.PyUka,.PyUka::before{background:#fafafa;background:rgba(var(--b3f,250,250,250),1)}.FyNDV{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.IZAUJ{margin-right:16px}.QlxVY{max-width:230px}._54f4m,.R_Fzo{border-top:none}.R_Fzo{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;text-align:left!important;padding:16px!important;-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0}.R_Fzo .QlxVY{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;max-width:none}.AFWDX{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-left:5px}._6auzh{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:12px;font-weight:400;margin-bottom:16px;margin-top:32px}.mnsX5{float:right;color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:12px;font-weight:400;text-transform:none}.AC5d8{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nZSzR{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;min-width:0}.mrEK_{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-left:7px}.yLUwa{font-weight:600;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.JNjtf{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.smsjF{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.PJXu4{margin-left:6px}.ep_0L{font-weight:400;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hf7bq{height:48px;margin-top:40px}@media (min-width:736px){.v9tJq{-webkit-box-sizing:content-box;box-sizing:content-box;padding:60px 20px 0;width:calc(100% - 40px)}.AAaSh{padding:30px 20px 0}.zwlfE{-webkit-flex-basis:30px;-ms-flex-preferred-size:30px;flex-basis:30px;-webkit-box-flex:2;-webkit-flex-grow:2;-ms-flex-positive:2;flex-grow:2}._4dMfM{height:150px;width:150px}.XjzKX{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;margin-right:30px}.-vDIg{font-size:16px;line-height:24px;word-wrap:break-word}.HVbuG{padding:20px 0}.vtbgv{margin-bottom:44px}.nZSzR{margin-bottom:20px}.AC5d8{font-size:32px;line-height:40px;font-weight:200}.NP414{border-radius:4px;border:1px solid #dbdbdb;border:1px solid rgba(var(--b38,219,219,219),1);margin-bottom:28px;margin-top:-16px;position:relative}.SoIn2{margin-top:74px}._8xFri{margin-top:16px}}@media (max-width:735px){.zwlfE{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}._4dMfM{height:77px;width:77px}.XjzKX{margin-right:28px}.-vDIg{font-size:14px;line-height:20px;overflow:hidden;padding:0 16px 21px;text-overflow:ellipsis}.vtbgv{margin-bottom:30px}.vtbgv,.HVbuG{margin-left:16px;margin-right:16px;margin-top:30px}._6auzh{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:16px auto}.FZKAF{font-size:14px;margin-left:10px;margin-right:10px}.rWnDo{margin-top:10px}.nZSzR{margin-bottom:12px}.AC5d8{font-size:22px;line-height:26px}.NP414{border:1px solid #dbdbdb;border:1px solid rgba(var(--b38,219,219,219),1);border-left:none;border-right:none;margin-bottom:24px;position:relative}.s0PPJ{font-size:12px;text-align:center;color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);border-bottom:1px solid #dbdbdb;border-bottom:1px solid rgba(var(--b38,219,219,219),1);margin-top:8px;margin-bottom:34px;padding-bottom:16px}.SoIn2{margin-top:34px}.EQ2MH{margin-left:8px}} .YlEaT{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:14px;font-weight:600;line-height:24px}.EZdmt{margin-bottom:74px}.Saeqz{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}@media (max-width:735px){.EZdmt{margin-bottom:32px}.EZdmt>h2{padding:0 16px}.AuGJy{margin-left:auto}} ._4emnV{height:48px;margin-top:40px}.weEfm:last-child{margin-bottom:0}._bz0w:last-child{margin-right:0}@media (min-width:736px){._bz0w{margin-right:28px}.weEfm{margin-bottom:28px}}@media (max-width:735px){._bz0w{margin-right:3px}.weEfm{margin-bottom:3px}} .v1Nh3{display:block;position:relative;width:100%}.FKSGz{border-color:#efefef;border-style:solid;border-width:1px;overflow:hidden}.u7YqG{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;left:0;pointer-events:none;position:absolute;right:0;top:0} .jylL-{position:relative;width:100%}._1ykbA{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;left:0;position:absolute;right:0;text-align:center;top:0;background:rgba(0,0,0,.3)}.bbOc8{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:auto}._7wHqO{padding:0 32px}.aY6mA{color:#fff;font-weight:600;margin:12px auto;max-width:456px;text-align:center}.KBBil{color:#efefef;max-width:456px;text-align:center;margin-bottom:24px}.oKTWh{border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b6a,219,219,219),1)}.SCbia .oKTWh{padding-bottom:16px} ._6VdMM,.gfGdF{margin:0 auto}.gfGdF{display:none}@media only screen and (min-width:736px){.gfGdF{display:block}._6VdMM{display:none}} ._2WZC0{display:block;width:100%;height:100%} .eLAPa{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);display:block;width:100%}.KL4Bh{display:block;overflow:hidden;padding-bottom:100%}.FFVAD{height:100%;left:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}._9AhH0{bottom:0;left:0;position:absolute;right:0;top:0} ._6S0lP{background-color:rgba(0,0,0,.3);bottom:0;left:0;position:absolute;right:0;top:0}.Ln-UN{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:16px;font-weight:600;height:100%;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:100%}.-V_eO{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:30px}.-V_eO:last-child{margin-right:0}._1P1TY{margin-right:7px}@media (max-width:735px){.Ln-UN{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.-V_eO{margin-bottom:7px;margin-right:0}} .qn-0x{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;bottom:0;left:0;position:absolute;right:0;top:0} .ZhvQ7{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);border-top-color:#efefef;border-top-style:solid;border-top-width:1px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;padding-bottom:10px;padding-left:12px;padding-right:12px;padding-top:10px}._0Moe9,._9sn2N,.udmfn{margin-right:8px}._0Moe9,.udmfn,.V48c7{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}.HSPRR{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}._9sn2N{color:#262626;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1}._9sn2N:visited{color:#262626}.V48c7{white-space:nowrap;font-size:12px;color:#8e8e8e}.V48c7:visited{color:#8e8e8e} .Nnq7C{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.Nnq7C>*{-webkit-box-flex:1;-webkit-flex:1 0 0%;-ms-flex:1 0 0%;flex:1 0 0%} ._4Kbb_{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding:40px;text-align:center}@media (min-width:736px){._4Kbb_{border:1px solid #efefef;border-radius:3px}}@media (max-width:735px){._4Kbb_{border-color:#efefef;border-width:1px 0}} .CkGkG{background-color:rgba(0,0,0,.75);background-color:rgba(var(--jb7,0,0,0),.75)}.fXiEu{-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.s2MYR{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1)}.DdSX2{height:100%;margin:0 auto;max-width:935px;pointer-events:none;width:100%}.nf1Jg{bottom:0;left:0;margin:0 auto;padding:40px;pointer-events:none;position:fixed;right:0;top:0} .ITLxV{left:-40px}._65Bje{right:-40px}.ITLxV,._65Bje{display:block;margin-top:-20px;overflow:hidden;pointer-events:auto;position:absolute;text-indent:-9999em;top:50%;cursor:pointer} ._2dDPU{background-color:rgba(0,0,0,.5);bottom:0;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;left:0;overflow-y:auto;-webkit-overflow-scrolling:touch;position:fixed;right:0;top:0;z-index:1}.PdwC2{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:auto;max-width:935px;pointer-events:auto;width:100%}.EfHg9{bottom:0;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:0}.EfHg9 a,.EfHg9 button,.EfHg9 input{pointer-events:auto}.zZYga{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:100%;overflow:auto;width:auto;z-index:1}.MgpC9{left:-9999px;opacity:0;position:fixed}@media (min-width:481px){.zZYga{padding:0 40px;pointer-events:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.zZYga::after,.zZYga::before{content:'';display:block;-webkit-flex-basis:40px;-ms-flex-preferred-size:40px;flex-basis:40px;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}}@media (max-width:480px){.EfHg9,.ckWGn{display:none}} .M9sTE{padding:0}.UE9AK{border-bottom:1px solid #efefef;border-bottom:1px solid rgba(var(--ce3,239,239,239),1)}.UE9AK.wzpSR{height:76px;padding:0 16px 16px 16px}.MEAGs{height:60px;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;position:absolute}.eo2As{padding:0 16px}.eo2As>:first-child{margin-top:16px}.Slqrh,.eo2As>.Slqrh:first-child{margin-top:4px}.ygqzn{margin-bottom:8px}.EtaWk{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;margin-bottom:4px;min-height:0;overflow:auto}.NnvRN{margin-bottom:4px}._JgwE{margin-top:4px}.eJg28{display:none}.h0YNM ._JgwE{min-height:48px}.L_LMM ._JgwE{padding-right:26px}.h0YNM .UE9AK{padding-right:40px}.h0YNM .MEAGs{right:4px;top:0}.L_LMM .MEAGs{bottom:0;height:52px;right:4px;top:auto}.SgTZ1.Tgarh .Slqrh{margin-top:-34px}.JyscU{width:100%}.JyscU ._97aPb{background-color:#000;background-color:rgba(var(--jb7,0,0,0),1);-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-right:335px;min-height:450px}.JyscU ._97aPb.wKWK0{background-color:#fafafa;background-color:rgba(var(--b3f,250,250,250),1)}.JyscU .UE9AK{border-bottom:1px solid #efefef;border-bottom:1px solid rgba(var(--ce3,239,239,239),1);height:78px;margin-right:0;padding:20px 0;position:absolute;right:24px;top:0;width:287px}.JyscU .UE9AK.wzpSR{height:98px;padding:0 0 20px 0}.JyscU .eo2As{bottom:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:24px;padding-right:24px;position:absolute;right:0;top:78px;width:335px}.JyscU .eo2As.O9c_u{top:98px}.JyscU .Slqrh{border-top:1px solid #efefef;border-top:1px solid rgba(var(--ce3,239,239,239),1);margin:0;-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2;padding-top:2px}.JyscU .ygqzn{margin-bottom:4px;-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}.JyscU .EtaWk{margin:0 -24px;-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1;overflow-x:hidden}.JyscU .NnvRN{-webkit-box-ordinal-group:5;-webkit-order:4;-ms-flex-order:4;order:4}.JyscU .NnvRN:not(:last-child){margin-bottom:0}.JyscU ._JgwE{-webkit-box-ordinal-group:6;-webkit-order:5;-ms-flex-order:5;order:5}.JyscU.L_LMM .MEAGs{right:14px}.L_LMM.ePUX4 .eo2As{padding:0}.L_LMM.ePUX4 .Slqrh{padding-left:16px;padding-right:16px}.L_LMM.ePUX4 .ygqzn{padding-left:16px;padding-right:16px}.L_LMM.ePUX4 .NnvRN{padding-left:16px}.L_LMM.ePUX4 ._JgwE{padding-left:16px;padding-right:16px}.L_LMM.ePUX4 .MEAGs{height:60px;top:0}.L_LMM.ePUX4 .EtaWk{margin:0 0 auto;padding:0 16px}.JyscU.ePUX4 .UE9AK{border-left:1px solid #efefef;border-left:1px solid rgba(var(--ce3,239,239,239),1);height:72px;padding:16px;right:0;width:335px}.JyscU.ePUX4 .eo2As{border-left:1px solid #efefef;border-left:1px solid rgba(var(--ce3,239,239,239),1);top:72px}.JyscU.ePUX4 .EtaWk{padding:0}.JyscU.ePUX4 .Slqrh{padding-top:4px}.JyscU.ePUX4 ._JgwE{margin-top:8px}.JyscU.ePUX4.L_LMM .MEAGs{height:72px;right:4px;top:0}@media (-webkit-min-device-pixel-ratio:2){.SgTZ1 .UE9AK{border-bottom-width:.5px}}.ZwCGT{margin-bottom:12px}.MhyEU{-webkit-box-ordinal-group:7;-webkit-order:6;-ms-flex-order:6;order:6;height:54px;border-top:1px solid #efefef;border-top:1px solid rgba(var(--ce3,239,239,239),1);margin-top:4px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center} .AatJH{height:56px;border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1);margin-top:4px} .ByB5K{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:#fafafa;background-color:rgba(var(--b3f,250,250,250),1);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;overflow:hidden}.enqOc{border-bottom:1px solid #efefef;border-bottom:1px solid rgba(var(--ce3,239,239,239),1)}.enqOc.VtfM9{border-top:1px solid #efefef;border-top:1px solid rgba(var(--ce3,239,239,239),1)}.ByB5K:not(._6Idr8){display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:0;-webkit-transition:height .3s ease-out;transition:height .3s ease-out}.enqOc:not(._6Idr8){height:44px}.ByB5K._6Idr8{display:none;min-height:55px}.enqOc._6Idr8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex} .Ppjfr{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:60px;padding:16px}.oW_lN button{line-height:16px;padding:0;padding-right:4px}.bY2yH{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.O4GlU{max-width:100%;color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);line-height:15px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a.O4GlU,a.O4GlU:visited{color:#262626;color:rgba(var(--i1d,38,38,38),1)}._8XEIW{display:inline}.PQo_0{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;max-width:240px}.RqtMr{max-width:220px}.o-MQd{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;margin-left:12px;overflow:hidden}._9k0Fk{padding-top:20px}.z8cbW{margin-left:16px}.M30cS{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.e1e1d{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;max-width:100%;overflow:hidden}.mewfM{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-left:5px}.fQL_D{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);display:inline-block;max-width:100%}.pKCwU{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:13px;font-weight:400}.RucPH,.RucPH:visited{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-weight:600}._-v0-{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-image:-webkit-gradient(linear,right top,left bottom,from(#bf00ff),color-stop(#ed4956),to(#ff8000));background-image:-webkit-linear-gradient(top right,#bf00ff,#ed4956,#ff8000);background-image:linear-gradient(to bottom left,#bf00ff,#ed4956,#ff8000);border:1px solid #fff;border:1px solid rgba(var(--eca,255,255,255),1);border-radius:50%;color:#fff;color:rgba(var(--eca,255,255,255),1);font-size:13px;height:17px;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-left:17px;margin-top:-15px;position:absolute;width:17px} .y1ezF{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:12px;line-height:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.y1ezF .DXJP0,.y1ezF .DXJP0:visited{color:#262626}.y1ezF .mY4H_,.y1ezF .mY4H_:visited{color:#fff} .aoVrC{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;display:block;-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.D1yaK{cursor:pointer} .fZC9e{background-color:#fafafa;background-color:rgba(var(--b3f,250,250,250),1);border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;overflow:hidden;position:relative}.fZC9e::after{border:1px solid rgba(0,0,0,.0975);border:1px solid rgba(var(--jb7,0,0,0),.0975);border-radius:50%;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.wjI34{cursor:pointer}._7A2D8{height:100%;width:100%} .IkkIV{background:url(/static/images/rainbowGradient.png/558818d23695.png);background-clip:text;background-size:5ch;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.xil3i{word-wrap:break-word} .RPhNB{display:inline;color:#262626;color:rgba(var(--i1d,38,38,38),1);margin-left:4px;margin-right:4px} .PoNcp{font-size:12px}.sF8Vp{width:100%} ._1OSdk{display:block;position:relative}._5f5mN{-webkit-appearance:none;border-radius:3px;border-style:solid;border-width:1px;font-size:14px;font-weight:600;line-height:26px;outline:0;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.aj-Wf{background-color:transparent;border:0;color:#fff;overflow:hidden}.Z_Rg0{background:0 0;border-color:#0095f6;border-color:rgba(var(--d69,0,149,246),1);color:#0095f6;color:rgba(var(--d69,0,149,246),1)}.m4t9r.Z_Rg0{background:0 0;border-color:#0074cc;color:#0074cc}.qPANj,.n_COB{background:0 0;border:0;cursor:pointer}.qPANj{color:#262626;color:rgba(var(--i1d,38,38,38),1)}.n_COB{color:#0095f6;color:rgba(var(--d69,0,149,246),1)}.tA8g2{background:0 0;border:0;color:#00376b;color:rgba(var(--fe0,0,55,107),1);font-weight:400}.m4t9r.tA8g2{color:#002952}.-fzfL{background:0 0;border-color:#dbdbdb;border-color:rgba(var(--b6a,219,219,219),1);color:#262626;color:rgba(var(--i1d,38,38,38),1)}.m4t9r.-fzfL{opacity:.7}.jIbKX{background:#0095f6;background:rgba(var(--d69,0,149,246),1);border-color:#0095f6;border-color:rgba(var(--d69,0,149,246),1);color:#fff;color:rgba(var(--eca,255,255,255),1)}.m4t9r.jIbKX{background:#0095f6;background:rgba(var(--d69,0,149,246),1);border-color:#0095f6;border-color:rgba(var(--d69,0,149,246),1);color:#fff;color:rgba(var(--eca,255,255,255),1);opacity:.7}._5f5mN:active{opacity:.7}.pm766{opacity:.3}.yZn4P{cursor:pointer}._3yx3p{opacity:.2}.KUBKM,._6VtSN{padding:0 12px}._753hD{padding:5px 8px}._63i69{height:38px}.JbVW2{height:44px;padding-left:21px;padding-right:21px}.O_8sk{line-height:initial;padding-bottom:4px;padding-top:4px;white-space:normal}@media (min-width:736px){._6VtSN{padding:0 24px}} @-webkit-keyframes spinner-spin8{0%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(540deg);transform:rotate(540deg)}}@keyframes spinner-spin8{0%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(540deg);transform:rotate(540deg)}}@-webkit-keyframes spinner-spin12{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-spin12{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.W1Bne{left:50%;position:absolute;top:50%;background-size:100%}.cXSJc{position:static}.zKxRE{height:18px;margin-left:-9px;margin-top:-9px;width:18px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyRTNGMkVENTlEMjE2ODExODIyQUNEMjMwNzUzNTEzMyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowMzIxMkU3QTcxMUUxMUUyQjdFMUNDNDg3OTE3RUY5RCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowMzIxMkU3OTcxMUUxMUUyQjdFMUNDNDg3OTE3RUY5RCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6ODJGQzEwNTI1MDIyNjgxMTgyMkFDRDIzMDc1MzUxMzMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MkUzRjJFRDU5RDIxNjgxMTgyMkFDRDIzMDc1MzUxMzMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6COBsvAAACo0lEQVR42uyZu08UURjFZ1Y2GjQ+MIaEmODb1qVGQkMhhZ001rKN8Q+AWFjY2NqwGgsrKwq1oqAxgYagogWNxS6ymvAw+AAW3TCem5xNbibcuzM7995x4nzJL8zOzM6cc1/fd1k/CAIvy1HwMh65gdxAbiDj0WXjoeVyWXmtUqlkpgdGwCdQBTezOISmwEXQLxre1kv8qJlYNywUEX6wH+fLUYfaf7kKnQdPwAswbEDDYXAGnAZFFwYmwAC4DB6BGwnEHwE9FC6MnHRh4Fjo+w86NCHEnwrNjYILA49BM6GJg8SL+OHCwDyYVJgYlc6tSsffIojfAruu8sCswsR9cJaf74INih/nuUMa8TuuS4lZ/n0oPafIVUq0/ksSfp8x8SbyQKsn9vh5BSxq7v8t9VqQVHzbTBwj+/aBC+BtS1A4k0rP8rlkNkNDsKPMbKoa/UKilhgNl+V0STQgOK64LobBU/BOV7/I19gbJ8A5jYY/oAa+J50DdzTiPWbP8Q4ar79NAxZ5j5NirunZicCEgSmu56rY4BCKG1WuSroVq2ZiDnwA9+LuGTSrkFw2fLQ6iQ+YeLp50MsWa0R4pyidf4HtpBsaE8voVXCLz9rikGto3jcEjoJ98B7U0/yvhBA/xhqn1ROilFhW9FgPxbfmX4nH9TQMhMV7bNV1HouibpBC5zi8fvKegpSVE5koGBQvlrzX0oo1yPwhNkDXeW6X5cZ+aLNfkqpY6wYuKcS/EtlYOicnv27p+KvCxDXWVNYNDEcQ3y5UJq64MLCXULzORNOFgRnwmZN1ukPxsokFFmybYMnFKrQGnhmsd9ZIKjuy1MO38Sslk9htKWmJefM8TonwL/TAHEsKIf6NrZd0WTRQJVYjnwNpR/4rZW4gN5Dx+CvAABjBsk/oCqxuAAAAAElFTkSuQmCC);-webkit-animation:spinner-spin8 .8s steps(8) infinite;animation:spinner-spin8 .8s steps(8) infinite}._4umcQ,.ztp9m{height:32px;margin-left:-16px;margin-top:-16px;width:32px;background-image:url(data:image/png;base64,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);-webkit-animation:spinner-spin12 1.2s steps(12) infinite;animation:spinner-spin12 1.2s steps(12) infinite}._4umcQ{height:64px;margin-left:-32px;margin-top:-32px;width:64px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NDkxMSwgMjAxMy8xMC8yOS0xMTo0NzoxNiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyRTNGMkVENTlEMjE2ODExODIyQUNEMjMwNzUzNTEzMyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxNzJBRTMxOEZBNjAxMUUzOEZGRkI4MkY3ODQyQTI0MiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxNzJBRTMxN0ZBNjAxMUUzOEZGRkI4MkY3ODQyQTI0MiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTBmNDU0NTctMWI2YS00NThmLWI0MWYtMGE5ZWVhYWZkODA3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAzMjEyRTdBNzExRTExRTJCN0UxQ0M0ODc5MTdFRjlEIi8+IDwvcmRmOkRl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)} .bqE32{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.vBF20{-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;margin-right:8px}.mLCHD{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;position:relative;width:34px}._5fEvj{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.OfoBO::after{content:'.';display:inline-block;visibility:hidden;width:0} .ltpMr{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.fr66n{display:inline-block;margin-left:-8px}.CxFbA,._15y0l,._5e4p,.wmtNn{display:inline-block}.wmtNn{margin-left:auto;margin-right:-10px}.CxFbA{position:absolute;right:30px} @-webkit-keyframes like-button-animation{0%,to{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.2);transform:scale(1.2)}50%{-webkit-transform:scale(.95);transform:scale(.95)}}@keyframes like-button-animation{0%,to{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.2);transform:scale(1.2)}50%{-webkit-transform:scale(.95);transform:scale(.95)}}.FY9nT{-webkit-animation-duration:.45s;animation-duration:.45s;-webkit-animation-name:like-button-animation;animation-name:like-button-animation;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-transform:scale(1);transform:scale(1)}._2ic5v{background-color:transparent;border:0;cursor:pointer;line-height:inherit;outline:0;overflow:hidden;padding:0} .EDfFK{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.HbPOm{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1} ._9Ytll{color:#262626;color:rgba(var(--i1d,38,38,38),1);display:block;font-weight:600}.vcOH2{cursor:pointer}.QhbhU{bottom:0;left:0;opacity:.5;position:fixed;right:0;top:0;z-index:10}.t3fjj{border-color:#fff transparent transparent transparent;border-color:rgba(var(--d87,255,255,255),1) transparent transparent transparent;border-style:solid;border-width:10px 10px 0 10px;bottom:21px;content:' ';height:0;left:3px;position:absolute;width:0;z-index:12}._690y5{background:#fff;background:rgba(var(--d87,255,255,255),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--b6a,219,219,219),1);bottom:23px;-webkit-box-shadow:0 0 5px 1px rgba(0,0,0,.0975);box-shadow:0 0 5px 1px rgba(0,0,0,.0975);-webkit-box-shadow:0 0 5px 1px rgba(var(--jb7,0,0,0),.0975);box-shadow:0 0 5px 1px rgba(var(--jb7,0,0,0),.0975);content:' ';height:14px;left:6px;position:absolute;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:14px;z-index:1}.vJRqr{background:#fff;background:rgba(var(--d87,255,255,255),1);border:solid 1px #dbdbdb;border:solid 1px rgba(var(--b6a,219,219,219),1);border-radius:3px;bottom:28px;-webkit-box-shadow:0 0 5px rgba(0,0,0,.0975);box-shadow:0 0 5px rgba(0,0,0,.0975);-webkit-box-shadow:0 0 5px rgba(var(--jb7,0,0,0),.0975);box-shadow:0 0 5px rgba(var(--jb7,0,0,0),.0975);color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);display:block;font-weight:600;margin-left:-10px;min-width:50px;padding:14px 16px;position:absolute;z-index:11} a.r8ZrO{background:0 0;border:0;color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);line-height:inherit;margin:0;padding:0} ._8Pl3R{overflow-wrap:break-word}._2UvmX{white-space:nowrap}.sXUSN{background:0 0;border:0;color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);line-height:inherit;margin:0;padding:0} .k_Q0X{display:block}.c-Yi7,.c-Yi7:visited{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);margin-bottom:5px;text-transform:uppercase}.c-Yi7 ._1o9PC{font-size:10px;letter-spacing:.2px} @media (min-width:736px){.Nzb55{font-size:15px;line-height:18px}}@media (max-width:735px){.Nzb55{font-size:14px;line-height:17px}} .pR7Pc{display:block}.JSZAJ,.ijCUd{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.JSZAJ{bottom:15px;left:6px;position:absolute;right:6px}.ijCUd{margin-bottom:15px;margin-top:15px}.rQDP3{left:0;position:relative;top:0}.tR2pe{display:block}.rQDP3 .tN4sQ{left:0;position:absolute;right:0;top:0} .Yi5aA{border-radius:50%;height:6px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;width:6px}.IjCL9{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.IjCL9 .Yi5aA{margin-right:4px}.IjCL9 .Yi5aA:last-child{margin-right:inherit}.VLBL0{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.VLBL0 .Yi5aA{margin-bottom:4px}.VLBL0 .Yi5aA:last-child{margin-bottom:inherit}._19dxx .Yi5aA{background:#a8a8a8;background:rgba(var(--ba8,168,168,168),1)}._19dxx .XCodT{background:#0095f6;background:rgba(var(--d69,0,149,246),1)}.WXPwG .Yi5aA{background:#fff;background:rgba(var(--eca,255,255,255),1);opacity:.4}.WXPwG .XCodT{opacity:1} .videoSpritePlayButton,.videoSpriteReplayButton,.videoSpriteSoundOff,.videoSpriteSoundOn{background-image:url(/static/bundles/es6/sprite_video_2fdc79aa66b0.png/2fdc79aa66b0.png)}.videoSpritePlayButton,.videoSpriteReplayButton{background-repeat:no-repeat;background-position:0 0;height:135px;width:135px}.videoSpriteReplayButton{background-position:-137px 0}.videoSpriteSoundOff,.videoSpriteSoundOn{background-repeat:no-repeat;background-position:0 -137px;height:13px;width:16px}.videoSpriteSoundOn{background-position:-18px -137px}@media (min-device-pixel-ratio:1.5),(-webkit-min-device-pixel-ratio:1.5),(min-resolution:144dpi){.videoSpritePlayButton,.videoSpriteReplayButton,.videoSpriteSoundOff,.videoSpriteSoundOn{background-image:url(/static/bundles/es6/sprite_video_2x_4ca1223795d3.png/4ca1223795d3.png)}.videoSpritePlayButton,.videoSpriteReplayButton{background-size:271px 149px;background-position:0 0}.videoSpriteReplayButton{background-position:-136px 0}.videoSpriteSoundOff,.videoSpriteSoundOn{background-size:271px 149px;background-position:0 -136px}.videoSpriteSoundOn{background-position:-17px -136px}} ._5YVre{-webkit-font-smoothing:antialiased;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:rgba(0,0,0,.5);color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-shadow:0 1px 2px rgba(0,0,0,.5);position:absolute;top:0;left:0;bottom:0;right:0}.VJ5sm{margin-top:-10px;margin-bottom:20px}.y8SXg{display:inline-block;overflow:hidden;text-indent:-99999em}.Ok_Ko{width:100%;height:100%}.EmbedVideo{height:100%;position:absolute}.EmbedVideo,.p-ZhK,.whVGE{-webkit-tap-highlight-color:transparent;width:100%}.whVGE{display:block;overflow:hidden;padding-bottom:100%}.whVGE.aZBwH{padding-bottom:125%}.p-ZhK{background-color:#000;bottom:0;height:100%;left:0;min-height:100%;min-width:100%;position:absolute;right:0;top:0}.p-ZhK.e0cGZ{height:50vh}.p-ZhK::-webkit-media-controls-start-playback-button{display:none} .L7qX_{background-color:rgba(0,0,0,.5);display:block}.QKAIB{margin:auto}.I3RxC,.L7qX_{bottom:0;left:0;position:absolute;right:0;top:0}.I3RxC ._56AcL{color:#fff;display:block;font-size:14px;font-weight:600;line-height:18px;margin-bottom:20px;margin-top:50px;text-decoration:none;z-index:3}.I3RxC .gOD81{background-size:145px 80px;display:block;height:55px;left:45px;margin:auto;opacity:90%;overflow:hidden;position:absolute;top:-15px;width:55px;z-index:3} .fXIG0{display:block;cursor:pointer}.qBUYS{opacity:0;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;-webkit-transition-delay:.1s;transition-delay:.1s}._7CSz9{display:block;position:absolute;height:135px;left:50%;margin-left:-67px;margin-top:-67px;top:50%;width:135px}.FGFB7{opacity:1}.PyenC,.fXIG0{bottom:0;left:0;position:absolute;right:0;top:0} .fgutm{background:#000;border-radius:50px;bottom:12px;display:block;height:26px;left:16px;opacity:.7;position:absolute}.g3Dj2{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:14px;margin:7px}.D-0wp{height:12px;margin:1px 4px 1px 0;width:12px}.UPJCt{color:#fff;font-size:11px;line-height:14px} ._8-CE3{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}._4vy1Q{height:12px;margin:4px 5px 2px 0;width:12px}.-e4z4{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:14px;line-height:18px} ._75wIW{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-name:usertag-animation;animation-name:usertag-animation;background:rgba(0,0,0,.7);border:0;border-radius:20px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;height:28px;margin:12px;max-width:28px;min-width:28px;padding:0;padding-right:2%;position:relative;width:auto}@-webkit-keyframes usertag-animation{15%{max-width:calc(100% - 24px)}85%{max-width:calc(100% - 24px)}}@keyframes usertag-animation{15%{max-width:calc(100% - 24px)}85%{max-width:calc(100% - 24px)}}._83qyR{bottom:0;left:0;position:absolute}.AnuPM{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-name:username-animation;animation-name:username-animation;color:#fff;color:rgba(var(--eca,255,255,255),1);display:block;font-size:14px;font-weight:600;max-width:100%;opacity:0;overflow:hidden;padding-left:28px;white-space:nowrap}@-webkit-keyframes username-animation{15%{opacity:1}85%{opacity:1}}@keyframes username-animation{15%{opacity:1}85%{opacity:1}} .G_hoz{background:rgba(0,0,0,.8);border-radius:50%;border:0;height:28px;margin:12px;opacity:0;padding:0;position:relative;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:opacity;transition-property:opacity;width:28px}._6JfJs{opacity:1}.HBUJV,.LcKDX{bottom:0;left:0;position:absolute}.HBUJV{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;right:0;top:0;-webkit-transform:scale(.5);transform:scale(.5)} .B1JlO{display:inline-block;width:100%;-webkit-tap-highlight-color:transparent}.OAXCp{display:block;overflow:hidden;padding-bottom:100%}.video-js{position:static}.P6lRB,.wymO0{position:absolute}.P6lRB{display:block;border-radius:100px;background:rgba(0,0,0,.85);padding:5px 10px;color:#fff;left:10px;bottom:10px}.B1JlO .text-track-display,.B1JlO .vjs-big-play-button,.B1JlO .vjs-control,.B1JlO .vjs-control-bar,.B1JlO .vjs-loading-spinner{display:none!important}.wymO0{top:0;left:0;right:0;bottom:0}.Q8nQz img,.Q8nQz video{height:50vh}.Q8nQz img{margin:0 auto;width:auto;position:initial}.OAXCp.VLtd4{padding-bottom:50vh} ._5wCQW{left:0;min-width:100%;position:absolute;top:0;height:100%;background-color:#000}.tWeCl{width:100%;height:100%}.tWeCl::-webkit-media-controls-start-playback-button{display:none}._8jZFn{top:0;left:0;height:100%;margin:0 auto;position:absolute;width:100%} .ZyFrc{-ms-touch-action:manipulation;touch-action:manipulation} .kHt39{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-tap-highlight-color:transparent;cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.xUdfV{opacity:0;pointer-events:none;position:absolute;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(0);transform:scale(0);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.16,1.275,.725,1.255);transition-timing-function:cubic-bezier(.16,1.275,.725,1.255)}.xUdfV:hover{z-index:100}.fTh_a .xUdfV{opacity:1;pointer-events:auto;-webkit-transform:scale(1);transform:scale(1)} .JYWcJ{background-color:rgba(0,0,0,.85);border:0;border-radius:4px;cursor:pointer;display:block;font-size:14px;line-height:18px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.JYWcJ:focus{outline:0}.JYWcJ,.JYWcJ:link,.JYWcJ:visited{color:#fff;font-weight:600}.JYWcJ:hover{text-decoration:none}.wCuNw{line-height:36px;position:relative;display:inline-block}.wRVDh{background:rgba(0,0,0,.7)} .eg3Fv{margin:0 12px}.Mu0TI{border-style:solid;height:0;left:50%;margin-left:-6px;position:absolute;width:0}.Vj5NV{border-color:transparent transparent rgba(0,0,0,.85);border-width:0 6px 6px;top:-5px}._6XC01{border-color:rgba(0,0,0,.85) transparent transparent;border-width:6px 6px 0;top:100%} @-webkit-keyframes like-heart-animation{0%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}15%{opacity:.9;-webkit-transform:scale(1.2);transform:scale(1.2)}30%{-webkit-transform:scale(.95);transform:scale(.95)}45%,80%{opacity:.9;-webkit-transform:scale(1);transform:scale(1)}}@keyframes like-heart-animation{0%,to{opacity:0;-webkit-transform:scale(0);transform:scale(0)}15%{opacity:.9;-webkit-transform:scale(1.2);transform:scale(1.2)}30%{-webkit-transform:scale(.95);transform:scale(.95)}45%,80%{opacity:.9;-webkit-transform:scale(1);transform:scale(1)}}.Y9j-N,._6jUvg{pointer-events:none}._6jUvg{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;bottom:0;left:0;position:absolute;right:0;top:0}.Y9j-N{-webkit-animation-duration:1000ms;animation-duration:1000ms;-webkit-animation-name:like-heart-animation;animation-name:like-heart-animation;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;margin:0 auto;opacity:0;-webkit-transform:scale(0);transform:scale(0)} .jdnLC{background-color:#fafafa;background-color:rgba(var(--b3f,250,250,250),1);padding:0;position:relative;width:100%}.bCRRR{width:calc(100% - 335px)}.HaS-3{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);background-image:url(data:image/gif;base64,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);background-size:cover;display:block;margin-right:335px;min-height:450px;overflow:hidden;padding-bottom:100%;width:100%}.Ckfj0{-webkit-filter:invert(90%) brightness(70%);filter:invert(90%) brightness(70%)}.c0Dmy{height:100%;padding:0;position:absolute;right:0}.JrZbN{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #efefef;border-bottom:1px solid rgba(var(--ce3,239,239,239),1);-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:72px;padding:16px;width:335px}.VcOAj{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);border-radius:50%;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;height:32px;margin-right:12px;width:32px}.eURnM{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.qfAOE{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;height:10px;margin-bottom:4px;width:140px}.kAlZ6{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;height:10px;width:100px}.XvoX1{border-top:1px solid #efefef;border-top:1px solid rgba(var(--ce3,239,239,239),1);bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:150px;padding:20px;position:absolute;right:0;width:100%}.HE3mO{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;height:15px;margin-bottom:12px;width:140px}.EIuhb{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;height:15px;margin-bottom:12px;width:220px}.RdURl{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;height:15px;width:80px} .jIHp4,.k8B3A{overflow:hidden}.k8B3A{max-height:100%;max-width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-radius:12px}.jIHp4{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.EJXnl{overflow-x:hidden;overflow-y:auto;max-height:100%;width:100%} .b5k4S{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:block;font-size:inherit;font-family:inherit;margin:0;padding:0;text-align:left;text-decoration:none;width:100%}.b5k4S:active{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1)}a.b5k4S:active{opacity:1}.b5k4S,a.b5k4S,a:visited.b5k4S{color:#262626;color:rgba(var(--i1d,38,38,38),1)}.b5k4S.yE2LI,a.b5k4S.yE2LI,a:visited.b5k4S.yE2LI{color:#ed4956;color:rgba(var(--i30,237,73,86),1)}.b5k4S:not(:first-child):before{content:'';background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);display:block;height:1px;width:100%} .J09pf:not(:first-child):before,.J09pf:not(:last-child):after{content:'';display:block;width:100%;height:1px;background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1)}@media (max-width:735px){.uW6Bg .J09pf:after{content:'';display:block;width:100%;height:1px;background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1)}} .wlWsm{margin-left:-15px;margin-right:-15px} ._4UXK0{background:0 0;border:1px solid #dbdbdb;border:1px solid rgba(var(--ca6,219,219,219),1);font-size:14px;line-height:17px;margin:0 0 7px;min-height:34px;resize:none;white-space:nowrap}.WYMWX{margin-bottom:7px}.Zz0_b{margin-left:0;margin-right:5px}.PdKkp{margin-bottom:7px}.eGurL{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:12px;line-height:16px}.Pbj8B{display:inline-block;margin:0 5px;position:static;vertical-align:middle} ._NyRp{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:32px;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:32px} .xZaXF{background:0 0;border:1px solid #dbdbdb;border:1px solid rgba(var(--ca6,219,219,219),1);font-size:14px;line-height:17px;margin:0 0 7px;min-height:34px;resize:none;white-space:nowrap} .vCf6V{background-color:rgba(0,0,0,.75);background-color:rgba(var(--jb7,0,0,0),.75)}._6oveC{-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.Z_y-9{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1)}.D1AKJ{height:100%;margin:0 auto;max-width:935px;pointer-events:none;width:100%}.sGOqm{bottom:0;left:0;margin:0 auto;padding:40px;pointer-events:none;position:fixed;right:0;top:0} .yQ0j1{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:14px;font-weight:600;line-height:18px;margin-bottom:16px;text-align:left}@media (max-width:735px){.yQ0j1{font-size:14px;padding:0 8px}} .tc8A9{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);display:block;font-size:12px;line-height:14px;margin-top:14px}._32eiM,._32eiM:visited{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-weight:500} .jju9v{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);border-radius:4px}.mDC51{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}._61V1C{width:100%;height:100%}.JLbVX{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding:0 20px;text-align:center}.SVLuk{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-top:25px}.Kr222{font-weight:600}.c-Vw8{margin-top:10px}@media (min-width:736px){._2mesu{border:1px solid #dbdbdb;border-radius:3px}}@media (max-width:735px){._2mesu{border-color:#dbdbdb;border-width:1px 0}}@media (min-width:822px){.jju9v{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.mDC51{-webkit-flex-basis:400px;-ms-flex-preferred-size:400px;flex-basis:400px;height:380px}._61V1C{border-radius:4px 0 0 4px}.m41U8{height:380px;width:380px}.c-Vw8{font-size:16px}.Kr222{font-size:18px}}@media (max-width:821px){.jju9v{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.m41U8{display:block;height:auto;max-width:100%;-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1;width:100%}.mDC51{display:block;-webkit-flex-basis:188px;-ms-flex-preferred-size:188px;flex-basis:188px;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;height:auto;-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0;padding:40px 0}.Kr222{font-size:16px}.c-Vw8{font-size:14px}} .M1pAf{padding:0} .l9Ww0{padding:12px 0}.GZkEI{padding:20px 0}.l9Ww0 .EM8Od{margin:0 20px 12px 20px}.GZkEI .EM8Od{margin:0 24px 12px 24px}.EM8Od{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-size:14px;font-weight:600;line-height:18px}.Rebts{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;margin-right:12px;display:block}._6-32A{display:block;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}._962h9{display:inline-block;margin-left:12px}._7AQG4,.TJ4hK{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:16px;font-weight:600;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding:20px;text-align:center}.TJ4hK p{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.l9Ww0 ._7AQG4,.l9Ww0 .fNpwd{height:214px}.GZkEI ._7AQG4,.GZkEI .fNpwd{height:223px} ._0p1Te{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;font-size:12px;line-height:14px;margin-bottom:-10px;margin-top:-10px;min-height:28px;padding-bottom:10px;padding-top:10px;text-align:center}.Pd1aL{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;height:0;margin-left:4px}.Qj3-a,.Qj3-a:visited{color:#262626;color:rgba(var(--i1d,38,38,38),1)}.MaaXi .Qj3-a,.MaaXi ._7cyhW{font-size:14px}.Qj3-a,._7cyhW{margin-bottom:-10px;margin-top:-10px;overflow:hidden;padding-bottom:10px;padding-top:10px;text-overflow:ellipsis;white-space:nowrap}._7cyhW{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);text-align:center;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}._7cyhW::after,._0p1Te::after{content:'.';display:inline-block;visibility:hidden;width:0} ._41KYi{background:#fff;background:rgba(var(--d87,255,255,255),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--b6a,219,219,219),1)}.FQuRW{border-radius:1px}.LQtnO{border-radius:3px}.fUzmR{background:0 0;border:0;cursor:pointer;outline:0;padding:12px;position:absolute;right:0;top:0;z-index:1} .ABCxa{padding:16px 44px;text-align:center}.ig3mj{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.olLwo{font-weight:600;margin-top:13px}.f5C5x{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);margin:11px 0 15px}@media (min-width:736px){.JErX0{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;max-width:260px}} .R-Yxq{border-radius:22px;-webkit-box-shadow:0 2px 24px rgba(0,0,0,.1);box-shadow:0 2px 24px rgba(0,0,0,.1)} .TqMen,._1n6a3{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.TqMen{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-align:center}._1n6a3{background-color:transparent;border:0;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;max-width:150px}._1n6a3:active{opacity:.5}.mEFkC{height:30px;margin-bottom:16px}.JMO_o{color:#262626;font-size:14px;margin:0 20px} .HUW1v{display:block;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;float:right;font-size:14px;font-weight:600} .rWtOq{width:100%} .jmJva{margin-top:40px;height:48px}.qzihg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}._08DtY{margin-left:6px} .ySN3v{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.e-Ph9{background:#fff;background:rgba(var(--d87,255,255,255),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--b6a,219,219,219),1)} .w5S7h{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:absolute}@media (min-width:736px){.w5S7h{bottom:40px}}@media (max-width:735px){.w5S7h{bottom:24px}} .dYvyi:last-child{margin-bottom:0}.vr-QK:last-child{margin-right:0}@media (min-width:736px){.vr-QK{margin-right:28px}.dYvyi{margin-bottom:28px}}@media (max-width:735px){.vr-QK{margin-right:3px}.dYvyi{margin-bottom:3px}}.j-ENm{height:48px;margin-top:40px} .AVOKK{cursor:pointer;position:relative;overflow:hidden}.AVOKK:last-child{margin-right:0}._4_asE{background-position:center center;background-repeat:no-repeat;background-size:cover}.BCeLC{color:#fff;color:rgba(var(--eca,255,255,255),1);text-shadow:0 1px 2px rgba(0,0,0,.18);text-shadow:0 1px 2px rgba(var(--jb7,0,0,0),.18);height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.Tspnd{position:absolute;bottom:0;padding:12px}._3t4Xu{font-size:18px;font-weight:500;line-height:24px;margin-bottom:2px;padding-top:12px;word-break:break-word}.BCeLC-root{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;bottom:0;left:0;position:absolute;right:0;top:0;background-color:rgba(0,0,0,.3);background-color:rgba(var(--jb7,0,0,0),.3)} .SRori{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.Hu9aV{line-height:28px}.PTT9J{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;margin-bottom:16px}.PTT9J>*{margin-right:20px}.PTT9J>:last-child{margin-right:inherit} @-webkit-keyframes IGTVPostGridItem_animatePreparing{0%{opacity:.3}50%{opacity:.5}to{opacity:.3}}@keyframes IGTVPostGridItem_animatePreparing{0%{opacity:.3}50%{opacity:.5}to{opacity:.3}}.A-NpN{cursor:pointer;overflow:hidden;position:relative}.A-NpN:last-child{margin-right:0}.RNL1l{background-position:center center;background-repeat:no-repeat;background-size:cover}._5cOAs{color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;text-shadow:0 1px 2px rgba(0,0,0,.18)}.Ryaz5{-webkit-animation:IGTVPostGridItem_animatePreparing 2s infinite;animation:IGTVPostGridItem_animatePreparing 2s infinite;background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);height:100%;width:100%}._6LbYq{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-size:14px;font-weight:600;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;line-height:18px;padding:11px;position:relative}.qy7yS{background-color:#ed4956;background-color:rgba(var(--i30,237,73,86),1);color:#fff}.LniGk{background-color:#fff;color:#262626}.Rsx-c,.pu1E0{padding:12px}.Rsx-c{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}._2XLe_{font-size:18px;font-weight:500;line-height:24px;margin-bottom:2px;word-break:break-word}.zncDM{font-size:14px;font-weight:400;line-height:18px;opacity:.8;text-transform:uppercase} .F85vw{padding-right:8px}.F85vw:last-child{padding-right:inherit}.oOQ0-{background-color:#0095f6;background-color:rgba(var(--d69,0,149,246),1);border-radius:9px;color:#fff;display:inline-block;font-size:12px;line-height:18px;margin-left:6px;padding:0 5px;vertical-align:text-top} .felixSpriteFacebookCircle,.felixSpriteFacebookCircle-3x,.felixSpriteFbSelectedItem,.felixSpriteFbSelectedItem-3x,.felixSpriteOnboardingBuiltForVertical,.felixSpriteOnboardingBuiltForVertical-3x,.felixSpriteOnboardingCreateYourChannel,.felixSpriteOnboardingCreateYourChannel-3x,.felixSpriteOnboardingShareLongerVideos,.felixSpriteOnboardingShareLongerVideos-3x,.felixSpriteProfileChannelNullState,.felixSpriteProfileChannelNullState-3x,.felixSpriteUploadError,.felixSpriteUploadError-3x,.felixSpriteWebUploadNullAdd,.felixSpriteWebUploadNullAdd-3x{background-image:url(/static/bundles/es6/sprite_felix_4800bc114a3a.png/4800bc114a3a.png)}.felixSpriteFacebookCircle,.felixSpriteFacebookCircle-3x{background-repeat:no-repeat;background-position:-270px -324px;height:66px;width:66px}.felixSpriteFacebookCircle{background-position:-428px -370px;height:22px;width:22px}.felixSpriteFbSelectedItem,.felixSpriteFbSelectedItem-3x{background-repeat:no-repeat;background-position:-206px -254px;height:68px;width:68px}.felixSpriteFbSelectedItem{background-position:-402px -370px;height:24px;width:24px}.felixSpriteOnboardingBuiltForVertical-3x{background-repeat:no-repeat;background-position:-206px 0;height:252px;width:144px}.felixSpriteOnboardingBuiltForVertical{background-repeat:no-repeat;background-position:0 -424px;height:84px;width:48px}.felixSpriteOnboardingCreateYourChannel-3x{background-repeat:no-repeat;background-position:0 -206px;height:216px;width:186px}.felixSpriteOnboardingCreateYourChannel{background-repeat:no-repeat;background-position:-206px -324px;height:72px;width:62px}.felixSpriteOnboardingShareLongerVideos-3x{background-repeat:no-repeat;background-position:0 0;height:204px;width:204px}.felixSpriteOnboardingShareLongerVideos{background-repeat:no-repeat;background-position:-276px -254px;height:68px;width:68px}.felixSpriteProfileChannelNullState-3x{background-repeat:no-repeat;background-position:-352px 0;height:186px;width:186px}.felixSpriteProfileChannelNullState{background-repeat:no-repeat;background-position:-50px -424px;height:62px;width:62px}.felixSpriteUploadError,.felixSpriteUploadError-3x{background-repeat:no-repeat;background-position:-352px -370px;height:48px;width:48px}.felixSpriteUploadError{background-position:-452px -370px;height:16px;width:16px}.felixSpriteWebUploadNullAdd-3x{background-repeat:no-repeat;background-position:-352px -188px;height:180px;width:183px}.felixSpriteWebUploadNullAdd{background-repeat:no-repeat;background-position:-114px -424px;height:60px;width:61px}@media (min-device-pixel-ratio:1.5),(-webkit-min-device-pixel-ratio:1.5),(min-resolution:144dpi){.felixSpriteFacebookCircle,.felixSpriteFbSelectedItem,.felixSpriteOnboardingBuiltForVertical,.felixSpriteOnboardingCreateYourChannel,.felixSpriteOnboardingShareLongerVideos,.felixSpriteProfileChannelNullState,.felixSpriteUploadError,.felixSpriteWebUploadNullAdd{background-image:url(/static/bundles/es6/sprite_felix_2x_90d41aa74a11.png/90d41aa74a11.png)}.felixSpriteFacebookCircle,.felixSpriteFbSelectedItem{background-size:180px 141px;background-position:-93px -85px}.felixSpriteFbSelectedItem{background-position:-69px -85px}.felixSpriteOnboardingBuiltForVertical{background-size:180px 141px;background-position:-69px 0}.felixSpriteOnboardingCreateYourChannel{background-size:180px 141px;background-position:0 -69px}.felixSpriteOnboardingShareLongerVideos{background-size:180px 141px;background-position:0 0}.felixSpriteProfileChannelNullState,.felixSpriteUploadError{background-size:180px 141px;background-position:-118px 0}.felixSpriteUploadError{background-position:-118px -124px}.felixSpriteWebUploadNullAdd{background-size:180px 141px;background-position:-118px -63px}} ._10zPR{font-weight:400;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:60px auto 44px;padding-left:44px;padding-right:44px;text-align:center;max-width:438px}.d0vq9{color:#262626;margin:30px 0 24px}._2c69S{color:#262626;margin-bottom:28px}.uzwXe{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.uzwXe>*{margin-bottom:8px}.uzwXe>:last-child{margin-bottom:inherit} .vlh0C{margin-top:40px;height:48px} .Id0Rh{margin-top:40px;height:48px} button.fAR91{line-height:26px;padding:0 12px} .yHOl4{background:#ed4956;background:rgba(var(--c37,237,73,86),1);border-radius:2px;content:'';height:4px;margin:0 auto;position:absolute;right:0;top:0;width:4px} .bR_3v{background:#fafafa;background:rgba(var(--b3f,250,250,250),1);border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b6a,219,219,219),1);border-bottom:1px solid #dbdbdb;border-bottom:1px solid rgba(var(--b6a,219,219,219),1);padding:16px 44px 20px 44px;text-align:center}.w03Xk{margin:0 auto;max-width:614px;position:relative;width:100%}.gAoda{margin:0 auto 16px auto}.gAo1g{font-weight:600}.nwq6V{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);margin-top:6px}.Ls00D{position:absolute;right:-28px;top:0;z-index:1}.aPBwk button{margin-top:8px}.G2rOZ button{color:#0095f6;color:rgba(var(--d69,0,149,246),1);font-weight:600;margin-top:10px;margin-bottom:4px}.bR_3v.mSQl2{left:0;bottom:0;position:fixed;z-index:11;background-color:#fff;border:0;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);width:100%;padding-left:16px;padding-right:16px}.mSQl2 .Ls00D{right:0}.bR_3v.Fzijm{left:0;bottom:0;position:fixed;z-index:4;background-color:rgba(0,0,0,.8);border:0;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);width:100%;padding-left:16px;padding-right:16px}.Fzijm .Ls00D{right:0}.Fzijm ._0DvBq{margin:0 auto 5px}.Fzijm .nwq6V,.Fzijm .gAo1g{color:#fff}.Fzijm .G2rOZ{margin-bottom:-10px}@media (min-width:736px){.aPBwk{display:inline-block}}@media (min-width:876px){.bR_3v:not(.Fzijm){background:#fff;background:rgba(var(--d87,255,255,255),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--b6a,219,219,219),1)}.bR_3v.Fzijm{height:100px;bottom:0;padding-top:20px}.bR_3v.mSQl2{height:100px;bottom:0;padding-top:20px}.Fzijm .w03Xk{max-width:none;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.Fzijm .w03Xk .pHxcJ{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;max-width:944px;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;height:64px;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;margin-left:7px}.Fzijm ._0DvBq{margin-left:0;max-width:376px;text-align:left;white-space:normal}.Fzijm .DZiHE{display:inherit}.Fzijm .aPBwk{margin-right:7px}.Fzijm .gAoda{margin:0;border:0;margin-right:16px}} .Jx1OT{background-color:transparent;border:0;padding:0;cursor:pointer} .bLOrn{background-color:#fafafa;background-color:rgba(var(--b3f,250,250,250),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--b6a,219,219,219),1);bottom:0;left:0;position:fixed;right:0;top:76px;z-index:100;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.QEbUV{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);border:2px solid #dbdbdb;border:2px solid rgba(var(--b6a,219,219,219),1);-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;max-width:520px;padding:0 32px;text-align:center}.K4-p0{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:28px;line-height:32px}.WzKC6{border-radius:50%;margin:25px 0}._-5Qf-{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:16px;line-height:24px;margin:25px 0}@media (max-width:875px){.bLOrn{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);border:0;top:0}.QEbUV{border:0}.Hmjbs button{height:46px;width:calc(100vw - 50px)}} @media (min-width:736px){.DCpAF{border-left:1px solid #dbdbdb;border-left:1px solid rgba(var(--b38,219,219,219),1);border-radius:4px;border-right:1px solid #dbdbdb;border-right:1px solid rgba(var(--b38,219,219,219),1);border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1);margin-bottom:32px;overflow:hidden}} .k9GMp,._3dEHb{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.k9GMp{margin-bottom:20px}._3dEHb{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1);padding:12px 0}.Y8-fY{font-size:16px;margin-right:40px}.Y8-fY:first-child{margin-left:0}.Y8-fY:last-child{margin-right:0}.LH36I{font-size:14px;text-align:center;width:33.3%}.LH36I:last-child{margin-right:0;width:33.4%} @media (min-width:736px){._4bSq7{height:130px;margin-bottom:44px}}@media (max-width:735px){._4bSq7{height:88px;margin-bottom:21px}} .cN-CH{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.nxF_M{display:block}._-9WeM{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1)}@media (min-width:736px){.cN-CH{padding:10px 15px;width:140px}._-9WeM{font-weight:600;height:18px;margin-top:15px;width:80px}}@media (max-width:735px){.cN-CH{margin:3px 5px;padding-top:2px;width:65px}._-9WeM{font-size:12px;height:15px;margin-top:8px;width:50px}} .hHOPZ{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}._4CvhT{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}._7JZQt{background:#efefef;background:rgba(var(--bb2,239,239,239),1);border-radius:50%}.LO-7C{border:1px solid rgba(0,0,0,.0975);border:1px solid rgba(var(--jb7,0,0,0),.0975)} ._3D7yK{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tUtVM{background-color:#fafafa;background-color:rgba(var(--b3f,250,250,250),1);border-radius:50%;overflow:hidden;position:relative}.NCYx-{height:100%;width:100%}.eXle2{cursor:pointer;display:block;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}@media (min-width:736px){._3D7yK{padding:10px 15px;width:115px}.eXle2{font-weight:600;padding-top:15px}}@media (max-width:735px){._3D7yK{margin:0 5px;padding-top:5px;width:65px}.eXle2{font-size:12px;padding-top:8px}} ._8PWHW{max-width:400px;min-width:400px}@media (max-width:413px){._8PWHW{min-width:calc(100% - 30px)}}._5Jsao{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);border-radius:20px;margin:0 auto;max-width:400px;overflow:hidden;width:100%}.p4xmR{z-index:1}.SFTPe{margin:0 auto}.arakE>:first-child{display:inline-block;margin:0 5px -3px 0} .K-1uj{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.s311c{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;background-color:#dbdbdb;background-color:rgba(var(--b38,219,219,219),1);height:1px;position:relative;top:.45em}._0tv-g{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;font-size:13px;font-weight:600;line-height:15px;margin:0 18px;text-transform:uppercase} .rgFsT{color:#262626;color:rgba(var(--i1d,38,38,38),1);-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-top:12px;max-width:350px;width:100%}.oZ07Z{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:17px;font-weight:600;line-height:20px;margin:0 40px 10px;text-align:center}.M2tlr{padding-bottom:60px}.izU2O{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:14px;margin:15px;text-align:center}.REEZj{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1)}.izU2O>a,.izU2O>a:hover,.izU2O>a:active,.izU2O>a:visited{color:#0095f6;color:rgba(var(--d69,0,149,246),1)}.gr27e{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--b6a,219,219,219),1);border-radius:1px;margin:0 0 10px;padding:10px 0}.gr27e:last-child{margin-bottom:0}.gr27e:empty{display:none}.o7laV{border:0}.NXVPg{margin:22px auto 12px}.RL3Y5{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:20px 0}@media (max-width:450px){.rgFsT{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;margin-top:0;max-width:100%}.gr27e{background-color:transparent;border:0}} ._2Wo-s{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:14px;line-height:18px;margin:10px 20px 10px 20px;text-align:center} ._Oq5x{padding:10px 0}.TfHme{margin:0 40px 32px}.uEof1{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:16px}.xUUM0{color:#262626;color:rgba(var(--i1d,38,38,38),1);display:block;font-size:14px;font-weight:400;line-height:18px;margin:0 40px 16px;text-align:center}._2PdAd,.m36gW{font-size:14px;line-height:18px;margin:0 40px 10px;text-align:center}._2PdAd{color:#ed4956;color:rgba(var(--i30,237,73,86),1)}.m36gW{color:#262626;color:rgba(var(--i1d,38,38,38),1)} ._9GP1n{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;background:#fafafa;background:rgba(var(--b3f,250,250,250),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--ca6,219,219,219),1);border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#262626;color:rgba(var(--i1d,38,38,38),1);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-size:14px;position:relative;width:100%}._2hvTZ{background:#fafafa;background:rgba(var(--b3f,250,250,250),1);border:0;-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;margin:0;outline:0;overflow:hidden;padding:9px 0 7px 8px;text-overflow:ellipsis}.i24fI{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:100%;padding-right:8px;vertical-align:middle}.HlU5H{border:1px solid #a8a8a8;border:1px solid rgba(var(--c8c,168,168,168),1)}.qYTTt{border:1px solid #ed4956;border:1px solid rgba(var(--c37,237,73,86),1)}.AaDgr{background-color:#efefef;background-color:rgba(var(--bb2,239,239,239),1);color:#8e8e8e;color:rgba(var(--f52,142,142,142),1)}.gBp1f{margin-left:8px}.wpY4H{font-size:14px;margin-right:4px}.CIpxV{color:#ed4956;color:rgba(var(--c37,237,73,86),1);font-size:12px;margin:4px 0 8px 8px} .f0n8F{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:36px;-webkit-box-flex:1;-webkit-flex:1 0 0;-ms-flex:1 0 0;flex:1 0 0;padding:0;position:relative;margin:0;min-width:0}._9nyy2{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:12px;height:36px;left:8px;line-height:36px;overflow:hidden;pointer-events:none;position:absolute;right:0;text-overflow:ellipsis;-webkit-transform-origin:left;transform-origin:left;-webkit-transition:-webkit-transform ease-out .1s;transition:-webkit-transform ease-out .1s;transition:transform ease-out .1s;transition:transform ease-out .1s,-webkit-transform ease-out .1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.f0n8F .pexuQ{font-size:16px}.FATdn ._9nyy2{-webkit-transform:scale(.83333) translateY(-10px);transform:scale(.83333) translateY(-10px)}.FATdn .pexuQ{font-size:12px;padding:14px 0 2px 8px!important} .zyHYP{-webkit-appearance:none}.zyHYP::-webkit-input-placeholder{color:#8e8e8e;font-weight:300;opacity:1}.zyHYP::-moz-placeholder{color:#8e8e8e;font-weight:300;opacity:1}.zyHYP:-ms-input-placeholder,.zyHYP::-ms-input-placeholder{color:#8e8e8e;font-weight:300;opacity:1}.zyHYP::placeholder{color:#8e8e8e;font-weight:300;opacity:1}.zyHYP::-ms-clear{display:none;height:0;width:0} .wxMeA{padding:10px 0}.XuNZK{margin:0 40px 32px}.Bckx_{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:16px}.OavZo,.gWafB{display:block;margin:0 40px 16px;text-align:center}.OavZo{font-size:16px;font-weight:600}.gWafB{font-size:14px;font-weight:400;line-height:18px}.tO8XC{color:#262626;color:rgba(var(--i1d,38,38,38),1)}.Xhr9I{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1)}.D9qtI{color:#ed4956;color:rgba(var(--i30,237,73,86),1);font-size:14px;line-height:18px;margin:0 40px 10px;text-align:center} .inSEE{color:#ed4956;color:rgba(var(--i30,237,73,86),1);font-size:14px;line-height:18px;text-align:center} .O15Fw:not(:last-child){margin-right:8px;margin-bottom:8px}.O15Fw{display:inline-block;position:relative}.lXXh2{pointer-events:none;position:absolute;right:7px;top:12px}.h144Z{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;background:rgba(var(--d87,255,255,255),1);border:1px solid #dbdbdb;border:1px solid rgba(var(--b38,219,219,219),1);border-radius:3px;color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:12px;height:36px;padding:0 24px 0 8px}.h144Z:active,.h144Z:focus{border:1px solid 1px solid #c7c7c7;border:1px solid 1px solid rgba(var(--edc,199,199,199),1);color:#262626;color:rgba(var(--i1d,38,38,38),1);outline:0}.TBUSz{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1)}.lWcar{border:1px solid #ed4956;border:1px solid rgba(var(--i30,237,73,86),1)}.U6alp{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.V0z_C{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1} .WZdjL{margin:0 40px 6px}.a5I1A{margin:0 40px 8px}.a5I1A input{font-size:12px}.hKTMS{margin:10px 40px 18px}.vvzhL{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:17px;font-weight:600;line-height:20px;margin:0 40px 10px;text-align:center}.m6lg3{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:14px;margin:0 40px 22px;text-align:center}.XFYOY{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.SQNOX{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:5px 0 auto}.cneKx{display:inline-block;margin-right:8px;position:relative;top:3px}@media (min-width:736px){.cneKx{top:2px}}.P8adC{margin-bottom:20px}.nZl92{color:#ed4956;color:rgba(var(--i30,237,73,86),1);font-size:14px;line-height:18px;margin:10px 40px;text-align:center}.g4Vm4{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:14px;line-height:18px;margin:10px 60px;text-align:center}.g4Vm4>a,.g4Vm4>a:visited{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-weight:600}.ZGwn1{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:12px;line-height:16px;margin:10px 40px;text-align:center}.ZGwn1>a,.ZGwn1>a:visited{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-weight:600}._5abUw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;margin-top:4px}.NEtc5{display:inline-block;margin-left:4px;margin-right:4px;position:relative}.a9OWp{bottom:calc(50% + 25px);left:calc(50% - 25px);position:absolute;visibility:hidden;z-index:1}.NEtc5:hover .a9OWp{visibility:visible} .xjIqG{font-weight:700} .tkIXv{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b6a,219,219,219),1);cursor:pointer;height:43px;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center} .FsQoP{padding:10px 0}.gi2oZ{margin:0 40px 6px}._3GlM_{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swB58{color:#262626;color:rgba(var(--i1d,38,38,38),1);display:block;font-size:14px;font-weight:400;line-height:18px;margin:0 40px 12px;text-align:center}.jNzLF,.jNzLF:visited{color:#0095f6;color:rgba(var(--d69,0,149,246),1)}._1J8pO,.Bbmhh{font-size:14px;line-height:18px;margin:0 40px 10px;text-align:center}._1J8pO{color:#ed4956;color:rgba(var(--i30,237,73,86),1)}.Bbmhh{color:#262626;color:rgba(var(--i1d,38,38,38),1)} .rxwpz{color:#8e8e8e;font-size:14px;font-weight:400}.aFDND{padding:16px 16px 20px}.lAPmk{border-bottom-width:1px;border-color:#efefef;border-style:solid;border-top-width:1px;padding-top:12px}.MHDUK{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:#262626;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-weight:600;padding-bottom:12px}.o06Gi{border-radius:100px;border:solid 1px #efefef;display:block;height:36px;margin-right:12px;width:36px}.l9hKg{display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ZlSjl{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0}._9ctbj{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-radius:100px;border:solid 1px #efefef;display:block;height:84px;margin-bottom:16px;margin-top:8px;width:84px}.dMMs-{display:inline-block;margin:0}@media (max-width:735px){._3NQle{margin-left:40px;margin-right:40px;width:auto}} .onyFN{color:#ed4956;color:rgba(var(--i30,237,73,86),1);line-height:23px;margin:0 27px;padding:0 8px 20px 10px;vertical-align:middle}.Koxwk{color:#262626;color:rgba(var(--i1d,38,38,38),1);line-height:23px;margin:auto;padding:0 8px 20px 10px;vertical-align:middle}.bTref{color:#262626;color:rgba(var(--i1d,38,38,38),1);display:inline}.A4IYq{border-radius:100px;border:solid 1px #efefef;display:block;height:100px;margin:10px auto 10px;width:100px}.DrYaw{opacity:.2}.nrq7i{margin:15px 0;padding:0 40px;text-align:center}@media (max-width:735px){.U4FH4{margin:15px 40px;width:auto}} .jxsF1{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:28px;position:relative}.I4I02,.jalSa{height:100%;position:absolute;top:0;width:100%}.I4I02{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;border-radius:3px;color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:320px;background-color:#4267b2}.jalSa{background-color:transparent;border:0;cursor:pointer;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;padding:0}._6uZx5{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;width:28px}.OzV12{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;font-family:Helvetica,Arial,sans-serif;font-size:13px;letter-spacing:.25px;margin-right:28px;text-align:center}.CF3nq{pointer-events:none} .b_nGN{color:#262626;color:rgba(var(--i1d,38,38,38),1);font-size:14px;line-height:18px;margin:10px 20px 10px 20px;text-align:center}.iNy2T{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:10px 0 10px 0}@media (max-width:400px){.iNy2T{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}}.AYpZq{color:#0095f6;color:rgba(var(--d69,0,149,246),1);font-weight:600;margin-top:6px} .-MzZI{margin:0 40px 6px}.Et89U{margin:0 40px 6px}.Et89U input{font-size:12px}.l4KT0{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:14px;margin:0 40px 12px}._8Bp8U{color:#0095f6;color:rgba(var(--d69,0,149,246),1);font-size:12px;line-height:14px;margin-top:22px;text-align:center}.sS9vZ{opacity:.2}.Z7p_S{margin:10px 40px 18px}.VILGp{margin:14px 40px 22px}.HmktE{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.AeB99{display:inline-block;margin-right:8px;position:relative;top:3px}.EPjEi{margin-bottom:10px}.eiCW-,.W19pC,.a1KEf{font-size:14px;line-height:18px;text-align:center}.eiCW-{color:#ed4956;color:rgba(var(--i30,237,73,86),1);margin:10px 40px}.W19pC{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);margin:10px 40px 30px}.a1KEf{color:#262626;color:rgba(var(--i1d,38,38,38),1);margin:10px 40px 30px}.KPnG0{color:#385185}._2Lks6,._2Lks6:hover,._2Lks6:active,._2Lks6:visited{color:#00376b;color:rgba(var(--fe0,0,55,107),1);font-size:12px;line-height:14px;margin-top:12px;text-align:center} .Nd6FG{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1)}._8F2QW{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;margin:initial;max-height:calc(100vh - 80px)}.vau5H{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.FkhkD>span:first-child{font-weight:600}.vau5H span{font-size:14px;margin:0 30px 30px;text-align:center}@media (min-width:736px){.Nd6FG{background-color:initial}._8F2QW{margin:auto;max-height:420px;max-width:512px}.uj53w li{min-width:448px}.hf0Z9{max-height:262px}}.XnQ-0{font-size:16px;font-weight:700;margin-bottom:8px;text-align:center}.Vz9zI{margin-right:4px}.qMFi1,._16jrd,.hBVGV{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:12px;margin:0 auto 8px}._16jrd{list-style-type:disc;margin-left:16px}.hBVGV,.hBVGV a,.hBVGV a:visited,a.JUhMz,a:visited.JUhMz{color:#0095f6;color:rgba(var(--d69,0,149,246),1);text-align:center}.rZzGH{border:0;border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1);margin-bottom:24px;margin-top:12px;width:100%}.eS6pE{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:24px 16px}.hf0Z9{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;overflow:auto;padding:24px 16px}._0GT5G{border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%}.PR5jL{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);font-size:10px;margin-bottom:8px;text-align:center}._0voMS{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;height:32px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.zNpf4{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #dbdbdb;border:2px solid rgba(var(--ca6,219,219,219),1);border-radius:50%;height:24px;-webkit-transition:.2s all linear;transition:.2s all linear;width:24px}.zNpf4:focus{outline:0}.zNpf4:checked{background-color:#fff;background-color:rgba(var(--d87,255,255,255),1);border:8px solid #0095f6;border:8px solid rgba(var(--d69,0,149,246),1)}.CIjBL{margin:40px auto}.OXZut,a.OXZut,a:visited.OXZut{color:#262626;color:rgba(var(--i1d,38,38,38),1);cursor:pointer;font-weight:600}._7qqQU{color:#8e8e8e;color:rgba(var(--f52,142,142,142),1);display:inline;font-size:12px;text-align:center} .fx7hk{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1);color:#8e8e8e;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-size:12px;font-weight:600;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;letter-spacing:1px;text-align:center}.Nd_Rl{border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1)}@media (max-width:735px){._2z6nI{border-top:1px solid #dbdbdb;border-top:1px solid rgba(var(--b38,219,219,219),1);-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}} a._9VEo1,a._9VEo1:visited{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:#8e8e8e;color:rgba(var(--f52,142,142,142),1)}a.T-jvg,a.T-jvg:visited{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:#262626;color:rgba(var(--i1d,38,38,38),1)}._9VEo1{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:52px;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-transform:uppercase}@media (min-width:736px){._9VEo1:not(:last-child){margin-right:60px}.T-jvg{border-top:1px solid #262626;border-top:1px solid rgba(var(--i1d,38,38,38),1);color:#262626;color:rgba(var(--i1d,38,38,38),1);margin-top:-1px}}@media (max-width:735px){._9VEo1{-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:44px}}
906.396694
13,879
0.825492
1abd860605d762d13b10cd977a2a5115ad48a905
11,356
py
Python
d2r_image/processing.py
mgleed/d2r_image
0ba5317e65baa3d7e309866ed11a76ad22b30952
[ "MIT" ]
null
null
null
d2r_image/processing.py
mgleed/d2r_image
0ba5317e65baa3d7e309866ed11a76ad22b30952
[ "MIT" ]
null
null
null
d2r_image/processing.py
mgleed/d2r_image
0ba5317e65baa3d7e309866ed11a76ad22b30952
[ "MIT" ]
null
null
null
import copy from typing import Union import cv2 import numpy as np from d2r_image import d2data_lookup from d2r_image.data_models import D2Item, D2ItemList, GroundItemList, HoveredItem, ItemQuality, ItemText, ScreenObject from d2r_image.nip_helpers import parse_item from d2r_image.ocr import image_to_text from d2r_image.utils.misc import color_filter, cut_roi from d2r_image.processing_data import BOX_EXPECTED_HEIGHT_RANGE, BOX_EXPECTED_WIDTH_RANGE, COLORS, UI_ROI from d2r_image.processing_helpers import build_d2_items, crop_result_is_loading_screen, crop_text_clusters, get_items_by_quality, consolidate_clusters, find_base_and_remove_items_without_a_base, set_set_and_unique_base_items from d2r_image.screen_object_helpers import detect_screen_object from d2r_image.d2data_ref_lookup import BELT_MAP, LEFT_INVENTORY_MAP, RIGHT_INVENTORY_MAP import numpy as np def get_screen_object(image: np.ndarray, screen_object: ScreenObject): return detect_screen_object(screen_object, image) def get_ground_loot(image: np.ndarray) -> Union[GroundItemList, None]: crop_result = crop_text_clusters(image) if crop_result_is_loading_screen(crop_result): return None items_by_quality = get_items_by_quality(crop_result) consolidate_clusters(items_by_quality) items_removed = find_base_and_remove_items_without_a_base(items_by_quality) set_set_and_unique_base_items(items_by_quality) return build_d2_items(items_by_quality) def get_hovered_item(image: np.ndarray, inventory_side: str = "right") -> tuple[HoveredItem, ItemText]: """ Crops visible item description boxes / tooltips :inp_img: image from hover over item of interest. :param all_results: whether to return all possible results (True) or the first result (False) :inventory_side: enter either "left" for stash/vendor region or "right" for user inventory region """ res = ItemText() black_mask, _ = color_filter(image, COLORS["black"]) contours = cv2.findContours( black_mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) contours = contours[0] if len(contours) == 2 else contours[1] for cntr in contours: x, y, w, h = cv2.boundingRect(cntr) cropped_item = image[y:y+h, x:x+w] avg = np.average(cv2.cvtColor(cropped_item, cv2.COLOR_BGR2GRAY)) mostly_dark = True if 0 < avg < 20 else False contains_black = True if np.min(cropped_item) < 14 else False contains_white = True if np.max(cropped_item) > 250 else False contains_orange = False if not contains_white: # check for orange (like key of destruction, etc.) orange_mask, _ = color_filter(cropped_item, COLORS["orange"]) contains_orange = np.min(orange_mask) > 0 expected_height = True if ( BOX_EXPECTED_HEIGHT_RANGE[0] < h < BOX_EXPECTED_HEIGHT_RANGE[1]) else False expected_width = True if ( BOX_EXPECTED_WIDTH_RANGE[0] < w < BOX_EXPECTED_WIDTH_RANGE[1]) else False box2 = UI_ROI.leftInventory if inventory_side == 'left' else UI_ROI.rightInventory # padded height because footer isn't included in contour overlaps_inventory = False if ( x+w < box2[0] or box2[0]+box2[2] < x or y+h+28+10 < box2[1] or box2[1]+box2[3] < y) else True if contains_black and (contains_white or contains_orange) and mostly_dark and expected_height and expected_width and overlaps_inventory: footer_height_max = (720 - (y + h)) if (y + h + 35) > 720 else 35 to_tooltip_screen_object = ScreenObject( refs=["TO_TOOLTIP"], roi=[x, y+h, w, footer_height_max], threshold=0.8 ) found_footer = detect_screen_object(to_tooltip_screen_object, image) if found_footer: first_row = cut_roi(copy.deepcopy(cropped_item), (0, 0, w, 26)) green_mask, _ = color_filter(first_row, COLORS["green"]) gold_mask, _ = color_filter(first_row, COLORS["gold"]) yellow_mask, _ = color_filter(first_row, COLORS["yellow"]) gray_mask, _ = color_filter(first_row, COLORS["gray"]) blue_mask, _ = color_filter(first_row, COLORS["blue"]) orange_mask, _ = color_filter(first_row, COLORS["orange"]) contains_green = np.average(green_mask) > 0 contains_gold = np.average(gold_mask) > 0 contains_yellow = np.average(yellow_mask) > 0 contains_gray = np.average(gray_mask) > 0 contains_blue = np.average(blue_mask) > 0 contains_orange = np.average(orange_mask) > 0 quality = None if contains_green: quality = ItemQuality.Set.value elif contains_gold: quality = ItemQuality.Unique.value elif contains_yellow: quality = ItemQuality.Rare.value elif contains_blue: quality = ItemQuality.Magic.value elif contains_orange: quality = ItemQuality.Crafted.value elif contains_white: quality = ItemQuality.Normal.value elif contains_gray: quality = ItemQuality.Gray.value else: quality = ItemQuality.Normal.value res.ocr_result = image_to_text(cropped_item, psm=6)[0] res.roi = [x, y, w, h] res.img = cropped_item break try: parsed_item = parse_item(quality, res.ocr_result.text) except: parsed_item = None return parsed_item, res def get_npc_coords(image: np.ndarray, npc: ScreenObject) -> tuple[int, int]: match = detect_screen_object(npc, image) return match def get_health(image: np.ndarray) -> float: health_img = cut_roi(image, UI_ROI.healthSlice) mask, _ = color_filter(health_img, COLORS["health_globe_red"]) health_percentage = (float(np.sum(mask)) / mask.size) * (1/255.0) * 100 mask, _ = color_filter(health_img, COLORS["health_globe_green"]) health_percentage_green = (float(np.sum(mask)) / mask.size) * (1/255.0) * 100 health = round(max(health_percentage, health_percentage_green), 2) return health def get_mana(image: np.ndarray) -> float: mana_img = cut_roi(image, UI_ROI.manaSlice) mask, _ = color_filter(mana_img, COLORS["mana_globe"]) mana_percentage = (float(np.sum(mask)) / mask.size) * (1/255.0) * 100 return round(mana_percentage, 2) def get_stamina(image: np.ndarray) -> float: return 0 def get_experience(image: np.ndarray) -> float: current_bar_roi = UI_ROI.experienceStart starting_x = list(current_bar_roi)[0] bar_offset = 51 for i in range(0, 10): wip_bar_roi_list = list(current_bar_roi) wip_bar_roi_list[0] = starting_x + (i * bar_offset) current_bar_roi = tuple(wip_bar_roi_list) experience_image = cut_roi(image, current_bar_roi) # experience_image = cv2.cvtColor(experience_image, cv2.COLOR_BGR2GRAY) # cv2.imshow('im', experience_image) cv2.waitKey() # _, thresh = cv2.threshold(experience_image, 5, 255, cv2.THRESH_BINARY) experience_percentage = (float(np.sum(thresh)) / thresh.size) * (1/255.0) * 100 print(experience_percentage) # mask, _ = color_filter(experience_image, COLORS["experience_bar"]) # _, thresh = cv2.threshold(experience_image, 5, 255, cv2.THRESH_BINARY) # experience_percentage = (float(np.sum(thresh)) / thresh.size) * (1/255.0) * 100 return 0 def get_merc_health(image: np.ndarray) -> float: merc_health_img = cut_roi(image, UI_ROI.mercHealthSlice) merc_health_img = cv2.cvtColor(merc_health_img, cv2.COLOR_BGR2GRAY) _, thresh = cv2.threshold(merc_health_img, 5, 255, cv2.THRESH_BINARY) merc_health_percentage = (float(np.sum(thresh)) / thresh.size) * (1/255.0) * 100 return round(merc_health_percentage, 2) # def get_belt(image: np.ndarray) -> D2ItemList: # belt = D2ItemList([ # None, None, None, None, # None, None, None, None, # None, None, None, None, # None, None, None, None # ]) # for consumable in BELT_MAP: # belt_roi = [722, 560, 166, 156] # rects = detect_screen_object(ScreenObject(refs=BELT_MAP[consumable], threshold=0.95, roi=belt_roi), image) # if rects: # for rect in rects: # column = int((rect[0]-belt_roi[0]) / 40) # row = abs(3-round((rect[1]-belt_roi[1]) / 40)) # slot_index = row * 4 + column # quality = None # type = None # base_item = None # item = None # if consumable != 'EMPTY BELT SLOT': # quality=ItemQuality.Normal.value # base_item = d2data_lookup.get_consumable(consumable) # type=base_item['type'] # item=base_item # belt.items[slot_index] = D2Item( # boundingBox= { # 'x': rect[0], # 'y': rect[1], # 'w': rect[2], # 'h': rect[3], # }, # name=consumable, # quality=quality, # type=type, # identified=True, # baseItem=base_item, # item=item, # amount=None, # uniqueItems=None, # setItems=None, # itemModifiers=None # ) # return belt # def get_inventory(image: np.ndarray) -> D2ItemList: # d2_item_list = D2ItemList([]) # d2data_maps = [LEFT_INVENTORY_MAP, RIGHT_INVENTORY_MAP] # for i in range(len(d2data_maps)): # map = d2data_maps[i] # roi = UI_ROI.leftInventory if i == 1 else UI_ROI.rightInventory # for item in map: # threshold = 0.95 if item not in ['PERFECT AMETHYST', 'PERFECT SAPPHIRE'] else 0.99 # rects = detect_screen_object(ScreenObject(refs=map[item], threshold=threshold, roi=roi), image) # if rects: # for rect in rects: # quality=ItemQuality.Normal.value # base_item = d2data_lookup.get_by_name(item) # type=base_item['type'] # d2_item_list.items.append(D2Item( # boundingBox= { # 'x': rect[0], # 'y': rect[1], # 'w': rect[2], # 'h': rect[3], # }, # name=item, # quality=quality, # type=type, # identified=True, # baseItem=base_item, # item=base_item, # amount=None, # uniqueItems=None, # setItems=None, # itemModifiers=None # )) # return d2_item_list
46.162602
224
0.60074
05e714c430fd36c6be296166d638907cc9034b4f
3,202
py
Python
plantsegtools/evaluation/evaluation_segmentation.py
hci-unihd/plant-seg-tools
38cef53940e9330e12e74c9ea98035814bde90fc
[ "MIT" ]
null
null
null
plantsegtools/evaluation/evaluation_segmentation.py
hci-unihd/plant-seg-tools
38cef53940e9330e12e74c9ea98035814bde90fc
[ "MIT" ]
null
null
null
plantsegtools/evaluation/evaluation_segmentation.py
hci-unihd/plant-seg-tools
38cef53940e9330e12e74c9ea98035814bde90fc
[ "MIT" ]
2
2021-04-24T16:29:22.000Z
2021-04-24T16:29:38.000Z
import argparse import time import warnings import numpy as np from scipy.ndimage import zoom from plantsegtools.evaluation.rand import adapted_rand from plantsegtools.evaluation.voi import voi from plantsegtools.utils.io import smart_load # Add new metrics if needed metrics = {"voi": (voi, 'Split and Merge Error'), "adapted_rand": (adapted_rand, 'AdaptedRand Error')} def parse(): parser = argparse.ArgumentParser() parser.add_argument('-s', '--path-seg', type=str, required=False, help='path to segmentation file') parser.add_argument('-ds', '--dataset-seg', type=str, default='segmentation', required=False, help='if h5 contains dataset name to segmentation') parser.add_argument('-g', '--path-gt', type=str, required=False, help='path to ground-truth file') parser.add_argument('-dg', '--dataset-gt', type=str, default='label', required=False, help='if h5 contains dataset name to ground-truth') return parser.parse_args() def run_evaluation(gt_array, seg_array, remove_background=True): timer = - time.time() # Check for problems in data types # double check for type and sign to allow a bit of slack in using _ # int for segmentation and not only uint) if not np.issubdtype(seg_array.dtype, np.integer): return None if not np.issubdtype(gt_array.dtype, np.integer): warnings.warn("Ground truth is not an integer array") return None if np.any(seg_array < 0): warnings.warn("Found negative indices, segmentation must be positive") return None if np.any(gt_array < 0): warnings.warn("Found negative indices, ground truth must be positive") return None # Cast into uint3232 seg_array = seg_array.astype(np.uint32) gt_array = gt_array.astype(np.uint32) if seg_array.ndim == 3 and seg_array.shape[0] == 1: seg_array = seg_array[0, ...] # Resize segmentation to gt size for apple to apple comparison in the scores if seg_array.shape != gt_array.shape: print("- Segmentation shape:", seg_array.shape, "Ground truth shape: ", gt_array.shape) print("- Shape mismatch, trying to fixing it") factor = tuple([g_shape / seg_shape for g_shape, seg_shape in zip(gt_array.shape, seg_array.shape)]) seg_array = zoom(seg_array, factor, order=0).astype(np.uint32) if remove_background: print("- Removing background") mask = gt_array != 0 gt_array = gt_array[mask].ravel() seg_array = seg_array[mask].ravel() # Run all metric print("- Start evaluations") scores = {} for key, (metric, text) in metrics.items(): result = metric(seg_array.ravel(), gt_array.ravel()) scores[key] = result print(f'{text}: {result}') timer += time.time() print("- Evaluation took %.1f s" % timer) return scores def main(): args = parse() seg_array, _ = smart_load(args.path_seg, key=args.dataset_seg) gt_array, _ = smart_load(args.path_gt, key=args.dataset_gt) _ = run_evaluation(gt_array, seg_array, remove_background=True) if __name__ == "__main__": main()
34.804348
108
0.665522
ff5ca95d1da674b6e69ee7744b7be4f66316da3a
1,987
py
Python
app.py
namacha/line-bot-starter
260418755339ed2e616007e686f9e339ac61b843
[ "MIT" ]
null
null
null
app.py
namacha/line-bot-starter
260418755339ed2e616007e686f9e339ac61b843
[ "MIT" ]
null
null
null
app.py
namacha/line-bot-starter
260418755339ed2e616007e686f9e339ac61b843
[ "MIT" ]
null
null
null
import os from flask import Flask, request, abort from linebot import LineBotApi, WebhookHandler from linebot.exceptions import InvalidSignatureError from linebot.models import ( MessageEvent, TextMessage, TextSendMessage, AudioSendMessage, QuickReply, QuickReplyButton, MessageAction, LocationSendMessage, ) from line_bot_router import Router, reply_only import settings LINE_CHANNEL_ACCESS_TOKEN = settings.LINE_CHANNEL_ACCESS_TOKEN LINE_CHANNEL_SECRET = settings.LINE_CHANNEL_SECRET line_bot_api = LineBotApi(LINE_CHANNEL_ACCESS_TOKEN) handler = WebhookHandler(LINE_CHANNEL_SECRET) app = Flask(__name__) # Root message router router = Router() @app.route("/heartbeat") def heartbeat() -> str: return "OK" @app.route("/callback", methods=["POST"]) def callback(): signature = request.headers["X-Line-Signature"] body = request.get_data(as_text=True) try: handler.handle(body, signature) except InvalidSignatureError: abort(400) return "OK" @handler.add(MessageEvent, message=TextMessage) def response_message(event): '''A handler of TextMessage. This function will be executed when TextMessage is received.''' text = event.message.text # Log output print( f"Received: {line_bot_api.get_profile(event.source.user_id).display_name}@{event.source.user_id}: {text}" ) msg = router.process(event) if msg is None: msg = TextSendMessage(HELP_MESSAGE) return line_bot_api.reply_message(event.reply_token, msg) # ------------------------------------------ # Write your bot logic below here !!! # ------------------------------------------ @router.register("こんにちは") def greet(event): user_display = line_bot_api.get_profile(event.source.user_id).display_name msg = TextSendMessage(text=f'こんにちは、{user_display}さん') return msg if __name__ == "__main__": port = int(os.getenv("PORT", 5000)) app.run(host="0.0.0.0", port=port)
24.231707
113
0.691998
ffaadd797e2022560dab27118409beabe10929f2
1,173
py
Python
Samples/Python/Digital_Port_In_Out.py
Turta-io/IoTHAT3
8b122c147bd792ac133fc308c1a83826d9c535ec
[ "MIT" ]
1
2019-10-07T13:12:27.000Z
2019-10-07T13:12:27.000Z
Samples/Python/Digital_Port_In_Out.py
Turta-io/IoTHAT3
8b122c147bd792ac133fc308c1a83826d9c535ec
[ "MIT" ]
null
null
null
Samples/Python/Digital_Port_In_Out.py
Turta-io/IoTHAT3
8b122c147bd792ac133fc308c1a83826d9c535ec
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 #This sample demonstrates digital port read and write. #Install IoT HAT 3 library with "pip3 install turta-iothat3" from time import sleep from turta_iothat3 import Turta_Digital #Initialize #Set left digital port as output, right digital port as input digital = Turta_Digital.DigitalPort(False, False, True, True) try: while True: #Turn pin 1 on digital.write(1, True) print("Pin 1 is set to high.") #Wait sleep(1.0) #Turn pin 1 off digital.write(1, False) print("Pin 1 is set to low.") #Wait sleep(1.0) #Toggle pin 2 #Toggling inverts the pin state digital.toggle(2) print("Pin 2 is inverted to " + ("high." if digital.read(2) else "low.")) #Wait sleep(1.0) #Read pin 3 and 4 pin3 = digital.read(3) pin4 = digital.read(4) #Print pin 3 and 4 states print("Pin 3 state is " + ("high." if pin3 else "low.")) print("Pin 4 state is " + ("high." if pin4 else "low.")) #Wait sleep(1.0) #Exit on CTRL+C except KeyboardInterrupt: print('Bye.')
23
81
0.588235
c4b0cb7be0da45a9827665348569fe4bd3544efa
3,005
cpp
C++
unittests/timer/ExecutionDeferrerTest.cpp
zavadovsky/stingraykit
33e6587535325f08769bd8392381d70d4d316410
[ "0BSD" ]
24
2015-03-04T16:30:03.000Z
2022-02-04T15:03:42.000Z
unittests/timer/ExecutionDeferrerTest.cpp
zavadovsky/stingraykit
33e6587535325f08769bd8392381d70d4d316410
[ "0BSD" ]
null
null
null
unittests/timer/ExecutionDeferrerTest.cpp
zavadovsky/stingraykit
33e6587535325f08769bd8392381d70d4d316410
[ "0BSD" ]
7
2015-04-08T12:22:58.000Z
2018-06-14T09:58:45.000Z
#include <stingraykit/function/bind.h> #include <stingraykit/timer/Timer.h> #include <stingraykit/unique_ptr.h> #include <gtest/gtest.h> using namespace stingray; class ExecutionDeferrerTest : public testing::Test { protected: class DeferrerHolder { private: ExecutionDeferrer _deferrer; public: DeferrerHolder(Timer& timer, size_t timeout, const function<void ()>& func) : _deferrer(timer, TimeDuration(timeout)) { _deferrer.Defer(func); } ~DeferrerHolder() { _deferrer.Cancel(); } }; struct Counter { private: size_t _value; public: Counter() : _value(0) { } size_t GetValue() const { return _value; } void Increment() { ++_value; } }; struct ExecutionDeferrerTestDummy { }; STINGRAYKIT_DECLARE_PTR(ExecutionDeferrerTestDummy); protected: bool _finished; protected: ExecutionDeferrerTest() : _finished(false) { } static void DoNothing() { } void DoCancel(const ExecutionDeferrerWithTimerPtr& deferrer) { deferrer->Cancel(); } public: void DoTest(size_t testCount, size_t timeout, size_t sleepTimeout) { ExecutionDeferrerWithTimerPtr deferrer(new ExecutionDeferrerWithTimer("deferrerTestTimer")); ExecutionDeferrerWithTimerPtr cancelDeferrer(new ExecutionDeferrerWithTimer("deferrerCancelTestTimer")); for (size_t i = 0; i < testCount; ++i) { deferrer->Defer(Bind(&ExecutionDeferrerTest::DoCancel, this, deferrer), TimeDuration(timeout)); cancelDeferrer->Defer(Bind(&ExecutionDeferrerTest::DoCancel, this, deferrer), TimeDuration(timeout)); Thread::Sleep(sleepTimeout); } deferrer.reset(); cancelDeferrer.reset(); _finished = true; } }; TEST_F(ExecutionDeferrerTest, Cancel) { const size_t Timeout = 500; const size_t ObjectsCount = 1000; Timer timer("deferrerTestTimer"); Counter counter; for (size_t i = 0; i < ObjectsCount; ++i) { unique_ptr<DeferrerHolder> tmp(new DeferrerHolder(timer, Timeout, Bind(&Counter::Increment, wrap_ref(counter)))); tmp.reset(); } Thread::Sleep(2 * Timeout); ASSERT_EQ(counter.GetValue(), 0u); } TEST_F(ExecutionDeferrerTest, Defer) { const size_t EvenTimeout = 0; const size_t OddTimeout = 200; const size_t TestCount = 10000; ExecutionDeferrerWithTimer deferrer("deferrerTestTimer"); for (size_t i = 0; i < TestCount; ++i) { const size_t timeout = i % 2? OddTimeout : EvenTimeout; deferrer.Defer(&ExecutionDeferrerTest::DoNothing, TimeDuration(timeout)); } } TEST_F(ExecutionDeferrerTest, CancelDeadlock) { const size_t TestCount = 100; const size_t Timeout = 3; const size_t SleepTimeout = 50; static ExecutionDeferrerWithTimer deferrer("deadlockTestDeferrerTimer"); deferrer.Defer(Bind(&ExecutionDeferrerTest::DoTest, this, TestCount, Timeout, SleepTimeout), TimeDuration(0)); size_t elapsed = 0; while(elapsed < (TestCount * SleepTimeout * 2) && !_finished) { elapsed += SleepTimeout; Thread::Sleep(SleepTimeout); } if (!_finished) STINGRAYKIT_THROW("Cannot finish ExecutionDeferrerTest, possible there is a deadlock"); }
23.294574
115
0.738769
b7ec107c3d16224faf8c6b7b8eed86dc3c35d6c0
749
cs
C#
ASPEntityCore_04_VS_SQL/Pages/Entity03.cshtml.cs
philanderson888/c-sharp
532481ee11f35f4e25890cf6c3fef6953dca0a4c
[ "MIT" ]
3
2019-04-05T08:38:13.000Z
2021-11-20T20:41:16.000Z
ASPEntityCore_04_VS_SQL/Pages/Entity03.cshtml.cs
philanderson888/c-sharp
532481ee11f35f4e25890cf6c3fef6953dca0a4c
[ "MIT" ]
33
2019-11-03T14:20:08.000Z
2020-02-16T10:24:45.000Z
ASPEntityCore_04_VS_SQL/Pages/Entity03.cshtml.cs
philanderson888/c-sharp
532481ee11f35f4e25890cf6c3fef6953dca0a4c
[ "MIT" ]
3
2019-02-24T14:57:25.000Z
2021-11-20T20:41:25.000Z
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using ASPCoreEntity_03_Data; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace ASPEntityCore_04_VS_SQL.Pages { public class Entity03Model : PageModel { public IEnumerable<string> Customers { get; set; } private Northwind db; public Entity03Model(Northwind injectedContext) { db = injectedContext; } public void OnGet() { ViewData["Title"] = "Customers Page"; // Customers = new[] { "first", "second", "third" }; Customers = db.Customers.Select(c => c.ContactName).ToArray(); } } }
25.827586
74
0.628838
0d893b0ade4cbbf795987cb71c12fbeb6ab65cdd
61
cs
C#
UltraStar Play/Packages/playshared/Runtime/UI/Dialogs/IDialogControl.cs
achimmihca/Play
027d8bb8f20e8f9b78d64bf1672ac9a4526c13f3
[ "MIT" ]
1
2019-08-28T22:28:55.000Z
2019-08-28T22:28:55.000Z
UltraStar Play/Packages/playshared/Runtime/UI/Dialogs/IDialogControl.cs
achimmihca/Play
027d8bb8f20e8f9b78d64bf1672ac9a4526c13f3
[ "MIT" ]
null
null
null
UltraStar Play/Packages/playshared/Runtime/UI/Dialogs/IDialogControl.cs
achimmihca/Play
027d8bb8f20e8f9b78d64bf1672ac9a4526c13f3
[ "MIT" ]
1
2019-09-09T14:43:51.000Z
2019-09-09T14:43:51.000Z
public interface IDialogControl { void CloseDialog(); }
12.2
32
0.721311
dc0dd3b64143644996c15faa556061c6aeb4924f
1,807
rb
Ruby
lib/search_config.rb
theodi/rummager
ffbcc34e3ebf06ef4b884b609fdb6a0abdc4d8b2
[ "MIT" ]
1
2016-10-25T16:52:52.000Z
2016-10-25T16:52:52.000Z
lib/search_config.rb
theodi/rummager
ffbcc34e3ebf06ef4b884b609fdb6a0abdc4d8b2
[ "MIT" ]
59
2015-08-18T13:09:27.000Z
2018-05-09T05:12:28.000Z
lib/search_config.rb
theodi/rummager
ffbcc34e3ebf06ef4b884b609fdb6a0abdc4d8b2
[ "MIT" ]
null
null
null
require "yaml" require "elasticsearch/search_server" require "schema_config" require "plek" class SearchConfig def search_server @server ||= Elasticsearch::SearchServer.new( ENV['QUIRKAFLEEG_ELASTICSEARCH_LOCATION'] || elasticsearch["base_uri"], schema_config, index_names, content_index_names, self, ) end def schema_config @schema ||= SchemaConfig.new(config_path) end def index_names content_index_names + auxiliary_index_names end def content_index_names elasticsearch["content_index_names"] || [] end def auxiliary_index_names elasticsearch["auxiliary_index_names"] || [] end def elasticsearch @elasticsearch ||= config_for("elasticsearch") end def document_series_registry_index elasticsearch["document_series_registry_index"] end def document_collection_registry_index elasticsearch["document_collection_registry_index"] end def organisation_registry_index elasticsearch["organisation_registry_index"] end def people_registry_index elasticsearch["people_registry_index"] end def topic_registry_index elasticsearch["topic_registry_index"] end def world_location_registry_index elasticsearch["world_location_registry_index"] end def govuk_index_names elasticsearch["govuk_index_names"] end def metasearch_index_name elasticsearch["metasearch_index_name"] end def popularity_rank_offset elasticsearch["popularity_rank_offset"] end private def config_path File.expand_path("../config/schema", File.dirname(__FILE__)) end def in_development_environment? %w{development test}.include?(ENV['RACK_ENV']) end def config_for(kind) YAML.load_file(File.expand_path("../#{kind}.yml", File.dirname(__FILE__))) end end
21.011628
78
0.750968
0a03db5d8f982f253b2c508eeac4ba3d3bdc313e
1,689
sql
SQL
query/compute/compute_vm_remote_access_restricted.sql
b-0-x/steampipe-mod-azure-compliance
c271a445bcbff1bdec6463a6a9d6e6d9481e8fe3
[ "Apache-2.0" ]
20
2021-05-19T22:33:58.000Z
2022-03-11T22:16:05.000Z
query/compute/compute_vm_remote_access_restricted.sql
b-0-x/steampipe-mod-azure-compliance
c271a445bcbff1bdec6463a6a9d6e6d9481e8fe3
[ "Apache-2.0" ]
41
2021-05-20T01:10:06.000Z
2022-01-24T15:42:14.000Z
query/compute/compute_vm_remote_access_restricted.sql
b-0-x/steampipe-mod-azure-compliance
c271a445bcbff1bdec6463a6a9d6e6d9481e8fe3
[ "Apache-2.0" ]
3
2022-01-20T08:26:14.000Z
2022-03-26T15:08:08.000Z
with network_sg as ( select distinct name as sg_name, network_interfaces from azure_network_security_group as nsg, jsonb_array_elements(security_rules) as sg, jsonb_array_elements_text(sg -> 'properties' -> 'destinationPortRanges' || (sg -> 'properties' -> 'destinationPortRange') :: jsonb) as dport, jsonb_array_elements_text(sg -> 'properties' -> 'sourceAddressPrefixes' || (sg -> 'properties' -> 'sourceAddressPrefix') :: jsonb) as sip where sg -> 'properties' ->> 'access' = 'Allow' and sg -> 'properties' ->> 'direction' = 'Inbound' and sg -> 'properties' ->> 'protocol' = 'TCP' and sip in ('*', '0.0.0.0', '0.0.0.0/0', 'Internet', '<nw>/0', '/0') and ( dport in ('22', '3389', '*') or ( dport like '%-%' and ( ( split_part(dport, '-', 1) :: integer <= 3389 and split_part(dport, '-', 2) :: integer >= 3389 ) or ( split_part(dport, '-', 1) :: integer <= 22 and split_part(dport, '-', 2) :: integer >= 22 ) ) ) ) ) select -- Required Columns vm.vm_id as resource, case when sg.sg_name is null then 'ok' else 'alarm' end as status, case when sg.sg_name is null then vm.title || ' restricts remote access from internet.' else vm.title || ' allows remote access from internet.' end as reason, -- Additional Dimensions vm.resource_group, sub.display_name as subscription from azure_compute_virtual_machine as vm left join network_sg as sg on sg.network_interfaces @> vm.network_interfaces join azure_subscription as sub on sub.subscription_id = vm.subscription_id;
33.78
145
0.609236
58c4ba9de209208112a04e31e0e82613159721a3
1,247
css
CSS
wp-content/plugins/accordions/assets/global/css/themesTabs.style.css
icebergsal/thetimesharefirm.com
63656fe8a790938aa4ebfa709929f00b0d9b9410
[ "MIT" ]
2
2019-03-18T06:44:03.000Z
2019-03-18T06:45:40.000Z
wp-content/plugins/accordions/assets/global/css/themesTabs.style.css
icebergsal/thetimesharefirm.com
63656fe8a790938aa4ebfa709929f00b0d9b9410
[ "MIT" ]
null
null
null
wp-content/plugins/accordions/assets/global/css/themesTabs.style.css
icebergsal/thetimesharefirm.com
63656fe8a790938aa4ebfa709929f00b0d9b9410
[ "MIT" ]
2
2019-03-18T06:33:08.000Z
2019-03-18T07:53:04.000Z
@charset "utf-8"; /* CSS Document */ .accordions-tabs { border: medium none !important; border-radius: 0 !important; } .accordions-tabs .ui-tabs-nav { background: rgba(0, 0, 0, 0) none repeat scroll 0 0; border: medium none; border-radius: 0; margin: 0 !important; padding: 0 !important; } .accordions-tabs .tabs-nav { margin: 0 !important; padding: 0 !important; } .accordions-tabs .ui-tabs-nav li a { outline: medium none; width: 100%; } .accordions-tabs .accordions-tab-icons { padding: 0 5px; } .accordions-tabs .accordions-tab-icons.accordions-tab-minus { display: none; } .accordions-tabs .ui-tabs-active .accordions-tab-plus{ display: none; } .accordions-tabs .ui-tabs-active .accordions-tab-minus{ display: inline-block; } .accordions-tabs .tabs-content { border-radius: 0; padding: 0; } /*Themes Flat*/ .accordions-tabs.flat { border: medium none; } .accordions-tabs.flat .tabs-nav { background: rgba(0, 0, 0, 0) none repeat scroll 0 0; border: 0 none; border-radius: 0; } .accordions-tabs.flat .tabs-content{}
12.106796
62
0.587811
29acf484fca07a95c60e095dfc5d2a733fab5d27
3,406
sql
SQL
src/test/regress/sql/psql_gp_commands.sql
gridgentoo/gpdb
f3dc101a7b4fa3d392f79cc5146b20c83894eb19
[ "PostgreSQL", "Apache-2.0" ]
1
2022-02-04T14:18:53.000Z
2022-02-04T14:18:53.000Z
src/test/regress/sql/psql_gp_commands.sql
gridgentoo/gpdb
f3dc101a7b4fa3d392f79cc5146b20c83894eb19
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/regress/sql/psql_gp_commands.sql
gridgentoo/gpdb
f3dc101a7b4fa3d392f79cc5146b20c83894eb19
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
-- -- Test \dx and \dx+, to display extensions. -- -- We just use gp_inject_fault as an example of an extension here. We don't -- inject any faults. -- start_ignore CREATE EXTENSION IF NOT EXISTS gp_inject_fault; -- end_ignore \dx gp_inject* \dx+ gp_inject* -- -- Test extended \du flags -- -- https://github.com/greenplum-db/gpdb/issues/1028 -- -- Problem: the cluster can be initialized with any Unix user -- therefore create specific test roles here, and only -- test the \du output for this role, also drop them afterwards CREATE ROLE test_psql_du_1 WITH SUPERUSER; \du test_psql_du_1 DROP ROLE test_psql_du_1; CREATE ROLE test_psql_du_2 WITH SUPERUSER CREATEDB CREATEROLE CREATEEXTTABLE LOGIN CONNECTION LIMIT 5; \du test_psql_du_2 DROP ROLE test_psql_du_2; -- pg_catalog.pg_roles.rolcreaterextgpfd CREATE ROLE test_psql_du_e1 WITH SUPERUSER CREATEEXTTABLE (type = 'readable', protocol = 'gpfdist'); \du test_psql_du_e1 DROP ROLE test_psql_du_e1; CREATE ROLE test_psql_du_e2 WITH SUPERUSER CREATEEXTTABLE (type = 'readable', protocol = 'gpfdists'); \du test_psql_du_e2 DROP ROLE test_psql_du_e2; -- pg_catalog.pg_roles.rolcreatewextgpfd CREATE ROLE test_psql_du_e3 WITH SUPERUSER CREATEEXTTABLE (type = 'writable', protocol = 'gpfdist'); \du test_psql_du_e3 DROP ROLE test_psql_du_e3; CREATE ROLE test_psql_du_e4 WITH SUPERUSER CREATEEXTTABLE (type = 'writable', protocol = 'gpfdists'); \du test_psql_du_e4 DROP ROLE test_psql_du_e4; -- pg_catalog.pg_roles.rolcreaterexthttp CREATE ROLE test_psql_du_e5 WITH SUPERUSER CREATEEXTTABLE (type = 'readable', protocol = 'http'); \du test_psql_du_e5 DROP ROLE test_psql_du_e5; -- does not exist CREATE ROLE test_psql_du_e6 WITH SUPERUSER CREATEEXTTABLE (type = 'writable', protocol = 'http'); \du test_psql_du_e6 DROP ROLE test_psql_du_e6; -- pg_catalog.pg_roles.rolcreaterexthdfs CREATE ROLE test_psql_du_e7 WITH SUPERUSER CREATEEXTTABLE (type = 'readable', protocol = 'gphdfs'); \du test_psql_du_e7 DROP ROLE test_psql_du_e7; -- pg_catalog.pg_roles.rolcreatewexthdfs CREATE ROLE test_psql_du_e8 WITH SUPERUSER CREATEEXTTABLE (type = 'writable', protocol = 'gphdfs'); \du test_psql_du_e8 DROP ROLE test_psql_du_e8; -- Test replication and verbose. GPDB specific attributes are mixed with PG attributes. -- Our role describe code is easy to be buggy when we merge with PG upstream code. -- The tests here are used to double-confirm the correctness of our role describe code. CREATE ROLE test_psql_du_e9 WITH SUPERUSER REPLICATION; COMMENT ON ROLE test_psql_du_e9 IS 'test_role_description'; \du test_psql_du_e9 \du+ test_psql_du_e9 DROP ROLE test_psql_du_e9; -- -- Test that \dE displays both external and foreign tables -- CREATE FOREIGN DATA WRAPPER dummy_wrapper; COMMENT ON FOREIGN DATA WRAPPER dummy_wrapper IS 'useless'; CREATE SERVER dummy_server FOREIGN DATA WRAPPER dummy_wrapper; CREATE FOREIGN TABLE "dE_foreign_table" (c1 integer) SERVER dummy_server; CREATE EXTERNAL TABLE "dE_external_table" (c1 integer) LOCATION ('file://localhost/dummy') FORMAT 'text'; -- Change the owner, so that the expected output is not sensitive to current -- username. CREATE ROLE test_psql_de_role; ALTER FOREIGN TABLE "dE_foreign_table" OWNER TO test_psql_de_role; ALTER EXTERNAL TABLE "dE_external_table" OWNER TO test_psql_de_role; \dE "dE"* -- Clean up DROP OWNED BY test_psql_de_role; DROP ROLE test_psql_de_role;
32.132075
102
0.788315
be13518cbc60d6173c9645399071d01329f16f99
4,764
tsx
TypeScript
src/components/icons/day.tsx
donaldboulton/publiuslogic.com
602eac858880c61752a1d7cc156ca37cf015b317
[ "0BSD" ]
2
2021-12-13T08:27:46.000Z
2021-12-13T23:22:04.000Z
src/components/icons/day.tsx
donaldboulton/publiuslogic.com
602eac858880c61752a1d7cc156ca37cf015b317
[ "0BSD" ]
1
2022-01-21T02:31:49.000Z
2022-01-21T02:39:54.000Z
src/components/icons/day.tsx
donaldboulton/publiuslogic.com
602eac858880c61752a1d7cc156ca37cf015b317
[ "0BSD" ]
null
null
null
import * as React from 'react' const Day: React.FC = () => { return ( <svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 51 51"> <g id="prefix__Group_143" data-name="Group 143" transform="translate(-15 -13)" className="fill-current text-white" > <path id="prefix__Path_85" fill="#0c1025" d="M25.5 0A25.5 25.5 0 1 1 0 25.5 25.5 25.5 0 0 1 25.5 0z" data-name="Path 85" transform="translate(15 13)" /> <g id="prefix__Group_137" data-name="Group 137" transform="translate(.217 3.408)"> <g id="prefix__Group_61" data-name="Group 61" transform="translate(35.662 30.588)"> <path id="prefix__Path_49" d="M3624.968-11.065a4.973 4.973 0 0 1-4.968-4.968 4.973 4.973 0 0 1 4.968-4.967 4.973 4.973 0 0 1 4.967 4.967 4.973 4.973 0 0 1-4.967 4.968zm0-8.37a3.407 3.407 0 0 0-3.4 3.4 3.407 3.407 0 0 0 3.4 3.4 3.407 3.407 0 0 0 3.4-3.4 3.407 3.407 0 0 0-3.4-3.4z" className="prefix__cls-2" data-name="Path 49" transform="translate(-3620.001 21)" /> </g> <g id="prefix__Group_62" data-name="Group 62" transform="translate(39.886 21.592)"> <path id="prefix__Path_50" d="M3674.783-129.429a.782.782 0 0 1-.783-.782v-5.007a.782.782 0 0 1 .783-.782.782.782 0 0 1 .781.782v5.007a.782.782 0 0 1-.781.782z" className="prefix__cls-2" data-name="Path 50" transform="translate(-3674.001 136)" /> </g> <g id="prefix__Group_63" data-name="Group 63" transform="translate(39.886 42.791)"> <path id="prefix__Path_51" d="M3674.783 141.571a.782.782 0 0 1-.783-.782v-5.007a.782.782 0 1 1 1.564 0v5.007a.782.782 0 0 1-.781.782z" className="prefix__cls-2" data-name="Path 51" transform="translate(-3674.001 -135)" /> </g> <g id="prefix__Group_64" data-name="Group 64" transform="translate(47.983 34.695)"> <path id="prefix__Path_52" d="M3783.289 33.065h-5.006a.782.782 0 1 1 0-1.565h5.006a.782.782 0 0 1 0 1.565z" className="prefix__cls-2" data-name="Path 52" transform="translate(-3777.5 -31.5)" /> </g> <g id="prefix__Group_65" data-name="Group 65" transform="translate(26.783 34.695)"> <path id="prefix__Path_53" d="M3512.289 33.065h-5.007a.782.782 0 0 1 0-1.565h5.007a.782.782 0 0 1 0 1.565z" className="prefix__cls-2" data-name="Path 53" transform="translate(-3506.5 -31.5)" /> </g> <g id="prefix__Group_66" data-name="Group 66" transform="translate(45.612 25.429)"> <path id="prefix__Path_54" d="M3747.968-81.836a.781.781 0 0 1-.553-.229.783.783 0 0 1 0-1.106l3.54-3.54a.783.783 0 0 1 1.107 0 .782.782 0 0 1 0 1.106l-3.54 3.54a.781.781 0 0 1-.554.229z" className="prefix__cls-2" data-name="Path 54" transform="translate(-3747.186 86.941)" /> </g> <g id="prefix__Group_67" data-name="Group 67" transform="translate(30.621 40.42)"> <path id="prefix__Path_55" d="M3556.342 109.79a.782.782 0 0 1-.553-1.335l3.54-3.54a.782.782 0 1 1 1.106 1.106l-3.54 3.54a.78.78 0 0 1-.553.229z" className="prefix__cls-2" data-name="Path 55" transform="translate(-3555.56 -104.685)" /> </g> <g id="prefix__Group_68" data-name="Group 68" transform="translate(30.621 25.429)"> <path id="prefix__Path_56" d="M3559.882-81.836a.781.781 0 0 1-.553-.229l-3.54-3.54a.782.782 0 0 1 0-1.106.782.782 0 0 1 1.106 0l3.54 3.54a.782.782 0 0 1 0 1.106.782.782 0 0 1-.553.229z" className="prefix__cls-2" data-name="Path 56" transform="translate(-3555.56 86.941)" /> </g> <g id="prefix__Group_69" data-name="Group 69" transform="translate(45.612 40.42)"> <path id="prefix__Path_57" d="M3751.508 109.79a.781.781 0 0 1-.553-.229l-3.54-3.54a.783.783 0 1 1 1.107-1.106l3.54 3.54a.782.782 0 0 1-.554 1.335z" className="prefix__cls-2" data-name="Path 57" transform="translate(-3747.186 -104.685)" /> </g> </g> </g> </svg> ) } export default Day
44.111111
267
0.52246
fae039ba1be0a191ef35c781d06d90190d53019b
2,910
lua
Lua
samples/hula/watch.lua
jj300426/hsm-statechart
4ab659a9ccda68c22b9d27514c65d73e2c368898
[ "BSD-3-Clause" ]
7
2016-06-02T12:02:46.000Z
2021-12-27T08:17:05.000Z
samples/hula/watch.lua
jj300426/hsm-statechart
4ab659a9ccda68c22b9d27514c65d73e2c368898
[ "BSD-3-Clause" ]
2
2016-09-26T23:02:42.000Z
2016-09-26T23:06:42.000Z
samples/hula/watch.lua
ionous/hsm-statechart
f0424892cac1208fece52af7f7d5a03994522ed2
[ "BSD-3-Clause" ]
2
2020-06-19T15:47:12.000Z
2021-01-26T08:07:41.000Z
---------------------------------------------------------------------------- -- Name: watch.lua -- Purpose: An command line stop watch that is meant to be run from C. -- Relies on platform specific functions not included in the rock. -- See: watch.wx.wlua for a runnable version. -- Created: July 2012 -- Copyright: Copyright (c) 2012, everMany, LLC. All rights reserved. -- Licence: hsm-statechart ---------------------------------------------------------------------------- require "hsm_statechart" ------------------------------------------------------------ local stop_watch_chart= { -- each state is represented as a table -- active is the top-most state active= { -- entry to the active state clears the watch's timer -- the watch is provided by machines using this chart entry= function(watch) watch.time=0 return watch end, -- reset causes a self transition which re-enters active -- and clears the time no matter which state the machine is in evt_reset = 'active', -- the active state is stopped by default: init = 'stopped', -- while the watch is stopped: stopped = { -- the toggle button starts the watch running evt_toggle = 'running', }, -- while the watch is running: running = { -- the toggle button stops the watch evt_toggle = 'stopped', -- the tick of time updates the watch evt_tick = function(watch, time) watch.time= watch.time + time end, } } } ------------------------------------------------------------ function run_watch_run() print([[Hula stopwatch sample. Keys: '1': reset button, '2': generic toggle button, 'x': quit.]]) -- create a simple representation of a watch local watch= { time = 0 } -- create a state machine with the chart, and the watch as context local hsm= hsm_statechart.new{ stop_watch_chart, context= watch } -- lookup table for mapping keyboard to events local key_to_event = { ["1"]='evt_reset', ["2"]='evt_toggle' } -- keep going until the watch breaks while hsm:is_running() do -- read one character local key= string.char( platform.get_key() ) if key == 'x' then break end -- change it into an event local event= key_to_event[key] -- send it to the statemachine if event then hsm:signal( event ) io.write( "." ) else -- otherwise mimic the passage of time local t= watch.time hsm:signal( 'evt_tick', 1 ) platform.sleep(500) if t ~= watch.time then io.write( watch.time, "," ) end end end end ------------------------------------------------------------ run_watch_run()
30.3125
80
0.520962
4bc3323da969d2e0b764d6a19c6cf7cda8ac9f12
168
cpp
C++
demos/http_demo.cpp
nathanmullenax83/rhizome
e7410341fdc4d38ab5aaecc55c94d3ac6efd51da
[ "MIT" ]
1
2020-07-11T14:53:38.000Z
2020-07-11T14:53:38.000Z
demos/http_demo.cpp
nathanmullenax83/rhizome
e7410341fdc4d38ab5aaecc55c94d3ac6efd51da
[ "MIT" ]
1
2020-07-04T16:45:49.000Z
2020-07-04T16:45:49.000Z
demos/http_demo.cpp
nathanmullenax83/rhizome
e7410341fdc4d38ab5aaecc55c94d3ac6efd51da
[ "MIT" ]
null
null
null
#include "http_demo.hpp" namespace rhizome { namespace demo { void http_demo() { rn::HTTPServer server(8080,10); } } }
16.8
43
0.505952
6de325c4777311ba0369ae4c7b75daf24d84ed95
1,117
h
C
ZumoBot.cydsn/ZumoLibrary/Accel_magnet.h
HaoZhang95/line-following-robot-car
ad073d7918df8bb10cf6337e1d0e285fcd658fff
[ "Apache-2.0" ]
null
null
null
ZumoBot.cydsn/ZumoLibrary/Accel_magnet.h
HaoZhang95/line-following-robot-car
ad073d7918df8bb10cf6337e1d0e285fcd658fff
[ "Apache-2.0" ]
null
null
null
ZumoBot.cydsn/ZumoLibrary/Accel_magnet.h
HaoZhang95/line-following-robot-car
ad073d7918df8bb10cf6337e1d0e285fcd658fff
[ "Apache-2.0" ]
1
2020-11-10T05:02:57.000Z
2020-11-10T05:02:57.000Z
/** * @file Accel_magnet.h * @brief Accelerometer and Magnetometer header file. * @details If you want to use Accelerometer methods, you need to include Accel_magnet.h file. Defining register address for basic setting up and reading sensor output values. */ #include <project.h> #include <stdio.h> #include <math.h> uint16 value_convert_magnet(uint8 AXIS_H, uint8 AXIS_L); void heading(double X_AXIS, double Y_AXIS); void value_convert_accel(uint16 X_AXIS, uint16 Y_AXIS, uint16 Z_AXIS); #define WHO_AM_I_ACCEL 0x0F #define ACCEL_MAG_ADDR 0x1D #define ACCEL_CTRL1_REG 0x20 #define ACCEL_CTRL7_REG 0x26 #define OUT_X_L_M 0x08 // Magnetometer output #define OUT_X_H_M 0x09 #define OUT_Y_L_M 0x0A #define OUT_Y_H_M 0x0B #define OUT_Z_L_M 0x0C #define OUT_Z_H_M 0x0D #define OUT_X_L_A 0x28 // Accelerometer output #define OUT_X_H_A 0x29 #define OUT_Y_L_A 0x2A #define OUT_Y_H_A 0x2B #define OUT_Z_L_A 0x2C #define OUT_Z_H_A 0x2D
31.027778
175
0.668756
fbf0d88203c31ed0271d5f21b5e7990a6b4df666
948
dart
Dart
ez_listenable_test/test/ez_listenable_test_test.dart
brianegan/ez_listenable
6dba2f0888592dcbcec4e97f0aa2f8d07273b7c0
[ "BSD-3-Clause" ]
3
2018-11-30T19:54:03.000Z
2018-12-03T05:21:00.000Z
ez_listenable_test/test/ez_listenable_test_test.dart
brianegan/ez_listenable
6dba2f0888592dcbcec4e97f0aa2f8d07273b7c0
[ "BSD-3-Clause" ]
null
null
null
ez_listenable_test/test/ez_listenable_test_test.dart
brianegan/ez_listenable
6dba2f0888592dcbcec4e97f0aa2f8d07273b7c0
[ "BSD-3-Clause" ]
null
null
null
import 'dart:async'; import 'package:ez_listenable/ez_listenable.dart'; import 'package:ez_listenable_test/ez_listenable_test.dart'; import 'package:test/test.dart'; void main() { group('Ez Test Utils', () { test('can verify first value that was notified', () { final ez = EzValue<int>(0); scheduleMicrotask(() { ez.value = 1; }); expect(ez, notifies(value(1))); }); test('can verify values in order', () { final ez = EzValue<int>(0); scheduleMicrotask(() { ez.value = 1; ez.value = 2; ez.value = 3; }); expect(ez, notifiesInOrder(<Matcher>[value(1), value(2), value(3)])); }); test('can verify a value was emitted at some point', () { final ez = EzValue<int>(0); scheduleMicrotask(() { ez.value = 1; ez.value = 2; ez.value = 3; }); expect(ez, notifiesThrough(value(3))); }); }); }
21.545455
75
0.552743
3f92693a458e7c1e0c7a1bf920b1d538ac13d8cc
6,584
php
PHP
application/libraries/Inventory.php
winskie/frogims
700666b33c209bbae3a7cae031956332abdb66bf
[ "MIT" ]
1
2018-06-20T21:39:28.000Z
2018-06-20T21:39:28.000Z
application/libraries/Inventory.php
winskie/frogims
700666b33c209bbae3a7cae031956332abdb66bf
[ "MIT" ]
1
2017-10-19T07:51:57.000Z
2017-10-19T07:51:57.000Z
application/libraries/Inventory.php
winskie/frogims
700666b33c209bbae3a7cae031956332abdb66bf
[ "MIT" ]
null
null
null
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Inventory extends Base_model { protected $store_id; protected $item_id; protected $parent_item_id; protected $quantity; protected $quantity_timestamp; protected $buffer_level; protected $reserved; protected $item; public function __construct() { parent::__construct(); $this->primary_table = 'store_inventory'; $this->db_fields = array( 'store_id' => array( 'type' => 'integer' ), 'item_id' => array( 'type' => 'integer' ), 'parent_item_id' => array( 'type' => 'integer' ), 'quantity' => array( 'type' => 'decimal' ), 'quantity_timestamp' => array( 'type' => 'datetime' ), 'buffer_level' => array( 'type' => 'decimal' ), 'reserved' => array( 'type' => 'decimal' ), ); } public function get_item() { if( isset( $this->item ) ) { return $this->item; } if( ! isset( $this->item_id ) ) { return NULL; } $ci =& get_instance(); $ci->load->library( 'item' ); $Item = new Item(); $this->item = $Item->get_by_id( $this->item_id ); return $this->item; } public function get_categories() { $ci =& get_instance(); $ci->load->library( 'category' ); $ci->db->select( 'c.*' ); $ci->db->where( 'ic_item_id', $this->item_id ); $ci->db->join( 'categories c', 'c.id = ic_category_id', 'left' ); $query = $ci->db->get( 'item_categories' ); return $query->custom_result_object( 'Category' ); } public function get_by_store_item( $store_id, $item_id, $parent_item_id = NULL, $create = FALSE ) { $ci =& get_instance(); $ci->db->where( 'store_id', $store_id ); $ci->db->where( 'item_id', $item_id ); if( is_null( $parent_item_id ) ) { $ci->db->where( 'parent_item_id IS NULL' ); } else { $ci->db->where( 'parent_item_id', $parent_item_id ); } $ci->db->limit( 1 ); $query = $ci->db->get( $this->primary_table ); if( $query->num_rows() ) { return $query->row( 0, get_class( $this ) ); } elseif( $create ) { $ci->load->library( 'store' ); $ci->load->library( 'item' ); $Store = new Store(); $Item = new Item(); $store = $Store->get_by_id( $store_id ); $new_item = $Item->get_by_id( $item_id ); if( empty( $store ) || empty( $new_item ) ) { return NULL; } return $store->add_item( $new_item, $parent_item_id ); } return NULL; } public function get_by_store_item_name( $store_id, $item_name, $parent_item_name = NULL ) { $ci =& get_instance(); $ci->db->select( 'a.*' ); $ci->db->join( 'items i', 'i.id = a.item_id', 'left' ); $ci->db->join( 'items pi', 'pi.id = a.parent_item_id', 'left' ); $ci->db->where( 'a.store_id', $store_id ); $ci->db->where( 'i.item_name', $item_name ); if( is_null( $parent_item_name ) ) { $ci->db->where( 'pi.item_name IS NULL' ); } else { $ci->db->where( 'pi.item_name', $parent_item_name ); } $ci->db->limit( 1 ); $query = $ci->db->get( $this->primary_table.' a' ); if( $query->num_rows() ) { return $query->row( 0, get_class( $this ) ); } return NULL; } public function get_transactions( $params = array() ) { $ci =& get_instance(); $ci->load->library( 'transaction' ); $limit = param( $params, 'limit' ); $offset = param( $params, 'offset' ); $format = param( $params, 'format' ); $order = param( $params, 'order', 'transaction_datetime DESC' ); if( $limit ) { $ci->db->limit( $limit, is_null( $offset ) ? 0 : $offset ); } if( $order ) { $ci->db->order_by( $order ); } $ci->db->where( 'store_inventory_id', intval( $this->id ) ); $query = $ci->db->get( 'transactions' ); if( $format ) { return $query->result_array(); } return $query->result( 'Transaction' ); } public function get_transactions_by_date( $start_date, $end_date ) { $ci &= get_instance(); $ci->db->where( 'store_id', $this->store_id ); $ci->db->where( 'item_id', $this->item_id ); $ci->db->where( 'transaction_datetime >=', $start_date ); $ci->db->where( 'transaction_datetime <=', $end_date ); $query = $this->db->get( $this->primary_table ); return $query->result( get_class( $this ) ); } public function transact( $transaction_type, $quantity, $datetime, $reference_id, $reference_item_id = NULL, $category_id = NULL ) { $ci =& get_instance(); // Update current inventory levels $new_quantity = $this->quantity + $quantity; $timestamp = date( TIMESTAMP_FORMAT ); $current_shift = $ci->session->current_shift_id; $ci->db->trans_start(); $this->set( 'quantity', ( double ) $new_quantity ); $this->set( 'quantity_timestamp', $timestamp ); $this->db_save(); // Generate inventory transaction record $ci->db->set( 'store_inventory_id', $this->id ); $ci->db->set( 'transaction_type', $transaction_type ); $ci->db->set( 'transaction_date', date( DATE_FORMAT, strtotime( $datetime ) ) ); $ci->db->set( 'transaction_datetime', date( TIMESTAMP_FORMAT, strtotime( $datetime ) ) ); $ci->db->set( 'transaction_shift', $current_shift ); $ci->db->set( 'transaction_category_id', $category_id ); $ci->db->set( 'transaction_quantity', ( double ) $quantity ); $ci->db->set( 'current_quantity', ( double ) $new_quantity ); $ci->db->set( 'transaction_id', $reference_id); $ci->db->set( 'transaction_item_id', $reference_item_id ); $ci->db->set( 'transaction_timestamp', $timestamp ); $ci->db->insert( 'transactions' ); $ci->db->trans_complete(); return $ci->db->trans_status(); } public function reserve( $quantity ) { $ci =& get_instance(); $new_reserved_quantity = $this->reserved + $quantity; $ci->db->trans_start(); $this->set( 'reserved', ( double ) $new_reserved_quantity ); $this->db_save(); $ci->db->trans_complete(); if( $ci->db->trans_status() ) { return $new_reserved_quantity; } return FALSE; } public function adjust( $quantity, $reason, $status ) { $ci =& get_instance(); $ci->load->library( 'adjustment' ); $adjustment = new Adjustment(); $ci->db->trans_start(); $adjustment->set( 'store_inventory_id', $this->id ); $adjustment->set( 'adjustment_type', ADJUSTMENT_TYPE_ACTUAL ); $adjustment->set( 'adjusted_quantity', ( double ) $quantity ); $adjustment->set( 'previous_quantity', ( double ) $this->quantity ); $adjustment->set( 'reason', $reason ); $adjustment->set( 'adjustment_status', ADJUSTMENT_PENDING ); $adjustment->set( 'user_id', $ci->session->current_user_id ); $adjustment->db_save(); $ci->db->trans_complete(); if( $ci->db->trans_status() ) { return TRUE; } return FALSE; } }
25.034221
131
0.617102
af7a0870b303972540b6f8525f90c04e975045b3
1,933
py
Python
ecomm/migrations/0001_initial.py
areebbeigh/greenspace-demo
0754f3b50e845bd5e50239361239f9b0b8aba42b
[ "Apache-2.0" ]
1
2020-07-06T05:53:12.000Z
2020-07-06T05:53:12.000Z
ecomm/migrations/0001_initial.py
areebbeigh/greenspace-demo
0754f3b50e845bd5e50239361239f9b0b8aba42b
[ "Apache-2.0" ]
1
2020-06-11T15:51:49.000Z
2020-06-11T16:10:31.000Z
ecomm/migrations/0001_initial.py
areebbeigh/greenspace-demo
0754f3b50e845bd5e50239361239f9b0b8aba42b
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2 on 2020-06-11 11:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Product', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=200, null=True)), ('price', models.FloatField(null=True)), ('description', models.TextField(blank=True, max_length=200, null=True)), ('image', models.ImageField(upload_to='')), ('date_created', models.DateTimeField(auto_now_add=True, null=True)), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('status', models.CharField(choices=[('Pending', 'Pending'), ('Canceled', 'Canceled'), ('Delivered', 'Delivered')], default='Pending', max_length=200)), ('date_created', models.DateTimeField(auto_now_add=True, null=True)), ('buyer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orders_placed', to=settings.AUTH_USER_MODEL)), ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecomm.Product')), ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orders_received', to=settings.AUTH_USER_MODEL)), ], ), ]
47.146341
168
0.629074
643d957019a052f5c4aadcbde260636fc78a6929
101
py
Python
game/user.py
luiszun/scrambled
4293a90e50678b38ecc0d69f2299ba487dbe0c27
[ "Apache-2.0" ]
null
null
null
game/user.py
luiszun/scrambled
4293a90e50678b38ecc0d69f2299ba487dbe0c27
[ "Apache-2.0" ]
null
null
null
game/user.py
luiszun/scrambled
4293a90e50678b38ecc0d69f2299ba487dbe0c27
[ "Apache-2.0" ]
null
null
null
from match import Match class User: def __init__(self, userId): self.userId = userId
20.2
32
0.653465
fd6edc43388d9a032a1f8254ce7c17a9e4fe5dea
1,840
css
CSS
mobile.css
boredblue/music-player
027c44a72d65000039d458b845f7a7332fe64e27
[ "MIT" ]
null
null
null
mobile.css
boredblue/music-player
027c44a72d65000039d458b845f7a7332fe64e27
[ "MIT" ]
null
null
null
mobile.css
boredblue/music-player
027c44a72d65000039d458b845f7a7332fe64e27
[ "MIT" ]
null
null
null
@media only screen and (max-width: 700px) { * { -webkit-tap-highlight-color: transparent; } .progress-bar { width: 100%; } .under-progress { display: grid; grid-template-areas: "title navigation"; grid-template-columns: 100px 1fr; } .navigation { display: grid; grid-area: navigation; grid-template-areas: "prev play next" "volume volume menu"; grid-template-columns: 50px 1fr 50px; grid-template-rows: repeat (2, 100px); margin: 0 30px 20px 10px; padding-right: 0; } .song-title { grid-area: title; margin: 0 30px 0 20px; height: 70px; width: 70px; font-size: 0.8rem; } #prev { grid-area: prev; } #play { margin: auto; grid-area: play; } #next { grid-area: next; } .volume-section { display: grid; grid-area: volume; grid-template-areas: "vbtn vbar"; grid-template-columns: 50px, 1fr; grid-template-rows: 1fr; } #volume { grid-area: vbtn; } .volume-bar { grid-area: vbar; width: 70%; max-width: 100px; height: 8px; } #menu { grid-area: menu; } footer { font-size: 0.5rem; } .action-btn { width: 40px; height: 40px; font-size: 14px; border-radius: 10px; margin: 5px; } .song-menu { width: 200px; right: 5px; bottom: 25%; } .song-menu > button { font-size: 0.6rem; } /* All buttons glowing */ /* .glow-on-hover:before, .volume-bar:before, .song-menu > button.active-song:before { opacity: 1; } */ .glow-on-hover:hover:before, .volume-bar:hover:before { opacity: 0; } .glow-on-hover:active:before, .volume-bar:active:before { opacity: 1; } .glow-on-hover:before, .volume-bar:before { transition: none; } #canvas { margin-bottom: 2px; } }
17.037037
45
0.577174
dabfb0c2201c6f6b614652b5d51d8fc6f12dbbf2
1,130
tsx
TypeScript
src/utils/formDataUtils.tsx
Xavyr/masters_of_mechanisms_frontend
64364f94ab55b5d1bf289ad648af6e1a3f00bc58
[ "MIT" ]
null
null
null
src/utils/formDataUtils.tsx
Xavyr/masters_of_mechanisms_frontend
64364f94ab55b5d1bf289ad648af6e1a3f00bc58
[ "MIT" ]
4
2021-12-09T03:01:03.000Z
2022-02-27T11:22:08.000Z
src/utils/formDataUtils.tsx
Xavyr/masters_of_mechanisms_frontend
64364f94ab55b5d1bf289ad648af6e1a3f00bc58
[ "MIT" ]
null
null
null
export const cleanQuotes = (quotes, name) => { return quotes .map(entity => { if (!entity.message) return; entity["titan"] = name; return entity; }) .filter(el => el); }; export const cleanPractices = (practices, name) => { return practices .map(entity => { if (!entity.practice || !entity.description) return; entity["titan"] = name; return entity; }) .filter(el => el); }; export const cleanParadigms = (paradigms, name) => { return paradigms .map(entity => { if (!entity.paradigm || !entity.background) return; entity["titan"] = name; return entity; }) .filter(el => el); }; export const cleanRoutines = (routines, name) => { return routines .map(entity => { if (!entity.routine) return; entity["titan"] = name; return entity; }) .filter(el => el); }; export const cleanInspirationals = (inspirationals, name) => { return inspirationals .map(entity => { if (!entity.source || !entity.story) return; entity["titan"] = name; return entity; }) .filter(el => el); };
22.6
62
0.573451
2bdead8a0de4e206bf37a119741918a6fef93ffb
760
rb
Ruby
examples/preapproval/charge_preapproval.rb
leodcs/pagseguro-sdk-ruby
a6b24924ec495f23fec813a3013ae7c6654cefaa
[ "Apache-2.0" ]
130
2015-02-10T02:17:46.000Z
2020-05-06T15:36:00.000Z
examples/preapproval/charge_preapproval.rb
leodcs/pagseguro-sdk-ruby
a6b24924ec495f23fec813a3013ae7c6654cefaa
[ "Apache-2.0" ]
82
2015-02-18T14:07:44.000Z
2020-06-25T20:19:22.000Z
examples/preapproval/charge_preapproval.rb
leodcs/pagseguro-sdk-ruby
a6b24924ec495f23fec813a3013ae7c6654cefaa
[ "Apache-2.0" ]
127
2015-02-17T05:47:33.000Z
2020-06-25T05:04:22.000Z
require_relative '../boot' # Charge a Manual Subscription. # # You also can set your AccountCredentials (EMAIL, TOKEN) in the application # config. # # See the boot file example for more details. email = 'EMAIL' token = 'TOKEN' charger = PagSeguro::ManualSubscriptionCharger.new( reference: 'REFERENCE', subscription_code: 'SUBSCRIPTION_CODE', ) charger.items << { id: '0001', description: 'Seguro contra roubo', amount: 100.0, quantity: 1 } # Edit the lines above. charger.credentials = PagSeguro::AccountCredentials.new(email, token) charger.create if charger.errors.any? puts '=> ERRORS' puts charger.errors.join("\n") else print '=> Subscription was corrected charged, the transaction code is ' puts charger.transaction_code end
20.540541
76
0.731579
79f13b0333f68c27be8d97bd4f458983c93c3d72
1,215
php
PHP
database/migrations/2020_07_01_111553__table_order_.php
novianto007/brodewijk
9874924602517e892dedc312a09d0cc4ec628884
[ "MIT" ]
null
null
null
database/migrations/2020_07_01_111553__table_order_.php
novianto007/brodewijk
9874924602517e892dedc312a09d0cc4ec628884
[ "MIT" ]
1
2021-02-02T16:33:06.000Z
2021-02-02T16:33:06.000Z
database/migrations/2020_07_01_111553__table_order_.php
novianto007/brodewijk
9874924602517e892dedc312a09d0cc4ec628884
[ "MIT" ]
null
null
null
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class TableOrder extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('orders', function (Blueprint $table) { $table->id(); $table->bigInteger('customer_id'); $table->string("email", 80); $table->string("full_name", 100); $table->string("phone_number", 15); $table->double('total_price'); $table->timestamp('deadline')->nullable(); $table->string('promo_code', 100)->nullable(); $table->double('discount_price')->default(0); $table->string('order_product_ids', 150); $table->text('shipment_address'); $table->text('shipment_note'); $table->string('snap_token')->nullable(); $table->integer('status')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('orders'); } }
27
62
0.544033
de882c87b7c0d7f6a50f82ba33e6df1366537144
1,244
swift
Swift
PinPoint/Cells/InterestCell.swift
AaronCab/PinPoint
80a68bbe2c535288c515b971949354624931f164
[ "MIT" ]
1
2019-05-29T21:12:23.000Z
2019-05-29T21:12:23.000Z
PinPoint/Cells/InterestCell.swift
AaronCab/PinPoint
80a68bbe2c535288c515b971949354624931f164
[ "MIT" ]
5
2019-04-09T20:42:47.000Z
2019-05-10T15:55:57.000Z
PinPoint/Cells/InterestCell.swift
AaronCab/PinPoint
80a68bbe2c535288c515b971949354624931f164
[ "MIT" ]
null
null
null
// // InterestCell.swift // PinPoint // // Created by Aaron Cabreja on 4/10/19. // Copyright © 2019 Pursuit. All rights reserved. // import UIKit class InterestCell: UICollectionViewCell { public lazy var collectionNameLabel: UILabel = { let label = UILabel() label.backgroundColor = .white return label }() override init(frame: CGRect) { super.init(frame: frame) commonInit() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) commonInit() } private func commonInit(){ setupCollectionNameLabel() } private func setupCollectionNameLabel() { addSubview(collectionNameLabel) collectionNameLabel.translatesAutoresizingMaskIntoConstraints = false collectionNameLabel.topAnchor.constraint(equalTo: topAnchor, constant: 10).isActive = true collectionNameLabel.widthAnchor.constraint(equalTo: widthAnchor, multiplier: 0.95).isActive = true collectionNameLabel.heightAnchor.constraint(equalTo: heightAnchor, multiplier: 0.1).isActive = true collectionNameLabel.centerXAnchor.constraint(equalTo: centerXAnchor).isActive = true } }
28.272727
107
0.671222
0a44ca9977d4b3e2f0120325cb57a52c10e5c0a2
816
cs
C#
JWT/jws/HmacSha512.cs
senzacionale/jwt-portable-dotnet
af7435096c1aca3ca374136c3677c0e547ccda44
[ "CC0-1.0" ]
9
2015-06-24T17:46:52.000Z
2020-03-01T09:54:49.000Z
JWT/jws/HmacSha512.cs
senzacionale/jwt-portable-dotnet
af7435096c1aca3ca374136c3677c0e547ccda44
[ "CC0-1.0" ]
1
2021-11-21T06:00:53.000Z
2021-11-21T06:29:34.000Z
JWT/jws/HmacSha512.cs
senzacionale/jwt-portable-dotnet
af7435096c1aca3ca374136c3677c0e547ccda44
[ "CC0-1.0" ]
6
2016-03-14T03:25:54.000Z
2020-11-24T14:31:18.000Z
using System; using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Macs; using Org.BouncyCastle.Crypto.Parameters; namespace JWT.jws { public class HmacSha512 { private readonly HMac _hmac; public HmacSha512(byte[] key) { var sharedKey = Ensure.Type<byte[]>(key, "HmacSha512 alg expectes key to be byte[] array."); _hmac = new HMac(new Sha512Digest()); _hmac.Init(new KeyParameter(key)); } public byte[] ComputeHash(byte[] value) { if (value == null) throw new ArgumentNullException("value"); byte[] resBuf = new byte[_hmac.GetMacSize()]; _hmac.BlockUpdate(value, 0, value.Length); _hmac.DoFinal(resBuf, 0); return resBuf; } } }
25.5
104
0.593137
bd1e72a3096cee0d7737e641366b12d35e82bb92
428
ps1
PowerShell
scripts/run-scanner-sonarqube.ps1
codedesignplus/CodeDesignPlus.Redis
f68924cab2cec0fbedd86bc19e13fc4ef5993eae
[ "MIT" ]
7
2021-05-23T22:45:33.000Z
2022-03-02T04:19:33.000Z
scripts/run-scanner-sonarqube.ps1
codedesignplus/CodeDesignPlus.Redis
f68924cab2cec0fbedd86bc19e13fc4ef5993eae
[ "MIT" ]
null
null
null
scripts/run-scanner-sonarqube.ps1
codedesignplus/CodeDesignPlus.Redis
f68924cab2cec0fbedd86bc19e13fc4ef5993eae
[ "MIT" ]
2
2021-08-08T13:13:01.000Z
2021-11-19T23:08:49.000Z
cd .. # Vars $path = "tests\CodeDesignPlus.Redis.Test" $project = "$path\CodeDesignPlus.Redis.Test.csproj" $report = "$path\coverage.opencover.xml" # Run Sonnar Scanner dotnet test $project /p:CollectCoverage=true /p:CoverletOutputFormat=opencover dotnet sonarscanner begin /k:"CodeDesignPlus.Redis" /d:sonar.cs.opencover.reportsPaths="$report" /d:sonar.coverage.exclusions="**Test*.cs" dotnet build dotnet sonarscanner end
28.533333
138
0.773364
c669997397f32a6f0d04ed462ba6502c9cf9848c
279
rs
Rust
diesel_compile_tests/tests/fail/derive/tuple_struct.rs
AlisCode/diesel
a213fe232a122f35a812b0ce0269708a1845a4c9
[ "Apache-2.0", "MIT" ]
1
2022-01-12T07:28:45.000Z
2022-01-12T07:28:45.000Z
diesel_compile_tests/tests/fail/derive/tuple_struct.rs
AlisCode/diesel
a213fe232a122f35a812b0ce0269708a1845a4c9
[ "Apache-2.0", "MIT" ]
null
null
null
diesel_compile_tests/tests/fail/derive/tuple_struct.rs
AlisCode/diesel
a213fe232a122f35a812b0ce0269708a1845a4c9
[ "Apache-2.0", "MIT" ]
null
null
null
#[macro_use] extern crate diesel; table! { users { id -> Integer, name -> Text, hair_color -> Nullable<Text>, } } #[derive(AsChangeset)] #[diesel(table_name = users)] struct User(i32, #[diesel(column_name = name)] String, String); fn main() {}
16.411765
63
0.591398
5b1c148ea232382d6fb90dc3f4dd1486a9e9d22f
120
swift
Swift
PokemonDisplay/State/NetworkUtility/PokemonNetwork.swift
hgtlzyc/PokemonDisplay
ac3c15d254e3f18bbc8d408280854beab7b51449
[ "MIT" ]
null
null
null
PokemonDisplay/State/NetworkUtility/PokemonNetwork.swift
hgtlzyc/PokemonDisplay
ac3c15d254e3f18bbc8d408280854beab7b51449
[ "MIT" ]
null
null
null
PokemonDisplay/State/NetworkUtility/PokemonNetwork.swift
hgtlzyc/PokemonDisplay
ac3c15d254e3f18bbc8d408280854beab7b51449
[ "MIT" ]
null
null
null
// // PokemonNetwork.swift // PokemonDisplay // // Created by lijia xu on 6/13/21. // import SwiftUI import Combine
12
35
0.683333
a19a9d655f1b63ccd44f5617d12eed8e3dba1638
872
tsx
TypeScript
src/icons/bed-outline.tsx
justdanallen/chakra-ui-ionicons
5392d61fc383ebdd1483bf4550eb809b3a9b893c
[ "MIT" ]
6
2021-01-31T09:32:37.000Z
2021-02-10T16:21:46.000Z
src/icons/bed-outline.tsx
justdanallen/chakra-ui-ionicons
5392d61fc383ebdd1483bf4550eb809b3a9b893c
[ "MIT" ]
1
2021-02-01T12:11:32.000Z
2021-02-01T12:11:32.000Z
src/icons/bed-outline.tsx
justdanallen/chakra-ui-ionicons
5392d61fc383ebdd1483bf4550eb809b3a9b893c
[ "MIT" ]
2
2021-01-31T09:32:40.000Z
2022-03-25T23:51:52.000Z
import React from 'react'; import { Icon, IconProps } from '@chakra-ui/icon'; export const BedOutlineIcon = (props: IconProps) => ( <Icon viewBox="0 0 512 512" fill="currentcolor" stroke="currentcolor" {...props} > <path d="M384 240H96V136a40.12 40.12 0 0140-40h240a40.12 40.12 0 0140 40v104zM48 416V304a64.19 64.19 0 0164-64h288a64.19 64.19 0 0164 64v112" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="32" /> <path d="M48 416v-8a24.07 24.07 0 0124-24h368a24.07 24.07 0 0124 24v8M112 240v-16a32.09 32.09 0 0132-32h80a32.09 32.09 0 0132 32v16M256 240v-16a32.09 32.09 0 0132-32h80a32.09 32.09 0 0132 32v16" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="32" /> </Icon> );
30.068966
194
0.647936
b2b772a12384eefae47f7052cc20d59c611576a0
1,396
css
CSS
WordSearch02/wwwroot/css/styles.css
devinmounts/WordSearch02.Solution
7cf6be99a66a7c18e1657b8f8a25b33a919cc1b8
[ "MIT" ]
null
null
null
WordSearch02/wwwroot/css/styles.css
devinmounts/WordSearch02.Solution
7cf6be99a66a7c18e1657b8f8a25b33a919cc1b8
[ "MIT" ]
null
null
null
WordSearch02/wwwroot/css/styles.css
devinmounts/WordSearch02.Solution
7cf6be99a66a7c18e1657b8f8a25b33a919cc1b8
[ "MIT" ]
null
null
null
body { background-image: url("../images/mar.png"); font-family: serif; } .container .jumbotron { border-radius: 0px 0px 6px 6px; background-color: #547dc0cf; } .panel-body { background-color: #4b13095e; font-size: 1em; } .panel { background-color: #ffffff66; } .panel-heading h4 { background-color: #f5f5f5ab; font-size: 2.5em; } .panel-heading { background-color: #f5f5f5ab; } .jumbotron-icon { display: inline-block; margin-left: 100px; } .form-control { background-color: #ffffffad; padding: 20px; font-size: 1.5em; } label { font-size: 2em; } .fancy-shadow { text-shadow: 1px 1px 10px #ada4a4; } .btn { background-color: #512115; border-color: #552519; transition: 1s; } .btn:hover { transition: 1s; background-color: #b32d07; border-color: #552519; box-shadow: 2px 2px 20px #4e4e4e; } .btn:disabled { background-color: #736c6b; border-color: #736c6b; } a { color: #fff; } a:hover { color: #fff; } .word-history { text-align: center; } .grid-container { display: grid; grid-template-columns: auto auto; background-color: #3d0f0a; padding: 10px; } .grid-item { background-color: #7e5d51; border: 1px solid #f7f7f759; padding: 20px; font-size: 30px; text-align: center; }
15.173913
47
0.595272
fef07bed0b2f180d6490624f0fd5015f0b56350b
633
lua
Lua
Dominos_Progress/localization/localization.it.lua
Swanarog/Dominos
a87bb069e5d98fc72780124d3b4809fe319c98c0
[ "BSD-3-Clause" ]
53
2015-01-31T12:18:07.000Z
2022-02-11T06:21:28.000Z
Dominos_Progress/localization/localization.it.lua
Swanarog/Dominos
a87bb069e5d98fc72780124d3b4809fe319c98c0
[ "BSD-3-Clause" ]
413
2015-01-01T15:48:40.000Z
2022-03-27T16:14:27.000Z
Dominos_Progress/localization/localization.it.lua
Swanarog/Dominos
a87bb069e5d98fc72780124d3b4809fe319c98c0
[ "BSD-3-Clause" ]
40
2015-01-12T06:50:54.000Z
2022-01-06T06:20:04.000Z
--[[Dominos XP Localization - Italian]] local L = LibStub('AceLocale-3.0'):NewLocale('Dominos-Progress', 'itIT') if not L then return end L.Texture = 'Motivo' L.Width = 'Larghezza' L.Height = 'Altezza' L.AlwaysShowText = 'Mostra sempre il testo' L.Segmented = 'Segmentato' L.Font = 'Carattere' L.AutoSwitchModes = 'Scambio Automatico' L.Display_label = 'Mostra le Etichette' L.Display_value = 'Mostra il valore Corrente' L.Display_max = 'Mostra il valore Massimo' L.Display_bonus = 'Mostra Bonus/Riposo' L.Display_percent = 'Mostra la Percentuale' L.Display_remaining = 'Mostra il Rimanente' L.CompressValues = 'Comprimi i Valori'
31.65
72
0.748815
383dc38404b6b101ce12ae393504f8919da0bd63
806
php
PHP
base/application/helpers/contacto_helper.php
JeremyMezon/Tarea-base-de-datos
6a34e9274ada5491d392294714c6364a1f72ed2a
[ "MIT" ]
null
null
null
base/application/helpers/contacto_helper.php
JeremyMezon/Tarea-base-de-datos
6a34e9274ada5491d392294714c6364a1f72ed2a
[ "MIT" ]
3
2020-07-17T02:41:15.000Z
2022-02-12T10:39:57.000Z
base/application/helpers/contacto_helper.php
JeremyMezon/Tarea-base-de-datos
6a34e9274ada5491d392294714c6364a1f72ed2a
[ "MIT" ]
null
null
null
<?php class contacto { static function guardar($persona){ $CI =& get_instance(); if(isset($persona['id']) && $persona['id'] > 0){ $CI->db->where('id',$persona['id']); $CI->db->update('contactos',$persona); }else{ $CI->db->insert('contactos',$persona); } } static function borrar($id){ $CI =& get_instance(); $sql = "delete from contactos where id=?"; $CI->db->query($sql,[$id]); } static function mostrar(){ $CI =& get_instance(); $rs = $CI->db->get('contactos')->result(); return $rs; } static function editar($id){ $CI =& get_instance(); $CI->db->where('id',$id); $rs = $CI->db->get('contactos')->result(); return $rs; } }
24.424242
56
0.480149
2cae829ee97b4b1462c02bc6d4ee498365c91ec4
2,133
py
Python
venv/Lib/site-packages/frontend/events/ui/mouse/mouse.py
mysnyldz/Tez-Analizi-Tarama
47e149bbd6a9e865e9242e50fb7ca1a18adfc640
[ "MIT" ]
1
2022-01-18T17:56:51.000Z
2022-01-18T17:56:51.000Z
venv/Lib/site-packages/frontend/events/ui/mouse/mouse.py
mysnyldz/Tez-Analizi
47e149bbd6a9e865e9242e50fb7ca1a18adfc640
[ "MIT" ]
null
null
null
venv/Lib/site-packages/frontend/events/ui/mouse/mouse.py
mysnyldz/Tez-Analizi
47e149bbd6a9e865e9242e50fb7ca1a18adfc640
[ "MIT" ]
null
null
null
from __future__ import annotations from enum import IntEnum from typing import List, Optional, TYPE_CHECKING from ..ui import UIEvent __all__ = ['MouseEvent', 'MouseButton'] class MouseButton(IntEnum): MAIN_LEFT = 0 AUXILIARY_WHEEL_MIDDLE = 1 SECONDARY_RIGHT = 2 FOURTH_BROWSERBACK = 3 FOURTH_BROWSERFORWARD = 4 class MouseEvent(UIEvent): __interface_for__ = {'click', 'dblclick', 'mouseup', 'mousedown'} @property def alt_key(self) -> bool: return self.__data__['altKey'] @property def ctrl_key(self) -> bool: return self.__data__['ctrlKey'] @property def meta_key(self) -> bool: return self.__data__['metaKey'] @property def shift_key(self) -> bool: return self.__data__['shiftKey'] @property def button(self) -> MouseButton: return MouseButton(self.__data__['button']) @property def buttons(self) -> List[MouseButton]: return [MouseButton(item) for item in self.__data__['buttons']] @property def client_x(self) -> int: return self.__data__['clientX'] @property def client_y(self) -> int: return self.__data__['clientY'] @property def movement_x(self) -> int: return self.__data__['movementX'] @property def movement_y(self) -> int: return self.__data__['movementY'] @property def offset_x(self) -> int: return self.__data__['offsetX'] @property def offset_y(self) -> int: return self.__data__['offsetY'] @property def screen_x(self) -> int: return self.__data__['screenX'] @property def screen_y(self) -> int: return self.__data__['screenY'] @property def x(self) -> int: return self.__data__['x'] @property def y(self) -> int: return self.__data__['y'] @property def region(self) -> int: return self.__data__['region'] @property def related_target(self) -> Optional[dom.Base]: return super().__get_dom_node__(int(self.__data__['relatedTarget'])) if TYPE_CHECKING: from .... import dom
21.989691
76
0.632443
1ab04edf3c9e2d0f1e37e055a38bf6a1652d4c09
9,355
py
Python
chronologicon/output.py
rutherfordcraze/chronologicon
75bca2e76ea7ee085542a736d982994773d0f5fc
[ "MIT" ]
103
2017-08-27T18:36:13.000Z
2022-02-19T04:08:58.000Z
chronologicon/output.py
rutherfordcraze/chronologicon
75bca2e76ea7ee085542a736d982994773d0f5fc
[ "MIT" ]
2
2018-11-22T15:07:18.000Z
2021-04-09T09:20:25.000Z
chronologicon/output.py
rutherfordcraze/chronologicon
75bca2e76ea7ee085542a736d982994773d0f5fc
[ "MIT" ]
11
2017-08-28T23:55:47.000Z
2021-12-11T18:19:30.000Z
# -*- coding: utf-8 -*- # Chronologicon v5.x # Rutherford Craze # https://craze.co.uk # 181028 import operator import datetime import chronologicon from chronologicon.terminalsize import get_terminal_size from chronologicon.strings import Message STATS_FILENAME = chronologicon.STATS_FILENAME STATS = {} LOGS_FILENAME = chronologicon.LOGS_FILENAME LOGS = {} TERM_WIDTH = get_terminal_size()[0] BAR_WIDTH = TERM_WIDTH - 4 MVP_DISC = [] # Console colour ANSI escapes class colors: RED = u"\u001b[31m" BLUE = u"\u001b[34m" GREY = u"\u001b[37m" RESET = u"\u001b[0m" DEBUG = u"\u001b[35m" class bars: SINGLE = u"\u2588" DOUBLE = u"\u2590\u258C" SHORTDOUBLE = u"\u2597\u2596" DOTDOUBLE = u"\u00B7\u00B7" def GetDbt(byProject = None, graphWidth = BAR_WIDTH): global MVP_DISC if byProject is None: dbt = sorted(STATS['discbytime'].items(), key=operator.itemgetter(1)) else: dbt = sorted(STATS['projbydisc'][byProject].items(), key=operator.itemgetter(1)) dbtGraph = " " dbtKey = " " R = 0; for discipline in range(len(dbt)): if discipline < 3: k = dbt[len(dbt) - 1 - discipline][0] v = dbt[len(dbt) - 1 - discipline][1] MVP_DISC.append(str(k)) if byProject is None: bar = int(float(v) / float(STATS['totaltime']) * graphWidth) else: bar = int(float(v) / float(STATS['projbytime'][byProject]) * graphWidth) R += bar if MVP_DISC[0] == k: dbtGraph += (bar * bars.SINGLE) dbtKey += str(k).capitalize() + " " elif len(MVP_DISC) > 1 and MVP_DISC[1] == k: dbtGraph += colors.RED + (bar * bars.SINGLE) + colors.RESET dbtKey += colors.RED + str(k).capitalize() + colors.RESET + " " elif len(MVP_DISC) > 2 and MVP_DISC[2] == k: dbtGraph += colors.BLUE + (bar * bars.SINGLE) + colors.RESET dbtKey += colors.BLUE + str(k).capitalize() + colors.RESET + " " else: R -= bar # Ignore 'other' stuff for now, put it at the end if R < graphWidth: dbtGraph += colors.GREY + ((graphWidth - R) * bars.SINGLE) + colors.RESET dbtKey += colors.GREY + "Other" + colors.RESET return (dbtGraph, dbtKey) def GetWbh(): height = 6 maxValue = max(STATS['workbyhour'].items(), key=operator.itemgetter(1))[1] wbh = sorted(STATS['workbyhour'].items()) wbhClamped = [] wbhGraph = " | " wbhKey = " | " c = 0 for hour in range(24): if c < len(wbh): if wbh[c][0] == str(hour).zfill(2): wbhClamped.append(int(float(wbh[c][1]) / float(maxValue) * height)) c += 1 else: wbhClamped.append(0) else: wbhClamped.append(0) for row in range(height): if row > 0: wbhGraph += "\n | " for col in range(len(wbhClamped)): if wbhClamped[col] >= height - row: wbhGraph += bars.DOUBLE else: wbhGraph += colors.GREY + bars.DOTDOUBLE + colors.RESET for col in range(0, len(wbhClamped), 3): wbhKey += str(col).zfill(2) + ' ' return(wbhGraph, wbhKey) def GetPbt(verbose = False, uniform = False): if verbose == False: projects = 5 else: projects = len(STATS['projbytime']) graphWidth = BAR_WIDTH; pbt = sorted(STATS['projbytime'].items(), key=operator.itemgetter(1)) maxValue = max(STATS['projbytime'].items(), key=operator.itemgetter(1))[1] pbtList = "" for project in range(len(pbt)): if project < projects: k = pbt[len(pbt) - 1 - project][0] # Skip blank project names if k == '': continue v = pbt[len(pbt) - 1 - project][1] spacer = BAR_WIDTH - len(k) - len(str(v)) + 1 if uniform: pBarWidth = graphWidth else: pBarWidth = int(float(v) / float(maxValue) * graphWidth) # Skip zero-width graph bars if pBarWidth < 1: continue dbtGraph, dbtKey = GetDbt(k, pBarWidth) pbtList += dbtGraph + "\n" label = str(int(v / 60 / 60)) + colors.GREY + " H" + colors.RESET labelString = " " + str(k).capitalize() # Add 11 to compensate for left padding and the ansi colour code labelString += " " * (BAR_WIDTH - len(labelString) - len(label) + 11) labelString += label pbtList += labelString + "\n\n" return pbtList # Kinda inefficient, but I'm planning on refactoring the way stats work soon anyway. def GetRecents(): recentDays = BAR_WIDTH // 2 - 1 height = 6 now = datetime.datetime.now() # Prevent alignment issues due to processing time crossing a log 'anniversary' times = [] disciplines = [] for i in range(recentDays): day = datetime.date.strftime(now - datetime.timedelta(days=i), '%y/%m/%d') timeThisDay = 0 disciplinesThisDay = {} for log in LOGS: if log['TIME_START'][0:8] == day: timeThisDay += log['TIME_LENGTH'] disciplinesThisDay.update({log['DISC']: log['TIME_LENGTH']}) dbt = sorted(disciplinesThisDay.items(), key=operator.itemgetter(1)) keyDiscipline = "" if dbt: maxValue = max(disciplinesThisDay.items(), key=operator.itemgetter(1))[0] dbt.reverse() keyDiscipline = dbt[0][0] times.append(timeThisDay) disciplines.append(keyDiscipline) maxValue = max(times) times.reverse() disciplines.reverse() recentsGraph = "" for row in range(height): if row > 0: recentsGraph += "\n | " else: recentsGraph += " | " for col in range(len(times)): if times[col] / maxValue * height >= height - row: disciplineKey = disciplines[col].lower() if disciplineKey in MVP_DISC: if disciplineKey == MVP_DISC[0]: recentsGraph += bars.DOUBLE elif disciplineKey == MVP_DISC[1]: recentsGraph += colors.RED + bars.DOUBLE + colors.RESET elif disciplineKey == MVP_DISC[2]: recentsGraph += colors.BLUE + bars.DOUBLE + colors.RESET else: recentsGraph += colors.GREY + bars.DOUBLE + colors.RESET else: if times[col] > 0 and row == height - 1: disciplineKey = disciplines[col].lower() if disciplineKey in MVP_DISC: if disciplineKey == MVP_DISC[0]: recentsGraph += bars.SHORTDOUBLE elif disciplineKey == MVP_DISC[1]: recentsGraph += colors.RED + bars.SHORTDOUBLE + colors.RESET elif disciplineKey == MVP_DISC[2]: recentsGraph += colors.BLUE + bars.SHORTDOUBLE + colors.RESET else: recentsGraph += colors.GREY + bars.SHORTDOUBLE + colors.RESET else: recentsGraph += colors.GREY + bars.DOTDOUBLE + colors.RESET recentsKey = " | " + str(recentDays) + " days ago" recentsKey += " " * (BAR_WIDTH - len(recentsKey) - 3) recentsKey += "Today" return(recentsGraph, recentsKey) def ViewStats(args): global STATS global LOGS STATS = chronologicon.input.LoadStats()[0] LOGS = chronologicon.input.LoadLogs() if STATS == False: Message('outputLoadStatsFailed', '', STATS_FILENAME) return if LOGS == False: Message('outputLoadLogsFailed', '', LOGS_FILENAME) return # Overview numbers TotalEntries = " Total Entries: " + str(STATS['totallogs']) TotalTime = " Total Time: " + str(int(STATS['totaltime']/60/60)) + colors.GREY + " Hours" + colors.RESET AvgEntry = " Average Duration: " + str(STATS['avgloglength']//60) + colors.GREY + " Minutes\n" + colors.RESET # Graphs dbtGraph, dbtKey = GetDbt() wbhGraph, wbhKey = GetWbh() recentsGraph, recentsKey = GetRecents() if len(args) > 0: verbose = False uniform = False if 'refresh' in args: chronologicon.input.SaveStats() STATS = chronologicon.input.LoadStats() # Reload STATS = STATS[0] if 'verbose' in args: verbose = True if 'uniform' in args: uniform = True pbtList = GetPbt(verbose, uniform) else: pbtList = GetPbt() print("\n\n Chronologicon ─ Statistics Overview:\n\n") print(TotalEntries) print(TotalTime) print(AvgEntry) print('\n Work by Hour\n') print(wbhGraph) print(' | ' + 48 * '─') print(wbhKey) print('\n\n Recent History\n') print(recentsGraph) print(' | ' + (BAR_WIDTH - 2) * '─') print(recentsKey) print('\n\n Work by Discipline\n') print(dbtGraph) print(dbtKey) print('\n\n Largest Projects\n') print(pbtList)
32.258621
121
0.549225
a00b97b44852e66d62097b7cc9f61da0d83eacaf
646
ts
TypeScript
src/parse_examples.ts
ryanatkn/corpus-activity-streams
8c5a9e835febc2dd0f7f854fdc292727a2512372
[ "Unlicense" ]
7
2021-03-04T06:42:24.000Z
2022-01-10T16:25:56.000Z
src/parse_examples.ts
ryanatkn/corpus-activity-streams
8c5a9e835febc2dd0f7f854fdc292727a2512372
[ "Unlicense" ]
null
null
null
src/parse_examples.ts
ryanatkn/corpus-activity-streams
8c5a9e835febc2dd0f7f854fdc292727a2512372
[ "Unlicense" ]
null
null
null
import type {Tree, ToId} from 'src/tree.js'; import {assign_node_ids} from 'src/tree.js'; import type {VocabularyTerm} from 'src/activity_streams.js'; import {parse} from 'src/parse.js'; // TODO delete this? export const parse_examples = (examples: VocabularyTerm[], to_id?: ToId): Tree | null => { if (!examples) return null; const children: Tree[] = []; for (const example of examples) { const tree: Tree = { type: 'Block', children: parse(JSON.stringify(example, null, '\t')), }; children.push({ type: 'Element', element: 'pre', children: [tree], }); } return assign_node_ids({type: 'Block', children}, to_id); };
28.086957
90
0.660991
e240404ce5787a8c85548470f0ba8d10d657c66d
703
js
JavaScript
src/ReservedSeats/ReservedSeats.js
AnnaSobczyk/Cinema
ca254c1b9f0d9a35e1db93584fdcd83b91b66847
[ "MIT" ]
null
null
null
src/ReservedSeats/ReservedSeats.js
AnnaSobczyk/Cinema
ca254c1b9f0d9a35e1db93584fdcd83b91b66847
[ "MIT" ]
null
null
null
src/ReservedSeats/ReservedSeats.js
AnnaSobczyk/Cinema
ca254c1b9f0d9a35e1db93584fdcd83b91b66847
[ "MIT" ]
2
2019-09-29T21:47:59.000Z
2019-10-08T09:33:37.000Z
import React from 'react'; import "./ReservedSeats.css"; class ReservedSeats extends React.Component { createList(){ const sorted = [...this.props.selected].sort((s1, s2) => { return (s1.row - s2.row) || (s1.column - s2.column) }); sorted.forEach(s => s.stirng = `Row ${s.row + 1} Seat ${s.column + 1}`); return sorted.map(function(elem){ return elem.stirng; }).join(", ") } render() { return( <div className="selectedSeats"> <h4>Selected seats: ({this.props.selected.length})</h4> <p key="listOfSeats" > {this.createList()} </p> </div> ) } } export default ReservedSeats;
30.565217
122
0.544808
cb71ed134134b654b30aab163293b8d551f0143c
1,241
sql
SQL
sql/4reate_view_20200924.sql
gitHubName86/springbootActiviti
b6fcf10dbe03b73f0df981819b3c3fc8dd4caab9
[ "MIT" ]
null
null
null
sql/4reate_view_20200924.sql
gitHubName86/springbootActiviti
b6fcf10dbe03b73f0df981819b3c3fc8dd4caab9
[ "MIT" ]
null
null
null
sql/4reate_view_20200924.sql
gitHubName86/springbootActiviti
b6fcf10dbe03b73f0df981819b3c3fc8dd4caab9
[ "MIT" ]
null
null
null
-- ---------------------------- -- View structure for act_id_group -- ---------------------------- DROP VIEW IF EXISTS `ACT_ID_GROUP`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ACT_ID_GROUP` AS select `r`.`post_code` AS `ID_`,NULL AS `REV_`,`r`.`post_name` AS `NAME_`,'assignment' AS `TYPE_` from `sys_post` `r` ; -- ---------------------------- -- View structure for act_id_membership -- ---------------------------- DROP VIEW IF EXISTS `ACT_ID_MEMBERSHIP`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ACT_ID_MEMBERSHIP` AS select (select `u`.`user_name` from `sys_user` `u` where (`u`.`user_id` = `ur`.`user_id`)) AS `USER_ID_`,(select `r`.`post_code` from `sys_post` `r` where (`r`.`post_id` = `ur`.`post_id`)) AS `GROUP_ID_` from `sys_user_post` `ur` ; -- ---------------------------- -- View structure for act_id_user -- ---------------------------- DROP VIEW IF EXISTS `ACT_ID_USER`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ACT_ID_USER` AS select `u`.`user_name` AS `ID_`,0 AS `REV_`,`u`.`user_name` AS `FIRST_`,'' AS `LAST_`,`u`.`email` AS `EMAIL_`,`u`.`password` AS `PWD_`,'' AS `PICTURE_ID_` from `sys_user` `u` ;
73
334
0.607575
c3f262607511cac2031d91cb58a8b21407d38368
10,524
cs
C#
Controllers/CartController.cs
darylsonnier/MvcMovie
4c567fa67377749a8344e9fb69f78547ee561fe6
[ "MIT" ]
null
null
null
Controllers/CartController.cs
darylsonnier/MvcMovie
4c567fa67377749a8344e9fb69f78547ee561fe6
[ "MIT" ]
null
null
null
Controllers/CartController.cs
darylsonnier/MvcMovie
4c567fa67377749a8344e9fb69f78547ee561fe6
[ "MIT" ]
null
null
null
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using MvcMovie.Data; using MvcMovie.Helpers; using MvcMovie.Models; using System; using System.Collections.Generic; using System.Linq; namespace MvcMovie.Controllers { /// <summary> /// The CartController serves the views for the shopping cart. /// </summary> [Authorize] public class CartController : Controller { private readonly MvcMovieContext _context; /// <summary> /// The constructor provides the shopping cart with access to the movie database. /// </summary> /// <param name="context"></param> public CartController(MvcMovieContext context) { _context = context; } /// <summary> /// The Index method returns the shopping cart view. /// </summary> /// <returns></returns> public IActionResult Index() { if (!HttpContext.Session.TryGetValue("cart", out byte[] value)) { ViewBag.totalItems = 0; return View("EmptyCart"); } else { var cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); ViewBag.cart = cart.OrderBy(x => x.Movie.Title); ViewBag.subtotal = cart.Sum(item => item.Movie.Price * item.Quantity); ViewBag.tax = Math.Round(ViewBag.subtotal * (decimal)0.08, 2); ViewBag.discount = ViewBag.subtotal / (decimal)50 >= (decimal)1.0 ? (decimal)5.00 * Math.Truncate(ViewBag.subtotal / (decimal)50) : (decimal)0.0; ViewBag.shipping = ViewBag.subtotal > (decimal)50.0 ? (decimal)0.00 : (decimal)4.99; ViewBag.total = Math.Round(ViewBag.subtotal + ViewBag.tax + ViewBag.shipping - ViewBag.discount, 2); ViewBag.totalItems = HttpContext.Session.GetInt32("totalItems"); return View(); } } /// <summary> /// The FinalizePurchase method returns the FinalizePurchase page for entering the billing address, shipping address and purchaser credit card inforamtion. /// </summary> /// <returns></returns> public IActionResult FinalizePurchase() { var cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); ViewBag.cart = cart; ViewBag.subtotal = cart.Sum(item => item.Movie.Price * item.Quantity); ViewBag.tax = Math.Round(ViewBag.subtotal * (decimal)0.08, 2); ViewBag.discount = ViewBag.subtotal / (decimal)50 >= (decimal)1.0 ? (decimal)5.00 * Math.Truncate(ViewBag.subtotal / (decimal)50) : (decimal)0.0; ViewBag.shipping = ViewBag.subtotal > (decimal)50.0 ? (decimal)0.00 : (decimal)4.99; ViewBag.total = Math.Round(ViewBag.subtotal + ViewBag.tax + ViewBag.shipping - ViewBag.discount, 2); ViewBag.totalItems = HttpContext.Session.GetInt32("totalItems"); return View(); } /// <summary> /// The Invoice method returns the Invoice view. /// This is a final summary of the purchase. /// </summary> /// <param name="model"></param> /// <returns></returns> public ActionResult Invoice(PurchaseModel model) { var cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); if (model.ShipName == null || model.ShipAdd1 == null || model.ShipState.ToString() == string.Empty || model.ShipZip == null) { ViewBag.ShipName = model.BillName; ViewBag.ShipAdd1 = model.BillAdd1; ViewBag.ShipAdd2 = model.BillAdd2; ViewBag.ShipState = model.BillState; ViewBag.ShipZip = model.BillZip; } else { ViewBag.ShipName = model.ShipName; ViewBag.ShipAdd1 = model.ShipAdd1; ViewBag.ShipAdd2 = model.ShipAdd2; ViewBag.ShipState = model.ShipState; ViewBag.ShipZip = model.ShipZip; } ViewBag.BillName = model.BillName; ViewBag.BillAdd1 = model.BillAdd1; ViewBag.BillAdd2 = model.BillAdd2; ViewBag.BillState = model.BillState; ViewBag.BillZip = model.BillZip; ViewBag.cart = cart.OrderBy(x => x.Movie.Title); ViewBag.subtotal = cart.Sum(item => item.Movie.Price * item.Quantity); ViewBag.tax = Math.Round(ViewBag.subtotal * (decimal)0.08, 2); ViewBag.discount = ViewBag.subtotal / (decimal)50 >= (decimal)1.0 ? (decimal)5.00 * Math.Truncate(ViewBag.subtotal / (decimal)50) : (decimal)0.0; ViewBag.shipping = ViewBag.subtotal > (decimal)50.0 ? (decimal)0.00 : (decimal)4.99; ViewBag.total = Math.Round(ViewBag.subtotal + ViewBag.tax + ViewBag.shipping - ViewBag.discount, 2); HttpContext.Session.Clear(); HttpContext.Session.SetInt32("totalItems", 0); ViewBag.totalItems = HttpContext.Session.GetInt32("totalItems"); return View(); } /// <summary> /// The Buy method adds a movie to the shopping cart. /// It takes in an id parameter, which is the movie title, and a goBack parameter, which is the genre page the user was browsing. /// </summary> /// <param name="id"></param> /// <param name="goBack"></param> /// <returns></returns> public IActionResult Buy(string id, string goBack) { var Movies = from m in _context.Movie select m; Movie Movie = new Movie(); if (SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart") == null) { var cart = new List<Item>(); cart.Add(new Item { Movie = Movies.Where(x => x.Title == id).FirstOrDefault(), Quantity = 1 }); SessionHelper.SetObjectAsJson(HttpContext.Session, "cart", cart); HttpContext.Session.SetInt32("totalItems", cart.Select(x => x.Quantity).ToList().Sum()); } else { List<Item> cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); int index = DoesExist(id); if (index != -1) { cart[index].Quantity++; } else { cart.Add(new Item { Movie = Movies.Where(x => x.Title == id).FirstOrDefault(), Quantity = 1 }); } HttpContext.Session.SetInt32("totalItems", cart.Select(x => x.Quantity).ToList().Sum()); SessionHelper.SetObjectAsJson(HttpContext.Session, "cart", cart); } // Redirecting back to page, so add to cart doesn't automatically go to the shopping cart. Need to hit the cart button in the menu bar to access the cart. //return RedirectToAction("Index"); ViewBag.totalItems = HttpContext.Session.GetInt32("totalItems"); return RedirectToAction("MoviesByGenre", "Movies", new { @id = goBack }); } /// <summary> /// The Remove method removes all instances of a movie from the shopping cart. /// It takes in an id parameter, which is the movie title. /// </summary> /// <param name="id"></param> /// <returns></returns> public IActionResult Remove(string id) { List<Item> cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); int index = DoesExist(id); cart.RemoveAt(index); SessionHelper.SetObjectAsJson(HttpContext.Session, "cart", cart); HttpContext.Session.SetInt32("totalItems", cart.Select(x => x.Quantity).ToList().Sum()); ViewBag.totalItems = HttpContext.Session.GetInt32("totalItems"); return RedirectToAction("Index"); } /// <summary> /// The Increment method adds one additional copy of a movie to the shopping cart. /// It takes in an id parameter, which is the movie title. /// </summary> /// <param name="id"></param> /// <returns></returns> public IActionResult Increment(string id) { List<Item> cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); int index = DoesExist(id); cart[index].Quantity++; SessionHelper.SetObjectAsJson(HttpContext.Session, "cart", cart); HttpContext.Session.SetInt32("totalItems", cart.Select(x => x.Quantity).ToList().Sum()); ViewBag.totalItems = HttpContext.Session.GetInt32("totalItems"); return RedirectToAction("Index"); } /// <summary> /// The Decrement method removes one copy of a movie from the shopping cart. /// It takes in an id parameter, which is the movie title. /// </summary> /// <param name="id"></param> /// <returns></returns> public IActionResult Decrement(string id) { List<Item> cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); int index = DoesExist(id); cart[index].Quantity--; if (cart[index].Quantity < 1) { cart.RemoveAt(index); } SessionHelper.SetObjectAsJson(HttpContext.Session, "cart", cart); HttpContext.Session.SetInt32("totalItems", cart.Select(x => x.Quantity).ToList().Sum()); ViewBag.totalItems = HttpContext.Session.GetInt32("totalItems"); return RedirectToAction("Index"); } /// <summary> /// The DoesExist method verifies a movie is in the database. /// It takes in an id parameter, which is the movie title. /// </summary> /// <param name="id"></param> /// <returns></returns> private int DoesExist(string id) { List<Item> cart = SessionHelper.GetObjectFromJson<List<Item>>(HttpContext.Session, "cart"); for (int i = 0; i < cart.Count; i++) { if (cart[i].Movie.Title.Equals(id)) { return i; } } return -1; } } }
45.558442
167
0.573166
835267b9b13f5f5e573fc863fd75480740700b81
3,085
ts
TypeScript
packages/sqrl-cli/src/cli/CliRun.ts
jtemps/sqrl-1
b0002682477e13865f553d21f048406916edd420
[ "Apache-2.0" ]
null
null
null
packages/sqrl-cli/src/cli/CliRun.ts
jtemps/sqrl-1
b0002682477e13865f553d21f048406916edd420
[ "Apache-2.0" ]
null
null
null
packages/sqrl-cli/src/cli/CliRun.ts
jtemps/sqrl-1
b0002682477e13865f553d21f048406916edd420
[ "Apache-2.0" ]
null
null
null
/** * Copyright 2018 Twitter, Inc. * Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ // tslint:disable:no-console // tslint:disable:no-submodule-imports (@TODO) import Semaphore from "sqrl/lib/jslib/Semaphore"; import * as split2 from "split2"; import { CliActionOutput } from "./CliOutput"; import { Context } from "sqrl/lib/api/ctx"; import { promiseFinally, SqrlObject } from "sqrl-common"; import { FeatureMap, Executable, Execution } from "sqrl"; import { CliManipulator } from "sqrl-cli-functions"; export class CliRun { constructor( private executable: Executable, private output: CliActionOutput ) {} triggerRecompile(compileCallback: () => Promise<Executable>): Promise<void> { this.output.sourceRecompiling(); return compileCallback() .then(rv => { this.executable = rv; this.output.sourceUpdated(); }) .catch(err => { this.output.sourceRecompileError(err); }); } async action(trc: Context, inputs: FeatureMap, features: string[]) { const manipulator = new CliManipulator(); const execution: Execution = await this.executable.execute(trc, { featureTimeoutMs: 10000, inputs, manipulator }); const loggedFeatures: { [featureName: string]: SqrlObject; } = {}; await Promise.all( features.map(async featureName => { const value = await execution.fetchFeature(featureName); loggedFeatures[featureName] = value; }) ); await execution.fetchFeature("SqrlExecutionComplete"); await manipulator.mutate(trc); this.output.action(manipulator, execution, loggedFeatures); } async stream(options: { ctx: Context; streamFeature: string; concurrency: number; inputs: FeatureMap; features: string[]; }) { const { concurrency } = options; const stream: NodeJS.ReadStream = process.stdin.pipe(split2()); const busy = new Semaphore(); stream.on("data", line => { // Convert this line to the given feature const lineValues = Object.assign({}, options.inputs); try { lineValues[options.streamFeature] = JSON.parse(line); } catch (err) { console.error( "Error: Invalid JSON value: %s", JSON.stringify(line) + err.toString() ); return; } // @todo: Perhaps we want to run serially to ensure output is more easily digestable promiseFinally( busy.wrap( this.action(options.ctx, lineValues, options.features).catch(err => { console.error("Error: " + err.toString()); }) ), () => { stream.resume(); } ); if (concurrency && busy.getCount() === concurrency) { stream.pause(); } }); // Wait for the stream to finish await new Promise((resolve, reject) => { stream.on("end", () => resolve()); stream.on("error", err => reject(err)); }); await busy.waitForZero(); } close() { this.output.close(); } }
27.300885
90
0.616856
6b1726c7a780c49b18bb224ddead9ce3156edf14
718
js
JavaScript
src/utils/distance-matrix.js
synesenom/ranjs
f66944dfb2061e83c96cb74821f2c65584f80a30
[ "MIT" ]
17
2018-09-05T07:40:38.000Z
2022-02-24T08:27:09.000Z
src/utils/distance-matrix.js
synesenom/ranjs
f66944dfb2061e83c96cb74821f2c65584f80a30
[ "MIT" ]
17
2018-02-06T11:54:15.000Z
2021-11-14T13:56:54.000Z
src/utils/distance-matrix.js
synesenom/ranjs
f66944dfb2061e83c96cb74821f2c65584f80a30
[ "MIT" ]
4
2019-04-16T19:13:20.000Z
2022-02-24T08:27:13.000Z
import Matrix from '../la/matrix' import mean from '../location/mean' /** * Calculates the [distance matrix for the distance covariance]{@link https://en.wikipedia.org/wiki/Distance_correlation#Distance_covariance}. * * @method distanceMatrix * @memberof ran.dependence * @param {number[]} values Array of values to calculate distance matrix for. * @return {ran.la.Matrix} The distance matrix. * @private */ export default function (values) { // Calculate distance matrix. const mat = new Matrix(values.map(i => values.map(j => Math.abs(i - j)))) // Centralize. const row = mat.rowSum().map(d => d / values.length) const grand = mean(row) return mat.f((d, i, j) => d + grand - row[i] - row[j]) }
32.636364
142
0.683844