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
1bcd7cc9abf0320232b017fdcc4248ff847511f1
1,803
lua
Lua
modules/lib/detect/has_features.lua
libyyu/xmake
eabc5a03126b391b2b0795c88d2ad95c2997855b
[ "Apache-2.0" ]
null
null
null
modules/lib/detect/has_features.lua
libyyu/xmake
eabc5a03126b391b2b0795c88d2ad95c2997855b
[ "Apache-2.0" ]
null
null
null
modules/lib/detect/has_features.lua
libyyu/xmake
eabc5a03126b391b2b0795c88d2ad95c2997855b
[ "Apache-2.0" ]
null
null
null
--!A cross-platform build utility based on Lua -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- Copyright (C) 2015 - 2019, TBOOX Open Source Group. -- -- @author ruki -- @file has_features.lua -- -- imports import("core.base.option") import("lib.detect.features", {alias = "get_features"}) -- has the given features for the current tool? -- -- @param name the tool name -- @param features the features -- @param opt the argument options, .e.g {verbose = false, flags = {}, program = ""}} -- -- @return the supported features or nil -- -- @code -- local features = has_features("clang", "cxx_constexpr") -- local features = has_features("clang", {"cxx_constexpr", "c_static_assert"}, {flags = {"-g", "-O0"}, program = "xcrun -sdk macosx clang"}) -- local features = has_features("clang", {"cxx_constexpr", "c_static_assert"}, {flags = "-g"}) -- @endcode -- function main(name, features, opt) -- init options opt = opt or {} -- get all features local all = get_features(name, opt) or {} -- get results local results = nil for _, feature in ipairs(features) do if all[feature] then results = results or {} table.insert(results, feature) end end -- ok? return results end
30.559322
141
0.656129
3d0e7f78289b77ce92cff768c918fd05219464e6
1,320
sql
SQL
src/main/resources/db/migration/V1__Basic_schema.sql
alex-kosarev/showcase-farm-management
8bfd5ee2c36e039e97c0c6caeb4a463175d37c3e
[ "Apache-2.0" ]
null
null
null
src/main/resources/db/migration/V1__Basic_schema.sql
alex-kosarev/showcase-farm-management
8bfd5ee2c36e039e97c0c6caeb4a463175d37c3e
[ "Apache-2.0" ]
null
null
null
src/main/resources/db/migration/V1__Basic_schema.sql
alex-kosarev/showcase-farm-management
8bfd5ee2c36e039e97c0c6caeb4a463175d37c3e
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ create schema if not exists catalogue; create table if not exists catalogue.t_product ( id uuid primary key, c_title varchar(255) ); create schema if not exists warehouse; create table if not exists warehouse.t_stored_product ( id uuid primary key, c_version int not null, id_product uuid not null references catalogue.t_product (id), c_amount int not null default 0 check ( c_amount > -1 ) ); create index if not exists idx_stored_product_id_product on warehouse.t_stored_product (id_product); create table if not exists warehouse.t_domain_event ( id bigserial primary key, c_timestamp timestamp not null, c_payload jsonb );
30
100
0.731061
b7313653058a8cd49cf865ab1e8dea7562069a5e
663
cs
C#
src/main/API/MessageGameObjectUpdateMinor.cs
nwn-dotnet/NWN.Core.LowLevel
d7575f5c3a908aa11403a2457ea647e120a18613
[ "MIT" ]
3
2021-01-09T07:28:06.000Z
2021-01-31T01:23:36.000Z
src/main/API/MessageGameObjectUpdateMinor.cs
nwn-dotnet/NWN.Core.LowLevel
d7575f5c3a908aa11403a2457ea647e120a18613
[ "MIT" ]
null
null
null
src/main/API/MessageGameObjectUpdateMinor.cs
nwn-dotnet/NWN.Core.LowLevel
d7575f5c3a908aa11403a2457ea647e120a18613
[ "MIT" ]
2
2021-07-24T19:17:43.000Z
2021-12-20T00:04:19.000Z
//------------------------------------------------------------------------------ // <auto-generated /> // // This file was automatically generated by SWIG (http://www.swig.org). // Version 4.0.2 // // Do not make changes to this file unless you know what you are doing--modify // the SWIG interface file instead. //------------------------------------------------------------------------------ namespace NWN.Native.API { public enum MessageGameObjectUpdateMinor { ObjectList = 0x01, ObjectControl = 0x02, VisualEffect = 0x03, PlayerLevelData = 0x04, FloatyText = 0x05, StripEquippedItems = 0x06, DestroyItem = 0x07, PlaceableUseable = 0x08 } }
26.52
80
0.541478
0ac4259fa0ca565bedbd4815ad1e7de239fd38a1
581
sql
SQL
datacamp-master/intro-to-sql-for-data-science/04-sorting-grouping-and-joins/03-sorting-single-columns(2).sql
vitthal10/datacamp
522d2b192656f7f6563bf6fc33471b048f1cf029
[ "MIT" ]
1
2021-01-31T20:51:10.000Z
2021-01-31T20:51:10.000Z
12intro-to-sql-for-data-science/04-sorting-grouping-and-joins/03-sorting-single-columns(2).sql
AndreasFerox/DataCamp
41525d7252f574111f4929158da1498ee1e73a84
[ "MIT" ]
null
null
null
12intro-to-sql-for-data-science/04-sorting-grouping-and-joins/03-sorting-single-columns(2).sql
AndreasFerox/DataCamp
41525d7252f574111f4929158da1498ee1e73a84
[ "MIT" ]
1
2021-08-08T05:09:52.000Z
2021-08-08T05:09:52.000Z
/* Let's get some more practice with ORDER BY! */ /* Instructions - Get the title of films released in 2000 or 2012, in the order they were released. - Get all details for all films except those released in 2015 and order them by duration. - Get the title and gross earnings for movies which begin with the letter 'M' and order the results alphabetically. */ SELECT title FROM films WHERE release_year IN (2000,2012) ORDER BY release_year SELECT * FROM films WHERE release_year NOT IN (2015) ORDER BY duration SELECT title, gross FROM films WHERE title LIKE 'M%' ORDER BY title
36.3125
115
0.769363
7bf6bad51da44e222bf0297aa0e0efaf2ba92e6f
192
rb
Ruby
test/factories/enrollments_factory.rb
hhpatel09/OfficeHourQueue
9f0a119b5475a1828f269d51bf47b6d5659bc44e
[ "MIT" ]
null
null
null
test/factories/enrollments_factory.rb
hhpatel09/OfficeHourQueue
9f0a119b5475a1828f269d51bf47b6d5659bc44e
[ "MIT" ]
5
2020-02-29T04:22:15.000Z
2022-03-30T23:41:44.000Z
test/factories/enrollments_factory.rb
hhpatel09/OfficeHourQueue
9f0a119b5475a1828f269d51bf47b6d5659bc44e
[ "MIT" ]
null
null
null
FactoryBot.define do factory :enrollment do user_id { 0 } course_id { 0 } created_at { '2001-02-03T12:00:00+00:00' } updated_at { '2001-02-03T12:00:00+00:00' } end end
21.333333
46
0.619792
4e55e88cf412263d8a214a4d10a17e3014f84455
216
lua
Lua
assets/preload/custom_events/Note NO.lua
Amogus124/TROLLGE-FILES-ANDROID
158907c737e4bed05967a4128ef7bb48999b107b
[ "Apache-2.0" ]
null
null
null
assets/preload/custom_events/Note NO.lua
Amogus124/TROLLGE-FILES-ANDROID
158907c737e4bed05967a4128ef7bb48999b107b
[ "Apache-2.0" ]
null
null
null
assets/preload/custom_events/Note NO.lua
Amogus124/TROLLGE-FILES-ANDROID
158907c737e4bed05967a4128ef7bb48999b107b
[ "Apache-2.0" ]
null
null
null
function onEvent(name) if name == 'Note NO' then if value1 == '1' then setProperty('opponentStrums.visible', false) end if value1 == '2' then setProperty('opponentStrums.visible', true) end end end
27
48
0.675926
f74b643d2bc39b0986020b85ee2af6ec03d276fa
533
rb
Ruby
lib/rubytunes/fade.rb
drn/rubytunes
2d548be50ac5ee6884fda60552cf04ec916b1105
[ "MIT" ]
null
null
null
lib/rubytunes/fade.rb
drn/rubytunes
2d548be50ac5ee6884fda60552cf04ec916b1105
[ "MIT" ]
null
null
null
lib/rubytunes/fade.rb
drn/rubytunes
2d548be50ac5ee6884fda60552cf04ec916b1105
[ "MIT" ]
null
null
null
require 'rubytunes/playback' class RubyTunes class Fade INCREMENT = 5 def toggle; volume > 0 ? self.out : self.in end def in while (current ||= volume) < 100 self.volume = (current += INCREMENT) end end def out while (current ||= volume) > 0 self.volume = (current -= INCREMENT) end end private def volume; playback.volume end def volume=(volume); playback.volume = volume end def playback; @playback ||= RubyTunes::Playback.new end end end
16.65625
59
0.606004
f5193157ff9ee057d6c12294a3dd666cdfd4af26
4,272
swift
Swift
Tests/SwiftUIBlocTests/BlocTests.swift
mehdok/SwiftUIBloc
1235a2f0ea8a962ee84498ae0f2f57e95d29ae9a
[ "MIT" ]
3
2021-09-10T12:05:22.000Z
2021-09-17T18:54:34.000Z
Tests/SwiftUIBlocTests/BlocTests.swift
mehdok/SwiftUIBloc
1235a2f0ea8a962ee84498ae0f2f57e95d29ae9a
[ "MIT" ]
null
null
null
Tests/SwiftUIBlocTests/BlocTests.swift
mehdok/SwiftUIBloc
1235a2f0ea8a962ee84498ae0f2f57e95d29ae9a
[ "MIT" ]
1
2021-09-10T03:12:19.000Z
2021-09-10T03:12:19.000Z
// // BlocTests.swift // SwiftUIBlocTests // // Created by Mehdok on 8/20/21. // import CombineExpectations @testable import SwiftUIBloc import XCTest class BlocTests: XCTestCase { func testInitialState() throws { let bloc = TestBloc(.initial) let recorder = bloc.state.record() let firstState = try wait(for: recorder.next(), timeout: 1) if case .initial = firstState {} else { XCTFail() } } func testAddingSingleEvent() throws { let bloc = TestBloc(.initial) let recorder = bloc.state.record() // initial state _ = try wait(for: recorder.next(), timeout: 1) // dispatching first event bloc.add(.firstEvent) let state = try wait(for: recorder.next(), timeout: 1) if case .firstState = state {} else { XCTFail() } } func testAddingMultipleEvents() throws { let bloc = TestBloc(.initial) let recorder = bloc.state.record() bloc.add(.firstEvent) bloc.add(.secondEvent) bloc.add(.thirdEvent) let expectation = recorder.availableElements let elements = try wait(for: expectation, timeout: 1) XCTAssertEqual(elements, [.initial, .firstState, .secondState, .thirdState]) } func testAddingRepeatingEvents() throws { let bloc = TestBloc(.initial) let recorder = bloc.state.record() bloc.add(.firstEvent) bloc.add(.firstEvent) let expectation = recorder.availableElements let elements = try wait(for: expectation, timeout: 1) XCTAssertEqual(elements, [.initial, .firstState]) // repetitive state should not be dispatched XCTAssertNotEqual(elements, [.initial, .firstState, .firstState]) } func testOverrideEquality() throws { let bloc = TestBloc(.initial) let recorder = bloc.state.record() bloc.add(.forthEvent) bloc.add(.forthEvent) let expectation = recorder.availableElements let elements = try wait(for: expectation, timeout: 1) // [.initial, .forthState, .forthState] XCTAssertEqual(elements.count, 3) } func testBlocDeInit() throws { let observer = TestBlocObserver() var bloc: TestBloc? = TestBloc(.initial, observer: observer) // do stuff bloc?.add(.firstEvent) bloc?.add(.secondEvent) bloc?.add(.thirdEvent) bloc?.add(.forthEvent) bloc = nil XCTAssertTrue(observer.blocDeInitCalled) } } enum TestEvent: EventBase { case firstEvent case secondEvent case thirdEvent case forthEvent static func == (lhs: TestEvent, rhs: TestEvent) -> Bool { switch (lhs, rhs) { case (.firstEvent, .firstEvent): return true case (.secondEvent, .secondEvent): return true case (.thirdEvent, .thirdEvent): return true case (.forthEvent, .forthEvent): return false default: return false } } } enum TestState: StateBase { case initial case firstState case secondState case thirdState case forthState static func == (lhs: TestState, rhs: TestState) -> Bool { switch (lhs, rhs) { case (.initial, .initial): return true case (.firstState, .firstState): return true case (.secondState, .secondState): return true case (.thirdState, .thirdState): return true case (.forthState, .forthState): return false default: return false } } } class TestBloc: Bloc<TestEvent, TestState> { override func mapEventToState(_ event: TestEvent) { switch event { case .firstEvent: yield(.firstState) case .secondEvent: yield(.secondState) case .thirdEvent: yield(.thirdState) case .forthEvent: yield(.forthState) } } } class TestBlocObserver: BlocObserver { var blocDeInitCalled = false func onEvent<E>(_: E) where E: EventBase {} func onChange<S>(_: Change<S>) where S: StateBase {} func onClose() { blocDeInitCalled = true } }
25.129412
84
0.596442
7dc58dab2354c35ad5876a2ed5bfc57b964ab595
1,033
css
CSS
style.css
Mar-io20/calculadora
fd16e06031f12163f6b141126fda3f406d2e8a76
[ "MIT" ]
null
null
null
style.css
Mar-io20/calculadora
fd16e06031f12163f6b141126fda3f406d2e8a76
[ "MIT" ]
null
null
null
style.css
Mar-io20/calculadora
fd16e06031f12163f6b141126fda3f406d2e8a76
[ "MIT" ]
null
null
null
*{ margin: 0; padding: 0; font-family: 'Roboto', sans-serif; } @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,500;1,400&display=swap'); body{ width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; } .calculadora{ border-radius: 20px; padding: 10px; background-color: rgba(9, 145, 163, 0.555); box-shadow: 2px 3px 6px black; width: 300px; height: 400px; display: flex; flex-direction: column; gap: 20px; align-items: center; } p{ display: block; background-color: rgba(0, 0, 0, 0.637); width: 270px; height: 90px; border: 1px solid black ; font-size: 1.4rem; padding-right: 10px; color: rgb(255, 255, 255); text-align: end; line-height: 50px; } table{ width: 90%; height: 100%; } td button{ width: 100%; height: 100%; background-color: rgb(0, 0, 0); border: none; color: white; } td button:hover{ background-color: rgb(0, 63, 63); }
19.865385
98
0.605034
23d00cd03bfd4863394e16210670f6de812065d6
681
ps1
PowerShell
Public/Initialize-HuduFolder.ps1
sneakyflint/HuduAPI
d12c7aac87bd5ad2c50a4e3de26aeebfaaa0b390
[ "MIT" ]
null
null
null
Public/Initialize-HuduFolder.ps1
sneakyflint/HuduAPI
d12c7aac87bd5ad2c50a4e3de26aeebfaaa0b390
[ "MIT" ]
null
null
null
Public/Initialize-HuduFolder.ps1
sneakyflint/HuduAPI
d12c7aac87bd5ad2c50a4e3de26aeebfaaa0b390
[ "MIT" ]
null
null
null
function Initialize-HuduFolder { param( [String[]]$FolderPath, [Alias("company_id")] [int]$CompanyId ) if ($CompanyId) { $FolderMap = Get-HuduFolderMap -company_id $CompanyId } else { $FolderMap = Get-HuduFolderMap } $CurrentFolder = $Foldermap foreach ($Folder in $FolderPath) { if ($CurrentFolder.$(Get-HuduFolderCleanName $Folder)){ $CurrentFolder = $CurrentFolder.$(Get-HuduFolderCleanName $Folder) } else { $CurrentFolder = (New-HuduFolder -name $Folder -company_id $Company_ID -parent_folder_id $CurrentFolder.id).folder } } Return $CurrentFolder }
28.375
126
0.61674
43891bc312afd809de395872b8f866a956124dc2
12,815
cpp
C++
arduino_codes/SortingMachine_workflow/SortingMachineLib.cpp
renatattavares/arduino-methodology
adb85d2352697c79095b3cfed803bd6fd17caf38
[ "MIT" ]
null
null
null
arduino_codes/SortingMachine_workflow/SortingMachineLib.cpp
renatattavares/arduino-methodology
adb85d2352697c79095b3cfed803bd6fd17caf38
[ "MIT" ]
null
null
null
arduino_codes/SortingMachine_workflow/SortingMachineLib.cpp
renatattavares/arduino-methodology
adb85d2352697c79095b3cfed803bd6fd17caf38
[ "MIT" ]
null
null
null
#include "SortingMachineLib.h" #include <Wire.h> #include <Servo.h> #include <Adafruit_TCS34725.h> #include <CheapStepper.h> //================= Defining pin numbers =================// //------- Servo motor----------- // #define SERVO_PIN 3 //---------- LED RGB------------ // #define LED_R 9 #define LED_G 10 #define LED_B 11 //-------- Step motor----------- // #define STPM_IN1 5 #define STPM_IN2 6 #define STPM_IN3 7 #define STPM_IN4 8 //-------- IR Sensors ---------- // #define IRS1 A0 #define IRS2 A1 #define IRS3 A2 #define IRS4 A3 //===========================================================// //=== Defining parameters for color classification ===========// //=== Specifies the type of candy used in the system ===// // 0 = Skitles (red,green,blue,yellow,orange and purple) // 1 = M&Ms (red,green,blue,yellow,orange and brown) int candy_type = 1; //===================== Skitles ==============================// #define Rmean_Red 2325.68 #define Gmean_Red 1925.09 #define Bmean_Red 1581.23 #define Rmean_Green 2087.95 #define Gmean_Green 3113.86 #define Bmean_Green 1765.26 #define Rmean_Blue 1955.46 #define Gmean_Blue 2679.10 #define Bmean_Blue 2502.58 #define Rmean_Yellow 4595.68 #define Gmean_Yellow 4426.56 #define Bmean_Yellow 2176.92 #define Rmean_Orange 4264.13 #define Gmean_Orange 2768.62 #define Bmean_Orange 1856.92 #define Rmean_Purple 1526.64 #define Gmean_Purple 1701.61 #define Bmean_Purple 1436.49 #define Rmean_Empty 2928.18 #define Gmean_Empty 3453.41 #define Bmean_Empty 2734.57 //===================== M&Ms ==============================// #define Rmean_Red_MM 1856.82 #define Gmean_Red_MM 1661.25 #define Bmean_Red_MM 1418.12 #define Rmean_Green_MM 1620.12 #define Gmean_Green_MM 2347.42 #define Bmean_Green_MM 1535.25 #define Rmean_Blue_MM 1367.42 #define Gmean_Blue_MM 2059.50 #define Bmean_Blue_MM 2315.87 #define Rmean_Yellow_MM 3562.62 #define Gmean_Yellow_MM 3442.70 #define Bmean_Yellow_MM 1862.40 #define Rmean_Orange_MM 3076.77 #define Gmean_Orange_MM 1927.45 #define Bmean_Orange_MM 1518.47 #define Rmean_Brown_MM 1406.75 #define Gmean_Brown_MM 1587.02 #define Bmean_Brown_MM 1319.87 #define Rmean_Empty 2928.18 #define Gmean_Empty 3453.41 #define Bmean_Empty 2734.57 //===========================================================// //=================== RGB LED defines =======================// #define RED 1 #define GREEN 2 #define BLUE 3 #define YELLOW 4 #define ORANGE 5 #define PURPLE 6 #define EMPTY 7 #define BROWN 6 //===========================================================// //=================== RGB LED defines =======================// bool S1,S2,S3; //===========================================================// //======= Declaring classes from other libraries =============// Servo myservo; Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_700MS, TCS34725_GAIN_1X); CheapStepper stepper (STPM_IN1,STPM_IN2,STPM_IN3,STPM_IN4); //===========================================================// //====================== Construct ==========================// SortingMachine::SortingMachine(){ //------ Defining IO pins ---------// pinMode(LED_R,OUTPUT); pinMode(LED_G,OUTPUT); pinMode(LED_B,OUTPUT); pinMode(IRS1,INPUT); pinMode(IRS2,INPUT); pinMode(IRS3,INPUT); pinMode(IRS4,INPUT); pinMode(13,OUTPUT); } //===========================================================// //====================== Destruct ===========================// SortingMachine::~SortingMachine(){ } //===========================================================// void SortingMachine::Initialize(){ //--------- Defining Sevo object -----------// myservo.attach(SERVO_PIN); myservo.write(95); //------ Inicializing Color Sensor ---------// if (tcs.begin()) { digitalWrite(13,HIGH); }else{ digitalWrite(13,LOW); } //------ Inicializing Step Motor ---------// stepper.setRpm(22); // SortingMachine::StpMotorMoveToInitPos(); } //================ Servo Motor functions ====================// // MoveForward: Moves servo motor shaft clockwise until it reaches a 90º multiple position. void SortingMachine::SrvMotorMoveForward(){ int servospeed = 13; servospeed = map(servospeed,0,100,100,180); myservo.write(servospeed); delay(500); while (!digitalRead(IRS1)){} myservo.write(95); } // MoveBackward: Moves servo motor shaft counterclockwise until it reaches a 90º multiple position. void SortingMachine::SrvMotorMoveBackward(){ int servospeed = 6; servospeed = map(servospeed,0,100,90,0); myservo.write(servospeed); delay(500); while (!digitalRead(IRS1)){} myservo.write(95); } //============================================================// //================ Color Sensor functions ====================// // GetColor: Return the color code obtained by the color sensor. int SortingMachine::GetColor(){ int color = 0; float erro_R,erro_G,erro_B,erro_Y,erro_O,erro_P,erro_E; uint16_t red, green, blue, c, colorTemp, lux; delay(400); tcs.getRawData(&red, &green, &blue, &c); colorTemp = tcs.calculateColorTemperature_dn40(red, green, blue, c); lux = tcs.calculateLux(red, green, blue); if (candy_type == 0){ erro_R = sqrt(pow(Rmean_Red-red,2)+pow(Gmean_Red-green,2)+pow(Bmean_Red-blue,2)); erro_G = sqrt(pow(Rmean_Green-red,2)+pow(Gmean_Green-green,2)+pow(Bmean_Green-blue,2)); erro_B = sqrt(pow(Rmean_Blue-red,2)+pow(Gmean_Blue-green,2)+pow(Bmean_Blue-blue,2)); erro_Y = sqrt(pow(Rmean_Yellow-red,2)+pow(Gmean_Yellow-green,2)+pow(Bmean_Yellow-blue,2)); erro_O = sqrt(pow(Rmean_Orange-red,2)+pow(Gmean_Orange-green,2)+pow(Bmean_Orange-blue,2)); erro_P = sqrt(pow(Rmean_Purple-red,2)+pow(Gmean_Purple-green,2)+pow(Bmean_Purple-blue,2)); erro_E = sqrt(pow(Rmean_Empty-red,2)+pow(Gmean_Empty-green,2)+pow(Bmean_Empty-blue,2)); if((erro_R<erro_G)&&(erro_R<erro_B)&&(erro_R<erro_Y)&&(erro_R<erro_O)&&(erro_R<erro_P)&&(erro_R<erro_E)) color = RED; else if((erro_G<erro_R)&&(erro_G<erro_B)&&(erro_G<erro_Y)&&(erro_G<erro_O)&&(erro_G<erro_P)&&(erro_G<erro_E)) color = GREEN; else if((erro_B<erro_R)&&(erro_B<erro_G)&&(erro_B<erro_Y)&&(erro_B<erro_O)&&(erro_B<erro_P)&&(erro_B<erro_E)) color = BLUE; else if((erro_Y<erro_R)&&(erro_Y<erro_G)&&(erro_Y<erro_B)&&(erro_Y<erro_O)&&(erro_Y<erro_P)&&(erro_Y<erro_E)) color = YELLOW; else if((erro_O<erro_R)&&(erro_O<erro_G)&&(erro_O<erro_B)&&(erro_O<erro_Y)&&(erro_O<erro_P)&&(erro_O<erro_E)) color = ORANGE; else if((erro_P<erro_R)&&(erro_P<erro_G)&&(erro_P<erro_B)&&(erro_P<erro_Y)&&(erro_P<erro_O)&&(erro_P<erro_E)) color = PURPLE; else if((erro_E<erro_R)&&(erro_E<erro_G)&&(erro_E<erro_B)&&(erro_E<erro_Y)&&(erro_E<erro_O)&&(erro_E<erro_P)) color = EMPTY; } else{ erro_R = sqrt(pow(Rmean_Red_MM-red,2)+pow(Gmean_Red_MM-green,2)+pow(Bmean_Red_MM-blue,2)); erro_G = sqrt(pow(Rmean_Green_MM-red,2)+pow(Gmean_Green_MM-green,2)+pow(Bmean_Green_MM-blue,2)); erro_B = sqrt(pow(Rmean_Blue_MM-red,2)+pow(Gmean_Blue_MM-green,2)+pow(Bmean_Blue_MM-blue,2)); erro_Y = sqrt(pow(Rmean_Yellow_MM-red,2)+pow(Gmean_Yellow_MM-green,2)+pow(Bmean_Yellow_MM-blue,2)); erro_O = sqrt(pow(Rmean_Orange_MM-red,2)+pow(Gmean_Orange_MM-green,2)+pow(Bmean_Orange_MM-blue,2)); erro_P = sqrt(pow(Rmean_Brown_MM-red,2)+pow(Gmean_Brown_MM-green,2)+pow(Bmean_Brown_MM-blue,2)); erro_E = sqrt(pow(Rmean_Empty-red,2)+pow(Gmean_Empty-green,2)+pow(Bmean_Empty-blue,2)); if((erro_R<erro_G)&&(erro_R<erro_B)&&(erro_R<erro_Y)&&(erro_R<erro_O)&&(erro_R<erro_P)&&(erro_R<erro_E)) color = RED; else if((erro_G<erro_R)&&(erro_G<erro_B)&&(erro_G<erro_Y)&&(erro_G<erro_O)&&(erro_G<erro_P)&&(erro_G<erro_E)) color = GREEN; else if((erro_B<erro_R)&&(erro_B<erro_G)&&(erro_B<erro_Y)&&(erro_B<erro_O)&&(erro_B<erro_P)&&(erro_B<erro_E)) color = BLUE; else if((erro_Y<erro_R)&&(erro_Y<erro_G)&&(erro_Y<erro_B)&&(erro_Y<erro_O)&&(erro_Y<erro_P)&&(erro_Y<erro_E)) color = YELLOW; else if((erro_O<erro_R)&&(erro_O<erro_G)&&(erro_O<erro_B)&&(erro_O<erro_Y)&&(erro_O<erro_P)&&(erro_O<erro_E)) color = ORANGE; else if((erro_P<erro_R)&&(erro_P<erro_G)&&(erro_P<erro_B)&&(erro_P<erro_Y)&&(erro_P<erro_O)&&(erro_P<erro_E)) color = BROWN; else if((erro_E<erro_R)&&(erro_E<erro_G)&&(erro_E<erro_B)&&(erro_E<erro_Y)&&(erro_E<erro_O)&&(erro_E<erro_P)) color = EMPTY; } return color; } //===========================================================// //==================== RGB LED functions ====================// // ShowColor: Lights up the RGB LED according the color code received. void SortingMachine::ShowColor(int color){ int red_val; int green_val; int blue_val; switch(color){ case(RED): red_val = 255; green_val = 0; blue_val = 0; break; case(GREEN): red_val = 0; green_val = 255; blue_val = 0; break; case(BLUE): red_val = 0; green_val = 0; blue_val = 255; break; case(YELLOW): red_val = 255; green_val = 255; blue_val = 0; break; case(ORANGE): red_val = 255; green_val = 120; blue_val = 0; break; case(PURPLE): if (candy_type == 0){ red_val = 150; green_val = 0; blue_val = 255; } else{ red_val = 128; green_val = 43; blue_val = 0; } break; default: red_val = 0; green_val = 0; blue_val = 0; break; } analogWrite(LED_R,red_val); analogWrite(LED_G,green_val); analogWrite(LED_B,blue_val); } //===========================================================// //==================== Step Motor functions =================// void SortingMachine::StpMotorMoveToInitPos(){ S1 = digitalRead(IRS2); S2 = digitalRead(IRS3); S3 = digitalRead(IRS4); while(!((!S1)&&(S2)&&(!S3))){ stepper.moveDegrees (1,2); S1 = digitalRead(IRS2); S2 = digitalRead(IRS3); S3 = digitalRead(IRS4); } Serial.println("Initial Position accomplished!"); } void SortingMachine::StpMotorMoveCW(){ int curpos = StpMotorGetPosition(); int arrival = curpos+1; if (arrival == 7) arrival = 1; S1 = digitalRead(IRS2); S2 = digitalRead(IRS3); S3 = digitalRead(IRS4); bool verify = Check_Sensors(arrival); int angular_step = 10; while(!verify){ stepper.moveDegrees (1,angular_step); S1 = digitalRead(IRS2); S2 = digitalRead(IRS3); S3 = digitalRead(IRS4); verify = Check_Sensors(arrival); angular_step =1; delay(1); } /*Serial.print("Position "); Serial.print(arrival); Serial.println(" reached!");*/ } void SortingMachine::StpMotorMoveCCW(){ int curpos = StpMotorGetPosition(); int arrival = curpos-1; if (arrival == 0) arrival = 6; S1 = digitalRead(IRS2); S2 = digitalRead(IRS3); S3 = digitalRead(IRS4); bool verify = Check_Sensors(arrival); int angular_step = 10; while(!verify){ stepper.moveDegrees (0,angular_step); S1 = digitalRead(IRS2); S2 = digitalRead(IRS3); S3 = digitalRead(IRS4); verify = Check_Sensors(arrival); angular_step =1; delay(1); } /*Serial.print("Position "); Serial.print(arrival); Serial.println(" reached!");*/ } int SortingMachine::StpMotorGetPosition(){ int value, output; S1 = digitalRead(IRS2); S2 = digitalRead(IRS3); S3 = digitalRead(IRS4); value = S3*4 + S2*2 + S1*1; switch(value){ case 1: output = 6; break; case 2: output = 4; break; case 3: output = 3; break; case 4: output = 2; break; case 5: output = 5; break; case 6: output = 1; break; default: output = 0; break; } return output; } bool SortingMachine::Check_Sensors (int arrival){ switch(arrival){ case(1): return (!S1)&&(S2)&&(S3); break; case(2): return (!S1)&&(!S2)&&(S3); break; case(3): return (S1)&&(S2)&&(!S3); break; case(4): return (!S1)&&(S2)&&(!S3); break; case(5): return (S1)&&(!S2)&&(S3); break; case(6): return (S1)&&(!S2)&&(!S3); break; } } //===========================================================//
31.029056
114
0.569489
e06576a3f3f0eff0bd801d72ff4cf99d6bab6d44
287
h
C
VidyoClientAPI_Sample_iOS_BitSample/CallCentre/Controller/CallCentreViewController.h
changkuanlai/IOS_VidyoDriver
9907abb09a3b066536c069068479a14199555724
[ "Apache-2.0" ]
null
null
null
VidyoClientAPI_Sample_iOS_BitSample/CallCentre/Controller/CallCentreViewController.h
changkuanlai/IOS_VidyoDriver
9907abb09a3b066536c069068479a14199555724
[ "Apache-2.0" ]
null
null
null
VidyoClientAPI_Sample_iOS_BitSample/CallCentre/Controller/CallCentreViewController.h
changkuanlai/IOS_VidyoDriver
9907abb09a3b066536c069068479a14199555724
[ "Apache-2.0" ]
null
null
null
// // CallCentreViewController.h // VidyoMobile // // Created by 赖长宽 on 2017/1/4. // Copyright © 2017年 changkuan.lai.com. All rights reserved. // #import <UIKit/UIKit.h> @interface CallCentreViewController : UIViewController @property (nonatomic ,copy) NSString * textName; @end
17.9375
61
0.724739
7e8c707f5371a86d90f42141e4c85ddb9ef5f13e
30
rs
Rust
src/timing/mod.rs
wheelin/nucleo_f103rg
c3d2fa437c1c4fbc6e71c101d650bc5ad2015fc9
[ "MIT" ]
null
null
null
src/timing/mod.rs
wheelin/nucleo_f103rg
c3d2fa437c1c4fbc6e71c101d650bc5ad2015fc9
[ "MIT" ]
null
null
null
src/timing/mod.rs
wheelin/nucleo_f103rg
c3d2fa437c1c4fbc6e71c101d650bc5ad2015fc9
[ "MIT" ]
null
null
null
pub mod delay; pub mod timer;
10
14
0.733333
2c80342e4d86d0c54e8c3c0143c3b7b84ff3c6b2
12,443
py
Python
lapidary/Main.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
6
2021-01-02T18:29:22.000Z
2021-10-03T18:55:01.000Z
lapidary/Main.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
2
2021-02-15T15:34:34.000Z
2022-01-30T17:46:00.000Z
lapidary/Main.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
3
2020-10-23T14:10:39.000Z
2021-11-16T10:00:40.000Z
#! /usr/bin/env python3 from argparse import ArgumentParser import json from glob import glob from pathlib import Path from pprint import pprint from subprocess import run, Popen import os import shutil from DolmaConfig import generate_configs from SpecBench import SpecBench, Spec2017Bench from Checkpoints import GDBCheckpoint from GDBProcess import GDBEngine import Utils import random def get_configs(args): return generate_configs(args.config_group) def get_benchmarks(args): benchmarks = Spec2017Bench.BENCHMARKS if args.benchmarks is not None: benchmarks = args.benchmarks['spec2017'] return sorted(benchmarks, reverse=args.reverse) def delete_bad_checkpoints(summary_file): import shutil count = 0 with summary_file.open() as f: summary = json.load(f) if 'checkpoints' in summary: for checkpoint, status in summary['checkpoints'].items(): if 'failed' in status and Path(checkpoint).exists(): shutil.rmtree(checkpoint) count += 1 else: print('\tNo checkpoints left to delete!') print('\tDeleted {} invalid checkpoints'.format(count)) def get_checkpoint_dirs(dir_paths): dirs = [ Path(d) for d in dir_paths ] for d in dirs: assert d.exists() return dirs def run_all(args): checkpoint_root_dir = Path(args.checkpoint_dir) assert checkpoint_root_dir.exists() configs = get_configs(args) needsSMT = False if not args.generate_only: for config_class in configs: if 'smt' in config_class.name: needsSMT = True break if needsSMT: simlog_dir = Path('smt_simlogs') res_root = Path('smt_simulation_results') else: simlog_dir = Path('simlogs') res_root = Path('simulation_results') benchmarks = get_benchmarks(args) if not simlog_dir.exists(): simlog_dir.mkdir() needsSMT = False if not args.generate_only: for config_class in configs: if 'smt' in config_class.name: needsSMT = True break max_checkpoints = 0 if args.max_checkpoints is not None and int(args.max_checkpoints) > 0: max_checkpoints = int(args.max_checkpoints) for benchmark in benchmarks: if needsSMT: continue checkpoint_dir = checkpoint_root_dir / '{}_gdb_checkpoints'.format(benchmark) convert_procs = [] # print("Preparing pmem files for " + benchmark + "...") # if max_checkpoints != 0 and max_checkpoints < len(os.listdir(checkpoint_dir)): # sorted_dir = Utils.select_evenly_spaced(os.listdir(checkpoint_dir), max_checkpoints) # else: # sorted_dir = sorted(os.listdir(checkpoint_dir)) # for d in sorted_dir: # d_path = checkpoint_dir / d # pmem_file = d_path / 'system.physmem.store0.pmem' # if d_path.is_dir() and not pmem_file.exists(): # convert_procs.append(GDBEngine._create_convert_process(d_path, needsSMT)) # for proc in convert_procs: # proc.join() # continue for config_class in configs: config_name = config_class.name config_name = config_name.lower() sim_results = res_root / '{}_{}_summary.json'.format(benchmark, config_name) print('Simulating {} with {} config.'.format( benchmark, config_name)) log_file = simlog_dir / '{}_{}_simlog.txt'.format(benchmark, config_name) sim_args = ['./ParallelSim.py', '--bench', benchmark, '-d', str(checkpoint_dir), '--log-file', str(log_file),'--config-name', str(config_name)] if args.max_checkpoints is not None: sim_args += ['-n', args.max_checkpoints] if args.force_rerun: sim_args += ['--force-rerun'] proc = run(sim_args) if proc.returncode: print('ParallelSim exited with error: {}'.format(proc.returncode)) if not proc.returncode and sim_results.exists() and args.delete_bad_checkpoints: delete_bad_checkpoints(sim_results) # for d in checkpoint_dir.iterdir(): # if d.is_dir(): # pmem_file = d / 'system.physmem.store0.pmem' # if pmem_file.exists(): # Popen(['rm', str(pmem_file)]) #pmem_file.unlink() # always create merged SMT checkpoints on the fly (space) if needsSMT: bench_counts = None with open('smt_mixes.json') as f: bench_counts = json.load(f) assert bench_counts is not None print(bench_counts) for i, benchmark1 in enumerate(benchmarks): if '500' in benchmark1 or '502' in benchmark1: continue checkpoint_dir1 = checkpoint_root_dir / '{}_gdb_checkpoints'.format(benchmark1) if max_checkpoints != 0 and max_checkpoints < len(os.listdir(checkpoint_dir1)): checkpoints1 = Utils.select_evenly_spaced(os.listdir(checkpoint_dir1), max_checkpoints) else: checkpoints1 = sorted(os.listdir(checkpoint_dir1)) all_dir = checkpoints1 max_batch_size = 160 for x in range(0, 64): start = x * max_batch_size if start >= len(all_dir): break end = min(start + max_batch_size, len(all_dir)) print(start) print(end) checkpoints1 = all_dir[start:end] print("Preparing pmem files for " + benchmark1 + "...") convert_procs = [] for d in checkpoints1: d_path = checkpoint_dir1 / d pmem_file = d_path / 'system.physmem.store0.pmem' if d_path.is_dir() and not pmem_file.exists(): convert_procs.append(GDBEngine._create_convert_process(d_path, needsSMT)) for proc in convert_procs: proc.join() for benchmark2 in bench_counts[benchmark1]: if benchmark2 < benchmark1: continue else: benchmark = benchmark1 + '-' + benchmark2 checkpoint_dir2 = checkpoint_root_dir / '{}_gdb_checkpoints'.format(benchmark2) if max_checkpoints != 0 and max_checkpoints < len(os.listdir(checkpoint_dir2)): checkpoints2 = Utils.select_evenly_spaced(os.listdir(checkpoint_dir2), max_checkpoints) else: checkpoints2 = sorted(os.listdir(checkpoint_dir2)) checkpoints2 = checkpoints2[start:min(end, len(checkpoints2))] print("Preparing pmem files for " + benchmark2 + "...") convert_procs = [] for d in checkpoints2: d_path = checkpoint_dir2 / d pmem_file = d_path / 'system.physmem.store0.pmem' if d_path.is_dir() and not pmem_file.exists(): convert_procs.append(GDBEngine._create_convert_process(d_path, needsSMT)) for proc in convert_procs: proc.join() continue checkpoint_dir = Path('/mnt/dolma') / '{}_gdb_checkpoints'.format(benchmark) if not checkpoint_dir.exists(): checkpoint_dir.mkdir() assert checkpoint_dir.is_dir() print('Merging checkpoints for {}...'.format(benchmark)) num_cpts = min(len(checkpoints1), len(checkpoints2)) if args.max_checkpoints is not None: num_cpts = min(num_cpts, int(args.max_checkpoints)) subprocs = [] for k in range(0, num_cpts): pmem_file = checkpoint_dir / checkpoints1[k] / 'system.physmem.store0.pmem' if not pmem_file.exists(): subprocs.append(Popen(['./CreateCombined.py', '-a=' + str(checkpoint_dir1 / checkpoints1[k]), '-b=' + str(checkpoint_dir2 / checkpoints2[k]), '-o=' + str(checkpoint_dir / checkpoints1[k])])) for proc in subprocs: proc.wait() for config_class in configs: config_name = config_class.name if 'smt' not in config_name: continue config_name = config_name.lower() sim_results = res_root / '{}_{}_summary.json'.format(benchmark, config_name) print('Simulating {} with {} config.'.format( benchmark, config_name)) log_file = simlog_dir / '{}_{}_simlog.txt'.format(benchmark, config_name) sim_args = ['./ParallelSim.py', '--bench', benchmark1, benchmark2, '-d', str(checkpoint_dir), '--log-file', str(log_file),'--config-name', str(config_name)] if args.max_checkpoints is not None: sim_args += ['-n', args.max_checkpoints] if args.force_rerun: sim_args += ['--force-rerun'] proc = run(sim_args) if proc.returncode: print('ParallelSim exited with error: {}'.format(proc.returncode)) if not proc.returncode and sim_results.exists() and args.delete_bad_checkpoints: delete_bad_checkpoints(sim_results) #to save space Popen(['rm', '-rf', str(checkpoint_dir)]) # print("cleaning up pmem files...") # for d in checkpoint_dir1.iterdir(): # if d.is_dir(): # pmem_file = d / 'system.physmem.store0.pmem' # if pmem_file.exists(): # Popen(['rm', str(pmem_file)]) def main(): parser = ArgumentParser(description='Automate runs across multiple benchmarks') parser.add_argument('--benchmarks', '-b', nargs='*', action=SpecBench.ParseBenchmarkNames, help='Which benchmarks to run. If empty, run all.') parser.add_argument('--config-group', '-g', nargs='?', help='What config group to run') parser.add_argument('--config-name', '-c', nargs='?', help='What single config to run') parser.add_argument('--force-recreate', action='store_true', help='Force the recreation of checkpoints') parser.add_argument('--force-rerun', action='store_true', help='Resimulate benchmarks which have already run.') parser.add_argument('--max-checkpoints', '-m', nargs='?', help='Specify the max number of checkpoints to simulate') parser.add_argument('--checkpoint-dir', '-d', help='Checkpoint root directories') parser.add_argument('--reverse', action='store_true', help='Reverse benchmark order') parser.add_argument('--generate-only', action='store_true', help='Only generate benchmarks, no simulations') parser.add_argument('--add-stt', action='store_true', help='Also run STT configs.') parser.add_argument('--add-inorder', action='store_true', help='Also run in-order.') parser.add_argument('--delete-bad-checkpoints', action='store_true', help='If a checkpoint is flakey, delete it!') args = parser.parse_args() run_all(args) if __name__ == '__main__': exit(main())
40.930921
222
0.545287
7019a649b709cd13ee1355813e041b6d316fc2ac
1,995
css
CSS
public/css/file.css
jhuril45/OTRS
e57de8d8e1191f38b0770bdfb072fcc559967ebe
[ "MIT" ]
null
null
null
public/css/file.css
jhuril45/OTRS
e57de8d8e1191f38b0770bdfb072fcc559967ebe
[ "MIT" ]
null
null
null
public/css/file.css
jhuril45/OTRS
e57de8d8e1191f38b0770bdfb072fcc559967ebe
[ "MIT" ]
null
null
null
/* Hide HTML5 Up and Down arrows. */ input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type="number"] { -moz-appearance: textfield; } .bottom-top-radius{ border-top-right-radius: 15px; border-top-left-radius: 15px; border-bottom-right-radius: 15px; border-bottom-left-radius: 15px; } .sidenav { margin-top: 25px; height: 100%; width: 0; position: fixed; z-index: 1; top: 0; left: 0; background-color: #5a6169; overflow-x: hidden; /*transition: 0.5s;*/ padding-top: 60px; } .sidenav a { padding: 8px 8px 8px 32px; text-decoration: none; font-size: 25px; color: white; display: block; /*transition: 0.3s;*/ } .sidenav a:hover { color: #f1f1f1; text-decoration: none; } .sidenav .closebtn { position: absolute; top: 0; right: 25px; font-size: 36px; margin-left: 50px; } #main { /*transition: margin-left .5s;*/ padding: 16px; } /*@media screen and (max-height: 450px) { .sidenav {padding-top: 15px;} .sidenav a {font-size: 18px;} }*/ /*??????????????????????????????????????????????*/ p { font-size: 1; font-weight: 700; line-height: 1.7em; } a, a:hover, a:focus { color: inherit; text-decoration: none; /*transition: all 0.3s;*/ } #sidebar { background: #5a6169; color: #fff; /*transition: all 0.3s;*/ } #sidebar .sidebar-header { padding: 20px; background: #6d7fcc; } #sidebar ul.components { padding: 20px 0; border-bottom: 1px solid #47748b; } #sidebar ul p { color: #fff; padding: 10px; } #sidebar ul li a { padding: 10px; font-size: 1.1em; display: block; } #sidebar ul li a:hover { color: #7386D5; background: #fff; } #sidebar ul li.active > a, a[aria-expanded="true"] { color: #fff; background: #6d7fcc; } ul ul a { font-size: 0.9em !important; padding-left: 30px !important; background: #6d7fcc; }
16.625
98
0.602506
b2f6d7a9a78f23aeaa8f2483d53b348cff9e9092
942
dart
Dart
lib/src/locale/locales/pt.dart
Avyiel/better_moment
27f7e55bc4ff830b0f85d8a5494acdef72c426e2
[ "MIT" ]
2
2019-08-04T08:02:21.000Z
2019-12-31T13:16:18.000Z
lib/src/locale/locales/pt.dart
Avyiel/tempus
27f7e55bc4ff830b0f85d8a5494acdef72c426e2
[ "MIT" ]
null
null
null
lib/src/locale/locales/pt.dart
Avyiel/tempus
27f7e55bc4ff830b0f85d8a5494acdef72c426e2
[ "MIT" ]
null
null
null
part of tempus; class LocalePT implements ILocale { @override String get seconds => 'alguns segundos'; @override String get aMinute => 'um minuto'; @override String get minutes => '%i minutos'; @override String get anHour => 'uma hora'; @override String get hours => '%i horas'; @override String get aDay => 'um dia'; @override String get days => '%i dias'; @override String get aMonth => 'um mês'; @override String get months => '%i meses'; @override String get aYear => 'um ano'; @override String get years => '%i anos'; @override String get futureIdentifier => 'em'; @override String get pastIdentifier => 'há'; @override IdentifierPosition get futurePosition => IdentifierPosition.prepend; @override IdentifierPosition get pastPosition => IdentifierPosition.prepend; @override List<String> get weekdays => ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb']; }
20.478261
70
0.654989
7eb84d934a08017746d4b6f59204a2f152ef669e
283
lua
Lua
MMOCoreORB/bin/scripts/object/custom_content/tangible/quest/naboo_kadaara_jonni_smuggled_goods.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
18
2017-02-09T15:36:05.000Z
2021-12-21T04:22:15.000Z
MMOCoreORB/bin/scripts/object/custom_content/tangible/quest/naboo_kadaara_jonni_smuggled_goods.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
61
2016-12-30T21:51:10.000Z
2021-12-10T20:25:56.000Z
MMOCoreORB/bin/scripts/object/custom_content/tangible/quest/naboo_kadaara_jonni_smuggled_goods.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
71
2017-01-01T05:34:38.000Z
2022-03-29T01:04:00.000Z
object_tangible_quest_naboo_kadaara_jonni_smuggled_goods = object_tangible_quest_shared_naboo_kadaara_jonni_smuggled_goods:new { } ObjectTemplates:addTemplate(object_tangible_quest_naboo_kadaara_jonni_smuggled_goods, "object/tangible/quest/naboo_kadaara_jonni_smuggled_goods.iff")
47.166667
149
0.918728
796545016fe57ff9fdfe5b30d4074ab203de6830
16,795
php
PHP
app/Strategies/BasicStrategy.php
amangeldiyev/blackjack
22b3873f5619095e3231514c14c258f11bbfc753
[ "MIT" ]
null
null
null
app/Strategies/BasicStrategy.php
amangeldiyev/blackjack
22b3873f5619095e3231514c14c258f11bbfc753
[ "MIT" ]
null
null
null
app/Strategies/BasicStrategy.php
amangeldiyev/blackjack
22b3873f5619095e3231514c14c258f11bbfc753
[ "MIT" ]
null
null
null
<?php namespace App\Strategies; use App\Games\BlackJack; class BasicStrategy { const SPLIT = [ 'ACE' => [ 'ACE' => 'Split', 'KING' => 'Split', 'QUEEN' => 'Split', 'JACK' => 'Split', '10' => 'Split', '9' => 'Split', '8' => 'Split', '7' => 'Split', '6' => 'Split', '5' => 'Split', '4' => 'Split', '3' => 'Split', '2' => 'Split', ], 'KING' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], 'QUEEN' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], 'JACK' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '10' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '9' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Split', '8' => 'Split', '7' => 'Stand', '6' => 'Split', '5' => 'Split', '4' => 'Split', '3' => 'Split', '2' => 'Split', ], '8' => [ 'ACE' => 'Split', 'KING' => 'Split', 'QUEEN' => 'Split', 'JACK' => 'Split', '10' => 'Split', '9' => 'Split', '8' => 'Split', '7' => 'Split', '6' => 'Split', '5' => 'Split', '4' => 'Split', '3' => 'Split', '2' => 'Split', ], '7' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Split', '6' => 'Split', '5' => 'Split', '4' => 'Split', '3' => 'Split', '2' => 'Split', ], '6' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Split', '5' => 'Split', '4' => 'Split', '3' => 'Split', '2' => 'Split', ], '5' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Double', '8' => 'Double', '7' => 'Double', '6' => 'Double', '5' => 'Double', '4' => 'Double', '3' => 'Double', '2' => 'Double', ], '4' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Split', '5' => 'Split', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ], '3' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Split', '6' => 'Split', '5' => 'Split', '4' => 'Split', '3' => 'Split', '2' => 'Split', ], '2' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Split', '6' => 'Split', '5' => 'Split', '4' => 'Split', '3' => 'Split', '2' => 'Split', ], ]; const SOFT_HAND = [ '9' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '8' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Ds', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '7' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Stand', '7' => 'Stand', '6' => 'Ds', '5' => 'Ds', '4' => 'Ds', '3' => 'Ds', '2' => 'Ds', ], '6' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Dh', '5' => 'Dh', '4' => 'Dh', '3' => 'Dh', '2' => 'Hit', ], '5' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Dh', '5' => 'Dh', '4' => 'Dh', '3' => 'Hit', '2' => 'Hit', ], '4' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Dh', '5' => 'Dh', '4' => 'Dh', '3' => 'Hit', '2' => 'Hit', ], '3' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Dh', '5' => 'Dh', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ], '2' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Dh', '5' => 'Dh', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ], '1' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Dh', '5' => 'Dh', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ], ]; const HARD_HAND = [ '21' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '20' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '19' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '18' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '17' => [ 'ACE' => 'Stand', 'KING' => 'Stand', 'QUEEN' => 'Stand', 'JACK' => 'Stand', '10' => 'Stand', '9' => 'Stand', '8' => 'Stand', '7' => 'Stand', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '16' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '15' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '14' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '13' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Stand', '2' => 'Stand', ], '12' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Stand', '5' => 'Stand', '4' => 'Stand', '3' => 'Hit', '2' => 'Hit', ], '11' => [ 'ACE' => 'Double', 'KING' => 'Double', 'QUEEN' => 'Double', 'JACK' => 'Double', '10' => 'Double', '9' => 'Double', '8' => 'Double', '7' => 'Double', '6' => 'Double', '5' => 'Double', '4' => 'Double', '3' => 'Double', '2' => 'Double', ], '10' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Double', 'JACK' => 'Double', '10' => 'Double', '9' => 'Double', '8' => 'Double', '7' => 'Double', '6' => 'Double', '5' => 'Double', '4' => 'Double', '3' => 'Double', '2' => 'Double', ], '9' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Double', '5' => 'Double', '4' => 'Double', '3' => 'Double', '2' => 'Stand', ], '8' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Hit', '5' => 'Hit', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ], '7' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Hit', '5' => 'Hit', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ], '6' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Hit', '5' => 'Hit', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ], '5' => [ 'ACE' => 'Hit', 'KING' => 'Hit', 'QUEEN' => 'Hit', 'JACK' => 'Hit', '10' => 'Hit', '9' => 'Hit', '8' => 'Hit', '7' => 'Hit', '6' => 'Hit', '5' => 'Hit', '4' => 'Hit', '3' => 'Hit', '2' => 'Hit', ] ]; public static function choice(BlackJack $game) { $choices = $game->playerOptions(); $player_value = $game->handValue($game->player_cards); $dealer_face_up = $game->dealer_cards[0]['value']; if (in_array('Split', $choices)) { return self::SPLIT[$game->player_cards[0]['value']][$dealer_face_up]; } $soft_value = $player_value; foreach ($game->player_cards as $card) { if ($card['value'] == 'ACE') { $soft_value -= 1; } else { $soft_value -= $game::VALUES[$card['value']]; } } if ($soft_value > 0) { $option = self::SOFT_HAND[$player_value - 11][$dealer_face_up]; if (($option == 'Ds' || $option == 'Dh')) { if (in_array('Double', $choices)) { return 'Double'; } else { return $option == 'Ds' ? 'Stand' : 'Hit'; } } return $option; } if (self::HARD_HAND[$player_value][$dealer_face_up] == 'Double' && !in_array('Double', $choices)) { return 'Hit'; } return self::HARD_HAND[$player_value][$dealer_face_up]; } }
26.160436
107
0.228937
bb0f120684ed35a38a2e9c3d60d71af04955d03d
1,150
cs
C#
NeoToCosmos/Cache.cs
bsherwin/neo-to-cosmos
8273c9b860e6fe71f84115dfbaaaa4565920fa37
[ "MIT" ]
9
2018-05-11T20:02:04.000Z
2021-10-14T03:47:07.000Z
NeoToCosmos/Cache.cs
bsherwin/neo-to-cosmos
8273c9b860e6fe71f84115dfbaaaa4565920fa37
[ "MIT" ]
2
2017-09-20T01:21:29.000Z
2021-01-12T16:57:12.000Z
NeoToCosmos/Cache.cs
bsherwin/neo-to-cosmos
8273c9b860e6fe71f84115dfbaaaa4565920fa37
[ "MIT" ]
4
2017-09-19T18:21:59.000Z
2021-07-02T18:50:27.000Z
using RocksDbSharp; using System; using System.IO; namespace NeoToCosmos { public class Cache : IDisposable { private readonly RocksDb _rocksDb; public Cache(bool shouldRestart) { var cachePath = Environment.GetEnvironmentVariable("CACHE_PATH") ?? "cache"; if (shouldRestart) { HandleRestart(cachePath); } var options = new DbOptions().SetCreateIfMissing(true); _rocksDb = RocksDb.Open(options, cachePath); } private static void HandleRestart(string cachePath) { var di = new DirectoryInfo(cachePath); if (di.Exists) { foreach (var file in di.GetFiles()) { file.Delete(); } } } public string Get(string key) { return _rocksDb.Get(key); } public void Set(string key, string value) { _rocksDb.Put(key, value); } public void Dispose() { _rocksDb?.Dispose(); } } }
22.115385
88
0.496522
1a740620fe99d3c5ae8c9c6a3e8cb1dbe217eb36
1,387
cs
C#
Sources/Core2/SubscriberBase.cs
qifei2012/MessageBus
4b4e781b45d48fa6ee49e52570b01235927adc56
[ "Apache-2.0" ]
1
2018-04-26T04:35:40.000Z
2018-04-26T04:35:40.000Z
Sources/Core2/SubscriberBase.cs
qifei2012/MessageBus
4b4e781b45d48fa6ee49e52570b01235927adc56
[ "Apache-2.0" ]
null
null
null
Sources/Core2/SubscriberBase.cs
qifei2012/MessageBus
4b4e781b45d48fa6ee49e52570b01235927adc56
[ "Apache-2.0" ]
null
null
null
using System.Collections.Generic; using MessageBus.Core.API; using RabbitMQ.Client; namespace MessageBus.Core { public class SubscriberBase : ISubscription { private readonly IModel _model; private readonly string _queue; private readonly IBasicConsumer _consumer; private readonly SubscriberConfigurator _configurator; private string _consumerTag; public SubscriberBase(IModel model, string queue, IBasicConsumer consumer, SubscriberConfigurator configurator) { _model = model; _queue = queue; _consumer = consumer; _configurator = configurator; } public void Dispose() { if (!_configurator.Blocked) { _model.Close(); } } public void Open() { if (_configurator.Prefetch > 0) { _model.BasicQos(0, _configurator.Prefetch, false); } _consumerTag = _model.BasicConsume(_queue, !_configurator.TransactionalDelivery, _configurator.ConsumerTag, !_configurator.ReceiveSelfPublish, false, new Dictionary<string, object>(), _consumer); } public void Close() { _model.BasicCancel(_consumerTag); } } }
28.306122
208
0.574621
3847826e0ddea242ed4e39c431ead32d500444d5
2,236
php
PHP
resources/views/users/create.blade.php
ikaul29/Backend
d0d62346a74a23370c7f094646107b7fa64c4fc1
[ "Apache-2.0" ]
null
null
null
resources/views/users/create.blade.php
ikaul29/Backend
d0d62346a74a23370c7f094646107b7fa64c4fc1
[ "Apache-2.0" ]
9
2020-04-30T13:51:32.000Z
2022-02-26T21:52:51.000Z
resources/views/users/create.blade.php
ikaul29/Backend
d0d62346a74a23370c7f094646107b7fa64c4fc1
[ "Apache-2.0" ]
8
2020-01-04T05:25:59.000Z
2022-02-24T08:39:26.000Z
@extends('layouts.app') @section('content') <section class="cover"> <div class="container"> <div class="row justify-content-center"> <div class="col-md-10 col-lg-8"> <h1>Create New User</h1> <p class="lead"> It's time to welcome that new recruit to the DTU Times family. </p> </div> </div> <!--end of row--> <div class="row justify-content-center"> <div class="col-md-10 col-lg-8"> <form method="POST" action="{{ route('users.store') }}" class="row mt-0"> @csrf <div class="col-md-12"> <label>Name</label> <input type="text" name="name" placeholder="Name" class="validate-required" value="{{ old('name') ? old('name') : '' }}" required /> </div> <div class="col-md-12"> <label>Email Address:</label> <input type="email" name="email" placeholder="Email" class="validate-required" value="{{ old('email') ? old('email') : '' }}" /> </div> <div class="col-md-12"> <h4 class="mb-0 mt-1">Role</h4> </div> <div class="col-md-12"> @foreach ($roles as $item) <div class="input-radio input-radio--innerlabel"> <input id="{{ $item->name }}" type="radio" name="role" value="{{ $item->name }}" /> <label for="{{ $item->name }}">{{$item->display_name}}</label> </div> @endforeach </div> <div class="col-md-12"> <br> </div> <div class="col-md-4"> <button type="submit" class="btn btn--sm"> Create </button> </div> </form> </div> </div> </div> <!--end of container--> </section> @endsection
39.928571
156
0.391324
4bcd5377e9aa0478c11c044a0d78f37ea2a3b7bd
3,395
h
C
external/sysroot/debian_sid_amd64-sysroot/usr/include/pipewire/port.h
kcratie/evio-gnbuild
7af889e69df8a070f1a612cff15dd3c4b357792f
[ "MIT" ]
5
2020-12-17T06:55:53.000Z
2021-09-30T13:06:58.000Z
external/sysroot/debian_sid_amd64-sysroot/usr/include/pipewire/port.h
kcratie/evio-gnbuild
7af889e69df8a070f1a612cff15dd3c4b357792f
[ "MIT" ]
1
2022-01-04T21:53:07.000Z
2022-03-30T11:16:05.000Z
external/sysroot/debian_sid_amd64-sysroot/usr/include/pipewire/port.h
kcratie/evio-gnbuild
7af889e69df8a070f1a612cff15dd3c4b357792f
[ "MIT" ]
8
2020-09-30T10:06:31.000Z
2022-03-29T21:17:21.000Z
/* PipeWire * Copyright (C) 2015 Wim Taymans <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef __PIPEWIRE_PORT_H__ #define __PIPEWIRE_PORT_H__ #ifdef __cplusplus extern "C" { #endif #define PW_TYPE__Port "PipeWire:Object:Port" #define PW_TYPE_PORT_BASE PW_TYPE__Port ":" #include <spa/utils/hook.h> /** \page page_port Port * * \section page_node_overview Overview * * A port can be used to link two nodes. */ /** \class pw_port * * The port object */ struct pw_port; struct pw_link; struct pw_control; #include <pipewire/core.h> #include <pipewire/introspect.h> #include <pipewire/node.h> enum pw_port_state { PW_PORT_STATE_ERROR = -1, /**< the port is in error */ PW_PORT_STATE_INIT = 0, /**< the port is being created */ PW_PORT_STATE_CONFIGURE = 1, /**< the port is ready for format negotiation */ PW_PORT_STATE_READY = 2, /**< the port is ready for buffer allocation */ PW_PORT_STATE_PAUSED = 3, /**< the port is paused */ PW_PORT_STATE_STREAMING = 4, /**< the port is streaming */ }; /** Port events, use \ref pw_port_add_listener */ struct pw_port_events { #define PW_VERSION_PORT_EVENTS 0 uint32_t version; /** The port is destroyed */ void (*destroy) (void *data); /** The port is freed */ void (*free) (void *data); /** the port info changed */ void (*info_changed) (void *data, struct pw_port_info *info); /** a new link is added on this port */ void (*link_added) (void *data, struct pw_link *link); /** a link is removed from this port */ void (*link_removed) (void *data, struct pw_link *link); /** the state of the port changed */ void (*state_changed) (void *data, enum pw_port_state state); /** a control was added to the port */ void (*control_added) (void *data, struct pw_control *control); /** a control was removed from the port */ void (*control_removed) (void *data, struct pw_control *control); }; /** Get the port direction */ enum pw_direction pw_port_get_direction(struct pw_port *port); /** Get the port properties */ const struct pw_properties *pw_port_get_properties(struct pw_port *port); /** Update the port properties */ int pw_port_update_properties(struct pw_port *port, const struct spa_dict *dict); /** Get the port id */ uint32_t pw_port_get_id(struct pw_port *port); /** Get the port parent node or NULL when not yet set */ struct pw_node *pw_port_get_node(struct pw_port *port); /** Add an event listener on the port */ void pw_port_add_listener(struct pw_port *port, struct spa_hook *listener, const struct pw_port_events *events, void *data); #ifdef __cplusplus } #endif #endif /* __PIPEWIRE_PORT_H__ */
29.521739
81
0.711635
e75752a69e62f4c842922bce0b7f18950f4b19c8
2,204
php
PHP
application/views/Admin/top_menu.php
AgusStudio/web-pktm
1836c5a4c4a203944e28b62ab025c892283ea22e
[ "MIT" ]
null
null
null
application/views/Admin/top_menu.php
AgusStudio/web-pktm
1836c5a4c4a203944e28b62ab025c892283ea22e
[ "MIT" ]
null
null
null
application/views/Admin/top_menu.php
AgusStudio/web-pktm
1836c5a4c4a203944e28b62ab025c892283ea22e
[ "MIT" ]
null
null
null
<div class="topbar"> <!-- LOGO --> <div class="topbar-left"> <div class="text-center"> <a href="<?php echo base_url('admin'); ?>" class="logo"><img src="<?php echo base_url('assets/images/bps.png');?>" class="thumb-md"><span> <?php echo $user->nama_desa;?></span></a> </div> </div> <!-- Button mobile view to collapse sidebar menu --> <div class="navbar navbar-default" role="navigation"> <div class="container"> <div class=""> <div class="pull-left"> <button class="button-menu-mobile open-left"> <i class="fa fa-bars"></i> </button> <span class="clearfix"></span> </div> <ul class="nav navbar-nav navbar-right pull-right"> <li class="hidden-xs"> <a href="#" id="btn-fullscreen" class="waves-effect waves-light"><i class="fa fa-expand"></i></a> </li> <li class="dropdown"> <a href="" class="dropdown-toggle profile" data-toggle="dropdown" aria-expanded="true"><img src="<?php if($user->foto==''){ echo base_url('assets/users/userdefault.png');}else{ echo base_url('assets/users/'.$user->foto); } ?>" class="img-circle"></a> <ul class="dropdown-menu"> <li><a href="<?php echo site_url('admin/profile');?>"><i class="fa fa-user"></i> Profile</a></li> <li><a href="<?php echo site_url('admin/logout');?>"><i class="md md-settings-power"></i> Logout</a></li> </ul> </li> </ul> </div> <!--/.nav-collapse --> </div> </div> </div>
64.823529
286
0.38657
806b9b6d8a1f56013865baba59b32b7624104255
1,430
lua
Lua
nvim/lua/al3xfischer/terminal/settings.lua
al3xfischer/dotfiles
896d409375616a59d3390568e1f50f605c856cf9
[ "MIT" ]
null
null
null
nvim/lua/al3xfischer/terminal/settings.lua
al3xfischer/dotfiles
896d409375616a59d3390568e1f50f605c856cf9
[ "MIT" ]
null
null
null
nvim/lua/al3xfischer/terminal/settings.lua
al3xfischer/dotfiles
896d409375616a59d3390568e1f50f605c856cf9
[ "MIT" ]
null
null
null
vim.g.netrw_banner = 0 vim.g.netrw_winsize = 25 vim.g.netrw_browser_split = 4 vim.g.netrw_liststyle = 1 vim.g.netrw_powerline_fonts = 1 vim.g.vimspector_enable_mappings ='VISUAL_STUDIO' vim.g.python3_host_prog = 'C:/Users/Alex/AppData/Local/Programs/Python/Python39/python' vim.wo.number = true vim.opt.scrolloff=1 vim.opt.tabstop=4 vim.opt.shiftwidth=4 vim.opt.smartcase = true vim.opt.ignorecase = true vim.o.incsearch = true vim.o.hidden = true vim.opt.shellxquote= '' vim.opt.shellquote= '' if vim.fn.has('win32') then vim.opt.shell = 'powershell' else vim.opt.shell = 'pwsh' end vim.opt.shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' vim.opt.shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' vim.o.completeopt = "menuone,noselect" vim.o.omnifunc = 'v:lua.vim.lsp.omnifunc' vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.api.nvim_exec( [[ augroup ReplaceNetrw autocmd VimEnter * silent! autocmd! FileExplorer autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | call luaeval("require('telescope.builtin').find_files({cwd = _A})", argv()[0]) | endif augroup END ]], false)
31.777778
176
0.708392
cb4b6a6d1c74be095d0f4fb2a02924273f691943
40,882
lua
Lua
game/assets/maps/mundo_back.lua
0vjv0/sindemia
5d6aae63e068c462460726e011c4ed89a069035a
[ "MIT" ]
null
null
null
game/assets/maps/mundo_back.lua
0vjv0/sindemia
5d6aae63e068c462460726e011c4ed89a069035a
[ "MIT" ]
null
null
null
game/assets/maps/mundo_back.lua
0vjv0/sindemia
5d6aae63e068c462460726e011c4ed89a069035a
[ "MIT" ]
null
null
null
return { 1269,1270,0,0,0,0,0,0,1268,1269,1269,1270,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1268,1269,1269,1269,1269,1270,0,0,0,0,0,0,0,0,0,0,0,1268,1269,1269,1270,1268,1269,1269,1269,1269,1270,0,0,1268,1269,1270,0,0,0,0,0,1268,1269,1269,1270,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1302,1305,1269,1269,1269,1269,1269,1269,1306,1302,1302,1305,1270,0,1268,1269,1269,1269,1269,1269,1269,1269,2147484917,2147484917,2147484917,2147484917,1270,0,0,2147484918,1270,0,0,2147484918,2147484917,2147484916,0,1268,2147484917,2147484917,2147484917,2147484917,1270,0,0,2147484918,1269,1269,1269,1306,1302,1272,1273,1302,1305,2147484917,2147484917,2147484917,2147484916,0,0,0,0,0,1268,1269,1306,1302,1302,1305,1306,1302,1302,1302,1302,1305,1269,1269,1306,1302,1305,2147484917,2147484916,0,2147484918,2147484917,1306,1302,1302,1305,1269,1269,1269,1270,0,0,0,2147484918,2147484917,2147484916,0,2147484918,2147484917,2147484917,2147484917,2147484917,1270,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 902,903,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1305,1269,1306,1302,1302,1302,1302,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,1305,1269,1269,1306,1305,1269,2147484917,2147484953,2147484950,1305,2147484917,2147484953,2147484950,2147484950,2147484950,2147484950,2147484949,1268,2147484916,2147484951,1272,1273,1302,1302,1302,1305,1306,1302,1302,2147484950,2147484950,2147484950,2147484949,2147484918,2147484916,0,0,1268,1306,1302,2147484950,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,1302,1302,1302,1302,1302,1302,1302,2147484950,2147484954,2147484917,2147484953,2147484950,2147484950,2147484950,2147484950,1272,1273,1302,1302,1303,0,0,0,1301,2147484950,2147484954,2147484917,2147484953,2147484950,2147484950,2147484950,2147484950,2147484949,2147484918,1269,1269,1269,1269,1269,1270,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,937,903,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,2147484950,1302,1302,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,1302,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484954,2147484953,2147484954,2147484953,1305,1306,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484954,2147484953,2147484954,1269,1269,1306,1302,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,1302,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,1305,1306,1302,1302,1305,1269,1269,1269,1306,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484954,2147484953,1302,1302,2147484950,1302,1302,1305,1269,1269,1270,0,0,0,0,0,0,0,0,0,0,0, 0,0,937,903,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,1302,1302,1302,1302,1305,1269,1270,0,0,0,0,0,0,0,0,0, 0,0,0,937,902,902,903,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,2147484950,2147484950,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,2147484950,2147484950,2147484950,2147484950,2147484950,1302,1305,1269,1269,1269,1270,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1303,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1303,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1303,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1303,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1303,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1610614065,1610614065,1610614065,1610614065,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1610614065,1610614065,0,0,0,36,54,54,54,2147483684,0,0,0,0,0,0,0,0,0,0,0,0,1336,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,36,54,54,54,2147483684,0,0,2,0,36,54,2147483684,0,36,54,2147483684,0,36,54,2147483684,354,33,34,1878,1878,36,54,2147483684,2147483650,0,0,0,2,2,36,37,38,39,40,0,0,2147483750,2147483749,2147483747,2147483746,36,54,2147483684,36,54,2147483684,2147483650,36,54,2147483684,254,254,36,54,2147483684,2147483650,36,54,2147483684,36,54,2147483684,2,2147483650,0,0,0,254,0,2,0,0,36,37,38,39,40,0,2147483650,100,101,254,254,254,75,76,76,76,77,36,2147483684,0,0,0,2147483650,36,54,2147483684,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,75,76,76,76,77,36,2147483684,16,2,95,4,96,2147483650,95,4,96,63,95,4,96,0,64,65,491,491,95,4,96,2147483745,36,54,2147483684,95,96,67,68,69,70,71,0,0,2147483781,129,2147483778,2147483777,95,8,9,95,4,96,2147483745,95,8,96,0,0,95,4,96,2147483745,95,8,96,95,4,96,16,2147483745,491,491,2,72,36,54,2147483684,2,36,54,54,54,2147483684,2,2147483745,131,132,0,0,0,106,107,107,107,108,2147483725,77,36,54,2147483684,2147483745,95,8,9,0,0,0,1067,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,106,107,107,107,108,95,96,160,160,126,3,127,97,126,3,127,0,126,3,127,0,95,96,79,79,126,3,127,94,95,8,2147483743,126,127,0,0,0,0,0,1657,0,2147483812,2147483811,2147483809,2147483808,4,5,6,126,3,127,128,126,5,127,0,0,126,3,127,94,95,5,96,126,3,127,160,128,79,79,160,103,95,8,9,97,75,76,76,76,77,96,128,162,163,164,0,0,137,161,138,161,139,2147483787,139,95,4,96,94,4,5,6,0,0,0,1100,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,137,161,138,161,139,157,158,191,0,157,162,156,159,157,163,161,0,157,163,161,354,157,158,79,110,157,162,156,160,157,163,161,157,161,354,354,354,354,354,1691,354,354,354,354,354,157,163,161,157,161,158,159,157,161,162,285,285,157,162,156,160,157,163,161,157,161,158,0,159,79,110,0,254,157,161,163,160,137,161,138,161,139,158,159,0,0,0,0,0,0,0,0,0,0,0,0,157,162,156,160,157,163,161,0,0,0,1100,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1065,1066,1066,1066,1066,1066,1066,0,0,0,1100,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,1164,1132,1132,1165,0,0,0,0,0,1133,0,0,1065,1066,1067, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,1197,1067,0,1098,775,777,0,0,0,0,0,0,1098,1099,1100, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,1164,1133,0,1098,808,810,0,0,0,0,0,0,1131,1132,1133, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,1100,0,0,1098,841,843,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,1197,1067,0,1098,907,876,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,1100,0,1098,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,1100,0,1098,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,1100,0,1098,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,1100,0,1098,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,1100,0,1098,0,774,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,1100,0,1131,1165,807,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,1197,1067,807,1098,807,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,1100,840,1098,840,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,1100,906,1098,906,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,1100,1065,1198,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,1100,1098,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,1100,1131,1165,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,1100,0,1098,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,1197,1067,1098,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,1100,1098,0,0,0,0,0,0,0,0,0,1065, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,1100,1098,0,0,0,0,0,0,0,0,0,1131, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,1100,1131,1132,0,0,0,0,0,0,0,1065,1066, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,1100,0,0,0,0,0,0,0,0,0,1098,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,1100,0,0,0,0,0,0,0,0,0,1098,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,1197,1067,0,0,0,0,0,0,0,0,1098,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,1100,0,0,0,0,0,0,0,0,1131,1132, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,1100,0,0,0,0,1067,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,1197,1066,0,0,0,1197,1066,1066,1067,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1197,1066,1067, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1197, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1164, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1100, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1100, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,1164,1133, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,1100,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,1100,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1164,1133,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,1164,1132,1133,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,1100,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,1132,1133,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,1066,1067,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,1100,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,1100,0,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,1197,1067,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1197,1067,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1164,1133,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,0,0,0,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,1098,1164,1132,1132,1132,1132,1165,0,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,913,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,913,913,913,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,1100,0,0,774,0,1098,1067,0,0,0,0,1100,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,979,980,981,0,0,0,0,0,0,979,980,980,981,0,913,0,979,980,981,0,0,913,913,0,946,979,981,913,0,0,0,979,980,981,0,0,0,0,913,0,0,979,980,981,0,0,979,980,981,979,980,981,0,913,0,0,0,913,913,913,913,0,979,980,980,980,980,981,0,0,2147484561,0,0,946,946,946,0,0,0,979,980,980,980,981,0,913,0,979,980,980,980,980,981,0,1098,1100,0,0,807,0,1098,1100,0,0,0,1099,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,1012,1013,1014,0,0,0,0,0,913,1012,1013,1013,1014,0,946,913,1012,1013,1014,913,0,946,946,0,913,1012,1014,946,0,0,0,1012,1013,1014,913,0,913,0,946,0,0,1012,1013,1014,0,0,1045,1046,1047,1045,1046,1047,0,946,0,913,0,946,946,946,946,0,1012,1013,1013,1013,1013,1014,0,2147484561,2147484594,0,0,913,913,913,913,913,0,1012,1013,1013,1013,1014,0,946,913,1012,1013,1013,1013,1013,1014,0,1098,1100,0,0,906,0,1098,1100,0,0,0,1164,1133,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,1045,1046,1047,0,913,913,913,0,946,1045,1046,1046,1047,0,0,946,1045,1046,1047,946,0,0,0,0,946,1045,1047,0,0,0,0,1045,1046,1047,946,913,946,913,0,0,0,1045,1046,1047,0,0,979,980,981,979,980,981,0,913,0,946,0,0,0,0,0,0,1012,1013,1013,1013,1013,1014,0,2147484594,0,0,0,946,946,946,946,946,0,1012,1013,1013,1013,1014,0,0,946,1012,1013,1013,1013,1013,1014,0,1098,1100,0,0,0,0,1098,1100,0,0,0,1100,0,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,946,946,946,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,946,0,946,0,0,0,0,0,0,0,0,1045,1046,1047,1045,1046,1047,0,946,0,0,0,0,0,0,0,0,1045,1046,1046,1046,1046,1047,0,0,0,0,0,0,0,0,0,0,0,1045,1046,1046,1046,1047,0,0,0,1045,1046,1046,1046,1046,1047,0,1098,1197,1066,1066,1066,1066,1198,1100,0,0,0,1197,1067,0,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1098,0,0,0,3221225665,3221225665,0,1100,0,0,0,0,1100,0,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1131,1132,1132,1132,1132,1132,1132,1133,0,0,0,0,1197,1067,0,0, 0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1100,0,0, 0,0,0,0,0,0,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,769,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1073742078,1098,1073742078,1073742078,0,0,0,1197,1067,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,736,704,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,0,0,0,0,1065,1066,1066,1198,0,0,0,0,0,0,1197,1067, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,769,0,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,0,0,0,1065,1198,0,0,0,0,0,0,0,0,0,0,1100, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,802,671,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,0,0,778,779,780,844,845,846,778,779,780,1098,0,0,0,0,0,0,0,0,0,0,0,1100, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,769,0,0,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,0,778,779,780,811,812,813,0,778,779,780,0,811,812,813,0,0,778,779,780,811,812,813,0,0,0,0,0,811,812,813,0,0,778,779,780,811,812,813,0,778,779,780,0,811,812,813,0,0,778,779,780,811,812,813,0,0,0,811,812,813,1131,1132,1132,1132,1165,0,0,0,0,0,0,0,1100, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,769,0,0,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,0,811,812,813,844,845,846,0,811,812,813,0,844,845,846,0,0,811,812,813,844,845,846,0,778,779,780,0,844,845,846,0,0,811,812,813,844,845,846,0,811,812,813,0,844,845,846,0,0,811,812,813,844,845,846,0,0,0,844,845,846,0,0,0,0,1131,1132,1165,0,0,0,0,0,1100 }
312.076336
1,293
0.59591
40d9851a0a6b6289df43a22168c4ccf984c9faa5
300,540
lua
Lua
game.lua
qixils/mari0_ae
40caafd40e5eaa13447995238ad5a9cfbb377827
[ "WTFPL" ]
null
null
null
game.lua
qixils/mari0_ae
40caafd40e5eaa13447995238ad5a9cfbb377827
[ "WTFPL" ]
null
null
null
game.lua
qixils/mari0_ae
40caafd40e5eaa13447995238ad5a9cfbb377827
[ "WTFPL" ]
null
null
null
local queuespritebatchupdate = false function game_load(suspended) scrollfactor = 0 scrollfactory = 0 scrollfactor2 = 0 scrollfactor2y = 0 love.graphics.setBackgroundColor(backgroundcolor[1]) backgroundrgbon = false backgroundrgb = {0, 0, 0} backgroundcolor[4] = backgroundrgb scrollingstart = scrollingstartv --when the scrolling begins to set in (Both of these take the player who is the farthest on the left) scrollingcomplete = scrollingcompletev --when the scrolling will be as fast as mario can run scrollingleftstart = scrollingleftstartv --See above, but for scrolling left, and it takes the player on the right-estest. scrollingleftcomplete = scrollingleftcompletev superscroll = 100 if nofunallowed then disablecheats() end --Daily Challenge if suspended == "dailychallenge" then suspended = false dcplaying = true disablecheats() --[[for i = 1, players do setcustomplayer("mario", i) end]] else dcplaying = false end oldjoystick = {} --LINK STUFF mariocoincount = 0 marioscore = 0 --get mariolives and physics mariolivecount = 3 currentphysics = 1 camerasetting = 1 dropshadow = false realtime = false continuesublevelmusic = false nolowtime = false nocoinlimit = false setphysics(1) if love.filesystem.exists(mappackfolder .. "/" .. mappack .. "/settings.txt") and not dcplaying then local s = love.filesystem.read( mappackfolder .. "/" .. mappack .. "/settings.txt" ) local s1 = s:split("\n") for j = 1, #s1 do local s2 = s1[j]:split("=") if s2[1] == "lives" then mariolivecount = tonumber(s2[2]) elseif s2[1] == "physics" then currentphysics = tonumber(s2[2]) or 1 setphysics(currentphysics) elseif s2[1] == "camera" then camerasetting = tonumber(s2[2]) or 1 setcamerasetting(camerasetting) elseif s2[1] == "dropshadow" then dropshadow = true elseif s2[1] == "realtime" then realtime = true elseif s2[1] == "nocoinlimit" then nocoinlimit = true elseif s2[1] == "continuesublevelmusic" then continuesublevelmusic = true elseif s2[1] == "nolowtime" then nolowtime = true elseif s2[1] == "character" then for i = 1, players do setcustomplayer(s2[2], i) end end end end if CenterCamera and not editormode then camerasetting = 2 end if mariolivecount == 0 or dcplaying then mariolivecount = false end if InfiniteLivesMultiplayer and (not (SERVER or CLIENT)) and players > 1 then infinitelives = true end mariolives = {} for i = 1, players do mariolives[i] = mariolivecount end mariosizes = {} for i = 1, players do mariosizes[i] = 1 end updateplayerproperties() autoscroll = true autoscrollx = true autoscrolly = true inputs = { "door", "groundlight", "wallindicator", "cubedispenser", "walltimer", "notgate", "laser", "lightbridge", "delayer", "funnel", "portal1", "portal2", "text", "geldispenser", "tiletool", "enemytool", "randomizer", "musicchanger", "rocketturret", "checkpoint", "emancipationgrill", "belt", "animationtrigger", "faithplate", "animatedtiletrigger", "orgate", "andgate", "rsflipflop", "kingbill", "platform", "collectable", "skewer", "energylauncher", "camerastop", "laserfields", "track" } inputsi = {28, 29, 30, 43, 44, 45, 46, 47, 48, 67, 74, 84, 52, 53, 54, 55, 36, 37, 38, 39, 186, 198, 197, 199, 61, 62, 63, 64, 65, 66, 71, 72, 73, 181, 182, 183, 201, 205, 206, 210, 194, 225, 226, 227, 229, 230, 231, 232, 100, 26, 27, 266, 271, 273, 274, 272, 105, 163, 248, 249, 18, 19, 259, 166, 167, 168, 169, 304, 309, 311, 306} outputs = { "button", "laserdetector", "box", "pushbutton", "walltimer", "notgate", "energycatcher", "squarewave", "delayer", "regiontrigger", "randomizer", "tiletool", "orgate", "andgate", "rsflipflop", "flipblock", "doorsprite", "collectablelock", "collectable", "animationoutput" } outputsi = {40, 56, 57, 58, 59, 20, 68, 69, 74, 84, 165, 170, 171, 172, 173, 185, 186, 200, 206, 201, 222, 267, 268, 273, 274, 272, 275, 163, 248, 249, 277, 276, 291} --purpose of enemies table: --carried by platforms and such --killed by blocks below --granted despawning immunity when mario goes through doors --killed by rainboom --deep copied by regiontrigger enemies = { "goomba", "koopa", "hammerbro", "plant", "lakito", "bowser", "cheep", "squid", "flyingfish", "cheepwhite", "cheepred", "beetle", "spikey", "sidestepper", "barrel", "icicle", "angrysun", "splunkin", "firebro", "fishbone", "drybones", "muncher", "bigbeetle", "meteor", "boomerangbro", "ninji", "boo", "mole", "bigmole", "bomb", "bombhalf", "torpedoted", "parabeetle", "parabeetleright", "boomboom", "pinksquid", "shell", "shyguy", "beetleshell", "spiketop", "pokey", "snowpokey", "fighterfly", "chainchomp", "rockywrench", "tinygoomba", "koopaling", "bowser3", "icebro", "squidnanny", "goombashoe", "wiggler", "magikoopa", "spike", "spikeball", "plantcreeper"} --aren't spawned when player at checkpoint checkpointignoreenemies = { "goomba", "koopa", "hammerbro", "plant", "lakito", "bowser", "cheep", "squid", "flyingfish", "goombahalf", "koopahalf", "cheepwhite", "cheepred", "koopared", "kooparedhalf", "kooparedflying", "beetle", "beetlehalf", "spikey", "spikeyhalf", "downplant", "paragoomba", "sidestepper", "barrel", "icicle", "angrysun", "splunkin", "biggoomba", "firebro", "redplant", "reddownplant", "fishbone", "drybones", "muncher", "dryboneshalf", "bigbeetle", "meteor", "drygoomba", "dryplant", "drydownplant", "boomerangbro", "ninji", "boo", "mole", "bigmole", "bomb", "bombhalf", "fireplant", "downfireplant", "torpedoted", "parabeetle", "parabeetleright", "boomboom", "koopablue", "koopabluehalf", "pinksquid", "shell", "shyguy", "shyguyhalf", "beetleshell", "spiketop", "spiketophalf", "pokey", "snowpokey", "fighterfly", "chainchomp", "bighammerbro", "rockywrench", "tinygoomba", "koopaling", "bowser3", "icebro", "squidnanny", "goombashoe", "wiggler", "magikoopa", "spike", "spikeball", "plantcreeper"} jumpitems = { "mushroom", "oneup", "poisonmush" , "threeup"} marioworld = 1 mariolevel = 1 mariosublevel = 0 respawnsublevel = 0 checkpointsublevel = false objects = nil if suspended == true then continuegame() elseif suspended then marioworld = suspended end --remove custom sprites for i = smbtilecount+portaltilecount+1, #tilequads do tilequads[i] = nil end for i = smbtilecount+portaltilecount+1, #rgblist do rgblist[i] = nil end --add custom tiles local bla = love.timer.getTime() if not dcplaying and love.filesystem.exists(mappackfolder .. "/" .. mappack .. "/tiles.png") then loadtiles("custom") customtiles = true else customtiles = false customtilecount = 0 end print("Custom tileset loaded in: " .. round(love.timer.getTime()-bla, 5)) smbspritebatch = {} portalspritebatch = {} customspritebatch = {} spritebatchX = {} spritebatchY = {} for i = 1, 2 do smbspritebatch[i] = love.graphics.newSpriteBatch( smbtilesimg, maxtilespritebatchsprites ) portalspritebatch[i] = love.graphics.newSpriteBatch( portaltilesimg, maxtilespritebatchsprites ) if customtiles then customspritebatch[i] = {} for i2 = 1, #customtilesimg do customspritebatch[i][i2] = love.graphics.newSpriteBatch( customtilesimg[i2], maxtilespritebatchsprites ) end end spritebatchX[i] = 0 spritebatchY[i] = 0 end portaldotspritebatch = love.graphics.newSpriteBatch(portaldotimg, 1000, "dynamic" ) portalprojectilespritebatch = love.graphics.newSpriteBatch(portalprojectileparticleimg, 1000, "dynamic" ) custommusic = false --hide android controls if android and not androidHIDE then local hide = true for i = 1, players do if controls[i] then for j, w in pairs(controls[i]) do if not (w[1] and w[1] == "joy") then hide = false break end end end end if hide then androidHIDE = true end end --send chat ingame if SERVER or CLIENT then guielements = {} guielements.chatentry = guielement:new("input", 4, 207, 43+7/8, sendchat, "", 43) guielements.sendbutton = guielement:new("button", 359, 207, "send", sendchat, 1) guielements.chatentry.active = false guielements.sendbutton.active = false chatentrytoggle = false end --FINALLY LOAD THE DAMN LEVEL enemies_load() if dcplaying then levelscreen_load("dc") else levelscreen_load("initial") end end function game_update(dt) -------- --GAME-- -------- --pausemenu if pausemenuopen and not (SERVER or CLIENT) then --joystick navigation local s1 = controls[1]["right"] local s2 = controls[1]["left"] local s3 = controls[1]["down"] local s4 = controls[1]["up"] if s1[1] == "joy" then if checkkey(s1,1,"right") then if not oldjoystick[1] then game_keypressed("right") oldjoystick[1] = true end else oldjoystick[1] = false end end if s2[1] == "joy" then if checkkey(s2,1,"left") then if not oldjoystick[2] then game_keypressed("left") oldjoystick[2] = true end else oldjoystick[2] = false end end if s3[1] == "joy" then if checkkey(s3,1,"down") then if not oldjoystick[3] then game_keypressed("down") oldjoystick[3] = true end else oldjoystick[3] = false end end if s4[1] == "joy" then if checkkey(s4,1,"up") then if not oldjoystick[4] then game_keypressed("up") oldjoystick[4] = true end else oldjoystick[4] = false end end return end --animationS animationsystem_update(dt) --earthquake reset if earthquake > 0 then earthquake = math.max(0, earthquake-dt*earthquake*2-0.001) sunrot = sunrot + dt end --animate animated tiles because I say so for i = 1, #animatedtiles do animatedtiles[i]:update(dt) end for i = 1, #animatedtimerlist do animatedtimerlist[i]:update(dt) end updatecustombackgrounds(dt) --coinanimation coinanimation = coinanimation + dt*6.75 while coinanimation >= 6 do coinanimation = coinanimation - 5 end coinframe = math.max(1, math.floor(coinanimation)) flaganimation = ((flaganimation-1 + dt*8)%4)+1 --SCROLLING SCORES local delete for i, v in pairs(scrollingscores) do if scrollingscores[i]:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(scrollingscores, v) --remove end end --If everyone's dead, just update the players and coinblock timer. if everyonedead then for i, v in pairs(objects["player"]) do v:update(dt) end return end --check if updates are blocked for whatever reason if noupdate then for i, v in pairs(objects["checkpointflag"]) do v:update(dt) end for i, v in pairs(objects["player"]) do v:update(dt) end return end --timer if editormode == false then --get if any player has their controls disabled local notime = false for i = 1, players do if (objects["player"][i].controlsenabled == false and objects["player"][i].dead == false and objects["player"][i].groundfreeze == false) then notime = true end end if (notime == false or breakoutmode) and infinitetime == false and mariotime ~= 0 then if realtime then --mario maker time mariotime = mariotime - dt --mario maker purists rejoice else mariotime = mariotime - 2.5*dt end if queuelowtime then queuelowtime = queuelowtime - 2.5*dt end if mariotime > 0 and mariotime + 2.5*dt >= 99 and mariotime < 99 and (not dcplaying) and (not levelfinished) and not nolowtime then startlowtime() end if queuelowtime and queuelowtime < 0 and (not levelfinished) then local star = false for i = 1, players do if objects["player"][i].starred then star = true end end if pbuttonsound:isPlaying() then pbuttonsound:setVolume(1) else if not star then playmusic() else music:play("starmusic") end end queuelowtime = false end if mariotime <= 0 then mariotime = 0 for i, v in pairs(objects["player"]) do v:die("time") end end end end --Portaldots portaldotstimer = portaldotstimer + dt while portaldotstimer > portaldotstime do portaldotstimer = portaldotstimer - portaldotstime end --portalgundelay for i = 1, players do if portaldelay[i] > 0 then portaldelay[i] = math.max(0, portaldelay[i] - dt/speed) end end --coinblockanimation local delete for i, v in pairs(coinblockanimations) do if coinblockanimations[i]:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(coinblockanimations, v) --remove end end --nothing to see here local delete for i, v in pairs(rainbooms) do if v:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(rainbooms, v) --remove end end --userects local delete for i, v in pairs(userects) do if v.delete == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(userects, v) --remove end end --blockbounce local delete for i, v in pairs(blockbounce) do if v.timer < 0 then if v.timer > -blockbouncetime then v.timer = v.timer - dt if v.timer < -blockbouncetime then v.timer = -blockbouncetime if v.content then item(v.content, v.x, v.y, v.content2) end if not delete then delete = {} end table.insert(delete, i) end end else if v.timer < blockbouncetime then v.timer = v.timer + dt if v.timer > blockbouncetime then v.timer = blockbouncetime if v.content then item(v.content, v.x, v.y, v.content2) end if not delete then delete = {} end table.insert(delete, i) end end end end if delete then for i, v in pairs(delete) do blockbounce[v] = nil end if #delete >= 1 then generatespritebatch() end end --coinblocktimer things for i, v in pairs(coinblocktimers) do if v[3] > 0 then v[3] = v[3] - dt end end --blockdebris local delete for i, v in pairs(blockdebristable) do if v:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(blockdebristable, v) --remove end end --gelcannon if not editormode then if objects["player"][mouseowner] and (playertype == "gelcannon" or objects["player"][mouseowner].portals == "gel") and objects["player"][mouseowner].controlsenabled then if gelcannontimer > 0 then gelcannontimer = gelcannontimer - dt if gelcannontimer < 0 then gelcannontimer = 0 end else if love.mouse.isDown("l") then gelcannontimer = gelcannondelay objects["player"][mouseowner]:shootgel(1) elseif love.mouse.isDown("r") then gelcannontimer = gelcannondelay objects["player"][mouseowner]:shootgel(2) elseif love.mouse.isDown("m") or love.mouse.isDown("wd") or love.mouse.isDown("wu") or love.mouse.isDown("x1") then gelcannontimer = gelcannondelay objects["player"][mouseowner]:shootgel(4) elseif love.mouse.isDown("x2") then gelcannontimer = gelcannondelay objects["player"][mouseowner]:shootgel(3) end end end end --make lights have a slight wave if lightsout then lightsoutwave = (lightsoutwave + dt)%0.2 end --dialog boxes for i, v in pairs(dialogboxes) do v:update(dt) end --seesaws for i, v in pairs(seesaws) do v:update(dt) end --platformspawners for i, v in pairs(platformspawners) do v:update(dt) end --Bubbles local delete for i, v in pairs(bubbles) do if v:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(bubbles, v) --remove end end --Poofs local delete for i, v in pairs(poofs) do if v:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(poofs, v) --remove end end --Miniblocks local delete for i, v in pairs(miniblocks) do if v:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(miniblocks, v) --remove end end --Emancipation Fizzle local delete for i, v in pairs(emancipationfizzles) do if v:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(emancipationfizzles, v) --remove end end --Emancipation Animations local delete for i, v in pairs(emancipateanimations) do if v:update(dt) == true then if not delete then delete = {} end table.insert(delete, i) end end if delete then table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(emancipateanimations, v) --remove end end --Fireworks local delete = {} for i, v in pairs(fireworks) do if v:update(dt) == true then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(fireworks, v) --remove end --EMANCIPATION GRILLS local delete = {} for i, v in pairs(emancipationgrills) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(emancipationgrills, v) end --LASER FIELDS local delete = {} for i, v in pairs(laserfields) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(laserfields, v) end --BULLET BILL LAUNCHERS local delete = {} for i, v in pairs(rocketlaunchers) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(rocketlaunchers, v) end --BIG BILL LAUNCHERS local delete = {} for i, v in pairs(bigbilllaunchers) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(bigbilllaunchers, v) end --KING BILL LAUNCHERS local delete = {} for i, v in pairs(kingbilllaunchers) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(kingbilllaunchers, v) end --CANNON LAUNCHERS local delete = {} for i, v in pairs(cannonballlaunchers) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(cannonballlaunchers, v) end --item animations local delete = {} for i, v in pairs(itemanimations) do if v:update(dt) or v.instantdelete then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(itemanimations, v) end --snake blocks local delete = {} for i, v in pairs(snakeblocks) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(snakeblocks, v) end --UPDATE OBJECTS local delete for i, v in pairs(objects) do if i ~= "tile" and i ~= "pixeltile" and i ~= "portalwall" and i ~= "screenboundary" and i ~= "coin" and i ~= "risingwater" and i ~= "clearpipesegment" and i ~= "tracksegment" and i ~= "funnel" and i ~= "clearpipe" then delete = nil for j, w in pairs(v) do if dropshadow and w.shot and w.rotation then if not w.dropshadowrotation then w.dropshadowrotation = w.rotation end w.dropshadowrotation = w.dropshadowrotation + w.speedx*2*dt w.rotation = w.dropshadowrotation end if w.instantdelete or (w.update and w:update(dt)) then w.delete = true if not delete then delete = {} end table.insert(delete, j) elseif w.autodelete then if (((w.x < xscroll - width) or (w.x > xscroll + width*4)) and not w.horautodeleteimmunity) or w.y > mapheight+1 or math.abs(w.y-yscroll) > height*5 then w.delete = true if w.autodeleted then w:autodeleted() end if not delete then delete = {} end table.insert(delete,j) end elseif w.extremeautodelete then if w.x > mapwidth+(w.extremeautodeletedist or 3) or w.x+w.width < -(w.extremeautodeletedist or 3) or w.y > mapheight+(w.extremeautodeletedist or 3) then w.delete = true if w.autodeleted then w:autodeleted() end if not delete then delete = {} end table.insert(delete,j) end end if stoptestinglevelsafe then --stop testing level without crashing --when an entity makes you go to a different level (glados) stoptestinglevelsafe = nil return end end if delete and #delete > 0 then table.sort(delete, function(a,b) return a>b end) for j, w in pairs(delete) do table.remove(v, w) end end end end --risingwater for i, v in pairs(objects["risingwater"]) do v:update(dt) end --funnel for i, v in pairs(objects["funnel"]) do v:update(dt) end --tracks for i, v in pairs(tracks) do v:update(dt) end --clear pipes local delete = {} for i, v in pairs(clearpipes) do if v:update(dt) then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(clearpipes, v) end --player custom enemy riding for i, v in pairs(objects["player"]) do if v.fireenemyride then local obj = v.fireenemyride if obj.delete then v.fireenemyride = nil v.fireenemyoffsetx = nil v.fireenemyoffsety = nil v.animationstate = "jumping" v.active = true v.speedx = obj.speedx or 0 v.speedy = obj.speedy or 0 v.fireenemydrawable = nil v.fireenemyanim = false else if obj.x and obj.y then v.x = obj.x + (v.fireenemyoffsetx or 0) v.y = obj.y + (v.fireenemyoffsety or 0) if v.ducking then if v.fireenemyduckingoffsetx then v.x = v.x + (v.fireenemyduckingoffsetx or 0) end if v.fireenemyduckingoffsety then v.y = v.y + (v.fireenemyduckingoffsety or 0) end end v.active = v.fireenemyactive if v.active then v.speedx = obj.speedx or 0 v.speedy = obj.speedy or 0 v.falling = obj.falling or true end if v.fireenemycopyquadi then v.fireenemyquadi = obj.quadi end end end end end --spawn animations local delete = {} for i, v in pairs(spawnanimations) do if v:update(dt) then v.delete = true table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(spawnanimations, v) end --SCROLLING --HORIZONTAL local oldscroll = splitxscroll[1] if autoscroll and autoscrollx ~= false and not minimapdragging then local splitwidth = width/#splitscreen for split = 1, #splitscreen do local oldscroll = splitxscroll[split] --scrolling --LEFT local i = 1 while i <= players and objects["player"][i].dead do i = i + 1 end local fastestplayer = objects["player"][i] if fastestplayer then if not CLIENT and not SERVER then for i = 1, players do if not objects["player"][i].dead and objects["player"][i].x > fastestplayer.x then fastestplayer = objects["player"][i] end end end local oldscroll = splitxscroll[split] --LEFT if (not (autoscrollingx and not editormode)) and (camerasetting ~= 3 or editormode) then if fastestplayer.x < splitxscroll[split] + scrollingleftstart*screenzoom2 and splitxscroll[split] > 0 then if fastestplayer.x < splitxscroll[split] + scrollingleftstart*screenzoom2 and fastestplayer.speedx < 0 then if fastestplayer.speedx < -scrollrate then splitxscroll[split] = splitxscroll[split] - scrollrate*dt else splitxscroll[split] = splitxscroll[split] + fastestplayer.speedx*dt end end if fastestplayer.x < splitxscroll[split] + scrollingleftcomplete*screenzoom2 then splitxscroll[split] = splitxscroll[split] - scrollrate*dt if fastestplayer.x > splitxscroll[split] + scrollingleftcomplete*screenzoom2 then splitxscroll[split] = fastestplayer.x - scrollingleftcomplete*screenzoom2 end end end end if autoscrollingx and not editormode then splitxscroll[split] = math.max(0, math.min(mapwidth-width*screenzoom2, splitxscroll[split] + autoscrollingx*dt)) end --RIGHT if not (autoscrollingx and not editormode) then if fastestplayer.x > splitxscroll[split] + width*screenzoom2 - scrollingstart*screenzoom2 and splitxscroll[split] < mapwidth - width*screenzoom2 then if fastestplayer.x > splitxscroll[split] + width*screenzoom2 - scrollingstart*screenzoom2 and fastestplayer.speedx > 0.3 then if fastestplayer.speedx > scrollrate then splitxscroll[split] = splitxscroll[split] + scrollrate*dt else splitxscroll[split] = splitxscroll[split] + fastestplayer.speedx*dt end end if fastestplayer.x > splitxscroll[split] + width*screenzoom2 - scrollingcomplete*screenzoom2 then splitxscroll[split] = splitxscroll[split] + scrollrate*dt if splitxscroll[split] > fastestplayer.x - (width*screenzoom2 - scrollingcomplete*screenzoom2) then splitxscroll[split] = fastestplayer.x - (width*screenzoom2 - scrollingcomplete*screenzoom2) end end end if camerasetting == 3 then objects["screenboundary"]["left"].x = xscroll end end --just force that shit if not levelfinished and not (autoscrollingx and not editormode) then if fastestplayer.x > splitxscroll[split] + width*screenzoom2 - scrollingcomplete*screenzoom2 then splitxscroll[split] = splitxscroll[split] + superscroll*dt if fastestplayer.x < splitxscroll[split] + width*screenzoom2 - scrollingcomplete*screenzoom2 then splitxscroll[split] = fastestplayer.x - width*screenzoom2 + scrollingcomplete*screenzoom2 end elseif fastestplayer.x < splitxscroll[split] + scrollingleftcomplete*screenzoom2 and (camerasetting ~= 3 or editormode) then splitxscroll[split] = splitxscroll[split] - superscroll*dt if fastestplayer.x > splitxscroll[split] + scrollingleftcomplete*screenzoom2 then splitxscroll[split] = fastestplayer.x - scrollingleftcomplete*screenzoom2 end end end --CLAMP if splitxscroll[split] > mapwidth-width then splitxscroll[split] = math.max(0, mapwidth-width) hitrightside() end if (axex and splitxscroll[split] > axex-width and axex >= width) then splitxscroll[split] = axex-width hitrightside() end if splitxscroll[split] < 0 then splitxscroll[split] = 0 end end end end --VERTICAL SCROLLING local oldscrolly = splityscroll[1] if autoscroll and autoscrolly ~= false and not minimapdragging then for split = 1, #splitscreen do local fastestplayer = 1 while fastestplayer <= players and objects["player"][fastestplayer].dead do fastestplayer = fastestplayer + 1 end if not CLIENT and not SERVER and objects["player"][fastestplayer] then if mapwidth <= width then for i = 1, players do if not objects["player"][i].dead and math.abs(starty-objects["player"][i].y) > math.abs(starty-objects["player"][fastestplayer].y) then fastestplayer = i end end else for i = 1, players do if not objects["player"][i].dead and objects["player"][i].x > objects["player"][fastestplayer].x then fastestplayer = i end end end end if mapheight > 15*screenzoom2 and objects["player"][fastestplayer] then if not (autoscrollingy and not editormode) then local px, py = objects["player"][fastestplayer].x, objects["player"][fastestplayer].y if objects["player"][fastestplayer].height > 2 then py = objects["player"][fastestplayer].y+objects["player"][fastestplayer].height/2 end local pspeed = objects["player"][1].speedy if objects["player"][fastestplayer].oldy and pspeed == 0 and math.abs(objects["player"][fastestplayer].y-objects["player"][fastestplayer].oldy) < 3 then pspeed = (objects["player"][fastestplayer].y-objects["player"][fastestplayer].oldy)/dt end objects["player"][fastestplayer].oldy = objects["player"][fastestplayer].y local sx, sy = px-xscroll, py-yscroll--position on screen yscrolltarget = yscrolltarget or splityscroll[split] local upbound = 9*screenzoom2 local downbound = 4*screenzoom2 if camerasetting == 2 then upbound = 8*screenzoom2 downbound = 6*screenzoom2 end if speed == 0 then yscrolltarget = math.min(py-downbound, math.max(py-upbound, yscrolltarget))--(objects["player"][fastestplayer].y+objects["player"][fastestplayer].width/2)-(height/2) elseif sy > upbound then yscrolltarget = py-upbound elseif sy < downbound then yscrolltarget = py-downbound end local seeking = false local yscrolltarget = math.min(math.max(0, mapheight-height*screenzoom2-1), math.max(0, yscrolltarget)) if objects["player"][fastestplayer].animationstate == "idle" then if objects["player"][fastestplayer].upkeytimer > seektime then yscrolltarget = yscrolltarget - seekrange yscrolltarget = math.min(math.max(0, mapheight-height*screenzoom2-1), math.max(0, yscrolltarget)) seeking = true elseif objects["player"][fastestplayer].downkeytimer > seektime then yscrolltarget = yscrolltarget + seekrange yscrolltarget = math.min(math.max(0, mapheight-height*screenzoom2-1), math.max(0, yscrolltarget)) seeking = true end end local diff = math.abs(splityscroll[split]-yscrolltarget) local speed = math.abs(pspeed)--scrollrate*(diff/1.5)+0.5 --math.min(superscrollrate)? if seeking then speed = seekspeed elseif speed == 0 then--not objects["player"][fastestplayer].jumping and not objects["player"][fastestplayer].falling then if diff > 2.5 then speed = superscrollrate else speed = scrollrate end end if yscrolltarget > splityscroll[split] then splityscroll[split] = math.min(yscrolltarget, splityscroll[split] + speed*dt) elseif yscrolltarget < splityscroll[split] then splityscroll[split] = math.max(yscrolltarget, splityscroll[split] - speed*dt) end if splityscroll[split] > mapheight-height*screenzoom2-1 then splityscroll[split] = math.max(0, mapheight-height*screenzoom2-1) end if splityscroll[split] < 0 then splityscroll[split] = 0 end elseif not editormode then --vertical autoscrolling splityscroll[split] = math.max(0, math.min(mapheight-height*screenzoom2-1, splityscroll[split] + autoscrollingy*dt)) end end end end if players == 2 then --updatesplitscreen() end --camera pan x if xpan then xpantimer = xpantimer + dt if xpantimer >= xpantime then xpan = false xpantimer = xpantime end local i = xpantimer/xpantime xscroll = math.min(mapwidth-width, xpanstart + xpandiff*i) splitxscroll[1] = xscroll end --camera pan y if ypan then ypantimer = ypantimer + dt if ypantimer >= ypantime then ypan = false ypantimer = ypantime end local i = ypantimer/ypantime yscroll = math.min(mapheight-height, ypanstart + ypandiff*i) splityscroll[1] = yscroll end for j, w in pairs(objects["camerastop"]) do w:collide(oldscroll, oldscrolly) end --SPRITEBATCH UPDATE and CASTLEREPEATS if math.floor(splitxscroll[1]) ~= spritebatchX[1] then if not editormode then for currentx = lastrepeat+1, math.floor(splitxscroll[1])+2 do lastrepeat = math.floor(currentx) --castlerepeat? --get mazei local mazei = 0 for j = 1, #mazeends do if mazeends[j] < currentx+width then mazei = j end end --check if maze was solved! for i = 1, players do if objects["player"][i].mazevar == mazegates[mazei] then local actualmaze = 0 for j = 1, #mazestarts do if objects["player"][i].x > mazestarts[j] then actualmaze = j end end mazesolved[actualmaze] = true for j = 1, players do objects["player"][j].mazevar = 0 end break end end if not mazesolved[mazei] or mazeinprogress then --get if inside maze if not mazesolved[mazei] then mazeinprogress = true end local x = math.ceil(currentx)+width if repeatX == 0 then repeatX = mazestarts[mazei] end if repeatX and map[repeatX] then local t = {} for y = 1, mapheight do table.insert(t, {1}) end table.insert(map, x, t) for y = 1, mapheight do for j = 1, #map[repeatX][y] do map[x][y][j] = map[repeatX][y][j] end --map[x][y"]["gels""] = {} map[x][y]["gels"] = map[repeatX][y]["gels"] map[x][y]["portaloverride"] = nil for cox = mapwidth, x, -1 do --move objects if objects["tile"][tilemap(cox, y)] then objects["tile"][tilemap(cox + 1, y)] = tile:new(cox, y-1, 1, 1, true) objects["tile"][tilemap(cox, y)] = nil end end --create object for block if tilequads[map[repeatX][y][1]].collision == true then objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1, 1, 1, true) end --create pipe objects again if map[x][y][2] then local t = entityquads[map[x][y][2]].t if t == "warppipe" or t == "pipe" or t == "pipe2" or t == "pipespawn" or t == "pipespawndown" or t == "pipespawnhor" then loadentity(t, x, y, map[x][y], map[x][y][2]) end end end mapwidth = mapwidth + 1 repeatX = repeatX + 1 if flagx then flagx = flagx + 1 flagimgx = flagimgx + 1 objects["screenboundary"]["flag"].x = objects["screenboundary"]["flag"].x + 1 end if axex then axex = axex + 1 objects["screenboundary"]["axe"].x = objects["screenboundary"]["axe"].x + 1 end if firestartx then firestartx = firestartx + 1 end objects["screenboundary"]["right"].x = objects["screenboundary"]["right"].x + 1 --move mazestarts and ends for i = 1, #mazestarts do mazestarts[i] = mazestarts[i]+1 mazeends[i] = mazeends[i]+1 end --check for endblock local x = math.ceil(currentx)+width for y = 1, mapheight do if map[x][y][2] and entityquads[map[x][y][2]].t == "mazeend" then if mazesolved[mazei] then repeatX = mazestarts[mazei+1] end mazeinprogress = false end end end --reset thingie local x = math.ceil(currentx)+width-1 for y = 1, mapheight do if map[x] and map[x][y] and map[x][y][2] and entityquads[map[x][y][2]].t == "mazeend" then for j = 1, players do objects["player"][j].mazevar = 0 end end end end end end generatespritebatch() spritebatchX[1] = math.floor(splitxscroll[1]) if editormode == false and splitxscroll[1] < mapwidth-width then local x1, x2 = math.ceil(prevxscroll)+math.ceil(width*screenzoom2)+1, math.floor(splitxscroll[1])+math.ceil(width*screenzoom2)+1 if prevxscroll > splitxscroll[1] then --spawn enemies in both directions x1, x2 = math.floor(splitxscroll[1])+1, math.floor(prevxscroll)+1 end for x = math.max(1, x1), math.min(mapwidth, x2) do for y = math.max(1, math.floor(splityscroll[1])+1), math.min(mapheight, math.ceil(splityscroll[1])+math.ceil(height*screenzoom2)+1+2) do spawnenemyentity(x, y) end if goombaattack then local randomtable = {} for y = 1, mapheight do table.insert(randomtable, y) end while #randomtable > 0 do local rand = math.random(#randomtable) if tilequads[map[x][randomtable[rand]][1]].collision then table.remove(randomtable, rand) else local n = math.random(1, 58) if n <= 40 then table.insert(objects["goomba"], goomba:new(x-.5, math.random(13))) elseif n <= 46 then table.insert(objects["goomba"], goomba:new(x-.5, math.random(13), "goombrat")) elseif n <= 50 then table.insert(objects["goomba"], goomba:new(x-.5, math.random(13), "biggoomba")) elseif n <= 51 then table.insert(objects["goomba"], goomba:new(x-.5, math.random(13), "drygoomba")) elseif n <= 54 then table.insert(objects["goomba"], goomba:new(x-.5, math.random(13), "paragoomba")) elseif n <= 58 then table.insert(objects["goomba"], goomba:new(x-.5, math.random(13), "tinygoomba")) end break end end end end end end if math.floor(splityscroll[1]) ~= spritebatchY[1] then generatespritebatch() spritebatchY[1] = math.floor(splityscroll[1]) if editormode == false then for x = math.max(1, math.floor(splitxscroll[1])+1), math.min(mapwidth, math.ceil(splitxscroll[1])+math.ceil(width*screenzoom2)+1) do local y1, y2 = math.floor(splityscroll[1])+1, math.floor(prevyscroll)+1 if prevyscroll < splityscroll[1] then y1, y2 = math.floor(prevyscroll)+1+math.ceil(height*screenzoom2)+2, math.floor(splityscroll[1])+1+math.ceil(height*screenzoom2)+2 end for y = math.max(1, y1), math.min(mapheight, y2) do spawnenemyentity(x, y) end end end end prevxscroll = splitxscroll[1] prevyscroll = splityscroll[1] --portal update for i, v in pairs(portals) do v:update(dt) end --portal particles portalparticletimer = portalparticletimer + dt while portalparticletimer > portalparticletime do portalparticletimer = portalparticletimer - portalparticletime for i, v in pairs(portals) do if v.facing1 and v.x1 and v.y1 then local x1, y1 if v.facing1 == "up" then x1 = v.x1 + math.random(1, 30)/16-1 y1 = v.y1-1 elseif v.facing1 == "down" then x1 = v.x1 + math.random(1, 30)/16-2 y1 = v.y1 elseif v.facing1 == "left" then x1 = v.x1-1 y1 = v.y1 + math.random(1, 30)/16-2 elseif v.facing1 == "right" then x1 = v.x1 y1 = v.y1 + math.random(1, 30)/16-1 end table.insert(portalparticles, portalparticle:new(x1, y1, v.portal1color, v.facing1)) end if v.facing2 ~= nil and v.x2 and v.y2 then local x2, y2 if v.facing2 == "up" then x2 = v.x2 + math.random(1, 30)/16-1 y2 = v.y2-1 elseif v.facing2 == "down" then x2 = v.x2 + math.random(1, 30)/16-2 y2 = v.y2 elseif v.facing2 == "left" then x2 = v.x2-1 y2 = v.y2 + math.random(1, 30)/16-2 elseif v.facing2 == "right" then x2 = v.x2 y2 = v.y2 + math.random(1, 30)/16-1 end table.insert(portalparticles, portalparticle:new(x2, y2, v.portal2color, v.facing2)) end end end delete = {} for i, v in pairs(portalparticles) do if v:update(dt) == true then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(portalparticles, v) --remove end --PORTAL PROJECTILES delete = {} for i, v in pairs(portalprojectiles) do if v:update(dt) == true then table.insert(delete, i) end end table.sort(delete, function(a,b) return a>b end) for i, v in pairs(delete) do table.remove(portalprojectiles, v) --remove end --FIRE SPAWNING if not levelfinished and firestarted and (not objects["bowser"]["boss"] or (objects["bowser"]["boss"].backwards == false and objects["bowser"]["boss"].shot == false and objects["bowser"]["boss"].fall == false and objects["bowser"]["boss"].frozen == false)) then firetimer = firetimer + dt while firetimer > firedelay do firetimer = firetimer - firedelay firedelay = math.random(4) local obj = fire:new(splitxscroll[1] + width, math.random(3)+7) if objects["bowser"]["boss"] and objects["bowser"]["boss"].supersized then supersizeentity(obj) end table.insert(objects["fire"], obj) end end --FLYING FISH if not levelfinished and flyingfishstarted then flyingfishtimer = flyingfishtimer + dt while flyingfishtimer > flyingfishdelay do flyingfishtimer = flyingfishtimer - flyingfishdelay flyingfishdelay = math.random(6, 20)/10 table.insert(objects["flyingfish"], flyingfish:new()) end end --METEORS if not levelfinished and meteorstarted then meteortimer = meteortimer + dt while meteortimer > meteordelay do meteortimer = meteortimer - meteordelay meteordelay = meteordelays[math.random(1,#meteordelays)] if #objects["meteor"] > maxmeteors then break else table.insert(objects["meteor"], meteor:new()) end end end --BULLET BILL if not levelfinished and bulletbillstarted then bulletbilltimer = bulletbilltimer + dt while bulletbilltimer > bulletbilldelay do bulletbilltimer = bulletbilltimer - bulletbilldelay bulletbilldelay = math.random(5, 40)/10 table.insert(objects["bulletbill"], bulletbill:new(splitxscroll[1]+width+2, yscroll+math.random(4, 12), "left")) end end --NEUROTOXIN if not levelfinished and neurotoxin then toxintime = toxintime - dt if toxintime <= 0 then for i, v in pairs(objects["player"]) do v:die("time") end toxintime = 0 end end --WIND if windstarted and (not levelfinished) then if windsound:isStopped() then --couldn't find a wind sound!!! 11/14/2015 went to the level myself and got the sound (with a beat on it but oh well) playsound(windsound) end local dist = windentityspeed*dt for i = 1, players do local p = objects["player"][i] if (not p.static) and p.active and (not (p.x < 0.1 and p.speedx > 0)) and (not (p.x > mapwidth-p.width-0.1 and p.speedx < 0)) and (not p.vine) and (not p.fence) then if not checkintile(p.x+dist, p.y, p.width, p.height, tileentitieswind, p, "ignorehorplatforms") then p.x = p.x + dist end end end --make leafs apear windleaftimer = windleaftimer + dt while windleaftimer > 0.03 do windleaftimer = windleaftimer - 0.03 for i = 1, math.random(1, 2) do local startx = 0 if windentityspeed < 0 then startx = width end local addx, addy = (math.random()*width), 0 if math.random(1, 2) == 1 then addx, addy = startx, (math.random()*height) end table.insert(objects["windleaf"], windleaf:new(xscroll+addx-1, yscroll+addy-1)) end end elseif #objects["windleaf"] > 0 then for j, w in pairs(objects["windleaf"]) do w.delete = true end windsound:stop() end --minecraft stuff if breakingblockX then if not objects["tile"][tilemap(breakingblockX, breakingblockY)] then breakingblockprogress = breakingblockprogress + dt*0.2 else breakingblockprogress = breakingblockprogress + dt end if breakingblockprogress > minecraftbreaktime then breakblock(breakingblockX, breakingblockY) breakingblockX = nil end end --daily challenge win check if dcplaying then if checkdcwin(dt) then return end end --Editor if editormode then editor_update(dt) end --PHYSICS physicsupdate(dt) if queuespritebatchupdate then updatespritebatch() end end --the sole local variable local clearpipesegmentdrawqueue = {} function game_draw() for split = 1, #splitscreen do love.graphics.push() love.graphics.translate((split-1)*width*16*scale/#splitscreen, yoffset*scale) love.graphics.scale(screenzoom,screenzoom) --This is just silly if earthquake > 0 and sonicrainboom and #objects["glados"] == 0 then local colortable = {{242, 111, 51}, {251, 244, 174}, {95, 186, 76}, {29, 151, 212}, {101, 45, 135}, {238, 64, 68}} for i = 1, backgroundstripes do local r, g, b = unpack(colortable[math.fmod(i-1, 6)+1]) local a = earthquake/rainboomearthquake*255 love.graphics.setColor(r, g, b, a) local alpha = math.rad((i/backgroundstripes + math.fmod(sunrot/5, 1)) * 360) local point1 = {width*8*scale+300*scale*math.cos(alpha), 112*scale+300*scale*math.sin(alpha)} local alpha = math.rad(((i+1)/backgroundstripes + math.fmod(sunrot/5, 1)) * 360) local point2 = {width*8*scale+300*scale*math.cos(alpha), 112*scale+300*scale*math.sin(alpha)} love.graphics.polygon("fill", width*8*scale, 112*scale, point1[1], point1[2], point2[1], point2[2]) end end love.graphics.setColor(255, 255, 255, 255) --tremoooor! if earthquake > 0 and not pausemenuopen then tremorx = (math.random()-.5)*2*earthquake tremory = (math.random()-.5)*2*earthquake love.graphics.translate(round(tremorx), round(tremory)) end --[[local currentscissor = {(split-1)*width*16*scale/#splitscreen, 0, width*16*scale/#splitscreen, height*16*scale} love.graphics.setScissor(unpack(currentscissor))]] currentscissor = {} xscroll = splitxscroll[split] yscroll = splityscroll[split] if screenzoom ~= 1 then xscroll = math.floor(xscroll*16)/16 yscroll = math.floor(yscroll*16)/16 end love.graphics.setColor(255, 255, 255, 255) local xfromdraw,xtodraw, yfromdraw,ytodraw, xoff,yoff = getdrawrange(xscroll,yscroll) --custom background rendercustombackground(xscroll, yscroll, scrollfactor, scrollfactory) --BACKGROUND TILES if bmap_on then if editormode then love.graphics.setColor(255,255,255,100) else love.graphics.setColor(255,255,255,255) end love.graphics.draw(smbspritebatch[2], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) love.graphics.draw(portalspritebatch[2], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) if customtiles then for i = 1, #customspritebatch[2] do love.graphics.draw(customspritebatch[2][i], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) end end if animatedtilecount and animatedtilecount > 0 then for y = 1, ytodraw do for x = 1, xtodraw do local backgroundtile = bmapt(math.floor(xscroll)+x, math.floor(yscroll)+y, 1) if backgroundtile and backgroundtile > 90000 and tilequads[backgroundtile] and not tilequads[backgroundtile].invisible then love.graphics.draw(tilequads[backgroundtile].image, tilequads[backgroundtile].quad, math.floor((x-1-math.fmod(xscroll, 1))*16*scale), math.floor(((y-1-math.fmod(yscroll, 1))*16-8)*scale), 0, scale, scale) end end end end love.graphics.setColor(255,255,255,255) end --DROP SHADOW if dropshadow and not _3DMODE then love.graphics.push() love.graphics.translate(3*scale, 3*scale) love.graphics.setColor(dropshadowcolor) love.graphics.draw(smbspritebatch[1], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) love.graphics.draw(portalspritebatch[1], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) if customtiles then for i = 1, #customspritebatch[1] do love.graphics.draw(customspritebatch[1][i], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) end end drawmaptiles("dropshadow", xscroll, yscroll) --OBJECTS for j, w in pairs(objects["tilemoving"]) do w:draw() end for j, w in pairs(objects["checkpointflag"]) do w:draw("drop") end for j, w in pairs(objects["spring"]) do w:draw() end for j, w in pairs(objects["smallspring"]) do w:draw() end for j, w in pairs(objects["door"]) do w:draw() end for j, w in pairs(objects["platform"]) do w:draw("drop") end for j, w in pairs(objects["belt"]) do w:draw() end for j, w in pairs(objects["collectable"]) do w:draw() end for j, w in pairs(objects["yoshi"]) do w:draw() end --[[for j, w in pairs(objects["redseesaw"]) do --has overlapping shadows w:draw() end]] for j, w in pairs(objects) do if j ~= "tile" and j ~= "pixeltile" then for i, v in pairs(w) do if v.drawable and (not v.nodropshadow) then--and not v.drawback then love.graphics.setColor(dropshadowcolor) if j == "player" then drawplayer(v.playernumber, nil, nil, nil, nil, "dropshadow") else drawentity(j,w,i,v,currentscissor,true) end end end end end love.graphics.pop() love.graphics.setColor(255,255,255,255) end --Mushroom under tiles for j, w in pairs(objects["mushroom"]) do w:draw() end --Flowers under tiles for j, w in pairs(objects["flower"]) do w:draw() end --Oneup under tiles for j, w in pairs(objects["oneup"]) do w:draw() end --star tiles for j, w in pairs(objects["star"]) do w:draw() end --Poisonmush under tiles for j, w in pairs(objects["poisonmush"]) do w:draw() end --Threeupunder tiles for j, w in pairs(objects["threeup"]) do w:draw() end -- + Clock under tiles for j, w in pairs(objects["smbsitem"]) do w:draw() end --Hammersuit under tiles for j, w in pairs(objects["hammersuit"]) do w:draw() end --Frogsuit under tiles for j, w in pairs(objects["frogsuit"]) do w:draw() end --Yoshi egg under tiles for j, w in pairs(objects["yoshiegg"]) do w:draw() end --pbutton thing under tiles for j, w in pairs(objects["pbutton"]) do if w.inblock then w:draw() end end --castleflag if levelfinished and levelfinishtype == "flag" and showcastleflag then love.graphics.draw(castleflagimg, math.floor((flagx+6-xscroll)*16*scale), (flagy-7+10/16)*16*scale+(castleflagy-yscroll)*16*scale, 0, scale, scale) end --itemanimations (custom enemies coming out of blocks) for j, w in pairs(itemanimations) do w:draw() end --risingwater under for j, w in pairs(objects["risingwater"]) do if not w.drawover then w:draw() end end --TILES if not _3DMODE then love.graphics.draw(smbspritebatch[1], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) love.graphics.draw(portalspritebatch[1], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) if customtiles then for i = 1, #customspritebatch[1] do love.graphics.draw(customspritebatch[1][i], math.floor((-(xoff-math.floor(xscroll))*16)*scale), math.floor((-(yoff-math.floor(yscroll))*16)*scale)) end end local lmap = map drawmaptiles("main", xscroll, yscroll) end --Moving Tiles (tilemoving) for j, w in pairs(objects["tilemoving"]) do w:draw() end --OBJECTS for i, v in pairs(objects["enemy"]) do if v.drawback and v.drawable then love.graphics.setColor(255, 255, 255) drawentity("enemy",nil,i,v,currentscissor) end end --conveyor belt love.graphics.setColor(255, 255, 255) for j, w in pairs(objects["belt"]) do w:draw() end --collectable love.graphics.setColor(255, 255, 255) for j, w in pairs(objects["collectable"]) do w:draw() end --[[frozen coin for j, w in pairs(objects["frozencoin"]) do w:draw() end]] --door sprites for j, w in pairs(objects["doorsprite"]) do w:draw() end --checkpoint flag for j, w in pairs(objects["checkpointflag"]) do w:draw() end --pow block for j, w in pairs(objects["powblock"]) do w:draw() end --snakeblock love.graphics.setColor(255,255,255) for j, w in pairs(objects["snakeblock"]) do w:draw() end --switch blocks --[[for j, w in pairs(objects["buttonblock"]) do w:draw() end]] --plantcreeper for j, w in pairs(objects["plantcreeper"]) do w:draw() end love.graphics.setColor(255, 255, 255) --Groundlights for j, w in pairs(objects["groundlight"]) do w:draw() end ---UI if ((not darkmode and not lightsout) or editormode) and not hudsimple then love.graphics.scale(1/screenzoom,1/screenzoom) if hudvisible then drawHUD() end love.graphics.scale(screenzoom,screenzoom) end love.graphics.setColor(255, 255, 255) if players > 1 then drawmultiHUD() end love.graphics.setColor(255, 255, 255) --text for j, w in pairs(objects["text"]) do w:draw() end love.graphics.setColor(255, 255, 255) --vines for j, w in pairs(objects["vine"]) do w:draw() end love.graphics.setColor(255, 255, 255) --warpzonetext if displaywarpzonetext then properprint("welcome to warp zone!", (mapwidth-14-1/16-xscroll)*16*scale, (5.5-yscroll)*16*scale) for i, v in pairs(warpzonenumbers) do properprint(v[3], math.floor((v[1]-xscroll-1-9/16)*16*scale), (v[2]-3-yscroll)*16*scale) end end love.graphics.setColor(255, 255, 255) --platforms for j, w in pairs(objects["platform"]) do w:draw() end love.graphics.setColor(255, 255, 255) --platforms for j, w in pairs(objects["seesawplatform"]) do w:draw() end love.graphics.setColor(255, 255, 255) --seesaws for j, w in pairs(seesaws) do w:draw() end --red seesaws (these are the actual seesaws) for j, w in pairs(objects["redseesaw"]) do w:draw() end love.graphics.setColor(255, 255, 255) --springs for j, w in pairs(objects["spring"]) do w:draw() end --small spring for j, w in pairs(objects["smallspring"]) do w:draw() end love.graphics.setColor(255, 255, 255) --rocket turret laser for j, w in pairs(objects["rocketturret"]) do w:draw() end --flag if flagx then if flagimg:getHeight() == 16 then love.graphics.draw(flagimg, math.floor((flagimgx-1-xscroll)*16*scale), ((flagimgy-yscroll)*16-8)*scale, 0, scale, scale) else love.graphics.draw(flagimg, flagquad[spriteset][math.floor(flaganimation)], math.floor((flagimgx-1-xscroll)*16*scale), ((flagimgy-yscroll)*16-8)*scale, 0, scale, scale) end if levelfinishtype == "flag" then properprint2(flagscore, math.floor((flagimgx+4/16-xscroll)*16*scale), ((14-flagimgy-yscroll+(flagy-13)*2)*16-8)*scale, 0, scale, scale) end end love.graphics.setColor(255, 255, 255) --axe if axex then love.graphics.draw(axeimg, axequads[spriteset][coinframe], math.floor((axex-1-xscroll)*16*scale), (axey-1.5-yscroll)*16*scale, 0, scale, scale) if showtoad then--marioworld ~= 8 love.graphics.draw(toadimg, math.floor((mapwidth-7-xscroll)*16*scale), (11.0625-yscroll)*16*scale, 0, scale, scale) else love.graphics.draw(peachimg, math.floor((mapwidth-7-xscroll)*16*scale), (11.0625-yscroll)*16*scale, 0, scale, scale) end end love.graphics.setColor(255, 255, 255) --levelfinish text and toad if levelfinished and levelfinishtype == "castle" then if levelfinishedmisc2 == 1 then if levelfinishedmisc >= 1 then properprint(toadtext[1], math.floor(((mapwidth-8-xscroll-math.floor(#toadtext[1]/2)/2)*16-1)*scale), (4.5-yscroll)*16*scale) end if levelfinishedmisc == 2 then properprint(toadtext[2], math.floor(((mapwidth-8-xscroll-math.floor(#toadtext[2]/2)/2)*16-1)*scale), (6.5-yscroll)*16*scale) --say what properprint(toadtext[3], math.floor(((mapwidth-8-xscroll-math.floor(#toadtext[2]/2)/2)*16-1)*scale), (7.5-yscroll)*16*scale) --bummer. end else if levelfinishedmisc >= 1 then properprint(peachtext[1], math.floor(((mapwidth-8-xscroll-math.floor(#peachtext[1]/2)/2)*16-1)*scale), (4.5-yscroll)*16*scale) end if levelfinishedmisc >= 2 then properprint(peachtext[2], math.floor(((mapwidth-8-xscroll-math.floor(#peachtext[2]/2)/2)*16-1)*scale), (6-yscroll)*16*scale) end if levelfinishedmisc >= 3 then properprint(peachtext[3], math.floor(((mapwidth-8-xscroll-math.floor(#peachtext[3]/2)/2)*16-1)*scale), (7-yscroll)*16*scale) end if levelfinishedmisc >= 4 then properprint(peachtext[4], math.floor(((mapwidth-8-xscroll-math.floor(#peachtext[4]/2)/2)*16-1)*scale), (8.5-yscroll)*16*scale) end if levelfinishedmisc == 5 then properprint(peachtext[5], math.floor(((mapwidth-8-xscroll-math.floor(#peachtext[5]/2)/2)*16-1)*scale), (9.5-yscroll)*16*scale) end end if showtoad then--marioworld ~= 8 love.graphics.draw(toadimg, math.floor((mapwidth-7-xscroll)*16*scale), (11.0625-yscroll)*16*scale, 0, scale, scale) else love.graphics.draw(peachimg, math.floor((mapwidth-7-xscroll)*16*scale), (11.0625-yscroll)*16*scale, 0, scale, scale) end end love.graphics.setColor(255, 255, 255) --Fireworks for j, w in pairs(fireworks) do w:draw() end love.graphics.setColor(255, 255, 255) --Buttons for j, w in pairs(objects["button"]) do w:draw() end love.graphics.setColor(255, 255, 255) --Pushbuttons for j, w in pairs(objects["pushbutton"]) do w:draw() end love.graphics.setColor(255, 255, 255) --portal gun pedestal for j, w in pairs(objects["pedestal"]) do w:draw() end love.graphics.setColor(255, 255, 255) --hardlight bridges for j, w in pairs(objects["lightbridgebody"]) do w:draw() end love.graphics.setColor(255, 255, 255) --laser for j, w in pairs(objects["laser"]) do w:draw() end love.graphics.setColor(255, 255, 255) --laserdetector for j, w in pairs(objects["laserdetector"]) do w:draw() end love.graphics.setColor(255, 255, 255) --lightbridge for j, w in pairs(objects["lightbridge"]) do w:draw() end love.graphics.setColor(255, 255, 255) --Faithplates for j, w in pairs(objects["faithplate"]) do w:draw() end love.graphics.setColor(255, 255, 255) --turrets for j, w in pairs(objects["turret"]) do w:draw() end for j, w in pairs(objects["turretshot"]) do w:draw() end --yoshi love.graphics.setColor(255, 255, 255) for j, w in pairs(objects["yoshi"]) do w:draw() end love.graphics.setColor(255, 255, 255) --Bubbles for j, w in pairs(bubbles) do w:draw() end love.graphics.setColor(255, 255, 255) --miniblocks for i, v in pairs(miniblocks) do v:draw() end --emancipateanimations for i, v in pairs(emancipateanimations) do v:draw() end --emancipationfizzles for i, v in pairs(emancipationfizzles) do v:draw() end --chainchomp for j, w in pairs(objects["chainchomp"]) do w:draw() end --spikeball for j, w in pairs(objects["spikeball"]) do w:draw() end --skewer for j, w in pairs(objects["skewer"]) do w:draw() end --OBJECTS for j, w in pairs(objects) do if j ~= "tile" and j ~= "pixeltile" then for i, v in pairs(w) do if v.drawable and not v.drawback then love.graphics.setColor(255, 255, 255) drawentity(j,w,i,v,currentscissor) end end end end love.graphics.setColor(255, 255, 255) --mario dk hammer for j, w in pairs(objects["player"]) do if w.drawable and w.dkhammer then local dir = 1 if w.animationdirection == "left" then dir = -1 end if w.dkhammerframe == 1 then love.graphics.draw(dkhammerimg, math.floor((w.x+(w.width/2)-xscroll)*16*scale), math.floor((w.y-1-(11/16)-yscroll)*16*scale), 0, dir*scale, scale, 8, 0) else if dir == 1 then love.graphics.draw(dkhammerimg, math.floor((w.x+w.width+.5-xscroll)*16*scale), math.floor((w.y+w.height-1-yscroll)*16*scale), math.pi/2, dir*scale, scale, 8, 8) else love.graphics.draw(dkhammerimg, math.floor((w.x-.5-xscroll)*16*scale), math.floor((w.y+w.height-1-yscroll)*16*scale), math.pi*1.5, dir*scale, scale, 8, 8) end end end end love.graphics.setColor(255, 255, 255) --[[regiontrigger for j, w in pairs(objects["regiontrigger"]) do w:draw() end]] --pipes --[[for j, w in pairs(pipes) do w:draw() end for j, w in pairs(exitpipes) do w:draw() end]] --Cannon ball cannon for j, w in pairs(objects["cannonballcannon"]) do w:draw() end --bowser for j, w in pairs(objects["bowser"]) do w:draw() end --clearpipes if #clearpipesegmentdrawqueue > 0 then --these used to be drawn on the foreground layer, but they would draw ontop of stuff they shouldn't for j, w in pairs(clearpipesegmentdrawqueue) do if objects["clearpipesegment"][w] then objects["clearpipesegment"][w]:draw() end end clearpipesegmentdrawqueue = {} end --Clear Pipe Debug for j, w in pairs(clearpipes) do w:draw() end love.graphics.setColor(255,255,255) --3D Mode if _3DMODE then for i = 16, -8, -1 do love.graphics.push() local color = {255, 255, 255, 255}--255-((i-1)*16)} love.graphics.translate(i*scale, i*scale) love.graphics.scale(1-(((2*scale)/(width*16*scale))*(i)), 1-(((2*scale)/(height*16*scale))*(i))) love.graphics.setColor(color) love.graphics.draw(smbspritebatch[1], math.floor((-math.fmod(xscroll, 1)*16)*scale), math.floor((-math.fmod(yscroll, 1)*16)*scale)) love.graphics.draw(portalspritebatch[1], math.floor((-math.fmod(xscroll, 1)*16)*scale), math.floor((-math.fmod(yscroll, 1)*16)*scale)) if customtiles then for i = 1, #customspritebatch[1] do love.graphics.draw(customspritebatch[1][i], math.floor((-math.fmod(xscroll, 1)*16)*scale), math.floor((-math.fmod(yscroll, 1)*16)*scale)) end end if i > 8 then drawmaptiles("dropshadow", xscroll, yscroll) else drawmaptiles("collision", xscroll, yscroll) end --OBJECTS if i > 0 and i < 8 then for j, w in pairs(objects["tilemoving"]) do w:draw() end for j, w in pairs(objects) do if j ~= "tile" and j ~= "pixeltile" then for i, v in pairs(w) do if v.drawable and (not v.nodropshadow) then--and not v.drawback then love.graphics.setColor(color) if j == "player" then drawplayer(v.playernumber, nil, nil, nil, nil)--, "dropshadow") else drawentity(j,w,i,v,currentscissor) end end end end end end love.graphics.pop() end love.graphics.setColor(255,255,255,255) end --lakito --[[for j, w in pairs(objects["lakito"]) do w:draw() end]] --angrysun for j, w in pairs(objects["angrysun"]) do w:draw() end --ice block for j, w in pairs(objects["ice"]) do w:draw() end --[[for j, w in pairs(objects["trackcontroller"]) do w:draw() end]] --torpedo ted launcher for j, w in pairs(objects["torpedolauncher"]) do w:draw() end --kingbill for j, w in pairs(objects["kingbill"]) do w:draw() end --excursion funnel for j, w in pairs(objects["funnel"]) do w:draw() end --Geldispensers for j, w in pairs(objects["geldispenser"]) do w:draw() end --Cubedispensers for j, w in pairs(objects["cubedispenser"]) do w:draw() end --Emancipationgrills for j, w in pairs(emancipationgrills) do w:draw() end --Laserfields for j, w in pairs(laserfields) do w:draw() end --Doors for j, w in pairs(objects["door"]) do w:draw() end --risingwater over for j, w in pairs(objects["risingwater"]) do if w.drawover then w:draw() end end --Wallindicators for j, w in pairs(objects["wallindicator"]) do w:draw() end --Walltimers for j, w in pairs(objects["walltimer"]) do w:draw() end --Notgates for j, w in pairs(objects["notgate"]) do w:draw() end --Orgates for j, w in pairs(objects["orgate"]) do w:draw() end --Andgates for j, w in pairs(objects["andgate"]) do w:draw() end --Animatedtiletrigger for j, w in pairs(objects["animatedtiletrigger"]) do w:draw() end --Gucci Flipflop for j, w in pairs(objects["rsflipflop"]) do w:draw() end --Squarewave for j, w in pairs(objects["squarewave"]) do w:draw() end --Delayers for j, w in pairs(objects["delayer"]) do w:draw() end --Randomizer for j, w in pairs(objects["randomizer"]) do w:draw() end --Musicchanger for j, w in pairs(objects["musicchanger"]) do w:draw() end --particles for j, w in pairs(portalparticles) do w:draw() end love.graphics.setColor(255, 255, 255) --portals for i, v in pairs(portals) do v:draw() end --cappy for j, w in pairs(objects["cappy"]) do w:draw() end --draw collision (debug) if HITBOXDEBUG and (editormode or testlevel) then local lw = love.graphics.getLineWidth() love.graphics.setLineWidth(.5*scale) for i, v in pairs(objects) do for j, k in pairs(v) do if k.width then if xscroll >= k.x-width and k.x+k.width > xscroll then if k.active then love.graphics.setColor(255, 255, 255) else love.graphics.setColor(255, 0, 0) end if k.width <= 1/16 then love.graphics.rectangle("fill", math.floor((k.x-xscroll)*16*scale), math.floor((k.y-yscroll-.5)*16*scale), k.width*16*scale, k.height*16*scale) elseif incognito then love.graphics.rectangle("fill", math.floor((k.x-xscroll)*16*scale)+.5, math.floor((k.y-yscroll-.5)*16*scale)+.5, k.width*16*scale-1, k.height*16*scale-1) else love.graphics.rectangle("line", math.floor((k.x-xscroll)*16*scale)+.5, math.floor((k.y-yscroll-.5)*16*scale)+.5, k.width*16*scale-1, k.height*16*scale-1) end if k.killzonex then love.graphics.circle("line", math.floor((k.x+k.killzonex-xscroll)*16*scale)+.5, math.floor((k.y+k.killzoney-yscroll-.5)*16*scale)+.5, (math.sqrt(k.killzoner))*16*scale) end if k.playerneardist and type(k.playerneardist) == "table" and #k.playerneardist == 4 then love.graphics.setColor(0, 255, 255) love.graphics.rectangle("line", math.floor((k.x+k.playerneardist[1]-xscroll)*16*scale)+.5, math.floor((k.y+k.playerneardist[2]-yscroll-.5)*16*scale)+.5, k.playerneardist[3]*16*scale-1, k.playerneardist[4]*16*scale-1) end if k.movementpath then love.graphics.setColor(0, 255, 33) local t = {} for i = 1, #k.movementpath do table.insert(t, math.floor((k.startx+k.movementpath[i][1]-xscroll)*16*scale)+.5) table.insert(t, math.floor((k.starty+k.movementpath[i][2]-yscroll-.5)*16*scale)+.5) end if not k.movementpathturnaround then table.insert(t, math.floor((k.startx+k.movementpath[1][1]-xscroll)*16*scale)+.5) table.insert(t, math.floor((k.starty+k.movementpath[1][2]-yscroll-.5)*16*scale)+.5) end love.graphics.line(t) end if k.carryrange then love.graphics.setColor(0, 255, 255) love.graphics.rectangle("line", math.floor((k.x+k.carryrange[1]-xscroll)*16*scale)+.5, math.floor((k.y+k.carryrange[2]-yscroll-.5)*16*scale)+.5, k.carryrange[3]*16*scale-1, k.carryrange[4]*16*scale-1) end if k.blowrange then love.graphics.setColor(100, 255, 255) love.graphics.rectangle("line", math.floor((k.x+k.blowrange[1]-xscroll)*16*scale)+.5, math.floor((k.y+k.blowrange[2]-yscroll-.5)*16*scale)+.5, k.blowrange[3]*16*scale-1, k.blowrange[4]*16*scale-1) end --[[if k.pointingangle then local xcenter = k.x + 6/16 - math.sin(k.pointingangle)*userange local ycenter = k.y + 6/16 - math.cos(k.pointingangle)*userange love.graphics.setColor(0, 255, 255) love.graphics.rectangle("line", math.floor((xcenter-usesquaresize/2-xscroll)*16*scale)+.5, math.floor((ycenter-usesquaresize/2-yscroll-.5)*16*scale)+.5, usesquaresize*16*scale-1, usesquaresize*16*scale-1) end]] end end end end for j, w in pairs(userects) do love.graphics.setColor(0, 255, 255, 150) love.graphics.rectangle("line", math.floor((w.x-xscroll)*16*scale)+.5, math.floor((w.y-yscroll-.5)*16*scale)+.5, w.width*16*scale-1, w.height*16*scale-1) end love.graphics.setLineWidth(lw) --animation numbers if love.keyboard.isDown("0") then love.graphics.setColor(255, 255, 255, 150) local y = 2 for i, n in pairs(animationnumbers) do properprint(i .. ": " .. n, 2*scale, y*scale) y = y + 10 end end end --portalwalldebug --[[if portalwalldebug then for j, v in pairs(portals) do for k = 1, 2 do for i = 1, 6 do if objects["portalwall"][v.number .. "-" .. k .. "-" .. i] then objects["portalwall"][v.number .. "-" .. k .. "-" .. i]:draw() end end end end end]] love.graphics.setColor(255, 255, 255) --COINBLOCKANIMATION for i, v in pairs(coinblockanimations) do if v.t and v.t == "collectable" then love.graphics.draw(collectableimg, collectablequad[spriteset][v.i][v.frame], math.floor((v.x - xscroll + 1/16)*16*scale), math.floor(((v.y + v.offsety - 8/16 - yscroll)*16-8)*scale), 0, scale, scale, 16, 16) else love.graphics.draw(coinblockanimationimage, coinblockanimationquads[v.frame], math.floor((v.x - xscroll)*16*scale), math.floor(((v.y - yscroll)*16-8)*scale), 0, scale, scale, 4, 54) end end --SCROLLING SCORE for i, v in pairs(scrollingscores) do if type(scrollingscores[i].i) == "number" then properprint2(scrollingscores[i].i, math.floor((scrollingscores[i].x-0.4)*16*scale), math.floor((scrollingscores[i].y-1.5-scrollingscoreheight*(scrollingscores[i].timer/scrollingscoretime))*16*scale)) elseif scrollingscores[i].i == "1up" then love.graphics.draw(oneuptextimage, math.floor((scrollingscores[i].x)*16*scale), math.floor((scrollingscores[i].y-1.5-scrollingscoreheight*(scrollingscores[i].timer/scrollingscoretime))*16*scale), 0, scale, scale) elseif scrollingscores[i].i == "3up" then love.graphics.draw(threeuptextimage, math.floor((scrollingscores[i].x)*16*scale), math.floor((scrollingscores[i].y-1.5-scrollingscoreheight*(scrollingscores[i].timer/scrollingscoretime))*16*scale), 0, scale, scale) end end --BLOCK DEBRIS for i, v in pairs(blockdebristable) do v:draw() end local minex, miney, minecox, minecoy --PORTAL UI STUFF if levelfinished == false then for pl = 1, players do player = objects["player"][pl] if player.controlsenabled and player.t == "portal" and player.vine == false and player.fence == false and player.portalgun then local sourcex, sourcey = player.x+player.portalsourcex, player.y+player.portalsourcey local cox, coy, side, tend, x, y = traceline(sourcex, sourcey, player.pointingangle) local portalpossible = true if cox == false or getportalposition(1, cox, coy, side, tend) == false then portalpossible = false end love.graphics.setColor(255, 255, 255, 255) local dist = math.sqrt(((x-xscroll)*16*scale - (sourcex-xscroll)*16*scale)^2 + ((y-yscroll-.5)*16*scale - (sourcey-yscroll-.5)*16*scale)^2)/16/scale portaldotspritebatch:clear() for i = 1, dist/portaldotsdistance+1 do if((i-1+portaldotstimer/portaldotstime)/(dist/portaldotsdistance)) < 1 then local xplus = ((x-xscroll)*16*scale - (sourcex-xscroll)*16*scale)*((i-1+portaldotstimer/portaldotstime)/(dist/portaldotsdistance)) local yplus = ((y-.5-yscroll)*16*scale - (sourcey-.5-yscroll)*16*scale)*((i-1+portaldotstimer/portaldotstime)/(dist/portaldotsdistance)) local dotx = (sourcex-xscroll)*16*scale + xplus local doty = (sourcey-.5-yscroll)*16*scale + yplus local radius = math.sqrt(xplus^2 + yplus^2)/scale local alpha = 255 if radius < portaldotsouter then alpha = (radius-portaldotsinner) * (255/(portaldotsouter-portaldotsinner)) if alpha < 0 then alpha = 0 end end if portalpossible == false then portaldotspritebatch:setColor(255, 0, 0, alpha) else portaldotspritebatch:setColor(0, 255, 0, alpha) end portaldotspritebatch:add(math.floor(dotx-0.25*scale), math.floor(doty-0.25*scale), 0, scale, scale) end end love.graphics.draw(portaldotspritebatch, 0,0) love.graphics.setColor(255, 255, 255, 255) if cox ~= false then if portalpossible == false then love.graphics.setColor(255, 0, 0) else love.graphics.setColor(0, 255, 0) end local rotation = 0 if side == "right" then rotation = math.pi/2 elseif side == "down" then rotation = math.pi elseif side == "left" then rotation = math.pi/2*3 end love.graphics.draw(portalcrosshairimg, math.floor((x-xscroll)*16*scale), math.floor((y-.5-yscroll)*16*scale), rotation, scale, scale, 4, 8) end end end end --Portal projectile portalprojectilespritebatch:clear() for i, v in pairs(portalprojectiles) do v:particledraw() end love.graphics.setColor(255,255,255) love.graphics.draw(portalprojectilespritebatch,0,0) for i, v in pairs(portalprojectiles) do v:draw() end love.graphics.setColor(255, 255, 255) --nothing to see here for i, v in pairs(rainbooms) do v:draw() end --Foreground tiles drawmaptiles("foreground", xscroll, yscroll) love.graphics.setColor(255, 255, 255) --Poofs for j, w in pairs(poofs) do w:draw() end --custom foreground rendercustomforeground(xscroll, yscroll, scrollfactor2, scrollfactor2y) --UI over everything love.graphics.scale(1/screenzoom,1/screenzoom) if hudsimple and ((not darkmode and not lightsout) or editormode) then if hudvisible then drawHUD() end end --Player markers if players > 1 then--playermarkers then for i = 1, players do local v = objects["player"][i] if not v.dead and v.drawable and v.y < mapheight-.5 then --get if player offscreen local right, left, up, down = false, false, false, false if v.x > xscroll+width then right = true end if v.x+v.width < xscroll then left = true end if v.y > yscroll + .5 + height then down = true end if v.y+v.height < yscroll +.5 then up = true end if up or left or down or right then local x, y local angx, angy = 0, 0 if right then x = width angx = 1 elseif left then x = 0 angx = -1 end if up then y = 0 angy = -1 elseif down then y = height angy = 1 end if not x then x = v.x-xscroll+v.width/2 end if not y then y = v.y-yscroll-3/16 end local r = -math.atan2(angx, angy)-math.pi/2 --limit x or y if right angle if math.fmod(r, math.pi/2) == 0 then if up or down then x = math.max(x, 15/16) x = math.min(x, width-15/16) else y = math.max(y, 15/16) y = math.min(y, height-15/16) end end love.graphics.setColor(backgroundcolor[background]) love.graphics.draw(markbaseimg, math.floor(x*16*scale), math.floor(y*16*scale), r, scale, scale, 0, 15) local dist = 21.5 local xadd = math.cos(r)*dist local yadd = math.sin(r)*dist love.graphics.setColor(255, 255, 255) local func = function() love.graphics.circle("fill", math.floor((x*16+xadd)*scale), math.floor((y*16+yadd-.5)*scale), 13.5*scale) end love.graphics.stencil(func) love.graphics.setStencilTest("greater", 0) local playerx, playery = x*16+xadd, y*16+yadd+3 --draw map for x = math.floor(v.x), math.floor(v.x)+3 do for y = math.floor(v.y), math.floor(v.y)+3 do if inmap(x, y) then local t = map[x][y] if t then local tilenumber = tonumber(t[1]) if tilequads[tilenumber].coinblock and tilequads[tilenumber].invisible == false then --coinblock love.graphics.draw(coinblockimage, coinblockquads[spriteset][coinframe], math.floor((x-1-v.x-6/16)*16*scale+playerx*scale), math.floor((y-1.5-v.y)*16*scale+playery*scale), 0, scale, scale) elseif tilenumber ~= 0 and not tilequads[tilenumber].invisible then love.graphics.draw(tilequads[tilenumber].image, tilequads[tilenumber].quad, math.floor((x-1-v.x-6/16)*16*scale+playerx*scale), math.floor((y-1.5-v.y)*16*scale+playery*scale), 0, scale, scale) end end end end end drawplayer(i, (playerx/16)+xscroll-(6/16), (playery/16)+yscroll) love.graphics.setStencilTest() love.graphics.setColor(v.colors[1] or {255, 255, 255}) love.graphics.draw(markoverlayimg, math.floor(x*16*scale), math.floor(y*16*scale), r, scale, scale, 0, 15) end end love.graphics.setScissor() end end --Minecraft --black border if objects["player"][mouseowner] and playertype == "minecraft" and not levelfinished then local v = objects["player"][mouseowner] local sourcex, sourcey = v.x+v.portalsourcex, v.y+v.portalsourcey local cox, coy, side, tend, x, y = traceline(sourcex, sourcey, v.pointingangle) if cox then local dist = math.sqrt((v.x+v.width/2 - x)^2 + (v.y+v.height/2 - y)^2) if dist <= minecraftrange then love.graphics.setColor(0, 0, 0, 170) love.graphics.rectangle("line", math.floor((cox-1-xscroll)*16*scale)-.5, (coy-1-.5-yscroll)*16*scale-.5, 16*scale, 16*scale) if breakingblockX and (cox ~= breakingblockX or coy ~= breakingblockY) then breakingblockX = cox breakingblockY = coy breakingblockprogress = 0 elseif not breakingblockX and love.mouse.isDown("l") then breakingblockX = cox breakingblockY = coy breakingblockprogress = 0 end elseif love.mouse.isDown("l") then breakingblockX = cox breakingblockY = coy breakingblockprogress = 0 end else breakingblockX = nil end --break animation if breakingblockX then love.graphics.setColor(255, 255, 255, 255) local frame = math.ceil((breakingblockprogress/minecraftbreaktime)*10) if frame ~= 0 then love.graphics.draw(minecraftbreakimg, minecraftbreakquad[frame], (breakingblockX-1-xscroll)*16*scale, (breakingblockY-1.5-yscroll)*16*scale, 0, scale, scale) end end love.graphics.setColor(255, 255, 255, 255) --gui love.graphics.draw(minecraftgui, (width*8-91)*scale, 202*scale, 0, scale, scale) love.graphics.setColor(255, 255, 255, 200) for i = 1, 9 do local t = inventory[i].t if t ~= nil then love.graphics.draw(tilequads[t].image, tilequads[t].quad, (width*8-88+(i-1)*20)*scale, 205*scale, 0, scale, scale) end end love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(minecraftselected, (width*8-92+(mccurrentblock-1)*20)*scale, 201*scale, 0, scale, scale) for i = 1, 9 do if inventory[i].t ~= nil then local count = inventory[i].count properprint(count, (width*8-72+(i-1)*20-string.len(count)*8)*scale, 205*scale) end end end love.graphics.pop() end love.graphics.setScissor() if lightsout and not editormode then local pass = true for j, w in pairs(objects["player"]) do if w.starred then pass = false break end end if pass then love.graphics.setColor(0, 0, 0) love.graphics.stencil(lightsoutstencil) love.graphics.setStencilTest("less", 1) love.graphics.setColor(0, 0, 0, 255) if objects["player"][1] then --stencils not supported local v = objects["player"][1] local x, y = v.x+v.width/2-xscroll, v.y+v.height/2-.5-yscroll local lightscale = v.light/3.5 local iw, ih = mariolightimg:getWidth()*lightscale, mariolightimg:getHeight()*lightscale love.graphics.draw(mariolightimg, (x*16-iw/2)*scale, (y*16-ih/2)*scale, 0, lightscale*scale, lightscale*scale) --fill in the blanks love.graphics.rectangle("fill", 0, 0, width*16*scale, ((y*16)-ih/2)*scale) --top love.graphics.rectangle("fill", 0, ((y*16)+ih/2)*scale, width*16*scale, ((height-y)*16-ih/2)*scale) --bottom love.graphics.rectangle("fill", 0, ((y*16)-ih/2)*scale, ((x*16)-ih/2)*scale, ih*scale) --left love.graphics.rectangle("fill", ((x*16)+ih/2)*scale, ((y*16)-ih/2)*scale, (((width-x)*16)-iw/2)*scale, ih*scale) --right else --whatever let's hope the device supports stencils love.graphics.rectangle("fill", 0, 0, width*16*scale, height*16*scale) end love.graphics.setStencilTest() end elseif darkmode and not editormode then --dark mode has fancy layers love.graphics.setColor(0, 0, 0) local stencil = function() for j, w in pairs(objects["player"]) do love.graphics.circle("fill", ((w.x+(w.width/2)-xscroll)*16)*scale, ((w.y+(w.height/2)-yscroll)*16-8)*scale, 70*scale, 18) end end local stencil2 = function() for j, w in pairs(objects["player"]) do love.graphics.circle("fill", ((w.x+(w.width/2)-xscroll)*16)*scale, ((w.y+(w.height/2)-yscroll)*16-8)*scale, 60*scale, 18) end end local stencil3 = function() for j, w in pairs(objects["player"]) do love.graphics.circle("fill", ((w.x+(w.width/2)-xscroll)*16)*scale, ((w.y+(w.height/2)-yscroll)*16-8)*scale, 50*scale, 18) end end local stencil4 = function() for j, w in pairs(objects["player"]) do love.graphics.circle("fill", ((w.x+(w.width/2)-xscroll)*16)*scale, ((w.y+(w.height/2)-yscroll)*16-8)*scale, 40*scale, 18) end end love.graphics.stencil(stencil4) love.graphics.setStencilTest("less", 1) love.graphics.setColor(0, 0, 0, 255/4) love.graphics.rectangle("fill", 0, 0, width*16*scale, 224*scale) love.graphics.setStencilTest() love.graphics.stencil(stencil3) love.graphics.setStencilTest("less", 1) love.graphics.setColor(0, 0, 0, 255/3) love.graphics.rectangle("fill", 0, 0, width*16*scale, 224*scale) love.graphics.setStencilTest() love.graphics.stencil(stencil2) love.graphics.setStencilTest("less", 1) love.graphics.setColor(0, 0, 0, 255/2) love.graphics.rectangle("fill", 0, 0, width*16*scale, 224*scale) love.graphics.setStencilTest() love.graphics.stencil(stencil) love.graphics.setStencilTest("less", 1) love.graphics.setColor(0, 0, 0) love.graphics.rectangle("fill", 0, 0, width*16*scale, 224*scale) love.graphics.setColor(255, 255, 255) love.graphics.setStencilTest() if hudvisible then drawHUD() end end --UI over everything in darkmode if ((darkmode or lightsout) and not editormode) then if hudvisible then drawHUD() end end if dcplaying then love.graphics.setColor(255, 255, 255) properprintbackground(DCchalobjective, width*8*scale-string.len(DCchalobjective)*4*scale, 35*scale) properprint(DCchalobjective, width*8*scale-string.len(DCchalobjective)*4*scale, 35*scale) end for i, v in pairs(dialogboxes) do v:draw() end if earthquake > 0 and not pausemenuopen then love.graphics.translate(-round(tremorx), -round(tremory)) end for i = 2, #splitscreen do love.graphics.line((i-1)*width*16*scale/#splitscreen, 0, (i-1)*width*16*scale/#splitscreen, mapheight*16*scale) end if editormode then editor_draw() end --speed gradient if speed < 1 then love.graphics.setColor(255, 255, 255, 255-255*speed) love.graphics.draw(gradientimg, 0, 0, 0, scale, scale) end if yoffset < 0 then love.graphics.translate(0, -yoffset*scale) end love.graphics.translate(0, yoffset*scale) if testlevel then love.graphics.setColor(255, 0, 0, 127) properprintfast("TESTING LEVEL - PRESS ESC TO RETURN TO EDITOR", 16*scale, 0) end --pause menu if pausemenuopen then love.graphics.setColor(0, 0, 0, 100) love.graphics.rectangle("fill", 0, 0, width*16*scale, height*16*scale) love.graphics.setColor(0, 0, 0) love.graphics.rectangle("fill", (width*8*scale)-50*scale, (112*scale)-75*scale, 100*scale, 150*scale) love.graphics.setColor(255, 255, 255) drawrectangle(width*8-49, 112-74, 98, 148) for i = 1, #pausemenuoptions do love.graphics.setColor(100, 100, 100, 255) if pausemenuselected == i and not menuprompt and not desktopprompt then love.graphics.setColor(255, 255, 255, 255) properprint(">", (width*8*scale)-45*scale, (112*scale)-60*scale+(i-1)*25*scale) end if dcplaying and pausemenuoptions[i] == "suspend" then --restart instead of suspend properprintF(TEXT["restart"], (width*8*scale)-35*scale, (112*scale)-60*scale+(i-1)*25*scale) elseif (collectablescount[1] > 0 or collectablescount[2] > 0 or collectablescount[3] > 0 or collectablescount[4] > 0 or collectablescount[5] > 0 or collectablescount[6] > 0 or collectablescount[7] > 0 or collectablescount[8] > 0 or collectablescount[9] > 0 or collectablescount[10] > 0) and pausemenuoptions[i] == "suspend" then --make it more obvious that you can save your progress properprintF(TEXT["save game"], (width*8*scale)-35*scale, (112*scale)-60*scale+(i-1)*25*scale) else properprintF(TEXT[pausemenuoptions[i]], (width*8*scale)-35*scale, (112*scale)-60*scale+(i-1)*25*scale) end properprintF(TEXT[pausemenuoptions2[i]], (width*8*scale)-35*scale, (112*scale)-50*scale+(i-1)*25*scale) if pausemenuoptions[i] == "volume" then drawrectangle((width*8)-34, 68+(i-1)*25, 74, 1) drawrectangle((width*8)-34, 65+(i-1)*25, 1, 7) drawrectangle((width*8)+40, 65+(i-1)*25, 1, 7) love.graphics.draw(volumesliderimg, math.floor(((width*8)-35+74*volume)*scale), (112*scale)-47*scale+(i-1)*25*scale, 0, scale, scale) end end if menuprompt then love.graphics.setColor(0, 0, 0, 255) love.graphics.rectangle("fill", (width*8*scale)-100*scale, (112*scale)-25*scale, 200*scale, 50*scale) love.graphics.setColor(255, 255, 255, 255) drawrectangle((width*8)-99, 112-24, 198, 48) properprintF(TEXT["quit to menu?"], (width*8*scale)-utf8.len(TEXT["quit to menu?"])*4*scale, (112*scale)-10*scale) if pausemenuselected2 == 1 then properprintF(">", (width*8*scale)-51*scale, (112*scale)+4*scale) love.graphics.setColor(255, 255, 255, 255) properprintF(TEXT["yes"], (width*8*scale)-44*scale, (112*scale)+4*scale) love.graphics.setColor(100, 100, 100, 255) properprintF(TEXT["no"], (width*8*scale)+28*scale, (112*scale)+4*scale) else properprintF(">", (width*8*scale)+20*scale, (112*scale)+4*scale) love.graphics.setColor(100, 100, 100, 255) properprintF(TEXT["yes"], (width*8*scale)-44*scale, (112*scale)+4*scale) love.graphics.setColor(255, 255, 255, 255) properprintF(TEXT["no"], (width*8*scale)+28*scale, (112*scale)+4*scale) end end if desktopprompt then love.graphics.setColor(0, 0, 0, 255) love.graphics.rectangle("fill", (width*8*scale)-100*scale, (112*scale)-25*scale, 200*scale, 50*scale) love.graphics.setColor(255, 255, 255, 255) drawrectangle((width*8)-99, 112-24, 198, 48) properprintF(TEXT["quit to desktop?"], (width*8*scale)-utf8.len(TEXT["quit to desktop?"])*4*scale, (112*scale)-10*scale) if pausemenuselected2 == 1 then properprintF(">", (width*8*scale)-51*scale, (112*scale)+4*scale) love.graphics.setColor(255, 255, 255, 255) properprintF(TEXT["yes"], (width*8*scale)-44*scale, (112*scale)+4*scale) love.graphics.setColor(100, 100, 100, 255) properprintF(TEXT["no"], (width*8*scale)+28*scale, (112*scale)+4*scale) else properprintF(">", (width*8*scale)+20*scale, (112*scale)+4*scale) love.graphics.setColor(100, 100, 100, 255) properprintF(TEXT["yes"], (width*8*scale)-44*scale, (112*scale)+4*scale) love.graphics.setColor(255, 255, 255, 255) properprintF(TEXT["no"], (width*8*scale)+28*scale, (112*scale)+4*scale) end end if suspendprompt then love.graphics.setColor(0, 0, 0, 255) love.graphics.rectangle("fill", (width*8*scale)-100*scale, (112*scale)-25*scale, 200*scale, 50*scale) love.graphics.setColor(255, 255, 255, 255) drawrectangle((width*8)-99, 112-24, 198, 48) if (collectablescount[1] > 0 or collectablescount[2] > 0 or collectablescount[3] > 0 or collectablescount[4] > 0 or collectablescount[5] > 0 or collectablescount[6] > 0 or collectablescount[7] > 0 or collectablescount[8] > 0 or collectablescount[9] > 0 or collectablescount[10] > 0) then --make it more obvious that you can save your progress properprintF(TEXT["save game? this will"], (width*8*scale)-utf8.len(TEXT["save game? this will"])*4*scale, (112*scale)-20*scale) properprintF(TEXT["overwrite last save."], (width*8*scale)-utf8.len(TEXT["overwrite last save."])*4*scale, (112*scale)-10*scale) else properprintF(TEXT["suspend game? this can"], (width*8*scale)-utf8.len(TEXT["suspend game? this can"])*4*scale, (112*scale)-20*scale) properprintF(TEXT["only be loaded once!"], (width*8*scale)-utf8.len(TEXT["only be loaded once!"])*4*scale, (112*scale)-10*scale) end if pausemenuselected2 == 1 then properprintF(">", (width*8*scale)-51*scale, (112*scale)+4*scale) love.graphics.setColor(255, 255, 255, 255) properprintF(TEXT["yes"], (width*8*scale)-44*scale, (112*scale)+4*scale) love.graphics.setColor(100, 100, 100, 255) properprintF(TEXT["no"], (width*8*scale)+28*scale, (112*scale)+4*scale) else properprintF(">", (width*8*scale)+20*scale, (112*scale)+4*scale) love.graphics.setColor(100, 100, 100, 255) properprintF(TEXT["yes"], (width*8*scale)-44*scale, (112*scale)+4*scale) love.graphics.setColor(255, 255, 255, 255) properprintF(TEXT["no"], (width*8*scale)+28*scale, (112*scale)+4*scale) end end end --chat if chatentrytoggle then lobby_drawchat() end end function drawentity(j, w, i, v, currentscissor, drop) local dirscale if v.animationdirection == "left" then dirscale = -scale else dirscale = scale end if v.animationscalex then dirscale = dirscale*v.animationscalex end local horscale = scale if v.shot or v.flipped or v.upsidedown then horscale = -scale end if v.animationscaley then horscale = horscale*v.animationscaley end if v.customscale then horscale = horscale * v.customscale dirscale = dirscale * v.customscale end local oldoffsetx, oldoffsety if v.supersized then oldoffsetx, oldoffsety = v.offsetX, v.offsetY v.offsetX = v.offsetX*v.supersized v.offsetY = (v.offsetY-8)*v.supersized+8 end local portal, portaly = insideportal(v.x, v.y, v.width, v.height) local entryX, entryY, entryfacing, exitX, exitY, exitfacing --SCISSOR FOR ENTRY if v.customscissor and (v.invertedscissor or (v.t and enemiesdata[v.t])) and v.portalable ~= false then --portable custom enemies love.graphics.stencil(function() love.graphics.rectangle("fill", math.floor((v.customscissor[1]-xscroll)*16*scale), math.floor((v.customscissor[2]-.5-yscroll)*16*scale), v.customscissor[3]*16*scale, v.customscissor[4]*16*scale) end, "increment") if v.invertedscissor then love.graphics.setStencilTest("less", 1) else love.graphics.setStencilTest("greater", 0) end elseif v.static or (v.portalable == false) then --static or non portable entities if v.invertedscissor then love.graphics.stencil(function() love.graphics.rectangle("fill", math.floor((v.customscissor[1]-xscroll)*16*scale), math.floor((v.customscissor[2]-.5-yscroll)*16*scale), v.customscissor[3]*16*scale, v.customscissor[4]*16*scale) end, "increment") love.graphics.setStencilTest("less", 1) elseif v.customscissor then love.graphics.setScissor(math.floor((v.customscissor[1]-xscroll)*16*screenzoom*scale), math.floor((v.customscissor[2]-.5-yscroll)*16*screenzoom*scale), v.customscissor[3]*16*screenzoom*scale, v.customscissor[4]*16*screenzoom*scale) end end if v.static == false and v.portalable ~= false then --not static and portable entities if v.customscissor then if v.invertedscissor then else love.graphics.setScissor(math.floor((v.customscissor[1]-xscroll)*16*screenzoom*scale), math.floor((v.customscissor[2]-.5-yscroll)*16*screenzoom*scale), v.customscissor[3]*16*screenzoom*scale, v.customscissor[4]*16*screenzoom*scale) end elseif portal ~= false and (v.active or v.portaloverride) then if portaly == 1 then entryX, entryY, entryfacing = portal.x1, portal.y1, portal.facing1 exitX, exitY, exitfacing = portal.x2, portal.y2, portal.facing2 else entryX, entryY, entryfacing = portal.x2, portal.y2, portal.facing2 exitX, exitY, exitfacing = portal.x1, portal.y1, portal.facing1 end if entryfacing == "right" then love.graphics.setScissor(math.floor((entryX-xscroll)*16*screenzoom*scale), math.floor(((entryY-3.5-yscroll)*16*screenzoom)*scale), 64*screenzoom*scale, 96*screenzoom*scale) elseif entryfacing == "left" then love.graphics.setScissor(math.floor((entryX-xscroll-5)*16*screenzoom*scale), math.floor(((entryY-4.5-yscroll)*16*screenzoom)*scale), 64*screenzoom*scale, 96*screenzoom*scale) elseif entryfacing == "up" then love.graphics.setScissor(math.floor((entryX-xscroll-3)*16*screenzoom*scale), math.floor(((entryY-5.5-yscroll)*16*screenzoom)*scale), 96*screenzoom*scale, 64*screenzoom*scale) elseif entryfacing == "down" then love.graphics.setScissor(math.floor((entryX-xscroll-4)*16*screenzoom*scale), math.floor(((entryY-0.5-yscroll)*16*screenzoom)*scale), 96*screenzoom*scale, 64*screenzoom*scale) end end end if v.customscissor2 then love.graphics.setScissor(math.floor((v.customscissor2[1]-xscroll)*16*screenzoom*scale), math.floor((v.customscissor2[2]-.5-yscroll)*16*screenzoom*scale), v.customscissor2[3]*16*screenzoom*scale, v.customscissor2[4]*16*screenzoom*scale) end if type(v.graphic) == "table" then drawplayer(v.playernumber) else if v.graphic and v.quad then if v.graphiccolor and (not drop) then love.graphics.setColor(v.graphiccolor) end love.graphics.draw(v.graphic, v.quad, math.floor(((v.x-xscroll)*16+v.offsetX)*scale), math.floor(((v.y-yscroll)*16-v.offsetY)*scale), v.rotation, dirscale, horscale, v.quadcenterX, v.quadcenterY) if v.overlaygraphic then love.graphics.draw(v.overlaygraphic, v.overlayquad, math.floor(((v.x-xscroll)*16+v.offsetX)*scale), math.floor(((v.y-yscroll)*16-v.offsetY)*scale), v.rotation, dirscale, horscale, v.quadcenterX, v.quadcenterY) end end end --portal duplication if v.static == false and (v.active or v.portaloverride) and v.portalable ~= false then if v.customscissor then elseif portal ~= false then love.graphics.setScissor(unpack(currentscissor)) love.graphics.setScissor() local px, py, pw, ph, pr, pad = v.x, v.y, v.width, v.height, v.rotation, v.animationdirection px, py, d, d, pr, pad = portalcoords(px, py, 0, 0, pw, ph, pr, pad, entryX, entryY, entryfacing, exitX, exitY, exitfacing) if pad ~= v.animationdirection then dirscale = -dirscale end horscale = scale if v.shot or v.flipped then horscale = -scale end if v.animationscaley then horscale = horscale*v.animationscaley end if exitfacing == "right" then love.graphics.setScissor(math.floor((exitX-xscroll)*16*screenzoom*scale), math.floor(((exitY-3.5-yscroll)*16*screenzoom)*scale), 64*screenzoom*scale, 96*screenzoom*scale) elseif exitfacing == "left" then love.graphics.setScissor(math.floor((exitX-xscroll-5)*16*screenzoom*scale), math.floor(((exitY-4.5-yscroll)*16*screenzoom)*scale), 64*screenzoom*scale, 96*screenzoom*scale) elseif exitfacing == "up" then love.graphics.setScissor(math.floor((exitX-xscroll-3)*16*screenzoom*scale), math.floor(((exitY-5.5-yscroll)*16*screenzoom)*scale), 96*screenzoom*scale, 64*screenzoom*scale) elseif exitfacing == "down" then love.graphics.setScissor(math.floor((exitX-xscroll-4)*16*screenzoom*scale), math.floor(((exitY-0.5-yscroll)*16*screenzoom)*scale), 96*screenzoom*scale, 64*screenzoom*scale) end if type(v.graphic) == "table" then --yoshi drawplayer(i, px, py, pr, pad) else if v.graphic and v.quad then if v.graphiccolor and (not drop) then love.graphics.setColor(v.graphiccolor) end love.graphics.draw(v.graphic, v.quad, math.floor(((px-xscroll)*16+v.offsetX)*scale), math.floor(((py-yscroll)*16-v.offsetY)*scale), pr, dirscale, horscale, v.quadcenterX, v.quadcenterY) if v.overlaygraphic then love.graphics.draw(v.overlaygraphic, v.overlayquad, math.floor(((px-xscroll)*16+v.offsetX)*scale), math.floor(((py-yscroll)*16-v.offsetY)*scale), pr, dirscale, horscale, v.quadcenterX, v.quadcenterY) end end --love.graphics.draw(v.graphic, v.quad, math.ceil(((px-xscroll)*16+v.offsetX)*scale), math.ceil(((py-yscroll)*16-v.offsetY)*scale), pr, dirscale, horscale, v.quadcenterX, v.quadcenterY) end end end love.graphics.setScissor(unpack(currentscissor)) love.graphics.setScissor() love.graphics.setStencilTest() if oldoffsetx and oldoffsety then v.offsetX = oldoffsetx v.offsetY = oldoffsety end --draw ice block on top if v.frozen and v.iceblock then v.iceblock:draw("enemylayer") end end function drawplayer(i, x, y, r, pad, drop) local v = objects["player"][i] local px, py = x or v.x, y or v.y local pr = r or v.rotation local a = 255 --alpha if drop then a = 0 end if v.fireenemydrawable ~= nil and v.fireenemydrawable ~= true then return false end local dirscale --scale if (v.portalgun and v.pointingangle > 0) or (not v.portalgun and v.animationdirection == "left") then dirscale = -scale else dirscale = scale end if bigmario then dirscale = dirscale * scalefactor end if v.animationscalex then dirscale = dirscale*v.animationscalex end local horscale = scale if v.shot or v.flipped or v.upsidedown or v.gravitydir == "up" then horscale = -scale end if bigmario then horscale = horscale * scalefactor end if v.animationscaley then horscale = horscale*v.animationscaley end if v.customscale then horscale = horscale * v.customscale dirscale = dirscale * v.customscale end --portal mirroring if pad and pad ~= v.animationdirection then dirscale = -dirscale end local offsetX = v.offsetX local offsetY = v.offsetY if v.shoeoffsetY and (not v.ducking) and (not v.clearpipe) then offsetY = offsetY + v.shoeoffsetY end --gravity offsets if v.gravitydir == "left" then offsetX = (offsetX - v.quadcenterY -v.offsetX) + v.height*16 - 8 + v.offsetY + v.quadcenterY--offsetX + (v.offsetX - v.quadcenterX) + (v.offsetY + v.quadcenterY) elseif v.gravitydir == "right" then offsetX = (offsetX + v.width*16 + v.quadcenterY -v.offsetX) - v.height*16 + 8 - v.offsetY -v.quadcenterY--offsetX + (v.offsetX - v.quadcenterX) + (v.offsetY + v.quadcenterY) elseif v.gravitydir == "up" then local qx, qy, qw, qh = v.quad:getViewport() offsetY = (offsetY - (qh-v.quadcenterY) -v.offsetY + 8 + qh) - v.height*16 - (v.quadcenterY) + 8 -v.offsetY end --yoshi if v.shoe == "yoshi" then local dirscale if v.animationdirection == "left" then dirscale = -scale else dirscale = scale end if pad and pad ~= v.animationdirection then --portal duplication dirscale = -dirscale end local y = -offsetY - (v.height*16) + v.characterdata.yoshiimgoffsetY if v.animationscaley then y = -offsetY - (v.height*16) + v.characterdata.yoshiimghugeoffsetY end if v.yoshitounge then local xoffset, yoffset = 12/16, -22/16 if v.yoshiquad == yoshiquad[v.yoshi.color][1] then xoffset = 7/16 end --toungeenemy if v.yoshitoungeenemy then local x, y = math.floor((px+(v.width/2)+xoffset-xscroll)*16*scale)+(v.yoshitoungewidth*16*scale), math.floor((py+v.height+yoffset-yscroll)*16*scale) if dirscale < 0 then x = math.floor((px+(v.width/2)-xoffset-xscroll)*16*scale)-(v.yoshitoungewidth*16*scale) end if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(255, 255, 255, a) end local e = v.yoshitoungeenemy local size = math.min(.2, v.yoshitoungewidth)/.2 local esx, esy = e.animationscalex or 1, e.animationscaley or 1 love.graphics.draw(e.graphic, e.quad, x+(((-(e.width/2))*16+e.offsetX)*scale), y+((-(e.height/2))*16-e.offsetY+8)*scale, 0, size*esx*scale, size*esy*scale, e.quadcenterX, e.quadcenterY) end --tounge if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(216, 40, 0, a) end if dirscale > 0 then local x, y = math.floor((px+(v.width/2)+xoffset-xscroll)*16*scale), math.floor((py+v.height+yoffset-yscroll)*16*scale) love.graphics.rectangle("fill", x, y, (v.yoshitoungewidth)*16*scale, (2/16)*16*scale) if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(255, 255, 255, a) end love.graphics.draw(yoshiimage, yoshiquad[v.yoshi.color][19], x+(v.yoshitoungewidth*16*scale), y, 0, scale, scale, 2, 1) else local x, y = math.floor((px+(v.width/2)-xoffset-xscroll)*16*scale), math.floor((py+v.height+yoffset-yscroll)*16*scale) love.graphics.rectangle("fill", x, y, (-v.yoshitoungewidth)*16*scale, (2/16)*16*scale) if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(255, 255, 255, a) end love.graphics.draw(yoshiimage, yoshiquad[v.yoshi.color][19], x-(v.yoshitoungewidth*16*scale), y, 0, -scale, scale, 2, 1) end end if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(255, 255, 255, a) end love.graphics.draw(yoshiimage, v.yoshiquad, math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, 11, y) if v.size == 12 then --skinny mario needs to be lower offsetY = offsetY + v.characterdata.yoshiskinnyoffsetY elseif v.size == -1 then offsetY = offsetY + v.characterdata.yoshitinyoffsetY end if v.animationstate == "running" and (not v.yoshitounge) and v.characterdata.yoshiwalkoffsets[v.runframe] then offsetY = offsetY + v.characterdata.yoshiwalkoffsets[v.runframe] end end local draw = true if v.shoe == "drybonesshell" and v.ducking then draw = false end if draw then --cape if (v.graphic == v.capegraphic or (v.fireenemy and v.fireenemy.cape)) and (not v.capefly) then local frame = v.capeframe or 1 if frame ~= 18 then local offx, offy = v.characterdata.capeimgoffsetX, v.characterdata.capeimgoffsetY if (v.fireenemy and v.fireenemy.cape) then offx = v.characterdata.capeimgfireenemyoffsetX end if v.ducking then offy = offy + v.characterdata.capeimgduckingoffsetY end local dirscale = dirscale if v.spinanimationtimer < 0.2 then if v.spinframez == 1 then frame = 14 dirscale = -dirscale elseif v.spinframez == 2 then frame = 15 dirscale = -dirscale else frame = 15 end end love.graphics.setColor(255, 255, 255, a) local img = capeimg if v.character and v.characterdata and v.characterdata.capeimg then img = v.characterdata.capeimg end love.graphics.draw(img, capequad[frame], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX + offx, v.quadcenterY + offy) end end if not v.graphic then print("missing player graphics! fuck this game!") return false end for k = 1, #v.graphic do if drop then love.graphics.setColor(dropshadowcolor) elseif v.colors[k] then love.graphics.setColor(v.colors[k]) elseif mariocolors[v.playernumber] and mariocolors[v.playernumber][k] then --default character colors love.graphics.setColor(mariocolors[v.playernumber][k]) else love.graphics.setColor(255, 255, 255, a) end love.graphics.draw(v.graphic[k], v.quad, math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX, v.quadcenterY) end if v.character and v.characterdata and v.characterdata.portalgununderhat then if v.graphic[0] then if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(255, 255, 255, a) end love.graphics.draw(v.graphic[0], v.quad, math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX, v.quadcenterY) end end if v.drawhat and (hatoffsets[v.animationstate] or v.animationstate == "floating" or (v.animationstate == "dead" and v.size == 1 and hat[v.hats[i]] and hat[v.hats[i]].dead)) then local offsets = {0,0} local drawhats = true local char = v.character if v.graphic == v.biggraphic or v.graphic == v.capegraphic or v.animationstate == "grow" or v.graphic == v.raccoongraphic or v.graphic == v.hammergraphic or v.graphic == v.froggraphic or v.graphic == v.tinygraphic or v.graphic == v.tanookigraphic or v.graphic == v.shellgraphic or v.graphic == v.boomeranggraphic then if v.quadanim == "grow" then offsets = customplayerhatoffsets(char, "hatoffsets", "grow") or hatoffsets["grow"] elseif v.graphic == v.capegraphic and v.quadanim == "fly" then offsets = customplayerhatoffsets(char, "bighatoffsets", "capefly", v.quadframe) or bighatoffsets["idle"] elseif v.graphic == v.capegraphic and v.quadanim == "fire" then offsets = customplayerhatoffsets(char, "bighatoffsets", "flyjump", v.quadframe) or bighatoffsets["idle"] else offsets = customplayerhatoffsets(char, "bighatoffsets", v.quadanimi, v.quadframe) or bighatoffsets["idle"] end if v.graphic == v.shellgraphic and v.ducking then drawhats = false end if v.graphic == v.hammergraphic or v.graphic == v.froggraphic or v.graphic == v.tinygraphic or v.graphic == v.tanookigraphic or v.graphic == v.boomeranggraphic then drawhats = false end elseif v.graphic == v.skinnygraphic then if v.quadanim == "grow" then offsets = customplayerhatoffsets(char, "hatoffsets", "grow") or hatoffsets["grow"] else offsets = customplayerhatoffsets(char, "skinnyhatoffsets", v.quadanimi, v.quadframe) or skinnyhatoffsets["idle"] end else if v.quadanim == "grow" then offsets = customplayerhatoffsets(char, "hatoffsets", "grow") or hatoffsets["grow"] else offsets = customplayerhatoffsets(char, "hatoffsets", v.quadanimi, v.quadframe) or hatoffsets[v.quadanimi] or hatoffsets["idle"] end end if v.helmet then drawhats = false end --SE characters using different hatoffset format if (offsets and offsets[1] and type(offsets[1]) ~= "number") or (not offsets) then offsets = {0,0} drawhats = false end if #v.hats > 0 and offsets and drawhats then local yadd = 0 local xadd = 0 if v.graphic == v.capegraphic then xadd = v.characterdata.capehatoffsetX end for i = 1, #v.hats do local currenthat = v.hats[i] if v.fireenemy and v.fireenemy.hat then currenthat = v.fireenemy.hat end local raccoonhat = false local dirscale = dirscale if currenthat == 1 then if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(v.colors[1]) end if v.graphic == v.raccoongraphic and not (v.character and v.characterdata and v.characterdata.noraccoonhat) then --hat? raccoonhat = true xadd = v.characterdata.raccoonhatoffsetX end if v.spinanimationtimer < raccoonspintime and v.spinframez == 2 and (not v.shoe) then --flipped hat during spin dirscale = -dirscale if raccoonhat then xadd = xadd + v.characterdata.raccoonhatspinoffsetX end end else if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(255, 255, 255, a) end end if v.graphic == v.raccoongraphic and not raccoonhat then --don't show hat in raccoon mode! break end if v.graphic == v.biggraphic or v.graphic == v.capegraphic or v.graphic == v.shellgraphic or v.animationstate == "grow" or raccoonhat then if bighat[currenthat].sliding and bighat[currenthat].slidingemblem and v.animationstate == "sliding" and (not v.ducking) and not v.yoshi then --tilt hat when sliding if raccoonhat then love.graphics.draw(bighat[currenthat].raccoonsliding, bighat[currenthat].quad[1], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) else love.graphics.draw(bighat[currenthat].sliding, bighat[currenthat].quad[1], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) end if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(v.colors[3]) end love.graphics.draw(bighat[currenthat].slidingemblem, bighat[currenthat].quad[1], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) else if bighat[currenthat].directions and v.spinanimationtimer < raccoonspintime and (v.spinframez == 1 or v.spinframez == 3) and (not v.shoe) then --front of hat love.graphics.draw(bighat[currenthat].graphic, bighat[currenthat].quad[2], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) else local q = 1 if v.fence then q = 3 end if raccoonhat and bighat[currenthat].raccoon then love.graphics.draw(bighat[currenthat].raccoon, bighat[currenthat].quad[q], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) else love.graphics.draw(bighat[currenthat].graphic, bighat[currenthat].quad[q], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) end end end if bighat[currenthat].emblem and (v.animationstate ~= "jumping" or v.water or v.ducking or v.yoshi) and (v.animationstate ~= "sliding" or v.ducking or v.yoshi) and v.animationstate ~= "floating" then --draw an emblem on hat if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(v.colors[3]) end if v.spinanimationtimer < raccoonspintime and (not v.shoe) then --front of hat if ((raccoonhat and v.spinframez == 3) or ((not raccoonhat) and v.spinframez == 1)) and bighat[currenthat].emblem then love.graphics.draw(bighat[currenthat].emblem, bighat[currenthat].quad[2], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) end else local q = 1 if v.fence then q = 3 end love.graphics.draw(bighat[currenthat].emblem, bighat[currenthat].quad[q], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - bighat[currenthat].x + offsets[1] + xadd, v.quadcenterY - bighat[currenthat].y + offsets[2] + yadd) end end yadd = yadd + bighat[currenthat].height else if hat[currenthat].sliding and v.animationstate == "sliding" and not v.yoshi then --tilt hat when sliding love.graphics.draw(hat[currenthat].sliding, hat[currenthat].quad[1], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - hat[currenthat].x + offsets[1], v.quadcenterY - hat[currenthat].y + offsets[2] + yadd) elseif v.animationstate == "dead" then if hat[currenthat].directions then local graphic = hat[currenthat].graphic if hat[currenthat].death then graphic = hat[currenthat].death end love.graphics.draw(graphic, hat[currenthat].quad[2], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - hat[currenthat].x + offsets[1], v.quadcenterY - hat[currenthat].y + offsets[2] + yadd) end elseif v.fence then love.graphics.draw(hat[currenthat].graphic, hat[currenthat].quad[3], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - hat[currenthat].x + offsets[1], v.quadcenterY - hat[currenthat].y + offsets[2] + yadd) else love.graphics.draw(hat[currenthat].graphic, hat[currenthat].quad[1], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX - hat[currenthat].x + offsets[1], v.quadcenterY - hat[currenthat].y + offsets[2] + yadd) end yadd = yadd + hat[currenthat].height end end end --bunny mario if (v.size == 11 or (v.fireenemy and v.fireenemy.bunnyears)) then local frame = 1 if v.float then frame = (math.floor(v.floattimer*20-1)%2)+1 elseif v.animationstate == "running" and v.runframe == 3 then frame = 2 end if v.starred or v.animation == "grow2" then love.graphics.setColor(v.colors[3]) else love.graphics.setColor(255, 255, 255, a) end local img = bunnyearsimg if v.character and v.characterdata and v.characterdata.bunnyears then img = v.characterdata.bunnyears end love.graphics.draw(img, bunnyearsquad[frame], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX + offsets[1] + 3, v.quadcenterY + offsets[2] + 6) end --helmet if v.helmet and not v.statue then love.graphics.setColor(255, 255, 255, a) local img, q = koopaimage, koopaquad[spriteset][3] local ox, oy = v.characterdata.helmetoffsetX, v.characterdata.helmetoffsetY if v.graphic == v.capegraphic then ox = v.characterdata.helmetcapeoffsetX elseif v.graphic == v.tanookigraphic or v.graphic == v.raccoongraphic then ox = v.characterdata.helmetraccoonoffsetX elseif v.graphic == v.froggraphic then --frog oy = v.characterdata.helmetfrogoffsetX ox = v.characterdata.helmetfrogoffsetX elseif v.graphic == v.skinnygraphic then ox = v.characterdata.helmetskinnyoffsetX oy = v.characterdata.helmetskinnyoffsetY elseif v.size > 1 then if v.graphic == v.smallgraphic and v.animationstate ~= "grow" then else ox = v.characterdata.helmetbigoffsetX end elseif v.graphic == v.tinygraphic then --tiny oy = v.characterdata.helmettinyoffsetX ox = v.characterdata.helmettinyoffsetX end if v.helmet == "beetle" then img = helmetshellimg q = helmetshellquad[spriteset][1][1] if not (v.ducking or v.yoshi) then --tilt hat when sliding if v.fence then q = helmetshellquad[spriteset][1][2] --ox = ox -2 elseif (v.spinanimationtimer < raccoonspintime and (v.spinframez == 1 or v.spinframez == 3) and (not v.shoe)) then q = helmetshellquad[spriteset][1][2] ox = ox + v.characterdata.helmetspinoffsetX end end elseif v.helmet == "spikey" then img = helmetshellimg q = helmetshellquad[spriteset][2][1] if not (v.ducking or v.yoshi) then --tilt hat when sliding if v.fence then q = helmetshellquad[spriteset][2][2] --ox = ox -2 elseif (v.spinanimationtimer < raccoonspintime and (v.spinframez == 1 or v.spinframez == 3) and (not v.shoe)) then q = helmetshellquad[spriteset][2][2] ox = ox + v.characterdata.helmetspinoffsetX end end elseif v.helmet == "propellerbox" then img = helmetpropellerimg q = helmetpropellerquad[math.floor(v.helmetanimtimer)] ox = ox + v.characterdata.propellerhelmetoffsetX oy = oy + v.characterdata.propellerhelmetoffsetY elseif v.helmet == "cannonbox" then img = helmetcannonimg q = helmetcannonquad[math.floor(v.helmetanimtimer)] ox = ox + v.characterdata.cannonhelmetoffsetX oy = oy + v.characterdata.cannonhelmetoffsetY end if img and q then love.graphics.draw(img, q, math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX + offsets[1] + ox, v.quadcenterY + offsets[2] + oy) end end end if not (v.character and v.characterdata and v.characterdata.portalgununderhat) then if v.graphic[0] then if drop then love.graphics.setColor(dropshadowcolor) else love.graphics.setColor(255, 255, 255, a) end love.graphics.draw(v.graphic[0], v.quad, math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX, v.quadcenterY) end end --cape on top (fence climbing) if (v.graphic == v.capegraphic or (v.fireenemy and v.fireenemy.cape)) and (not v.capefly) then local frame = v.capeframe or 1 if frame == 18 then local offx, offy = v.characterdata.capeimgfenceoffsetX, 0 love.graphics.setColor(255, 255, 255, a) local img = capeimg if v.character and v.characterdata and v.characterdata.capeimg then img = v.characterdata.capeimg end love.graphics.draw(img, capequad[frame], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, dirscale, horscale, v.quadcenterX + offx, v.quadcenterY + offy) end end end --minecraft pickaxe if playertype == "minecraft" then love.graphics.setColor(255, 255, 255, a) local angleframe = getAngleFrame(v.pointingangle+v.rotation, v) love.graphics.draw(minecraftpickaxeimg, minecraftpickaxequad[angleframe], math.floor(((px+v.width/2-xscroll)*16)*scale), math.floor(((py+v.height/2-yscroll-.5)*16)*scale), pr, dirscale, horscale, 10, 10) elseif v.portalgun and v.characterdata.nopointing and v.characterdata.portalgunoverlay then love.graphics.setColor(255, 255, 255, a) local angleframe = getAngleFrame(v.pointingangle+v.rotation, v) love.graphics.draw(portalgunimg, minecraftpickaxequad[angleframe], math.floor(((px+v.width/2-xscroll)*16)*scale), math.floor(((py+v.height/2-yscroll-.5)*16)*scale), pr, dirscale, horscale, 10, 10) end --goomba shoe & cloud if v.shoe == "cloud" then local y = -offsetY - (v.height*16) + v.characterdata.cloudimgoffsetY if v.animationscaley == 3 then y = -offsetY - (v.height*16) + v.characterdata.cloudimghugeoffsetY elseif v.animationscaley == 2 then y = -offsetY - (v.height*16) + v.characterdata.cloudimghugeclassicoffsetY end if v.cloudtimer > 1 or (math.floor(v.cloudtimer*20)%2 == 0) then love.graphics.draw(bigcloudimg, bigcloudquad[spriteset], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), pr, -dirscale, horscale, 10, y) end elseif v.shoe == "drybonesshell" then local frame = 1 local y = -offsetY - (v.height*16) + v.characterdata.drybonesshellimgoffsetY if v.animationscaley == 3 then y = -offsetY - (v.height*16) + v.characterdata.drybonesshellimghugeoffsetY elseif v.animationscaley == 2 then y = -offsetY - (v.height*16) + v.characterdata.drybonesshellimghugeclassicoffsetY end if v.lavasurfing then --it's a season pass, haha get it? --... --does anyone read these? --i changed some stuff around so this joke no longer makes any sense but imma just leave it frame = ((math.floor(coinanimation*(5/6)-1))%4)+1 if not drop then v.lavasurfing = false end end if v.ducking then local shakex = 0 frame = 4 if v.drybonesshelltimer > drybonesshelltime-0.2 or v.drybonesshelltimer < 0.2 then frame = 3 elseif v.drybonesshelltimer < 1 then shakex = math.floor((v.drybonesshelltimer*10)%3)-1 end y = y + v.characterdata.drybonesshellimgduckingoffsetY if v.animationscaley == 3 then y = y + v.characterdata.drybonesshellimghugeduckingoffsetY elseif v.animationscaley == 2 then y = y + v.characterdata.drybonesshellimghugeclassicduckingoffsetY end love.graphics.draw(drybonesimage, drybonesquad[spriteset][frame], math.floor(((px-xscroll)*16+offsetX+shakex)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), v.rotation, -dirscale, horscale, 8, y) else love.graphics.draw(drybonesshellimg, starquad[spriteset][frame], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), v.rotation, -dirscale, horscale, 8, y) end elseif v.shoe and v.shoe ~= "yoshi" then local frame = ((math.floor(coinanimation*(5/6)-4))%2)+4 if v.shoe == "heel" then frame = 6 end local y = -offsetY - (v.height*16) + v.characterdata.shoeimgoffsetY if v.animationscaley == 3 then y = -offsetY - (v.height*16) + v.characterdata.shoeimghugeoffsetY elseif v.animationscaley == 2 then y = -offsetY - (v.height*16) + v.characterdata.shoeimghugeclassicoffsetY end love.graphics.draw(goombashoeimg, goombashoequad[spriteset][frame], math.floor(((px-xscroll)*16+offsetX)*scale), math.floor(((py-yscroll)*16-offsetY)*scale), v.rotation, -dirscale, horscale, 8, y) end --ice block if v.frozen then love.graphics.setColor(255,255,255, a) local w, h = math.ceil(v.width)*2+1, math.ceil(v.height)*2+1 for x = 1, w do for y = 1, h do local q = 5 if x == 1 and y == 1 then q = 1 elseif x == w and y == 1 then q = 3 elseif x == 1 and y == h then q = 7 elseif x == w and y == h then q = 9 elseif y == 1 then q = 2 elseif x == 1 then q = 4 elseif y == h then q = 8 elseif x == w then q = 6 end love.graphics.draw(iceimg, icequad[q], math.floor(((v.x+v.width/2-xscroll)*16+8*(x-1)-(w/2)*8)*scale), math.floor(((v.y+v.height/2-yscroll)*16-12+8*(y-1)-(h/2)*8)*scale), 0, scale, scale) end end end --sledge bro freeze if v.groundfreeze and not v.frozen then local num = v.groundfreeze*100 local shake = math.floor(num-math.floor(num/2)*2)*2 love.graphics.draw(shockimg, shockquad[1], math.floor(((px-xscroll)*16-8+shake)*scale), math.floor(((py-yscroll)*16-13)*scale), 0, scale, scale) love.graphics.draw(shockimg, shockquad[2], math.floor(((px+v.width-xscroll)*16+4-shake)*scale), math.floor(((py-yscroll)*16-13)*scale), 0, scale, scale) end if (CLIENT or SERVER) and playerlist[v.playernumber] and (not drop) and (not NoOnlineMultiplayerNames) then --display nickname local nick = playerlist[v.playernumber].nick --[[local background = {255, 255, 255, 127} local adds = 0 for i = 1, #playerlist[v.playernumber].colors[1] do adds = adds + playerlist[v.playernumber].colors[1][i] end if adds/3 > 40 then background = {0, 0, 0} end]] love.graphics.setColor(playerlist[v.playernumber].colors[1][1], playerlist[v.playernumber].colors[1][2], playerlist[v.playernumber].colors[1][3], 127) properprintbackground(nick, math.floor(((px-xscroll+v.width/2)*16-((#nick*8)/2))*scale), math.floor(((py-yscroll)*16-28)*scale), true)--, background) end end function drawHUD() local properprintfunc = properprintF if hudoutline then properprintfunc = properprintFbackground end love.graphics.setColor(unpack(hudtextcolor)) love.graphics.translate(0, -yoffset*scale) if yoffset < 0 then love.graphics.translate(0, yoffset*scale) end local cy = 32 --collectable coin ui y if hudsimple then cy = 22 --properprintfunc(playername .. " * " .. tostring(mariolives[1]), 16*scale, 8*scale) love.graphics.setColor(255, 255, 255) love.graphics.draw(coinanimationimage, coinanimationquads[spriteset or 1][coinframe or 1], 16*scale, 12*scale, 0, scale, scale) love.graphics.setColor(unpack(hudtextcolor)) properprintfunc("*" .. addzeros((mariocoincount or 0), 2), 24*scale, 12*scale) properprintfunc(addzeros((marioscore or 0), 9), (width*16-56-(9*8))*scale, 12*scale) love.graphics.draw(hudclockimg, hudclockquad[hudoutline], (width*16-49)*scale, 11*scale, 0, scale, scale) if gamestate == "game" then properprintfunc(addzeros(math.ceil(mariotime), 3), (width*16-40)*scale, 12*scale) else properprintfunc("000", (width*16-40)*scale, 12*scale) end else properprintfunc(playername, uispace*.5 - 24*scale, 8*scale) properprintfunc(addzeros((marioscore or 0), 6), uispace*0.5-24*scale, 16*scale) properprintfunc("*", uispace*1.5-8*scale, 16*scale) love.graphics.setColor(255, 255, 255) love.graphics.draw(coinanimationimage, coinanimationquads[spriteset or 1][coinframe or 1], uispace*1.5-16*scale, 16*scale, 0, scale, scale) love.graphics.setColor(unpack(hudtextcolor)) properprintfunc(addzeros((mariocoincount or 0), 2), uispace*1.5-0*scale, 16*scale) properprintfunc(TEXT["world"], uispace*2.5 - 20*scale, 8*scale) local world = marioworld if hudworldletter and tonumber(world) and world > 9 and world <= 9+#alphabet then world = alphabet:sub(world-9, world-9) elseif world == "M" then world = " " end properprintfunc((world or 1) .. "-" .. (mariolevel or 1), uispace*2.5 - 12*scale, 16*scale) properprintfunc(TEXT["time"], uispace*3.5 - 16*scale, 8*scale) if editormode then if linktool then properprintfunc(TEXT["link"], uispace*3.5 - 16*scale, 16*scale) else properprintfunc(TEXT["edit"], uispace*3.5 - 16*scale, 16*scale) end elseif gamestate == "game" then properprintfunc(addzeros(math.ceil(mariotime), 3), uispace*3.5-8*scale, 16*scale) end end if gamestate == "game" then if neurotoxin then if not hudoutline then love.graphics.setColor(0, 0, 0) properprintfunc(TEXT["neurotoxin time: "] .. math.floor(toxintime), uispace*.5 - 24*scale, 35*scale) end love.graphics.setColor(32, 56, 236) properprintfunc(TEXT["neurotoxin time: "] .. math.floor(toxintime), uispace*.5 - 24*scale, 34*scale) end for i = 1, #collectablescount do if collectablescount[i] > 0 and (not hudhidecollectables[i]) then love.graphics.setColor(255, 255, 255) love.graphics.draw(collectableuiimg, collectableuiquad[spriteset or 1][i][coinframe or 1], 16*scale, cy*scale, 0, scale, scale) love.graphics.setColor(unpack(hudtextcolor)) properprintfunc("*" .. collectablescount[i], 24*scale, cy*scale) cy = cy + 10 end end if players == 1 and objects["player"][1].key and objects["player"][1].key > 0 then love.graphics.setColor(255, 255, 255) love.graphics.draw(keyuiimg, keyuiquad[spriteset or 1][coinframe or 1], 16*scale, cy*scale, 0, scale, scale) love.graphics.setColor(unpack(hudtextcolor)) properprintfunc("*" .. objects["player"][1].key, 24*scale, cy*scale) cy = cy + 10 end if players == 1 and objects["player"][1].health and objects["player"][1].characterdata.healthimg then local c = objects["player"][1].characterdata local p = objects["player"][1] local health = p.health local maxhealth = c.health love.graphics.setColor(255, 255, 255) for y = 1, maxhealth do local qi = 1 if y > health then qi = 2 end love.graphics.draw(c.healthimg, c.healthquad[qi], 16*scale, (cy+(c.healthimg:getHeight()/2)*(y-1))*scale, 0, scale, scale) end cy = cy + c.healthimg:getHeight() end end end function drawmultiHUD() --multiplayer hud local properprintfunc = properprintF if hudoutline then properprintfunc = properprintFbackground end local livesdisplay = (mariolivecount ~= false) if (not livesdisplay) and objects and objects["player"] then --should the lives counter be displayed? for i = 1, players do local p = objects["player"][i] if p and ((p.key and p.key > 0) or (p.health and p.characterdata.healthimg)) then livesdisplay = true break end end end if livesdisplay then for i = 1, players do --lives local s if (mariolivecount ~= false) then s = "p" .. i .. " * " .. mariolives[i] else s = "p" .. i end local x = (width*16)/players/2 + (width*16)/players*(i-1) local cx = x-string.len(s)*4-4 local cy = 25 --offset y --display lives love.graphics.setColor(255, 255, 255, 255) properprintfunc(s, (cx+8)*scale, cy*scale) if hudoutline then love.graphics.setColor(0, 0, 0) love.graphics.rectangle("fill", (cx-1)*scale, (cy-1)*scale, 9*scale, 9*scale) end love.graphics.setColor(mariocolors[i][1]) love.graphics.rectangle("fill", (cx)*scale, cy*scale, 7*scale, 7*scale) love.graphics.setColor(255, 255, 255, 255) cy = cy + 10 if objects and objects["player"] and objects["player"][i] then local p = objects["player"][i] --health if p.health and p.characterdata.healthimg then love.graphics.setColor(255, 255, 255) local s = "hp: " .. p.health properprintfunc(s, cx*scale, cy*scale) cy = cy + 10 end --keys if p.key and p.key > 0 then love.graphics.setColor(255, 255, 255) local s = "*" .. p.key love.graphics.draw(keyuiimg, keyuiquad[spriteset or 1][coinframe or 1], cx*scale, cy*scale, 0, scale, scale) properprintfunc(s, (cx+9)*scale, cy*scale) cy = cy + 10 end end end end end function updatesplitscreen() if players == 2 then if #splitscreen == 1 then if math.abs(objects["player"][1].x - objects["player"][2].x) > width - scrollingstart - scrollingleftstart then if objects["player"][1].x < objects["player"][2].x then splitscreen = {{1}, {2}} else splitscreen = {{2}, {1}} end splitxscroll = {xscroll, xscroll+width/2} generatespritebatch() end else if splitxscroll[2] <= splitxscroll[1]+width/2 then splitscreen = {{1, 2}} xscroll = splitxscroll[1] generatespritebatch() end end end end function startlevel(level, reason) skipupdate = true love.keyboard.setKeyRepeat(false) local oldmusici, oldcustommusic if continuesublevelmusic and reason and reason == "sublevel" then if pbuttonsound:isPlaying() then love.audio.stop() else for i, v in pairs(soundlist) do v:stop() end oldmusici, oldcustommusic = musici, custommusic end else love.audio.stop() end animationsystem_load() local sublevel = false if type(level) == "number" then sublevel = true end if level and level == "dc" then --daily challenge skip dcplaying = true else if sublevel then --print("previoussublevel set to ", mariosublevel) prevsublevel = mariosublevel mariosublevel = level if level ~= 0 then level = marioworld .. "-" .. mariolevel .. "_" .. level else level = marioworld .. "-" .. mariolevel end else mariosublevel = 0 prevsublevel = false mariotime = 400 end dcplaying = false end --dumb stupid work around if animationprevsublevel then prevsublevel = animationprevsublevel animationprevsublevel = false end --MISC VARS everyonedead = false levelfinished = false coinanimation = 1 flaganimation = 1 flagx = false flagborder = true showcastleflag = true levelfinishtype = nil firestartx = false firestarted = false firedelay = math.random(4) flyingfishdelay = 1 flyingfishstarted = false flyingfishstartx = false flyingfishendx = false meteordelay = 1 meteorstarted = false meteorstartx = false meteorendx = false bulletbilldelay = 1 bulletbillstarted = false bulletbillstartx = false bulletbillendx = false bigbilldelay = 1 bigbillstarted = false bigbillstartx = false bigbillendx = false windstarted = false windstartx = false windentityspeed = windspeed windendx = false firetimer = firedelay flyingfishtimer = flyingfishdelay meteortimer = meteordelay bulletbilltimer = bulletbilldelay bigbilltimer = bigbilldelay windleaftimer = 0.1 axex = false axey = false lakitoendx = false lakitoend = false angrysunendx = false angrysunend = false noupdate = false xscroll = 0 yscroll = 0 prevxscroll = 0 prevyscroll = 0 xpan = false ypan = false splitscreen = {{}} checkpoints = {} checkpointpoints = {} repeatX = 0 lastrepeat = 0 displaywarpzonetext = false for i = 1, players do table.insert(splitscreen[1], i) end checkpointi = 0 mazesfuck = true mazestarts = {} mazeends = {} mazesolved = {} mazesolved[0] = true mazeinprogress = false earthquake = 0 sunrot = 0 gelcannontimer = 0 pausemenuselected = 1 coinblocktimers = {} autoscroll = true autoscrollx = true autoscrolly = true portaldelay = {} for i = 1, players do portaldelay[i] = 0 end --Minecraft breakingblockX = false breakingblockY = false breakingblockprogress = 0 --class tables coinblockanimations = {} scrollingscores = {} portalparticles = {} portalprojectiles = {} emancipationgrills = {} laserfields = {} platformspawners = {} rocketlaunchers = {} bigbilllaunchers = {} kingbilllaunchers = {} cannonballlaunchers = {} userects = {} blockdebristable = {} fireworks = {} seesaws = {} bubbles = {} poofs = {} dialogboxes = {} rainbooms = {} emancipateanimations = {} emancipationfizzles = {} miniblocks = {} inventory = {} for i = 1, 9 do inventory[i] = {} end mccurrentblock = 1 itemanimations = {} snakeblocks = {} clearpipes = {} tracks = {} spawnanimations = {} pipes = {} exitpipes = {} blockbounce = {} warpzonenumbers = {} portals = {} blockedportaltiles = {} objects = {} objects["player"] = {} objects["portalwall"] = {} objects["tile"] = {} objects["tilemoving"] = {} objects["enemy"] = {} objects["goomba"] = {} objects["koopa"] = {} objects["mushroom"] = {} objects["flower"] = {} objects["oneup"] = {} objects["star"] = {} objects["vine"] = {} objects["box"] = {} objects["door"] = {} objects["button"] = {} objects["groundlight"] = {} objects["wallindicator"] = {} objects["walltimer"] = {} objects["notgate"] = {} objects["lightbridge"] = {} objects["lightbridgebody"] = {} objects["faithplate"] = {} objects["laser"] = {} objects["laserdetector"] = {} objects["gel"] = {} objects["geldispenser"] = {} objects["cubedispenser"] = {} objects["pushbutton"] = {} objects["bulletbill"] = {} objects["hammerbro"] = {} objects["hammer"] = {} objects["fireball"] = {} objects["platform"] = {} objects["platformspawner"] = {} objects["plant"] = {} objects["castlefire"] = {} objects["castlefirefire"] = {} objects["fire"] = {} objects["bowser"] = {} objects["spring"] = {} objects["cheep"] = {} objects["flyingfish"] = {} objects["upfire"] = {} objects["seesawplatform"] = {} objects["ceilblocker"] = {} objects["lakito"] = {} objects["squid"] = {} objects["poisonmush"] = {} objects["bigbill"] = {} objects["kingbill"] = {} objects["sidestepper"] = {} objects["barrel"] = {} objects["icicle"] = {} objects["angrysun"] = {} objects["splunkin"] = {} objects["threeup"] = {} objects["brofireball"] = {} objects["smbsitem"] = {} objects["thwomp"] = {} objects["fishbone"] = {} objects["drybones"] = {} objects["muncher"] = {} objects["meteor"] = {} objects["donut"] = {} objects["boomerang"] = {} objects["parabeetle"] = {} objects["ninji"] = {} objects["hammersuit"] = {} objects["mariohammer"] = {} objects["boo"] = {} objects["mole"] = {} objects["bigmole"] = {} objects["bomb"] = {} objects["plantfire"] = {} objects["flipblock"] = {} objects["torpedoted"] = {} objects["torpedolauncher"] = {} objects["frogsuit"] = {} objects["boomboom"] = {} objects["levelball"] = {} objects["leaf"] = {} objects["mariotail"] = {} objects["windleaf"] = {} objects["energylauncher"] = {} objects["energyball"] = {} objects["energycatcher"] = {} objects["turret"] = {} objects["turretshot"] = {} objects["blocktogglebutton"] = {} objects["buttonblock"] = {} objects["squarewave"] = {} objects["delayer"] = {} objects["coin"] = {} objects["frozencoin"] = {} objects["amp"] = {} objects["fuzzy"] = {} objects["funnel"] = {} objects["longfire"] = {} objects["cannonball"] = {} objects["cannonballcannon"] = {} objects["rocketturret"] = {} objects["turretrocket"] = {} objects["glados"] = {} objects["core"] = {} objects["pedestal"] = {} objects["portalent"] = {} objects["text"] = {} objects["regiontrigger"] = {} objects["pixeltile"] = {} objects["tiletool"] = {} objects["iceball"] = {} objects["enemytool"] = {} objects["randomizer"] = {} objects["yoshiegg"] = {} objects["yoshi"] = {} objects["musicchanger"] = {} objects["pbutton"] = {} objects["pokey"] = {} objects["chainchomp"] = {} objects["rockywrench"] = {} objects["wrench"] = {} objects["koopaling"] = {} objects["checkpoint"] = {} objects["doorsprite"] = {} objects["magikoopa"] = {} objects["skewer"] = {} objects["belt"] = {} objects["animationtrigger"] = {} objects["animationoutput"] = {} objects["animatedtiletrigger"] = {} objects["rsflipflop"] = {} objects["orgate"] = {} objects["andgate"] = {} objects["collectable"] = {} objects["collectablelock"] = {} objects["powblock"] = {} objects["smallspring"] = {} objects["risingwater"] = {} objects["redseesaw"] = {} objects["snakeblock"] = {} objects["spike"] = {} objects["spikeball"] = {} objects["camerastop"] = {} objects["clearpipesegment"] = {} objects["plantcreeper"] = {} objects["plantcreepersegment"] = {} objects["tracksegment"] = {} objects["trackcontroller"] = {} objects["checkpointflag"] = {} objects["ice"] = {} objects["grinder"] = {} objects["cappy"] = {} objects["screenboundary"] = {} objects["screenboundary"]["left"] = screenboundary:new(0) splitxscroll = {0} splityscroll = {0} setscreenzoom(1) startx = 3 starty = 13 pipestartx = nil pipestarty = nil pipestartdir = nil local animation = nil enemiesspawned = {} for i = 1, #animatedtiles do animatedtiles[i].timer = 0 animatedtiles[i].quadi = 1 end intermission = false haswarpzone = false underwater = false bonusstage = false custombackground = false customforeground = false autoscrolling = false autoscrollingspeed = autoscrollingdefaultspeed autoscrollingx = false autoscrollingy = false edgewrapping = false lightsout = false lightsoutwave = 0 lowgravity = false portalgun = true portalguni = 1 musici = 1 custommusici = 1 mariotimelimit = 400 spriteset = 1 backgroundrgb = {0, 0, 0} breakoutmode = nil queuelowtime = false --GLaDOS neurotoxin = false toxintime = 150 setphysics(currentphysics) setcamerasetting(camerasetting) --LOAD THE MAP if level == "dc" then --create daily challenge createdailychallenge() elseif loadmap(level) == false then --make one up mapwidth = width originalmapwidth = mapwidth mapheight = 15 map = {} bmap_on = false --enabled? for x = 1, width do map[x] = {} for y = 1, mapheight do if y > 13 then map[x][y] = {2} objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1, 1, 1, true) map[x][y]["gels"] = {} map[x][y]["portaloverride"] = nil else map[x][y] = {1} map[x][y]["gels"] = {} map[x][y]["portaloverride"] = nil end end end background = 1 backgroundrgbon = false else if sublevel == false and mariosublevel ~= 0 then level = marioworld .. "-" .. mariolevel mariosublevel = 0 loadmap(level) end end originalmapwidth = mapwidth if musici > 7 then custommusic = mappackfolder .. "/" .. mappack .. "/" .. musictable[musici] else custommusic = custommusics[custommusici] end objects["screenboundary"]["right"] = screenboundary:new(mapwidth) if flagx then if not flagborder then objects["screenboundary"]["flag"] = screenboundary:new(mapwidth) else objects["screenboundary"]["flag"] = screenboundary:new(flagx+6/16) end end if axex then objects["screenboundary"]["axe"] = screenboundary:new(axex+1) end if intermission then animation = "intermission" end if (not sublevel) or (editormode and not testlevel) then mariotime = mariotimelimit --[[elseif subleveltest then --i dont know what this is but it makes the time reset update: apparently for the editor? mariotime = mariotimelimit]] end --Maze setup --check every block between every start/end pair to see how many gates it contains if #mazestarts == #mazeends then mazegates = {} for i = 1, #mazestarts do local maxgate = 1 for x = mazestarts[i], mazeends[i] do for y = 1, mapheight do if map[x][y][2] and entityquads[map[x][y][2]].t == "mazegate" then if tonumber(map[x][y][3]) > maxgate then maxgate = tonumber(map[x][y][3]) end end end end mazegates[i] = maxgate end else print("Mazenumber doesn't fit!") end --background if backgroundrgbon == true then love.graphics.setBackgroundColor(unpack(backgroundrgb)) else love.graphics.setBackgroundColor(backgroundcolor[background]) end --portalgun (NOT NEEDED) portalsavailable = {true, true} --check if it's a bonusstage (boooooooonus!) if bonusstage then animation = "vinestart" end --set startx to checkpoint if checkpointx and checkcheckpoint then startx = checkpointx starty = checkpointpoints[checkpointx] or mapheight - 2 --clear enemies from spawning near for y = starty-15, starty+15 do for x = startx-8, startx+8 do if inmap(x, y) and #map[x][y] > 1 then if tablecontains(checkpointignoreenemies, entityquads[map[x][y][2]].t) or (tablecontains(customenemies, entityquads[map[x][y][2]].t) and enemiesdata[map[x][y][2]] and enemiesdata[map[x][y][2]].dontspawnnearcheckpoint) then table.insert(enemiesspawned, {x, y}) end end end end --find which i it is for i = 1, #checkpoints do if checkpointx == checkpoints[i] then checkpointi = i end end --was the checkpoint a flag? if objects["checkpointflag"][checkpointx] then startx = checkpointx - .5 objects["checkpointflag"][checkpointx]:activate(1) end end --set startx to pipestart if pipestartx then startx = pipestartx-1 starty = pipestarty if pipestartdir == "right" or pipestartdir == "left" then startx = pipestartx end --check if startpos is a colliding block if ismaptile(pipestartx, pipestarty) and tilequads[map[pipestartx][pipestarty][1]].collision then local p = exitpipes[tilemap(pipestartx,pipestarty)] if p then if p.dir == "down" then animation = "pipedownexit" startx = p.x elseif p.dir == "right" then animation = "piperightexit" startx = pipestartx-1 elseif p.dir == "left" then animation = "pipeleftexit" startx = pipestartx-1 else animation = "pipeupexit" startx = p.x end else print("no exit pipe entity found! ", pipestartx, " ", pipestarty) end end end --reset pipe exit id pipeexitid = false if autoscrollingx then --start further left splitxscroll = {startx-scrollingleftcomplete-5} else splitxscroll = {startx-scrollingleftcomplete-2} end if splitxscroll[1] > mapwidth - width then splitxscroll[1] = mapwidth - width end if splitxscroll[1] < 0 then splitxscroll[1] = 0 end splityscroll = {starty-height/2} if splityscroll[1] > mapheight-height-1 then splityscroll[1] = math.max(0, mapheight-height-1) end if splityscroll[1] < 0 then splityscroll[1] = 0 end yscrolltarget = splityscroll[1] --add the players local mul = 0.5 if mariosublevel ~= 0 or prevsublevel ~= false then mul = 2/16 end if editormode then for i = 1, players do mariosizes[i] = 1 end end objects["player"] = {} for i = 1, players do if pipestartx then mul = 2/16 objects["player"][i] = mario:new(startx+(i-1)*mul, starty-1, i, animation, mariosizes[i], playertype, marioproperties[i]) elseif startx then objects["player"][i] = mario:new(startx + (i-1)*mul-6/16, starty-1, i, animation, mariosizes[i], playertype, marioproperties[i]) else objects["player"][i] = mario:new(1.5 + (i-1)*mul-6/16+1.5, 13, i, animation, mariosizes[i], playertype, marioproperties[i]) end end if player_position and player_position[1] then --test from position objects["player"][1].x = player_position[1] objects["player"][1].y = player_position[2] camerasnap(player_position[3], player_position[4]) end if camerasetting ~= 2 then --not 2 because its centered if startx and mapwidth > width*2 and startx > mapwidth-scrollingcompletev then scrollingstart = scrollingleftstartv scrollingcomplete = scrollingleftcompletev scrollingleftstart = scrollingstartv scrollingleftcomplete = scrollingcompletev if autoscrollingx then autoscrollingx = -autoscrollingx end else scrollingstart = scrollingstartv scrollingcomplete = scrollingcompletev scrollingleftstart = scrollingleftstartv scrollingleftcomplete = scrollingleftcompletev end end --ADD ENEMIES ON START SCREEN if editormode == false then local xtodo = width*screenzoom2+1 if mapwidth < width*screenzoom2+1 then xtodo = mapwidth end for x = math.floor(splitxscroll[1]), math.floor(splitxscroll[1])+xtodo do for y = math.floor(splityscroll[1]), math.floor(splityscroll[1])+height*screenzoom2+2 do spawnenemyentity(x, y) end end end --PLAY BGM local doplaymusic = true if continuesublevelmusic then if (not intermission) and musici == oldmusici and custommusic == oldcustommusic then local playing, source = music:getPlaying() if (not (musici ~= 6 and playing == "starmusic")) then doplaymusic = false end end if doplaymusic then music:disableintromusic() music:stopall() stopmusic() end else stopmusic() end if doplaymusic and not NoMusic then if intermission == false then playmusic() else if musici == 7 and custommusic then playmusic() else playsound(intermissionsound) end end end --load editor if editormode then editor_load(player_position) end --Do stuff updateranges() --Activate Swtich block animations for anim = 1, #animationswitchtriggerfuncs do local t = animationswitchtriggerfuncs[anim] if tonumber((t[2] or 0)) then local color = tonumber((t[2] or 0)) if solidblockperma[color] then t[1]:trigger() end end end --is it toad or no showtoad = not (tonumber(marioworld) and marioworld >= 8 and not love.filesystem.exists(mappackfolder .. "/" .. mappack .. "/" .. marioworld+1 .. "-1.txt")) updatespritebatch() prevxscroll = splitxscroll[1] prevyscroll = splityscroll[1] end function loadmap(filename) print("Loading " .. mappackfolder .. "/" .. mappack .. "/" .. filename .. ".txt") if love.filesystem.exists(mappackfolder .. "/" .. mappack .. "/" .. filename .. ".txt") == false then print(mappackfolder .. "/" .. mappack .. "/" .. filename .. ".txt not found!") return false end local s = love.filesystem.read( mappackfolder .. "/" .. mappack .. "/" .. filename .. ".txt" ) local s2 = s:split(";") if s2[2] and s2[2]:sub(1,7) == "height=" then mapheight = tonumber(s2[2]:sub(8,-1)) or 15 elseif love.filesystem.exists(mappackfolder .. "/" .. mappack .. "/heights/" .. marioworld .. "-" .. mariolevel .. "_" .. actualsublevel .. ".txt") then local s11 = love.filesystem.read(mappackfolder .. "/" .. mappack .. "/heights/" .. marioworld .. "-" .. mariolevel .. "_" .. actualsublevel .. ".txt") mapheight = tonumber(s11) else mapheight = 15 end --MAP ITSELF local t = s2[1]:split(",") if math.fmod(#t, mapheight) ~= 0 then print("Incorrect number of entries: " .. #t) return false end mapwidth = #t/mapheight originalmapwidth = mapwidth map = {} --foreground map bmap_on = false --background map on? local nr, nr2 --map[x][y][1], map[x][y][2] unstatics = {} for x = 1, mapwidth do map[x] = {} for y = 1, mapheight do map[x][y] = {} map[x][y]["gels"] = {} map[x][y]["portaloverride"] = nil local r = tostring(t[(y-1)*(#t/mapheight)+x]):split("-") nr = tonumber(r[1]) if not nr then --background tile if not bmap_on then bmap_on = true end local tiles = r[1]:split("~") r[1] = tiles[1] nr = tonumber(r[1]) map[x][y]["back"] = tonumber(tiles[2]) elseif (nr > smbtilecount+portaltilecount+customtilecount and nr <= 90000) or nr > 90000+animatedtilecount then --tile doesn't exist r[1] = 1 end --entity argument if r[2] and (not tonumber(r[2])) and r[2]:find(":") then local values = r[2]:split(":") r[2] = tonumber(values[1]) or values[1] --enemy map[x][y]["argument"] = values[2] end for i = 1, #r do if tonumber(r[i]) ~= nil then map[x][y][i] = tonumber(r[i]) else map[x][y][i] = r[i] --check if custom enemy doesn't exist if editormode and i == 2 and not tablecontains(customenemies, r[i]) then print("custom enemy " .. r[i] .. " does not exist") map[x][y][i] = 1 end end end --create object for block if tilequads[tonumber(r[1])].collision == true then objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1, 1, 1, true) end end end --MORE STUFF for i = 2, #s2 do s3 = s2[i]:split("=") if s3[1] == "background" then if tonumber(s3[2]) ~= nil then background = tonumber(s3[2]) backgroundrgbon = false else local s4 = s3[2]:split(",") background = 4 backgroundrgbon = true backgroundrgb = {tonumber(s4[1]), tonumber(s4[2]), tonumber(s4[3])} backgroundcolor[4] = backgroundrgb end elseif s3[1] == "spriteset" then spriteset = tonumber(s3[2]) elseif s3[1] == "intermission" then intermission = true elseif s3[1] == "haswarpzone" then haswarpzone = true elseif s3[1] == "underwater" then underwater = true elseif s3[1] == "music" then if tonumber(s3[2]) then musici = tonumber(s3[2]) else musici = 2 local name = s3[2] for i, m in pairs(musictable) do if m == name then musici = i end end end elseif s3[1] == "bonusstage" then bonusstage = true elseif s3[1] == "custombackground" or s3[1] == "portalbackground" then custombackground = (s3[2] or true) elseif s3[1] == "timelimit" then mariotimelimit = tonumber(s3[2]) elseif s3[1] == "scrollfactor" then scrollfactor = tonumber(s3[2]) scrollfactory = scrollfactor elseif s3[1] == "scrollfactory" then scrollfactory = tonumber(s3[2]) elseif s3[1] == "scrollfactor2" then scrollfactor2 = tonumber(s3[2]) scrollfactor2y = scrollfactor2 elseif s3[1] == "scrollfactor2y" then scrollfactor2y = tonumber(s3[2]) elseif s3[1] == "autoscrolling" then autoscrolling = true autoscrollingspeed = tonumber(s3[2]) or autoscrollingdefaultspeed if (mapheight > mapwidth) or (mapwidth == 25) then --vertical autoscrolling autoscrollingy = autoscrollingspeed autoscrollingx = false else --horizontal autoscrolling autoscrollingy = false autoscrollingx = autoscrollingspeed end if autoscrollingy and starty > mapheight/2 then autoscrollingy = -autoscrollingy end elseif s3[1] == "edgewrapping" then edgewrapping = true elseif s3[1] == "lightsout" then lightsout = true lightsoutwave = 0 elseif s3[1] == "lowgravity" then lowgravity = true maxyspeed = lowgravitymaxyspeed elseif s3[1] == "customforeground" then customforeground = (s3[2] or true) elseif s3[1] == "noportalgun" then portalgun = false portalguni = 2 elseif s3[1] == "portalguni" then portalguni = tonumber(s3[2]) if portalguni == 2 then portalgun = false else portalgun = true end elseif s3[1] == "custommusic" then if tonumber(s3[2]) ~= nil then custommusici = tonumber(s3[2]) end end end --ANIMATED TILES make lists of every tile in level for i = 1, #animatedtiles do if animatedtiles[i].cache then animatedtiles[i].cache = {} end end --CUSTOM ENEMIES if editormode or testlevel then --reload custom enemies everytime level is loaded enemies_load() else --just update spritesets for name, t in pairs(enemiesdata) do loadenemyquad(name, "no notices") end end --ANIMATED TIMERS animatedtimers = {} for x = 1, mapwidth do animatedtimers[x] = {} end for y = 1, mapheight do for x = 1, mapwidth do local r = map[x][y] if r[1] > 90000 then if tilequads[r[1]].triggered then animatedtimers[x][y] = animatedtimer:new(x, y, r[1]) end if tilequads[r[1]].cache then table.insert(tilequads[r[1]].cache, {x=x,y=y}) end end if #r > 1 and entityquads[r[2]] then local t = entityquads[r[2]].t if t == "spawn" then startx = x starty = y if r[3] and r[3] == "true" then startx = x-.5 --spawn exactly in the tile end elseif not editormode then --load non-enemy entities loadentity(t, x, y, r, r[2]) elseif PipesInEditor and editormode then if t == "warppipe" or t == "pipe" or t == "pipe2" or t == "pipespawn" or t == "pipespawndown" or t == "pipespawnhor" then loadentity(t, x, y, r, r[2]) end end elseif r[1] == 1 and (not editormode) then --save memory if (not r["back"]) and (not r["track"]) then map[x][y] = nil map[x][y] = emptytile end end end end --Add tracks for j, w in pairs(objects["platform"]) do if w.linked then trackobject(w.cox, w.coy, w, "platform") end end for j, w in pairs(objects["redseesaw"]) do trackobject(w.cox, w.coy, w, "redseesaw") end for j, w in pairs(objects["grinder"]) do trackobject(w.cox, w.coy, w, "grinder") end --sort checkpoints table.sort(checkpoints) --Add links for i, v in pairs(objects) do for j, w in pairs(v) do if w.link then w:link() end end end --emancipation links for i, v in pairs(emancipationgrills) do v:link() end for i, v in pairs(laserfields) do v:link() end for i, v in pairs(kingbilllaunchers) do v:link() end for i, v in pairs(snakeblocks) do v:link() end for i, v in pairs(tracks) do v:link() end --create clear pipe intersections for i, v in pairs(clearpipes) do v:createintersection() end if flagx then flagimgx = flagx+8/16 flagimgy = flagy-10+1/16 end --not sure what this is? delete maybe? --[[for x = 0, -30, -1 do map[x] = {} for y = 1, 13 do map[x][y] = {1} end for y = 14, mapheight do map[x][y] = {2} objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1, 1, 1, true) end end]] if custombackground then loadcustombackground(custombackground) end if customforeground then loadcustomforeground(customforeground) end return true end function bmapt(x, y, i) --get backgruond map tile TODO: Delete this? if bmap_on then if i == 1 and map[x] and map[x][y] and map[x][y]["back"] then return map[x][y]["back"] end end return false end function changemapwidth(width) if width > mapwidth then for x = mapwidth+1, width do map[x] = {} for y = 1, mapheight-2 do map[x][y] = {1} map[x][y]["gels"] = {} map[x][y]["portaloverride"] = nil end for y = mapheight-1, mapheight do map[x][y] = {2} objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1, 1, 1, true) map[x][y]["gels"] = {} map[x][y]["portaloverride"] = nil end end end mapwidth = width objects["screenboundary"]["right"].x = mapwidth if objects["player"][1].x > mapwidth then objects["player"][1].x = mapwidth-1 end end function changemapheight(height) if height > mapheight then for x = 1, mapwidth do for y = mapheight+1, height do map[x][y] = {1} map[x][y]["gels"] = {} map[x][y]["portaloverride"] = nil end end end mapheight = height if objects["player"][1].y > mapheight then objects["player"][1].y = mapheight-1 end end --re-implement this. the only issue was a single frame of blank when starting the game --EDIT: implemented again. Undo if there are errors function generatespritebatch() queuespritebatchupdate = true end function updatespritebatch() local split = 1 local smbmsb = smbspritebatch[1] local portalmsb = portalspritebatch[1] local custommsb if customtiles then custommsb = customspritebatch[1] end smbmsb:clear() portalmsb:clear() if customtiles then for i = 1, #custommsb do custommsb[i]:clear() end end local smbmbacksb = smbspritebatch[2] local portalmbacksb = portalspritebatch[2] local custommbacksb if customtiles then custommbacksb = customspritebatch[2] end smbmbacksb:clear() portalmbacksb:clear() if customtiles then for i = 1, #custommbacksb do custommbacksb[i]:clear() end end local xscroll, yscroll = splitxscroll[split], splityscroll[split] local xfromdraw,xtodraw, yfromdraw,ytodraw, xoff,yoff = getdrawrange(xscroll,yscroll,"spritebatch") local lmap = map for y = yfromdraw, ytodraw do for x = xfromdraw, xtodraw do local bounceyoffset = 0 local draw = true if getblockbounce(x, y) then draw = false end if draw == true then if (not lmap[x]) then print("spritebatch tile doesnt exist " .. x) else local t = lmap[x][y] if t then local tilenumber = t[1] if tilenumber ~= 0 and tilequads[tilenumber].invisible == false and tilequads[tilenumber].coinblock == false and tilequads[tilenumber].coin == false and (not tilequads[tilenumber].foreground) and ((not _3DMODE) or tilequads[tilenumber].collision) then if math.floor(tilenumber) <= smbtilecount then smbmsb:add( tilequads[tilenumber].quad, (x-1-xoff)*16*scale, ((y-1-yoff)*16-8)*scale, 0, scale, scale ) elseif tilenumber <= smbtilecount+portaltilecount then portalmsb:add( tilequads[tilenumber].quad, (x-1-xoff)*16*scale, ((y-1-yoff)*16-8)*scale, 0, scale, scale ) elseif tilenumber <= smbtilecount+portaltilecount+customtilecount then custommsb[tilequads[tilenumber].ts]:add( tilequads[tilenumber].quad, (x-1-xoff)*16*scale, ((y-1-yoff)*16-8)*scale, 0, scale, scale ) end end end end end if bmap_on then if lmap[x] and lmap[x][y] then local backgroundtile = bmapt(x, y, 1) if backgroundtile and tilequads[backgroundtile] and not tilequads[backgroundtile].invisible then if math.floor(backgroundtile) <= smbtilecount then smbmbacksb:add( tilequads[backgroundtile].quad, (x-1-xoff)*16*scale, ((y-1-yoff)*16-8)*scale, 0, scale, scale ) elseif backgroundtile <= smbtilecount+portaltilecount then portalmbacksb:add( tilequads[backgroundtile].quad, (x-1-xoff)*16*scale, ((y-1-yoff)*16-8)*scale, 0, scale, scale ) elseif backgroundtile <= smbtilecount+portaltilecount+customtilecount then custommbacksb[tilequads[backgroundtile].ts]:add( tilequads[backgroundtile].quad, (x-1-xoff)*16*scale, ((y-1-yoff)*16-8)*scale, 0, scale, scale ) end end end end end end createedgewrap() --edge wrapping queuespritebatchupdate = false end function game_keypressed(key, textinput) if pausemenuopen then if menuprompt then if (key == "left" or key == "a") then pausemenuselected2 = 1 elseif (key == "right" or key == "d") then pausemenuselected2 = 2 elseif (key == "return" or key == "enter" or key == "kpenter" or key == " ") then if pausemenuselected2 == 1 then if SERVER then stopmusic() love.audio.stop() pausemenuopen = false menuprompt = false server_lobby() lobby_load() return end if CLIENT then net_quit() end if dcplaying then stopmusic() love.audio.stop() pausemenuopen = false menuprompt = false dcplaying = false menu_load() gamestate = "mappackmenu" mappacktype = "daily_challenge" mappackhorscroll = 2 mappackhorscrollsmooth = 2 else stopmusic() love.audio.stop() pausemenuopen = false menuprompt = false menu_load() end else menuprompt = false end elseif key == "escape" then menuprompt = false end return elseif desktopprompt then if (key == "left" or key == "a") then pausemenuselected2 = 1 elseif (key == "right" or key == "d") then pausemenuselected2 = 2 elseif (key == "return" or key == "enter" or key == "kpenter" or key == " ") then if pausemenuselected2 == 1 then love.audio.stop() love.event.quit() else desktopprompt = false end elseif key == "escape" then desktopprompt = false end return elseif suspendprompt then if (key == "left" or key == "a") then pausemenuselected2 = 1 elseif (key == "right" or key == "d") then pausemenuselected2 = 2 elseif (key == "return" or key == "enter" or key == "kpenter" or key == " ") then if dcplaying then suspendprompt = false elseif pausemenuselected2 == 1 then stopmusic() love.audio.stop() suspendgame() suspendprompt = false pausemenuopen = false else suspendprompt = false end elseif key == "escape" then suspendprompt = false end return end if (key == "down" or key == "s") then if pausemenuselected < #pausemenuoptions then pausemenuselected = pausemenuselected + 1 end elseif (key == "up" or key == "w") then if pausemenuselected > 1 then pausemenuselected = pausemenuselected - 1 end elseif (key == "return" or key == "enter" or key == "kpenter" or key == " ") then if pausemenuoptions[pausemenuselected] == "resume" then pausemenuopen = false love.audio.resume() elseif pausemenuoptions[pausemenuselected] == "suspend" then if dcplaying then pausemenuopen = false updatesizes("reset") levelscreen_load("dc") updatesizes("reset") else suspendprompt = true pausemenuselected2 = 1 end elseif pausemenuoptions2[pausemenuselected] == "menu" then menuprompt = true pausemenuselected2 = 1 elseif pausemenuoptions2[pausemenuselected] == "desktop" then desktopprompt = true pausemenuselected2 = 1 end elseif key == "escape" then pausemenuopen = false love.audio.resume() elseif (key == "right" or key == "d") then if pausemenuoptions[pausemenuselected] == "volume" then if volume < 1 then volume = volume + 0.1 love.audio.setVolume( volume ) soundenabled = true playsound(coinsound) end end elseif (key == "left" or key == "a") then if pausemenuoptions[pausemenuselected] == "volume" then volume = math.max(volume - 0.1, 0) love.audio.setVolume( volume ) if volume == 0 then soundenabled = false end playsound(coinsound) end end return end --chat if (SERVER or CLIENT) then if key == "/" or (chatentrytoggle and key == "escape") then chatentrytoggle = not chatentrytoggle if key == "escape" then chatentrytoggle = false end guielements.chatentry.active = chatentrytoggle guielements.sendbutton.active = chatentrytoggle guielements.chatentry.inputting = chatentrytoggle end if chatentrytoggle then return end end if endpressbutton then endpressbutton = false endgame() return end for i = 1, players do if editormode and (editormenuopen or rightclickmenuopen) then break end if controls[i]["jump"][1] == key then objects["player"][i]:button("jump") objects["player"][i]:wag() objects["player"][i]:jump() animationsystem_buttontrigger(i, "jump") elseif controls[i]["run"][1] == key then objects["player"][i]:button("run") objects["player"][i]:fire() animationsystem_buttontrigger(i, "run") elseif controls[i]["reload"][1] == key then objects["player"][i]:button("reload") if objects["player"][i].portalgun then local pi = false --only reset portals that can be controlled by player if objects["player"][i].portals == "1 only" then pi = 1 elseif objects["player"][i].portals == "2 only" then pi = 2 end objects["player"][i]:removeportals(pi) end animationsystem_buttontrigger(i, "reload") elseif controls[i]["use"][1] == key then objects["player"][i]:button("use") objects["player"][i]:use() animationsystem_buttontrigger(i, "use") elseif controls[i]["left"][1] == key then objects["player"][i]:button("left") objects["player"][i]:leftkey() animationsystem_buttontrigger(i, "left") elseif controls[i]["right"][1] == key then objects["player"][i]:button("right") objects["player"][i]:rightkey() animationsystem_buttontrigger(i, "right") elseif controls[i]["up"][1] == key then objects["player"][i]:button("up") objects["player"][i]:upkey() animationsystem_buttontrigger(i, "up") elseif controls[i]["down"][1] == key then objects["player"][i]:button("down") objects["player"][i]:downkey() animationsystem_buttontrigger(i, "down") end if controls[i]["portal1"][1] == key and objects["player"][i] then objects["player"][i]:shootportal(1) return end if controls[i]["portal2"][1] == key and objects["player"][i] then objects["player"][i]:shootportal(2) return end end if android then if controls[1]["up"][1] == key then if playertype == "minecraft" then mccurrentblock = mccurrentblock + 1 if mccurrentblock >= 10 then mccurrentblock = 1 end elseif bullettime then speedtarget = speedtarget - 0.1 if speedtarget < 0.1 then speedtarget = 0.1 end end elseif controls[1]["down"][1] == key then if playertype == "minecraft" then mccurrentblock = mccurrentblock - 1 if mccurrentblock <= 0 then mccurrentblock = 9 end elseif bullettime then speedtarget = speedtarget + 0.1 if speedtarget > 1 then speedtarget = 1 end end end end if key == "escape" then if not editormode and testlevel then stoptestinglevel() return elseif not editormode and not everyonedead then pausemenuopen = true if not android then --doesn't work for some reason love.audio.pause() end playsound(pausesound) end end if editormode then editor_keypressed(key) end end function stoptestinglevel() marioworld = testlevelworld mariolevel = testlevellevel testlevel = false player_position = {objects["player"][1].x, objects["player"][1].y, xscroll, yscroll} stopmusic() love.audio.stop() editormode = true if mariosublevel ~= 0 then startlevel(mariosublevel) else startlevel(marioworld .. "-" .. mariolevel) end player_position = nil end function game_keyreleased(key, unicode) for i = 1, players do if controls[i]["jump"][1] == key then objects["player"][i]:buttonrelease("jump") objects["player"][i]:stopjump() animationsystem_buttonreleasetrigger(i, "jump") elseif controls[i]["run"][1] == key then objects["player"][i]:buttonrelease("run") animationsystem_buttonreleasetrigger(i, "run") elseif controls[i]["reload"][1] == key then objects["player"][i]:buttonrelease("reload") animationsystem_buttonreleasetrigger(i, "reload") elseif controls[i]["use"][1] == key then objects["player"][i]:buttonrelease("use") animationsystem_buttonreleasetrigger(i, "use") elseif controls[i]["left"][1] == key then objects["player"][i]:buttonrelease("left") animationsystem_buttonreleasetrigger(i, "left") elseif controls[i]["right"][1] == key then objects["player"][i]:buttonrelease("right") animationsystem_buttonreleasetrigger(i, "right") elseif controls[i]["up"][1] == key then objects["player"][i]:buttonrelease("up") animationsystem_buttonreleasetrigger(i, "up") elseif controls[i]["down"][1] == key then objects["player"][i]:buttonrelease("down") animationsystem_buttonreleasetrigger(i, "down") end end end function shootportal(plnumber, i, sourcex, sourcey, direction, mirrored) if objects["player"][plnumber].portalgundisabled then return end --box if objects["player"][plnumber].pickup then return end --portalgun delay if portaldelay[plnumber] > 0 then return else portaldelay[plnumber] = portalgundelay end if not objects["player"][plnumber].portalgun then return end local otheri = 1 local color = objects["player"][plnumber].portal2color if i == 1 then otheri = 2 color = objects["player"][plnumber].portal1color end local cox, coy, side, tendency, x, y = traceline(sourcex, sourcey, direction) local mirror = false if cox and inmap(cox, coy) and tilequads[map[cox][coy][1]]:getproperty("mirror", cox, coy) then mirror = true end objects["player"][plnumber].lastportal = i table.insert(portalprojectiles, portalprojectile:new(sourcex, sourcey, x, y, color, true, {objects["player"][plnumber].portal, i, cox, coy, side, tendency, x, y}, mirror, mirrored, plnumber)) end function game_mousepressed(x, y, button) local s = "" if pausemenuopen then return end if editormode and editorstate ~= "portalgun" then editor_mousepressed(x, y, button) else if editormode then editor_mousepressed(x, y, button) end if not noupdate and objects["player"][mouseowner] then if button == "l" then objects["player"][mouseowner]:shootportal(1) elseif button == "r" then objects["player"][mouseowner]:shootportal(2) end end if button == "wd" then if playertype == "minecraft" then mccurrentblock = mccurrentblock + 1 if mccurrentblock >= 10 then mccurrentblock = 1 end elseif bullettime then speedtarget = speedtarget - 0.1 if speedtarget < 0.1 then speedtarget = 0.1 end end elseif button == "wu" then if playertype == "minecraft" then mccurrentblock = mccurrentblock - 1 if mccurrentblock <= 0 then mccurrentblock = 9 end elseif bullettime then speedtarget = speedtarget + 0.1 if speedtarget > 1 then speedtarget = 1 end end end end end function modifyportalwalls() --Create and remove new stuff for a, b in pairs(portals) do for i = 1, 2 do if b["x" .. i] then if b["facing" .. i] == "up" then objects["portalwall"][a .. "-" .. i .. "-1"] = portalwall:new(b["x" .. i]-1, b["y" .. i]-1, 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-2"] = portalwall:new(b["x" .. i]-1, b["y" .. i], 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-3"] = portalwall:new(b["x" .. i], b["y" .. i], 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-4"] = portalwall:new(b["x" .. i]+1, b["y" .. i]-1, 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-5"] = portalwall:new(b["x" .. i]-1, b["y" .. i]-1, 0, 0, true) objects["portalwall"][a .. "-" .. i .. "-6"] = portalwall:new(b["x" .. i]+1, b["y" .. i]-1, 0, 0, true) modifyportaltiles(b["x" .. i], b["y" .. i], 1, 0, portals[a], i, "remove") elseif b["facing" .. i] == "down" then objects["portalwall"][a .. "-" .. i .. "-1"] = portalwall:new(b["x" .. i]-2, b["y" .. i]-1, 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-2"] = portalwall:new(b["x" .. i]-1, b["y" .. i]-1, 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-3"] = portalwall:new(b["x" .. i]-2, b["y" .. i]-1, 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-4"] = portalwall:new(b["x" .. i], b["y" .. i]-1, 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-5"] = portalwall:new(b["x" .. i]-2, b["y" .. i], 0, 0, true) objects["portalwall"][a .. "-" .. i .. "-6"] = portalwall:new(b["x" .. i], b["y" .. i], 0, 0, true) modifyportaltiles(b["x" .. i], b["y" .. i], -1, 0, portals[a], i, "remove") elseif b["facing" .. i] == "left" then objects["portalwall"][a .. "-" .. i .. "-1"] = portalwall:new(b["x" .. i], b["y" .. i]-2, 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-2"] = portalwall:new(b["x" .. i], b["y" .. i]-1, 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-3"] = portalwall:new(b["x" .. i]-1, b["y" .. i]-2, 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-4"] = portalwall:new(b["x" .. i]-1, b["y" .. i], 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-5"] = portalwall:new(b["x" .. i]-1, b["y" .. i], 0, 0, true) objects["portalwall"][a .. "-" .. i .. "-6"] = portalwall:new(b["x" .. i]-1, b["y" .. i]-2, 0, 0, true) modifyportaltiles(b["x" .. i], b["y" .. i], 0, -1, portals[a], i, "remove") elseif b["facing" .. i] == "right" then objects["portalwall"][a .. "-" .. i .. "-1"] = portalwall:new(b["x" .. i]-1, b["y" .. i]-1, 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-2"] = portalwall:new(b["x" .. i]-1, b["y" .. i], 0, 1, true) objects["portalwall"][a .. "-" .. i .. "-3"] = portalwall:new(b["x" .. i]-1, b["y" .. i]-1, 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-4"] = portalwall:new(b["x" .. i]-1, b["y" .. i]+1, 1, 0, true) objects["portalwall"][a .. "-" .. i .. "-5"] = portalwall:new(b["x" .. i], b["y" .. i]-1, 0, 0, true) objects["portalwall"][a .. "-" .. i .. "-6"] = portalwall:new(b["x" .. i], b["y" .. i]+1, 0, 0, true) modifyportaltiles(b["x" .. i], b["y" .. i], 0, 1, portals[a], i, "remove") end end end end --remove conflicting portalwalls (only exist when both portals exists!) for a, b in pairs(portals) do for j = 1, 2 do local otherj = 1 if j == 1 then otherj = 2 end for c, d in pairs(portals) do for i = 1, 2 do local otheri = 1 if i == 1 then otheri = 2 end --B.J PORTAL WILL REMOVE WALLS OF D.OTHERJ, SO B.OTHERJ MUST EXIST if b["x" .. j] and b["x" .. otherj] and d["x" .. i] then local conside, conx, cony = b["facing" .. j], b["x" .. j], b["y" .. j] for k = 1, 4 do local w = objects["portalwall"][c .. "-" .. i .. "-" .. k] if w then if conside == "right" then if w.x == conx and w.y == cony-1 and w.height == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx and w.y == cony and w.height == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx-1 and w.y == cony and w.width == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end elseif conside == "left" then if w.x == conx-1 and w.y == cony-2 and w.height == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx-1 and w.y == cony-1 and w.height == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx-1 and w.y == cony-1 and w.width == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end elseif conside == "up" then if w.x == conx-1 and w.y == cony-1 and w.width == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx and w.y == cony-1 and w.width == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx and w.y == cony-1 and w.height == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end else if w.x == conx-2 and w.y == cony and w.width == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx-1 and w.y == cony and w.width == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end if w.x == conx-1 and w.y == cony-1 and w.height == 1 then objects["portalwall"][c .. "-" .. i .. "-" .. k] = nil end end end end end end end end end end function modifyportaltiles(x, y, xplus, yplus, portal, i, mode) if not x or not y then return end if i == 1 then if portal.facing2 ~= false then if mode == "add" then objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1) objects["tile"][tilemap(x+xplus, y+yplus)] = tile:new(x-1+xplus, y-1+yplus) else objects["tile"][tilemap(x, y)] = nil objects["tile"][tilemap(x+xplus, y+yplus)] = nil end end else if portal.facing1 ~= false then if mode == "add" then objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1) objects["tile"][tilemap(x+xplus, y+yplus)] = tile:new(x-1+xplus, y-1+yplus) else objects["tile"][tilemap(x, y)] = nil objects["tile"][tilemap(x+xplus, y+yplus)] = nil end end end end function getportalposition(i, x, y, side, tendency) --returns the "optimal" position according to the parsed arguments (or false if no possible position was found) local xplus, yplus = 0, 0 if side == "up" then yplus = -1 elseif side == "right" then xplus = 1 elseif side == "down" then yplus = 1 elseif side == "left" then xplus = -1 end if side == "up" or side == "down" then if tendency == -1 then if getTile(x-1, y, true, true, side) == true and getTile(x, y, true, true, side) == true and getTile(x-1, y+yplus, nil, false, side, true) == false and getTile(x, y+yplus, nil, false, side, true) == false then if side == "up" then return x-1, y else return x, y end elseif getTile(x, y, true, true, side) == true and getTile(x+1, y, true, true, side) == true and getTile(x, y+yplus, nil, false, side, true) == false and getTile(x+1, y+yplus, nil, false, side, true) == false then if side == "up" then return x, y else return x+1, y end end else if getTile(x, y, true, true, side) == true and getTile(x+1, y, true, true, side) == true and getTile(x, y+yplus, nil, false, side, true) == false and getTile(x+1, y+yplus, nil, false, side, true) == false then if side == "up" then return x, y else return x+1, y end elseif getTile(x-1, y, true, true, side) == true and getTile(x, y, true, true, side) == true and getTile(x-1, y+yplus, nil, false, side, true) == false and getTile(x, y+yplus, nil, false, side, true) == false then if side == "up" then return x-1, y else return x, y end end end else if tendency == -1 then if getTile(x, y-1, true, true, side) == true and getTile(x, y, true, true, side) == true and getTile(x+xplus, y-1, nil, false, side, true) == false and getTile(x+xplus, y, nil, false, side, true) == false then if side == "right" then return x, y-1 else return x, y end elseif getTile(x, y, true, true, side) == true and getTile(x, y+1, true, true, side) == true and getTile(x+xplus, y, nil, false, side, true) == false and getTile(x+xplus, y+1, nil, false, side, true) == false then if side == "right" then return x, y else return x, y+1 end end else if getTile(x, y, true, true, side) == true and getTile(x, y+1, true, true, side) == true and getTile(x+xplus, y, nil, false, side, true) == false and getTile(x+xplus, y+1, nil, false, side, true) == false then if side == "right" then return x, y else return x, y+1 end elseif getTile(x, y-1, true, true, side) == true and getTile(x, y, true, true, side) == true and getTile(x+xplus, y-1, nil, false, side, true) == false and getTile(x+xplus, y, nil, false, side, true) == false then if side == "right" then return x, y-1 else return x, y end end end end return false end function getTile(x, y, portalable, portalcheck, facing, ignoregrates, dir) --returns masktable value of block (As well as the ID itself as second return parameter) also includes a portalcheck and returns false if a portal is on that spot. if portalcheck then for i, v in pairs(portals) do --Get the extra block of each portal local portal1xplus, portal1yplus, portal2xplus, portal2yplus = 0, 0, 0, 0 if v.facing1 == "up" then portal1xplus = 1 elseif v.facing1 == "right" then portal1yplus = 1 elseif v.facing1 == "down" then portal1xplus = -1 elseif v.facing1 == "left" then portal1yplus = -1 end if v.facing2 == "up" then portal2xplus = 1 elseif v.facing2 == "right" then portal2yplus = 1 elseif v.facing2 == "down" then portal2xplus = -1 elseif v.facing2 == "left" then portal2yplus = -1 end if v.x1 ~= false then if (x == v.x1 or x == v.x1+portal1xplus) and (y == v.y1 or y == v.y1+portal1yplus) and (facing == nil or v.facing1 == facing) then return false end end if v.x2 ~= false then if (x == v.x2 or x == v.x2+portal2xplus) and (y == v.y2 or y == v.y2+portal2yplus) and (facing == nil or v.facing2 == facing) then return false end end end end --check for tubes for i, v in pairs(objects["geldispenser"]) do if (x == v.cox or x == v.cox+1) and (y == v.coy or y == v.coy+1) then if portalcheck then return false else return true end end end for i, v in pairs(objects["cubedispenser"]) do if (x == v.cox or x == v.cox+1) and (y == v.coy or y == v.coy+1) then if portalcheck then return false else return true end end end if objects["flipblock"][tilemap(x, y)] then local v = objects["flipblock"][tilemap(x, y)] if not v.flip then if portalcheck then return false else return true end end end if objects["buttonblock"][tilemap(x, y)] then local v = objects["buttonblock"][tilemap(x, y)] if v.solid then if portalcheck then return false else return true end end end if objects["clearpipesegment"][tilemap(x, y)] then if portalcheck then return false else return true end end if objects["frozencoin"][tilemap(x, y)] then if portalcheck then return false else return true end end if blockedportaltiles[tilemap(x, y)] then if portalcheck then return false else return true end end if objects["tile"][tilemap(x, y)] and (objects["tile"][tilemap(x, y)].slant or objects["tile"][tilemap(x, y)].slab) then if portalcheck then return false, 1 else return true, 1 end end --bonusstage thing for keeping it from fucking up by allowing portals to be shot next to the vine in 4-2_2 for example if bonusstage then if y == mapheight and (x == 4 or x == 6) then if portalcheck then return false else return true end end end if x <= 0 or y <= 0 or y >= mapheight+1 or x > mapwidth then return false, 1 end if tilequads[map[x][y][1]]:getproperty("invisible", x, y) or tilequads[map[x][y][1]].leftslant or tilequads[map[x][y][1]].rightslant or tilequads[map[x][y][1]].halfleftslant1 or tilequads[map[x][y][1]].halfleftslant2 or tilequads[map[x][y][1]].halfrightslant1 or tilequads[map[x][y][1]].halfrightslant2 then return false end if portalcheck then local side if facing == "up" then side = "top" elseif facing == "right" then side = "right" elseif facing == "down" then side = "bottom" elseif facing == "left" then side = "left" end --To stop people from portalling under the vine, which caused problems, but was fixed elsewhere (and betterer) --[[for i, v in pairs(objects["vine"]) do if x == v.cox and y == v.coy and side == "top" then return false, 1 end end--]] if map[x][y]["portaloverride"] and map[x][y]["portaloverride"][side] then return true, map[x][y][1] end if map[x][y]["gels"][side] == 3 then return true, map[x][y][1] else return tilequads[map[x][y][1]]:getproperty("collision", x, y) and tilequads[map[x][y][1]]:getproperty("portalable", x, y) and not tilequads[map[x][y][1]]:getproperty("grate", x, y), map[x][y][1] end else if ignoregrates then return tilequads[map[x][y][1]]:getproperty("collision", x, y) and not tilequads[map[x][y][1]]:getproperty("grate", x, y), map[x][y][1] else return (tilequads[map[x][y][1]]:getproperty("collision", x, y) or map[x][y][1] == 130), map[x][y][1] end end end function getPortal(x, y, dir) --returns the block where you'd come out when you'd go in the argument's block for i, v in pairs(portals) do if v.x1 ~= false and v.x2 ~= false then --Get the extra block of each portal local portal1xplus, portal1yplus, portal2xplus, portal2yplus = 0, 0, 0, 0 if v.facing1 == "up" then portal1xplus = 1 elseif v.facing1 == "right" then portal1yplus = 1 elseif v.facing1 == "down" then portal1xplus = -1 elseif v.facing1 == "left" then portal1yplus = -1 end if v.facing2 == "up" then portal2xplus = 1 elseif v.facing2 == "right" then portal2yplus = 1 elseif v.facing2 == "down" then portal2xplus = -1 elseif v.facing2 == "left" then portal2yplus = -1 end if v.x1 ~= false and (not dir or v.facing1 == dir) then if (x == v.x1 or x == v.x1+portal1xplus) and (y == v.y1 or y == v.y1+portal1yplus) and (facing == nil or v.facing1 == facing) then if v.facing1 ~= v.facing2 then local xplus, yplus = 0, 0 if v.facing1 == "left" or v.facing1 == "right" then if y == v.y1 then if v.facing2 == "left" or v.facing2 == "right" then yplus = portal2yplus else xplus = portal2xplus end end return v.x2+xplus, v.y2+yplus, v.facing2, v.facing1, v.x2, v.y2, v.x1, v.y1 else if x == v.x1 then if v.facing2 == "left" or v.facing2 == "right" then yplus = portal2yplus else xplus = portal2xplus end end return v.x2+xplus, v.y2+yplus, v.facing2, v.facing1, v.x2, v.y2, v.x1, v.y1 end else return v.x2+(x-v.x1), v.y2+(y-v.y1), v.facing2, v.facing1, v.x2, v.y2, v.x1, v.y1 end end end if v.x2 ~= false and (not dir or v.facing2 == dir) then if (x == v.x2 or x == v.x2+portal2xplus) and (y == v.y2 or y == v.y2+portal2yplus) and (facing == nil or v.facing2 == facing) then if v.facing1 ~= v.facing2 then local xplus, yplus = 0, 0 if v.facing2 == "left" or v.facing2 == "right" then if y == v.y2 then if v.facing1 == "left" or v.facing1 == "right" then yplus = portal1yplus else xplus = portal1xplus end end return v.x1+xplus, v.y1+yplus, v.facing1, v.facing2, v.x1, v.y1, v.x2, v.y2 else if x == v.x2 then if v.facing1 == "left" or v.facing1 == "right" then yplus = portal1yplus else xplus = portal1xplus end end return v.x1+xplus, v.y1+yplus, v.facing1, v.facing2, v.x1, v.y1, v.x2, v.y2 end else return v.x1+(x-v.x2), v.y1+(y-v.y2), v.facing1, v.facing2, v.x1, v.y1, v.x2, v.y2 end end end end end return false end function insideportal(x, y, width, height) --returns whether an object is in, and which, portal. if width == nil then width = 12/16 end if height == nil then height = 12/16 end for i, v in pairs(portals) do if v.x1 ~= false and v.x2 ~= false then for j = 1, 2 do local portalx, portaly, portalfacing if j == 1 then portalx = v.x1 portaly = v.y1 portalfacing = v.facing1 else portalx = v.x2 portaly = v.y2 portalfacing = v.facing2 end if portalfacing == "up" then xplus = 1 elseif portalfacing == "down" then xplus = -1 elseif portalfacing == "left" then yplus = -1 end if portalfacing == "right" then if (math.floor(y) == portaly or math.floor(y) == portaly-1) and inrange(x, portalx-width, portalx, false) then return portals[i], j end elseif portalfacing == "left" then if (math.floor(y) == portaly-1 or math.floor(y) == portaly-2) and inrange(x, portalx-1-width, portalx-1, false) then return portals[i], j end elseif portalfacing == "up" then if inrange(y, portaly-height-1, portaly-1, false) and inrange(x, portalx-1.5-.2, portalx+.5+.2, true) then return portals[i], j end elseif portalfacing == "down" then if inrange(y, portaly-height, portaly, false) and inrange(x, portalx-2, portalx-.5, true) then return portals[i], j end end --widen rect by 3 pixels? end end end return false end function moveoutportal() --pushes objects out of the portal i in. for i, v in pairs(objects) do if i ~= "tile" and i ~= "pixeltile" and i ~= "portalwall" then for j, w in pairs(v) do if w.active and w.static == false then local p1, p2 = insideportal(w.x, w.y, w.width, w.height) if p1 ~= false then local portalfacing, portalx, portaly if p2 == 1 then portalfacing = p1.facing1 portalx = p1.x1 portaly = p1.y1 else portalfacing = p1.facing2 portalx = p1.x2 portaly = p1.y2 end if portalfacing == "right" then w.x = portalx elseif portalfacing == "left" then w.x = portalx - 1 - w.width elseif portalfacing == "up" then w.y = portaly - 1 - w.height elseif portalfacing == "down" then w.y = portaly end end end end end end end function nextlevel() stopmusic() love.audio.stop() mariolevel = mariolevel + 1 if tonumber(marioworld) then if mariolevel > (#mappacklevels[marioworld] or 4) then mariolevel = 1 marioworld = marioworld + 1 end end if dcplaying then dchighscore() end levelscreen_load("next") end function warpzone(i, l) love.audio.stop() mariolevel = l or 1 marioworld = i or 1 mariosublevel = 0 prevsublevel = false -- minus 1 world glitch just because I can. if not displaywarpzonetext and i == 4 and haswarpzone then marioworld = "M" end levelscreen_load("next") end function game_mousereleased(x, y, button) if button == "l" then if playertype == "minecraft" then breakingblockX = false end end if editormode then editor_mousereleased(x, y, button) end end function getMouseTile(x, y) local xout = math.floor((x+xscroll*screenzoom*16*scale)/(16*screenzoom*scale))+1 local yout = math.floor((y+yscroll*screenzoom*16*scale)/(16*screenzoom*scale))+1 return xout, yout end function savemap(filename) local s = "" local backgroundtile for y = 1, mapheight do for x = 1, mapwidth do for i = 1, #map[x][y] do s = s .. tostring(map[x][y][i]) --is the enemy offset horizontally? if i == 2 and map[x][y]["argument"] then s = s .. ":" .. tostring(map[x][y]["argument"]) end --tack on a background tile backgroundtile = bmapt(x, y, i) if backgroundtile then s = s .. "~" .. tostring(backgroundtile) end --seperator if i ~= #map[x][y] then s = s .. "-" end end if y ~= mapheight or x ~= mapwidth then s = s .. "," end end end --options s = s .. ";height=" .. mapheight if background == 4 then s = s .. ";background=" .. backgroundrgb[1] .. "," .. backgroundrgb[2] .. "," .. backgroundrgb[3] else s = s .. ";background=" .. background end s = s .. ";spriteset=" .. spriteset if musici > 7 then s = s .. ";music=" .. musictable[musici] else s = s .. ";music=" .. musici end if intermission then s = s .. ";intermission" end if bonusstage then s = s .. ";bonusstage" end if haswarpzone then s = s .. ";haswarpzone" end if underwater then s = s .. ";underwater" end if custombackground then if tostring(custombackground) == custombackground then s = s .. ";custombackground=" .. custombackground else s = s .. ";custombackground" end end if autoscrolling then if tonumber(autoscrollingspeed) then s = s .. ";autoscrolling=" .. autoscrollingspeed else s = s .. ";autoscrolling" end end if edgewrapping then s = s .. ";edgewrapping" end if lightsout then s = s .. ";lightsout" end if lowgravity then s = s .. ";lowgravity" end if customforeground then if tostring(customforeground) == customforeground then s = s .. ";customforeground=" .. customforeground else s = s .. ";customforeground" end end if not portalgun then s = s .. ";noportalgun" else s = s .. ";portalguni=" .. portalguni end if musici == 7 then if guielements["custommusiciinput"] then s = s .. ";custommusic=" .. guielements["custommusiciinput"].value else s = s .. ";custommusic=1" end end s = s .. ";timelimit=" .. mariotimelimit s = s .. ";scrollfactor=" .. scrollfactor s = s .. ";scrollfactory=" .. scrollfactory s = s .. ";scrollfactor2=" .. scrollfactor2 s = s .. ";scrollfactor2y=" .. scrollfactor2y if nofunallowed then s = s .. ";nofunallowed" end s = s .. ";vs=" .. VERSION --tileset love.filesystem.createDirectory( mappackfolder ) love.filesystem.createDirectory( mappackfolder .. "/" .. mappack ) local success, message = love.filesystem.write(mappackfolder .. "/" .. mappack .. "/" .. filename .. ".txt", s) --don't create a map height file if it's 15 (default) (Update: no more map files cause they're bad) if mapheight ~= 15 then if love.filesystem.exists(mappackfolder .. "/" .. mappack .. "/heights/" .. marioworld .. "-" .. mariolevel .. "_" .. actualsublevel .. ".txt") then love.filesystem.remove(mappackfolder .. "/" .. mappack .. "/heights/" .. marioworld .. "-" .. mariolevel .. "_" .. actualsublevel .. ".txt") --remove file end end print("Map saved as " .. mappackfolder .. "/" .. filename .. ".txt") if success then notice.new("Map saved!", notice.white, 2) else notice.new("Could not save map!\n" .. message, notice.red, 4) end end function savelevel() if mariosublevel == 0 then savemap(marioworld .. "-" .. mariolevel) else savemap(marioworld .. "-" .. mariolevel .. "_" .. mariosublevel) end --metadata if editormode then promptsaveeditormetadata() end end function traceline(sourcex, sourcey, radians, reportal) local currentblock = {} local x, y = sourcex, sourcey currentblock[1] = math.floor(x) currentblock[2] = math.floor(y+1) local emancecollide = false for i, v in pairs(emancipationgrills) do if v:getTileInvolved(currentblock[1]+1, currentblock[2]) then emancecollide = true end end local doorcollide = false for i, v in pairs(objects["door"]) do if v.dir == "hor" then if v.open == false and (v.cox == currentblock[1] or v.cox == currentblock[1]+1) and v.coy == currentblock[2] then doorcollide = true break end else if v.open == false and v.cox == currentblock[1]+1 and (v.coy == currentblock[2] or v.coy == currentblock[2]+1) then doorcollide = true break end end end local tileposition = tilemap(currentblock[1]+1, currentblock[2]) if objects["flipblock"][tileposition] and not objects["flipblock"][tileposition].flip then buttonblockcollide = true end local pixeltilecollide = false --TODO: fix? I don't think the +1 should be added to the x if objects["tile"][tileposition] then if objects["tile"][tileposition].slant then pixeltilecollide = true elseif objects["tile"][tileposition].slab then buttonblockcollide = true end end local buttonblockcollide = false if objects["buttonblock"][tileposition] then local v = objects["buttonblock"][tileposition] if v.solid then buttonblockcollide = true end end if objects["clearpipesegment"][tileposition] then buttonblockcollide = true end if objects["frozencoin"][tileposition] then buttonblockcollide = true end if blockedportaltiles[tileposition] then buttonblockcollide = true end if emancecollide or doorcollide or flipblockcollide or buttonblockcollide or pixeltilecollide then return false, false, false, false, x, y end local side while currentblock[1]+1 > 0 and currentblock[1]+1 <= mapwidth and (flagx == false or (currentblock[1]+1 <= flagx or not flagborder)) and (axex == false or currentblock[1]+1 <= axex) and (currentblock[2] > 0 or currentblock[2] >= math.floor(sourcey+0.5)) and currentblock[2] < mapheight+1 do --while in map range local oldy = y local oldx = x --calculate X and Y diff.. local ydiff, xdiff local side1, side2 if inrange(radians, -math.pi/2, math.pi/2, true) then --up ydiff = (y-(currentblock[2]-1)) / math.cos(radians) y = currentblock[2]-1 side1 = "down" else ydiff = (y-(currentblock[2])) / math.cos(radians) y = currentblock[2] side1 = "up" end if inrange(radians, 0, math.pi, true) then --left xdiff = (x-(currentblock[1])) / math.sin(radians) x = currentblock[1] side2 = "right" else xdiff = (x-(currentblock[1]+1)) / math.sin(radians) x = currentblock[1]+1 side2 = "left" end --smaller diff wins if xdiff < ydiff then y = oldy - math.cos(radians)*xdiff side = side2 else x = oldx - math.sin(radians)*ydiff side = side1 end if side == "down" then currentblock[2] = currentblock[2]-1 elseif side == "up" then currentblock[2] = currentblock[2]+1 elseif side == "left" then currentblock[1] = currentblock[1]+1 elseif side == "right" then currentblock[1] = currentblock[1]-1 end local collide, tileno = getTile(currentblock[1]+1, currentblock[2]) local emancecollide = false for i, v in pairs(emancipationgrills) do if v:getTileInvolved(currentblock[1]+1, currentblock[2]) then emancecollide = true end end if tileno then if tilequads[tileno]:getproperty("platform", currentblock[1]+1, currentblock[2]) or tilequads[tileno]:getproperty("platformdown", currentblock[1]+1, currentblock[2]) or tilequads[tileno]:getproperty("platformleft", currentblock[1]+1, currentblock[2]) or tilequads[tileno]:getproperty("platformright", currentblock[1]+1, currentblock[2]) then if ((side == "up" and tilequads[tileno]:getproperty("platform", currentblock[1]+1, currentblock[2])) or (side == "down" and tilequads[tileno]:getproperty("platformdown", currentblock[1]+1, currentblock[2])) or (side == "left" and tilequads[tileno]:getproperty("platformleft", currentblock[1]+1, currentblock[2])) or (side == "right" and tilequads[tileno]:getproperty("platformright", currentblock[1]+1, currentblock[2]))) then collide = true else collide = false end end if tilequads[tileno].grate then collide = false end end local doorcollide = false for i, v in pairs(objects["door"]) do if v.dir == "hor" then if v.open == false and (v.cox == currentblock[1] or v.cox == currentblock[1]+1) and v.coy == currentblock[2] then doorcollide = true end else if v.open == false and v.cox == currentblock[1]+1 and (v.coy == currentblock[2] or v.coy == currentblock[2]+1) then doorcollide = true end end end --Check for ceilblocker if y < 0 then if map[currentblock[1]] and entitylist[map[currentblock[1]][1][2]] and entitylist[map[currentblock[1]][1][2]].t == "ceilblocker" then return false, false, false, false, x, y end end local tileposition = tilemap(currentblock[1]+1, currentblock[2]) --local flipblockcollide = false if objects["flipblock"][tileposition] and not objects["flipblock"][tileposition].flip then collide = true end if objects["tile"][tileposition] then if objects["tile"][tileposition].slant or objects["tile"][tileposition].slab then return false, false, false, false, x, y end end --local buttonblockcollide = false if objects["buttonblock"][tileposition] then local v = objects["buttonblock"][tileposition] if v.solid then collide = true end end if objects["clearpipesegment"][tileposition] then collide = true end if objects["frozencoin"][tileposition] then collide = true end if blockedportaltiles[tileposition] then collide = true end if collide == true then break elseif emancecollide or doorcollide or flipblockcollide or buttonblockcollide or pixeltilecollide then return false, false, false, false, x, y elseif x > xscroll + width or x < xscroll or y > yscroll + height + 1 or (y < yscroll and sourcey >= yscroll) then return false, false, false, false, x, y end end if currentblock[1]+1 > 0 and currentblock[1]+1 <= mapwidth and (currentblock[2] > 0 or currentblock[2] >= math.floor(sourcey+0.5)) and currentblock[2] < mapheight+1 and currentblock[1] ~= nil then local tendency --get tendency if side == "down" or side == "up" then if math.fmod(x, 1) > 0.5 then tendency = 1 else tendency = -1 end elseif side == "left" or side == "right" then if math.fmod(y, 1) > 0.5 then tendency = 1 else tendency = -1 end end return currentblock[1]+1, currentblock[2], side, tendency, x, y else return false, false, false, false, x, y end end function loadentity(t, x, y, r, id) local r = r if not r then --check if tile has settable option, if so default to this. r = {} if rightclickvalues[t] then r[3] = rightclickvalues[t][2] elseif rightclicktype[t] then r[3] = rightclicktype[t].default end end if t == "warppipe" then pipes[tilemap(x,y)] = pipe:new("warppipe", x, y, r) elseif t == "pipe" then if not (ismaptile(x, y) and map[x][y][1] and tilequads[map[x][y][1]].noteblock) then pipes[tilemap(x,y)] = pipe:new("pipe", x, y, r) end elseif t == "pipe2" then pipes[tilemap(x,y)] = pipe:new("pipe2", x, y, r) elseif t == "pipespawn" then local offseted = false if inmap(x+1, y) and entityquads[map[x+1][y][2]] and entityquads[map[x+1][y][2]].t == "pipe" and (not (map[x][y][3] and type(map[x][y][3]) == "string" and not (map[x][y][3]:find("up") or map[x][y][3]:find("down"))) ) then x = x+1 offseted = true end exitpipes[tilemap(x,y)] = pipe:new("pipespawn", x, y, r) elseif t == "pipespawndown" then if inmap(x+1, y) and entityquads[map[x+1][y][2]] and entityquads[map[x+1][y][2]].t == "pipe2" then x = x+1 end exitpipes[tilemap(x,y)] = pipe:new("pipespawndown", x, y, r) elseif t == "pipespawnhor" then if inmap(x, y+1) and entityquads[map[x][y+1][2]] and (entityquads[map[x][y+1][2]].t == "pipe" or entityquads[map[x][y+1][2]].t == "pipe2") then y = y+1 end exitpipes[tilemap(x,y)] = pipe:new("pipespawnhor", x, y, r) elseif t == "flag" then flagx = x-1 flagy = y if r[3] then local v = convertr(r[3], {"string", "bool"}, true) flagborder = (v[1] == "true") if v[2] ~= nil then showcastleflag = v[2] else if custombackground then showcastleflag = false else showcastleflag = true end end else flagborder = true if custombackground then showcastleflag = false else showcastleflag = true end end elseif t == "manycoins" then map[x][y][3] = 7 elseif t == "flyingfishstart" then flyingfishstartx = x elseif t == "flyingfishend" then flyingfishendx = x elseif t == "meteorstart" then meteorstartx = x elseif t == "meteorend" then meteorendx = x elseif t == "bulletbillstart" then bulletbillstartx = x elseif t == "bulletbillend" then bulletbillendx = x elseif t == "bigbillstart" then bigbillstartx = x elseif t == "bigbillend" then bigbillendx = x elseif t == "windstart" then windstartx = x if r[3] then local v = convertr(r[3], {"num"}, true) windentityspeed = v[1] else windentityspeed = windspeed end elseif t == "windend" then windendx = x elseif t == "axe" then axex = x axey = y elseif t == "lakitoend" then lakitoendx = x elseif t == "angrysunend" then angrysunendx = x elseif t == "checkpoint" then if not tablecontains(checkpoints, x) then table.insert(checkpoints, x) checkpointpoints[x] = y if r and #r > 2 then table.insert(objects["checkpoint"], checkpointentity:new(x, y, r, #checkpoints)) end end elseif t == "checkpointflag" then if not tablecontains(checkpoints, x) then table.insert(checkpoints, x) checkpointpoints[x] = y objects["checkpointflag"][x] = checkpointflag:new(x, y, r, #checkpoints) end elseif t == "mazestart" then if not tablecontains(mazestarts, x) then table.insert(mazestarts, x) end mazesfuck = true elseif t == "mazeend" then if not tablecontains(mazeends, x) then table.insert(mazeends, x) end mazesfuck = true elseif t == "ceilblocker" then table.insert(objects["ceilblocker"], ceilblocker:new(x)) elseif t == "geltop" then if tilequads[map[x][y][1]].collision then if type(r[3]) == "string" and r[3]:find("|") then local s = r[3]:split("|") local t = tonumber(s[1]) if s[2] == "true" then map[x][y]["gels"]["top"] = t end if s[3] == "true" then map[x][y]["gels"]["left"] = t end if s[4] == "true" then map[x][y]["gels"]["bottom"] = t end if s[5] == "true" then map[x][y]["gels"]["right"] = t end else map[x][y]["gels"]["top"] = r[3] end end elseif t == "gelleft" then if tilequads[map[x][y][1]].collision then if type(r[3]) == "string" and r[3]:find("|") then local s = r[3]:split("|") local t = tonumber(s[1]) if s[2] == "true" then map[x][y]["gels"]["top"] = t end if s[3] == "true" then map[x][y]["gels"]["left"] = t end if s[4] == "true" then map[x][y]["gels"]["bottom"] = t end if s[5] == "true" then map[x][y]["gels"]["right"] = t end else map[x][y]["gels"]["left"] = r[3] end end elseif t == "gelbottom" then if tilequads[map[x][y][1]].collision then if type(r[3]) == "string" and r[3]:find("|") then local s = r[3]:split("|") local t = tonumber(s[1]) if s[2] == "true" then map[x][y]["gels"]["top"] = t end if s[3] == "true" then map[x][y]["gels"]["left"] = t end if s[4] == "true" then map[x][y]["gels"]["bottom"] = t end if s[5] == "true" then map[x][y]["gels"]["right"] = t end else map[x][y]["gels"]["bottom"] = r[3] end end elseif t == "gelright" then if tilequads[map[x][y][1]].collision then if type(r[3]) == "string" and r[3]:find("|") then local s = r[3]:split("|") local t = tonumber(s[1]) if s[2] == "true" then map[x][y]["gels"]["top"] = t end if s[3] == "true" then map[x][y]["gels"]["left"] = t end if s[4] == "true" then map[x][y]["gels"]["bottom"] = t end if s[5] == "true" then map[x][y]["gels"]["right"] = t end else map[x][y]["gels"]["right"] = r[3] end end elseif t == "firestart" then firestartx = x elseif r[2] and tablecontains(customenemies, r[2]) then if enemiesdata[r[2]].spawnonload then local type, name = t[1], t[2] if (not tilequads[r[1]]["breakable"]) and (not tilequads[r[1]]["coinblock"]) then local obj = enemy:new(x, y, r[2], r) if r["argument"] and obj then if r["argument"] == "o" then --offsetted obj.x = obj.x + .5 if obj.startx then obj.startx = obj.startx + .5 end elseif r["argument"] == "b" then --supersized supersizeentity(obj) end end table.insert(objects["enemy"], obj) table.insert(enemiesspawned, {x, y}) trackobject(x, y, obj, "enemy") end end else spawnentity(t, x, y, r, id) end end function spawnentity(t, x, y, r, id) local r = r if not r then --check if tile has settable option, if so default to this. r = {} if rightclickvalues[t] then r[3] = rightclickvalues[t][2] elseif rightclicktype[t] then r[3] = rightclicktype[t].default end end if t == "text" then table.insert(objects["text"], text:new(x, y, r, r[3])) elseif t == "tiletool" then table.insert(objects["tiletool"], tiletool:new(x, y, r, r[3])) elseif t == "enemytool" then table.insert(objects["enemytool"], enemytool:new(x, y, r, r[3])) elseif t == "regiontrigger" then table.insert(objects["regiontrigger"], regiontrigger:new(x, y, r[3], r)) elseif t == "animationtrigger" then table.insert(objects["animationtrigger"], animationtrigger:new(x, y, r, r[3])) elseif t == "animationoutput" then table.insert(objects["animationoutput"], animationoutput:new(x, y, r, r[3])) elseif t == "risingwater" then table.insert(objects["risingwater"], risingwater:new(x, y, r)) elseif t == "emancehor" then table.insert(emancipationgrills, emancipationgrill:new(x, y, "hor", r)) elseif t == "emancever" then table.insert(emancipationgrills, emancipationgrill:new(x, y, "ver", r)) elseif t == "laserfield" then table.insert(laserfields, laserfield:new(x, y, "ver", r)) elseif t == "doorver" then table.insert(objects["door"], door:new(x, y, r, "ver")) elseif t == "doorhor" then table.insert(objects["door"], door:new(x, y, r, "hor")) elseif t == "button" then table.insert(objects["button"], button:new(x, y, 1, r)) elseif t == "buttonbox" then table.insert(objects["button"], button:new(x, y, 2, r)) elseif t == "buttonedgeless" then table.insert(objects["button"], button:new(x, y, 3, r)) elseif t == "pushbuttonleft" then table.insert(objects["pushbutton"], pushbutton:new(x, y, "left", r)) elseif t == "pushbuttonright" then table.insert(objects["pushbutton"], pushbutton:new(x, y, "right", r)) elseif t == "wallindicator" then table.insert(objects["wallindicator"], wallindicator:new(x, y, r)) elseif t == "groundlightver" then table.insert(objects["groundlight"], groundlight:new(x, y, 1, r)) elseif t == "groundlighthor" then table.insert(objects["groundlight"], groundlight:new(x, y, 2, r)) elseif t == "groundlightupright" then table.insert(objects["groundlight"], groundlight:new(x, y, 3, r)) elseif t == "groundlightrightdown" then table.insert(objects["groundlight"], groundlight:new(x, y, 4, r)) elseif t == "groundlightdownleft" then table.insert(objects["groundlight"], groundlight:new(x, y, 5, r)) elseif t == "groundlightleftup" then table.insert(objects["groundlight"], groundlight:new(x, y, 6, r)) elseif t == "faithplateup" then table.insert(objects["faithplate"], faithplate:new(x, y, "up", r[3], r)) elseif t == "faithplateright" then table.insert(objects["faithplate"], faithplate:new(x, y, "right", r[3], r)) elseif t == "faithplateleft" then table.insert(objects["faithplate"], faithplate:new(x, y, "left", r[3], r)) elseif t == "laserright" then table.insert(objects["laser"], laser:new(x, y, "right", r)) elseif t == "laserdown" then table.insert(objects["laser"], laser:new(x, y, "down", r)) elseif t == "laserleft" then table.insert(objects["laser"], laser:new(x, y, "left", r)) elseif t == "laserup" then table.insert(objects["laser"], laser:new(x, y, "up", r)) elseif t == "lightbridgeright" then table.insert(objects["lightbridge"], lightbridge:new(x, y, "right", r)) elseif t == "lightbridgeleft" then table.insert(objects["lightbridge"], lightbridge:new(x, y, "left", r)) elseif t == "lightbridgedown" then table.insert(objects["lightbridge"], lightbridge:new(x, y, "down", r)) elseif t == "lightbridgeup" then table.insert(objects["lightbridge"], lightbridge:new(x, y, "up", r)) elseif t == "funnelright" then table.insert(objects["funnel"], funnel:new(x, y, "right", r)) elseif t == "funneldown" then table.insert(objects["funnel"], funnel:new(x, y, "down", r)) elseif t == "funnelleft" then table.insert(objects["funnel"], funnel:new(x, y, "left", r)) elseif t == "funnelup" then table.insert(objects["funnel"], funnel:new(x, y, "up", r)) elseif t == "laserdetectorright" then table.insert(objects["laserdetector"], laserdetector:new(x, y, "right", r)) elseif t == "laserdetectordown" then table.insert(objects["laserdetector"], laserdetector:new(x, y, "down", r)) elseif t == "laserdetectorleft" then table.insert(objects["laserdetector"], laserdetector:new(x, y, "left", r)) elseif t == "laserdetectorup" then table.insert(objects["laserdetector"], laserdetector:new(x, y, "up", r)) elseif t == "boxtube" then table.insert(objects["cubedispenser"], cubedispenser:new(x, y, r)) elseif t == "bluegeldown" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 1, "down", r)) elseif t == "bluegelright" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 1, "right", r)) elseif t == "bluegelleft" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 1, "left", r)) elseif t == "orangegeldown" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 2, "down", r)) elseif t == "orangegelright" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 2, "right", r)) elseif t == "orangegelleft" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 2, "left", r)) elseif t == "whitegeldown" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 3, "down", r)) elseif t == "whitegelright" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 3, "right", r)) elseif t == "whitegelleft" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 3, "left", r)) elseif t == "purplegeldown" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 4, "down", r)) elseif t == "purplegelright" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 4, "right", r)) elseif t == "purplegelleft" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 4, "left", r)) elseif t == "watergeldown" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 5, "down", r)) elseif t == "watergelright" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 5, "right", r)) elseif t == "watergelleft" then table.insert(objects["geldispenser"], geldispenser:new(x, y, 5, "left", r)) elseif t == "timer" then table.insert(objects["walltimer"], walltimer:new(x, y, r[3], r)) elseif t == "notgate" then table.insert(objects["notgate"], notgate:new(x, y, r)) elseif t == "orgate" then table.insert(objects["orgate"], orgate:new(x, y, r)) elseif t == "andgate" then table.insert(objects["andgate"], andgate:new(x, y, r)) elseif t == "rsflipflop" then table.insert(objects["rsflipflop"], rsflipflop:new(x, y, r)) elseif t == "animatedtiletrigger" then table.insert(objects["animatedtiletrigger"], animatedtiletrigger:new(x, y, r)) elseif t == "platformup" and r[4] then --linked platforms spawn automatically table.insert(objects["platform"], platform:new(x, y, "up", r[3], r)) --Platform right table.insert(enemiesspawned, {x, y}) net_spawnenemy(x, y) elseif t == "platformright" and r[4] then table.insert(objects["platform"], platform:new(x, y, "right", r[3], r)) --Platform up table.insert(enemiesspawned, {x, y}) net_spawnenemy(x, y) elseif t == "platform" and r[4] then table.insert(objects["platform"], platform:new(x, y, "default", r[3], r)) --Platform up table.insert(enemiesspawned, {x, y}) net_spawnenemy(x, y) elseif t == "platformspawnerup" then table.insert(platformspawners, platformspawner:new(x, y, "up", r[3])) elseif t == "platformspawnerdown" then table.insert(platformspawners, platformspawner:new(x, y, "down", r[3])) elseif t == "redseesaw" then table.insert(objects["redseesaw"], redseesaw:new(x, y, r[3])) elseif t == "box" then table.insert(objects["box"], box:new(x, y)) elseif t == "box2" then table.insert(objects["box"], box:new(x, y, "box2")) elseif t == "edgelessbox" then table.insert(objects["box"], box:new(x, y, "edgeless")) elseif t == "energylauncherright" then table.insert(objects["energylauncher"], energylauncher:new(x, y, "right", r)) elseif t == "energylauncherleft" then table.insert(objects["energylauncher"], energylauncher:new(x, y, "left", r)) elseif t == "energylauncherup" then table.insert(objects["energylauncher"], energylauncher:new(x, y, "up", r)) elseif t == "energylauncherdown" then table.insert(objects["energylauncher"], energylauncher:new(x, y, "down", r)) elseif t == "energycatcherright" then table.insert(objects["energycatcher"], energycatcher:new(x, y, "right", r[3])) elseif t == "energycatcherleft" then table.insert(objects["energycatcher"], energycatcher:new(x, y, "left", r[3])) elseif t == "energycatcherup" then table.insert(objects["energycatcher"], energycatcher:new(x, y, "up", r[3])) elseif t == "energycatcherdown" then table.insert(objects["energycatcher"], energycatcher:new(x, y, "down", r[3])) elseif t == "turretleft" then --change to enemy? (be wary of region triggers) table.insert(objects["turret"], turret:new(x, y, "left", "turret", r[3])) elseif t == "turretright" then table.insert(objects["turret"], turret:new(x, y, "right", "turret", r[3])) elseif t == "turret2left" then table.insert(objects["turret"], turret:new(x, y, "left", "turret2", r[3])) elseif t == "turret2right" then table.insert(objects["turret"], turret:new(x, y, "right", "turret2", r[3])) elseif t == "squarewave" then table.insert(objects["squarewave"], squarewave:new(x, y, r, r[3])) elseif t == "delayer" then table.insert(objects["delayer"], delayer:new(x, y, r, r[3])) elseif t == "rocketturret" then table.insert(objects["rocketturret"], rocketturret:new(x, y, r)) elseif t == "glados" then --change to enemy? (be wary of region triggers) table.insert(objects["glados"], glados:new(x, y, r[3])) elseif t == "pedestal" then table.insert(objects["pedestal"], pedestal:new(x, y, r[3])) elseif t == "portal1" then table.insert(objects["portalent"], portalent:new(x, y, 1, r)) elseif t == "portal2" then table.insert(objects["portalent"], portalent:new(x, y, 2, r)) elseif t == "randomizer" then table.insert(objects["randomizer"], randomizer:new(x, y, r[3], r)) elseif t == "musicchanger" then table.insert(objects["musicchanger"], musicchanger:new(x, y, r, r[3])) elseif t == "longfire" then --change to enemy? (be wary of region triggers) table.insert(objects["longfire"], longfire:new(x, y, r[3])) elseif t == "longfireoff" then table.insert(objects["longfire"], longfire:new(x, y, r[3], true)) elseif t == "kingbill" then table.insert(kingbilllaunchers, kingbilllauncher:new(x, y, r[3], r)) elseif t == "spring" then --change to enemy? (be wary of region triggers) table.insert(objects["spring"], spring:new(x, y)) elseif t == "springgreen" then table.insert(objects["spring"], spring:new(x, y, "green")) elseif t == "seesaw" then table.insert(seesaws, seesaw:new(x, y, r[3])) elseif t == "blocktogglebutton" then --change to enemy? (be wary of region triggers) table.insert(objects["blocktogglebutton"], blocktogglebutton:new(x-0.5, y-1/16, r[3])) elseif t == "bigblocktogglebutton" then table.insert(objects["blocktogglebutton"], blocktogglebutton:new(x-0.5, y-1/16, r[3], "big")) elseif t == "flipblock" then objects["flipblock"][tilemap(x, y)] = flipblock:new(x, y) elseif t == "actionblock" then objects["flipblock"][tilemap(x, y)] = flipblock:new(x, y, "actionblock") elseif t == "switchblock" then objects["flipblock"][tilemap(x, y)] = flipblock:new(x, y, "switchblock", r[3]) elseif t == "propellerbox" then if not tilequads[map[x][y][1]].collision then objects["flipblock"][tilemap(x, y)] = flipblock:new(x, y, "propellerbox") end elseif t == "cannonbox" then if not tilequads[map[x][y][1]].collision then objects["flipblock"][tilemap(x, y)] = flipblock:new(x, y, "cannonbox") end elseif t == "buttonblockon" then objects["buttonblock"][tilemap(x, y)] = buttonblock:new(x, y, r[3], true) elseif t == "buttonblockoff" then objects["buttonblock"][tilemap(x, y)] = buttonblock:new(x, y, r[3], false) elseif t == "pbuttonblockon" then objects["buttonblock"][tilemap(x, y)] = buttonblock:new(x, y, "p", true) elseif t == "pbuttonblockoff" then objects["buttonblock"][tilemap(x, y)] = buttonblock:new(x, y, "p", false) elseif t == "door" then objects["doorsprite"][tilemap(x, y)] = doorsprite:new(x, y, r, "door") elseif t == "pdoor" then objects["doorsprite"][tilemap(x, y)] = doorsprite:new(x, y, r, "pdoor") elseif t == "keydoor" then objects["doorsprite"][tilemap(x, y)] = doorsprite:new(x, y, r, "keydoor") elseif t == "skewer" then table.insert(objects["skewer"], skewer:new(x, y, r[3], r)) elseif t == "belt" then table.insert(objects["belt"], belt:new(x, y, r)) elseif t == "beltswitch" then table.insert(objects["belt"], belt:new(x, y, r, "switch")) elseif t == "collectable" then local coinblock = (tilequads[map[x][y][1]].collision and (tilequads[map[x][y][1]].breakable or tilequads[map[x][y][1]].coinblock)) if not checkcollectable(x, y, tonumber(r[3])) then objects["collectable"][tilemap(x, y)] = collectable:new(x, y, r, false, coinblock) else objects["collectable"][tilemap(x, y)] = collectable:new(x, y, r, true, coinblock) end elseif t == "collectablelock" then table.insert(objects["collectablelock"], collectablelock:new(x, y, r[3])) elseif t == "snakeblock" then table.insert(snakeblocks, snakeblocksline:new(x, y, r)) elseif t == "camerastop" then table.insert(objects["camerastop"], camerastop:new(x, y, r)) elseif t == "clearpipe" then table.insert(clearpipes, clearpipe:new(x, y, r, "clearpipe")) elseif t == "pneumatictube" then table.insert(clearpipes, clearpipe:new(x, y, r, "pneumatictube")) elseif t == "plantcreeper" then table.insert(objects["plantcreeper"], plantcreeper:new(x, y, r)) elseif t == "track" then table.insert(tracks, track:new(x, y, r)) elseif t == "grinder" then table.insert(objects["grinder"] , grinder:new(x, y, r[3])) end end function spawnenemyentity(x, y) if not inmap(x, y) then return false end if editormode then return false end --don't do anything if it's already spawned for i = 1, #enemiesspawned do if x == enemiesspawned[i][1] and y == enemiesspawned[i][2] then return false end end local r = map[x][y] --tile if #r > 1 then --get the name of the entity local t if tablecontains(customenemies, r[2]) then --custom enemy t = {"customenemy", r[2]} elseif entitylist[r[2]] then t = entitylist[r[2]].t else --entity does not exist return false end --was it an enemy? local obj, wasenemy, objtable = spawnenemy(t, x, y, r) if wasenemy then --argument if r["argument"] and obj then if r["argument"] == "o" then --offsetted obj.x = obj.x + .5 if obj.startx then obj.startx = obj.startx + .5 end elseif r["argument"] == "b" then --supersized supersizeentity(obj) end end --track local tracked = trackobject(x, y, obj, objtable) --don't attempt to spawn again table.insert(enemiesspawned, {x, y}) if wasenemy ~= "ignore" and (not tracked) then net_spawnenemy(x, y) --spawn enemies in 5x1 line so they spawn as a unit and not alone. spawnenemyentity(x-2, y) spawnenemyentity(x-1, y) spawnenemyentity(x+1, y) spawnenemyentity(x+2, y) end end end end function spawnenemy(t, x, y, r, spawner) local r = r --tile if not r then --check if tile has settable option, if so default to this. r = {1} if rightclickvalues[t] then r[3] = rightclickvalues[t][2] elseif rightclicktype[t] then r[3] = rightclicktype[t].default end end if (anyiteminblock and tilequads[r[1]]["collision"]) or (r[2] and entitylist[r[2]] and entitylist[r[2]].block and tilequads[r[1]]["collision"] and (tilequads[r[1]]["breakable"] or (not tilequads[r[1]]["breakable"]) and tilequads[r[1]]["coinblock"]) and not spawner) then return false, "ignore" end local obj, objtable --object that spawned, table object is stored in local wasenemy = true if type(t) == "table" then --{"customenemy", "name"} local type, name = t[1], t[2] if (not tilequads[r[1]]["breakable"]) and (not tilequads[r[1]]["coinblock"]) then objtable, obj = "enemy", enemy:new(x, y, name, r) else wasenemy = "ignore" end else if t == "goomba" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16) elseif t == "goombahalf" then objtable, obj = "goomba", goomba:new(x, y-1/16) elseif t == "koopa" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16) elseif t == "koopahalf" then objtable, obj = "koopa", koopa:new(x, y-1/16) elseif t == "koopared" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "red") elseif t == "kooparedhalf" then objtable, obj = "koopa", koopa:new(x, y-1/16, "red") elseif t == "beetle" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "beetle") elseif t == "beetlehalf" then objtable, obj = "koopa", koopa:new(x, y-1/16, "beetle") elseif t == "downbeetle" then objtable, obj = "koopa", koopa:new(x-0.5, y-4/16, "downbeetle") elseif t == "kooparedflying" then objtable, obj = "koopa", koopa:new(x-.5, y-1/16, "redflying") elseif t == "koopaflying" then objtable, obj = "koopa", koopa:new(x-.5, y-1/16, "flying") elseif t == "bowser" then if r[3] and r[3] == "enemy" then objtable, obj = "bowser", bowser:new(x-5, y-1/16, nil, true) else obj = bowser:new(x, y-1/16) objects["bowser"]["boss"] = obj end elseif t == "cheepred" then objtable, obj = "cheep", cheepcheep:new(x-.5, y-1/16, 1) elseif t == "cheepwhite" then objtable, obj = "cheep", cheepcheep:new(x-.5, y-1/16, 2) elseif t == "spikey" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "spikey") elseif t == "spikeyhalf" then objtable, obj = "goomba", goomba:new(x, y-1/16, "spikey") elseif t == "downspikey" then objtable, obj = "koopa", koopa:new(x-0.5, y-4/16, "downspikey") elseif t == "spikeyfall" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "spikeyfall") elseif t == "spikeyshell" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "spikeyshell") elseif t == "lakito" then objtable, obj = "lakito", lakito:new(x, y-1/16) elseif t == "squid" then objtable, obj = "squid", squid:new(x, y-1/16) elseif t == "paragoomba" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "paragoomba") elseif t == "sidestepper" then objtable, obj = "sidestepper", sidestepper:new(x-0.5, y-1/16) elseif t == "barrel" then objtable, obj = "barrel", barrel:new(x-0.5, y-1/16) elseif t == "icicle" then objtable, obj = "icicle", icicle:new(x, y, "small", false, r[3]) elseif t == "iciclebig" then objtable, obj = "icicle", icicle:new(x, y, "big", false, r[3]) elseif t == "angrysun" then objtable, obj = "angrysun", angrysun:new(x, y-1/16) elseif t == "splunkin" then objtable, obj = "splunkin", splunkin:new(x-0.5, y-1/16) elseif t == "splunkinhalf" then objtable, obj = "splunkin", splunkin:new(x, y-1/16) elseif t == "biggoomba" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "biggoomba") elseif t == "bigspikey" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "bigspikey") elseif t == "bigkoopa" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "bigkoopa") elseif t == "shell" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "shell") elseif t == "goombrat" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "goombrat") elseif t == "goombrathalf" then objtable, obj = "goomba", goomba:new(x, y-1/16, "goombrat") elseif t == "thwomp" then objtable, obj = "thwomp", thwomp:new(x-3/16, y, "down", r[3]) elseif t == "thwomphalf" then objtable, obj = "thwomp", thwomp:new(x+5/16, y, "down", r[3]) elseif t == "thwompleft" then objtable, obj = "thwomp", thwomp:new(x+5/16, y, "left", r[3]) elseif t == "thwompright" then objtable, obj = "thwomp", thwomp:new(x+5/16-1, y, "right", r[3]) elseif t == "fishbone" then objtable, obj = "fishbone", fishbone:new(x-.5, y-1/16, 1) elseif t == "drybones" then objtable, obj = "drybones", drybones:new(x-0.5, y-1/16) elseif t == "dryboneshalf" then objtable, obj = "drybones", drybones:new(x, y-1/16) elseif t == "muncher" then local physics = false if ismaptile(x, y+1) and tilequads[map[x][y+1][1]] and not tilequads[map[x][y+1][1]].collision then physics = true end objtable, obj = "muncher", muncher:new(x-0.5, y-1/16, physics, r[3]) elseif t == "bigbeetle" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "bigbeetle") elseif t == "drygoomba" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "drygoomba") elseif t == "drygoombahalf" then objtable, obj = "goomba", goomba:new(x, y-1/16, "drygoomba") elseif t == "donut" then objtable, obj = "donut", donut:new(x, y, "donut", nil, r[3]) elseif t == "donutlast" then objtable, obj = "donut", donut:new(x, y, "donutlast", nil, r[3]) elseif t == "parabeetle" then objtable, obj = "parabeetle", parabeetle:new(x-0.5, y-1/16) elseif t == "ninji" then objtable, obj = "ninji", ninji:new(x-0.5, y-1/16) elseif t == "boo" then objtable, obj = "boo", boo:new(x-0.5, y-1/16) elseif t == "mole" then objtable, obj = "mole", mole:new(x-0.5, y-1/16, r[3]) elseif t == "moleground" then objtable, obj = "mole", mole:new(x-0.5, y-1/16, "true") elseif t == "bigmole" then objtable, obj = "bigmole", bigmole:new(x-0.5, y-1/16) elseif t == "bomb" then objtable, obj = "bomb", bomb:new(x-0.5, y-1/16) elseif t == "bombhalf" then objtable, obj = "bomb", bomb:new(x, y-1/16) elseif t == "parabeetleright" then objtable, obj = "parabeetle", parabeetle:new(x-0.5, y-1/16, "parabeetleright") elseif t == "boomboom" then objtable, obj = "boomboom", boomboom:new(x-0.5, y-1/16, r[3]) elseif t == "levelball" then if not tilequads[r[1]]["collision"] then objtable, obj = "levelball", levelball:new(x-0.5, y-1/16) end elseif t == "koopablue" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "blue") elseif t == "koopabluehalf" then objtable, obj = "koopa", koopa:new(x, y-1/16, "blue") elseif t == "koopaflying2" then objtable, obj = "koopa", koopa:new(x-.5, y-1/16, "flying2") elseif t == "pinksquid" then objtable, obj = "squid", squid:new(x, y-1/16, "pink") elseif t == "sleepfish" then objtable, obj = "cheep", cheepcheep:new(x-.5, y-1/16, 3) elseif t == "amp" then objtable, obj = "amp", amp:new(x, y, r[3]) if obj.t == "fuzzy" then objtable = "fuzzy" end elseif t == "parabeetlegreen" then objtable, obj = "parabeetle", parabeetle:new(x-0.5, y-1/16, "parabeetlegreen") elseif t == "parabeetlegreenright" then objtable, obj = "parabeetle", parabeetle:new(x-0.5, y-1/16, "parabeetlegreenright") elseif t == "shyguy" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "shyguy") elseif t == "shyguyhalf" then objtable, obj = "goomba", goomba:new(x, y-1/16, "shyguy") elseif t == "beetleshell" then objtable, obj = "koopa", koopa:new(x-0.5, y-1/16, "beetleshell") elseif t == "spiketop" then if ismaptile(x, y+1) and ismaptile(x, y-1) and tilequads[map[x][y-1][1]]:getproperty("collision",x,y-1) and not tilequads[map[x][y+1][1]]:getproperty("collision",x,y+1) then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "spiketopup") else objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "spiketop") end elseif t == "spiketophalf" then if ismaptile(x, y+1) and ismaptile(x, y-1) and tilequads[map[x][y-1][1]]:getproperty("collision",x,y-1) and not tilequads[map[x][y+1][1]]:getproperty("collision",x,y+1) then objtable, obj = "goomba", goomba:new(x, y-1/16, "spiketopup") else objtable, obj = "goomba", goomba:new(x, y-1/16, "spiketop") end elseif t == "pokey" then objtable, obj = "pokey", pokey:new(x-0.5, y-3/16, "pokey", r[3]) elseif t == "snowpokey" then objtable, obj = "pokey", pokey:new(x-0.5, y-3/16, "snowpokey", r[3]) elseif t == "fighterfly" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "fighterfly") elseif t == "chainchomp" then objtable, obj = "chainchomp", chainchomp:new(x, y) elseif t == "rockywrench" then objtable, obj = "rockywrench", rockywrench:new(x, y) elseif t == "thwimp" then objtable, obj = "thwomp", thwomp:new(x, y, "thwimp") elseif t == "drybeetle" then objtable, obj = "drybones", drybones:new(x-0.5, y-1/16, "drybeetle") elseif t == "drybeetlehalf" then objtable, obj = "drybones", drybones:new(x, y-1/16, "drybeetle") elseif t == "boocrawler" then if ismaptile(x, y+1) and ismaptile(x, y-1) and tilequads[map[x][y-1][1]]:getproperty("collision",x,y-1) and not tilequads[map[x][y+1][1]]:getproperty("collision",x,y+1) then objtable, obj = "drybones", drybones:new(x-0.5, y-1/16, "boocrawlerup") else objtable, obj = "drybones", drybones:new(x-0.5, y-1/16, "boocrawler") end elseif t == "tinygoomba" then objtable, obj = "goomba", goomba:new(x, y+15/16, "tinygoomba") elseif t == "koopaling" then objtable, obj = "koopaling", koopaling:new(x-0.5, y-1/16, r[3]) elseif t == "bowserjr" then objtable, obj = "koopaling", koopaling:new(x-0.5, y-1/16, 8, r[3]) elseif t == "bowser3" then objtable, obj = "koopaling", koopaling:new(x-0.5, y-1/16, 9, r[3]) elseif t == "squidnanny" then objtable, obj = "squid", squid:new(x, y-1/16, "nanny") elseif t == "wigglerangry" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "wigglerangry") elseif t == "wiggler" then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "wiggler") elseif t == "magikoopa" then objtable, obj = "magikoopa", magikoopa:new(x-0.5, y-1/16) elseif t == "spike" then objtable, obj = "spike", spike:new(x-0.5, y-1/16, r[3]) elseif t == "spikeball" then objtable, obj = "spikeball", spikeball:new(x-0.5, y, r[3], "left", true) elseif t == "platformup" and not r[4] then objtable, obj = "platform", platform:new(x, y, "up", r[3]) --Platform right elseif t == "platformright" and not r[4] then objtable, obj = "platform", platform:new(x, y, "right", r[3]) --Platform up elseif t == "platform" and not r[4] then objtable, obj = "platform", platform:new(x, y, "default", r[3]) --Platform elseif t == "platformfall" then objtable, obj = "platform", platform:new(x, y, "fall", r[3]) --Platform fall elseif t == "platformbonus" then objtable, obj = "platform", platform:new(x, y, "justright", r[3]) elseif t == "plant" then objtable, obj = "plant", plant:new(x, y, "plant", r[3]) elseif t == "castlefirecw" then objtable, obj = "castlefire", castlefire:new(x, y, r[3], "cw") elseif t == "castlefireccw" then objtable, obj = "castlefire", castlefire:new(x, y, r[3], "ccw") elseif t == "rotodisc" then objtable, obj = "castlefire", castlefire:new(x, y, r[3], nil, "rotodisc") elseif t == "boocircle" then objtable, obj = "castlefire", castlefire:new(x, y, r[3], nil, "boocircle") elseif t == "hammerbro" then objtable, obj = "hammerbro", hammerbro:new(x, y) elseif t == "boomerangbro" then objtable, obj = "hammerbro", hammerbro:new(x, y, "boomerang") elseif t == "firebro" then objtable, obj = "hammerbro", hammerbro:new(x, y, "fire") elseif t == "bighammerbro" then objtable, obj = "hammerbro", hammerbro:new(x, y, "big") elseif t == "icebro" then objtable, obj = "hammerbro", hammerbro:new(x, y, "ice") elseif t == "downplant" then objtable, obj = "plant", plant:new(x, y, "plant", r[3] or "down") elseif t == "redplant" then objtable, obj = "plant", plant:new(x, y, "redplant", r[3]) elseif t == "reddownplant" then objtable, obj = "plant", plant:new(x, y, "redplant", r[3] or "down") elseif t == "dryplant" then objtable, obj = "plant", plant:new(x, y, "dryplant", r[3]) elseif t == "drydownplant" then objtable, obj = "plant", plant:new(x, y, "dryplant", r[3] or "down") elseif t == "fireplant" then objtable, obj = "plant", plant:new(x, y, "fireplant", r[3]) elseif t == "downfireplant" then objtable, obj = "plant", plant:new(x, y, "fireplant", r[3] or "down") elseif t == "torpedoted" then objtable, obj = "torpedolauncher", torpedolauncher:new(x, y) elseif t == "frozencoin" then objects["frozencoin"][tilemap(x, y)] = frozencoin:new(x, y) elseif t == "powblock" then objtable, obj = "powblock", powblock:new(x, y) elseif t == "verspring" then objtable, obj = "smallspring", smallspring:new(x, y, "ver") elseif t == "horspring" then objtable, obj = "smallspring", smallspring:new(x, y, "hor") elseif t == "bulletbill" then table.insert(rocketlaunchers, rocketlauncher:new(x, y)) elseif t == "bigbill" then table.insert(bigbilllaunchers, bigbilllauncher:new(x, y)) elseif t == "cannonball" then table.insert(cannonballlaunchers, cannonballlauncher:new(x, y, r[3])) elseif t == "homingbullet" then table.insert(rocketlaunchers, rocketlauncher:new(x, y, "homing")) elseif t == "cannonballcannon" then objtable, obj = "cannonballcannon", cannonballcannon:new(x, y, r[3]) elseif t == "upfire" then objtable, obj = "upfire", upfire:new(x, y, r[3]) elseif t == "coin" then if not (ismaptile(x, y) and tilequads[map[x][y][1]] and tilequads[map[x][y][1]].collision and tilequads[map[x][y][1]].breakable) then objects["coin"][tilemap(x, y)] = coin:new(x, y) end elseif t == "cheepcheep" then if math.random(2) == 1 then --objtable, obj = "cheep", enemy:new(x, y, "cheepcheepwhite", r) objtable, obj = "cheep", cheepcheep:new(x-.5, y-1/16, 2) else --objtable, obj = "cheep", enemy:new(x, y, "cheepcheepred", r) objtable, obj = "cheep", cheepcheep:new(x-.5, y-1/16, 1) end elseif t == "goombashoe" then if (not tilequads[r[1]]["collision"]) or spawner then if r[3] == 2 then objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "goombaheel") else objtable, obj = "goomba", goomba:new(x-0.5, y-1/16, "goombashoe") end end elseif t == "bigcloud" then if not tilequads[r[1]]["collision"] or spawner then obj = mushroom:new(x-0.5, y-1/16, "bigcloud", r[3]) obj.uptimer = mushroomtime+0.00001; obj.active = true objtable = "mushroom" end elseif t == "drybonesshell" then if not tilequads[r[1]]["collision"] or spawner then obj = mushroom:new(x-0.5, y-1/16, "drybonesshell") obj.uptimer = mushroomtime+0.00001 objtable = "mushroom" end --items without block elseif t == "threeup" and ((not tilequads[r[1]].collision) or spawner) then obj = smbsitem:new(x-0.5, y+14/16, "threeup") obj.uptimer = mushroomtime+0.00001 objtable = "threeup" elseif t == "plusclock" and ((not tilequads[r[1]].collision) or spawner) then obj = smbsitem:new(x-0.5, y+14/16, "clock", r[3] or 100) obj.uptimer = mushroomtime+0.00001 objtable = "smbsitem" elseif t == "swimwing" and ((not tilequads[r[1]].collision) or spawner) then obj = smbsitem:new(x-0.5, y+14/16, "wing") obj.uptimer = mushroomtime+0.00001 objtable = "smbsitem" elseif t == "dkhammer" and ((not tilequads[r[1]].collision) or spawner) then obj = smbsitem:new(x-0.5, y+14/16, "dkhammer") obj.uptimer = mushroomtime+0.00001 objtable = "smbsitem" elseif t == "luckystar" and ((not tilequads[r[1]].collision) or spawner) then obj = smbsitem:new(x-0.5, y+14/16, "luckystar") obj.uptimer = mushroomtime+0.00001 objtable = "smbsitem" elseif t == "key" and ((not tilequads[r[1]].collision) or spawner) then obj = smbsitem:new(x-0.5, y+14/16, "key") obj.uptimer = mushroomtime+0.00001 objtable = "smbsitem" elseif t == "pbutton" and ((not tilequads[r[1]].collision) or spawner) then obj = blocktogglebutton:new(x-0.5, y-1/16, r[3], "p") objtable = "pbutton" --these may break old mappacks, quote if needed elseif t == "mushroom" and (((r[2] == 2) and not tilequads[r[1]].collision) or spawner) then obj = mushroom:new(x-0.5, y-2/16) obj.uptimer = mushroomtime+0.00001 obj.speedx = mushroomspeed objtable = "mushroom" elseif t == "fireflower" and ((not tilequads[r[1]].collision) or spawner) then obj = flower:new(x-0.5, y+14/16) obj.uptimer = mushroomtime obj.speedx = mushroomspeed objtable = "flower" elseif t == "oneup" and ((not tilequads[r[1]].collision) or spawner) then obj = mushroom:new(x-0.5, y-2/16, "oneup") obj.uptimer = mushroomtime+0.00001 obj.speedx = mushroomspeed objtable = "oneup" elseif t == "star" and ((not tilequads[r[1]].collision) or spawner) then obj = star:new(x-0.5, y-2/16) obj.uptimer = mushroomtime+0.00001 objtable = "star" elseif t == "poisonmush" and ((not tilequads[r[1]].collision) or spawner) then obj = poisonmush:new(x-0.5, y-2/16) obj.uptimer = mushroomtime+0.00001 obj.speedx = mushroomspeed objtable = "poisonmush" elseif t == "yoshi" and ((not tilequads[r[1]].collision) or spawner) then obj = yoshiegg:new(x-0.5, y+14/16, r[3]) obj.uptimer = mushroomtime+0.00001 objtable = "yoshiegg" elseif t == "hammersuit" and ((not tilequads[r[1]].collision) or spawner) then obj = star:new(x-0.5, y-2/16, "hammersuit") obj.uptimer = mushroomtime+0.00001 objtable = "hammersuit" elseif t == "frogsuit" and ((not tilequads[r[1]].collision) or spawner) then obj = star:new(x-0.5, y-2/16, "frogsuit") obj.uptimer = mushroomtime+0.00001 objtable = "frogsuit" elseif t == "leaf" and ((not tilequads[r[1]].collision) or spawner) then obj = leaf:new(x-0.5, y) objtable = "leaf" elseif t == "minimushroom" and ((not tilequads[r[1]].collision) or spawner) then obj = mushroom:new(x-0.5, y+5/16, "mini") obj.uptimer = mushroomtime+0.00001 obj.speedx = mushroomspeed objtable = "mushroom" elseif t == "iceflower" and ((not tilequads[r[1]].collision) or spawner) then obj = flower:new(x-0.5, y+14/16, "ice") obj.uptimer = mushroomtime+0.00001 objtable = "flower" elseif t == "bigmushroom" and ((not tilequads[r[1]].collision) or spawner) then obj = mushroom:new(x-0.5, y-2/16, "big") obj.uptimer = mushroomtime+0.00001 obj.speedx = mushroomspeed objtable = "mushroom" elseif t == "bigclassicmushroom" and ((not tilequads[r[1]].collision) or spawner) then obj = mushroom:new(x-0.5, y-2/16, "bigclassic") obj.uptimer = mushroomtime+0.00001 obj.speedx = mushroomspeed objtable = "mushroom" elseif t == "tanookisuit" and ((not tilequads[r[1]].collision) or spawner) then obj = star:new(x-0.5, y-2/16, "tanookisuit") obj.uptimer = mushroomtime+0.00001 objtable = "flower" elseif t == "feather" and ((not tilequads[r[1]].collision) or spawner) then obj = flower:new(x-0.5, y+14/16, "feather") obj.uptimer = mushroomtime+0.00001 objtable = "flower" elseif t == "carrot" and ((not tilequads[r[1]].collision) or spawner) then obj = flower:new(x-0.5, y+14/16, "carrot") obj.uptimer = mushroomtime+0.00001 objtable = "flower" elseif t == "weirdmushroom" and ((not tilequads[r[1]].collision) or spawner) then obj = mushroom:new(x-0.5, y-2/16, "weird") obj.uptimer = mushroomtime+0.00001 obj.speedx = mushroomspeed objtable = "mushroom" elseif t == "superballflower" and ((not tilequads[r[1]].collision) or spawner) then obj = flower:new(x-0.5, y+14/16, "superball") obj.uptimer = mushroomtime+0.00001 objtable = "flower" elseif t == "blueshell" and ((not tilequads[r[1]].collision) or spawner) then obj = flower:new(x-0.5, y+14/16, "blueshell") obj.uptimer = mushroomtime+0.00001 objtable = "flower" elseif t == "boomerangflower" and ((not tilequads[r[1]].collision) or spawner) then obj = flower:new(x-0.5, y+14/16, "boomerang") obj.uptimer = mushroomtime+0.00001 objtable = "flower" else wasenemy = false end end if obj and objtable then table.insert(objects[objtable], obj) end return obj, wasenemy, objtable end function item(i, x, y, size) local t = "entity" if type(i) == "table" then t = i[1] i = i[2] end --[[if inmap(x, y) and tilequads[map[x][y][1]]--[[["noteblock"] and _G[i] then local obj = _G[i]:new(x-0.5, y-1) obj.x = x-0.5-(obj.width/2) obj.y = y obj:update(0) obj.speedy = mushroomjumpforce obj.uptimer = mushroomtime table.insert(objects[i], obj) return end]] if t == "customenemy" then if enemiesdata[i] then table.insert(itemanimations, itemanimation:new(x, y, i, size)) else return false end elseif i == "powerup" and enemiesdata["mushroom"] and enemiesdata["flower"] then if size and size <= 1 then table.insert(itemanimations, itemanimation:new(x, y, "mushroom")) else table.insert(itemanimations, itemanimation:new(x, y, "flower")) end elseif i == "mushroom" or i == "powerup" or i == "fireflower" then if size and size > 1 then table.insert(objects["flower"], flower:new(x-0.5, y-2/16)) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "oneup" then table.insert(objects["oneup"], mushroom:new(x-0.5, y-2/16, "oneup")) elseif i == "star" then table.insert(objects["star"], star:new(x-0.5, y-2/16)) elseif i == "vine" then table.insert(objects["vine"], vine:new(x, y)) elseif i == "poisonmush" then table.insert(objects["poisonmush"], poisonmush:new(x-0.5, y-2/16)) elseif i == "threeup" then table.insert(objects["threeup"], smbsitem:new(x-0.5, y-2/16, "threeup")) elseif i == "plusclock" then table.insert(objects["smbsitem"], smbsitem:new(x-0.5, y-2/16, "clock", map[x][y][3] or 100)) elseif i == "swimwing" then table.insert(objects["smbsitem"], smbsitem:new(x-0.5, y-2/16, "wing")) elseif i == "dkhammer" then table.insert(objects["smbsitem"], smbsitem:new(x-0.5, y-2/16, "dkhammer")) elseif i == "luckystar" then table.insert(objects["smbsitem"], smbsitem:new(x-0.5, y-2/16, "luckystar")) elseif i == "key" then table.insert(objects["smbsitem"], smbsitem:new(x-0.5, y-2/16, "key")) elseif i == "hammersuit" then if size and size > 1 then table.insert(objects["hammersuit"], star:new(x-0.5, y-2/16, "hammersuit")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "frogsuit" then if size and size > 1 then table.insert(objects["frogsuit"], star:new(x-0.5, y-2/16, "frogsuit")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "leaf" then if size and size > 1 then table.insert(objects["leaf"], leaf:new(x-0.5, y-2/16)) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "minimushroom" then table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16, "mini")) elseif i == "iceflower" then if size and size > 1 then table.insert(objects["flower"], flower:new(x-0.5, y-2/16, "ice")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "yoshi" then table.insert(objects["yoshiegg"], yoshiegg:new(x-0.5, y-2/16, map[x][y][3])) elseif i == "pbutton" then table.insert(objects["pbutton"], blocktogglebutton:new(x-0.5, y-1/16, map[x][y][3], "p")) elseif i == "bigmushroom" then table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16, "big")) elseif i == "bigclassicmushroom" then table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16, "bigclassic")) elseif i == "goombashoe" then local obj = mushroom:new(x-0.5, y-2/16, "goombashoe") if ismaptile(x,y) and map[x][y][3] and map[x][y][3] == 2 then obj.heel = true end table.insert(objects["mushroom"], obj) elseif i == "tanookisuit" then if size and size > 1 then table.insert(objects["flower"], star:new(x-0.5, y-2/16, "tanookisuit")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "feather" then if size and size > 1 then table.insert(objects["flower"], flower:new(x-0.5, y-2/16, "feather")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "carrot" then if size and size > 1 then table.insert(objects["flower"], flower:new(x-0.5, y-2/16, "carrot")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "superballflower" then if size and size > 1 then table.insert(objects["flower"], flower:new(x-0.5, y-2/16, "superball")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "blueshell" then if size and size > 1 then table.insert(objects["flower"], flower:new(x-0.5, y-2/16, "blueshell")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "boomerangflower" then if size and size > 1 then table.insert(objects["flower"], flower:new(x-0.5, y-2/16, "boomerang")) else table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16)) end elseif i == "weirdmushroom" then table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16, "weird")) elseif i == "bigcloud" then table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16, "bigcloud", map[x][y][3])) elseif i == "drybonesshell" then table.insert(objects["mushroom"], mushroom:new(x-0.5, y-2/16, "drybonesshell")) elseif i == "propellerbox" then objects["flipblock"][tilemap(x, y)] = flipblock:new(x, y, "propellerbox") objects["flipblock"][tilemap(x, y)]:hit() map[x][y][1] = 1 objects["tile"][tilemap(x, y)] = nil map[x][y]["gels"] = {} elseif i == "cannonbox" then objects["flipblock"][tilemap(x, y)] = flipblock:new(x, y, "cannonbox") objects["flipblock"][tilemap(x, y)]:hit() map[x][y][1] = 1 objects["tile"][tilemap(x, y)] = nil map[x][y]["gels"] = {} elseif i == "levelball" then playsound(boomsound) makepoof(x-.5, y-1.5, "boom") local obj = levelball:new(x-0.5, y-17/16) obj.speedy = -10 table.insert(objects["levelball"], obj) elseif anyiteminblock and _G[i] then local obj = _G[i]:new(x-0.5, y-1) obj.x = x-0.5-(obj.width/2) obj.y = y-1-obj.height obj.speedy = -mushroomjumpforce table.insert(objects[i], obj) else local r = map[x][y] local id = r[2] if id and entitylist[id] and entitylist[id].block then local obj, wasenemy, objtable = spawnenemy(i, x, y, false, "spawner") table.insert(spawnanimations, spawnanimation:new(x, y-1, "block", obj)) table.insert(enemiesspawned, {x, y}) end --(tilequads[r[1]]["collision"] and tilequads[r[1]]["breakable"] and not spawner) end end function addpoints(i, x, y) if not i then --or not x or not y return false end if i > 0 then marioscore = marioscore + i if x ~= nil and y ~= nil then table.insert(scrollingscores, scrollingscore:new(i, x, y)) end elseif i == 0 then --no points! else table.insert(scrollingscores, scrollingscore:new(-i, x, y)) end end function makepoof(x, y, t, color) local t = t or "poof" if t == "poof" then table.insert(poofs, poof:new(x, y, {1,2,3,4}, 0.4)) elseif t == "longpoof" then --power suit table.insert(poofs, poof:new(x, y, {3,4,1,2,3,4}, 1)) elseif t == "powpoof" then --cannons table.insert(poofs, poof:new(x, y, {1,-1,-2,2,3,-3,-4,4}, 0.5, 0, 0, true)) elseif t == "smallpoof" then table.insert(poofs, poof:new(x, y, {2,3,4}, 0.3)) elseif t == "makerpoof" then --mario maker poof table.insert(poofs, poof:new(x, y, {19,20,21,22}, 0.4)) elseif t == "makerpoofbig" then --mario maker poof big table.insert(poofs, poof:new(x, y, {19,20,21,22}, 0.4, false, false, false, 2)) elseif t == "makerpoofbigger" then --mario maker poof bigger table.insert(poofs, poof:new(x, y, {19,20,21,22}, 0.4, false, false, false, 4)) elseif t == "pow" then --hit table.insert(poofs, poof:new(x, y, {5,6,5,6}, 0.15)) elseif t == "boom" then --sparks local speed = 5 local lifetime = 0.6 table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, -speed, 0)) table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, -speed*.71, -speed*.71)) table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, 0, -speed)) table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, speed*.71, -speed*.71)) table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, speed, 0)) table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, speed*.71, speed*.71)) table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, 0, speed)) table.insert(poofs, poof:new(x, y, {7,8,9,10,7,8,9,10}, lifetime, -speed*.71, speed*.71)) elseif t == "splash" then --water splash table.insert(poofs, poof:new(x, y-.5, {11,12,13,14,15}, 0.4)) elseif t == "sweat" then --koopaling sweat (eugh i don't like how that looks) table.insert(poofs, poof:new(x-1, y, {16,17,18,17,18,17,18}, 0.5)) table.insert(poofs, poof:new(x+1, y, {-16,-17,-18,-17,-18,-17,-18}, 0.5)) elseif t == "smoke" then --meteor smoke table.insert(poofs, poof:new(x, y, {23,24,25,26}, 0.2)) elseif t == "turretshot" then --turret shot table.insert(poofs, poof:new(x, y, {27,28}, 0.1, nil, nil, nil, nil, color)) end end function addzeros(s, i) for j = string.len(s)+1, i do s = "0" .. s end return s end function properprint2(s, x, y) for i = 1, string.len(tostring(s)) do if font2quads[string.sub(s, i, i)] then love.graphics.draw(smallfont, font2quads[string.sub(s, i, i)], x+((i-1)*4)*scale, y, 0, scale, scale) end end end function playsound(sound) if soundenabled then if sound.stop then --string? sound:stop() if sound.rewind then sound:rewind() end sound:play() elseif _G[sound .. "sound"] then _G[sound .. "sound"]:stop() if sound.rewind then _G[sound .. "sound"]:rewind() end _G[sound .. "sound"]:play() end end end function runkey(i) local s = controls[i]["run"] return checkkey(s,i,"run") end function rightkey(i) local s = controls[i]["right"] return checkkey(s,i,"right") end function leftkey(i) local s = controls[i]["left"] return checkkey(s,i,"left") end function downkey(i) local s = controls[i]["down"] return checkkey(s,i,"down") end function upkey(i) local s = controls[i]["up"] return checkkey(s,i,"up") end function jumpkey(i) local t = {} local s = controls[i]["jump"] return checkkey(s,i,"jump") end function usekey(i) local s = controls[i]["use"] return checkkey(s,i,"use") end function reloadkey(i) local t = {} local s = controls[i]["reload"] return checkkey(s,i,"reload") end function keydown(s, i) if s == "jump" and jumpkey(i) then return true elseif s == "left" and leftkey(i) then return true elseif s == "right" and rightkey(i) then return true elseif s == "up" and upkey(i) then return true elseif s == "down" and downkey(i) then return true elseif s == "run" and runkey(i) then return true elseif s == "use" and usekey(i) then return true elseif s == "reload" and reloadkey(i) then return true end return false end function checkkey(s,i,n) if s[1] == "joy" then if android and androidButtonDown(i,n) then return true end if s[3] == "hat" then if string.match(love.joystick.getHat(s[2], s[4]), s[5]) then return true else return false end elseif s[3] == "but" then if love.joystick.isDown(s[2], s[4]) then return true else return false end elseif s[3] == "axe" then if s[5] == "pos" then if love.joystick.getAxis(s[2], s[4]) > joystickdeadzone then return true else return false end else if love.joystick.getAxis(s[2], s[4]) < -joystickdeadzone then return true else return false end end end elseif s[1] then if love.keyboard.isDown(s[1]) then return true elseif android then return androidButtonDown(i,n) else return false end end end function game_joystickpressed( joystick, button ) --pause with controller for i = 1, players do local s = controls[i]["pause"] if s and s[1] == "joy" and joystick == s[2] and s[3] == "but" and button == s[4] then game_keypressed("escape") break end end if pausemenuopen then --select pause options for i = 1, players do local s1 = controls[i]["jump"] local s2 = controls[i]["pause"] if (s2 and s2[1] == "joy") or i == 1 then if s1[1] == "joy" and joystick == tonumber(s1[2]) and s1[3] == "but" and button == tonumber(s1[4]) then game_keypressed("return") end end end return end if endpressbutton then endgame() return end for i = 1, players do if (not noupdate) and objects then --and objects["player"][i].controlsenabled then -- and --and (not objects["player"][i].vine) and (not objects["player"][i].fence) then if editormode and (editormenuopen or rightclickmenuopen) then break end local s1 = controls[i]["jump"] local s2 = controls[i]["run"] local s3 = controls[i]["reload"] local s4 = controls[i]["use"] local s5 = controls[i]["left"] local s6 = controls[i]["right"] local s7 = controls[i]["portal1"] local s8 = controls[i]["portal2"] local s9 = controls[i]["up"] local s10 = controls[i]["down"] if s1[1] == "joy" and joystick == tonumber(s1[2]) and s1[3] == "but" and button == tonumber(s1[4]) then objects["player"][i]:button("jump") objects["player"][i]:wag() objects["player"][i]:jump() animationsystem_buttontrigger(i, "jump") return elseif s2[1] == "joy" and joystick == s2[2] and s2[3] == "but" and button == s2[4] then objects["player"][i]:button("run") objects["player"][i]:fire() animationsystem_buttontrigger(i, "run") return elseif s3[1] == "joy" and joystick == s3[2] and s3[3] == "but" and button == s3[4] then objects["player"][i]:button("reload") if objects["player"][i].portalgun then local pi = false --only reset portals that can be controlled by player if objects["player"][i].portals == "1 only" then pi = 1 elseif objects["player"][i].portals == "2 only" then pi = 2 end objects["player"][i]:removeportals(pi) end animationsystem_buttontrigger(i, "reload") return elseif s4[1] == "joy" and joystick == s4[2] and s4[3] == "but" and button == s4[4] then objects["player"][i]:button("use") objects["player"][i]:use() animationsystem_buttontrigger(i, "use") return elseif s5[1] == "joy" and joystick == s5[2] and s5[3] == "but" and button == s5[4] then objects["player"][i]:button("left") objects["player"][i]:leftkey() animationsystem_buttontrigger(i, "left") return elseif s6[1] == "joy" and joystick == s9[2] and s9[3] == "but" and button == s9[4] then objects["player"][i]:button("up") objects["player"][i]:upkey() animationsystem_buttontrigger(i, "up") return elseif s6[1] == "joy" and joystick == s10[2] and s10[3] == "but" and button == s10[4] then objects["player"][i]:button("down") objects["player"][i]:downkey() animationsystem_buttontrigger(i, "down") return end local s = controls[i]["portal1"] if s and s[1] == "joy" then if s[3] == "but" then if joystick == s[2] and button == s[4] and objects["player"][i] and i ~= mouseowner then objects["player"][i]:shootportal(1) return end end end local s = controls[i]["portal2"] if s and s[1] == "joy" then if s[3] == "but" then if joystick == tonumber(s[2]) and button == tonumber(s[4]) and objects["player"][i] and i ~= mouseowner then objects["player"][i]:shootportal(2) return end end end end end end function game_joystickreleased( joystick, button ) for i = 1, players do if (not noupdate) and objects then --objects["player"][i].controlsenabled then --and (not objects["player"][i].vine) and (not objects["player"][i].fence) then if editormode and (editormenuopen or rightclickmenuopen) then break end local s1 = controls[i]["jump"] local s2 = controls[i]["run"] local s3 = controls[i]["reload"] local s4 = controls[i]["use"] local s5 = controls[i]["left"] local s6 = controls[i]["right"] local s7 = controls[i]["portal1"] local s8 = controls[i]["portal2"] local s9 = controls[i]["up"] local s10 = controls[i]["down"] if s1[1] == "joy" and joystick == tonumber(s1[2]) and s1[3] == "but" and button == tonumber(s1[4]) then objects["player"][i]:buttonrelease("jump") objects["player"][i]:stopjump() animationsystem_buttonreleasetrigger(i, "jump") return elseif s2[1] == "joy" and joystick == s2[2] and s2[3] == "but" and button == s2[4] then objects["player"][i]:buttonrelease("run") animationsystem_buttonreleasetrigger(i, "run") return elseif s3[1] == "joy" and joystick == s3[2] and s3[3] == "but" and button == s3[4] then objects["player"][i]:buttonrelease("reload") animationsystem_buttonreleasetrigger(i, "reload") return elseif s4[1] == "joy" and joystick == s4[2] and s4[3] == "but" and button == s4[4] then objects["player"][i]:buttonrelease("use") animationsystem_buttonreleasetrigger(i, "use") return elseif s5[1] == "joy" and joystick == s5[2] and s5[3] == "but" and button == s5[4] then objects["player"][i]:buttonrelease("left") animationsystem_buttonreleasetrigger(i, "left") return elseif s6[1] == "joy" and joystick == s6[2] and s6[3] == "but" and button == s6[4] then objects["player"][i]:buttonrelease("right") animationsystem_buttonreleasetrigger(i, "right") return elseif s9[1] == "joy" and joystick == s9[2] and s9[3] == "but" and button == s9[4] then objects["player"][i]:buttonrelease("up") animationsystem_buttonreleasetrigger(i, "up") return elseif s10[1] == "joy" and joystick == s10[2] and s10[3] == "but" and button == s10[4] then objects["player"][i]:buttonrelease("down") animationsystem_buttonreleasetrigger(i, "down") return end end end end function inrange(i, a, b, include) if a > b then b, a = a, b end if include then return i >= a and i <= b else return i > a and i < b end end function adduserect(x, y, width, height, callback) local t = {} t.x = x t.y = y t.width = width t.height = height t.callback = callback t.delete = false table.insert(userects, t) return t end function userect(x, y, width, height) local outtable = {} for i, v in pairs(userects) do if aabb(x, y, width, height, v.x, v.y, v.width, v.height) then table.insert(outtable, v.callback) end end return outtable end function drawrectangle(x, y, width, height) love.graphics.rectangle("fill", x*scale, y*scale, width*scale, scale) love.graphics.rectangle("fill", x*scale, y*scale, scale, height*scale) love.graphics.rectangle("fill", x*scale, (y+height-1)*scale, width*scale, scale) love.graphics.rectangle("fill", (x+width-1)*scale, y*scale, scale, height*scale) end function inmap(x, y) if not x or not y then return false end if x >= 1 and x <= mapwidth and y >= 1 and y <= mapheight then return true else return false end end function istile(x, y) return inmap(x,y) and math.floor(x) == x and math.floor(y) == y end function ismaptile(x, y) return (istile(x, y) and map[x] and map[x][y]) end function playmusic() if (editormode and (not PlayMusicInEditor)) or NoMusic then return end if musici >= 7 then if custommusic then music:play(custommusic, not nolowtime and (mariotime < 100 and mariotime > 0)) end elseif musici ~= 1 then music:playIndex(musici-1, not nolowtime and (mariotime < 100 and mariotime > 0)) end end function stopmusic() if musici >= 7 then music:stop(custommusic, (mariotime < 100 and mariotime > 0)) elseif musici ~= 1 then music:stopIndex(musici-1, (mariotime < 100 and mariotime > 0)) end pbuttonsound:stop() music:stop("starmusic") music:disableintromusic() end function updatesizes(reset) mariosizes = {} if (not objects) or reset then for i = 1, players do mariosizes[i] = 1 end else for i = 1, players do if objects["player"][i].ignoresize then mariosizes[i] = 1 objects["player"][i].ignoresize = false else mariosizes[i] = objects["player"][i].size end end end end function updateplayerproperties(reset) marioproperties = {} if (not objects) or reset then for i = 1, players do marioproperties[i] = {} end else for i = 1, players do marioproperties[i] = {} if objects and objects["player"] and objects["player"][i] then if objects["player"][i].shoe then if objects["player"][i].shoe == "yoshi" then if objects["player"][i].yoshi.color then marioproperties[i].shoe = {"yoshi", objects["player"][i].yoshi.color} else marioproperties[i].shoe = {"yoshi", 1} end else marioproperties[i].shoe = objects["player"][i].shoe end end if objects["player"][i].helmet then marioproperties[i].helmet = objects["player"][i].helmet end if objects["player"][i].key then marioproperties[i].key = objects["player"][i].key end if objects["player"][i].mariolevel then marioproperties[i].mariolevel = objects["player"][i].mariolevel end if objects["player"][i].fireenemy then marioproperties[i].fireenemy = objects["player"][i].fireenemy marioproperties[i].customcolors = objects["player"][i].basecolors end if objects["player"][i].health then marioproperties[i].health = objects["player"][i].health end end end end end function hitrightside() if haswarpzone then objects["plant"] = {} displaywarpzonetext = true end end function getclosestplayer(x) closestplayer = 1 for i = 2, players do if math.abs(objects["player"][closestplayer].x+6/16-x) < math.abs(objects["player"][i].x+6/16-x) then closestplayer = i end end return closestplayer end function endgame() if testlevel then editor_load(player_position) return end love.audio.stop() if pressbtosteve then playertype = "minecraft" playertypei = 2 else hardmode = true end gamefinished = true saveconfig() menu_load() if dcplaying then dcplaying = false gamestate = "mappackmenu" mappacktype = "daily_challenge" mappackhorscroll = 2 mappackhorscrollsmooth = 2 end if CLIENT or SERVER then net_quit() end end --Minecraft stuff function placeblock(x, y, side) if side == "up" then y = y - 1 elseif side == "down" then y = y + 1 elseif side == "left" then x = x - 1 elseif side == "right" then x = x + 1 end if not inmap(x, y) then return false end --get block local tileno if inventory[mccurrentblock].t ~= nil then tileno = inventory[mccurrentblock].t else return false end if #checkrect(x-1, y-1, 1, 1, "all") == 0 then if map[x][y] == emptytile then map[x][y] = deepcopy(emptytile) end map[x][y][1] = tileno objects["tile"][tilemap(x, y)] = tile:new(x-1, y-1, 1, 1, true) generatespritebatch() inventory[mccurrentblock].count = inventory[mccurrentblock].count - 1 if inventory[mccurrentblock].count == 0 then inventory[mccurrentblock].t = nil end return true else return false end end function collectblock(i) local success = false for j = 1, 9 do if inventory[j].t == i and inventory[j].count < 64 then inventory[j].count = inventory[j].count+1 success = true break end end if not success then for j = 1, 9 do if inventory[j].t == nil then inventory[j].count = 1 inventory[j].t = i success = true break end end end return success end function breakblock(x, y) --create a cute block if objects["tile"][tilemap(x, y)] then table.insert(miniblocks, miniblock:new(x-.5, y-.2, map[x][y][1])) end map[x][y][1] = 1 map[x][y][2] = nil map[x][y]["gels"] = {} map[x][y]["portaloverride"] = nil objects["tile"][tilemap(x, y)] = nil objects["flipblock"][tilemap(x, y)] = nil objects["buttonblock"][tilemap(x, y)] = nil generatespritebatch() end function respawnplayers() if mariolivecount == false then return end for i = 1, players do if mariolives[i] == 1 and objects["player"].dead then objects["player"][i]:respawn() end end end function cameraxpan(target, t) xpan = true xpanstart = xscroll xpandiff = target-xpanstart xpantime = t xpantimer = 0 end function cameraypan(target, t) ypan = true ypanstart = yscroll ypandiff = target-ypanstart ypantime = t ypantimer = 0 end function camerasnap(targetx, targety, anim) if (not autoscroll) and (not anim) then return end local x, y = xscroll, yscroll if targetx and targety then --just snap to target x, y = targetx, targety else --find target local fastestplayer = 1 while fastestplayer <= players and objects["player"][fastestplayer].dead do fastestplayer = fastestplayer + 1 end if not objects["player"][fastestplayer] then return end if not CLIENT and not SERVER then if mapwidth <= width then for i = 1, players do if not objects["player"][i].dead and math.abs(starty-objects["player"][i].y) > math.abs(starty-objects["player"][fastestplayer].y) then fastestplayer = i end end else for i = 1, players do if not objects["player"][i].dead and objects["player"][i].x > objects["player"][fastestplayer].x then fastestplayer = i end end end end local fastestplayer = objects["player"][fastestplayer] if fastestplayer.x > xscroll+scrollingstart then x = fastestplayer.x-scrollingstart-1 elseif fastestplayer.x < xscroll+scrollingleftstart then x = fastestplayer.x-scrollingleftstart end if fastestplayer.y > yscroll+9 then y = fastestplayer.y-9 elseif fastestplayer.y < yscroll+4 then y = fastestplayer.y-4 end end if autoscrollx or anim then xscroll = math.max(0, math.min(x, mapwidth-width)) splitxscroll[1] = xscroll end if autoscrolly or anim then yscroll = math.max(0, math.min(y, mapheight-height-1)) splityscroll[1] = yscroll end if not (editormode and not testlevel) then for x = math.max(1, math.floor(xscroll)), math.min(mapwidth, math.ceil(xscroll+width*screenzoom2)) do for y = math.max(1, math.floor(yscroll)), math.min(mapheight, math.ceil(yscroll+height*screenzoom2+1)) do spawnenemyentity(x,y) end end end end function updateranges() for i, v in pairs(objects["laser"]) do v:updaterange() end for i, v in pairs(objects["lightbridge"]) do v:updaterange() end for i, v in pairs(objects["funnel"]) do v:updaterange() end end function createdialogbox(text, speaker, color) dialogboxes = {} table.insert(dialogboxes, dialogbox:new(text, speaker, color)) end function checkportalremove(x, y) for i, v in pairs(portals) do --Get the extra block of each portal local portal1xplus, portal1yplus, portal2xplus, portal2yplus = 0, 0, 0, 0 if v.facing1 == "up" then portal1xplus = 1 elseif v.facing1 == "right" then portal1yplus = 1 elseif v.facing1 == "down" then portal1xplus = -1 elseif v.facing1 == "left" then portal1yplus = -1 end if v.facing2 == "up" then portal2xplus = 1 elseif v.facing2 == "right" then portal2yplus = 1 elseif v.facing2 == "down" then portal2xplus = -1 elseif v.facing2 == "left" then portal2yplus = -1 end if v.x1 ~= false then if (x == v.x1 or x == v.x1+portal1xplus) and (sy == v.y1 or y == v.y1+portal1yplus) then--and (facing == nil or v.facing1 == facing) then v:removeportal(1) end end if v.x2 ~= false then if (x == v.x2 or x == v.x2+portal2xplus) and (y == v.y2 or y == v.y2+portal2yplus) then--and (facing == nil or v.facing2 == facing) then v:removeportal(2) end end end end function setphysics(i) local i = i or 1 mariomakerphysics = false smb2jphysics = false portalphysics = false if i == 1 then--mari0 maxyspeed = mari0maxyspeed bounceheight = smbbounceheight koopajumpforce = smbkoopajumpforce koopaflyinggravity = smbkoopaflyinggravity springgreenhighforce = mari0springgreenhighforce elseif i == 2 then--smb maxyspeed = smbmaxyspeed bounceheight = smbbounceheight koopajumpforce = smbkoopajumpforce koopaflyinggravity = smbkoopaflyinggravity springgreenhighforce = smbspringgreenhighforce elseif i == 3 then--smb2j-mari0 maxyspeed = mari0maxyspeed bounceheight = smb2jbounceheight --4 1/2 blocks high koopajumpforce = smb2jkoopajumpforce --2 1/2 blocks high koopaflyinggravity = smb2jkoopaflyinggravity springgreenhighforce = mari0springgreenhighforce smb2jphysics = true elseif i == 4 then--smb2j maxyspeed = smbmaxyspeed bounceheight = smb2jbounceheight koopajumpforce = smb2jkoopajumpforce koopaflyinggravity = smb2jkoopaflyinggravity springgreenhighforce = smbspringgreenhighforce smb2jphysics = true elseif i == 5 then --mari0 maker maxyspeed = mari0maxyspeed bounceheight = smbbounceheight koopajumpforce = smbkoopajumpforce koopaflyinggravity = smbkoopaflyinggravity springgreenhighforce = mari0springgreenhighforce mariomakerphysics = true elseif i == 6 then --mario maker maxyspeed = smbmaxyspeed bounceheight = smbbounceheight koopajumpforce = smbkoopajumpforce koopaflyinggravity = smbkoopaflyinggravity springgreenhighforce = smbspringgreenhighforce mariomakerphysics = true elseif i == 7 then --portal maxyspeed = mari0maxyspeed bounceheight = smbbounceheight koopajumpforce = smbkoopajumpforce koopaflyinggravity = smbkoopaflyinggravity springgreenhighforce = mari0springgreenhighforce mariomakerphysics = true portalphysics = true end end function setcamerasetting(i) if i == 2 then --centered scrollingstart = (width/2)+.5 scrollingcomplete = (width/2)-1.5 scrollingleftstart = (width/2)+1 scrollingleftcomplete = (width/2)-2 elseif i == 3 then end end function createedgewrap() --create blocks on borders for edge wrapping if edgewrapping then objects["edgewrap"] = {} for y = 1, mapheight do if tilequads[map[1][y][1]].collision or tilequads[map[mapwidth][y][1]].collision then table.insert(objects["edgewrap"], tile:new(mapwidth, y-1)) table.insert(objects["edgewrap"], tile:new(-1, y-1)) end end end end function onscreen(x, y, w, h) if w and h then return (x+w >= xscroll and y+h-.5 >= yscroll and x <= xscroll+width*screenzoom2 and y-.5 <= yscroll+height*(1/screenzoom)) else return (x >= xscroll and y-.5 >= yscroll and x <= xscroll+width*screenzoom2 and y-.5 <= yscroll+height*(1/screenzoom)) end end function ondrawscreen(x, y, w, h) if w and h then return (x+w >= 0 and y+h-.5 >= 0 and x < width*16*scale and y < height*16*scale) else return (x >= 0 and y-.5 >= 0 and x < xscroll*16*scale and y < height*16*scale) end end function checkcollectable(x, y, t) local w, l, s = tostring(marioworld), tostring(mariolevel), tostring(actualsublevel) if collectables[w .. "-" .. l .. "-" .. s] and collectables[w .. "-" .. l .. "-" .. s][x .. "-" .. y] and collectables[w .. "-" .. l .. "-" .. s][x .. "-" .. y] == t then return true end return false end function getcollectable(x, y) local c = objects["collectable"][tilemap(x, y)] if not c then print("collectable not found", x, y) return false end local t = tonumber(c.t) local w, l, s = tostring(marioworld), tostring(mariolevel), tostring(actualsublevel) local level, coords = w .. "-" .. l .. "-" .. s, x .. "-" .. y if not collectables[level] then collectables[level] = {} end collectables[level][coords] = t --add to map memory table.insert(collectableslist[t], {level,coords}) --mark location collectablescount[t] = collectablescount[t]+1 --update count addpoints(200) playsound(_G["collectable" .. t .. "sound"]) objects["collectable"][tilemap(x, y)]:get() objects["collectable"][tilemap(x, y)] = nil return t end function convertr(r, types, dontgivedefaultvalues) --convert right cick values if not r then return {} end if type(r) == "number" then r = tostring(r) end local t = r:split("|") for i = 1, #types do local id = types[i] if not t[i] then if dontgivedefaultvalues then t[i] = nil else if id == "num" then t[i] = 0 elseif id == "bool" then t[i] = false elseif id == "string" then t[i] = "" else t[i] = id end end else if id == "num" then local s = t[i]:gsub("n", "-") t[i] = tonumber(s) or 0 elseif id == "bool" then t[i] = (t[i] == "true") end end end return t end function lightsoutstencil() for i2, v2 in pairs(objects) do if i2 ~= "tile" and i2 ~= "pixeltile" and i2 ~="buttonblock" and i2 ~= "clearpipesegment" then for i, v in pairs(objects[i2]) do if (v.active or (i2 == "player" or i2 == "enemy")) and v.light and onscreen(v.x+v.width/2-v.light, v.y+v.height/2-v.light, v.light*2, v.light*2) then local r = v.light if i2 ~= "player" then r = r+math.sin(lightsoutwave*(math.pi*2/0.2))*0.05 end love.graphics.circle("fill", math.floor((v.x+(v.width/2)-xscroll)*16)*scale, math.floor((v.y+(v.height/2)-yscroll)*16-8)*scale, math.floor(r*16)*scale) end end end end if flagx and flagy and onscreen(flagx+.5-2, flagy-9-2, 4, 12) then local r = 2 love.graphics.rectangle("fill", math.floor((flagx+.5-r-xscroll)*16)*scale, math.floor((flagy-11+r-yscroll)*16-8)*scale, math.floor((r*2)*16)*scale, math.floor((12-r*2)*16)*scale) love.graphics.circle("fill", math.floor((flagx+.5-xscroll)*16)*scale, math.floor((flagy-9-yscroll)*16-8)*scale, math.floor(r*16)*scale) love.graphics.circle("fill", math.floor((flagx+.5-xscroll)*16)*scale, math.floor((flagy-1-yscroll)*16-8)*scale, math.floor(r*16)*scale) end end function updatecustombackgrounds(dt) --animated backgrounds and foregrounds if custombackground then for i, b in pairs(custombackgroundanim) do if b.speedx then b.x = b.x + b.speedx*dt end if b.speedy then b.y = b.y + b.speedy*dt end if b.quad then b.timer = b.timer - dt while b.timer < 0 do b.frame = b.frame + 1 if b.frame > #b.frames then b.frame = 1 end b.quadi = b.frames[b.frame] b.timer = b.timer + b.delay[math.min(b.frame, #b.delay)] end end end end if customforeground then for i, b in pairs(customforegroundanim) do if b.speedx then b.x = b.x + b.speedx*dt end if b.speedy then b.y = b.y + b.speedy*dt end if b.quad then b.timer = b.timer - dt while b.timer < 0 do b.frame = b.frame + 1 if b.frame > #b.frames then b.frame = 1 end b.quadi = b.frames[b.frame] b.timer = b.timer + b.delay[math.min(b.frame, #b.delay)] end end end end end function rendercustombackground(xscroll, yscroll, scrollfactor, scrollfactory) local xscroll, yscroll = xscroll or 0, yscroll or 0 local scrollfactor, scrollfactory = scrollfactor or 0, scrollfactory or 0 if custombackground then for i = #custombackgroundimg, 1, -1 do local xscroll = xscroll / (i * scrollfactor + 1) local yscroll = yscroll / (i * scrollfactory + 1) if reversescrollfactor(scrollfactor) == 1 then xscroll = 0 end if reversescrollfactor(scrollfactory) == 1 then yscroll = 0 end local quad = false if custombackgroundanim[i] then --animate xscroll = xscroll - custombackgroundanim[i].x yscroll = yscroll - custombackgroundanim[i].y if custombackgroundanim[i].quad then quad = custombackgroundanim[i].quad[custombackgroundanim[i].quadi] end if custombackgroundanim[i].staticx or custombackgroundanim[i].static then xscroll = 0 elseif custombackgroundanim[i].clamptolevelwidth then xscroll = (xscroll/(mapwidth-width)) * (custombackgroundwidth[i]-width) end if custombackgroundanim[i].staticy or custombackgroundanim[i].static then yscroll = 0 elseif custombackgroundanim[i].clamptolevelheight then yscroll = (yscroll/(mapheight-1-height)) * (custombackgroundheight[i]-height) end end local min = 1 if xscroll < 0 or yscroll < 0 then min = 0 end if custombackgroundquad[i] and not SlowBackgrounds then --optimized static background local x1, y1 = math.floor(xscroll*16*scale)/scale, math.floor(yscroll*16*scale)/scale local qx, qy, qw, qh, sw, sh = custombackgroundquad[i]:getViewport() custombackgroundquad[i]:setViewport( x1, y1, width*16*screenzoom2, height*16*screenzoom2, sw, sh ) love.graphics.draw(custombackgroundimg[i], custombackgroundquad[i], 0, 0, 0, scale, scale) else for y = min, math.ceil(height/custombackgroundheight[i])+1 do for x = min, math.ceil(width/custombackgroundwidth[i])+1 do local x1, y1 = math.floor(((x-1)*custombackgroundwidth[i])*16*scale) - math.floor(math.fmod(xscroll, custombackgroundwidth[i])*16*scale), math.floor(((y-1)*custombackgroundheight[i])*16*scale) - math.floor(math.fmod(yscroll, custombackgroundheight[i])*16*scale) if ondrawscreen(x1, y1, custombackgroundwidth[i]*16*scale, custombackgroundheight[i]*16*scale) then if quad then love.graphics.draw(custombackgroundimg[i], quad, x1, y1, 0, scale, scale) else love.graphics.draw(custombackgroundimg[i], x1, y1, 0, scale, scale) end end end end end end end end function rendercustomforeground(xscroll, yscroll, scrollfactor, scrollfactory) local xscroll, yscroll = xscroll or 0, yscroll or 0 local scrollfactor2, scrollfactor2y = scrollfactor or 0, scrollfactory or 0 if customforeground then for i = #customforegroundimg, 1, -1 do local xscroll = xscroll * (i*scrollfactor2 + 1) local yscroll = yscroll * (i*scrollfactor2y + 1) if reversescrollfactor2(scrollfactor2) == 1 then xscroll = 0 end if reversescrollfactor2(scrollfactor2y) == 1 then yscroll = 0 end local quad = false if customforegroundanim[i] then --animate xscroll = xscroll - customforegroundanim[i].x yscroll = yscroll - customforegroundanim[i].y if customforegroundanim[i].quad then quad = customforegroundanim[i].quad[customforegroundanim[i].quadi] end if customforegroundanim[i].staticx or customforegroundanim[i].static then xscroll = 0 elseif customforegroundanim[i].clamptolevelwidth then xscroll = (xscroll/(mapwidth-width)) * (customforegroundwidth[i]-width) end if customforegroundanim[i].staticy or customforegroundanim[i].static then yscroll = 0 elseif customforegroundanim[i].clamptolevelheight then yscroll = (yscroll/(mapheight-1-height)) * (customforegroundheight[i]-height) end end local min = 1 if xscroll < 0 or yscroll < 0 then min = 0 end for y = min, math.ceil(height/customforegroundheight[i])+1 do for x = min, math.ceil(width/customforegroundwidth[i])+1 do local x1, y1 = math.floor(((x-1)*customforegroundwidth[i])*16*scale) - math.floor(math.fmod(xscroll, customforegroundwidth[i])*16*scale), math.floor(((y-1)*customforegroundheight[i])*16*scale) - math.floor(math.fmod(yscroll, customforegroundheight[i])*16*scale) --if ondrawscreen(x1, y1, customforegroundwidth[i]*16*scale, customforegroundheight[i]*16*scale) then if quad then love.graphics.draw(customforegroundimg[i], quad, x1, y1, 0, scale, scale) else love.graphics.draw(customforegroundimg[i], x1, y1, 0, scale, scale) end --end end end end end end function trackobject(x, y, obj, objtable) --grab entity onto track local r = map[x][y] if obj and r["track"] and ((not (r["track"].grab == "t" or r["track"].grab == "tr" or r["track"].grab == "tf" or r["track"].grab == "trf" or r["track"].grab == "")) or (objtable and objtable == "tilemoving")) then local dir, fast = "forward", false if r["track"].grab:find("r") then dir = "backwards" end if r["track"].grab:find("f") then obj.trackedfast = true fast = true end table.insert(objects["trackcontroller"], trackcontroller:new(x,y,objtable,obj,dir,force)) return true end return false end function createblockbounce(x, y) local i = tilemap(x, y) blockbounce[i] = {} return blockbounce[i] end function getblockbounce(x, y) --string concat is slow as hell so im doing this instead return blockbounce[tilemap(x, y)] end function tilemap(x, y) --tile ids used to use string concat (x .. "-" .. y) which was really slow --now it uses a single number, no strings attached -- 1 2 4 -- 3 5 8 -- 6 9 13 --Central polygonal numbers (the Lazy Caterer's sequence) if editormode or mazesfuck then --return ((x*(x -3+(2*y) ))/2) + ((y*(y-1))/2) + 1 return (x*(x+2*y-3) + y*(y-1))*.5 --simplified else if x > originalmapwidth then --mazes x = x-originalmapwidth return originalmapwidth+mapheight+1+(x*(x+2*y-3) + y*(y-1))*.5 else return (y-1)*originalmapwidth + x end end end function drawmaptiles(drawtype, xscroll, yscroll) local fore = (drawtype == "foreground") local drop = (drawtype == "dropshadow") or (drawtype == "menudropshadow") local menudraw = (drawtype == "menu") or (drawtype == "menudropshadow") local collision = (drawtype == "collision") local lmap = map local xfromdraw,xtodraw, yfromdraw,ytodraw, xoff,yoff = getdrawrange(xscroll,yscroll) for y = yfromdraw, ytodraw do for x = xfromdraw, xtodraw do --actual tile if (not lmap[x]) then if fore then print("foreground tile doesnt exist " .. x) else print("drawable tile doesnt exist " .. x) end break end local t = lmap[x][y] if not t then break end if (not fore) then--fore or drop then --clear pipes local coord = tilemap(x, y) if objects and objects["clearpipesegment"][coord] then if drop then objects["clearpipesegment"][coord]:draw(drop) else table.insert(clearpipesegmentdrawqueue, coord) end end --switch blocks if objects and objects["buttonblock"][coord] and ((not drop) or objects["buttonblock"][coord].active) then objects["buttonblock"][coord]:draw() end --frozen coins if objects and objects["frozencoin"][coord] and ((not drop) or objects["frozencoin"][coord].active) then objects["frozencoin"][coord]:draw() end end local tilenumber = t[1] if menudraw then tilenumber = tonumber(tilenumber) or 1 end local cox, coy = x, y local bounceyoffset = 0 if blockbounce then local blockbouncet = getblockbounce(x, y) if blockbouncet then local v = blockbouncet local timer = math.abs(v.timer) if timer < blockbouncetime/2 then bounceyoffset = timer / (blockbouncetime/2) * blockbounceheight else bounceyoffset = (2 - timer / (blockbouncetime/2)) * blockbounceheight end if v.timer < 0 then bounceyoffset = -bounceyoffset end end end if fore or drop or menudraw then if tilequads[tilenumber]:getproperty("foreground", cox, coy) then if tilenumber > 90000 then love.graphics.draw(tilequads[tilenumber].image, tilequads[tilenumber]:getquad(cox, coy), math.floor((x-1-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16-8)*scale), 0, scale, scale) else love.graphics.draw(tilequads[tilenumber].image, tilequads[tilenumber].quad, math.floor((x-1-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16-8)*scale), 0, scale, scale) end end end if (not fore) or drop or menudraw then if not tilequads[tilenumber]:getproperty("foreground", cox, coy) then if tilequads[tilenumber].coinblock and tilenumber < 90000 and not tilequads[tilenumber].invisible then --coinblock love.graphics.draw(coinblockimage, coinblockquads[spriteset][coinframe], math.floor((x-1-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16-8)*scale), 0, scale, scale) elseif (tilequads[tilenumber].coin and tilenumber < 90000) or (menudraw and t[2] == "187") then --coin love.graphics.draw(coinimage, coinquads[spriteset][coinframe], math.floor((x-1-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16-8)*scale), 0, scale, scale) elseif tilenumber > 90000 then --same as below, but keeps animated tiles on grid if not tilequads[tilenumber].invisible then love.graphics.draw(tilequads[tilenumber].image, tilequads[tilenumber]:getquad(cox, coy), math.floor((x-1-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16-8)*scale), 0, scale, scale) end elseif bounceyoffset ~= 0 or menudraw or (_3DMODE and (((not collision) and (not tilequads[tilenumber].collision))) or ((collision and tilequads[tilenumber].collision and bounceyoffset ~= 0))) then if not tilequads[tilenumber].invisible then love.graphics.draw(tilequads[tilenumber].image, tilequads[tilenumber].quad, math.floor((x-1-xoff)*16*scale), ((y-1-yoff-bounceyoffset)*16-8)*scale, 0, scale, scale) end end end if objects and objects["coin"][tilemap(cox,coy)] then objects["coin"][tilemap(cox,coy)]:draw() end end --Gel overlays! if t["gels"] and (not tilequads[tilenumber].foreground) and (not drop) and (not fore) then for i = 1, 4 do local dir = "top" local r = 0 if i == 2 then dir = "right" r = math.pi/2 elseif i == 3 then dir = "bottom" r = math.pi elseif i == 4 then dir = "left" r = math.pi*1.5 end if t["gels"][dir] == 1 then love.graphics.draw(gel1ground, math.floor((x-.5-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16)*scale), r, scale, scale, 8, 8) elseif t["gels"][dir] == 2 then love.graphics.draw(gel2ground, math.floor((x-.5-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16)*scale), r, scale, scale, 8, 8) elseif t["gels"][dir] == 3 then love.graphics.draw(gel3ground, math.floor((x-.5-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16)*scale), r, scale, scale, 8, 8) elseif t["gels"][dir] == 4 then love.graphics.draw(gel4ground, math.floor((x-.5-xoff)*16*scale), math.floor(((y-1-yoff-bounceyoffset)*16)*scale), r, scale, scale, 8, 8) end end end --tracks! if t["track"] and (not t["track"].invisible) and (not drop) and (not fore) then if editormode then if not (customrcopen and customrcopen == "trackpath" and t["track"].cox == rightclickmenucox and t["track"].coy == rightclickmenucoy) then love.graphics.setColor(255, 255, 255, 100) drawtrack(cox, coy, t["track"].start, t["track"].ending) love.graphics.setColor(255, 255, 255, 255) end else drawtrack(cox, coy, t["track"].start, t["track"].ending) end end if editormode and (((not fore) and not tilequads[tilenumber].foreground) or (fore and tilequads[tilenumber].foreground)) and (not drop) then if tilequads[t[1]].invisible and t[1] ~= 1 then love.graphics.draw(tilequads[t[1]].image, tilequads[t[1]].quad, math.floor((x-1-xoff)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) end if #t > 1 and t[2] ~= "link" then tilenumber = t[2] if tablecontains(customenemies, tilenumber) and enemiesdata[tilenumber] and (enemiesdata[tilenumber].width and enemiesdata[tilenumber].height) then --ENEMY PREVIEW THING local v = enemiesdata[tilenumber] local exoff, eyoff = ((0.5-v.width/2+(v.spawnoffsetx or 0))*16 + v.offsetX - v.quadcenterX)*scale, (((v.spawnoffsety or 0)-v.height+1)*16-v.offsetY - v.quadcenterY)*scale local mx, my = getMouseTile(love.mouse.getX(), love.mouse.getY()+8*scale) local alpha = 150 if cox == mx and coy == my then alpha = 255 end local offsetx = 0 if t["argument"] and t["argument"] == "o" then --offset offsetx = .5 end love.graphics.setColor(255, 0, 0, alpha) love.graphics.rectangle("fill", math.floor((x-1-xoff+offsetx)*16*scale), math.floor(((y-1-yoff)*16-8)*scale), 16*scale, 16*scale) love.graphics.setColor(255, 255, 255, alpha) if v.showicononeditor and v.icongraphic then love.graphics.draw(v.icongraphic, math.floor((x-1-xoff+offsetx)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) else love.graphics.draw(v.graphic, v.quad, math.floor((x-1-xoff+offsetx)*16*scale+exoff), math.floor(((y-1-yoff)*16)*scale+eyoff), 0, (v.animationscalex or 1)*scale, (v.animationscaley or 1)*scale) end if t["argument"] and t["argument"] == "b" then --supersize love.graphics.setColor(255, 255, 255, 200) love.graphics.draw(entityquads[313].image, entityquads[313].quad, math.floor((x-1-xoff)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) end elseif entityquads[tilenumber] and entityquads[tilenumber].t then local i = entityquads[tilenumber].t if (i == "pipe" or i == "pipespawn" or i == "warppipe") and t[3] then --pipe display local qs = 1 if i == "pipespawn" then qs = 2 elseif i == "warppipe" then qs = 3 end love.graphics.setColor(255, 255, 255, 150) if type(t[3]) == "string" then local s = t[3]:split("|") if s[3] then local dir = s[3] or "down" love.graphics.draw(pipesimg, pipesquad[qs][dir], math.floor((x-1-xoff)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) else love.graphics.draw(pipesimg, pipesquad[qs]["default"], math.floor((x-1-xoff)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) end else love.graphics.draw(pipesimg, pipesquad[qs]["default"], math.floor((x-1-xoff)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) end else local offsetx = 0 if t["argument"] and t["argument"] == "o" then --offset offsetx = .5 love.graphics.setScissor(math.floor((x-1-xoff)*16*screenzoom*scale), math.floor(((y-1-yoff)*16-8)*screenzoom*scale), 16*screenzoom*scale, 16*screenzoom*scale) end love.graphics.setColor(255, 255, 255, 150) love.graphics.draw(entityquads[tilenumber].image, entityquads[tilenumber].quad, math.floor((x-1-xoff+offsetx)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) if offsetx > 0 then love.graphics.setScissor() end if t["argument"] and t["argument"] == "b" then --supersize love.graphics.setColor(255, 255, 255, 200) love.graphics.draw(entityquads[313].image, entityquads[313].quad, math.floor((x-1-xoff+offsetx)*16*scale), ((y-1-yoff)*16-8)*scale, 0, scale, scale) end if entityquads[tilenumber].t == "track" and not trackpreviews then generatetrackpreviews() end end end if not drop then love.graphics.setColor(255, 255, 255, 255) end end end end end end function drawtile(tilenumber, x, y, r, sx, sy, ox, oy) --currently unused if tilequads[tilenumber].invisible then return false end if tilequads[tilenumber].coinblock and tilenumber < 90000 and not tilequads[tilenumber].invisible then --coinblock love.graphics.draw(coinblockimage, coinblockquads[spriteset][coinframe], x, y, r, sx, sy, ox, oy) elseif tilequads[tilenumber].coin and tilenumber < 90000 then --coin love.graphics.draw(coinimage, coinquads[spriteset][coinframe], x, y, r, sx, sy, ox, oy) elseif tilenumber > 90000 then --same as below, but keeps animated tiles on grid if not tilequads[tilenumber].invisible then love.graphics.draw(tilequads[tilenumber].image, tilequads[tilenumber].quad, x, y, r, sx, sy, ox, oy) end else love.graphics.draw(tilequads[tilenumber].image, tilequads[tilenumber].quad, x, y, r, sx, sy, ox, oy) end end function supersizeentity(v, size) v.supersized = size or 2 if v.x and v.y and v.width and v.height then local x, y, y2 = v.x+v.width/2, v.y+v.height/2, v.y+v.height v.animationscalex = (size or 2) v.animationscaley = (size or 2) v.width = v.width*(size or 2) v.height = v.height*(size or 2) v.weight = (v.weight or 1)*(size or 2) --v.offsetX = v.offsetX*2 --v.offsetY = v.offsetY*2-8 if v.movedist then v.movedist = v.movedist*(size or 2) end v.x = x-v.width/2 if v.supersizedown or (v.gravity and v.gravity < 0) then --upsidedown elseif (v.static or (v.gravity and v.gravity == 0)) and (not v.supersizeup) then v.y = y-v.height/2 else v.y = y2-v.height end if v.supersizeoffsetx then v.x = v.x + v.supersizeoffsetx end if v.supersizeoffsety then v.x = v.y + v.supersizeoffsety end end if v.dosupersize then v:dosupersize() end end function checkfortileincoord(x, y) --used for enemies that turn around ledges return ( (tilequads[map[x][y][1]]:getproperty("collision", x, y) and (not tilequads[map[x][y][1]]:getproperty("invisible", x, y)) and (not (objects["tile"][tilemap(x, y)] and objects["tile"][tilemap(x, y)].slab)) ) or (objects["flipblock"][tilemap(x, y)] and objects["flipblock"][tilemap(x, y)].active) or (objects["buttonblock"][tilemap(x, y)] and objects["buttonblock"][tilemap(x, y)].active) or (objects["frozencoin"][tilemap(x, y)]) or objects["clearpipesegment"][tilemap(x, y)] ) end function startlowtime() if pbuttonsound:isPlaying() then pbuttonsound:setVolume(0) else stopmusic() love.audio.stop() end playsound(lowtimesound) queuelowtime = 7.5 end --replace any characters that may mess with level saving function makelevelfilesafe(s) s = s:gsub(",","ª"); s = s:gsub("%.","º"); s = s:gsub("%-","¯") return s end function readlevelfilesafe(s) s = s:gsub("ª",","); s = s:gsub("º","%."); s = s:gsub("¯","%-") return s end function getdrawrange(xscroll,yscroll,spritebatch) local xfromdraw, xtodraw = math.max(1, math.floor(xscroll)+1), math.min(mapwidth, math.floor(xscroll+width*(1/screenzoom))+1) local yfromdraw, ytodraw = math.max(1, math.floor(yscroll)+1), math.min(mapheight, math.floor(yscroll+height*(1/screenzoom)+1+0.5)+1) local xoff = math.floor(xscroll) if not spritebatch then xoff = xoff+math.fmod(xscroll, 1) if xscroll < 0 then xoff = math.ceil(xscroll)+math.fmod(xscroll, 1) end end local yoff = math.floor(yscroll) if not spritebatch then yoff = yoff+math.fmod(yscroll, 1) if yscroll < 0 then yoff = math.ceil(yscroll)+math.fmod(yscroll, 1) end end return xfromdraw,xtodraw, yfromdraw,ytodraw, xoff,yoff end function setscreenzoom(z) if z ~= 1 or (screenzoom and screenzoom ~= 1) then for i = 1, #smbspritebatch do smbspritebatch[i]:setBufferSize(math.max(maxtilespritebatchsprites,width*height+width+height+1)) portalspritebatch[i]:setBufferSize(math.max(maxtilespritebatchsprites,width*height+width+height+1)) if customtiles then for i2 = 1, #customtilesimg do customspritebatch[i][i2]:setBufferSize(math.max(maxtilespritebatchsprites,width*height+width+height+1)) end end end end screenzoom = z screenzoom2 = 1/screenzoom end ------------------- --DAILY CHALLENGE-- ------------------- function dchighscore() if DChigh[1] == "-" then DCcompleted = DCcompleted + 1 end local old = {DChigh[1], DChigh[2], DChigh[3]} local highscore = false local timefinished = round(mariotimelimit-realmariotime, 2) if DChigh[1] == "finished" then DChigh[1] = timefinished highscore = true elseif not tonumber(DChigh[1]) or timefinished < DChigh[1] then DChigh[1] = timefinished DChigh[2] = old[1] DChigh[3] = old[2] highscore = true elseif not tonumber(DChigh[2]) or timefinished < DChigh[2] then DChigh[2] = timefinished DChigh[3] = old[2] highscore = true elseif not tonumber(DChigh[3]) or timefinished < DChigh[3] then DChigh[3] = timefinished highscore = true end if highscore then s = "" s = s .. tostring(DCcompleted) .. "~" .. datet[1] .. "/" .. datet[2] .. "/" .. datet[3] love.filesystem.write("alesans_entities/dc.txt", s) end end
32.22258
1,019
0.65352
da6a090eb82201384995b830507403755bd1a48e
854
php
PHP
src/Functions/IO.php
KernelDeimos/FinalPHP
b092ad0a13f42e9b1f432fa89fa49a6afccb330e
[ "MIT" ]
null
null
null
src/Functions/IO.php
KernelDeimos/FinalPHP
b092ad0a13f42e9b1f432fa89fa49a6afccb330e
[ "MIT" ]
1
2017-10-20T19:39:32.000Z
2017-10-27T18:02:23.000Z
src/Functions/IO.php
KernelDeimos/FinalPHP
b092ad0a13f42e9b1f432fa89fa49a6afccb330e
[ "MIT" ]
null
null
null
<?php namespace FinalPHP\Functions; use \FinalPHP\L; use Symfony\Component\Yaml\Yaml; class IO { public static function MarshalFiles($struct, ...$files) { // TODO: Infer JSON or YAML from file extension // Return unified struct with configuration from each file return L::Reduce( // To reduce: Parsed YAML from each file L::Map( // For each value in $files, // Map with the following functions "file_get_contents", array('\Symfony\Component\Yaml\Yaml', 'parse') ), // Reduce function: Apply parsed YAML to each struct state L::ReverseArgs( array('\FinalPHP\L', 'Marshal') ), // Reduce initialization: Empty struct $struct ); } }
25.878788
83
0.542155
2cca7b2d7c7dc21b45de21c60391fab7a08e3f31
7,798
cpp
C++
src/services/openid_connect.cpp
umr-dbs/mapping-gfbio
820f0ccde16cab9f5780864d2402149230f01acf
[ "MIT" ]
null
null
null
src/services/openid_connect.cpp
umr-dbs/mapping-gfbio
820f0ccde16cab9f5780864d2402149230f01acf
[ "MIT" ]
2
2018-04-04T10:38:47.000Z
2020-12-07T13:26:04.000Z
src/services/openid_connect.cpp
umr-dbs/mapping-gfbio
820f0ccde16cab9f5780864d2402149230f01acf
[ "MIT" ]
2
2018-03-07T07:50:24.000Z
2018-06-05T13:51:58.000Z
#include "openid_connect.h" void OpenIdConnectService::OpenIdConnectService::run() { try { const std::string &request = params.get("request"); if (request == "login") { this->login(params.get("access_token")); } else { // FALLBACK response.sendFailureJSON("OpenIdConnectService: Invalid request"); } } catch (const std::exception &e) { response.sendFailureJSON(e.what()); } } auto OpenIdConnectService::login(const std::string &access_token) const -> void { static const std::unordered_set<std::string> allowed_jwt_algorithms{"RS256"}; static const auto jwks_endpoint_url = Configuration::get<std::string>("oidc.jwks_endpoint"); static const auto user_endpoint_url = Configuration::get<std::string>("oidc.user_endpoint"); static const auto allowed_clock_skew_seconds = Configuration::get<uint32_t>("oidc.allowed_clock_skew_seconds"); const auto jwks = download_jwks(jwks_endpoint_url); const auto jwt_algorithm = jwks.get("alg", "").asString(); if (allowed_jwt_algorithms.count(jwt_algorithm) <= 0) { throw OpenIdConnectService::OpenIdConnectServiceException( concat("OpenIdConnectService: Algorithm ", jwt_algorithm, " is not supported")); } const std::string pem = jwks_to_pem(jwks.get("n", "").asString(), jwks.get("e", "").asString()); const auto decoded_token = jwt::decode(access_token, jwt::params::algorithms({jwt_algorithm}), jwt::params::secret(pem), jwt::params::leeway(allowed_clock_skew_seconds), jwt::params::verify(true)); const auto &payload = decoded_token.payload(); const uint32_t expiration_time = payload.get_claim_value<uint32_t>(jwt::registered_claims::expiration); const auto user_json = download_user_data(user_endpoint_url, access_token); OpenIdConnectService::User user{ .goe_id = user_json.get("goe_id", "").asString(), .email = user_json.get("email", "").asString(), .given_name = user_json.get("given_name", "").asString(), .family_name = user_json.get("family_name", "").asString(), .preferred_username = user_json.get("preferred_username", "").asString(), .expiration_time = expiration_time, }; response.sendSuccessJSON("session", createSessionAndAccountIfNotExist(user)); } auto OpenIdConnectService::jwks_to_pem(const std::string &n, const std::string &e) -> std::string { auto n_decoded = cppcodec::base64_url_unpadded::decode(n); auto e_decoded = cppcodec::base64_url_unpadded::decode(e); BIGNUM *modul = BN_bin2bn(n_decoded.data(), n_decoded.size(), nullptr); BIGNUM *expon = BN_bin2bn(e_decoded.data(), e_decoded.size(), nullptr); std::unique_ptr<RSA, std::function<void(RSA *)>> rsa( RSA_new(), [](RSA *rsa) { RSA_free(rsa); } ); RSA_set0_key(rsa.get(), modul, expon, nullptr); std::unique_ptr<BIO, std::function<void(BIO *)>> memory_file( BIO_new(BIO_s_mem()), [](BIO *bio) { BIO_set_close(bio, BIO_CLOSE); BIO_free_all(bio); } ); PEM_write_bio_RSA_PUBKEY(memory_file.get(), rsa.get()); BUF_MEM *memory_pointer; BIO_get_mem_ptr(memory_file.get(), &memory_pointer); return std::string(memory_pointer->data, memory_pointer->length); } auto OpenIdConnectService::download_jwks(const std::string &url) -> Json::Value { std::stringstream data; cURL curl; curl.setOpt(CURLOPT_PROXY, Configuration::get<std::string>("proxy", "").c_str()); curl.setOpt(CURLOPT_URL, url.c_str()); curl.setOpt(CURLOPT_WRITEFUNCTION, cURL::defaultWriteFunction); curl.setOpt(CURLOPT_WRITEDATA, &data); curl.perform(); try { curl.perform(); } catch (const cURLException &e) { throw OpenIdConnectService::OpenIdConnectServiceException("OpenIdConnectService: JSON Web Key Set service unavailable"); } Json::Reader reader(Json::Features::strictMode()); Json::Value response; if (!reader.parse(data.str(), response) || response.empty() || !response.isMember("keys") || !response["keys"][0].isMember("n") || !response["keys"][0].isMember("e") || !response["keys"][0].isMember("alg")) { Log::error(concat( "OpenIdConnectService: JSON Web Key Set is invalid (malformed JSON)", '\n', data.str() )); throw OpenIdConnectService::OpenIdConnectServiceException("OpenIdConnectService: JSON Web Key Set is invalid (malformed JSON)"); } // return first key return response["keys"][0]; } auto OpenIdConnectService::download_user_data(const std::string &url, const std::string &access_token) -> Json::Value { std::stringstream data; cURL curl; curl.setOpt(CURLOPT_PROXY, Configuration::get<std::string>("proxy", "").c_str()); curl.setOpt(CURLOPT_URL, url.c_str()); curl.setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BEARER); // NOLINT(hicpp-signed-bitwise) curl.setOpt(CURLOPT_XOAUTH2_BEARER, access_token.c_str()); curl.setOpt(CURLOPT_WRITEFUNCTION, cURL::defaultWriteFunction); curl.setOpt(CURLOPT_WRITEDATA, &data); curl.perform(); try { curl.perform(); } catch (const cURLException &e) { throw OpenIdConnectService::OpenIdConnectServiceException("OpenIdConnectService: User endpoint unavailable"); } Json::Reader reader(Json::Features::strictMode()); Json::Value response; if (!reader.parse(data.str(), response) || response.empty() || !response.isMember("goe_id") || !response.isMember("email")) { Log::error(concat( "OpenIdConnectService: User data is invalid (malformed JSON)", '\n', data.str() )); throw OpenIdConnectService::OpenIdConnectServiceException("OpenIdConnectService: User data is invalid (malformed JSON)"); } return response; } auto OpenIdConnectService::createSessionAndAccountIfNotExist(const User &user) -> std::string { std::shared_ptr<UserDB::Session> session; const auto user_id = OpenIdConnectService::EXTERNAL_ID_PREFIX + user.goe_id; const std::time_t current_time = std::time(nullptr); const auto expiration_time_in_seconds = user.expiration_time - current_time; try { // create session for user if he already exists session = UserDB::createSessionForExternalUser(user_id, expiration_time_in_seconds); // TODO: think about updating user data like email, etc. } catch (const UserDB::authentication_error &e) { // user does not exist locally => CREATE try { auto mapping_user = UserDB::createExternalUser( user.preferred_username, concat(user.given_name, ' ', user.family_name), user.email, user_id ); try { auto gfbio_group = UserDB::loadGroup("gfbio"); mapping_user->joinGroup(*gfbio_group); } catch (const UserDB::database_error &) { auto gfbio_group = UserDB::createGroup("gfbio"); mapping_user->joinGroup(*gfbio_group); } session = UserDB::createSessionForExternalUser(user_id, expiration_time_in_seconds); } catch (const std::exception &e) { throw OpenIdConnectService::OpenIdConnectServiceException( "OpenIdConnectService: Could not create new user from GFBio Single Sign On."); } } return session->getSessiontoken(); }
39.989744
136
0.63901
2c730117ecdbb590132104350c5016e542399781
1,456
cpp
C++
912-sort-an-array-mergesort.cpp
Iciclelz/leetcode
e4b698e0161033922851641885fdc6e47f9ce270
[ "Apache-2.0" ]
null
null
null
912-sort-an-array-mergesort.cpp
Iciclelz/leetcode
e4b698e0161033922851641885fdc6e47f9ce270
[ "Apache-2.0" ]
null
null
null
912-sort-an-array-mergesort.cpp
Iciclelz/leetcode
e4b698e0161033922851641885fdc6e47f9ce270
[ "Apache-2.0" ]
null
null
null
class Solution { public: std::vector<int32_t> sortArray(std::vector<int32_t>& v) { mergesort<int32_t>(v, [](int32_t a, int32_t b) -> bool { return a < b; }); return v; } private: template <typename T> std::vector<T> merge(std::vector<T> &a, std::vector<T> &b, std::function<bool(T, T)> &cmp) { if (a.empty()) { return b; } else if (b.empty()) { return a; } else { std::vector<T> v; v.reserve(a.size() + b.size()); size_t n = 0; size_t m = 0; while (n < a.size() && m < b.size()) { v.push_back(cmp(a[n], b[m]) ? a[n++] : b[m++]); } while (n < a.size()) { v.push_back(a[n++]); } while (m < b.size()) { v.push_back(b[m++]); } return v; } } template <typename T> void mergesort(std::vector<T> &v, std::function<bool(T, T)> cmp) { if (v.size() <= 1) { return; } std::vector<T> a(v.begin(), v.begin() + v.size() / 2); std::vector<T> b(v.begin() + v.size() / 2, v.end()); mergesort<T>(a, cmp); mergesort<T>(b, cmp); v = merge<T>(a, b, cmp); } };
24.677966
117
0.370192
a4321b0846c4f809738743a7977177d09c0d1c1f
299
php
PHP
config/constants.php
Elymas-Magus/Sua-Mae-Nao-Pode-Ver
36c21e39f14da1fe22255e07c1eaa95a1b514e40
[ "MIT" ]
null
null
null
config/constants.php
Elymas-Magus/Sua-Mae-Nao-Pode-Ver
36c21e39f14da1fe22255e07c1eaa95a1b514e40
[ "MIT" ]
null
null
null
config/constants.php
Elymas-Magus/Sua-Mae-Nao-Pode-Ver
36c21e39f14da1fe22255e07c1eaa95a1b514e40
[ "MIT" ]
null
null
null
<?php return [ 'options' => [ 'sites' => [ ['id' => 1, 'url' => 'www.xvideos.com', 'nome' => 'xvideos'], ['id' => 2, 'url' => 'www.pornhub.com', 'nome' => 'pornhub'], ['id' => 3, 'url' => 'www.redtube.com', 'nome' => 'redtube'], ], ], ];
24.916667
73
0.371237
3605df9f502d639a0a9143d45ca33be8d419fe08
228
rs
Rust
src/rendering/components.rs
PSteinhaus/emerald
f359a4bfa2760e3d33316579cedab994d954ae10
[ "MIT" ]
340
2020-04-15T17:26:19.000Z
2022-03-27T00:29:25.000Z
src/rendering/components.rs
PSteinhaus/emerald
f359a4bfa2760e3d33316579cedab994d954ae10
[ "MIT" ]
59
2020-07-07T18:21:28.000Z
2022-03-27T21:53:45.000Z
src/rendering/components.rs
PSteinhaus/emerald
f359a4bfa2760e3d33316579cedab994d954ae10
[ "MIT" ]
12
2021-07-10T14:50:41.000Z
2022-01-17T10:38:27.000Z
#[cfg(feature = "aseprite")] pub mod aseprite; mod camera; mod color_rect; mod label; mod sprite; #[cfg(feature = "aseprite")] pub use aseprite::*; pub use camera::*; pub use color_rect::*; pub use label::*; pub use sprite::*;
16.285714
28
0.675439
ee5ce6010221dfcaec3f4979f8f62f1c46db3acf
355
lua
Lua
_lib/premake5.lua
raylib-extras/game-premake
2f6a83b4d8748e3ae42d92be18bd0e9534e24b4e
[ "Zlib" ]
3
2021-10-10T03:04:40.000Z
2022-03-08T04:43:46.000Z
_lib/premake5.lua
raylib-extras/game-premake
2f6a83b4d8748e3ae42d92be18bd0e9534e24b4e
[ "Zlib" ]
1
2022-02-10T22:58:14.000Z
2022-02-13T00:28:58.000Z
_lib/premake5.lua
raylib-extras/game-premake
2f6a83b4d8748e3ae42d92be18bd0e9534e24b4e
[ "Zlib" ]
7
2021-11-19T16:53:58.000Z
2022-03-24T13:12:53.000Z
baseName = path.getbasename(os.getcwd()); project (baseName) kind "StaticLib" location "../_build" targetdir "../_bin/%{cfg.buildcfg}" includedirs { "./", "./include"} vpaths { ["Header Files/*"] = { "**.h"}, ["Source Files/*"] = { "**.cpp","**.c"}, } files {"**.h", "**.cpp","**.c"} include_raylib()
20.882353
48
0.484507
fa337f3b481856306f714efc19e7abaf579c9e4a
1,694
lua
Lua
drivers/SmartThings/zwave-switch/src/ecolink-switch/init.lua
teba-home/SmartThingsEdgeDrivers
924d882f29a9499868faa71c62d481459533dfa0
[ "Apache-2.0" ]
null
null
null
drivers/SmartThings/zwave-switch/src/ecolink-switch/init.lua
teba-home/SmartThingsEdgeDrivers
924d882f29a9499868faa71c62d481459533dfa0
[ "Apache-2.0" ]
null
null
null
drivers/SmartThings/zwave-switch/src/ecolink-switch/init.lua
teba-home/SmartThingsEdgeDrivers
924d882f29a9499868faa71c62d481459533dfa0
[ "Apache-2.0" ]
null
null
null
-- Copyright 2022 SmartThings -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. local capabilities = require "st.capabilities" local cc = require "st.zwave.CommandClass" local Basic = (require "st.zwave.CommandClass.Basic")({ version=1 }) local ECOLINK_FINGERPRINTS = { {mfr = 0x014A, prod = 0x0006, model = 0x0002}, {mfr = 0x014A, prod = 0x0006, model = 0x0003}, {mfr = 0x014A, prod = 0x0006, model = 0x0004}, {mfr = 0x014A, prod = 0x0006, model = 0x0005}, {mfr = 0x014A, prod = 0x0006, model = 0x0006} } local function can_handle_ecolink(opts, driver, device, ...) for _, fingerprint in ipairs(ECOLINK_FINGERPRINTS) do if device:id_match(fingerprint.mfr, fingerprint.prod, fingerprint.model) then return true end end return false end local function basic_set_handler(driver, device, cmd) if cmd.args.value == 0xFF then device:emit_event(capabilities.switch.switch.on()) else device:emit_event(capabilities.switch.switch.off()) end end local ecolink_switch = { NAME = "Ecolink Switch", zwave_handlers = { [cc.BASIC] = { [Basic.SET] = basic_set_handler } }, can_handle = can_handle_ecolink } return ecolink_switch
30.8
81
0.716647
7f5b18e376ab6bdebd117067714cd8cc50fb20cb
10,512
swift
Swift
Sources/OpenKit/Extensions/CoreData/NSManagedObjectContext.swift
JannThomas/OpenKit
d1bd44ff1dcbfc7b56a42cef5ddd366614814e4b
[ "MIT" ]
1
2020-02-28T23:10:17.000Z
2020-02-28T23:10:17.000Z
Sources/OpenKit/Extensions/CoreData/NSManagedObjectContext.swift
JannThomas/OpenKit
d1bd44ff1dcbfc7b56a42cef5ddd366614814e4b
[ "MIT" ]
null
null
null
Sources/OpenKit/Extensions/CoreData/NSManagedObjectContext.swift
JannThomas/OpenKit
d1bd44ff1dcbfc7b56a42cef5ddd366614814e4b
[ "MIT" ]
1
2020-07-10T17:19:56.000Z
2020-07-10T17:19:56.000Z
// Copyright (c) 2015 - 2019 Jann Schafranek // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #if canImport(CoreData) import CoreData public extension NSManagedObjectContext { /** Saves the receiver throwing a fatalError if the save fails. - parameter errorHandler : When an error occurs this is called so you can potentially fix it. If it returns true, no fatalError is thrown. */ func saveThrowingError(errorHandler : ((Error)->Bool)? = nil) { if self.hasChanges { do { try self.save() } catch { // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. // But: // Letting the user continue to use the app in a state where this error persists will be destructive to any changes the user makes going forward. if errorHandler?(error) == true { return } let nserror = error as NSError fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } } /** Returns all objects matching the given parameters. - parameters: - entityType : The type of the Entity. - predicates : The predicates to use. - sortDescriptors : The sort descriptors to use. - limit : The maximum number of items to fetch. - includesSubentities : Whether subentities should be included. The default value is true. */ func getAllObjects<T : NSManagedObject>(of entityType: T.Type, predicates: [NSPredicate]? = nil, sortDescriptors: [NSSortDescriptor]? = nil, limit: Int? = nil, includesSubentities: Bool = true) -> [T] { return getAllObjects(with: String(describing: entityType), predicates: predicates, sortDescriptors: sortDescriptors, limit: limit, includesSubentities: includesSubentities) as! [T] } /** Returns all objects matching the given parameters. - parameters: - entityString : The string identifying the Entity. - predicates : The predicates to use. - sortDescriptors : The sort descriptors to use. - limit : The maximum number of items to fetch. - includesSubentities : Whether subentities should be included. The default value is true. */ func getAllObjects(with entityString : String, predicates:[NSPredicate]?, sortDescriptors:[NSSortDescriptor]?, limit : Int? = nil, includesSubentities : Bool = true) -> [NSManagedObject]{ var toReturn : [NSManagedObject] = [] self.retrieveFetchRequestAndWait(with: entityString, predicates: predicates, sortDescriptors: sortDescriptors, limit: limit, includesSubentities: includesSubentities, handler: { request in do { toReturn = try fetch(request) as! [NSManagedObject] } catch let err as NSError { NSLog("Error getting all object with entityString(%@): %@", entityString, err) } }) return toReturn } /** Returns the count of all objects matching the given parameters. - parameters: - entityType : The type of the Entity. - predicates : The predicates to use. - sortDescriptors : The sort descriptors to use. - limit : The maximum number of items to fetch. - includesSubentities : Whether subentities should be included. The default value is true. */ func getCountOfObjects<T : NSManagedObject>(of entityType: T.Type, predicates: [NSPredicate]? = nil, sortDescriptors: [NSSortDescriptor]? = nil, limit: Int? = nil, includesSubentities: Bool = true) -> Int? { return getCountOfObjects(with: String(describing: entityType), predicates: predicates, sortDescriptors: sortDescriptors, limit: limit, includesSubentities: includesSubentities) } /** Returns the count of all objects matching the given parameters. - parameters: - entityString : The string identifying the Entity. - predicates : The predicates to use. - sortDescriptors : The sort descriptors to use. - limit : The maximum number of items to fetch. - includesSubentities : Whether subentities should be included. The default value is true. */ func getCountOfObjects(with entityString : String, predicates:[NSPredicate]?, sortDescriptors:[NSSortDescriptor]? = nil, limit : Int? = nil, includesSubentities : Bool = true) -> Int?{ var toReturn : Int? = nil self.retrieveFetchRequestAndWait(with: entityString, predicates: predicates, sortDescriptors: sortDescriptors, limit: limit, includesSubentities: includesSubentities, handler: { request in do { toReturn = try count(for: request) } catch let err as NSError { NSLog("Error getting all object with entityString(%@): %@", entityString, err) } }) return toReturn } /** Deletes all objects matching the given parameters. - parameters: - entityType : The string identifying the Entity. - predicates : The predicates to use. - sortDescriptors : The sort descriptors to use. - limit : The maximum number of items to fetch. - includesSubentities : Whether subentities should be included. The default value is true. */ func deleteAllObjects(with entityString: String, predicates: [NSPredicate]? = nil, sortDescriptors: [NSSortDescriptor]? = nil, limit: Int? = nil, includesSubentities: Bool = true) { self.retrieveFetchRequestAndWait(with: entityString, predicates: predicates, sortDescriptors: sortDescriptors, limit: limit, includesSubentities: includesSubentities, handler: { request in do { let deleteRequest = NSBatchDeleteRequest(fetchRequest: request) try self.execute(deleteRequest) } catch let err as NSError { NSLog("Error deleting all object with entityString(%@): %@", entityString, err) } }) } /** Deletes all objects matching the given parameters. - parameters: - entityType : The type of the Entity. - predicates : The predicates to use. - sortDescriptors : The sort descriptors to use. - limit : The maximum number of items to fetch. - includesSubentities : Whether subentities should be included. The default value is true. */ func deleteAllObjects<T : NSManagedObject>(of entityType: T.Type, predicates: [NSPredicate]? = nil, sortDescriptors: [NSSortDescriptor]? = nil, limit: Int? = nil, includesSubentities: Bool = true) { deleteAllObjects(with: String(describing: entityType), predicates: predicates, sortDescriptors: sortDescriptors, limit: limit, includesSubentities: includesSubentities) } private func retrieveFetchRequestAndWait(with entityString: String, predicates: [NSPredicate]?, sortDescriptors: [NSSortDescriptor]?, limit: Int?, includesSubentities: Bool, handler : (NSFetchRequest<NSFetchRequestResult>) -> Void) { self.performAndWait({ if let entityDescription : NSEntityDescription = NSEntityDescription.entity(forEntityName: entityString, in: self){ let request = NSFetchRequest<NSFetchRequestResult>() request.entity = entityDescription request.includesSubentities = includesSubentities if let predicates = predicates { request.predicate = NSCompoundPredicate(andPredicateWithSubpredicates: predicates) } if let sortDescriptors = sortDescriptors { request.sortDescriptors = sortDescriptors } if let limit = limit { request.fetchLimit = limit } handler(request) } }) } } #endif
48
199
0.573535
df09d535a130b068309069a9e25d095bb52a079e
1,192
sql
SQL
sql/_13_issues/_12_2h/cases/bug_bts_9479.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
9
2016-03-24T09:51:52.000Z
2022-03-23T10:49:47.000Z
sql/_13_issues/_12_2h/cases/bug_bts_9479.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
173
2016-04-13T01:16:54.000Z
2022-03-16T07:50:58.000Z
sql/_13_issues/_12_2h/cases/bug_bts_9479.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
38
2016-03-24T17:10:31.000Z
2021-10-30T22:55:45.000Z
drop table if exists foo,d3201; drop v1,v2,dv1,dv2; create table foo (i int primary key, j int); create view v1 as select i from foo order by j; insert into foo values(1, 3); insert into foo values(2, 2); insert into foo values(3, 5); insert into foo values(4, 4); insert into foo values(5, 1); select * from v1; select * from v1 where i > 3; select * from v1 order by i; create view v2(a int) as select i from foo order by j; select * from v2; select * from v2 where a > 3; select * from v2 order by a; create table d3201 (i int primary key, j int); create view dv1 as select i from foo order by j; insert into d3201 values(1, 3); insert into d3201 values(2, 2); insert into d3201 values(3, 5); insert into d3201 values(4, 4); insert into d3201 values(5, 1); select * from dv1; select * from dv1 where i > 3; select * from dv1 order by i; create view dv2(a int) as select i from d3201 order by j; select * from dv2; select * from dv2 where a > 3; select * from dv2 order by a; drop table if exists foo,d3201; drop v1,v2,dv1,dv2; drop table if exists foo; drop v; create table foo (i int, j int); create view v as select i from foo order by j; drop table if exists foo; drop v;
22.490566
57
0.702181
e86ea92c882dd23d90333255cc62a3ceb76d2316
3,306
lua
Lua
vendor/RainbowRepacker/tool/engine_android(5)/assets/scripts/view/kScreen_1280_800/hall/newObjectCase/newObjectCaseNoticeShareResult.lua
huangtao/cloud-test
8087b1337d47daab9eb39335ca6e286df0e4b4dc
[ "Apache-2.0" ]
1
2018-09-12T15:43:32.000Z
2018-09-12T15:43:32.000Z
vendor/RainbowRepacker/tool/engine_android(5)/assets/scripts/view/kScreen_1280_800/hall/newObjectCase/newObjectCaseNoticeShareResult.lua
huangtao/cloud-test
8087b1337d47daab9eb39335ca6e286df0e4b4dc
[ "Apache-2.0" ]
null
null
null
vendor/RainbowRepacker/tool/engine_android(5)/assets/scripts/view/kScreen_1280_800/hall/newObjectCase/newObjectCaseNoticeShareResult.lua
huangtao/cloud-test
8087b1337d47daab9eb39335ca6e286df0e4b4dc
[ "Apache-2.0" ]
3
2018-09-12T15:43:33.000Z
2019-07-10T09:50:15.000Z
local newObjectCaseNoticeShareResult= { name="newObjectCaseNoticeShareResult",type=0,typeName="View",time=0,x=0,y=0,width=1280,height=720,visible=1,nodeAlign=kAlignTopLeft,fillParentWidth=1,fillParentHeight=1, { name="Image_hallBack",type=0,typeName="Image",time=107706546,x=0,y=0,width=720,height=720,nodeAlign=kAlignTopLeft,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/backpack/backpack_share_bg.jpg",varname="Image_hallBack", { name="Image_iconFrame",type=0,typeName="Image",time=107706645,x=0,y=-20,width=200,height=200,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/bg_blank.png",varname="Image_iconFrame", { name="Image_icon",type=0,typeName="Image",time=107711256,x=0,y=0,width=200,height=200,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/bg_blank.png",varname="Image_icon" } }, { name="Image_twoDimensionCodeFrame",type=0,typeName="Image",time=107706668,x=23,y=29,width=150,height=150,nodeAlign=kAlignBottomRight,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/bg_blank.png",gridLeft=25,gridRight=25,gridTop=25,gridBottom=25,varname="Image_twoDimensionCodeFrame", { name="Image_twoDimensionCode",type=0,typeName="Image",time=107707479,x=0,y=0,width=140,height=140,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/bg_blank.png",varname="Image_twoDimensionCode" } }, { name="View_PlayerInfo",type=0,typeName="View",time=107706796,x=0,y=0,width=540,height=120,nodeAlign=kAlignBottomLeft,visible=1,fillParentWidth=0,fillParentHeight=0, { name="Image_headIconFrame",type=0,typeName="Image",time=107706824,x=82,y=-3,width=2,height=2,nodeAlign=kAlignLeft,visible=1,fillParentWidth=0,fillParentHeight=0,file="hall/common/bg_blank.png",varname="Image_headIconFrame", { name="Image_headIcon",type=0,typeName="Image",time=107706826,x=0,y=0,width=64,height=64,nodeAlign=kAlignCenter,visible=1,fillParentWidth=0,fillParentHeight=0,file="ui/image.png",varname="Image_headIcon" } }, { name="Text_name",type=4,typeName="Text",time=0,x=150,y=26,width=120,height=22,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignTopLeft,fontSize=20,textAlign=kAlignLeft,colorRed=255,colorGreen=219,colorBlue=94,string=[[玩家昵称六字]],colorA=1,varname="Text_name" }, { name="Text_id",type=4,typeName="Text",time=0,x=295,y=26,width=120,height=22,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignTopLeft,fontSize=20,textAlign=kAlignLeft,colorRed=255,colorGreen=219,colorBlue=94,string=[[ID :1231313]],colorA=1,varname="Text_id" }, { name="Text_gameName",type=4,typeName="Text",time=0,x=150,y=28,width=364,height=29,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignBottomLeft,fontSize=26,textAlign=kAlignLeft,colorRed=255,colorGreen=255,colorBlue=255,string=[[更多精彩尽在辽宁集杰大连棋牌]],colorA=1,varname="Text_gameName" } }, { name="Text_prize_name",type=4,typeName="Text",time=0,x=0,y=135,width=44,height=27,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignCenter,fontSize=24,textAlign=kAlignCenter,colorRed=142,colorGreen=45,colorBlue=30,string=[[Text]],varname="Text_prize_name",colorA=1 } } } return newObjectCaseNoticeShareResult;
80.634146
303
0.783727
0f8735459ca4f95a30dcfb4248ca76929113da84
695
css
CSS
backend/web/css/pagination.css
ifelseprint/lgairpromotion.com
ac103fbc9ad3fbeebf2319da321c277ca4292380
[ "BSD-3-Clause" ]
null
null
null
backend/web/css/pagination.css
ifelseprint/lgairpromotion.com
ac103fbc9ad3fbeebf2319da321c277ca4292380
[ "BSD-3-Clause" ]
1
2021-01-19T16:25:59.000Z
2021-01-19T16:25:59.000Z
backend/web/css/pagination.css
ifelseprint/lgairpromotion.com
ac103fbc9ad3fbeebf2319da321c277ca4292380
[ "BSD-3-Clause" ]
null
null
null
.pagination { display: -ms-flexbox; display: flex; padding-left: 0; list-style: none; border-radius: .25rem; } .pagination a,.pagination span { padding: .4rem .7rem; line-height: 1.5; } .pagination li:first-child a,.pagination li:first-child span { margin-left: 0; border-top-left-radius: .2rem; border-bottom-left-radius: .2rem; } .pagination a,.pagination span { position: relative; display: block; margin-left: -1px; line-height: 1.25; color: #06002F; background-color: #fff; border: 1px solid #dee2e6; } .pagination li.active a { z-index: 1; color: #fff; background-color: #17a2b8; border-color: #137F90; }
21.71875
62
0.633094
3895780b1246151fc6757f4971fc668142979194
2,391
php
PHP
resources/views/connect/register.blade.php
drakonc/madecms
8fae42f4f349f0f32ba2a9664d464bd6ba638f8a
[ "MIT" ]
null
null
null
resources/views/connect/register.blade.php
drakonc/madecms
8fae42f4f349f0f32ba2a9664d464bd6ba638f8a
[ "MIT" ]
2
2021-12-23T20:38:34.000Z
2021-12-23T22:21:48.000Z
resources/views/connect/register.blade.php
drakonc/madecms
8fae42f4f349f0f32ba2a9664d464bd6ba638f8a
[ "MIT" ]
null
null
null
@extends('connect.master') @section('title','Registrarse') @section('content') <div class="box box_register shadow"> <div class="header"> <a href="{{ url('/') }}"> <img src="{{ url('/static/images/logo.png') }}"> </a> </div> <div class="inside"> {!! Form::open(['url' => '/register']) !!} <label for="name">Nombre:</label> <div class="input-group"> <span class="input-group-text"><i class="fas fa-user"></i></span> {!! Form::text('name', null, ['id'=>'name','class' => 'form-control','required'])!!} </div> <label for="lastname" class="mtop16">Apellido:</label> <div class="input-group"> <span class="input-group-text"><i class="fas fa-user-tag"></i></span> {!! Form::text('lastname', null, ['id'=>'lastname','class' => 'form-control','required'])!!} </div> <label for="email" class="mtop16">Correo Electrónico:</label> <div class="input-group"> <span class="input-group-text"><i class="far fa-envelope-open"></i></span> {!! Form::email('email', null, ['id'=>'email','class' => 'form-control','required'])!!} </div> <label for="password" class="mtop16">Password:</label> <div class="input-group"> <span class="input-group-text"><i class="fas fa-lock"></i></span> {!! Form::password('password', ['id'=>'password','class' => 'form-control','required'])!!} </div> <label for="cpassword" class="mtop16">Confirmar Password:</label> <div class="input-group"> <span class="input-group-text"><i class="fas fa-lock"></i></span> {!! Form::password('cpassword', ['id'=>'cpassword','class' => 'form-control','required'])!!} </div> {!! Form::submit('Registrarse',['class' => 'btn btn-success mtop16']) !!} {!! Form::close() !!} @include('common.alert') <div class="footer mtop16"> <a href="{{ url('/login') }}">Ya Tengo Una Cuenta, Iniciar Sesión</a> </div> </div> </div> @stop
39.85
112
0.464241
3146ae4d0a8bd7879d0aee3c4f2ce66aa5d33ff9
203
rb
Ruby
app/models/career/task_log_entry.rb
bitesite/career
2d6df958ed43f984da5f8345eaf5d1c516274894
[ "MIT" ]
null
null
null
app/models/career/task_log_entry.rb
bitesite/career
2d6df958ed43f984da5f8345eaf5d1c516274894
[ "MIT" ]
4
2021-04-24T14:12:57.000Z
2021-04-28T00:31:45.000Z
app/models/career/task_log_entry.rb
bitesite/career
2d6df958ed43f984da5f8345eaf5d1c516274894
[ "MIT" ]
null
null
null
module Career class TaskLogEntry < ApplicationRecord belongs_to :task validates :content, :entry_type, presence: true scope :chronological, -> { order(created_at: :asc) } end end
16.916667
56
0.689655
ed5bf23e2c7eb6612d79dfdf2e33786e9546bffc
284
h
C
ios/RCTTest/Test/Test.h
TonyTong1993/RNProject
4c4688bf172dfb6b779f972b832b6f37961f1f99
[ "MIT" ]
null
null
null
ios/RCTTest/Test/Test.h
TonyTong1993/RNProject
4c4688bf172dfb6b779f972b832b6f37961f1f99
[ "MIT" ]
null
null
null
ios/RCTTest/Test/Test.h
TonyTong1993/RNProject
4c4688bf172dfb6b779f972b832b6f37961f1f99
[ "MIT" ]
null
null
null
// // Test.h // RCTTest // // Created by 童万华 on 2017/8/9. // Copyright © 2017年 童万华. All rights reserved. // #ifndef Test_h #define Test_h #import "TYModelTest.h" #import "TYImageTest.h" #import "TYModelTest.h" #import "TYTopicTest.h" #import "TYReviewTest.h" #endif /* Test_h */
16.705882
47
0.676056
803c7bcc801a8fd622329c40fda91db292f0bdf9
10,921
lua
Lua
Assets/Game/Scripts/UI/SettingsUIControl.lua
imengyu/Ballance
3975238876ce7095eb5592d49a624ae728552385
[ "MIT" ]
16
2021-11-12T12:42:04.000Z
2022-03-30T07:56:39.000Z
Assets/Game/Scripts/UI/SettingsUIControl.lua
imengyu/Ballance
3975238876ce7095eb5592d49a624ae728552385
[ "MIT" ]
null
null
null
Assets/Game/Scripts/UI/SettingsUIControl.lua
imengyu/Ballance
3975238876ce7095eb5592d49a624ae728552385
[ "MIT" ]
1
2022-03-18T04:42:49.000Z
2022-03-18T04:42:49.000Z
local GameManager = Ballance2.Services.GameManager local GameUIManager = GameManager.GetSystemService('GameUIManager') ---@type GameUIManager local GameSettingsManager = Ballance2.Services.GameSettingsManager local I18NProvider = Ballance2.Services.I18N.I18NProvider local I18N = Ballance2.Services.I18N.I18N local Screen = UnityEngine.Screen local QualitySettings = UnityEngine.QualitySettings local KeyCode = UnityEngine.KeyCode local WaitForSeconds = UnityEngine.WaitForSeconds local Yield = UnityEngine.Yield local SystemLanguage = UnityEngine.SystemLanguage ---创建主设置菜单UI ---@param package GamePackage function CreateSettingsUI(package) local PageSettings = GameUIManager:RegisterPage('PageSettings', 'PageCommon') local PageSettingsInGame = GameUIManager:RegisterPage('PageSettingsInGame', 'PageCommon') local PageSettingsAudio = GameUIManager:RegisterPage('PageSettingsAudio', 'PageCommon') local PageSettingsControls = GameUIManager:RegisterPage('PageSettingsControls', 'PageCommon') local PageSettingsControlsMobile = GameUIManager:RegisterPage('PageSettingsControlsMobile', 'PageCommon') local PageSettingsGraphics = GameUIManager:RegisterPage('PageSettingsGraphics', 'PageCommon') local PageLanguage = GameUIManager:RegisterPage('PageLanguage', 'PageCommon') local PageApplyLangDialog = GameUIManager:RegisterPage('PageApplyLangDialog', 'PageCommon') local PagePackageManager = GameUIManager:RegisterPage('PagePackageManager', 'PageFull') local PagePackageManagerInfo = GameUIManager:RegisterPage('PagePackageManagerInfo', 'PageFull') local PagePackageManagerTrust = GameUIManager:RegisterPage('PagePackageManagerTrust', 'PageFull') coroutine.resume(coroutine.create(function () PageSettings:CreateContent(package) Yield(WaitForSeconds(0.01)) PageSettingsAudio:CreateContent(package) Yield(WaitForSeconds(0.01)) PageSettingsControls:CreateContent(package) Yield(WaitForSeconds(0.01)) PageSettingsControlsMobile:CreateContent(package) Yield(WaitForSeconds(0.01)) PageSettingsGraphics:CreateContent(package) Yield(WaitForSeconds(0.01)) PageSettingsInGame:CreateContent(package) Yield(WaitForSeconds(0.01)) PageLanguage:CreateContent(package) Yield(WaitForSeconds(0.01)) PageApplyLangDialog:CreateContent(package) Yield(WaitForSeconds(0.01)) PagePackageManager:CreateContent(package) Yield(WaitForSeconds(0.01)) PagePackageManagerInfo:CreateContent(package) Yield(WaitForSeconds(0.01)) PagePackageManagerTrust:CreateContent(package) Yield(WaitForSeconds(0.02)) BindSettingsUI(MessageCenter) end)) end ---绑定设置UI ---@param MessageCenter GameUIMessageCenter function BindSettingsUI(MessageCenter) local GameSettings = GameSettingsManager.GetSettings("core") --设置数据绑定 --声音 local updateVoiceMain = MessageCenter:SubscribeValueBinder('VoiceMain', function(val) GameSettings:SetFloat("voice.main", val) GameSettings:NotifySettingsUpdate("voice") end) local updateVoiceUI = MessageCenter:SubscribeValueBinder('VoiceUI', function(val) GameSettings:SetFloat("voice.ui", val) GameSettings:NotifySettingsUpdate("voice") end) local updateVioceBackground = MessageCenter:SubscribeValueBinder('VioceBackground', function(val) GameSettings:SetFloat("voice.background", val) GameSettings:NotifySettingsUpdate("voice") end) --视频 local updateGrResolution = MessageCenter:SubscribeValueBinder('GrResolution', function(val) GameSettings:SetInt("video.resolution", val) end) local updateGrQuality = MessageCenter:SubscribeValueBinder('GrQuality', function(val) GameSettings:SetInt("video.quality", val) end) local updateGrFullScreen = MessageCenter:SubscribeValueBinder('GrFullScreen', function(val) GameSettings:SetBool("video.fullScreen", val) end) local updateGrCloud = MessageCenter:SubscribeValueBinder('GrCloud', function(val) GameSettings:SetBool("video.cloud", val) end) local updateGrVSync = MessageCenter:SubscribeValueBinder('GrVSync', function(val) GameSettings:SetInt("video.vsync", val and 1 or 0 ) end) --控制 local updateControlKeyUp = MessageCenter:SubscribeValueBinder('ControlKeyUp', function(val) GameSettings:SetInt("control.key.front", val) end) local updateControlKeyDown = MessageCenter:SubscribeValueBinder('ControlKeyDown', function(val) GameSettings:SetInt("control.key.back", val) end) local updateControlKeyLeft = MessageCenter:SubscribeValueBinder('ControlKeyLeft', function(val) GameSettings:SetInt("control.key.left", val) end) local updateControlKeyRight = MessageCenter:SubscribeValueBinder('ControlKeyRight', function(val) GameSettings:SetInt("control.key.right", val) end) local updateControlKeyOverlookCam = MessageCenter:SubscribeValueBinder('ControlKeyOverlookCam', function(val) GameSettings:SetInt("control.key.up_cam", val) end) local updateControlKeyRoateCam = MessageCenter:SubscribeValueBinder('ControlKeyRoateCam', function(val) GameSettings:SetInt("control.key.roate", val) end) local updateControlReverse = MessageCenter:SubscribeValueBinder('ControlReverse', function(val) GameSettings:SetBool("control.reverse", val) end) local resolutions = nil local qualities = nil --设置数据加载 MessageCenter:SubscribeEvent('BtnSettingsGraphicsClick', function () if updateGrFullScreen then updateGrFullScreen:Invoke(GameSettings:GetBool("video.fullScreen", Screen.fullScreen)) end if updateGrCloud then updateGrCloud:Invoke(GameSettings:GetBool("video.cloud", true)) end if updateGrVSync then updateGrVSync:Invoke(GameSettings:GetInt("video.vsync", QualitySettings.vSyncCount) >= 1 and true or false) end GameUIManager:GoPage('PageSettingsGraphics') if(resolutions == nil) then coroutine.resume(coroutine.create( function () Yield(WaitForSeconds(0.5)) --加载分辨率设置 resolutions = Screen.resolutions local GrResolution = MessageCenter:GetComponentInstance('GrResolution'):GetComponent(Ballance2.UI.Core.Controls.Updown) ---@type Updown local currentResolution = Screen.currentResolution for i = 1, #resolutions, 1 do local resolution = resolutions[i] ---@type Resolution GrResolution:AddOption(resolution.width .. 'x' .. resolution.height .. '@' .. resolution.refreshRate) if( currentResolution.width == resolution.width and currentResolution.height == resolution.height and currentResolution.refreshRate == resolution.refreshRate ) then updateGrResolution:Invoke(i - 1) end end end )) end if(qualities == nil) then qualities = { { level = 0, text = I18N.Tr('core.ui.SettingsQualityVeryLow') }, { level = 1, text = I18N.Tr('core.ui.SettingsQualityLow') }, { level = 2, text = I18N.Tr('core.ui.SettingsQualityMedium') }, { level = 3, text = I18N.Tr('core.ui.SettingsQualityHigh') }, { level = 4, text = I18N.Tr('core.ui.SettingsQualityVeryHigh') }, { level = 5, text = I18N.Tr('core.ui.SettingsQualityUltra') }, } local GrQuality = MessageCenter:GetComponentInstance('GrQuality'):GetComponent(Ballance2.UI.Core.Controls.Updown) ---@type Updown local qualitiyCurrent = QualitySettings.GetQualityLevel() for i = 1, #qualities, 1 do local qualitiy = qualities[i] GrQuality:AddOption(qualitiy.text) if qualitiyCurrent == qualitiy.level then updateGrQuality:Invoke(i - 1) end end end end) MessageCenter:SubscribeEvent('BtnSettingsControlsClick', function () if updateControlKeyUp then updateControlKeyUp:Invoke(GameSettings:GetInt("control.key.front", KeyCode.UpArrow)) end if updateControlKeyDown then updateControlKeyDown:Invoke(GameSettings:GetInt("control.key.back", KeyCode.DownArrow)) end if updateControlKeyLeft then updateControlKeyLeft:Invoke(GameSettings:GetInt("control.key.left", KeyCode.LeftArrow)) end if updateControlKeyRight then updateControlKeyRight:Invoke(GameSettings:GetInt("control.key.right", KeyCode.RightArrow)) end if updateControlKeyOverlookCam then updateControlKeyOverlookCam:Invoke(GameSettings:GetInt("control.key.up_cam", KeyCode.Space)) end if updateControlKeyRoateCam then updateControlKeyRoateCam:Invoke(GameSettings:GetInt("control.key.roate", KeyCode.LeftShift)) end if updateControlReverse then updateControlReverse:Invoke(GameSettings:GetBool("control.reverse", false)) end if UNITY_IOS or UNITY_ANDROID then GameUIManager:GoPage('PageSettingsControlsMobile') else GameUIManager:GoPage('PageSettingsControls') end end) MessageCenter:SubscribeEvent('BtnSettingsAudioClick', function () if updateVioceBackground then updateVioceBackground:Invoke(GameSettings:GetFloat("voice.background", 20)) end if updateVoiceUI then updateVoiceUI:Invoke(GameSettings:GetFloat("voice.ui", 80)) end if updateVoiceMain then updateVoiceMain:Invoke(GameSettings:GetFloat("voice.main", 100)) end GameUIManager:GoPage('PageSettingsAudio') end) MessageCenter:SubscribeEvent('BtnSettingsPackageClick', function () GameUIManager:GoPage('PagePackageManager') end) --语言 local applyLanguage = function (lang) GameSettingsManager.GetSettings("core"):SetInt("language", lang) if I18NProvider.GetCurrentLanguage() ~= lang then GameUIManager:GoPage('PageApplyLangDialog') else GameUIManager:BackPreviusPage() end end MessageCenter:SubscribeEvent('BtnSettingsLanguageClick', function () GameUIManager:GoPage('PageLanguage') end) MessageCenter:SubscribeEvent('BtnChineseSimplifiedClick', function () applyLanguage(SystemLanguage.ChineseSimplified) end) MessageCenter:SubscribeEvent('BtnChineseTraditionalClick', function () applyLanguage(SystemLanguage.ChineseTraditional) end) MessageCenter:SubscribeEvent('BtnEnglishClick', function () applyLanguage(SystemLanguage.English) end) MessageCenter:SubscribeEvent('BtnLangBackClick', function () GameUIManager:BackPreviusPage() GameUIManager:BackPreviusPage() end) --设置保存 MessageCenter:SubscribeEvent('BtnSettingsGraphicsBackClick', function () GameSettings:NotifySettingsUpdate("video") GameUIManager:BackPreviusPage() end) MessageCenter:SubscribeEvent('BtnSettingsControlsBackClick', function () GameSettings:NotifySettingsUpdate("control") GameUIManager:BackPreviusPage() end) MessageCenter:SubscribeEvent('BtnSettingsAudioBackClick', function () GameSettings:NotifySettingsUpdate("voice") GameUIManager:BackPreviusPage() end) --重启游戏 MessageCenter:SubscribeEvent('BtnRestartGameClick', function () GameManager.Instance:RestartGame() end) end
43.166008
143
0.758172
40900f28ebaf71116ae0ccbf0122ba3a47617243
717
rb
Ruby
tools/ruby/lib/ruby/gems/1.9.1/gems/albacore-0.2.7/lib/albacore/ndepend.rb
bvsoftware/stripe.net
c07c7c927b5b488f9e677464f74b8b3625d50099
[ "Apache-2.0" ]
33
2015-01-05T17:37:24.000Z
2021-07-07T13:39:11.000Z
tools/ruby/lib/ruby/gems/1.9.1/gems/albacore-0.2.7/lib/albacore/ndepend.rb
bvsoftware/stripe.net
c07c7c927b5b488f9e677464f74b8b3625d50099
[ "Apache-2.0" ]
3
2015-10-02T14:09:56.000Z
2021-05-06T15:57:02.000Z
tools/ruby/lib/ruby/gems/1.9.1/gems/albacore-0.2.7/lib/albacore/ndepend.rb
bvsoftware/stripe.net
c07c7c927b5b488f9e677464f74b8b3625d50099
[ "Apache-2.0" ]
12
2015-02-26T15:48:00.000Z
2022-01-14T07:03:37.000Z
require 'albacore/albacoretask' class NDepend include Albacore::Task include Albacore::RunCommand attr_accessor :project_file def initialize() super() update_attributes Albacore.configuration.ndepend.to_hash end def execute return unless check_command result = run_command @command, create_parameters.join(" ") failure_message = 'Command Failed. See Build Log For Detail' fail_with_message failure_message if !result end def create_parameters params = [] params << File.expand_path(@project_file) return params end def check_command return true if @project_file fail_with_message 'A ndepend project file is required' return false end end
21.088235
64
0.737796
2f578880e435219877337a6b7a5b5606a8f9e9ca
12,482
js
JavaScript
src/views/ARView.js
schulterklopfer/satoshigo
d146849da250b759a241978f2c00bba1eb27e8f5
[ "MIT" ]
null
null
null
src/views/ARView.js
schulterklopfer/satoshigo
d146849da250b759a241978f2c00bba1eb27e8f5
[ "MIT" ]
null
null
null
src/views/ARView.js
schulterklopfer/satoshigo
d146849da250b759a241978f2c00bba1eb27e8f5
[ "MIT" ]
null
null
null
/* * MIT License * * Copyright (c) 2021 schulterklopfer/__escapee__ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILIT * Y, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ // https://sketchfab.com import React, {useCallback, useEffect, useRef} from 'react'; import MapboxGL from '@react-native-mapbox-gl/maps'; import { ARTrackingInitialized, removeCollectedItem, setARCameraPosition, setAreaClientState, setItemClientState, setNotification, } from '../redux/actions'; import { ViroAmbientLight, ViroAnimations, ViroARScene, ViroConstants, ViroMaterials, ViroNode, ViroQuad, } from 'react-viro'; import {useDispatch, useSelector} from 'react-redux'; import { getArCameraPosition as getArCameraPositionSelector, getAreas as getAreasSelector, getAreasChangedAt as getAreasChangedAtSelector, getItemsChangedAt as getItemsChangedAtSelector, getPlayer as getPlayerSelector, } from '../redux/selectors'; import {collectItem} from '../redux/dispatch'; import { AREA_CLIENT_STATE_ACTIVE, AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS, CAMERA_POSITION_UPDATE_THRESHOLD, ITEM_CLIENT_STATE_COLLECTABLE, ITEM_CLIENT_STATE_COLLECTING, MAX_COLLECT_DISTANCE_SQUARED, TOO_FAR_AWAY_TEXTS, } from '../globals'; import itemPositionsInCircle from '../helpers/itemPositionsInCircle'; import coinSound from '../res/smb3_coin.wav'; import bitcoinGfx from '../res/bitcoin_icon.png'; import bitcoinRedGfx from '../res/bitcoin_icon_red.png'; import Sound from 'react-native-sound'; ViroMaterials.createMaterials({ bitcoin: { diffuseTexture: bitcoinGfx, cullMode: 'None', }, bitcoinRed: { diffuseTexture: bitcoinRedGfx, cullMode: 'None', }, }); ViroAnimations.registerAnimations({ loopRotate: {properties: {rotateY: '+=135'}, duration: 1500}, loopRotateFast: {properties: {rotateY: '+=1080'}, duration: 1500}, moveUp: {properties: {positionY: '+=20'}, duration: 1500, easing: 'EaseOut'}, moveUpAndRotate: [['loopRotateFast'], ['moveUp']], fade: {properties: {opacity: 0}, duration: 1000}, }); const ARView = () => { const dispatch = useDispatch(); const areas = useSelector(getAreasSelector); const areasChangedAt = useSelector(getAreasChangedAtSelector); const arCameraPosition = useSelector(getArCameraPositionSelector); const arSceneRef = useRef(); const itemsChangedAt = useSelector(getItemsChangedAtSelector); const player = useSelector(getPlayerSelector); const coinSoundRef = useRef( new Sound(coinSound, Sound.MAIN_BUNDLE, (error) => { if (error) { console.log(error); } }), ); const onTrackingUpdated = useCallback( (state, reason) => { let trackingNormal = false; switch (state) { case ViroConstants.TRACKING_NORMAL: console.log('ViroConstants.TRACKING_NORMAL', reason); trackingNormal = true; break; case ViroConstants.TRACKING_UNAVAILABLE: console.log('ViroConstants.TRACKING_UNAVAILABLE'); if (reason === 1) { console.log('tracking not initialized'); } else { console.log('tracking lost'); } break; case ViroConstants.TRACKING_LIMITED: console.log('ViroConstants.TRACKING_LIMITED', reason); break; } console.log(state, reason); dispatch(ARTrackingInitialized(trackingNormal)); }, // [dispatch, hasCoordinateSystem, deviceBearing, deviceGeoLocation], [dispatch], ); const onCameraTransformUpdate = useCallback( (position) => { if (!position) { return; } const newPosition = [ ((position[0] / CAMERA_POSITION_UPDATE_THRESHOLD) << 0) * CAMERA_POSITION_UPDATE_THRESHOLD, ((position[1] / CAMERA_POSITION_UPDATE_THRESHOLD) << 0) * CAMERA_POSITION_UPDATE_THRESHOLD, ((position[2] / CAMERA_POSITION_UPDATE_THRESHOLD) << 0) * CAMERA_POSITION_UPDATE_THRESHOLD, ]; if ( newPosition[0] !== arCameraPosition[0] || newPosition[1] !== arCameraPosition[1] || newPosition[2] !== arCameraPosition[2] ) { dispatch(setARCameraPosition(newPosition)); } }, [arCameraPosition, dispatch], ); const onItemClick = useCallback( (areaHash, clickedItemHash) => { if ( !areas[areaHash] || !areas[areaHash].items || !areas[areaHash].items[clickedItemHash] ) { return; } const item = areas[areaHash].items[clickedItemHash]; console.log(areaHash, clickedItemHash); if (!item || item._clientState !== ITEM_CLIENT_STATE_COLLECTABLE) { return; } if (!item._isReachable) { dispatch( setNotification({ text: TOO_FAR_AWAY_TEXTS[ Math.floor(Math.random() * TOO_FAR_AWAY_TEXTS.length) ], opacity: 1, color: 'rgba(255,0,0,0.5)', }), ); return; } const value = item.data; //item._clientState = ITEM_CLIENT_STATE_COLLECTING; if (item._clientState !== ITEM_CLIENT_STATE_COLLECTING) { dispatch( setItemClientState( areaHash, clickedItemHash, ITEM_CLIENT_STATE_COLLECTING, ), ); } console.log(JSON.stringify(value, null, 2)); dispatch(collectItem(clickedItemHash, value, player)); dispatch( setNotification({ text: 'Collecting!', opacity: 1, color: 'rgba(0,255,0,0.5)', }), ); coinSoundRef.current.play(); setTimeout(() => { console.log('removing item from list', areaHash, item.hash); dispatch(removeCollectedItem(item.hash, areaHash)); }, 1500); }, [dispatch, player], ); useEffect(() => { if (!arSceneRef.current) { return; } const interval = setInterval(() => { arSceneRef.current.getCameraOrientationAsync().then((orientation) => { onCameraTransformUpdate(orientation.position); }); }, 500); return () => { clearInterval(interval); }; }, [arSceneRef, onCameraTransformUpdate]); useEffect(() => { // check if near center of area. if yes // create locations for items around camera // will be called twice in a row, cause setAreaClientState will // alter areasChangedAt as well which is in the deps area. Second // time no setAreaClientState will be dispatched. This is a bit // flawed. for (const areaHash in areas) { if (!areas.hasOwnProperty(areaHash)) { continue; } const area = areas[areaHash]; if ( (area._clientState & AREA_CLIENT_STATE_ACTIVE) !== AREA_CLIENT_STATE_ACTIVE ) { continue; } if ( (area._clientState & AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS) === AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS ) { continue; } itemPositionsInCircle(area.items, arCameraPosition, area.radius * 0.5); console.log('setting items for area', area.hash); dispatch( setAreaClientState( areaHash, AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS, 'set', ), ); } }, [areasChangedAt, dispatch]); useEffect(() => { if (!arCameraPosition || !areas || areasChangedAt === 0) { return; } for (const areaHash in areas) { if (!areas.hasOwnProperty(areaHash)) { continue; } const area = areas[areaHash]; if ( (area._clientState & AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS) !== AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS ) { continue; } for (const itemHash in area.items) { if (!area.items || !area.items.hasOwnProperty(itemHash)) { continue; } const item = area.items[itemHash]; const itemARPosition = item._arPosition; const deltaFromCamera = [ arCameraPosition[0] - itemARPosition[0], arCameraPosition[1] - itemARPosition[1], arCameraPosition[2] - itemARPosition[2], ]; const squaredDistanceToCamera = deltaFromCamera[0] * deltaFromCamera[0] + deltaFromCamera[1] * deltaFromCamera[1] + deltaFromCamera[2] * deltaFromCamera[2]; item._squaredDistanceToCamera = squaredDistanceToCamera; item._isReachable = squaredDistanceToCamera < MAX_COLLECT_DISTANCE_SQUARED; } } }, [areasChangedAt, itemsChangedAt, arCameraPosition]); return ( <ViroARScene ref={arSceneRef} onTrackingUpdated={onTrackingUpdated}> <ViroAmbientLight color="#ffffff" /> {(areasChangedAt || itemsChangedAt) && Object.entries(areas).map(([areaHash, area]) => { if ( (area._clientState & AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS) !== AREA_CLIENT_STATE_ITEMS_HAVE_POSITIONS ) { return null; } return Object.entries(area.items).map(([itemHash, item]) => { if (!item._arPosition) { return null; } else { if (!item._isReachable) { return ( <ViroNode onClick={ item._clientState === ITEM_CLIENT_STATE_COLLECTABLE ? (e) => { onItemClick(area.hash, item.hash); } : null } key={item.hash} position={item._arPosition} animation={{ name: 'loopRotate', run: true, interruptible: true, loop: true, }}> <ViroQuad materials={['bitcoinRed']} position={[0, 0, 0]} scale={[0.25, 0.25, 0.25]} /> </ViroNode> ); } else { return ( <ViroNode key={item.hash} position={item._arPosition}> <ViroNode onClick={ item._clientState === ITEM_CLIENT_STATE_COLLECTABLE ? (e) => { onItemClick(area.hash, item.hash); } : null } position={[0, 0, 0]} animation={{ name: item._clientState === ITEM_CLIENT_STATE_COLLECTING ? 'loopRotateFast' : item._clientState === ITEM_CLIENT_STATE_COLLECTABLE ? 'loopRotate' : 'moveUpAndRotate', run: true, interruptible: true, loop: true, }}> <ViroQuad materials={['bitcoin']} position={[0, 0, 0]} scale={[0.25, 0.25, 0.25]} /> </ViroNode> </ViroNode> ); } } }); })} </ViroARScene> ); }; export default ARView;
30.443902
83
0.577632
0be525384090ad0ad14283365f4584dc2e84c117
639
dart
Dart
mod-main/client/lib/core/shared_repositories/user_need_repository.dart
winwisely111/packages
590445202c457a87ed68fd383712df319426cc05
[ "Unlicense" ]
11
2020-02-07T20:20:19.000Z
2020-09-11T19:34:10.000Z
mod-main/client/lib/core/shared_repositories/user_need_repository.dart
winwisely111/packages
590445202c457a87ed68fd383712df319426cc05
[ "Unlicense" ]
371
2020-01-10T11:26:03.000Z
2020-09-28T07:18:55.000Z
mod-main/client/lib/core/shared_repositories/user_need_repository.dart
winwisely111/packages
590445202c457a87ed68fd383712df319426cc05
[ "Unlicense" ]
36
2020-01-20T07:30:04.000Z
2020-09-21T14:19:54.000Z
import 'package:mod_main/modules/user_needs/data/user_need_model.dart'; import 'package:mod_main/core/shared_repositories/base_repository.dart'; class UserNeedRepository extends BaseRepository { List<UserNeed> getAll() { // Might look something like this // this.getConnection().query("SELECT * FROM xorgs"); // OR if the client acts as the repository, then this repo will just mirror it // and do this.getConnection().getAllOrgs() return []; } UserNeed getById(String id) { return null; } // Returns a list of Orgs via a matching name List<UserNeed> getByOrgId(String orgId) { return []; } }
27.782609
82
0.70892
e27ac5aceaa0567ccbed2dd8710053b57ed5b9e0
64,510
py
Python
pylurk/performance_tests/tests.py
mglt/pylurk
022ede1af666aeeb62c0c73a9e67aac9e43b5064
[ "BSD-3-Clause" ]
1
2018-06-18T02:33:55.000Z
2018-06-18T02:33:55.000Z
pylurk/performance_tests/tests.py
mglt/pylurk
022ede1af666aeeb62c0c73a9e67aac9e43b5064
[ "BSD-3-Clause" ]
null
null
null
pylurk/performance_tests/tests.py
mglt/pylurk
022ede1af666aeeb62c0c73a9e67aac9e43b5064
[ "BSD-3-Clause" ]
null
null
null
from os.path import join import pkg_resources from pylurk.performance_tests.performance_utils import latency_test, cpu_overhead_test, get_RTT from copy import deepcopy def authentication_methods_test (sheet_name, excel_file, graph_path, thread, request_nb, set_nb): ''' This method performs some latency tests on authentication methods (RSA, RSA_extended and ECDHE) by varying the prf (256 (reference), 384, 512), ECDHE: 'sig_and_hash': ('sha256', 'rsa'),'sig_and_hash': ('sha512', 'rsa'). It saves the results in the specified excel file and plot them in 2 box graphs (one for latency values and another for ratios) :param sheet_name: the excel sheet name to store the results :param excel_file: path to the excel file that will contain the results. The file is created if it does not exists :param graph_path: path to the graphs depicting the results (e.g. results/ (do not start the path with "/") :param thread: True or False depicting if we want to :param request_nb: requests number to test per set. :param set_nb: number of sets to test :return: ''' payload_params = { 'udpLocal':[ { 'type': 'rsa_master', 'column_name': 'rsa_master_ref_prf_sha256_pfs_sha256', # name of column as it appears in excel file, if it contains 'ref', this means that it will be used as ref values 'ref': 'rsa_master_ref_prf_sha256_pfs_sha256', # ref column name when calculating ref values 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_master', 'column_name': 'rsa_master_prf_sha384_pfs_sha256', 'ref': 'rsa_master_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha384', 'freshness_funct': 'sha256' }, { 'type': "rsa_master", 'column_name': 'rsa_master_prf_sha512_pfs_sha256', 'ref': 'rsa_master_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha512', 'freshness_funct': 'sha256' }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_ref_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256' }, { 'type': "rsa_extended_master", 'column_name': 'rsa_extended_master_prf_sha384_pfs_sha256', 'ref': 'rsa_extended_master_ref_prf_sha256_pfs_sha256', 'prf_hash': "sha384", 'freshness_funct': "sha256" }, { 'type': "rsa_extended_master", 'column_name': 'rsa_extended_master_prf_sha512_pfs_sha256', 'ref': 'rsa_extended_master_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha512', 'freshness_funct': 'sha256' }, { 'type': 'ecdhe', 'column_name': 'ecdhe_ref_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, { 'type': 'ecdhe', 'column_name': 'ecdhe_sig_sha512rsa_pfs_sha256', 'ref': 'ecdhe_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha512', 'rsa'), 'freshness_funct': 'sha256' }, ] } data_dir = pkg_resources.resource_filename(__name__, '../data/') connectivity_conf= { 'udpLocal':{ 'type': "udp", # "udp", "local", 'ip_address': "127.0.0.1", 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt') } } graph_params = {'title': '', 'xlabel': 'Authentication Methods', 'ylabel': 'Latency (sec)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'lower right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ {'tick_label': 'RSA', # label on xaxis depicting all the data in data 'color': ['white','white'],#['blue', 'green'], # color of the box of each data in data, set 'White if no color is desired 'hatch': ['*', 'o'], # pattern of each box in data. Set '' if no hatch is desired. It can take one of the following patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.', '/') 'data': ['rsa_master_prf_sha384_pfs_sha256', 'rsa_master_prf_sha512_pfs_sha256'], # colummn name of the data to plot as defined in excel sheet 'legends': ['prf = sha384', 'prf = sha512'] # legend corresponding to each data, set None if no legend to be added to a specified data or provide an empty list }, {'tick_label': 'RSA_Extended', 'color':['white','white'],# ['blue', 'green'], # same color and hatch as previous group to have same legend 'hatch': ['*', 'o'], 'data': ['rsa_extended_master_prf_sha384_pfs_sha256', 'rsa_extended_master_prf_sha512_pfs_sha256'], 'legends': [], # empty list to have one legend per color as specified in previous group }, {'tick_label': 'ECDHE', 'color': ['white'],#['green'], 'hatch': ['o'], 'data': ['ecdhe_sig_sha512rsa_pfs_sha256'], 'legends': [], }, ]} latency_test (payload_params, connectivity_conf, graph_params, sheet_name, graph_path, excel_file = excel_file, thread=thread, request_nb_list = [request_nb], set_nb =set_nb) def mechanism_overhead_pfs_test (sheet_name, excel_file, graph_path, thread, request_nb, set_nb): ''' This method performs some latency tests on authentication methods (RSA, RSA_extended and ECDHE) by varying the pfs (null (reference), 256), ECDHE: 'sig_and_hash': ('sha256', 'rsa'). It saves the results in the specified excel file and plot them in 2 box graphs (one for latency values and another for ratios) :param sheet_name: the excel sheet name to store the results :param excel_file: path to the excel file that will contain the results. The file is created if it does not exists :param graph_path: path to the graphs depicting the results (e.g. results/ (do not start the path with "/") :param thread: True or False depicting if we want to :param request_nb: requests number to test per set. :param set_nb: number of sets to test :return: ''' payload_params = { 'udpLocal': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_ref_prf_sha256_pfs_null', 'ref': 'rsa_master_ref_prf_sha256_pfs_null', 'prf_hash': 'sha256', 'freshness_funct': 'null', }, { 'type': 'rsa_master', 'column_name': 'rsa_master_prf_sha256_pfs_sha256', 'ref': 'rsa_master_ref_prf_sha256_pfs_null', 'prf_hash': 'sha256', 'freshness_funct': 'sha256' }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_ref_prf_sha256_pfs_null', 'ref': 'rsa_extended_master_ref_prf_sha256_pfs_null', 'prf_hash': 'sha256', 'freshness_funct': 'null' }, { 'type': "rsa_extended_master", 'column_name': 'rsa_extended_master_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_ref_prf_sha256_pfs_null', 'prf_hash': "sha256", 'freshness_funct': "sha256" }, { 'type': 'ecdhe', 'column_name': 'ecdhe_ref_sig_sha256rsa_pfs_null', 'ref': 'ecdhe_ref_sig_sha256rsa_pfs_null', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'null' }, { 'type': 'ecdhe', 'column_name': 'ecdhe_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_ref_sig_sha256rsa_pfs_null', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ] } data_dir = pkg_resources.resource_filename(__name__, '../data/') connectivity_conf = { 'udpLocal': { 'type': "udp", # "udp", "local", 'ip_address': "127.0.0.1", 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt') } } graph_params = {'title': '', 'xlabel': 'Authentication Methods', 'ylabel': 'Latency (sec)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'lower right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ {'tick_label': 'RSA', # label on xaxis depicting all the data in data 'color': ['white'], # color of the box of each data in data, set 'White if no color is desired 'hatch': ['*'], # pattern of each box in data. Set '' if no hatch is desired. It can take one of the following patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.', '/') 'data': ['rsa_master_prf_sha256_pfs_sha256'], # colummn name of the data to plot as defined in excel sheet 'legends': ['pfs = sha256'] # legend corresponding to each data, set None if no legend to be added to a specified data or provide an empty list }, {'tick_label': 'RSA_Extended', 'color': ['white'], # same color and hatch as previous group to have same legend 'hatch': ['*'], 'data': ['rsa_extended_master_prf_sha256_pfs_sha256'], 'legends': [], # empty list to have one legend per color as specified in previous group }, {'tick_label': 'ECDHE', 'color': ['white'], 'hatch': ['*'], 'data': ['ecdhe_sig_sha256rsa_pfs_sha256'], 'legends': [], }, ]} latency_test(payload_params, connectivity_conf, graph_params, sheet_name, graph_path, excel_file=excel_file, thread=thread, request_nb_list=[request_nb], set_nb=set_nb) def mechanism_overhead_poh_test (sheet_name, excel_file, graph_path, thread, request_nb, set_nb): ''' This method performs some latency tests to check the overhead of the proof of handshake on authentication methods (RSA, RSA_extended) It saves the results in the specified excel file and plot them in 2 box graphs (one for latency values and another for ratios) :param sheet_name: the excel sheet name to store the results :param excel_file: path to the excel file that will contain the results. The file is created if it does not exists :param graph_path: path to the graphs depicting the results (e.g. results/ (do not start the path with "/") :param thread: True or False depicting if we want to :param request_nb: requests number to test per set. :param set_nb: number of sets to test :return: ''' payload_params = { 'udpLocal': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_prf_sha256_pfs_sha256', 'ref': 'rsa_master_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256' }, { 'type': 'rsa_master_with_poh', 'column_name': 'rsa_master_with_poh_prf_sha256_pfs_sha256', 'ref': 'rsa_master_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256' }, { 'type': "rsa_extended_master", 'column_name': 'rsa_extended_master_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_prf_sha256_pfs_sha256', 'prf_hash': "sha256", 'freshness_funct': "sha256" }, { 'type': "rsa_extended_master_with_poh", 'column_name': 'rsa_extended_master_with_poh_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_prf_sha256_pfs_sha256', 'prf_hash': "sha256", 'freshness_funct': "sha256" }, ] } data_dir = pkg_resources.resource_filename(__name__, '../data/') connectivity_conf = { 'udpLocal': { 'type': "udp", # "udp", "local", 'ip_address': "127.0.0.1", 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt') } } graph_params = {'title': '', 'xlabel': 'Authentication Methods', 'ylabel': 'Latency (sec)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'lower right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ {'tick_label': 'RSA', # label on xaxis depicting all the data in data 'color': ['white'], #['blue', 'green'], # color of the box of each data in data, set 'White if no color is desired 'hatch': ['*'], # pattern of each box in data. Set '' if no hatch is desired. It can take one of the following patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.', '/') 'data': ['rsa_master_with_poh_prf_sha256_pfs_sha256'], # colummn name of the data to plot as defined in excel sheet 'legends': [ 'With PoH'] # legend corresponding to each data, set None if no legend to be added to a specified data or provide an empty list }, {'tick_label': 'RSA_Extended', 'color': ['white'],#['blue' 'green'], # same color and hatch as previous group to have same legend 'hatch': ['*'], 'data': ['rsa_extended_master_with_poh_prf_sha256_pfs_sha256'], 'legends': [], # empty list to have one legend per color as specified in previous group }, ]} latency_test(payload_params, connectivity_conf, graph_params, sheet_name, graph_path, excel_file=excel_file, thread=thread, request_nb_list=[request_nb], set_nb=set_nb) def mechanism_overhead_poo_test (sheet_name, excel_file, graph_path, thread, request_nb, set_nb): ''' This method performs some latency tests to check the overhead of the proof of ownership on ECDHE by varying the poo_prf (null (reference), 128, 256), It saves the results in the specified excel file and plot them in 2 box graphs (one for latency values and another for ratios) :param sheet_name: the excel sheet name to store the results :param excel_file: path to the excel file that will contain the results. The file is created if it does not exists :param graph_path: path to the graphs depicting the results (e.g. results/ (do not start the path with "/") :param thread: True or False depicting if we want to :param request_nb: requests number to test per set. :param set_nb: number of sets to test :return: ''' payload_params = { 'udpLocal': [ { 'type': 'ecdhe', 'column_name': 'ecdhe_ref_poo_null_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_ref_poo_null_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256', 'poo_prf': ["null"], }, { 'type': 'ecdhe', 'column_name': 'ecdhe_poo_sha256_128_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_ref_poo_null_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256', 'poo_prf': [ "sha256_128"], }, { 'type': 'ecdhe', 'column_name': 'ecdhe_poo_sha256_256_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_ref_poo_null_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256', 'poo_prf': [ "sha256_256"], }, ] } data_dir = pkg_resources.resource_filename(__name__, '../data/') connectivity_conf = { 'udpLocal': { 'type': "udp", # "udp", "local", 'ip_address': "127.0.0.1", 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt') } } graph_params = {'title': '', 'xlabel': 'PoO', 'ylabel': 'Latency (sec)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'lower right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ {'tick_label': 'sha256_128', # label on xaxis depicting all the data in data 'color': ['white'],#['blue'], # color of the box of each data in data, set 'White if no color is desired 'hatch': ['*'], # pattern of each box in data. Set '' if no hatch is desired. It can take one of the following patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.', '/') 'data': ['ecdhe_poo_sha256_128_sig_sha256rsa_pfs_sha256'], # colummn name of the data to plot as defined in excel sheet 'legends': ['With PoO'] # legend corresponding to each data, set None if no legend to be added to a specified data or provide an empty list }, {'tick_label': 'sha256_256', 'color': ['white'],#['blue' ], 'hatch': ['*'], 'data': ['ecdhe_poo_sha256_256_sig_sha256rsa_pfs_sha256'], 'legends': None, }, ]} latency_test(payload_params, connectivity_conf, graph_params, sheet_name, graph_path, excel_file=excel_file, thread=thread, request_nb_list=[request_nb], set_nb=set_nb) def transport_protocol_test( sheet_name, excel_file, graph_path, thread, request_nb, set_nb, server_ip,remote_user, server_password): ''' This performs the transport protocol tests between a client and a server :param sheet_name: the excel sheet name to store the results :param excel_file: path to the excel file that will contain the results. The file is created if it does not exists :param graph_path: path to the graphs depicting the results (e.g. results/ (do not start the path with "/") :param thread: True or False depicting if we want to :param request_nb: requests number to test per set. :param set_nb: number of sets to test :param server_ip: Ip of the server to which we want to connect remotly :param remote_user: username of remote server :param server_password: password of remote server :return: ''' payload_params = { 'udpLocal':[ { 'type': 'rsa_master', 'column_name': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'udp': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_udp_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_udp_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_udp_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'tcp': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_tcp_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_tcp_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_tcp_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'http': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_http_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_http_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_http_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], } #define connectivity conf fo client and server data_dir = pkg_resources.resource_filename(__name__, '../data/') conf = { 'type': "tcp", 'ip_address': server_ip, 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt'), 'remote_user':remote_user, 'password': server_password, 'path_to_erilurk':"Desktop/HyameServer/projects/erilurk" } connectivity_conf = { # ensure local connection for udlLocal (do not set remote_user 'udpLocal': { 'ip_address': '127.0.0.1', 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt'), } } for type in [ 'udp','tcp', 'http']: connectivity_conf[type] = deepcopy(conf) connectivity_conf[type]['type'] = type graph_params = {'title': '', 'xlabel': 'Athentication Methods', 'ylabel': 'Latency (sec)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'lower right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ {'tick_label': 'RSA', # label on xaxis depicting all the data in data 'color': ['white','white','white'],#['blue', 'green', 'orange'], # color of the box of each data in data, set 'White if no color is desired 'hatch': [ '*','/', 'o'], # pattern of each box in data. Set '' if no hatch is desired. It can take one of the following patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.', '/') 'data': [ 'rsa_master_udp_prf_sha256_pfs_sha256', 'rsa_master_tcp_prf_sha256_pfs_sha256', 'rsa_master_http_prf_sha256_pfs_sha256'], # colummn name of the data to plot as defined in excel sheet 'legends': ['UDP', 'TCP', 'HTTP'] # legend corresponding to each data, set None if no legend to be added to a specified data or provide an empty list }, {'tick_label': 'RSA_Extended', 'color': ['white','white','white'],#['blue', 'green', 'orange'], # same color and hatch as previous group to have same legend 'hatch': ['*','/', 'o'], 'data': ['rsa_extended_master_udp_prf_sha256_pfs_sha256','rsa_extended_master_tcp_prf_sha256_pfs_sha256','rsa_extended_master_http_prf_sha256_pfs_sha256'], 'legends': [], # empty list to have one legend per color as specified in previous group }, {'tick_label': 'ECDHE', 'color': ['white','white','white'],#['blue', 'green', 'orange'], 'hatch': ['*','/', 'o'], 'data': ['ecdhe_udp_sig_sha256rsa_pfs_sha256', 'ecdhe_tcp_sig_sha256rsa_pfs_sha256', 'ecdhe_http_sig_sha256rsa_pfs_sha256'], 'legends': [], }, ]} latency_test(payload_params, connectivity_conf, graph_params, sheet_name, graph_path, excel_file=excel_file, thread=thread, request_nb_list=[request_nb], set_nb=set_nb, remote_connection=True) def security_overhead_test( sheet_name, excel_file, graph_path, thread, request_nb, set_nb, server_ip,remote_user, server_password): ''' This performs the security overhead latency tests (tcp, tcp+tls, http, https) between a client and a server :param sheet_name: the excel sheet name to store the results :param excel_file: path to the excel file that will contain the results. The file is created if it does not exists :param graph_path: path to the graphs depicting the results (e.g. results/ (do not start the path with "/") :param thread: True or False depicting if we want to :param request_nb: requests number to test per set. :param set_nb: number of sets to test :param server_ip: Ip of the server to which we want to connect remotly :param remote_user: username of remote server :param server_password: password of remote server :return: ''' payload_params = { 'tcp+tls': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_tcptls_prf_sha256_pfs_sha256', 'ref': 'rsa_master_tcp_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, ], 'tcp': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_tcp_prf_sha256_pfs_sha256', 'ref': 'rsa_master_tcp_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, ], 'http': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_http_prf_sha256_pfs_sha256', 'ref': 'rsa_master_http_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, ], 'https': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_https_prf_sha256_pfs_sha256', 'ref': 'rsa_master_http_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, ], } #define connectivity conf fo client and server data_dir = pkg_resources.resource_filename(__name__, '../data/') conf = { 'type': "tcp", 'ip_address': server_ip, 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt'), 'remote_user':remote_user, 'password': server_password, 'path_to_erilurk':"Desktop/HyameServer/projects/erilurk" } connectivity_conf = {} for type in ['tcp', 'tcp+tls', 'http', 'https']: connectivity_conf[type] = deepcopy(conf) connectivity_conf[type]['type'] = type graph_params = {'title': '', 'xlabel': 'Transport Protocol', 'ylabel': 'Latency (sec)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'lower right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ {'tick_label': 'TCP+TLS', # label on xaxis depicting all the data in data 'color': ['white'],#['blue'], # color of the box of each data in data, set 'White if no color is desired 'hatch': ['*'], # pattern of each box in data. Set '' if no hatch is desired. It can take one of the following patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.', '/') 'data': ['rsa_master_tcptls_prf_sha256_pfs_sha256'], # colummn name of the data to plot as defined in excel sheet 'legends': [] # legend corresponding to each data, set None if no legend to be added to a specified data or provide an empty list }, {'tick_label': 'HTTPS', 'color': ['white'],#['blue'], # same color and hatch as previous group to have same legend 'hatch': ['*'], 'data': ['rsa_master_https_prf_sha256_pfs_sha256'], 'legends': [], # empty list to have one legend per color as specified in previous group }, ]} latency_test(payload_params, connectivity_conf, graph_params, sheet_name, graph_path, excel_file=excel_file, thread=thread, request_nb_list=[request_nb], set_nb=set_nb, remote_connection = True) def multithreading_test( sheet_name, excel_file, graph_path, request_nb_list, set_nb, server_ip,remote_user, server_password, thread=True): ''' This method performs a multithreading tests using different transport protocol (udplocal(reference), udp, tcp, http) between a client and a server :param sheet_name: the excel sheet name to store the results :param excel_file: path to the excel file that will contain the results. The file is created if it does not exists :param graph_path: path to the graphs depicting the results (e.g. results/ (do not start the path with "/") :param thread: True or False depicting if we want to :param request_nb_list: list of requests number to test per set. :param set_nb: number of sets to test :param server_ip: Ip of the server to which we want to connect remotly :param remote_user: username of remote server :param server_password: password of remote server :return: ''' # define connectivity conf fo client and server data_dir = pkg_resources.resource_filename(__name__, '../data/') conf = { 'type': "tcp", 'ip_address': server_ip, 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt'), 'remote_user':remote_user, 'password': server_password, 'path_to_erilurk':"Desktop/HyameServer/projects/erilurk" } connectivity_conf = { #ensure local connection for udlLocal (do not set remote_user 'udpLocal':{ 'ip_address': '127.0.0.1', 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt'), } } for type in [ 'udp','tcp', 'http']: connectivity_conf[type] = deepcopy(conf) connectivity_conf[type]['type'] = type graph_params = {'title': '', 'xlabel': 'Number of requests', 'ylabel': 'Latency (sec)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'upper right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ ] } payload_params = { 'udpLocal': [], 'udp': [], 'tcp': [], 'http': [], } count=0 for request_nb in request_nb_list: # start by setting payload parameters udplocal_param = { 'type': 'rsa_master', 'column_name': 'udpLocal_ref_' + str(request_nb) + '_request', 'ref': 'udpLocal_ref_' + str(request_nb_list[0]) + '_request', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', } udp_param = { 'type': 'rsa_master', 'column_name': 'udp_ref_' + str(request_nb) + '_request', 'ref': 'udp_ref_' + str(request_nb_list[0]) + '_request', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', } tcp_param = { 'type': 'rsa_master', 'column_name': 'tcp_ref_' + str(request_nb) + '_request', 'ref': 'tcp_ref_' + str(request_nb_list[0]) + '_request', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', } http_param = { 'type': 'rsa_master', 'column_name': 'http_ref_' + str(request_nb) + '_request', 'ref': 'http_ref_' + str(request_nb_list[0]) + '_request', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', } payload_params['udpLocal'].append(udplocal_param) payload_params['udp'].append(udp_param) payload_params['tcp'].append(tcp_param) payload_params['http'].append(http_param) # skip reference (do not plot reference) if request_nb == request_nb_list[0]: continue elif count ==1:#add the legends once group = {'tick_label': request_nb, 'color': ['white','white','white','white' ],#['blue', 'green', 'orange', 'cyan'], 'hatch': ['*','/', 'o', 'x'], 'data': ['udpLocal_ref_' + str(request_nb) + '_request', 'udp_ref_' + str(request_nb) + '_request', 'tcp_ref_' + str(request_nb) + '_request', 'http_ref_' + str(request_nb) + '_request'], 'legends': ['Local', 'UDP', 'TCP', 'HTTP'] } else: group = {'tick_label': request_nb, 'color': ['white', 'white', 'white', 'white'], # ['blue', 'green', 'orange', 'cyan'], 'hatch': ['*', '/', 'o', 'x'], 'data': ['udpLocal_ref_' + str(request_nb) + '_request', 'udp_ref_' + str(request_nb) + '_request', 'tcp_ref_' + str(request_nb) + '_request', 'http_ref_' + str(request_nb) + '_request'], 'legends': [] } # add groups to display in the graph graph_params['groups'].append(group) count+=1 latency_test(payload_params, connectivity_conf, graph_params, sheet_name, graph_path, excel_file=excel_file, thread=thread, request_nb_list=request_nb_list, set_nb=set_nb, remote_connection=True) def cpu_overhead_protocols_test( file_path, total_requests_persec, requests_per_client, iterations, wait_time, server_ip,remote_user, server_password, cpuNb, thread=False): ''' This method will check the cpu overhead on the client and server side with TOp command for all transport protocols and authentication methods. The top results are put in a file based on the pauload_params[column_name] _server or _client based on the client or server test results the results should be averaged over total_requests_persec on iterations (as nb of sets). First 2 iterations should be disgarded :param file_path: path to place te file with the top results :param total_requests_persec:total requests to be sent per sec by all the clients :param requests_per_client: number of requests that a client should send per second. This includes the resolve time+waiting time to reach 1 sec :param total_time: total time of each test in payload_params. After this time the client and server processes are killed :param iterations: number of iterations that the top command should performs :param wait_time: time to wait between top command iterations :param server_ip: Ip of the server to which we want to connect remotley :param remote_user: username of remote server :param server_password: password of remote server :param cpuNb: nb of cpu to average over for one iteration of the top :param thread: true if multi threading should be used :return: ''' # define connectivity conf fo client and server data_dir = pkg_resources.resource_filename(__name__, '../data/') conf = { 'type': "tcp", 'ip_address': server_ip, 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt'), 'remote_user':remote_user, 'password': server_password, 'path_to_erilurk':"Desktop/HyameServer/projects/erilurk" } connectivity_conf = { #ensure local connection for udlLocal (do not set remote_user 'udpLocal':{ 'ip_address': '127.0.0.1', 'port': 6789, 'key': join(data_dir, 'key_tls12_rsa_server.key'), 'cert': join(data_dir, 'cert_tls12_rsa_server.crt'), 'key_peer': join(data_dir, 'key_tls12_rsa_client.key'), 'cert_peer': join(data_dir, 'cert_tls12_rsa_client.crt'), } } for type in [ 'udplocal','udp_freshnull','udp_fresh256','tcp', 'http', 'https', 'tcp+tls']: connectivity_conf[type] = deepcopy(conf) if type in ['udp_freshnull','udp_fresh256','udpLocal']: connectivity_conf[type]['type'] = 'udp' else: connectivity_conf[type]['type'] = type payload_params = { 'udpLocal':[ { 'type': 'rsa_master', 'column_name': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'udp_fresh256': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_udp_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_udp_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_udp_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'udp_freshnull': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_udp_prf_sha256_pfs_null', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'null', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_udp_prf_sha256_pfs_null', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'null', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_udp_sig_sha256rsa_pfs_null', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'null' }, ], 'tcp': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_tcp_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_tcp_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_tcp_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'http': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_http_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_http_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_http_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'https': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_https_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_https_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_https_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], 'tcp+tls': [ { 'type': 'rsa_master', 'column_name': 'rsa_master_tcptls_prf_sha256_pfs_sha256', 'ref': 'rsa_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'rsa_extended_master', 'column_name': 'rsa_extended_master_tcptls_prf_sha256_pfs_sha256', 'ref': 'rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256', 'prf_hash': 'sha256', 'freshness_funct': 'sha256', }, { 'type': 'ecdhe', 'column_name': 'ecdhe_tcptls_sig_sha256rsa_pfs_sha256', 'ref': 'ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256', 'sig_and_hash': ('sha256', 'rsa'), 'freshness_funct': 'sha256' }, ], } graph_params = {'title': '', 'xlabel': 'Athentication Methods', 'ylabel': 'Cpu Overhead (%)', 'box_width': 0.5, # width of each box in the graph 'start_position': 1, # the position of the first box to draw 'show_grid': True, # show grid in the graph 'legend': { 'location': 'upper right', # location of the legend. Can take one of the following values:'best','upper right','upper left','lower left','lower right','right','center left','center right','lower center','upper center','center' 'font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', } }, 'font_properties': { # font properties of title, ylabel and xlabel # 'fontname':'Calibri', 'size': '14', 'weight': 'bold', }, 'ticks_font_properties': { # 'fontname':'Calibri', 'size': '12', # 'weight': 'bold', }, # data to plot grouped into multiple group. if no group is desired, a dictionary for each data to plot should be added 'groups': [ {'tick_label': 'RSA', # label on xaxis depicting all the data in data 'color': ['white', 'white', 'white','white', 'white', 'white'], # ['blue', 'green', 'orange'], # color of the box of each data in data, set 'White if no color is desired 'hatch': ['*', '/', 'o', '-','x','/'], # pattern of each box in data. Set '' if no hatch is desired. It can take one of the following patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.', '/') 'data': ['rsa_master_udpLocal_ref_prf_sha256_pfs_sha256','rsa_master_udp_prf_sha256_pfs_sha256','rsa_master_tcp_prf_sha256_pfs_sha256','rsa_master_tcptls_prf_sha256_pfs_sha256', 'rsa_master_http_prf_sha256_pfs_sha256', 'rsa_master_https_prf_sha256_pfs_sha256'], # colummn name of the data to plot as defined in excel sheet 'legends': ['UDP_Local','UDP', 'TCP','TCP+TLS', 'HTTP', 'HTTPS'] # legend corresponding to each data, set None if no legend to be added to a specified data or provide an empty list }, {'tick_label': 'RSA_Extended', 'color': ['white', 'white', 'white','white', 'white', 'white'], # ['blue', 'green', 'orange'], # same color and hatch as previous group to have same legend 'hatch': ['*', '/', 'o', '-','x','/'], 'data': ['rsa_extended_master_udpLocal_ref_prf_sha256_pfs_sha256','rsa_extended_master_udp_prf_sha256_pfs_sha256','rsa_extended_master_tcp_prf_sha256_pfs_sha256','rsa_extended_master_tcptls_prf_sha256_pfs_sha256', 'rsa_extended_master_http_prf_sha256_pfs_sha256', 'rsa_extended_master_https_prf_sha256_pfs_sha256'], 'legends': [], # empty list to have one legend per color as specified in previous group }, {'tick_label': 'ECDHE', 'color': ['white', 'white', 'white','white', 'white', 'white'], # ['blue', 'green', 'orange'], 'hatch': ['*', '/', 'o', '-','x','/'], 'data': ['ecdhe_udpLocal_ref_sig_sha256rsa_pfs_sha256','ecdhe_udp_sig_sha256rsa_pfs_sha256','ecdhe_tcp_sig_sha256rsa_pfs_sha256','ecdhe_tcptls_sig_sha256rsa_pfs_sha256','ecdhe_http_sig_sha256rsa_pfs_sha256','ecdhe_https_sig_sha256rsa_pfs_sha256'], 'legends': [], }, ]} cpu_overhead_test(payload_params, connectivity_conf, graph_params, file_path, total_requests_persec, requests_per_client, iterations, wait_time, cpuNb, thread=thread, remote_connection=True) if __name__=="__main__": thread = False request_nb =1 set_nb = 50 results_dir = 'results/' graph_dir = results_dir+'graphs/' server_ip ='192.168.0.108'#.108 remote_user='xubuntu_server' password = 'xubuntu6789' print("--------------------Starting Security Overhead Test----------------------------") security_overhead_test('security', results_dir + 'security_overhead.xlsx', graph_dir, thread, request_nb, set_nb, server_ip, remote_user, password) print("--------------------Starting Transport Protocol Test----------------------------") transport_protocol_test('transport', results_dir+'transport_protocol.xlsx', graph_dir, thread, request_nb, set_nb,server_ip, remote_user, password) thread = True request_nb_list = [1, 100, 200, 400, 600, 800, 1000] print("--------------------Starting Multithreading Test----------------------------") multithreading_test('multithread', results_dir+'multithreading.xlsx', graph_dir, request_nb_list, set_nb, server_ip, remote_user, password, thread=thread) thread =False print("--------------------Starting Authentication Methods Test----------------------------") authentication_methods_test('authentication', results_dir + 'authentication_methods.xlsx', graph_dir, thread, request_nb, set_nb) print("--------------------Starting Mechanism Overhead pfs Test----------------------------") mechanism_overhead_pfs_test('pfs', results_dir + 'mechanism_overhead_pfs.xlsx', graph_dir, thread, request_nb, set_nb) print("--------------------Starting Mechanism Overhead poh Test----------------------------") mechanism_overhead_poh_test('poh', results_dir + 'mechanism_overhead_poh.xlsx', graph_dir, thread, request_nb, set_nb) print("--------------------Starting Mechanism Overhead poo Test----------------------------") mechanism_overhead_poo_test('poo', results_dir + 'mechanism_overhead_poo.xlsx', graph_dir, thread, request_nb, set_nb) total_requests_persec = 100 requests_per_client = 1 iterations = 50 wait_time = 5#wait 5 sec after each iteration cpuNb=8 thread = True cpu_overhead_protocols_test(results_dir, total_requests_persec, requests_per_client, iterations, wait_time, server_ip, remote_user, password, cpuNb, thread=thread)
49.623077
272
0.519749
3fc9d01ef589a4388c23481771e481976e984ffa
347
rb
Ruby
lib/hoze/interface/source.rb
pluce/hoze
282e1add1ab9a26d93ab73d5b940f26898eccf0b
[ "MIT" ]
1
2018-03-08T17:15:57.000Z
2018-03-08T17:15:57.000Z
lib/hoze/interface/source.rb
pluce/hoze
282e1add1ab9a26d93ab73d5b940f26898eccf0b
[ "MIT" ]
null
null
null
lib/hoze/interface/source.rb
pluce/hoze
282e1add1ab9a26d93ab73d5b940f26898eccf0b
[ "MIT" ]
null
null
null
module Hoze class Source attr_reader :engine, :channel, :key def listen &block raise NotImplementedError.new("This source implementation doesn't support listen method.") end def push payload, metadata raise NotImplementedError.new("This source implementation doesn't support push method.") end end end
20.411765
96
0.708934
57eb958bb28bcc82582c7aaea2876cbbdbae7fe7
1,516
php
PHP
resources/views/welcome.blade copy.php
urufudev/Asistencia-DREA
eaf0abf904b18c051afcdef7358e07fbc3d956e6
[ "Apache-2.0" ]
null
null
null
resources/views/welcome.blade copy.php
urufudev/Asistencia-DREA
eaf0abf904b18c051afcdef7358e07fbc3d956e6
[ "Apache-2.0" ]
null
null
null
resources/views/welcome.blade copy.php
urufudev/Asistencia-DREA
eaf0abf904b18c051afcdef7358e07fbc3d956e6
[ "Apache-2.0" ]
null
null
null
@extends('layouts.fullLayoutMaster') {{-- page title --}} @section('title','Inicio') {{-- page scripts --}} @section('page-styles') <link rel="stylesheet" type="text/css" href="{{asset('css/pages/coming-soon.css')}}"> @endsection @section('content') <!-- coming soon start --> <section> <div class="row flexbox-container"> <div class="col-md-6 col-12 text-center p-3"> <h1 class="error-title mb-2">Sistema de Administración de Personal</h1> <p class="mb-1">Dirección Regional de Educación de Ayacucho </p> <div class="col-12"> <!-- Buttons with Icon --> <a href="{{route('login')}}" class="btn btn-primary mr-1 mb-1"> <i class="bx bx-exit"></i> <span class="align-middle ml-25">Iniciar Sesión</span></a> <a href="{{route('register')}}" class="btn btn-secondary mr-1 mb-1"> <i class="bx bx-building"></i> <span class="align-middle ml-25"> Registrarse</span></a> </div> </div> <div class="col-md-6 d-lg-block d-none p-2"> <img class="img-fluid cs-effect cs-effect-bounce" src="{{asset('images/pages/comingsoon.png')}}" alt="coming soon" width="650"> </div> </div> </section> <!--/ coming soon end --> @endsection {{-- vendor scripts --}} @section('vendor-scripts') <script src="{{asset('vendors/js/coming-soon/jquery.countdown.min.js')}}"></script> @endsection {{-- page scripts --}} @section('page-scripts') <script src="{{asset('js/scripts/pages/coming-soon.js')}}"></script> @endsection
34.454545
133
0.610818
db8000e64171d11cf30de411be979638ff80cf1d
6,153
php
PHP
resources/views/layouts/master.blade.php
Zuhaily98/third-day-sam
4f990687d0a73b5c5b9b8ca0e5806541c823f4c9
[ "MIT" ]
null
null
null
resources/views/layouts/master.blade.php
Zuhaily98/third-day-sam
4f990687d0a73b5c5b9b8ca0e5806541c823f4c9
[ "MIT" ]
2
2021-03-09T23:40:24.000Z
2021-05-10T19:45:42.000Z
resources/views/layouts/master.blade.php
Zuhaily98/third-day-sam
4f990687d0a73b5c5b9b8ca0e5806541c823f4c9
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <!-- CSRF Token --> <meta name="csrf-token" content="{{ csrf_token() }}"> <!-- Scripts --> <script src="{{ asset('js/app.js') }}" defer></script> <!-- Fonts --> <link rel="dns-prefetch" href="//fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> <!-- Styles --> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> <title>Hey There!</title> <!-- Custom styles for this template --> <link href={{ url("css/blog-home.css") }} rel="stylesheet"> </head> <body> <!-- Navigation --> <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"> <div class="container"> <a class="navbar-brand" href="#">Say Anything @Zuhailyyy</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarResponsive"> <ul class="navbar-nav ml-auto"> <!-- <li class="nav-item active"> <a class="nav-link" href="#">Home <span class="sr-only">(current)</span> </a> </li> --> <!-- <li class="nav-item"> <a class="nav-link" href="#">About</a> </li> --> <!-- Authentication Links --> @guest <li class="nav-item"> <a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a> </li> @if (Route::has('register')) <li class="nav-item"> <a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a> </li> @endif @else <!-- <li class="nav-item"> <a class="nav-link" href="{{ route('blog:index') }}">{{ __('All Blog') }}</a> </li> --> <li class="nav-item"> <a class="nav-link" href="#">{{ Auth::user()->name }}</a> </li> <li class="nav-item"> <a class="nav-link" href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">{{ __('Logout (Tubek)') }}</a> <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;"> @csrf </form> </li> @endguest </ul> </div> </div> </nav> <!-- Page Content --> <div class="container"> <div class="row"> <!-- Blog Entries Column --> <div class="col-md-10"> <h1 class="my-4">Happy New Year! <img src="https://img1.picmix.com/output/stamp/normal/0/4/3/4/534340_49c64.gif" height="80px" width="80px"> <!-- <br><br><img src="https://66.media.tumblr.com/tumblr_m06n5yxh7e1qcwph1o1_500.gifv" height="120px" width="220px"> --> <br><small>Feel free to share your new year's resolution, wishes or maybe some advice for me<img src="https://d1j8pt39hxlh3d.cloudfront.net/uploads/face_throwing_a_kiss_256_1.gif" height="40px" width="40px"></small> </h1> <!-- <img src="https://i.gifer.com/YQ.gif" height="30px" width="30px"> --> <!-- <img src="/public/storage/{{ "staff.jpg" }}" height="30px" width="30px" /> --> <!-- Blog Post --> @yield('content') </div> <!-- Sidebar Widgets Column --> <div class="col-md-4"> <!-- Search Widget <div class="card my-4"> <h5 class="card-header">Search</h5> <div class="card-body"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search for..."> <span class="input-group-btn"> <button class="btn btn-secondary" type="button">Go!</button> </span> </div> </div> </div> --> <!-- Categories Widget --> <!-- <div class="card my-4"> <h5 class="card-header">Categories</h5> <div class="card-body"> <div class="row"> <div class="col-lg-6"> <ul class="list-unstyled mb-0"> <li> <a href="#">Web Design</a> </li> <li> <a href="#">HTML</a> </li> <li> <a href="#">Freebies</a> </li> </ul> </div> <div class="col-lg-6"> <ul class="list-unstyled mb-0"> <li> <a href="#">JavaScript</a> </li> <li> <a href="#">CSS</a> </li> <li> <a href="#">Tutorials</a> </li> </ul> </div> </div> </div> </div> --> <!-- Side Widget --> <!-- <div class="card my-4"> <h5 class="card-header">Side Widget</h5> <div class="card-body"> You can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers! </div> </div> --> </div> </div> <!-- /.row --> </div> <!-- /.container --> <!-- Footer --> <!-- <footer class="py-5 bg-dark"> <div class="container"> <p class="m-0 text-center text-white">Copyright &copy; Baltech 2019</p> </div> /.container </footer> --> <!-- Bootstrap core JavaScript --> <script src={{ url("vendor/jquery/jquery.min.js") }}></script> <script src={{ url("vendor/bootstrap/js/bootstrap.bundle.min.js") }}></script> <!-- Bootstrap core CSS --> <link href={{ url("vendor/bootstrap/css/bootstrap.min.css") }} rel="stylesheet"> </body> </html>
33.440217
226
0.488705
b72c49bbcc2a22a127cf42767f4da4fe2721c2c3
7,430
sql
SQL
awa/db/sqlite/awa-sqlite.sql
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
awa/db/sqlite/awa-sqlite.sql
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
awa/db/sqlite/awa-sqlite.sql
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
/* File generated automatically by dynamo */ /* */ CREATE TABLE awa_message ( /* the message identifier */ `id` BIGINT NOT NULL, /* the message creation date */ `create_date` DATETIME NOT NULL, /* the message priority */ `priority` INTEGER NOT NULL, /* the message count */ `count` INTEGER NOT NULL, /* the message parameters */ `parameters` VARCHAR(255) NOT NULL, /* the server identifier which processes the message */ `server_id` INTEGER NOT NULL, /* the task identfier on the server which processes the message */ `task_id` INTEGER NOT NULL, /* the message status */ `status` TINYINT NOT NULL, /* the message processing date */ `processing_date` DATETIME , /* */ `version` INTEGER NOT NULL, /* the entity identifier to which this event is associated. */ `entity_id` BIGINT NOT NULL, /* the entity type of the entity identifier to which this event is associated. */ `entity_type` INTEGER NOT NULL, /* the date and time when the event was finished to be processed. */ `finish_date` DATETIME , /* */ `queue_id` BIGINT NOT NULL, /* the message type */ `message_type_id` BIGINT NOT NULL, /* the optional user who triggered the event message creation */ `user_id` BIGINT , /* the optional user session that triggered the message creation */ `session_id` BIGINT , PRIMARY KEY (`id`) ); /* */ CREATE TABLE awa_message_type ( /* */ `id` BIGINT NOT NULL, /* the message type name */ `name` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`) ); /* The message queue tracks the event messages that must be dispatched by a given server. */ CREATE TABLE awa_queue ( /* */ `id` BIGINT NOT NULL, /* */ `server_id` INTEGER NOT NULL, /* the message queue name */ `name` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`) ); /* The application that is granted access to the database. */ CREATE TABLE awa_application ( /* the application identifier. */ `id` BIGINT NOT NULL, /* the application name. */ `name` VARCHAR(255) NOT NULL, /* the application secret key. */ `secret_key` VARCHAR(255) NOT NULL, /* the application public identifier. */ `client_id` VARCHAR(255) NOT NULL, /* the optimistic lock version. */ `version` INTEGER NOT NULL, /* the application create date. */ `create_date` DATETIME NOT NULL, /* the application update date. */ `update_date` DATETIME NOT NULL, /* the application title displayed in the OAuth login form. */ `title` VARCHAR(255) NOT NULL, /* the application description. */ `description` VARCHAR(255) NOT NULL, /* the optional login URL. */ `app_login_url` VARCHAR(255) NOT NULL, /* the application logo URL. */ `app_logo_url` VARCHAR(255) NOT NULL, /* */ `user_id` BIGINT NOT NULL, PRIMARY KEY (`id`) ); /* */ CREATE TABLE awa_callback ( /* */ `id` BIGINT NOT NULL, /* */ `url` VARCHAR(255) NOT NULL, /* the optimistic lock version. */ `version` INTEGER NOT NULL, /* */ `application_id` BIGINT NOT NULL, PRIMARY KEY (`id`) ); /* The session is created when the user has granted an access to an application or when the application has refreshed its access token. */ CREATE TABLE awa_oauth_session ( /* the session identifier. */ `id` BIGINT NOT NULL, /* the session creation date. */ `create_date` DATETIME NOT NULL, /* a random salt string to access/request token generation. */ `salt` VARCHAR(255) NOT NULL, /* the expiration date. */ `expire_date` DATETIME NOT NULL, /* the application that is granted access. */ `application_id` BIGINT NOT NULL, /* */ `user_id` BIGINT NOT NULL, /* */ `session_id` BIGINT NOT NULL, PRIMARY KEY (`id`) ); /* The ACL table records permissions which are granted for a user to access a given database entity. */ CREATE TABLE awa_acl ( /* the ACL identifier */ `id` BIGINT NOT NULL, /* the entity identifier to which the ACL applies */ `entity_id` BIGINT NOT NULL, /* the writeable flag */ `writeable` TINYINT NOT NULL, /* */ `user_id` BIGINT NOT NULL, /* */ `workspace_id` BIGINT NOT NULL, /* the entity type concerned by the ACL. */ `entity_type` INTEGER NOT NULL, /* the permission that is granted. */ `permission` BIGINT NOT NULL, PRIMARY KEY (`id`) ); /* The permission table lists all the application permissions that are defined. This is a system table shared by every user and workspace. The list of permission is fixed and never changes. */ CREATE TABLE awa_permission ( /* the permission database identifier. */ `id` BIGINT NOT NULL, /* the permission name */ `name` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`) ); /* */ CREATE TABLE awa_access_key ( /* the secure access key. */ `access_key` VARCHAR(255) NOT NULL, /* the access key expiration date. */ `expire_date` DATE NOT NULL, /* the access key identifier. */ `id` BIGINT NOT NULL, /* */ `version` INTEGER NOT NULL, /* the access key type. */ `kind` TINYINT NOT NULL, /* */ `user_id` BIGINT NOT NULL, PRIMARY KEY (`id`) ); /* The Email entity defines the user email addresses. The user has a primary email address that is obtained from the registration process (either through a form submission or through OpenID authentication). */ CREATE TABLE awa_email ( /* the email address. */ `email` VARCHAR(255) NOT NULL, /* the last mail delivery status (if known). */ `status` TINYINT NOT NULL, /* the date when the last email error was detected. */ `last_error_date` DATETIME NOT NULL, /* */ `version` INTEGER NOT NULL, /* the email primary key. */ `id` BIGINT NOT NULL, /* the user. */ `user_id` BIGINT NOT NULL, PRIMARY KEY (`id`) ); /* */ CREATE TABLE awa_session ( /* */ `start_date` DATETIME NOT NULL, /* */ `end_date` DATETIME , /* */ `ip_address` VARCHAR(255) NOT NULL, /* */ `stype` TINYINT NOT NULL, /* */ `version` INTEGER NOT NULL, /* */ `server_id` INTEGER NOT NULL, /* */ `id` BIGINT NOT NULL, /* */ `auth_id` BIGINT , /* */ `user_id` BIGINT NOT NULL, PRIMARY KEY (`id`) ); /* The User entity represents a user that can access and use the application. */ CREATE TABLE awa_user ( /* the user first name. */ `first_name` VARCHAR(255) NOT NULL, /* the user last name. */ `last_name` VARCHAR(255) NOT NULL, /* the user password hash. */ `password` VARCHAR(255) NOT NULL, /* the user OpenID identifier. */ `open_id` VARCHAR(255) NOT NULL, /* the user country. */ `country` VARCHAR(255) NOT NULL, /* the user display name. */ `name` VARCHAR(255) NOT NULL, /* version number. */ `version` INTEGER NOT NULL, /* the user identifier. */ `id` BIGINT NOT NULL, /* the password salt. */ `salt` VARCHAR(255) NOT NULL, /* */ `email_id` BIGINT NOT NULL, PRIMARY KEY (`id`) ); INSERT INTO entity_type (name) VALUES ("awa_message"); INSERT INTO entity_type (name) VALUES ("awa_message_type"); INSERT INTO entity_type (name) VALUES ("awa_queue"); INSERT INTO entity_type (name) VALUES ("awa_application"); INSERT INTO entity_type (name) VALUES ("awa_callback"); INSERT INTO entity_type (name) VALUES ("awa_oauth_session"); INSERT INTO entity_type (name) VALUES ("awa_acl"); INSERT INTO entity_type (name) VALUES ("awa_permission"); INSERT INTO entity_type (name) VALUES ("awa_access_key"); INSERT INTO entity_type (name) VALUES ("awa_email"); INSERT INTO entity_type (name) VALUES ("awa_session"); INSERT INTO entity_type (name) VALUES ("awa_user");
30.829876
103
0.671736
ed7b7e1f42e672999a713540ef53cdcf4e7eb7a1
407
sql
SQL
SQL Study/Study_SQL_7.sql
UPRMG/Study-Python
e327c770fec2c008794348293225c71069caf430
[ "MIT" ]
null
null
null
SQL Study/Study_SQL_7.sql
UPRMG/Study-Python
e327c770fec2c008794348293225c71069caf430
[ "MIT" ]
null
null
null
SQL Study/Study_SQL_7.sql
UPRMG/Study-Python
e327c770fec2c008794348293225c71069caf430
[ "MIT" ]
null
null
null
-- gnp 평균보다 높고 낮은 기준을 구분하고, 과거 gnp대비 성장률 기준으로 내림차순 정렬 후 기대수명 70 이상의 국가 추출 select code, name, continent, population, gnp, case when gnp > (select avg(gnp) from country) then 'upper_avg' when gnp < (select avg(gnp) from country) then 'lower_avg' end avg, IFNULL((gnp-gnpold)/gnpold*100, 0) as rate, lifeexpectancy from country where lifeexpectancy > 70 order by rate desc
19.380952
73
0.678133
8ac4d9b64ca802ee7d532745c2eccb18966aa6ea
3,377
swift
Swift
KarhooUISDK/Common/DropDownButton.swift
karhoo/karhoo-ios-ui-sdk
fb4137f965f937d5d2a85300759212c2c02762c1
[ "BSD-2-Clause" ]
24
2020-06-30T13:56:39.000Z
2022-02-07T15:22:35.000Z
KarhooUISDK/Common/DropDownButton.swift
karhoo/karhoo-ios-ui-sdk
fb4137f965f937d5d2a85300759212c2c02762c1
[ "BSD-2-Clause" ]
14
2020-07-06T23:22:05.000Z
2022-01-13T20:09:12.000Z
KarhooUISDK/Common/DropDownButton.swift
karhoo/karhoo-ios-ui-sdk
fb4137f965f937d5d2a85300759212c2c02762c1
[ "BSD-2-Clause" ]
2
2021-09-30T17:25:17.000Z
2022-03-24T04:54:57.000Z
// // DropDownButton.swift // TripVIew // // // Copyright © 2020 Karhoo. All rights reserved. // import UIKit public protocol DropDownButtonDelegate: class { func buttonTapped(_ value: Bool) } public struct KHDropDownButtonID { public static let buttonTitle = "title" public static let dropDownImage = "drop_down_image" } final class DropDownButton: UIView { private var buttonTitle: UILabel! private var dropDownImage: UIImageView! private var tapped: Bool = false public weak var delegate: DropDownButtonDelegate? init() { super.init(frame: .zero) self.setUpView() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setUpView() { accessibilityIdentifier = "drop_down_button" translatesAutoresizingMaskIntoConstraints = false let tapGesture = UITapGestureRecognizer(target: self, action: #selector(buttonTapped)) self.addGestureRecognizer(tapGesture) buttonTitle = UILabel() buttonTitle.accessibilityIdentifier = KHDropDownButtonID.buttonTitle buttonTitle.translatesAutoresizingMaskIntoConstraints = false buttonTitle.font = UIFont.systemFont(ofSize: 10, weight: .semibold) buttonTitle.textAlignment = .center buttonTitle.textColor = .darkGray buttonTitle.text = UITexts.Trip.tripRideOptions addSubview(buttonTitle) dropDownImage = UIImageView(image: UIImage.uisdkImage("drop_down_arrow")) dropDownImage.tintColor = .darkGray dropDownImage.translatesAutoresizingMaskIntoConstraints = false dropDownImage.accessibilityIdentifier = KHDropDownButtonID.dropDownImage dropDownImage.isAccessibilityElement = true dropDownImage.transform = CGAffineTransform.init(rotationAngle: CGFloat.pi) let imageSize: CGFloat = 10 addSubview(dropDownImage) _ = [buttonTitle.topAnchor.constraint(equalTo: self.topAnchor, constant: 30.0), buttonTitle.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 30.0), buttonTitle.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -5.0), buttonTitle.trailingAnchor.constraint(equalTo: dropDownImage.leadingAnchor, constant: -5.0)].map { $0.isActive = true } _ = [dropDownImage.centerYAnchor.constraint(equalTo: buttonTitle.centerYAnchor), dropDownImage.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: -5.0), dropDownImage.widthAnchor.constraint(equalToConstant: imageSize), dropDownImage.heightAnchor.constraint(equalToConstant: imageSize)].map { $0.isActive = true } } public func getButtonState() -> Bool { return tapped } @objc private func buttonTapped() { tapped = !tapped var animation: CGAffineTransform if tapped { animation = .identity } else { animation = CGAffineTransform.init(rotationAngle: CGFloat.pi) } UIView.animate(withDuration: 0.2) { self.dropDownImage.transform = animation } delegate?.buttonTapped(tapped) } }
34.814433
106
0.660646
748aa6afccfd8db787711d7eacbd8f6247ef072c
2,191
css
CSS
web/css/translate.css
overals/yii2-translate-panel
6d763211f17be8ddcfa07eda35beea334299255e
[ "MIT" ]
29
2015-03-08T09:18:52.000Z
2021-02-27T14:29:31.000Z
web/css/translate.css
overals/yii2-translate-panel
6d763211f17be8ddcfa07eda35beea334299255e
[ "MIT" ]
9
2015-03-24T11:49:12.000Z
2017-12-07T10:04:42.000Z
web/css/translate.css
overals/yii2-translate-panel
6d763211f17be8ddcfa07eda35beea334299255e
[ "MIT" ]
21
2015-03-06T11:05:02.000Z
2020-06-18T11:43:22.000Z
.text-align-center { text-align: center !important; } .font-weight-bold, .bold { font-weight: bold !important; } .margin-bottom-10px { margin-bottom: 10px !important; } .nowrap { white-space: nowrap !important; } a, a:active, a:visited, a:link, a:focus, a:hover, input[type="button"], input[type="submit"], button { outline: none !important; } .tabs-mini .nav > li > a { padding: 0 5px; } .tabs-mini .nav-tabs { border-bottom: 1px solid #aeaeae; } .tabs-mini .nav-tabs > li > a:hover { border-color: #eee #eee #aeaeae; } .tabs-mini .nav-tabs > li.active > a, .tabs-mini .nav-tabs > li.active > a:hover, .tabs-mini .nav-tabs > li.active > a:focus { border: 1px solid #aeaeae; } .translation-tabs .nav-tabs > li > a:hover { background-color: #eaeaea; } .translation-tabs .nav-tabs > li.active > a, .translation-tabs .nav-tabs > li.active > a:hover, .translation-tabs .nav-tabs > li.active > a:focus { background-color: transparent; border-bottom-color: #f2f2f2; } tr.success .translation-tabs .nav-tabs > li.active > a, tr.success .translation-tabs .nav-tabs > li.active > a:hover, tr.success .translation-tabs .nav-tabs > li.active > a:focus { border-bottom-color: #c3ffab; } tr.danger .translation-tabs .nav-tabs > li.active > a, tr.danger .translation-tabs .nav-tabs > li.active > a:hover, tr.danger .translation-tabs .nav-tabs > li.active > a:focus { border-bottom-color: #ffdada; } .translation-textarea { min-height: 100px; max-height: 150px; margin-top: 5px; } .source-message ul.trace { border-top: 1px solid #dcdcdc; } .translations-index table > thead > tr > th, .translations-index table > thead > tr > td, .translations-index table > tbody > tr > th, .translations-index table > tbody > tr > td, .translations-index table > tfoot > tr > th, .translations-index table > tfoot > tr > td { vertical-align: middle; } .spoiler-content { display: none; } .chosen-container-single .chosen-single { height: 33px; padding: 4px 0 4px 8px; } .chosen-container-single .chosen-single div { top: 4px; } ul.trace { font-size: 12px; color: #999; margin: 2px 0 0 0; padding: 0; list-style: none; white-space: normal; }
27.3875
62
0.671383
11e8e6c25f9a79da3d59de0f1ee690b0dcb28218
2,258
sql
SQL
ansible/backendsimulator/schema.sql
bnadland/cachepusher
a31e50c33fc72fb01a883c8b43b6a7e70a850620
[ "MIT" ]
null
null
null
ansible/backendsimulator/schema.sql
bnadland/cachepusher
a31e50c33fc72fb01a883c8b43b6a7e70a850620
[ "MIT" ]
null
null
null
ansible/backendsimulator/schema.sql
bnadland/cachepusher
a31e50c33fc72fb01a883c8b43b6a7e70a850620
[ "MIT" ]
null
null
null
-- TABLES create table if not exists customer ( id_customer serial primary key, name text, touched timestamp default clock_timestamp() ); create table if not exists address ( id_address serial primary key, description text, fk_customer int references customer ); -- drop type if exists customer_type; drop type if exists address_type; create type address_type as ( id_address int, description text ); create type customer_type as ( id_customer int, name text, addresses address_type[] ); -- PROCEDURES --- CUSTOMER_GET() create or replace function customer_get(id int) returns json as $$ declare customer_json json; begin select row_to_json(row( id_customer, name, (select coalesce(array_agg(row(id_address, description)::address_type), '{}') as address from address where fk_customer=id) )::customer_type) from customer where id_customer=id into customer_json; return customer_json; end; $$ language plpgsql; --- CUSTOMER_WARMUP create or replace function customer_warmup() returns boolean as $$ begin update customer set touched=clock_timestamp(); return true; end; $$ language plpgsql; -- TRIGGERS --- CUSTOMER create or replace function customer_updated() returns trigger as $$ begin if (tg_op = 'DELETE') then perform pg_notify('customer_deleted', old.id_customer::text); else perform pg_notify('customer_updated', new.id_customer::text); end if; return null; end; $$ language plpgsql; drop trigger if exists customer_updated_trigger on customer; create trigger customer_updated_trigger after insert or update or delete on customer for each row execute procedure customer_updated(); --- ADDRESS create or replace function address_updated() returns trigger as $$ begin if (tg_op = 'DELETE') then perform pg_notify('customer_updated', old.fk_customer::text); else perform pg_notify('customer_updated', new.fk_customer::text); end if; return null; end; $$ language plpgsql; drop trigger if exists address_updated_trigger on address; create trigger address_updated_trigger after insert or update or delete on address for each row execute procedure address_updated();
26.564706
135
0.728521
e72fc5097e39991fbb02f745b776bd875cf75ee3
42,421
php
PHP
vendor/civicrm/civicrm-core/tests/phpunit/api/v3/MailingTest.php
jdelon02/civicead8
75d4841b571e6ed987ce896bbc14974b4ff0d657
[ "MIT" ]
null
null
null
vendor/civicrm/civicrm-core/tests/phpunit/api/v3/MailingTest.php
jdelon02/civicead8
75d4841b571e6ed987ce896bbc14974b4ff0d657
[ "MIT" ]
5
2019-10-01T00:47:20.000Z
2021-09-02T15:46:32.000Z
vendor/civicrm/civicrm-core/tests/phpunit/api/v3/MailingTest.php
jdelon02/civicead8
75d4841b571e6ed987ce896bbc14974b4ff0d657
[ "MIT" ]
1
2019-10-05T09:59:34.000Z
2019-10-05T09:59:34.000Z
<?php /* * File for the TestMailing class * * (PHP 5) * * @package CiviCRM * * This file is part of CiviCRM * * CiviCRM is free software; you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License * as published by the Free Software Foundation; either version 3 of * the License, or (at your option) any later version. * * CiviCRM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/>. */ /** * Test APIv3 civicrm_mailing_* functions * * @package CiviCRM * @group headless */ class api_v3_MailingTest extends CiviUnitTestCase { protected $_groupID; protected $_email; protected $_apiversion = 3; protected $_params = array(); protected $_entity = 'Mailing'; protected $_contactID; /** * APIv3 result from creating an example footer * @var array */ protected $footer; public function setUp() { parent::setUp(); $this->useTransaction(); // DGW CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0; $this->_contactID = $this->individualCreate(); $this->_groupID = $this->groupCreate(); $this->_email = '[email protected]'; $this->_params = array( 'subject' => 'Hello {contact.display_name}', 'body_text' => "This is {contact.display_name}.\nhttps://civicrm.org\n{domain.address}{action.optOutUrl}", 'body_html' => "<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Zilla+Slab:500,700' rel='stylesheet' type='text/css'><p><a href=\"http://{action.forward}\">Forward this email</a><a href=\"{action.forward}\">Forward this email with no protocol</a></p<p>This is {contact.display_name}.</p><p><a href='https://civicrm.org/'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>", 'name' => 'mailing name', 'created_id' => $this->_contactID, 'header_id' => '', 'footer_id' => '', ); $this->footer = civicrm_api3('MailingComponent', 'create', array( 'name' => 'test domain footer', 'component_type' => 'footer', 'body_html' => '<p>From {domain.address}. To opt out, go to {action.optOutUrl}.</p>', 'body_text' => 'From {domain.address}. To opt out, go to {action.optOutUrl}.', )); } public function tearDown() { // DGW CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0; parent::tearDown(); } /** * Test civicrm_mailing_create. */ public function testMailerCreateSuccess() { $result = $this->callAPIAndDocument('mailing', 'create', $this->_params + array('scheduled_date' => 'now'), __FUNCTION__, __FILE__); $jobs = $this->callAPISuccess('mailing_job', 'get', array('mailing_id' => $result['id'])); $this->assertEquals(1, $jobs['count']); // return isn't working on this in getAndCheck so lets not check it for now unset($this->_params['created_id']); $this->getAndCheck($this->_params, $result['id'], 'mailing'); } /** * Tes that the parameter _skip_evil_bao_auto_schedule_ is respected & prevents jobs being created. */ public function testSkipAutoSchedule() { $this->callAPISuccess('Mailing', 'create', array_merge($this->_params, [ '_skip_evil_bao_auto_schedule_' => TRUE, 'scheduled_date' => 'now', ])); $this->callAPISuccessGetCount('Mailing', [], 1); $this->callAPISuccessGetCount('MailingJob', [], 0); } /** * Create a completed mailing (e.g when importing from a provider). */ public function testMailerCreateCompleted() { $this->_params['body_html'] = 'I am completed so it does not matter if there is an opt out link since I have already been sent by another system'; $this->_params['is_completed'] = 1; $result = $this->callAPIAndDocument('mailing', 'create', $this->_params + array('scheduled_date' => 'now'), __FUNCTION__, __FILE__); $jobs = $this->callAPISuccess('mailing_job', 'get', array('mailing_id' => $result['id'])); $this->assertEquals(1, $jobs['count']); $this->assertEquals('Complete', $jobs['values'][$jobs['id']]['status']); // return isn't working on this in getAndCheck so lets not check it for now unset($this->_params['created_id']); $this->getAndCheck($this->_params, $result['id'], 'mailing'); } /** * Per CRM-20316 the mailing should still create without created_id (not mandatory). */ public function testMailerCreateSuccessNoCreatedID() { unset($this->_params['created_id']); $result = $this->callAPIAndDocument('mailing', 'create', $this->_params + array('scheduled_date' => 'now'), __FUNCTION__, __FILE__); $this->getAndCheck($this->_params, $result['id'], 'mailing'); } /** * */ public function testTemplateTypeOptions() { $types = $this->callAPISuccess('Mailing', 'getoptions', array('field' => 'template_type')); $this->assertTrue(isset($types['values']['traditional'])); } /** * The `template_options` field should be treated a JSON object. * * This test will create, read, and update the field. */ public function testMailerCreateTemplateOptions() { // 1. Create mailing with template_options. $params = $this->_params; $params['template_options'] = json_encode(array('foo' => 'bar_1')); $createResult = $this->callAPISuccess('mailing', 'create', $params); $id = $createResult['id']; $this->assertDBQuery('{"foo":"bar_1"}', 'SELECT template_options FROM civicrm_mailing WHERE id = %1', array( 1 => array($id, 'Int'), )); $this->assertEquals('bar_1', $createResult['values'][$id]['template_options']['foo']); // 2. Get mailing with template_options. $getResult = $this->callAPISuccess('mailing', 'get', array( 'id' => $id, )); $this->assertEquals('bar_1', $getResult['values'][$id]['template_options']['foo']); $getValueResult = $this->callAPISuccess('mailing', 'getvalue', array( 'id' => $id, 'return' => 'template_options', )); $this->assertEquals('bar_1', $getValueResult['foo']); // 3. Update mailing with template_options. $updateResult = $this->callAPISuccess('mailing', 'create', array( 'id' => $id, 'template_options' => array('foo' => 'bar_2'), )); $this->assertDBQuery('{"foo":"bar_2"}', 'SELECT template_options FROM civicrm_mailing WHERE id = %1', array( 1 => array($id, 'Int'), )); $this->assertEquals('bar_2', $updateResult['values'][$id]['template_options']['foo']); } /** * The Mailing.create API supports magic properties "groups[include,enclude]" and "mailings[include,exclude]". * Make sure these work */ public function testMagicGroups_create_update() { // BEGIN SAMPLE DATA $groupIDs['a'] = $this->groupCreate(array('name' => 'Example include group', 'title' => 'Example include group')); $groupIDs['b'] = $this->groupCreate(array('name' => 'Example exclude group', 'title' => 'Example exclude group')); $contactIDs['a'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Includer', 'last_name' => 'Person', )); $contactIDs['b'] = $this->individualCreate(array( 'email' => '[email protected]', 'last_name' => 'Excluder', )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['a'], 'contact_id' => $contactIDs['a'], )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['b'], 'contact_id' => $contactIDs['b'], )); // END SAMPLE DATA // ** Pass 1: Create $createParams = $this->_params; $createParams['groups']['include'] = [$groupIDs['a']]; $createParams['groups']['exclude'] = []; $createParams['mailings']['include'] = []; $createParams['mailings']['exclude'] = []; $createParams['scheduled_date'] = 'now'; $createResult = $this->callAPISuccess('Mailing', 'create', $createParams); $getGroup1 = $this->callAPISuccess('MailingGroup', 'get', array('mailing_id' => $createResult['id'])); $getGroup1_ids = array_values(CRM_Utils_Array::collect('entity_id', $getGroup1['values'])); $this->assertEquals(array($groupIDs['a']), $getGroup1_ids); $getRecipient1 = $this->callAPISuccess('MailingRecipients', 'get', array('mailing_id' => $createResult['id'])); $getRecipient1_ids = array_values(CRM_Utils_Array::collect('contact_id', $getRecipient1['values'])); $this->assertEquals(array($contactIDs['a']), $getRecipient1_ids); // ** Pass 2: Update without any changes to groups[include] $nullOpParams = $createParams; $nullOpParams['id'] = $createResult['id']; $updateParams['api.mailing_job.create'] = 1; unset($nullOpParams['groups']['include']); $this->callAPISuccess('Mailing', 'create', $nullOpParams); $getGroup2 = $this->callAPISuccess('MailingGroup', 'get', array('mailing_id' => $createResult['id'])); $getGroup2_ids = array_values(CRM_Utils_Array::collect('entity_id', $getGroup2['values'])); $this->assertEquals(array($groupIDs['a']), $getGroup2_ids); $getRecipient2 = $this->callAPISuccess('MailingRecipients', 'get', array('mailing_id' => $createResult['id'])); $getRecip2_ids = array_values(CRM_Utils_Array::collect('contact_id', $getRecipient2['values'])); $this->assertEquals(array($contactIDs['a']), $getRecip2_ids); // ** Pass 3: Update with different groups[include] $updateParams = $createParams; $updateParams['id'] = $createResult['id']; $updateParams['groups']['include'] = array($groupIDs['b']); $updateParams['scheduled_date'] = 'now'; $this->callAPISuccess('Mailing', 'create', $updateParams); $getGroup3 = $this->callAPISuccess('MailingGroup', 'get', array('mailing_id' => $createResult['id'])); $getGroup3_ids = array_values(CRM_Utils_Array::collect('entity_id', $getGroup3['values'])); $this->assertEquals(array($groupIDs['b']), $getGroup3_ids); $getRecipient3 = $this->callAPISuccess('MailingRecipients', 'get', array('mailing_id' => $createResult['id'])); $getRecipient3_ids = array_values(CRM_Utils_Array::collect('contact_id', $getRecipient3['values'])); $this->assertEquals(array($contactIDs['b']), $getRecipient3_ids); } public function testMailerPreview() { // BEGIN SAMPLE DATA $contactID = $this->individualCreate(); $displayName = $this->callAPISuccess('contact', 'get', array('id' => $contactID)); $displayName = $displayName['values'][$contactID]['display_name']; $this->assertTrue(!empty($displayName)); $params = $this->_params; $params['api.Mailing.preview'] = array( 'id' => '$value.id', 'contact_id' => $contactID, ); $params['options']['force_rollback'] = 1; // END SAMPLE DATA $maxIDs = array( 'mailing' => CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_mailing'), 'job' => CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_mailing_job'), 'group' => CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_mailing_group'), 'recipient' => CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_mailing_recipients'), ); $result = $this->callAPISuccess('mailing', 'create', $params); // 'Preview should not create any mailing records' $this->assertDBQuery($maxIDs['mailing'], 'SELECT MAX(id) FROM civicrm_mailing'); // 'Preview should not create any mailing_job record' $this->assertDBQuery($maxIDs['job'], 'SELECT MAX(id) FROM civicrm_mailing_job'); // 'Preview should not create any mailing_group records' $this->assertDBQuery($maxIDs['group'], 'SELECT MAX(id) FROM civicrm_mailing_group'); // 'Preview should not create any mailing_recipient records' $this->assertDBQuery($maxIDs['recipient'], 'SELECT MAX(id) FROM civicrm_mailing_recipients'); $baseurl = CRM_Utils_System::baseCMSURL(); $previewResult = $result['values'][$result['id']]['api.Mailing.preview']; $this->assertEquals("Hello $displayName", $previewResult['values']['subject']); $this->assertContains("This is $displayName", $previewResult['values']['body_text']); $this->assertContains("<p>This is $displayName.</p>", $previewResult['values']['body_html']); $this->assertContains('<a href="' . $baseurl . 'index.php?q=civicrm/mailing/forward&amp;amp;reset=1&amp;jid=&amp;qid=&amp;h=">Forward this email with no protocol</a>', $previewResult['values']['body_html']); $this->assertNotContains("http://http://", $previewResult['values']['body_html']); } public function testMailerPreviewUnknownContact() { $params = $this->_params; $params['api.Mailing.preview'] = array( 'id' => '$value.id', ); $result = $this->callAPISuccess('mailing', 'create', $params); // NOTE: It's highly debatable what's best to do with contact-tokens for an // unknown-contact. However, changes should be purposeful, so we'll test // for the current behavior (i.e. returning blanks). $previewResult = $result['values'][$result['id']]['api.Mailing.preview']; $this->assertEquals("Hello ", $previewResult['values']['subject']); $this->assertContains("This is .", $previewResult['values']['body_text']); $this->assertContains("<p>This is .</p>", $previewResult['values']['body_html']); } public function testMailerPreviewRecipients() { // BEGIN SAMPLE DATA $groupIDs['inc'] = $this->groupCreate(array('name' => 'Example include group', 'title' => 'Example include group')); $groupIDs['exc'] = $this->groupCreate(array('name' => 'Example exclude group', 'title' => 'Example exclude group')); $contactIDs['include_me'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Includer', 'last_name' => 'Person', )); $contactIDs['exclude_me'] = $this->individualCreate(array( 'email' => '[email protected]', 'last_name' => 'Excluder', )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['inc'], 'contact_id' => $contactIDs['include_me'], )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['inc'], 'contact_id' => $contactIDs['exclude_me'], )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['exc'], 'contact_id' => $contactIDs['exclude_me'], )); $params = $this->_params; $params['groups']['include'] = array($groupIDs['inc']); $params['groups']['exclude'] = array($groupIDs['exc']); $params['mailings']['include'] = array(); $params['mailings']['exclude'] = array(); $params['options']['force_rollback'] = 1; $params['api.MailingRecipients.get'] = array( 'mailing_id' => '$value.id', 'api.contact.getvalue' => array( 'return' => 'display_name', ), 'api.email.getvalue' => array( 'return' => 'email', ), ); // END SAMPLE DATA $maxIDs = array( 'mailing' => CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_mailing'), 'group' => CRM_Core_DAO::singleValueQuery('SELECT MAX(id) FROM civicrm_mailing_group'), ); $create = $this->callAPIAndDocument('Mailing', 'create', $params, __FUNCTION__, __FILE__); // 'Preview should not create any mailing records' $this->assertDBQuery($maxIDs['mailing'], 'SELECT MAX(id) FROM civicrm_mailing'); // 'Preview should not create any mailing_group records' $this->assertDBQuery($maxIDs['group'], 'SELECT MAX(id) FROM civicrm_mailing_group'); $preview = $create['values'][$create['id']]['api.MailingRecipients.get']; $previewIds = array_values(CRM_Utils_Array::collect('contact_id', $preview['values'])); $this->assertEquals(array((string) $contactIDs['include_me']), $previewIds); $previewEmails = array_values(CRM_Utils_Array::collect('api.email.getvalue', $preview['values'])); $this->assertEquals(array('[email protected]'), $previewEmails); $previewNames = array_values(CRM_Utils_Array::collect('api.contact.getvalue', $preview['values'])); $this->assertTrue((bool) preg_match('/Includer Person/', $previewNames[0]), "Name 'Includer Person' should appear in '" . $previewNames[0] . '"'); } /** * Test if Mailing recipients include duplicate OR on_hold emails */ public function testMailerPreviewRecipientsDeduplicateAndOnholdEmails() { // BEGIN SAMPLE DATA $groupIDs['grp'] = $this->groupCreate(array('name' => 'Example group', 'title' => 'Example group')); $contactIDs['include_me'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Includer', 'last_name' => 'Person', )); $contactIDs['include_me_duplicate'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'IncluderDuplicate', 'last_name' => 'Person', )); $contactIDs['include_me_onhold'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Onhold', 'last_name' => 'Person', )); $emailId = $this->callAPISuccessGetValue('Email', array( 'return' => 'id', 'contact_id' => $contactIDs['include_me_onhold'], )); $this->callAPISuccess('Email', 'create', array( 'id' => $emailId, 'on_hold' => 1, )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['grp'], 'contact_id' => $contactIDs['include_me'], )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['grp'], 'contact_id' => $contactIDs['include_me_duplicate'], )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['grp'], 'contact_id' => $contactIDs['include_me_onhold'], )); $params = $this->_params; $params['groups']['include'] = array($groupIDs['grp']); $params['mailings']['include'] = array(); $params['options']['force_rollback'] = 1; $params['dedupe_email'] = 1; $params['api.MailingRecipients.get'] = array( 'mailing_id' => '$value.id', 'api.contact.getvalue' => array( 'return' => 'display_name', ), 'api.email.getvalue' => array( 'return' => 'email', ), ); // END SAMPLE DATA $create = $this->callAPISuccess('Mailing', 'create', $params); //Recipient should not contain duplicate or on_hold emails. $preview = $create['values'][$create['id']]['api.MailingRecipients.get']; $this->assertEquals(1, $preview['count']); $previewEmails = array_values(CRM_Utils_Array::collect('api.email.getvalue', $preview['values'])); $this->assertEquals(array('[email protected]'), $previewEmails); } /** * Test sending a test mailing. */ public function testMailerSendTest_email() { $contactIDs['alice'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Alice', 'last_name' => 'Person', )); $mail = $this->callAPISuccess('mailing', 'create', $this->_params); $params = array('mailing_id' => $mail['id'], 'test_email' => '[email protected]', 'test_group' => NULL); // Per https://lab.civicrm.org/dev/core/issues/229 ensure this is not passed through! // Per https://lab.civicrm.org/dev/mail/issues/32 test non-lowercase email $params['id'] = $mail['id']; $deliveredInfo = $this->callAPISuccess($this->_entity, 'send_test', $params); // verify mail has been sent to user by count $this->assertEquals(1, $deliveredInfo['count']); $deliveredContacts = array_values(CRM_Utils_Array::collect('contact_id', $deliveredInfo['values'])); $this->assertEquals(array($contactIDs['alice']), $deliveredContacts); $deliveredEmails = array_values(CRM_Utils_Array::collect('email', $deliveredInfo['values'])); $this->assertEquals(array('[email protected]'), $deliveredEmails); } /** * */ public function testMailerSendTest_group() { // BEGIN SAMPLE DATA $groupIDs['inc'] = $this->groupCreate(array('name' => 'Example include group', 'title' => 'Example include group')); $contactIDs['alice'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Alice', 'last_name' => 'Person', )); $contactIDs['bob'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Bob', 'last_name' => 'Person', )); $contactIDs['carol'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Carol', 'last_name' => 'Person', )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['inc'], 'contact_id' => $contactIDs['alice'], )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['inc'], 'contact_id' => $contactIDs['bob'], )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['inc'], 'contact_id' => $contactIDs['carol'], )); // END SAMPLE DATA $mail = $this->callAPISuccess('mailing', 'create', $this->_params); $deliveredInfo = $this->callAPISuccess($this->_entity, 'send_test', array( 'mailing_id' => $mail['id'], 'test_email' => NULL, 'test_group' => $groupIDs['inc'], )); // verify mail has been sent to user by count $this->assertEquals(3, $deliveredInfo['count'], "in line " . __LINE__); $deliveredContacts = array_values(CRM_Utils_Array::collect('contact_id', $deliveredInfo['values'])); $this->assertEquals(array($contactIDs['alice'], $contactIDs['bob'], $contactIDs['carol']), $deliveredContacts); $deliveredEmails = array_values(CRM_Utils_Array::collect('email', $deliveredInfo['values'])); $this->assertEquals(array('[email protected]', '[email protected]', '[email protected]'), $deliveredEmails); } /** * @return array */ public function submitProvider() { // $useLogin, $params, $expectedFailure, $expectedJobCount $cases = array(); $cases[] = array( //useLogin TRUE, // createParams array(), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure FALSE, // expectedJobCount 1, ); $cases[] = array( //useLogin FALSE, // createParams array(), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure "/Failed to determine current user/", // expectedJobCount 0, ); $cases[] = array( //useLogin TRUE, // createParams array(), array('scheduled_date' => '2014-12-13 10:00:00'), // expectedFailure FALSE, // expectedJobCount 1, ); $cases[] = array( //useLogin TRUE, // createParams array(), array(), // expectedFailure "/Missing parameter scheduled_date and.or approval_date/", // expectedJobCount 0, ); $cases[] = array( //useLogin TRUE, // createParams array('name' => ''), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure "/Mailing cannot be sent. There are missing or invalid fields \\(name\\)./", // expectedJobCount 0, ); $cases[] = array( //useLogin TRUE, // createParams array('body_html' => '', 'body_text' => ''), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure "/Mailing cannot be sent. There are missing or invalid fields \\(body\\)./", // expectedJobCount 0, ); $cases[] = array( //useLogin TRUE, // createParams array('body_html' => 'Oops, did I leave my tokens at home?'), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure "/Mailing cannot be sent. There are missing or invalid fields \\(.*body_html.*optOut.*\\)./", // expectedJobCount 0, ); $cases[] = array( //useLogin TRUE, // createParams array('body_text' => 'Oops, did I leave my tokens at home?'), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure "/Mailing cannot be sent. There are missing or invalid fields \\(.*body_text.*optOut.*\\)./", // expectedJobCount 0, ); $cases[] = array( //useLogin TRUE, // createParams array('body_text' => 'Look ma, magic tokens in the text!', 'footer_id' => '%FOOTER%'), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure FALSE, // expectedJobCount 1, ); $cases[] = array( //useLogin TRUE, // createParams array('body_html' => '<p>Look ma, magic tokens in the markup!</p>', 'footer_id' => '%FOOTER%'), array('scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00'), // expectedFailure FALSE, // expectedJobCount 1, ); return $cases; } /** * @param bool $useLogin * @param array $createParams * @param array $submitParams * @param null|string $expectedFailure * @param int $expectedJobCount * @dataProvider submitProvider */ public function testMailerSubmit($useLogin, $createParams, $submitParams, $expectedFailure, $expectedJobCount) { if ($useLogin) { $this->createLoggedInUser(); } if (isset($createParams['footer_id']) && $createParams['footer_id'] == '%FOOTER%') { $createParams['footer_id'] = $this->footer['id']; } $id = $this->createDraftMailing($createParams); $submitParams['id'] = $id; if ($expectedFailure) { $submitResult = $this->callAPIFailure('mailing', 'submit', $submitParams); $this->assertRegExp($expectedFailure, $submitResult['error_message']); } else { $submitResult = $this->callAPIAndDocument('mailing', 'submit', $submitParams, __FUNCTION__, __FILE__); $this->assertTrue(is_numeric($submitResult['id'])); $this->assertTrue(is_numeric($submitResult['values'][$id]['scheduled_id'])); $this->assertEquals($submitParams['scheduled_date'], $submitResult['values'][$id]['scheduled_date']); } $this->assertDBQuery($expectedJobCount, 'SELECT count(*) FROM civicrm_mailing_job WHERE mailing_id = %1', array( 1 => array($id, 'Integer'), )); } /** * Test unsubscribe list contains correct groups * when include = 'previous mailing' */ public function testUnsubscribeGroupList() { // Create set of groups and add a contact to both of them. $groupID2 = $this->groupCreate(array('name' => 'Test group 2', 'title' => 'group title 2')); $groupID3 = $this->groupCreate(array('name' => 'Test group 3', 'title' => 'group title 3')); $contactId = $this->individualCreate(); foreach (array($groupID2, $groupID3) as $grp) { $params = array( 'contact_id' => $contactId, 'group_id' => $grp, ); $this->callAPISuccess('GroupContact', 'create', $params); } //Send mail to groupID3 $mail = $this->callAPISuccess('mailing', 'create', $this->_params); $params = array('mailing_id' => $mail['id'], 'test_email' => NULL, 'test_group' => $groupID3); $this->callAPISuccess($this->_entity, 'send_test', $params); $mgParams = array( 'mailing_id' => $mail['id'], 'entity_table' => 'civicrm_group', 'entity_id' => $groupID3, 'group_type' => 'Include', ); $mailingGroup = $this->callAPISuccess('MailingGroup', 'create', $mgParams); //Include previous mail in the mailing group. $mail2 = $this->callAPISuccess('mailing', 'create', $this->_params); $params = array('mailing_id' => $mail2['id'], 'test_email' => NULL, 'test_group' => $groupID3); $this->callAPISuccess($this->_entity, 'send_test', $params); $mgParams = array( 'mailing_id' => $mail2['id'], 'entity_table' => 'civicrm_mailing', 'entity_id' => $mail['id'], 'group_type' => 'Include', ); $mailingGroup = $this->callAPISuccess('MailingGroup', 'create', $mgParams); //CRM-20431 - Delete group id that matches first mailing id. $this->callAPISuccess('Group', 'delete', array('id' => $this->_groupID)); $jobId = CRM_Core_DAO::getFieldValue('CRM_Mailing_DAO_MailingJob', $mail2['id'], 'id', 'mailing_id'); $hash = CRM_Core_DAO::getFieldValue('CRM_Mailing_Event_DAO_Queue', $jobId, 'hash', 'job_id'); $queueId = CRM_Core_DAO::getFieldValue('CRM_Mailing_Event_DAO_Queue', $jobId, 'id', 'job_id'); $group = CRM_Mailing_Event_BAO_Unsubscribe::unsub_from_mailing($jobId, $queueId, $hash, TRUE); //Assert only one group returns in the unsubscribe list. $this->assertCount(1, $group); $this->assertEquals($groupID3, key($group)); } /** * */ public function testMailerStats() { $result = $this->groupContactCreate($this->_groupID, 100); //verify if 100 contacts are added for group $this->assertEquals(100, $result['added']); //Create and send test mail first and change the mail job to live, //because stats api only works on live mail $mail = $this->callAPISuccess('mailing', 'create', $this->_params); $params = array('mailing_id' => $mail['id'], 'test_email' => NULL, 'test_group' => $this->_groupID); $deliveredInfo = $this->callAPISuccess($this->_entity, 'send_test', $params); $deliveredIds = implode(',', array_keys($deliveredInfo['values'])); //Change the test mail into live $sql = "UPDATE civicrm_mailing_job SET is_test = 0 WHERE mailing_id = {$mail['id']}"; CRM_Core_DAO::executeQuery($sql); foreach (array('bounce', 'unsubscribe', 'opened') as $type) { $sql = "CREATE TEMPORARY TABLE mail_{$type}_temp (event_queue_id int, time_stamp datetime, delivered_id int) SELECT event_queue_id, time_stamp, id FROM civicrm_mailing_event_delivered WHERE id IN ($deliveredIds) ORDER BY RAND() LIMIT 0,20;"; CRM_Core_DAO::executeQuery($sql); $sql = "DELETE FROM civicrm_mailing_event_delivered WHERE id IN (SELECT delivered_id FROM mail_{$type}_temp);"; CRM_Core_DAO::executeQuery($sql); if ($type == 'unsubscribe') { $sql = "INSERT INTO civicrm_mailing_event_{$type} (event_queue_id, time_stamp, org_unsubscribe) SELECT event_queue_id, time_stamp, 1 FROM mail_{$type}_temp"; } else { $sql = "INSERT INTO civicrm_mailing_event_{$type} (event_queue_id, time_stamp) SELECT event_queue_id, time_stamp FROM mail_{$type}_temp"; } CRM_Core_DAO::executeQuery($sql); } $result = $this->callAPISuccess('mailing', 'stats', array('mailing_id' => $mail['id'])); $expectedResult = array( //since among 100 mails 20 has been bounced 'Delivered' => 80, 'Bounces' => 20, 'Opened' => 20, 'Unique Clicks' => 0, 'Unsubscribers' => 20, 'delivered_rate' => '80%', 'opened_rate' => '25%', 'clickthrough_rate' => '0%', ); $this->checkArrayEquals($expectedResult, $result['values'][$mail['id']]); } /** * Test civicrm_mailing_delete. */ public function testMailerDeleteSuccess() { $result = $this->callAPISuccess($this->_entity, 'create', $this->_params); $this->callAPIAndDocument($this->_entity, 'delete', array('id' => $result['id']), __FUNCTION__, __FILE__); $this->assertAPIDeleted($this->_entity, $result['id']); } /** * Test Mailing.gettokens. */ public function testMailGetTokens() { $description = "Demonstrates fetching tokens for one or more entities (in this case \"Contact\" and \"Mailing\"). Optionally pass sequential=1 to have output ready-formatted for the select2 widget."; $result = $this->callAPIAndDocument($this->_entity, 'gettokens', array('entity' => array('Contact', 'Mailing')), __FUNCTION__, __FILE__, $description); $this->assertContains('Contact Type', $result['values']); // Check that passing "sequential" correctly outputs a hierarchical array $result = $this->callAPISuccess($this->_entity, 'gettokens', array('entity' => 'contact', 'sequential' => 1)); $this->assertArrayHasKey('text', $result['values'][0]); $this->assertArrayHasKey('id', $result['values'][0]['children'][0]); } public function testClone() { // BEGIN SAMPLE DATA $groupIDs['inc'] = $this->groupCreate(array('name' => 'Example include group', 'title' => 'Example include group')); $contactIDs['include_me'] = $this->individualCreate(array( 'email' => '[email protected]', 'first_name' => 'Includer', 'last_name' => 'Person', )); $this->callAPISuccess('GroupContact', 'create', array( 'group_id' => $groupIDs['inc'], 'contact_id' => $contactIDs['include_me'], )); $params = $this->_params; $params['groups']['include'] = array($groupIDs['inc']); $params['groups']['exclude'] = array(); $params['mailings']['include'] = array(); $params['mailings']['exclude'] = array(); // END SAMPLE DATA $create = $this->callAPISuccess('Mailing', 'create', $params); $created = $this->callAPISuccess('Mailing', 'get', []); $createId = $create['id']; $this->createLoggedInUser(); $clone = $this->callAPIAndDocument('Mailing', 'clone', array('id' => $create['id']), __FUNCTION__, __FILE__); $cloneId = $clone['id']; $this->assertNotEquals($createId, $cloneId, 'Create and clone should return different records'); $this->assertTrue(is_numeric($cloneId)); $this->assertNotEmpty($clone['values'][$cloneId]['subject']); $this->assertEquals($params['subject'], $clone['values'][$cloneId]['subject'], "Cloned subject should match"); // created_id is special - populated based on current user (ie the cloner). $this->assertNotEmpty($clone['values'][$cloneId]['created_id']); $this->assertNotEquals($create['values'][$createId]['created_id'], $clone['values'][$cloneId]['created_id'], 'Clone should be created by a different person'); // Target groups+mailings are special. $cloneGroups = $this->callAPISuccess('MailingGroup', 'get', array('mailing_id' => $cloneId, 'sequential' => 1)); $this->assertEquals(1, $cloneGroups['count']); $this->assertEquals($cloneGroups['values'][0]['group_type'], 'Include'); $this->assertEquals($cloneGroups['values'][0]['entity_table'], 'civicrm_group'); $this->assertEquals($cloneGroups['values'][0]['entity_id'], $groupIDs['inc']); } //@ todo tests below here are all failure tests which are not hugely useful - need success tests //------------ civicrm_mailing_event_bounce methods------------ /** * Test civicrm_mailing_event_bounce with wrong params. * Note that tests like this are slightly better than no test but an * api function cannot be considered supported / 'part of the api' without a * success test */ public function testMailerBounceWrongParams() { $params = array( 'job_id' => 'Wrong ID', 'event_queue_id' => 'Wrong ID', 'hash' => 'Wrong Hash', 'body' => 'Body...', 'time_stamp' => '20111109212100', ); $this->callAPIFailure('mailing_event', 'bounce', $params, 'Queue event could not be found' ); } //----------- civicrm_mailing_event_confirm methods ----------- /** * Test civicrm_mailing_event_confirm with wrong params. * Note that tests like this are slightly better than no test but an * api function cannot be considered supported / 'part of the api' without a * success test */ public function testMailerConfirmWrongParams() { $params = array( 'contact_id' => 'Wrong ID', 'subscribe_id' => 'Wrong ID', 'hash' => 'Wrong Hash', 'event_subscribe_id' => '123', 'time_stamp' => '20111111010101', ); $this->callAPIFailure('mailing_event', 'confirm', $params, 'contact_id is not a valid integer' ); } //---------- civicrm_mailing_event_reply methods ----------- /** * Test civicrm_mailing_event_reply with wrong params. * * Note that tests like this are slightly better than no test but an * api function cannot be considered supported / 'part of the api' without a * success test */ public function testMailerReplyWrongParams() { $params = array( 'job_id' => 'Wrong ID', 'event_queue_id' => 'Wrong ID', 'hash' => 'Wrong Hash', 'bodyTxt' => 'Body...', 'replyTo' => $this->_email, 'time_stamp' => '20111111010101', ); $this->callAPIFailure('mailing_event', 'reply', $params, 'Queue event could not be found' ); } //----------- civicrm_mailing_event_forward methods ---------- /** * Test civicrm_mailing_event_forward with wrong params. * Note that tests like this are slightly better than no test but an * api function cannot be considered supported / 'part of the api' without a * success test */ public function testMailerForwardWrongParams() { $params = array( 'job_id' => 'Wrong ID', 'event_queue_id' => 'Wrong ID', 'hash' => 'Wrong Hash', 'email' => $this->_email, 'time_stamp' => '20111111010101', ); $this->callAPIFailure('mailing_event', 'forward', $params, 'Queue event could not be found' ); } /** * @param array $params * Extra parameters for the draft mailing. * @return array|int */ public function createDraftMailing($params = array()) { $createParams = array_merge($this->_params, $params); $createResult = $this->callAPISuccess('mailing', 'create', $createParams, __FUNCTION__, __FILE__); $this->assertTrue(is_numeric($createResult['id'])); $this->assertDBQuery(0, 'SELECT count(*) FROM civicrm_mailing_job WHERE mailing_id = %1', array( 1 => array($createResult['id'], 'Integer'), )); return $createResult['id']; } /** * Test to make sure that if the event queue hashes have been archived, * we can still have working click-trough URLs working (CRM-17959). */ public function testUrlWithMissingTrackingHash() { $mail = $this->callAPISuccess('mailing', 'create', $this->_params + array('scheduled_date' => 'now'), __FUNCTION__, __FILE__); $jobs = $this->callAPISuccess('mailing_job', 'get', array('mailing_id' => $mail['id'])); $this->assertEquals(1, $jobs['count']); $params = array('mailing_id' => $mail['id'], 'test_email' => '[email protected]', 'test_group' => NULL); $deliveredInfo = $this->callAPISuccess($this->_entity, 'send_test', $params); $sql = "SELECT turl.id as url_id, turl.url, q.id as queue_id FROM civicrm_mailing_trackable_url as turl INNER JOIN civicrm_mailing_job as j ON turl.mailing_id = j.mailing_id INNER JOIN civicrm_mailing_event_queue q ON j.id = q.job_id ORDER BY turl.id DESC LIMIT 1"; $dao = CRM_Core_DAO::executeQuery($sql); $this->assertTrue($dao->fetch()); $url = CRM_Mailing_Event_BAO_TrackableURLOpen::track($dao->queue_id, $dao->url_id); $this->assertContains('https://civicrm.org', $url); // Now delete the event queue hashes and see if the tracking still works. CRM_Core_DAO::executeQuery('DELETE FROM civicrm_mailing_event_queue'); $url = CRM_Mailing_Event_BAO_TrackableURLOpen::track($dao->queue_id, $dao->url_id); $this->assertContains('https://civicrm.org', $url); // Ensure that Google CSS link is not tracked. $sql = "SELECT id FROM civicrm_mailing_trackable_url where url = 'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Zilla+Slab:500,700'"; $this->assertEquals([], CRM_Core_DAO::executeQuery($sql)->fetchAll()); } /** * Test Trackable URL with unicode character */ public function testTrackableURLWithUnicodeSign() { $unicodeURL = "https://civińcrm.org"; $this->_params['body_text'] = str_replace("https://civicrm.org", $unicodeURL, $this->_params['body_text']); $this->_params['body_html'] = str_replace("https://civicrm.org", $unicodeURL, $this->_params['body_html']); $mail = $this->callAPISuccess('mailing', 'create', $this->_params + array('scheduled_date' => 'now')); $params = array('mailing_id' => $mail['id'], 'test_email' => '[email protected]', 'test_group' => NULL); $this->callAPISuccess($this->_entity, 'send_test', $params); $sql = "SELECT turl.id as url_id, turl.url, q.id as queue_id FROM civicrm_mailing_trackable_url as turl INNER JOIN civicrm_mailing_job as j ON turl.mailing_id = j.mailing_id INNER JOIN civicrm_mailing_event_queue q ON j.id = q.job_id ORDER BY turl.id DESC LIMIT 1"; $dao = CRM_Core_DAO::executeQuery($sql); $this->assertTrue($dao->fetch()); $url = CRM_Mailing_Event_BAO_TrackableURLOpen::track($dao->queue_id, $dao->url_id); $this->assertContains($unicodeURL, $url); // Now delete the event queue hashes and see if the tracking still works. CRM_Core_DAO::executeQuery('DELETE FROM civicrm_mailing_event_queue'); $url = CRM_Mailing_Event_BAO_TrackableURLOpen::track($dao->queue_id, $dao->url_id); $this->assertContains($unicodeURL, $url); } /** * CRM-20892 : Test if Mail.create API throws error on update, * if modified_date less then the date when the mail was last updated/created */ public function testModifiedDateMismatchOnMailingUpdate() { $mail = $this->callAPISuccess('mailing', 'create', $this->_params + array('modified_date' => 'now')); try { $this->callAPISuccess('mailing', 'create', $this->_params + array('id' => $mail['id'], 'modified_date' => '2 seconds ago')); } catch (Exception $e) { $this->assertRegExp("/Failure in api call for mailing create: Mailing has not been saved, Content maybe out of date, please refresh the page and try again/", $e->getMessage()); } } }
41.346004
418
0.638363
cf87c5c1246269f97764de375a2100284517bff2
450
kt
Kotlin
app/src/main/java/com/example/android/recipeapp/BindingAdapters.kt
TymJanek/recipe_temp
6762eb34bf04760d3343c34b1e490df785e14bc8
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/example/android/recipeapp/BindingAdapters.kt
TymJanek/recipe_temp
6762eb34bf04760d3343c34b1e490df785e14bc8
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/example/android/recipeapp/BindingAdapters.kt
TymJanek/recipe_temp
6762eb34bf04760d3343c34b1e490df785e14bc8
[ "Apache-2.0" ]
null
null
null
package com.example.android.recipeapp import androidx.databinding.BindingAdapter import androidx.recyclerview.widget.RecyclerView import com.example.android.recipeapp.network.RecipeProperty import com.example.android.recipeapp.overview.RecipeAdapter @BindingAdapter("listData") fun bindRecyclerView(recyclerView: RecyclerView, data: List<RecipeProperty>?) { val adapter = recyclerView.adapter as RecipeAdapter adapter.submitList(data) }
28.125
79
0.831111
3f662929472e883e4ecb7f075b73fb26cdc58f11
15,437
rb
Ruby
lib/fudge_form_builder.rb
astashov/fudge_form
ba0b8cbbf952623fdb7831e26b7fd95d76b7efa4
[ "MIT" ]
1
2016-05-08T17:16:18.000Z
2016-05-08T17:16:18.000Z
lib/fudge_form_builder.rb
astashov/fudge_form
ba0b8cbbf952623fdb7831e26b7fd95d76b7efa4
[ "MIT" ]
null
null
null
lib/fudge_form_builder.rb
astashov/fudge_form
ba0b8cbbf952623fdb7831e26b7fd95d76b7efa4
[ "MIT" ]
null
null
null
class FudgeFormBuilder < ActionView::Helpers::FormBuilder include FudgeFormHelper include ActionView::Helpers::TagHelper include ActionView::Helpers::FormTagHelper def field_settings(method, options = {}, tag_value = nil) field_name = "#{sanitized_object_name}_#{method.to_s}" default_label = tag_value.nil? ? "#{method.to_s.humanize.titleize}" : "#{tag_value.to_s.humanize.titleize}" label = options[:label] ? options.delete(:label) : default_label options[:class] ||= "" options[:class] += options[:required] ? "m-form_required" : "" # Customize id for uniqueness of many forms on one page # (by default, if you have many forms of the same model on one page, form elements of these # forms will have the same id, and page will be not valid (by XHTML specification). # This is fix for it. if @object && [email protected]_record? options[:id] = "#{field_name}_#{@object.id}" else # Just assign some unique id if the record is new. Add 'f' letter to avoid collisions # with record's names @@id_counter ||= 0 options[:id] = "#{field_name}_f#{@@id_counter}" @@id_counter += 1 end label += '<em>*</em>' if options[:required] options.delete(:required) [field_name, label, options] end def sanitized_object_name @object_name.to_s.gsub(/[^-a-zA-Z0-9:.]/, "_").sub(/_$/, "") end def text_field(method, options = {}) add_class_name(options, 'm-form_text') field_name, label, options = field_settings(method, options) wrapping("text", field_name, label, super, method, options) end def hidden_field(method, options = {}) field_name, label, options = field_settings(method, options) options.merge!(:id => "#{field_name}_#{@object.id}") if @object && [email protected]_record? super(method, options) end def file_field(method, options = {}) add_class_name(options, 'm-form_file') field_name, label, options = field_settings(method, options) wrapping("file", field_name, label, super, method, options) end def datetime_select(method, options = {}, html_options = {}) options[:order] = [:day, :month, :year] add_class_name(html_options, 'm-form_select') field_name, label, options = field_settings(method, options) wrapping("datetime", field_name, label, super, method, options) end def time_select(method, options = {}, html_options = {}) add_class_name(options, 'm-form_select') field_name, label, options = field_settings(method, options) elements = "" elements += hour_select(method, options.dup, html_options) elements += minute_select(method, options.dup, html_options) wrapping("time", field_name, label, elements, method, options) end def sign_select(method, options = {}, html_options = {}) add_class_name(html_options, 'm-form_select') field_name, label, options = field_settings(method, options) element = select_tag("#{sanitized_object_name}[#{method.to_s}]", signs_select_options(@object[method]), options) wrapping("select", field_name, label, element, method, options) end def date_format_select(method, options = {}, html_options = {}) add_class_name(html_options, 'm-form_select') field_name, label, options = field_settings(method, options) element = select_tag("#{sanitized_object_name}[#{method.to_s}]", date_format_select_options(@object[method]), options) wrapping("select", field_name, label, element, method, options) end def date_select(method, options = {}, html_options = {}) add_class_name(options, 'm-form_select') field_name, label, options = field_settings(method, options) elements = "" elements += day_select(method, options.dup, html_options) elements += month_select(method, options.dup, html_options) elements += year_select(method, options.dup, html_options) wrapping("date", field_name, label, elements, method, options) end def hour_select(method, options = {}, html_options = {}) default = Time.now.hour selected_value = (@object.send(method) && @object.send(method).hour) || default select_options = hour_select_options(selected_value) add_class_name(options, 'hour') field_name, label, options = field_settings(method, options) options[:id] += '_4i' select_tag("#{sanitized_object_name}[#{method.to_s}(4i)]", select_options, options) end def minute_select(method, options = {}, html_options = {}) default = Time.now.min selected_value = (@object.send(method) && @object.send(method).min) || default select_options = minute_select_options(selected_value) add_class_name(options, 'minute') field_name, label, options = field_settings(method, options) options[:id] += '_5i' select_tag("#{sanitized_object_name}[#{method.to_s}(5i)]", select_options, options) end def year_select(method, options = {}, html_options = {}) start_year = options.delete(:start_year) || 1970 end_year = options.delete(:end_year) || 2030 default = Date.today.year selected_value = (@object.send(method) && @object.send(method).year) || default # Building array of options takes pretty much time, # so this function cache it. select_options = year_select_options(start_year, end_year, selected_value) add_class_name(options, 'year') field_name, label, options = field_settings(method, options) options[:id] += '_1i' select_tag("#{sanitized_object_name}[#{method.to_s}(1i)]", select_options, options) end def month_select(method, options = {}, html_options = {}) default = 1 selected_value = (@object.send(method) && @object.send(method).month) || default # Building array of options takes pretty much time, # so this function cache it. select_options = month_select_options(selected_value) add_class_name(options, 'month') field_name, label, options = field_settings(method, options) options[:id] += '_2i' select_tag("#{sanitized_object_name}[#{method.to_s}(2i)]", select_options, options) end def day_select(method, options = {}, html_options = {}) default = 1 selected_value = (@object.send(method) && @object.send(method).day) || default # Building array of options takes pretty much time, # so this function cache it. select_options = day_select_options(selected_value) add_class_name(options, 'day') field_name, label, options = field_settings(method, options) options[:id] += '_3i' select_tag("#{sanitized_object_name}[#{method.to_s}(3i)]", select_options, options) end def radio_button(method, tag_value, options = {}) add_class_name(options, 'm-form_radio') field_name, label, options = field_settings(method, options) wrapping("radio", field_name, label, super, method, options) end def check_box(method, options = {}, checked_value = "1", unchecked_value = "0") add_class_name(options, 'm-form_checkbox') field_name, label, options = field_settings(method, options) wrapping("check-box", field_name, label, super, method, options) end def gender_select(method, options = {}, html_options = {}) select(method, [['Male', 0], ['Female', 1], ['Other', 2]], options, html_options) end def select(method, choices, options = {}, html_options = {}) add_class_name(html_options, 'm-form_select') field_name, label, options = field_settings(method, options) html_options[:id] = options[:id] wrapping("select", field_name, label, super, method, options) end def password_field(method, options = {}) add_class_name(options, 'm-form_password') field_name, label, options = field_settings(method, options) wrapping("password", field_name, label, super, method, options) end def text_area(method, options = {}) options[:rows] = 5 add_class_name(options, 'm-form_textarea') field_name, label, options = field_settings(method, options) wrapping("textarea", field_name, label, super, method, options) end def body_text_area(method, options = {}) options[:rows] = 5 add_class_name(options, 'm-form_textarea') field_name, label, options = field_settings(method, options) textarea = "<div class='m-form_field'>" textarea += text_area_tag("#{sanitized_object_name}[#{method.to_s}]", @object[method], options) textarea += "<p class='b-char-counter_text'>#{body_length_text(@object)}</p>" textarea += "</div>" wrapping("textarea", field_name, label, textarea, method, options) end def body_length_text(item) content_type = item.content_type min = content_type.min_characters_count max = content_type.max_characters_count length = item.body.to_s.mb_chars.length.to_s if !min.blank? && !max.blank? "<em class='length'>#{length}</em> characters (<em class='min'>#{min}</em> - <em class='max'>#{max}</em> allowed)" elsif !min.blank? "<em class='length'>#{length}</em> characters (<em class='min'>#{min}</em> minimum)" elsif !max.blank? "<em class='length'>#{length}</em> characters (<em class='max'>#{max}</em> maximum)" else "<em class='length'>#{length}</em> characters" end end def radio_button_group(method, values, options = {}) add_class_name(options, 'm-form_radio') selections = [] values.each do |value| if value.is_a?(Array) tag_value = value.last value_text = value.first else tag_value = value value_text = value end radio_button = @template.radio_button(@object_name, method, tag_value, options.merge(:object => @object)) selections << boolean_field_wrapper(radio_button, "#{@object_name}_#{method.to_s}", tag_value, value_text) end selections field_name, label, options = field_settings(method, options) semantic_group("radio", field_name, label, selections, options) end def check_box_group(method, values, options = {}) add_class_name(options, 'm-form_checkbox') selections = [] values.each do |value| if value.is_a?(Array) checked_value = value.last.to_i value_text = value.first else checked_value = 1 value_text = value end check_box = check_box = @template.check_box_tag("#{@object_name}[#{method.to_s}][]", checked_value, @object.send(method).include?(checked_value), options.merge(:object => @object)) selections << boolean_field_wrapper(check_box, "#{@object_name}_#{method.to_s}", checked_value, value_text) end field_name, label, options = field_settings(method, options) semantic_group("check-box", field_name, label, selections, options) end # Build array of signs - options for select tag, then cache it. def signs_select_options(selected_value) unless @signs_select_options output = "<option></option>\n" output += "<optgroup label=\"Western\">\n" index = 0 output += AppConfig['western_signs'].map do |sign| option = "<option value='#{index}'>#{sign.capitalize}</option>" index += 1 option end.join("") output += "</optgroup>\n<optgroup label=\"Chinese\">\n" output += AppConfig['chinese_signs'].map do |sign| option = "<option value='#{index}'>#{sign.capitalize}</option>" index += 1 option end.join("") output += "</optgroup>\n<optgroup label=\"Other\">\n" output += AppConfig['additional_signs'].map do |sign| option = "<option value='#{index}'>#{sign.capitalize}</option>" index += 1 option end.join("") output += "</optgroup>\n" @signs_select_options = output end set_selected_option(@signs_select_options, selected_value) end # Build array of date formats - options for date format select tag, then cache it. def date_format_select_options(selected_value) unless @date_format_select_options @date_format_select_options = [] AppConfig['date_formats'].each_with_index do |date_format, index| @date_format_select_options << "<option value='#{index}'>#{date_format}</option>" end @date_format_select_options = @date_format_select_options.join("") end set_selected_option(@date_format_select_options, selected_value) end # Build array of years - options for select tag, then cache it. def hour_select_options(selected_value) unless @hour_select_options @hour_select_options = (0..23).map do |h| "<option value='#{"%.2i" % h}'>#{"%.2i" % h}</option>" end.join("") end set_selected_option(@hour_select_options, "%.2i" % selected_value) end # Build array of years - options for select tag, then cache it. def minute_select_options(selected_value) unless @minute_select_options @minute_select_options = (0..59).map do |m| "<option value='#{"%.2i" % m}'>#{"%.2i" % m}</option>" end.join("") end set_selected_option(@minute_select_options, "%.2i" % selected_value) end # Build array of years - options for select tag, then cache it. def year_select_options(start_year, end_year, selected_value) if !@year_select_options || !@year_select_options["#{start_year}_#{end_year}"] @year_select_options ||= {} @year_select_options["#{start_year}_#{end_year}"] = (start_year..end_year).map do |y| "<option value='#{y}'>#{y}</option>" end.join("") end set_selected_option(@year_select_options["#{start_year}_#{end_year}"], selected_value) end # Build array of months - options for select tag, then cache it. def month_select_options(selected_value) unless @month_select_options # Use array instead of hash because order of months is imporant months = [ [ "January", 1 ], [ "February", 2 ], [ "March", 3 ], [ "April", 4 ], [ "May", 5 ], [ "June", 6 ], [ "July", 7 ], [ "August", 8 ], [ "September", 9 ], [ "October", 10 ], [ "November", 11 ], [ "December", 12 ] ] @month_select_options = months.map do |values| "<option value='#{values[1]}'>#{values[0]}</option>" end.join("") end set_selected_option(@month_select_options, selected_value) end # Build array of days - options for select tag, then cache it. def day_select_options(selected_value) unless @day_select_options @day_select_options = (1..31).map do |d| "<option value='#{d}'>#{d}</option>" end.join("") end set_selected_option(@day_select_options, selected_value) end # Stupid, but fast way to add selected value to options :) def set_selected_option(options, selected_value) options.gsub(/ value='#{selected_value}'/, " value='#{selected_value}' selected='selected'") end def submit(method, options = {}) add_class_name(options, 'm-form_submit') %Q{<li class="buttons">#{super}</li>} end def submit_and_back(submit_name, options = {}) add_class_name(options, 'm-form_submit') submit_button = @template.submit_tag(submit_name, options) back_link = @template.link_to('Back', :back, :class => 'back') %Q{<li class="buttons">#{submit_button} #{back_link}</li>} end protected def add_class_name(options, class_name) classes = (options[:class]) ? options[:class].split(' ') : [] options[:class] = (classes << class_name).join(' ') end end
39.992228
186
0.666969
58111d838fdcdbe09c64e319504d2c48a0c904f6
140
css
CSS
src/app/components/parts/overlay-menu/overlay-menu.component.css
AndreHermanto/sgc-1
aa60668a271d892239faa368f4e6b8c860482433
[ "MIT" ]
5
2017-07-10T01:36:19.000Z
2021-03-23T11:39:16.000Z
src/app/components/parts/overlay-menu/overlay-menu.component.css
AndreHermanto/sgc-1
aa60668a271d892239faa368f4e6b8c860482433
[ "MIT" ]
16
2017-05-01T04:42:44.000Z
2019-01-22T16:12:54.000Z
src/app/components/parts/overlay-menu/overlay-menu.component.css
AndreHermanto/sgc-1
aa60668a271d892239faa368f4e6b8c860482433
[ "MIT" ]
6
2017-06-26T09:13:48.000Z
2018-12-03T16:54:58.000Z
.material-icons { cursor: pointer; } .check { color: rgb(64, 196, 255); margin-left: 1rem; } span { margin-right: 1rem; }
10.769231
29
0.571429
edecea4cbbe54736ccfbdb205ef2cf21768e4b94
1,257
sql
SQL
modules/hub/migrations/sqls/20190214202843-enable-threads-up.sql
SpankChain/indra
a88c702bed97013b2c50a0653695cb2d6c3f748b
[ "MIT" ]
null
null
null
modules/hub/migrations/sqls/20190214202843-enable-threads-up.sql
SpankChain/indra
a88c702bed97013b2c50a0653695cb2d6c3f748b
[ "MIT" ]
null
null
null
modules/hub/migrations/sqls/20190214202843-enable-threads-up.sql
SpankChain/indra
a88c702bed97013b2c50a0653695cb2d6c3f748b
[ "MIT" ]
null
null
null
/* Replace with your SQL commands */ create or replace function cm_channel_updates_pre_insert_update_trigger() returns trigger language plpgsql as $pgsql$ declare has_corresponding_onchain_tx boolean; channel cm_channels; begin -- Do not allow state updates when channel is in dispute status select * from cm_channels where id = NEW.channel_id into channel; if channel.status <> 'CS_OPEN' then raise exception 'cannot insert channel updates when channel is being disputed, channel = %', NEW; end if; if NEW.onchain_tx_logical_id is not null then has_corresponding_onchain_tx := ( select exists(( select * from onchain_transactions_raw where logical_id = NEW.onchain_tx_logical_id )) ); if not has_corresponding_onchain_tx then raise exception 'invalid channel update: no onchain_transactions_raw row with logical_id = % (update: %)', NEW.onchain_tx_logical_id, NEW; end if; end if; return NEW; end; $pgsql$;
33.972973
122
0.579952
44843de8dc120c9942d1d7854767c9baf3c8ec56
3,812
py
Python
idaes/util/update_workshop_materials.py
eyoung55/idaes-pse
01a6d795d484155923baabcfc2878d5285b8c9b1
[ "RSA-MD" ]
112
2019-02-11T23:16:36.000Z
2022-03-23T20:59:57.000Z
idaes/util/update_workshop_materials.py
eyoung55/idaes-pse
01a6d795d484155923baabcfc2878d5285b8c9b1
[ "RSA-MD" ]
621
2019-03-01T14:44:12.000Z
2022-03-31T19:49:25.000Z
idaes/util/update_workshop_materials.py
eyoung55/idaes-pse
01a6d795d484155923baabcfc2878d5285b8c9b1
[ "RSA-MD" ]
154
2019-02-01T23:46:33.000Z
2022-03-23T15:07:10.000Z
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the software owners: The Regents of the University of California, through # Lawrence Berkeley National Laboratory, National Technology & Engineering # Solutions of Sandia, LLC, Carnegie Mellon University, West Virginia University # Research Corporation, et al. All rights reserved. # # Please see the files COPYRIGHT.md and LICENSE.md for full copyright and # license information. ################################################################################# """ This script downloads a python file from pyomo.org that will allow us to update the workshop material easily during a workshop. The file install_idaes_workshop_materials.py is downloaded from pyomo.org, imported, and the method execute() is then called to do whatever actions are necessary. Note: - update_workshop_materials.py is a module in the idaes/util folder that does the work - update_workshop_materials.ipynb is a Jupyter notebook in the examples/workshops folder that calls this module - install_idaes_workshop_materials.py is posted on a site (for now pyomo.org, but later could be a repository on github). 1) JupyterHub: User executes update_workshop_materials.ipynb which calls to update_workshop_materials.py in idaes/util 2) update_workshop_materials.py downloads another python file (install_idaes_workshop_materials.py) from pyomo.org and calls "execute()" from that module. 3) install_idaes_workshop_materials.py does whatever is necessary to get the workshop materials into the user folder (and perform any updates necessary). TODO: This should probably be changed to get a zip file from an IDAES repository rather than install_idaes_workshop_materials.py from pyomo.org """ import os import logging import pyomo.common.fileutils as futils import pyomo.common.download as dload _install_idaes_workshop_materials_url = 'http://www.pyomo.org/s/install_idaes_workshop_materials.py' def download_install_module(): """ Downloads install_idaes_workshop_materials.py from pyomo.org """ download_dir = futils.this_file_dir() download_dir = os.path.join(download_dir, '..', '..', 'scripts', 'workshops') download_dest = os.path.join(download_dir, 'install_idaes_workshop_materials.py') print("\n\n" "#######################################################################################\n" "# Downloading: {}\n" "# to: {}\n" "#######################################################################################\n" "".format(_install_idaes_workshop_materials_url, download_dest) ) if not os.path.isdir(download_dir): raise NameError('Unable to locate download directory: {}'.format(download_dir)) try: downloader = dload.FileDownloader() downloader.set_destination_filename(download_dest) downloader.get_binary_file(_install_idaes_workshop_materials_url) except: print("\n\n***\nFailed to download: {}\n***".format(_install_idaes_workshop_materials_url)) raise print('... download complete') return download_dest def import_install_module(download_dest): """ Imports the path in download_dest (install_idaes_workshop_materials.py module) """ install_module = futils.import_file(download_dest) print('... importing install module') return install_module if __name__ == '__main__': download_dest = download_install_module() iwm = import_install_module(download_dest) iwm.execute()
42.355556
143
0.683893
e3a9709734400a415b36614c0b131d637285bd0a
654
rb
Ruby
attributes/database.rb
FlyNYCMeter/zabbix
78e6336eea383db42acea10cde4449c6a43560fc
[ "Apache-2.0" ]
null
null
null
attributes/database.rb
FlyNYCMeter/zabbix
78e6336eea383db42acea10cde4449c6a43560fc
[ "Apache-2.0" ]
null
null
null
attributes/database.rb
FlyNYCMeter/zabbix
78e6336eea383db42acea10cde4449c6a43560fc
[ "Apache-2.0" ]
null
null
null
default['zabbix']['database']['install_method'] = "mysql" default['zabbix']['database']['dbname'] = "zabbix" default['zabbix']['database']['dbuser'] = "zabbix" default['zabbix']['database']['dbhost'] = "localhost" default['zabbix']['database']['dbpassword'] = nil default['zabbix']['database']['dbport'] = "3306" default['zabbix']['database']['allowed_user_hosts'] = "localhost" default['zabbix']['database']['rds_master_user'] = nil default['zabbix']['database']['rds_master_password'] = nil # SCHEMA is relevant only for IBM_DB2 database default['zabbix']['database']['schema'] = nil
46.714286
65
0.619266
3f2468dd87fdfb0718ffe1d7f3dc5108ebc19614
3,026
php
PHP
app/sites/all/modules/expire/expire.api.php
primowebsolutions/drupal7-platform-v2
30d02575b1874ac352f1f3d677c322cedde9b25f
[ "Apache-2.0" ]
null
null
null
app/sites/all/modules/expire/expire.api.php
primowebsolutions/drupal7-platform-v2
30d02575b1874ac352f1f3d677c322cedde9b25f
[ "Apache-2.0" ]
null
null
null
app/sites/all/modules/expire/expire.api.php
primowebsolutions/drupal7-platform-v2
30d02575b1874ac352f1f3d677c322cedde9b25f
[ "Apache-2.0" ]
null
null
null
<?php /** * @file * API documentation for Cache Expiration module. */ /** * Provides possibility to flush pages for external cache storages. * * @param $urls * List of internal paths and/or absolute URLs that should be flushed. * * Example of array (when base url include option is enabled): * array( * 'node/1' => 'http://example.com/node/1', * 'news' => 'http://example.com/news', * ); * * Example of array (when base url include option is disabled): * array( * 'node/1' => 'node/1', * 'news' => 'news', * ); * * @param $wildcards * Array with wildcards implementations for each internal path. * Indicates whether should be executed wildcard cache flush. * * Example: * array( * 'node/1' => FALSE, * 'news' => TRUE, * ); * * @param $object_type * Name of object type ('node', 'comment', 'user', etc). * * @param $object * Object (node, comment, user, etc) for which expiration is executes. * * @see expire.api.inc */ function hook_expire_cache($urls, $wildcards, $object_type, $object) { module_load_include('inc', 'purge'); foreach ($urls as $url) { $full_path = url($url, array('absolute' => TRUE)); purge_urls($full_path, $wildcards); } } /** * Provides possibility to change urls before they are expired. * * @param $urls * List of internal paths and/or absolute URLs that should be flushed. * * Example of array: * array( * 'node-1' => 'node/1', * 'reference-user-17' => 'user/17', * ); * * @param $object_type * Name of object type ('node', 'comment', 'user', etc). * * @param $object * Object (node, comment, user, etc) for which expiration is executes. * * @param $absolute_urls_passed * Indicates whether absolute urls were passed (TRUE or FALSE). * Currently this flag can be set to TRUE only from drush command or rules action. * * @see expire.api.inc */ function hook_expire_cache_alter(&$urls, $object_type, $object, $absolute_urls_passed) { if (!$absolute_urls_passed && isset($urls['node-1'])) { unset($urls['node-1']); // Do not expire node with nid 1. } } /** * Provides possibility to change urls right before they are expired. * * @param $urls * List of internal paths and/or absolute URLs that should be flushed. * * Example of array (when base url include option is enabled): * array( * 'node/1' => 'http://example.com/node/1', * 'news' => 'http://example.com/news', * ); * * Example of array (when base url include option is disabled): * array( * 'node/1' => 'node/1', * 'news' => 'news', * ); * * @param $object_type * Name of object type ('node', 'comment', 'user', etc). * * @param $object * Object (node, comment, user, etc) for which expiration is executes. * * @see expire.api.inc */ function hook_expire_urls_alter(&$urls, $object_type, $object) { if ($object_type == 'node' && isset($urls['node-' . $object->nid])) { $urls['node-' . $object->nid] = 'custom-url'; } }
26.778761
88
0.61996
fa8cab7d2db90b6c1d432127901d174625e5eb3e
362
hh
C++
fields/versionchecker.hh
45G/libsocks6msg
73b778bfe8efb2c311520617debdfbadf10b6d88
[ "MIT" ]
2
2020-08-18T11:20:21.000Z
2022-03-08T23:49:02.000Z
fields/versionchecker.hh
45G/libsocks6msg
73b778bfe8efb2c311520617debdfbadf10b6d88
[ "MIT" ]
null
null
null
fields/versionchecker.hh
45G/libsocks6msg
73b778bfe8efb2c311520617debdfbadf10b6d88
[ "MIT" ]
null
null
null
#ifndef SOCKS6MSG_VERSIONCHECKER_HH #define SOCKS6MSG_VERSIONCHECKER_HH #include "bytebuffer.hh" namespace S6M { template <uint8_t VER> struct VersionChecker { VersionChecker() {} VersionChecker(ByteBuffer *bb) { uint8_t *ver = bb->peek<uint8_t>(); if (*ver != VER) throw BadVersionException(*ver); } }; } #endif // SOCKS6MSG_VERSIONCHECKER_HH
14.48
37
0.732044
a34a5b07012b890773c684bc8f897b4d27bd9705
254
java
Java
src/main/java/com/zoomdata/connector/example/framework/provider/serverdescription/connectionparameters/IConnectionParameterBuilder.java
awhipp/edc-cratedb
e16efa445023b0eda1c7139d13d02ca0e33c282c
[ "Apache-2.0" ]
null
null
null
src/main/java/com/zoomdata/connector/example/framework/provider/serverdescription/connectionparameters/IConnectionParameterBuilder.java
awhipp/edc-cratedb
e16efa445023b0eda1c7139d13d02ca0e33c282c
[ "Apache-2.0" ]
null
null
null
src/main/java/com/zoomdata/connector/example/framework/provider/serverdescription/connectionparameters/IConnectionParameterBuilder.java
awhipp/edc-cratedb
e16efa445023b0eda1c7139d13d02ca0e33c282c
[ "Apache-2.0" ]
null
null
null
/** * Copyright (C) Zoomdata, Inc. 2012-2017. All rights reserved. */ package com.zoomdata.connector.example.framework.provider.serverdescription.connectionparameters; public interface IConnectionParameterBuilder { IConnectionParameter build(); }
28.222222
97
0.791339
2cab716c6eb6f1e177772976dc841140e2d22180
5,519
py
Python
tests/vultr/vultr_spec_tests.py
germfue/vps-tools
90fa39403be747b6ec73697064a58bab8d575526
[ "BSD-3-Clause" ]
null
null
null
tests/vultr/vultr_spec_tests.py
germfue/vps-tools
90fa39403be747b6ec73697064a58bab8d575526
[ "BSD-3-Clause" ]
null
null
null
tests/vultr/vultr_spec_tests.py
germfue/vps-tools
90fa39403be747b6ec73697064a58bab8d575526
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2016, Germán Fuentes Capella <[email protected]> # BSD 3-Clause License # # Copyright (c) 2017, Germán Fuentes Capella # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # * Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import re import requests import ruamel.yaml import unittest from bs4 import BeautifulSoup from collections import OrderedDict from .scenario_file import load_cached_scenarios, dump_retrieved_scenarios, error_scenario_mismatch from .supported_spec_calls import supported_calls from .test_scenario import TestScenario _response = requests.get('https://www.vultr.com/api/') _soup = BeautifulSoup(_response.text, 'html.parser') _blacklist_calls = ('cURL',) _re_block = re.compile('/v1/(?P<block>[^/]+)/') _blocks = set([_re_block.match(x).group('block') for x in supported_calls]) _re_row = '.*%s\s+%s\s.*' _txt_api_key = 'API Key Required:' _txt_http_method = 'Request Type:' _txt_sample_request = 'Example Request:' _txt_sample_response = 'Example Response:' _txt_parameters = 'Parameters:' _txt_no_parameters = 'No parameters.' _txt_no_response = 'No response, check HTTP result code.' class TestUpdatesInVultrSpec(unittest.TestCase): """ These tests check if the api defined in https://vultr.com/api and the version cached are in sync """ def test_spec_availability(self): self.assertEqual(200, _response.status_code) def test_api_calls_defined_and_cached_in_sync(self): calls_found = [x.text for x in self._find_reported_calls()] # check that all calls retrieved match existing calls for call in calls_found: self.assertIn(call, supported_calls, 'New calls added to api. Remember to add them to supported_spec_calls.py' ) # check that no API call gets dropped for call in supported_calls: self.assertIn(call, calls_found) def test_if_new_scenarios_are_defined(self): scenarios = ruamel.yaml.dump(self._parse_scenarios()) cached_scenarios = load_cached_scenarios() try: self.assertEqual(cached_scenarios, scenarios, error_scenario_mismatch) except: dump_retrieved_scenarios(scenarios) raise def _find_reported_calls(self): return [x for x in _soup.find_all('h3') if x.text not in _blacklist_calls] def _parse_table(self, scenario, table): txt = table.get_text() match = re.search(_re_row % (_txt_api_key, 'Yes'), txt) if match: scenario.api_key = 'EXAMPLE' else: scenario.api_key = '' match = re.search(_re_row % (_txt_http_method, 'GET'), txt) if match: scenario.http_method = 'GET' else: match = re.search(_re_row % (_txt_http_method, 'POST'), txt) if match: scenario.http_method = 'POST' else: raise ValueError('Can not find HTTP Method: %s' % txt) def _parse_code_blocks(self, scenario, code_blocks): for code_block in code_blocks: key = code_block.find_all('h4', limit=1)[0].text value = code_block.find_all('code', limit=1)[0].text if key == _txt_sample_request: scenario.request = value elif key == _txt_sample_response: scenario.response = value.replace(_txt_no_response, '') elif key == _txt_parameters: scenario.doc_params = value.replace(_txt_no_parameters, '') else: raise ValueError('%s: item not expected' % key) def _parse_scenarios(self): scenarios = OrderedDict() for api_call in self._find_reported_calls(): scenario = TestScenario(api_call.text) self._parse_table(scenario, api_call.parent.table) code_blocks = api_call.parent.find_all('div', class_='code') self._parse_code_blocks(scenario, code_blocks) scenarios[api_call.text] = scenario return scenarios
40.580882
99
0.689436
ed0a5cde9085ea4ca42829eb91ff762116e8176a
2,093
h
C
src/fdb5/api/local/DumpVisitor.h
dvuckovic/fdb
c529bf5293d1f5e33048b1b12e7fdfbf4d7448b2
[ "Apache-2.0" ]
5
2020-01-03T10:23:05.000Z
2021-10-21T12:52:47.000Z
src/fdb5/api/local/DumpVisitor.h
dvuckovic/fdb
c529bf5293d1f5e33048b1b12e7fdfbf4d7448b2
[ "Apache-2.0" ]
null
null
null
src/fdb5/api/local/DumpVisitor.h
dvuckovic/fdb
c529bf5293d1f5e33048b1b12e7fdfbf4d7448b2
[ "Apache-2.0" ]
1
2021-07-08T16:26:06.000Z
2021-07-08T16:26:06.000Z
/* * (C) Copyright 2018- ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an intergovernmental organisation nor * does it submit to any jurisdiction. */ /* * This software was developed as part of the EC H2020 funded project NextGenIO * (Project ID: 671951) www.nextgenio.eu */ /// @author Simon Smart /// @date November 2018 #ifndef fdb5_api_local_DumpVisitor_H #define fdb5_api_local_DumpVisitor_H #include "fdb5/api/local/QueryVisitor.h" #include "fdb5/api/local/QueueStringLogTarget.h" #include "fdb5/api/helpers/DumpIterator.h" #include "fdb5/database/DB.h" namespace fdb5 { namespace api { namespace local { /// @note Helper classes for LocalFDB //---------------------------------------------------------------------------------------------------------------------- class DumpVisitor : public QueryVisitor<DumpElement> { public: DumpVisitor(eckit::Queue<DumpElement>& queue, const metkit::mars::MarsRequest& request, bool simple) : QueryVisitor<DumpElement>(queue, request), out_(new QueueStringLogTarget(queue)), simple_(simple) {} bool visitIndexes() override { return false; } bool visitEntries() override { return false; } bool visitDatabase(const Catalogue& catalogue, const Store& store) override { catalogue.dump(out_, simple_); return true; } bool visitIndex(const Index&) override { NOTIMP; } void visitDatum(const Field&, const Key&) override { NOTIMP; } void visitDatum(const Field& field, const std::string& keyFingerprint) override { EntryVisitor::visitDatum(field, keyFingerprint); } private: eckit::Channel out_; bool simple_; }; //---------------------------------------------------------------------------------------------------------------------- } // namespace local } // namespace api } // namespace fdb5 #endif
29.9
120
0.634018
a486eb8f8f3afe0bd7903cfdd3a9acb90730dde7
2,513
php
PHP
app/controllers/BaseController.php
maaaark/visionward
19d34dbe65e188bc9b32c819c9d5f8a996f448f2
[ "MIT" ]
null
null
null
app/controllers/BaseController.php
maaaark/visionward
19d34dbe65e188bc9b32c819c9d5f8a996f448f2
[ "MIT" ]
null
null
null
app/controllers/BaseController.php
maaaark/visionward
19d34dbe65e188bc9b32c819c9d5f8a996f448f2
[ "MIT" ]
null
null
null
<?php class BaseController extends Controller { public function __construct() { //$settings = Setting::all(); $last_posts = Post::where("published", "=", 1)->orderBy("created_at", "DESC")->limit(3)->get(); $matches = Match::orderBy("game_date", "DESC")->limit(3)->get(); $champion_sales = Champion::orderBy("name", "ASC")->where("sale", true)->get(); $skin_sales = Skin::orderBy("name", "ASC")->where("sale", true)->get(); $transfers = PlayerHistory::orderBy("created_at", "DESC")->limit(3)->get(); $patchversion = Setting::where('key', '=', 'patch_number')->first(); $settings = Setting::all(); $featuredContents = FeaturedContent::orderBy("order", "ASC")->get(); View::share('global_champion_sales', $champion_sales); View::share('global_skin_sales', $skin_sales); View::share('global_matches', $matches); View::share('global_last_posts', $last_posts); View::share('global_transfers', $transfers); View::share('patchversion', $patchversion['attributes']['value']); View::share('global_settings', $settings); View::share('global_featuredContents',$featuredContents); } /** * Setup the layout used by the controller. * * @return void */ protected function setupLayout() { if ( ! is_null($this->layout)) { $this->layout = View::make($this->layout); } } protected function _generateNewsResult($searchString) { //var_dump($searchString); $searches = DB::table('posts') ->where('title', 'LIKE', '%'.$searchString.'%') ->orWhere('content', 'LIKE', '%'.$searchString.'%') ->get(); //$countResult = count($results); //foreach($results as $result) { // var_dump($result->title); //} //var_dump($countResult);die("qwe"); return $searches; } protected function _generateChampResult($searchString) { $searches = DB::table('champions') ->where('name', 'LIKE', '%'.$searchString.'%') ->orWhere('key', 'LIKE', '%'.$searchString.'%') ->orWhere('title', 'LIKE', '%'.$searchString.'%') ->get(); return $searches; } protected function _generatePlayerResult($searchString) { $searches = DB::table('players') ->where('nickname', 'LIKE', '%'.$searchString.'%') ->orWhere('first_name', 'LIKE', '%'.$searchString.'%') ->orWhere('last_name', 'LIKE', '%'.$searchString.'%') ->get(); return $searches; } protected function _generateTeamResult($searchString) { $searches = DB::table('teams') ->where('name', 'LIKE', '%'.$searchString.'%') ->get(); return $searches; } }
28.556818
97
0.628333
053b6a0157fcae2300a3d144451810c0d2898257
66
rb
Ruby
spec/test.rb
GeoffWilliams/pe_rbac
24edbc05ad4987a5e584a0fcb6cbc51c986adae1
[ "Apache-2.0" ]
null
null
null
spec/test.rb
GeoffWilliams/pe_rbac
24edbc05ad4987a5e584a0fcb6cbc51c986adae1
[ "Apache-2.0" ]
4
2016-11-16T07:41:46.000Z
2017-05-31T01:11:07.000Z
spec/test.rb
GeoffWilliams/pe_rbac
24edbc05ad4987a5e584a0fcb6cbc51c986adae1
[ "Apache-2.0" ]
1
2019-05-28T21:43:44.000Z
2019-05-28T21:43:44.000Z
require './spec/fake_rbac_service' FakeRbacService::WEBrick.run!
16.5
34
0.80303
a3ab71be694053484e28ec2a6a48544b6d2b0fc2
1,732
java
Java
sample/src/main/java/com/polidea/rxandroidble2/sample/util/HttpUtil.java
pengyuu/RxAndroidBleDemo
8b7204dd2445156fd4d5027520664f9b9da99821
[ "Apache-2.0" ]
null
null
null
sample/src/main/java/com/polidea/rxandroidble2/sample/util/HttpUtil.java
pengyuu/RxAndroidBleDemo
8b7204dd2445156fd4d5027520664f9b9da99821
[ "Apache-2.0" ]
null
null
null
sample/src/main/java/com/polidea/rxandroidble2/sample/util/HttpUtil.java
pengyuu/RxAndroidBleDemo
8b7204dd2445156fd4d5027520664f9b9da99821
[ "Apache-2.0" ]
1
2021-08-23T12:39:12.000Z
2021-08-23T12:39:12.000Z
package com.polidea.rxandroidble2.sample.util; import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import okhttp3.Call; import okhttp3.Callback; import okhttp3.MediaType; import okhttp3.MultipartBody; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; /** * Author: rain * Date: 2020/10/28 10:53 AM * Description: */ public class HttpUtil { public static void postFile(File file, String url) throws IOException { RequestBody fileBody = RequestBody.create(MediaType.parse("application/octet-stream"), file); RequestBody requestBody = new MultipartBody.Builder() .setType(MultipartBody.FORM) .addFormDataPart("application/octet-stream", file.getName(), fileBody) .build(); Request request = new Request.Builder() .url(url) .post(requestBody) .build(); final okhttp3.OkHttpClient.Builder httpBuilder = new OkHttpClient.Builder(); OkHttpClient okHttpClient = httpBuilder //设置超时 .connectTimeout(100, TimeUnit.SECONDS) .writeTimeout(150, TimeUnit.SECONDS) .build(); okHttpClient.newCall(request).enqueue(new Callback() { @Override public void onResponse(Call call, Response response) throws IOException { System.out.println(response.body().string()); } @Override public void onFailure(Call arg0, IOException e) { // TODO Auto-generated method stub System.out.println(e.toString()); } }); } }
30.928571
101
0.624711
20df97bf758a03b280cd2047969ce3f9fafc64de
468
py
Python
Python/network/server_basic/example01_http.py
sug5806/TIL
2309d8a270e4a7b8961268a40b6492c5db317e37
[ "MIT" ]
null
null
null
Python/network/server_basic/example01_http.py
sug5806/TIL
2309d8a270e4a7b8961268a40b6492c5db317e37
[ "MIT" ]
102
2020-02-12T00:10:33.000Z
2022-03-11T23:58:41.000Z
Python/network/server_basic/example01_http.py
sug5806/TIL
2309d8a270e4a7b8961268a40b6492c5db317e37
[ "MIT" ]
null
null
null
import http.server import socketserver # 서버에 접속하는 포트 PORT = 8000 # 요청이 들어오면 어느 객체가 요청을 해석하고 처리할것이냐? # Ex) 수리기사를 부르는 개념 # 현재 디렉토리와 하위의 파일을 제공하고 디렉토리 구조를 HTTP 요청에 직접 매핑함 Handler = http.server.SimpleHTTPRequestHandler # ""으로 하면 localhost(127.0.0.1)이다" with socketserver.TCPServer(("", PORT), Handler) as httpd: print("serving at PORT", PORT) # 클라이언트의 접속 요청을 수신대기 한다. 접속 요청이 있을시 # 수락하고 SimpleHTTPRequestHandler의 handle 메소드를 호출한다. httpd.serve_forever()
24.631579
58
0.720085
ed4eec4be83bc803a9ae6bd3aa91ed935c444164
518
c
C
game.c
Knowledge-soda/Polluting-Lakes
932c174e48ba9c07ed26f42ad9dc12a7a91832fb
[ "BSD-3-Clause" ]
null
null
null
game.c
Knowledge-soda/Polluting-Lakes
932c174e48ba9c07ed26f42ad9dc12a7a91832fb
[ "BSD-3-Clause" ]
null
null
null
game.c
Knowledge-soda/Polluting-Lakes
932c174e48ba9c07ed26f42ad9dc12a7a91832fb
[ "BSD-3-Clause" ]
null
null
null
#include<stdlib.h> #include<stdio.h> #include"game.h" #include"outer.h" #include"main.h" int main(int argc, char **argv){ Game *game; game = malloc(sizeof(Game)); if (init(game)){ fprintf(stderr, "Init Error, SDL: %s\n", SDL_GetError()); return 1; } if(loop(game)){ fprintf(stderr, "Loop Error, SDL: %s\n", SDL_GetError()); return 1; } if(end(game)){ fprintf(stderr, "End Error, SDL: %s\n", SDL_GetError()); return 1; } return 0; }
20.72
65
0.554054
8516a2cb971a3332dd00936c7b11254db8b82b11
382
cs
C#
samples/Sample.Forms/Samples/ViewModels/MainViewModel.cs
Opti-Q/XamarinSignaturePad
f5cd03c6a95388f0c5da82d485fa41dd5c66e2ef
[ "MIT" ]
null
null
null
samples/Sample.Forms/Samples/ViewModels/MainViewModel.cs
Opti-Q/XamarinSignaturePad
f5cd03c6a95388f0c5da82d485fa41dd5c66e2ef
[ "MIT" ]
null
null
null
samples/Sample.Forms/Samples/ViewModels/MainViewModel.cs
Opti-Q/XamarinSignaturePad
f5cd03c6a95388f0c5da82d485fa41dd5c66e2ef
[ "MIT" ]
null
null
null
using System.Windows.Input; using Xamarin.Forms; namespace Samples.ViewModels { public class MainViewModel : BaseViewModel { public ICommand DataBindingCommand { get; } = new Command(() => App.NavigateTo<SignaturePadConfigViewModel>()); public ICommand XamlCodeBehindCommand { get; } = new Command(() => App.NavigateTo<SignatureXamlViewModel>()); } }
29.384615
119
0.709424
05d3c25d8462489a12842df536805333299f2c7a
378
rs
Rust
src/ml_sumcheck/protocol/mod.rs
ValarDragon/sumcheck
9d90582d9a77057052a776dbc642e57ded69c5b2
[ "Apache-2.0", "MIT" ]
10
2021-02-09T20:15:42.000Z
2021-12-20T15:22:46.000Z
src/ml_sumcheck/protocol/mod.rs
ValarDragon/sumcheck
9d90582d9a77057052a776dbc642e57ded69c5b2
[ "Apache-2.0", "MIT" ]
8
2021-02-12T06:52:31.000Z
2021-10-06T06:06:33.000Z
src/ml_sumcheck/protocol/mod.rs
ValarDragon/sumcheck
9d90582d9a77057052a776dbc642e57ded69c5b2
[ "Apache-2.0", "MIT" ]
2
2021-03-27T19:29:49.000Z
2021-06-06T23:58:33.000Z
//! Interactive Proof Protocol used for Multilinear Sumcheck use ark_ff::Field; use ark_std::marker::PhantomData; pub mod prover; pub mod verifier; pub use crate::ml_sumcheck::data_structures::{ListOfProductsOfPolynomials, PolynomialInfo}; /// Interactive Proof for Multilinear Sumcheck pub struct IPForMLSumcheck<F: Field> { #[doc(hidden)] _marker: PhantomData<F>, }
27
91
0.769841
a37ed3533a2409e9ac66c28978122a5ae10be49f
13,556
java
Java
ModuleB/src/main/java/letuizu/com/moduleb/activity/SkinActivity.java
sun529417168/Letuizu
f66551b8364e6b7972c92cd9688f699753f7afa0
[ "MIT" ]
null
null
null
ModuleB/src/main/java/letuizu/com/moduleb/activity/SkinActivity.java
sun529417168/Letuizu
f66551b8364e6b7972c92cd9688f699753f7afa0
[ "MIT" ]
null
null
null
ModuleB/src/main/java/letuizu/com/moduleb/activity/SkinActivity.java
sun529417168/Letuizu
f66551b8364e6b7972c92cd9688f699753f7afa0
[ "MIT" ]
null
null
null
package letuizu.com.moduleb.activity; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.LinearLayout; import android.widget.Toast; import com.aliyun.vodplayer.media.AliyunLocalSource; import com.aliyun.vodplayer.media.AliyunPlayAuth; import com.aliyun.vodplayer.media.IAliyunVodPlayer; import com.aliyun.vodplayer.utils.VcPlayerLog; import com.aliyun.vodplayerview.utils.ScreenUtils; import com.aliyun.vodplayerview.widget.AliyunVodPlayerView; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import cn.com.library.base.BaseActivity; import letuizu.com.moduleb.R; import letuizu.com.moduleb.util.CleanLeakUtils; import letuizu.com.moduleb.util.ScreenStatusController; /** * 文件名:SkinActivity * 描 述:视频点播的类 * 作 者:stt * 时 间:2017.11.3 * 版 本:V1.0.0 */ public class SkinActivity extends BaseActivity { private AliyunVodPlayerView mAliyunVodPlayerView = null; private SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss.SS"); private List<String> logStrs = new ArrayList<>(); private String mVid = null; private String mAuthinfo = null; private AliyunPlayAuth mPlayAuth = null; private AliyunLocalSource mLocalSource = null; private ScreenStatusController mScreenStatusController = null; @Override protected void setView() { setContentView(R.layout.activity_skin); } @Override protected void setDate(Bundle savedInstanceState) { } @Override protected void init() { findViewById(R.id.blue).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mAliyunVodPlayerView.setTheme(AliyunVodPlayerView.Theme.Blue); } }); findViewById(R.id.green).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mAliyunVodPlayerView.setTheme(AliyunVodPlayerView.Theme.Green); } }); findViewById(R.id.orange).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mAliyunVodPlayerView.setTheme(AliyunVodPlayerView.Theme.Orange); } }); findViewById(R.id.red).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mAliyunVodPlayerView.setTheme(AliyunVodPlayerView.Theme.Red); } }); mAliyunVodPlayerView = (AliyunVodPlayerView) findViewById(R.id.video_view); String sdDir = Environment.getExternalStorageDirectory().getAbsolutePath() + "/test_save_cache"; mAliyunVodPlayerView.setPlayingCache(true, sdDir, 60 * 60 /*时长, s */, 300 /*大小,MB*/); mAliyunVodPlayerView.setTheme(AliyunVodPlayerView.Theme.Orange); mAliyunVodPlayerView.setOnPreparedListener(new IAliyunVodPlayer.OnPreparedListener() {//播放准备开始 @Override public void onPrepared() { logStrs.add(format.format(new Date()) + getString(R.string.log_prepare_success)); Toast.makeText(SkinActivity.this.getApplicationContext(), R.string.toast_prepare_success, Toast.LENGTH_SHORT).show(); } }); mAliyunVodPlayerView.setOnCompletionListener(new IAliyunVodPlayer.OnCompletionListener() {//播放完毕 @Override public void onCompletion() { logStrs.add(format.format(new Date()) + getString(R.string.log_play_completion)); Toast.makeText(SkinActivity.this.getApplicationContext(), R.string.toast_play_compleion, Toast.LENGTH_SHORT).show(); } }); mAliyunVodPlayerView.setOnFirstFrameStartListener(new IAliyunVodPlayer.OnFirstFrameStartListener() {//播放第一贞开始 @Override public void onFirstFrameStart() { Map<String, String> debugInfo = mAliyunVodPlayerView.getAllDebugInfo(); long createPts = 0; if (debugInfo.get("create_player") != null) { String time = debugInfo.get("create_player"); createPts = (long) Double.parseDouble(time); logStrs.add(format.format(new Date(createPts)) + getString(R.string.log_player_create_success)); } if (debugInfo.get("open-url") != null) { String time = debugInfo.get("open-url"); long openPts = (long) Double.parseDouble(time) + createPts; logStrs.add(format.format(new Date(openPts)) + getString(R.string.log_open_url_success)); } if (debugInfo.get("find-stream") != null) { String time = debugInfo.get("find-stream"); long findPts = (long) Double.parseDouble(time) + createPts; logStrs.add(format.format(new Date(findPts)) + getString(R.string.log_request_stream_success)); } if (debugInfo.get("open-stream") != null) { String time = debugInfo.get("open-stream"); long openPts = (long) Double.parseDouble(time) + createPts; logStrs.add(format.format(new Date(openPts)) + getString(R.string.log_start_open_stream)); } logStrs.add(format.format(new Date()) + getString(R.string.log_first_frame_played)); } }); mAliyunVodPlayerView.setOnChangeQualityListener(new IAliyunVodPlayer.OnChangeQualityListener() { @Override public void onChangeQualitySuccess(String finalQuality) { logStrs.add(format.format(new Date()) + getString(R.string.log_change_quality_success)); Toast.makeText(SkinActivity.this.getApplicationContext(), getString(R.string.log_change_quality_success), Toast.LENGTH_SHORT).show(); } @Override public void onChangeQualityFail(int code, String msg) { logStrs.add(format.format(new Date()) + getString(R.string.log_change_quality_fail) + " : " + msg); Toast.makeText(SkinActivity.this.getApplicationContext(), getString(R.string.log_change_quality_fail), Toast.LENGTH_SHORT).show(); } }); mAliyunVodPlayerView.setOnStoppedListner(new IAliyunVodPlayer.OnStoppedListener() {//播放停止按钮 @Override public void onStopped() { Toast.makeText(SkinActivity.this.getApplicationContext(), R.string.log_play_stopped, Toast.LENGTH_SHORT).show(); } }); mAliyunVodPlayerView.enableNativeLog(); setPlaySource(); mScreenStatusController = new ScreenStatusController(this); mScreenStatusController.setScreenStatusListener(new ScreenStatusController.ScreenStatusListener() { @Override public void onScreenOn() { } @Override public void onScreenOff() { } }); mScreenStatusController.startListen(); } private void setPlaySource() { // String type = getIntent().getStringExtra("type"); String type = "localSource"; if ("authInfo".equals(type)) { //auth方式 //NOTE: 注意过期时间。特别是重播的时候,可能已经过期。所以重播的时候最好重新请求一次服务器。 mVid = getIntent().getStringExtra("vid"); String authInfo = getIntent().getStringExtra("authinfo"); AliyunPlayAuth.AliyunPlayAuthBuilder aliyunPlayAuthBuilder = new AliyunPlayAuth.AliyunPlayAuthBuilder(); aliyunPlayAuthBuilder.setVid(mVid); aliyunPlayAuthBuilder.setPlayAuth(authInfo); aliyunPlayAuthBuilder.setQuality(IAliyunVodPlayer.QualityValue.QUALITY_ORIGINAL); mPlayAuth = aliyunPlayAuthBuilder.build(); mAliyunVodPlayerView.setAuthInfo(mPlayAuth); } else if ("localSource".equals(type)) { //本地播放 String url = "http://player.alicdn.com/video/aliyunmedia.mp4"; AliyunLocalSource.AliyunLocalSourceBuilder asb = new AliyunLocalSource.AliyunLocalSourceBuilder(); asb.setSource(url); mLocalSource = asb.build(); mAliyunVodPlayerView.setLocalSource(mLocalSource); mAliyunVodPlayerView.setAutoPlay(true); } } @Override protected void onResume() { super.onResume(); updatePlayerViewMode(); if (mAliyunVodPlayerView != null) { mAliyunVodPlayerView.resume(); } } @Override protected void onStop() { super.onStop(); if (mAliyunVodPlayerView != null) { mAliyunVodPlayerView.stop(); } } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Log.d("lfj1019", " orientation = " + getResources().getConfiguration().orientation); updatePlayerViewMode(); } private void updatePlayerViewMode() { if (mAliyunVodPlayerView != null) { int orientation = getResources().getConfiguration().orientation; if (orientation == Configuration.ORIENTATION_PORTRAIT) { //转为竖屏了。 //显示状态栏 if (Build.DEVICE.equalsIgnoreCase("mx5") || Build.DEVICE.equalsIgnoreCase("Redmi Note2") || Build.DEVICE.equalsIgnoreCase("Z00A_1") || Build.DEVICE.equalsIgnoreCase("hwH60-L02")) { // getSupportActionBar().show(); } else if (!(Build.DEVICE.equalsIgnoreCase("V4") && Build.MANUFACTURER.equalsIgnoreCase("Meitu"))) { // getSupportActionBar().show(); } this.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); mAliyunVodPlayerView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); //设置view的布局,宽高之类 LinearLayout.LayoutParams aliVcVideoViewLayoutParams = (LinearLayout.LayoutParams) mAliyunVodPlayerView.getLayoutParams(); aliVcVideoViewLayoutParams.height = (int) (ScreenUtils.getWidth(this) * 9.0f / 16); aliVcVideoViewLayoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT; if (!(Build.DEVICE.equalsIgnoreCase("V4") && Build.MANUFACTURER.equalsIgnoreCase("Meitu"))) { // aliVcVideoViewLayoutParams.topMargin = getSupportActionBar().getHeight(); } } else if (orientation == Configuration.ORIENTATION_LANDSCAPE) { //转到横屏了。 //隐藏状态栏 if (Build.DEVICE.equalsIgnoreCase("mx5") || Build.DEVICE.equalsIgnoreCase("Redmi Note2") || Build.DEVICE.equalsIgnoreCase("Z00A_1") || Build.DEVICE.equalsIgnoreCase("hwH60-L02")) { // getSupportActionBar().hide(); } else if (!(Build.DEVICE.equalsIgnoreCase("V4") && Build.MANUFACTURER.equalsIgnoreCase("Meitu"))) { // getSupportActionBar().hide(); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); mAliyunVodPlayerView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } //设置view的布局,宽高 LinearLayout.LayoutParams aliVcVideoViewLayoutParams = (LinearLayout.LayoutParams) mAliyunVodPlayerView.getLayoutParams(); aliVcVideoViewLayoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT; aliVcVideoViewLayoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT; if (!(Build.DEVICE.equalsIgnoreCase("V4") && Build.MANUFACTURER.equalsIgnoreCase("Meitu"))) { aliVcVideoViewLayoutParams.topMargin = 0; } } } } @Override protected void onDestroy() { super.onDestroy(); if (mAliyunVodPlayerView != null) { mAliyunVodPlayerView.destroy(); mAliyunVodPlayerView = null; } CleanLeakUtils.fixInputMethodManagerLeak(this); mScreenStatusController.stopListen(); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (mAliyunVodPlayerView != null) { boolean handler = mAliyunVodPlayerView.onKeyDown(keyCode, event); if (!handler) { return false; } } return super.onKeyDown(keyCode, event); } @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); //解决某些手机上锁屏之后会出现标题栏的问题。 VcPlayerLog.d("lfj1030", "onWindowFocusChanged = " + hasFocus); updatePlayerViewMode(); } }
42.3625
149
0.629463
3bdec1cdabf7dfb2ade82575e1a616529a9bcd7c
136,577
sql
SQL
sql/a4ta8l.sql
alaaloaa/48l
93e572bef0ce2f2522ae97eca6d1fbff35d0858a
[ "MIT" ]
null
null
null
sql/a4ta8l.sql
alaaloaa/48l
93e572bef0ce2f2522ae97eca6d1fbff35d0858a
[ "MIT" ]
null
null
null
sql/a4ta8l.sql
alaaloaa/48l
93e572bef0ce2f2522ae97eca6d1fbff35d0858a
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 09, 2018 at 07:45 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `a4ta8l` -- -- -------------------------------------------------------- -- -- Table structure for table `applies` -- CREATE TABLE `applies` ( `id` int(10) UNSIGNED NOT NULL, `status` int(11) NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `job_id` int(10) UNSIGNED 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 `applies` -- INSERT INTO `applies` (`id`, `status`, `user_id`, `job_id`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 1, 41, 1, NULL, '2018-08-06 03:26:10', '2018-08-06 03:26:10'), (2, 1, 41, 1, NULL, '2018-08-06 03:32:31', '2018-08-06 03:32:31'), (3, 1, 41, 1, NULL, '2018-08-06 03:32:46', '2018-08-06 03:32:46'), (4, 1, 41, 1, NULL, '2018-08-06 03:41:29', '2018-08-06 03:41:29'), (5, 1, 41, 1, NULL, '2018-08-06 03:41:36', '2018-08-06 03:41:36'), (6, 1, 41, 1, NULL, '2018-08-06 03:41:38', '2018-08-06 03:41:38'), (7, 1, 41, 1, NULL, '2018-08-06 03:41:39', '2018-08-06 03:41:39'), (8, 1, 41, 1, NULL, '2018-08-06 03:41:41', '2018-08-06 03:41:41'), (9, 1, 41, 1, NULL, '2018-08-06 03:41:42', '2018-08-06 03:41:42'), (10, 1, 41, 1, NULL, '2018-08-06 03:46:14', '2018-08-06 03:46:14'), (11, 1, 41, 1, NULL, '2018-08-06 03:46:16', '2018-08-06 03:46:16'), (12, 1, 41, 1, NULL, '2018-08-06 03:47:33', '2018-08-06 03:47:33'), (13, 1, 41, 3, NULL, '2018-08-06 15:23:17', '2018-08-06 15:23:17'), (14, 1, 41, 2, NULL, '2018-08-06 15:23:28', '2018-08-06 15:23:28'), (15, 0, 41, 4, NULL, '2018-08-06 15:24:17', '2018-08-06 15:24:17'), (16, 0, 41, 5, NULL, '2018-08-06 15:25:57', '2018-08-06 15:25:57'), (17, 0, 41, 5, NULL, '2018-08-06 15:28:09', '2018-08-06 15:28:09'), (18, 0, 41, 5, NULL, '2018-08-06 15:28:17', '2018-08-06 15:28:17'), (19, 0, 41, 5, NULL, '2018-08-06 15:29:56', '2018-08-06 15:29:56'), (20, 0, 41, 5, NULL, '2018-08-06 15:46:18', '2018-08-06 15:46:18'), (21, 0, 41, 8, NULL, '2018-08-06 15:46:47', '2018-08-06 15:46:47'), (22, 0, 41, 11, NULL, '2018-08-06 15:48:55', '2018-08-06 15:48:55'), (23, 0, 41, 11, NULL, '2018-08-06 15:50:20', '2018-08-06 15:50:20'), (24, 0, 41, 11, NULL, '2018-08-06 15:50:27', '2018-08-06 15:50:27'), (25, 0, 41, 11, NULL, '2018-08-06 15:56:19', '2018-08-06 15:56:19'), (26, 0, 41, 11, NULL, '2018-08-06 15:56:30', '2018-08-06 15:56:30'), (27, 0, 41, 18, NULL, '2018-08-06 15:56:42', '2018-08-06 15:56:42'), (28, 0, 41, 20, NULL, '2018-08-06 15:57:34', '2018-08-06 15:57:34'), (29, 0, 41, 81, NULL, '2018-08-06 16:05:39', '2018-08-06 16:05:39'), (30, 0, 41, 112, NULL, '2018-08-06 16:05:55', '2018-08-06 16:05:55'), (31, 0, 41, 106, NULL, '2018-08-06 17:09:06', '2018-08-06 17:09:06'), (32, 1, 41, 105, NULL, '2018-08-06 17:12:23', '2018-08-06 21:46:00'), (33, 0, 41, 1, NULL, '2018-08-06 19:13:01', '2018-08-06 19:13:01'), (34, 0, 41, 101, NULL, '2018-08-06 19:17:08', '2018-08-06 19:17:08'), (35, 0, 41, 101, NULL, '2018-08-06 19:18:51', '2018-08-06 19:18:51'), (36, 0, 41, 101, NULL, '2018-08-06 19:18:53', '2018-08-06 19:18:53'), (37, 0, 41, 102, NULL, '2018-08-06 19:18:54', '2018-08-06 19:18:54'), (38, 0, 41, 81, NULL, '2018-08-06 19:18:59', '2018-08-06 19:18:59'), (39, 1, 41, 81, NULL, '2018-08-06 19:19:21', '2018-08-06 19:19:21'), (40, 1, 41, 82, NULL, '2018-08-06 19:19:27', '2018-08-06 19:19:27'), (41, 0, 41, 81, NULL, '2018-08-06 19:20:39', '2018-08-06 19:20:39'), (42, 0, 41, 108, NULL, '2018-08-06 19:42:02', '2018-08-06 19:42:02'), (43, 1, 42, 105, NULL, '2018-08-06 21:47:58', '2018-08-07 02:11:59'), (44, 0, 44, 1, NULL, '2018-08-07 01:49:19', '2018-08-07 01:49:19'), (45, 0, 44, 105, NULL, '2018-08-07 01:49:42', '2018-08-07 01:49:42'); -- -------------------------------------------------------- -- -- Table structure for table `bookmarks` -- CREATE TABLE `bookmarks` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `job_id` int(10) UNSIGNED 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; -- -------------------------------------------------------- -- -- Table structure for table `countries` -- CREATE TABLE `countries` ( `id` int(10) UNSIGNED NOT NULL, `name` 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 `countries` -- INSERT INTO `countries` (`id`, `name`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Afghanistan', NULL, NULL, NULL), (2, 'Albania', NULL, NULL, NULL), (3, 'Algeria', NULL, NULL, NULL), (4, 'American Samoa', NULL, NULL, NULL), (5, 'Andorra', NULL, NULL, NULL), (6, 'Angola', NULL, NULL, NULL), (7, 'Anguilla', NULL, NULL, NULL), (8, 'Antarctica', NULL, NULL, NULL), (9, 'Antigua and Barbuda', NULL, NULL, NULL), (10, 'Argentina', NULL, NULL, NULL), (11, 'Armenia', NULL, NULL, NULL), (12, 'Aruba', NULL, NULL, NULL), (13, 'Australia', NULL, NULL, NULL), (14, 'Austria', NULL, NULL, NULL), (15, 'Azerbaijan', NULL, NULL, NULL), (16, 'Bahamas', NULL, NULL, NULL), (17, 'Bahrain', NULL, NULL, NULL), (18, 'Bangladesh', NULL, NULL, NULL), (19, 'Barbados', NULL, NULL, NULL), (20, 'Belarus', NULL, NULL, NULL), (21, 'Belgium', NULL, NULL, NULL), (22, 'Belize', NULL, NULL, NULL), (23, 'Benin', NULL, NULL, NULL), (24, 'Bermuda', NULL, NULL, NULL), (25, 'Bhutan', NULL, NULL, NULL), (26, 'Bolivia', NULL, NULL, NULL), (27, 'Bosnia and Herzegowina', NULL, NULL, NULL), (28, 'Botswana', NULL, NULL, NULL), (29, 'Bouvet Island', NULL, NULL, NULL), (30, 'Brazil', NULL, NULL, NULL), (31, 'British Indian Ocean Territory', NULL, NULL, NULL), (32, 'Brunei Darussalam', NULL, NULL, NULL), (33, 'Bulgaria', NULL, NULL, NULL), (34, 'Burkina Faso', NULL, NULL, NULL), (35, 'Burundi', NULL, NULL, NULL), (36, 'Cambodia', NULL, NULL, NULL), (37, 'Cameroon', NULL, NULL, NULL), (38, 'Canada', NULL, NULL, NULL), (39, 'Cape Verde', NULL, NULL, NULL), (40, 'Cayman Islands', NULL, NULL, NULL), (41, 'Central African Republic', NULL, NULL, NULL), (42, 'Chad', NULL, NULL, NULL), (43, 'Chile', NULL, NULL, NULL), (44, 'China', NULL, NULL, NULL), (45, 'Christmas Island', NULL, NULL, NULL), (46, 'Cocos (Keeling) Islands', NULL, NULL, NULL), (47, 'Colombia', NULL, NULL, NULL), (48, 'Comoros', NULL, NULL, NULL), (49, 'Congo', NULL, NULL, NULL), (50, 'Congo, the Democratic Republic of the', NULL, NULL, NULL), (51, 'Cook Islands', NULL, NULL, NULL), (52, 'Costa Rica', NULL, NULL, NULL), (53, 'Cote d\'Ivoire', NULL, NULL, NULL), (54, 'Croatia (Hrvatska)', NULL, NULL, NULL), (55, 'Cuba', NULL, NULL, NULL), (56, 'Cyprus', NULL, NULL, NULL), (57, 'Czech Republic', NULL, NULL, NULL), (58, 'Denmark', NULL, NULL, NULL), (59, 'Djibouti', NULL, NULL, NULL), (60, 'Dominica', NULL, NULL, NULL), (61, 'Dominican Republic', NULL, NULL, NULL), (62, 'East Timor', NULL, NULL, NULL), (63, 'Ecuador', NULL, NULL, NULL), (64, 'Egypt', NULL, NULL, NULL), (65, 'El Salvador', NULL, NULL, NULL), (66, 'Equatorial Guinea', NULL, NULL, NULL), (67, 'Eritrea', NULL, NULL, NULL), (68, 'Estonia', NULL, NULL, NULL), (69, 'Ethiopia', NULL, NULL, NULL), (70, 'Falkland Islands (Malvinas)', NULL, NULL, NULL), (71, 'Faroe Islands', NULL, NULL, NULL), (72, 'Fiji', NULL, NULL, NULL), (73, 'Finland', NULL, NULL, NULL), (74, 'France', NULL, NULL, NULL), (75, 'France Metropolitan', NULL, NULL, NULL), (76, 'French Guiana', NULL, NULL, NULL), (77, 'French Polynesia', NULL, NULL, NULL), (78, 'French Southern Territories', NULL, NULL, NULL), (79, 'Gabon', NULL, NULL, NULL), (80, 'Gambia', NULL, NULL, NULL), (81, 'Georgia', NULL, NULL, NULL), (82, 'Germany', NULL, NULL, NULL), (83, 'Ghana', NULL, NULL, NULL), (84, 'Gibraltar', NULL, NULL, NULL), (85, 'Greece', NULL, NULL, NULL), (86, 'Greenland', NULL, NULL, NULL), (87, 'Grenada', NULL, NULL, NULL), (88, 'Guadeloupe', NULL, NULL, NULL), (89, 'Guam', NULL, NULL, NULL), (90, 'Guatemala', NULL, NULL, NULL), (91, 'Guinea', NULL, NULL, NULL), (92, 'Guinea-Bissau', NULL, NULL, NULL), (93, 'Guyana', NULL, NULL, NULL), (94, 'Haiti', NULL, NULL, NULL), (95, 'Heard and Mc Donald Islands', NULL, NULL, NULL), (96, 'Holy See (Vatican City State)', NULL, NULL, NULL), (97, 'Honduras', NULL, NULL, NULL), (98, 'Hong Kong', NULL, NULL, NULL), (99, 'Hungary', NULL, NULL, NULL), (100, 'Iceland', NULL, NULL, NULL), (101, 'India', NULL, NULL, NULL), (102, 'Indonesia', NULL, NULL, NULL), (103, 'Iran (Islamic Republic of)', NULL, NULL, NULL), (104, 'Iraq', NULL, NULL, NULL), (105, 'Ireland', NULL, NULL, NULL), (106, 'Israel', NULL, NULL, NULL), (107, 'Italy', NULL, NULL, NULL), (108, 'Jamaica', NULL, NULL, NULL), (109, 'Japan', NULL, NULL, NULL), (110, 'Jordan', NULL, NULL, NULL), (111, 'Kazakhstan', NULL, NULL, NULL), (112, 'Kenya', NULL, NULL, NULL), (113, 'Kiribati', NULL, NULL, NULL), (114, 'Korea, Democratic People\'s Republic of', NULL, NULL, NULL), (115, 'Korea, Republic of', NULL, NULL, NULL), (116, 'Kuwait', NULL, NULL, NULL), (117, 'Kyrgyzstan', NULL, NULL, NULL), (118, 'Lao, People\'s Democratic Republic', NULL, NULL, NULL), (119, 'Latvia', NULL, NULL, NULL), (120, 'Lebanon', NULL, NULL, NULL), (121, 'Lesotho', NULL, NULL, NULL), (122, 'Liberia', NULL, NULL, NULL), (123, 'Libyan Arab Jamahiriya', NULL, NULL, NULL), (124, 'Liechtenstein', NULL, NULL, NULL), (125, 'Lithuania', NULL, NULL, NULL), (126, 'Luxembourg', NULL, NULL, NULL), (127, 'Macau', NULL, NULL, NULL), (128, 'Macedonia, The Former Yugoslav Republic of', NULL, NULL, NULL), (129, 'Madagascar', NULL, NULL, NULL), (130, 'Malawi', NULL, NULL, NULL), (131, 'Malaysia', NULL, NULL, NULL), (132, 'Maldives', NULL, NULL, NULL), (133, 'Mali', NULL, NULL, NULL), (134, 'Malta', NULL, NULL, NULL), (135, 'Marshall Islands', NULL, NULL, NULL), (136, 'Martinique', NULL, NULL, NULL), (137, 'Mauritania', NULL, NULL, NULL), (138, 'Mauritius', NULL, NULL, NULL), (139, 'Mayotte', NULL, NULL, NULL), (140, 'Mexico', NULL, NULL, NULL), (141, 'Micronesia, Federated States of', NULL, NULL, NULL), (142, 'Moldova, Republic of', NULL, NULL, NULL), (143, 'Monaco', NULL, NULL, NULL), (144, 'Mongolia', NULL, NULL, NULL), (145, 'Montserrat', NULL, NULL, NULL), (146, 'Morocco', NULL, NULL, NULL), (147, 'Mozambique', NULL, NULL, NULL), (148, 'Myanmar', NULL, NULL, NULL), (149, 'Namibia', NULL, NULL, NULL), (150, 'Nauru', NULL, NULL, NULL), (151, 'Nepal', NULL, NULL, NULL), (152, 'Netherlands', NULL, NULL, NULL), (153, 'Netherlands Antilles', NULL, NULL, NULL), (154, 'New Caledonia', NULL, NULL, NULL), (155, 'New Zealand', NULL, NULL, NULL), (156, 'Nicaragua', NULL, NULL, NULL), (157, 'Niger', NULL, NULL, NULL), (158, 'Nigeria', NULL, NULL, NULL), (159, 'Niue', NULL, NULL, NULL), (160, 'Norfolk Island', NULL, NULL, NULL), (161, 'Northern Mariana Islands', NULL, NULL, NULL), (162, 'Norway', NULL, NULL, NULL), (163, 'Oman', NULL, NULL, NULL), (164, 'Pakistan', NULL, NULL, NULL), (165, 'Palau', NULL, NULL, NULL), (166, 'Panama', NULL, NULL, NULL), (167, 'Papua New Guinea', NULL, NULL, NULL), (168, 'Paraguay', NULL, NULL, NULL), (169, 'Peru', NULL, NULL, NULL), (170, 'Philippines', NULL, NULL, NULL), (171, 'Pitcairn', NULL, NULL, NULL), (172, 'Poland', NULL, NULL, NULL), (173, 'Portugal', NULL, NULL, NULL), (174, 'Puerto Rico', NULL, NULL, NULL), (175, 'Qatar', NULL, NULL, NULL), (176, 'Reunion', NULL, NULL, NULL), (177, 'Romania', NULL, NULL, NULL), (178, 'Russian Federation', NULL, NULL, NULL), (179, 'Rwanda', NULL, NULL, NULL), (180, 'Saint Kitts and Nevis', NULL, NULL, NULL), (181, 'Saint Lucia', NULL, NULL, NULL), (182, 'Saint Vincent and the Grenadines', NULL, NULL, NULL), (183, 'Samoa', NULL, NULL, NULL), (184, 'San Marino', NULL, NULL, NULL), (185, 'Sao Tome and Principe', NULL, NULL, NULL), (186, 'Saudi Arabia', NULL, NULL, NULL), (187, 'Senegal', NULL, NULL, NULL), (188, 'Seychelles', NULL, NULL, NULL), (189, 'Sierra Leone', NULL, NULL, NULL), (190, 'Singapore', NULL, NULL, NULL), (191, 'Slovakia (Slovak Republic)', NULL, NULL, NULL), (192, 'Slovenia', NULL, NULL, NULL), (193, 'Solomon Islands', NULL, NULL, NULL), (194, 'Somalia', NULL, NULL, NULL), (195, 'South Africa', NULL, NULL, NULL), (196, 'South Georgia and the South Sandwich Islands', NULL, NULL, NULL), (197, 'Spain', NULL, NULL, NULL), (198, 'Sri Lanka', NULL, NULL, NULL), (199, 'St. Helena', NULL, NULL, NULL), (200, 'St. Pierre and Miquelon', NULL, NULL, NULL), (201, 'Sudan', NULL, NULL, NULL), (202, 'Suriname', NULL, NULL, NULL), (203, 'Svalbard and Jan Mayen Islands', NULL, NULL, NULL), (204, 'Swaziland', NULL, NULL, NULL), (205, 'Sweden', NULL, NULL, NULL), (206, 'Switzerland', NULL, NULL, NULL), (207, 'Syrian Arab Republic', NULL, NULL, NULL), (208, 'Taiwan, Province of China', NULL, NULL, NULL), (209, 'Tajikistan', NULL, NULL, NULL), (210, 'Tanzania, United Republic of', NULL, NULL, NULL), (211, 'Thailand', NULL, NULL, NULL), (212, 'Togo', NULL, NULL, NULL), (213, 'Tokelau', NULL, NULL, NULL), (214, 'Tonga', NULL, NULL, NULL), (215, 'Trinidad and Tobago', NULL, NULL, NULL), (216, 'Tunisia', NULL, NULL, NULL), (217, 'Turkey', NULL, NULL, NULL), (218, 'Turkmenistan', NULL, NULL, NULL), (219, 'Turks and Caicos Islands', NULL, NULL, NULL), (220, 'Tuvalu', NULL, NULL, NULL), (221, 'Uganda', NULL, NULL, NULL), (222, 'Ukraine', NULL, NULL, NULL), (223, 'United Arab Emirates', NULL, NULL, NULL), (224, 'United Kingdom', NULL, NULL, NULL), (225, 'United States', NULL, NULL, NULL), (226, 'United States Minor Outlying Islands', NULL, NULL, NULL), (227, 'Uruguay', NULL, NULL, NULL), (228, 'Uzbekistan', NULL, NULL, NULL), (229, 'Vanuatu', NULL, NULL, NULL), (230, 'Venezuela', NULL, NULL, NULL), (231, 'Vietnam', NULL, NULL, NULL), (232, 'Virgin Islands (British)', NULL, NULL, NULL), (233, 'Virgin Islands (U.S.)', NULL, NULL, NULL), (234, 'Wallis and Futuna Islands', NULL, NULL, NULL), (235, 'Western Sahara', NULL, NULL, NULL), (236, 'Yemen', NULL, NULL, NULL), (237, 'Yugoslavia', NULL, NULL, NULL), (238, 'Zambia', NULL, NULL, NULL), (239, 'Zimbabwe', NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `country_links` -- CREATE TABLE `country_links` ( `id` int(10) UNSIGNED NOT NULL, `country_id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `job_id` int(10) UNSIGNED 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 `country_links` -- INSERT INTO `country_links` (`id`, `country_id`, `user_id`, `job_id`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 21, 33, 34, NULL, NULL, NULL), (2, 12, 13, 41, NULL, NULL, NULL), (3, 18, 40, 27, NULL, NULL, NULL), (4, 25, 8, 24, NULL, NULL, NULL), (6, 15, 23, 22, NULL, NULL, NULL), (8, 11, 5, 7, NULL, NULL, NULL), (9, 2, 9, 7, NULL, NULL, NULL), (10, 6, 5, 1, NULL, NULL, NULL), (11, 12, 8, 17, NULL, NULL, NULL), (12, 17, 10, 14, NULL, NULL, NULL), (13, 17, 13, 18, NULL, NULL, NULL), (14, 12, 11, 19, NULL, NULL, NULL), (15, 11, 16, 9, NULL, NULL, NULL), (16, 4, 12, 15, NULL, NULL, NULL), (17, 7, 7, 2, NULL, NULL, NULL), (18, 9, 6, 1, NULL, NULL, NULL), (19, 9, 12, 9, NULL, NULL, NULL), (20, 18, 14, 20, NULL, NULL, NULL), (21, 3, 9, 11, NULL, NULL, NULL), (22, 7, 3, 12, NULL, NULL, NULL), (23, 5, 7, 13, NULL, NULL, NULL), (24, 16, 8, 20, NULL, NULL, NULL), (25, 4, 3, 5, NULL, NULL, NULL), (26, 7, 10, 18, NULL, NULL, NULL), (27, 18, 10, 8, NULL, NULL, NULL), (28, 2, 5, 12, NULL, NULL, NULL), (29, 1, 19, 16, NULL, NULL, NULL), (30, 19, 17, 14, NULL, NULL, NULL), (31, 5, 14, 5, NULL, NULL, NULL), (32, 16, 3, 7, NULL, NULL, NULL), (33, 19, 15, 14, NULL, NULL, NULL), (34, 8, 8, 15, NULL, NULL, NULL), (35, 18, 4, 7, NULL, NULL, NULL), (36, 6, 16, 2, NULL, NULL, NULL), (37, 3, 10, 16, NULL, NULL, NULL), (38, 8, 19, 16, NULL, NULL, NULL), (39, 15, 10, 20, NULL, NULL, NULL), (40, 1, 8, 17, NULL, NULL, NULL), (41, 18, 14, 12, NULL, NULL, NULL), (42, 11, 8, 16, NULL, NULL, NULL), (43, 5, 6, 13, NULL, NULL, NULL), (44, 9, 2, 20, NULL, NULL, NULL), (45, 1, 15, 15, NULL, NULL, NULL), (46, 16, 10, 11, NULL, NULL, NULL), (47, 1, 4, 9, NULL, NULL, NULL), (48, 11, 10, 15, NULL, NULL, NULL), (49, 16, 16, 19, NULL, NULL, NULL), (50, 13, 8, 17, NULL, NULL, NULL), (51, 16, 2, 16, NULL, NULL, NULL), (52, 10, 9, 2, NULL, NULL, NULL), (53, 3, 8, 12, NULL, NULL, NULL), (54, 3, 11, 4, NULL, NULL, NULL), (55, 1, 13, 14, NULL, NULL, NULL), (56, 8, 2, 19, NULL, NULL, NULL), (57, 14, 15, 20, NULL, NULL, NULL), (58, 17, 14, 4, NULL, NULL, NULL), (59, 3, 11, 14, NULL, NULL, NULL), (60, 3, 13, 1, NULL, NULL, NULL), (61, 6, 13, 7, NULL, NULL, NULL), (62, 9, 4, 16, NULL, NULL, NULL), (63, 18, 9, 1, NULL, NULL, NULL), (64, 12, 10, 7, NULL, NULL, NULL), (65, 2, 16, 3, NULL, NULL, NULL), (66, 9, 2, 7, NULL, NULL, NULL), (67, 3, 6, 3, NULL, NULL, NULL), (68, 12, 8, 5, NULL, NULL, NULL), (69, 14, 8, 15, NULL, NULL, NULL), (70, 4, 20, 12, NULL, NULL, NULL), (71, 4, 11, 14, NULL, NULL, NULL), (72, 3, 7, 5, NULL, NULL, NULL), (73, 18, 15, 19, NULL, NULL, NULL), (74, 13, 14, 19, NULL, NULL, NULL), (75, 16, 7, 18, NULL, NULL, NULL), (76, 16, 11, 3, NULL, NULL, NULL), (77, 5, 11, 7, NULL, NULL, NULL), (78, 9, 18, 9, NULL, NULL, NULL), (79, 17, 2, 14, NULL, NULL, NULL), (80, 20, 6, 4, NULL, NULL, NULL), (81, 1, 14, 14, NULL, NULL, NULL), (82, 8, 7, 9, NULL, NULL, NULL), (83, 19, 5, 2, NULL, NULL, NULL), (84, 14, 15, 18, NULL, NULL, NULL), (85, 10, 4, 6, NULL, NULL, NULL), (86, 17, 2, 16, NULL, NULL, NULL), (87, 5, 6, 14, NULL, NULL, NULL), (88, 14, 7, 8, NULL, NULL, NULL), (89, 9, 20, 13, NULL, NULL, NULL), (90, 17, 6, 8, NULL, NULL, NULL), (91, 19, 11, 10, NULL, NULL, NULL), (92, 6, 7, 13, NULL, NULL, NULL), (93, 20, 12, 1, NULL, NULL, NULL), (94, 12, 8, 12, NULL, NULL, NULL), (95, 9, 19, 1, NULL, NULL, NULL), (96, 13, 10, 2, NULL, NULL, NULL), (97, 4, 3, 6, NULL, NULL, NULL), (98, 16, 17, 20, NULL, NULL, NULL), (99, 13, 19, 3, NULL, NULL, NULL), (100, 1, 10, 7, NULL, NULL, NULL), (101, 15, 19, 1, NULL, NULL, NULL), (102, 7, 13, 20, NULL, NULL, NULL), (103, 13, 1, 11, NULL, NULL, NULL), (104, 18, 17, 16, NULL, NULL, NULL), (105, 6, 13, 1, NULL, NULL, NULL), (106, 13, 14, 1, NULL, NULL, NULL), (107, 15, 16, 15, NULL, NULL, NULL), (108, 11, 16, 8, NULL, NULL, NULL), (109, 20, 3, 3, NULL, NULL, NULL), (110, 20, 9, 10, NULL, NULL, NULL), (111, 1, 8, 2, NULL, NULL, NULL), (112, 11, 11, 4, NULL, NULL, NULL), (113, 20, 6, 4, NULL, NULL, NULL), (114, 18, 13, 3, NULL, NULL, NULL), (115, 11, 13, 10, NULL, NULL, NULL), (116, 7, 15, 2, NULL, NULL, NULL), (117, 12, 4, 8, NULL, NULL, NULL), (118, 20, 15, 9, NULL, NULL, NULL), (119, 10, 12, 16, NULL, NULL, NULL), (120, 13, 19, 14, NULL, NULL, NULL), (121, 2, 6, 6, NULL, NULL, NULL), (122, 2, 17, 18, NULL, NULL, NULL), (123, 12, 6, 7, NULL, NULL, NULL), (124, 11, 7, 2, NULL, NULL, NULL), (125, 4, 15, 3, NULL, NULL, NULL), (126, 14, 12, 9, NULL, NULL, NULL), (127, 2, 17, 12, NULL, NULL, NULL), (128, 12, 14, 14, NULL, NULL, NULL), (129, 13, 18, 13, NULL, NULL, NULL), (130, 4, 6, 18, NULL, NULL, NULL), (131, 10, 18, 1, NULL, NULL, NULL), (132, 10, 7, 19, NULL, NULL, NULL), (133, 17, 4, 17, NULL, NULL, NULL), (134, 19, 10, 12, NULL, NULL, NULL), (135, 8, 2, 11, NULL, NULL, NULL), (136, 8, 2, 13, NULL, NULL, NULL), (137, 1, 2, 10, NULL, NULL, NULL), (138, 2, 15, 8, NULL, NULL, NULL), (139, 13, 9, 2, NULL, NULL, NULL), (140, 17, 12, 7, NULL, NULL, NULL), (141, 7, 4, 1, NULL, NULL, NULL), (142, 11, 10, 5, NULL, NULL, NULL), (143, 13, 1, 6, NULL, NULL, NULL), (144, 13, 12, 7, NULL, NULL, NULL), (145, 7, 7, 9, NULL, NULL, NULL), (146, 18, 4, 16, NULL, NULL, NULL), (147, 19, 10, 3, NULL, NULL, NULL), (148, 19, 7, 19, NULL, NULL, NULL), (149, 17, 16, 17, NULL, NULL, NULL), (150, 7, 14, 1, NULL, NULL, NULL), (151, 8, 6, 4, NULL, NULL, NULL), (152, 16, 5, 13, NULL, NULL, NULL), (153, 16, 18, 5, NULL, NULL, NULL), (154, 6, 1, 18, NULL, NULL, NULL), (155, 2, 12, 18, NULL, NULL, NULL), (156, 18, 5, 7, NULL, NULL, NULL), (157, 17, 16, 8, NULL, NULL, NULL), (158, 5, 11, 15, NULL, NULL, NULL), (159, 8, 18, 5, NULL, NULL, NULL), (160, 19, 9, 16, NULL, NULL, NULL), (161, 15, 18, 3, NULL, NULL, NULL), (162, 3, 9, 5, NULL, NULL, NULL), (163, 5, 6, 18, NULL, NULL, NULL), (164, 18, 3, 3, NULL, NULL, NULL), (165, 3, 5, 19, NULL, NULL, NULL), (166, 9, 8, 3, NULL, NULL, NULL), (167, 2, 4, 2, NULL, NULL, NULL), (168, 5, 2, 18, NULL, NULL, NULL), (169, 4, 14, 3, NULL, NULL, NULL), (170, 2, 12, 1, NULL, NULL, NULL), (171, 19, 1, 20, NULL, NULL, NULL), (172, 12, 14, 3, NULL, NULL, NULL), (173, 6, 18, 5, NULL, NULL, NULL), (174, 20, 10, 5, NULL, NULL, NULL), (175, 7, 13, 7, NULL, NULL, NULL), (176, 19, 17, 5, NULL, NULL, NULL), (177, 1, 7, 17, NULL, NULL, NULL), (178, 5, 2, 12, NULL, NULL, NULL), (179, 4, 17, 19, NULL, NULL, NULL), (180, 4, 12, 1, NULL, NULL, NULL), (181, 17, 7, 20, NULL, NULL, NULL), (182, 16, 2, 13, NULL, NULL, NULL), (183, 14, 6, 19, NULL, NULL, NULL), (184, 9, 18, 12, NULL, NULL, NULL), (185, 19, 9, 9, NULL, NULL, NULL), (186, 4, 14, 16, NULL, NULL, NULL), (187, 18, 1, 6, NULL, NULL, NULL), (188, 12, 13, 9, NULL, NULL, NULL), (189, 14, 12, 11, NULL, NULL, NULL), (190, 13, 1, 17, NULL, NULL, NULL), (191, 4, 1, 8, NULL, NULL, NULL), (192, 9, 7, 16, NULL, NULL, NULL), (193, 8, 9, 1, NULL, NULL, NULL), (194, 13, 10, 4, NULL, NULL, NULL), (195, 17, 16, 8, NULL, NULL, NULL), (196, 17, 10, 6, NULL, NULL, NULL), (197, 6, 16, 16, NULL, NULL, NULL), (198, 5, 4, 12, NULL, NULL, NULL), (199, 9, 1, 14, NULL, NULL, NULL), (200, 18, 13, 17, NULL, NULL, NULL), (201, 10, 18, 13, NULL, NULL, NULL), (202, 5, 20, 1, NULL, NULL, NULL), (203, 1, 8, 12, NULL, NULL, NULL), (204, 8, 11, 16, NULL, NULL, NULL), (205, 8, 20, 6, NULL, NULL, NULL), (206, 2, 5, 16, NULL, NULL, NULL), (207, 4, 10, 11, NULL, NULL, NULL), (208, 1, 41, 105, NULL, '2018-08-06 00:37:48', '2018-08-06 00:37:48'), (209, 1, 41, 106, NULL, '2018-08-06 00:38:11', '2018-08-06 00:38:11'), (210, 1, 41, 107, NULL, '2018-08-06 00:38:18', '2018-08-06 00:38:18'), (211, 1, 41, 108, NULL, '2018-08-06 00:44:05', '2018-08-06 00:44:05'), (212, 1, 41, 109, NULL, '2018-08-06 00:44:53', '2018-08-06 00:44:53'), (213, 2, 41, 110, NULL, '2018-08-06 01:16:11', '2018-08-06 01:16:11'), (214, 2, 41, 111, NULL, '2018-08-06 01:16:29', '2018-08-06 01:16:29'), (215, 8, 41, 112, NULL, '2018-08-06 01:18:35', '2018-08-06 01:18:35'), (216, 8, 41, 113, NULL, '2018-08-06 01:19:53', '2018-08-06 01:19:53'), (217, 2, 41, 114, NULL, '2018-08-07 00:25:04', '2018-08-07 00:25:04'), (218, 1, 41, 115, NULL, '2018-08-07 00:26:25', '2018-08-07 00:26:25'), (219, 1, 41, 116, NULL, '2018-08-07 00:26:47', '2018-08-07 00:26:47'), (220, 1, 41, 117, NULL, '2018-08-07 00:26:51', '2018-08-07 00:26:51'), (221, 3, 41, 118, NULL, '2018-08-07 00:27:42', '2018-08-07 00:27:42'), (222, 3, 41, 119, NULL, '2018-08-07 00:30:29', '2018-08-07 00:30:29'); -- -------------------------------------------------------- -- -- Table structure for table `jobs` -- CREATE TABLE `jobs` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `experience` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `company_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `about_company` varchar(255) CHARACTER SET utf8 NOT NULL, `company_logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `salary` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `education` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `job_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `availability` int(11) NOT NULL DEFAULT '1', `approve` int(11) NOT NULL DEFAULT '0', `user_id` int(10) UNSIGNED NOT NULL, `country_id` int(11) UNSIGNED DEFAULT 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 `jobs` -- INSERT INTO `jobs` (`id`, `name`, `title`, `description`, `address`, `experience`, `company_name`, `about_company`, `company_logo`, `salary`, `education`, `country`, `job_type`, `availability`, `approve`, `user_id`, `country_id`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'sSsqm', 'TlB36B5u', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '5-8', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '144', 'computer science- Auc', NULL, 'full_time', 0, 0, 3, 0, NULL, NULL, NULL), (2, 'MUoVM', 't5wCYGAl', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '5-8', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '50', 'faculty of law', NULL, 'hours', 0, 0, 18, 0, NULL, NULL, NULL), (3, 'uqQH7', 'hfy9nZIw', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '1-8', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '136', 'faculty of commrece', NULL, 'full_time', 0, 0, 3, 0, NULL, NULL, NULL), (4, 'nJmrA', 'zXKqQKVD', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '3-6', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '75', 'faculty of law', NULL, 'full_time', 0, 0, 11, 0, NULL, NULL, NULL), (5, 'QAHgx', 'ItstIIAf', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '2-6', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '58', 'computer science- Auc', NULL, 'hours', 0, 0, 9, 0, NULL, NULL, NULL), (6, 'ua00B', 'WLRXn893', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '5-6', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '73', 'computer science- Auc', NULL, 'hours', 0, 0, 17, 0, NULL, NULL, NULL), (7, 'nTm1P', 'Dvv8R3FI', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '2-7', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '28', 'faculty of law', NULL, 'hours', 0, 0, 9, 0, NULL, NULL, NULL), (8, 'QEIFb', 'FCqlTOBF', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '1-7', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '145', 'faculty of law', NULL, 'full_time', 0, 0, 9, 0, NULL, NULL, NULL), (9, '0BZFg', 'pFF6NLYv', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '5-8', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '47', 'computer science- Auc', NULL, 'hours', 0, 0, 3, 0, NULL, NULL, NULL), (10, 'X6V9c', 'xEitY2Vg', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '2-9', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '139', 'computer science- Auc', NULL, 'hours', 0, 0, 6, 0, NULL, NULL, NULL), (11, 'iMh47', 'XcRifc4H', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '1-8', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '93', 'faculty of law', NULL, 'full_time', 0, 0, 8, 0, NULL, NULL, NULL), (12, 'tsOhG', 'QVIiJ2Wo', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '4-8', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '33', 'computer science- Auc', NULL, 'full_time', 0, 0, 13, 0, NULL, NULL, NULL), (13, 'I29O1', 'AD1qCjMb', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '1-9', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '114', 'computer science- Auc', NULL, 'hours', 0, 0, 13, 0, NULL, NULL, NULL), (14, 'a3ZVZ', 'E51YYykQ', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '2-10', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '122', 'computer science- Auc', NULL, 'hours', 0, 0, 11, 0, NULL, NULL, NULL), (15, '6OTQA', 'ErDvETW5', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '3-6', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '119', 'faculty of law', NULL, 'full_time', 0, 0, 8, 0, NULL, NULL, NULL), (16, 'Lrw2R', 'Sm5SKHHX', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '2-5', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '141', 'faculty of law', NULL, 'hours', 0, 0, 7, 0, NULL, NULL, NULL), (17, '3lXqi', '3oJecuEn', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '5-6', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '20', 'faculty of commrece', NULL, 'full_time', 0, 0, 7, 0, NULL, NULL, NULL), (18, '1E6Cy', 'lY6Wv4Kz', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Mohandessin, Giza', '3-7', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '132', 'computer science- Auc', NULL, 'full_time', 0, 0, 2, 0, NULL, NULL, NULL), (19, 'qMAVV', 'egI7mvW6', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '3-6', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '59', 'faculty of law', NULL, 'hours', 0, 0, 5, 0, NULL, NULL, NULL), (20, 'BfQzv', 'cKF8taoh', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '5-6', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '81', 'computer science- Auc', NULL, 'hours', 0, 0, 20, 0, NULL, NULL, NULL), (21, 'xRwMZ', 'ng0SYt9i', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '4-7', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '98', 'computer science- Auc', NULL, 'hours', 0, 0, 16, 0, NULL, NULL, NULL), (22, 'ygi2S', 'CAWAlwC1', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '2-10', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '144', 'faculty of law', NULL, 'hours', 0, 0, 18, 0, NULL, NULL, NULL), (23, 'oOrtG', 'EC6gfOey', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '3-8', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '127', 'computer science- Auc', NULL, 'full_time', 0, 0, 12, 0, NULL, NULL, NULL), (24, 'R4WUJ', 'iAv37OZI', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Mohandessin, Giza', '3-6', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '26', 'faculty of law', NULL, 'full_time', 0, 0, 16, 0, NULL, NULL, NULL), (25, 'LGkhn', '7KY1KkrX', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '1-5', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '43', 'computer science- Auc', NULL, 'hours', 0, 0, 1, 0, NULL, NULL, NULL), (26, 'JS1mm', 'nC00Uapf', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '4-9', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '109', 'computer science- Auc', NULL, 'full_time', 0, 0, 15, 0, NULL, NULL, NULL), (27, 'PX77S', 'qMUC7MoB', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '5-8', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '77', 'faculty of law', NULL, 'full_time', 0, 0, 15, 0, NULL, NULL, NULL), (28, 'w1Q0f', 'IO7axKbw', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '4-10', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '49', 'faculty of commrece', NULL, 'hours', 0, 0, 7, 0, NULL, NULL, NULL), (29, 'ZijmP', 'cKk5gFFR', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '3-9', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '34', 'faculty of commrece', NULL, 'hours', 0, 0, 16, 0, NULL, NULL, NULL), (30, 'BlwGS', '3TMq3owt', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '4-9', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '138', 'faculty of law', NULL, 'hours', 0, 0, 20, 0, NULL, NULL, NULL), (31, 'N3oAv', 'QRzCQxVg', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '3-10', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '69', 'computer science- Auc', NULL, 'hours', 0, 0, 1, 0, NULL, NULL, NULL), (32, 'OtQkO', 'y6jcGojf', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '1-10', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '39', 'faculty of law', NULL, 'full_time', 0, 0, 7, 0, NULL, NULL, NULL), (33, 'IPixQ', 'qlBPAWJU', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '4-10', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '48', 'faculty of commrece', NULL, 'full_time', 0, 0, 18, 0, NULL, NULL, NULL), (34, 'yn3U9', 'xlCesZbZ', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '3-7', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '86', 'faculty of commrece', NULL, 'hours', 0, 0, 5, 0, NULL, NULL, NULL), (35, 'miyfu', 'hTyeTcrf', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '3-7', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '132', 'faculty of law', NULL, 'hours', 0, 0, 14, 0, NULL, NULL, NULL), (36, 'QhuTZ', 'jAK2DFCk', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '2-9', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '129', 'faculty of law', NULL, 'hours', 0, 0, 13, 0, NULL, NULL, NULL), (37, 'GJfMT', 'hUWucmHH', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '4-7', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '70', 'faculty of law', NULL, 'full_time', 0, 0, 2, 0, NULL, NULL, NULL), (38, '93LT6', '8waJZ12T', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '2-10', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '111', 'faculty of commrece', NULL, 'hours', 0, 0, 10, 0, NULL, NULL, NULL), (39, 'ZCLrK', 'uNVrSMlK', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '3-6', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '23', 'faculty of law', NULL, 'hours', 0, 0, 14, 0, NULL, NULL, NULL), (40, 'yZiyk', '6BzY2EtV', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '4-5', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '105', 'faculty of commrece', NULL, 'full_time', 0, 0, 15, 0, NULL, NULL, NULL), (41, 'Scjjk', '6lGJcR7w', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '3-9', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '131', 'faculty of commrece', NULL, 'hours', 0, 0, 18, 0, NULL, NULL, NULL), (42, '6nwih', 'Of61Jtzn', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '2-8', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '140', 'faculty of commrece', NULL, 'full_time', 0, 0, 17, 0, NULL, NULL, NULL), (43, 'HRBA4', 'bdsGfGa8', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '3-7', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '58', 'faculty of law', NULL, 'full_time', 0, 0, 7, 0, NULL, NULL, NULL), (44, 'kntX2', 'yi64wdch', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '4-8', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '138', 'faculty of commrece', NULL, 'hours', 0, 0, 10, 0, NULL, NULL, NULL), (45, 'aMlr8', 'HZr1GZ1O', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '3-9', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '67', 'faculty of commrece', NULL, 'full_time', 0, 0, 5, 0, NULL, NULL, NULL), (46, 'onQeO', 'RU78GqFS', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '5-7', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '107', 'computer science- Auc', NULL, 'full_time', 0, 0, 16, 0, NULL, NULL, NULL), (47, 'gO7g5', 'EW93Lcna', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Mohandessin, Giza', '2-5', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '41', 'computer science- Auc', NULL, 'full_time', 0, 0, 2, 0, NULL, NULL, NULL), (48, 'QeXlu', 'GYsbkvfz', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '1-6', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '146', 'faculty of commrece', NULL, 'hours', 0, 0, 10, 0, NULL, NULL, NULL), (49, 'rT4uR', 'ip5yJync', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '5-5', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '115', 'computer science- Auc', NULL, 'full_time', 0, 0, 18, 0, NULL, NULL, NULL), (50, 'm1uMq', 'lF7FZJEO', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '4-7', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '125', 'faculty of commrece', NULL, 'hours', 0, 0, 8, 0, NULL, NULL, NULL), (51, '0Q6NP', '5sbyhZKS', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '3-5', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '122', 'computer science- Auc', NULL, 'hours', 0, 0, 3, 0, NULL, NULL, NULL), (52, 'sfjfw', 'DKqfX7iH', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '5-6', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '119', 'faculty of law', NULL, 'hours', 0, 0, 15, 0, NULL, NULL, NULL), (53, 'Dzf3I', '2JJw9XZT', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '5-8', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '61', 'faculty of law', NULL, 'full_time', 0, 0, 1, 0, NULL, NULL, NULL), (54, 'hQ2v3', 'rDORYcAL', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '1-8', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '34', 'faculty of commrece', NULL, 'full_time', 0, 0, 17, 0, NULL, NULL, NULL), (55, 'aY36E', 'q5DYoJFB', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '3-10', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '26', 'faculty of law', NULL, 'hours', 0, 0, 2, 0, NULL, NULL, NULL), (56, 'mrb3W', 'MJsfOWy6', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '1-8', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '126', 'computer science- Auc', NULL, 'full_time', 0, 0, 19, 0, NULL, NULL, NULL), (57, 'hbR5p', 'ykl69ZSj', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '3-6', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '54', 'faculty of law', NULL, 'hours', 0, 0, 9, 0, NULL, NULL, NULL), (58, 'pb8wf', 'YWj1aiRH', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '1-5', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '29', 'faculty of law', NULL, 'full_time', 0, 0, 17, 0, NULL, NULL, NULL), (59, 'EuPjh', 'wH3r1KCx', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '4-6', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '32', 'faculty of commrece', NULL, 'hours', 0, 0, 19, 0, NULL, NULL, NULL), (60, 'hyvP0', 'Rb61OAK9', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Mohandessin, Giza', '2-10', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '50', 'faculty of law', NULL, 'full_time', 0, 0, 4, 0, NULL, NULL, NULL), (61, 'qbmYV', 'yl0Clj0n', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '1-7', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '66', 'computer science- Auc', NULL, 'full_time', 0, 0, 14, 0, NULL, NULL, NULL), (62, 'TL1su', 'DrRJFpIE', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '4-5', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '120', 'computer science- Auc', NULL, 'hours', 0, 0, 8, 0, NULL, NULL, NULL), (63, 'D48TQ', 'WDqxLdOj', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '4-5', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '147', 'faculty of commrece', NULL, 'full_time', 0, 0, 6, 0, NULL, NULL, NULL), (64, 'e5fUi', 'KJSAlmcM', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '2-7', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '38', 'faculty of law', NULL, 'hours', 0, 0, 7, 0, NULL, NULL, NULL), (65, 'WTCQg', 'CinA7u7I', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Maadi, Cairo', '3-6', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '129', 'faculty of law', NULL, 'full_time', 0, 0, 19, 0, NULL, NULL, NULL), (66, 'sSWXZ', 'lQkKYpPD', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '3-5', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '142', 'faculty of commrece', NULL, 'hours', 0, 0, 7, 0, NULL, NULL, NULL), (67, 'ArDE4', '74gTjSse', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '2-8', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '133', 'faculty of commrece', NULL, 'full_time', 0, 0, 9, 0, NULL, NULL, NULL), (68, 'tw8XQ', 'DkOG1mf1', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '4-8', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '73', 'faculty of commrece', NULL, 'hours', 0, 0, 16, 0, NULL, NULL, NULL), (69, '3mZVq', 'NhpHle3i', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '1-8', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '138', 'faculty of commrece', NULL, 'hours', 0, 0, 8, 0, NULL, NULL, NULL), (70, 'NAZCi', 'k4zvEerL', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '4-6', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '132', 'faculty of law', NULL, 'full_time', 0, 0, 1, 0, NULL, NULL, NULL), (71, '5gbh6', 'T19RD64j', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '2-9', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '145', 'computer science- Auc', NULL, 'full_time', 0, 0, 14, 0, NULL, NULL, NULL), (72, '6irpz', 'xVOdqerx', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '1-5', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '104', 'computer science- Auc', NULL, 'hours', 0, 0, 17, 0, NULL, NULL, NULL), (73, 'aMspb', 'YLYAfwNU', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '5-9', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '57', 'computer science- Auc', NULL, 'full_time', 0, 0, 2, 0, NULL, NULL, NULL), (74, 'Qzymv', 'SEIgAqe3', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '2-9', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '100', 'faculty of law', NULL, 'hours', 0, 0, 11, 0, NULL, NULL, NULL), (75, '6aCqF', 'g9sEY070', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '5-8', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '92', 'faculty of law', NULL, 'full_time', 0, 0, 2, 0, NULL, NULL, NULL), (76, 'TaPEh', 'secCmUTX', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '2-6', 'google', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '26', 'faculty of law', NULL, 'full_time', 0, 0, 12, 0, NULL, NULL, NULL), (77, '0hg7h', 'zoQ60Etq', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '1-10', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '144', 'faculty of commrece', NULL, 'hours', 0, 0, 17, 0, NULL, NULL, NULL), (78, '45zDL', 'iRpXZDiI', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '5-10', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '139', 'faculty of law', NULL, 'full_time', 0, 0, 15, 0, NULL, NULL, NULL), (79, 'LlqoG', 'HVNqD7ne', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '1-9', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '65', 'computer science- Auc', NULL, 'full_time', 0, 0, 19, 0, NULL, NULL, NULL), (80, 'MCPMD', 'g6r8hRvj', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '1-5', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '150', 'computer science- Auc', NULL, 'hours', 0, 0, 16, 0, NULL, NULL, NULL), (81, 'z100B', 'ewdYSnkS', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '2-6', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '47', 'computer science- Auc', NULL, 'full_time', 0, 0, 5, 0, NULL, NULL, NULL), (82, 'EMwHo', 'c34pwOFo', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '3-9', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '135', 'faculty of law', NULL, 'full_time', 0, 0, 9, 0, NULL, NULL, NULL), (83, 'bfzpD', 'XlVakGl3', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '4-9', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '110', 'faculty of commrece', NULL, 'hours', 0, 0, 20, 0, NULL, NULL, NULL), (84, 'triAd', 'S5BuDJlo', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Mohandessin, Giza', '5-6', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '137', 'computer science- Auc', NULL, 'hours', 0, 0, 11, 0, NULL, NULL, NULL), (85, 'yYT41', 'yDd1x83C', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '3-7', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '148', 'computer science- Auc', NULL, 'hours', 0, 0, 20, 0, NULL, NULL, NULL), (86, 'oSV7M', '4z84peXJ', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Glim, Alexandria', '5-10', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '91', 'faculty of law', NULL, 'full_time', 0, 0, 7, 0, NULL, NULL, NULL), (87, 'SMbxB', 'GaUCBZTu', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '2-10', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '144', 'faculty of commrece', NULL, 'full_time', 0, 0, 20, 0, NULL, NULL, NULL), (88, 'Mr4xF', '1ytbs4I7', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '2-5', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '87', 'faculty of commrece', NULL, 'full_time', 0, 0, 17, 0, NULL, NULL, NULL), (89, 'DyPa7', '2gdLIPdw', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '1-8', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '137', 'faculty of commrece', NULL, 'hours', 0, 0, 5, 0, NULL, NULL, NULL), (90, 'EYYCc', 'Sf4Zwohz', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '4-8', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '45', 'faculty of law', NULL, 'full_time', 0, 0, 16, 0, NULL, NULL, NULL), (91, '3mU3z', 'icH1iYmU', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '2-5', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '144', 'faculty of law', NULL, 'hours', 0, 0, 18, 0, NULL, NULL, NULL); INSERT INTO `jobs` (`id`, `name`, `title`, `description`, `address`, `experience`, `company_name`, `about_company`, `company_logo`, `salary`, `education`, `country`, `job_type`, `availability`, `approve`, `user_id`, `country_id`, `remember_token`, `created_at`, `updated_at`) VALUES (92, 'FG8ni', 'YUKLEENs', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Media Misr - Cairo, Egypt', '1-8', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '31', 'faculty of commrece', NULL, 'full_time', 0, 0, 3, 0, NULL, NULL, NULL), (93, 'MnLMQ', 'LUa6U8Wb', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Mohandessin, Giza', '3-7', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '23', 'faculty of commrece', NULL, 'hours', 0, 0, 14, 0, NULL, NULL, NULL), (94, 'aWSGf', 'AjEzG2Ta', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '5-8', 'google', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '91', 'faculty of commrece', NULL, 'full_time', 0, 0, 16, 0, NULL, NULL, NULL), (95, 'ZUyZg', 'rHg5vCDK', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '1-6', 'facebook', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '144', 'computer science- Auc', NULL, 'full_time', 0, 0, 3, 0, NULL, NULL, NULL), (96, 'JPR5Q', 'ro9qTKRe', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Maadi, Cairo', '2-10', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '39', 'faculty of law', NULL, 'full_time', 0, 0, 13, 0, NULL, NULL, NULL), (97, 'nW5Gt', 'O18280TA', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Glim, Alexandria', '1-8', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '68', 'faculty of law', NULL, 'hours', 0, 0, 13, 0, NULL, NULL, NULL), (98, 'opsR0', 'MLYdcTvm', 'jQuery, HTML5, and CSS3<br>Understanding of code versioning tools<br>Understanding of Ajax, JSON<br>Max age 35', 'Mohandessin, Giza', '2-8', 'facebook', 'Nile Multimedia is an Egyptian Limited Liability Company and in accordance with the provisions Act 159 of 1981, Ratified by the General Authority for Investment No. 1309 of 2007, Commercial No. 27762 and Tax card No. 266-680-976.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '147', 'faculty of law', NULL, 'hours', 0, 0, 18, 0, NULL, NULL, NULL), (99, 'qflWI', 'fC7MIxSn', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Media Misr - Cairo, Egypt', '4-8', 'facebook', 'work on improving the family relationship, work on the employee\'s whole family health specially naturally, work on the employee property, fill any unknown gap the employee might feel that he has no clue how to manage it.', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '69', 'faculty of law', NULL, 'full_time', 0, 0, 18, 0, NULL, NULL, NULL), (100, 'prhoF', 'SquB4n2k', '2+ years of \'experience\'<br>Experience of the full software development lifecycle=> from requirements gathering and functional specification', 'Mohandessin, Giza', '1-9', 'google', 'To assign a virtual assistant for our employees to change their lives to better tom, accomplish personal tasks, stabilize their bills and responsibilities, help them raise their kids, motivate them in work', '/images/jobs/Nile-Multimedia-Egypt-4085-sm.png', '98', 'computer science- Auc', NULL, 'full_time', 0, 0, 12, 0, NULL, NULL, NULL), (101, 'Web Developer', 'Developer', 'To assign a virtual assistant for our employees to...', 'To assign a virtual assistant for our employees to...', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/636fc9AkZcdVeyhqhunT1n5gVO4LBqFqFr1WUwOp.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 00:30:33', '2018-08-09 15:43:20'), (102, 'Web Developer', 'Developer', 'To assign a virtual assistant for our employees to...', 'To assign a virtual assistant for our employees to...', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/IHwaeUMN7BrI1VXoXEK3FM3jdBGmfFTak50Ehdaa.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 00:32:10', '2018-08-06 00:32:10'), (103, 'Create new Job', 'Create new Job', 'Create new JobCreate new JobCreate new Job', 'To assign a virtual assistant for our employees to...', '1-2', 'facebook', 'about_companyabout_company', 'storage/images/Mu2A57Nvp7F7K6WKvINgXg4tILrzCwDeAx94nRBo.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 00:32:52', '2018-08-06 00:32:52'), (104, 'Create new Job', 'Create new Job', 'Create new JobCreate new JobCreate new Job', 'To assign a virtual assistant for our employees to...', '1-2', 'facebook', 'about_companyabout_company', 'storage/images/sxKtlXLhVNYPlZ1g9GsZlrMkTOvHtQPNnc7g9pZF.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 00:37:01', '2018-08-06 00:37:01'), (105, 'Create new Job', 'Create new Job', 'Create new JobCreate new JobCreate new Job', 'To assign a virtual assistant for our employees to...', '1-2', 'facebook', 'about_companyabout_company', 'storage/images/MKis3khCt9BaYw6DHGZJo6h0Ca74Kv0eSufCLZKM.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 0, 0, 41, 0, NULL, '2018-08-06 00:37:48', '2018-08-06 20:44:01'), (106, 'Create new Job', 'Create new Job', 'Create new JobCreate new JobCreate new Job', 'To assign a virtual assistant for our employees to...', '1-2', 'facebook', 'about_companyabout_company', 'storage/images/CKABxalbk2HAV83xDATVLlrPMnutDTOAo1kCwtTh.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 0, 0, 41, 0, NULL, '2018-08-06 00:38:11', '2018-08-06 20:44:02'), (107, 'Create new Job', 'Create new Job', 'Create new JobCreate new JobCreate new Job', 'To assign a virtual assistant for our employees to...', '1-2', 'facebook', 'about_companyabout_company', 'storage/images/Sl9Jk6nEbWQdhRfbZqeFjWr4v6cyTWGKCcTfeFfh.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 00:38:17', '2018-08-06 03:07:36'), (108, 'Web Developer', 'Developer', 'To assign a virtual assistant for our employees to...', 'To assign a virtual assistant for our employees to...', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/CaoUlBUhCJwF1MjkEXkomer3s0CsTJqshnhVAdCu.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 00:44:05', '2018-08-06 00:44:05'), (109, 'Web Developer', 'Developer', 'To assign a virtual assistant for our employees to...', 'To assign a virtual assistant for our employees to...', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/4AYgDn14QJ9NV4oW6Ls9GfVVPHFfJH3sYhObF5jT.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 00:44:53', '2018-08-06 00:44:53'), (110, 'Web Developer', 'Developer', 'Web Developer Web Developer Web Developer Web Developer', 'To assign a virtual assistant for our employees to...', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/vGu33q9RsiXeqOQrsJmxmISzxByQZotchf19tb8x.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 0, 0, 41, 0, NULL, '2018-08-06 01:16:11', '2018-08-06 03:07:57'), (111, 'Web Developer', 'Developer', 'Web Developer Web Developer Web Developer Web Developer', 'To assign a virtual assistant for our employees to...', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/NHpSUkODroO8nQPUzkHC85cG98UhmAkI0wcFl2tk.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-06 01:16:29', '2018-08-06 01:16:29'), (112, 'Loaa Boka', 'Web Developer', 'Web DeveloperWeb Developer', 'about_Company', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/Lpj02DCLrHLOjtmuAHbT6cNLqniZ1ZaD2NutkqcN.jpeg', '200', 'You have reached the limit', NULL, 'hours', 0, 0, 41, 0, NULL, '2018-08-06 01:18:35', '2018-08-06 16:06:07'), (113, 'Loaa Boka', 'Web Developer', 'Web DeveloperWeb Developer', 'about_Company', '0-1', 'facebook', 'about_companyabout_company', 'storage/images/gMfyftWZJdeOggFb8tq7ExNqMgfT8lcewfH9E1PB.jpeg', '200', 'You have reached the limit', NULL, 'hours', 1, 0, 41, 0, NULL, '2018-08-06 01:19:52', '2018-08-06 17:49:42'), (114, 'Loaa Boka', 'Good Developer', 'Good DeveloperGood DeveloperGood DeveloperGood Developer', 'To assign a virtual assistant for our employees to...', '2-5', 'facebook', 'about_companyabout_company', 'storage/jobs/Tt2tCFGmo7aS4BwMBbwT0XOQEcbcT3HCkl0tlpXL.jpeg', '100$', 'computer science- Auc', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-07 00:25:04', '2018-08-07 00:25:04'), (115, 'Good Developer', 'Good Developer', 'Good DeveloperGood DeveloperGood Developer', 'Good Developer', '0-1', 'facebook', 'Good Developer', 'storage/jobs/rP4T3oRQowFEFrpwgBKViO3vGdIzcTdRUxMF7mcS.jpeg', 'Good Developer', 'Good Developer', NULL, 'full_time', 1, 0, 41, 0, NULL, '2018-08-07 00:26:25', '2018-08-07 00:26:25'), (116, 'Good Developer', 'Good Developer', 'Good DeveloperGood DeveloperGood Developer', 'Good Developer', '0-1', 'facebook', 'Good Developer', 'storage/jobs/a3chjEdKE4YJ2ldalK1gGMThR9K0eiRHgfcOkiL8.jpeg', 'Good Developer', 'Good Developer', 'Ecuador', 'full_time', 1, 0, 41, 0, NULL, '2018-08-07 00:26:47', '2018-08-07 00:26:47'), (117, 'Good Developer', 'Good Developer', 'Good DeveloperGood DeveloperGood Developer', 'Good Developer', '0-1', 'facebook', 'Good Developer', 'storage/jobs/o8cyKL5pcirkSmnA5o1YOf15tBkaWL1JNsHtOIa1.jpeg', 'Good Developer', 'Good Developer', 'egypt', 'full_time', 1, 0, 41, 0, NULL, '2018-08-07 00:26:51', '2018-08-07 00:26:51'), (118, 'Good Developer', 'Good Developer', 'Good DeveloperGood Developer', 'Good Developer', '2-5', 'Good Developer', 'Good Developer', 'storage/images/mSQEJBXdvKcmXtyvf9paItiGwdy1QiSd0Au7Q6Z0.jpeg', 'Good Developer', 'Good Developer', 'egypt', 'full_time', 1, 0, 41, 0, NULL, '2018-08-07 00:27:42', '2018-08-07 00:27:42'), (119, 'Good Developer', 'Good Developer', 'Good DeveloperGood Developer', 'Good Developer', '0-1', 'Good Developer', 'Good Developer', 'storage/jobs/u02N98Gv3j9hMONaBTIvm3Zk6TPTby58CQMK3giN.jpeg', 'Good Developer', 'Good Developer', 'egypt', 'hours', 1, 0, 41, 0, NULL, '2018-08-07 00:30:29', '2018-08-07 00:30:29'), (120, 'mobile', 'samsung', 'Samsug is a good mobile', 'giza', '0-1', 'google', 'it\'s good company', 'storage/jobs/ZaOdzEmjfKXPIVqCtIkok6c8NaFTPt0fBrM3qGc8.jpeg', '100', 'business', NULL, 'full_time', 1, 0, 42, 64, NULL, '2018-08-09 15:31:39', '2018-08-09 15:31:39'); -- -------------------------------------------------------- -- -- Table structure for table `job_skills` -- CREATE TABLE `job_skills` ( `id` int(10) UNSIGNED NOT NULL, `skill_id` int(10) UNSIGNED NOT NULL, `job_id` int(10) UNSIGNED 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 `job_skills` -- INSERT INTO `job_skills` (`id`, `skill_id`, `job_id`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 6, 43, NULL, NULL, NULL), (2, 11, 44, NULL, NULL, NULL), (3, 38, 2, NULL, NULL, NULL), (4, 27, 43, NULL, NULL, NULL), (5, 4, 8, NULL, NULL, NULL), (6, 15, 13, NULL, NULL, NULL), (8, 32, 49, NULL, NULL, NULL), (9, 19, 29, NULL, NULL, NULL), (10, 18, 16, NULL, NULL, NULL), (11, 1, 11, NULL, NULL, NULL), (12, 41, 5, NULL, NULL, NULL), (13, 50, 46, NULL, NULL, NULL), (14, 14, 7, NULL, NULL, NULL), (15, 29, 17, NULL, NULL, NULL), (16, 13, 27, NULL, NULL, NULL), (17, 21, 21, NULL, NULL, NULL), (18, 38, 31, NULL, NULL, NULL), (19, 47, 18, NULL, NULL, NULL), (20, 39, 11, NULL, NULL, NULL), (21, 34, 3, NULL, NULL, NULL), (22, 37, 6, NULL, NULL, NULL), (23, 23, 7, NULL, NULL, NULL), (24, 40, 34, NULL, NULL, NULL), (25, 38, 43, NULL, NULL, NULL), (26, 9, 48, NULL, NULL, NULL), (27, 44, 37, NULL, NULL, NULL), (28, 21, 17, NULL, NULL, NULL), (29, 26, 18, NULL, NULL, NULL), (30, 45, 36, NULL, NULL, NULL), (31, 12, 3, NULL, NULL, NULL), (32, 28, 26, NULL, NULL, NULL), (33, 19, 4, NULL, NULL, NULL), (34, 16, 11, NULL, NULL, NULL), (35, 44, 25, NULL, NULL, NULL), (36, 5, 16, NULL, NULL, NULL), (37, 16, 9, NULL, NULL, NULL), (38, 48, 20, NULL, NULL, NULL), (39, 48, 26, NULL, NULL, NULL), (40, 17, 46, NULL, NULL, NULL), (41, 35, 45, NULL, NULL, NULL), (42, 19, 30, NULL, NULL, NULL), (43, 32, 16, NULL, NULL, NULL), (44, 11, 19, NULL, NULL, NULL), (45, 13, 19, NULL, NULL, NULL), (46, 34, 47, NULL, NULL, NULL), (47, 3, 36, NULL, NULL, NULL), (48, 14, 20, NULL, NULL, NULL), (49, 2, 31, NULL, NULL, NULL), (50, 32, 33, NULL, NULL, NULL), (51, 33, 21, NULL, NULL, NULL), (52, 42, 17, NULL, NULL, NULL), (53, 49, 48, NULL, NULL, NULL), (54, 39, 9, NULL, NULL, NULL), (55, 42, 45, NULL, NULL, NULL), (56, 34, 27, NULL, NULL, NULL), (57, 21, 25, NULL, NULL, NULL), (58, 48, 6, NULL, NULL, NULL), (59, 21, 41, NULL, NULL, NULL), (60, 39, 39, NULL, NULL, NULL), (61, 49, 18, NULL, NULL, NULL), (62, 31, 1, NULL, NULL, NULL), (63, 50, 31, NULL, NULL, NULL), (64, 9, 33, NULL, NULL, NULL), (65, 16, 23, NULL, NULL, NULL), (66, 46, 3, NULL, NULL, NULL), (67, 33, 19, NULL, NULL, NULL), (68, 48, 30, NULL, NULL, NULL), (69, 35, 19, NULL, NULL, NULL), (70, 6, 27, NULL, NULL, NULL), (71, 30, 10, NULL, NULL, NULL), (72, 42, 47, NULL, NULL, NULL), (73, 21, 31, NULL, NULL, NULL), (74, 18, 11, NULL, NULL, NULL), (75, 33, 25, NULL, NULL, NULL), (76, 11, 10, NULL, NULL, NULL), (77, 34, 27, NULL, NULL, NULL), (78, 38, 1, NULL, NULL, NULL), (79, 28, 1, NULL, NULL, NULL), (80, 27, 49, NULL, NULL, NULL), (81, 7, 18, NULL, NULL, NULL), (82, 32, 26, NULL, NULL, NULL), (83, 27, 1, NULL, NULL, NULL), (84, 6, 49, NULL, NULL, NULL), (85, 31, 45, NULL, NULL, NULL), (86, 46, 50, NULL, NULL, NULL), (87, 12, 22, NULL, NULL, NULL), (88, 11, 50, NULL, NULL, NULL), (89, 29, 18, NULL, NULL, NULL), (90, 39, 29, NULL, NULL, NULL), (91, 1, 12, NULL, NULL, NULL), (92, 12, 36, NULL, NULL, NULL), (93, 22, 37, NULL, NULL, NULL), (94, 6, 38, NULL, NULL, NULL), (95, 8, 15, NULL, NULL, NULL), (96, 32, 37, NULL, NULL, NULL), (97, 13, 39, NULL, NULL, NULL), (98, 28, 18, NULL, NULL, NULL), (99, 23, 37, NULL, NULL, NULL), (100, 22, 24, NULL, NULL, NULL), (101, 26, 1, NULL, NULL, NULL), (102, 28, 48, NULL, NULL, NULL), (103, 40, 20, NULL, NULL, NULL), (104, 50, 12, NULL, NULL, NULL), (105, 43, 14, NULL, NULL, NULL), (106, 17, 26, NULL, NULL, NULL), (107, 43, 12, NULL, NULL, NULL), (108, 33, 27, NULL, NULL, NULL), (109, 46, 39, NULL, NULL, NULL), (110, 40, 15, NULL, NULL, NULL), (111, 22, 37, NULL, NULL, NULL), (112, 36, 37, NULL, NULL, NULL), (113, 6, 15, NULL, NULL, NULL), (114, 31, 4, NULL, NULL, NULL), (115, 47, 15, NULL, NULL, NULL), (116, 2, 13, NULL, NULL, NULL), (117, 22, 24, NULL, NULL, NULL), (118, 44, 25, NULL, NULL, NULL), (119, 1, 15, NULL, NULL, NULL), (120, 44, 30, NULL, NULL, NULL), (121, 13, 10, NULL, NULL, NULL), (122, 23, 14, NULL, NULL, NULL), (123, 37, 27, NULL, NULL, NULL), (124, 19, 29, NULL, NULL, NULL), (125, 41, 10, NULL, NULL, NULL), (126, 2, 37, NULL, NULL, NULL), (127, 12, 27, NULL, NULL, NULL), (128, 8, 6, NULL, NULL, NULL), (129, 47, 34, NULL, NULL, NULL), (130, 1, 7, NULL, NULL, NULL), (131, 13, 6, NULL, NULL, NULL), (132, 39, 24, NULL, NULL, NULL), (133, 8, 23, NULL, NULL, NULL), (134, 17, 48, NULL, NULL, NULL), (135, 6, 34, NULL, NULL, NULL), (136, 49, 25, NULL, NULL, NULL), (137, 50, 45, NULL, NULL, NULL), (138, 26, 37, NULL, NULL, NULL), (139, 16, 28, NULL, NULL, NULL), (140, 34, 48, NULL, NULL, NULL), (141, 3, 20, NULL, NULL, NULL), (142, 7, 21, NULL, NULL, NULL), (143, 40, 15, NULL, NULL, NULL), (144, 5, 25, NULL, NULL, NULL), (145, 1, 29, NULL, NULL, NULL), (146, 31, 7, NULL, NULL, NULL), (147, 31, 33, NULL, NULL, NULL), (148, 46, 18, NULL, NULL, NULL), (149, 40, 8, NULL, NULL, NULL), (150, 29, 18, NULL, NULL, NULL), (151, 8, 10, NULL, NULL, NULL), (152, 20, 7, NULL, NULL, NULL), (153, 33, 46, NULL, NULL, NULL), (154, 14, 2, NULL, NULL, NULL), (155, 43, 3, NULL, NULL, NULL), (156, 21, 49, NULL, NULL, NULL), (157, 7, 6, NULL, NULL, NULL), (158, 7, 9, NULL, NULL, NULL), (159, 40, 16, NULL, NULL, NULL), (160, 5, 24, NULL, NULL, NULL), (161, 47, 49, NULL, NULL, NULL), (162, 47, 45, NULL, NULL, NULL), (163, 38, 15, NULL, NULL, NULL), (164, 37, 8, NULL, NULL, NULL), (165, 11, 16, NULL, NULL, NULL), (166, 34, 9, NULL, NULL, NULL), (167, 12, 42, NULL, NULL, NULL), (168, 4, 18, NULL, NULL, NULL), (169, 22, 23, NULL, NULL, NULL), (170, 30, 20, NULL, NULL, NULL), (171, 1, 5, NULL, NULL, NULL), (172, 17, 7, NULL, NULL, NULL), (173, 4, 13, NULL, NULL, NULL), (174, 12, 29, NULL, NULL, NULL), (175, 46, 1, NULL, NULL, NULL), (176, 5, 15, NULL, NULL, NULL), (177, 15, 21, NULL, NULL, NULL), (178, 27, 17, NULL, NULL, NULL), (179, 15, 43, NULL, NULL, NULL), (180, 32, 8, NULL, NULL, NULL), (181, 27, 4, NULL, NULL, NULL), (182, 17, 40, NULL, NULL, NULL), (183, 42, 49, NULL, NULL, NULL), (184, 46, 13, NULL, NULL, NULL), (185, 17, 7, NULL, NULL, NULL), (186, 47, 9, NULL, NULL, NULL), (187, 20, 4, NULL, NULL, NULL), (188, 7, 12, NULL, NULL, NULL), (189, 20, 1, NULL, NULL, NULL), (190, 31, 32, NULL, NULL, NULL), (191, 44, 50, NULL, NULL, NULL), (192, 32, 36, NULL, NULL, NULL), (193, 1, 26, NULL, NULL, NULL), (194, 27, 19, NULL, NULL, NULL), (195, 3, 11, NULL, NULL, NULL), (196, 4, 42, NULL, NULL, NULL), (197, 30, 7, NULL, NULL, NULL), (198, 11, 4, NULL, NULL, NULL), (199, 30, 26, NULL, NULL, NULL), (200, 40, 15, NULL, NULL, NULL), (201, 49, 50, NULL, NULL, NULL), (202, 9, 1, NULL, NULL, NULL), (203, 13, 33, NULL, NULL, NULL), (204, 14, 45, NULL, NULL, NULL), (205, 10, 26, NULL, NULL, NULL), (206, 48, 44, NULL, NULL, NULL), (207, 24, 8, NULL, NULL, NULL), (208, 16, 48, NULL, NULL, NULL), (209, 12, 26, NULL, NULL, NULL), (210, 33, 41, NULL, NULL, NULL), (211, 48, 29, NULL, NULL, NULL), (212, 7, 45, NULL, NULL, NULL), (213, 48, 34, NULL, NULL, NULL), (214, 32, 25, NULL, NULL, NULL), (215, 16, 24, NULL, NULL, NULL), (216, 1, 10, NULL, NULL, NULL), (217, 46, 23, NULL, NULL, NULL), (218, 46, 35, NULL, NULL, NULL), (219, 8, 42, NULL, NULL, NULL), (220, 36, 44, NULL, NULL, NULL), (221, 38, 14, NULL, NULL, NULL), (222, 41, 4, NULL, NULL, NULL), (223, 5, 4, NULL, NULL, NULL), (224, 30, 22, NULL, NULL, NULL), (225, 34, 3, NULL, NULL, NULL), (226, 19, 17, NULL, NULL, NULL), (227, 46, 42, NULL, NULL, NULL), (228, 43, 10, NULL, NULL, NULL), (229, 19, 47, NULL, NULL, NULL), (230, 43, 2, NULL, NULL, NULL), (231, 39, 31, NULL, NULL, NULL), (232, 47, 3, NULL, NULL, NULL), (233, 27, 44, NULL, NULL, NULL), (234, 10, 11, NULL, NULL, NULL), (235, 39, 18, NULL, NULL, NULL), (236, 25, 23, NULL, NULL, NULL), (237, 50, 15, NULL, NULL, NULL), (238, 17, 22, NULL, NULL, NULL), (239, 28, 5, NULL, NULL, NULL), (240, 42, 29, NULL, NULL, NULL), (241, 44, 37, NULL, NULL, NULL), (242, 33, 33, NULL, NULL, NULL), (243, 13, 13, NULL, NULL, NULL), (244, 22, 24, NULL, NULL, NULL), (245, 41, 40, NULL, NULL, NULL), (246, 9, 46, NULL, NULL, NULL), (247, 15, 22, NULL, NULL, NULL), (248, 25, 18, NULL, NULL, NULL), (249, 40, 5, NULL, NULL, NULL), (250, 35, 33, NULL, NULL, NULL), (251, 22, 25, NULL, NULL, NULL), (252, 20, 8, NULL, NULL, NULL), (253, 8, 47, NULL, NULL, NULL), (254, 17, 33, NULL, NULL, NULL), (255, 19, 3, NULL, NULL, NULL), (256, 8, 38, NULL, NULL, NULL), (257, 2, 35, NULL, NULL, NULL), (258, 39, 40, NULL, NULL, NULL), (259, 16, 31, NULL, NULL, NULL), (260, 48, 1, NULL, NULL, NULL), (261, 26, 50, NULL, NULL, NULL), (262, 35, 49, NULL, NULL, NULL), (263, 43, 14, NULL, NULL, NULL), (264, 35, 43, NULL, NULL, NULL), (265, 12, 27, NULL, NULL, NULL), (266, 24, 48, NULL, NULL, NULL), (267, 37, 35, NULL, NULL, NULL), (268, 10, 31, NULL, NULL, NULL), (269, 31, 36, NULL, NULL, NULL), (270, 12, 39, NULL, NULL, NULL), (271, 39, 6, NULL, NULL, NULL), (272, 14, 27, NULL, NULL, NULL), (273, 5, 45, NULL, NULL, NULL), (274, 7, 48, NULL, NULL, NULL), (275, 26, 2, NULL, NULL, NULL), (276, 49, 35, NULL, NULL, NULL), (277, 37, 36, NULL, NULL, NULL), (278, 30, 29, NULL, NULL, NULL), (279, 31, 6, NULL, NULL, NULL), (280, 32, 12, NULL, NULL, NULL), (281, 43, 4, NULL, NULL, NULL), (282, 23, 21, NULL, NULL, NULL), (283, 34, 3, NULL, NULL, NULL), (284, 34, 20, NULL, NULL, NULL), (285, 50, 39, NULL, NULL, NULL), (286, 19, 29, NULL, NULL, NULL), (287, 22, 26, NULL, NULL, NULL), (288, 50, 45, NULL, NULL, NULL), (289, 31, 14, NULL, NULL, NULL), (290, 43, 25, NULL, NULL, NULL), (291, 23, 12, NULL, NULL, NULL), (292, 28, 27, NULL, NULL, NULL), (293, 1, 36, NULL, NULL, NULL), (294, 1, 14, NULL, NULL, NULL), (295, 21, 38, NULL, NULL, NULL), (296, 36, 21, NULL, NULL, NULL), (297, 4, 2, NULL, NULL, NULL), (298, 27, 50, NULL, NULL, NULL), (299, 5, 9, NULL, NULL, NULL), (300, 1, 42, NULL, NULL, NULL), (301, 21, 9, NULL, NULL, NULL), (302, 11, 46, NULL, NULL, NULL), (303, 29, 32, NULL, NULL, NULL), (304, 4, 45, NULL, NULL, NULL), (305, 7, 40, NULL, NULL, NULL), (306, 17, 36, NULL, NULL, NULL), (307, 28, 44, NULL, NULL, NULL), (308, 16, 11, NULL, NULL, NULL), (309, 17, 44, NULL, NULL, NULL), (310, 48, 28, NULL, NULL, NULL), (311, 48, 17, NULL, NULL, NULL), (312, 26, 50, NULL, NULL, NULL), (313, 43, 40, NULL, NULL, NULL), (314, 44, 29, NULL, NULL, NULL), (315, 45, 9, NULL, NULL, NULL), (316, 28, 39, NULL, NULL, NULL), (317, 17, 34, NULL, NULL, NULL), (318, 4, 45, NULL, NULL, NULL), (319, 48, 6, NULL, NULL, NULL), (320, 38, 30, NULL, NULL, NULL), (321, 44, 6, NULL, NULL, NULL), (322, 37, 42, NULL, NULL, NULL), (323, 43, 22, NULL, NULL, NULL), (324, 13, 34, NULL, NULL, NULL), (325, 30, 46, NULL, NULL, NULL), (326, 32, 27, NULL, NULL, NULL), (327, 33, 5, NULL, NULL, NULL), (328, 12, 25, NULL, NULL, NULL), (329, 2, 23, NULL, NULL, NULL), (330, 17, 4, NULL, NULL, NULL), (331, 8, 3, NULL, NULL, NULL), (332, 13, 18, NULL, NULL, NULL), (333, 42, 11, NULL, NULL, NULL), (334, 5, 16, NULL, NULL, NULL), (335, 16, 35, NULL, NULL, NULL), (336, 32, 9, NULL, NULL, NULL), (337, 19, 35, NULL, NULL, NULL), (338, 37, 21, NULL, NULL, NULL), (339, 21, 48, NULL, NULL, NULL), (340, 15, 7, NULL, NULL, NULL), (341, 25, 47, NULL, NULL, NULL), (342, 44, 45, NULL, NULL, NULL), (343, 10, 24, NULL, NULL, NULL), (344, 1, 19, NULL, NULL, NULL), (345, 49, 49, NULL, NULL, NULL), (346, 3, 44, NULL, NULL, NULL), (347, 16, 5, NULL, NULL, NULL), (348, 13, 8, NULL, NULL, NULL), (349, 7, 37, NULL, NULL, NULL), (350, 34, 32, NULL, NULL, NULL), (351, 2, 12, NULL, NULL, NULL), (352, 46, 25, NULL, NULL, NULL), (353, 49, 9, NULL, NULL, NULL), (354, 50, 50, NULL, NULL, NULL), (355, 15, 26, NULL, NULL, NULL), (356, 34, 39, NULL, NULL, NULL), (357, 5, 37, NULL, NULL, NULL), (358, 22, 39, NULL, NULL, NULL), (359, 27, 26, NULL, NULL, NULL), (360, 42, 40, NULL, NULL, NULL), (361, 32, 15, NULL, NULL, NULL), (362, 40, 33, NULL, NULL, NULL), (363, 29, 18, NULL, NULL, NULL), (364, 31, 8, NULL, NULL, NULL), (365, 35, 17, NULL, NULL, NULL), (366, 47, 50, NULL, NULL, NULL), (367, 41, 10, NULL, NULL, NULL), (368, 13, 36, NULL, NULL, NULL), (369, 4, 12, NULL, NULL, NULL), (370, 17, 36, NULL, NULL, NULL), (371, 24, 3, NULL, NULL, NULL), (372, 15, 4, NULL, NULL, NULL), (373, 9, 13, NULL, NULL, NULL), (374, 4, 48, NULL, NULL, NULL), (375, 30, 11, NULL, NULL, NULL), (376, 25, 14, NULL, NULL, NULL), (377, 23, 39, NULL, NULL, NULL), (378, 35, 25, NULL, NULL, NULL), (379, 12, 21, NULL, NULL, NULL), (380, 22, 35, NULL, NULL, NULL), (381, 38, 24, NULL, NULL, NULL), (382, 20, 12, NULL, NULL, NULL), (383, 24, 39, NULL, NULL, NULL), (384, 29, 41, NULL, NULL, NULL), (385, 44, 44, NULL, NULL, NULL), (386, 42, 26, NULL, NULL, NULL), (387, 35, 12, NULL, NULL, NULL), (388, 29, 10, NULL, NULL, NULL), (389, 28, 7, NULL, NULL, NULL), (390, 15, 36, NULL, NULL, NULL), (391, 38, 9, NULL, NULL, NULL), (392, 45, 50, NULL, NULL, NULL), (393, 15, 8, NULL, NULL, NULL), (394, 23, 8, NULL, NULL, NULL), (395, 12, 12, NULL, NULL, NULL), (396, 27, 28, NULL, NULL, NULL), (397, 3, 26, NULL, NULL, NULL), (398, 42, 7, NULL, NULL, NULL), (399, 48, 26, NULL, NULL, NULL), (400, 33, 47, NULL, NULL, NULL), (401, 48, 32, NULL, NULL, NULL), (402, 21, 3, NULL, NULL, NULL), (403, 23, 30, NULL, NULL, NULL), (404, 2, 38, NULL, NULL, NULL), (405, 15, 34, NULL, NULL, NULL), (406, 37, 43, NULL, NULL, NULL), (407, 43, 12, NULL, NULL, NULL), (408, 28, 23, NULL, NULL, NULL), (409, 26, 15, NULL, NULL, NULL), (410, 26, 43, NULL, NULL, NULL), (411, 16, 8, NULL, NULL, NULL), (412, 25, 2, NULL, NULL, NULL), (413, 17, 30, NULL, NULL, NULL), (414, 39, 7, NULL, NULL, NULL), (415, 45, 33, NULL, NULL, NULL), (416, 24, 41, NULL, NULL, NULL), (417, 18, 1, NULL, NULL, NULL), (418, 4, 46, NULL, NULL, NULL), (419, 44, 14, NULL, NULL, NULL), (420, 14, 8, NULL, NULL, NULL), (421, 47, 16, NULL, NULL, NULL), (422, 48, 4, NULL, NULL, NULL), (423, 26, 46, NULL, NULL, NULL), (424, 34, 13, NULL, NULL, NULL), (425, 1, 5, NULL, NULL, NULL), (426, 45, 50, NULL, NULL, NULL), (427, 25, 29, NULL, NULL, NULL), (428, 28, 17, NULL, NULL, NULL), (429, 13, 49, NULL, NULL, NULL), (430, 29, 49, NULL, NULL, NULL), (431, 33, 49, NULL, NULL, NULL), (432, 7, 18, NULL, NULL, NULL), (433, 49, 35, NULL, NULL, NULL), (434, 38, 3, NULL, NULL, NULL), (435, 24, 13, NULL, NULL, NULL), (436, 10, 20, NULL, NULL, NULL), (437, 34, 43, NULL, NULL, NULL), (438, 7, 32, NULL, NULL, NULL), (439, 27, 49, NULL, NULL, NULL), (440, 31, 30, NULL, NULL, NULL), (441, 41, 10, NULL, NULL, NULL), (442, 38, 24, NULL, NULL, NULL), (443, 34, 29, NULL, NULL, NULL), (444, 36, 38, NULL, NULL, NULL), (445, 39, 36, NULL, NULL, NULL), (446, 12, 12, NULL, NULL, NULL), (447, 42, 21, NULL, NULL, NULL), (448, 50, 28, NULL, NULL, NULL), (449, 1, 27, NULL, NULL, NULL), (450, 24, 5, NULL, NULL, NULL), (451, 50, 42, NULL, NULL, NULL), (452, 27, 7, NULL, NULL, NULL), (453, 14, 28, NULL, NULL, NULL), (454, 11, 32, NULL, NULL, NULL), (455, 5, 23, NULL, NULL, NULL), (456, 41, 25, NULL, NULL, NULL), (457, 10, 49, NULL, NULL, NULL), (458, 26, 23, NULL, NULL, NULL), (459, 22, 14, NULL, NULL, NULL), (460, 45, 26, NULL, NULL, NULL), (461, 48, 25, NULL, NULL, NULL), (462, 41, 17, NULL, NULL, NULL), (463, 8, 28, NULL, NULL, NULL), (464, 46, 35, NULL, NULL, NULL), (465, 30, 41, NULL, NULL, NULL), (466, 1, 2, NULL, NULL, NULL), (467, 36, 3, NULL, NULL, NULL), (468, 3, 41, NULL, NULL, NULL), (469, 13, 9, NULL, NULL, NULL), (470, 6, 39, NULL, NULL, NULL), (471, 21, 19, NULL, NULL, NULL), (472, 41, 50, NULL, NULL, NULL), (473, 41, 29, NULL, NULL, NULL), (474, 45, 1, NULL, NULL, NULL), (475, 9, 1, NULL, NULL, NULL), (476, 40, 38, NULL, NULL, NULL), (477, 30, 35, NULL, NULL, NULL), (478, 3, 37, NULL, NULL, NULL), (479, 19, 42, NULL, NULL, NULL), (480, 34, 47, NULL, NULL, NULL), (481, 35, 2, NULL, NULL, NULL), (482, 37, 40, NULL, NULL, NULL), (483, 20, 42, NULL, NULL, NULL), (484, 43, 24, NULL, NULL, NULL), (485, 38, 31, NULL, NULL, NULL), (486, 27, 19, NULL, NULL, NULL), (487, 5, 20, NULL, NULL, NULL), (488, 13, 33, NULL, NULL, NULL), (489, 12, 23, NULL, NULL, NULL), (490, 23, 20, NULL, NULL, NULL), (491, 4, 24, NULL, NULL, NULL), (492, 28, 27, NULL, NULL, NULL), (493, 41, 1, NULL, NULL, NULL), (494, 10, 30, NULL, NULL, NULL), (495, 23, 40, NULL, NULL, NULL), (496, 13, 25, NULL, NULL, NULL), (497, 21, 41, NULL, NULL, NULL), (498, 5, 19, NULL, NULL, NULL), (499, 14, 16, NULL, NULL, NULL), (500, 12, 23, NULL, NULL, NULL), (501, 8, 44, NULL, NULL, NULL), (502, 22, 45, NULL, NULL, NULL), (503, 29, 8, NULL, NULL, NULL), (504, 14, 25, NULL, NULL, NULL), (505, 25, 45, NULL, NULL, NULL), (506, 38, 10, NULL, NULL, NULL), (507, 42, 43, NULL, NULL, NULL), (508, 10, 29, NULL, NULL, NULL), (509, 9, 2, NULL, NULL, NULL), (510, 33, 23, NULL, NULL, NULL), (511, 36, 22, NULL, NULL, NULL), (512, 21, 36, NULL, NULL, NULL), (513, 8, 50, NULL, NULL, NULL), (514, 2, 49, NULL, NULL, NULL), (515, 30, 29, NULL, NULL, NULL), (516, 11, 21, NULL, NULL, NULL), (517, 18, 1, NULL, NULL, NULL), (518, 34, 9, NULL, NULL, NULL), (519, 39, 17, NULL, NULL, NULL), (520, 15, 46, NULL, NULL, NULL), (521, 46, 8, NULL, NULL, NULL), (522, 9, 21, NULL, NULL, NULL), (523, 39, 7, NULL, NULL, NULL), (524, 15, 33, NULL, NULL, NULL), (525, 44, 7, NULL, NULL, NULL), (526, 8, 36, NULL, NULL, NULL), (527, 28, 10, NULL, NULL, NULL), (528, 14, 25, NULL, NULL, NULL), (529, 36, 9, NULL, NULL, NULL), (530, 2, 48, NULL, NULL, NULL), (531, 48, 20, NULL, NULL, NULL), (532, 22, 13, NULL, NULL, NULL), (533, 31, 11, NULL, NULL, NULL), (534, 21, 37, NULL, NULL, NULL), (535, 14, 50, NULL, NULL, NULL), (536, 42, 16, NULL, NULL, NULL), (537, 36, 45, NULL, NULL, NULL), (538, 18, 13, NULL, NULL, NULL), (539, 8, 39, NULL, NULL, NULL), (540, 33, 36, NULL, NULL, NULL), (541, 34, 22, NULL, NULL, NULL), (542, 34, 1, NULL, NULL, NULL), (543, 3, 28, NULL, NULL, NULL), (544, 2, 17, NULL, NULL, NULL), (545, 2, 48, NULL, NULL, NULL), (546, 15, 13, NULL, NULL, NULL), (547, 34, 2, NULL, NULL, NULL), (548, 5, 9, NULL, NULL, NULL), (549, 42, 3, NULL, NULL, NULL), (550, 28, 5, NULL, NULL, NULL), (551, 10, 32, NULL, NULL, NULL), (552, 46, 6, NULL, NULL, NULL), (553, 17, 41, NULL, NULL, NULL), (554, 35, 20, NULL, NULL, NULL), (555, 47, 29, NULL, NULL, NULL), (556, 46, 35, NULL, NULL, NULL), (557, 24, 41, NULL, NULL, NULL), (558, 14, 12, NULL, NULL, NULL), (559, 39, 27, NULL, NULL, NULL), (560, 40, 48, NULL, NULL, NULL), (561, 41, 19, NULL, NULL, NULL), (562, 31, 5, NULL, NULL, NULL), (563, 10, 10, NULL, NULL, NULL), (564, 38, 7, NULL, NULL, NULL), (565, 6, 39, NULL, NULL, NULL), (566, 48, 47, NULL, NULL, NULL), (567, 8, 8, NULL, NULL, NULL), (568, 49, 25, NULL, NULL, NULL), (569, 49, 48, NULL, NULL, NULL), (570, 43, 18, NULL, NULL, NULL), (571, 37, 20, NULL, NULL, NULL), (572, 33, 48, NULL, NULL, NULL), (573, 14, 46, NULL, NULL, NULL), (574, 36, 35, NULL, NULL, NULL), (575, 47, 39, NULL, NULL, NULL), (576, 7, 14, NULL, NULL, NULL), (577, 42, 49, NULL, NULL, NULL), (578, 48, 39, NULL, NULL, NULL), (579, 29, 5, NULL, NULL, NULL), (580, 13, 47, NULL, NULL, NULL), (581, 14, 46, NULL, NULL, NULL), (582, 15, 23, NULL, NULL, NULL), (583, 45, 5, NULL, NULL, NULL), (584, 42, 48, NULL, NULL, NULL), (585, 48, 14, NULL, NULL, NULL), (586, 6, 19, NULL, NULL, NULL), (587, 30, 8, NULL, NULL, NULL), (588, 16, 45, NULL, NULL, NULL), (589, 49, 24, NULL, NULL, NULL), (590, 41, 15, NULL, NULL, NULL), (591, 8, 43, NULL, NULL, NULL), (592, 47, 31, NULL, NULL, NULL), (593, 7, 8, NULL, NULL, NULL), (594, 37, 19, NULL, NULL, NULL), (595, 43, 30, NULL, NULL, NULL), (596, 50, 2, NULL, NULL, NULL), (597, 10, 14, NULL, NULL, NULL), (598, 38, 32, NULL, NULL, NULL), (599, 37, 4, NULL, NULL, NULL), (600, 30, 2, NULL, NULL, NULL), (601, 40, 39, NULL, NULL, NULL), (602, 44, 5, NULL, NULL, NULL), (603, 27, 20, NULL, NULL, NULL), (604, 26, 31, NULL, NULL, NULL), (605, 49, 46, NULL, NULL, NULL), (606, 17, 10, NULL, NULL, NULL), (607, 7, 44, NULL, NULL, NULL), (608, 8, 49, NULL, NULL, NULL), (609, 31, 21, NULL, NULL, NULL), (610, 26, 28, NULL, NULL, NULL), (611, 17, 30, NULL, NULL, NULL), (612, 16, 27, NULL, NULL, NULL), (613, 45, 40, NULL, NULL, NULL), (614, 19, 29, NULL, NULL, NULL), (615, 19, 30, NULL, NULL, NULL), (616, 31, 36, NULL, NULL, NULL), (617, 38, 40, NULL, NULL, NULL), (618, 24, 5, NULL, NULL, NULL), (619, 39, 12, NULL, NULL, NULL), (620, 21, 1, NULL, NULL, NULL), (621, 34, 3, NULL, NULL, NULL), (622, 45, 9, NULL, NULL, NULL), (623, 40, 48, NULL, NULL, NULL), (624, 13, 13, NULL, NULL, NULL), (625, 19, 16, NULL, NULL, NULL), (626, 38, 15, NULL, NULL, NULL), (627, 25, 38, NULL, NULL, NULL), (628, 26, 34, NULL, NULL, NULL), (629, 13, 18, NULL, NULL, NULL), (630, 1, 49, NULL, NULL, NULL), (631, 17, 49, NULL, NULL, NULL), (632, 38, 4, NULL, NULL, NULL), (633, 39, 5, NULL, NULL, NULL), (634, 34, 40, NULL, NULL, NULL), (635, 37, 6, NULL, NULL, NULL), (636, 28, 29, NULL, NULL, NULL), (637, 9, 30, NULL, NULL, NULL), (638, 29, 9, NULL, NULL, NULL), (639, 9, 22, NULL, NULL, NULL), (640, 23, 33, NULL, NULL, NULL), (641, 46, 10, NULL, NULL, NULL), (642, 40, 37, NULL, NULL, NULL), (643, 33, 9, NULL, NULL, NULL), (644, 38, 2, NULL, NULL, NULL), (645, 21, 25, NULL, NULL, NULL), (646, 36, 5, NULL, NULL, NULL), (647, 30, 37, NULL, NULL, NULL), (648, 10, 8, NULL, NULL, NULL), (649, 25, 19, NULL, NULL, NULL), (650, 22, 9, NULL, NULL, NULL), (651, 26, 28, NULL, NULL, NULL), (652, 17, 35, NULL, NULL, NULL), (653, 46, 16, NULL, NULL, NULL), (654, 14, 32, NULL, NULL, NULL), (655, 36, 31, NULL, NULL, NULL), (656, 42, 1, NULL, NULL, NULL), (657, 10, 23, NULL, NULL, NULL), (658, 47, 6, NULL, NULL, NULL), (659, 21, 43, NULL, NULL, NULL), (660, 2, 50, NULL, NULL, NULL), (661, 1, 16, NULL, NULL, NULL), (662, 4, 38, NULL, NULL, NULL), (663, 11, 14, NULL, NULL, NULL), (664, 1, 4, NULL, NULL, NULL), (665, 3, 36, NULL, NULL, NULL), (666, 30, 27, NULL, NULL, NULL), (667, 47, 29, NULL, NULL, NULL), (668, 34, 7, NULL, NULL, NULL), (669, 10, 13, NULL, NULL, NULL), (670, 49, 45, NULL, NULL, NULL), (671, 17, 18, NULL, NULL, NULL), (672, 29, 44, NULL, NULL, NULL), (673, 6, 46, NULL, NULL, NULL), (674, 38, 25, NULL, NULL, NULL), (675, 28, 8, NULL, NULL, NULL), (676, 9, 46, NULL, NULL, NULL), (677, 47, 34, NULL, NULL, NULL), (678, 5, 32, NULL, NULL, NULL), (679, 27, 37, NULL, NULL, NULL), (680, 9, 34, NULL, NULL, NULL), (681, 27, 8, NULL, NULL, NULL), (682, 29, 12, NULL, NULL, NULL), (683, 9, 8, NULL, NULL, NULL), (684, 5, 5, NULL, NULL, NULL), (685, 39, 30, NULL, NULL, NULL), (686, 49, 9, NULL, NULL, NULL), (687, 36, 1, NULL, NULL, NULL), (688, 3, 34, NULL, NULL, NULL), (689, 48, 49, NULL, NULL, NULL), (690, 32, 42, NULL, NULL, NULL), (691, 47, 8, NULL, NULL, NULL), (692, 35, 10, NULL, NULL, NULL), (693, 14, 25, NULL, NULL, NULL), (694, 34, 16, NULL, NULL, NULL), (695, 8, 42, NULL, NULL, NULL), (696, 11, 3, NULL, NULL, NULL), (697, 44, 38, NULL, NULL, NULL), (698, 4, 32, NULL, NULL, NULL), (699, 7, 14, NULL, NULL, NULL), (700, 11, 30, NULL, NULL, NULL), (701, 46, 3, NULL, NULL, NULL), (702, 16, 47, NULL, NULL, NULL), (703, 14, 2, NULL, NULL, NULL), (704, 12, 46, NULL, NULL, NULL), (705, 31, 13, NULL, NULL, NULL), (706, 22, 25, NULL, NULL, NULL), (707, 37, 27, NULL, NULL, NULL), (708, 38, 32, NULL, NULL, NULL), (709, 8, 40, NULL, NULL, NULL), (710, 40, 45, NULL, NULL, NULL), (711, 39, 3, NULL, NULL, NULL), (712, 37, 9, NULL, NULL, NULL), (713, 44, 14, NULL, NULL, NULL), (714, 48, 5, NULL, NULL, NULL), (715, 20, 21, NULL, NULL, NULL), (716, 31, 35, NULL, NULL, NULL), (717, 39, 4, NULL, NULL, NULL), (718, 32, 24, NULL, NULL, NULL), (719, 28, 12, NULL, NULL, NULL), (720, 34, 33, NULL, NULL, NULL), (721, 26, 4, NULL, NULL, NULL), (722, 13, 18, NULL, NULL, NULL), (723, 3, 20, NULL, NULL, NULL), (724, 20, 10, NULL, NULL, NULL), (725, 16, 34, NULL, NULL, NULL), (726, 8, 3, NULL, NULL, NULL), (727, 15, 6, NULL, NULL, NULL), (728, 2, 22, NULL, NULL, NULL), (729, 39, 24, NULL, NULL, NULL), (730, 11, 18, NULL, NULL, NULL), (731, 12, 39, NULL, NULL, NULL), (732, 23, 15, NULL, NULL, NULL), (733, 46, 4, NULL, NULL, NULL), (734, 6, 16, NULL, NULL, NULL), (735, 47, 9, NULL, NULL, NULL), (736, 11, 12, NULL, NULL, NULL), (737, 14, 38, NULL, NULL, NULL), (738, 34, 4, NULL, NULL, NULL), (739, 21, 28, NULL, NULL, NULL), (740, 23, 17, NULL, NULL, NULL), (741, 32, 33, NULL, NULL, NULL), (742, 43, 25, NULL, NULL, NULL), (743, 29, 41, NULL, NULL, NULL), (744, 15, 37, NULL, NULL, NULL), (745, 35, 39, NULL, NULL, NULL), (746, 3, 21, NULL, NULL, NULL), (747, 36, 50, NULL, NULL, NULL), (748, 23, 12, NULL, NULL, NULL), (749, 13, 26, NULL, NULL, NULL), (750, 34, 29, NULL, NULL, NULL), (751, 7, 19, NULL, NULL, NULL), (752, 6, 38, NULL, NULL, NULL), (753, 42, 24, NULL, NULL, NULL), (754, 49, 12, NULL, NULL, NULL), (755, 36, 36, NULL, NULL, NULL), (756, 13, 29, NULL, NULL, NULL), (757, 29, 3, NULL, NULL, NULL), (758, 19, 29, NULL, NULL, NULL), (759, 42, 31, NULL, NULL, NULL), (760, 37, 21, NULL, NULL, NULL), (761, 38, 15, NULL, NULL, NULL), (762, 25, 40, NULL, NULL, NULL), (763, 21, 21, NULL, NULL, NULL), (764, 46, 5, NULL, NULL, NULL), (765, 10, 49, NULL, NULL, NULL), (766, 27, 7, NULL, NULL, NULL), (767, 28, 50, NULL, NULL, NULL), (768, 44, 30, NULL, NULL, NULL), (769, 7, 24, NULL, NULL, NULL), (770, 41, 38, NULL, NULL, NULL), (771, 16, 7, NULL, NULL, NULL), (772, 14, 20, NULL, NULL, NULL), (773, 31, 13, NULL, NULL, NULL), (774, 38, 50, NULL, NULL, NULL), (775, 32, 49, NULL, NULL, NULL), (776, 10, 50, NULL, NULL, NULL), (777, 5, 4, NULL, NULL, NULL), (778, 44, 41, NULL, NULL, NULL), (779, 26, 25, NULL, NULL, NULL), (780, 29, 31, NULL, NULL, NULL), (781, 30, 38, NULL, NULL, NULL), (782, 7, 1, NULL, NULL, NULL), (783, 35, 30, NULL, NULL, NULL), (784, 50, 1, NULL, NULL, NULL), (785, 41, 37, NULL, NULL, NULL), (786, 7, 25, NULL, NULL, NULL), (787, 44, 13, NULL, NULL, NULL), (788, 46, 23, NULL, NULL, NULL), (789, 50, 22, NULL, NULL, NULL), (790, 4, 27, NULL, NULL, NULL), (791, 46, 49, NULL, NULL, NULL), (792, 22, 5, NULL, NULL, NULL), (793, 27, 39, NULL, NULL, NULL), (794, 12, 14, NULL, NULL, NULL), (795, 38, 45, NULL, NULL, NULL), (796, 33, 15, NULL, NULL, NULL), (797, 37, 8, NULL, NULL, NULL), (798, 46, 14, NULL, NULL, NULL), (799, 25, 7, NULL, NULL, NULL), (800, 23, 27, NULL, NULL, NULL), (801, 17, 14, NULL, NULL, NULL), (802, 16, 25, NULL, NULL, NULL), (803, 3, 14, NULL, NULL, NULL), (804, 35, 6, NULL, NULL, NULL), (805, 36, 17, NULL, NULL, NULL), (806, 48, 42, NULL, NULL, NULL), (807, 14, 46, NULL, NULL, NULL), (808, 2, 109, NULL, NULL, NULL), (809, 3, 109, NULL, NULL, NULL), (810, 4, 109, NULL, NULL, NULL), (811, 2, 110, NULL, NULL, NULL), (812, 3, 110, NULL, NULL, NULL), (813, 2, 111, NULL, NULL, NULL), (814, 3, 111, NULL, NULL, NULL), (815, 2, 112, NULL, NULL, NULL), (816, 3, 112, NULL, NULL, NULL), (817, 2, 113, NULL, NULL, NULL), (818, 3, 113, NULL, NULL, NULL), (819, 2, 114, NULL, NULL, NULL), (820, 3, 114, NULL, NULL, NULL), (821, 3, 117, NULL, NULL, NULL), (822, 3, 118, NULL, NULL, NULL), (823, 2, 119, NULL, NULL, NULL), (824, 6, 120, NULL, NULL, NULL), (825, 8, 120, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2018_07_31_234854_create_jobs_table', 1), (4, '2018_08_01_022244_create_skills_table', 1), (5, '2018_08_01_220711_job_skills_name_table', 1), (6, '2018_08_02_031143_create_countries_table', 1), (7, '2018_08_02_032028_create_bookmarks_table', 1), (8, '2018_08_02_145640_create_applies_table', 1), (9, '2018_08_02_231712_create_country_id_table', 1), (10, '2018_08_08_212733_create_user_skills_table', 2); -- -------------------------------------------------------- -- -- 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 `skills` -- CREATE TABLE `skills` ( `id` int(10) UNSIGNED NOT NULL, `name` 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 `skills` -- INSERT INTO `skills` (`id`, `name`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'WordPress', NULL, NULL, NULL), (2, 'Microsoft', NULL, NULL, NULL), (3, 'Office', NULL, NULL, NULL), (4, 'Adobe', NULL, NULL, NULL), (5, 'Photoshop', NULL, NULL, NULL), (6, 'Adobe Photoshop', NULL, NULL, NULL), (7, 'Adobe Illustrator', NULL, NULL, NULL), (8, 'Adobe Indesign', NULL, NULL, NULL), (9, 'Interface Design', NULL, NULL, NULL), (10, 'Information Technology (IT)', NULL, NULL, NULL), (11, 'Graphic Design', NULL, NULL, NULL), (12, 'Web Design', NULL, NULL, NULL), (13, 'HTML', NULL, NULL, NULL), (14, 'CSS', NULL, NULL, NULL), (15, 'jQuery', NULL, NULL, NULL), (16, 'Bootstrap Framework', NULL, NULL, NULL), (17, 'Testing', NULL, NULL, NULL), (18, 'Animation', NULL, NULL, NULL), (19, 'Human Resources (HR)', NULL, NULL, NULL), (20, 'Recruitment', NULL, NULL, NULL), (21, 'Interviews', NULL, NULL, NULL), (22, 'Employee Relations', NULL, NULL, NULL), (23, 'Employment Law', NULL, NULL, NULL), (24, 'IT/Software Development', NULL, NULL, NULL), (25, 'Marketing/PR/Advertising', NULL, NULL, NULL), (26, 'Project/Program Management', NULL, NULL, NULL), (27, 'Startup', NULL, NULL, NULL), (28, 'magento', NULL, NULL, NULL), (29, 'HTML5', NULL, NULL, NULL), (30, 'CSS3', NULL, NULL, NULL), (31, 'PostgreSQL', NULL, NULL, NULL), (32, 'GitPlus', NULL, NULL, NULL), (33, 'Angular', NULL, NULL, NULL), (34, 'TypeScript', NULL, NULL, NULL), (35, 'React', NULL, NULL, NULL), (36, 'Computer Science', NULL, NULL, NULL), (37, 'Software Engineering', NULL, NULL, NULL), (38, 'Python', NULL, NULL, NULL), (39, 'Web Development', NULL, NULL, NULL), (40, 'Software Development', NULL, NULL, NULL), (41, 'Linux', NULL, NULL, NULL), (42, 'Diango', NULL, NULL, NULL), (43, 'REST', NULL, NULL, NULL), (44, 'Shell Scripting', NULL, NULL, NULL), (45, 'Software Technologies', NULL, NULL, NULL), (46, 'API', NULL, NULL, NULL), (47, 'WordPress', NULL, NULL, NULL), (48, 'Microsoft', NULL, NULL, NULL), (49, 'Office', NULL, NULL, NULL), (50, 'Adobe', NULL, NULL, NULL), (51, 'Photoshop', NULL, NULL, NULL), (52, 'Adobe Photoshop', NULL, NULL, NULL), (53, 'Adobe Illustrator', NULL, NULL, NULL), (54, 'Adobe Indesign', NULL, NULL, NULL), (55, 'Interface Design', NULL, NULL, NULL), (56, 'Information Technology (IT)', NULL, NULL, NULL), (57, 'Graphic Design', NULL, NULL, NULL), (58, 'Web Design', NULL, NULL, NULL), (59, 'HTML', NULL, NULL, NULL), (60, 'CSS', NULL, NULL, NULL), (61, 'jQuery', NULL, NULL, NULL), (62, 'Bootstrap Framework', NULL, NULL, NULL), (63, 'Testing', NULL, NULL, NULL), (64, 'Animation', NULL, NULL, NULL), (65, 'Human Resources (HR)', NULL, NULL, NULL), (66, 'Recruitment', NULL, NULL, NULL), (67, 'Interviews', NULL, NULL, NULL), (68, 'Employee Relations', NULL, NULL, NULL), (69, 'Employment Law', NULL, NULL, NULL), (70, 'IT/Software Development', NULL, NULL, NULL), (71, 'Marketing/PR/Advertising', NULL, NULL, NULL), (72, 'Project/Program Management', NULL, NULL, NULL), (73, 'Startup', NULL, NULL, NULL), (74, 'magento', NULL, NULL, NULL), (75, 'HTML5', NULL, NULL, NULL), (76, 'CSS3', NULL, NULL, NULL), (77, 'PostgreSQL', NULL, NULL, NULL), (78, 'GitPlus', NULL, NULL, NULL), (79, 'Angular', NULL, NULL, NULL), (80, 'TypeScript', NULL, NULL, NULL), (81, 'React', NULL, NULL, NULL), (82, 'Computer Science', NULL, NULL, NULL), (83, 'Software Engineering', NULL, NULL, NULL), (84, 'Python', NULL, NULL, NULL), (85, 'Web Development', NULL, NULL, NULL), (86, 'Software Development', NULL, NULL, NULL), (87, 'Linux', NULL, NULL, NULL), (88, 'Diango', NULL, NULL, NULL), (89, 'REST', NULL, NULL, NULL), (90, 'Shell Scripting', NULL, NULL, NULL), (91, 'Software Technologies', NULL, NULL, NULL), (92, 'API', NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `job` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `about` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `avatar` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `role` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `gender` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `country_id` int(10) UNSIGNED DEFAULT NULL, `follow` int(11) DEFAULT 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`, `first_name`, `last_name`, `email`, `password`, `phone`, `country`, `job`, `about`, `avatar`, `role`, `gender`, `country_id`, `follow`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'nkxP', 'DRpG', '[email protected]', '459054', '+2011772628421', 'Croatia (Hrvatska)', 'PLv', 'zbfKwPTmQEIJ8BL', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (2, 'vmRl', '3daf', '[email protected]', '474996', '+2011927815465', 'Croatia (Hrvatska)', 'suI', 'doB7WHAabSNAnqw', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (3, 'qLzs', 'nOWN', '[email protected]', '472030', '+2011766368876', 'Bosnia and Herzegowina', 'zwj', '1Q6fmLmOVg84roN', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (4, 'pvEt', 'd9a1', '[email protected]', '461910', '+2011146635904', 'Belgium', 'Vey', 'KktlGk3vMlPP7e1', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (5, '05dR', 'iYVY', '[email protected]', '462359', '+2011438276880', 'Gabon', 'B9r', '1jKJVLOXlA4jbhe', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (6, '86wb', 'cKGQ', '[email protected]', '465647', '+2011445528061', 'Cayman Islands', 'Hzo', 'qNpGL6Em2AtYZ77', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (7, 'iymJ', 'whoU', '[email protected]', '457774', '+2011115578676', 'Botswana', 'vV8', 'MvYpW3YVKDyNeN8', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (8, 'teJ2', 'Vr46', '[email protected]', '462744', '+2011110521956', 'Gibraltar', '41Q', '8zfXPgqBS5eVcvk', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (9, 'wq3A', 'eURM', '[email protected]', '456552', '+2011812812127', 'Gabon', 'Qv5', 'IsKbksZMh8kGUXM', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (10, 'Udyl', 'lHHJ', '[email protected]', '472448', '+2011864683036', 'Cayman Islands', 'YfE', 'xZqrTHDUQCfytsz', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (11, 'n8XJ', '9aP9', '[email protected]', '465709', '+201154244705', 'Belgium', 'eTW', 'MOvhAJayqB28Qxh', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (12, 'v6qW', 'LtsL', '[email protected]', '473348', '+2011694023115', 'Cayman Islands', 'Qwb', 'I6agjXnVbfESfkS', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (13, 'Gs4z', '8qH2', '[email protected]', '467335', '+201145939589', 'Gibraltar', '898', 'WfVoIRrYAXxqKBi', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (14, 'KOmy', 'QPOd', '[email protected]', '472744', '+2011232211861', 'Botswana', 'PdM', 'p5J4PrKt1tdkoFz', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (15, 'dIc0', 'B2EW', '[email protected]', '463657', '+2011462095312', 'Armenia', '8Xc', 'Nm7pSHhzQJb4OZR', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (16, 'uPOl', 'HzQu', '[email protected]', '454661', '+2011426080994', 'Croatia (Hrvatska)', 'ofM', 'DRqNIgLwn7pMEvs', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (17, 'PFMW', 'hmtR', '[email protected]', '459141', '+2011806869869', 'Gibraltar', '4Si', 'XuP0cJAOaT86cca', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (18, 'tZv2', '9wcq', '[email protected]', '464309', '+2011488522056', 'Armenia', 'c5R', 'F9Jkv3CoxokQM00', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (19, '66LC', 'jOka', '[email protected]', '463741', '+2011748078214', 'Fiji', '7if', 'Yo0YPR6YBRVzV83', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (20, 'A5Sn', 'RKhc', '[email protected]', '455107', '+2011665669904', 'Ghana', 'Vs1', 'VR3jNQCX5KKBdTm', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (21, 'gIIl', 'ihlo', '[email protected]', '466887', '+2011466093187', 'Belgium', 'zHP', 'ZMRIJC11UmGQx1V', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (22, 'ayuP', 'yfWb', '[email protected]', '466139', '+2011356232877', 'Belgium', 'Drn', 'bHaW9s95p5Wfuup', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (23, 'e9pA', 'kU5b', '[email protected]', '454448', '+2011893001039', 'Ghana', 'td1', '0LCxJdErXBs3vPE', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (24, 'u4eK', 'xitG', '[email protected]', '458103', '+2011431334696', 'Croatia (Hrvatska)', 'MAQ', '6fUyHhGNzIDwJeo', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (25, 'NsMs', 'aOur', '[email protected]', '469027', '+2011536628835', 'Gabon', 'FAO', 'HlCsicMNjum05QJ', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (26, '9JZ3', 'ONML', '[email protected]', '471416', '+2011138485530', 'Croatia (Hrvatska)', 'Ldj', 'KeekUTI8bzZSpta', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (27, 'jtMr', 'byAE', '[email protected]', '455450', '+2011854913700', 'Botswana', 'jZr', 'hkIYhRIBvTgyiEW', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (28, 'fA6k', '7jKq', '[email protected]', '475542', '+2011432379400', 'Gibraltar', 'qQO', 'IQCka2ieIw0OyLm', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (29, 'NZrD', 'UgBL', '[email protected]', '455664', '+2011132505757', 'Bosnia and Herzegowina', '3zo', '1IOjUQOU3pdkVHt', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (30, 'eOj5', 'iK9y', '[email protected]', '464399', '+2011760205842', 'Fiji', 'kVz', 'xS1N0PZVoqT8IHI', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (31, 'yORh', 'QPmF', '[email protected]', '475363', '+2011425688551', 'Andorra', '6g8', '5zKLLwBlWznkkiA', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (32, 'hHXC', '7R6t', '[email protected]', '461723', '+201168993613', 'Belgium', '7WY', 'd0n5SgC525XCVnA', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (33, 'Hcfr', 'ww8h', '[email protected]', '472865', '+2011287079589', 'Ghana', 'qBg', 'qU71vK0xOjM4FEw', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (34, 'Szeb', 'zAwD', '[email protected]', '461010', '+2011464947451', 'Belgium', 'E8J', 'PA6R8Lzzl4UZ3zZ', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (35, 'MVUY', 'uiNX', '[email protected]', '460882', '+2011172917492', 'Botswana', 'gxQ', '8c5qUvbO7rYjLkW', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (36, 'ierI', 'TaK1', '[email protected]', '460846', '+201197047903', 'Fiji', '3jv', 'XkFisZI7H3Bl5up', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (37, 'nKWF', '2RnT', '[email protected]', '470039', '+2011454937004', 'Ghana', 'rZF', '8md8FoVnTkbBp7A', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (38, 'jC1R', 'PEbh', '[email protected]', '475425', '+2011472619462', 'Fiji', '7DU', 'eN0dWAjJk20FfZ3', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (39, 'rwbw', '2uG9', '[email protected]', '474713', '+2011316792497', 'Belgium', 'wtr', 'Hm1qjWRFf3lbrSy', '', 'user', 'female', 0, NULL, NULL, NULL, NULL), (40, 'HPME', 'V7K1', '[email protected]', '459600', '+2011349355021', 'Armenia', 'R3n', 'bFi2gEjYC9psJj5', '', 'user', 'male', 0, NULL, NULL, NULL, NULL), (41, 'Alaa', 'Abdallah', '[email protected]', '$2y$10$96yQxauIm1kcsDggcQBCUOSBtr.Z0TCU4SBw4tjisQjE6NrOohbfe', '+201144674894', NULL, 'student', 'i\'m Alaa From Egypt, I have 21 years old', '/storage/users/4N11vT2voo7srrlmL59HnGwTGoj6KgvGrrR5VuH1.jpeg', 'user', 'male', 0, NULL, 'zrZRYE3TCODPI4lbswUBAMcZzHRxEBDg1L9ndq0E34JXOnMoNUbE9t4RVot7', '2018-08-04 19:01:57', '2018-08-08 18:07:35'), (42, 'Alaa', 'mohamed', '[email protected]', '$2y$10$jG1xRp1zzbfTfVikUdm0NeAzt7LdAvq/OEYG5tYN9dxMuzKKEaK6a', '01152585585', 'Egypt', NULL, NULL, '/storage/users/xldM9xa6eYQCaOD1OwQe0EC0cG4cdyzSemkeAXX5.jpeg', 'user', 'male', 0, NULL, 'nqxnumFJsLvfcrnuHJYlm4w9dS2WIX9p56oV2LsMdxKvOFtOrkyowG4mToS8', '2018-08-06 21:47:35', '2018-08-08 18:29:12'), (43, 'ahmed', 'mohamed', '[email protected]', '$2y$10$.Z7/N0tCnRsNkhIj/cXgYeZXBV7wTzjzLD05jDUP8NRbioIqX8vta', '01152585585', NULL, NULL, NULL, NULL, 'employer', 'male', 0, NULL, NULL, '2018-08-06 23:13:13', '2018-08-06 23:13:13'), (44, 'ahmed', 'mohamed', '[email protected]', '$2y$10$3v73jTAwDvyl4Vjn6WCwy.r1vCow9CH17C4qoD6B/6ds1oKuACRt6', '01152585585', NULL, NULL, NULL, '/storage/users/fSED5bStRDiqTPSPWj3khA466Q5iEQbbkyHmbQuH.jpeg', 'user', 'male', 0, NULL, 'lyWK9mx5GG5JDQWngDZKD1ihgngZkxRPjrs6wCT4mNnFiGEIA5d0tf2Docpl', '2018-08-07 01:48:16', '2018-08-07 02:01:14'), (45, 'hesh', 'mash', '[email protected]', '$2y$10$96yQxauIm1kcsDggcQBCUOSBtr.Z0TCU4SBw4tjisQjE6NrOohbfe', '+201144674894', NULL, NULL, NULL, NULL, 'user', 'male', NULL, NULL, '6kbD5donJsdS7EpHuls5vyQ9XWgifxUyCLCXLkgzz25Ukr8fri7XXhpK42DJ', '2018-08-09 15:26:43', '2018-08-09 15:26:43'); -- -------------------------------------------------------- -- -- Table structure for table `user_skills` -- CREATE TABLE `user_skills` ( `id` int(10) UNSIGNED NOT NULL, `skill_id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED 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 `user_skills` -- INSERT INTO `user_skills` (`id`, `skill_id`, `user_id`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 2, 42, NULL, NULL, NULL), (2, 3, 42, NULL, NULL, NULL), (3, 6, 42, NULL, NULL, NULL), (4, 7, 42, NULL, NULL, NULL), (5, 11, 42, NULL, NULL, NULL), (6, 12, 42, NULL, NULL, NULL), (7, 1, 42, NULL, NULL, NULL), (8, 2, 42, NULL, NULL, NULL), (9, 3, 42, NULL, NULL, NULL), (10, 4, 42, NULL, NULL, NULL), (11, 7, 42, NULL, NULL, NULL), (12, 8, 42, NULL, NULL, NULL), (13, 83, 42, NULL, NULL, NULL), (14, 84, 42, NULL, NULL, NULL); -- -- Indexes for dumped tables -- -- -- Indexes for table `applies` -- ALTER TABLE `applies` ADD PRIMARY KEY (`id`), ADD KEY `applies_user_id_foreign` (`user_id`), ADD KEY `applies_job_id_foreign` (`job_id`); -- -- Indexes for table `bookmarks` -- ALTER TABLE `bookmarks` ADD PRIMARY KEY (`id`), ADD KEY `bookmarks_user_id_foreign` (`user_id`), ADD KEY `bookmarks_job_id_foreign` (`job_id`); -- -- Indexes for table `countries` -- ALTER TABLE `countries` ADD PRIMARY KEY (`id`); -- -- Indexes for table `country_links` -- ALTER TABLE `country_links` ADD PRIMARY KEY (`id`), ADD KEY `country_link_counrty_id_foreign` (`country_id`), ADD KEY `country_link_user_id_foreign` (`user_id`), ADD KEY `country_link_job_id_foreign` (`job_id`); -- -- Indexes for table `jobs` -- ALTER TABLE `jobs` ADD PRIMARY KEY (`id`), ADD KEY `jobs_user_id_foreign` (`user_id`), ADD KEY `country_id` (`country_id`); -- -- Indexes for table `job_skills` -- ALTER TABLE `job_skills` ADD PRIMARY KEY (`id`), ADD KEY `job_skills_skill_id_foreign` (`skill_id`), ADD KEY `job_skills_job_id_foreign` (`job_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`), ADD KEY `password_resets_token_index` (`token`); -- -- Indexes for table `skills` -- ALTER TABLE `skills` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- Indexes for table `user_skills` -- ALTER TABLE `user_skills` ADD PRIMARY KEY (`id`), ADD KEY `user_skills_skill_id_foreign` (`skill_id`), ADD KEY `user_skills_user_id_foreign` (`user_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `applies` -- ALTER TABLE `applies` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46; -- -- AUTO_INCREMENT for table `bookmarks` -- ALTER TABLE `bookmarks` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `countries` -- ALTER TABLE `countries` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=240; -- -- AUTO_INCREMENT for table `country_links` -- ALTER TABLE `country_links` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=223; -- -- AUTO_INCREMENT for table `jobs` -- ALTER TABLE `jobs` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=121; -- -- AUTO_INCREMENT for table `job_skills` -- ALTER TABLE `job_skills` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=826; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `skills` -- ALTER TABLE `skills` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=93; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46; -- -- AUTO_INCREMENT for table `user_skills` -- ALTER TABLE `user_skills` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- Constraints for dumped tables -- -- -- Constraints for table `applies` -- ALTER TABLE `applies` ADD CONSTRAINT `applies_job_id_foreign` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `applies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `bookmarks` -- ALTER TABLE `bookmarks` ADD CONSTRAINT `bookmarks_job_id_foreign` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `bookmarks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `country_links` -- ALTER TABLE `country_links` ADD CONSTRAINT `country_link_counrty_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `country_link_job_id_foreign` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `country_link_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `jobs` -- ALTER TABLE `jobs` ADD CONSTRAINT `jobs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `job_skills` -- ALTER TABLE `job_skills` ADD CONSTRAINT `job_skills_job_id_foreign` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `job_skills_skill_id_foreign` FOREIGN KEY (`skill_id`) REFERENCES `skills` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `user_skills` -- ALTER TABLE `user_skills` ADD CONSTRAINT `user_skills_skill_id_foreign` FOREIGN KEY (`skill_id`) REFERENCES `skills` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `user_skills_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
66.331714
585
0.66911
0ae18eca419327f439c6453cdcf0d64875868510
318
cs
C#
Libraries/Invenio.Core/Domain/Criterias/Criteria.cs
ipetk0v/InvenioReportingSystem
1bcaedb249eb115c3474528d532ba0c2636506af
[ "MIT" ]
null
null
null
Libraries/Invenio.Core/Domain/Criterias/Criteria.cs
ipetk0v/InvenioReportingSystem
1bcaedb249eb115c3474528d532ba0c2636506af
[ "MIT" ]
null
null
null
Libraries/Invenio.Core/Domain/Criterias/Criteria.cs
ipetk0v/InvenioReportingSystem
1bcaedb249eb115c3474528d532ba0c2636506af
[ "MIT" ]
null
null
null
using Invenio.Core.Domain.Orders; namespace Invenio.Core.Domain.Criterias { public class Criteria : BaseEntity { public string Description { get; set; } public int OrderId { get; set; } public Order Order { get; set; } public CriteriaType CriteriaType { get; set; } } }
21.2
54
0.632075
f456d02792357b824902dff01efb1d96750c0513
4,038
ts
TypeScript
src/history.ts
gregzanch/cram
1be7cda92bafc1324332529b1a676edbc391fc63
[ "MIT" ]
22
2020-07-18T16:47:55.000Z
2022-03-14T09:26:09.000Z
src/history.ts
gregzanch/cram
1be7cda92bafc1324332529b1a676edbc391fc63
[ "MIT" ]
69
2021-01-08T08:57:56.000Z
2022-03-26T02:14:35.000Z
src/history.ts
gregzanch/cram
1be7cda92bafc1324332529b1a676edbc391fc63
[ "MIT" ]
2
2021-05-24T15:11:56.000Z
2022-01-19T14:08:01.000Z
import { uuid } from 'uuidv4'; export interface Directions { UNDO: "UNDO"; REDO: "REDO"; } export interface MomentProps{ recallFunction: (direction?: keyof Directions, ...args) => void; objectId: string; category: string; } export class Moment { uuid: string; objectId: string; category: string; timestamp: number; recallFunction: (...args) => void; constructor(props: MomentProps) { this.uuid = uuid(); this.objectId = props.objectId; this.category = props.category; this.recallFunction = props.recallFunction; this.timestamp = Date.now(); } } export class History { timeline: Moment[]; currentIndex: number; constructor() { this.timeline = [] as Moment[]; this.currentIndex = 0; } addMoment(params: MomentProps) { const { objectId, category, recallFunction } = params; if (this.timeline.length > 0 && this.currentIndex < this.timeline.length - 1) { this.timeline = this.timeline.slice(0, this.currentIndex); this.timeline.push(new Moment({ objectId, category, recallFunction })); this.currentIndex = this.timeline.length - 1; } else { this.timeline.push(new Moment({ objectId, category, recallFunction })); this.currentIndex = this.timeline.length - 1; } } undo() { if (this.currentIndex >= 0) { this.recall("UNDO"); this.currentIndex -= 1; } } redo() { if (this.currentIndex < this.timeline.length - 1) { this.currentIndex += 1; this.recall("REDO"); } } recall(direction: keyof Directions) { if (this.timeline[this.currentIndex]) { this.timeline[this.currentIndex].recallFunction(direction); } } clear() { this.timeline = []; this.currentIndex = 0; } get canUndo() { return this.currentIndex >= 0; } get canRedo() { return this.currentIndex < this.timeline.length - 1; } } export const history = new History(); export const addMoment = history.addMoment.bind(history); export interface Undoable { /** Undoes the command */ undo(): void; /** Redoes the undone command */ redo(): void; } export class UndoHistory { /** The undoable objects. */ private readonly undos: Array<Undoable>; /** The redoable objects. */ private readonly redos: Array<Undoable>; /** The maximal number of undo. */ private sizeMax: number; public constructor() { this.sizeMax = 0; this.undos = []; this.redos = []; this.sizeMax = 30; } /** Adds an undoable object to the collector. */ public add(undoable: Undoable): void { if (this.sizeMax > 0) { // Cleaning the oldest undoable object if (this.undos.length === this.sizeMax) { this.undos.shift(); } this.undos.push(undoable); // You must clear the redo stack! this.clearRedo(); } } private clearRedo(): void { if (this.redos.length > 0) { this.redos.length = 0; } } /** Undoes the last undoable object. */ public undo(): void { const undoable = this.undos.pop(); if (undoable !== undefined) { undoable.undo(); this.redos.push(undoable); } } /** Redoes the last undoable object. */ public redo(): void { const undoable = this.redos.pop(); if (undoable !== undefined) { undoable.redo(); this.undos.push(undoable); } } } type TextData = { text: string; } export class ClearTextCmd implements Undoable { // The memento that saves the previous state of the text data private memento!: string; public constructor(private text: TextData) { this.text = text; } // Executes the command public execute(): void { // Creating the memento this.memento = this.text.text; // Applying the changes (in many // cases do and redo are similar, but the memento creation) this.redo(); } public undo(): void { this.text.text = this.memento; } public redo(): void { this.text.text = ''; } }
22.943182
83
0.613175
25bee4222b92a658020655f6cdbd160c8984a99f
161
cs
C#
samples/core/Modeling/BulkConfiguration/Product.cs
meesaltena/EntityFramework.Docs
1b1bb6add2e362b1206f5390ceed6fd7731308bc
[ "CC-BY-4.0", "MIT" ]
1
2022-01-05T05:48:25.000Z
2022-01-05T05:48:25.000Z
samples/core/Modeling/BulkConfiguration/Product.cs
meesaltena/EntityFramework.Docs
1b1bb6add2e362b1206f5390ceed6fd7731308bc
[ "CC-BY-4.0", "MIT" ]
null
null
null
samples/core/Modeling/BulkConfiguration/Product.cs
meesaltena/EntityFramework.Docs
1b1bb6add2e362b1206f5390ceed6fd7731308bc
[ "CC-BY-4.0", "MIT" ]
null
null
null
namespace EFModeling.BulkConfiguration { public class Product { public int Id { get; set; } public Currency Price { get; set; } } }
17.888889
43
0.596273
0a9f8143cdc027f943f81b98f7984ea62b30e4c4
631
cs
C#
IndieGame/Assets/Scripts/Common/Permanentry/PermanentryCreater.cs
MSyun/IndieGame
6a95b1866c437bface72dae6beabc7fe60b6ebc0
[ "MIT" ]
null
null
null
IndieGame/Assets/Scripts/Common/Permanentry/PermanentryCreater.cs
MSyun/IndieGame
6a95b1866c437bface72dae6beabc7fe60b6ebc0
[ "MIT" ]
null
null
null
IndieGame/Assets/Scripts/Common/Permanentry/PermanentryCreater.cs
MSyun/IndieGame
6a95b1866c437bface72dae6beabc7fe60b6ebc0
[ "MIT" ]
null
null
null
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace MSyun.Common.Permanentry { using UnityEngine.SceneManagement; using Scene; using Input; public class PermanentryCreater : MonoBehaviour { [SerializeField] private InputType initializeInputType = InputType.System; private void Awake() { if (PermanentryManager.Instance != null) return; SceneManager.LoadScene((int)SceneName.Scene.PERMANENTRY, LoadSceneMode.Additive); } private void Start() { PermanentryManager.Instance.GameController.SetType(this.initializeInputType); Destroy(this.gameObject); } } }
22.535714
84
0.770206
1573f3bfea09e402997b495f423cdb4fb20b746c
498
rb
Ruby
app/mailers/user_mailer.rb
isorsa/rails-template
5be2f89cd2f10685f270408f109275a88d0963fc
[ "MIT" ]
null
null
null
app/mailers/user_mailer.rb
isorsa/rails-template
5be2f89cd2f10685f270408f109275a88d0963fc
[ "MIT" ]
null
null
null
app/mailers/user_mailer.rb
isorsa/rails-template
5be2f89cd2f10685f270408f109275a88d0963fc
[ "MIT" ]
null
null
null
class UserMailer < ApplicationMailer def email_confirmation @user = params[:user] mail(to: @user.email, subject: default_i18n_subject) end def forgot_password @user = params[:user] mail(to: @user.email, subject: default_i18n_subject) end def password_changed @user = params[:user] @activity = params[:activity] @ip = @activity.ip @city = @activity.city @country = @activity.country mail(to: @user.email, subject: default_i18n_subject) end end
22.636364
56
0.686747
3852d7723af1bde415c10f8b78aacc8de3dbc4b7
1,079
php
PHP
routes/api.php
abc123931/keiba_data_api
f8b16486eec4759406e64e567150922938288a02
[ "MIT" ]
null
null
null
routes/api.php
abc123931/keiba_data_api
f8b16486eec4759406e64e567150922938288a02
[ "MIT" ]
null
null
null
routes/api.php
abc123931/keiba_data_api
f8b16486eec4759406e64e567150922938288a02
[ "MIT" ]
null
null
null
<?php use Illuminate\Http\Request; /* |-------------------------------------------------------------------------- | API Routes |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | is assigned the "api" middleware group. Enjoy building your API! | */ Route::group(['middleware' => 'api'], function() { // Data用 Route::group(['prefix' => 'data'], function() { Route::get('/horse', 'data\HorseController@getHorseName'); Route::get('/race', 'data\RaceController@getRaceName'); Route::post('/graph/horse', 'data\HorseController@getDataGraph'); Route::post('/graph/race', 'data\RaceController@getDataGraph'); }); Route::post('/login', 'ApiAuthController@login'); Route::post('/register', 'ApiAuthController@postRegister'); Route::group(['middleware' => 'jwt.auth'], function() { Route::post('/show_name', 'ApiAuthController@showName'); }); });
33.71875
75
0.563485
b62782a0461b36113772fc8a3d690a4a4259af98
280
rb
Ruby
spec/dummy/db/migrate/20140103191601_add_email_back_to_user.rb
G5/devise_g5_authenticatable
0997fbf95e131afbf33af020e6e90e4097d4add2
[ "MIT" ]
2
2015-10-27T19:59:44.000Z
2016-02-23T14:55:39.000Z
spec/dummy/db/migrate/20140103191601_add_email_back_to_user.rb
G5/devise_g5_authenticatable
0997fbf95e131afbf33af020e6e90e4097d4add2
[ "MIT" ]
11
2015-01-08T19:26:09.000Z
2019-10-30T15:20:39.000Z
spec/dummy/db/migrate/20140103191601_add_email_back_to_user.rb
G5/devise_g5_authenticatable
0997fbf95e131afbf33af020e6e90e4097d4add2
[ "MIT" ]
3
2015-11-01T06:09:38.000Z
2016-10-05T18:22:03.000Z
# frozen_string_literal: true class AddEmailBackToUser < ActiveRecord::Migration[4.2] def change add_column :users, :email, :string, null: false, default: '' add_index :users, :email, unique: true end end
25.454545
55
0.560714
a329a82c8f2ccbff38c116aeeff2eafb7f0efd18
2,454
java
Java
flexmark-ext-toc/src/main/java/com/vladsch/flexmark/ext/toc/TocBlock.java
jvdvegt/flexmark-java
d4d18057f068fc522935c110a7dfc216ca4f52fc
[ "BSD-2-Clause" ]
null
null
null
flexmark-ext-toc/src/main/java/com/vladsch/flexmark/ext/toc/TocBlock.java
jvdvegt/flexmark-java
d4d18057f068fc522935c110a7dfc216ca4f52fc
[ "BSD-2-Clause" ]
1
2019-03-01T11:10:33.000Z
2019-03-04T08:19:08.000Z
flexmark-ext-toc/src/main/java/com/vladsch/flexmark/ext/toc/TocBlock.java
jvdvegt/flexmark-java
d4d18057f068fc522935c110a7dfc216ca4f52fc
[ "BSD-2-Clause" ]
null
null
null
package com.vladsch.flexmark.ext.toc; import com.vladsch.flexmark.util.sequence.BasedSequence; /** * A TOC node */ public class TocBlock extends TocBlockBase { protected BasedSequence openingMarker = BasedSequence.NULL; protected BasedSequence tocKeyword = BasedSequence.NULL; protected BasedSequence style = BasedSequence.NULL; protected BasedSequence closingMarker = BasedSequence.NULL; @Override public void getAstExtra(StringBuilder out) { segmentSpan(out, openingMarker, "openingMarker"); segmentSpan(out, tocKeyword, "tocKeyword"); segmentSpan(out, style, "style"); segmentSpan(out, closingMarker, "closingMarker"); } @Override public BasedSequence[] getSegments() { BasedSequence[] nodeSegments = new BasedSequence[]{openingMarker, tocKeyword, style, closingMarker}; if (lineSegments.size() == 0) return nodeSegments; BasedSequence[] allSegments = new BasedSequence[lineSegments.size() + nodeSegments.length]; lineSegments.toArray(allSegments); System.arraycopy(allSegments, 0, allSegments, nodeSegments.length, lineSegments.size()); return allSegments; } public TocBlock(BasedSequence chars) { this(chars, false); } public TocBlock(BasedSequence chars, boolean closingSimToc) { this(chars, null, closingSimToc); } public TocBlock(BasedSequence chars, BasedSequence styleChars) { this(chars, styleChars, false); } public TocBlock(BasedSequence chars, BasedSequence styleChars, boolean closingSimToc) { super(chars); openingMarker = chars.subSequence(0, 1); tocKeyword = chars.subSequence(1, 4); if (styleChars != null) { style = styleChars; } int closingPos = chars.indexOf(']', 4); if (closingSimToc && !(closingPos != -1 && closingPos + 1 < chars.length() && chars.charAt(closingPos + 1) == ':')) { throw new IllegalStateException("Invalid TOC block sequence"); } closingMarker = chars.subSequence(closingPos, closingPos + (closingSimToc ? 2 : 1)); } public BasedSequence getOpeningMarker() { return openingMarker; } public BasedSequence getTocKeyword() { return tocKeyword; } public BasedSequence getStyle() { return style; } public BasedSequence getClosingMarker() { return closingMarker; } }
33.162162
125
0.668297
388ac86bf3673467ad620f4cd04731585dd13d88
981
php
PHP
assets/QaAsset.php
LitterPapmasa/qa.yii
0f8cd7010cfd2a98595a55e58616fcef8ff4bc82
[ "BSD-3-Clause" ]
null
null
null
assets/QaAsset.php
LitterPapmasa/qa.yii
0f8cd7010cfd2a98595a55e58616fcef8ff4bc82
[ "BSD-3-Clause" ]
null
null
null
assets/QaAsset.php
LitterPapmasa/qa.yii
0f8cd7010cfd2a98595a55e58616fcef8ff4bc82
[ "BSD-3-Clause" ]
null
null
null
<?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace app\assets; use yii\web\AssetBundle; /** * @author Qiang Xue <[email protected]> * @since 2.0 */ class QaAsset extends AssetBundle { public $basePath = '@webroot'; public $baseUrl = '@web'; public $css = [ 'images/favicon.png?v=1.0', 'css/bootstrap.min.css?v=1.0', 'css/bootstrap-social.css?v=1.0', 'css/style.css?v=1.0', 'css/font-awesome.min.css?v=1.0', ]; public $js = [ 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js?v=1.0', 'js/menu.js?v=1.0', //'js/menu-highlight.js?v=1.0', 'js/contacts.js?v=1.0', 'js/jquery.form.validation.js?v=1.0', 'js/modal.js?v=1.0', 'js/faq.js?v=1.0', 'js/feedback-rating.js?v=1.0', 'js/footer/carousel.js', ]; public $jsOptions = [ 'position' => \yii\web\View::POS_HEAD ]; public $depends = [ ]; }
20.87234
77
0.615698
b0c4d4953970b9a057d89ec9ae6bd9458f2f551c
915
py
Python
account_report/config/account_report.py
dineshpanchal93/helpremove
37e03e922645d52a7bc5d293fa936b0b82017715
[ "MIT" ]
null
null
null
account_report/config/account_report.py
dineshpanchal93/helpremove
37e03e922645d52a7bc5d293fa936b0b82017715
[ "MIT" ]
null
null
null
account_report/config/account_report.py
dineshpanchal93/helpremove
37e03e922645d52a7bc5d293fa936b0b82017715
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Sanket"), "items": [ { "type": "doctype", "name": "Test", "description": _("For Test.") }, { "type": "doctype", "name": "overtime", "description": _("For Test.") } ] }, { "label": _("Accounts Report"), "items": [ { "type": "report", "name":"sanket", "doctype": "Test", "is_query_report": True, }, ] }, { "label": _("Help"), "icon": "fa fa-facetime-video", "items": [ { "type": "help", "label": _("Chart of Accounts"), "youtube_id": "DyR-DST-PyA" }, { "type": "help", "label": _("Opening Accounting Balance"), "youtube_id": "kdgM20Q-q68" }, { "type": "help", "label": _("Setting up Taxes"), "youtube_id": "nQ1zZdPgdaQ" } ] } ]
16.636364
46
0.473224
6362913f2e1a0690259b4b5bdf4153120d4d3123
6,883
sql
SQL
EMR/usr/share/nginx/html/interface/forms/ros/table.sql
chandanchowdhury/ISUCDC2017
f6cb2ded82f45d8def30f28313157540cbf0cb6c
[ "Apache-2.0" ]
null
null
null
EMR/usr/share/nginx/html/interface/forms/ros/table.sql
chandanchowdhury/ISUCDC2017
f6cb2ded82f45d8def30f28313157540cbf0cb6c
[ "Apache-2.0" ]
null
null
null
EMR/usr/share/nginx/html/interface/forms/ros/table.sql
chandanchowdhury/ISUCDC2017
f6cb2ded82f45d8def30f28313157540cbf0cb6c
[ "Apache-2.0" ]
null
null
null
CREATE TABLE `form_ros` ( `id` int(11) NOT NULL auto_increment, `pid` int(11) NOT NULL, `activity` int(11) NOT NULL default '1', `date` datetime default NULL, `weight_change` varchar(3) NOT NULL default 'N/A', `weakness` varchar(3) NOT NULL default 'N/A', `fatigue` varchar(3) NOT NULL default 'N/A', `anorexia` varchar(3) NOT NULL default 'N/A', `fever` varchar(3) NOT NULL default 'N/A', `chills` varchar(3) NOT NULL default 'N/A', `night_sweats` varchar(3) NOT NULL default 'N/A', `insomnia` varchar(3) NOT NULL default 'N/A', `irritability` varchar(3) NOT NULL default 'N/A', `heat_or_cold` varchar(3) NOT NULL default 'N/A', `intolerance` varchar(3) NOT NULL default 'N/A', `change_in_vision` varchar(3) NOT NULL default 'N/A', `glaucoma_history` varchar(3) NOT NULL default 'N/A', `eye_pain` varchar(3) NOT NULL default 'N/A', `irritation` varchar(3) NOT NULL default 'N/A', `redness` varchar(3) NOT NULL default 'N/A', `excessive_tearing` varchar(3) NOT NULL default 'N/A', `double_vision` varchar(3) NOT NULL default 'N/A', `blind_spots` varchar(3) NOT NULL default 'N/A', `photophobia` varchar(3) NOT NULL default 'N/A', `hearing_loss` varchar(3) NOT NULL default 'N/A', `discharge` varchar(3) NOT NULL default 'N/A', `pain` varchar(3) NOT NULL default 'N/A', `vertigo` varchar(3) NOT NULL default 'N/A', `tinnitus` varchar(3) NOT NULL default 'N/A', `frequent_colds` varchar(3) NOT NULL default 'N/A', `sore_throat` varchar(3) NOT NULL default 'N/A', `sinus_problems` varchar(3) NOT NULL default 'N/A', `post_nasal_drip` varchar(3) NOT NULL default 'N/A', `nosebleed` varchar(3) NOT NULL default 'N/A', `snoring` varchar(3) NOT NULL default 'N/A', `apnea` varchar(3) NOT NULL default 'N/A', `breast_mass` varchar(3) NOT NULL default 'N/A', `breast_discharge` varchar(3) NOT NULL default 'N/A', `biopsy` varchar(3) NOT NULL default 'N/A', `abnormal_mammogram` varchar(3) NOT NULL default 'N/A', `cough` varchar(3) NOT NULL default 'N/A', `sputum` varchar(3) NOT NULL default 'N/A', `shortness_of_breath` varchar(3) NOT NULL default 'N/A', `wheezing` varchar(3) NOT NULL default 'N/A', `hemoptsyis` varchar(3) NOT NULL default 'N/A', `asthma` varchar(3) NOT NULL default 'N/A', `copd` varchar(3) NOT NULL default 'N/A', `chest_pain` varchar(3) NOT NULL default 'N/A', `palpitation` varchar(3) NOT NULL default 'N/A', `syncope` varchar(3) NOT NULL default 'N/A', `pnd` varchar(3) NOT NULL default 'N/A', `doe` varchar(3) NOT NULL default 'N/A', `orthopnea` varchar(3) NOT NULL default 'N/A', `peripheal` varchar(3) NOT NULL default 'N/A', `edema` varchar(3) NOT NULL default 'N/A', `legpain_cramping` varchar(3) NOT NULL default 'N/A', `history_murmur` varchar(3) NOT NULL default 'N/A', `arrythmia` varchar(3) NOT NULL default 'N/A', `heart_problem` varchar(3) NOT NULL default 'N/A', `dysphagia` varchar(3) NOT NULL default 'N/A', `heartburn` varchar(3) NOT NULL default 'N/A', `bloating` varchar(3) NOT NULL default 'N/A', `belching` varchar(3) NOT NULL default 'N/A', `flatulence` varchar(3) NOT NULL default 'N/A', `nausea` varchar(3) NOT NULL default 'N/A', `vomiting` varchar(3) NOT NULL default 'N/A', `hematemesis` varchar(3) NOT NULL default 'N/A', `gastro_pain` varchar(3) NOT NULL default 'N/A', `food_intolerance` varchar(3) NOT NULL default 'N/A', `hepatitis` varchar(3) NOT NULL default 'N/A', `jaundice` varchar(3) NOT NULL default 'N/A', `hematochezia` varchar(3) NOT NULL default 'N/A', `changed_bowel` varchar(3) NOT NULL default 'N/A', `diarrhea` varchar(3) NOT NULL default 'N/A', `constipation` varchar(3) NOT NULL default 'N/A', `polyuria` varchar(3) NOT NULL default 'N/A', `polydypsia` varchar(3) NOT NULL default 'N/A', `dysuria` varchar(3) NOT NULL default 'N/A', `hematuria` varchar(3) NOT NULL default 'N/A', `frequency` varchar(3) NOT NULL default 'N/A', `urgency` varchar(3) NOT NULL default 'N/A', `incontinence` varchar(3) NOT NULL default 'N/A', `renal_stones` varchar(3) NOT NULL default 'N/A', `utis` varchar(3) NOT NULL default 'N/A', `hesitancy` varchar(3) NOT NULL default 'N/A', `dribbling` varchar(3) NOT NULL default 'N/A', `stream` varchar(3) NOT NULL default 'N/A', `nocturia` varchar(3) NOT NULL default 'N/A', `erections` varchar(3) NOT NULL default 'N/A', `ejaculations` varchar(3) NOT NULL default 'N/A', `g` varchar(3) NOT NULL default 'N/A', `p` varchar(3) NOT NULL default 'N/A', `ap` varchar(3) NOT NULL default 'N/A', `lc` varchar(3) NOT NULL default 'N/A', `mearche` varchar(3) NOT NULL default 'N/A', `menopause` varchar(3) NOT NULL default 'N/A', `lmp` varchar(3) NOT NULL default 'N/A', `f_frequency` varchar(3) NOT NULL default 'N/A', `f_flow` varchar(3) NOT NULL default 'N/A', `f_symptoms` varchar(3) NOT NULL default 'N/A', `abnormal_hair_growth` varchar(3) NOT NULL default 'N/A', `f_hirsutism` varchar(3) NOT NULL default 'N/A', `joint_pain` varchar(3) NOT NULL default 'N/A', `swelling` varchar(3) NOT NULL default 'N/A', `m_redness` varchar(3) NOT NULL default 'N/A', `m_warm` varchar(3) NOT NULL default 'N/A', `m_stiffness` varchar(3) NOT NULL default 'N/A', `muscle` varchar(3) NOT NULL default 'N/A', `m_aches` varchar(3) NOT NULL default 'N/A', `fms` varchar(3) NOT NULL default 'N/A', `arthritis` varchar(3) NOT NULL default 'N/A', `loc` varchar(3) NOT NULL default 'N/A', `seizures` varchar(3) NOT NULL default 'N/A', `stroke` varchar(3) NOT NULL default 'N/A', `tia` varchar(3) NOT NULL default 'N/A', `n_numbness` varchar(3) NOT NULL default 'N/A', `n_weakness` varchar(3) NOT NULL default 'N/A', `paralysis` varchar(3) NOT NULL default 'N/A', `intellectual_decline` varchar(3) NOT NULL default 'N/A', `memory_problems` varchar(3) NOT NULL default 'N/A', `dementia` varchar(3) NOT NULL default 'N/A', `n_headache` varchar(3) NOT NULL default 'N/A', `s_cancer` varchar(3) NOT NULL default 'N/A', `psoriasis` varchar(3) NOT NULL default 'N/A', `s_acne` varchar(3) NOT NULL default 'N/A', `s_other` varchar(3) NOT NULL default 'N/A', `s_disease` varchar(3) NOT NULL default 'N/A', `p_diagnosis` varchar(3) NOT NULL default 'N/A', `p_medication` varchar(3) NOT NULL default 'N/A', `depression` varchar(3) NOT NULL default 'N/A', `anxiety` varchar(3) NOT NULL default 'N/A', `social_difficulties` varchar(3) NOT NULL default 'N/A', `thyroid_problems` varchar(3) NOT NULL default 'N/A', `diabetes` varchar(3) NOT NULL default 'N/A', `abnormal_blood` varchar(3) NOT NULL default 'N/A', `anemia` varchar(3) NOT NULL default 'N/A', `fh_blood_problems` varchar(3) NOT NULL default 'N/A', `bleeding_problems` varchar(3) NOT NULL default 'N/A', `allergies` varchar(3) NOT NULL default 'N/A', `frequent_illness` varchar(3) NOT NULL default 'N/A', `hiv` varchar(3) NOT NULL default 'N/A', `hai_status` varchar(3) NOT NULL default 'N/A', PRIMARY KEY (id) ) ENGINE=InnoDB;
46.823129
58
0.690106
a322b88fb551bb800cb11c99ef6df9411fd0a297
5,336
java
Java
src/main/java/com/janeli/pay/common/Common.java
janeli90/pay
5bbba529f5024e783ce5ce8eb9d4ca2366c7f7d5
[ "Apache-2.0" ]
3
2019-06-13T07:11:02.000Z
2020-02-26T07:35:53.000Z
src/main/java/com/janeli/pay/common/Common.java
janeli90/pay
5bbba529f5024e783ce5ce8eb9d4ca2366c7f7d5
[ "Apache-2.0" ]
null
null
null
src/main/java/com/janeli/pay/common/Common.java
janeli90/pay
5bbba529f5024e783ce5ce8eb9d4ca2366c7f7d5
[ "Apache-2.0" ]
null
null
null
package com.janeli.pay.common; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import org.apache.http.client.config.RequestConfig; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; /** * @author gaogang * @ClassName: Common * @Description: 公共类 * @date 2016年7月12日 下午4:03:46 */ public class Common { public static final int PAGE_SIZE_DEFAULT = 10;//每页条数 public static final int DECIMAL_ROUNDING = BigDecimal.ROUND_HALF_UP; //平台四舍五入的方式 public static final String RSP_CODE = "resCode";//返回码 public static final String RSP_MSG = "resMsg";//返回消息 public final static String DES_KEY = "zxhk123321";//DES加密字符串 public static final String RSP_CODE_VALUE = "0000";//返回码 public static final String SUCCESS_CODE = "SUCCESS";//返回码 public static final String FAIL_CODE = "FAIL";//返回码 /** * @param message * @throws * @Title: successJsonString * @Description: TODO(操作成功返回结果) * @return:Map 返回类型 */ public static String successJsonString(String message) { Map result = new HashMap(); result.put(RSP_CODE, SUCCESS_CODE); result.put(RSP_MSG, message); return JSONArray.toJSON(result).toString(); } public static Map<String, Object> successMap(String message) { Map<String, Object> result = new HashMap(); result.put(RSP_CODE, SUCCESS_CODE); result.put(RSP_MSG, message); return result; } public static Map<String, Object> returnMap(String message, String code) { Map<String, Object> result = new HashMap(); result.put(RSP_CODE, code); result.put(RSP_MSG, message); return result; } /** * @param message * @throws * @Title: successPutMap * @Description: TODO(操作成功返回结果) * @return:Map 返回类型 */ public static void successPutMap(JSONObject map, String message) { map.put(RSP_CODE, SUCCESS_CODE); map.put(RSP_MSG, message); } public static void successPutMap(Map<String, Object> map, String message) { map.put(RSP_CODE, SUCCESS_CODE); map.put(RSP_MSG, message); } public static void errPutMap(Map<String, Object> map, String message) { map.put(RSP_CODE,FAIL_CODE ); map.put(RSP_MSG, message); } public static void main(String[] args) { BigDecimal rebAmt = new BigDecimal("111.00").multiply(new BigDecimal("0.05").divide(new BigDecimal("100"), 5, Common.DECIMAL_ROUNDING)).setScale(2, Common.DECIMAL_ROUNDING); System.out.println(rebAmt); Map result = new HashMap(); result.put(RSP_CODE, SUCCESS_CODE); result.put(RSP_MSG, "test1"); System.out.println(JSONArray.toJSON(result)); System.out.println(JSONObject.toJSON(result)); String json = JSONObject.toJSON(result).toString(); JSONObject test1 = JSONObject.parseObject(json); System.out.println(test1.getString(RSP_CODE)); JSONObject test2 = JSONObject.parseObject(json); System.out.println(test2.getString(RSP_MSG)); String relAuthFlag = "0"; JSONObject outPut = new JSONObject(); outPut.put("relAuthFlag", relAuthFlag); Common.successPutMap(outPut, "验证成功!"); System.out.println(outPut); } /** * @param message * @throws * @Title: errorJsonString * @Description: TODO(操作失败返回结果) * @return:Map 返回类型 */ public static String errorJsonString(String message) { Map result = new HashMap(); result.put(RSP_CODE, FAIL_CODE); result.put(RSP_MSG, message); return JSONArray.toJSON(result).toString(); } /** * @param message * @throws * @Title: errorMap * @Description: TODO(操作失败返回结果) * @return:Map 返回类型 */ public static Map<String, Object> errorMap(String message) { Map<String, Object> result = new HashMap(); result.put(RSP_CODE, FAIL_CODE); result.put(RSP_MSG, message); return result; } /** * @param message * @throws * @Title: errorMap * @Description: TODO(操作失败返回结果) * @return:Map 返回类型 */ public static Map<String, Object> errorMap(String message, String resCode) { Map<String, Object> result = new HashMap(); result.put(RSP_CODE, FAIL_CODE); result.put(RSP_MSG, message); return result; } /** * @param message * @throws * @Title: errorJsonString * @Description: TODO(操作失败返回结果) * @return:Map 返回类型 */ public static String errorJsonString(String message, String resCode) { Map result = new HashMap(); result.put(RSP_CODE, resCode); result.put(RSP_MSG, message); return JSONArray.toJSON(result).toString(); } /** * http4.3设置超时时间 4.3版本不设置超时的话,一旦服务器没有响应,等待时间N久(>24小时) */ public static RequestConfig requestConfig = RequestConfig.custom() .setSocketTimeout(45000) .setConnectTimeout(30000) .setConnectionRequestTimeout(60000) .build(); public static RequestConfig sendUnderReqCfg = RequestConfig.custom() .setSocketTimeout(50000) .setConnectTimeout(50000) .setConnectionRequestTimeout(50000) .build(); }
31.388235
150
0.637369
5461065cbd8149c66050cdb6cc822a7d88ccec78
1,523
rb
Ruby
hive_plot.rb
maxdemarzi/hive_plot
f53feeb88db2ba019cf99ac23d8ac4697a9d0cce
[ "MIT" ]
2
2015-11-05T00:39:08.000Z
2018-08-08T15:31:07.000Z
hive_plot.rb
maxdemarzi/hive_plot
f53feeb88db2ba019cf99ac23d8ac4697a9d0cce
[ "MIT" ]
null
null
null
hive_plot.rb
maxdemarzi/hive_plot
f53feeb88db2ba019cf99ac23d8ac4697a9d0cce
[ "MIT" ]
null
null
null
require 'rubygems' require 'neography' require 'sinatra' require 'uri' require 'json' def wroterepos(language) neo = Neography::Rest.new neo.execute_script("m = [:] g.V.filter{it.type == 'language' && it.name == '#{language}'}.in.transform{m[it.name] = it.in('wrote').gather{it.name}.next()}.iterate() m") end def forkedrepos(language) neo = Neography::Rest.new neo.execute_script("m = [:] g.V.filter{it.type == 'language' && it.name == '#{language}'}.in.transform{m[it.name] = it.in('forked').gather{it.name}.next()}.iterate() m") end get '/hive/:name' do repos = [] writers = [] forkers = [] temp_forkers = [] temp_writers = [] wroterepos(params[:name]).each_pair do |key, value| repos << {"name" => key, "imports" => value, "node_type" => "repo"} temp_writers << { "name" => value[0] } end i = 0 forkedrepos(params[:name]).each_pair do |key, value| repos[i]["imports"] = repos[i]["imports"] + value temp_writers[i]["imports"] = value temp_forkers << value i += 1 end temp_writers.group_by {|i| i["name"]}.each do |w, f| writers << {"name" => w, "imports" => f.collect{|y| y["imports"]}.flatten.uniq, "node_type" => "worker"} end temp_forkers.flatten.uniq.delete_if{|x| writers.collect{|y| y["name"]}.include?(x)}.each do |f| forkers << {"name" => f, "imports" => [], "node_type" => "forker"} end (repos + writers + forkers).to_json end
30.46
159
0.573867
43fc0dbfb964b1e830995f47e2470952216d6b9a
407
ts
TypeScript
src/organisms/Carousel/carousel-types.ts
jemnon/woy
634f80bba0e1b73706344a780b22441f4a140fa6
[ "MIT" ]
null
null
null
src/organisms/Carousel/carousel-types.ts
jemnon/woy
634f80bba0e1b73706344a780b22441f4a140fa6
[ "MIT" ]
3
2020-02-14T07:14:12.000Z
2020-02-14T07:14:13.000Z
src/organisms/Carousel/carousel-types.ts
jemnon/woy
634f80bba0e1b73706344a780b22441f4a140fa6
[ "MIT" ]
null
null
null
export type Easing = 'ease' | 'ease-in-out' | 'ease-in' | 'ease-out' | 'linear'; export interface CarouselContentProps { easing?: Easing; transitionDuration?: string; xPos?: number; h?: number; w?: number; } export interface CarouselDotProps { isCurrent: boolean; } type Direction = 'left' | 'right'; export interface CarouselButtonProps { direction?: Direction; isDisabled?: boolean; }
19.380952
80
0.690418
690959dd3373c582034c02673a488a884871a8a3
531
rb
Ruby
spec/views/invite_requests/edit.html.haml_spec.rb
l85m/trym
83f45ed65c52f21e138f1793d1d42ab5b4ec4206
[ "MIT" ]
1
2015-04-10T13:04:11.000Z
2015-04-10T13:04:11.000Z
spec/views/invite_requests/edit.html.haml_spec.rb
demosophy/trym
83f45ed65c52f21e138f1793d1d42ab5b4ec4206
[ "MIT" ]
null
null
null
spec/views/invite_requests/edit.html.haml_spec.rb
demosophy/trym
83f45ed65c52f21e138f1793d1d42ab5b4ec4206
[ "MIT" ]
1
2016-08-23T10:37:57.000Z
2016-08-23T10:37:57.000Z
require 'spec_helper' describe "invite_requests/edit" do before(:each) do @invite_request = assign(:invite_request, stub_model(InviteRequest, :email => "MyString" )) end it "renders the edit invite_request form" do render # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "form[action=?][method=?]", invite_request_path(@invite_request), "post" do assert_select "input#invite_request_email[name=?]", "invite_request[email]" end end end
27.947368
93
0.709981
2fd9ee56fb59532b91081e841a1da3f8dc5e9a45
1,196
py
Python
mycode/main.py
catsled/FCN_pytorch
951a40acb1328e464014b1fb8b59e9bbc2a60371
[ "MIT" ]
null
null
null
mycode/main.py
catsled/FCN_pytorch
951a40acb1328e464014b1fb8b59e9bbc2a60371
[ "MIT" ]
null
null
null
mycode/main.py
catsled/FCN_pytorch
951a40acb1328e464014b1fb8b59e9bbc2a60371
[ "MIT" ]
null
null
null
from utils.myloader import MyLoader from utils.imageshow import func_showImage, func_rearrangeRGB from models import FCNs from config import * from torch.utils.data import DataLoader import torchvision.transforms as T import torch.optim as optim import torch.nn as nn import torch import matplotlib.pyplot as plt transforms = T.Compose([ T.ToTensor(), ]) trainset = MyLoader(path_src="../data/camseq01", path_label="../data/mask", transforms=transforms) trainloader = DataLoader(trainset, num_workers=1, batch_size=1, shuffle=True) train_iter = iter(trainloader) net = FCNs().cuda() optimizer = optim.Adam(net.parameters(), lr=1e-2) loss_fn = nn.BCEWithLogitsLoss() for epoch in range(10): for idx, (img, label) in enumerate(train_iter): img = img.cuda() label = label.cuda() out = net(img) optimizer.zero_grad() loss = loss_fn(out, label) loss.backward() optimizer.step() if idx % 50 == 0 and idx != 0: l = out[0][6].detach().cpu().numpy() plt.imshow(l) plt.show() print("Loss: %.6f" % loss) train_iter = iter(trainloader) torch.save(net.state_dict(), PATH)
24.408163
98
0.661371
b08040596130c20ea8a477bfe18121e9774a62ef
2,827
py
Python
labby/cli/commands/device_info.py
luizribeiro/tdklambda
94f0920da9eb2a58ef201864826b656158894dd6
[ "MIT" ]
null
null
null
labby/cli/commands/device_info.py
luizribeiro/tdklambda
94f0920da9eb2a58ef201864826b656158894dd6
[ "MIT" ]
99
2020-08-09T15:46:19.000Z
2022-03-26T15:30:26.000Z
labby/cli/commands/device_info.py
luizribeiro/tdklambda
94f0920da9eb2a58ef201864826b656158894dd6
[ "MIT" ]
1
2020-10-30T20:46:43.000Z
2020-10-30T20:46:43.000Z
from typing import List, Tuple from pyre_extensions import none_throws from wasabi import color, msg, Printer from labby.cli.core import BaseArgumentParser, Command from labby.hw.core import DeviceType from labby.hw.core.power_supply import PowerSupplyMode from labby.server.requests.device_info import DeviceInfoResponse, PowerSupplyInfo render = Printer(no_print=True) # pyre-ignore[13]: device_name is unitialized class DeviceInfoArguments(BaseArgumentParser): device_name: str def add_arguments(self) -> None: self.add_argument("device_name") class DeviceInfoCommand(Command[DeviceInfoArguments]): TRIGGER: str = "device-info" def _get_power_supply_info( self, power_supply: PowerSupplyInfo ) -> List[Tuple[str, str]]: info: List[Tuple[str, str]] = [] info.append( ( "Status", render.text("● ON", color="green") if power_supply.is_output_on else render.text("● OFF", color="grey"), ) ) info.append( ( "Mode", "Constant Current" if power_supply.mode == PowerSupplyMode.CONSTANT_CURRENT else "Constant Voltage", ) ) info.append(("Target Voltage", f"{power_supply.target_voltage:.2f}V")) info.append(("Actual Voltage", f"{power_supply.actual_voltage:.2f}V")) info.append(("Target Current", f"{power_supply.target_current:.2f}A")) info.append(("Actual Current", f"{power_supply.actual_current:.2f}A")) return info def _render_device_info(self, device: DeviceInfoResponse) -> List[Tuple[str, str]]: if device.device_type == DeviceType.POWER_SUPPLY: return self._get_power_supply_info(none_throws(device.power_supply_info)) raise Exception(f"Unknown device type {type(device)}") def main(self, args: DeviceInfoArguments) -> int: device_info = self.get_client().device_info(args.device_name) if device_info.device_type is None: msg.fail( f"Unknown device {args.device_name}", text="See `labby devices` for a list of available devices.", ) return 1 msg.divider(f"{args.device_name} (device_info.device_type.friendly_name)") if device_info.is_connected: msg.table( [ ("Connection", render.good("OK")), *self._render_device_info(device_info), ] ) else: msg.table([("Connection", render.fail("Error"))]) msg.text( f"{color(device_info.error_type, bold=True)}: " + f"{device_info.error_message}" ) return 0
32.125
87
0.60382
72136f7a93328612cc0c23788bbd0109399d5457
255
swift
Swift
Candy/Classes/Modules/Video/Page/Model/VideoCategory.swift
InsectQY/Candy
065a06be8457319f492b9397c668430a9eef12da
[ "Apache-2.0" ]
56
2019-06-06T07:28:01.000Z
2022-02-21T07:20:52.000Z
Candy/Classes/Modules/Video/Page/Model/VideoCategory.swift
InsectQY/Candy
065a06be8457319f492b9397c668430a9eef12da
[ "Apache-2.0" ]
4
2020-08-13T06:26:16.000Z
2021-05-19T08:35:24.000Z
Candy/Classes/Modules/Video/Page/Model/VideoCategory.swift
InsectQY/Candy
065a06be8457319f492b9397c668430a9eef12da
[ "Apache-2.0" ]
12
2019-06-06T09:11:42.000Z
2021-11-08T17:07:12.000Z
// // VideoCategory.swift // QYNews // // Created by Insect on 2018/12/5. // Copyright © 2018 Insect. All rights reserved. // import Foundation struct VideoCategory: Codable, Equatable { let category: String /// 分类名称 let name: String }
15
49
0.662745
a8de0f2f56f9b7aea45a3ad9ca92083d173f778c
2,157
rs
Rust
src/dielectric.rs
dguenther/pathtracer
6ca7cf9777abfa758f2b533d069cbb8f4161af47
[ "MIT" ]
null
null
null
src/dielectric.rs
dguenther/pathtracer
6ca7cf9777abfa758f2b533d069cbb8f4161af47
[ "MIT" ]
null
null
null
src/dielectric.rs
dguenther/pathtracer
6ca7cf9777abfa758f2b533d069cbb8f4161af47
[ "MIT" ]
null
null
null
use crate::hit; use crate::material; use crate::ray; use crate::vec3; use rand::prelude::*; #[derive(Clone)] pub struct Dielectric { pub ref_idx: f64, } fn schlick(cosine: f64, ref_idx: f64) -> f64 { let mut r0 = (1.0 - ref_idx) / (1.0 + ref_idx); r0 = r0*r0; r0 + (1.0 - r0) * (1.0 - cosine).powi(5) } fn reflect(v: &vec3::Vec3, n: &vec3::Vec3) -> vec3::Vec3 { *v - 2.0 * v.dot(n) * *n } fn refract(v: &vec3::Vec3, n: &vec3::Vec3, ni_over_nt: f64) -> Option<vec3::Vec3> { let uv = v.unit_vector(); let dt = uv.dot(n); let discriminant = 1.0 - ni_over_nt*ni_over_nt*(1.0-dt*dt); if discriminant > 0.0 { return Some(ni_over_nt*(uv - *n * dt) - *n * discriminant.sqrt()); } else { return None; } } impl material::Material for Dielectric { fn scatter(&self, r_in: &ray::Ray, rec: &hit::HitRecord, attenuation: &mut vec3::Vec3, scattered: &mut ray::Ray) -> bool { let outward_normal; let ni_over_nt; let cosine; let reflect_prob; let reflected = reflect(&r_in.direction(), &rec.normal); *attenuation = vec3::Vec3::new(1.0, 1.0, 1.0); if r_in.direction().dot(&rec.normal) > 0.0 { outward_normal = -rec.normal; ni_over_nt = self.ref_idx; cosine = self.ref_idx * r_in.direction().dot(&rec.normal) / r_in.direction().length(); } else { outward_normal = rec.normal; ni_over_nt = 1.0 / self.ref_idx; cosine = -r_in.direction().dot(&rec.normal) / r_in.direction().length(); } let mut refracted = vec3::Vec3::new(1.0, 1.0, 0.0); if let Some(val) = refract(&r_in.direction(), &outward_normal, ni_over_nt) { reflect_prob = schlick(cosine, self.ref_idx); refracted = val; } else { reflect_prob = 1.0; } if random::<f64>() < reflect_prob { *scattered = ray::Ray { A: rec.p, B: reflected }; } else { *scattered = ray::Ray { A: rec.p, B: refracted }; } return true; } }
29.547945
126
0.534539
ed8dbc9132847a0b6dc0a5a7a6b18758324dc042
1,581
sql
SQL
db/angular.sql
chetan4651/angular-seed
f85fb81a8c218497d90c8ba3fba881ba10b59138
[ "Apache-2.0" ]
null
null
null
db/angular.sql
chetan4651/angular-seed
f85fb81a8c218497d90c8ba3fba881ba10b59138
[ "Apache-2.0" ]
null
null
null
db/angular.sql
chetan4651/angular-seed
f85fb81a8c218497d90c8ba3fba881ba10b59138
[ "Apache-2.0" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 02, 2016 at 02:27 PM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `angular` -- -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE IF NOT EXISTS `user` ( `user_id` int(11) NOT NULL, `user_name` varchar(50) NOT NULL, `user_email` varchar(50) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`user_id`, `user_name`, `user_email`) VALUES (1, 'chetan', '[email protected]'), (34, 'a', '[email protected]'), (36, 'dinesh', '[email protected]'), (37, 'balaji', '[email protected]'), (38, 'akshay', '[email protected]'); -- -- Indexes for dumped tables -- -- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`user_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=39; /*!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 */;
23.25
67
0.671727
144e403a9cb1ea00a50a112bbe3d02a299b17339
321
swift
Swift
Raiblocks/Extensions/Double+Extensions.swift
schenkty/nano-wallet-ios
8d380c5b5d992396123645da888d27bf4b01048c
[ "BSD-2-Clause" ]
41
2018-06-21T17:41:11.000Z
2021-02-04T10:33:30.000Z
Raiblocks/Extensions/Double+Extensions.swift
schenkty/nano-wallet-ios
8d380c5b5d992396123645da888d27bf4b01048c
[ "BSD-2-Clause" ]
24
2018-06-21T19:58:54.000Z
2020-10-12T15:32:50.000Z
Raiblocks/Extensions/Double+Extensions.swift
schenkty/nano-wallet-ios
8d380c5b5d992396123645da888d27bf4b01048c
[ "BSD-2-Clause" ]
27
2018-06-21T17:50:09.000Z
2021-06-02T16:57:58.000Z
// // Double+Extensions.swift // Nano // // Created by Zack Shapiro on 2/25/18. // Copyright © 2018 Nano Wallet Company. All rights reserved. // extension Double { /// Turns 0.056 into 0.6 and 0.054 into 0.5 mutating func roundTo2f() -> Double { return Double(Darwin.round(100 * self)/100) } }
18.882353
62
0.629283
b1abfa78e20a23514556803232c30e2f86d87a48
5,833
py
Python
examples/contact_mesh_on_mesh/TwoBodyContact.py
btalamini/optimism
023e1b2a0b137900a7517e4c7ac5056255cf7bbe
[ "MIT" ]
null
null
null
examples/contact_mesh_on_mesh/TwoBodyContact.py
btalamini/optimism
023e1b2a0b137900a7517e4c7ac5056255cf7bbe
[ "MIT" ]
1
2022-03-12T00:01:12.000Z
2022-03-12T00:01:12.000Z
examples/contact_mesh_on_mesh/TwoBodyContact.py
btalamini/optimism
023e1b2a0b137900a7517e4c7ac5056255cf7bbe
[ "MIT" ]
3
2021-12-23T19:53:31.000Z
2022-03-27T23:12:03.000Z
from matplotlib import pyplot as plt from optimism.JaxConfig import * from optimism import EquationSolver as EqSolver from optimism import Mesh from optimism import Mechanics from optimism import FunctionSpace from optimism.Mesh import EssentialBC from optimism.Mesh import DofManager from optimism import Objective from optimism.ConstrainedObjective import ConstrainedObjective from optimism.ConstrainedObjective import ConstrainedQuasiObjective from optimism import QuadratureRule from optimism import SparseMatrixAssembler from optimism.Timer import Timer from optimism import VTKWriter from optimism import AlSolver from optimism.test.MeshFixture import MeshFixture from optimism.contact import Contact from optimism import Surface smoothingDistance = 1e-4 closest_distance_func = Contact.compute_closest_distance_to_each_side settings = EqSolver.get_settings(use_incremental_objective=False, min_tr_size=1e-15, tol=1e-7) alSettings = AlSolver.get_settings(max_gmres_iters=300, num_initial_low_order_iterations=5, use_second_order_update=True, penalty_scaling = 1.05, target_constraint_decrease_factor=0.5, tol=2e-7) def write_output(mesh, dofManager, U, p, mechanicsFunctions, step, spheres=None, sphereRadii=None): plotName = get_output_name(step) writer = VTKWriter.VTKWriter(mesh, baseFileName=plotName) writer.add_nodal_field(name='displacement', nodalData=U, fieldType=VTKWriter.VTKFieldType.VECTORS) bcs = np.array(dofManager.isBc, dtype=int) writer.add_nodal_field(name='bcs', nodalData=bcs, fieldType=VTKWriter.VTKFieldType.VECTORS, dataType=VTKWriter.VTKDataType.INT) #internalVariables = mechanicsFunctions.compute_initial_state() #strainEnergyDensities, stresses = \ # mechanicsFunctions.\ # compute_output_energy_densities_and_stresses(U, internalVariables) #writer.add_cell_field(name='strain_energy_density', # cellData=strainEnergyDensities, # fieldType=VTKWriter.VTKFieldType.SCALARS) #writer.add_cell_field(name='stress', # cellData=stresses, # fieldType=VTKWriter.VTKFieldType.TENSORS) if spheres is not None: for s, sp in enumerate(spheres): writer.add_sphere(sp, sphereRadii[s]) writer.write() def write_debug_output(mesh, quadRule, edges2, U, p, subStep): plotName = get_iteration_output_name(subStep) writer = VTKWriter.VTKWriter(mesh, baseFileName=plotName) writer.add_nodal_field(name='displacement', nodalData=U, fieldType=VTKWriter.VTKFieldType.VECTORS) quadPoints, dists = get_contact_points_and_field(edges2, mesh, U, p, quadRule, smoothingDistance) for e,edge in enumerate(quadPoints): for q,qpoint in enumerate(edge): writer.add_sphere(qpoint, dists[e][q]) writer.write() def get_output_name(N): return 'two-'+str(N).zfill(3) def get_iteration_output_name(N): return 'substep-'+str(N).zfill(3) def get_quadrature_points(edges, mesh, U, p, quadRule): def edge_coords(edge, mesh, coords, disp): index = Surface.get_field_index(edge, mesh.conns) endCoords = Surface.eval_field(coords, index) + Surface.eval_field(disp, index) qCoords = QuadratureRule.eval_at_iso_points(quadRule.xigauss, endCoords) return qCoords return vmap(edge_coords, (0,None,None,None))(edges, mesh, mesh.coords, U) def get_contact_points_and_field(edges, mesh, U, p, quadRule, smoothingDistance): quadPoints = get_quadrature_points(edges, mesh, U, p, quadRule) interactionList = p[1][0] dists = closest_distance_func(mesh, U, quadRule, interactionList, edges, smoothingDistance) return quadPoints, dists # This appears to be a fairly general quasi-static solver now. Only for dense systems though. def solve(Uu, energy_func, constraint_func, update_params_func, write_output_func, write_debug_output_func, numSteps, settings, alSettings, initialMultiplier=4.0): step=0 p = update_params_func(step, Uu, Objective.Params()) c = constraint_func(Uu, p) kappa0 = initialMultiplier * np.ones_like(c) lam0 = 1e-4*np.abs(kappa0*c) objective = ConstrainedQuasiObjective(energy_func, constraint_func, Uu, p, lam0, kappa0) write_output_func(step, Uu, p, objective.lam) for step in range(1,numSteps+1): print('\n------------ LOAD STEP', step, '------------\n') count=0 def iteration_plot(Uu, p): nonlocal count write_debug_output_func(count, Uu, p, objective.lam) count=count+1 residuals=[] def subproblem_residual(Uu, obj): errorNorm = np.linalg.norm(obj.total_residual(Uu)) residuals.append(errorNorm) print('error = ', errorNorm) with open('contact_residuals.'+str(count)+'.npz', 'wb') as file: np.savez(file, data=np.array(residuals)) p = update_params_func(step, Uu, p) Uu = AlSolver.augmented_lagrange_solve(objective, Uu, p, alSettings, settings, callback=iteration_plot, sub_problem_callback=subproblem_residual) write_output_func(step, Uu, p, objective.lam)
37.876623
153
0.647694
eb9ecdb10a5e85ad63e88e342deb2040ad83dd0d
1,646
css
CSS
src/components/header/headerMB.module.css
iamAravindks/excelsior2021
8d51cab190c6514aa3c86c2dc1fd8fc78287589b
[ "RSA-MD" ]
null
null
null
src/components/header/headerMB.module.css
iamAravindks/excelsior2021
8d51cab190c6514aa3c86c2dc1fd8fc78287589b
[ "RSA-MD" ]
null
null
null
src/components/header/headerMB.module.css
iamAravindks/excelsior2021
8d51cab190c6514aa3c86c2dc1fd8fc78287589b
[ "RSA-MD" ]
5
2021-05-29T18:49:40.000Z
2021-06-10T11:11:07.000Z
.container { background-color: #292929; opacity: 0.9; padding: 2rem 2rem 0 2rem; height: 100%; width: 100%; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .exLogoLink { width: 12%; } .exLogo { opacity: 1; width: 100%; height: 100%; align-self: center; } .hamburger { cursor: pointer; vertical-align: middle; background-color: transparent; width: 11%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 2rem; } .svgImg { margin-bottom: auto; display: block; height: 100%; width: 100%; } .line { fill: none; stroke: #b2c5db; stroke-width: 6; transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1), stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1); } .line1 { stroke-dasharray: 60 207; stroke-width: 6; } .line2 { stroke-dasharray: 60 60; stroke-width: 6; } .line3 { stroke-dasharray: 60 207; stroke-width: 6; } .opened .line1 { stroke-dasharray: 90 207; stroke-dashoffset: -134; stroke-width: 6; } .opened .line2 { stroke-dasharray: 1 60; stroke-dashoffset: -30; stroke-width: 6; } .opened .line3 { stroke-dasharray: 90 207; stroke-dashoffset: -134; stroke-width: 6; } @media only screen and (min-width: 550px) { .exLogoLink { width: 8%; } .hamburger { opacity: 1; width: 6%; cursor: pointer; } } @media only screen and (min-width: 769px) { .mobileVersion { display: none; } }
16.46
68
0.587485
5d580c4fb88cef7ca3bafeeb075058f2bac6d586
7,210
cxx
C++
graphics/slcd/slcd_mapping.cxx
codebje/incubator-nuttx-apps
d66bc2c1070cdbbb7c8e00ffa727a8515cf26eff
[ "Apache-2.0" ]
132
2019-12-17T23:45:42.000Z
2022-03-30T11:58:30.000Z
graphics/slcd/slcd_mapping.cxx
codebje/incubator-nuttx-apps
d66bc2c1070cdbbb7c8e00ffa727a8515cf26eff
[ "Apache-2.0" ]
443
2020-01-01T03:06:24.000Z
2022-03-31T08:57:35.000Z
graphics/slcd/slcd_mapping.cxx
codebje/incubator-nuttx-apps
d66bc2c1070cdbbb7c8e00ffa727a8515cf26eff
[ "Apache-2.0" ]
232
2019-12-21T10:18:12.000Z
2022-03-30T07:42:13.000Z
///////////////////////////////////////////////////////////////////////////// // apps/graphics/slcd/slcd_mapping.cxx // // Copyright (C) 2019 Gregory Nutt. All rights reserved. // Author: Gregory Nutt <[email protected]> // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in // the documentation and/or other materials provided with the // distribution. // 3. Neither the name NuttX nor the names of its contributors may be // used to endorse or promote products derived from this software // without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED // AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // ///////////////////////////////////////////////////////////////////////////// // Segment // // 11111111 // 2 3 // 2 3 // 2 3 // 44444444 // 5 6 // 5 6 // 5 6 // 77777777 ///////////////////////////////////////////////////////////////////////////// // Included Files ///////////////////////////////////////////////////////////////////////////// #include <cstdint> #include "graphics/slcd.hxx" #include "slcd.hxx" ///////////////////////////////////////////////////////////////////////////// // Public Data ///////////////////////////////////////////////////////////////////////////// namespace SLcd { const uint8_t GSLcdDigits[10] = { SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_5 | // 0 SEGMENT_6 | SEGMENT_7, SEGMENT_3 | SEGMENT_6, // 1 SEGMENT_1 | SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | // 2 SEGMENT_7, SEGMENT_1 | SEGMENT_3 | SEGMENT_4 | SEGMENT_6 | // 3 SEGMENT_7, SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | SEGMENT_6, // 4 SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_6 | // 5 SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | // 6 SEGMENT_6 | SEGMENT_7, // 7 SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_6, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // 8 SEGMENT_5 | SEGMENT_6 | SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // 9 SEGMENT_6 | SEGMENT_7 }; const uint8_t GSLcdLowerCase[26] = { SEGMENT_1 | SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | // a SEGMENT_6 | SEGMENT_7, SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | SEGMENT_6 | // b SEGMENT_7, SEGMENT_4 | SEGMENT_5 | SEGMENT_7, // c SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | SEGMENT_6 | // d SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // e SEGMENT_5 | SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_5, // f SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // g SEGMENT_6 | SEGMENT_7, SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | SEGMENT_6, // h SEGMENT_5, // i SEGMENT_6 | SEGMENT_7, // j SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | // k SEGMENT_6, SEGMENT_3 | SEGMENT_6, // l SEGMENT_5 | SEGMENT_6, // m SEGMENT_4 | SEGMENT_5 | SEGMENT_6, // n SEGMENT_4 | SEGMENT_5 | SEGMENT_6 | SEGMENT_7, // o SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // p SEGMENT_5, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // q SEGMENT_6, SEGMENT_4 | SEGMENT_5, // r SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_6 | // s SEGMENT_7, SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | SEGMENT_7, // t SEGMENT_5 | SEGMENT_6 | SEGMENT_7, // u SEGMENT_5 | SEGMENT_6 | SEGMENT_7, // v SEGMENT_5 | SEGMENT_6, // w SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | // x SEGMENT_6, SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | SEGMENT_6 | // y SEGMENT_7, SEGMENT_1 | SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | // z SEGMENT_7 }; const uint8_t GSLcdUpperCase[26] = { SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // A SEGMENT_5 | SEGMENT_6, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // B SEGMENT_5 | SEGMENT_6 | SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_5 | SEGMENT_7, // C SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | SEGMENT_6 | // D SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | // E SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_5, // F SEGMENT_1 | SEGMENT_2 | SEGMENT_5 | SEGMENT_6 | // G SEGMENT_7, SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | // H SEGMENT_6, SEGMENT_3 | SEGMENT_6, // I SEGMENT_3 | SEGMENT_5 | SEGMENT_6 | SEGMENT_7, // J SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | // K SEGMENT_6, SEGMENT_2 | SEGMENT_5 | SEGMENT_7, // L SEGMENT_1 | SEGMENT_5 | SEGMENT_6, // M SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_5 | // N SEGMENT_6, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_5 | // O SEGMENT_6 | SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // P SEGMENT_5, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | // Q SEGMENT_7, SEGMENT_1 | SEGMENT_2 | SEGMENT_3 | SEGMENT_5, // R SEGMENT_1 | SEGMENT_2 | SEGMENT_4 | SEGMENT_6 | // S SEGMENT_7, SEGMENT_2 | SEGMENT_4 | SEGMENT_5 | SEGMENT_7, // T SEGMENT_2 | SEGMENT_3 | SEGMENT_5 | SEGMENT_6 | // U SEGMENT_7, SEGMENT_2 | SEGMENT_3 | SEGMENT_5 | SEGMENT_6 | // V SEGMENT_7, SEGMENT_2 | SEGMENT_3 | SEGMENT_7, // W SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | // X SEGMENT_6, SEGMENT_2 | SEGMENT_3 | SEGMENT_4 | SEGMENT_6 | // Y SEGMENT_7, SEGMENT_1 | SEGMENT_3 | SEGMENT_4 | SEGMENT_5 | // Z SEGMENT_7 }; const struct SSLcdCharset SSLcdMisc[NMISC_MAPPINGS] = { { .ch = ' ', .segments = 0 }, { .ch = '-', .segments = SEGMENT_4 }, { .ch = '_', .segments = SEGMENT_7 }, { .ch = '"', .segments = SEGMENT_3 | SEGMENT_3 }, { .ch = ',', .segments = SEGMENT_5 } }; }
36.598985
77
0.571429
dbd3d1c831a8e971ef60330fe2118d148f3769d6
1,407
php
PHP
application/views/user/uploadpembayaran.php
rizqyep/Sistem-Pajak-CI
f70be482c070abd49a13dc248250679afaa1fcfd
[ "MIT" ]
null
null
null
application/views/user/uploadpembayaran.php
rizqyep/Sistem-Pajak-CI
f70be482c070abd49a13dc248250679afaa1fcfd
[ "MIT" ]
null
null
null
application/views/user/uploadpembayaran.php
rizqyep/Sistem-Pajak-CI
f70be482c070abd49a13dc248250679afaa1fcfd
[ "MIT" ]
null
null
null
<div class="content-wrapper "> <div class="container"> <div class="row"> <div class="mt-5"></div> </div> <div class="row"> <!-- left column --> <div class="col-12"> <!-- general form elements --> <div class="card card-primary"> <div class="card-header"> <h3 class="card-title">Upload Bukti Pembayaran Untuk <?= $kendaraan['jenis'] . " Nomor Polisi " . $kendaraan['nopol']; ?></h3> </div> <form action="<?= base_url(); ?>user/updatebukti/<?= $kendaraan['id'] ?>" method="POST" enctype="multipart/form-data"> <div class="card-body"> <div class="form-group"> <label for="bukti">Foto/Dokumen Bukti Pembayaran</label> <input type="file" class="form-control-file" name="bukti" id="bukti"> </div> </div> <!-- /.card-body --> <div class="card-footer float-right"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form> </div> <!-- /.card --> </div> </div> </div> </div>
45.387097
150
0.401564
7bb1c1f40ffbab823725e565cfa4b06efc76c7c5
727
rb
Ruby
app/controllers/comments_controller.rb
Thomas-Rudge/micro_reddit
1ce782a49dd431043ba7fdfe502c27eb7a7e906e
[ "MIT" ]
1
2020-05-13T00:28:10.000Z
2020-05-13T00:28:10.000Z
app/controllers/comments_controller.rb
Thomas-Rudge/micro_reddit
1ce782a49dd431043ba7fdfe502c27eb7a7e906e
[ "MIT" ]
null
null
null
app/controllers/comments_controller.rb
Thomas-Rudge/micro_reddit
1ce782a49dd431043ba7fdfe502c27eb7a7e906e
[ "MIT" ]
null
null
null
class CommentsController < ApplicationController before_action :check_login_status def create return if params[:comment][:content].blank? @comment = Comment.new(comment_params) @comment.user_id = current_user.id @comment.post_id = params[:post_id] @comment.upvotes = 1 if @comment.save Vote.new(user_id: current_user.id, post_id: params[:post_id], comment_id: @comment.id, vote: 1).save User.find(current_user.id).increment!(:comment_karma) redirect_to :back end end def check_login_status head 403 unless logged_in? end private def comment_params params.require(:comment).permit(:content) end end
21.382353
59
0.661623