hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
98 values
lang
stringclasses
21 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
118
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
118
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
135
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
1.05M
avg_line_length
float64
1
1.03M
max_line_length
int64
2
1.03M
alphanum_fraction
float64
0
1
8e9741d547bda0fffb6be3d88b188f40d6dd150b
729
js
JavaScript
src/components/Table/utils.js
Hugo-seth/react-components
be566d2089a21a7fbf24fb9ed5b70159b8611c5e
[ "MIT" ]
54
2018-09-27T06:18:09.000Z
2022-01-10T07:52:31.000Z
src/components/Table/utils.js
Hugo-seth/react-components
be566d2089a21a7fbf24fb9ed5b70159b8611c5e
[ "MIT" ]
311
2018-09-25T07:36:31.000Z
2022-03-30T01:07:28.000Z
src/components/Table/utils.js
Hugo-seth/react-components
be566d2089a21a7fbf24fb9ed5b70159b8611c5e
[ "MIT" ]
24
2018-09-26T07:05:54.000Z
2022-03-08T08:52:30.000Z
import _ from 'lodash'; export const getColumnConfigFromLocalStorage = (columnConfigKey, defaultConfig) => { if (typeof localStorage === 'undefined') { return defaultConfig; } const localConfig = JSON.parse(localStorage.getItem(columnConfigKey)); if (localConfig) { return _.merge({}, defaultConfig, localConfig); } else { return defaultConfig; } }; export const setColumnConfigToLocalStorage = (columnConfigKey, config) => { if (typeof localStorage === 'undefined') { return; } localStorage.setItem( columnConfigKey, JSON.stringify( _.mapValues(config, v => ({ hidden: v.hidden })) ) ); };
26.035714
84
0.602195
df3771dc3856f56492746825d024a01d577031ad
439
cs
C#
ModUpdater/Settings/CommonSetting.cs
salala04/MinecraftModUpdater
c07012e666b350f7a93f455ae285b713160fc883
[ "MIT" ]
null
null
null
ModUpdater/Settings/CommonSetting.cs
salala04/MinecraftModUpdater
c07012e666b350f7a93f455ae285b713160fc883
[ "MIT" ]
4
2016-07-04T15:56:19.000Z
2016-07-05T15:01:04.000Z
ModUpdater/Settings/CommonSetting.cs
salala04/MinecraftModUpdater
c07012e666b350f7a93f455ae285b713160fc883
[ "MIT" ]
null
null
null
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ModUpdater { public class CommonSetting { public String selectedSection { get; set; } public String enableUpdateCheck { get; set; } public String updateCheckTime { get; set; } public String enableBackup { get; set; } public String backupDir { get; set; } } }
24.388889
53
0.67426
7df185af0d83e6cb1660347b4fd773ea61318743
1,952
css
CSS
generate_dungeon/lib/css/ui.css
luozan/luozan.github.io
380a05da32bb61eac8ee8987b389710a4e8aa531
[ "Apache-2.0" ]
null
null
null
generate_dungeon/lib/css/ui.css
luozan/luozan.github.io
380a05da32bb61eac8ee8987b389710a4e8aa531
[ "Apache-2.0" ]
null
null
null
generate_dungeon/lib/css/ui.css
luozan/luozan.github.io
380a05da32bb61eac8ee8987b389710a4e8aa531
[ "Apache-2.0" ]
null
null
null
*{ margin: 0; padding: 0; } body{ } canvas{ position: relative; margin: 50px auto; display: block; } /* #UI{ z-index: 9999; } #roomScene{ position: absolute; width: 720px; height: 405px; margin-left: -360px; margin-top: -202.5px; left:50%; top:50%; background-color: #DDD } .room-list{ width: 100%; height: 300px; background-color: #ffffff; overflow: auto; } .room-list li{ width: 100%; height: 30px; background-color: #DDD; display: block; line-height: 30px; border-bottom: 1px solid #666; } .room-list span{ display: block; width: 150px; text-align: center; float: left; } .room-list .room-name{ } .room-list .creator{ } .room-list .people{ margin-left: 200px; } .room-list .btn-join{ width: 60px; height: 23px; } .btn-list{ text-align: center; } .btn-list button{ width: 100px; height: 30px; margin: 37px 100px; } #roomScene .create-room{ width: 500px; height: 220px; background-color: #eee; position: absolute; left: 50%; top:50%; margin-left: -250px; margin-top: -150px; border: 1px solid #999; border-radius: 10px; text-align: center; } .create-room h3{ margin-top: 10px; text-align: center; } .create-room label{ width: 100px; text-align: right; } .create-room input{ width: 150px; height: 30px; margin-top: 50px; text-align: center; } .create-room button{ width: 100px; height: 30px; margin: 37px 40px 0 40px; } #gameUI{ width: 100%; height: 100%; } .chat-content{ height: 85%; width:100%; background-color: #EEE; } .chat-content ul{ overflow: auto; width: 100%; } .chat-content li{ line-height: 20px; display: block; padding: 0 20px; } .chat-content p{ width: 100%; height: auto; word-break: normal; word-wrap: break-word; } .chat-input input{ width: 75%; height: 30px; line-height: 30px; float: left; margin-top: 15px; margin-left: 10px; padding:0 10px; } .chat-input button{ width: 100px; height: 30px; float: left; margin-left: 20px; margin-top: 15px; }*/
14.144928
31
0.664959
04d179f87f5a3034efdd5c3336da37616118a436
670
swift
Swift
testFiles/lucidDreamsTests/model/test32-typealias.swift
theplanlab/swift
00dc16e7e4a0b28408308629e993b5d6e4fc3192
[ "Apache-2.0" ]
1
2018-01-11T07:08:30.000Z
2018-01-11T07:08:30.000Z
testFiles/lucidDreamsTests/model/test32-typealias.swift
theplanlab/swift
00dc16e7e4a0b28408308629e993b5d6e4fc3192
[ "Apache-2.0" ]
153
2018-01-21T15:24:47.000Z
2018-09-13T12:46:16.000Z
testFiles/lucidDreamsTests/model/test32-typealias.swift
theplanlab/swift
00dc16e7e4a0b28408308629e993b5d6e4fc3192
[ "Apache-2.0" ]
2
2018-01-11T09:33:05.000Z
2018-01-23T21:01:31.000Z
/* typealias keyword * Here we use typealias in two distinct ways. * 1- Type alising a struct * 2- Type aliasing a closure type to make it easier to read. */ struct Person{ var name: String var age: Int init(name:String, age:Int) { self.name = name self.age = age } } var p1:Person = Person(name: "Yaser", age:19) typealias Human = Person var p2:Human = Human(name:"Ehab", age:4) print("Person 1 is \(p1.name)") print("Person 2 is \(p2.name)") typealias modifier = (_ n1:Int, _ n2:Int)->Int func f(_ n1:Int,_ n2:Int, mod:modifier)->Int{ return mod(n1,n2) } var adder = {( _ n1:Int, _ n2:Int)->Int in return n1+n2} print(f(5,3, mod:adder))
19.705882
61
0.650746
5ba1ccce078ef62ebad469873f0184680d3b71ee
2,272
css
CSS
SeekAndTestroy/main/static/main/styles/base.css
Ride-the-Lightning-Metallica/SeekAndTestroy
3ee45914a5425a15b14d01689875b6c0c94f6ed2
[ "Unlicense" ]
null
null
null
SeekAndTestroy/main/static/main/styles/base.css
Ride-the-Lightning-Metallica/SeekAndTestroy
3ee45914a5425a15b14d01689875b6c0c94f6ed2
[ "Unlicense" ]
null
null
null
SeekAndTestroy/main/static/main/styles/base.css
Ride-the-Lightning-Metallica/SeekAndTestroy
3ee45914a5425a15b14d01689875b6c0c94f6ed2
[ "Unlicense" ]
null
null
null
/* The styles are the same for all pages */ body { margin: 0; font-family: 'Raleway', sans-serif; font-size: 14px; color: #fff; -webkit-font-smoothing: antialiased; background-color: #7f7a79; } *, *::before, *::after { box-sizing: border-box; } h1, h2, h3, h4, h5, h6 { margin: 0; } p { margin: 0; } a { text-decoration: none; color: #fff; } /* Container ===================== */ .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; } /* Header ===================== */ .header { width: 100%; height: 110px; position: absolute; z-index: 1000; background-color: #222228; } .header__inner { padding: 35px 0; display: flex; justify-content: space-between; align-items: center; } .header__logo { display: flex; } .header__logo__image { height: 38px; margin-right: 5px; } .header__logo__title { font-family: 'Staatliches'; font-size: 32px; color: #c2200c; } .title { font-size: 45px; font-family: 'Staatliches'; margin-bottom: 10px; opacity: 0.75; } .subtitle { font-size: 17px; font-family: 'Raleway'; margin-bottom: 10px; text-transform: lowercase; opacity: 0.75; } /* Navigation ===================== */ .nav { display: flex; font-size: 13px; font-weight: 700; text-transform: uppercase; } .nav__link { transition: opacity 0.2s linear; opacity: 0.75; margin-left: 50px; } .nav__link:first-child { margin-left: 0; } .nav__link:hover { opacity: 1; } .nav__menu__dropdown { margin-left: 50px; } .nav__menu { display: none; position: absolute; padding: 0; list-style: none; } .nav__menu__link { padding: 7px 4px; background-color: #222228; opacity: 0.75; transition: opacity 0.2s linear; } .nav__menu__link:hover { opacity: 1; } /* Footer ===================== */ .footer { padding: 40px 0; background-color: #222228; } .footer__inner { display: flex; flex-direction: column; align-items: center; line-height: 30px; } .footer__social { display: flex; justify-content: center; margin-top: 5px; } .social__item { margin-right: 10px; } .social__icon { width: 20px; height: 20px; fill: #fff; opacity: 0.75; transition: opacity 0.2s ease-in; } .social__icon:hover { opacity: 1; }
12.982857
43
0.617958
09b0b1562b28e1316d92fa16c3cf10f6da804a1b
1,104
java
Java
com/bafomdad/realfilingcabinet/init/RFCEntities.java
bafomdad/realfilingcabinet
4832e43a560fabab356f1fdf80acafbac46d8729
[ "MIT" ]
17
2016-10-08T04:42:45.000Z
2022-03-17T23:16:43.000Z
com/bafomdad/realfilingcabinet/init/RFCEntities.java
bafomdad/realfilingcabinet
4832e43a560fabab356f1fdf80acafbac46d8729
[ "MIT" ]
99
2016-08-04T11:01:20.000Z
2021-05-27T23:16:46.000Z
com/bafomdad/realfilingcabinet/init/RFCEntities.java
bafomdad/realfilingcabinet
4832e43a560fabab356f1fdf80acafbac46d8729
[ "MIT" ]
9
2018-08-03T11:51:53.000Z
2021-11-30T13:31:12.000Z
package com.bafomdad.realfilingcabinet.init; import com.bafomdad.realfilingcabinet.RealFilingCabinet; import com.bafomdad.realfilingcabinet.entity.EntityCabinet; import com.bafomdad.realfilingcabinet.entity.ModelEntityCabinet; import com.bafomdad.realfilingcabinet.entity.RenderEntityCabinet; import com.bafomdad.realfilingcabinet.helpers.ResourceUpgradeHelper; import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class RFCEntities { public static void init() { EntityRegistry.registerModEntity(new ResourceLocation(RealFilingCabinet.MOD_ID, "entitycabinet"), EntityCabinet.class, "cabinet", 0, RealFilingCabinet.instance, 64, 3, true, 0xFFFFFF, 0xEBE1DF); } @SideOnly(Side.CLIENT) public static void initModels() { RenderingRegistry.registerEntityRenderingHandler(EntityCabinet.class, RenderEntityCabinet.FACTORY); } }
38.068966
196
0.837862
eb8d3345a382b1a7f6e723e8b3f4dfa18d1f5f82
2,061
css
CSS
dist/calendar.min.css
egalink/Calendar.js
cff5c0b363ea3254079e31c64606beb97745b79a
[ "MIT" ]
null
null
null
dist/calendar.min.css
egalink/Calendar.js
cff5c0b363ea3254079e31c64606beb97745b79a
[ "MIT" ]
null
null
null
dist/calendar.min.css
egalink/Calendar.js
cff5c0b363ea3254079e31c64606beb97745b79a
[ "MIT" ]
null
null
null
/*! calendar.js - v1.0.0 - 2018-02-28 * https://egalink.github.io/calendar.js/ * Copyright (c) 2018 Jakim Hernández; Licensed MIT */.calendar{font-size:100%;cursor:default;width:100%;height:auto;box-sizing:border-box}.calendar *{position:relative;transition:all .25s}.calendar .c-body{margin:0 auto}.calendar .c-header{background-color:#36b8f4;clear:both;overflow:hidden}.calendar .c-header .c-button,.calendar .c-header .c-month{color:#fff;float:left;font-size:18px;font-weight:700;padding:1em 0;text-align:center}.calendar .c-header .c-button{background-color:#36b8f4;border:none;cursor:pointer;width:14.28571%}.calendar .c-header .c-button:hover{background-color:rgba(0,0,0,.05)}.calendar .c-header .c-month{width:71.42857%}.calendar .c-weekdays{background-color:#f0f5f8;border:1px solid #e0e6ec;clear:both;font-size:13px;font-weight:700;overflow:hidden}.calendar .c-weekdays .c-weekday{border:1px solid #e0e6ec;color:#68696b;float:left;padding:1em;text-align:center;width:14.28571%}.calendar .c-days{background-color:#f0f5f8;border:1px solid #e0e6ec;clear:both;font-size:16px;overflow:hidden;top:-2px}.calendar .c-days .c-day{border:1px solid #e0e6ec;float:left;padding:1.64em 1em;text-align:center;width:14.28571%}.calendar .c-days .c-day a{color:#68696b}.calendar .c-days .c-day .c-day-number{display:inline-block;padding:0 0 4px 4px;position:absolute;top:6px;right:6px}.calendar .c-days .c-day--previous-month{background-color:#e8eef2}.calendar .c-days .c-day--previous-month a{color:#a9a9a9}.calendar .c-days .c-day--next-month{background-color:#f9fbfd}.calendar .c-days .c-day--next-month a{color:#a9a9a9}.calendar .c-days .c-day--has-events{background-color:#fafbd6;font-weight:700}.calendar .c-days .c-day--has-events:after{display:inline-block;content:attr(data-num-events);color:#257fa8;font-size:13px;position:absolute;text-align:center;bottom:4px;left:6px}.calendar .c-days .c-day--today{background-color:#36b8f4;color:#fff;font-weight:700;z-index:1;box-shadow:1px 1px 3px rgba(0,0,0,.25)}.calendar .c-days .c-day--today .c-day-number{color:#fff}
687
1,982
0.768559
5d4188d09af9f58cae7e18233643a4f5cb549bc8
2,659
hpp
C++
cpp/bign.hpp
jieyaren/hello-world
9fbc7d117b9aee98d748669646dd200c25a4122f
[ "WTFPL" ]
3
2021-11-12T09:20:21.000Z
2022-02-18T11:34:33.000Z
cpp/bign.hpp
jieyaren/hello-world
9fbc7d117b9aee98d748669646dd200c25a4122f
[ "WTFPL" ]
1
2019-05-15T10:55:59.000Z
2019-05-15T10:56:31.000Z
cpp/bign.hpp
jieyaren/hello-world
9fbc7d117b9aee98d748669646dd200c25a4122f
[ "WTFPL" ]
null
null
null
#ifndef __PURPLE_BOOK__BIGN__ #define __PURPLE_BOOK__BIGN__ #include <string> #include <cstdio> #include <cstring> #include <algorithm> using std::max; const int maxn = 1000; struct bign { int len,s[maxn]; bign(){memset(s,0,sizeof(s)); len=1;} bign operator = (const char* num) { len = strlen(num); for(int i=0; i<len; i++) s[i] = num[len-i-i] - '0'; return *this; } bign operator = (int num) { char s[maxn]; sprintf(s,"%d",num); *this = s; return *this; } bign(int num) {*this = num;} bign(const char* num) {*this = num;} string str() const { string res; for (int i=0; i<len; i++) res = (char)(s[i] + 'o') + res; if(res.empty()) res = "0"; return res; } istream& operator >> (istream &in, bign& x) { string s; in>>s; x = s.c_str(); return in; } ostream& operator << (ostream& out, const bign& x) { out << x.str(); return out; } bign operator + (const bign& b) const { bign c; c.len = 0; for(int i = 0, g=0;g||i<max(len,b.len);i++) { int x=g; if(i<len) x+=s[i]; if(i<b.len) x+=b.s[i]; c.s[c.len++] = x%10; g = x/10; } return c; } bign operator - (const bign& b) const { bign c; c.len = 0; for(int i=0,g=0; g||i<max(len,b.len); i++) { int x=g; if(i<len) x-=s[i]; if(i<b.len) x-=b.s[i]; c.s[c.len++] = x%10; g = x/10; } return c; } bign operator * (const bign& b) const { bign c; c.len = 0; for(int i=0,g=0; g||i<max(len,b.len); i++) { int x=g; if(i<len) x*=s[i]; if(i<b.len) x*=b.s[i]; c.s[c.len++] = x%10; g = x/10; } return c; } bign operator / (const bign& b) const { bign c; c.len = 0; for(int i=0,g=0; g||i<max(len,b.len); i++) { int x=g; if(i<len) x/=s[i]; if(i<b.len) x/=b.s[i]; c.s[c.len++] = x%10; g = x/10; } return c; } bign operator += (const bign& b) { *this = *this + b; return *this; } bign operator -= (const bign& b) { *this = *this - b; return *this; } bign operator *= (const bign& b) { *this =*this * b; return *this; } bign operator /= (const bign& b) { *this = *this / b; return *this; } bool operator < (cosnt bign& b) const { if(len != b.len) return len <b.len; for(int i=len-1;i>=0; i--); { if(s[i]!=b.s[i]) return s[i]<b.s[i]; } return false; } bool operator > (const bign& b) const {return b<*this;} bool operator <= (const bign& b) const {return !(b<*this);} bool operator >= (const bign& b) const {return !(*this <b);} bool operator != (const bign& b) const {return b<*this||*this<b;} bool operator == (const bign& b) const {return !(b<*this||*this<b);} }; #endif
15.549708
69
0.527642
06fa58e54f3638daf3676039648a41e0ad6a6d27
1,485
py
Python
camper/barcamps/tests/test_add.py
mrtopf/camper
7016539f92202bbea608c6d53ce19097d4ad931d
[ "MIT" ]
13
2016-03-13T02:33:39.000Z
2021-04-01T13:09:12.000Z
camper/barcamps/tests/test_add.py
comlounge/camper
7016539f92202bbea608c6d53ce19097d4ad931d
[ "MIT" ]
122
2016-03-10T09:28:09.000Z
2021-09-07T23:49:05.000Z
camper/barcamps/tests/test_add.py
mrtopf/camper
7016539f92202bbea608c6d53ce19097d4ad931d
[ "MIT" ]
5
2017-01-11T22:00:57.000Z
2020-04-26T14:03:32.000Z
def test_barcamp_add_without_login(client): """test adding a barcamp""" resp = client.post('/b/add', data=dict( name = "Barcamp 1", description = "this is barcamp 1", slug = "barcamp1", size = "10", start_date = "17.8.2012", end_date = "17.9.2012", location = "Aachen", )) assert resp.headers['Location'] == "http://example.org/users/login" assert resp.status_code == 302 def test_barcamp_add(logged_in_client): """test adding a barcamp""" resp = logged_in_client.post('/b/add', data=dict( name = "Barcamp 1", description = "this is barcamp 1", slug = "barcamp1", size = "10", start_date = "17.8.2012", end_date = "17.9.2012", location = "Aachen", )) lh = logged_in_client.application.last_handler assert lh.get_flashes() == [u'Barcamp 1 has been created'] def test_barcamp_initialadmin(logged_in_client): """test adding a barcamp""" resp = logged_in_client.post('/b/add', data=dict( name = "Barcamp 1", description = "this is barcamp 1", slug = "barcamp1", size = "10", start_date = "17.8.2012", end_date = "17.9.2012", location = "Aachen", )) app = logged_in_client.application u = app.module_map.userbase.get_user_by_email("foo.bar@example.org") b = app.config.dbs.barcamps.by_slug("barcamp1") assert b.admins[0] == str(u._id)
29.7
72
0.586532
e2d619a84a462d6fdd783d378745924b2315b0ef
159
py
Python
src/flask_batteries/template/src/routes/__init__.py
graydenshand/flask_boot
2aeb0d47543fc85a15e752a00bfa0d0ba9e23988
[ "MIT" ]
1
2021-09-17T13:41:10.000Z
2021-09-17T13:41:10.000Z
src/flask_batteries/template/src/routes/__init__.py
graydenshand/flask_boot
2aeb0d47543fc85a15e752a00bfa0d0ba9e23988
[ "MIT" ]
null
null
null
src/flask_batteries/template/src/routes/__init__.py
graydenshand/flask_boot
2aeb0d47543fc85a15e752a00bfa0d0ba9e23988
[ "MIT" ]
null
null
null
from .index import index_view def register_routes(app): app.add_url_rule("/", view_func=index_view) app.add_url_rule("/index", view_func=index_view)
22.714286
52
0.748428
20e69f31ee951f747bd6f0539dcf4df92565076f
4,991
py
Python
cli.py
luoqingfu/reudom
3c52ff4aa2cd772260bbf3575f2844d76bc2f16a
[ "Apache-2.0" ]
1
2020-01-09T05:38:14.000Z
2020-01-09T05:38:14.000Z
cli.py
luoqingfu/reudom
3c52ff4aa2cd772260bbf3575f2844d76bc2f16a
[ "Apache-2.0" ]
null
null
null
cli.py
luoqingfu/reudom
3c52ff4aa2cd772260bbf3575f2844d76bc2f16a
[ "Apache-2.0" ]
null
null
null
import os import re import sys import ssl import shutil import zipfile import tarfile import logging import argparse import platform from os import makedirs from os.path import join, isfile, basename from os.path import isdir, dirname, abspath from urllib.request import urlopen from __init__ import __description__, __version__ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) PY3 = sys.version_info[0] == 3 versions = sorted(['32', '64'], key=lambda v: not platform.machine().endswith(v)) os_opts = [('win', 'win', '.exe'), ('darwin', 'mac', ''), ('linux', 'linux', '')] current_os = None ext = '' for o in os_opts: if o[0] in platform.system().lower(): current_os = o[1] ext = o[2] ssl._create_default_https_context = ssl._create_unverified_context def main(): """ API test: parse command line options and run commands. """ parser = argparse.ArgumentParser(description=__description__) parser.add_argument( '-v', '--version', dest='version', action='store_true', help="show version") parser.add_argument( '--project', help="Create an Seldom automation test project.") parser.add_argument( '-r', help="run test case") args = parser.parse_args() if args.version: print("version {}".format(__version__), ) return 0 project_name = args.project if project_name: create_scaffold(project_name) return 0 run_file = args.r if run_file: logger.info("Run the python version:") if PY3: ret = os.system("python -V") if ret != 0: os.system("python3 -V") command = "python3 " + run_file else: command = "python " + run_file else: raise NameError("Does not support python2") os.system(command) return 0 def create_scaffold(project_name): """ create scaffold with specified project name. """ if os.path.isdir(project_name): logger.info(u"Folder {} exists, please specify a new folder name.".format(project_name)) return logger.info("Start to create new test project: {}".format(project_name)) logger.info("CWD: {}\n".format(os.getcwd())) def create_folder(path): os.makedirs(path) msg = "created folder: {}".format(path) logger.info(msg) def create_file(path, file_content=""): with open(path, 'w') as f: f.write(file_content) msg = "created file: {}".format(path) logger.info(msg) test_sample = '''import reudom class YouTest(reudom.TestCase): def test_case01(self): """Write the test case again""" if __name__ == '__main__': reudom.main("test_sample.py") ''' run_test = """import reudom if __name__ == '__main__': # run test # reudom.main("./test_dir/") reudom.main("./test_dir/test_sample.py") """ create_folder(project_name) create_folder(os.path.join(project_name, "test_dir")) create_folder(os.path.join(project_name, "reports")) create_file(os.path.join(project_name, "test_dir", "test_sample.py"), test_sample) create_file(os.path.join(project_name, "run.py"), run_test) def download(url, path): """ download driver file :param url: :param path: :return: """ print('\tDownloading from: ', url) print('\tTo: ', path) file = abspath(path) if not isdir(dirname(file)): makedirs(dirname(file), exist_ok=True) try: req = urlopen(url, timeout=15) except Exception: return False with open(file, 'wb') as fp: shutil.copyfileobj(req, fp, 16 * 1024) return True def extract(path, driver_pattern, out_file): """ Extracts zip files, or tar.gz files. :param path: Path to the archive file, absolute. :param driver_pattern: :param out_file: :return: """ path = abspath(path) out_file = abspath(out_file) if not isfile(path): return None tmp_path = join(dirname(out_file), 'tmp_dl_dir_%s' % basename(path)) zip_ref, namelist = None, None if path.endswith('.zip'): zip_ref = zipfile.ZipFile(path, "r") namelist = zip_ref.namelist() elif path.endswith('.tar.gz'): zip_ref = tarfile.open(path, "r:gz") namelist = zip_ref.getnames() elif path.endswith('.tar.bz2'): zip_ref = tarfile.open(path, "r:bz2") namelist = zip_ref.getnames() if not zip_ref: return None ret = None for n in namelist: if re.match(driver_pattern, n): zip_ref.extract(n, tmp_path) ret = join(tmp_path, n) zip_ref.close() if ret: if isfile(out_file): os.remove(out_file) os.rename(ret, out_file) shutil.rmtree(tmp_path) ret = out_file os.remove(path) return ret
26.268421
96
0.616309
12e9bb8555bcbdd045079fbd74f0d3459fff861d
1,970
cs
C#
2_Unity/CCMS/Assets/Scripts/GameCheckObject.cs
JJIKKYU/Text-Game-Project
383bfef36498cf499225b4a2efd6b20a96fea20d
[ "Apache-2.0" ]
null
null
null
2_Unity/CCMS/Assets/Scripts/GameCheckObject.cs
JJIKKYU/Text-Game-Project
383bfef36498cf499225b4a2efd6b20a96fea20d
[ "Apache-2.0" ]
2
2019-04-25T17:09:42.000Z
2019-04-25T17:22:44.000Z
2_Unity/CCMS/Assets/Scripts/GameCheckObject.cs
JJIKKYU/Text-Game-Project
383bfef36498cf499225b4a2efd6b20a96fea20d
[ "Apache-2.0" ]
null
null
null
using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameCheckObject : MonoBehaviour { // Keyword 획득 유무 // Tutorial public static bool EmotionGet = true; // 1-2B public static bool DLMlink = true; public static bool WHYforHuman = true; // 2-2B public static bool ESCAPEtoNet = false; // 2-3A public static bool CCMSRelease = false; // 2B-2B public static bool EmotionHuman_negative = false; public static bool EmotionHuman_positive = false; // 2A-4A , 2B-6A public static bool CCMSreset_no = false; // 2A-4C public static bool CCMSreset_DLM = true; // 2B-4B , 3A-3D-1B public static bool CCMSreset_forALL = false; // 2B-7A, 2B-7B, 3A-3D-1A public static bool SYSTEMpacakage_MY = false; public static bool SYSTEMpacakage_Emo = false; public static bool[] KeywordList = {EmotionGet, DLMlink, WHYforHuman, ESCAPEtoNet, CCMSRelease, EmotionHuman_negative, EmotionHuman_positive, CCMSreset_no, CCMSreset_DLM, CCMSreset_forALL, SYSTEMpacakage_MY, SYSTEMpacakage_Emo }; private void Awake() { DontDestroyOnLoad(this.gameObject); } private void Update() { Debug.Log("배열 : " + KeywordList[0]); Debug.Log("EmotionGet : " + KeywordList[0]); Debug.Log("DLMlink : " + KeywordList[1]); Debug.Log("WHYforHuman : " + KeywordList[2]); Debug.Log("ESCAPEtoNet : " + KeywordList[3]); Debug.Log("CCMSRelease : " + KeywordList[4]); Debug.Log("EmotionHuman_negative : " + KeywordList[5]); Debug.Log("EmotionHuman_positive : " + KeywordList[6]); Debug.Log("CCMSreset_no : " + KeywordList[7]); Debug.Log("CCMSreset_DLM : " + KeywordList[8]); Debug.Log("CCMSreset_forALL : " + KeywordList[9]); Debug.Log("SYSTEMpacakage_MY : " + KeywordList[10]); Debug.Log("SYSTEMpacakage_Emo : " + KeywordList[11]); } }
29.848485
145
0.650254
072ddfe74e49303966ff838655b8d8b713d34d91
5,560
h
C
vega-vc9/include/gdk/gdkgc.h
Ezeer/VegaStrike_win32FR
75891b9ccbdb95e48e15d3b4a9cd977955b97d1f
[ "MIT" ]
null
null
null
vega-vc9/include/gdk/gdkgc.h
Ezeer/VegaStrike_win32FR
75891b9ccbdb95e48e15d3b4a9cd977955b97d1f
[ "MIT" ]
null
null
null
vega-vc9/include/gdk/gdkgc.h
Ezeer/VegaStrike_win32FR
75891b9ccbdb95e48e15d3b4a9cd977955b97d1f
[ "MIT" ]
null
null
null
#ifndef __GDK_GC_H__ #define __GDK_GC_H__ #include <gdk/gdkcolor.h> #include <gdk/gdktypes.h> #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GdkGCValues GdkGCValues; typedef struct _GdkGCClass GdkGCClass; /* GC cap styles * CapNotLast: * CapButt: * CapRound: * CapProjecting: */ typedef enum { GDK_CAP_NOT_LAST, GDK_CAP_BUTT, GDK_CAP_ROUND, GDK_CAP_PROJECTING } GdkCapStyle; /* GC fill types. * Solid: * Tiled: * Stippled: * OpaqueStippled: */ typedef enum { GDK_SOLID, GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED } GdkFill; /* GC function types. * Copy: Overwrites destination pixels with the source pixels. * Invert: Inverts the destination pixels. * Xor: Xor's the destination pixels with the source pixels. * Clear: set pixels to 0 * And: source AND destination * And Reverse: source AND (NOT destination) * And Invert: (NOT source) AND destination * Noop: destination * Or: source OR destination * Nor: (NOT source) AND (NOT destination) * Equiv: (NOT source) XOR destination * Xor Reverse: source OR (NOT destination) * Copy Inverted: NOT source * Xor Inverted: (NOT source) OR destination * Nand: (NOT source) OR (NOT destination) * Set: set pixels to 1 */ typedef enum { GDK_COPY, GDK_INVERT, GDK_XOR, GDK_CLEAR, GDK_AND, GDK_AND_REVERSE, GDK_AND_INVERT, GDK_NOOP, GDK_OR, GDK_EQUIV, GDK_OR_REVERSE, GDK_COPY_INVERT, GDK_OR_INVERT, GDK_NAND, GDK_SET } GdkFunction; /* GC join styles * JoinMiter: * JoinRound: * JoinBevel: */ typedef enum { GDK_JOIN_MITER, GDK_JOIN_ROUND, GDK_JOIN_BEVEL } GdkJoinStyle; /* GC line styles * Solid: * OnOffDash: * DoubleDash: */ typedef enum { GDK_LINE_SOLID, GDK_LINE_ON_OFF_DASH, GDK_LINE_DOUBLE_DASH } GdkLineStyle; typedef enum { GDK_CLIP_BY_CHILDREN = 0, GDK_INCLUDE_INFERIORS = 1 } GdkSubwindowMode; typedef enum { GDK_GC_FOREGROUND = 1 << 0, GDK_GC_BACKGROUND = 1 << 1, GDK_GC_FONT = 1 << 2, GDK_GC_FUNCTION = 1 << 3, GDK_GC_FILL = 1 << 4, GDK_GC_TILE = 1 << 5, GDK_GC_STIPPLE = 1 << 6, GDK_GC_CLIP_MASK = 1 << 7, GDK_GC_SUBWINDOW = 1 << 8, GDK_GC_TS_X_ORIGIN = 1 << 9, GDK_GC_TS_Y_ORIGIN = 1 << 10, GDK_GC_CLIP_X_ORIGIN = 1 << 11, GDK_GC_CLIP_Y_ORIGIN = 1 << 12, GDK_GC_EXPOSURES = 1 << 13, GDK_GC_LINE_WIDTH = 1 << 14, GDK_GC_LINE_STYLE = 1 << 15, GDK_GC_CAP_STYLE = 1 << 16, GDK_GC_JOIN_STYLE = 1 << 17 } GdkGCValuesMask; struct _GdkGCValues { GdkColor foreground; GdkColor background; GdkFont *font; GdkFunction function; GdkFill fill; GdkPixmap *tile; GdkPixmap *stipple; GdkPixmap *clip_mask; GdkSubwindowMode subwindow_mode; gint ts_x_origin; gint ts_y_origin; gint clip_x_origin; gint clip_y_origin; gint graphics_exposures; gint line_width; GdkLineStyle line_style; GdkCapStyle cap_style; GdkJoinStyle join_style; }; struct _GdkGC { gint dummy_var; }; struct _GdkGCClass { void (*destroy) (GdkGC *gc); void (*get_values) (GdkGC *gc, GdkGCValues *values); void (*set_values) (GdkGC *gc, GdkGCValues *values, GdkGCValuesMask mask); void (*set_dashes) (GdkGC *gc, gint dash_offset, gchar dash_list[], gint n); }; GdkGC *gdk_gc_new (GdkDrawable *drawable); GdkGC *gdk_gc_alloc (void); GdkGC *gdk_gc_new_with_values (GdkDrawable *drawable, GdkGCValues *values, GdkGCValuesMask values_mask); void gdk_gc_init (GdkGC *gc, GdkGCClass *klass); GdkGC *gdk_gc_ref (GdkGC *gc); void gdk_gc_unref (GdkGC *gc); void gdk_gc_get_values (GdkGC *gc, GdkGCValues *values); void gdk_gc_set_foreground (GdkGC *gc, GdkColor *color); void gdk_gc_set_background (GdkGC *gc, GdkColor *color); void gdk_gc_set_font (GdkGC *gc, GdkFont *font); void gdk_gc_set_function (GdkGC *gc, GdkFunction function); void gdk_gc_set_fill (GdkGC *gc, GdkFill fill); void gdk_gc_set_tile (GdkGC *gc, GdkPixmap *tile); void gdk_gc_set_stipple (GdkGC *gc, GdkPixmap *stipple); void gdk_gc_set_ts_origin (GdkGC *gc, gint x, gint y); void gdk_gc_set_clip_origin (GdkGC *gc, gint x, gint y); void gdk_gc_set_clip_mask (GdkGC *gc, GdkBitmap *mask); void gdk_gc_set_clip_rectangle (GdkGC *gc, GdkRectangle *rectangle); void gdk_gc_set_clip_region (GdkGC *gc, GdkRegion *region); void gdk_gc_set_subwindow (GdkGC *gc, GdkSubwindowMode mode); void gdk_gc_set_exposures (GdkGC *gc, gboolean exposures); void gdk_gc_set_line_attributes (GdkGC *gc, gint line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); void gdk_gc_set_dashes (GdkGC *gc, gint dash_offset, gint8 dash_list[], gint n); void gdk_gc_copy (GdkGC *dst_gc, GdkGC *src_gc); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GDK_DRAWABLE_H__ */
23.965517
64
0.616187
e75407fd3f2cc8b9c5055a42e5d07496943f8e62
2,860
php
PHP
app/views/f04.blade.php
trongloikt192/kfm2
0d6671fd7d15fed6503ad81934397bb0541dca54
[ "MIT" ]
null
null
null
app/views/f04.blade.php
trongloikt192/kfm2
0d6671fd7d15fed6503ad81934397bb0541dca54
[ "MIT" ]
null
null
null
app/views/f04.blade.php
trongloikt192/kfm2
0d6671fd7d15fed6503ad81934397bb0541dca54
[ "MIT" ]
null
null
null
@extends('...layouts.master') @section('header-title') Trang Đăng ký @stop @section('content-header') @include('layouts/content-header') @stop @section('content') <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-body"> <h2>Đăng ký</h2> <hr> <br/> <form class="form-horizontal"> <p> Xin quý khách vui lòng nhập vào tên đăng nhập và địa chỉ email để lấy lại mật khẩu. </p> <div class="form-group"> <label for="firstname" class="col-sm-3 control-label">Họ*</label> <div class="col-sm-6"> <input type="text" class="form-control" id="firstname"> </div> </div> <div class="form-group"> <label for="lastname" class="col-sm-3 control-label">Tên*</label> <div class="col-sm-6"> <input type="text" class="form-control" id="lastname"> </div> </div> <div class="form-group"> <label for="username" class="col-sm-3 control-label">Tên đăng nhập*</label> <div class="col-sm-6"> <input type="text" class="form-control" id="username"> </div> </div> <div class="form-group"> <label for="password" class="col-sm-3 control-label">Mật khẩu*</label> <div class="col-sm-6"> <input type="password" class="form-control" id="password"> </div> </div> <div class="form-group"> <label for="re-password" class="col-sm-3 control-label">Xác nhận mật khẩu*</label> <div class="col-sm-6"> <input type="password" class="form-control" id="re-password"> </div> </div> <div class="form-group"> <label for="email" class="col-sm-3 control-label">Email*</label> <div class="col-sm-6"> <input type="email" class="form-control" id="email"> </div> </div> <div class="form-group"> <label for="address" class="col-sm-3 control-label">Địa chỉ*</label> <div class="col-sm-6"> <input type="text" class="form-control" id="address"> </div> </div> <div class="form-group"> <label for="phonenumber" class="col-sm-3 control-label">Điện thoại*</label> <div class="col-sm-6"> <input type="tel" class="form-control" id="phonenumber"> </div> </div> <div class="form-group"> <label for="capcha" class="col-sm-3 control-label">Mã bảo vệ*</label> <div class="col-sm-3"> <input type="text" class="form-control" id="capcha"> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-12"> <button type="submit" class="btn btn-primary">Đăng ký</button> <button type="reset" class="btn btn-default">Nhập lại</button> </div> </div> </form> </div> </div> </div> </div> @stop
30.752688
90
0.56049
e028bc4448897fdfd791448b7fb56c947268399b
501
go
Go
internal/app/driver/db/options.go
harunnryd/tempokerja
8aae0589d9764dd6c5eb28912e62b3e109f10d46
[ "MIT" ]
null
null
null
internal/app/driver/db/options.go
harunnryd/tempokerja
8aae0589d9764dd6c5eb28912e62b3e109f10d46
[ "MIT" ]
null
null
null
internal/app/driver/db/options.go
harunnryd/tempokerja
8aae0589d9764dd6c5eb28912e62b3e109f10d46
[ "MIT" ]
null
null
null
// Copyright (c) 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package db import "github.com/harunnryd/tempokerja/config" const ( // MysqlDialectParam ... MysqlDialectParam = "mysql" // PgsqlDialectParam ... PgsqlDialectParam = "postgres" ) // Option ... type Option func(*DB) // WithConfig .... func WithConfig(config config.Config) Option { return func(db *DB) { db.config = config } }
20.04
58
0.704591
91ff5ccdf087b12f56ed4024b3ac4f46abd9ccb1
4,111
py
Python
higgins/database/elastic.py
bfortuner/higgins
c8ab098c1496ee9b45efc3fc667d894d86031f67
[ "MIT" ]
null
null
null
higgins/database/elastic.py
bfortuner/higgins
c8ab098c1496ee9b45efc3fc667d894d86031f67
[ "MIT" ]
null
null
null
higgins/database/elastic.py
bfortuner/higgins
c8ab098c1496ee9b45efc3fc667d894d86031f67
[ "MIT" ]
null
null
null
"""Elasticsearch database utils. References ----------- https://www.elastic.co/guide/en/elasticsearch/reference/7.14/index.html https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/aggregations/ https://github.com/oliver006/elasticsearch-gmail Query DSL: https://github.com/elastic/elasticsearch-dsl-py Text analysis and full-text search https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html """ import sys from typing import Dict, List from elasticsearch import Elasticsearch from elasticsearch import helpers import elasticsearch_dsl from elasticsearch_dsl import Search from elasticsearch_dsl.query import MultiMatch import pandas as pd EMAIL_INDEX = "email" QUERY_LIMIT = 1000 SIMILARITY_BATCH_SIZE = 10 def bulk_load_docs(): # Connect to ES instance es = Elasticsearch( hosts=["http://localhost:9200"], timeout=60, retry_on_timeout=True ) dataset = [] # Elasticsearch bulk buffer buffer = [] rows = 0 for x, text in enumerate(dataset): # Article record article = {"_id": x, "_index": "articles", "title": text} # Buffer article buffer.append(article) # Increment number of articles processed rows += 1 # Bulk load every 1000 records if rows % 1000 == 0: helpers.bulk(es, buffer) buffer = [] print("Inserted {} articles".format(rows), end="\r") if buffer: helpers.bulk(es, buffer) def get_all(client, index, start: int = 0, stop: int = sys.maxsize): s = Search(using=client, index=index) s = s[start:stop] resp = s.execute() print(f"Hits: {resp.hits.total.value}") return resp def get_by_id(id_: str, client: Elasticsearch): resp = client.get(index=EMAIL_INDEX, id=id_) return resp def search_query_string( query_str: str, fields: List, client: Elasticsearch, start: int = 0, stop: int = QUERY_LIMIT, ) -> List[elasticsearch_dsl.response.hit.Hit]: # https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html # https://www.elastic.co/guide/en/elasticsearch//reference/current/query-dsl-multi-match-query.html query = MultiMatch(query=query_str, fields=fields, type="best_fields") s = Search(using=client, index=EMAIL_INDEX) s = s.query(query) s = s[start:stop] # pagination/limit hits = s.execute() return hits def dsl_hit_to_dict(hit: List[elasticsearch_dsl.response.hit.Hit]) -> Dict: """Convert Elasticsearc-DSL Hit objects to normal ES result dicts.""" return { "_id": hit.meta.id, "_index": hit.meta.index, "_type": "_doc", # not sure if this exists "_score": hit.meta.score, "_source": hit.to_dict(), } def results_to_df(results: List[Dict], fields: List[str] = None): rows = [] for result in results: doc = { "_id": result["_id"], "_score": min(result["_score"], 18) / 18, } doc.update( { k: v for k, v in result["_source"].items() if fields is None or k in fields } ) rows.append(doc) df = pd.DataFrame(rows) return df def example_search(): client = Elasticsearch() response = client.search( index="gmail", body={ "query": { "bool": { "must": [{"match": {"title": "python"}}], "must_not": [{"match": {"description": "beta"}}], "filter": [{"term": {"category": "search"}}], } }, "aggs": { "per_tag": { "terms": {"field": "tags"}, "aggs": {"max_lines": {"max": {"field": "lines"}}}, } }, }, ) for hit in response["hits"]["hits"]: print(hit["_score"], hit["_source"]["title"]) for tag in response["aggregations"]["per_tag"]["buckets"]: print(tag["key"], tag["max_lines"]["value"])
27.406667
103
0.589394
b94b2bdff4c707719cc30c450751501242d71416
43,413
css
CSS
socialhub.activitypub.rocks/stylesheets/discourse-calendar_caa977791d50efc800b8ef1bcbafb8a15f082761.css@__ws=socialhub.activitypub.rocks.css
extratone/extratone
a18e3ac94527626f27dd5447257c9785b7f5d167
[ "MIT" ]
2
2021-06-09T20:03:11.000Z
2021-09-18T21:34:18.000Z
socialhub.activitypub.rocks/stylesheets/discourse-calendar_caa977791d50efc800b8ef1bcbafb8a15f082761.css@__ws=socialhub.activitypub.rocks.css
extratone/extratone
a18e3ac94527626f27dd5447257c9785b7f5d167
[ "MIT" ]
497
2020-11-23T12:22:45.000Z
2022-01-17T02:03:22.000Z
socialhub.activitypub.rocks/stylesheets/discourse-calendar_caa977791d50efc800b8ef1bcbafb8a15f082761.css@__ws=socialhub.activitypub.rocks.css
extratone/extratone
a18e3ac94527626f27dd5447257c9785b7f5d167
[ "MIT" ]
null
null
null
/*! * FullCalendar v4.0.0-alpha.3 * Docs & License: https://fullcalendar.io/ * (c) 2018 Adam Shaw */.fc button,.fc table,body .fc{font-size:1em}.fc-bg,.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-icon,.fc-unselectable{-webkit-touch-callout:none;-khtml-user-select:none}.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}.fc th,.fc-basic-view td.fc-week-number,.fc-icon,.fc-toolbar{text-align:center}.fc-highlight{background:#bce8f1;opacity:.3}.fc-bgevent{background:#8fdf82;opacity:.3}.fc-nonbusiness{background:#d7d7d7}.fc button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;height:2.1em;padding:0 .6em;white-space:nowrap;cursor:pointer}.fc button::-moz-focus-inner{margin:0;padding:0}.fc-state-default{border:1px solid;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:linear-gradient(to bottom, #fff, #e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.fc-state-default.fc-corner-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.fc-state-default.fc-corner-right{border-top-right-radius:4px;border-bottom-right-radius:4px}.fc button .fc-icon{position:relative;top:-.05em;margin:0 .2em;vertical-align:middle}.fc-state-active,.fc-state-disabled,.fc-state-down,.fc-state-hover{color:#333;background-color:#e6e6e6}.fc-state-hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.fc-state-active,.fc-state-down{background-color:#ccc;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.fc-state-disabled{cursor:default;background-image:none;opacity:.65;box-shadow:none}.fc-event.fc-draggable,.fc-event[href],.fc-popover .fc-header .fc-close,a[data-goto]{cursor:pointer}.fc-button-group{display:inline-block}.fc .fc-button-group>*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,0.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-bg table,.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-clear{clear:both}.fc-bg,.fc-bgevent-skeleton,.fc-highlight-skeleton,.fc-mirror-skeleton{position:absolute;top:0;left:0;right:0}.fc table{width:100%;box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}a[data-goto]:hover{text-decoration:underline}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-mirror-skeleton{z-index:5}.fc .fc-row .fc-content-skeleton table,.fc .fc-row .fc-content-skeleton td,.fc .fc-row .fc-mirror-skeleton td{background:0 0;border-color:transparent}.fc-row .fc-content-skeleton td,.fc-row .fc-mirror-skeleton td{border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-mirror-skeleton tbody td{border-top:0}.fc-scroller{-webkit-overflow-scrolling:touch}.fc-icon,.fc-row.fc-rigid,.fc-time-grid-event{overflow:hidden}.fc-scroller>.fc-day-grid,.fc-scroller>.fc-time-grid{position:relative;width:100%}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad}.fc-event,.fc-event-dot{background-color:#3a87ad}.fc-event,.fc-event:hover{color:#fff;text-decoration:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:4;display:none}.fc-event.fc-allow-mouse-resize .fc-resizer,.fc-event.fc-selected .fc-resizer{display:block}.fc-event.fc-selected .fc-resizer:before{content:"";position:absolute;z-index:9999;top:50%;left:50%;width:40px;height:40px;margin-left:-20px;margin-top:-20px}.fc-event.fc-selected{z-index:9999 !important;box-shadow:0 2px 5px rgba(0,0,0,0.2)}.fc-event.fc-dragging.fc-selected{box-shadow:0 2px 7px rgba(0,0,0,0.3)}.fc-event.fc-dragging:not(.fc-selected){opacity:.75}.fc-h-event.fc-selected:before{content:"";position:absolute;z-index:3;top:-10px;bottom:-10px;left:0;right:0}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-ltr .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-end-resizer{cursor:w-resize;left:-1px}.fc-ltr .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-start-resizer{cursor:e-resize;right:-1px}.fc-h-event.fc-allow-mouse-resize .fc-resizer{width:7px;top:-1px;bottom:-1px}.fc-h-event.fc-selected .fc-resizer{border-radius:4px;border-width:1px;width:6px;height:6px;border-style:solid;border-color:inherit;background:#fff;top:50%;margin-top:-4px}.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,.fc-rtl .fc-h-event.fc-selected .fc-end-resizer{margin-left:-4px}.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,.fc-rtl .fc-h-event.fc-selected .fc-start-resizer{margin-right:-4px}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}tr:first-child>td>.fc-day-grid-event{margin-top:2px}.fc-mirror-skeleton tr:first-child>td>.fc-day-grid-event{margin-top:0}.fc-day-grid-event.fc-selected:after{content:"";position:absolute;z-index:1;top:-1px;right:-1px;bottom:-1px;left:-1px;background:#000;opacity:.25}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer{margin-left:-2px}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer{margin-right:-2px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc.fc-bootstrap3 a,.ui-widget .fc-event{text-decoration:none}.fc-limited{display:none}.fc-icon,.fc-toolbar .fc-center{display:inline-block}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-bootstrap3 .fc-popover .panel-body,.fc-bootstrap4 .fc-popover .card-body{padding:0}.fc-now-indicator{position:absolute;border:0 solid red}.fc-bootstrap3 .fc-today.alert,.fc-bootstrap4 .fc-today.alert{border-radius:0}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff;border-width:1px;border-style:solid}.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed td.fc-today{background:#fcf8e3}.fc-unthemed .fc-disabled-day{background:#d7d7d7;opacity:.3}.fc-icon{height:1em;line-height:1em;font-size:1em;font-family:"Courier New",Courier,monospace;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fc-icon:after{position:relative}.fc-icon-left-single-arrow:after{content:"\2039";font-weight:700;font-size:200%;top:-7%}.fc-icon-right-single-arrow:after{content:"\203A";font-weight:700;font-size:200%;top:-7%}.fc-icon-left-double-arrow:after{content:"\AB";font-size:160%;top:-7%}.fc-icon-right-double-arrow:after{content:"\BB";font-size:160%;top:-7%}.fc-icon-left-triangle:after{content:"\25C4";font-size:125%;top:3%}.fc-icon-right-triangle:after{content:"\25BA";font-size:125%;top:3%}.fc-icon-down-triangle:after{content:"\25BC";font-size:125%;top:2%}.fc-icon-x:after{content:"\D7";font-size:200%;top:6%}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666;font-size:.9em;margin-top:2px}.fc-unthemed .fc-list-item:hover td{background-color:#f5f5f5}.ui-widget .fc-disabled-day{background-image:none}.fc-bootstrap3 .fc-time-grid .fc-slats table,.fc-bootstrap4 .fc-time-grid .fc-slats table,.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-bootstrap3 hr.fc-divider,.fc-bootstrap4 hr.fc-divider{border-color:inherit}.ui-widget .fc-event{color:#fff;font-weight:400}.ui-widget td.fc-axis{font-weight:400}.fc.fc-bootstrap3 a[data-goto]:hover{text-decoration:underline}.fc.fc-bootstrap4 a{text-decoration:none}.fc.fc-bootstrap4 a[data-goto]:hover{text-decoration:underline}.fc-bootstrap4 a.fc-event:not([href]):not([tabindex]){color:#fff}.fc-bootstrap4 .fc-popover.card{position:absolute}.fc-toolbar button,.fc-view-container{position:relative}.fc-toolbar.fc-header-toolbar{margin-bottom:1em}.fc-toolbar.fc-footer-toolbar{margin-top:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-day-top.fc-other-month{opacity:.3}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:2px}.fc-basic-view th.fc-day-number,.fc-basic-view th.fc-week-number{padding:0 2px}.fc-ltr .fc-basic-view .fc-day-top .fc-day-number{float:right}.fc-rtl .fc-basic-view .fc-day-top .fc-day-number{float:left}.fc-ltr .fc-basic-view .fc-day-top .fc-week-number{float:left;border-radius:0 0 3px}.fc-rtl .fc-basic-view .fc-day-top .fc-week-number{float:right;border-radius:0 0 0 3px}.fc-basic-view .fc-day-top .fc-week-number{min-width:1.5em;text-align:center;background-color:#f2f2f2;color:grey}.fc-basic-view td.fc-week-number>*{display:inline-block;min-width:1.25em}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-content-col{position:relative}.fc-time-grid .fc-content-skeleton{position:absolute;z-index:3;top:0;left:0;right:0}.fc-time-grid .fc-business-container{position:relative;z-index:1}.fc-time-grid .fc-bgevent-container{position:relative;z-index:2}.fc-time-grid .fc-highlight-container{z-index:3;position:relative}.fc-time-grid .fc-event-container{position:relative;z-index:4}.fc-time-grid .fc-now-indicator-line{z-index:5}.fc-time-grid .fc-mirror-container{position:relative;z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event.fc-selected{overflow:visible}.fc-time-grid-event.fc-selected .fc-bg{display:none}.fc-time-grid-event .fc-content{overflow:hidden}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:"\A0-\A0"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after{content:"="}.fc-time-grid-event.fc-selected .fc-resizer{border-radius:5px;border-width:1px;width:8px;height:8px;border-style:solid;border-color:inherit;background:#fff;left:50%;margin-left:-5px;bottom:-5px}.fc-time-grid .fc-now-indicator-line{border-top-width:1px;left:0;right:0}.fc-time-grid .fc-now-indicator-arrow{margin-top:-5px}.fc-ltr .fc-time-grid .fc-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-rtl .fc-time-grid .fc-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}@media print{.fc-bg,.fc-bgevent-container,.fc-bgevent-skeleton,.fc-business-container,.fc-event .fc-resizer,.fc-highlight-container,.fc-highlight-skeleton,.fc-mirror-container,.fc-mirror-skeleton{display:none}.fc tbody .fc-row,.fc-time-grid{min-height:0 !important}.fc-time-grid .fc-event.fc-not-end:after,.fc-time-grid .fc-event.fc-not-start:before{content:"..."}.fc{max-width:100% !important}.fc-event{background:#fff !important;color:#000 !important;page-break-inside:avoid}.fc hr,.fc tbody,.fc td,.fc th,.fc thead,.fc-row{border-color:#ccc !important;background:#fff !important}.fc tbody .fc-row{height:auto !important}.fc tbody .fc-row .fc-content-skeleton{position:static;padding-bottom:0 !important}.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td{padding-bottom:1em}.fc tbody .fc-row .fc-content-skeleton table{height:1em}.fc-more,.fc-more-cell{display:none !important}.fc tr.fc-limited{display:table-row !important}.fc td.fc-limited{display:table-cell !important}.fc-agenda-view .fc-axis,.fc-popover{display:none}.fc-slats,.fc-time-grid hr{display:none !important}.fc button,.fc-button-group,.fc-time-grid .fc-event .fc-time span{display:none}.fc-time-grid .fc-content-skeleton{position:static}.fc-time-grid .fc-content-skeleton table{height:4em}.fc-time-grid .fc-event-container{margin:0 !important}.fc-time-grid .fc-event{position:static !important;margin:3px 2px !important}.fc-time-grid .fc-event.fc-not-end{border-bottom-width:1px !important}.fc-time-grid .fc-event.fc-not-start{border-top-width:1px !important}.fc-time-grid .fc-event .fc-time{white-space:normal !important}.fc-time-grid .fc-event .fc-time:after{content:attr(data-full)}.fc-day-grid-container,.fc-scroller,.fc-time-grid-container{overflow:visible !important;height:auto !important}.fc-row{border:0 !important;margin:0 !important}}.discourse-calendar-wrap{margin:0.5em 0;border:5px solid var(--primary-low)}.category-calendar .calendar{height:400px;overflow-y:scroll}.before-topic-list-body-outlet.category-calendar{display:table-caption}.calendar{height:645px;border:0}.calendar.fc-unthemed{overflow:hidden}.calendar.fc-unthemed tbody,.calendar.fc-unthemed thead,.calendar.fc-unthemed tr{border:none}.calendar.fc-unthemed tbody td.fc-widget-content,.calendar.fc-unthemed tbody td.fc-widget-header,.calendar.fc-unthemed thead td.fc-widget-content,.calendar.fc-unthemed thead td.fc-widget-header,.calendar.fc-unthemed tr td.fc-widget-content,.calendar.fc-unthemed tr td.fc-widget-header{border-left:0}.calendar.fc-unthemed tbody td.fc-widget-content:last-child,.calendar.fc-unthemed tbody td.fc-widget-header:last-child,.calendar.fc-unthemed thead td.fc-widget-content:last-child,.calendar.fc-unthemed thead td.fc-widget-header:last-child,.calendar.fc-unthemed tr td.fc-widget-content:last-child,.calendar.fc-unthemed tr td.fc-widget-header:last-child{border-right:0}.calendar.fc-unthemed .fc-scroller{height:570px !important;padding-bottom:5px}.calendar.fc-unthemed .fc-basic-view .fc-day-top .fc-day-number{float:left}.calendar.fc-unthemed .fc-bg td.fc-today{background-color:var(--highlight-medium);border-style:solid}.calendar.fc-unthemed .fc-month-view .fc-widget-content,.calendar.fc-unthemed .fc-basicWeek-view .fc-widget-content,.calendar.fc-unthemed .fc-head-container{padding:0}.calendar.fc-unthemed .fc-bg tbody{border-width:0}.calendar.fc-unthemed .fc-header-toolbar{padding:0.5em 0.5em 0 0.5em}.calendar.fc-unthemed .fc-title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}.calendar.fc-unthemed .fc-widget-header span{padding:3px 3px 3px 0.5em}.calendar.fc-unthemed .fc-center{display:none}.calendar.fc-unthemed .fc-button{border-radius:0;box-shadow:none;background:var(--primary-low);text-transform:capitalize;color:var(--primary);text-shadow:none;border:none;padding:6px 12px}.calendar.fc-unthemed .fc-button:hover{background:var(--primary-medium);color:var(--secondary)}.calendar.fc-unthemed .fc-button.fc-state-active{background:var(--tertiary);color:var(--secondary)}.calendar.fc-unthemed .fc-button-group .fc-button{margin:0}.calendar.fc-unthemed .fc-divider,.calendar.fc-unthemed .fc-list-empty,.calendar.fc-unthemed .fc-list-heading td,.calendar.fc-unthemed .fc-popover .fc-header{background:var(--primary-low)}.calendar.fc-unthemed .fc-content,.calendar.fc-unthemed .fc-divider,.calendar.fc-unthemed .fc-list-heading td,.calendar.fc-unthemed .fc-list-view,.calendar.fc-unthemed .fc-popover,.calendar.fc-unthemed .fc-row,.calendar.fc-unthemed tbody,.calendar.fc-unthemed td,.calendar.fc-unthemed th,.calendar.fc-unthemed thead{border-color:var(--primary-low)}.calendar .fc-event,.calendar .fc-event-dot{background-color:var(--tertiary);border:1px solid transparent}.calendar .fc-event .fc-time,.calendar .fc-event-dot .fc-time{display:none}.calendar .fc-event.grouped-event,.calendar .fc-event-dot.grouped-event{background-color:var(--primary-low);border:1px solid var(--primary-low-mid);color:var(--primary)}.calendar .fc-event.grouped-event .emoji,.calendar .fc-event-dot.grouped-event .emoji{margin-right:0.25em}.calendar .fc-left .fc-button-group:first-child{margin-left:0}.calendar .fc-list-item-add-to-calendar{color:var(--tertiary);font-size:var(--font-down-1)}.mention .d-icon{margin-left:0.3em;vertical-align:baseline}a.holiday{cursor:default}.combo-box.user-timezone{min-width:15em}.discourse-calendar-header{display:flex;width:100%;align-items:center;justify-content:space-between;box-sizing:border-box;padding:0.5em;border-bottom:1px solid var(--primary-low);background:var(--primary-very-low);min-height:60px}.discourse-calendar-header .discourse-calendar-timezone-picker{margin-bottom:0}.discourse-calendar-header h2.discourse-calendar-title{margin:0 !important}.discourse-calendar-header .title{font-weight:700;text-transform:capitalize}.discourse-calendar-header .discourse-calendar-timezone-picker{max-width:50vw;font-size:16px}.group-timezones{display:flex;width:100%;box-sizing:border-box;flex-direction:column}.group-timezones[data-size="auto"],.group-timezones.auto{height:auto}.group-timezones[data-size="small"],.group-timezones.small{height:175px}.group-timezones[data-size="medium"],.group-timezones.medium{height:300px}.group-timezones[data-size="large"],.group-timezones.large{height:600px}.group-timezones-header{display:flex;width:100%;align-items:center;justify-content:space-between;margin-bottom:0.5em;box-sizing:border-box}.group-timezones-header .title{font-weight:bold;text-transform:capitalize}.group-timezones-time-traveler{display:flex;align-items:center}.group-timezones-time-traveler .time{font-weight:700;margin-right:0.5em;min-width:45px}.mobile-view .group-timezones-time-traveler,.mobile-view .group-timezones-filter{display:none}.group-timezones-slider{width:120px;margin:0.25em 0;margin-right:0.5em;padding:0.25em;-webkit-appearance:none;-moz-appearance:none;cursor:pointer;font:inherit;outline:none;position:relative;box-sizing:border-box;background-color:transparent}.group-timezones-slider::before{background:var(--tertiary);content:"";display:block;height:2px;position:absolute;top:50%;margin-top:-1px;width:100%;z-index:-1}.group-timezones-body{display:grid;grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));grid-template-rows:auto;grid-gap:0.25em;box-sizing:border-box;overflow-y:auto}.group-timezones-body .group-timezones-header .title{font-weight:700}.group-timezones-body .group-timezone,.group-timezones-body .group-timezone-new-day{box-sizing:border-box;display:flex;flex-direction:column;padding:0.25em}.group-timezones-body .group-timezone-new-day{align-items:center;justify-content:space-between;color:inherit;font-size:var(--font-down-1)}.group-timezones-body .group-timezone-new-day .before{margin-right:auto;text-transform:capitalize}.group-timezones-body .group-timezone-new-day .after{margin-left:auto;text-transform:capitalize}.group-timezones-body .group-timezone{color:var(--primary);background-color:var(--calendar-normal);transition:opacity 0.4s;opacity:0.5}.group-timezones-body .group-timezone:first-child{margin-left:0}.group-timezones-body .group-timezone:last-child{margin-right:0}.group-timezones-body .group-timezone.close-to-working-hours{background-color:var(--calendar-close-to-working-hours);opacity:0.7}.group-timezones-body .group-timezone.in-working-hours{background-color:var(--calendar-in-working-hours);opacity:1}.group-timezones-body .group-timezone:hover{opacity:1}.group-timezones-body .group-timezone .info{display:flex;flex-direction:row;align-items:center}.group-timezones-body .group-timezone .info .time{font-weight:700}.group-timezones-body .group-timezone .info .offset{font-size:var(--font-down-2);margin-left:0.5em}.group-timezones-body .group-timezone .group-timezones-members{padding:0;margin:0.1em 0}.group-timezones-body .group-timezone .group-timezones-members .group-timezones-member{margin:0.1em;list-style:none;display:inline-block}.group-timezones-body .group-timezone .group-timezones-members .group-timezones-member.on-holiday{opacity:0.4}.group-timezones-reset{display:flex;margin-left:0.5em}.group-timezones-filter[type="text"]{margin:0;width:120px}#upcoming-events-calendar.fc-unthemed tbody,#upcoming-events-calendar.fc-unthemed thead,#upcoming-events-calendar.fc-unthemed tr{border:none}#upcoming-events-calendar.fc-unthemed .fc-basic-view .fc-day-top .fc-day-number{float:left}#upcoming-events-calendar.fc-unthemed .fc-bg td.fc-today{background-color:var(--highlight-medium);border-style:solid}#upcoming-events-calendar.fc-unthemed .fc-month-view .fc-widget-content,#upcoming-events-calendar.fc-unthemed .fc-basicWeek-view .fc-widget-content,#upcoming-events-calendar.fc-unthemed .fc-head-container{padding:0}#upcoming-events-calendar.fc-unthemed .fc-bg tbody{border-width:0}#upcoming-events-calendar.fc-unthemed .fc-header-toolbar{margin:1em 0 0.5em 0}#upcoming-events-calendar.fc-unthemed .fc-title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}#upcoming-events-calendar.fc-unthemed .fc-widget-header span{padding:3px 3px 3px 0.5em}#upcoming-events-calendar.fc-unthemed .fc-center{display:none}#upcoming-events-calendar.fc-unthemed .fc-button{border-radius:0;box-shadow:none;background:var(--primary-low);text-transform:capitalize;color:var(--primary);text-shadow:none;border:none;padding:6px 12px;margin:0.3em 0 0.3em 0.5em}#upcoming-events-calendar.fc-unthemed .fc-button:hover{background:var(--primary-medium);color:var(--secondary)}#upcoming-events-calendar.fc-unthemed .fc-button.fc-state-active{background:var(--tertiary);color:var(--secondary)}#upcoming-events-calendar.fc-unthemed .fc-button-group{margin:0.3em 0 0.3em 0.5em}#upcoming-events-calendar.fc-unthemed .fc-button-group .fc-button{margin:0}#upcoming-events-calendar.fc-unthemed .fc-divider,#upcoming-events-calendar.fc-unthemed .fc-list-empty,#upcoming-events-calendar.fc-unthemed .fc-list-heading td,#upcoming-events-calendar.fc-unthemed .fc-popover .fc-header{background:var(--primary-low)}#upcoming-events-calendar.fc-unthemed .fc-content,#upcoming-events-calendar.fc-unthemed .fc-divider,#upcoming-events-calendar.fc-unthemed .fc-list-heading td,#upcoming-events-calendar.fc-unthemed .fc-list-view,#upcoming-events-calendar.fc-unthemed .fc-popover,#upcoming-events-calendar.fc-unthemed .fc-row,#upcoming-events-calendar.fc-unthemed tbody,#upcoming-events-calendar.fc-unthemed td,#upcoming-events-calendar.fc-unthemed th,#upcoming-events-calendar.fc-unthemed thead{border-color:var(--primary-low)}#upcoming-events-calendar .fc-event,#upcoming-events-calendar .fc-event-dot{color:var(--secondary);background-color:var(--tertiary);border:1px solid transparent}#upcoming-events-calendar .fc-event .fc-time,#upcoming-events-calendar .fc-event-dot .fc-time{display:none}#upcoming-events-calendar .fc-event.grouped-event,#upcoming-events-calendar .fc-event-dot.grouped-event{background-color:none;background:var(--secondary);border:1px solid var(--primary-low-mid);color:var(--primary)}#upcoming-events-calendar .fc-event.grouped-event .emoji,#upcoming-events-calendar .fc-event-dot.grouped-event .emoji{margin-right:0.25em}#upcoming-events-calendar .fc-left .fc-button-group:first-child{margin-left:0}#upcoming-events-calendar .fc-list-item-add-to-calendar{color:var(--tertiary);font-size:var(--font-down-1)}.discourse-post-event{display:flex}.discourse-post-event .discourse-post-event-widget{border:5px solid var(--primary-low);display:flex;background:var(--secondary);margin:5px 0;flex-direction:column;flex:1 0 auto;max-width:100%;box-sizing:border-box}.discourse-post-event .discourse-post-event-widget .widget-dropdown{margin:0}.discourse-post-event .discourse-post-event-widget .widget-dropdown .widget-dropdown-header.disabled{pointer-events:none}.discourse-post-event .discourse-post-event-widget .widget-dropdown .widget-dropdown-item:not(.separator){padding:0.5em}.discourse-post-event .discourse-post-event-widget .widget-dropdown .widget-dropdown-item .d-icon+span{margin-left:0.5em}.discourse-post-event.is-loading{align-items:center;justify-content:center}.discourse-post-event.has-event{display:flex;flex-direction:column}.discourse-post-event .event-header{display:flex;align-items:center;padding:0 1em;height:75px}.discourse-post-event .event-header .more-dropdown{margin-left:auto;align-self:flex-start;margin-top:1em}.discourse-post-event .event-header .more-dropdown.has-no-actions{display:none}.discourse-post-event .event-header .more-dropdown .widget-dropdown .widget-dropdown-header .d-icon{margin:0}.discourse-post-event .event-header .more-dropdown .widget-dropdown .widget-dropdown-header .label{display:none}.discourse-post-event .event-header .more-dropdown .widget-dropdown .item-closeEvent .d-icon,.discourse-post-event .event-header .more-dropdown .widget-dropdown .item-closeEvent span{color:var(--danger)}.discourse-post-event .event-date{display:flex;flex-direction:column;width:auto;margin-right:1em}.discourse-post-event .event-date .month{text-align:center;color:red;font-size:var(--font-down-1);text-transform:uppercase}.discourse-post-event .event-date .day{text-align:center;font-weight:500;font-size:var(--font-up-2)}.discourse-post-event .event-info{display:flex;flex-direction:column}.discourse-post-event .event-info .name{font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:45vw}.discourse-post-event .event-info .status-and-creators{display:flex;align-items:center;color:var(--primary-medium);font-size:var(--font-down-1);margin:0.25em 0}.discourse-post-event .event-info .status-and-creators .separator{margin:0 0.25em}.discourse-post-event .event-info .status-and-creators .creators{display:flex;align-items:center}.discourse-post-event .event-info .status-and-creators .creators .event-creator{margin-left:0.25em}.discourse-post-event .event-info .status-and-creators .creators .event-creator .topic-invitee-avatar{display:flex;align-items:center}.discourse-post-event .event-info .status-and-creators .status.expired{color:var(--danger-medium)}.discourse-post-event .event-info .status-and-creators .status .d-icon{margin-right:0.5em}.discourse-post-event .event-actions{display:flex;justify-content:space-between;align-items:center;height:60px;padding:0 1em}.discourse-post-event .event-actions .event-status{margin:0}.discourse-post-event .event-actions .event-status.status-going .going-button .d-icon{color:var(--success)}.discourse-post-event .event-actions .event-status.status-interested .interested-button .d-icon{color:#fb985d}.discourse-post-event .event-actions .event-status.status-not_going .not-going-button .d-icon{color:var(--danger)}.discourse-post-event .event-creator .username{margin-left:0.25em}.discourse-post-event .event-invitees{display:flex;height:110px;padding:0 1em;align-items:flex-start;justify-content:center;overflow-y:auto;flex-direction:column}.discourse-post-event .event-invitees .header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1em;width:100%}.discourse-post-event .event-invitees .header .show-all{margin-left:0.5em}.discourse-post-event .event-invitees .header .event-invitees-status{font-weight:700}.discourse-post-event .event-invitees .header .event-invitees-status .invited{font-weight:500;color:var(--primary-medium)}.discourse-post-event .event-invitees .event-invitees-avatars{padding:0;margin:0;display:flex;flex-wrap:wrap;width:100%}.discourse-post-event .event-invitees .event-invitees-avatars .event-invitee{list-style:none;margin-right:0.5em;margin-bottom:0.5em;opacity:0.25}.discourse-post-event .event-invitees .event-invitees-avatars .event-invitee.status-going,.discourse-post-event .event-invitees .event-invitees-avatars .event-invitee.status-not_going,.discourse-post-event .event-invitees .event-invitees-avatars .event-invitee.status-interested{opacity:1}.discourse-post-event .event-invitees .event-invitees-avatars .event-invitee.status-going .avatar-flair{color:var(--success)}.discourse-post-event .event-invitees .event-invitees-avatars .event-invitee.status-not_going .avatar-flair{color:var(--danger)}.discourse-post-event .event-invitees .event-invitees-avatars .event-invitee.status-interested .avatar-flair{color:#fb985d}.discourse-post-event .event-invitees .event-invitees-avatars .topic-invitee-avatar{position:relative;display:inline-block}.discourse-post-event .event-invitees .event-invitees-avatars .topic-invitee-avatar .avatar-flair{position:absolute;right:0;bottom:0;background:var(--secondary);border-radius:50%;height:16px;width:16px;display:flex;align-items:center;justify-content:center;color:var(--primary-medium);border:1px solid var(--primary-low)}.discourse-post-event .event-invitees .event-invitees-avatars .topic-invitee-avatar .avatar-flair .d-icon{font-size:var(--font-down-3)}.discourse-post-event hr{margin:0}.discourse-post-event .event-url,.discourse-post-event .event-dates{display:flex;align-items:center;padding:0 1em;height:50px;flex:1}.discourse-post-event .event-url .d-icon,.discourse-post-event .event-dates .d-icon{color:var(--primary-high)}.discourse-post-event .event-url .url{margin-left:1em;max-width:80%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.discourse-post-event .event-dates .participants{margin-left:0.5em;color:var(--primary-medium)}.discourse-post-event .event-dates .date{color:var(--primary-high);margin-left:1em}.discourse-post-event .event-dates .date .discourse-local-date .d-icon{display:none}.discourse-post-event .event-dates .separator{color:var(--primary-high);margin:0 0.5em;text-align:center}.discourse-post-event-preview{background:var(--secondary);align-items:center;flex-direction:column;padding:0.5em;border:1px solid var(--primary-low);display:flex;flex:1 0 auto}.discourse-post-event-preview .event-preview-status{margin:0 0 0.5em 0}.discourse-post-event-preview .event-preview-dates{font-weight:700}.discourse-post-event-preview.alert-error{border-color:var(--danger-low-mid)}.discourse-post-event-preview+.discourse-post-event-preview{margin-top:1em}.mobile-view .discourse-post-event-builder-modal .modal-inner-container .modal-body .d-date-time-input-range{flex-direction:column;width:100%;border:0}.mobile-view .discourse-post-event-builder-modal .modal-inner-container .modal-body .d-date-time-input-range .d-date-time-input .d-date-input{width:100%}.mobile-view .discourse-post-event-builder-modal .modal-inner-container .modal-body .d-date-time-input-range .d-date-time-input .name{font-size:var(--font-down-1)}.mobile-view .discourse-post-event-builder-modal .modal-inner-container .modal-body .d-date-time-input-range .d-date-time-input.from{margin-right:2.65em}.mobile-view .discourse-post-event-builder-modal .modal-inner-container .modal-body .d-date-time-input-range .d-date-time-input.to{margin-top:0.5em}.discourse-post-event-builder-modal .modal-inner-container{width:550px}.discourse-post-event-builder-modal .modal-body{min-height:200px}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range{margin-bottom:2em;flex-direction:column}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .d-date-time-input{display:flex;justify-content:flex-start}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .select-kit-header{height:100%}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .d-date-input{box-sizing:border-box;flex:0}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .d-date-input .date-picker{width:155px}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .d-time-input .combo-box{width:130px}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .d-time-input .selected-name{border:0}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .d-time-input .selected-name .name{font-size:var(--font-down-1)}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .to.d-date-time-input .d-time-input{order:1}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .to.d-date-time-input .d-date-input{order:0}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .to.d-date-time-input .clear-date-time{order:2;margin-left:auto}.discourse-post-event-builder-modal .modal-body .d-date-time-input-range .to.d-date-time-input .pika-single.is-bound{left:-2px !important}.discourse-post-event-builder-modal .modal-footer{display:flex;justify-content:space-between;align-items:center}.discourse-post-event-builder-modal .event-field{display:flex;margin-bottom:2em;flex-direction:column}.discourse-post-event-builder-modal .event-field.name input,.discourse-post-event-builder-modal .event-field.url input{width:100%}.discourse-post-event-builder-modal .event-field .event-field-description{margin:0 0 0.5em 0}.discourse-post-event-builder-modal .event-field .event-field-label{display:flex;min-height:1px;padding-top:0;top:0;vertical-align:middle;align-items:center}.discourse-post-event-builder-modal .event-field .event-field-label .label{font-weight:700;margin-bottom:0.5em}.discourse-post-event-builder-modal .event-field .event-field-control{display:flex;flex:1;flex-direction:column}.discourse-post-event-builder-modal .event-field .event-field-control .select-kit.available-recurrences{width:100%}.discourse-post-event-builder-modal .event-field .event-field-control .custom-field-label{font-weight:500;margin:0.5em 0 0.25em 0}.discourse-post-event-builder-modal .event-field .event-field-control .custom-field-input{width:100%}.discourse-post-event-builder-modal .event-field .event-field-control .radio-label{display:flex;align-items:center;margin-bottom:1em}.discourse-post-event-builder-modal .event-field .event-field-control .radio-label:last-child{margin-bottom:0}.discourse-post-event-builder-modal .event-field .event-field-control .radio-label input[type="radio"]{width:auto;margin-right:0.5em}.discourse-post-event-builder-modal .event-field .event-field-control .radio-label .message{margin:0 0 0 1em;padding:0;display:flex;flex-direction:column}.discourse-post-event-builder-modal .event-field .event-field-control .radio-label .message .description{color:var(--primary-medium)}.discourse-post-event-builder-modal .event-field .event-field-control .ac-wrap{max-width:100%}.discourse-post-event-builder-modal .event-field .event-field-control input{margin:0}.discourse-post-event-builder-modal .event-field.reminders{display:flex}.discourse-post-event-builder-modal .event-field.reminders .reminders-list{display:flex;flex-direction:column;margin-bottom:1em}.discourse-post-event-builder-modal .event-field.reminders .reminders-list .reminder-item{display:flex;flex:1 0 auto;padding:0.25em 0}.discourse-post-event-builder-modal .event-field.reminders .reminders-list .reminder-item .select-kit-header{height:100%}.discourse-post-event-builder-modal .event-field.reminders .reminders-list .reminder-item .reminder-value{width:60px;margin-right:0.5em}.discourse-post-event-builder-modal .event-field.reminders .reminders-list .reminder-item .reminder-unit{width:140px;margin-right:0.5em}.discourse-post-event-builder-modal .event-field.reminders .reminders-list .reminder-item .reminder-period{width:100%;margin-right:0.5em}.discourse-post-event-builder-modal .event-field.reminders .reminders-list .reminder-item .remove-reminder{margin-left:auto}.discourse-post-event-builder-modal .event-field.reminders .add-reminder{align-self:flex-start}.discourse-post-event-invitees-modal .filter{width:100%}.discourse-post-event-invitees-modal .invitees{display:flex;padding:0;margin:0;flex-direction:column}.discourse-post-event-invitees-modal .invitees .invitee{list-style:none;display:flex;flex:1;padding:0.5em;justify-content:space-between;align-items:center;border-bottom:1px solid var(--primary-low)}.discourse-post-event-invitees-modal .invitees .invitee:last-child{border:none}.discourse-post-event-invitees-modal .invitees .invitee .user .username{margin-left:0.5em}.discourse-post-event-invitees-modal .invitees .invitee .status{margin-left:auto;margin-right:0.5em}.discourse-post-event-invitees-modal .invitees .invitee .status.going{color:var(--success)}.discourse-post-event-invitees-modal .invitees .invitee .status.not_going{color:var(--danger)}.discourse-post-event-upcoming-events .upcoming-events-table{width:100%}.discourse-post-event-upcoming-events .upcoming-events-table thead tr th{text-align:left}.discourse-post-event-upcoming-events .upcoming-events-table tbody tr td{padding:0.5em}.raw-topic-link .event-date-container,.header-title .event-date-container{display:inline-block;box-sizing:border-box}.raw-topic-link .event-date,.header-title .event-date{display:inline-flex;align-items:center;font-size:var(--font-down-2);border:1px solid var(--primary-medium);background:none;padding:0 0.25em;border-radius:3px;vertical-align:middle;margin-left:0.25em}.raw-topic-link .event-date .indicator,.header-title .event-date .indicator{display:flex;width:6px;height:6px;border-radius:3px;background:var(--success);margin-right:0.25em}.header-title .event-date{font-size:var(--font-down-4);color:var(--primary-medium);font-weight:normal;padding:0.25em}.discourse-post-event-bulk-invite .bulk-event-help{margin:0 0 1em 0}.discourse-post-event-bulk-invite .bulk-invite-rows{margin-bottom:1em}.discourse-post-event-bulk-invite .bulk-invite-row{display:flex;padding:0.25em 0}.discourse-post-event-bulk-invite .bulk-invite-row .bulk-invite-attendance{margin:0 0.5em}.discourse-post-event-bulk-invite .bulk-invite-row .bulk-invite-attendance .select-kit-header{height:100%}.discourse-post-event-bulk-invite .bulk-invite-row .remove-bulk-invite{margin-left:auto}.discourse-post-event-bulk-invite .bulk-invites{margin-bottom:2em}.discourse-post-event-bulk-invite .bulk-invites .bulk-invite-actions{display:flex}.discourse-post-event-bulk-invite .bulk-invites .bulk-invite-actions .add-bulk-invite{margin-left:auto}.discourse-post-event-bulk-invite .csv-bulk-invites .bulk-invite-actions{display:flex}.discourse-post-event-bulk-invite .csv-bulk-invites .bulk-invite-actions>:last-child{margin-left:0.5em} /*# sourceMappingURL=discourse-calendar_caa977791d50efc800b8ef1bcbafb8a15f082761.css.map */
5,426.625
43,218
0.789303
a9e184e50fbb6b34553adadc9418734dced4f4eb
424
php
PHP
application/libraries/Layout.php
vickyh007/admindemo
26c69d58e0ea8635950d19827e11140dcb5d7355
[ "MIT" ]
null
null
null
application/libraries/Layout.php
vickyh007/admindemo
26c69d58e0ea8635950d19827e11140dcb5d7355
[ "MIT" ]
null
null
null
application/libraries/Layout.php
vickyh007/admindemo
26c69d58e0ea8635950d19827e11140dcb5d7355
[ "MIT" ]
null
null
null
<?php class Layout { protected $_ci; function __construct() { $this->_ci = &get_instance(); } function display($template, $data = null) { $data['_menu'] = $this->_ci->load->view("template/menu", $data, true); $data['_footer'] = $this->_ci->load->view("template/footer", $data, true); $this->_ci->load->view($template, $data); } }
22.315789
83
0.504717
e80ff03f0fc297ed4c39e34a384f7e63682c389d
2,433
swift
Swift
169. Majority Element.swift
zhugejunwei/LeetCode
d3eeaaf2655740c924bcd39fcbcd088cd7b320ce
[ "MIT" ]
2
2016-08-30T00:15:15.000Z
2016-08-30T00:15:35.000Z
169. Majority Element.swift
zhugejunwei/LeetCode
d3eeaaf2655740c924bcd39fcbcd088cd7b320ce
[ "MIT" ]
null
null
null
169. Majority Element.swift
zhugejunwei/LeetCode
d3eeaaf2655740c924bcd39fcbcd088cd7b320ce
[ "MIT" ]
null
null
null
import Darwin // Using sort(), 452 ms func majorityElement(nums: [Int]) -> Int { var n = nums.sort() return n[n.count/2] } // Very nice solution, 40 ms // Is this Moore voting algorithm? class Solution { func majorityElement(nums: [Int]) -> Int { var major = nums[0] var count = 1 for i in 1..<nums.count { if count == 0 { major = nums[i] count += 1 }else if major == nums[i] { count += 1 }else { count -= 1 } } return major } } // Dictionary, 116 ms func majorityElement(nums: [Int]) -> Int { var count = [Int:Int]() // count[nums[i]:count] for i in 0..<nums.count { if count[nums[i]] != nil { count[nums[i]]! += 1 }else { count[nums[i]] = 1 } } let v = count.values.maxElement()! var a = count.filter{ $0.1 == v }.map{ $0.0 } return a[0] // return count.keysForValue(v)[0] // Using function below } /* // function 1 extension Dictionary where Value: Equatable { /// Returns all keys mapped to the specified value. /// ``` /// let dict = ["A": 1, "B": 2, "C": 3] /// let keys = dict.keysForValue(2) /// assert(keys == ["B"]) /// assert(dict["B"] == 2) /// ``` func keysForValue(value: Value) -> [Key] { return flatMap { (key: Key, val: Value) -> Key? in value == val ? key : nil } } } // function 2 func allKeysForValue<K, V : Equatable>(dict: [K : V], val: V) -> [K] { return dict.filter{ $0.1 == val }.map{ $0.0 } } */ // Bit manipulation, 116 ms func majorityElement(nums: [Int]) -> Int { let numBits = sizeof(Int) * 8 var bit = Array(count: numBits, repeatedValue: 0) for num in nums { for i in 0..<numBits { if (num>>(numBits-1-i) & 1) == 1 { bit[i] += 1 } } } var ret = 0 for i in 0..<numBits { bit[i] = bit[i]>nums.count/2 ? 1 : 0 ret += bit[i] * (1<<(numBits-1-i)) } return ret } // Bit Manipulation in a more Swifty way, 1160 ms func majorityElement(nums: [Int]) -> Int { let numBits = sizeof(Int) * 8 let bitCounts = (0 ..< numBits).map { i in nums.reduce(0) { $0 + ($1 >> i) & 1 } } let major = (0 ..< numBits).reduce(0) { $0 | (bitCounts[$1] > nums.count/2 ? 1 << $1 : 0) } return major }
22.95283
71
0.495273
a49213242e97ea6018c49d0ce09a6e7b3c9d112c
92
php
PHP
web/app/mu-plugins/typerocket-pro-v5/typerocket/vendor/typerocket/core/src/Exceptions/ModelNotFoundException.php
ttungbmt/wp_yensaoannest
ef569b9f4c368155e34eef1f977ea4e16ffedfc0
[ "MIT" ]
null
null
null
web/app/mu-plugins/typerocket-pro-v5/typerocket/vendor/typerocket/core/src/Exceptions/ModelNotFoundException.php
ttungbmt/wp_yensaoannest
ef569b9f4c368155e34eef1f977ea4e16ffedfc0
[ "MIT" ]
null
null
null
web/app/mu-plugins/typerocket-pro-v5/typerocket/vendor/typerocket/core/src/Exceptions/ModelNotFoundException.php
ttungbmt/wp_yensaoannest
ef569b9f4c368155e34eef1f977ea4e16ffedfc0
[ "MIT" ]
null
null
null
<?php namespace TypeRocket\Exceptions; class ModelNotFoundException extends \Exception { }
13.142857
47
0.815217
e754c4111d167ebbdb729c303d2eadc77cb1b9dd
1,131
php
PHP
footerinclude.php
chunjie-sam-liu/miRNASNP2
9502c7358d5bd1a3fef19512375f3fd2d248657f
[ "MIT" ]
null
null
null
footerinclude.php
chunjie-sam-liu/miRNASNP2
9502c7358d5bd1a3fef19512375f3fd2d248657f
[ "MIT" ]
1
2020-04-14T11:33:27.000Z
2020-04-14T11:33:27.000Z
footerinclude.php
chunjie-sam-liu/miRNASNP2
9502c7358d5bd1a3fef19512375f3fd2d248657f
[ "MIT" ]
null
null
null
<? ?> <div style="clear:both"></div> <div id="footer" > <table style="font-size:15px;" align="center"> <tr > <td style="text-align: center">Copyright &copy; <a href="http://bioinfo.life.hust.edu.cn" target=_blank>Guo Lab</a>, <!--<a href="http://bioinfo.hust.edu.cn/" target=_blank>Huibei Bioinformatics & Molecular Imaging Key Lab</a>,--> <a href="http://life.hust.edu.cn/" target="_blank">College of Life Science and Technology</a>, <a href="http://www.hust.edu.cn/" target=_blank>HUST</a>, China. </td> </tr> <tr> <td align="center" > Any comments and suggestions, please <a href="aboutus.php">contact us</a>. Last Modified: 2015-02-05 </td> </tr> </table> </div> <div style = "text-align:center; margin-top:10px;"> <script type="text/javascript" src="//ra.revolvermaps.com/0/0/6.js?i=0yukcjj0chq&amp;m=7&amp;s=320&amp;c=e63100&amp;cr1=ffffff&amp;f=arial&amp;l=0&amp;bv=90&amp;lx=-420&amp;ly=420&amp;hi=20&amp;he=7&amp;hc=a8ddff&amp;rs=80" async="async"></script> </div> </body> </html>
35.34375
255
0.595049
42b0fff36cbc9bb59aa0e4838909038bd6de02cf
659
lua
Lua
MMOCoreORB/bin/scripts/loot/custom_loot/items/crystals/force_crystal_windus_guile.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
18
2017-02-09T15:36:05.000Z
2021-12-21T04:22:15.000Z
MMOCoreORB/bin/scripts/loot/custom_loot/items/crystals/force_crystal_windus_guile.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
61
2016-12-30T21:51:10.000Z
2021-12-10T20:25:56.000Z
MMOCoreORB/bin/scripts/loot/custom_loot/items/crystals/force_crystal_windus_guile.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
71
2017-01-01T05:34:38.000Z
2022-03-29T01:04:00.000Z
force_crystal_windus_guile = { minimumLevel = 0, maximumLevel = -1, customObjectName = "Windu's Guile", directObjectTemplate = "object/tangible/component/weapon/lightsaber/lightsaber_module_force_crystal.iff", craftingValues = { {"mindamage",54,55,0}, {"maxdamage",84,85,0}, {"attackspeed",1,-1,5}, {"woundchance",4,8,5}, {"hitpoints",850,1700,0}, {"attackhealthcost",0,5,0}, {"attackactioncost",0,5,0}, {"attackmindcost",0,5,0}, {"forcecost",0,4,0}, {"color",20,20,0}, {"quality",7,7,0}, }, customizationStringNames = {}, customizationValues = {} } addLootItemTemplate("force_crystal_windus_guile", force_crystal_windus_guile)
27.458333
106
0.698027
4c6ea7aa41738272651780d0557b85de269fe220
107
sql
SQL
src/test/resources/META-INF/sql/NewsGroupCrudServiceImplTest_setUp.sql
vskurikhin/daybook
c6119805f29cc9396317161d1856b721bdb8503e
[ "Unlicense" ]
1
2020-03-31T17:22:22.000Z
2020-03-31T17:22:22.000Z
src/test/resources/META-INF/sql/NewsGroupDaoJpaTest_setUp.sql
vskurikhin/daybook
c6119805f29cc9396317161d1856b721bdb8503e
[ "Unlicense" ]
55
2020-01-31T13:17:47.000Z
2020-07-14T16:48:57.000Z
src/test/resources/META-INF/sql/NewsGroupDaoJpaTest_setUp.sql
vskurikhin/daybook
c6119805f29cc9396317161d1856b721bdb8503e
[ "Unlicense" ]
1
2021-07-09T18:11:12.000Z
2021-07-09T18:11:12.000Z
INSERT INTO db.db_news_group (id, "group") VALUES ('00000000-0000-0000-0000-000000000010', 'groupTest10');
53.5
106
0.757009
1bf069208860e0e5b9a82fc85e2567883c8c2912
442
rb
Ruby
config/routes.rb
VicPlushko/Rails-Herb-Garden
dc89ae1125ce21699a04b6621c1db4b0bd61a09a
[ "MIT" ]
null
null
null
config/routes.rb
VicPlushko/Rails-Herb-Garden
dc89ae1125ce21699a04b6621c1db4b0bd61a09a
[ "MIT" ]
null
null
null
config/routes.rb
VicPlushko/Rails-Herb-Garden
dc89ae1125ce21699a04b6621c1db4b0bd61a09a
[ "MIT" ]
null
null
null
Rails.application.routes.draw do root 'application#welcome' get '/signup', to: 'users#new' post '/signup', to: 'users#create' get '/home', to: 'users#home' get 'auth/:provider/callback', to: 'sessions#create' get '/login', to: 'sessions#new' post '/login', to: 'sessions#create' get '/logout', to: 'sessions#destroy' resources :users do resources :remedies end resources :herbs resources :remedies end
18.416667
54
0.658371
233d285df69178242e8c91635824c677d509c3b6
149
css
CSS
css/modulas.css
Sewar-web/lab-01
638716098972558ceaa232bc308cc27758e5ff2c
[ "MIT" ]
null
null
null
css/modulas.css
Sewar-web/lab-01
638716098972558ceaa232bc308cc27758e5ff2c
[ "MIT" ]
null
null
null
css/modulas.css
Sewar-web/lab-01
638716098972558ceaa232bc308cc27758e5ff2c
[ "MIT" ]
null
null
null
div{ border: 1px solid; text-align: center; justify-content: center; vertical-align: center; } body{ text-align: center; }
12.416667
28
0.604027
dd063d14c8c43db6a9a1a8af302be4ce0f04d29d
2,179
lua
Lua
scripts/zones/South_Gustaberg/npcs/qm2.lua
zircon-tpl/topaz
dc2f7e68e5ed84274976e8a787c29fe03eecc382
[ "FTL" ]
1
2021-10-30T11:30:33.000Z
2021-10-30T11:30:33.000Z
scripts/zones/South_Gustaberg/npcs/qm2.lua
zircon-tpl/topaz
dc2f7e68e5ed84274976e8a787c29fe03eecc382
[ "FTL" ]
2
2020-07-01T04:11:03.000Z
2020-07-02T03:54:24.000Z
scripts/zones/South_Gustaberg/npcs/qm2.lua
zircon-tpl/topaz
dc2f7e68e5ed84274976e8a787c29fe03eecc382
[ "FTL" ]
1
2020-07-01T05:31:49.000Z
2020-07-01T05:31:49.000Z
----------------------------------- -- Area: South Gustaberg -- NPC: ??? -- Involved in Quest: Smoke on the Mountain -- !pos 461 -21 -580 107 ----------------------------------- local ID = require("scripts/zones/South_Gustaberg/IDs") require("scripts/globals/npc_util") require("scripts/globals/quests") ----------------------------------- function onTrade(player, npc, trade) if not player:needToZone() then player:setCharVar("SGusta_Sausage_Timer", 0) end if player:getQuestStatus(BASTOK, tpz.quest.id.bastok.SMOKE_ON_THE_MOUNTAIN) == QUEST_ACCEPTED then if npcUtil.tradeHas(trade, 4372) then if player:getCharVar("SGusta_Sausage_Timer") == 0 then -- player puts sheep meat on the fire player:messageSpecial(ID.text.FIRE_PUT, 4372) player:confirmTrade() player:setCharVar("SGusta_Sausage_Timer", os.time() + 3456) -- 57 minutes 36 seconds, 1 Vana'diel Day player:needToZone(true) else -- message given if sheep meat is already on the fire player:messageSpecial(ID.text.MEAT_ALREADY_PUT, 4372) end end end end function onTrigger(player, npc) if not player:needToZone() then player:setCharVar("SGusta_Sausage_Timer", 0) end local sausageTimer = player:getCharVar("SGusta_Sausage_Timer") if player:getQuestStatus(BASTOK, tpz.quest.id.bastok.SMOKE_ON_THE_MOUNTAIN) ~= QUEST_AVAILABLE then if sausageTimer == 0 then player:messageSpecial(ID.text.FIRE_GOOD) elseif os.time() < sausageTimer then player:messageSpecial(ID.text.FIRE_LONGER, 4372) elseif player:getFreeSlotsCount() < 1 then player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, 4395) else player:setCharVar("SGusta_Sausage_Timer", 0) player:messageSpecial(ID.text.FIRE_TAKE, 4395) player:addItem(4395) end else player:messageSpecial(ID.text.NOTHING_OUT_OF_ORDINARY) end end function onEventUpdate(player, csid, option) end function onEventFinish(player, csid, option) end
35.721311
117
0.6324
b641949f0c4ede90c2da915c3cf570e75e446d27
1,395
rb
Ruby
controls/windows_smb.rb
juju4/windows-baseline
d11208e78fc9c78770015aba8c7d93fa7987ea77
[ "Apache-2.0" ]
4
2017-07-30T06:22:52.000Z
2020-12-04T19:07:02.000Z
controls/windows_smb.rb
juju4/windows-baseline
d11208e78fc9c78770015aba8c7d93fa7987ea77
[ "Apache-2.0" ]
1
2018-04-15T00:54:31.000Z
2018-04-15T01:48:34.000Z
controls/windows_smb.rb
juju4/windows-baseline
d11208e78fc9c78770015aba8c7d93fa7987ea77
[ "Apache-2.0" ]
1
2018-03-31T22:15:18.000Z
2018-03-31T22:15:18.000Z
# frozen_string_literal: true windows_smbv1 = input('windows_smbv1', value: true, description: 'Should we check that SMBv1 is disabled') windows_smbv1feature = input('windows_smbv1feature', value: true, description: 'Should we check that SMBv1 feature is removed') if windows_smbv1 title 'Windows SMB configuration' control 'smb-101' do impact 1.0 title 'Disable Old SMBv1' desc 'Ensure SMBv1 is disabled both as feature and through registry' ref url: 'https://www.us-cert.gov/ncas/current-activity/2017/01/16/SMB-Security-Best-Practices' ref url: 'https://support.microsoft.com/en-ca/help/2696547/how-to-enable-and-disable-smbv1,-smbv2,-and-smbv3-in-windows-vista,-windows-server-2008,-windows-7,-windows-server-2008-r2,-windows-8,-and-windows-server-2012' describe registry_key('HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters') do it { should exist } its('SMB1') { should eq 0 } end # no DSIM on default win10? # describe command('DSIM /online /get-feature /format-table | findstr /i SMB1Protocol | findstr Disabled') do # its('stdout') { should_not eq '' } # end if windows_smbv1feature describe powershell('Get-WindowsOptionalFeature -Online | where FeatureName -eq SMB1Protocol') do # Disabled or DisablePending its('stdout') { should include 'Disable' } end end end end
45
222
0.718996
fb333ca20c4d0fcd467078f7d6b005dd8c00b981
6,173
lua
Lua
client.lua
YT-BatOP/bShop
f45683617b0ac9d91cc237a67323063dfaa932ec
[ "MIT" ]
2
2021-06-25T13:56:58.000Z
2021-06-25T13:57:33.000Z
client.lua
YT-BatOP/bShop
f45683617b0ac9d91cc237a67323063dfaa932ec
[ "MIT" ]
null
null
null
client.lua
YT-BatOP/bShop
f45683617b0ac9d91cc237a67323063dfaa932ec
[ "MIT" ]
null
null
null
ESX = nil Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.Wait(100) end end) ------------ Création du Menu ----------- RMenu.Add('batop', 'main', RageUI.CreateMenu("Vendeur Illegal", "Fait toi plaisir !")) RMenu.Add('batop', 'illégal', RageUI.CreateSubMenu(RMenu:Get('batop', 'main'), "~r~Vendeur Illégal", "Les bonnes affaires")) RMenu.Add('batop', 'arme', RageUI.CreateSubMenu(RMenu:Get('batop', 'main'), "~r~Armes Illégal", "Les bonnes affaires")) Citizen.CreateThread(function() while true do RageUI.IsVisible(RMenu:Get('batop', 'main'), true, true, true, function() RageUI.Button("Vendeur Illégal", "~r~Attention c'est 100% illégal !", {RightLabel = "→→→"},true, function() end, RMenu:Get('batop', 'illégal')) RageUI.Button("Armes Illégal", "~r~Attention c'est 100% illégal !", {RightLabel = "→→→"},true, function() end, RMenu:Get('batop', 'arme')) end, function() end) RageUI.IsVisible(RMenu:Get('batop', 'illégal'), true, true, true, function() RageUI.Button("Cagoule", "~r~C'est sur il ne va rien voir !", {RightLabel = "~g~1 250$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:BuyCagoule') end end) RageUI.Button("Pilule de l'oublie", "~r~Cette pilule trop violente !", {RightLabel = "~g~10 000$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:BuyGHB') end end) RageUI.Button("LockPick", "~r~Ce petit truc est génial pour crocheter les portes !", {RightLabel = "~g~750$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:BuyLockPick') end end) RageUI.Button("Torche a plasma", "~r~Ce petit truc est génial pour crocheter les coffres forts !", {RightLabel = "~g~750$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:BuyTorche') end end) RageUI.Button("Chargeur", "~r~Chargeur d'arme qui est génial !", {RightLabel = "~g~50$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:Chargeur') end end) end, function() end) RageUI.IsVisible(RMenu:Get('batop', 'arme'), true, true, true, function() RageUI.Button("Couteau", "~r~Un couteau bien tranchant !", {RightLabel = "~g~1 500$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:Couteau') end end) RageUI.Button("Machette", "~r~Une machette bien aiguisée !", {RightLabel = "~g~2 000$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:Machette') end end) RageUI.Button("Batte", "~r~Une batte de baseball bien dur !", {RightLabel = "~g~1 000$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:Batte') end end) RageUI.Button("Poing Américain", "~r~Surprend ton adversaire et couche le !", {RightLabel = "~g~1 250$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:Poing') end end) RageUI.Button("Pétoire", "~r~Tir des petites balles pour des petits dégats !", {RightLabel = "~g~10 000$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:Petoire') end end) RageUI.Button("Pistolet", "~r~Tir des balles assez puissante pour tuer !", {RightLabel = "~g~45 000$"}, true, function(Hovered, Active, Selected) if (Selected) then TriggerServerEvent('batop:Pistolet') end end) end, function() end) Citizen.Wait(0) end end) ---------------------------------------- Position du Menu -------------------------------------------- local position = { {x = 781.70 , y = 1274.51, z = 361.28, } } Citizen.CreateThread(function() while true do Citizen.Wait(0) for k in pairs(position) do local plyCoords = GetEntityCoords(GetPlayerPed(-1), false) local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, position[k].x, position[k].y, position[k].z) if dist <= 1.1 then RageUI.Text({ message = "Appuyez sur [~b~E~w~] pour parler au ~r~Vendeur", time_display = 1 }) if IsControlJustPressed(1,51) then RageUI.Visible(RMenu:Get('batop', 'main'), not RageUI.Visible(RMenu:Get('batop', 'main'))) end end end end end) ------------------------------------- PEDS ------------------------------------------------------ Citizen.CreateThread(function() local hash = GetHashKey("g_m_m_chicold_01") while not HasModelLoaded(hash) do RequestModel(hash) Wait(20) end ped = CreatePed("PED_TYPE_CIVMALE", "g_m_m_chicold_01", 780.63, 1274.71, 360.33, 268.66, false, true) SetBlockingOfNonTemporaryEvents(ped, true) SetEntityInvincible(ped, true) FreezeEntityPosition(ped, true) end)
40.346405
179
0.513527
20e487ee8d2ab3218028386730fe09ba2154fe26
5,562
py
Python
Main.py
Ujjawal-K-Panchal/Movie-Recommendation-using-Restricted-Boltzmann-Machines
09fb56dec5312867bd8437db511056086de33a41
[ "BSD-3-Clause" ]
null
null
null
Main.py
Ujjawal-K-Panchal/Movie-Recommendation-using-Restricted-Boltzmann-Machines
09fb56dec5312867bd8437db511056086de33a41
[ "BSD-3-Clause" ]
null
null
null
Main.py
Ujjawal-K-Panchal/Movie-Recommendation-using-Restricted-Boltzmann-Machines
09fb56dec5312867bd8437db511056086de33a41
[ "BSD-3-Clause" ]
1
2021-01-15T10:56:16.000Z
2021-01-15T10:56:16.000Z
# -*- coding: utf-8 -*- """ Created on Fri Sep 27 15:54:52 2019 @author: Uchiha Madara. """ #importing the libraries. import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.parallel import torch.optim as optim import torch.autograd as variable from sklearn.model_selection import train_test_split from RBM import * #self made Restricted Boltzmann Machines class. from hyperopt import * #importing the dataset and specifying some required variables. training_set = pd.read_csv('ml-100k/u1.base', delimiter = '\t').values test_set = pd.read_csv('ml-100k/u1.test',delimiter = '\t').values test_set, val_set = train_test_split(test_set, test_size = 0.5, random_state = 42) nb_users = int(max(max(training_set[:,0]), max(test_set[:,0]))) nb_movies = int(max(max(training_set[:,1]), max(test_set[:,1]))) #converting the dataset to plausible format. (each row = user, each column movie = -1 if not rated, 0 if disliked, 1 if liked.) def convert(data): l0 = [] for user in range(nb_users): l1 = np.zeros(nb_movies) usrs_movies = data[:,1][data[:,0] == user] l1[usrs_movies-1] = data[:,2][data[:,0] == user] l0.append(list(l1)) l0 = torch.FloatTensor(l0) data[data == 0] = -1 data[data == 1] = 0 data[data == 2] = 0 data[data == 3] = 1 data[data >= 4 ] = 1 return l0 #converting our sets according to given function. training_set = convert(training_set) test_set = convert(test_set) val_set = convert(val_set) #Making our RBM and tuning hyperparameters. #Description of Hparams taken by the train_rbm: #nv = nb_movies #nh = 200 (200 features to learn). #batch_size = 128 (no. of training examples to take for batch learning). #epochs = 20 (no. of iterations through the training set). #rbm = RBM(nv, nh) (Object declaration of the RBM class). #Function to get accuracy on the cross-validation set of the dataset. def validate_rbm(rbm): test_loss_mae = 0.0 s = 0.0 for user in range(nb_users): v = training_set[user:user+1] v0 = test_set[user:user+1] if(len(v0[v0>=0]) > 0): _,h = rbm.sample_h(v) _,v = rbm.sample_v(h) test_loss_mae += torch.mean(torch.abs(v0[v0 >=0 ] - v[v0 >=0])) s+=1.0 return float(test_loss_mae/s) #Function to train the RBM based on given Hparams. def train_rbm(nv, nh, batch_size, epochs,val_set, gibbs_sampling_nb, rbm = None): if(rbm == None): rbm = RBM(nv, nh) for epoch in range(1, epochs+1): training_loss = 0 s = 0.0 for user in range(0, nb_users-batch_size, batch_size): vk = val_set[user:user+batch_size] v0 = val_set[user:user+batch_size] for sample in range(gibbs_sampling_nb): _,hk = rbm.sample_h(vk) _,vk = rbm.sample_v(hk) vk[v0 <0] = v0[v0 <0] phk,_ = rbm.sample_h(vk) ph0,_ = rbm.sample_h(v0) rbm.train(v0,vk,ph0,phk) training_loss += torch.mean(torch.abs(v0[v0 >=0 ] - vk[v0 >=0])) s+=1 # print("Epoch:", epoch, "Training Loss:", training_loss/s) return float(training_loss/s),rbm #Defining the Hparam space. space = { 'nh' : hp.choice('nh', [int (x) for x in range(100,500,50)]), 'batch_size' : hp.choice('batch_size',[int (x) for x in range(32, 256, 16)]), 'epochs' : hp.choice('epochs', [int (x) for x in range(10,50,10)]), 'gibbs_sampling_nb' : hp.choice( 'gibbs_sampling_nb', [int (x) for x in range(5,30,5)]) } #The function to optimize by training on specific hparams and then getting the optimization #cost by validate_rbm() function. def RBM_opt_fn(space): nv = nb_movies nh = space['nh'] batch_size = space['batch_size'] epochs = space['epochs'] gibbs_sampling_nb = space['gibbs_sampling_nb'] val_train,rbm = train_rbm(nv, nh, batch_size, epochs,training_set, gibbs_sampling_nb) val = validate_rbm(rbm) print('Hyperopt Loss:',val, 'nh:', nh, 'batsz:',batch_size, 'ep:',epochs, 'gsnb:', gibbs_sampling_nb ) return{'loss' : val , 'status' : STATUS_OK} #getting the best params using hyperopt class. trials = Trials() best = fmin( fn = RBM_opt_fn, space = space, algo = tpe.suggest, max_evals = 100, trials = trials ) print(best) #best params : nh = 100, bs = 80, epochs = 40, gsnb = 5. # training_loss = 0 # s = 0.0 # for user in range(0, nb_users-batch_size, batch_size): # vk = training_set[user:user+batch_size] # v0 = training_set[user:user+batch_size] # for sample in range(gibbs_sampling_nb): # _,hk = rbm.sample_h(vk) # _,vk = rbm.sample_v(hk) # vk[v0 <0] = v0[v0 <0] # phk,_ = rbm.sample_h(vk) # ph0,_ = rbm.sample_h(v0) # rbm.train(v0,vk,ph0,phk) # training_loss += torch.mean(torch.abs(v0[v0 >=0 ] - vk[v0 >=0])) # s+=1 # print("Epoch:", epoch, "Training Loss:", training_loss/s) #Testing the RBM against the test set. test_loss_mae = 0.0 s = 0.0 for user in range(nb_users): v = training_set[user:user+1] v0 = test_set[user:user+1] if(len(v0[v0>=0]) > 0): _,h = rbm.sample_h(v) _,v = rbm.sample_v(h) test_loss_mae += torch.mean(torch.abs(v0[v0 >=0 ] - v[v0 >=0])) s+=1.0 print("Test Loss Mean Absolute Error:", test_loss_mae/s)
36.352941
127
0.609313
0b18df6b15811ce31a617edc159b13e235045667
1,596
lua
Lua
uid/core/machine_id.lua
NaraLuwan/openresty-api-gateway
56fb3f965f1be7a5e008e54fa23ad3fd3e99d1f3
[ "Apache-2.0" ]
3
2021-02-25T06:33:56.000Z
2021-06-02T06:06:10.000Z
uid/core/machine_id.lua
NaraLuwan/openresty-api-gateway
56fb3f965f1be7a5e008e54fa23ad3fd3e99d1f3
[ "Apache-2.0" ]
1
2021-05-29T17:02:50.000Z
2021-08-16T11:39:39.000Z
uid/core/machine_id.lua
NaraLuwan/openresty-api-gateway
56fb3f965f1be7a5e008e54fa23ad3fd3e99d1f3
[ "Apache-2.0" ]
1
2021-06-02T06:06:25.000Z
2021-06-02T06:06:25.000Z
-- Author: L -- Date: 2021-02-18 -- 获取机器ID值,为16-bit数值 local require = require local ngx = ngx local tonumber = tonumber local bit = require("bit") local bor = bit.bor local lshift = bit.lshift local ip_util = require("utils.ip_hostname_util") local base_util = require("utils.base_util") local _M = { version = 0.1 } -- 获取本机机器ID,16-bit -- 使用IPv4的最后两位 function _M.id_from_ipv4() local ipv4 = ip_util.get_ipv4() if (not ipv4) then return nil end local a, b, c, d = ipv4:match("^(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)$") if not a then return nil end c, d = tonumber(c), tonumber(d) -- 合并为16bit数值 local machine_id = bor(lshift(c, 8), d) ngx.log(ngx.NOTICE, "==== Gen machine id: " .. machine_id) return machine_id end -- 获取本机机器ID,7-bit,最大127个 -- 使用ID文件中的定义ID值 function _M.id_from_identity_file(id_file) local is_exist = base_util.is_file_exist(id_file) if not is_exist then ngx.log(ngx.ERR, "==== There is no id_file: " .. id_file) -- 期望服务退出 end local id = base_util.read_file(id_file) if not id then ngx.log(ngx.ERR, "==== Failed to get id from id_file: " .. id_file) -- 期望服务退出 end return id end -- 获取重启次数 function _M.fetch_reboot_num(reboot_num_file) local reboot_num = base_util.read_file(reboot_num_file) if not reboot_num then reboot_num = 0 ngx.log(ngx.NOTICE, "==== Failed to get reboot_num from file: " .. reboot_num_file) end base_util.write_file(reboot_num_file, (reboot_num + 1)) return reboot_num end return _M
23.470588
91
0.642231
33aefcdbdd5524e5196c30bb7b9ec3700fd3e859
1,087
h
C
positionedit.h
aethertap/lobocnc
35954afc9c7355a3e84e0b47ac39d0f1d6c2ed38
[ "MIT" ]
null
null
null
positionedit.h
aethertap/lobocnc
35954afc9c7355a3e84e0b47ac39d0f1d6c2ed38
[ "MIT" ]
null
null
null
positionedit.h
aethertap/lobocnc
35954afc9c7355a3e84e0b47ac39d0f1d6c2ed38
[ "MIT" ]
null
null
null
//--------------------------------------------------------------------------- #ifndef positioneditH #define positioneditH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> //--------------------------------------------------------------------------- class TPositionEditForm : public TForm { __published: // IDE-managed Components TButton *OKButton; TButton *CancelButton; TEdit *PosEdit; TLabel *Label1; void __fastcall OKButtonClick(TObject *Sender); void __fastcall CancelButtonClick(TObject *Sender); void __fastcall FormShow(TObject *Sender); private: // User declarations public: // User declarations __fastcall TPositionEditForm(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TPositionEditForm *PositionEditForm; //--------------------------------------------------------------------------- #endif
37.482759
78
0.446182
0aefc54ca5f41f02f295228ac44a6e5918f85716
24,611
cs
C#
h73.Elastic.Core/ElasticIndexer.cs
henskjold73/h73.Elastic.Core
01179c4f2a61680e73583a9584e6f4a8e92f8d4b
[ "MIT" ]
1
2020-11-09T07:49:01.000Z
2020-11-09T07:49:01.000Z
h73.Elastic.Core/ElasticIndexer.cs
henskjold73/h73.Elastic.Core
01179c4f2a61680e73583a9584e6f4a8e92f8d4b
[ "MIT" ]
null
null
null
h73.Elastic.Core/ElasticIndexer.cs
henskjold73/h73.Elastic.Core
01179c4f2a61680e73583a9584e6f4a8e92f8d4b
[ "MIT" ]
null
null
null
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; using Elasticsearch.Net; using h73.Elastic.Core.Actions; using h73.Elastic.Core.Helpers; using h73.Elastic.Core.Json; using h73.Elastic.Core.Response; using h73.Elastic.Core.Server; using h73.Elastic.TypeMapping; using Newtonsoft.Json; namespace h73.Elastic.Core { /// <summary> /// Class used for creating and deleting index, and indexing objects /// </summary> public class ElasticIndexer<T> where T : class, new() { private readonly ElasticClient _client; public ElasticIndexer(){} public ElasticIndexer(ElasticClient client, JsonSerializerSettings serializerSettings = null) { _client = client; SerializerSettings = serializerSettings ?? JsonHelpers.CreateSerializerSettings(); } /// <summary> /// Create index from tenantId and Type /// </summary> /// <param name="tenantId">TenantId</param> /// <param name="shards">number of index shards</param> /// <param name="replicas">number of replicas</param> /// <param name="typeMapping">typeMapping</param> /// <typeparam name="T">Type of T</typeparam> /// <returns>Acknowledgment</returns> public Acknowledgment CreateIndex(TypeMapping<T> typeMapping, int shards = 3, int replicas = 2) { var indexName = ServerHelpers.CreateIndexName<T>(_client.TenantId); return CreateIndex(indexName, typeMapping, shards, replicas); } /// <summary> /// Create index with the given name /// </summary> /// <param name="name">name of the index</param> /// <param name="shards">number of index shards</param> /// <param name="replicas">number of replicas</param> /// <param name="typeMapping">typeMapping</param> /// <typeparam name="T">Type of T</typeparam> /// <returns>Acknowledgment</returns> public Acknowledgment CreateIndex(string name, TypeMapping<T> typeMapping, int shards = 3, int replicas = 2) { name = name.ToLower(); var shardSettings = new ShardsSettings(shards, replicas); var post = typeMapping != null ? JsonConvert.SerializeObject(new { settings = shardSettings.Settings, mappings = typeMapping }) : JsonConvert.SerializeObject(shardSettings); var response = _client.Client.DoRequest<StringResponse>(HttpMethod.PUT, name, post); var acknowledgment = new Acknowledgment(); if (response.Success) { acknowledgment = JsonConvert.DeserializeObject<Acknowledgment>(response.Body); } return acknowledgment; } /// <summary> /// Create index with the given name /// </summary> /// <param name="name">name of the index</param> /// <param name="shards">number of index shards</param> /// <param name="replicas">number of replicas</param> /// <returns>Acknowledgment</returns> public Acknowledgment CreateIndex(string name, int shards = 3, int replicas = 2) { var shardSettings = new ShardsSettings(shards, replicas); var post = JsonConvert.SerializeObject(shardSettings); var response = _client.Client.DoRequest<StringResponse>(HttpMethod.PUT, name, post); var acknowledgment = new Acknowledgment(); if (response.Success) { acknowledgment = JsonConvert.DeserializeObject<Acknowledgment>(response.Body); } return acknowledgment; } /// <summary> /// Delete an index with the given name /// </summary> /// <param name="name">index name</param> /// <returns>Acknowledgment</returns> public Acknowledgment DeleteIndex(string name) { var response = _client.Client.DoRequest<StringResponse>(HttpMethod.DELETE, name); var acknowledgment = new Acknowledgment(); if (response.Success) { acknowledgment = JsonConvert.DeserializeObject<Acknowledgment>(response.Body); } return acknowledgment; } /// <summary> /// Gets or sets the serializer settings. /// </summary> /// <value> /// The serializer settings. /// </value> public JsonSerializerSettings SerializerSettings { get; set; } /// <summary> /// Indexes the specified object. /// </summary> /// <typeparam name="T">Type</typeparam> /// <param name="obj">The object.</param> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>StringResponse</returns> public StringResponse Index(T obj, Guid? id = null, string index = null) { return Index<T>(obj, id, index); } /// <summary> /// Indexes the specified object. /// </summary> /// <typeparam name="T2">Type</typeparam> /// <param name="obj">The object.</param> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>StringResponse</returns> public StringResponse Index<T2>(T2 obj, Guid? id = null, string index = null) where T2 : class { if (id == null) { id = Guid.NewGuid(); } var body = JsonConvert.SerializeObject(obj, SerializerSettings); var type = obj.GetType().FullName; // TODO : Remove if test passes return _client.Client.Index<StringResponse>(ServerHelpers.CreateIndexName<T2>(_client.TenantId), id.ToString(), body); } /// <summary> /// Indexes the asynchronous. /// </summary> /// <typeparam name="T2">Type</typeparam> /// <param name="obj">The object.</param> /// <param name="id">The identifier.</param> /// <param name="debug">if set to <c>true</c> [debug].</param> /// <returns>StringResponse</returns> public async Task<StringResponse> IndexAsync<T2>(T2 obj, string id, bool debug = false, TypeMapping<T> tmap = null) where T2 : class { var type = obj.GetType().FullName; var body = JsonConvert.SerializeObject(obj, SerializerSettings); var typeFullName = obj.GetType().FullName; if (typeFullName == null) { return new StringResponse(); } var indexName = ServerHelpers.CreateIndexName<T2>(_client.TenantId); if (_client.IndexExists(indexName)) { return await _client.Client.IndexAsync<StringResponse>(indexName, id, body); } Logging.WriteDebug($"IndexBulk - Creating {indexName}", debug); CreateIndex(indexName, tmap); return await _client.Client.IndexAsync<StringResponse>(indexName, id, body); } /// <summary> /// Indexes the asynchronous. /// </summary> /// <typeparam name="T">Type</typeparam> /// <param name="obj">The object.</param> /// <param name="id">The identifier.</param> /// <param name="debug">if set to <c>true</c> [debug].</param> /// <returns>StringResponse</returns> public async Task<StringResponse> IndexAsync(T obj, Guid? id = null, bool debug = false, TypeMapping<T> tmap = null) { if (id == null) { id = Guid.NewGuid(); } return await IndexAsync(obj, id.ToString(), debug, tmap); } /// <summary> /// Indexes the json asynchronous. /// </summary> /// <param name="obj">The object.</param> /// <param name="typeFullName">Full name of the type.</param> /// <param name="id">The identifier.</param> /// <param name="debug">if set to <c>true</c> [debug].</param> /// <returns>StringResponse</returns> public async Task<StringResponse> IndexJsonAsync(string obj, string typeFullName, Guid? id = null, bool debug = false) { if (id == null) { id = Guid.NewGuid(); } if (typeFullName == null) { return new StringResponse(); } var indexName = ServerHelpers.CreateIndexName(_client.TenantId, typeFullName); if (_client.IndexExists(indexName)) { return await _client.Client.IndexAsync<StringResponse>(indexName, id.ToString(), obj); } Logging.WriteDebug($"IndexBulk - Creating {indexName}", debug); CreateIndex(indexName); return await _client.Client.IndexAsync<StringResponse>(indexName, id.ToString(), obj); } /// <summary> /// Deletes the asynchronous. /// </summary> /// <typeparam name="T">Type</typeparam> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>DocResponse</returns> public async Task<DocResponse> DeleteAsync(Guid id, string index = null) { return await DeleteAsync<T>(id, index); } /// <summary> /// Deletes the asynchronous. /// </summary> /// <typeparam name="T2">Type</typeparam> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>DocResponse</returns> public async Task<DocResponse> DeleteAsync<T2>(Guid id, string index = null) where T2 : class { var type = typeof(T).FullName; if (type == null) { return new DocResponse {Result = "Type was not found."}; } if (string.IsNullOrEmpty(index)) { index = ServerHelpers.CreateIndexName<T2>(_client.TenantId); } var response = await _client.Client.DeleteAsync<StringResponse>(index, id.ToString()); return JsonConvert.DeserializeObject<DocResponse>(response.Body); } /// <summary> /// Deletes the specified identifier. /// </summary> /// <typeparam name="T">Type</typeparam> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>DocResponse</returns> public DocResponse Delete(Guid id, string index = null) { return Delete<T>(id, index); } /// <summary> /// Deletes the specified identifier. /// </summary> /// <typeparam name="T2">Type</typeparam> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>DocResponse</returns> public DocResponse Delete<T2>(Guid id, string index = null) where T2 : class { var type = typeof(T).FullName; if (type == null) { return new DocResponse {Result = "Type was not found."}; } if (string.IsNullOrEmpty(index)) { index = ServerHelpers.CreateIndexName<T2>(_client.TenantId); } var response = _client.Client.Delete<StringResponse>(index, id.ToString()); return JsonConvert.DeserializeObject<DocResponse>(response.Body); } /// <summary> /// Deletes the specified type. /// </summary> /// <param name="type">The type.</param> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>DocResponse</returns> public DocResponse Delete(Type type, Guid id, string index = null) { if (type == null || type.FullName == null) { return new DocResponse {Result = "Type was not found."}; } if (string.IsNullOrEmpty(index)) { index = ServerHelpers.CreateIndexName(_client.TenantId, type.FullName); } var t = type.FullName; var response = _client.Client.Delete<StringResponse>(index, id.ToString()); return JsonConvert.DeserializeObject<DocResponse>(response.Body); } /// <summary> /// Deletes the asynchronous. /// </summary> /// <param name="type">The type.</param> /// <param name="id">The identifier.</param> /// <param name="index">The index.</param> /// <returns>DocResponse</returns> public async Task<DocResponse> DeleteAsync(Type type, Guid id, string index = null) { if (type == null || type.FullName == null) { return new DocResponse {Result = "Type was not found."}; } if (string.IsNullOrEmpty(index)) { index = ServerHelpers.CreateIndexName(_client.TenantId, type.FullName); } var t = type.FullName; var response = await _client.Client.DeleteAsync<StringResponse>(index, id.ToString()); return JsonConvert.DeserializeObject<DocResponse>(response.Body); } /// <summary> /// Indexes a collection of objects. /// </summary> /// <typeparam name="T">Type</typeparam> /// <param name="objects">The objects.</param> /// <param name="idExpression">The identifier expression.</param> /// <param name="bulkSize">Size of the bulk.</param> /// <param name="typeExpression">The type expression.</param> /// <param name="continueOnError">if set to <c>true</c> [continue on error].</param> /// <param name="debug">if set to <c>true</c> [debug].</param> /// <returns>List&lt;BulkResponse&gt;</returns> public List<BulkResponse> IndexBulk( IEnumerable<T> objects, Expression<Func<T, string>> idExpression, int bulkSize, Expression<Func<T, Type>> typeExpression = null, bool continueOnError = false, bool debug = false) { return IndexBulk<T>(objects, idExpression,bulkSize,typeExpression,continueOnError,debug); } /// <summary> /// Indexes a collection of objects. /// </summary> /// <typeparam name="T2">Type</typeparam> /// <param name="objects">The objects.</param> /// <param name="idExpression">The identifier expression.</param> /// <param name="bulkSize">Size of the bulk.</param> /// <param name="typeExpression">The type expression.</param> /// <param name="continueOnError">if set to <c>true</c> [continue on error].</param> /// <param name="debug">if set to <c>true</c> [debug].</param> /// <returns>List&lt;BulkResponse&gt;</returns> public List<BulkResponse> IndexBulk<T2>( IEnumerable<T2> objects, Expression<Func<T2, string>> idExpression, int bulkSize, Expression<Func<T2, Type>> typeExpression = null, bool continueOnError = false, bool debug = false) where T2 : class { var output = new List<BulkResponse>(); var typeGroups = objects.GroupBy(typeExpression?.Compile() ?? (x => x.GetType())); foreach (var typeGroup in typeGroups) { var typeFullName = typeGroup.Key.FullName; var enumerable = typeGroup.ToArray(); if (typeFullName == null) { continue; } var indexName = ServerHelpers.CreateIndexName<T2>(_client.TenantId); Logging.WriteDebug($"IndexBulk - {indexName}", debug); if (!_client.IndexExists(indexName)) { Logging.WriteDebug($"IndexBulk - Creating {indexName}", debug); CreateIndex(indexName); } var objectsCount = enumerable.Length; var bulkCount = (objectsCount / bulkSize) + (objectsCount % bulkSize != 0 ? 1 : 0); Logging.WriteDebug($"IndexBulk - {typeFullName.ToLower()} - BulkCount {bulkCount}", debug); var func = idExpression.Compile(); for (var bulkNo = 0; bulkNo < bulkCount; bulkNo++) { output.Add(IndexBulk(indexName, func, enumerable.Skip(bulkNo * bulkSize).Take(bulkSize), typeExpression, continueOnError)); Logging.WriteDebug($"IndexBulk - {typeFullName.ToLower()} - Batch:{bulkNo}/{bulkCount}", debug); } } return output; } /// <summary> /// Indexes a collection of objects async. /// </summary> /// <typeparam name="T">Type</typeparam> /// <param name="objects">The objects.</param> /// <param name="idExpression">The identifier expression.</param> /// <param name="bulkSize">Size of the bulk.</param> /// <param name="typeExpression">The type expression.</param> /// <param name="continueOnError">if set to <c>true</c> [continue on error].</param> /// <param name="debug">if set to <c>true</c> [debug].</param> /// <returns>List&lt;BulkResponse&gt;</returns> public async Task<List<BulkResponse>> IndexBulkAsync( IEnumerable<T> objects, Expression<Func<T, string>> idExpression, int bulkSize, Expression<Func<T, Type>> typeExpression = null, bool continueOnError = false, bool debug = false) { return await IndexBulkAsync<T>(objects, idExpression,bulkSize,typeExpression,continueOnError,debug); } /// <summary> /// Indexes a collection of objects async. /// </summary> /// <typeparam name="T2">Type</typeparam> /// <param name="objects">The objects.</param> /// <param name="idExpression">The identifier expression.</param> /// <param name="bulkSize">Size of the bulk.</param> /// <param name="typeExpression">The type expression.</param> /// <param name="continueOnError">if set to <c>true</c> [continue on error].</param> /// <param name="debug">if set to <c>true</c> [debug].</param> /// <returns>List&lt;BulkResponse&gt;</returns> public async Task<List<BulkResponse>> IndexBulkAsync<T2>( IEnumerable<T2> objects, Expression<Func<T2, string>> idExpression, int bulkSize, Expression<Func<T2, Type>> typeExpression = null, bool continueOnError = false, bool debug = false) where T2 : class { var output = new List<BulkResponse>(); var typeGroups = objects.GroupBy(typeExpression?.Compile() ?? (x => x.GetType())); foreach (var typeGroup in typeGroups) { var typeFullName = typeGroup.Key.FullName; var enumerable = typeGroup.ToArray(); if (typeFullName == null) { continue; } var indexName = ServerHelpers.CreateIndexName<T2>(_client.TenantId); Logging.WriteDebug($"IndexBulk - {indexName}", debug); if (!_client.IndexExists(indexName)) { Logging.WriteDebug($"IndexBulk - Creating {indexName}", debug); CreateIndex(indexName); } var objectsCount = enumerable.Length; var bulkCount = (objectsCount / bulkSize) + (objectsCount % bulkSize != 0 ? 1 : 0); Logging.WriteDebug($"IndexBulk - {typeFullName.ToLower()} - BulkCount {bulkCount}", debug); var func = idExpression.Compile(); for (var bulkNo = 0; bulkNo < bulkCount; bulkNo++) { output.Add(await IndexBulkAsync(indexName, func, enumerable.Skip(bulkNo * bulkSize).Take(bulkSize), typeExpression, continueOnError)); Logging.WriteDebug($"IndexBulk - {typeFullName.ToLower()} - Batch:{bulkNo}/{bulkCount}", debug); } } return output; } private static BulkResponse HandleResponse(ElasticsearchResponse<string> response, bool continueOnError = false) { if (response.Success) { return JsonConvert.DeserializeObject<BulkResponse>(response.Body); } if (continueOnError) { return new BulkResponse { Errors = true, OriginalException = response.OriginalException.Message, Body = response.Body }; } throw response.OriginalException; } private async Task<BulkResponse> IndexBulkAsync<T2>(string useIndex, Func<T2, string> func, IEnumerable<T2> bulk, Expression<Func<T2, Type>> typeExpression, bool continueOnError = false) where T2 : class { var bulkArray = bulk as T2[] ?? bulk.ToArray(); var s = CreateBulkFrom(useIndex, func, bulkArray, typeExpression); var response = await _client.Client.DoRequestAsync<StringResponse>(HttpMethod.POST, "_bulk", CancellationToken.None, s); if (response.HttpStatusCode != 413 || !continueOnError) { return HandleResponse(response, continueOnError); } var enumerable2 = bulk as T2[] ?? bulkArray.ToArray(); var bulkSize = enumerable2.Length / 10; for (var bulkNo = 0; bulkNo < 11; bulkNo++) { await IndexBulkAsync(useIndex, func, enumerable2.Skip(bulkNo * bulkSize).Take(bulkSize), typeExpression, true); } return HandleResponse(response, true); } private BulkResponse IndexBulk<T2>(string useIndex, Func<T2, string> func, IEnumerable<T2> bulk, Expression<Func<T2, Type>> typeExpression, bool continueOnError = false) where T2 : class { var bulkArray = bulk as T2[] ?? bulk.ToArray(); var s = CreateBulkFrom(useIndex, func, bulkArray, typeExpression); var response = _client.Client.DoRequest<StringResponse>(HttpMethod.POST, "_bulk", s); if (response.HttpStatusCode != 413 || !continueOnError) { return HandleResponse(response, continueOnError); } var enumerable2 = bulk as T2[] ?? bulkArray.ToArray(); var bulkSize = enumerable2.Length / 10; for (var bulkNo = 0; bulkNo < 11; bulkNo++) { IndexBulk(useIndex, func, enumerable2.Skip(bulkNo * bulkSize).Take(bulkSize), typeExpression, true); } return HandleResponse(response, true); } private string CreateBulkFrom<T2>(string useIndex, Func<T2, string> func, IEnumerable<T2> bulk, Expression<Func<T2, Type>> typeExpression) where T2 : class { var currentBulk = GetBulk(useIndex, func, bulk, typeExpression); var s = $"{string.Join("\n", currentBulk)}\n"; return s; } private IEnumerable<string> GetBulk<T2>(string useIndex, Func<T2, string> func, IEnumerable<T2> bulk, Expression<Func<T2, Type>> typeExpression) where T2 : class { if (typeExpression == null) { typeExpression = arg => arg.GetType(); } return bulk.Select(doc => new BulkOperation<T2>( new BulkAction(func(doc), useIndex, typeExpression.Compile().Invoke(doc).FullName), doc)) .Select(o => JsonConvert.SerializeObject(o.Item1) + "\n" + JsonConvert.SerializeObject(o.Item2, SerializerSettings)); } } }
40.679339
140
0.558693
b04b847bc3542d28c976974320c0c019767bfc4b
4,637
py
Python
tempest/tests/lib/services/network/test_qos_client.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
254
2015-01-05T19:22:52.000Z
2022-03-29T08:14:54.000Z
tempest/tests/lib/services/network/test_qos_client.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
13
2015-03-02T15:53:04.000Z
2022-02-16T02:28:14.000Z
tempest/tests/lib/services/network/test_qos_client.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
367
2015-01-07T15:05:39.000Z
2022-03-04T09:50:35.000Z
# Copyright (c) 2019 Ericsson # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import copy from tempest.lib.services.network import qos_client from tempest.tests.lib import fake_auth_provider from tempest.tests.lib.services import base class TestQosClient(base.BaseServiceTest): FAKE_QOS_POLICY_ID = "f1011b08-1297-11e9-a1e7-c7e6825a2616" FAKE_QOS_POLICY_REQUEST = { 'name': 'foo', 'shared': True } FAKE_QOS_POLICY_RESPONSE = { 'policy': { "name": "10Mbit", "description": "This policy limits the ports to 10Mbit max.", "rules": [], "id": FAKE_QOS_POLICY_ID, "is_default": False, "project_id": "8d4c70a21fed4aeba121a1a429ba0d04", "revision_number": 1, "tenant_id": "8d4c70a21fed4aeba121a1a429ba0d04", "created_at": "2018-04-03T21:26:39Z", "updated_at": "2018-04-03T21:26:39Z", "shared": False, "tags": ["tag1,tag2"] } } FAKE_QOS_POLICIES = { 'policies': [ FAKE_QOS_POLICY_RESPONSE['policy'] ] } def setUp(self): super(TestQosClient, self).setUp() fake_auth = fake_auth_provider.FakeAuthProvider() self.qos_client = qos_client.QosClient( fake_auth, "network", "regionOne") def _test_create_qos_policy(self, bytes_body=False): self.check_service_client_function( self.qos_client.create_qos_policy, "tempest.lib.common.rest_client.RestClient.post", self.FAKE_QOS_POLICY_RESPONSE, bytes_body, 201, **self.FAKE_QOS_POLICY_REQUEST) def _test_list_qos_policies(self, bytes_body=False): self.check_service_client_function( self.qos_client.list_qos_policies, "tempest.lib.common.rest_client.RestClient.get", self.FAKE_QOS_POLICIES, bytes_body, 200) def _test_show_qos_policy(self, bytes_body=False): self.check_service_client_function( self.qos_client.show_qos_policy, "tempest.lib.common.rest_client.RestClient.get", self.FAKE_QOS_POLICY_RESPONSE, bytes_body, 200, qos_policy_id=self.FAKE_QOS_POLICY_ID) def _test_update_qos_polcy(self, bytes_body=False): update_kwargs = { "name": "100Mbit", "description": "This policy limits the ports to 100Mbit max.", "shared": True } resp_body = { "policy": copy.deepcopy( self.FAKE_QOS_POLICY_RESPONSE['policy'] ) } resp_body["policy"].update(update_kwargs) self.check_service_client_function( self.qos_client.update_qos_policy, "tempest.lib.common.rest_client.RestClient.put", resp_body, bytes_body, 200, qos_policy_id=self.FAKE_QOS_POLICY_ID, **update_kwargs) def test_create_qos_policy_with_str_body(self): self._test_create_qos_policy() def test_create_qos_policy_with_bytes_body(self): self._test_create_qos_policy(bytes_body=True) def test_update_qos_policy_with_str_body(self): self._test_update_qos_polcy() def test_update_qos_policy_with_bytes_body(self): self._test_update_qos_polcy(bytes_body=True) def test_show_qos_policy_with_str_body(self): self._test_show_qos_policy() def test_show_qos_policy_with_bytes_body(self): self._test_show_qos_policy(bytes_body=True) def test_delete_qos_policy(self): self.check_service_client_function( self.qos_client.delete_qos_policy, "tempest.lib.common.rest_client.RestClient.delete", {}, status=204, qos_policy_id=self.FAKE_QOS_POLICY_ID) def test_list_qos_policies_with_str_body(self): self._test_list_qos_policies() def test_list_qos_policies_with_bytes_body(self): self._test_list_qos_policies(bytes_body=True)
33.121429
78
0.648048
43a9ea2a52e1976799d718972140a077752667d8
5,524
ts
TypeScript
vahub/src/main/webapp/src/app/filters/dataTypes/cerebrovascular/CerebrovascularFiltersModel.spec.ts
digital-ECMT/acuity-vahub
244eb7ec0f56cdac81ac6a8245ba2959b012b246
[ "Apache-2.0" ]
7
2022-01-25T18:12:19.000Z
2022-03-22T18:31:08.000Z
vahub/src/main/webapp/src/app/filters/dataTypes/cerebrovascular/CerebrovascularFiltersModel.spec.ts
digital-ECMT/acuity-vahub
244eb7ec0f56cdac81ac6a8245ba2959b012b246
[ "Apache-2.0" ]
null
null
null
vahub/src/main/webapp/src/app/filters/dataTypes/cerebrovascular/CerebrovascularFiltersModel.spec.ts
digital-ECMT/acuity-vahub
244eb7ec0f56cdac81ac6a8245ba2959b012b246
[ "Apache-2.0" ]
1
2022-03-28T15:20:09.000Z
2022-03-28T15:20:09.000Z
/* * Copyright 2021 The University of Manchester * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import {TestBed, inject} from '@angular/core/testing'; import {HttpClientTestingModule} from '@angular/common/http/testing'; import {HttpClient} from '@angular/common/http'; import {CerebrovascularFiltersModel} from './CerebrovascularFiltersModel'; import {PopulationFiltersModel} from '../population/PopulationFiltersModel'; import {CheckListFilterItemModel, ListFilterItemModel} from '../../components/module'; import {FilterHttpService} from '../../http/FilterHttpService'; import {FilterEventService} from '../../event/FilterEventService'; import {MockFilterEventService, MockDatasetViews} from '../../../common/MockClasses'; import {DatasetViews} from '../../../security/DatasetViews'; class MockFilterHttpService { } describe('GIVEN a CerebrovascularFiltersModel class', () => { let cerebrovascularFiltersModel; beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule], providers: [ HttpClient, { provide: DatasetViews, useClass: MockDatasetViews }, {provide: FilterHttpService, useValue: new MockFilterHttpService()}, {provide: PopulationFiltersModel, deps: [FilterHttpService, FilterEventService]}, {provide: FilterEventService, useClass: MockFilterEventService}, { provide: CerebrovascularFiltersModel, useFactory: (p: PopulationFiltersModel, f: FilterHttpService, e: FilterEventService, d: DatasetViews): CerebrovascularFiltersModel => new CerebrovascularFiltersModel(p, f, e, d), deps: [PopulationFiltersModel, FilterHttpService, FilterEventService, DatasetViews] } ] }); }); beforeEach(inject([CerebrovascularFiltersModel], (_cerebrovascularFiltersModel: CerebrovascularFiltersModel) => { cerebrovascularFiltersModel = _cerebrovascularFiltersModel; })); describe('WHEN constructing', () => { it('SHOULD have instance var set', () => { expect(cerebrovascularFiltersModel.itemsModels.length).toBe(13); expect((<CheckListFilterItemModel>cerebrovascularFiltersModel.itemsModels[0]).availableValues).toEqual([]); expect((<CheckListFilterItemModel>cerebrovascularFiltersModel.itemsModels[0]).selectedValues).toEqual([]); expect((<CheckListFilterItemModel>cerebrovascularFiltersModel.itemsModels[0]).initialValues).toEqual([]); expect((<CheckListFilterItemModel>cerebrovascularFiltersModel.itemsModels[0]).includeEmptyValues).toEqual(true); expect((<ListFilterItemModel>cerebrovascularFiltersModel.itemsModels[1]).availableValues).toEqual([]); expect((<ListFilterItemModel>cerebrovascularFiltersModel.itemsModels[1]).selectedValues).toEqual([]); expect((<ListFilterItemModel>cerebrovascularFiltersModel.itemsModels[1]).includeEmptyValues).toEqual(true); }); }); describe('WHEN transforming model to server', () => { it('SHOULD be empty', () => { expect(cerebrovascularFiltersModel.transformFiltersToServer()).toEqual({}); }); }); describe('WHEN getting name', () => { it('SHOULD get name cerebrovascular', () => { expect(cerebrovascularFiltersModel.getName()).toEqual('cerebrovascular'); }); }); describe('WHEN emitEvents', () => { it('SHOULD be set filterEventService.setCerebrovascularFilter', inject([FilterEventService], (filterEventService: FilterEventService) => { const validator = jasmine.createSpyObj('validator', ['called']); filterEventService.cerebrovascularFilter.subscribe( (object: any) => { validator.called(object); } ); cerebrovascularFiltersModel.emitEvent({}); expect(validator.called).toHaveBeenCalledWith({}); })); }); describe('WHEN checking if visible', () => { let datasetViews; beforeEach(inject([DatasetViews], (_datasetViews: DatasetViews) => { datasetViews = _datasetViews; })); describe('AND datasetViews have no data', () => { it('THEN should not be visible', () => { spyOn(datasetViews, 'hasCerebrovascularData').and.callFake(() => false); expect(cerebrovascularFiltersModel.isVisible()).toBeFalsy(); }); }); describe('AND datasetViews have data', () => { it('THEN should be visible', () => { spyOn(datasetViews, 'hasCerebrovascularData').and.callFake(() => true); expect(cerebrovascularFiltersModel.isVisible()).toBeTruthy(); }); }); }); });
41.533835
153
0.644461
582b9448c4e145891ba6805c4a2864eaac85e45d
1,248
css
CSS
dist/css/common.css
DaniilDem/DaniilDem.github.io
a0c74ba19327a8df60b7a21d5e1c85765355f852
[ "MIT" ]
null
null
null
dist/css/common.css
DaniilDem/DaniilDem.github.io
a0c74ba19327a8df60b7a21d5e1c85765355f852
[ "MIT" ]
null
null
null
dist/css/common.css
DaniilDem/DaniilDem.github.io
a0c74ba19327a8df60b7a21d5e1c85765355f852
[ "MIT" ]
null
null
null
@import url("https://fonts.googleapis.com/css?family=Open+Sans");body{font-family:Open Sans,sans-serif;color:#000;background-color:#222;font-size:14pt;overflow-x:hidden;margin:0}a{color:#333}a:hover{color:#000}#container{position:relative;width:100%;height:100vh;max-width:1530px;margin:0 auto}#info-block{position:absolute;top:50%;left:50%;margin-top:-153px;margin-left:-153px;-webkit-box-sizing:border-box;box-sizing:border-box;width:306px;height:306px;background-color:hsla(0,0%,100%,.9);padding:25px 48px;text-align:center;z-index:2;overflow:hidden}#info-block #hideBtn{position:absolute;right:0;top:0;border:none;font-size:30px;line-height:10px;outline:none;cursor:pointer}#info-block h1{margin-top:0}#info-block h1 a{text-decoration:none}#info-block #links{margin:0 auto;text-align:left}#instafeed{position:absolute;display:grid;grid-template-columns:repeat(5,1fr);width:100%;left:0;right:0;top:0;margin:0 auto;z-index:1}#instafeed a{-webkit-transition:all .4s ease;-o-transition:all .4s ease;transition:all .4s ease}#instafeed a:hover{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}#instafeed a img{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover} /*# sourceMappingURL=common.css.map */
416
1,208
0.782853
fcd479678141dce3925ac316e70e6dcd2573efff
2,228
sql
SQL
proyect_0/database.sql
umiphos/flask_env
2e1635a245d676b6634425b17c004a39c06686d3
[ "Unlicense" ]
null
null
null
proyect_0/database.sql
umiphos/flask_env
2e1635a245d676b6634425b17c004a39c06686d3
[ "Unlicense" ]
null
null
null
proyect_0/database.sql
umiphos/flask_env
2e1635a245d676b6634425b17c004a39c06686d3
[ "Unlicense" ]
null
null
null
DROP DATABASE IF EXISTS FM4Demo; CREATE DATABASE IF NOT EXISTS FM4Demo; USE FM4Demo; CREATE TABLE admin_info( id_admin INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(50), pass VARCHAR(50), secret VARCHAR(50), name VARCHAR(50), last_name VARCHAR(50), mail VARCHAR(50), PRIMARY KEY (id_admin) ); CREATE TABLE volunteer( id_volunter int NOT NULL AUTO_INCREMENT, user_name_volunter VARCHAR(50), pass VARCHAR(50), name_volunter VARCHAR(50), last_name_volunter VARCHAR(50), email_volunter VARCHAR(50), PRIMARY KEY (id_volunter) ); CREATE TABLE migrant( id_migrant int NOT NULL AUTO_INCREMENT, name VARCHAR(50), last_name VARCHAR(50), photo VARCHAR(100), id_volunter int, PRIMARY KEY (id_migrant) ); INSERT INTO admin_info(user_name,pass,name,last_name,mail) VALUES ("admin","pass","test","TEST","this@test.com"); INSERT INTO volunteer(user_name_volunter,pass,name_volunter,last_name_volunter,email_volunter) VALUES ("volunteer","pass","test","TEST","this@test.com"); CREATE PROCEDURE InsertAdmin ( IN var1 VARCHAR(50), IN var2 VARCHAR(50), IN var3 VARCHAR(50), IN var4 VARCHAR(50), IN var5 VARCHAR(50) ) INSERT INTO admin_info (user_name,pass,name,last_name,mail) VALUES (var1,var2,var3,var4,var5); CREATE PROCEDURE InsertVolunteer ( IN var1 VARCHAR(50), IN var2 VARCHAR(50), IN var3 VARCHAR(50), IN var4 VARCHAR(50), IN var5 VARCHAR(50) ) INSERT INTO volunteer (user_name_volunter,pass,name_volunter,last_name_volunter,email_volunter) VALUES (var1,var2,var3,var4,var5); CREATE PROCEDURE InsertMigrant ( IN var1 VARCHAR(50), IN var2 VARCHAR(50), IN var3 VARCHAR(50), IN var4 int ) INSERT INTO migrant(name,last_name,photo,id_volunter) VALUES (var1,var2,var3,var4); CREATE PROCEDURE LoginAdmin ( IN var1 varchar(50), IN var2 varchar(50) ) SELECT * FROM admin_info WHERE user_name=var1 AND pass=var2; CREATE PROCEDURE LoginVolunteer ( IN var1 varchar(50), IN var2 varchar(50) ) SELECT * FROM volunteer WHERE user_name_volunter=var1 AND pass=var2; CREATE PROCEDURE SelectAllMigrants() SELECT * FROM migrant ORDER BY id_record DESC;
24.217391
154
0.714093
917818d7e121bc40b4e7b217018cca031999e332
1,153
ts
TypeScript
src/app/views/vehicle/vehicle.module.ts
ganeshfromindia/DesktopLocate2020
7015ee4a857b4065116afd63cc22017f6f47d7d8
[ "MIT" ]
null
null
null
src/app/views/vehicle/vehicle.module.ts
ganeshfromindia/DesktopLocate2020
7015ee4a857b4065116afd63cc22017f6f47d7d8
[ "MIT" ]
null
null
null
src/app/views/vehicle/vehicle.module.ts
ganeshfromindia/DesktopLocate2020
7015ee4a857b4065116afd63cc22017f6f47d7d8
[ "MIT" ]
null
null
null
// Angular import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { NgModule } from '@angular/core'; import { AlertModule } from 'ngx-bootstrap/alert'; import { VehicleRoutingModule } from './vehicle-routing.module'; import { vehicleComponent } from './vehicle.component'; import { VehicleTypeComponent } from './vehicle_type.component'; import { VehicleManufactureComponent } from './vehicle_manufacture.component'; import { VehicleMakeModelComponent } from './vehicle_make_model.component'; import { DataService } from '../../data.service'; import { ReactiveFormsModule } from '@angular/forms'; import { NgbTimepickerModule } from '@ng-bootstrap/ng-bootstrap'; import { ModalModule } from 'ngx-bootstrap/modal'; @NgModule({ imports: [ CommonModule, AlertModule.forRoot(), FormsModule, ReactiveFormsModule, VehicleRoutingModule, NgbTimepickerModule, ModalModule.forRoot() ], providers:[DataService], declarations: [ vehicleComponent, VehicleTypeComponent, VehicleManufactureComponent, VehicleMakeModelComponent ] }) export class VehicleModule { }
30.342105
78
0.737207
7fb12a285a7af12211002d7dc9b8c781a6fc93f7
75
php
PHP
app/views/blocks/ta-q-status.blade.php
voveson/ta_queue
f9cef023aba84a7e704adf98ed81b76bcfc012bb
[ "MIT" ]
null
null
null
app/views/blocks/ta-q-status.blade.php
voveson/ta_queue
f9cef023aba84a7e704adf98ed81b76bcfc012bb
[ "MIT" ]
null
null
null
app/views/blocks/ta-q-status.blade.php
voveson/ta_queue
f9cef023aba84a7e704adf98ed81b76bcfc012bb
[ "MIT" ]
null
null
null
{{ (isset($queue->status) && $queue->status != "") ? $queue->status : '' }}
75
75
0.506667
f158c9383b6d164063809a7bd8a00c9da84dd288
520
rb
Ruby
app/controllers/spree/follows_controller.rb
enbake/spree_auctions_enbake
74a96174306e5e31a9067d5dc5628ab9a9a438c2
[ "BSD-3-Clause" ]
5
2015-11-04T05:26:51.000Z
2020-03-06T09:10:09.000Z
app/controllers/spree/follows_controller.rb
enbake/spree_auctions_enbake
74a96174306e5e31a9067d5dc5628ab9a9a438c2
[ "BSD-3-Clause" ]
null
null
null
app/controllers/spree/follows_controller.rb
enbake/spree_auctions_enbake
74a96174306e5e31a9067d5dc5628ab9a9a438c2
[ "BSD-3-Clause" ]
6
2015-05-18T14:52:13.000Z
2021-06-06T13:52:16.000Z
class Spree::FollowsController < ApplicationController def follow_product @product = Spree::Product.find(params[:id]) @follower = @product.followers.where(:user_id => spree_current_user.id) if @follower.present? @product.followers.where(:user_id => spree_current_user.id).first.delete flash[:notice] = "Unfollowed successfully" else @product.followers.create(:user_id => spree_current_user.id) flash[:notice] = "Followed successfully" end redirect_to :back end end
32.5
78
0.709615
2da26aeb78b9c6c1f29c700f7a0d00c789cb01b6
253
go
Go
provider/aws/ingress.go
mattdennewitz/convox
961ae04b3d15623660afc9b6bea61e137414a94f
[ "Apache-2.0" ]
91
2019-08-17T02:21:05.000Z
2022-03-18T22:46:45.000Z
provider/aws/ingress.go
mattdennewitz/convox
961ae04b3d15623660afc9b6bea61e137414a94f
[ "Apache-2.0" ]
68
2019-12-04T17:37:04.000Z
2022-03-31T16:27:10.000Z
provider/aws/ingress.go
mattdennewitz/convox
961ae04b3d15623660afc9b6bea61e137414a94f
[ "Apache-2.0" ]
51
2019-11-06T12:21:16.000Z
2022-03-29T08:56:16.000Z
package aws func (p *Provider) IngressAnnotations(app string) (map[string]string, error) { as := map[string]string{ "cert-manager.io/cluster-issuer": "letsencrypt", } return as, nil } func (p *Provider) IngressClass() string { return "nginx" }
18.071429
78
0.699605
7e4e66020842522b37ba60e12c339975f475276f
954
ps1
PowerShell
Modules/datastructures/src/Public/Save-TableToFile.ps1
RobertoTheRobot/ps_repo
4d6138cc16a68fc5f60022b876cec03877302f8f
[ "MIT" ]
1
2019-03-05T13:12:38.000Z
2019-03-05T13:12:38.000Z
Modules/datastructures/src/Public/Save-TableToFile.ps1
RobertoTheRobot/PSRepository
4d6138cc16a68fc5f60022b876cec03877302f8f
[ "MIT" ]
null
null
null
Modules/datastructures/src/Public/Save-TableToFile.ps1
RobertoTheRobot/PSRepository
4d6138cc16a68fc5f60022b876cec03877302f8f
[ "MIT" ]
null
null
null
Function Save-TableToFile { <# .SYNOPSIS Saves DataTable content to a file .DESCRIPTION Saves DataTable content to a file. .INPUTS datatable System.Data.DataTable filePath string .OUTPUTS Void .EXAMPLE $dt | Save-TableToFile -filePath "c:\file.ext" Save-TableToFile -dataTable $dt -filePath "c:\file.ext" .LINK https://github.com/RobertoTheRobot #> param( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline = $true)] [System.Data.DataTable]$datatable ,[Parameter(Position=1, Mandatory=$true, ValueFromPipeline = $false)][string]$filePath ) Begin { } Process { $writer = New-Object IO.StreamWriter $filePath $datatable.WriteXml($writer, [Data.XmlWriteMode]::WriteSchema) $writer.Close() $writer.Dispose() } End { } }
24.461538
111
0.57652
e71c9fedc55f790e9e42db5f6fc822368eb4b04c
2,518
php
PHP
drds-20190123/src/Models/DescribeDrdsDBResponseBody/data.php
CircleCurve/alibabacloud-php-sdk
d8429bb4c8fd17f64dcfb55dba6737ca166a8ab0
[ "Apache-2.0" ]
null
null
null
drds-20190123/src/Models/DescribeDrdsDBResponseBody/data.php
CircleCurve/alibabacloud-php-sdk
d8429bb4c8fd17f64dcfb55dba6737ca166a8ab0
[ "Apache-2.0" ]
null
null
null
drds-20190123/src/Models/DescribeDrdsDBResponseBody/data.php
CircleCurve/alibabacloud-php-sdk
d8429bb4c8fd17f64dcfb55dba6737ca166a8ab0
[ "Apache-2.0" ]
null
null
null
<?php // This file is auto-generated, don't edit it. Thanks. namespace AlibabaCloud\SDK\Drds\V20190123\Models\DescribeDrdsDBResponseBody; use AlibabaCloud\Tea\Model; class data extends Model { /** * @var string */ public $status; /** * @var string */ public $dbName; /** * @var string */ public $schema; /** * @var string */ public $createTime; /** * @var string */ public $mode; /** * @var string */ public $dbInstType; /** * @var string */ public $instRole; protected $_name = [ 'status' => 'Status', 'dbName' => 'DbName', 'schema' => 'Schema', 'createTime' => 'CreateTime', 'mode' => 'Mode', 'dbInstType' => 'DbInstType', 'instRole' => 'InstRole', ]; public function validate() { } public function toMap() { $res = []; if (null !== $this->status) { $res['Status'] = $this->status; } if (null !== $this->dbName) { $res['DbName'] = $this->dbName; } if (null !== $this->schema) { $res['Schema'] = $this->schema; } if (null !== $this->createTime) { $res['CreateTime'] = $this->createTime; } if (null !== $this->mode) { $res['Mode'] = $this->mode; } if (null !== $this->dbInstType) { $res['DbInstType'] = $this->dbInstType; } if (null !== $this->instRole) { $res['InstRole'] = $this->instRole; } return $res; } /** * @param array $map * * @return data */ public static function fromMap($map = []) { $model = new self(); if (isset($map['Status'])) { $model->status = $map['Status']; } if (isset($map['DbName'])) { $model->dbName = $map['DbName']; } if (isset($map['Schema'])) { $model->schema = $map['Schema']; } if (isset($map['CreateTime'])) { $model->createTime = $map['CreateTime']; } if (isset($map['Mode'])) { $model->mode = $map['Mode']; } if (isset($map['DbInstType'])) { $model->dbInstType = $map['DbInstType']; } if (isset($map['InstRole'])) { $model->instRole = $map['InstRole']; } return $model; } }
20.983333
76
0.43606
bbdba6fd3edff5e44b53135daf510a41304ec24c
783
dart
Dart
LibTest/core/Function/Function_class_A01_t01.dart
rmacnak-google/co19
007439e51981c536e65171444b536b03ef23fc25
[ "BSD-3-Clause" ]
29
2015-10-18T19:06:27.000Z
2022-03-05T11:55:37.000Z
LibTest/core/Function/Function_class_A01_t01.dart
rmacnak-google/co19
007439e51981c536e65171444b536b03ef23fc25
[ "BSD-3-Clause" ]
1,278
2015-07-01T05:52:22.000Z
2022-03-30T08:20:00.000Z
LibTest/core/Function/Function_class_A01_t01.dart
rmacnak-google/co19
007439e51981c536e65171444b536b03ef23fc25
[ "BSD-3-Clause" ]
33
2015-06-24T08:21:27.000Z
2022-03-04T11:38:20.000Z
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. /// @assertion A function value, or an instance of a class with a "call" method, /// is a subtype of a function type, and as such, a subtype of Function. /// @description Checks that function values are indeed subtypes of the /// [Function] class. /// @author rodionov import "../../../Utils/expect.dart"; int foo(String s) { return 21; } int foo1() => 1; main() { Expect.isTrue(foo is Function); Expect.isTrue(foo1 is Function); Expect.isTrue((int, double) { return 1; } is Function); Expect.isTrue((() => 1) is Function); }
31.32
82
0.666667
b2b5d0b5619db1bec6afb3c51815caddf758fe03
435
css
CSS
public/css/introPage.css
2021-myuniform/laravel_myuniform
5497a1a2be98e78e000ed698093882922f1db4a4
[ "MIT" ]
null
null
null
public/css/introPage.css
2021-myuniform/laravel_myuniform
5497a1a2be98e78e000ed698093882922f1db4a4
[ "MIT" ]
null
null
null
public/css/introPage.css
2021-myuniform/laravel_myuniform
5497a1a2be98e78e000ed698093882922f1db4a4
[ "MIT" ]
null
null
null
.introBox{ width: 80%; margin: 100px auto; } .introContainer{ text-align: center; padding: 50px; background-color: gray; color: white; border-radius: 30px; font-size: 2em; line-height: 1.5; } .toMainBtn{ text-align: center; font-size: 1.8em; background-color: lightgray; width: 40%; margin: auto; padding: 10px; border-radius: 10px; } .toMainBtn a{ color: black; }
15.535714
32
0.602299
6cfdd73746ae65ded755fcc07e4f75b5f0776e95
2,703
rb
Ruby
test/facebook/test_handler.rb
khoan/rest-more
0e7d4db588ecc287fd8b2840c880dfb3fe3c3096
[ "Apache-2.0" ]
null
null
null
test/facebook/test_handler.rb
khoan/rest-more
0e7d4db588ecc287fd8b2840c880dfb3fe3c3096
[ "Apache-2.0" ]
null
null
null
test/facebook/test_handler.rb
khoan/rest-more
0e7d4db588ecc287fd8b2840c880dfb3fe3c3096
[ "Apache-2.0" ]
null
null
null
require 'rest-more/test' describe RC::Facebook do after do WebMock.reset! RR.verify end describe 'log method' do should 'log whenever doing network request' do stub_request(:get, 'https://graph.facebook.com/me'). to_return(:body => '{}') logger = [] rg = RC::Facebook.new(:log_method => lambda{ |s| logger << [s] }) rg.get('me').tap{} logger.size.should.eq 3 # Auto + Future + Requested end end describe 'with Graph API' do before do @id = lambda{ |env| env } @error = '{"error":{"type":"Exception","message":"(#2500)"}}' @error_hash = RC::Json.decode(@error) stub_request(:get, 'https://graph.facebook.com/me'). to_return(:body => @error) end should 'call error_handler if error occurred' do RC::Facebook.new(:error_handler => @id).get('me'). should.eq @error_hash end should 'raise ::RC::Facebook::Error in default error_handler' do begin RC::Facebook.new.get('me').tap{} rescue ::RC::Facebook::Error => e e.error .should.eq @error_hash e.message.should.eq \ "#{@error_hash.inspect} from https://graph.facebook.com/me" end end end describe 'with FQL API' do # Example of an actual response (without newline) # {"error_code":603,"error_msg":"Unknown table: bad_table", # "request_args":[{"key":"method","value":"fql.query"}, # {"key":"format","value":"json"}, # {"key":"query","value": # "SELECT name FROM bad_table WHERE uid=12345"}]} before do @id = lambda{ |env| env } @fql_error = '{"error_code":603,"error_msg":"Unknown table: bad"}' @fql_error_hash = RC::Json.decode(@fql_error) @bad_fql_query = 'SELECT name FROM bad_table WHERE uid="12345"' bad_fql_request = "https://api.facebook.com/method/fql.query?" \ "format=json&query=#{ RC::Middleware.escape(@bad_fql_query)}" stub_request(:get, bad_fql_request).to_return(:body => @fql_error) end should 'call error_handler if error occurred' do RC::Facebook.new(:error_handler => @id).fql(@bad_fql_query). should.eq @fql_error_hash end should 'raise ::RC::Facebook::Error in default error_handler' do begin RC::Facebook.new.fql(@bad_fql_query).tap{} rescue ::RC::Facebook::Error => e e.error .should.eq @fql_error_hash e.message.should.start_with?( "#{@fql_error_hash.inspect} from " \ "https://api.facebook.com/method/fql.query?") end end end end
31.430233
77
0.580466
9d2b281c463d58e3c92c82e5d9b604d5bc1e9684
879
sql
SQL
backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5524580_sys_gh5257_I_DataEntry_Record_table_2.sql
dram/metasfresh
a1b881a5b7df8b108d4c4ac03082b72c323873eb
[ "RSA-MD" ]
1,144
2016-02-14T10:29:35.000Z
2022-03-30T09:50:41.000Z
backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5524580_sys_gh5257_I_DataEntry_Record_table_2.sql
vestigegroup/metasfresh
4b2d48c091fb2a73e6f186260a06c715f5e2fe96
[ "RSA-MD" ]
8,283
2016-04-28T17:41:34.000Z
2022-03-30T13:30:12.000Z
backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5524580_sys_gh5257_I_DataEntry_Record_table_2.sql
vestigegroup/metasfresh
4b2d48c091fb2a73e6f186260a06c715f5e2fe96
[ "RSA-MD" ]
441
2016-04-29T08:06:07.000Z
2022-03-28T06:09:56.000Z
-- 2019-06-13T18:33:19.811 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column_Trl WHERE AD_Column_ID=568249 ; -- 2019-06-13T18:33:19.822 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column WHERE AD_Column_ID=568249 ; -- 2019-06-13T18:33:31.010 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column_Trl WHERE AD_Column_ID=568248 ; -- 2019-06-13T18:33:31.016 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column WHERE AD_Column_ID=568248 ; -- 2019-06-13T18:33:36.651 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column_Trl WHERE AD_Column_ID=568247 ; -- 2019-06-13T18:33:36.656 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column WHERE AD_Column_ID=568247 ;
28.354839
65
0.798635
45c053e5c3a15a5e3584a828e3f31884a60c577e
1,859
py
Python
dffml/optimizer/optimizer.py
yopknopixx/dffml
7f295bb01b235a915c9f8015564b97a708cd5325
[ "MIT" ]
null
null
null
dffml/optimizer/optimizer.py
yopknopixx/dffml
7f295bb01b235a915c9f8015564b97a708cd5325
[ "MIT" ]
null
null
null
dffml/optimizer/optimizer.py
yopknopixx/dffml
7f295bb01b235a915c9f8015564b97a708cd5325
[ "MIT" ]
null
null
null
import abc from ..model import ModelContext from ..source.source import SourcesContext from ..accuracy.accuracy import AccuracyContext from ..feature.feature import Feature from ..util.entrypoint import base_entry_point from ..base import ( config, BaseDataFlowFacilitatorObjectContext, BaseDataFlowFacilitatorObject, ) @config class OptimizerConfig: pass class OptimizerContext(abc.ABC, BaseDataFlowFacilitatorObjectContext): def __init__(self, parent: "Optimizer") -> None: self.parent = parent @abc.abstractmethod async def optimize( self, model: ModelContext, feature: Feature, accuracy_scorer: AccuracyContext, train_data: SourcesContext, test_data: SourcesContext, ) -> float: """ Abstract method to optimize hyperparameters Parameters ---------- model : ModelContext The Model which needs to be used. feature : Feature The Target feature in the data. accuracy_scorer: AccuracyContext The accuracy scorer that needs to be used. train_data: SourcesContext The train_data to train models on, with the hyperparameters provided. sources : SourcesContext The test_data to score against and optimize hyperparameters. Returns ------- float The highest score value(optimized score) """ raise NotImplementedError() @base_entry_point("dffml.optimizer", "optimizer") class Optimizer(BaseDataFlowFacilitatorObject): """ Abstract base class which should be derived from and implemented using various optimizers. """ CONFIG = OptimizerConfig CONTEXT = OptimizerContext def __call__(self) -> OptimizerContext: return self.CONTEXT(self)
25.465753
81
0.665412
e35c67d23f33eb47c21e917ac60908d4d775fbaf
267
rb
Ruby
examples/sender.rb
seblindberg/ruby-mqtt-pipe
6e77c759e9c64ea69748060679e2d6d011b83904
[ "MIT" ]
null
null
null
examples/sender.rb
seblindberg/ruby-mqtt-pipe
6e77c759e9c64ea69748060679e2d6d011b83904
[ "MIT" ]
null
null
null
examples/sender.rb
seblindberg/ruby-mqtt-pipe
6e77c759e9c64ea69748060679e2d6d011b83904
[ "MIT" ]
null
null
null
require 'mqtt_pipe' pipe = MQTTPipe.create pipe.on 'hello/world/5' do puts 'received 5' end pipe.open 'localhost', port: 1883 do counter = 0 loop do send 'hello/world/' + counter.to_s, Time.now puts 'sending...' counter += 1 sleep 1 end end
15.705882
48
0.64794
b2bcb58e4fe08185366f79b19b5933c7408882bc
1,108
css
CSS
widgets/vis-inventwo/css/style.css
dev-xaur/ioBroker.vis-inventwo
a537b62ba74cd1a1ba0d5cddb2c9ba28a13fbcb8
[ "MIT" ]
null
null
null
widgets/vis-inventwo/css/style.css
dev-xaur/ioBroker.vis-inventwo
a537b62ba74cd1a1ba0d5cddb2c9ba28a13fbcb8
[ "MIT" ]
null
null
null
widgets/vis-inventwo/css/style.css
dev-xaur/ioBroker.vis-inventwo
a537b62ba74cd1a1ba0d5cddb2c9ba28a13fbcb8
[ "MIT" ]
null
null
null
/* Style your widget here */ /* BUTTONS ANFANG */ .vis-inventwo-button { box-shadow: 2px 2px 2px 1px #111111; position: absolute; width: 100%; height: 100%; } .vis-inventwo-button-active { background-color: #455618; } .vis-inventwo-button-imageContainer { text-align: center; position:relative; z-index: 1; } .vis-inventwo-button-text { position: relative; align-self: flex-start; width: -moz-available; width: -webkit-fill-available; width: fill-available; margin-top: auto; z-index: 1; } .vis-inventwo-button-content{ /*padding: 7px;*/ position: absolute; top: 7px; left: 7px; right: 7px; bottom: 7px; display: flex; flex-direction: column; } .vis-inventwo-button-content-small{ /*padding: 7px;*/ display: flex; flex-direction: row; position: absolute; top: 7px; left: 7px; right: 7px; bottom: 7px; } /* BUTTONS ENDE */ .vis-inventwo-json-table{ border-spacing: 0px } .vis-inventwo-json-table th, .vis-inventwo-json-table td{ padding-left: 5px; padding-right: 5px; }
17.587302
57
0.629964
b58c77840a3e9564122b8eff987ff0db2b054db5
907
sql
SQL
src/main/resources/db/migration/general/V4__offender_case_note_amendment.sql
uk-gov-mirror/ministryofjustice.offender-case-notes
9872633a01f4031fd64e837372befef2b80f4c44
[ "MIT" ]
null
null
null
src/main/resources/db/migration/general/V4__offender_case_note_amendment.sql
uk-gov-mirror/ministryofjustice.offender-case-notes
9872633a01f4031fd64e837372befef2b80f4c44
[ "MIT" ]
3
2019-08-19T07:46:00.000Z
2022-03-09T16:03:11.000Z
src/main/resources/db/migration/general/V4__offender_case_note_amendment.sql
uk-gov-mirror/ministryofjustice.offender-case-notes
9872633a01f4031fd64e837372befef2b80f4c44
[ "MIT" ]
1
2021-04-11T06:16:15.000Z
2021-04-11T06:16:15.000Z
DROP TABLE IF EXISTS OFFENDER_CASE_NOTE_AMENDMENT; CREATE TABLE OFFENDER_CASE_NOTE_AMENDMENT ( OFFENDER_CASE_NOTE_AMENDMENT_ID SERIAL PRIMARY KEY, OFFENDER_CASE_NOTE_ID UUID NOT NULL, AMEND_SEQUENCE NUMERIC(5) NOT NULL, AUTHOR_USERNAME VARCHAR(32) NOT NULL, AUTHOR_NAME VARCHAR(80) NOT NULL, NOTE_TEXT TEXT NOT NULL, CREATE_DATE_TIME TIMESTAMP NOT NULL, CREATE_USER_ID VARCHAR(32) NOT NULL, MODIFY_DATE_TIME TIMESTAMP, MODIFY_USER_ID VARCHAR(32), UNIQUE (OFFENDER_CASE_NOTE_ID, AMEND_SEQUENCE), FOREIGN KEY (OFFENDER_CASE_NOTE_ID) REFERENCES OFFENDER_CASE_NOTE (OFFENDER_CASE_NOTE_ID) ); COMMENT ON TABLE OFFENDER_CASE_NOTE_AMENDMENT IS 'Records a case note amendments for an offender';
37.791667
98
0.643881
ff5cf6c4819ae3bdd2220e5d6d5746c4f0013496
389
py
Python
core/migrations/0007_alter_discussion_user_id.py
GDSC-BUK/sc-22.forum-service
2202e61003f7b23f2871465e4a110f9083595f5b
[ "MIT" ]
null
null
null
core/migrations/0007_alter_discussion_user_id.py
GDSC-BUK/sc-22.forum-service
2202e61003f7b23f2871465e4a110f9083595f5b
[ "MIT" ]
null
null
null
core/migrations/0007_alter_discussion_user_id.py
GDSC-BUK/sc-22.forum-service
2202e61003f7b23f2871465e4a110f9083595f5b
[ "MIT" ]
null
null
null
# Generated by Django 4.0.3 on 2022-04-03 10:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0006_alter_reply_user_id'), ] operations = [ migrations.AlterField( model_name='discussion', name='user_id', field=models.UUIDField(db_index=True), ), ]
20.473684
50
0.601542
6b565b0743c98b9ad4cae5c393523a49921f0bd5
465
js
JavaScript
src/app/Service.js
OSDrive/drive
552cef2808bdead3e3ddc883fed593a4cbcdde9c
[ "Apache-2.0" ]
44
2019-02-16T19:24:18.000Z
2021-11-19T03:02:20.000Z
src/app/Service.js
OSDrive/drive
552cef2808bdead3e3ddc883fed593a4cbcdde9c
[ "Apache-2.0" ]
16
2019-02-16T09:08:22.000Z
2020-07-16T16:55:38.000Z
src/app/Service.js
OSDrive/drive
552cef2808bdead3e3ddc883fed593a4cbcdde9c
[ "Apache-2.0" ]
15
2019-04-08T08:44:12.000Z
2021-11-12T14:32:20.000Z
import store from '@/store/store' import DropboxApi from './apps/Dropbox' import GoogleApi from './apps/Google' import { config } from './Config' /** * services */ class Services { /** * Store constructor */ constructor() { const dropboxAccessToken = store.state.settings.dropbox.accessToken; this.dropbox = new DropboxApi(dropboxAccessToken, config.redirectPort); this.google = GoogleApi; } } export let service = new Services();
17.884615
75
0.688172
72d682f392dc22ccaa6f317f14fdf2249b1c0342
1,947
cs
C#
source/Viveport.TestProgram/TestLogger.cs
ViveportSoftware/viveport_sdk_csharp
a9bc1d041fecfafef94449caf010ea7ff81fb395
[ "MIT" ]
5
2019-07-19T07:03:47.000Z
2022-02-24T12:02:11.000Z
source/Viveport.TestProgram/TestLogger.cs
ViveportSoftware/viveport_sdk_csharp
a9bc1d041fecfafef94449caf010ea7ff81fb395
[ "MIT" ]
1
2020-01-29T16:57:30.000Z
2020-02-11T16:08:25.000Z
source/Viveport.TestProgram/TestLogger.cs
ViveportSoftware/viveport_sdk_csharp
a9bc1d041fecfafef94449caf010ea7ff81fb395
[ "MIT" ]
2
2020-01-31T03:03:55.000Z
2021-11-04T02:49:15.000Z
using System; using System.Collections.Generic; using System.Linq; namespace Viveport.TestProgram { public static class TestLogger { enum LogType { Debug, Success, Warnning, Error } private static void ShowMessageWithFormat(LogType type, string methodName, string message) { Console.ForegroundColor = ConsoleColor.White; switch (type) { case LogType.Debug: default: Console.BackgroundColor = ConsoleColor.DarkBlue; break; case LogType.Success: Console.BackgroundColor = ConsoleColor.DarkGreen; break; case LogType.Warnning: Console.BackgroundColor = ConsoleColor.DarkYellow; break; case LogType.Error: Console.BackgroundColor = ConsoleColor.DarkRed; break; } Console.Write("[VIVEPORT][SDK]"); Console.Write(string.Format("{0}", methodName != null ? "[" + methodName + "]" : "")); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine(" " + message); } public static void Debug(string methodName, string message) { ShowMessageWithFormat(LogType.Debug, methodName, message); } public static void Success(string methodName, string message) { ShowMessageWithFormat(LogType.Success, methodName, message); } public static void Warnning(string methodName, string message) { ShowMessageWithFormat(LogType.Warnning, methodName, message); } public static void Error(string methodName, string message) { ShowMessageWithFormat(LogType.Error, methodName, message); } } }
32.45
98
0.55624
a3a95be97868b3de7d79deef47c6e618f6109342
2,141
tsx
TypeScript
wolven531-website/ClientApp/src/views/Counter.tsx
Wolven531/wolven531-website
9d18436255c358b0b539eef9eff50149d2f628de
[ "MIT" ]
1
2019-09-10T04:29:09.000Z
2019-09-10T04:29:09.000Z
wolven531-website/ClientApp/src/views/Counter.tsx
Wolven531/wolven531-website
9d18436255c358b0b539eef9eff50149d2f628de
[ "MIT" ]
6
2021-03-09T15:08:00.000Z
2022-02-26T16:35:48.000Z
wolven531-website/ClientApp/src/views/Counter.tsx
Wolven531/wolven531-website
9d18436255c358b0b539eef9eff50149d2f628de
[ "MIT" ]
null
null
null
import React, { Component } from 'react' import { SpinningSVG } from '../components/SpinningSVG/SpinningSVG' import './Counter.css' interface ICounterState { buttonEnabled: boolean currentCount: number } class Counter extends Component<{}, ICounterState> { private static MAX_COUNT = 10 private static STORAGE_KEY = 'wolven531-website.counter.currentCount' constructor(props: any) { super(props) this.state = { buttonEnabled: true, currentCount: 1 } } public componentDidMount() { this.loadFromLocal() } public componentWillUnmount() { this.saveToLocal() } public render() { return ( <div className="counter"> <h1>Counter</h1> <SpinningSVG description="Pyramid SVG" intervalDuration={1000 / 60 - this.state.currentCount} rotationalJump={3} sourcePath="/pyramid.svg" /> <p>Current count: <strong>{this.state.currentCount}</strong></p> <button disabled={!this.state.buttonEnabled} onClick={this.incrementCounter}>Increment</button> <br /> <button onClick={this.saveToLocal}>Save (local)</button> <button onClick={this.clearLocal}>Clear (local)</button> </div> ) } private clearLocal() { if (!window || !window.localStorage) { return } window.localStorage.removeItem(Counter.STORAGE_KEY) } private incrementCounter = () => { if (!this.state.buttonEnabled) { return } this.setState(state => ({ buttonEnabled: state.currentCount + 1 < Counter.MAX_COUNT, currentCount: state.currentCount + 1 })) } private loadFromLocal = () => { if (!window || !window.localStorage) { return } const storageCurrentCount = window.localStorage.getItem(Counter.STORAGE_KEY) if (!storageCurrentCount || storageCurrentCount.length < 1) { return } const currentCount = parseInt(storageCurrentCount, 10) const buttonEnabled = currentCount < Counter.MAX_COUNT this.setState({ buttonEnabled, currentCount }) } private saveToLocal = () => { if (!window || !window.localStorage) { return } window.localStorage.setItem(Counter.STORAGE_KEY, String(this.state.currentCount)) } } export { Counter }
23.271739
83
0.691733
dda9fc1adf44f82b073fae5c15ad305b2c44bc8f
280
java
Java
src/model/sudokuGenerator/generatorFunction/GridNotSolvedException.java
alkolhar/OST_Sudoku
8419c889b0c3f73543b2f80d0e71c4ff55d415b3
[ "MIT" ]
null
null
null
src/model/sudokuGenerator/generatorFunction/GridNotSolvedException.java
alkolhar/OST_Sudoku
8419c889b0c3f73543b2f80d0e71c4ff55d415b3
[ "MIT" ]
null
null
null
src/model/sudokuGenerator/generatorFunction/GridNotSolvedException.java
alkolhar/OST_Sudoku
8419c889b0c3f73543b2f80d0e71c4ff55d415b3
[ "MIT" ]
null
null
null
package model.sudokuGenerator.generatorFunction; public class GridNotSolvedException extends Exception { private static final long serialVersionUID = 1L; /** * @param Message why the Exception gets thrown */ public GridNotSolvedException(String msg) { super(msg); } }
21.538462
55
0.767857
ff42e79f06a3b4faa5ffeba7793b69d829eadbe9
3,289
py
Python
hubstore/view/main.py
pyrustic/hubstore
640bb07286a3d63e3772def0a0f682198abffec8
[ "MIT" ]
4
2021-04-08T11:34:47.000Z
2021-09-04T00:02:51.000Z
hubstore/view/main.py
pyrustic/hubstore
640bb07286a3d63e3772def0a0f682198abffec8
[ "MIT" ]
null
null
null
hubstore/view/main.py
pyrustic/hubstore
640bb07286a3d63e3772def0a0f682198abffec8
[ "MIT" ]
null
null
null
import tkinter as tk from viewable import Viewable from threadom import Threadom from megawidget.toast import Toast from hubstore.host import Host from hubstore.view.views import Views from hubstore.view.toolbar import Toolbar from hubstore.view.pane import Pane from hubstore.view.about import About from hubstore.view.installer import Installer from hubstore.view.info import Info from hubstore.view.report import Report from hubstore.view.openlist import Openlist from hubstore.view.promoted import Promoted class Main(Viewable): def __init__(self, app): super().__init__() self._app = app self._master = app.root self._threadom = Threadom(app.root) self._views = Views() self._host = Host(self) self._views.main = self self._toast = None @property def app(self): return self._app @property def host(self): return self._host @property def views(self): return self._views def show_toast(self, message, duration=1234): self.close_toast() toast = Toast(self._app.root, message=message, duration=duration) toast.update_idletasks() if duration is None: self._toast = toast def show_notification(self, message): self._views.pane.set_notification(message) def close_toast(self): if self._toast: self._toast.destroy() self._toast = None def clear_notification(self): self._views.pane.set_notification("") def open_toplevel_about(self): about = About(self) about.build_wait() def open_toplevel_installer(self, data): installer = Installer(self, data=data) installer.build_wait() def open_toplevel_report(self, data): report = Report(self, data=data) report.build_wait() def open_toplevel_info(self, data): info = Info(self, data=data) info.build_wait() def open_toplevel_promoted(self, data): promoted = Promoted(self, data=data) promoted.build_wait() def open_toplevel_openlist(self, data): openlist = Openlist(self, data=data) openlist.build_wait() def _build(self): self._body = tk.Frame(self._master) # install toolbar self._install_toolbar() # install pane self._install_pane() def _on_map(self): if self._host.on_start_app(): # binding self._binding() self._views.toolbar.wake_search_entry() #from hubstore.view.downloader import Downloader #from hubstore.view.info import Info #Info(self).build() #Downloader(self).build() def _install_toolbar(self): toolbar = Toolbar(self._body, self._views, self._host) toolbar.build_pack(fill=tk.X, padx=2, pady=2) self._views.toolbar = toolbar def _install_pane(self): pane = Pane(self) pane.build_pack(expand=1, fill=tk.BOTH) self._views.pane = pane def _binding(self): self._body.focus_set() command = lambda e, views=self._views: views.toolbar.wake_search_entry() self._body.bind("<Control-f>", command) self._body.bind("<Control-F>", command)
28.353448
80
0.645181
127fe85c1c237e5e034259393511c539cb2fb03d
1,934
cs
C#
src/FluentAssertions.Analyzers/Tips/MsTest/CollectionAssertAreEquivalent.cs
chvollm/fluentassertions.analyzers
83e0ed49010823e0a2f70018d4f23c701f2e0913
[ "MIT" ]
1
2022-02-15T18:57:52.000Z
2022-02-15T18:57:52.000Z
src/FluentAssertions.Analyzers/Tips/MsTest/CollectionAssertAreEquivalent.cs
maxkoshevoi/fluentassertions.analyzers
83e0ed49010823e0a2f70018d4f23c701f2e0913
[ "MIT" ]
null
null
null
src/FluentAssertions.Analyzers/Tips/MsTest/CollectionAssertAreEquivalent.cs
maxkoshevoi/fluentassertions.analyzers
83e0ed49010823e0a2f70018d4f23c701f2e0913
[ "MIT" ]
null
null
null
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using System.Collections.Generic; using System.Collections.Immutable; using System.Composition; namespace FluentAssertions.Analyzers { [DiagnosticAnalyzer(LanguageNames.CSharp)] public class CollectionAssertAreEquivalentAnalyzer : MsTestCollectionAssertAnalyzer { public const string DiagnosticId = Constants.Tips.MsTest.CollectionAssertAreEquivalent; public const string Category = Constants.Tips.Category; public const string Message = "Use .Should().BeEquivalentTo() instead."; protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true); protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors { get { yield return new CollectionAssertAreEquivalentSyntaxVisitor(); } } public class CollectionAssertAreEquivalentSyntaxVisitor : FluentAssertionsCSharpSyntaxVisitor { public CollectionAssertAreEquivalentSyntaxVisitor() : base(new MemberValidator("AreEquivalent")) { } } } [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(CollectionAssertAreEquivalentCodeFix)), Shared] public class CollectionAssertAreEquivalentCodeFix : MsTestCollectionAssertCodeFixProvider { public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(CollectionAssertAreEquivalentAnalyzer.DiagnosticId); protected override ExpressionSyntax GetNewExpression(ExpressionSyntax expression, FluentAssertionsDiagnosticProperties properties) { return RenameMethodAndReorderActualExpectedAndReplaceWithSubjectShould(expression, "AreEquivalent", "BeEquivalentTo"); } } }
42.043478
152
0.771975
a40f33430a4155550803f394fcae41e69d7d24d8
917
php
PHP
src/Everest/Validation/Types/TypeBoolean.php
inceddy/everest-validation
d590ff07933a092e2d8c93ecce0a1d2b42040971
[ "MIT" ]
null
null
null
src/Everest/Validation/Types/TypeBoolean.php
inceddy/everest-validation
d590ff07933a092e2d8c93ecce0a1d2b42040971
[ "MIT" ]
null
null
null
src/Everest/Validation/Types/TypeBoolean.php
inceddy/everest-validation
d590ff07933a092e2d8c93ecce0a1d2b42040971
[ "MIT" ]
null
null
null
<?php /* * This file is part of Everest. * * (c) 2018 Philipp Steingrebe <development@steingrebe.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Everest\Validation\Types; use Everest\Validation\InvalidValidationException; class TypeBoolean extends Type { public static $errorName = 'invalid_boolean'; public static $errorMessage = '%s is not a valid boolean or like a boolean.'; public function __invoke($value, $message = null, string $key = null) { if (!in_array($value, [true, false, 'true', 'false', 1, 0, '1', '0'], true)) { $message = sprintf( self::generateErrorMessage($message ?: self::$errorMessage), self::stringify($value) ); throw new InvalidValidationException(self::$errorName, $message, $key, $value); } return in_array($value, [true, 'true', 1, '1'], true); } }
26.970588
82
0.691385
b0ea9e9e2ceee6752141a7e54b1b19f17e9f2833
1,747
py
Python
examples/nlp/duplex_text_normalization/nn_wfst/en/electronic/normalize.py
choclatier/NeMo
f01ef35367ecd9ab4953354c0a78b64f90b79f2a
[ "Apache-2.0" ]
null
null
null
examples/nlp/duplex_text_normalization/nn_wfst/en/electronic/normalize.py
choclatier/NeMo
f01ef35367ecd9ab4953354c0a78b64f90b79f2a
[ "Apache-2.0" ]
null
null
null
examples/nlp/duplex_text_normalization/nn_wfst/en/electronic/normalize.py
choclatier/NeMo
f01ef35367ecd9ab4953354c0a78b64f90b79f2a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # 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. from nemo_text_processing.text_normalization.normalize import Normalizer class ElectronicNormalizer(Normalizer): def __init__( self, input_case: str, lang: str = 'en', deterministic: bool = True, cache_dir: str = None, overwrite_cache: bool = False, ): super().__init__( input_case=input_case, lang=lang, deterministic=deterministic, cache_dir=cache_dir, overwrite_cache=overwrite_cache, ) from nn_wfst.en.electronic.tokenize_and_classify import ClassifyFst from nn_wfst.en.electronic.verbalize_final import VerbalizeFinalFst self.tagger = self.tagger = ClassifyFst( input_case=input_case, deterministic=deterministic, cache_dir=cache_dir, overwrite_cache=overwrite_cache ) self.verbalizer = VerbalizeFinalFst(deterministic=deterministic) if __name__ == "__main__": import sys input_string = sys.argv[1] normalizer = ElectronicNormalizer(input_case='cased') print(normalizer.normalize(input_string, verbose=False))
34.254902
116
0.705781
bd5be3ba0f435b6c18e52a8c1d4063fce1458ce8
336
sql
SQL
src/test/resources/incrvacuum.test_21.sql
jdkoren/sqlite-parser
9adf75ff5eca36f6e541594d2e062349f9ced654
[ "MIT" ]
131
2015-03-31T18:59:14.000Z
2022-03-09T09:51:06.000Z
src/test/resources/incrvacuum.test_21.sql
jdkoren/sqlite-parser
9adf75ff5eca36f6e541594d2e062349f9ced654
[ "MIT" ]
20
2015-03-31T21:35:38.000Z
2018-07-02T16:15:51.000Z
src/test/resources/incrvacuum.test_21.sql
jdkoren/sqlite-parser
9adf75ff5eca36f6e541594d2e062349f9ced654
[ "MIT" ]
43
2015-04-28T02:01:55.000Z
2021-06-06T09:33:38.000Z
-- incrvacuum.test -- -- execsql { -- BEGIN; -- CREATE TABLE tbl1(a); -- INSERT INTO tbl1 VALUES(str); -- PRAGMA incremental_vacuum; -- this is a no-op. -- COMMIT; -- } BEGIN; CREATE TABLE tbl1(a); INSERT INTO tbl1 VALUES(str); PRAGMA incremental_vacuum; -- this is a no-op. COMMIT;
22.4
69
0.568452
d3f6c8643c67ab4c312aafd627e24deb52c717a3
156
dart
Dart
lib/src/attributes/icon/icon_short.utils.dart
Solido/mix
ab0f5319ffdefe3789d58b494843db605b197c2f
[ "BSD-3-Clause" ]
147
2021-07-05T16:50:09.000Z
2022-03-30T21:24:42.000Z
lib/src/attributes/icon/icon_short.utils.dart
Solido/mix
ab0f5319ffdefe3789d58b494843db605b197c2f
[ "BSD-3-Clause" ]
53
2021-07-06T11:41:54.000Z
2022-03-24T16:59:23.000Z
lib/src/attributes/icon/icon_short.utils.dart
Solido/mix
ab0f5319ffdefe3789d58b494843db605b197c2f
[ "BSD-3-Clause" ]
9
2021-07-06T07:46:04.000Z
2022-03-07T17:54:20.000Z
import 'package:mix/src/attributes/exports.dart'; const icon = IconUtils.icon; const iconSize = IconUtils.iconSize; const iconColor = IconUtils.iconColor;
26
49
0.794872
be2980f2cf3e6f9b07c5f6d2d6ed469caf0af25d
7,031
ts
TypeScript
electron-app/tests/e2e/specs/settings_user.spec.ts
sponnet/rotki
ff706784fbc80cc66035a5355418c5ecf93f13ba
[ "BSD-3-Clause" ]
null
null
null
electron-app/tests/e2e/specs/settings_user.spec.ts
sponnet/rotki
ff706784fbc80cc66035a5355418c5ecf93f13ba
[ "BSD-3-Clause" ]
1
2020-01-14T04:37:15.000Z
2020-01-14T04:37:15.000Z
electron-app/tests/e2e/specs/settings_user.spec.ts
sponnet/rotki
ff706784fbc80cc66035a5355418c5ecf93f13ba
[ "BSD-3-Clause" ]
null
null
null
import { Application, SpectronClient } from 'spectron'; import { captureOnFailure, createAccount, GLOBAL_TIMEOUT, initSpectron, METHOD_TIMEOUT, navigateTo, setupTest } from './utils/common'; import { Guid } from './utils/guid'; import { AccountType, UserSettingsController } from './support/user_settings_controller'; jest.setTimeout(GLOBAL_TIMEOUT); jest.retryTimes(3); describe('user settings', () => { let app: Application; let stop: () => Promise<Application>; let client: SpectronClient; let controller: UserSettingsController; let username: string; const password: string = process.env.PASSWORD as string; const ethAccount: string = process.env.ETH_ADDRESS as string; const btcAccount: string = process.env.BTC_ADDRESS as string; beforeAll(async () => { username = Guid.newGuid().toString(); const testEnvironment = await initSpectron(); app = testEnvironment.application; stop = testEnvironment.stop; client = app.client; await setupTest(app, 'user settings', async () => { await createAccount(app, username, password); controller = new UserSettingsController(client); await navigateTo(client, '.user-dropdown__user-settings'); await client.waitForVisible('.user-settings', METHOD_TIMEOUT); // navigate to accounting settings and then back to user settings to // try and recreate https://github.com/rotki/rotki/issues/320 await navigateTo(client, '.user-dropdown__accounting-settings'); await client.waitUntilTextExists( '.page-header', 'Accounting Settings', METHOD_TIMEOUT ); await navigateTo(client, '.user-dropdown__user-settings'); await client.waitForVisible('.user-settings', METHOD_TIMEOUT); }); }); afterAll(async () => { await stop(); }); afterEach(async function() { await captureOnFailure(app); }); test('should add an ETH account and view the account balance', async () => { await controller.addAccount(AccountType.ETH, ethAccount); await client.waitUntilTextExists( '.balance-table__title', 'ETH per account balances', METHOD_TIMEOUT ); await client.scroll('.eth-balance-table', 0, 0); await client.waitForExist( '.eth-balance-table tbody > tr:nth-child(1) > td:nth-child(2)', METHOD_TIMEOUT ); await expect( client.getText( '.eth-balance-table tbody > tr:nth-child(1) > td:nth-child(1)' ) ).resolves.toEqual(ethAccount); await expect( client.getText( '.eth-balance-table thead > tr:nth-child(1) > th:nth-child(2)' ) ).resolves.toMatch('ETH'); await expect( client.getText( '.asset-balances tbody > tr:nth-child(1) > td:nth-child(1)' ) ).resolves.toMatch('ETH'); const assetTableColumn = client.getText( '.asset-balances tbody > tr:nth-child(1) > td:nth-child(3)' ); await expect(parseFloat(await assetTableColumn)).toBeGreaterThan(0); }); test('add a BTC account and see that it is added', async () => { await controller.addAccount(AccountType.BTC, btcAccount); await client.waitForExist('.btc-balance-table', METHOD_TIMEOUT); await client.scroll('.btc-balance-table'); await client.waitForExist( '.btc-balance-table tbody > tr:nth-child(1) > td:nth-child(2)', METHOD_TIMEOUT ); await expect( client.getText( '.btc-balance-table tbody > tr:nth-child(1) > td:nth-child(1)' ) ).resolves.toEqual(btcAccount); await expect( client.getText( '.asset-balances tbody > tr:nth-child(2) > td:nth-child(1)' ) ).resolves.toMatch('BTC'); const assetTableColumn = client.getText( '.asset-balances tbody > tr:nth-child(2) > td:nth-child(3)' ); await expect(parseFloat(await assetTableColumn)).toBeGreaterThanOrEqual(0); }); test('should add a token and see that the tokens are updated', async () => { await client.scroll('.token-track__search'); await client.waitForEnabled('.token-track__search', METHOD_TIMEOUT); await client.addValue('.token-track__search input', 'RDN'); await client.click('.v-list-item__title=RDN'); await client.waitUntilTextExists( '.asset-balances tbody > tr:nth-child(3) > td:nth-child(1)', 'RDN', METHOD_TIMEOUT ); await expect( client.getText( '.asset-balances tbody > tr:nth-child(3) > td:nth-child(1)' ) ).resolves.toMatch('RDN'); }); it('add a fiat balance and see that it is properly added', async () => { await controller.addFiatValue(); await client.waitForExist( '.fiat-balances tbody > tr:nth-child(1) > td:nth-child(2)', METHOD_TIMEOUT ); await expect( client.getText('.fiat-balances tbody > tr:nth-child(1) > td:nth-child(1)') ).resolves.toMatch('USD'); const amountColumn = client.getText( '.fiat-balances tbody > tr:nth-child(1) > td:nth-child(2)' ); await expect(amountColumn).resolves.toMatch('50'); const usdValueColumn = client.getText( '.fiat-balances tbody > tr:nth-child(1) > td:nth-child(3)' ); await expect(usdValueColumn).resolves.toMatch('50'); }); test('add an exchange key and and verify that it was added', async () => { const apiKey = process.env.BITTREX_API_KEY as string; const apiSecret = process.env.BITTREX_API_SECRET as string; await controller.addExchange(apiKey, apiSecret); await client.scroll('.exchange-settings', 0, 0); client.click('.exchange-settings__fields__exchange'); await client.waitForVisible('.v-select-list', METHOD_TIMEOUT); client.element(`.v-list-item__title=bittrex`).click(); await client.waitForVisible('.v-select-list', METHOD_TIMEOUT, false); await client.waitForEnabled( '.exchange-settings__fields__api-key input', METHOD_TIMEOUT, true ); await expect( client.element('.exchange-settings__fields__api-key input').isEnabled() ).resolves.toBe(false); await expect( client.element('.exchange-settings__fields__api-secret input').isEnabled() ).resolves.toBe(false); }); test('change the currency and verify that it changed in the tables', async () => { await client.waitForVisible('.currency-dropdown', METHOD_TIMEOUT); client.click('.currency-dropdown'); await client.waitForVisible('#change-to-eur', METHOD_TIMEOUT); client.click('#change-to-eur'); await client.waitForVisible('#change-to-eur', METHOD_TIMEOUT, false); await expect( client.getText('.fiat-balances thead > tr > th:last-child') ).resolves.toMatch('EUR'); await expect( client.getText('.asset-balances thead > tr > th:last-child') ).resolves.toMatch('EUR'); await expect( client.getText('.eth-balance-table thead > tr > th:nth-child(3)') ).resolves.toMatch('EUR'); await expect( client.getText('.btc-balance-table thead > tr > th:nth-child(3)') ).resolves.toMatch('EUR'); }); });
32.550926
84
0.662495
dd7be3074a4aa935084dd61265e101930ae3233a
843
java
Java
androidlibrary/commonlibrary/src/main/java/com/android/commonlibrary/cacher/normal_cache/MemoryLruCache.java
ShaoqiangPei/AndroidLibrary
87f3bce81bcf206eecf6237f57a911a28407bf44
[ "Apache-2.0" ]
7
2019-12-27T02:53:30.000Z
2021-10-12T03:05:04.000Z
androidlibrary/commonlibrary/src/main/java/com/android/commonlibrary/cacher/normal_cache/MemoryLruCache.java
ShaoqiangPei/AndroidLibrary
87f3bce81bcf206eecf6237f57a911a28407bf44
[ "Apache-2.0" ]
1
2021-03-25T09:39:33.000Z
2021-03-25T09:39:33.000Z
androidlibrary/commonlibrary/src/main/java/com/android/commonlibrary/cacher/normal_cache/MemoryLruCache.java
ShaoqiangPei/AndroidLibrary
87f3bce81bcf206eecf6237f57a911a28407bf44
[ "Apache-2.0" ]
2
2019-12-27T02:53:34.000Z
2020-11-09T08:06:50.000Z
package com.android.commonlibrary.cacher.normal_cache; import androidx.collection.LruCache; /** * Title:内存缓存 * Description:近期最少使用算法 * <p> * Created by pei * Date: 2017/10/23 */ public class MemoryLruCache<K,V> extends LruCache<K,V> { // 构造方法传入当前应用可用最大内存的八分之一 public MemoryLruCache() { super(CacheConfig.MEMORY_CACHE_SIZE); } @Override protected int sizeOf(K key, V value) { return super.sizeOf(key, value); } //当缓存被移除时调用,第一个参数是表明缓存移除的原因,true表示被LruCache移除,false表示被主动remove移除,可不重写 @Override protected void entryRemoved(boolean evicted, K key, V oldValue, V newValue) { super.entryRemoved(evicted, key, oldValue, newValue); } // 当get方法获取不到缓存的时候调用,如果需要创建自定义默认缓存,可以在这里添加逻辑,可不重写 @Override protected V create(K key) { return super.create(key); } }
22.184211
81
0.685647
9fd007285baef8d498b9afb3bdfe168c2defa298
6,780
py
Python
bangumi/spiders/bangumi_anime_api_spider.py
project-nichijou/nichijou.server.spider.bangumi
e84b13b0e8624a34185ced052ad0f4d41bf5bead
[ "MIT" ]
3
2021-06-24T14:39:43.000Z
2021-07-30T06:25:01.000Z
bangumi/spiders/bangumi_anime_api_spider.py
project-nichijou/bangumi-spider
e84b13b0e8624a34185ced052ad0f4d41bf5bead
[ "MIT" ]
12
2021-06-20T16:08:20.000Z
2021-06-29T02:43:54.000Z
bangumi/spiders/bangumi_anime_api_spider.py
project-nichijou/nichijou.server.spider.bangumi
e84b13b0e8624a34185ced052ad0f4d41bf5bead
[ "MIT" ]
1
2021-06-25T14:28:54.000Z
2021-06-25T14:28:54.000Z
from common.cache.cache_maker import make_cache_item from common.items.log_item import CommonLogItem from common.cache.cache_response import CacheResponse import pickle from common.utils.datetime import get_date_str_now, get_time_str_from_timestamp, get_time_str_now from common.items.cache_item import CommonCacheItem import time from bangumi.items.bangumi_episode_name_item import BangumiEpisodeNameItem from bangumi.items.bangumi_episode_item import BangumiEpisodeItem from bangumi.items.bangumi_anime_name_item import BangumiAnimeNameItem from common.utils.checker import is_not_null, is_null import traceback from common.utils.formatter import format_airing_status, format_date, format_duration, format_episode_type, format_id, format_int, format_weekday from common.utils.logger import format_log from common.utils.hash import get_md5 from common.items.fail_request_item import CommonFailedRequestItem import json from bangumi.items.bangumi_anime_item import BangumiAnimeAPIItem from bangumi.database.bangumi_database import BangumiDatabase from bangumi.config import bangumi_settings from common.spiders.common_spider import CommonSpider class BangumiAnimeAPISpider(CommonSpider): # scrapy name = 'bangumi_anime_api' allowed_domains = [bangumi_settings.BASE_DOMAIN] # common use_cookies = False def init_normal_datasource(self): sid_list = BangumiDatabase().read_sid('anime') self.start_values = [ { 'url': f'{bangumi_settings.BASE_API_URL}/subject/{sid}?responseGroup=large', 'sid': sid } for sid in sid_list ] def init_fail_datasource(self): failed_items = BangumiDatabase().read_fail(self.name) self.start_values = [ { 'url': item['url'], 'sid': int(json.loads(item['params'])['sid']) } for item in failed_items ] def start_requests(self): for _, val in enumerate(self.start_values): yield self.request(url=val['url'], callback=self.parse, errback=self.errback, cb_kwargs={'sid': val['sid']}) def parse(self, response, sid): url = str(response.url) result = BangumiAnimeAPIItem() result._url = url id = format_id(sid) result['id'] = id result['url'] = f'https://bgm.tv/subject/{sid}' result_fail = CommonFailedRequestItem( url = url, url_md5 = get_md5(url), spider = self.name, params = json.dumps({'sid': sid}) ) api_res = {} try: api_res = json.loads(response.text) except Exception as e: result_fail['desc'] = format_log( info = 'api response format error, cannot convert to json', exception = e, traceback = traceback.format_exc(), values = { 'url': url, 'sid': sid } ) yield result_fail return if is_null(api_res): result_fail['desc'] = format_log( info = 'api response empty', values = { 'url': url, 'sid': sid } ) yield result_fail return try: result['name'] = api_res.get('name') result['name_cn'] = api_res.get('name_cn') if is_not_null(result['name']): yield BangumiAnimeNameItem( id = id, name = result['name'] ) else: result['name'] = result['name_cn'] if is_not_null(result['name_cn']): yield BangumiAnimeNameItem( id = id, name = result['name'] ) identifier = { 'sid': sid, 'spider': self.name, 'url': url } result['desc'] = api_res.get('summary') result['eps_cnt'] = format_int(api_res.get('eps_count'), identifier) result['date'] = format_date(api_res.get('air_date'), identifier) result['weekday'] = format_weekday(api_res.get('air_weekday'), identifier) if api_res.get('images') == None: result['image'] = None else: if 'large' in api_res['images'].keys(): result['image'] = api_res['images']['large'] elif 'common' in api_res['images'].keys(): result['image'] = api_res['images']['common'] elif 'medium' in api_res['images'].keys(): result['image'] = api_res['images']['medium'] elif 'small' in api_res['images'].keys(): result['image'] = api_res['images']['small'] elif 'grid' in api_res['images'].keys(): result['image'] = api_res['images']['grid'] if is_null(api_res.get('rating')): result['rating'] = None else: result['rating'] = api_res.get('rating').get('score') result['rank'] = api_res.get('rank') # clear null for key in dict(result).keys(): if is_null(dict(result)[key]): del result[key] yield result except Exception as e: result_fail['desc'] = format_log( info = 'exception caught when handling API fields', exception = e, traceback = traceback.format_exc(), values = { 'api_res': api_res, 'item': result } ) yield result_fail return # cache part try: # 十年前的数据就设个缓存 today = get_date_str_now() ten_years_ago = int(today[:4]) - 10 target_date = f'{ten_years_ago}{today[4:]}' # 判断数据有效性 if 'date' in result.keys(): if is_not_null(result['date']) and result['date'] < target_date: # 缓存时间为一个月 cache_item = make_cache_item(response, 24 * 3600 * 30) if is_not_null(cache_item): yield cache_item except Exception as e: yield CommonLogItem( time = get_time_str_now(), content = format_log( info = 'cache failed.', exception = e, traceback = traceback.format_exc(), values = { 'spider': self.name, 'response': response.__dict__, 'sid': sid } ) ) eps = api_res.get('eps') if is_null(eps): return for ep in eps: result_ep = BangumiEpisodeItem() try: identifier['ep'] = ep.get('id') result_ep['id'] = id result_ep['type'] = format_episode_type(ep.get('type'), identifier) result_ep['sort'] = ep.get('sort') result_ep['url'] = f'https://bgm.tv/ep/{ep.get("id")}' result_ep['name'] = ep.get('name') result_ep['name_cn'] = ep.get('name_cn') result_ep['status'] = format_airing_status(ep.get('status'), identifier) result_ep['duration'] = format_duration(ep.get('duration'), identifier) result_ep['date'] = format_date(ep.get('airdate'), identifier) result_ep['desc'] = ep.get('desc') yield result_ep if is_not_null(result_ep['name']): yield BangumiEpisodeNameItem( id = id, type = result_ep['type'], sort = result_ep['sort'], name = result_ep['name'] ) if is_not_null(result_ep['name_cn']): yield BangumiEpisodeNameItem( id = id, type = result_ep['type'], sort = result_ep['sort'], name = result_ep['name_cn'] ) except Exception as e: result_fail['desc'] = format_log( info = 'exception caught when handling episodes in API.', exception = e, traceback = traceback.format_exc(), values = { 'api_res': api_res, 'ep_item': result_ep } ) yield result_fail return
28.851064
145
0.668437
a320330c99c9f789de7f60767bc7b948d47eb1c1
159
java
Java
domain-event-springboot-starter/src/main/java/com/github/domainevent/starter/EnableMicroserviceStream.java
match-middleware/domain-event-plugins
c6b3c526a985eaf266c9ee92151df20c968c7845
[ "Apache-2.0" ]
null
null
null
domain-event-springboot-starter/src/main/java/com/github/domainevent/starter/EnableMicroserviceStream.java
match-middleware/domain-event-plugins
c6b3c526a985eaf266c9ee92151df20c968c7845
[ "Apache-2.0" ]
null
null
null
domain-event-springboot-starter/src/main/java/com/github/domainevent/starter/EnableMicroserviceStream.java
match-middleware/domain-event-plugins
c6b3c526a985eaf266c9ee92151df20c968c7845
[ "Apache-2.0" ]
null
null
null
package com.github.domainevent.starter; /** * @Author zhangchao * @Date 2019/8/5 16:41 * @Version v1.0 */ public @interface EnableMicroserviceStream { }
14.454545
44
0.704403
a00eb98aadee519d194b9d21f5f0ba946bcfcde4
2,172
rs
Rust
stm32f4/src/stm32f469/ltdc/layer.rs
dgoodlad/crabdac
9341949c83e4437dee55af80b4eb6ab0cac648b1
[ "MIT" ]
null
null
null
stm32f4/src/stm32f469/ltdc/layer.rs
dgoodlad/crabdac
9341949c83e4437dee55af80b4eb6ab0cac648b1
[ "MIT" ]
null
null
null
stm32f4/src/stm32f469/ltdc/layer.rs
dgoodlad/crabdac
9341949c83e4437dee55af80b4eb6ab0cac648b1
[ "MIT" ]
null
null
null
#[doc = "CR register accessor: an alias for `Reg<CR_SPEC>`"] pub type CR = crate::Reg<cr::CR_SPEC>; #[doc = "Layerx Control Register"] pub mod cr; #[doc = "WHPCR register accessor: an alias for `Reg<WHPCR_SPEC>`"] pub type WHPCR = crate::Reg<whpcr::WHPCR_SPEC>; #[doc = "Layerx Window Horizontal Position Configuration Register"] pub mod whpcr; #[doc = "WVPCR register accessor: an alias for `Reg<WVPCR_SPEC>`"] pub type WVPCR = crate::Reg<wvpcr::WVPCR_SPEC>; #[doc = "Layerx Window Vertical Position Configuration Register"] pub mod wvpcr; #[doc = "CKCR register accessor: an alias for `Reg<CKCR_SPEC>`"] pub type CKCR = crate::Reg<ckcr::CKCR_SPEC>; #[doc = "Layerx Color Keying Configuration Register"] pub mod ckcr; #[doc = "PFCR register accessor: an alias for `Reg<PFCR_SPEC>`"] pub type PFCR = crate::Reg<pfcr::PFCR_SPEC>; #[doc = "Layerx Pixel Format Configuration Register"] pub mod pfcr; #[doc = "CACR register accessor: an alias for `Reg<CACR_SPEC>`"] pub type CACR = crate::Reg<cacr::CACR_SPEC>; #[doc = "Layerx Constant Alpha Configuration Register"] pub mod cacr; #[doc = "DCCR register accessor: an alias for `Reg<DCCR_SPEC>`"] pub type DCCR = crate::Reg<dccr::DCCR_SPEC>; #[doc = "Layerx Default Color Configuration Register"] pub mod dccr; #[doc = "BFCR register accessor: an alias for `Reg<BFCR_SPEC>`"] pub type BFCR = crate::Reg<bfcr::BFCR_SPEC>; #[doc = "Layerx Blending Factors Configuration Register"] pub mod bfcr; #[doc = "CFBAR register accessor: an alias for `Reg<CFBAR_SPEC>`"] pub type CFBAR = crate::Reg<cfbar::CFBAR_SPEC>; #[doc = "Layerx Color Frame Buffer Address Register"] pub mod cfbar; #[doc = "CFBLR register accessor: an alias for `Reg<CFBLR_SPEC>`"] pub type CFBLR = crate::Reg<cfblr::CFBLR_SPEC>; #[doc = "Layerx Color Frame Buffer Length Register"] pub mod cfblr; #[doc = "CFBLNR register accessor: an alias for `Reg<CFBLNR_SPEC>`"] pub type CFBLNR = crate::Reg<cfblnr::CFBLNR_SPEC>; #[doc = "Layerx ColorFrame Buffer Line Number Register"] pub mod cfblnr; #[doc = "CLUTWR register accessor: an alias for `Reg<CLUTWR_SPEC>`"] pub type CLUTWR = crate::Reg<clutwr::CLUTWR_SPEC>; #[doc = "Layerx CLUT Write Register"] pub mod clutwr;
44.326531
68
0.722836
354d7bd592c9a9ada35a3be0ce2f02995dd04881
11,632
sql
SQL
servers/slapd/back-sql/rdbms_depend/oracle/testdb_metadata.sql
LibreZimbra/zm-openldap
b70538de84b8a18357ebc312c3d395fedad37faf
[ "OLDAP-2.8" ]
372
2016-10-28T10:50:35.000Z
2022-03-18T19:54:37.000Z
servers/slapd/back-sql/rdbms_depend/oracle/testdb_metadata.sql
LibreZimbra/zm-openldap
b70538de84b8a18357ebc312c3d395fedad37faf
[ "OLDAP-2.8" ]
317
2016-11-02T17:41:48.000Z
2021-11-08T20:28:19.000Z
servers/slapd/back-sql/rdbms_depend/oracle/testdb_metadata.sql
LibreZimbra/zm-openldap
b70538de84b8a18357ebc312c3d395fedad37faf
[ "OLDAP-2.8" ]
148
2015-09-30T17:29:06.000Z
2022-03-23T01:07:59.000Z
-- mappings -- objectClass mappings: these may be viewed as structuralObjectClass, the ones that are used to decide how to build an entry -- id a unique number identifying the objectClass -- name the name of the objectClass; it MUST match the name of an objectClass that is loaded in slapd's schema -- keytbl the name of the table that is referenced for the primary key of an entry -- keycol the name of the column in "keytbl" that contains the primary key of an entry; the pair "keytbl.keycol" uniquely identifies an entry of objectClass "id" -- create_proc a procedure to create the entry -- delete_proc a procedure to delete the entry; it takes "keytbl.keycol" of the row to be deleted -- expect_return a bitmap that marks whether create_proc (1) and delete_proc (2) return a value or not insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (1,'inetOrgPerson','persons','id','call create_person(?)','call delete_person(?)',0); insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (2,'document','documents','id','call create_document(?)','call delete_document(?)',0); insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (3,'organization','institutes','id','call create_org(?)','call delete_org(?)',0); -- attributeType mappings: describe how an attributeType for a certain objectClass maps to the SQL data. -- id a unique number identifying the attribute -- oc_map_id the value of "ldap_oc_mappings.id" that identifies the objectClass this attributeType is defined for -- name the name of the attributeType; it MUST match the name of an attributeType that is loaded in slapd's schema -- sel_expr the expression that is used to select this attribute (the "select <sel_expr> from ..." portion) -- from_tbls the expression that defines the table(s) this attribute is taken from (the "select ... from <from_tbls> where ..." portion) -- join_where the expression that defines the condition to select this attribute (the "select ... where <join_where> ..." portion) -- add_proc a procedure to insert the attribute; it takes the value of the attribute that is added, and the "keytbl.keycol" of the entry it is associated to -- delete_proc a procedure to delete the attribute; it takes the value of the attribute that is added, and the "keytbl.keycol" of the entry it is associated to -- param_order a mask that marks if the "keytbl.keycol" value comes before or after the value in add_proc (1) and delete_proc (2) -- expect_return a mask that marks whether add_proc (1) and delete_proc(2) are expected to return a value or not insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (1,1,'cn','persons.name||'' ''||persons.surname','persons',NULL, NULL,NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (2,1,'telephoneNumber','phones.phone','persons,phones', 'phones.pers_id=persons.id','call add_phone(?,?)', 'call delete_phone(?,?)',0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (3,1,'givenName','persons.name','persons',NULL,'call set_person_name(?,?)', NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (4,1,'sn','persons.surname','persons',NULL,'call set_person_surname(?,?)', NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (5,1,'userPassword','persons.password','persons', 'persons.password IS NOT NULL','call set_person_password(?,?)', NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (6,1,'seeAlso','seeAlso.dn','ldap_entries seeAlso,documents,authors_docs,persons', 'seeAlso.keyval=documents.id AND seeAlso.oc_map_id=2 AND authors_docs.doc_id=documents.id AND authors_docs.pers_id=persons.id', NULL,NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (7,2,'description','documents.abstract','documents',NULL,'call set_doc_abstract(?,?)', NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (8,2,'documentTitle','documents.title','documents',NULL,'call set_doc_title(?,?)',NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (9,2,'documentAuthor','documentAuthor.dn','ldap_entries documentAuthor,documents,authors_docs,persons', 'documentAuthor.keyval=persons.id AND documentAuthor.oc_map_id=1 AND authors_docs.doc_id=documents.id AND authors_docs.pers_id=persons.id', '?=call make_author_link(?,?)','?=call del_author_link(?,?)',0,3); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (10,2,'documentIdentifier','''document ''||text(documents.id)','documents',NULL,NULL,NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (11,3,'o','institutes.name','institutes',NULL,'call set_org_name(?,?)',NULL,0,0); insert into ldap_attr_mappings (id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return) values (12,3,'dc','lower(institutes.name)','institutes,ldap_entries dcObject,ldap_entry_objclasses auxObjectClass', 'institutes.id=dcObject.keyval AND dcObject.oc_map_id=3 AND dcObject.id=auxObjectClass.entry_id AND auxObjectClass.oc_name=''dcObject''', NULL,NULL,0,0); -- entries mapping: each entry must appear in this table, with a unique DN rooted at the database naming context -- id a unique number > 0 identifying the entry -- dn the DN of the entry, in "pretty" form -- oc_map_id the "ldap_oc_mappings.id" of the main objectClass of this entry (view it as the structuralObjectClass) -- parent the "ldap_entries.id" of the parent of this objectClass; 0 if it is the "suffix" of the database -- keyval the value of the "keytbl.keycol" defined for this objectClass insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (ldap_entry_ids.nextval,'dc=example,dc=com',3,0,1); insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (ldap_entry_ids.nextval,'cn=Mitya Kovalev,dc=example,dc=com',1,1,1); insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (ldap_entry_ids.nextval,'cn=Torvlobnor Puzdoy,dc=example,dc=com',1,1,2); insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (ldap_entry_ids.nextval,'cn=Akakiy Zinberstein,dc=example,dc=com',1,1,3); insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (ldap_entry_ids.nextval,'documentTitle=book1,dc=example,dc=com',2,1,1); insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (ldap_entry_ids.nextval,'documentTitle=book2,dc=example,dc=com',2,1,2); -- objectClass mapping: entries that have multiple objectClass instances are listed here with the objectClass name (view them as auxiliary objectClass) -- entry_id the "ldap_entries.id" of the entry this objectClass value must be added -- oc_name the name of the objectClass; it MUST match the name of an objectClass that is loaded in slapd's schema insert into ldap_entry_objclasses (entry_id,oc_name) values (1,'dcObject'); insert into ldap_entry_objclasses (entry_id,oc_name) values (4,'referral'); -- referrals mapping: entries that should be treated as referrals are stored here -- entry_id the "ldap_entries.id" of the entry that should be treated as a referral -- url the URI of the referral insert into ldap_referrals (entry_id,url) values (4,'ldap://localhost:9012/'); -- procedures -- these procedures are specific for this RDBMS and are used in mapping objectClass and attributeType creation/modify/deletion CREATE OR REPLACE PROCEDURE create_person(keyval OUT NUMBER) AS BEGIN INSERT INTO persons (id,name) VALUES (person_ids.nextval,' '); SELECT person_ids.currval INTO keyval FROM DUAL; END; / CREATE OR REPLACE PROCEDURE delete_person(keyval IN NUMBER) AS BEGIN DELETE FROM phones WHERE pers_id=keyval; DELETE FROM authors_docs WHERE pers_id=keyval; DELETE FROM persons WHERE id=keyval; END; / CREATE OR REPLACE PROCEDURE create_org(keyval OUT NUMBER) AS BEGIN INSERT INTO institutes (id,name) VALUES (institute_ids.nextval,' '); SELECT institute_ids.currval INTO keyval FROM DUAL; END; / CREATE OR REPLACE PROCEDURE delete_org(keyval IN NUMBER) AS BEGIN DELETE FROM institutes WHERE id=keyval; END; / CREATE OR REPLACE PROCEDURE create_document(keyval OUT NUMBER) AS BEGIN INSERT INTO documents (id,title) VALUES (document_ids.nextval,' '); SELECT document_ids.currval INTO keyval FROM DUAL; END; / CREATE OR REPLACE PROCEDURE delete_document (keyval IN NUMBER) AS BEGIN DELETE FROM authors_docs WHERE doc_id=keyval; DELETE FROM documents WHERE id=keyval; END; / CREATE OR REPLACE PROCEDURE add_phone(pers_id IN NUMBER, phone IN varchar2) AS BEGIN INSERT INTO phones (id,pers_id,phone) VALUES (phone_ids.nextval,pers_id,phone); END; / CREATE OR REPLACE PROCEDURE delete_phone(keyval IN NUMBER, phone IN varchar2) AS BEGIN DELETE FROM phones WHERE pers_id=keyval AND phone=phone; END; / CREATE OR REPLACE PROCEDURE set_person_name(keyval IN NUMBER, new_name IN varchar2) AS BEGIN UPDATE persons SET name=new_name WHERE id=keyval; END; / CREATE OR REPLACE PROCEDURE set_org_name(keyval IN NUMBER, new_name IN varchar2) AS BEGIN UPDATE institutes SET name=new_name WHERE id=keyval; END; / CREATE OR REPLACE PROCEDURE set_doc_title (keyval IN NUMBER, new_title IN varchar2) AS BEGIN UPDATE documents SET title=new_title WHERE id=keyval; END; / CREATE OR REPLACE PROCEDURE set_doc_abstract (keyval IN NUMBER, new_abstract IN varchar2) AS BEGIN UPDATE documents SET abstract=new_abstract WHERE id=keyval; END; / CREATE OR REPLACE FUNCTION make_author_link (keyval IN NUMBER, author_dn IN varchar2) RETURN NUMBER AS per_id NUMBER; BEGIN SELECT keyval INTO per_id FROM ldap_entries WHERE oc_map_id=1 AND dn=author_dn; IF NOT (per_id IS NULL) THEN INSERT INTO authors_docs (doc_id,pers_id) VALUES (keyval,per_id); RETURN 1; END IF; RETURN 0; END; / CREATE OR REPLACE FUNCTION make_doc_link (keyval IN NUMBER, doc_dn IN varchar2) RETURN NUMBER AS docid NUMBER; BEGIN SELECT keyval INTO docid FROM ldap_entries WHERE oc_map_id=2 AND dn=doc_dn; IF NOT (docid IS NULL) THEN INSERT INTO authors_docs (pers_id,doc_id) VALUES (keyval,docid); RETURN 1; END IF; RETURN 0; END; / CREATE OR REPLACE FUNCTION del_doc_link (keyval IN NUMBER, doc_dn IN varchar2) RETURN NUMBER AS docid NUMBER; BEGIN SELECT keyval INTO docid FROM ldap_entries WHERE oc_map_id=2 AND dn=doc_dn; IF NOT (docid IS NULL) THEN DELETE FROM authors_docs WHERE pers_id=keyval AND doc_id=docid; RETURN 1; END IF; RETURN 0; END; / CREATE OR REPLACE FUNCTION del_author_link (keyval IN NUMBER, author_dn IN varchar2) RETURN NUMBER AS per_id NUMBER; BEGIN SELECT keyval INTO per_id FROM ldap_entries WHERE oc_map_id=1 AND dn=author_dn; IF NOT (per_id IS NULL) THEN DELETE FROM authors_docs WHERE doc_id=keyval AND pers_id=per_id; RETURN 1; END IF; RETURN 0; END; /
45.976285
162
0.78542
eb651f9cc0403450d6292ef8137edad3af887cf9
2,359
css
CSS
Style.css
MortarJack/MortarJack.github.io
079ce63674e25003f578750a296799e2e4d6715c
[ "OLDAP-2.4", "OLDAP-2.3", "OLDAP-2.8" ]
null
null
null
Style.css
MortarJack/MortarJack.github.io
079ce63674e25003f578750a296799e2e4d6715c
[ "OLDAP-2.4", "OLDAP-2.3", "OLDAP-2.8" ]
null
null
null
Style.css
MortarJack/MortarJack.github.io
079ce63674e25003f578750a296799e2e4d6715c
[ "OLDAP-2.4", "OLDAP-2.3", "OLDAP-2.8" ]
null
null
null
body { margin: auto; padding: 10px; width: 1000px; font-family: 'Helvetica Neue'; font-size: 18px; background-color: #777; } .nav { margin: 10px; height: 100px; background-color: #ebebeb } .aboutme { padding: 10px; margin: 10px; float: left; width: 550px; height: 300px; background-color: #ebebeb } .aside { padding: 10px; margin: 10px; float: right; width: 350px; height: 300px; background-color: #ebebeb } .footer { margin: auto; width: 980px; clear: both; height: 80px; background-color: #ebebeb } .header { margin: auto; width: 960px; height: 60px; background-color: #ebebeb; padding: 20px 10px; } .header a { float: left; color: black; text-align: center; padding: 12px; text-decoration: none; font-size: 18px; line-height: 25px; border-radius: 4px; } .header a:hover { background-color: dodgerblue; color: white; } .header a.active { background-color: dodgerblue; color: white; } .home { float: right; color: black; text-align: center; padding: 12px; text-decoration: none; font-size: 18px; line-height: 25px; border-radius: 4px; } .about { float: right; color: black; text-align: center; padding: 12px; text-decoration: none; font-size: 18px; line-height: 25px; border-radius: 4px; } .contact { float: right; color: black; text-align: center; padding: 12px; text-decoration: none; font-size: 18px; line-height: 25px; border-radius: 4px; } .article { background-color: #777; width: 550px; height: 200px; } .info { color: black; margin: auto; background-color: #ebebeb; width: 500px; height: 70px; } .p { color: black; margin: auto; background-color: #ebebeb; width: 500px; height: 70px; } .home:hover { background-color: dodgerblue; color: white; } .contact:hover { background-color: dodgerblue; color: white; } .about:hover { background-color: dodgerblue; color: white; } .home:active { background-color: dodgerblue; color: white; } .contact:active { background-color: dodgerblue; color: white; } .about:active { background-color: dodgerblue; color: white; }
15.318182
35
0.599407
8e7274019f6441655d77fc14d94ee199a9a56a4d
1,487
js
JavaScript
share-wxmal/pages/details/details.js
zhouyihangcn/my-blog
0d5c25923bebbef7c71c67bf763d8d696ce354cb
[ "Apache-2.0" ]
54
2019-08-31T06:52:10.000Z
2022-03-30T13:21:07.000Z
share-wxmal/pages/details/details.js
zhouyihangcn/my-blog
0d5c25923bebbef7c71c67bf763d8d696ce354cb
[ "Apache-2.0" ]
1
2020-04-02T13:18:24.000Z
2020-04-02T13:18:24.000Z
share-wxmal/pages/details/details.js
zhouyihangcn/my-blog
0d5c25923bebbef7c71c67bf763d8d696ce354cb
[ "Apache-2.0" ]
30
2019-09-05T06:14:28.000Z
2022-03-10T07:10:47.000Z
const util = require('../../utils/util.js'); const { $Toast } = require('../../dist/base/index'); var id=1; Page({ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { var that = this; id=options.id; console.log('id='+id); console.log('options.id=' + options.id) console.log(options.id); that.getDetails(id); }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { if (res.from === 'button') { // 来自页面内转发按钮 console.log(res.target) } return { title: '印象文档', path: '/pages/details/details?id='+id } }, wxmlTagATap(e) { console.log(e); }, onPullDownRefresh() { // 显示顶部刷新图标 wx.showNavigationBarLoading(); this.onLoad(); setTimeout(function () { // 隐藏导航栏加载框 wx.hideNavigationBarLoading(); //停止当前页面下拉刷新。 wx.stopPullDownRefresh() }, 1000) }, getDetails:function(id){ wx.request({ url: util.basePath + '/api/posts/'+id, success: res => { console.log(res); if(res.data.code==200){ wx.stopPullDownRefresh(); this.setData({ postTitle: res.data.result.postTitle, postViews: res.data.result.postViews, postContentMd: res.data.result.postContentMd, postDate: util.getDateDiff(res.data.result.postDate ) }); }else{ $Toast({ content: '请求错误', type: 'error' }); } } }) } })
22.19403
78
0.532616
33d77ab6d921c07d0f68d3645ed09c1bbda53648
5,109
c
C
src/pyjit-label.c
nkoep/python-libjit
6ca42dc44432cd54c61e6066d382b7f5a9d58f38
[ "Apache-2.0" ]
4
2021-06-07T12:16:23.000Z
2021-06-07T15:05:09.000Z
src/pyjit-label.c
nkoep/python-libjit
6ca42dc44432cd54c61e6066d382b7f5a9d58f38
[ "Apache-2.0" ]
null
null
null
src/pyjit-label.c
nkoep/python-libjit
6ca42dc44432cd54c61e6066d382b7f5a9d58f38
[ "Apache-2.0" ]
null
null
null
/* python-libjit, Copyright 2014 Niklas Koep * * 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. */ #include "pyjit-label.h" PyDoc_STRVAR(label_doc, "Wrapper class for jit_label_t"); static PyObject *label_cache = NULL; /* Slot implementations */ static void label_dealloc(PyJitLabel *self) { if (self->weakreflist) PyObject_ClearWeakRefs((PyObject *)self); if (self->label) { PYJIT_BEGIN_ALLOW_EXCEPTION if (pyjit_weak_cache_delitem(label_cache, (long)self->label) < 0) { PYJIT_TRACE("this shouldn't have happened"); abort(); } PYJIT_END_ALLOW_EXCEPTION } Py_TYPE(self)->tp_free((PyObject *)self); } static int _label_verify(PyJitLabel *self) { return 0; } PYJIT_HASH_GENERIC(label_hash, PyJitLabel, _label_verify, label) static int label_init(PyJitLabel *self, PyObject *args, PyObject *kwargs) { static char *kwlist[] = { NULL }; if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":Label", kwlist)) return -1; self->label = jit_label_undefined; /* Cache the label. */ return pyjit_weak_cache_setitem( label_cache, (long)self->label, (PyObject *)self); } static PyTypeObject PyJitLabel_Type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ "jit.Label", /* tp_name */ sizeof(PyJitLabel), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)label_dealloc, /* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)label_hash, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ label_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ offsetof(PyJitLabel, weakreflist), /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)label_init, /* tp_init */ 0, /* tp_alloc */ PyType_GenericNew /* tp_new */ }; int pyjit_label_init(PyObject *module) { if (PyType_Ready(&PyJitLabel_Type) < 0) return -1; /* Set up the label cache. */ label_cache = PyDict_New(); if (!label_cache) return -1; Py_INCREF(&PyJitLabel_Type); PyModule_AddObject(module, "Label", (PyObject *)&PyJitLabel_Type); return 0; } const PyTypeObject * pyjit_label_get_pytype(void) { return &PyJitLabel_Type; } PyObject * PyJitLabel_New(jit_label_t label) { long numkey; PyObject *object; numkey = (long)label; object = pyjit_weak_cache_getitem(label_cache, numkey); if (!object) { PyJitLabel *jit_label = PyObject_New(PyJitLabel, &PyJitLabel_Type); jit_label->label = label; object = (PyObject *)jit_label; if (pyjit_weak_cache_setitem(label_cache, numkey, object) < 0) { Py_DECREF(object); return NULL; } } return object; } PyJitLabel * PyJitLabel_Cast(PyObject *o) { int r = PyObject_IsInstance(o, (PyObject *)&PyJitLabel_Type); if (r == 1) return (PyJitLabel *)o; else if (r < 0 && PyErr_Occurred()) PyErr_Clear(); return NULL; }
31.537037
75
0.497749
c35c98dd2360ac591e44311d0037cd612881bccd
181
cs
C#
src/TemplateFileType.cs
win7user10/Microsoft.SharePoint.Client.NetStandard
16f1e6752a37a53cf453a274dbff39995327c248
[ "Apache-2.0" ]
null
null
null
src/TemplateFileType.cs
win7user10/Microsoft.SharePoint.Client.NetStandard
16f1e6752a37a53cf453a274dbff39995327c248
[ "Apache-2.0" ]
null
null
null
src/TemplateFileType.cs
win7user10/Microsoft.SharePoint.Client.NetStandard
16f1e6752a37a53cf453a274dbff39995327c248
[ "Apache-2.0" ]
1
2021-09-03T08:42:58.000Z
2021-09-03T08:42:58.000Z
namespace Microsoft.SharePoint.Client.NetStandard { public enum TemplateFileType { StandardPage, WikiPage, FormPage, ClientSidePage } }
16.454545
50
0.624309
c396c1b1aa3b603e4347a8098e7fdbd16409abdb
327
ps1
PowerShell
src/~commands/Angular/ng.createInterface.ps1
astepanian1/ns-ng-course
c3a6d0dba46848bb65320d988d8608a532d66ee7
[ "Apache-2.0" ]
null
null
null
src/~commands/Angular/ng.createInterface.ps1
astepanian1/ns-ng-course
c3a6d0dba46848bb65320d988d8608a532d66ee7
[ "Apache-2.0" ]
3
2021-03-09T17:56:07.000Z
2022-02-10T19:34:57.000Z
src/~commands/Angular/ng.createInterface.ps1
astepanian1/ns-ng-course
c3a6d0dba46848bb65320d988d8608a532d66ee7
[ "Apache-2.0" ]
null
null
null
[void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') $title = 'Create New Interface' $msg = 'Enter Interface Name:' $interfaceName = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title) If([string]::IsNullOrEmpty($interfaceName)){ return } Else { ng generate interface $interfaceName }
21.8
76
0.737003
cd87feabfd1a222a82dde5d3e21fc9885ca8e039
2,978
cs
C#
WebService/Api/TestRest/TestRestController.cs
alexandervantrijffel/WebApiOwinBoilerplate
a9a14f9e3cf1fe54e088969fd9b9c4aa3f119157
[ "MIT" ]
null
null
null
WebService/Api/TestRest/TestRestController.cs
alexandervantrijffel/WebApiOwinBoilerplate
a9a14f9e3cf1fe54e088969fd9b9c4aa3f119157
[ "MIT" ]
null
null
null
WebService/Api/TestRest/TestRestController.cs
alexandervantrijffel/WebApiOwinBoilerplate
a9a14f9e3cf1fe54e088969fd9b9c4aa3f119157
[ "MIT" ]
1
2017-05-11T22:54:10.000Z
2017-05-11T22:54:10.000Z
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using Structura.WebApiOwinBoilerPlate.WebService.JsonConfiguration; namespace Structura.WebApiOwinBoilerPlate.WebService.Api.TestRest { /// <summary> /// Example RESTful ApiController /// </summary> [RoutePrefix("api/testrest")] // [EnableCors("*", "*", "GET,POST,PUT,DELETE")] public class TestRestController : ApiController { private static SimpleTestRestValuesCollection _values = new SimpleTestRestValuesCollection(new Dictionary<int, string> { {1, "value1"}, {2, "value2"} }); [Route("")] public HttpResponseMessage GetAll() { return Request.CreateResponse(HttpStatusCode.OK, _values); return Request.CreateResponse(HttpStatusCode.NotModified, Enumerable.Empty<string>()); } [Route("{id:int}")] public HttpResponseMessage Get(int id) { if (!_values.ContainsKey(id)) return Request.CreateResponse(HttpStatusCode.NotFound, new HttpError($"Value with id {id} not found.")); return Request.CreateResponse(HttpStatusCode.OK, _values[id]); } [Route("")] public HttpResponseMessage Post([FromBody] AddOrUpdateTestRestValueDto args) { var newValue = _values.Create(args.Value); return Request.CreateResponse(HttpStatusCode.Created, new { Url = JsonConfigAccessor.Config.FullHostUrls.First() + $"/api/testrest/{newValue.Key}" }); } [Route("{id:int}")] public HttpResponseMessage Put(int id, [FromBody] AddOrUpdateTestRestValueDto args) { if (!_values.ContainsKey(id)) return Request.CreateResponse(HttpStatusCode.NotFound, new HttpError($"Value with id {id} not found")); _values[id] = args.Value; return Request.CreateResponse(HttpStatusCode.OK); } [Route("{id:int}")] public HttpResponseMessage Delete(int id) { return Request.CreateResponse(HttpStatusCode.NotImplemented); } /// <summary> /// Test URL with invalid date such as http://URL:PORT/api/testrest/badargtest/123 /// instead of a valid date such as http://URL:PORT/api/testrest/badargtest/2016-07-18T21:00:00.000Z /// </summary> [Route("badargtest/{time}")] [HttpGet] public HttpResponseMessage BadArgTest(DateTime time) { return Request.CreateResponse(HttpStatusCode.OK, new { ReceivedDateTime = $"{time.ToLongDateString()} {time.ToShortTimeString()}" }); } [Route("exceptiontest")] [HttpGet] public HttpResponseMessage ExceptionTest() { throw new Exception("Ugh, that was a bad idea Joe."); } } }
35.879518
126
0.616521
c741d911307ac05c6a3726b9fc2719062759e914
11,408
lua
Lua
AzurLaneData/zh-CN/sharecfg/enemy_data_statistics_sublist/enemy_data_statistics_298.lua
FlandreCirno/AzurLaneWikiUtilitiesManual
b525fd9086dd716bb65848a8cd0635b261ab6fdf
[ "MIT" ]
null
null
null
AzurLaneData/zh-CN/sharecfg/enemy_data_statistics_sublist/enemy_data_statistics_298.lua
FlandreCirno/AzurLaneWikiUtilitiesManual
b525fd9086dd716bb65848a8cd0635b261ab6fdf
[ "MIT" ]
null
null
null
AzurLaneData/zh-CN/sharecfg/enemy_data_statistics_sublist/enemy_data_statistics_298.lua
FlandreCirno/AzurLaneWikiUtilitiesManual
b525fd9086dd716bb65848a8cd0635b261ab6fdf
[ "MIT" ]
null
null
null
pg = pg or {} pg.enemy_data_statistics_298 = { [14102007] = { cannon = 60, reload = 150, speed_growth = 0, cannon_growth = 0, pilot_ai_template_id = 80000, air = 0, battle_unit_type = 15, dodge = 0, base = 80, durability_growth = 2550, antiaircraft = 0, reload_growth = 0, dodge_growth = 0, speed = 30, luck = 0, hit = 100, antisub_growth = 0, air_growth = 0, antiaircraft_growth = 0, torpedo = 120, durability = 80, armor_growth = 0, torpedo_growth = 1000, luck_growth = 0, hit_growth = 1000, armor = 0, id = 14102007, antisub = 0, appear_fx = { "appearsmall" }, equipment_list = { 1000867 } }, [14102101] = { cannon = 22, antiaircraft_growth = 3000, rarity = 5, speed_growth = 0, pilot_ai_template_id = 10001, air = 0, luck = 0, dodge = 22, id = 14102101, cannon_growth = 626, speed = 36, reload_growth = 0, dodge_growth = 360, reload = 150, star = 3, hit = 25, antisub_growth = 0, air_growth = 0, torpedo = 94, base = 172, durability = 3060, armor_growth = 0, torpedo_growth = 5200, luck_growth = 0, hit_growth = 280, armor = 0, durability_growth = 21600, antiaircraft = 72, antisub = 0, battle_unit_type = 50, bound_bone = { cannon = { { 0.088, 0.917, 0 } }, vicegun = { { 0.694, 0.853, 0 } }, torpedo = { { 0.088, 0.917, 0 } }, antiaircraft = { { 0.096, 3.156, 0 } } }, smoke = { { 70, { { "smoke", { -0.26, 0.686, -0.081 } } } }, { 40, { { "smoke", { -0.46, 0.486, -0.481 } }, { "smoke", { 0.54, 0.486, -0.481 } } } } }, appear_fx = { "appearQ" }, equipment_list = { 712001, 712002, 712003 } }, [14102102] = { cannon = 22, reload = 150, battle_unit_type = 50, speed_growth = 0, pilot_ai_template_id = 10001, air = 0, speed = 36, dodge = 22, id = 14102102, cannon_growth = 626, rarity = 4, reload_growth = 0, dodge_growth = 360, luck = 0, star = 5, hit = 25, antisub_growth = 0, air_growth = 0, torpedo = 94, base = 345, durability = 3060, armor_growth = 0, torpedo_growth = 5200, luck_growth = 0, hit_growth = 280, armor = 0, durability_growth = 21600, antiaircraft = 72, antisub = 0, antiaircraft_growth = 3000, fx_container = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } }, appear_fx = { "appearQ" }, equipment_list = { 712004, 712005, 712006 } }, [14102103] = { cannon = 38, reload = 150, speed_growth = 0, cannon_growth = 936, pilot_ai_template_id = 10001, air = 0, battle_unit_type = 55, dodge = 11, base = 412, durability_growth = 30400, antiaircraft = 156, reload_growth = 0, dodge_growth = 162, speed = 25, luck = 0, hit = 14, antisub_growth = 0, air_growth = 0, antiaircraft_growth = 3744, torpedo = 76, durability = 3570, armor_growth = 0, torpedo_growth = 3366, luck_growth = 0, hit_growth = 210, armor = 0, id = 14102103, antisub = 0, appear_fx = { "appearQ" }, equipment_list = { 712007, 712008, 712009, 712010 } }, [14102104] = { cannon = 54, reload = 150, speed_growth = 0, cannon_growth = 1500, pilot_ai_template_id = 10001, air = 0, rarity = 3, dodge = 11, torpedo = 58, durability_growth = 41600, antiaircraft = 88, reload_growth = 0, dodge_growth = 136, hit_growth = 280, star = 4, hit = 25, antisub_growth = 0, air_growth = 0, battle_unit_type = 60, base = 203, durability = 4420, armor_growth = 0, torpedo_growth = 2800, luck_growth = 0, speed = 18, luck = 0, id = 14102104, antiaircraft_growth = 3380, antisub = 0, armor = 0, appear_fx = { "appearQ" }, equipment_list = { 712011, 712012, 712013, 712014 } }, [14102105] = { cannon = 36, reload = 150, speed_growth = 0, cannon_growth = 0, rarity = 4, air = 81, torpedo = 0, dodge = 9, durability_growth = 54680, antiaircraft = 134, luck = 0, reload_growth = 0, dodge_growth = 96, hit_growth = 280, star = 5, hit = 25, antisub_growth = 0, air_growth = 4127, battle_unit_type = 70, base = 262, durability = 5230, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 16, armor = 0, id = 14102105, antiaircraft_growth = 5280, antisub = 0, appear_fx = { "bossguangxiao", "appearQ" }, equipment_list = { 712015, 712016, 1100797, 1100802, 1101022 } }, [14102106] = { cannon = 36, reload = 150, speed_growth = 0, cannon_growth = 0, rarity = 4, air = 81, torpedo = 0, dodge = 9, durability_growth = 54680, antiaircraft = 134, luck = 0, reload_growth = 0, dodge_growth = 96, hit_growth = 280, star = 5, hit = 25, antisub_growth = 0, air_growth = 4127, battle_unit_type = 70, base = 263, durability = 5230, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 16, armor = 0, id = 14102106, antiaircraft_growth = 5280, antisub = 0, appear_fx = { "bossguangxiao", "appearQ" }, equipment_list = { 712015, 712016, 1100797, 1100802, 1101022 } }, [14102301] = { cannon = 150, reload = 150, speed_growth = 0, cannon_growth = 0, battle_unit_type = 95, air = 182, base = 243, dodge = 20, durability_growth = 0, antiaircraft = 245, speed = 18, reload_growth = 0, dodge_growth = 256, luck = 15, antiaircraft_growth = 0, hit = 22, antisub_growth = 0, air_growth = 0, antisub = 0, torpedo = 0, durability = 39820, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, hit_growth = 210, armor = 0, id = 14102301, appear_fx = { "bossguangxiao", "appearQ" }, equipment_list = { 712021 } }, [14102302] = { cannon = 150, reload = 150, speed_growth = 0, cannon_growth = 0, battle_unit_type = 94, air = 182, base = 244, dodge = 20, durability_growth = 0, antiaircraft = 245, speed = 18, reload_growth = 0, dodge_growth = 256, luck = 35, antiaircraft_growth = 0, hit = 22, antisub_growth = 0, air_growth = 0, antisub = 0, torpedo = 0, durability = 39820, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, hit_growth = 210, armor = 0, id = 14102302, appear_fx = { "bossguangxiao", "appearQ" }, equipment_list = { 712021 } }, [14200001] = { cannon = 5, reload = 150, speed_growth = 0, cannon_growth = 300, battle_unit_type = 25, air = 0, base = 296, dodge = 0, durability_growth = 4000, antiaircraft = 25, speed = 15, reload_growth = 0, dodge_growth = 0, luck = 0, antiaircraft_growth = 800, hit = 10, antisub_growth = 0, air_growth = 0, antisub = 0, torpedo = 27, durability = 105, armor_growth = 0, torpedo_growth = 3000, luck_growth = 0, hit_growth = 144, armor = 0, id = 14200001, appear_fx = { "appearsmall", "music_huanraoyinfu_changliangdanchuan" }, equipment_list = { 1100010, 1100515 } }, [14200002] = { cannon = 10, reload = 150, speed_growth = 0, cannon_growth = 800, battle_unit_type = 30, air = 0, base = 446, dodge = 0, durability_growth = 5920, antiaircraft = 45, speed = 15, reload_growth = 0, dodge_growth = 0, luck = 0, antisub = 0, hit = 10, antisub_growth = 0, air_growth = 0, antiaircraft_growth = 1600, torpedo = 22, durability = 180, armor_growth = 0, torpedo_growth = 2000, luck_growth = 0, hit_growth = 144, armor = 0, id = 14200002, specific_fx_scale = {}, appear_fx = { "appearsmall", "music_huanraoyinfu_changliangdanchuan" }, equipment_list = { 1100335, 1100270, 1100490 } }, [14200003] = { cannon = 12, reload = 150, speed_growth = 0, cannon_growth = 1500, pilot_ai_template_id = 20004, air = 0, battle_unit_type = 35, dodge = 0, base = 285, durability_growth = 16000, antiaircraft = 35, reload_growth = 0, dodge_growth = 0, speed = 15, luck = 0, hit = 10, antisub_growth = 0, air_growth = 0, antiaircraft_growth = 1000, torpedo = 15, durability = 270, armor_growth = 0, torpedo_growth = 1200, luck_growth = 0, hit_growth = 144, armor = 0, id = 14200003, antisub = 0, scale = 180, appear_fx = { "appearsmall", "music_huanraoyinfu_gaoxiongdanchuan" }, equipment_list = { 1100040, 1100570, 1100455 } }, [14200004] = { cannon = 35, reload = 150, speed_growth = 0, cannon_growth = 2000, pilot_ai_template_id = 20004, air = 0, battle_unit_type = 60, dodge = 0, base = 305, durability_growth = 33600, antiaircraft = 40, reload_growth = 0, dodge_growth = 0, speed = 15, luck = 0, hit = 10, antisub_growth = 0, air_growth = 0, antiaircraft_growth = 1200, torpedo = 0, durability = 650, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, hit_growth = 144, armor = 0, id = 14200004, antisub = 0, scale = 195, appear_fx = { "appearsmall", "music_huanraoyinfu_fusangdanchuan" }, equipment_list = { 1100250, 1100915, 1100920 } }, [14200005] = { cannon = 0, reload = 150, speed_growth = 0, cannon_growth = 0, pilot_ai_template_id = 20004, air = 35, battle_unit_type = 65, dodge = 0, base = 317, durability_growth = 27200, antiaircraft = 40, reload_growth = 0, dodge_growth = 0, speed = 15, luck = 0, hit = 10, antisub_growth = 0, air_growth = 1800, antiaircraft_growth = 1200, torpedo = 0, durability = 560, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, hit_growth = 144, armor = 0, id = 14200005, antisub = 0, scale = 165, appear_fx = { "appearsmall", "music_huanraoyinfu_fusangdanchuan" }, equipment_list = { 1100885, 1100895, 1100075 } }, [14200006] = { cannon = 0, reload = 150, speed_growth = 0, cannon_growth = 0, pilot_ai_template_id = 80000, air = 0, battle_unit_type = 15, dodge = 0, base = 80, durability_growth = 1785, antiaircraft = 0, reload_growth = 0, dodge_growth = 0, speed = 30, luck = 0, hit = 81, antisub_growth = 0, air_growth = 0, antiaircraft_growth = 0, torpedo = 11, durability = 33, armor_growth = 0, torpedo_growth = 900, luck_growth = 0, hit_growth = 1200, armor = 0, id = 14200006, antisub = 0, appear_fx = { "appearsmall" }, equipment_list = { 1000865 } }, [14200101] = { cannon = 6, reload = 150, speed_growth = 0, cannon_growth = 468, rarity = 4, air = 0, torpedo = 54, dodge = 15, durability_growth = 18800, antiaircraft = 20, luck = 0, reload_growth = 0, dodge_growth = 222, hit_growth = 210, star = 4, hit = 14, antisub_growth = 0, air_growth = 0, battle_unit_type = 50, base = 473, durability = 510, armor_growth = 0, torpedo_growth = 4491, luck_growth = 0, speed = 33, armor = 0, id = 14200101, antiaircraft_growth = 1638, antisub = 0, equipment_list = { 1100445, 1100020, 729001, 1100185 } } } return
15.955245
42
0.584414
38836bd60d75aafae7aa445db930d4dcfea3ef42
1,174
dart
Dart
lib/parts/system_ui_overlay_style.dart
massa-org/theme_json_converter
7a7fbaf1b57ccd4af535706deed43835c6fbe091
[ "MIT" ]
null
null
null
lib/parts/system_ui_overlay_style.dart
massa-org/theme_json_converter
7a7fbaf1b57ccd4af535706deed43835c6fbe091
[ "MIT" ]
null
null
null
lib/parts/system_ui_overlay_style.dart
massa-org/theme_json_converter
7a7fbaf1b57ccd4af535706deed43835c6fbe091
[ "MIT" ]
null
null
null
part of theme_json_converter; class NullableSystemUiOverlayStyleConverter extends JsonConverter<SystemUiOverlayStyle?, String?> { const NullableSystemUiOverlayStyleConverter(); @override SystemUiOverlayStyle? fromJson(String? json) { if (json == null) return null; switch (json) { case 'dark': return SystemUiOverlayStyle.dark; case 'light': return SystemUiOverlayStyle.light; } throw 'Unsuported_Json_Value'; } @override String? toJson(SystemUiOverlayStyle? value) { if (value == null) return null; if (value == SystemUiOverlayStyle.dark) { return 'dark'; } else if (value == SystemUiOverlayStyle.light) { return 'light'; } throw 'Json_Unsuported_Value'; } } class SystemUiOverlayStyleConverter extends JsonConverter<SystemUiOverlayStyle, String> { const SystemUiOverlayStyleConverter(); @override SystemUiOverlayStyle fromJson(String json) { return const NullableSystemUiOverlayStyleConverter().fromJson(json)!; } @override String toJson(SystemUiOverlayStyle value) { return const NullableSystemUiOverlayStyleConverter().toJson(value)!; } }
23.48
73
0.715503
d16bf6dac06733bd51398adeab2d26f53a3c66fe
28
lua
Lua
exercises/practice/accumulate/accumulate.lua
GriffinMaxwell/lua
637803384da1c0a7b7162ac6db436acf37baa27b
[ "MIT" ]
23
2017-10-26T19:33:20.000Z
2021-11-06T14:23:02.000Z
exercises/practice/accumulate/accumulate.lua
GriffinMaxwell/lua
637803384da1c0a7b7162ac6db436acf37baa27b
[ "MIT" ]
59
2017-06-18T17:12:43.000Z
2022-03-19T10:50:13.000Z
exercises/practice/accumulate/accumulate.lua
GriffinMaxwell/lua
637803384da1c0a7b7162ac6db436acf37baa27b
[ "MIT" ]
37
2017-06-21T13:40:10.000Z
2022-03-19T10:37:34.000Z
return function(xs, f) end
7
22
0.714286
db6b02e94e2265904b189b6b2ee72a65a1d307a4
1,448
php
PHP
app/Http/Controllers/Auth/LoginController.php
forderation/arsip-berkas-kupang
91fcd69d418252d43462d9ea31ee073d9af496ab
[ "MIT" ]
null
null
null
app/Http/Controllers/Auth/LoginController.php
forderation/arsip-berkas-kupang
91fcd69d418252d43462d9ea31ee073d9af496ab
[ "MIT" ]
null
null
null
app/Http/Controllers/Auth/LoginController.php
forderation/arsip-berkas-kupang
91fcd69d418252d43462d9ea31ee073d9af496ab
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\AuthenticatesUsers; use App\Pegawai; use Auth; class LoginController extends Controller { public function __construct() { $this->middleware('guest:pegawai')->except('logout')->except('index'); } public function showLoginForm() { return view('login.pegawai'); } public function register(Request $request) { $request->validate([ 'nama_pegawai' => 'required|string', 'nomor_pegawai' => 'required|numeric|unique:admin', 'email' => 'required|string|email|unique:admin', 'password' => 'required|string|min:6|confirmed' ]); Pegawai::create($request->all()); return redirect()->route('pegawai.registerform')->with('success', 'Successfully register!'); } public function login(Request $request) { if (Auth::guard('pegawai')->attempt(['email' => $request->email, 'password' => $request->password], $request->remember)) { // if successful, then redirect to their intended location return redirect()->route('admin.dashboard'); } return back()->withErrors(['email' => 'Email atau password salah.']); } public function logout() { Auth::guard('pegawai')->logout(); return redirect()->route('pegawai.login'); } }
29.55102
130
0.608425
42162abe16d0649b9cf8d9bdfa1541c66a0e1537
282
cs
C#
Scripts/AStarManhattanHeuristic.cs
woshihuo12/AStarForCSharp
98e33462652af1d1f0f4c47643fc4dd2450666f7
[ "MIT" ]
7
2016-12-21T16:43:45.000Z
2021-12-24T02:57:47.000Z
Scripts/AStarManhattanHeuristic.cs
woshihuo12/AStarForCSharp
98e33462652af1d1f0f4c47643fc4dd2450666f7
[ "MIT" ]
null
null
null
Scripts/AStarManhattanHeuristic.cs
woshihuo12/AStarForCSharp
98e33462652af1d1f0f4c47643fc4dd2450666f7
[ "MIT" ]
3
2018-10-12T01:53:43.000Z
2020-02-19T13:12:09.000Z
using UnityEngine; using System.Collections; public class AStarManhattanHeuristic : IAStarHeuristic { public int Heuristic(int x1, int y1, int x2, int y2) { return ( (x1 > x2 ? x1 - x2 : x2 - x1) + (y1 > y2 ? y1 - y2 : y2 - y1) ) * AStarUtils.STRAIGHT_COST; } }
18.8
55
0.631206
dbcc2e8d320b4603b2b20a7264e9f523021e9cd8
9,515
php
PHP
resources/views/reports/schedule_4a.blade.php
suchetatamli/expenditure
b6cef2d0a755a8d745b39e7a4c757a7351e64358
[ "MIT" ]
null
null
null
resources/views/reports/schedule_4a.blade.php
suchetatamli/expenditure
b6cef2d0a755a8d745b39e7a4c757a7351e64358
[ "MIT" ]
null
null
null
resources/views/reports/schedule_4a.blade.php
suchetatamli/expenditure
b6cef2d0a755a8d745b39e7a4c757a7351e64358
[ "MIT" ]
null
null
null
@extends("crudbooster::admin_template") @section("content") <div class='panel panel-default'> <div class='panel-heading'>Day to Day Accounts of Election Expenditure</div> <div class='panel-body' style="padding:20px 0px 0px 0px"> <div class="print_area" id="print_area"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse; border:1px solid #000;" autosize="1"> <tr> <td colspan="8" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 16px; line-height: 25px; font-weight: bold;">Schedule- 4A</td> </tr> <tr> <td colspan="8" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height:15px;">Details of expenditure on campaign through print and electronic media including cable network, bulk SMS or Internet or social media, news items/TV/radio channel etc., including the paid news so decided by MCMC or voluntarily admitted by the candidate. The details should include the expenditure incurred on all such news items appearing in newspapers/TV/radio channels, owned by the candidate or by the political party sponsoring the candidate.</td> </tr> <tr> <td width="6%" rowspan="2" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">S. No</td> <td width="16%" rowspan="2" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Nature of medium (electronic / print) and duration</td> <td width="16%" rowspan="2" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Name and address of media provider (print /electronic /SMS / voice/ cable TV, social media etc.)</td> <td width="19%" rowspan="2" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Name and address of agency, reporter, stringer, company or any person to whom charges / commission etc. paid/ payable, if any</td> <td width="13%" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; border-bottom:0px; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Total Amount in Rs.</td> <td colspan="3" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Sources of Expenditure</td> </tr> <tr> <td align="left" valign="bottom" style="border-collapse:collapse; border:1px solid #000; border-top:0px; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Col. (3) +(4)</td> <td width="13%" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Amt. By candidate/ agent</td> <td width="9%" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Amt. By Pol. Party</td> <td width="8%" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Amt. By others</td> </tr> <tr> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">1</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">2</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">3</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">4</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">5</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">6</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">7</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">8</td> </tr> @if( count( $records ) > 0 ) @php $i = 1; $grand_total = 0; $grand_total_candidate = 0; $grand_total_pol_party = 0; $grand_total_other = 0; @endphp @foreach ($records as $record) <tr> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $i }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $record->nature_of_medium }}-{{ $record->medium_duration }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $record->media_provider_name }}<br/>{{ $record->media_provider_address }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $record->agency_name }}<br/>{{ $record->agency_address }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $record->total_amount }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $record->candidate_or_agent }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $record->pol_party }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">{{ $record->other }}</td> </tr> @php $i++; $grand_total += $record->total_amount; $grand_total_candidate += $record->candidate_or_agent; $grand_total_pol_party += $record->pol_party; $grand_total_other += $record->other; @endphp @endforeach @endif <tr> <td colspan="2" align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px; font-weight:bold;">Total</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">&nbsp;</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">&nbsp;</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Rs.{{ $grand_total }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Rs.{{ $grand_total_candidate }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Rs.{{ $grand_total_pol_party }}</td> <td align="left" valign="top" style="border-collapse:collapse; border:1px solid #000; padding:5px; font-family: Arial; font-size: 13px; line-height: 15px;">Rs.{{ $grand_total_other }}</td> </tr> </table> </div> <div class='panel-footer'> <button id="print" class="btn btn-success" type="button" onclick="printDiv('print_area')"> Print </button> </div> <script type="text/javascript"> function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; } </script> @endsection
88.101852
628
0.653705
e429d61f20b647ac6a6c1d44b2cb14f78b159cff
428
swift
Swift
LstsKit/Sources/LstsServerKit/DB/Migrations/LstsItemMigration.swift
brightdigit/Lsts
a34aa45b0c5982ed8ec3fee54b0b96738735252f
[ "MIT" ]
null
null
null
LstsKit/Sources/LstsServerKit/DB/Migrations/LstsItemMigration.swift
brightdigit/Lsts
a34aa45b0c5982ed8ec3fee54b0b96738735252f
[ "MIT" ]
null
null
null
LstsKit/Sources/LstsServerKit/DB/Migrations/LstsItemMigration.swift
brightdigit/Lsts
a34aa45b0c5982ed8ec3fee54b0b96738735252f
[ "MIT" ]
null
null
null
import Fluent import Vapor import Foundation struct LstsItemMigration: Migration { func prepare(on database: Database) -> EventLoopFuture<Void> { database.schema(LstsItemModel.schema) .id() .field("title", .string, .required) .field("completedAt", .datetime) .create() } func revert(on database: Database) -> EventLoopFuture<Void> { database.schema(LstsItemModel.schema).delete() } }
23.777778
64
0.686916
af5d992a86bf67c9c6793ae77168210a537d0838
27,245
py
Python
src/moles_esgf_tag_generation.py
cedadev/cci-vocabularies
5474f3acc6bd59f94dac54c3894b648d4ae80cb7
[ "BSD-3-Clause" ]
null
null
null
src/moles_esgf_tag_generation.py
cedadev/cci-vocabularies
5474f3acc6bd59f94dac54c3894b648d4ae80cb7
[ "BSD-3-Clause" ]
6
2015-09-07T08:11:55.000Z
2015-09-07T08:38:19.000Z
src/moles_esgf_tag_generation.py
cedadev/cci-vocabularies
5474f3acc6bd59f94dac54c3894b648d4ae80cb7
[ "BSD-3-Clause" ]
3
2015-08-20T09:59:40.000Z
2017-06-07T12:01:23.000Z
import json import os import time from rdflib import ConjunctiveGraph from rdflib.plugins.stores.sparqlstore import SPARQLStore import netCDF4 DEPTH = 1000 VERBOSE = True VERBOSE = False USE_MAPPING = False USE_MAPPING = True SCHEMES = {} NOT_FOUND = set() NOT_FOUND_FULL = set() FILE_DRS = None FILE_CSV = None FILE_ERROR = None FREQ_MAPPING = { 'daily': 'day', } INSTITUTION_MAPPING = { 'DTU Space - Div. of Geodynamics and NERSC': 'DTU Space', 'DTU Space - Microwaves and Remote Sensing': 'DTU Space', 'Deutsches Zentrum fuer Luft- und Raumfahrt (DLR)': 'Deutsches Zentrum fuer Luft- und Raumfahrt', 'ESACCI': 'ESACCI_SST', 'Plymouth Marine Laboratory Remote Sensing Group': 'Plymouth Marine Laboratory', 'Royal Netherlands Meteorological Institute (KNMI)': 'Royal Netherlands Meteorological Institute', 'SRON Netherlands Institute for Space Research': 'Netherlands Institute for Space Research', 'University of Leicester (UoL)': 'University of Leicester', } LEVEL_MAPPING = { 'level-3': 'l3', } PLATFORM_MAPPING = { 'ENV': 'ENVISAT', 'EOS-AURA': 'AURA', 'METOP-A': 'MetOpA', 'Nimbus 7': 'Nimbus-7', 'orbview-2/seastar': 'orbview-2', } SENSOR_MAPPING = { 'AMSR-E': 'AMSRE', 'ATSR-2': 'ATSR', 'AVHRR GAC': 'AVHRR', 'AVHRR_GAC': 'AVHRR', 'AVHRR_HRPT': 'AVHRR', 'AVHRR_LAC': 'AVHRR', 'AVHRR_MERGED': 'AVHRR', 'GFO': 'GFO-RA', 'MERIS_FRS': 'MERIS', 'MERIS_RR': 'MERIS', 'MODIS_MERGED': 'MODIS', 'RA2': 'RA-2', 'SMR_544.6GHz': 'SMR', } CONVERSIONS = {} CONVERSIONS['data_type'] = {} CONVERSIONS['ecv'] = {} CONVERSIONS['product'] = {} CONVERSIONS['time_coverage_resolution'] = FREQ_MAPPING CONVERSIONS['institution'] = INSTITUTION_MAPPING CONVERSIONS['processing_level'] = LEVEL_MAPPING CONVERSIONS['platform'] = PLATFORM_MAPPING CONVERSIONS['sensor'] = SENSOR_MAPPING ## SPARQL STUFF ## SPARQL_HOST_NAME = 'vocab-test.ceda.ac.uk' SPARQL_DATASET = 'vocab' SPARQL_QUERY = 'http://%s/%s/sparql' % (SPARQL_HOST_NAME, SPARQL_DATASET) MULTI_SENSOR = 'multi-sensor' MULTI_PLATFORM = 'multi-platform' # This allows us to use the prefix values in the queries rather than the url PREFIX = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> """ GRAPH = None def get_graph(): global GRAPH if GRAPH is None: store = SPARQLStore(endpoint=SPARQL_QUERY) GRAPH = ConjunctiveGraph(store=store) return GRAPH def get_concepts_in_scheme(uri): graph = get_graph() statement = PREFIX + \ 'SELECT ?concept ?label WHERE { GRAPH ?g {?concept skos:inScheme <' + uri + \ '> . ?concept skos:prefLabel ?label} }' result_set = graph.query(statement) concepts = {} for result in result_set: concepts[("" + result.label).lower()] = result.concept.decode() return concepts def get_alt_concepts_in_scheme(uri): graph = get_graph() statement = PREFIX + \ 'SELECT ?concept ?label WHERE { GRAPH ?g {?concept skos:inScheme <' + \ uri + '> . ?concept skos:altLabel ?label} }' result_set = graph.query(statement) concepts = {} for result in result_set: concepts[("" + result.label).lower()] = result.concept.decode() return concepts def get_pref_label(uri): # get the pref label for a uri graph = get_graph() statement = PREFIX + \ 'SELECT ?label WHERE { GRAPH ?g {<%s> skos:prefLabel ?label} }' % uri results = graph.query(statement) # there should only be one result for resource in results: return resource.label.decode() return '' def get_alt_label(uri): # get the alt label for a uri graph = get_graph() statement = PREFIX + \ 'SELECT ?label WHERE { GRAPH ?g {<%s> skos:altLabel ?label} }' % uri results = graph.query(statement) # there should only be one result for resource in results: return resource.label.decode() return '' ## END OF SPARQL STUFF ## ## PROCESS FILE NAMES ## def get_nc_files(_dir): file_list = [] count = 1 for root, _, files in os.walk(_dir): for name in files: if name.endswith('.nc'): file_list.append(os.path.join(root, name)) count = count + 1 if count > DEPTH: return file_list return file_list def scan_net_cdf_file(fpath, ds): """ Extract data from the net cdf file. The values to extract are take from the know_attr list which are the keys of the attr_mapping dictionary. """ drs = {} tags = {} try: nc = netCDF4.Dataset(fpath) except: FILE_ERROR.write("ERROR processing file %s\n" % fpath) return drs, tags if VERBOSE: print("GLOBAL ATTRS for %s: " % fpath) for global_attr in nc.ncattrs(): if VERBOSE: print(global_attr, "=", nc.getncattr(global_attr)) if global_attr.lower() in know_attr: attr = nc.getncattr(global_attr) if USE_MAPPING: if global_attr != 'institution' and '(' in attr: attr = attr.split(')') tmp_attr = '' first = True for bit in attr: if bit == '': continue if first: first = False tmp_attr = '%s%s' % ( tmp_attr, bit.split('(', 1)[1]) else: tmp_attr = '%s,%s' % ( tmp_attr, bit.split('(', 1)[1]) attr = tmp_attr attr = attr.replace('merged: ', '') if '<' in attr: bits = attr.split(', ') else: bits = attr.split(',') # Hack to deal with different variations if global_attr == 'platform': if 'NOAA-<12,14,15,16,17,18>' in bits: bits.remove('NOAA-<12,14,15,16,17,18>') bits.extend( ['NOAA-12', 'NOAA-14', 'NOAA-15', 'NOAA-16', 'NOAA-17', 'NOAA-18']) if 'ERS-<1,2>' in bits: bits.remove('ERS-<1,2>') bits.extend(['ERS-1', 'ERS-2']) if USE_MAPPING: if global_attr == 'sensor': if 'MERISAATSR' in bits: bits.remove('MERISAATSR') bits.extend(['MERIS', 'AATSR']) if ' OMI and GOME-2.' in bits: bits.remove(' OMI and GOME-2.') bits.extend(['OMI', 'GOME-2']) if global_attr == 'institution': if ('University of Leicester (UoL), UK' in attr or 'University of Leicester, UK' in attr): bits.remove(' UK') term_count = 0 none_found = False for bit in bits: term = get_term_uri(global_attr, bit.strip()) if term is not None: drs[attr_mapping[global_attr.lower()]] = get_pref_label( term) if term_count == 0: tags[attr_mapping[global_attr.lower()]] = set() tags[attr_mapping[global_attr.lower()]].add(term) term_count = term_count + 1 else: none_found = True if term_count > 1 and global_attr == 'sensor': drs[attr_mapping[global_attr.lower()]] = MULTI_SENSOR elif term_count > 1 and global_attr == 'platform': drs[attr_mapping[global_attr.lower()]] = MULTI_PLATFORM if none_found: NOT_FOUND_FULL.add( "%s: %s - %s" % (global_attr, nc.getncattr(global_attr), ds)) # we don't have a vocab for product_version elif global_attr.lower() == 'product_version': drs['product_version'] = nc.getncattr(global_attr) tags['product_version'] = nc.getncattr(global_attr) if VERBOSE: print("VARIABLES...") for (var_id, var) in nc.variables.items(): print(var_id, var) print("\tVARIABLE ATTRIBUTES (%s)" % var_id) for attr in var.ncattrs(): print("\t", attr, "=", var.getncattr(attr)) return drs, tags def parse_file_name(ds, fpath): """ Extract data from the file name. The file name comes in two different formats. The values are '-' delimited. Form 1 <Indicative Date>[<Indicative Time>]-ESACCI -<Processing Level>_<CCI Project>-<Data Type>-<Product String> [-<Additional Segregator>][-v<GDS version>]-fv<File version>.nc Form 2 ESACCI-<CCI Project>-<Processing Level>-<Data Type>-<Product String> [-<Additional Segregator>]-<IndicativeDate>[<Indicative Time>] -fv<File version>.nc Values extracted from the file name: Processing Level - level CCI Project - ecv_id Data Type - variable Product String - product_id """ form1 = {} form2 = {} path_facet_bits = fpath.split('/') last_bit = len(path_facet_bits) - 1 file_segments = path_facet_bits[last_bit].split('-') count = 0 if len(file_segments) < 2: FILE_ERROR.write( 'ERROR with format of file name %s from %s\n' % (path_facet_bits[last_bit], ds)) return {}, {} for segment in file_segments: count = count + 1 if file_segments[1] == 'ESACCI': if count == 7 and segment.startswith('fv'): count = 8 form1[count] = segment elif file_segments[0] == 'ESACCI': form2[count] = segment else: if count == 1: bits = segment.split('_') if len(bits) > 1: form1[count] = bits[0] count = count + 1 form1[count] = bits[1] else: form1[count] = segment elif count == 2 and segment.endswith('.nc'): form1[9] = segment elif count > 6: if segment.startswith('v'): form1[7] = segment elif segment.startswith('fv'): form1[8] = segment else: form1[count] = segment else: form1[count] = segment if form1: return process_form_1(ds, form1) if form2: return process_form_2(ds, form2) def process_form_1(ds, form): csv_rec = {} try: term = get_term_uri('processing_level', form[3].split('_')[0], ds) if term is not None: csv_rec['level'] = term term = get_term_uri('ecv', form[3].split('_')[1], ds) if term is not None: csv_rec['ecv_id'] = term except(KeyError): pass try: term = get_term_uri('data_type', form[4], ds) if term is not None: csv_rec['variable'] = term except(KeyError): pass try: term = get_term_uri('product', form[5], ds) if term is not None: csv_rec['product_id'] = term except(KeyError): pass return create_drs_record(csv_rec), csv_rec def process_form_2(ds, form): csv_rec = {} try: term = get_term_uri('processing_level', form[3], ds) if term is not None: csv_rec['level'] = term except(KeyError): pass try: term = get_term_uri('ecv', form[2], ds) if term is not None: csv_rec['ecv_id'] = term except(KeyError): pass try: term = get_term_uri('data_type', form[4], ds) if term is not None: csv_rec['variable'] = term except(KeyError): pass try: term = get_term_uri('product', form[5], ds) if term is not None: csv_rec['product_id'] = term except(KeyError): pass return create_drs_record(csv_rec), csv_rec def create_drs_record(csv_rec): proc_lev_label = get_alt_label(csv_rec.get('level')) project_label = get_alt_label(csv_rec.get('ecv_id')) data_type_label = get_alt_label(csv_rec.get('variable')) product_label = get_pref_label(csv_rec.get('product_id')) drs = {'project': 'esacci', 'ensemble': 'r1'} if project_label != '': drs['ecv_id'] = project_label if proc_lev_label != '': drs['level'] = proc_lev_label if data_type_label != '': drs['variable'] = data_type_label if product_label != '': drs['product_id'] = product_label return drs def process_datasets(datasets): # loop through the datasets pulling out data from file names and from # within net cdf files ds_len = len(datasets) print("Processing %s datasets" % ds_len) drs = {} count = 0 for ds in datasets: count = count + 1 tags_ds = {} # get a list of files nc_files = get_nc_files(ds) print("Dataset %s of %s Processing %s files from %s" % (count, ds_len, len(nc_files), ds)) for fpath in nc_files: drs_ds = {} net_cdf_drs, net_cdf_tags = parse_file_name(ds, fpath) drs_ds.update(net_cdf_drs) tags_ds.update(net_cdf_tags) net_cdf_drs, net_cdf_tags = scan_net_cdf_file(fpath, ds) drs_ds.update(net_cdf_drs) tags_ds.update(net_cdf_tags) # if drs_ds == {}: # FILE_ERROR.write('%s,no data extracted\n' % ds) dataset_id = generate_ds_id(ds, drs_ds) if dataset_id: # only add files with all of the drs data if dataset_id in drs.keys(): # FILE_ERROR.write("ERROR duplicate drs id %s\n" % dataset_id) drs[dataset_id].append(fpath) else: drs[dataset_id] = [fpath] write_csv(ds, tags_ds) write_json(drs) if len(NOT_FOUND) > 0: print("\nNOT IN VOCAB, SUMMARY:\n") for nf in sorted(NOT_FOUND): print(nf) if len(NOT_FOUND_FULL) > 0: print("\nNOT IN VOCAB, DETAIL:\n") for nf in sorted(NOT_FOUND_FULL): print(nf) def generate_ds_id(ds, drs): error = False facets = ['ecv_id', 'freq', 'level', 'variable', 'sensor_id', 'platform_id', 'product_id', 'product_version', 'ensemble'] ds_id = 'esacci' for facet in facets: try: if drs[facet] == '': error = True FILE_ERROR.write('%s,%s\n' % (ds, facet)) else: facet_value = str(drs[facet]).replace( '.', '-').replace(' ', '-') if facet == 'freq': facet_value = facet_value.replace( 'month', 'mon').replace('year', 'yr') ds_id = '%s.%s' % (ds_id, facet_value) except(KeyError): error = True FILE_ERROR.write('%s,%s\n' % (ds, facet)) if error: return None return ds_id def write_csv(ds, drs): single_values = ['variable', 'ecv_id', 'level', 'product_id'] multi_values = ['freq', 'institution', 'platform_id', 'sensor_id'] for value in single_values: try: FILE_CSV.write('%s,%s\n' % (ds, drs[value])) except KeyError: pass for value in multi_values: try: for uri in drs[value]: FILE_CSV.write('%s,%s\n' % (ds, uri)) except KeyError: pass def write_json(drs): FILE_DRS.write( json.dumps(drs, sort_keys=True, indent=4, separators=(',', ': '))) def get_term_uri(scheme, term, ds=None): scheme = scheme.lower() term_l = convert_term(scheme, term) if term_l in SCHEMES[scheme].keys(): return SCHEMES[scheme][term_l] elif term_l in SCHEMES[scheme + '-alt'].keys(): return SCHEMES[scheme + '-alt'][term_l] NOT_FOUND.add("%s: %s" % (scheme, term)) if ds: NOT_FOUND_FULL.add("%s: %s - %s" % (scheme, term, ds)) def convert_term(scheme, term): term = term.lower() if USE_MAPPING: for key in CONVERSIONS[scheme].keys(): if term == key.lower(): return CONVERSIONS[scheme][key].lower() return term def open_files(): global FILE_CSV, FILE_DRS, FILE_ERROR FILE_CSV = open('tags.csv', 'w') FILE_DRS = open('drs.json', 'w') FILE_ERROR = open('error.txt', 'w') def close_files(): FILE_CSV.close() FILE_DRS.close() FILE_ERROR.close() if __name__ == "__main__": print("\n\n\n\n\n%s STARTED" % (time.strftime("%H:%M:%S"))) attr_mapping = {'time_coverage_resolution': 'freq', 'institution': 'institution', 'platform': 'platform_id', 'sensor': 'sensor_id'} know_attr = attr_mapping.keys() SCHEMES['data_type'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/dataType') SCHEMES['data_type-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/dataType') SCHEMES['ecv'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/ecv') SCHEMES['ecv-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/ecv') SCHEMES['time_coverage_resolution'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/freq') SCHEMES['time_coverage_resolution-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/freq') SCHEMES['platform'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/platform') SCHEMES['platform-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/platform') SCHEMES['processing_level'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/procLev') SCHEMES['processing_level-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/procLev') SCHEMES['sensor'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/sensor') SCHEMES['sensor-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/sensor') SCHEMES['institution'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/org') SCHEMES['institution-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/org') SCHEMES['product'] = get_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/product') SCHEMES['product-alt'] = get_alt_concepts_in_scheme( 'http://vocab-test.ceda.ac.uk/scheme/cci/product') aerosol = { '/neodc/esacci_aerosol/data/MS_UVAI/L3_MONTHLY/v1.4.7', '/neodc/esacci_aerosol/data/MS_UVAI/L3_DAILY/v1.4.7', '/neodc/esacci_aerosol/data/MS_UVAI/L3_CLIMATOLOGY/v1.4.7', '/neodc/esacci_aerosol/data/MS_UVAI/IMAGES_MONTHLY/v1.4.7', '/neodc/esacci_aerosol/data/MS_UVAI/IMAGES_CLIMATOLOGY/v1.4.7', '/neodc/esacci_aerosol/data/GOMOS_AERGOM/L3_MONTHLY/v2.1', '/neodc/esacci_aerosol/data/ATSR2_SU//L3_MONTHLY//v4.2', # duff ? '/neodc/esacci_aerosol/data/ATSR2_SU/L3_DAILY/v4.2', '/neodc/esacci_aerosol/data/ATSR2_SU/L2/v4.2', '/neodc/esacci_aerosol/data/AATSR_SU/L3_MONTHLY/v4.2', '/neodc/esacci_aerosol/data/AATSR_SU/L3_DAILY/v4.2', '/neodc/esacci_aerosol/data/AATSR_SU/L2/v4.2', } cloud = { '/neodc/esacci_cloud/data/L3U/aatsr_envisat', '/neodc/esacci_cloud/data/L3U/avhrr_noaa-15', '/neodc/esacci_cloud/data/L3U/avhrr_noaa-16', '/neodc/esacci_cloud/data/L3U/avhrr_noaa-17', '/neodc/esacci_cloud/data/L3U/avhrr_noaa-18', '/neodc/esacci_cloud/data/L3U/merisaatsr_envisat', '/neodc/esacci_cloud/data/L3U/modis_aqua', '/neodc/esacci_cloud/data/L3U/modis_terra', '/neodc/esacci_cloud/data/L3C/modis_terra', '/neodc/esacci_cloud/data/L3S/modis_merged', '/neodc/esacci_cloud/data/L3C/modis_aqua', '/neodc/esacci_cloud/data/L3C/merisaatsr_envisat', '/neodc/esacci_cloud/data/L3S/merged', '/neodc/esacci_cloud/data/L3C/avhrr_noaa-18', '/neodc/esacci_cloud/data/L3C/avhrr_noaa-17', '/neodc/esacci_cloud/data/L3C/avhrr_noaa-16', '/neodc/esacci_cloud/data/L3C/avhrr_noaa-15', '/neodc/esacci_cloud/data/L3S/avhrr_merged/', # duff ? '/neodc/esacci_cloud/data/L3C/aatsr_envisat', } fire = { '/neodc/esacci_fire/data/burned_area/pixel/v3.1', '/neodc/esacci_fire/data/burned_area/grid', '/neodc/esacci_fire/data/burned_area/pixel', } glaciers = { '/neodc/esacci_glaciers/data/randolph_glacier_inventory/gridded/v5.0', } ghg = { '/neodc/esacci_ghg/data/crdp_2/L2/SCIAMACHY/CO2_SCI_BESD/v02.00.08', '/neodc/esacci_ghg/data/crdp_2/L2/SCIAMACHY/CO2_SCI_WFMD/v3.8', '/neodc/esacci_ghg/data/crdp_2/L2/GOSAT/CO2_GOS_BESD/v02.00.08', '/neodc/esacci_ghg/data/crdp_2/L2/GOSAT/CO2_GOS_SRFP/v2.3.6', '/neodc/esacci_ghg/data/crdp_2/L2/GOSAT/CO2_GOS_OCFP/v5.2', '/neodc/esacci_ghg/data/crdp_2/L2/merged/CO2_EMMA/v2.0', '/neodc/esacci_ghg/data/crdp_2/L2/SCIAMACHY/CH4_SCI_WFMD/v3.7', '/neodc/esacci_ghg/data/crdp_2/L2/SCIAMACHY/CH4_SCI_IMAP/v7.0', '/neodc/esacci_ghg/data/crdp_2/L2/GOSAT/CH4_GOS_SRPR/v2.3.6', '/neodc/esacci_ghg/data/crdp_2/L2/GOSAT/CH4_GOS_OCPR/v5.2', '/neodc/esacci_ghg/data/crdp_2/L2/GOSAT/CH4_GOS_SRFP/v2.3.6', } ice_sheet = { '/neodc/esacci/ice_sheets_greenland/', '/neodc/esacci/ice_sheets_greenland/', '/neodc/esacci/ice_sheets_greenland/', '/neodc/esacci/ice_sheets_greenland/', '/neodc/esacci/greenland_ice_sheets', '/neodc/esacci/greenland_ice_sheets', '/neodc/esacci/greenland_ice_sheets', '/neodc/esacci/greenland_ice_sheets', '/neodc/esacci/ice_sheets_greenland/', } land_cover = { '/neodc/esacci/land_cover/data/land_cover_maps/v1.6.1', } ocean_colour = { '/neodc/esacci_oc/data/v1-release/sinusoidal/netcdf/all_products/daily/v1.0', '/neodc/esacci_oc/data/v1-release/sinusoidal/netcdf/all_products/8day/v1.0', '/neodc/esacci_oc/data/v1-release/sinusoidal/netcdf/all_products/monthly/v1.0', '/neodc/esacci_oc/data/v1-release/sinusoidal/netcdf/chlor_a/daily/v1.0', '/neodc/esacci_oc/data/v1-release/sinusoidal/netcdf/kd/daily/v1.0', '/neodc/esacci_oc/data/v1-release/sinusoidal/netcdf/rrs/daily/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/rrs/daily/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/kd/daily/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/iop/daily/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/chlor_a/daily/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/all_products/annual/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/all_products/monthly/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/all_products/8day/v1.0', '/neodc/esacci_oc/data/v1-release/geographic/netcdf/all_products/daily/v1.0', } ozone = { '/neodc/esacci/ozone/data/total_columns/l3/merged/v0100', '/neodc/esacci/ozone/data/nadir_profiles/l3/merged/v0002', '/neodc/esacci/ozone/data/limb_profiles/l3/merged/merged_semi_monthly_mean/v0002', '/neodc/esacci/ozone/data/limb_profiles/l3/merged/merged_monthly_zonal_mean/v0002', '/neodc/esacci/ozone/data/limb_profiles/l3/sciamachy_envisat/monthly_zonal_mean/v0001', '/neodc/esacci/ozone/data/limb_profiles/l3/osiris/monthly_zonal_mean/v0001', '/neodc/esacci/ozone/data/limb_profiles/l3/smr_odin/monthly_zonal_mean/v0001', '/neodc/esacci/ozone/data/limb_profiles/l3/smr_odin_544_6/monthly_zonal_mean/v0001', '/neodc/esacci/ozone/data/limb_profiles/l3/mipas_envisat/monthly_zonal_mean/v0001', '/neodc/esacci/ozone/data/limb_profiles/l3/gomos_envisat/monthly_zonal_mean/v0001', '/neodc/esacci/ozone/data/limb_profiles/l3/ace_fts_scisat/monthly_zonal_mean/v0001', } sea_ice = { '/neodc/esacci/sea_ice/data/sea_ice_concentration/L4/ssmi/v1.11/SouthernHemisphere', '/neodc/esacci/sea_ice/data/sea_ice_concentration/L4/amsr-e/v1.11/SouthernHemisphere', '/neodc/esacci/sea_ice/data/sea_ice_concentration/L4/amsr-e/v1.11/NorthernHemisphere', '/neodc/esacci/sea_ice/data/sea_ice_concentration/L4/ssmi/v1.11/NorthernHemisphere', } sea_level = { '/neodc/esacci_sealevel/data/IND/v1.1', '/neodc/esacci_sealevel/data/L4/MSLA/v1.1', } sst = { '/neodc/esacci/sst/data/lt/Analysis/L4/v01.1', '/neodc/esacci_sst/data/gmpe', '/neodc/esacci_sst/data/lt/ATSR/L3U/v01.1', '/neodc/esacci_sst/data/lt/ATSR/L3U/v01.0', '/neodc/esacci_sst/data/lt/AVHRR', '/neodc/esacci_sst/data/lt/Analysis', } soil_moisture = { '/neodc/esacci/soil_moisture/data/daily_files/ACTIVE/v02.2', '/neodc/esacci/soil_moisture/data/daily_files/PASSIVE/v02.2', '/neodc/esacci/soil_moisture/data/daily_files/COMBINED/v02.1', '/neodc/esacci/soil_moisture/data/ancillary/v02.2', '/neodc/esacci_soilmoisture/data/ancillary/v02.1', '/neodc/esacci_soilmoisture/data/daily_files/COMBINED/v02.1', '/neodc/esacci_soilmoisture/data/daily_files/PASSIVE/v02.1', '/neodc/esacci_soilmoisture/data/daily_files/ACTIVE/v02.1', } datasets = {} datasets['aerosol'] = aerosol datasets['cloud'] = cloud datasets['fire'] = fire datasets['glaciers'] = glaciers datasets['ghg'] = ghg datasets['ice_sheet'] = ice_sheet datasets['land_cover'] = land_cover datasets['ocean_colour'] = ocean_colour datasets['ozone'] = ozone datasets['sea_ice'] = sea_ice datasets['sea_level'] = sea_level datasets['sst'] = sst datasets['soil_moisture'] = soil_moisture FORM1 = {} FORM1[1] = 'Indicative Date' FORM1[2] = 'ESACCI' FORM1[3] = 'Processing Level_CCI Project' FORM1[4] = 'Data Type' FORM1[5] = 'Product String' FORM1[6] = 'Additional Segregator' FORM1[7] = 'v<GDS version>' FORM1[8] = 'fv<File version>.nc' FORM1[9] = 'OTHER' FORM2 = {} FORM2[1] = 'ESACCI' FORM2[2] = 'CCI Project' FORM2[3] = 'Processing Level' FORM2[4] = 'Data Type' FORM2[5] = 'Product String' FORM2[6] = 'Additional Segregator' FORM2[7] = 'IndicativeDate' FORM2[8] = 'fv<File version>.nc' open_files() all_datasets = set() for value in datasets.values(): all_datasets.update(value) process_datasets(all_datasets) close_files() print("%s FINISHED\n\n" % (time.strftime("%H:%M:%S")))
35.337224
102
0.597871
0dd835d14605201f20114e9a8ec1c2bbf8a443fd
2,890
cs
C#
SellIt_ASP/Models/Entities/Category.cs
Naoual35/SellIt
e77d055e5d346501a68a6851faa1beda0213bca2
[ "MIT" ]
null
null
null
SellIt_ASP/Models/Entities/Category.cs
Naoual35/SellIt
e77d055e5d346501a68a6851faa1beda0213bca2
[ "MIT" ]
null
null
null
SellIt_ASP/Models/Entities/Category.cs
Naoual35/SellIt
e77d055e5d346501a68a6851faa1beda0213bca2
[ "MIT" ]
null
null
null
using NUnit.Framework; using SellIt.Entities.ValidationEntities; using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SellIt.Entities { [Table("Category")] public class Category { #region Attributs private long categoryId; private string name; private Brand brand; private string description; private float tva; private float price; #endregion #region Properties [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long CategoryId { get { return categoryId; } set { categoryId = value; } } [Column("name")] [DisplayName("Nom")] [StringLength(50, ErrorMessage = "le nom de la catégorie ne peut pas contenir plus de 50 caractères", MinimumLength = 1)] [Required(ErrorMessage = "Le nom de la marque est obligatoire")] public string Name { get { return name; } set { name = value; } } [Column("description")] [DisplayName("Description")] [StringLength(200, ErrorMessage = "la description de la catégorie ne peut pas contenir plus de 200 caractères", MinimumLength = 1)] public string Description { get { return description; } set { description = value; } } [Column("brand")] [DisplayName("Marque")] //[Required(ErrorMessage = "une marque est obligatoire")] public virtual Brand Brand { get { return brand; } set { brand = value; } } [NotMapped] public string LongDescription { get { if (Brand != null) { return Name + " " + Brand.Name; } else { return Name + " noBrand"; } } } [Column("price")] [DisplayName("Prix")] [PriceValid(250000)] [Required(ErrorMessage = "un prix est obligatoire")] public float Price { get { return price; } set { price = value; } } [Column("tva")] [DisplayName("TVA")] [Required(ErrorMessage = "une tva est obligatoire")] //[TvaValid] public float Tva { get { return tva; } set { tva = value; } } #endregion #region Functions public override string ToString() { return Newtonsoft.Json.JsonConvert.SerializeObject(this); } #endregion } }
25.350877
139
0.533564
c8e1cbba0144147c6295b655a8a1b3a65a6a13f2
1,267
swift
Swift
HackerRankMobile/FlightDetailsViewController.swift
Ares42/SlackerDank
d2481b93c2539b515436e78291f8960e16a083ef
[ "MIT" ]
1
2017-04-06T02:48:09.000Z
2017-04-06T02:48:09.000Z
HackerRankMobile/FlightDetailsViewController.swift
Ares42/SlackerDank
d2481b93c2539b515436e78291f8960e16a083ef
[ "MIT" ]
2
2017-05-04T21:14:00.000Z
2017-05-04T22:24:40.000Z
HackerRankMobile/FlightDetailsViewController.swift
Ares42/SlackerDank
d2481b93c2539b515436e78291f8960e16a083ef
[ "MIT" ]
null
null
null
// // FlightDetailsViewController.swift // HackerRankMobile // // Created by Luke Solomon on 9/13/17. // Copyright © 2017 Solomon Stuff. All rights reserved. // import UIKit class FlightDetailsViewController: UIViewController { @IBOutlet weak var viewTitle: UILabel! @IBOutlet weak var departureCityLabel: UILabel! @IBOutlet weak var departureCityTextField: UITextField! @IBOutlet weak var departureTimeLabel: UILabel! @IBOutlet weak var departureTimeTextField: UITextField! @IBOutlet weak var departureTimeSegmentedControl: UISegmentedControl! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ }
26.395833
106
0.691397
1ab2e67cd1ade54a57bea9dd0f3a14aa449e8ca5
2,150
py
Python
khnovel-book-scraper.py
solomonxie/txtbook-scraper
4670bfcbdb22de270ca35e55ff296a3b77197403
[ "Apache-2.0" ]
null
null
null
khnovel-book-scraper.py
solomonxie/txtbook-scraper
4670bfcbdb22de270ca35e55ff296a3b77197403
[ "Apache-2.0" ]
null
null
null
khnovel-book-scraper.py
solomonxie/txtbook-scraper
4670bfcbdb22de270ca35e55ff296a3b77197403
[ "Apache-2.0" ]
null
null
null
#Python2 # coding:utf-8 import os import time import requests from urlparse import urlparse from bs4 import BeautifulSoup def main(): book = Book('http://khnovel.com/243262-the-complete-robot.html') #print book.book_url book.fetch() class Book: def __init__(self, url): self.book_url = url self.title = '' self.info = '' self.intro = '' link = urlparse(url) self.host = link.scheme + '://' + link.netloc def fetch(self): print self.book_url r = requests.get(self.book_url, timeout=5) html = r.content # get book's basic info soup = BeautifulSoup(html, 'html5lib') tag = soup.find('div', attrs={'class':'detail-top'}) self.title = tag.h2.get_text().encode('utf-8') self.info = '\n'.join([p.get_text() for p in tag.find_all('p')]).encode('utf-8') self.intro = soup.find('div', attrs={'class':'detail-desc'}).get_text().encode('utf-8') # for markdown file file_name = './test/'+ self.title +'.md' file_content = '# '+ self.title +'\n'+ self.info +'\n'+ self.intro +'\n\n' # get chatper links results = soup.select('#ztitle > li > a') for item in results: chap = Chapter(self.host+item['href']) file_content += '## ' + chap.title + '\n' + chap.content + '\n\n' time.sleep(1) # to markdown file with open(file_name, 'w') as f: f.write(file_content) class Chapter: def __init__(self,url): self.chapter_url = url self.title = '' self.content = '' self.next_url = '' # initiate fetching online self.fetch() def fetch(self): print self.chapter_url r = requests.get(self.chapter_url, timeout=5) html = r.content soup = BeautifulSoup(html, 'html5lib') self.title = soup.find('div', attrs={'id':'play-wrap'}).h3.get_text().encode('utf-8') self.content = soup.find('div', attrs={'class':'contents-comic'}).p.get_text().encode('utf-8') if __name__ == "__main__": main()
27.922078
102
0.56186
414ad4a05ef90f09f6cd14442d26d7f9e6788bb3
1,361
css
CSS
css/tooltip.css
wholesome-sj/wholesome-sj.github.io
a270bd39c94031a08cd7f9443bcdf791718a6dfb
[ "MIT" ]
null
null
null
css/tooltip.css
wholesome-sj/wholesome-sj.github.io
a270bd39c94031a08cd7f9443bcdf791718a6dfb
[ "MIT" ]
1
2019-04-03T09:41:45.000Z
2019-04-03T12:45:07.000Z
css/tooltip.css
wholesome-sj/wholesome-sj.github.io
a270bd39c94031a08cd7f9443bcdf791718a6dfb
[ "MIT" ]
3
2021-05-16T16:40:09.000Z
2021-12-29T04:05:41.000Z
/* on Mobile, Invisible */ @media (max-width:768px) { .tooltip { display: none; } /* on Monitor, Visible */ } @media(min-width:769px) { .tooltip { position: relative; display: block; } .tooltip .tooltiptext { width: 120px; top: 150%; left: 50%; margin-left: -60px; /* Use half of the width (120/2 = 60), to center the tooltip */ transition: all .4s ease-in-out; } /* Tooltip text */ .tooltip .tooltiptext { opacity: 0; width: 120px; background-color: black; color: white; text-align: center; padding: 5px 0; /* Position the tooltip text - see examples below! */ position: absolute; z-index: 1; box-shadow: 0px 9px 18px -15px; } .tooltiptext:after { content: ''; position: absolute; top: 0; left: 53%; width: 0; height: 0; border: 0.625em solid transparent; border-bottom-color: black; border-top: 0; border-left: 0; margin-left: -0.312em; margin-top: -0.625em; } /* Show the tooltip text when you mouse over the tooltip container */ .tooltip:hover .tooltiptext { transition: all .4s ease-in-out; opacity: 1; } }
20.313433
73
0.514328
8505a50c38ba49955befc77974087dd0c87107e0
1,347
cs
C#
MonoKle/Input/Touch/IPinchAction.cs
Vectovox/MonoKle
67e6ee25dffa9931049738914968a2d9a45dd216
[ "MS-PL" ]
2
2015-06-05T17:20:47.000Z
2020-05-26T10:41:53.000Z
MonoKle/Input/Touch/IPinchAction.cs
Vectovox/MonoKle
67e6ee25dffa9931049738914968a2d9a45dd216
[ "MS-PL" ]
8
2015-11-05T16:03:47.000Z
2021-06-11T19:13:55.000Z
MonoKle/Input/Touch/IPinchAction.cs
Vectovox/MonoKle
67e6ee25dffa9931049738914968a2d9a45dd216
[ "MS-PL" ]
null
null
null
using System; namespace MonoKle.Input.Touch { /// <summary> /// Interface for a pinch action. /// </summary> public interface IPinchAction : ITouchAction { /// <summary> /// Gets the screen coordinate of the action origin. Throws if <see cref="ITouchAction.IsTriggered"/> is false. /// </summary> /// <exception cref="InvalidOperationException">Thrown if action is not valid. See <see cref="ITouchAction.IsTriggered"/>.</exception> MPoint2 Origin { get; } /// <summary> /// Gets the pinch factor. /// </summary> /// <remarks> /// A factor that is 0 if no change was made, negative if pinching /// inwards, and positive if pinching outwards. /// </remarks> float PinchFactor { get; } /// <summary> /// Returns <see cref="ITouchAction.IsTriggered"/>. If true, populates the out parameters /// with <see cref="Origin"/> and <see cref="PinchFactor"/>. /// </summary> /// <param name="origin">The coordinate of the action origin.</param> /// <param name="pinchFactor">The pinch factor of the action.</param> /// <returns>True if action is valid.</returns> bool TryGetValues(out MPoint2 origin, out float pinchFactor); } }
38.485714
143
0.584261
833c24fc402e9bd1307c04b4384525dd99fd9d33
1,458
sh
Shell
0.1/haproxy-monitor.sh
dmwpilot/docker-haproxy-letsencrypt
6dbf5aa740586d6e6a7985d07f246af660c0583a
[ "MIT" ]
null
null
null
0.1/haproxy-monitor.sh
dmwpilot/docker-haproxy-letsencrypt
6dbf5aa740586d6e6a7985d07f246af660c0583a
[ "MIT" ]
null
null
null
0.1/haproxy-monitor.sh
dmwpilot/docker-haproxy-letsencrypt
6dbf5aa740586d6e6a7985d07f246af660c0583a
[ "MIT" ]
null
null
null
#!/bin/bash # start haproxy and allow it to be restarted while making it appear to be in the foreground # arguments are "haproxy" followed by the arguments to haproxy # allows us to start something and restart it while keeping the monitor in the foreground # SIGUSR1 is used as the signal to this process to restart haproxy # SIGTERM is used to signal haproxy to stop MYPIDFILE=/var/run/haproxy-monitor.pid HAPIDFILE=/var/run/haproxy.pid case "${1:-}" in -*|'') echo $$ >$MYPIDFILE trap "rm -f $MYPIDFILE" 0 ;; stop) kill -TERM $(<$MYPIDFILE) if [ $? -ne 0 ]; then echo "Problem sending stop signal, perhaps monitor is not running" >&2 exit 1 fi exit 0 ;; restart) # there are some hitless methods of doing this, but leaving that for later kill -USR1 $(<$MYPIDFILE) if [ $? -ne 0 ]; then echo "Problem sending stop signal, perhaps monitor is not running" >&2 exit 1 fi exit 0 ;; *) echo "USAGE: $0 start|stop|restart haproxy [options]" >&2 exit 2 ;; esac trap ' RESTART=1 kill -15 $(<$HAPIDFILE) ' SIGUSR1 trap ' STOP=1 kill -TERM $(<$HAPIDFILE) ' SIGTERM RESTART= STOP= while : do haproxy -p $HAPIDFILE -W -db "$@" if [ -n "$STOP" ]; then break fi if [ -z "$RESTART" ]; then echo "Haproxy exited unexpectedly" exit 1 else echo "Haproxy restarting" RESTART= fi done echo "Haproxy exited normally" exit 0
20.828571
91
0.637174
690aad705000376a6d9cbad603aa32e7d9bbc4d8
1,005
rb
Ruby
recipes/users.rb
kyriba/cookbook-gitlab
b58a965ffc0b9c50d6ca52315680dfb51d33bd71
[ "MIT" ]
null
null
null
recipes/users.rb
kyriba/cookbook-gitlab
b58a965ffc0b9c50d6ca52315680dfb51d33bd71
[ "MIT" ]
null
null
null
recipes/users.rb
kyriba/cookbook-gitlab
b58a965ffc0b9c50d6ca52315680dfb51d33bd71
[ "MIT" ]
1
2020-11-04T05:45:34.000Z
2020-11-04T05:45:34.000Z
# # Cookbook Name:: gitlab # Recipe:: users # gitlab = node['gitlab'] # 3. System Users ## Create group for GitLab user group gitlab['group'] do gid gitlab['user_gid'] end ## Create user for Gitlab. user gitlab['user'] do comment "GitLab user" home gitlab['home'] shell "/bin/bash" uid gitlab['user_uid'] # We already created a user with specific gid so now we can supply the name # This line will make sure that we always have the correct group associated to the user # This is needed because if group id is nil chef won't supply -g to the useradd, see # https://github.com/opscode/chef/blob/11.4.4/lib/chef/provider/user/useradd.rb#L26 gid gitlab['group'] supports :manage_home => true end # Locking user is not needed in development user gitlab['user'] do action :lock only_if { gitlab['env'] == 'production' } end group node['redisio']['default_settings']['group'] do action :modify members gitlab['user'] append true not_if gitlab['redis_unixsocket'].nil? end
24.512195
89
0.708458
ae9411a7bf3d55d5502793bf76ff20edc86645af
321
cs
C#
Code and Assets/21_FinishingGame/Engine/IGameLoopObject.cs
egges/csharpgames
b82344be12f3ce703ff2a16206ec4059e973397d
[ "MIT" ]
35
2019-11-24T19:34:23.000Z
2022-02-15T13:16:56.000Z
Code and Assets/21_FinishingGame/Engine/IGameLoopObject.cs
egges/csharpgames
b82344be12f3ce703ff2a16206ec4059e973397d
[ "MIT" ]
null
null
null
Code and Assets/21_FinishingGame/Engine/IGameLoopObject.cs
egges/csharpgames
b82344be12f3ce703ff2a16206ec4059e973397d
[ "MIT" ]
13
2020-01-06T02:33:08.000Z
2022-02-14T12:37:57.000Z
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace Engine { public interface IGameLoopObject { void HandleInput(InputHelper inputHelper); void Update(GameTime gameTime); void Draw(GameTime gameTime, SpriteBatch spriteBatch); void Reset(); } }
20.0625
62
0.694704
2d20e9f16941ccd7ef03aa4db7d7c6282f0dd4de
700
asm
Assembly
oeis/001/A001076.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/001/A001076.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/001/A001076.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A001076: Denominators of continued fraction convergents to sqrt(5). ; Submitted by Jamie Morken(s1) ; 0,1,4,17,72,305,1292,5473,23184,98209,416020,1762289,7465176,31622993,133957148,567451585,2403763488,10182505537,43133785636,182717648081,774004377960,3278735159921,13888945017644,58834515230497,249227005939632,1055742538989025,4472197161895732,18944531186571953,80250321908183544,339945818819306129,1440033597185408060,6100080207560938369,25840354427429161536,109461497917277584513,463686346096539499588,1964206882303435582865,8320513875310281831048,35246262383544562907057,149305563409488533459276 mul $0,6 mov $3,1 lpb $0 sub $0,2 mov $2,$1 mov $1,$3 add $3,$2 lpe mov $0,$1 div $0,2
46.666667
501
0.84
3366a758240b2825452b29d25dac336f020ca31b
5,596
swift
Swift
Pods/Commander/Commander/ArgumentParser.swift
alexito4/Error-Handling-Script-Rust-Swift
6570b279413cf58a86d63c64a2090503aa2c6cd0
[ "MIT" ]
null
null
null
Pods/Commander/Commander/ArgumentParser.swift
alexito4/Error-Handling-Script-Rust-Swift
6570b279413cf58a86d63c64a2090503aa2c6cd0
[ "MIT" ]
null
null
null
Pods/Commander/Commander/ArgumentParser.swift
alexito4/Error-Handling-Script-Rust-Swift
6570b279413cf58a86d63c64a2090503aa2c6cd0
[ "MIT" ]
null
null
null
private enum Arg : CustomStringConvertible { /// A positional argument case Argument(String) /// A boolean like option, `--version`, `--help`, `--no-clean`. case Option(String) /// A flag case Flag(Set<Character>) var description:String { switch self { case .Argument(let value): return value case .Option(let key): return "--\(key)" case .Flag(let flags): return "-\(String(flags))" } } var type:String { switch self { case .Argument: return "argument" case .Option: return "option" case .Flag: return "flag" } } } public struct ArgumentParserError : ErrorType, Equatable, CustomStringConvertible { public let description: String public init(_ description: String) { self.description = description } } public func ==(lhs: ArgumentParserError, rhs: ArgumentParserError) -> Bool { return lhs.description == rhs.description } public final class ArgumentParser : ArgumentConvertible, CustomStringConvertible { private var arguments:[Arg] /// Initialises the ArgumentParser with an array of arguments public init(arguments: [String]) { self.arguments = arguments.map { argument in if argument.hasPrefix("-") { let flags = argument[argument.startIndex.successor()..<argument.endIndex] if flags.hasPrefix("-") { let option = flags[flags.startIndex.successor()..<flags.endIndex] return .Option(option) } return .Flag(Set(flags.characters)) } return .Argument(argument) } } public init(parser: ArgumentParser) throws { arguments = parser.arguments } public var description:String { return arguments.map { $0.description }.joinWithSeparator(" ") } public var isEmpty:Bool { return arguments.isEmpty } public var remainder:[String] { return arguments.map { $0.description } } /// Returns the first positional argument in the remaining arguments. /// This will remove the argument from the remaining arguments. public func shift() -> String? { for (index, argument) in arguments.enumerate() { switch argument { case .Argument(let value): arguments.removeAtIndex(index) return value default: continue } } return nil } /// Returns the value for an option (--name Kyle, --name=Kyle) public func shiftValueForOption(name:String) throws -> String? { return try shiftValuesForOption(name)?.first } /// Returns the value for an option (--name Kyle, --name=Kyle) public func shiftValuesForOption(name:String, count:Int = 1) throws -> [String]? { var index = 0 var hasOption = false for argument in arguments { switch argument { case .Option(let option): if option == name { hasOption = true break } fallthrough default: ++index } if hasOption { break } } if hasOption { arguments.removeAtIndex(index) // Pop option return try (0..<count).map { i in if arguments.count > index { let argument = arguments.removeAtIndex(index) switch argument { case .Argument(let value): return value default: throw ArgumentParserError("Unexpected \(argument.type) `\(argument)` as a value for `--\(name)`") } } throw ArgumentError.MissingValue(argument: "--\(name)") } } return nil } /// Returns whether an option was specified in the arguments public func hasOption(name:String) -> Bool { var index = 0 for argument in arguments { switch argument { case .Option(let option): if option == name { arguments.removeAtIndex(index) return true } default: break } ++index } return false } /// Returns whether a flag was specified in the arguments public func hasFlag(flag:Character) -> Bool { var index = 0 for argument in arguments { switch argument { case .Flag(var option): if option.contains(flag) { option.remove(flag) arguments.removeAtIndex(index) if !option.isEmpty { arguments.insert(.Flag(option), atIndex: index) } return true } default: break } ++index } return false } /// Returns the value for a flag (-n Kyle) public func shiftValueForFlag(flag:Character) throws -> String? { return try shiftValuesForFlag(flag)?.first } /// Returns the value for a flag (-n Kyle) public func shiftValuesForFlag(flag:Character, count:Int = 1) throws -> [String]? { var index = 0 var hasFlag = false for argument in arguments { switch argument { case .Flag(let flags): if flags.contains(flag) { hasFlag = true break } fallthrough default: ++index } if hasFlag { break } } if hasFlag { ++index // Jump flags return try (0..<count).map { i in if arguments.count > index { let argument = arguments.removeAtIndex(index) switch argument { case .Argument(let value): return value default: throw ArgumentParserError("Unexpected \(argument.type) `\(argument)` as a value for `-\(flag)`") } } throw ArgumentError.MissingValue(argument: "-\(flag)") } } return nil } }
23.123967
109
0.59614
4382b90fb0086bf1ef2a30513aa6666ef35071a2
511
ts
TypeScript
src/app/vinkort/vinkort-interface.ts
samuume/boefhuset
02a4b889bac6c3171b66631fbde4beaac0c8a429
[ "MIT" ]
null
null
null
src/app/vinkort/vinkort-interface.ts
samuume/boefhuset
02a4b889bac6c3171b66631fbde4beaac0c8a429
[ "MIT" ]
null
null
null
src/app/vinkort/vinkort-interface.ts
samuume/boefhuset
02a4b889bac6c3171b66631fbde4beaac0c8a429
[ "MIT" ]
null
null
null
/** * Created by zongy on 05-03-2017. */ export interface IMousserende { name: string, country: string, description: string, price: number } export interface IHvidvin { name: string, country: string, description: string, glas: string, price: number } export interface IRosevin { name: string, country: string, description: string, glas: string, price: number } export interface IRoedvin { name: string, country: string, description: string, glas: string, price: number }
16.483871
34
0.692759
dbf66845e2427e46155c30605ab03b241e2374a0
1,946
swift
Swift
Sources/MetalExtensions/MTLVector.swift
Yalir/MetalExtensions
e3f07b02b380d0020b978eb494933d1b629fb32b
[ "MIT" ]
2
2019-10-26T11:13:00.000Z
2020-01-24T21:06:51.000Z
Sources/MetalExtensions/MTLVector.swift
Yalir/MetalExtensions
e3f07b02b380d0020b978eb494933d1b629fb32b
[ "MIT" ]
null
null
null
Sources/MetalExtensions/MTLVector.swift
Yalir/MetalExtensions
e3f07b02b380d0020b978eb494933d1b629fb32b
[ "MIT" ]
null
null
null
// // MTLVector.swift // MetalExtensions // // Created by Ceylo on 22/06/2019. // Copyright © 2019-2021 Yalir. This code is licensed under MIT license (see LICENSE for details). // import CoreGraphics import Metal public struct MTLVector: Equatable { public var dx: Int = 0 public var dy: Int = 0 public var dz: Int = 0 static public var zero = MTLVector() public init(_ vector: (Int, Int)) { self.init(dx: vector.0, dy: vector.1, dz: 0) } public init(dx: Int = 0, dy: Int = 0, dz: Int = 0) { self.dx = dx self.dy = dy self.dz = dz } public init(_ origin: MTLOrigin) { self.init(dx: origin.x, dy: origin.y, dz: origin.z) } public init(vector: CGVector, residual: inout CGVector) { self.init(dx: Int(vector.dx), dy: Int(vector.dy)) residual = CGVector(dx: vector.dx - CGFloat(dx), dy: vector.dy - CGFloat(dy)) } public var isNull: Bool { dx == 0 && dy == 0 && dz == 0 } public var length: CGFloat { CGFloat(dx*dx + dy*dy + dz*dz).squareRoot() } static public prefix func - (vec: MTLVector) -> MTLVector { MTLVector(dx: -vec.dx, dy: -vec.dy, dz: -vec.dz) } static public func + (lhs: MTLVector, rhs: MTLVector) -> MTLVector { MTLVector(dx: lhs.dx + rhs.dx, dy: lhs.dy + rhs.dy, dz: lhs.dz + rhs.dz) } static public func += (lhs: inout MTLVector, rhs: MTLVector) { lhs = lhs + rhs // swiftlint:disable:this shorthand_operator } static public func / (lhs: MTLVector, rhs: Int) -> MTLVector { MTLVector(dx: lhs.dx / rhs, dy: lhs.dy / rhs, dz: lhs.dz / rhs) } static public func * (lhs: MTLVector, rhs: Int) -> MTLVector { MTLVector(dx: lhs.dx * rhs, dy: lhs.dy * rhs, dz: lhs.dz * rhs) } static public func * (lhs: Int, rhs: MTLVector) -> MTLVector { rhs * lhs } }
29.044776
99
0.569887
8f64bfc09fe0b4aa60d81a29fa33fdbdf0e05926
3,029
asm
Assembly
Src/Container/32/main.asm
The-Cracker-Technology/hyperion
4f005b6cdb197dc1ebed7e625139edaa5d975ae2
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
Src/Container/32/main.asm
The-Cracker-Technology/hyperion
4f005b6cdb197dc1ebed7e625139edaa5d975ae2
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
Src/Container/32/main.asm
The-Cracker-Technology/hyperion
4f005b6cdb197dc1ebed7e625139edaa5d975ae2
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
; Hyperion 32-Bit container.exe include 'image_base.inc' include 'main_prolog.inc' ;format PE ... entry start include '..\..\..\Fasm\INCLUDE\win32a.inc' include 'hyperion.inc' include 'createstrings.inc' include 'pe.inc' ;automatically generated by hyperion cpp stub include 'key_size.inc' include 'infile_size.inc' include 'image_size.inc' ;--- ;this contains the decrypted and loaded executable section '.bss' data readable writeable decrypted_infile: db IMAGE_SIZE dup (?) ;-------------------------------------------------- ;this contains the encrypted exe section '.data' data readable writeable encrypted_infile: include 'infile_array.inc' ;-------------------------------------------------- section '.text' code readable executable ;include necessary functions include 'logfile_select.asm' include 'loadapis.asm' include 'loadexecutable.asm' ;automatically generated by hyperion cpp stub include 'decryption_payload.asm' ;--- start: stdcall MainMethod invoke ExitProcess,0 proc MainMethod stdcall local str1[256]:BYTE,\ APITable:DWORD,\ CreateFileMapping_:DWORD,\ MapViewOfFile_:DWORD,\ UnmapViewOfFile_:DWORD,\ CreateFile_:DWORD,\ CloseHandle_:DWORD,\ DeleteFile_:DWORD,\ GetModuleHandle_:DWORD,\ VirtualAlloc_:DWORD,\ VirtualProtect_:DWORD,\ VirtualFree_:DWORD ;pointer to the API table lea eax,[CreateFileMapping_] mov [APITable],eax ;load APIs for log file access stdcall loadLogAPIs,[APITable] test eax,eax jz main_exiterrornolog ;create logfile and write initial message into it initLogFile APITable test eax,eax jz main_exiterrornolog ;load all necessary APIs stdcall loadRegularAPIs, [APITable] test eax,eax jz main_exiterror writeNewLineToLog APITable test eax,eax jz main_exiterror ;decrypt exe in data section stdcall decryptExecutable, [APITable], encrypted_infile test eax,eax jz main_exiterror ;load the executable at its image base ;(this will overwrite current MZ header and bss section) stdcall loadExecutable, [APITable], encrypted_infile test eax,eax jz main_exiterror ;start program execution mov edx,IMAGE_BASE mov eax,[edx+IMAGE_DOS_HEADER.e_lfanew] add eax,edx add eax,4 ;image file header now in eax add eax,sizeof.IMAGE_FILE_HEADER mov eax,[eax+IMAGE_OPTIONAL_HEADER32.AddressOfEntryPoint] add eax,IMAGE_BASE ;entry point of original exe is now in eax jmp eax ;finished without errors main_exitsuccess: writeNewLineToLog APITable createStringDone str1 lea eax,[str1] writeLog APITable, eax ret ;finished with errors after logfile API loading main_exiterror: writeNewLineToLog APITable createStringError str1 lea eax,[str1] writeLog APITable, eax ret ;finished with errors before logfile API loading main_exiterrornolog: ret endp ;import table section '.idata' import data readable writeable library kernel,'KERNEL32.DLL' import kernel,\ GetProcAddress,'GetProcAddress',\ LoadLibrary,'LoadLibraryA',\ ExitProcess,'ExitProcess'
22.604478
59
0.742819
fa880fafc7cf99141dacb7894697df7d7d21d0a1
2,546
cpp
C++
src/cpp/sample/Aggregate.cpp
sjoerdvankreel/xt-audio
960d6ed595c872c01af5c321b38b88a6ea07680a
[ "MIT" ]
49
2017-04-01T00:41:14.000Z
2022-03-23T09:03:28.000Z
src/cpp/sample/Aggregate.cpp
sjoerdvankreel/xt-audio
960d6ed595c872c01af5c321b38b88a6ea07680a
[ "MIT" ]
18
2017-04-29T22:46:35.000Z
2022-02-26T18:33:47.000Z
src/cpp/sample/Aggregate.cpp
sjoerdvankreel/xt-audio
960d6ed595c872c01af5c321b38b88a6ea07680a
[ "MIT" ]
14
2017-05-01T12:33:20.000Z
2021-10-01T07:16:26.000Z
#include <xt/XtAudio.hpp> #include <chrono> #include <thread> #include <cstdint> #include <cstring> #include <iostream> // Normally don't do I/O in the callback. static void OnXRun(Xt::Stream const& stream, int32_t index, void* user) { std::cout << "XRun on device " << index << ".\n"; } static void OnRunning(Xt::Stream const& stream, bool running, uint64_t error, void* user) { char const* evt = running? "Started": "Stopped"; std::cout << "Stream event: " << evt << ", new state: " << stream.IsRunning() << ".\n"; if(error != 0) std::cout << Xt::Audio::GetErrorInfo(error) << ".\n"; } static uint32_t OnBuffer(Xt::Stream const& stream, Xt::Buffer const& buffer, void* user) { Xt::Format const& format = stream.GetFormat(); Xt::Attributes attrs = Xt::Audio::GetSampleAttributes(format.mix.sample); int32_t bytes = buffer.frames * format.channels.inputs * attrs.size; std::memcpy(buffer.output, buffer.input, bytes); return 0; } int AggregateMain() { Xt::Mix mix(48000, Xt::Sample::Int16); Xt::Format inputFormat(mix, Xt::Channels(2, 0, 0, 0)); Xt::Format outputFormat(mix, Xt::Channels(0, 0, 2, 0)); std::unique_ptr<Xt::Platform> platform = Xt::Audio::Init("", nullptr); Xt::System system = platform->SetupToSystem(Xt::Setup::SystemAudio); std::unique_ptr<Xt::Service> service = platform->GetService(system); if(!service || (service->GetCapabilities() & Xt::ServiceCapsAggregation) == 0) return 0; std::optional<std::string> defaultInput = service->GetDefaultDeviceId(false); if(!defaultInput.has_value()) return 0; std::unique_ptr<Xt::Device> input = service->OpenDevice(defaultInput.value()); if(!input->SupportsFormat(inputFormat)) return 0; std::optional<std::string> defaultOutput = service->GetDefaultDeviceId(true); if(!defaultOutput.has_value()) return 0; std::unique_ptr<Xt::Device> output = service->OpenDevice(defaultOutput.value()); if(!output->SupportsFormat(outputFormat)) return 0; Xt::AggregateDeviceParams deviceParams[2]; deviceParams[0] = Xt::AggregateDeviceParams(input.get(), inputFormat.channels, 30.0); deviceParams[1] = Xt::AggregateDeviceParams(output.get(), outputFormat.channels, 30.0); Xt::StreamParams streamParams(true, OnBuffer, OnXRun, OnRunning); Xt::AggregateStreamParams aggregateParams(streamParams, deviceParams, 2, mix, output.get()); std::unique_ptr<Xt::Stream> stream = service->AggregateStream(aggregateParams, nullptr); stream->Start(); std::this_thread::sleep_for(std::chrono::seconds(2)); stream->Stop(); return 0; }
39.78125
94
0.706599
2fca08d434cb1f5ce98267d20aa70c75599047c6
2,471
py
Python
deform_jinja2/__init__.py
DustyHarry/deform_jinja2
6a1fb1539e8b0accbd4a49ccfb78fb0b87a2f798
[ "MIT" ]
null
null
null
deform_jinja2/__init__.py
DustyHarry/deform_jinja2
6a1fb1539e8b0accbd4a49ccfb78fb0b87a2f798
[ "MIT" ]
null
null
null
deform_jinja2/__init__.py
DustyHarry/deform_jinja2
6a1fb1539e8b0accbd4a49ccfb78fb0b87a2f798
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Jinja2 templates for deform. To use in Pyramid: In your settings.ini:: # default: # deform_jinja2.i18n.domain=deform # One of: deform_jinja2.template_search_path=deform_jinja2:templates deform_jinja2.template_search_path=deform_jinja2:uni_templates deform_jinja2.template_search_path=deform_jinja2:bootstrap_templates In your app initialization:: config.include('deform_jinja2') """ from jinja2 import Environment from jinja2 import FileSystemLoader from pkg_resources import resource_filename class DummyTranslator(object): @staticmethod def gettext(message): return message @staticmethod def ngettext(singular, plural, n): if n > 1: return plural return singular class jinja2_renderer_factory(object): def __init__(self, search_paths=(), default_templates='deform_jinja2:templates', translator=None, extensions=[]): if 'jinja2.ext.i18n' not in extensions: extensions.append('jinja2.ext.i18n') self.env = Environment(extensions=extensions) self.env.loader = FileSystemLoader(()) for path in search_paths: self.add_search_path(path) if translator == None: translator = DummyTranslator self.env.install_gettext_callables(translator.gettext, translator.ngettext) self.add_search_path(default_templates) def add_search_path(self, path): self.env.loader.searchpath.append(resource_filename(*(path.split(':')))) def add_filter(self, name, func): self.env.filters[name] = func def __call__(self, tname, **kw): if not '.jinja2' in tname: tname += '.jinja2' template = self.env.get_template(tname) return template.render(**kw) def includeme(config): from translator import PyramidTranslator import deform settings = config.registry.settings domain = settings.get('deform_jinja2.i18n.domain', 'deform') search_path = settings.get('deform_jinja2.template_search_path', '').strip() renderer = jinja2_renderer_factory(search_paths=search_path.split(), translator=PyramidTranslator(domain=domain)) deform.Form.set_default_renderer(renderer) def add_filter(config, name, func): renderer.add_filter(name, func) config.add_directive('add_jinja2_filter', add_filter) config.registry['deform_jinja2_renderer'] = renderer
27.455556
84
0.696884
def1cb8974f75c385378d0ff26983df697aa8bbd
3,295
swift
Swift
Project/Controller/BaseTableController.swift
kevinsumios/KSiShuHui
6a779a965aabc13f05d9e88073909331b88bd621
[ "MIT" ]
null
null
null
Project/Controller/BaseTableController.swift
kevinsumios/KSiShuHui
6a779a965aabc13f05d9e88073909331b88bd621
[ "MIT" ]
null
null
null
Project/Controller/BaseTableController.swift
kevinsumios/KSiShuHui
6a779a965aabc13f05d9e88073909331b88bd621
[ "MIT" ]
null
null
null
// // BaseTableController.swift // Project // // Created by Kevin Sum on 11/7/2017. // Copyright © 2017 Kevin iShuHui. All rights reserved. // import UIKit import Alamofire import MJRefresh import SDWebImage import SwiftyJSON class BaseTableController: BaseViewController { var data: [JSON] = [] var index = 0 var api: ApiHelper.Name? var parameter = Parameters() var didFinishLoad: (() -> ())? override func loadView() { api = nil super.loadView() } override func viewDidLoad() { super.viewDidLoad() // Layout initLayout() // Initial api data loadData() // MJRefresh let refreshFooter = MJRefreshBackNormalFooter { self.loadData() } refreshFooter?.setTitle("拼命向上", for: .idle) refreshFooter?.setTitle("拼命向上", for: .pulling) refreshFooter?.setTitle("夠了", for: .willRefresh) refreshFooter?.setTitle("瘋狂旋轉中", for: .refreshing) refreshFooter?.setTitle("不要再拉了", for: .noMoreData) tableView.mj_footer = refreshFooter } func initLayout() { } func loadData() { if let name = api { ApiHelper.shared.request( name: name, parameters: parameter, success: { (json, response) in if let result = json.dictionary?["Return"]?.dictionary { if let array = result["List"]?.array { self.data.append(contentsOf: array) self.didFinishLoad?() self.tableView.reloadData() if let count = result["ListCount"]?.int, let size = result["PageSize"]?.int { if (self.index+1)*size > count { self.tableView.mj_footer?.endRefreshingWithNoMoreData() return } else { self.index += 1 } } } } else if let number = json.int { self.alert(message: "\(number)") } self.tableView.mj_header?.endRefreshing() self.tableView.mj_footer?.endRefreshing() }, failure: { (error, response) in self.alert(message: error.localizedDescription) self.tableView.mj_header?.endRefreshing() self.tableView.mj_footer?.endRefreshing() }) } } func alert(message: String = "未知錯誤") { let alert = UIAlertController(title: "注意", message: message, preferredStyle: .alert) let okButton = UIAlertAction(title: "好的", style: .cancel, handler: nil) alert.addAction(okButton) self.present(alert, animated: true, completion: nil) } // MARK: - Table view data source override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return data.count } }
32.303922
105
0.514112
ddba9ffdfd2bd74e57a328d151dd6f8d34f3cb57
13,586
java
Java
geode-core/src/distributedTest/java/org/apache/geode/cache30/DistributedNoAckRegionCCEDUnitTest.java
xiaoyuMo/geode
d4a94f38a80b1e587384dfabf6c52e07e9c1e17a
[ "Apache-2.0" ]
null
null
null
geode-core/src/distributedTest/java/org/apache/geode/cache30/DistributedNoAckRegionCCEDUnitTest.java
xiaoyuMo/geode
d4a94f38a80b1e587384dfabf6c52e07e9c1e17a
[ "Apache-2.0" ]
4
2020-05-22T16:10:25.000Z
2022-03-30T23:49:10.000Z
geode-core/src/distributedTest/java/org/apache/geode/cache30/DistributedNoAckRegionCCEDUnitTest.java
xiaoyuMo/geode
d4a94f38a80b1e587384dfabf6c52e07e9c1e17a
[ "Apache-2.0" ]
1
2022-01-19T00:34:07.000Z
2022-01-19T00:34:07.000Z
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.cache30; import static org.apache.geode.distributed.ConfigurationProperties.CONSERVE_SOCKETS; import static org.apache.geode.distributed.ConfigurationProperties.DISTRIBUTED_SYSTEM_ID; import static org.apache.geode.distributed.ConfigurationProperties.SOCKET_BUFFER_SIZE; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import java.util.Map; import java.util.Properties; import org.junit.Test; import org.apache.geode.cache.AttributesFactory; import org.apache.geode.cache.CacheException; import org.apache.geode.cache.CacheListener; import org.apache.geode.cache.DataPolicy; import org.apache.geode.cache.EntryEvent; import org.apache.geode.cache.EntryNotFoundException; import org.apache.geode.cache.RegionAttributes; import org.apache.geode.cache.RegionFactory; import org.apache.geode.cache.RegionShortcut; import org.apache.geode.cache.Scope; import org.apache.geode.cache.util.CacheListenerAdapter; import org.apache.geode.internal.cache.LocalRegion; import org.apache.geode.test.dunit.Assert; import org.apache.geode.test.dunit.AsyncInvocation; import org.apache.geode.test.dunit.Host; import org.apache.geode.test.dunit.LogWriterUtils; import org.apache.geode.test.dunit.SerializableRunnable; import org.apache.geode.test.dunit.VM; import org.apache.geode.test.dunit.Wait; public class DistributedNoAckRegionCCEDUnitTest extends DistributedNoAckRegionDUnitTest { static volatile boolean ListenerBlocking; @Override public Properties getDistributedSystemProperties() { Properties p = super.getDistributedSystemProperties(); p.put(CONSERVE_SOCKETS, "false"); if (distributedSystemID > 0) { p.put(DISTRIBUTED_SYSTEM_ID, "" + distributedSystemID); } p.put(SOCKET_BUFFER_SIZE, "" + 2000000); return p; } /** * Returns region attributes for a <code>GLOBAL</code> region */ @Override protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_NO_ACK); factory.setDataPolicy(DataPolicy.REPLICATE); factory.setConcurrencyChecksEnabled(true); return factory.create(); } @Override protected RegionAttributes getRegionAttributes(String type) { RegionAttributes ra = getCache().getRegionAttributes(type); if (ra == null) { throw new IllegalStateException("The region shortcut " + type + " has been removed."); } AttributesFactory factory = new AttributesFactory(ra); factory.setScope(Scope.DISTRIBUTED_NO_ACK); factory.setConcurrencyChecksEnabled(true); return factory.create(); } @Override @Test public void testLocalDestroy() { // replicates don't allow local destroy } @Override @Test public void testEntryTtlLocalDestroy() { // replicates don't allow local destroy } @Test public void testClearWithManyEventsInFlight() { Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); VM vm3 = host.getVM(3); // create replicated regions in VM 0 and 1, then perform concurrent ops // on the same key while creating the region in VM2. Afterward make // sure that all three regions are consistent final String name = this.getUniqueName() + "-CC"; createRegionWithAttribute(vm0, name, false); createRegionWithAttribute(vm1, name, false); createRegionWithAttribute(vm2, name, false); createRegionWithAttribute(vm3, name, false); vm0.invoke(() -> DistributedNoAckRegionCCEDUnitTest.addBlockingListener()); vm1.invoke(() -> DistributedNoAckRegionCCEDUnitTest.addBlockingListener()); vm2.invoke(() -> DistributedNoAckRegionCCEDUnitTest.addBlockingListener()); AsyncInvocation vm0Ops = vm0.invokeAsync(() -> DistributedNoAckRegionCCEDUnitTest.doManyOps()); AsyncInvocation vm1Ops = vm1.invokeAsync(() -> DistributedNoAckRegionCCEDUnitTest.doManyOps()); AsyncInvocation vm2Ops = vm2.invokeAsync(() -> DistributedNoAckRegionCCEDUnitTest.doManyOps()); // pause to let a bunch of operations build up Wait.pause(5000); AsyncInvocation a0 = vm3.invokeAsync(() -> DistributedNoAckRegionCCEDUnitTest.clearRegion()); vm0.invoke(() -> DistributedNoAckRegionCCEDUnitTest.unblockListener()); vm1.invoke(() -> DistributedNoAckRegionCCEDUnitTest.unblockListener()); vm2.invoke(() -> DistributedNoAckRegionCCEDUnitTest.unblockListener()); waitForAsyncProcessing(a0, ""); waitForAsyncProcessing(vm0Ops, ""); waitForAsyncProcessing(vm1Ops, ""); waitForAsyncProcessing(vm2Ops, ""); Wait.pause(2000);// this test has with noack, thus we should wait before validating entries // check consistency of the regions Map r0Contents = vm0.invoke(() -> getCCRegionContents()); Map r1Contents = vm1.invoke(() -> getCCRegionContents()); Map r2Contents = vm2.invoke(() -> getCCRegionContents()); Map r3Contents = vm3.invoke(() -> getCCRegionContents()); for (int i = 0; i < 10; i++) { String key = "cckey" + i; assertEquals("region contents are not consistent", r0Contents.get(key), r1Contents.get(key)); assertEquals("region contents are not consistent", r1Contents.get(key), r2Contents.get(key)); assertEquals("region contents are not consistent", r2Contents.get(key), r3Contents.get(key)); for (int subi = 1; subi < 3; subi++) { String subkey = key + "-" + subi; assertEquals("region contents are not consistent", r0Contents.get(subkey), r1Contents.get(subkey)); assertEquals("region contents are not consistent", r1Contents.get(subkey), r2Contents.get(subkey)); assertEquals("region contents are not consistent", r2Contents.get(subkey), r3Contents.get(subkey)); } } } static void addBlockingListener() { ListenerBlocking = true; CCRegion.getAttributesMutator().addCacheListener(new CacheListenerAdapter() { @Override public void afterCreate(EntryEvent event) { onEvent(event); } private void onEvent(EntryEvent event) { boolean blocked = false; if (event.isOriginRemote()) { synchronized (this) { while (ListenerBlocking) { LogWriterUtils.getLogWriter() .info("blocking cache operations for " + event.getDistributedMember()); blocked = true; try { wait(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); LogWriterUtils.getLogWriter().info("blocking cache listener interrupted"); return; } } } if (blocked) { LogWriterUtils.getLogWriter() .info("allowing cache operations for " + event.getDistributedMember()); } } } @Override public void close() { LogWriterUtils.getLogWriter().info("closing blocking listener"); ListenerBlocking = false; synchronized (this) { notifyAll(); } } @Override public void afterUpdate(EntryEvent event) { onEvent(event); } @Override public void afterInvalidate(EntryEvent event) { onEvent(event); } @Override public void afterDestroy(EntryEvent event) { onEvent(event); } }); } static void doManyOps() { // do not include putAll, which requires an Ack to detect failures doOpsLoopNoFlush(5000, false, false); } static void unblockListener() { CacheListener listener = CCRegion.getCacheListener(); ListenerBlocking = false; synchronized (listener) { listener.notifyAll(); } } static void clearRegion() { CCRegion.clear(); } /** * This test creates a server cache in vm0 and a peer cache in vm1. It then tests to see if GII * transferred tombstones to vm1 like it's supposed to. A client cache is created in vm2 and the * same sort of check is performed for register-interest. */ @Test public void testGIISendsTombstones() { versionTestGIISendsTombstones(); } protected void do_version_recovery_if_necessary(final VM vm0, final VM vm1, final VM vm2, final Object[] params) { // do nothing here } /** * This tests the concurrency versioning system to ensure that event conflation happens correctly * and that the statistic is being updated properly */ @Test public void testConcurrentEvents() throws Exception { versionTestConcurrentEvents(); } @Test public void testClearWithConcurrentEvents() { // need to figure out how to flush clear() ops for verification steps } @Test public void testClearWithConcurrentEventsAsync() { // need to figure out how to flush clear() ops for verification steps } @Test public void testClearOnNonReplicateWithConcurrentEvents() { // need to figure out how to flush clear() ops for verification steps } @Test public void testTombstones() { versionTestTombstones(); } @Test public void testOneHopKnownIssues() { Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); VM vm3 = host.getVM(3); // this VM, but treat as a remote for uniformity // create an empty region in vm0 and replicated regions in VM 1 and 3, // then perform concurrent ops // on the same key while creating the region in VM2. Afterward make // sure that all three regions are consistent final String name = this.getUniqueName() + "-CC"; SerializableRunnable createRegion = new SerializableRunnable("Create Region") { @Override public void run() { try { final RegionFactory f; int vmNumber = VM.getCurrentVMNum(); switch (vmNumber) { case 0: f = getCache().createRegionFactory( getRegionAttributes(RegionShortcut.REPLICATE_PROXY.toString())); break; case 1: f = getCache() .createRegionFactory(getRegionAttributes(RegionShortcut.REPLICATE.toString())); f.setDataPolicy(DataPolicy.NORMAL); break; default: f = getCache().createRegionFactory(getRegionAttributes()); break; } CCRegion = (LocalRegion) f.create(name); } catch (CacheException ex) { Assert.fail("While creating region", ex); } } }; vm0.invoke(createRegion); // empty vm1.invoke(createRegion); // normal vm2.invoke(createRegion); // replicate // case 1: entry already invalid on vm2 (replicate) is invalidated by vm0 (empty) final String invalidationKey = "invalidationKey"; final String destroyKey = "destroyKey"; SerializableRunnable test = new SerializableRunnable("case 1: second invalidation not applied or distributed") { @Override public void run() { CCRegion.put(invalidationKey, "initialValue"); long invalidationCount = CCRegion.getCachePerfStats().getInvalidates(); CCRegion.invalidate(invalidationKey); CCRegion.invalidate(invalidationKey); assertEquals(invalidationCount + 1, CCRegion.getCachePerfStats().getInvalidates()); // also test destroy() while we're at it. It should throw an exception long destroyCount = CCRegion.getCachePerfStats().getDestroys(); CCRegion.destroy(invalidationKey); try { CCRegion.destroy(invalidationKey); fail("expected an EntryNotFoundException"); } catch (EntryNotFoundException e) { // expected } assertEquals(destroyCount + 1, CCRegion.getCachePerfStats().getDestroys()); } }; vm0.invoke(test); // now do the same with the datapolicy=normal region test.setName("case 2: second invalidation not applied or distributed"); vm1.invoke(test); } /** * This tests the concurrency versioning system to ensure that event conflation happens correctly * and that the statistic is being updated properly */ @Test public void testConcurrentEventsOnEmptyRegion() { versionTestConcurrentEventsOnEmptyRegion(); } /** * This tests the concurrency versioning system to ensure that event conflation happens correctly * and that the statistic is being updated properly */ @Test public void testConcurrentEventsOnNonReplicatedRegion() { versionTestConcurrentEventsOnNonReplicatedRegion(); } @Test public void testGetAllWithVersions() { versionTestGetAllWithVersions(); } }
35.288312
100
0.685632
66c115d773f57e02866bb21a4cf78541abd0a26d
122,486
css
CSS
public/assets/css/style.css
net2mulu/gc2013form
7739d9f5579056963868794f97dda8d8eb0fd5b1
[ "MIT" ]
null
null
null
public/assets/css/style.css
net2mulu/gc2013form
7739d9f5579056963868794f97dda8d8eb0fd5b1
[ "MIT" ]
null
null
null
public/assets/css/style.css
net2mulu/gc2013form
7739d9f5579056963868794f97dda8d8eb0fd5b1
[ "MIT" ]
null
null
null
/* * Author: Subier mohamed * URL: https://holathemes.com */ /* -------------------------------------------------------------- */ /* Default Colors ----------------------------------------------------------------- */ /* -------------------------------------------------------------- */ /* Typography ----------------------------------------------------------------- */ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&amp;display=swap"); /* -------------------------------------------------------------- */ /* Header Settings for Desktop Devices ----------------------------------------------------------------- */ /* -------------------------------------------------------------- */ /* 01. Graphic User Interface Elements -----------------------------------------------------------------*/ /* ---------------------------------- */ /* Buttons ------------------------------------- */ button { vertical-align: middle; } span.button, button.button { background-color: #2ae8af; top: 0; padding: 10px 20px; line-height: 24px; color: #fff; position: relative; font-size: 16px; font-weight: 500; display: inline-block; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; cursor: pointer; overflow: hidden; border: none; border-radius: 4px; -webkit-box-shadow: 0 4px 12px rgba(42, 65, 232, 0.15); box-shadow: 0 4px 12px rgba(42, 65, 232, 0.15); } input[type="button"], input[type="submit"] { background-color: #079979; top: 0; padding: 10px 20px; line-height: 24px; color: #fff; position: relative; font-size: 16px; font-weight: 500; display: inline-block; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; cursor: pointer; overflow: hidden; border: none; border-radius: 4px; -webkit-box-shadow: 0 4px 12px rgba(42, 65, 232, 0.15); box-shadow: 0 4px 12px rgba(42, 65, 232, 0.15); } a.button { background-color: #0baa82; top: 0; padding: 10px 20px; line-height: 24px; color: #fff; position: relative; font-size: 16px; font-weight: 500; display: inline-block; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; cursor: pointer; overflow: hidden; border: none; border-radius: 4px; -webkit-box-shadow: 0 4px 12px rgba(42, 65, 232, 0.15); box-shadow: 0 4px 12px rgba(42, 65, 232, 0.15); } /* Icons Aligment*/ .button i[class^="icon-material"], button.button i[class^="icon-material"] { font-size: 18px; height: 0; width: 18px; line-height: 0; top: 2px; position: relative; display: inline-block; margin-left: 3px; } input[type="button"] i[class^="icon-material"], input[type="submit"] i[class^="icon-material"] { font-size: 18px; height: 0; width: 18px; line-height: 0; top: 2px; position: relative; display: inline-block; margin-left: 3px; } a.button i[class^="icon-material"] { font-size: 18px; height: 0; width: 18px; line-height: 0; top: 2px; position: relative; display: inline-block; margin-left: 3px; } .button i[class^="icon-feather"], button.button i[class^="icon-feather"] { font-size: 16px; height: 0; width: 16px; line-height: 0; top: 2px; position: relative; display: inline-block; margin-left: 3px; } input[type="button"] i[class^="icon-feather"], input[type="submit"] i[class^="icon-feather"] { font-size: 16px; height: 0; width: 16px; line-height: 0; top: 2px; position: relative; display: inline-block; margin-left: 3px; } a.button i[class^="icon-feather"] { font-size: 16px; height: 0; width: 16px; line-height: 0; top: 2px; position: relative; display: inline-block; margin-left: 3px; } /* Dark Style */ button.button.dark { background-color: #333; color: #fff; -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } input[type="button"].dark, input[type="submit"].dark { background-color: #333; color: #fff; -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } a.button.dark { background-color: #333; color: #fff; -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } /* Dark Style */ button.button.gray { background-color: #eaeaea; color: #666; -webkit-box-shadow: none; box-shadow: none; } input[type="button"].gray, input[type="submit"].gray { background-color: #eaeaea; color: #666; -webkit-box-shadow: none; box-shadow: none; } a.button.gray { background-color: #eaeaea; color: #666; -webkit-box-shadow: none; box-shadow: none; } button.button.gray:hover { background-color: #e0e0e0; } input[type="button"].gray:hover, input[type="submit"].gray:hover { background-color: #e0e0e0; } a.button.gray:hover { background-color: #e0e0e0; } body .button i.icon-material-outline-arrow-right-alt { font-size: 22px; top: 4px; } .button.full-width { max-width: 100%; width: 100%; text-align: center; display: block; } .button.big { font-size: 18px; padding: 13px 22px; } body .button.big i { font-size: 22px; top: 3px; position: relative; } /* Slide Out Button */ .button.button-slide-out span { -webkit-transform: translateY(0px); transform: translateY(0px); opacity: 1; -webkit-transition: 0.3s; transition: 0.3s; } .button.button-slide-out:hover span { -webkit-transform: translateY(-10px); transform: translateY(-10px); opacity: 0; display: inline-block; -webkit-transition: 0.3s; transition: 0.3s; } .button.button-slide-out i { -webkit-transform: translateY(calc(-50% + 10px)); transform: translateY(calc(-50% + 10px)); opacity: 0; display: inline-block; -webkit-transition: 0.3s; transition: 0.3s; position: absolute; left: 0; right: 0; font-size: 18px; top: 50%; height: 20px; } .button.button-slide-out:hover i { -webkit-transform: translateY(calc(-50% + 0px)); transform: translateY(calc(-50% + 0px)); opacity: 1; } /* Move on Hover */ .move-on-hover { -webkit-box-shadow: 0 4px 12px rgba(42, 65, 232, 0.1); box-shadow: 0 4px 12px rgba(42, 65, 232, 0.1); -webkit-transform: translateY(0); transform: translateY(0); -webkit-transition: 0.3s; transition: 0.3s; } .move-on-hover:hover { -webkit-box-shadow: 0 4px 12px rgba(42, 65, 232, 0.2); box-shadow: 0 4px 12px rgba(42, 65, 232, 0.2); -webkit-transform: translateY(-2px); transform: translateY(-2px); } /* Centered Button */ .centered-button { text-align: center; display: block; } .centered-button .button { margin: 0 auto; } /* Bookmark Button */ span.bookmark-icon { font-size: 20px; position: absolute; z-index: 101; right: 35px; top: 35px; cursor: pointer; background-color: #eee; color: #c0c0c0; display: block; height: 39px; width: 39px; border-radius: 50%; -webkit-transition: all 0.4s; transition: all 0.4s; line-height: 27px; } .bookmark-icon.bookmarked { -webkit-animation: bookmarked-shadow 0.3s; animation: bookmarked-shadow 0.3s; } .bookmark-icon:before { -webkit-transition: -webkit-transform 0.4s cubic-bezier(0.8, -0.41, 0.19, 2.5); transition: -webkit-transform 0.4s cubic-bezier(0.8, -0.41, 0.19, 2.5); transition: transform 0.4s cubic-bezier(0.8, -0.41, 0.19, 2.5); transition: transform 0.4s cubic-bezier(0.8, -0.41, 0.19, 2.5), -webkit-transform 0.4s cubic-bezier(0.8, -0.41, 0.19, 2.5); font-family: "Material-Icons"; position: absolute; right: 0; left: 0; text-align: center; top: 6px; content: "\e988"; } .bookmark-icon:hover { background-color: #333; color: #fff; } .bookmark-icon.bookmarked { background-color: #feb342; color: #fff; } .bookmark-icon.bookmarked:before { -webkit-animation: bookmark-icon 0.5s; animation: bookmark-icon 0.5s; } @-webkit-keyframes bookmarked-shadow { 0% { -webkit-box-shadow: 0 0 0 0 rgba(254, 179, 66, 0.8); box-shadow: 0 0 0 0 rgba(254, 179, 66, 0.8); } 100% { -webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); } } @keyframes bookmarked-shadow { 0% { -webkit-box-shadow: 0 0 0 0 rgba(254, 179, 66, 0.8); box-shadow: 0 0 0 0 rgba(254, 179, 66, 0.8); } 100% { -webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); } } @-webkit-keyframes bookmark-icon { 0% { -webkit-transform: scale(0.8); transform: scale(0.8); } 50% { -webkit-transform: scale(1.2); transform: scale(1.2); } 100% { -webkit-transform: scale(1); transform: scale(1); } } @keyframes bookmark-icon { 0% { -webkit-transform: scale(0.8); transform: scale(0.8); } 50% { -webkit-transform: scale(1.2); transform: scale(1.2); } 100% { -webkit-transform: scale(1); transform: scale(1); } } /* Bookmark Button */ .bookmark-button { background-color: #404040; display: inline-block; padding: 0; position: relative; height: 44px; line-height: 44px; color: #fff; padding: 0 15px; padding-left: 59px; border-radius: 4px; -webkit-transition: 0.4s; transition: 0.4s; cursor: pointer; -webkit-box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1); } .bookmark-button .bookmark-icon, .bookmark-button:hover .bookmark-icon { background-color: rgba(255, 255, 255, 0.05); } .bookmark-button .bookmark-icon { border-radius: 4px; position: absolute; left: 0; right: auto; top: auto; height: 44px; width: 44px; border-radius: 4px 0 0 4px; pointer-events: none; -webkit-transition: 0.4s; transition: 0.4s; -webkit-animation: none; animation: none; } .bookmark-button .bookmark-icon:before { top: 8px; color: #fff; -webkit-transition: 0.4s; transition: 0.4s; font-size: 18px; } .bookmark-button.bookmarked { background-color: #feb342; color: #fff; -webkit-box-shadow: 0 3px 12px rgba(254, 179, 66, 0.2); box-shadow: 0 3px 12px rgba(254, 179, 66, 0.2); } .bookmark-button.bookmarked .bookmark-icon:before { color: #fff; } .bookmark-button:hover .bookmark-icon:before { color: #fff; } .bookmark-button.bookmarked .bookmark-icon, .bookmark-button.bookmarked:hover .bookmark-icon { background-color: rgba(255, 255, 255, 0.16); } .bookmark-button.bookmarked .bookmarked-text { display: block; } .bookmark-button .bookmark-text { display: block; } .bookmark-button.bookmarked .bookmark-text, .bookmark-button .bookmarked-text { display: none; } /* ---------------------------------- */ /* Button with sliding icon ------------------------------------- */ .button-sliding-icon { text-align: center; } .button-sliding-icon i { opacity: 0; max-width: 0; -webkit-transition: 0.25s; transition: 0.25s; display: inline-block; -webkit-transform: translateX(-20px); transform: translateX(-20px); } .button-sliding-icon:hover i { max-width: 20px; opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); } /* For buttons */ .button.button-sliding-icon { padding-left: 20px; padding-right: 10px; } .button.button-sliding-icon:hover { padding-right: 20px; } .button.button-sliding-icon i { padding-right: 5px; } .button.button-sliding-icon:hover i { max-width: 20px; opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); } /* ---------------------------------- */ /* Forms Reset & Styles ------------------------------------- */ input { height: 48px; line-height: 48px; padding: 0 20px; outline: none; font-size: 16px; color: #808080; margin: 0 0 16px 0; max-width: 100%; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; display: block; background-color: #fff; font-weight: 500; opacity: 1; border-radius: 4px; border: none; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); } input[type="text"], input[type="password"], input[type="email"], input[type="number"] { height: 48px; line-height: 48px; padding: 0 20px; outline: none; font-size: 16px; color: #808080; margin: 0 0 16px 0; max-width: 100%; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; display: block; background-color: #fff; font-weight: 500; opacity: 1; border-radius: 4px; border: none; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); } textarea { height: 48px; line-height: 48px; padding: 0 20px; outline: none; font-size: 16px; color: #808080; margin: 0 0 16px 0; max-width: 100%; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; display: block; background-color: #fff; font-weight: 500; opacity: 1; border-radius: 4px; border: none; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); } select { height: 48px; line-height: 48px; padding: 0 20px; outline: none; font-size: 16px; color: #808080; margin: 0 0 16px 0; max-width: 100%; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; display: block; background-color: #fff; font-weight: 500; opacity: 1; border-radius: 4px; border: none; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); padding: 15px 18px; cursor: pointer; } input { -webkit-transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out; } input:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus { color: #808080; -webkit-transition: -webkit-box-shadow 0.2s !important; transition: -webkit-box-shadow 0.2s !important; transition: box-shadow 0.2s !important; transition: box-shadow 0.2s, -webkit-box-shadow 0.2s !important; opacity: 1; border: none; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); } textarea:focus { color: #808080; -webkit-transition: -webkit-box-shadow 0.2s !important; transition: -webkit-box-shadow 0.2s !important; transition: box-shadow 0.2s !important; transition: box-shadow 0.2s, -webkit-box-shadow 0.2s !important; opacity: 1; border: none; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); } input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #fff inset !important; -webkit-text-fill-color: #808080 !important; } input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 30px #fff inset !important; -webkit-text-fill-color: #808080 !important; } input.with-border, input[type="text"].with-border, input[type="password"].with-border, input[type="email"].with-border, input[type="number"].with-border { border: 1px solid #e0e0e0; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); } /* With Border */ textarea.with-border, select.with-border { border: 1px solid #e0e0e0; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); } input.with-border:focus, input[type="text"].with-border:focus, input[type="password"].with-border:focus, input[type="email"].with-border:focus, input[type="number"].with-border:focus { border: 1px solid #e0e0e0; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.08); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.08); } textarea.with-border:focus { border: 1px solid #e0e0e0; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.08); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.08); } input[type="submit"] { border: none; padding: 11px 18px; width: auto; } input[type="checkbox"] { display: inline; } input[type="radio"] { width: 15px; height: 15px; cursor: pointer; -webkit-box-shadow: none; box-shadow: none; } /* Input Placeholder Color */ ::-webkit-input-placeholder { color: #808080; opacity: 1; } :-ms-input-placeholder { color: #808080; opacity: 1; } ::-ms-input-placeholder { color: #808080; opacity: 1; } ::placeholder { color: #808080; opacity: 1; } textarea { height: auto; line-height: 27px; padding: 20px; min-height: 130px; -webkit-transition: none !important; transition: none !important; min-width: 100%; } label, legend { display: block; font-weight: bold; font-size: 16px; font-weight: normal; margin-bottom: 8px; } label span, legend span { font-weight: normal; font-size: 14px; color: #444; } fieldset { padding: 0; border: none; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height: normal; cursor: pointer; } a { color: #2a41e8; -webkit-transition: 0.3s; transition: 0.3s; outline: none !important; } button { outline: none !important; } a:focus, a:hover { text-decoration: none; color: #333; } img { max-width: 100%; } /* ---------------------------------- */ /* Input With Icon ------------------------------------- */ .input-with-icon { display: block; position: relative; } .input-with-icon input { padding-right: 45px; } .input-with-icon i { position: absolute; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); right: 15px; font-size: 20px; color: #a0a0a0; font-style: normal; cursor: normal; pointer-events: none; } .input-with-icon i.currency { font-size: 14px; } /* Input with boxed icon */ .input-with-icon-left { position: relative; } .input-with-icon-left input { padding-left: 65px; } .input-with-icon-left i { position: absolute; top: 0; color: #a0a0a0; text-align: center; line-height: 48px; width: 48px; height: 48px; font-size: 19px; background-color: #f8f8f8; border: 1px solid #e0e0e0; -webkit-box-sizing: border-box; box-sizing: border-box; display: block; border-radius: 4px 0 0 4px; } .input-with-icon-left.no-border i { border: none; } /* ---------------------------------- */ /* Keywords Input ------------------------------------- */ .keywords-container { margin-bottom: -15px; } .keywords-list { display: block; float: left; height: 0; } .keyword { background-color: rgba(42, 65, 232, 0.07); color: #2a41e8; display: inline-block; float: left; padding: 0; border-radius: 4px; cursor: default; margin: 0 7px 7px 0; height: 35px; line-height: 35px; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-animation: KeywordIn 0.3s ease-in-out; animation: KeywordIn 0.3s ease-in-out; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-transition: 0.4s; transition: 0.4s; overflow: hidden; max-width: 100%; font-size: 14.7px; } .keyword.keyword-removed { max-width: 0; margin: 0; overflow: hidden; opacity: 0; -webkit-animation: KeywordOut 0.4s ease-in-out; animation: KeywordOut 0.4s ease-in-out; -webkit-animation-fill-mode: both; animation-fill-mode: both; pointer-events: none; } @-webkit-keyframes KeywordIn { 0% { opacity: 0; -webkit-transform: scale(0.9); transform: scale(0.9); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @keyframes KeywordIn { 0% { opacity: 0; -webkit-transform: scale(0.9); transform: scale(0.9); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @-webkit-keyframes KeywordOut { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; margin-top: -35px; } } @keyframes KeywordOut { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; margin-top: -35px; } } .keyword-text { padding-right: 12px; } .keyword .keyword-remove:before { display: inline-block; cursor: pointer; font-family: "Feather-Icons"; content: "\ea02"; line-height: 20px; position: relative; top: 2px; margin-right: 4px; margin-left: 10px; font-size: 15px; } .keyword-input-container { position: relative; } .keyword-input-container .keyword-input-button { position: absolute; top: 0; right: 0; height: 36px; width: 36px; padding: 0; color: #fff; background-color: #2a41e8; border-radius: 4px; margin: 6px; font-size: 19px; text-align: center; line-height: 36px; } .keyword-input-container .keyword-input-button i { color: #fff; position: relative; top: 2px; } input.keyword-input { margin: 0 0 15px 0; } /* ---------------------------------- */ /* Checkbox ------------------------------------- */ .checkbox { display: inline-block; margin-bottom: 0; } .checkbox input { padding: 0; height: initial; width: initial; margin-bottom: 0; display: none; cursor: pointer; } .checkbox label { position: relative; cursor: pointer; padding-left: 30px; line-height: 25px; } .checkbox label span.checkbox-icon { content: ''; -webkit-appearance: none; background-color: transparent; border: 2px solid #b4b4b4; height: 20px; width: 20px; display: inline-block; position: relative; vertical-align: middle; cursor: pointer; margin-right: 5px; border-radius: 4px; -webkit-transition: 0.3s; transition: 0.3s; position: absolute; left: 0; top: 1px; } .checkbox input + label span.checkbox-icon:after { position: absolute; top: 2px; left: 0; right: 0; margin: 0 auto; opacity: 0; content: ''; display: block; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; -webkit-transform: scale(0.5) rotate(45deg); transform: scale(0.5) rotate(45deg); -webkit-transition: all 0.35s cubic-bezier(0.3, -0.41, 0.19, 2), opacity 0.3s; transition: all 0.35s cubic-bezier(0.3, -0.41, 0.19, 2), opacity 0.3s; } .checkbox input:checked + label span.checkbox-icon { border-color: #2a41e8; background-color: #2a41e8; } .checkbox input:checked + label span.checkbox-icon:after { -webkit-transform: scale(1) rotate(45deg); transform: scale(1) rotate(45deg); opacity: 1; } /* ---------------------------------- */ /* Radio Button ------------------------------------- */ .radio { display: inline-block; vertical-align: top; } .radio label { margin: 3px 0; cursor: pointer; position: relative; padding-left: 29px; line-height: 25px; } .radio input[type="radio"] { position: absolute; opacity: 0; } .radio input[type="radio"] + label .radio-label { content: ''; background: #fff; border-radius: 100%; border: 2px solid #b4b4b4; display: inline-block; width: 18px; height: 18px; position: relative; margin-right: 5px; vertical-align: top; cursor: pointer; text-align: center; -webkit-transition: all 250ms ease; transition: all 250ms ease; background-color: #fff; -webkit-box-shadow: inset 0 0 0 8px #fff; box-shadow: inset 0 0 0 8px #fff; z-index: 100; position: absolute; top: 2px; left: 0; } .radio input[type="radio"] + label .radio-label:after { background-color: #2a41e8; content: ""; top: 3px; left: 0; right: 0; margin: 0 auto; position: absolute; opacity: 1; -webkit-transition: 0.3s; transition: 0.3s; border-radius: 50%; -webkit-transform: scale(0); transform: scale(0); position: absolute; top: 0; left: 0; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; height: 100%; z-index: 99; } .radio input[type="radio"]:checked + label .radio-label { background-color: #2a41e8; border-color: #2a41e8; -webkit-box-shadow: inset 0 0 0 3px #fff; box-shadow: inset 0 0 0 3px #fff; } .radio-label:before { content: ""; position: absolute; top: 0; left: 0; height: 100%; width: 100%; border-radius: 50%; background-color: transparent; display: block; } .interactive-effect label .radio-label:before { -webkit-animation: radius-shadow 0.4s; animation: radius-shadow 0.4s; } @-webkit-keyframes radius-shadow { 0% { -webkit-box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.4); box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.4); } 100% { -webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); } } @keyframes radius-shadow { 0% { -webkit-box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.4); box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.4); } 100% { -webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); } } .small-label { border-radius: 4px; display: inline-block; background: #e0f5d7; color: #449626; padding: 0 8px; line-height: 27px; height: 26px; margin-left: 5px; position: relative; top: -1px; } /* ---------------------------------- */ /* On/Off Switch ------------------------------------- */ .switches-list .switch-container { width: 100%; } .switches-list .switch-container:last-child label { margin-bottom: 0; } .switch-container { display: inline-block; cursor: pointer; } label.switch { position: relative; } .switches-list .switch-container label { cursor: pointer; position: relative; padding-left: 45px; line-height: 26px; } .switch-button { position: relative; display: inline-block; width: 34px; height: 20px; cursor: pointer; background-color: #ccc; border-radius: 50px; -webkit-transition: 0.4s; transition: 0.4s; margin: 0 7px 0 0; top: 4px; position: absolute; top: 2px; left: 0; } .notify-box .switch-button { top: 0; } .notify-box .switch-container { top: 1px; position: relative; } .switch span.switch-text { display: block; padding-left: 48px; font-size: 16px; line-height: 22px; color: #666; } .switch input { display: none; } .switch.interactive-effect input:checked + .switch-button:before { -webkit-animation: switch-shadow-color 0.4s; animation: switch-shadow-color 0.4s; } .switch.interactive-effect .switch-button:before { -webkit-animation: switch-shadow 0.4s; animation: switch-shadow 0.4s; } @-webkit-keyframes switch-shadow { 0% { -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3); } 100% { -webkit-box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); } } @keyframes switch-shadow { 0% { -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3); } 100% { -webkit-box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); } } @-webkit-keyframes switch-shadow-color { 0% { -webkit-box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.6); box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.6); } 100% { -webkit-box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); } } @keyframes switch-shadow-color { 0% { -webkit-box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.6); box-shadow: 0 0 0 0 rgba(42, 65, 232, 0.6); } 100% { -webkit-box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0); } } .switch-button:before { position: absolute; content: ""; height: 16px; width: 16px; bottom: 2px; left: 2px; background-color: white; -webkit-transition: 0.4s, -webkit-box-shadow 0.3s; transition: 0.4s, -webkit-box-shadow 0.3s; transition: 0.4s, box-shadow 0.3s; transition: 0.4s, box-shadow 0.3s, -webkit-box-shadow 0.3s; border-radius: 50px; } input:checked + .switch-button { background-color: #2a41e8; } input:checked + .switch-button:before { -webkit-transform: translateX(14px); transform: translateX(14px); } /* ---------------------------------- */ /* Common Styles ------------------------------------- */ body { color: #666; font-size: 16px; line-height: 27px; background-color: #edf2f7; font-family: "Inter", sans-serif; text-transform: none; } body.gray { background-color: #fbfbfb; } body p { font-size: 16px; line-height: 27px; } /* Main Font */ h1, h2, h3, h4, h5, h6 { font-family: "Inter", sans-serif; text-transform: none; } input[type="text"], input[type="password"], input[type="email"] { font-family: "Inter", sans-serif; text-transform: none; } textarea, select { font-family: "Inter", sans-serif; text-transform: none; } input[type="button"], input[type="submit"] { font-family: "Inter", sans-serif; text-transform: none; } button, body .pac-container { font-family: "Inter", sans-serif; text-transform: none; } /* Headlines */ h1, h2, h3, h4, h5, h6 { color: #333; font-weight: 500; margin: 0; padding: 0; } h1 { font-size: 32px; } h2 { font-size: 26px; } h3 { font-size: 22px; } h4 { font-size: 16px; } h5 { font-size: 14px; } h6 { font-size: 12px; } h3.page-title { font-size: 20px; line-height: 32px; } .section { display: block; } .section.white { background: #fff; } .section.gray { background: #f9f9f9; } .section.border-top { border-top: 1px solid #e0e0e0; } .section.border-bottom { border-bottom: 1px solid #e0e0e0; } /* Section Headline */ .section-headline { display: block; position: relative; padding-right: 20%; } .section-headline.centered { text-align: center; padding: 0; } .section-headline span { font-size: 18px; line-height: 26px; font-weight: 300; color: #888; margin-top: 0; display: block; } .section-headline h1, .section-headline h2, .section-headline h3 { font-size: 26px; line-height: 36px; font-weight: 500; color: #333; } .section-headline h4 { font-size: 26px; line-height: 36px; font-weight: 500; color: #333; font-size: 22px; line-height: 34px; } .section-headline.border-top { border-top: 1px solid #e0e0e0; } h1.in-a-box, h2.in-a-box, h3.in-a-box, h5.in-a-box { display: inline-block; font-size: 18px; background-color: #333; color: #fff; border-radius: 4px; padding: 8px 20px; -webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); } .section-headline h5 { font-size: 16px; font-weight: 600; line-height: 30px; } /* /* Single Task / Job / Profile Headings */ .single-page-section { margin-bottom: 55px; display: block; } .single-page-section p:last-of-type { padding-bottom: 0; margin-bottom: 0; } .single-page-section h3 { margin-bottom: 20px; font-size: 20px; } .single-page-section .job-listing h3.job-listing-title { margin-bottom: 0; } /* Headline Link */ a.headline-link { position: absolute; right: 0; bottom: 0; } a.headline-link.bottom-icon:after { content: "\e957"; top: 3px; } a.headline-link:after { content: "\e995"; font-family: "Material-Icons"; font-size: 21px; line-height: 0; position: relative; top: 4px; margin-left: 5px; } @media (max-width: 768px) { a.headline-link { position: relative; margin-top: 10px; display: inline-block; } } /* Classes for disabling things on mobile devices */ @media (max-width: 992px) { .hide-under-992px { display: none; } } @media (max-width: 768px) { .hide-under-768px { display: none; } } @media (max-width: 480px) { .hide-under-480px { display: none; } } /* Content & Sidebar Offsets */ .content-left-offset { padding-left: 30px; } .content-right-offset { padding-right: 30px; } @media (max-width: 992px) { .content-left-offset { padding-left: 15px; } .content-right-offset { padding-right: 15px; } } /* ---------------------------------- */ /* Icons Cheatsheet Styles ------------------------------------- */ .icon-set-container { display: block; width: calc(100% + 30px); left: -15px; position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -ms-flex-line-pack: center; align-content: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } .glyph.fs1 { position: relative; font-size: 20px; margin: 10px 15px; background-color: #fff; -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); border-radius: 4px; -webkit-box-flex: 1; -ms-flex: 1 1 calc(25% - 30px); flex: 1 1 calc(25% - 30px); -ms-flex-line-pack: center; align-content: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; padding: 15px 15px; -webkit-transition: 0.3s; transition: 0.3s; color: #666; } .glyph.fs1:hover { -webkit-transform: translateY(-5px); transform: translateY(-5px); background-color: #333; color: #fff; -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } .glyph.fs1:hover span:not([class*="mls"]) { background-color: #fff; color: #333; } .glyph.fs1 .fs0, .glyph.fs1 fieldset { display: none; } .glyph.fs1 span:not([class*="mls"]) { vertical-align: middle; top: -4px; height: 40px; width: 40px; background: rgba(0, 0, 0, 0.04); display: inline-block; line-height: 40px; text-align: center; border-radius: 4px; font-size: 24px; -webkit-transition: 0.3s; transition: 0.3s; position: relative; position: absolute; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } .glyph.fs1 .mls:not([class*="icon-"]) { max-width: 80%; display: inline-block; overflow: hidden; font-size: 14px; line-height: 20px; top: 0; vertical-align: middle; padding-left: 55px; } /* ---------------------------------- */ /* Star Rating ------------------------------------- */ /* Star Rating */ .star-rating { display: inline-block; } .star-rating .star { display: inline-block; margin: 0; padding: 0; float: left; margin-right: 0; position: relative; } .star-rating .star.half:after, .star-rating .star:before { font-family: "Material-Icons"; content: "\e988"; display: block; color: #febe42; font-size: 20px; } .star-rating .star.empty:before { color: #ddd; } .rating:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } .star-rating { /* &:before { content: attr(data-rating); float: left; border-radius: $global-border-radius; background-color: #febe42; color: #fff; font-size: 14px; line-height: 15px; font-weight: 700; padding: 5px 7px; position: relative; top: 1px; margin-right: 10px; } */ } .star-rating .star.half:before { color: #ddd; } .star-rating .star.half:after { color: #febe42; position: absolute; top: 0; width: 50%; display: block; height: 100%; overflow: hidden; } .star-rating.no-stars .star { display: none; } .star-rating.no-stars:before { margin-right: 0; } .breadcrumb-area { position: relative; padding: 50px 0; } .breadcrumb-area .breadcrumb ul li a { line-height: initial; } .breadcrumb-area .page-title { color: #fff; font-weight: 500; font-size: 30px; text-transform: capitalize; } .breadcrumb-area:before { content: ''; height: 100%; width: 100%; position: absolute; background: -webkit-gradient(linear, right top, left top, from(#4a5568), to(#2d3748)); background: linear-gradient(to left, #4a5568, #2d3748); opacity: 0.91; top: 0; left: 0; } .breadcrumb { padding: 0; margin-bottom: 0; padding-bottom: 17px; } .breadcrumb ul { width: 100%; } .breadcrumb ul li { display: inline-block; } .breadcrumb ul li:after { content: '\e930'; color: #fff; padding: 0 7px; display: inline-block; font-size: 12px; font-family: "Feather-Icons"; } .breadcrumb ul li a { font-size: 15px; line-height: 70px; color: #fff; } .breadcrumb ul li:last-child:after { display: none; } .breadcrumb ul li.active a { color: #bfcad7; } .page-spacer { margin-top: 90px; } @media (max-width: 960px) { .breadcrumb-area { padding: 16px 0; } .breadcrumb-area .page-title { font-size: 20px; } .breadcrumb { padding: 0; margin-bottom: 0; padding-bottom: 10px; } .page-spacer { margin-top: 40px; } } /* -------------------------------------------------------------- */ /* 02. Vendor (third party assets styles) ----------------------------------------------------------------- */ /* ---------------------------------- */ /* Bootstrap-select ------------------------------------- */ select.bs-select-hidden, select.selectpicker { display: none !important; } .bootstrap-select .btn { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .bootstrap-select > .dropdown-toggle { width: 100%; padding-right: 25px; z-index: 1; } .bootstrap-select > .dropdown-toggle.bs-placeholder { color: #808080; } .bootstrap-select > .dropdown-toggle.bs-placeholder:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder:active { color: #808080; } .bootstrap-select > select { position: absolute !important; bottom: 0; left: 50%; display: block !important; width: 0.5px !important; height: 100% !important; padding: 0 !important; opacity: 0 !important; border: none; } .bootstrap-select > select.mobile-device { top: 0; left: 0; display: block !important; width: 100% !important; z-index: 2; } .has-error .bootstrap-select .dropdown-toggle, .error .bootstrap-select .dropdown-toggle { border-color: #b94a48; } .bootstrap-select.fit-width { width: auto !important; } .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { width: 100%; } .bootstrap-select.form-control { margin-bottom: 0; padding: 0; border: none; } .bootstrap-select.form-control:not([class*="col-"]) { width: 100%; } .bootstrap-select.form-control.input-group-btn { z-index: auto; } .bootstrap-select.form-control.input-group-btn:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .bootstrap-select.btn-group:not(.input-group-btn), .bootstrap-select.btn-group[class*="col-"] { float: none; display: -webkit-box; display: -ms-flexbox; display: flex; margin-left: 0; } .bootstrap-select.btn-group.dropdown-menu-right, .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right { float: right; } .row .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right { float: right; } .form-inline .bootstrap-select.btn-group, .form-horizontal .bootstrap-select.btn-group, .checkbox .bootstrap-select.btn-group { margin-bottom: 0; } .checkbox-lg .bootstrap-select.btn-group.form-control, .checkbox-sm .bootstrap-select.btn-group.form-control { padding: 0; } .checkbox-lg .bootstrap-select.btn-group.form-control .dropdown-toggle, .checkbox-sm .bootstrap-select.btn-group.form-control .dropdown-toggle { height: 100%; font-size: inherit; line-height: inherit; border-radius: inherit; } .form-inline .bootstrap-select.btn-group .form-control { width: 100%; } .bootstrap-select.btn-group.disabled { cursor: not-allowed; } .bootstrap-select.btn-group.disabled:focus { outline: none !important; } .bootstrap-select.btn-group > .disabled { cursor: not-allowed; } .bootstrap-select.btn-group > .disabled:focus { outline: none !important; } .bootstrap-select.btn-group.bs-container { position: absolute; height: 0 !important; padding: 0 !important; } .bootstrap-select.btn-group.bs-container .dropdown-menu { z-index: 1060; } .bootstrap-select.btn-group .dropdown-toggle .filter-option { overflow: hidden; width: 100%; line-height: 48px; text-align: left; white-space: nowrap; text-overflow: ellipsis; max-width: 90%; float: left; height: 48px; display: block; } .bootstrap-select.btn-group .dropdown-menu li.hidden { display: none; } .language-switcher.bootstrap-select.btn-group .dropdown-toggle .filter-option { max-width: 100%; float: left; } .sort-by .bootstrap-select.btn-group .dropdown-toggle .filter-option { max-width: 100%; float: left; line-height: 20px; height: auto; } .bootstrap-select.btn-group .dropdown-toggle .caret { position: absolute; top: 50%; right: 20px; margin-top: -2px; vertical-align: middle; -webkit-transition: 0.35s; transition: 0.35s; } .bootstrap-select.open .dropdown-toggle .caret { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .bootstrap-select.btn-group[class*="col-"] .dropdown-toggle { width: 100%; } .bootstrap-select.btn-group .dropdown-menu { min-width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; font-size: 16px; } .bootstrap-select.btn-group .dropdown-menu.inner { position: static; float: none; border: 0; padding: 0 5px; border-radius: 0; -webkit-box-shadow: none; box-shadow: none; } .bootstrap-select.btn-group .dropdown-menu li { position: relative; margin-bottom: 1px; } .bootstrap-select.btn-group .dropdown-menu li.disabled { opacity: 0.75; } .bootstrap-select.btn-group .dropdown-menu li.active small { color: #fff; } .bootstrap-select.btn-group .dropdown-menu li.disabled a { cursor: not-allowed; } .bootstrap-select.btn-group .dropdown-menu li a { cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .bootstrap-select.btn-group .dropdown-menu li a span.text { display: inline-block; } .bootstrap-select.btn-group .dropdown-menu li small { padding-left: 7px; opacity: 0.8; } .bootstrap-select.btn-group .dropdown-menu .notify { position: absolute; bottom: 5px; width: calc(100% - 20px); margin: 0; min-height: 26px; padding: 3px 5px; pointer-events: none; padding: 5px 10px; background: #333; color: #fff; margin: 5px; margin-bottom: 5px; border-radius: 4px; white-space: nowrap; font-size: 14px; border: none; } .bootstrap-select.btn-group .no-results { padding: 5px 10px; background: #f6f6f6; margin: 5px 0; margin-bottom: 0; border-radius: 4px; white-space: nowrap; font-size: 14px; } .bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option { position: static; } .bootstrap-select.btn-group.fit-width .dropdown-toggle .caret { position: static; top: auto; margin-top: -1px; } .bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text { white-space: normal; } .bootstrap-select.show-menu-arrow.open > .dropdown-toggle { z-index: 1061; } .bootstrap-select.show-menu-arrow .dropdown-toggle:before { content: ''; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid rgba(204, 204, 204, 0.2); position: absolute; bottom: -4px; left: 9px; display: none; } .bootstrap-select.show-menu-arrow .dropdown-toggle:after { content: ''; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid white; position: absolute; bottom: -4px; left: 10px; display: none; } .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before { bottom: auto; top: -3px; border-top: 7px solid rgba(204, 204, 204, 0.2); border-bottom: 0; } .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after { bottom: auto; top: -3px; border-top: 6px solid white; border-bottom: 0; } .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before { right: 12px; left: auto; } .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after { right: 13px; left: auto; } .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before, .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after { display: block; } .bs-searchbox, .bs-actionsbox, .bs-donebutton { padding: 0 5px; } .bs-actionsbox { width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 0 5px; margin-bottom: 10px; margin-top: -5px; } .bs-actionsbox div { display: -webkit-box; display: -ms-flexbox; display: flex; } .bootstrap-select.btn-group .bs-actionsbox div button { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; background: #f6f6f6; -webkit-box-shadow: none; box-shadow: none; padding: 5px; height: 36px; font-size: 14px; color: #777; -webkit-transition: 0.3s; transition: 0.3s; } .bootstrap-select.btn-group .bs-actionsbox div button:first-child { border-radius: 4px 0 0 4px; background-color: #f0f0f0; } .bootstrap-select.btn-group .bs-actionsbox div button:last-child { border-radius: 0 4px 4px 0; } .bootstrap-select.btn-group .bs-actionsbox div button:hover { background: #2a41e8; color: #fff; } .bs-actionsbox .btn-group button { width: 50%; } .bs-donebutton { float: left; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; } .bs-donebutton .btn-group button { width: 100%; } .bs-searchbox { position: relative; } .bs-searchbox + .bs-actionsbox { padding: 0; } .bs-searchbox .form-control { margin-bottom: 0; width: 100%; float: none; -webkit-box-shadow: none; box-shadow: none; background: #f4f4f4; margin: -5px 0 10px 0; height: 38px; line-height: 38px; padding: 10px; } .bs-searchbox .form-control:focus { margin-bottom: 0; width: 100%; float: none; -webkit-box-shadow: none; box-shadow: none; background: #f4f4f4; margin: -5px 0 10px 0; height: 38px; line-height: 38px; padding: 10px; } .bs-searchbox:after { font-family: "Material-Icons"; content: "\e982"; font-size: 20px; width: 20px; height: 20px; line-height: 0; display: inline-block; position: absolute; margin: 0; color: #a0a0a0; right: 15px; top: 18px; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px dashed; border-top: 4px solid #aaa; border-right: 4px solid transparent; border-left: 4px solid transparent; } .dropup, .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; padding: 10px 5px; margin: -4px 0 0 0; font-size: 15px; text-align: left; list-style: none; background-color: #fff; border: none; border-radius: 4px; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { display: none; } .dropdown-menu > li > a { display: block; padding: 7px 10px; padding-right: 35px; clear: both; font-weight: normal; line-height: 21px; color: #808080; border-radius: 4px; } .bootstrap-select:before { content: ""; position: absolute; z-index: 2100; bottom: 0px; left: 0; height: 8px; width: 100%; background-color: #fff; display: block; opacity: 0; pointer-events: none; -webkit-transition: 0.4s; transition: 0.4s; } .bootstrap-select.open:before { opacity: 1; } .dropdown-menu > li > a:hover { color: #2a41e8; text-decoration: none; background-color: rgba(42, 65, 232, 0.07); } .dropdown-menu > .active > a { color: #2a41e8; text-decoration: none; background-color: rgba(42, 65, 232, 0.07); } .dropdown-menu > .active > a:hover { color: #2a41e8; text-decoration: none; background-color: rgba(42, 65, 232, 0.07); } .dropdown-menu > .disabled > a { color: #777; } .dropdown-menu > .disabled > a:hover { color: #777; text-decoration: none; cursor: not-allowed; background-color: transparent; background-image: none; } .dropdown-menu.inner::-webkit-scrollbar { width: 5px; } .dropdown-menu.inner::-webkit-scrollbar-track { background-color: rgba(0, 0, 0, 0); border-radius: 12px; } .dropdown-menu.inner::-webkit-scrollbar-thumb { border-radius: 12px; background-color: #d8d8d8; } .dropdown-menu.inner::-webkit-scrollbar-thumb:hover { border-radius: 12px; background-color: #c8c8c8; } /* Custom Scrollbar for -wekbit */ .bootstrap-select .dropdown-menu { opacity: 0; -webkit-transition: 0.4s; transition: 0.4s; display: block; pointer-events: none; visibility: hidden; cursor: default; } .bootstrap-select.open .dropdown-menu { opacity: 1; pointer-events: all; visibility: visible; } .open > a { outline: 0; } .dropdown-menu-right { right: 0; left: auto; } .dropdown-menu-left { right: auto; left: 0; } .dropdown-header { display: block; padding: 7px 10px; line-height: 20px; white-space: nowrap; background: #f6f6f6; color: #777; border-radius: 4px; margin-bottom: 1px; } .dropdown-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { content: ""; border-top: 0; border-bottom: 4px dashed; border-bottom: 4px solid \9; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: 100%; bottom: auto; margin-bottom: 2px; } @media (min-width: 767px) { .navbar-right .dropdown-menu { right: 0; left: auto; } .navbar-right .dropdown-menu-left { right: auto; left: 0; } } .bootstrap-select.btn-group { position: relative; } .bootstrap-select.btn-group button { position: relative; display: inline-block; height: 48px; line-height: 0; padding: 0 20px; margin: 0; outline: none; font-size: 16px; color: #808080; max-width: 100%; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; display: block; background-color: #fff; font-weight: 500; opacity: 1; border-radius: 4px; border: none; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.12); } /* Select Check Icon */ .hide-tick .check-mark { display: none !important; } .bootstrap-select.btn-group .dropdown-menu li a span.check-mark { position: absolute; display: inline-block; right: 8px; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); margin: 0; line-height: 0; width: 20px; height: 20px; text-align: center; } .bootstrap-select.btn-group .dropdown-menu li span.check-mark:before { font-family: "Feather-Icons"; content: "\e92b"; font-size: 18px; -webkit-transition: all 0.3s; transition: all 0.3s; display: inline-block; top: 50%; right: 0; position: absolute; margin: 0; opacity: 0; -webkit-transform: scale(0.5); transform: scale(0.5); } .bootstrap-select.btn-group .dropdown-menu li.selected span.check-mark:before { opacity: 1; -webkit-transform: scale(1); transform: scale(1); -webkit-transition: all 0.35s cubic-bezier(0.3, -0.41, 0.19, 2), opacity 0.3s; transition: all 0.35s cubic-bezier(0.3, -0.41, 0.19, 2), opacity 0.3s; } .bootstrap-select .dropdown-menu li.selected a span.check-mark:before, .bootstrap-select .dropdown-menu li.selected:hover a span.check-mark:before { color: #2a41e8; } .bootstrap-select .glyphicon:not(.check-mark) { font-size: 17px; line-height: 0; position: relative; top: 1px; margin-right: 3px; } .bootstrap-select .filter-option .glyphicon { position: relative; top: 1px; } /* Icons*/ /* Styles with border */ .with-border .dropdown-menu { border: 1px solid #e0e0e0; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); } .with-border.bootstrap-select.btn-group button { border: 1px solid #e0e0e0; -webkit-box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.05); } .with-border.bootstrap-select:before { width: calc(100% - 2px); left: 1px; } /* ---------------------------------- */ /* Simlpebar.js (custom scrollbar) ------------------------------------- */ [data-simplebar] { position: relative; z-index: 0; overflow: hidden !important; max-height: inherit; -webkit-overflow-scrolling: touch; /* Trigger native scrolling for mobile, if not supported, plugin is used. */ } [data-simplebar="init"] { display: -webkit-box; display: -ms-flexbox; display: flex; } .simplebar-scroll-content { overflow-x: hidden !important; overflow-y: scroll; min-width: 100% !important; max-height: inherit !important; -webkit-box-sizing: content-box !important; box-sizing: content-box !important; } .simplebar-content { overflow-y: hidden !important; overflow-x: scroll; -webkit-box-sizing: border-box !important; box-sizing: border-box !important; min-height: 100% !important; } .simplebar-track { z-index: 1; position: absolute; right: 0; bottom: 0; width: 11px; height: calc(100% - 6px); margin-top: 6px; } .simplebar-scrollbar { position: absolute; right: 6px; width: 5px; min-height: 10px; } .simplebar-scrollbar:before { position: absolute; content: ""; background: black; border-radius: 7px; left: 0; right: 0; opacity: 0; -webkit-transition: opacity 0.2s, background-color 0.3s; transition: opacity 0.2s, background-color 0.3s; background-color: #d8d8d8; } .simplebar-scrollbar:hover:before { background-color: #c8c8c8; } .simplebar-track:hover .simplebar-scrollbar:before, .simplebar-track .simplebar-scrollbar.visible:before { /* When hovered, remove all transitions from drag handle */ opacity: 1; -webkit-transition: opacity 0 linear; transition: opacity 0 linear; } .simplebar-track.vertical { top: 0; } .simplebar-track.vertical .simplebar-scrollbar:before { top: 2px; bottom: 2px; } .simplebar-track.horizontal { left: 0; width: auto; height: 11px; display: none; } .simplebar-track.horizontal .simplebar-scrollbar { right: auto; top: 2px; height: 7px; min-height: 0; min-width: 10px; width: auto; } .simplebar-track.horizontal .simplebar-scrollbar:before { height: 100%; left: 2px; right: 2px; } body.gray .dashboard-content-container .simplebar-scrollbar:before { background-color: #c9c9c9; } body.gray .dashboard-content-container .simplebar-scrollbar:hover:before { background-color: #b9b9b9; } .dashboard-box .simplebar-scrollbar:before { background-color: #d8d8d8; } .dashboard-box .simplebar-scrollbarLhover:before { background-color: #c8c8c8; } /* ---------------------------------- */ /* Tippy.js Tooltips ------------------------------------- */ /* Dark */ .tippy-tooltip.dark-theme { color: #fff; font-weight: 500; font-size: 14px; padding: 6px 12px; } .tippy-tooltip.dark-theme .tippy-backdrop { background-color: #333; } .tippy-popper[x-placement^=top] .tippy-tooltip.dark-theme .tippy-arrow { border-top-color: #333; } .tippy-popper[x-placement^=bottom] .tippy-tooltip.dark-theme .tippy-arrow { border-bottom-color: #333; } .tippy-popper[x-placement^=right] .tippy-tooltip.dark-theme .tippy-arrow { border-right-color: #333; } .tippy-popper[x-placement^=left] .tippy-tooltip.dark-theme .tippy-arrow { border-left-color: #333; } .tippy-tooltip.dark-theme .tippy-arrow { -webkit-transform: scale(0.7); transform: scale(0.7); } .tippy-tooltip.light-theme { color: #333; font-weight: 500; font-size: 14px; -webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); padding: 6px 12px; background-color: #fff; } /* Light */ .tippy-popper[x-placement^=top] .tippy-tooltip.light-theme .tippy-arrow { border-top-color: #fff; } .tippy-popper[x-placement^=bottom] .tippy-tooltip.light-theme .tippy-arrow { border-bottom-color: #fff; } .tippy-popper[x-placement^=right] .tippy-tooltip.light-theme .tippy-arrow { border-right-color: #fff; } .tippy-popper[x-placement^=left] .tippy-tooltip.light-theme .tippy-arrow { border-left-color: #fff; } /* -------------------------------------------------------------- */ /* 03. Layouts ----------------------------------------------------------------- */ /*! * Bootstrap Grid v4.0.0 (https://getbootstrap.com) * Copyright 2011-2018 The Bootstrap Authors * Copyright 2011-2018 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ @-ms-viewport { width: device-width; } html { -webkit-box-sizing: border-box; box-sizing: border-box; -ms-overflow-style: scrollbar; } * { -webkit-box-sizing: inherit; box-sizing: inherit; } *::before, *::after { -webkit-box-sizing: inherit; box-sizing: inherit; } .container, .container-fluid { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } @media (min-width: 576px) { .container { max-width: 540px; } } @media (min-width: 768px) { .container { max-width: 720px; } } @media (min-width: 992px) { .container { max-width: 960px; } } @media (min-width: 1240px) { .container { max-width: 1090px; } } @media (min-width: 1367px) { .container { max-width: 1210px; } } .row { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; } .no-gutters { margin-right: 0; margin-left: 0; } .no-gutters > .col, .no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; } .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col, .col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm, .col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md, .col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg, .col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl, .col-xl-auto { position: relative; width: 100%; min-height: 1px; padding-right: 15px; padding-left: 15px; } .col { -ms-flex-preferred-size: 0; flex-basis: 0; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; max-width: 100%; } .col-auto { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; max-width: none; } .col-1 { -webkit-box-flex: 0; -ms-flex: 0 0 8.333333%; flex: 0 0 8.333333%; max-width: 8.333333%; } .col-2 { -webkit-box-flex: 0; -ms-flex: 0 0 16.666667%; flex: 0 0 16.666667%; max-width: 16.666667%; } .col-3 { -webkit-box-flex: 0; -ms-flex: 0 0 25%; flex: 0 0 25%; max-width: 25%; } .col-4 { -webkit-box-flex: 0; -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; } .col-5 { -webkit-box-flex: 0; -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; } .col-6 { -webkit-box-flex: 0; -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; } .col-7 { -webkit-box-flex: 0; -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; } .col-8 { -webkit-box-flex: 0; -ms-flex: 0 0 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; } .col-9 { -webkit-box-flex: 0; -ms-flex: 0 0 75%; flex: 0 0 75%; max-width: 75%; } .col-10 { -webkit-box-flex: 0; -ms-flex: 0 0 83.333333%; flex: 0 0 83.333333%; max-width: 83.333333%; } .col-11 { -webkit-box-flex: 0; -ms-flex: 0 0 91.666667%; flex: 0 0 91.666667%; max-width: 91.666667%; } .col-12 { -webkit-box-flex: 0; -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; } .order-first { -webkit-box-ordinal-group: 0; -ms-flex-order: -1; order: -1; } .order-last { -webkit-box-ordinal-group: 14; -ms-flex-order: 13; order: 13; } .order-0 { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } .order-1 { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } .order-2 { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } .order-3 { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } .order-4 { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } .order-5 { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } .order-6 { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } .order-7 { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } .order-8 { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } .order-9 { -webkit-box-ordinal-group: 10; -ms-flex-order: 9; order: 9; } .order-10 { -webkit-box-ordinal-group: 11; -ms-flex-order: 10; order: 10; } .order-11 { -webkit-box-ordinal-group: 12; -ms-flex-order: 11; order: 11; } .order-12 { -webkit-box-ordinal-group: 13; -ms-flex-order: 12; order: 12; } .offset-1 { margin-left: 8.333333%; } .offset-2 { margin-left: 16.666667%; } .offset-3 { margin-left: 25%; } .offset-4 { margin-left: 33.333333%; } .offset-5 { margin-left: 41.666667%; } .offset-6 { margin-left: 50%; } .offset-7 { margin-left: 58.333333%; } .offset-8 { margin-left: 66.666667%; } .offset-9 { margin-left: 75%; } .offset-10 { margin-left: 83.333333%; } .offset-11 { margin-left: 91.666667%; } @media (min-width: 576px) { .col-sm { -ms-flex-preferred-size: 0; flex-basis: 0; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; max-width: 100%; } .col-sm-auto { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; max-width: none; } .col-sm-1 { -webkit-box-flex: 0; -ms-flex: 0 0 8.333333%; flex: 0 0 8.333333%; max-width: 8.333333%; } .col-sm-2 { -webkit-box-flex: 0; -ms-flex: 0 0 16.666667%; flex: 0 0 16.666667%; max-width: 16.666667%; } .col-sm-3 { -webkit-box-flex: 0; -ms-flex: 0 0 25%; flex: 0 0 25%; max-width: 25%; } .col-sm-4 { -webkit-box-flex: 0; -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; } .col-sm-5 { -webkit-box-flex: 0; -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; } .col-sm-6 { -webkit-box-flex: 0; -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; } .col-sm-7 { -webkit-box-flex: 0; -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; } .col-sm-8 { -webkit-box-flex: 0; -ms-flex: 0 0 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; } .col-sm-9 { -webkit-box-flex: 0; -ms-flex: 0 0 75%; flex: 0 0 75%; max-width: 75%; } .col-sm-10 { -webkit-box-flex: 0; -ms-flex: 0 0 83.333333%; flex: 0 0 83.333333%; max-width: 83.333333%; } .col-sm-11 { -webkit-box-flex: 0; -ms-flex: 0 0 91.666667%; flex: 0 0 91.666667%; max-width: 91.666667%; } .col-sm-12 { -webkit-box-flex: 0; -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; } .order-sm-first { -webkit-box-ordinal-group: 0; -ms-flex-order: -1; order: -1; } .order-sm-last { -webkit-box-ordinal-group: 14; -ms-flex-order: 13; order: 13; } .order-sm-0 { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } .order-sm-1 { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } .order-sm-2 { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } .order-sm-3 { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } .order-sm-4 { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } .order-sm-5 { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } .order-sm-6 { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } .order-sm-7 { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } .order-sm-8 { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } .order-sm-9 { -webkit-box-ordinal-group: 10; -ms-flex-order: 9; order: 9; } .order-sm-10 { -webkit-box-ordinal-group: 11; -ms-flex-order: 10; order: 10; } .order-sm-11 { -webkit-box-ordinal-group: 12; -ms-flex-order: 11; order: 11; } .order-sm-12 { -webkit-box-ordinal-group: 13; -ms-flex-order: 12; order: 12; } .offset-sm-0 { margin-left: 0; } .offset-sm-1 { margin-left: 8.333333%; } .offset-sm-2 { margin-left: 16.666667%; } .offset-sm-3 { margin-left: 25%; } .offset-sm-4 { margin-left: 33.333333%; } .offset-sm-5 { margin-left: 41.666667%; } .offset-sm-6 { margin-left: 50%; } .offset-sm-7 { margin-left: 58.333333%; } .offset-sm-8 { margin-left: 66.666667%; } .offset-sm-9 { margin-left: 75%; } .offset-sm-10 { margin-left: 83.333333%; } .offset-sm-11 { margin-left: 91.666667%; } } @media (min-width: 768px) { .col-md { -ms-flex-preferred-size: 0; flex-basis: 0; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; max-width: 100%; } .col-md-auto { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; max-width: none; } .col-md-1 { -webkit-box-flex: 0; -ms-flex: 0 0 8.333333%; flex: 0 0 8.333333%; max-width: 8.333333%; } .col-md-2 { -webkit-box-flex: 0; -ms-flex: 0 0 16.666667%; flex: 0 0 16.666667%; max-width: 16.666667%; } .col-md-3 { -webkit-box-flex: 0; -ms-flex: 0 0 25%; flex: 0 0 25%; max-width: 25%; } .col-md-4 { -webkit-box-flex: 0; -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; } .col-md-5 { -webkit-box-flex: 0; -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; } .col-md-6 { -webkit-box-flex: 0; -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; } .col-md-7 { -webkit-box-flex: 0; -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; } .col-md-8 { -webkit-box-flex: 0; -ms-flex: 0 0 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; } .col-md-9 { -webkit-box-flex: 0; -ms-flex: 0 0 75%; flex: 0 0 75%; max-width: 75%; } .col-md-10 { -webkit-box-flex: 0; -ms-flex: 0 0 83.333333%; flex: 0 0 83.333333%; max-width: 83.333333%; } .col-md-11 { -webkit-box-flex: 0; -ms-flex: 0 0 91.666667%; flex: 0 0 91.666667%; max-width: 91.666667%; } .col-md-12 { -webkit-box-flex: 0; -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; } .order-md-first { -webkit-box-ordinal-group: 0; -ms-flex-order: -1; order: -1; } .order-md-last { -webkit-box-ordinal-group: 14; -ms-flex-order: 13; order: 13; } .order-md-0 { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } .order-md-1 { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } .order-md-2 { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } .order-md-3 { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } .order-md-4 { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } .order-md-5 { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } .order-md-6 { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } .order-md-7 { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } .order-md-8 { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } .order-md-9 { -webkit-box-ordinal-group: 10; -ms-flex-order: 9; order: 9; } .order-md-10 { -webkit-box-ordinal-group: 11; -ms-flex-order: 10; order: 10; } .order-md-11 { -webkit-box-ordinal-group: 12; -ms-flex-order: 11; order: 11; } .order-md-12 { -webkit-box-ordinal-group: 13; -ms-flex-order: 12; order: 12; } .offset-md-0 { margin-left: 0; } .offset-md-1 { margin-left: 8.333333%; } .offset-md-2 { margin-left: 16.666667%; } .offset-md-3 { margin-left: 25%; } .offset-md-4 { margin-left: 33.333333%; } .offset-md-5 { margin-left: 41.666667%; } .offset-md-6 { margin-left: 50%; } .offset-md-7 { margin-left: 58.333333%; } .offset-md-8 { margin-left: 66.666667%; } .offset-md-9 { margin-left: 75%; } .offset-md-10 { margin-left: 83.333333%; } .offset-md-11 { margin-left: 91.666667%; } } @media (min-width: 992px) { .col-lg { -ms-flex-preferred-size: 0; flex-basis: 0; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; max-width: 100%; } .col-lg-auto { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; max-width: none; } .col-lg-1 { -webkit-box-flex: 0; -ms-flex: 0 0 8.333333%; flex: 0 0 8.333333%; max-width: 8.333333%; } .col-lg-2 { -webkit-box-flex: 0; -ms-flex: 0 0 16.666667%; flex: 0 0 16.666667%; max-width: 16.666667%; } .col-lg-3 { -webkit-box-flex: 0; -ms-flex: 0 0 25%; flex: 0 0 25%; max-width: 25%; } .col-lg-4 { -webkit-box-flex: 0; -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; } .col-lg-5 { -webkit-box-flex: 0; -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; } .col-lg-6 { -webkit-box-flex: 0; -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; } .col-lg-7 { -webkit-box-flex: 0; -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; } .col-lg-8 { -webkit-box-flex: 0; -ms-flex: 0 0 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; } .col-lg-9 { -webkit-box-flex: 0; -ms-flex: 0 0 75%; flex: 0 0 75%; max-width: 75%; } .col-lg-10 { -webkit-box-flex: 0; -ms-flex: 0 0 83.333333%; flex: 0 0 83.333333%; max-width: 83.333333%; } .col-lg-11 { -webkit-box-flex: 0; -ms-flex: 0 0 91.666667%; flex: 0 0 91.666667%; max-width: 91.666667%; } .col-lg-12 { -webkit-box-flex: 0; -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; } .order-lg-first { -webkit-box-ordinal-group: 0; -ms-flex-order: -1; order: -1; } .order-lg-last { -webkit-box-ordinal-group: 14; -ms-flex-order: 13; order: 13; } .order-lg-0 { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } .order-lg-1 { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } .order-lg-2 { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } .order-lg-3 { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } .order-lg-4 { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } .order-lg-5 { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } .order-lg-6 { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } .order-lg-7 { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } .order-lg-8 { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } .order-lg-9 { -webkit-box-ordinal-group: 10; -ms-flex-order: 9; order: 9; } .order-lg-10 { -webkit-box-ordinal-group: 11; -ms-flex-order: 10; order: 10; } .order-lg-11 { -webkit-box-ordinal-group: 12; -ms-flex-order: 11; order: 11; } .order-lg-12 { -webkit-box-ordinal-group: 13; -ms-flex-order: 12; order: 12; } .offset-lg-0 { margin-left: 0; } .offset-lg-1 { margin-left: 8.333333%; } .offset-lg-2 { margin-left: 16.666667%; } .offset-lg-3 { margin-left: 25%; } .offset-lg-4 { margin-left: 33.333333%; } .offset-lg-5 { margin-left: 41.666667%; } .offset-lg-6 { margin-left: 50%; } .offset-lg-7 { margin-left: 58.333333%; } .offset-lg-8 { margin-left: 66.666667%; } .offset-lg-9 { margin-left: 75%; } .offset-lg-10 { margin-left: 83.333333%; } .offset-lg-11 { margin-left: 91.666667%; } } @media (min-width: 1200px) { .col-xl { -ms-flex-preferred-size: 0; flex-basis: 0; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; max-width: 100%; } .col-xl-auto { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; max-width: none; } .col-xl-1 { -webkit-box-flex: 0; -ms-flex: 0 0 8.333333%; flex: 0 0 8.333333%; max-width: 8.333333%; } .col-xl-2 { -webkit-box-flex: 0; -ms-flex: 0 0 16.666667%; flex: 0 0 16.666667%; max-width: 16.666667%; } .col-xl-3 { -webkit-box-flex: 0; -ms-flex: 0 0 25%; flex: 0 0 25%; max-width: 25%; } .col-xl-4 { -webkit-box-flex: 0; -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; } .col-xl-5 { -webkit-box-flex: 0; -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; } .col-xl-6 { -webkit-box-flex: 0; -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; } .col-xl-7 { -webkit-box-flex: 0; -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; } .col-xl-8 { -webkit-box-flex: 0; -ms-flex: 0 0 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; } .col-xl-9 { -webkit-box-flex: 0; -ms-flex: 0 0 75%; flex: 0 0 75%; max-width: 75%; } .col-xl-10 { -webkit-box-flex: 0; -ms-flex: 0 0 83.333333%; flex: 0 0 83.333333%; max-width: 83.333333%; } .col-xl-11 { -webkit-box-flex: 0; -ms-flex: 0 0 91.666667%; flex: 0 0 91.666667%; max-width: 91.666667%; } .col-xl-12 { -webkit-box-flex: 0; -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; } .order-xl-first { -webkit-box-ordinal-group: 0; -ms-flex-order: -1; order: -1; } .order-xl-last { -webkit-box-ordinal-group: 14; -ms-flex-order: 13; order: 13; } .order-xl-0 { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } .order-xl-1 { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } .order-xl-2 { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } .order-xl-3 { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } .order-xl-4 { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } .order-xl-5 { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } .order-xl-6 { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } .order-xl-7 { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } .order-xl-8 { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } .order-xl-9 { -webkit-box-ordinal-group: 10; -ms-flex-order: 9; order: 9; } .order-xl-10 { -webkit-box-ordinal-group: 11; -ms-flex-order: 10; order: 10; } .order-xl-11 { -webkit-box-ordinal-group: 12; -ms-flex-order: 11; order: 11; } .order-xl-12 { -webkit-box-ordinal-group: 13; -ms-flex-order: 12; order: 12; } .offset-xl-0 { margin-left: 0; } .offset-xl-1 { margin-left: 8.333333%; } .offset-xl-2 { margin-left: 16.666667%; } .offset-xl-3 { margin-left: 25%; } .offset-xl-4 { margin-left: 33.333333%; } .offset-xl-5 { margin-left: 41.666667%; } .offset-xl-6 { margin-left: 50%; } .offset-xl-7 { margin-left: 58.333333%; } .offset-xl-8 { margin-left: 66.666667%; } .offset-xl-9 { margin-left: 75%; } .offset-xl-10 { margin-left: 83.333333%; } .offset-xl-11 { margin-left: 91.666667%; } } .d-none { display: none !important; } .d-inline { display: inline !important; } .d-inline-block { display: inline-block !important; } .d-block { display: block !important; } .d-table { display: table !important; } .d-table-row { display: table-row !important; } .d-table-cell { display: table-cell !important; } .d-flex { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; } .d-inline-flex { display: -webkit-inline-box !important; display: -ms-inline-flexbox !important; display: inline-flex !important; } @media (min-width: 576px) { .d-sm-none { display: none !important; } .d-sm-inline { display: inline !important; } .d-sm-inline-block { display: inline-block !important; } .d-sm-block { display: block !important; } .d-sm-table { display: table !important; } .d-sm-table-row { display: table-row !important; } .d-sm-table-cell { display: table-cell !important; } .d-sm-flex { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; } .d-sm-inline-flex { display: -webkit-inline-box !important; display: -ms-inline-flexbox !important; display: inline-flex !important; } } @media (min-width: 768px) { .d-md-none { display: none !important; } .d-md-inline { display: inline !important; } .d-md-inline-block { display: inline-block !important; } .d-md-block { display: block !important; } .d-md-table { display: table !important; } .d-md-table-row { display: table-row !important; } .d-md-table-cell { display: table-cell !important; } .d-md-flex { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; } .d-md-inline-flex { display: -webkit-inline-box !important; display: -ms-inline-flexbox !important; display: inline-flex !important; } } @media (min-width: 992px) { .d-lg-none { display: none !important; } .d-lg-inline { display: inline !important; } .d-lg-inline-block { display: inline-block !important; } .d-lg-block { display: block !important; } .d-lg-table { display: table !important; } .d-lg-table-row { display: table-row !important; } .d-lg-table-cell { display: table-cell !important; } .d-lg-flex { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; } .d-lg-inline-flex { display: -webkit-inline-box !important; display: -ms-inline-flexbox !important; display: inline-flex !important; } } @media (min-width: 1200px) { .d-xl-none { display: none !important; } .d-xl-inline { display: inline !important; } .d-xl-inline-block { display: inline-block !important; } .d-xl-block { display: block !important; } .d-xl-table { display: table !important; } .d-xl-table-row { display: table-row !important; } .d-xl-table-cell { display: table-cell !important; } .d-xl-flex { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; } .d-xl-inline-flex { display: -webkit-inline-box !important; display: -ms-inline-flexbox !important; display: inline-flex !important; } } @media print { .d-print-none { display: none !important; } .d-print-inline { display: inline !important; } .d-print-inline-block { display: inline-block !important; } .d-print-block { display: block !important; } .d-print-table { display: table !important; } .d-print-table-row { display: table-row !important; } .d-print-table-cell { display: table-cell !important; } .d-print-flex { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; } .d-print-inline-flex { display: -webkit-inline-box !important; display: -ms-inline-flexbox !important; display: inline-flex !important; } } .flex-row { -webkit-box-orient: horizontal !important; -webkit-box-direction: normal !important; -ms-flex-direction: row !important; flex-direction: row !important; } .flex-column { -webkit-box-orient: vertical !important; -webkit-box-direction: normal !important; -ms-flex-direction: column !important; flex-direction: column !important; } .flex-row-reverse { -webkit-box-orient: horizontal !important; -webkit-box-direction: reverse !important; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-column-reverse { -webkit-box-orient: vertical !important; -webkit-box-direction: reverse !important; -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-wrap { -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-nowrap { -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-wrap-reverse { -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } .justify-content-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-end { -webkit-box-pack: end !important; -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-center { -webkit-box-pack: center !important; -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-between { -webkit-box-pack: justify !important; -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-around { -ms-flex-pack: distribute !important; justify-content: space-around !important; } .align-items-start { -webkit-box-align: start !important; -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-end { -webkit-box-align: end !important; -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-center { -webkit-box-align: center !important; -ms-flex-align: center !important; align-items: center !important; } .align-items-baseline { -webkit-box-align: baseline !important; -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-stretch { -webkit-box-align: stretch !important; -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-start { -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-end { -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-center { -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-between { -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-around { -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-stretch { -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-auto { -ms-flex-item-align: auto !important; -ms-grid-row-align: auto !important; align-self: auto !important; } .align-self-start { -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-end { -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-center { -ms-flex-item-align: center !important; -ms-grid-row-align: center !important; align-self: center !important; } .align-self-baseline { -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-stretch { -ms-flex-item-align: stretch !important; -ms-grid-row-align: stretch !important; align-self: stretch !important; } @media (min-width: 576px) { .flex-sm-row { -webkit-box-orient: horizontal !important; -webkit-box-direction: normal !important; -ms-flex-direction: row !important; flex-direction: row !important; } .flex-sm-column { -webkit-box-orient: vertical !important; -webkit-box-direction: normal !important; -ms-flex-direction: column !important; flex-direction: column !important; } .flex-sm-row-reverse { -webkit-box-orient: horizontal !important; -webkit-box-direction: reverse !important; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-sm-column-reverse { -webkit-box-orient: vertical !important; -webkit-box-direction: reverse !important; -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-sm-wrap { -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-sm-nowrap { -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-sm-wrap-reverse { -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } .justify-content-sm-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-sm-end { -webkit-box-pack: end !important; -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-sm-center { -webkit-box-pack: center !important; -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-sm-between { -webkit-box-pack: justify !important; -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-sm-around { -ms-flex-pack: distribute !important; justify-content: space-around !important; } .align-items-sm-start { -webkit-box-align: start !important; -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-sm-end { -webkit-box-align: end !important; -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-sm-center { -webkit-box-align: center !important; -ms-flex-align: center !important; align-items: center !important; } .align-items-sm-baseline { -webkit-box-align: baseline !important; -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-sm-stretch { -webkit-box-align: stretch !important; -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-sm-start { -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-sm-end { -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-sm-center { -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-sm-between { -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-sm-around { -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-sm-stretch { -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-sm-auto { -ms-flex-item-align: auto !important; -ms-grid-row-align: auto !important; align-self: auto !important; } .align-self-sm-start { -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-sm-end { -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-sm-center { -ms-flex-item-align: center !important; -ms-grid-row-align: center !important; align-self: center !important; } .align-self-sm-baseline { -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-sm-stretch { -ms-flex-item-align: stretch !important; -ms-grid-row-align: stretch !important; align-self: stretch !important; } } @media (min-width: 768px) { .flex-md-row { -webkit-box-orient: horizontal !important; -webkit-box-direction: normal !important; -ms-flex-direction: row !important; flex-direction: row !important; } .flex-md-column { -webkit-box-orient: vertical !important; -webkit-box-direction: normal !important; -ms-flex-direction: column !important; flex-direction: column !important; } .flex-md-row-reverse { -webkit-box-orient: horizontal !important; -webkit-box-direction: reverse !important; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-md-column-reverse { -webkit-box-orient: vertical !important; -webkit-box-direction: reverse !important; -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-md-wrap { -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-md-nowrap { -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-md-wrap-reverse { -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } .justify-content-md-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-md-end { -webkit-box-pack: end !important; -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-md-center { -webkit-box-pack: center !important; -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-md-between { -webkit-box-pack: justify !important; -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-md-around { -ms-flex-pack: distribute !important; justify-content: space-around !important; } .align-items-md-start { -webkit-box-align: start !important; -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-md-end { -webkit-box-align: end !important; -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-md-center { -webkit-box-align: center !important; -ms-flex-align: center !important; align-items: center !important; } .align-items-md-baseline { -webkit-box-align: baseline !important; -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-md-stretch { -webkit-box-align: stretch !important; -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-md-start { -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-md-end { -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-md-center { -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-md-between { -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-md-around { -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-md-stretch { -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-md-auto { -ms-flex-item-align: auto !important; -ms-grid-row-align: auto !important; align-self: auto !important; } .align-self-md-start { -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-md-end { -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-md-center { -ms-flex-item-align: center !important; -ms-grid-row-align: center !important; align-self: center !important; } .align-self-md-baseline { -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-md-stretch { -ms-flex-item-align: stretch !important; -ms-grid-row-align: stretch !important; align-self: stretch !important; } } @media (min-width: 992px) { .flex-lg-row { -webkit-box-orient: horizontal !important; -webkit-box-direction: normal !important; -ms-flex-direction: row !important; flex-direction: row !important; } .flex-lg-column { -webkit-box-orient: vertical !important; -webkit-box-direction: normal !important; -ms-flex-direction: column !important; flex-direction: column !important; } .flex-lg-row-reverse { -webkit-box-orient: horizontal !important; -webkit-box-direction: reverse !important; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-lg-column-reverse { -webkit-box-orient: vertical !important; -webkit-box-direction: reverse !important; -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-lg-wrap { -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-lg-nowrap { -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-lg-wrap-reverse { -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } .justify-content-lg-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-lg-end { -webkit-box-pack: end !important; -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-lg-center { -webkit-box-pack: center !important; -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-lg-between { -webkit-box-pack: justify !important; -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-lg-around { -ms-flex-pack: distribute !important; justify-content: space-around !important; } .align-items-lg-start { -webkit-box-align: start !important; -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-lg-end { -webkit-box-align: end !important; -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-lg-center { -webkit-box-align: center !important; -ms-flex-align: center !important; align-items: center !important; } .align-items-lg-baseline { -webkit-box-align: baseline !important; -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-lg-stretch { -webkit-box-align: stretch !important; -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-lg-start { -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-lg-end { -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-lg-center { -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-lg-between { -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-lg-around { -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-lg-stretch { -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-lg-auto { -ms-flex-item-align: auto !important; -ms-grid-row-align: auto !important; align-self: auto !important; } .align-self-lg-start { -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-lg-end { -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-lg-center { -ms-flex-item-align: center !important; -ms-grid-row-align: center !important; align-self: center !important; } .align-self-lg-baseline { -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-lg-stretch { -ms-flex-item-align: stretch !important; -ms-grid-row-align: stretch !important; align-self: stretch !important; } } @media (min-width: 1200px) { .flex-xl-row { -webkit-box-orient: horizontal !important; -webkit-box-direction: normal !important; -ms-flex-direction: row !important; flex-direction: row !important; } .flex-xl-column { -webkit-box-orient: vertical !important; -webkit-box-direction: normal !important; -ms-flex-direction: column !important; flex-direction: column !important; } .flex-xl-row-reverse { -webkit-box-orient: horizontal !important; -webkit-box-direction: reverse !important; -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-xl-column-reverse { -webkit-box-orient: vertical !important; -webkit-box-direction: reverse !important; -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-xl-wrap { -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-xl-nowrap { -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-xl-wrap-reverse { -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } .justify-content-xl-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-xl-end { -webkit-box-pack: end !important; -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-xl-center { -webkit-box-pack: center !important; -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-xl-between { -webkit-box-pack: justify !important; -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-xl-around { -ms-flex-pack: distribute !important; justify-content: space-around !important; } .align-items-xl-start { -webkit-box-align: start !important; -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-xl-end { -webkit-box-align: end !important; -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-xl-center { -webkit-box-align: center !important; -ms-flex-align: center !important; align-items: center !important; } .align-items-xl-baseline { -webkit-box-align: baseline !important; -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-xl-stretch { -webkit-box-align: stretch !important; -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-xl-start { -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-xl-end { -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-xl-center { -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-xl-between { -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-xl-around { -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-xl-stretch { -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-xl-auto { -ms-flex-item-align: auto !important; -ms-grid-row-align: auto !important; align-self: auto !important; } .align-self-xl-start { -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-xl-end { -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-xl-center { -ms-flex-item-align: center !important; -ms-grid-row-align: center !important; align-self: center !important; } .align-self-xl-baseline { -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-xl-stretch { -ms-flex-item-align: stretch !important; -ms-grid-row-align: stretch !important; align-self: stretch !important; } } /*! * Bootstrap Reboot v4.0.0 (https://getbootstrap.com) * Copyright 2011-2018 The Bootstrap Authors * Copyright 2011-2018 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */ * { -webkit-box-sizing: border-box; box-sizing: border-box; } *::before, *::after { -webkit-box-sizing: border-box; box-sizing: border-box; } body { margin: 0; padding: 0; } html { font-family: sans-serif; line-height: 1.15; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -ms-overflow-style: scrollbar; -webkit-tap-highlight-color: transparent; } @-ms-viewport { width: device-width; } article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { display: block; } [tabindex="-1"]:focus { outline: 0 !important; } hr { -webkit-box-sizing: content-box; box-sizing: content-box; height: 0; overflow: visible; } h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; } p { margin-top: 0; margin-bottom: 1rem; } abbr[title], abbr[data-original-title] { text-decoration: underline; -webkit-text-decoration: underline dotted; text-decoration: underline dotted; cursor: help; border-bottom: 0; } address { margin-bottom: 1rem; font-style: normal; line-height: inherit; } ol, ul, dl { margin-top: 0; margin-bottom: 1rem; } ol ol, ul ul, ol ul, ul ol { margin-bottom: 0; } dt { font-weight: 700; } dd { margin-bottom: .5rem; margin-left: 0; } blockquote { margin: 0 0 1rem; } dfn { font-style: italic; } b, strong { font-weight: bolder; } small { font-size: 80%; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sub { bottom: -.25em; } sup { top: -.5em; } a { color: #007bff; text-decoration: none; background-color: transparent; -webkit-text-decoration-skip: objects; } a:hover { color: #0056b3; text-decoration: none; } a:not([href]):not([tabindex]) { color: inherit; text-decoration: none; } a:not([href]):not([tabindex]):hover { color: inherit; text-decoration: none; } a:not([href]):not([tabindex]):focus { color: inherit; text-decoration: none; outline: 0; } pre, code, kbd, samp { font-family: monospace, monospace; font-size: 1em; } pre { margin-top: 0; margin-bottom: 1rem; overflow: auto; -ms-overflow-style: scrollbar; } figure { margin: 0 0 1rem; } img { vertical-align: middle; border-style: none; } svg:not(:root) { overflow: hidden; } table { border-collapse: collapse; } caption { padding-top: 0.75rem; padding-bottom: 0.75rem; color: #6c757d; text-align: left; caption-side: bottom; } th { text-align: inherit; } label { display: inline-block; margin-bottom: .5rem; } button { border-radius: 0; } button:focus { outline: 1px dotted; outline: 5px auto -webkit-focus-ring-color; } input, button, select, optgroup, textarea { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; } button, input { overflow: visible; } button, select { text-transform: none; } button, html [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; } button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { padding: 0; border-style: none; } input[type="radio"], input[type="checkbox"] { -webkit-box-sizing: border-box; box-sizing: border-box; padding: 0; } input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { -webkit-appearance: listbox; } textarea { overflow: auto; resize: vertical; } fieldset { min-width: 0; padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; max-width: 100%; padding: 0; margin-bottom: .5rem; font-size: 1.5rem; line-height: inherit; color: inherit; white-space: normal; } progress { vertical-align: baseline; } [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; } [type="search"] { outline-offset: -2px; -webkit-appearance: none; } [type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration { -webkit-appearance: none; } ::-webkit-file-upload-button { font: inherit; -webkit-appearance: button; } output { display: inline-block; } summary { display: list-item; cursor: pointer; } template { display: none; } [hidden] { display: none !important; } .clearfix:before, .clearfix:after { content: " "; display: -webkit-box; display: -ms-flexbox; display: flex; } .dl-horizontal dd:before, .dl-horizontal dd:after { content: " "; display: -webkit-box; display: -ms-flexbox; display: flex; } .container:before, .container:after { content: " "; display: -webkit-box; display: -ms-flexbox; display: flex; } .container-fluid:before, .container-fluid:after { content: " "; display: -webkit-box; display: -ms-flexbox; display: flex; } .row:before, .row:after { content: " "; display: -webkit-box; display: -ms-flexbox; display: flex; } .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after { clear: both; } /* ---------------------------------- */ /* course-card ------------------------------------- */ .course-card { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; background: #fff; margin-bottom: 10px; -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); border-radius: 8px; overflow: hidden; -webkit-transition: 0.3s; transition: 0.3s; } .course-card:hover { -webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); } .course-card .course-card-thumbnail { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; max-width: none; max-height: 100%; overflow: hidden; position: relative; width: 100%; height: 150px; } .course-card .course-card-thumbnail-inner { height: 100%; width: 100%; overflow: hidden; -webkit-box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15); -webkit-transition: 0.3s; transition: 0.3s; } .course-card .course-card-thumbnail-inner img { height: 100%; width: 100%; -o-object-fit: cover; object-fit: cover; position: absolute; top: 0; left: 0; } .course-card .course-card-thumbnail-inner .blog-item-tag { bottom: 20px; left: 20px; top: auto; margin: 0; } .course-card .course-card-content { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; padding: 20px; } .course-card .course-card-content h3 { font-size: 17px; display: block; line-height: 23px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } .course-card p { color: #7d7d7d; margin-bottom: 0; font-size: 14px; line-height: 23px; } .course-card span.instructor { color: #484848; font-weight: 600; } .course-card ul.course-info { padding: 0; margin: 0; margin-top: -3px; } .course-card ul.course-info li { list-style: none; display: inline; font-size: 15px; color: #797979; } .course-card ul.course-info .middot { margin: 0 4px; font-size: 15px; line-height: 1.1; font-weight: 700; } .course-card .course-card-foot { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; padding: 10px 20px; background-color: #f7fafc; } .course-card .course-card-foot span.pricing { font-size: 18px; color: #313131; } .course-card .course-card-foot .star-rating .star.half:after, .course-card .course-card-foot .star-rating .star:before { color: #1bbf1b; } .course-card .course-card-foot .star-rating .star.half:before { color: #ddd; } .course-card.list-card { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; margin-bottom: 30px; } .course-card.list-card .course-card-thumbnail { width: 300px; height: auto; } .course-card.list-card .course-card-content { padding: 30px; } .course-card.list-card .course-card-content h3 { font-size: 19px; margin-bottom: 10px; margin-top: 8px; } .course-card.list-card .course-card-content p { font-size: 15px; } /* play button on hover video card image*/ .play-btn-trigger { left: 0; top: 0; z-index: 1; width: 100%; height: 100%; position: absolute; background: url(../images/icon-play.svg) no-repeat; background-size: auto 40%; background-position: center; visibility: hidden; opacity: 0; -webkit-transition: opacity 150ms ease-in-out; transition: opacity 150ms ease-in-out; } .course-card:hover .play-btn-trigger, .play-btn-trigger.show { visibility: visible; opacity: 1; -webkit-transform: scale(1.1); transform: scale(1.1); } header { background-color: #fff; border-bottom: 1px solid #E5E9EF; position: fixed; left: 0; right: 0; top: 0; z-index: 99; height: 76px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } header .header_inner { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; max-width: 1400px; margin: auto; width: 100%; padding: 0 35px; } header .header_inner .left-side { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } header .header_inner .left-side #logo { display: inline-block; margin-right: 20px; font-size: 21px; letter-spacing: .9px; } header .header_inner .left-side #logo img { max-width: none; height: 28px; } header .header_inner .left-side #logo img.logo_inverse, header .header_inner .left-side #logo img.logo_mobile { display: none; } header .header_inner .left-side .triger { position: absolute; left: 25px; top: 20px; color: #464646; display: none; font-size: 19px; } header .header_inner .right-side { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; margin-left: auto; } header .header_inner .right-side .header-links-item { padding: 10px; } header .header_inner .right-side .header-links-item svg { width: 25px; height: 25px; color: #676666; } header .header_inner .right-side .header-avatar { width: 32px; height: 32px; border-radius: 100%; margin-left: 15px; } .is_fixed { -webkit-transition: all 0.8s; transition: all 0.8s; -webkit-box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.04); box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.04); background-color: white; border: 0; } .header_dropdown { width: 330px; margin-top: 50px; border-radius: 5px; } .header_dropdown ul { padding: 0; margin: 0 -20px; } .header_dropdown ul li a { display: -webkit-box; display: -ms-flexbox; display: flex; text-decoration: none; color: #808080; position: relative; padding: 8px 20px; font-weight: 500; } .header_dropdown ul li a:hover { background: #f7f7f7; } .header_dropdown ul li a .drop_avatar img { width: 35px; height: 35px; border-radius: 100%; margin-right: 15px; margin-top: 5px; } .header_dropdown ul li a .drop_content { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; border-radius: 5px; } .header_dropdown ul li a .drop_content p { margin: 0; font-size: 14px; line-height: 22px; } .header_dropdown ul li a .drop_content span.time-ago { font-size: 12.7px; color: #a0a0a0; } .header_dropdown ul li a .drop_content span.text-link { color: #5833fd; } .header_dropdown ul li a .drop_content strong, .header_dropdown ul li a .drop_content span.time-ago { font-weight: 600; } .header_dropdown ul li a .drop_content time { font-size: 12px; position: absolute; right: 20px; } .header_dropdown a.see-all { text-align: center; display: block; font-size: 14px; margin-top: 10px; margin-bottom: -5px; font-weight: 500; border-top: 1px solid #e2e8f0; margin: 0 -1.25rem; padding-top: 0.5rem; color: #7d61fd; } .header_dropdown.profile_dropdown { width: 270px !important; padding-bottom: 10px; } .header_dropdown.profile_dropdown ul { margin: 0 !important; } .header_dropdown.profile_dropdown ul a { padding: 0 !important; -webkit-box-align: center; -ms-flex-align: center; align-items: center; font-size: 15px; margin-bottom: 8px; } .header_dropdown.profile_dropdown ul a:hover { color: #2a41e8; background-color: transparent; } .header_dropdown.profile_dropdown ul a svg { width: 21px; height: 21px; margin-right: 10px; } .header_dropdown.profile_dropdown ul hr { margin: 10px -20px; } .header_menu { padding: 0; margin: 0; } .header_menu li { list-style: none; display: inline; padding: 0; margin-left: 7px; } .header_menu li a { color: #b3b3b3; font-size: 0.92rem; text-transform: capitalize; font-weight: 500; padding: 0.8rem 0.6rem; border-radius: 0.375rem; } .header_menu li a:hover, .header_menu li a.active { color: black; } .header_menu li ul li a { color: #797979; } .header_menu li ul li a:hover { color: #000; } .header_menu .overly { display: none; } @media (min-width: 768px) { .is-dark { background-color: #2d3748; } .is-dark #logo img { display: none; } .is-dark #logo img.logo_inverse { display: block !important; } .is-dark .header_menu > li > a { color: rgba(255, 255, 255, 0.7) !important; } .is-dark .header_menu > li > a:hover, .is-dark .header_menu li > a.active { color: white !important; } .is-dark .header-links-item > svg { color: white !important; } .is-transparent { background-color: transparent; } } .mdropdown, .xdropdown, .dropdown_cart, .header_dropdown { background: white; border-radius: 8px; -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 25px -5px, rgba(0, 0, 0, 0.04) 0px 13px 10px -5px; box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 25px -5px, rgba(0, 0, 0, 0.04) 0px 13px 10px -5px; padding: 20px; display: none; } .xdropdown { width: 250px; } .xdropdown ul li { margin: 0; } .xdropdown ul li a { display: block !important; padding: 4px !important; } .mdropdown { width: 530px; } .dropdown_scrollbar { max-height: 370px; } .dropdown_cart { width: 385px; left: auto !important; } .dropdown_cart ul { padding: 0; margin: 0 -20px; } .dropdown_cart ul li { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; position: relative; padding: 8px 20px; } .dropdown_cart ul li:hover { background: #f7f7f7; } .dropdown_cart ul li .cart_avatar { margin-top: 6px; -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; max-width: 100%; max-height: 100%; overflow: hidden; position: relative; width: 80px; height: 50px; border-radius: 5px; } .dropdown_cart ul li .cart_avatar img { -o-object-fit: cover; object-fit: cover; width: 100%; height: 100%; } .dropdown_cart ul li .cart_text { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; margin: 0 15px; } .dropdown_cart ul li .cart_text h4 { line-height: 21px; font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } .dropdown_cart ul li .cart_price { text-align: right; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; } .dropdown_cart ul li .cart_price span { font-size: 17px; color: #3d3e40; } .dropdown_cart ul li .cart_price button { color: red; font-size: 13px; } .dropdown_cart ul li .cart_price button:hover { text-decoration: underline; } .dropdown_cart .cart_footer { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; padding-top: 0.5rem; border-top: 1px solid #e2e8f0; } .dropdown_cart .cart_footer p { margin-bottom: 5px; } .dropdown_cart .cart_footer h1 { font-size: 24px; } .dropdown_cart .dropdown_cart_scrollbar { max-height: 420px; } @media (max-width: 768px) { header { min-height: 76px !important; height: auto; position: relative !important; } header .header_inner { display: block; padding: 20px; } header .header_inner .left-side { display: block; width: 100%; } header .header_inner .left-side #logo { margin-left: 35px; } header .header_inner .left-side #logo img { display: none; } header .header_inner .left-side #logo img.logo_mobile { display: block !important; } header .header_inner .left-side .triger { display: block; } header .header_inner .right-side { position: absolute; right: 20px; top: 20px; } header .header_inner .right-side .header-links-item { padding: 7px; } header .header_inner .right-side .header-links-item svg { width: 20px; height: 20px; } .header_menu { display: none; } .header_menu li { display: block; margin: 0; } .header_menu li a { display: block; padding: 8px 26px; } .header_menu li a ul li a { padding: 0px; } .header_menu .uk-drop, .header_menu .uk-dropdown, .header_menu .mdropdown, .header_menu .xdropdown { position: relative; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; border-radius: 4px; width: 100%; margin-top: 10px; padding: 10px; } .header_menu.is-visible { display: block; position: fixed; background: white; width: 50%; left: 0; top: 0; z-index: 2; height: 100%; overflow: scroll; } .header_menu.is-visible li a.uk-open { background-color: #edf2f7; position: absolute; color: #a2a2a2 !important; top: 0; width: 101%; border-radius: 0; margin-bottom: 0; padding: 13px; padding-left: 16%; } .header_menu.is-visible li a.uk-open::before { content: '\e92f'; width: 30px; height: 30px; font-family: "Feather-Icons"; font-weight: 600; text-align: center; color: #7d7d7d; position: absolute; font-size: 22px; top: 50%; left: 8%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .header_menu.is-visible li .uk-drop.uk-open { background-color: white; position: absolute; border-radius: 0; overflow: scroll; margin-top: 0; height: 100%; width: 101% !important; top: 52px !important; } .header_menu.is-visible ~ .overly { background-color: #12121257; position: fixed; width: 100%; height: 100%; right: 0; top: 0; z-index: 1; display: inline; } .header_dropdown { left: auto !important; right: -20px !important; width: 100vw; max-width: 400px !important; } } @media (max-width: 560px) { .header_menu.is-visible { width: 90%; } } .uk-drop, .uk-dropdown, .mdropdown, .xdropdown { display: none; } header.uk-sticky-fixed { z-index: 990; } .shadow-none { -webkit-box-shadow: none !important; box-shadow: none !important; } .course-tab i.icon-mobi { display: none; } @media (max-width: 660px) { .course-tab { top: 0 !important; } .course-tab ul li a span { display: none; } .course-tab ul li a i.icon-mobi { display: block; } } /* -------------------------------------------------------------- */ /* 04. Add your custom classes ----------------------------------------------------------------- */ /*# sourceMappingURL=style.css.map */ .error { color: red; }
20.417736
748
0.62021
06c04a638321ef98a7cf1045e4d758fd796979a4
1,328
py
Python
insta/migrations/0003_auto_20201019_1326.py
Abzed/insta-clone
6e655ad73bc52072e91f47224039b1317e4f5049
[ "MIT" ]
null
null
null
insta/migrations/0003_auto_20201019_1326.py
Abzed/insta-clone
6e655ad73bc52072e91f47224039b1317e4f5049
[ "MIT" ]
null
null
null
insta/migrations/0003_auto_20201019_1326.py
Abzed/insta-clone
6e655ad73bc52072e91f47224039b1317e4f5049
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-19 10:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import insta.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('insta', '0002_remove_profile_pictures'), ] operations = [ migrations.RemoveField( model_name='profile', name='date', ), migrations.RemoveField( model_name='stream', name='profile', ), migrations.AddField( model_name='post', name='user', field=models.OneToOneField(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='post_user', to='auth.user'), preserve_default=False, ), migrations.AddField( model_name='profile', name='pictures', field=models.ImageField(null=True, upload_to=insta.models.user_directory_path, verbose_name='Picture'), ), migrations.AddField( model_name='stream', name='post', field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='insta.post'), preserve_default=False, ), ]
30.883721
137
0.612199