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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0b923a4bbc430a1e48a577e2ea39b466f69cde9d | 5,984 | ps1 | PowerShell | psPAS/Functions/Accounts/Get-PASAccount.ps1 | alexR148/psPAS | f76d421340f6481e6bc41c7023c50a323aea5151 | [
"MIT"
] | 201 | 2017-07-03T11:47:10.000Z | 2022-03-10T10:03:17.000Z | psPAS/Functions/Accounts/Get-PASAccount.ps1 | alexR148/psPAS | f76d421340f6481e6bc41c7023c50a323aea5151 | [
"MIT"
] | 228 | 2017-07-15T20:24:16.000Z | 2022-03-17T22:05:33.000Z | psPAS/Functions/Accounts/Get-PASAccount.ps1 | alexR148/psPAS | f76d421340f6481e6bc41c7023c50a323aea5151 | [
"MIT"
] | 82 | 2017-07-06T15:01:00.000Z | 2022-02-24T16:37:46.000Z | # .ExternalHelp psPAS-help.xml
function Get-PASAccount {
[CmdletBinding(DefaultParameterSetName = 'Gen2Query')]
param(
[parameter(
Mandatory = $true,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2ID'
)]
[Alias('AccountID')]
[string]$id,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Filter'
)]
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Query'
)]
[string]$search,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Filter'
)]
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Query'
)]
[ValidateSet('startswith', 'contains')]
[string]$searchType,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Query'
)]
[string]$safeName,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Query'
)]
[datetime]$modificationTime,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Filter'
)]
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Query'
)]
[string[]]$sort,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen2Filter'
)]
[string]$filter,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen1'
)]
[ValidateLength(0, 500)]
[string]$Keywords,
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = 'Gen1'
)]
[ValidateLength(0, 28)]
[string]$Safe,
[parameter(
Mandatory = $false,
ValueFromPipelineByPropertyName = $false
)]
[int]$TimeoutSec
)
BEGIN {
}#begin
PROCESS {
#Get Parameters to include in request
$boundParameters = $PSBoundParameters | Get-PASParameter -ParametersToRemove modificationTime, SafeName
$filterParameters = $PSBoundParameters | Get-PASParameter -ParametersToKeep modificationTime, SafeName
$FilterString = $filterParameters | ConvertTo-FilterString
switch ($PSCmdlet.ParameterSetName) {
( { $PSItem -match 'Gen2' } ) {
switch ($PSBoundParameters) {
( { $PSItem.ContainsKey('modificationTime') }) {
#check required version
Assert-VersionRequirement -RequiredVersion 11.4
}
( { $PSItem.ContainsKey('searchType') }) {
#check required version
Assert-VersionRequirement -RequiredVersion 11.2
}
default {
#check minimum version
Assert-VersionRequirement -RequiredVersion 10.4
}
}
#assign new type name
$typeName = 'psPAS.CyberArk.Vault.Account.V10'
#define base URL
$URI = "$Script:BaseURI/api/Accounts"
}
'Gen1' {
#assign type name
$typeName = 'psPAS.CyberArk.Vault.Account'
#Create request URL
$URI = "$Script:BaseURI/WebServices/PIMServices.svc/Accounts"
}
'Gen2ID' {
#define "by ID" URL
$URI = "$URI/$id"
break
}
( { $PSItem -ne 'Gen2ID' } ) {
If ($null -ne $FilterString) {
$boundParameters = $boundParameters + $FilterString
}
#Create Query String, escaped for inclusion in request URL
$queryString = $boundParameters | ConvertTo-QueryString
If ($null -ne $queryString) {
#Build URL from base URL
$URI = "$URI`?$queryString"
}
break
}
}
#Send request to web service
$result = Invoke-PASRestMethod -Uri $URI -Method GET -WebSession $Script:WebSession -TimeoutSec $TimeoutSec
If ($null -ne $result) {
switch ($PSCmdlet.ParameterSetName) {
'Gen2ID' {
#return expected single result
$return = $result
break
}
'Gen1' {
$count = $($result.count)
switch ($count) {
{ $count -gt 1 } {
#Alert that web service only displays information on first result
Write-Warning "$count matching accounts found. Only the first result will be returned"
}
{ $count -gt 0 } {
#Get account details from search result
$account = ($result | Select-Object accounts).accounts
#Get account properties from found account
$properties = ($account | Select-Object -ExpandProperty properties)
If ($null -ne $account.InternalProperties) {
#Get internal properties from found account
$InternalProperties = ($account | Select-Object -ExpandProperty InternalProperties)
$InternalProps = New-Object -TypeName PSObject
#For every account property
For ($int = 0; $int -lt $InternalProperties.length; $int++) {
$InternalProps |
#Add each property name and value as object property of $InternalProps
Add-ObjectDetail -PropertyToAdd @{$InternalProperties[$int].key = $InternalProperties[$int].value } -Passthru $false
}
}
#Create output object
$return = New-Object -TypeName PSObject -Property @{
#Internal Unique ID of Account
'AccountID' = $($account | Select-Object -ExpandProperty AccountID)
#InternalProperties object
'InternalProperties' = $InternalProps
}
#For every account property
For ($int = 0; $int -lt $properties.length; $int++) {
#Add each property name and value to results
$return | Add-ObjectDetail -PropertyToAdd @{$properties[$int].key = $properties[$int].value } -Passthru $false
}
}
default { break }
}
break
}
default {
#return list
$return = $Result | Get-NextLink -TimeoutSec $TimeoutSec
break
}
}
if ($return) {
#Return Results
$return | Add-ObjectDetail -typename $typeName
}
}
}#process
END { }#end
} | 20.563574 | 126 | 0.646056 |
6a9c2da0dd02068a56dac0197f1b7fe7d2df113d | 353 | sql | SQL | resources/migrations/00004_card_names_table.up.sql | gered/mtgcoll | b5fb85b2021efe2b20e247e5d3e299bd2089417f | [
"MIT"
] | 3 | 2016-08-08T16:06:40.000Z | 2016-08-16T01:00:31.000Z | resources/migrations/00004_card_names_table.up.sql | gered/mtgcoll | b5fb85b2021efe2b20e247e5d3e299bd2089417f | [
"MIT"
] | null | null | null | resources/migrations/00004_card_names_table.up.sql | gered/mtgcoll | b5fb85b2021efe2b20e247e5d3e299bd2089417f | [
"MIT"
] | null | null | null | CREATE TABLE card_names (
id SERIAL PRIMARY KEY,
card_id TEXT NOT NULL,
name TEXT NOT NULL
);
CREATE INDEX card_names_name_idx ON card_names (name);
ALTER TABLE ONLY card_names ADD CONSTRAINT card_names_card_id_fkey FOREIGN KEY (card_id) REFERENCES cards (id) ON DELETE CASCADE;
CREATE INDEX card_names_card_id_idx ON card_names (card_id);
| 32.090909 | 129 | 0.790368 |
3e90d66ebf000bc774d6e9194249a53c64e1d965 | 1,895 | h | C | src/utils.h | Angluca/GSAdapter | 350faa6362852b8ca48611c09008e3e334a2de33 | [
"MIT"
] | null | null | null | src/utils.h | Angluca/GSAdapter | 350faa6362852b8ca48611c09008e3e334a2de33 | [
"MIT"
] | null | null | null | src/utils.h | Angluca/GSAdapter | 350faa6362852b8ca48611c09008e3e334a2de33 | [
"MIT"
] | null | null | null | #ifndef __UTILS_H__
#define __UTILS_H__
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
void WriteLog(const char* context, const char* filename = 0);
#ifndef NDEBUG
#define ERROR_OUT(format,...) {\
fprintf(stderr, "[ERROR|%s:%d>%s()<<"#format"]\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
}
#else
#define ERROR_OUT(format,...) {\
char buf[1024] = {0}; \
snprintf(buf, 1024, "[ERROR|%s:%d>%s()<<"#format"]\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
fprintf(stderr, "%s", buf);\
WriteLog(buf); \
}
#endif
#define PRINT_MSG(format,...) {\
fprintf(stderr,"["format"]\n",##__VA_ARGS__);\
}
#ifndef NDEBUG
#define DEBUG_MSG(format,...){\
fprintf(stderr, "[DEBUG|%s:%d>%s()<<"#format"]\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
}
#else
#define DEBUG_MSG(format,...)
#endif
#define EXIT_APP(format,...) {\
fprintf(stderr, "[ERROR|%s:%d>%s()<<"#format"]\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
exit(-1); \
}
#define ERROR_LOG(fname,format,...) {\
char buf[1024] = {0}; \
snprintf(buf, 1024, "[ERROR|%s:%d>%s()<<"#format"]\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
fprintf(stderr, "%s", buf);\
WriteLog(buf, (fname)); \
}
#define PRINT_LOG(fname,format,...) {\
char buf[1024] = {0}; \
snprintf(buf, 1024, "[%s:%d>%s()<<"#format"]\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
fprintf(stderr, "%s", buf);\
WriteLog(buf, (fname)); \
}
const unsigned int g_short_size = sizeof(short);
const unsigned int g_ushort_size = sizeof(unsigned short);
const unsigned int g_int_size = sizeof(int);
const unsigned int g_uint_size = sizeof(unsigned int);
const unsigned int g_float_size = sizeof(float);
const unsigned int g_double_size = sizeof(double);
const unsigned int g_long_size = sizeof(long);
const unsigned int g_ulong_size = sizeof(unsigned long);
#endif /*__UTILS_H__*/
| 28.283582 | 106 | 0.668074 |
e5aa0f274f9e504c08213a6e4b0515b0511fe96a | 123 | kt | Kotlin | lib/src/main/java/ii887522/controlify/struct/IntRect.kt | ii887522/controlify | 0e207d909a4bc958aab5cadd05444293d4668d22 | [
"MIT"
] | null | null | null | lib/src/main/java/ii887522/controlify/struct/IntRect.kt | ii887522/controlify | 0e207d909a4bc958aab5cadd05444293d4668d22 | [
"MIT"
] | null | null | null | lib/src/main/java/ii887522/controlify/struct/IntRect.kt | ii887522/controlify | 0e207d909a4bc958aab5cadd05444293d4668d22 | [
"MIT"
] | null | null | null | package ii887522.controlify.struct
data class IntRect(val position: IntPoint = IntPoint(), val size: IntSize = IntSize())
| 30.75 | 86 | 0.772358 |
e5e53bc7478b9291d5f728d25fb977abc86eb86e | 998 | asm | Assembly | libmikeos/src.io/io_get_cpuid.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null | libmikeos/src.io/io_get_cpuid.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null | libmikeos/src.io/io_get_cpuid.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null |
; @@@ void io_get_cpuid(unsigned long index, unsigned long *eax, unsigned long *ebx, unsigned long *ecx, unsigned long *edx);
section .text
use16
extern __heap_top
global _io_get_cpuid
_io_get_cpuid:
push bp
mov bp, sp
push di
mov eax, [bp + 4]
cpuid
mov di, [bp + 8] ; get pointer on the stack
or di, di
jz .1 ; NULL pointer, do nothing
cmp di, __heap_top ; judge DS/SS
jb .0
db 0x36 ; SS prefix
.0:
mov [di], eax
.1:
mov di, [bp + 10] ; get pointer on the stack
or di, di
jz .3 ; NULL pointer, do nothing
cmp di, __heap_top ; judge DS/SS
jb .2
db 0x36 ; SS prefix
.2:
mov [di], ebx
.3:
mov di, [bp + 12] ; get pointer on the stack
or di, di
jz .5 ; NULL pointer, do nothing
cmp di, __heap_top ; judge DS/SS
jb .4
db 0x36 ; SS prefix
.4:
mov [di], ecx
.5:
mov di, [bp + 14] ; get pointer on the stack
or di, di
jz .7 ; NULL pointer, do nothing
cmp di, __heap_top ; judge DS/SS
jb .6
db 0x36 ; SS prefix
.6:
mov [di], edx
.7:
pop di
pop bp
ret
| 17.821429 | 125 | 0.639279 |
94ff339903eb4fde748eaa3b67c2cf519c60a2f2 | 12,410 | dart | Dart | lib/views/signupPages/signupForm2.dart | MarcosBorba/App_Varied_Rent | c1ec7ce75e80935bd2009be9e4e6babc54d9cde9 | [
"MIT"
] | null | null | null | lib/views/signupPages/signupForm2.dart | MarcosBorba/App_Varied_Rent | c1ec7ce75e80935bd2009be9e4e6babc54d9cde9 | [
"MIT"
] | null | null | null | lib/views/signupPages/signupForm2.dart | MarcosBorba/App_Varied_Rent | c1ec7ce75e80935bd2009be9e4e6babc54d9cde9 | [
"MIT"
] | null | null | null | import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:fluttericon/font_awesome5_icons.dart';
import 'package:fluttericon/font_awesome_icons.dart';
import 'package:fluttericon/modern_pictograms_icons.dart';
import 'package:varied_rent/blocs/blocs.dart';
import 'package:varied_rent/components/components.dart';
import 'package:varied_rent/models/models.dart';
import 'package:varied_rent/repositories/repositories.dart';
import 'package:varied_rent/utils/utils.dart';
import 'package:varied_rent/views/SignupPages/signupPage.dart';
class SignupForm2 extends StatefulWidget {
final User user;
const SignupForm2({Key key, @required this.user}) : super(key: key);
@override
State<SignupForm2> createState() => _SignupForm2State(userTransition: user);
}
class _SignupForm2State extends State<SignupForm2> {
final User userTransition;
_SignupForm2State({this.userTransition});
final _nameController = TextEditingController();
final _cpfCnpjController = TextEditingController();
final _telephone1Controller = TextEditingController();
final _telephone2Controller = TextEditingController();
var selectedItemOfGenderType;
var selectedItemOfLandlordType;
final GlobalKey<FormState> _keyFormSignup = new GlobalKey();
final double containerBorderWidth = (screenWidth * 0.94) * 0.01;
final double minWidthMainButtons = (screenWidth * 0.94) * 0.94;
final double heightMainButtons = (screenHeight * 0.85) * 0.08500;
final EdgeInsetsGeometry heightOfTextFieldsAccordingToContainerSize =
EdgeInsets.symmetric(
vertical: ((screenHeight * 0.85) * 0.14) * 0.20,
horizontal: (screenWidth * 0.94) * 0.04);
final double heightLinearProgressLoading =
((screenHeight * 0.85) * 0.08500) * 0.15;
final double widthLinearProgressLoading = (screenWidth * 0.94) * 0.94;
@override
Widget build(BuildContext context) {
return BlocListener<SignupBloc, SignupState>(listener: (context, state) {
if (state is SignupFailure) {
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text('${state.error}'),
backgroundColor: Colors.red,
duration: Duration(seconds: 4),
),
);
} else if (state is SignupTransitionFormScreen) {
final UserRepository userRepository = UserRepository(
userApiClient: UserApiClient(),
);
AppRoutes.push(
context,
SignupPage(
userRepository: userRepository,
registrationForm: 3,
user: state.user,
));
}
}, child: BlocBuilder<SignupBloc, SignupState>(builder: (context, state) {
return Form(
key: _keyFormSignup,
autovalidate: true,
child: Column(
children: <Widget>[
Container(
decoration:
returnsSignupFormBoxDecoration(containerBorderWidth),
child: Padding(
padding: EdgeInsets.only(
left: screenWidth * 0.02,
right: screenWidth * 0.02,
),
child: returnsProfileTextsFields(),
)),
SizedBox(
height: (screenHeight * 0.85) * 0.03,
),
state is SignupLoading
? Container(
height: heightMainButtons,
width: minWidthMainButtons,
child:
Row(mainAxisSize: MainAxisSize.min, children: <Widget>[
returnsARoundedLinearProgressLoading(
heightLinearProgressLoading,
widthLinearProgressLoading),
]))
: returnsButtonSubmitSignup(
state, minWidthMainButtons, heightMainButtons),
SizedBox(
height: (screenHeight * 0.85) * 0.03,
),
],
),
);
}));
}
BoxDecoration returnsSignupFormBoxDecoration(double widthBorder) {
return BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(AppSizes.size40)),
color: Colors.white,
border: Border.all(
color: AppColors.secondaryColor,
width: widthBorder,
));
}
Widget returnsProfileTextsFields() {
return Column(
children: <Widget>[
SizedBox(
height: (screenHeight * 0.85) * 0.10,
),
returnsALineWithAnIconAndATextForTheTitle(screenWidth * 0.04),
SizedBox(
height: (screenHeight * 0.85) * 0.10,
),
Divider(
endIndent: AppSizes.size10,
indent: AppSizes.size10,
thickness: AppSizes.size2,
),
SizedBox(
height: (screenHeight * 0.85) * 0.13,
),
Container(
height: (screenHeight * 0.85) * 0.18,
child: returnsAnNameInput(heightOfTextFieldsAccordingToContainerSize),
),
Container(
height: (screenHeight * 0.85) * 0.18,
child: returnDropDownButtonSelectorGenderType(),
),
Container(
height: (screenHeight * 0.85) * 0.18,
child: returnDropDownButtonSelectorLandlordType(),
),
Container(
height: (screenHeight * 0.85) * 0.18,
child:
returnsAnCpfCnpjInput(heightOfTextFieldsAccordingToContainerSize),
),
Container(
height: (screenHeight * 0.85) * 0.18,
child: returnsAnTelephoneMandatoryInput(
heightOfTextFieldsAccordingToContainerSize),
),
Container(
height: (screenHeight * 0.85) * 0.18,
child: returnsAnTelephoneOptionalInput(
heightOfTextFieldsAccordingToContainerSize),
),
],
);
}
Widget returnsALineWithAnIconAndATextForTheTitle(
double spaceBetweenIconAndText) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(
Icons.account_circle,
size: AppSizes.size40,
color: AppColors.tertiaryColor,
),
SizedBox(
width: spaceBetweenIconAndText,
),
Text(
"Profile",
style: TextStyle(
color: AppColors.tertiaryColor, fontSize: AppFontSize.s20),
),
],
);
}
Widget returnsAnNameInput(EdgeInsetsGeometry contentPadding) {
return SignupTextsFields(
contentPadding: contentPadding,
inputController: _nameController,
labelText: AppTexts().nameTextFieldLabelText,
hintText: AppTexts().hintTextFromNameTextField,
prefixIcon: Icons.tag_faces,
helperText: AppTexts().nameTextFieldHelpText,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) => FocusScope.of(context).nextFocus(),
validator: FieldValidators().nameFormFieldValidator,
);
}
Widget returnDropDownButtonSelectorGenderType() {
return SignupDropDownButtonSelectors(
prefixIcon: FontAwesome.venus_mars,
suffixIcon: Icons.arrow_drop_down,
hint: AppTexts().hintTextFromGenderSelector,
helperText: AppTexts().genderSelectordHelpText,
items: AppTexts().genderTypesList,
value: selectedItemOfGenderType,
validator: FieldValidators().genderFormFieldValidator,
onChanged: (String novoItemSelecionado) {
_dropDownItemSelected(novoItemSelecionado);
},
);
}
void _dropDownItemSelected(String novoItem) {
setState(() {
this.selectedItemOfGenderType = novoItem;
});
}
Widget returnDropDownButtonSelectorLandlordType() {
return SignupDropDownButtonSelectors(
prefixIcon: Icons.work,
suffixIcon: Icons.arrow_drop_down,
hint: AppTexts().hintTextFromLandlordSelector,
helperText: AppTexts().landlordSelectordHelpText,
items: AppTexts().landlordTypesList,
value: selectedItemOfLandlordType,
validator: FieldValidators().landlordTypeFormFieldValidator,
onChanged: (String novoItemSelecionado) {
_dropDownItemSelectedLand(novoItemSelecionado);
},
);
}
void _dropDownItemSelectedLand(String novoItem) {
setState(() {
this.selectedItemOfLandlordType = novoItem;
});
}
Widget returnsAnCpfCnpjInput(EdgeInsetsGeometry contentPadding) {
return SignupTextsFields(
contentPadding: contentPadding,
inputController: _cpfCnpjController,
labelText: AppTexts().cpfCnpjTextFieldLabelText,
hintText: AppTexts().hintTextFromCpfCnpjTextField,
prefixIcon: FontAwesome5.id_badge,
helperText: AppTexts().cpfCnpjTextFieldHelpText,
keyboardType: TextInputType.number,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) => FocusScope.of(context).nextFocus(),
validator: FieldValidators().cpfCnpjFormFieldValidator,
inputFormatters: [
MaskedTextInputFormatterShifter(
maskONE: "XXX.XXX.XXX-XX", maskTWO: "XX.XXX.XXX/XXXX-XX"),
],
);
}
Widget returnsAnTelephoneMandatoryInput(EdgeInsetsGeometry contentPadding) {
return SignupTextsFields(
contentPadding: contentPadding,
inputController: _telephone1Controller,
labelText: AppTexts().telephoneMandatoryTextFieldLabelText,
hintText: AppTexts().hintTextFromTelephoneMandatoryTextField,
prefixIcon: Icons.phone_android,
helperText: AppTexts().telephoneMandatoryTextFieldHelpText,
keyboardType: TextInputType.number,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) => FocusScope.of(context).nextFocus(),
validator: FieldValidators().telephoneMandatoryFormFieldValidator,
inputFormatters: [
MaskedTextInputFormatterShifter(
maskONE: "XX XXXX-XXXX", maskTWO: "XX XXXXX-XXXX"),
],
);
}
Widget returnsAnTelephoneOptionalInput(EdgeInsetsGeometry contentPadding) {
return SignupTextsFields(
contentPadding: contentPadding,
inputController: _telephone2Controller,
labelText: AppTexts().telephoneOptionalTextFieldLabelText,
hintText: AppTexts().hintTextFromTelephoneOptionalTextField,
prefixIcon: ModernPictograms.mobile,
helperText: AppTexts().telephoneOptionalTextFieldHelpText,
keyboardType: TextInputType.number,
validator: FieldValidators().telephoneOptionalFormFieldValidator,
inputFormatters: [
MaskedTextInputFormatterShifter(
maskONE: "XX XXXX-XXXX", maskTWO: "XX XXXXX-XXXX"),
],
);
}
Widget returnsButtonSubmitSignup(
state, double minWidthButton, double heightButton) {
return SignupMainButtons(
minWidthButton: minWidthButton,
heightButton: heightButton,
color: AppColors().buttonColorDefault,
splashColor: AppColors().buttonColorWhenClicking,
disabledColor: AppColors().buttonColorWhenClicking,
textButton: AppTexts().signupContinueRegistrationButtonText,
onPressed: () {
returnFunctionOnPressedButtonSignup(state);
},
);
}
returnFunctionOnPressedButtonSignup(state) {
state is! SignupLoading
? _keyFormSignup.currentState.validate()
? _onSignupButtonPressed()
: false
: false;
}
_onSignupButtonPressed() {
userTransition.name = _nameController.text;
userTransition.genre = selectedItemOfGenderType.toString();
userTransition.landlord_type = selectedItemOfLandlordType.toString();
userTransition.cpf_cnpj = _cpfCnpjController.text;
userTransition.phones = new Phones(
telephone1: _telephone1Controller.text,
telephone2: _telephone2Controller.text);
BlocProvider.of<SignupBloc>(context)
.add(SignupButtonContinuePressed(user: userTransition));
}
Widget returnsARoundedLinearProgressLoading(
double linearHeight, double linearWidth) {
return ClipRRect(
borderRadius: BorderRadius.circular(8),
child: SizedBox(
height: linearHeight,
width: linearWidth,
child: returnsLinearProgressLoading(),
));
}
Widget returnsLinearProgressLoading() {
return LinearProgressIndicator(
backgroundColor: AppColors.secondaryColor,
valueColor: AlwaysStoppedAnimation<Color>(AppColors.tertiaryColor),
);
}
}
| 35.056497 | 80 | 0.661563 |
70c26fba599d133ffbe7e96f470823fa60c00b61 | 175 | h | C | include/il2cpp/UnityEngine/Switch/Applet.h | martmists-gh/BDSP | d6326c5d3ad9697ea65269ed47aa0b63abac2a0a | [
"MIT"
] | 1 | 2022-01-15T20:20:27.000Z | 2022-01-15T20:20:27.000Z | include/il2cpp/UnityEngine/Switch/Applet.h | martmists-gh/BDSP | d6326c5d3ad9697ea65269ed47aa0b63abac2a0a | [
"MIT"
] | null | null | null | include/il2cpp/UnityEngine/Switch/Applet.h | martmists-gh/BDSP | d6326c5d3ad9697ea65269ed47aa0b63abac2a0a | [
"MIT"
] | null | null | null | #pragma once
#include "il2cpp.h"
void UnityEngine_Switch_Applet__Begin (const MethodInfo* method_info);
void UnityEngine_Switch_Applet__End (const MethodInfo* method_info);
| 25 | 70 | 0.834286 |
263b426620ad653c76f35816ecb68833a3bb2e25 | 4,143 | java | Java | ThirdWork/src/com/dao/ProviderDaoImpl.java | LionelOrange/order | 048e7e11c5728a88df5a850c1be1203e85723533 | [
"Apache-2.0"
] | null | null | null | ThirdWork/src/com/dao/ProviderDaoImpl.java | LionelOrange/order | 048e7e11c5728a88df5a850c1be1203e85723533 | [
"Apache-2.0"
] | null | null | null | ThirdWork/src/com/dao/ProviderDaoImpl.java | LionelOrange/order | 048e7e11c5728a88df5a850c1be1203e85723533 | [
"Apache-2.0"
] | null | null | null | package com.dao;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import com.bean.Provider;
import com.db.PageModel;
public class ProviderDaoImpl extends BaseDao implements ProviderDao{
public void add(Connection conn, Provider provider) throws Exception {
String sql="insert into provider(providerId,providerName,providerAdd,providerTel,account,email)values(?,?,?,?,?,?)";
Object[] params={provider.getProviderId(),provider.getProviderName(),provider.getProviderAdd(),provider.getProviderTel(),provider.getAccount(),provider.getEmail()};
this.exesql(conn, sql, params);
}
public void delete(Connection conn, int providerId) throws Exception {
String sql="delete from provider where providerId=?";
Object[] params={providerId};
this.exesql(conn, sql, params);
}
public void update(Connection conn, Provider provider) throws Exception {
String sql="update provider set providerName=?,providerAdd=?,providerTel=?,account=?,email=? where providerId=?";
Object[] params={provider.getProviderName(),provider.getProviderAdd(),provider.getProviderTel(),provider.getAccount(),provider.getEmail(),provider.getProviderId()};
this.exesql(conn, sql, params);
}
public PageModel<Provider> query(Connection conn, int currentPage,
int pagesize) throws Exception {
PageModel<Provider> pageModel=new PageModel<Provider>();
List<Provider> list=new ArrayList<Provider>();
String sql="select * from (select rownum rn,pr.* from (select * from provider order by providerId)pr where rownum<=?)where rn>?";
Object[] params={currentPage*pagesize,(currentPage-1)*pagesize};
ResultSet rs=this.getRs(conn, sql, params);
while(rs.next()){
Provider pr=new Provider();
pr.setProviderId(rs.getInt("providerId"));
pr.setProviderName(rs.getString("providerName"));
pr.setProviderAdd(rs.getString("providerAdd"));
pr.setProviderTel(rs.getInt("providerTel"));
pr.setAccount(rs.getString("account"));
pr.setEmail(rs.getString("email"));
list.add(pr);
}
pageModel.setList(list);
pageModel.setCurrentPage(currentPage);
pageModel.setPagesize(pagesize);
pageModel.setTotalRecord(this.rowCount(conn, "select count(*) from provider", null));
return pageModel;
}
public Provider findByProviderId(Connection conn, int providerId)
throws Exception {
Provider pr=new Provider();
String sql="select * from provider where providerId=?";
Object[] params={providerId};
ResultSet rs=this.getRs(conn, sql, params);
if(rs.next()){
pr.setProviderId(rs.getInt("providerId"));
pr.setProviderName(rs.getString("providerName"));
pr.setProviderAdd(rs.getString("providerAdd"));
pr.setProviderTel(rs.getInt("providerTel"));
pr.setAccount(rs.getString("account"));
pr.setEmail(rs.getString("email"));
}
return pr;
}
public List<Provider> findAll(Connection conn) throws Exception {
List<Provider> list=new ArrayList<Provider>();
String sql="select * from provider";
ResultSet rs=this.getRs(conn, sql, null);
while(rs.next()){
Provider provider=new Provider();
provider.setProviderId(rs.getInt("providerId"));
provider.setProviderName(rs.getString("providerName"));
provider.setProviderAdd(rs.getString("providerAdd"));
provider.setProviderTel(rs.getInt("providerTel"));
provider.setAccount(rs.getString("account"));
provider.setEmail(rs.getString("email"));
list.add(provider);
}
return list;
}
public Provider findByProviderName(Connection conn, String providerName)
throws Exception {
Provider pr=new Provider();
String sql="select * from provider where providerName=?";
Object[] params={providerName};
ResultSet rs=this.getRs(conn, sql, params);
if(rs.next()){
pr.setProviderId(rs.getInt("providerId"));
pr.setProviderName(rs.getString("providerName"));
pr.setProviderAdd(rs.getString("providerAdd"));
pr.setProviderTel(rs.getInt("providerTel"));
pr.setAccount(rs.getString("account"));
pr.setEmail(rs.getString("email"));
}
return pr;
}
}
| 39.084906 | 167 | 0.719044 |
70dd39afce2c25e15e245071f2cbea5e9f417d3d | 358 | h | C | ZEngine/include/ZEngine/Rendering/Materials/BasicMaterial.h | lamarrr/RendererEngine | 0c3e2bd77859efc9c278ea8735dc3340803a75b2 | [
"MIT"
] | null | null | null | ZEngine/include/ZEngine/Rendering/Materials/BasicMaterial.h | lamarrr/RendererEngine | 0c3e2bd77859efc9c278ea8735dc3340803a75b2 | [
"MIT"
] | null | null | null | ZEngine/include/ZEngine/Rendering/Materials/BasicMaterial.h | lamarrr/RendererEngine | 0c3e2bd77859efc9c278ea8735dc3340803a75b2 | [
"MIT"
] | null | null | null | #pragma once
#include <Rendering/Materials/ShaderMaterial.h>
namespace ZEngine::Rendering::Materials {
class BasicMaterial : public ShaderMaterial {
public:
explicit BasicMaterial();
virtual ~BasicMaterial() = default;
void Apply(Shaders::Shader* const shader) override;
};
} // namespace ZEngine::Rendering::Materials
| 25.571429 | 59 | 0.701117 |
3cd48b290a58f3b567216344ec207f706f98f822 | 458 | sql | SQL | prisma/migrations/20220211100408_/migration.sql | MoonSoD/e-soc_backend | 08469f51c6f65fe1efc13860dec4b97f56c49ed5 | [
"MIT"
] | null | null | null | prisma/migrations/20220211100408_/migration.sql | MoonSoD/e-soc_backend | 08469f51c6f65fe1efc13860dec4b97f56c49ed5 | [
"MIT"
] | null | null | null | prisma/migrations/20220211100408_/migration.sql | MoonSoD/e-soc_backend | 08469f51c6f65fe1efc13860dec4b97f56c49ed5 | [
"MIT"
] | null | null | null | /*
Warnings:
- A unique constraint covering the columns `[date]` on the table `Report` will be added. If there are existing duplicate values, this will fail.
- Made the column `content` on table `ReportRevision` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "ReportRevision" ALTER COLUMN "content" SET NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "Report_date_key" ON "Report"("date");
| 35.230769 | 146 | 0.744541 |
0c7bc6cd6776c6607f39cb72845a7d672cf8392c | 1,118 | kt | Kotlin | feature/search/src/main/java/id/apwdevs/app/search/adapter/SearchMovieShowAdapter.kt | AlexzPurewoko/movie_catalogue | e80db0e7f11c7d24e86e410eae052ce6e10f9d1f | [
"MIT"
] | null | null | null | feature/search/src/main/java/id/apwdevs/app/search/adapter/SearchMovieShowAdapter.kt | AlexzPurewoko/movie_catalogue | e80db0e7f11c7d24e86e410eae052ce6e10f9d1f | [
"MIT"
] | 18 | 2021-04-25T01:48:49.000Z | 2021-06-30T01:48:13.000Z | feature/search/src/main/java/id/apwdevs/app/search/adapter/SearchMovieShowAdapter.kt | AlexzPurewoko/movie_catalogue | e80db0e7f11c7d24e86e410eae052ce6e10f9d1f | [
"MIT"
] | null | null | null | package id.apwdevs.app.search.adapter
import android.view.ViewGroup
import androidx.paging.PagingDataAdapter
import androidx.recyclerview.widget.DiffUtil
import id.apwdevs.app.search.model.SearchItem
class SearchMovieShowAdapter(
private val listener: (SearchItem) -> Unit
) : PagingDataAdapter<SearchItem, SearchMovieShowVH>(COMPARATOR) {
override fun onBindViewHolder(holder: SearchMovieShowVH, position: Int) {
getItem(position)?.let { holder.bind(it, listener) }
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SearchMovieShowVH {
return SearchMovieShowVH.create(parent)
}
companion object {
private val COMPARATOR = object : DiffUtil.ItemCallback<SearchItem>() {
override fun areItemsTheSame(oldItem: SearchItem, newItem: SearchItem): Boolean {
return oldItem.id == newItem.id
}
override fun areContentsTheSame(
oldItem: SearchItem,
newItem: SearchItem
): Boolean {
return oldItem == newItem
}
}
}
}
| 30.216216 | 93 | 0.666369 |
29099875d81bb1232d0d3ac4107d4cda2fca6612 | 1,301 | py | Python | hackerearth/vizury_challenge/panda_shopping.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | null | null | null | hackerearth/vizury_challenge/panda_shopping.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | 1 | 2021-05-18T07:30:16.000Z | 2021-05-18T07:30:16.000Z | hackerearth/vizury_challenge/panda_shopping.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | null | null | null | def getInput():
N = int(raw_input())
hlList = []
for i in xrange(N):
hl = map(int, raw_input().split(" "))
hlList.append(hl)
return (N, hlList)
def getMaxHappiness(hlList):
buyedItems = []
maxHappiness = 0
for item in hlList:
h,l = item[0], item[1]
if len(buyedItems) == 0:
maxHappiness += h
buyedItems.append(item)
elif buyedItems[-1][1] <= l:
maxHappiness += h
buyedItems.append(item)
return maxHappiness
def checkHL(hlItem):
result = True
for hlItem in hlList:
if((abs(hlItem[0]) >= 1) and (abs(hlItem[0]) <= 100000)) and ((hlItem[1] >= 1) and (hlItem[1] <= 1000000000000000000)):
result = result and True
else:
result = result and False
break
return result
if __name__ == "__main__":
try:
N, hlList = 5, [[10, 2], [-10, 1], [5, 2], [5, 2], [10, 3]]
#N, hlList = 1, [[100000, 1000000000000000000000000000000]]
#N, hlList = getInput()
token = checkHL(hlList)
if ((1 > N) or (N > 100000)) and (len(hlList) != N) and not token:
raise Exception
maxHappiness = getMaxHappiness(hlList)
print maxHappiness
except Exception,e:
print e
| 29.568182 | 127 | 0.538816 |
f7067fa9d5134aa23a6d16aded03852681aae9e8 | 210 | c | C | helloworld/main.c | QinYUN575/LicheePi-Nano_example | 04db2dd901c02878c53ae22e8e5804049a227bcd | [
"Apache-2.0"
] | null | null | null | helloworld/main.c | QinYUN575/LicheePi-Nano_example | 04db2dd901c02878c53ae22e8e5804049a227bcd | [
"Apache-2.0"
] | null | null | null | helloworld/main.c | QinYUN575/LicheePi-Nano_example | 04db2dd901c02878c53ae22e8e5804049a227bcd | [
"Apache-2.0"
] | null | null | null | #include <stdio.h>
int main(void)
{
printf("====================\r\n");
printf("%s:%s\r\n", __DATE__, __TIME__);
printf("====================\r\n");
printf("Hello World!\r\n");
return 0;
}
| 19.090909 | 44 | 0.433333 |
a64b16a8291d73d520dd4fbb4eaa7c5c54c39b9c | 114 | dart | Dart | flutter/lib/module_orders/orders_routes.dart | Yazan99sh/tourist | 220c5537f24df71996518c5b625a8ec57e0de915 | [
"MIT"
] | null | null | null | flutter/lib/module_orders/orders_routes.dart | Yazan99sh/tourist | 220c5537f24df71996518c5b625a8ec57e0de915 | [
"MIT"
] | null | null | null | flutter/lib/module_orders/orders_routes.dart | Yazan99sh/tourist | 220c5537f24df71996518c5b625a8ec57e0de915 | [
"MIT"
] | null | null | null | class OrdersRoutes {
static const ordersList = '/ordersList';
static const guideOrders = '/guideOrdersList';
} | 28.5 | 48 | 0.745614 |
f71e40be667e21577f4fd1889746447c005a3298 | 8,722 | c | C | src/qip/farg.c | dasfaha/sky | 4f2696e9abe54f4818f94337ed3bceae798e5a6d | [
"MIT"
] | 2 | 2018-01-16T07:26:53.000Z | 2021-12-08T03:12:40.000Z | src/qip/farg.c | dasfaha/sky | 4f2696e9abe54f4818f94337ed3bceae798e5a6d | [
"MIT"
] | null | null | null | src/qip/farg.c | dasfaha/sky | 4f2696e9abe54f4818f94337ed3bceae798e5a6d | [
"MIT"
] | null | null | null | #include <stdlib.h>
#include "dbg.h"
#include "node.h"
//==============================================================================
//
// Functions
//
//==============================================================================
//--------------------------------------
// Lifecycle
//--------------------------------------
// Creates an AST node for a function argument declaration.
//
// var_decl - The variable declaration.
//
// Returns a function argument node.
qip_ast_node *qip_ast_farg_create(struct qip_ast_node *var_decl)
{
qip_ast_node *node = malloc(sizeof(qip_ast_node)); check_mem(node);
node->type = QIP_AST_TYPE_FARG;
node->parent = NULL;
node->line_no = node->char_no = 0;
node->generated = false;
node->farg.var_decl = var_decl;
if(var_decl != NULL) var_decl->parent = node;
return node;
error:
qip_ast_node_free(node);
return NULL;
}
// Frees a variable declaration AST node from memory.
//
// node - The AST node to free.
void qip_ast_farg_free(struct qip_ast_node *node)
{
if(node->farg.var_decl) {
qip_ast_node_free(node->farg.var_decl);
}
node->farg.var_decl = NULL;
}
// Copies a node and its children.
//
// node - The node to copy.
// ret - A pointer to where the new copy should be returned to.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_copy(qip_ast_node *node, qip_ast_node **ret)
{
int rc;
check(node != NULL, "Node required");
check(ret != NULL, "Return pointer required");
qip_ast_node *clone = qip_ast_farg_create(NULL);
check_mem(clone);
rc = qip_ast_node_copy(node->farg.var_decl, &clone->farg.var_decl);
check(rc == 0, "Unable to copy var decl");
if(clone->farg.var_decl) clone->farg.var_decl->parent = clone;
*ret = clone;
return 0;
error:
qip_ast_node_free(clone);
*ret = NULL;
return -1;
}
//--------------------------------------
// Codegen
//--------------------------------------
// Recursively generates LLVM code for the function argument AST node.
//
// node - The node to generate an LLVM value for.
// module - The compilation unit this node is a part of.
// value - A pointer to where the LLVM value should be returned.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_codegen(qip_ast_node *node, qip_module *module,
LLVMValueRef *value)
{
int rc;
check(node != NULL, "Node required");
check(node->type == QIP_AST_TYPE_FARG, "Node type must be 'function argument'");
check(node->farg.var_decl != NULL, "Function argument declaration required");
check(module != NULL, "Module required");
// Delegate LLVM generation to the variable declaration.
rc = qip_ast_node_codegen(node->farg.var_decl, module, value);
check(rc == 0, "Unable to codegen function argument");
return 0;
error:
return -1;
}
//--------------------------------------
// Preprocessor
//--------------------------------------
// Preprocesses the node.
//
// node - The node.
// module - The module that the node is a part of.
// stage - The processing stage.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_preprocess(qip_ast_node *node, qip_module *module,
qip_ast_processing_stage_e stage)
{
int rc;
check(node != NULL, "Node required");
check(module != NULL, "Module required");
// Preprocess variable declaration.
rc = qip_ast_node_preprocess(node->farg.var_decl, module, stage);
check(rc == 0, "Unable to preprocess function argument variable declaration");
return 0;
error:
return -1;
}
//--------------------------------------
// Type refs
//--------------------------------------
// Computes a list of type references used by the node.
//
// node - The node.
// type_refs - A pointer to an array of type refs.
// count - A pointer to where the number of type refs is stored.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_get_type_refs(qip_ast_node *node,
qip_ast_node ***type_refs,
uint32_t *count)
{
int rc;
check(node != NULL, "Node required");
check(type_refs != NULL, "Type refs return pointer required");
check(count != NULL, "Type ref count return pointer required");
if(node->farg.var_decl != NULL) {
rc = qip_ast_node_get_type_refs(node->farg.var_decl, type_refs, count);
check(rc == 0, "Unable to add function argument type refs");
}
return 0;
error:
qip_ast_node_type_refs_free(type_refs, count);
return -1;
}
// Retrieves all variable reference of a given name within this node.
//
// node - The node.
// name - The variable name.
// array - The array to add the references to.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_get_var_refs(qip_ast_node *node, bstring name,
qip_array *array)
{
int rc;
check(node != NULL, "Node required");
check(name != NULL, "Variable name required");
check(array != NULL, "Array required");
if(node->farg.var_decl != NULL) {
rc = qip_ast_node_get_var_refs(node->farg.var_decl, name, array);
check(rc == 0, "Unable to add function argument var refs");
}
return 0;
error:
return -1;
}
// Retrieves all variable reference of a given type name within this node.
//
// node - The node.
// module - The module.
// type_name - The type name.
// array - The array to add the references to.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_get_var_refs_by_type(qip_ast_node *node, qip_module *module,
bstring type_name, qip_array *array)
{
int rc;
check(node != NULL, "Node required");
check(module != NULL, "Module required");
check(type_name != NULL, "Type name required");
check(array != NULL, "Array required");
rc = qip_ast_node_get_var_refs_by_type(node->farg.var_decl, module, type_name, array);
check(rc == 0, "Unable to add function argument var refs");
return 0;
error:
return -1;
}
//--------------------------------------
// Dependencies
//--------------------------------------
// Computes a list of class names that this AST node depends on.
//
// node - The node to compute dependencies for.
// dependencies - A pointer to an array of dependencies.
// count - A pointer to where the number of dependencies is stored.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_get_dependencies(qip_ast_node *node,
bstring **dependencies,
uint32_t *count)
{
int rc;
check(node != NULL, "Node required");
check(dependencies != NULL, "Dependencies return pointer required");
check(count != NULL, "Dependency count return pointer required");
if(node->farg.var_decl != NULL) {
rc = qip_ast_node_get_dependencies(node->farg.var_decl, dependencies, count);
check(rc == 0, "Unable to add function argument dependencies");
}
return 0;
error:
qip_ast_node_dependencies_free(dependencies, count);
return -1;
}
//--------------------------------------
// Validation
//--------------------------------------
// Validates the AST node.
//
// node - The node to validate.
// module - The module that the node is a part of.
//
// Returns 0 if successful, otherwise returns -1.
int qip_ast_farg_validate(qip_ast_node *node, qip_module *module)
{
int rc;
check(node != NULL, "Node required");
check(module != NULL, "Module required");
// Validate variable declaration.
rc = qip_ast_node_validate(node->farg.var_decl, module);
check(rc == 0, "Unable to validate function argument variable declaration");
return 0;
error:
return -1;
}
//--------------------------------------
// Debugging
//--------------------------------------
// Append the contents of the AST node to the string.
//
// node - The node to dump.
// ret - A pointer to the bstring to concatenate to.
//
// Return 0 if successful, otherwise returns -1.s
int qip_ast_farg_dump(qip_ast_node *node, bstring ret)
{
int rc;
check(node != NULL, "Node required");
check(ret != NULL, "String required");
// Append dump.
check(bcatcstr(ret, "<farg>\n") == BSTR_OK, "Unable to append dump");
// Recursively dump children.
if(node->farg.var_decl != NULL) {
rc = qip_ast_node_dump(node->farg.var_decl, ret);
check(rc == 0, "Unable to dump variable declaration");
}
return 0;
error:
return -1;
}
| 27.77707 | 90 | 0.594588 |
ce4fd901f8009b48e8035d47cb93ee239121fac0 | 233 | sql | SQL | sql/v1_3_0_create_view_airport_5km.sql | aveek22/cs621-spatial-db | b3e57847de8b4ff18d10e7d0f7a93c79c9adf21f | [
"MIT"
] | 3 | 2021-01-12T04:00:44.000Z | 2021-12-10T00:55:58.000Z | sql/v1_3_0_create_view_airport_5km.sql | aveek22/cs621-spatial-db | b3e57847de8b4ff18d10e7d0f7a93c79c9adf21f | [
"MIT"
] | null | null | null | sql/v1_3_0_create_view_airport_5km.sql | aveek22/cs621-spatial-db | b3e57847de8b4ff18d10e7d0f7a93c79c9adf21f | [
"MIT"
] | 3 | 2021-01-12T18:02:51.000Z | 2021-02-14T23:58:43.000Z | CREATE OR REPLACE VIEW vw_mumbai_houses_airport_5km
AS
SELECT *
FROM mumbai_house_price_raw
WHERE 1=1
AND ST_DISTANCE(
ST_TRANSFORM(ST_GEOMFROMTEXT('POINT(72.874374 19.096713)',4326), 7755),
ST_TRANSFORM((geometry),7755)
) <= 5000; | 25.888889 | 72 | 0.798283 |
426bb8b695dac54b37a2f14f2087ccd41df2b191 | 2,535 | kts | Kotlin | app/build.gradle.kts | Ghedeon/Trendroid | cd2877faf8ed0ce616a752f57aac6a738ae50674 | [
"Apache-2.0"
] | null | null | null | app/build.gradle.kts | Ghedeon/Trendroid | cd2877faf8ed0ce616a752f57aac6a738ae50674 | [
"Apache-2.0"
] | null | null | null | app/build.gradle.kts | Ghedeon/Trendroid | cd2877faf8ed0ce616a752f57aac6a738ae50674 | [
"Apache-2.0"
] | null | null | null | import com.android.build.gradle.ProguardFiles.getDefaultProguardFile
import deps.dagger.android
import org.jetbrains.kotlin.gradle.internal.AndroidExtensionsExtension
import org.jetbrains.kotlin.kapt3.base.Kapt.kapt
plugins {
id("com.android.application")
kotlin("android.extensions")
kotlin("android")
kotlin("kapt")
id("androidx.navigation.safeargs")
}
android {
compileSdkVersion(28)
defaultConfig {
applicationId = "com.ghedeon.trendroid"
minSdkVersion(16)
targetSdkVersion(28)
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}
buildTypes.forEach {
it.buildConfigField("String", "GITHUB_URL", "\"https://github.com/\"")
it.buildConfigField("String", "GITHUB_API_URL", "\"https://api.github.com/\"")
}
androidExtensions {
// https://github.com/gradle/kotlin-dsl/issues/644
configure(delegateClosureOf<AndroidExtensionsExtension> {
isExperimental = true
})
}
compileOptions {
setSourceCompatibility(JavaVersion.VERSION_1_8)
setTargetCompatibility(JavaVersion.VERSION_1_8)
}
}
kapt {
correctErrorTypes = true
}
dependencies {
implementation(deps.kotlin.stdlib)
implementation(deps.kotlin.coroutines_core)
implementation(deps.kotlin.coroutines_android)
implementation(deps.androidx.appcompat)
implementation(deps.androidx.core)
implementation(deps.androidx.cardview)
implementation(deps.androidx.recyclerview)
implementation(deps.androidx.fragment)
implementation(deps.lifecycle.extensions)
implementation(deps.lifecycle.java8)
implementation(deps.lifecycle.shopify_livedata_ktx)
implementation(deps.lifecycle.livedata_ktx)
implementation(deps.constraint_layout)
implementation(deps.navigation.fragment)
implementation(deps.navigation.ui)
implementation(deps.dagger.runtime)
implementation(deps.dagger.android)
implementation(deps.dagger.support)
implementation(deps.okhttp.core)
implementation(deps.okhttp.logging)
implementation(deps.retrofit.runtime)
implementation(deps.retrofit.moshi_converter)
implementation(deps.retrofit.coroutines_adapter)
implementation(deps.epoxy.runtime)
implementation(deps.glide.runtime)
implementation(deps.jsoup)
implementation(deps.videoview)
implementation(deps.timber)
kapt(deps.dagger.compiler)
kapt(deps.dagger.processor)
kapt(deps.epoxy.processor)
kapt(deps.glide.compiler)
}
| 26.684211 | 86 | 0.794083 |
06a360b97ba2c548fe8d491b24867982fcabfe44 | 2,666 | kt | Kotlin | app/src/main/java/payment/sdk/android/demo/dependency/repository/ProductRepository.kt | Mohmd-H-BH/payment-sdk-android | 316d29a15cd95e79e7b71f875af4843af9620933 | [
"MIT-0"
] | 3 | 2020-07-11T17:25:07.000Z | 2020-11-25T09:56:54.000Z | app/src/main/java/payment/sdk/android/demo/dependency/repository/ProductRepository.kt | Mohmd-H-BH/payment-sdk-android | 316d29a15cd95e79e7b71f875af4843af9620933 | [
"MIT-0"
] | 12 | 2019-11-27T15:58:05.000Z | 2021-12-14T04:13:01.000Z | app/src/main/java/payment/sdk/android/demo/dependency/repository/ProductRepository.kt | Mohmd-H-BH/payment-sdk-android | 316d29a15cd95e79e7b71f875af4843af9620933 | [
"MIT-0"
] | 7 | 2019-12-04T07:43:49.000Z | 2022-02-15T07:02:24.000Z | package payment.sdk.android.demo.dependency.repository
import payment.sdk.android.demo.basket.data.BasketProductDomain
import payment.sdk.android.demo.products.data.ProductDomain
import io.reactivex.Completable
import io.reactivex.Flowable
import io.reactivex.Single
import javax.inject.Inject
class ProductRepository @Inject constructor(
private val productDao: ProductDao,
private val entityToDomainMapper: EntityToDomainMapper
) {
fun getBasketProducts(): Flowable<List<BasketProductDomain>> =
productDao.getProducts().map { entities ->
entities.map { entity ->
entityToDomainMapper.map(entity)
}
}
fun insertProduct(product: ProductDomain): Completable =
productDao.findProductBy(product.id).flatMapCompletable { entities ->
return@flatMapCompletable if (entities.isEmpty()) {
Completable.fromAction {
productDao.insert(ProductEntity(
id = product.id,
name = product.name,
description = product.description,
imageUrl = product.imageUrl,
prices = product.prices,
amount = 1
))
}
} else {
val entity = entities[0]
Completable.fromAction {
productDao.update(entity.copy(amount = entity.amount + 1))
}
}
}
fun deleteProduct(id: String): Completable {
return Completable.fromCallable {
productDao.delete(id)
}
}
fun removeProduct(id: String): Completable {
return productDao.findProductBy(id).flatMapCompletable { entities ->
return@flatMapCompletable if (entities.isEmpty()) {
Completable.complete()
} else {
val entity = entities[0]
if (entity.amount > 1) {
Completable.fromCallable { productDao.update(entity.copy(amount = entity.amount - 1)) }
} else {
deleteProduct(id)
}
}
}
}
fun removeAll(): Completable {
return Completable.fromCallable {
productDao.deleteAll()
}
}
fun hasProduct(id: String): Single<Boolean> {
return productDao.findProductBy(id).flatMap { entities ->
return@flatMap Single.just(entities.isNotEmpty())
}
}
} | 35.078947 | 107 | 0.54051 |
5797db9cce3fd5c3243f9cb412049d32ed1e8f9a | 2,072 | sql | SQL | test/fixtures/sql/postgres.sql | lnikell/next-auth | f7a9dfbcf2de8a4c2752ec7316645a05b0a72ea0 | [
"0BSD"
] | 6 | 2021-08-25T04:27:18.000Z | 2021-08-29T22:30:28.000Z | test/fixtures/sql/postgres.sql | lnikell/next-auth | f7a9dfbcf2de8a4c2752ec7316645a05b0a72ea0 | [
"0BSD"
] | 9 | 2020-09-20T17:50:28.000Z | 2021-12-09T01:56:38.000Z | test/fixtures/sql/postgres.sql | lnikell/next-auth | f7a9dfbcf2de8a4c2752ec7316645a05b0a72ea0 | [
"0BSD"
] | 8 | 2020-10-01T14:49:44.000Z | 2020-10-18T04:54:54.000Z | CREATE TABLE accounts
(
id SERIAL,
compound_id VARCHAR(255) NOT NULL,
user_id INTEGER NOT NULL,
provider_type VARCHAR(255) NOT NULL,
provider_id VARCHAR(255) NOT NULL,
provider_account_id VARCHAR(255) NOT NULL,
refresh_token TEXT,
access_token TEXT,
access_token_expires TIMESTAMPTZ,
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
CREATE TABLE sessions
(
id SERIAL,
user_id INTEGER NOT NULL,
expires TIMESTAMPTZ NOT NULL,
session_token VARCHAR(255) NOT NULL,
access_token VARCHAR(255) NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
CREATE TABLE users
(
id SERIAL,
name VARCHAR(255),
email VARCHAR(255),
email_verified TIMESTAMPTZ,
image VARCHAR(255),
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
CREATE TABLE verification_requests
(
id SERIAL,
identifier VARCHAR(255) NOT NULL,
token VARCHAR(255) NOT NULL,
expires TIMESTAMPTZ NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX compound_id
ON accounts(compound_id);
CREATE INDEX provider_account_id
ON accounts(provider_account_id);
CREATE INDEX provider_id
ON accounts(provider_id);
CREATE INDEX user_id
ON accounts(user_id);
CREATE UNIQUE INDEX session_token
ON sessions(session_token);
CREATE UNIQUE INDEX access_token
ON sessions(access_token);
CREATE UNIQUE INDEX email
ON users(email);
CREATE UNIQUE INDEX token
ON verification_requests(token);
| 27.626667 | 72 | 0.680985 |
cf01e1623b19da47e36dfc821528bd45391c3011 | 1,960 | sql | SQL | schema/generate/16-schema_update_18.sql | ishagarg06/augur | 2295d48288d243c9ac01bf54ba140ca756828929 | [
"MIT"
] | null | null | null | schema/generate/16-schema_update_18.sql | ishagarg06/augur | 2295d48288d243c9ac01bf54ba140ca756828929 | [
"MIT"
] | null | null | null | schema/generate/16-schema_update_18.sql | ishagarg06/augur | 2295d48288d243c9ac01bf54ba140ca756828929 | [
"MIT"
] | null | null | null | CREATE SEQUENCE "augur_data"."releases_release_id_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE TABLE "augur_data"."releases" (
"release_id" int8 NOT NULL DEFAULT nextval('"augur_data".releases_release_id_seq'::regclass),
"repo_id" int8 NOT NULL,
"release_name" varchar(255) COLLATE "pg_catalog"."default",
"release_description" varchar(255) COLLATE "pg_catalog"."default",
"release_author" varchar(255) COLLATE "pg_catalog"."default",
"release_created_at" timestamp(6),
"release_published_at" timestamp(6),
"release_updated_at" timestamp(6),
"release_is_draft" bool,
"release_is_prerelease" bool,
"release_tag_name" varchar(255) COLLATE "pg_catalog"."default",
"release_url" varchar(255) COLLATE "pg_catalog"."default",
"tool_source" varchar(255) COLLATE "pg_catalog"."default",
"tool_version" varchar(255) COLLATE "pg_catalog"."default",
"data_source" varchar(255) COLLATE "pg_catalog"."default",
"data_collection_date" timestamp(6) DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "releases_pkey" PRIMARY KEY ("release_id")
)
;
ALTER TABLE "augur_data"."releases" OWNER TO "augur";
ALTER TABLE "augur_data"."repo" ALTER COLUMN "forked_from" TYPE varchar COLLATE "pg_catalog"."default" USING "forked_from"::varchar;
ALTER TABLE "augur_data"."repo" ADD COLUMN "repo_archived" int4;
ALTER TABLE "augur_data"."repo" ADD COLUMN "repo_archived_date_collected" timestamptz(0);
SELECT setval('"augur_data"."releases_release_id_seq"', 1, false);
ALTER SEQUENCE "augur_data"."releases_release_id_seq"
OWNED BY "augur_data"."releases"."release_id";
ALTER SEQUENCE "augur_data"."releases_release_id_seq" OWNER TO "augur";
ALTER TABLE "augur_data"."releases" ADD CONSTRAINT "fk_releases_repo_1" FOREIGN KEY ("repo_id") REFERENCES "augur_data"."repo" ("repo_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
update "augur_operations"."augur_settings" set value = 18 where setting = 'augur_data_version';
| 41.702128 | 179 | 0.768367 |
39ec75c7f6938b4ff085a066199b1fa6585a1c73 | 713 | java | Java | src/main/java/cn/dalgen/mybatis/gen/exception/DalgenException.java | jeffrey-fu/dalgen | 5e5b0ca0245bea5ae2fb027c0eb7840a73d94813 | [
"Apache-2.0"
] | null | null | null | src/main/java/cn/dalgen/mybatis/gen/exception/DalgenException.java | jeffrey-fu/dalgen | 5e5b0ca0245bea5ae2fb027c0eb7840a73d94813 | [
"Apache-2.0"
] | null | null | null | src/main/java/cn/dalgen/mybatis/gen/exception/DalgenException.java | jeffrey-fu/dalgen | 5e5b0ca0245bea5ae2fb027c0eb7840a73d94813 | [
"Apache-2.0"
] | null | null | null | package cn.dalgen.mybatis.gen.exception;
/**
* Created by bangis.wangdf on 15/12/5.
* Desc
*/
public class DalgenException extends RuntimeException {
/**
* The constant serialVersionUID.
*/
private static final long serialVersionUID = 7336283442300122583L;
/**
* Instantiates a new Dalgen exception.
*
* @param errorMsg the error msg
*/
public DalgenException(String errorMsg) {
super(errorMsg);
}
/**
* Instantiates a new Dalgen exception.
*
* @param errorMsg the error msg
* @param throwable the throwable
*/
public DalgenException(String errorMsg,Throwable throwable){
super(errorMsg,throwable);
}
}
| 22.28125 | 70 | 0.643759 |
36fe124f082ff703702b439181866a5122a54d19 | 320 | sql | SQL | CnC/config.sql | Luke-Larsen/DarkMiner | aae1bb83150e337b57c88bd9f412383ad488f60c | [
"MIT"
] | 3 | 2021-02-17T18:59:25.000Z | 2021-09-19T14:40:34.000Z | CnC/config.sql | Luke-Larsen/DarkMiner | aae1bb83150e337b57c88bd9f412383ad488f60c | [
"MIT"
] | null | null | null | CnC/config.sql | Luke-Larsen/DarkMiner | aae1bb83150e337b57c88bd9f412383ad488f60c | [
"MIT"
] | null | null | null | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
CREATE TABLE `config` (
`Name` varchar(255) NOT NULL,
`Value` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `config` (`Name`, `Value`) VALUES
('Password', 'MySecurePassword');
COMMIT;
| 24.615385 | 45 | 0.715625 |
17218fd4b5351d6636c4bdd5b54e6c9a5f428521 | 296 | kt | Kotlin | app/src/main/java/com/ctech/eaty/ui/radio/di/RadioFragmentBuilderModule.kt | mehrdad-shokri/hunt-android | 2e3445debaedfea03f9b44ab62744046fe07f1cc | [
"Apache-2.0"
] | 50 | 2018-01-08T16:51:44.000Z | 2021-05-06T22:23:21.000Z | app/src/main/java/com/ctech/eaty/ui/radio/di/RadioFragmentBuilderModule.kt | mehrdad-shokri/hunt-android | 2e3445debaedfea03f9b44ab62744046fe07f1cc | [
"Apache-2.0"
] | 3 | 2018-01-18T12:19:58.000Z | 2018-03-29T06:26:30.000Z | app/src/main/java/com/ctech/eaty/ui/radio/di/RadioFragmentBuilderModule.kt | mehrdad-shokri/hunt-android | 2e3445debaedfea03f9b44ab62744046fe07f1cc | [
"Apache-2.0"
] | 13 | 2018-01-15T13:27:38.000Z | 2020-06-24T04:30:13.000Z | package com.ctech.eaty.ui.radio.di
import com.ctech.eaty.ui.radio.view.RadioFragment
import dagger.Module
import dagger.android.ContributesAndroidInjector
@Module
abstract class RadioFragmentBuilderModule {
@ContributesAndroidInjector
abstract fun contributeFragment(): RadioFragment
} | 24.666667 | 52 | 0.831081 |
bc89149c90ec2e049b416482339ac1a7fce9fb69 | 21,782 | sql | SQL | code/sql/gmall.mysql_insert.sql | Tiankx1003/DW-MultiImpl | fbee442ff0373dea73596ec1cbd6f014b111a075 | [
"MIT"
] | null | null | null | code/sql/gmall.mysql_insert.sql | Tiankx1003/DW-MultiImpl | fbee442ff0373dea73596ec1cbd6f014b111a075 | [
"MIT"
] | 1 | 2020-12-15T15:18:06.000Z | 2020-12-15T15:18:06.000Z | code/sql/gmall.mysql_insert.sql | Tiankx1003/DW-MultiImpl | fbee442ff0373dea73596ec1cbd6f014b111a075 | [
"MIT"
] | null | null | null |
/*Data for the table `base_category1` */
INSERT INTO `base_category1`(`id`,`name`) VALUES
(1,'图书、音像、电子书刊'),
(2,'手机'),
(3,'家用电器'),
(4,'数码'),
(5,'家居家装'),
(6,'电脑办公'),
(7,'厨具'),
(8,'个护化妆'),
(9,'服饰内衣'),
(10,'钟表'),
(11,'鞋靴'),
(12,'母婴'),
(13,'礼品箱包'),
(14,'食品饮料、保健食品'),
(15,'珠宝'),
(16,'汽车用品'),
(17,'运动健康'),
(18,'玩具乐器');
INSERT INTO `base_category2`(`id`,`name`,`category1_id`) VALUES
(1,'电子书刊',1),
(2,'音像',1),
(3,'英文原版',1),
(4,'文艺',1),
(5,'少儿',1),
(6,'人文社科',1),
(7,'经管励志',1),
(8,'生活',1),
(9,'科技',1),
(10,'教育',1),
(11,'港台图书',1),
(12,'其他',1),
(13,'手机通讯',2),
(14,'运营商',2),
(15,'手机配件',2),
(16,'大 家 电',3),
(17,'厨卫大电',3),
(18,'厨房小电',3),
(19,'生活电器',3),
(20,'个护健康',3),
(21,'五金家装',3),
(22,'摄影摄像',4),
(23,'数码配件',4),
(24,'智能设备',4),
(25,'影音娱乐',4),
(26,'电子教育',4),
(27,'虚拟商品',4),
(28,'家纺',5),
(29,'灯具',5),
(30,'生活日用',5),
(31,'家装软饰',5),
(32,'宠物生活',5),
(33,'电脑整机',6),
(34,'电脑配件',6),
(35,'外设产品',6),
(36,'游戏设备',6),
(37,'网络产品',6),
(38,'办公设备',6),
(39,'文具/耗材',6),
(40,'服务产品',6),
(41,'烹饪锅具',7),
(42,'刀剪菜板',7),
(43,'厨房配件',7),
(44,'水具酒具',7),
(45,'餐具',7),
(46,'酒店用品',7),
(47,'茶具/咖啡具',7),
(48,'清洁用品',8),
(49,'面部护肤',8),
(50,'身体护理',8),
(51,'口腔护理',8),
(52,'女性护理',8),
(53,'洗发护发',8),
(54,'香水彩妆',8),
(55,'女装',9),
(56,'男装',9),
(57,'内衣',9),
(58,'洗衣服务',9),
(59,'服饰配件',9),
(60,'钟表',10),
(61,'流行男鞋',11),
(62,'时尚女鞋',11),
(63,'奶粉',12),
(64,'营养辅食',12),
(65,'尿裤湿巾',12),
(66,'喂养用品',12),
(67,'洗护用品',12),
(68,'童车童床',12),
(69,'寝居服饰',12),
(70,'妈妈专区',12),
(71,'童装童鞋',12),
(72,'安全座椅',12),
(73,'潮流女包',13),
(74,'精品男包',13),
(75,'功能箱包',13),
(76,'礼品',13),
(77,'奢侈品',13),
(78,'婚庆',13),
(79,'进口食品',14),
(80,'地方特产',14),
(81,'休闲食品',14),
(82,'粮油调味',14),
(83,'饮料冲调',14),
(84,'食品礼券',14),
(85,'茗茶',14),
(86,'时尚饰品',15),
(87,'黄金',15),
(88,'K金饰品',15),
(89,'金银投资',15),
(90,'银饰',15),
(91,'钻石',15),
(92,'翡翠玉石',15),
(93,'水晶玛瑙',15),
(94,'彩宝',15),
(95,'铂金',15),
(96,'木手串/把件',15),
(97,'珍珠',15),
(98,'维修保养',16),
(99,'车载电器',16),
(100,'美容清洗',16),
(101,'汽车装饰',16),
(102,'安全自驾',16),
(103,'汽车服务',16),
(104,'赛事改装',16),
(105,'运动鞋包',17),
(106,'运动服饰',17),
(107,'骑行运动',17),
(108,'垂钓用品',17),
(109,'游泳用品',17),
(110,'户外鞋服',17),
(111,'户外装备',17),
(112,'健身训练',17),
(113,'体育用品',17),
(114,'适用年龄',18),
(115,'遥控/电动',18),
(116,'毛绒布艺',18),
(117,'娃娃玩具',18),
(118,'模型玩具',18),
(119,'健身玩具',18),
(120,'动漫玩具',18),
(121,'益智玩具',18),
(122,'积木拼插',18),
(123,'DIY玩具',18),
(124,'创意减压',18),
(125,'乐器',18);
INSERT INTO `base_category3`(`id`,`name`,`category2_id`) VALUES
(1,'电子书',1),
(2,'网络原创',1),
(3,'数字杂志',1),
(4,'多媒体图书',1),
(5,'音乐',2),
(6,'影视',2),
(7,'教育音像',2),
(8,'少儿',3),
(9,'商务投资',3),
(10,'英语学习与考试',3),
(11,'文学',3),
(12,'传记',3),
(13,'励志',3),
(14,'小说',4),
(15,'文学',4),
(16,'青春文学',4),
(17,'传记',4),
(18,'艺术',4),
(19,'少儿',5),
(20,'0-2岁',5),
(21,'3-6岁',5),
(22,'7-10岁',5),
(23,'11-14岁',5),
(24,'历史',6),
(25,'哲学',6),
(26,'国学',6),
(27,'政治/军事',6),
(28,'法律',6),
(29,'人文社科',6),
(30,'心理学',6),
(31,'文化',6),
(32,'社会科学',6),
(33,'经济',7),
(34,'金融与投资',7),
(35,'管理',7),
(36,'励志与成功',7),
(37,'生活',8),
(38,'健身与保健',8),
(39,'家庭与育儿',8),
(40,'旅游',8),
(41,'烹饪美食',8),
(42,'工业技术',9),
(43,'科普读物',9),
(44,'建筑',9),
(45,'医学',9),
(46,'科学与自然',9),
(47,'计算机与互联网',9),
(48,'电子通信',9),
(49,'中小学教辅',10),
(50,'教育与考试',10),
(51,'外语学习',10),
(52,'大中专教材',10),
(53,'字典词典',10),
(54,'艺术/设计/收藏',11),
(55,'经济管理',11),
(56,'文化/学术',11),
(57,'少儿',11),
(58,'工具书',12),
(59,'杂志/期刊',12),
(60,'套装书',12),
(61,'手机',13),
(62,'对讲机',13),
(63,'合约机',14),
(64,'选号中心',14),
(65,'装宽带',14),
(66,'办套餐',14),
(67,'移动电源',15),
(68,'电池/移动电源',15),
(69,'蓝牙耳机',15),
(70,'充电器/数据线',15),
(71,'苹果周边',15),
(72,'手机耳机',15),
(73,'手机贴膜',15),
(74,'手机存储卡',15),
(75,'充电器',15),
(76,'数据线',15),
(77,'手机保护套',15),
(78,'车载配件',15),
(79,'iPhone 配件',15),
(80,'手机电池',15),
(81,'创意配件',15),
(82,'便携/无线音响',15),
(83,'手机饰品',15),
(84,'拍照配件',15),
(85,'手机支架',15),
(86,'平板电视',16),
(87,'空调',16),
(88,'冰箱',16),
(89,'洗衣机',16),
(90,'家庭影院',16),
(91,'DVD/电视盒子',16),
(92,'迷你音响',16),
(93,'冷柜/冰吧',16),
(94,'家电配件',16),
(95,'功放',16),
(96,'回音壁/Soundbar',16),
(97,'Hi-Fi专区',16),
(98,'电视盒子',16),
(99,'酒柜',16),
(100,'燃气灶',17),
(101,'油烟机',17),
(102,'热水器',17),
(103,'消毒柜',17),
(104,'洗碗机',17),
(105,'料理机',18),
(106,'榨汁机',18),
(107,'电饭煲',18),
(108,'电压力锅',18),
(109,'豆浆机',18),
(110,'咖啡机',18),
(111,'微波炉',18),
(112,'电烤箱',18),
(113,'电磁炉',18),
(114,'面包机',18),
(115,'煮蛋器',18),
(116,'酸奶机',18),
(117,'电炖锅',18),
(118,'电水壶/热水瓶',18),
(119,'电饼铛',18),
(120,'多用途锅',18),
(121,'电烧烤炉',18),
(122,'果蔬解毒机',18),
(123,'其它厨房电器',18),
(124,'养生壶/煎药壶',18),
(125,'电热饭盒',18),
(126,'取暖电器',19),
(127,'净化器',19),
(128,'加湿器',19),
(129,'扫地机器人',19),
(130,'吸尘器',19),
(131,'挂烫机/熨斗',19),
(132,'插座',19),
(133,'电话机',19),
(134,'清洁机',19),
(135,'除湿机',19),
(136,'干衣机',19),
(137,'收录/音机',19),
(138,'电风扇',19),
(139,'冷风扇',19),
(140,'其它生活电器',19),
(141,'生活电器配件',19),
(142,'净水器',19),
(143,'饮水机',19),
(144,'剃须刀',20),
(145,'剃/脱毛器',20),
(146,'口腔护理',20),
(147,'电吹风',20),
(148,'美容器',20),
(149,'理发器',20),
(150,'卷/直发器',20),
(151,'按摩椅',20),
(152,'按摩器',20),
(153,'足浴盆',20),
(154,'血压计',20),
(155,'电子秤/厨房秤',20),
(156,'血糖仪',20),
(157,'体温计',20),
(158,'其它健康电器',20),
(159,'计步器/脂肪检测仪',20),
(160,'电动工具',21),
(161,'手动工具',21),
(162,'仪器仪表',21),
(163,'浴霸/排气扇',21),
(164,'灯具',21),
(165,'LED灯',21),
(166,'洁身器',21),
(167,'水槽',21),
(168,'龙头',21),
(169,'淋浴花洒',21),
(170,'厨卫五金',21),
(171,'家具五金',21),
(172,'门铃',21),
(173,'电气开关',21),
(174,'插座',21),
(175,'电工电料',21),
(176,'监控安防',21),
(177,'电线/线缆',21),
(178,'数码相机',22),
(179,'单电/微单相机',22),
(180,'单反相机',22),
(181,'摄像机',22),
(182,'拍立得',22),
(183,'运动相机',22),
(184,'镜头',22),
(185,'户外器材',22),
(186,'影棚器材',22),
(187,'冲印服务',22),
(188,'数码相框',22),
(189,'存储卡',23),
(190,'读卡器',23),
(191,'滤镜',23),
(192,'闪光灯/手柄',23),
(193,'相机包',23),
(194,'三脚架/云台',23),
(195,'相机清洁/贴膜',23),
(196,'机身附件',23),
(197,'镜头附件',23),
(198,'电池/充电器',23),
(199,'移动电源',23),
(200,'数码支架',23),
(201,'智能手环',24),
(202,'智能手表',24),
(203,'智能眼镜',24),
(204,'运动跟踪器',24),
(205,'健康监测',24),
(206,'智能配饰',24),
(207,'智能家居',24),
(208,'体感车',24),
(209,'其他配件',24),
(210,'智能机器人',24),
(211,'无人机',24),
(212,'MP3/MP4',25),
(213,'智能设备',25),
(214,'耳机/耳麦',25),
(215,'便携/无线音箱',25),
(216,'音箱/音响',25),
(217,'高清播放器',25),
(218,'收音机',25),
(219,'MP3/MP4配件',25),
(220,'麦克风',25),
(221,'专业音频',25),
(222,'苹果配件',25),
(223,'学生平板',26),
(224,'点读机/笔',26),
(225,'早教益智',26),
(226,'录音笔',26),
(227,'电纸书',26),
(228,'电子词典',26),
(229,'复读机',26),
(230,'延保服务',27),
(231,'杀毒软件',27),
(232,'积分商品',27),
(233,'桌布/罩件',28),
(234,'地毯地垫',28),
(235,'沙发垫套/椅垫',28),
(236,'床品套件',28),
(237,'被子',28),
(238,'枕芯',28),
(239,'床单被罩',28),
(240,'毯子',28),
(241,'床垫/床褥',28),
(242,'蚊帐',28),
(243,'抱枕靠垫',28),
(244,'毛巾浴巾',28),
(245,'电热毯',28),
(246,'窗帘/窗纱',28),
(247,'布艺软饰',28),
(248,'凉席',28),
(249,'台灯',29),
(250,'节能灯',29),
(251,'装饰灯',29),
(252,'落地灯',29),
(253,'应急灯/手电',29),
(254,'LED灯',29),
(255,'吸顶灯',29),
(256,'五金电器',29),
(257,'筒灯射灯',29),
(258,'吊灯',29),
(259,'氛围照明',29),
(260,'保暖防护',30),
(261,'收纳用品',30),
(262,'雨伞雨具',30),
(263,'浴室用品',30),
(264,'缝纫/针织用品',30),
(265,'洗晒/熨烫',30),
(266,'净化除味',30),
(267,'相框/照片墙',31),
(268,'装饰字画',31),
(269,'节庆饰品',31),
(270,'手工/十字绣',31),
(271,'装饰摆件',31),
(272,'帘艺隔断',31),
(273,'墙贴/装饰贴',31),
(274,'钟饰',31),
(275,'花瓶花艺',31),
(276,'香薰蜡烛',31),
(277,'创意家居',31),
(278,'宠物主粮',32),
(279,'宠物零食',32),
(280,'医疗保健',32),
(281,'家居日用',32),
(282,'宠物玩具',32),
(283,'出行装备',32),
(284,'洗护美容',32),
(285,'笔记本',33),
(286,'超极本',33),
(287,'游戏本',33),
(288,'平板电脑',33),
(289,'平板电脑配件',33),
(290,'台式机',33),
(291,'服务器/工作站',33),
(292,'笔记本配件',33),
(293,'一体机',33),
(294,'CPU',34),
(295,'主板',34),
(296,'显卡',34),
(297,'硬盘',34),
(298,'SSD固态硬盘',34),
(299,'内存',34),
(300,'机箱',34),
(301,'电源',34),
(302,'显示器',34),
(303,'刻录机/光驱',34),
(304,'散热器',34),
(305,'声卡/扩展卡',34),
(306,'装机配件',34),
(307,'组装电脑',34),
(308,'移动硬盘',35),
(309,'U盘',35),
(310,'鼠标',35),
(311,'键盘',35),
(312,'鼠标垫',35),
(313,'摄像头',35),
(314,'手写板',35),
(315,'硬盘盒',35),
(316,'插座',35),
(317,'线缆',35),
(318,'UPS电源',35),
(319,'电脑工具',35),
(320,'游戏设备',35),
(321,'电玩',35),
(322,'电脑清洁',35),
(323,'网络仪表仪器',35),
(324,'游戏机',36),
(325,'游戏耳机',36),
(326,'手柄/方向盘',36),
(327,'游戏软件',36),
(328,'游戏周边',36),
(329,'路由器',37),
(330,'网卡',37),
(331,'交换机',37),
(332,'网络存储',37),
(333,'4G/3G上网',37),
(334,'网络盒子',37),
(335,'网络配件',37),
(336,'投影机',38),
(337,'投影配件',38),
(338,'多功能一体机',38),
(339,'打印机',38),
(340,'传真设备',38),
(341,'验钞/点钞机',38),
(342,'扫描设备',38),
(343,'复合机',38),
(344,'碎纸机',38),
(345,'考勤机',38),
(346,'收款/POS机',38),
(347,'会议音频视频',38),
(348,'保险柜',38),
(349,'装订/封装机',38),
(350,'安防监控',38),
(351,'办公家具',38),
(352,'白板',38),
(353,'硒鼓/墨粉',39),
(354,'墨盒',39),
(355,'色带',39),
(356,'纸类',39),
(357,'办公文具',39),
(358,'学生文具',39),
(359,'财会用品',39),
(360,'文件管理',39),
(361,'本册/便签',39),
(362,'计算器',39),
(363,'笔类',39),
(364,'画具画材',39),
(365,'刻录碟片/附件',39),
(366,'上门安装',40),
(367,'延保服务',40),
(368,'维修保养',40),
(369,'电脑软件',40),
(370,'京东服务',40),
(371,'炒锅',41),
(372,'煎锅',41),
(373,'压力锅',41),
(374,'蒸锅',41),
(375,'汤锅',41),
(376,'奶锅',41),
(377,'锅具套装',41),
(378,'煲类',41),
(379,'水壶',41),
(380,'火锅',41),
(381,'菜刀',42),
(382,'剪刀',42),
(383,'刀具套装',42),
(384,'砧板',42),
(385,'瓜果刀/刨',42),
(386,'多功能刀',42),
(387,'保鲜盒',43),
(388,'烘焙/烧烤',43),
(389,'饭盒/提锅',43),
(390,'储物/置物架',43),
(391,'厨房DIY/小工具',43),
(392,'塑料杯',44),
(393,'运动水壶',44),
(394,'玻璃杯',44),
(395,'陶瓷/马克杯',44),
(396,'保温杯',44),
(397,'保温壶',44),
(398,'酒杯/酒具',44),
(399,'杯具套装',44),
(400,'餐具套装',45),
(401,'碗/碟/盘',45),
(402,'筷勺/刀叉',45),
(403,'一次性用品',45),
(404,'果盘/果篮',45),
(405,'自助餐炉',46),
(406,'酒店餐具',46),
(407,'酒店水具',46),
(408,'整套茶具',47),
(409,'茶杯',47),
(410,'茶壶',47),
(411,'茶盘茶托',47),
(412,'茶叶罐',47),
(413,'茶具配件',47),
(414,'茶宠摆件',47),
(415,'咖啡具',47),
(416,'其他',47),
(417,'纸品湿巾',48),
(418,'衣物清洁',48),
(419,'清洁工具',48),
(420,'驱虫用品',48),
(421,'家庭清洁',48),
(422,'皮具护理',48),
(423,'一次性用品',48),
(424,'洁面',49),
(425,'乳液面霜',49),
(426,'面膜',49),
(427,'剃须',49),
(428,'套装',49),
(429,'精华',49),
(430,'眼霜',49),
(431,'卸妆',49),
(432,'防晒',49),
(433,'防晒隔离',49),
(434,'T区护理',49),
(435,'眼部护理',49),
(436,'精华露',49),
(437,'爽肤水',49),
(438,'沐浴',50),
(439,'润肤',50),
(440,'颈部',50),
(441,'手足',50),
(442,'纤体塑形',50),
(443,'美胸',50),
(444,'套装',50),
(445,'精油',50),
(446,'洗发护发',50),
(447,'染发/造型',50),
(448,'香薰精油',50),
(449,'磨砂/浴盐',50),
(450,'手工/香皂',50),
(451,'洗发',50),
(452,'护发',50),
(453,'染发',50),
(454,'磨砂膏',50),
(455,'香皂',50),
(456,'牙膏/牙粉',51),
(457,'牙刷/牙线',51),
(458,'漱口水',51),
(459,'套装',51),
(460,'卫生巾',52),
(461,'卫生护垫',52),
(462,'私密护理',52),
(463,'脱毛膏',52),
(464,'其他',52),
(465,'洗发',53),
(466,'护发',53),
(467,'染发',53),
(468,'造型',53),
(469,'假发',53),
(470,'套装',53),
(471,'美发工具',53),
(472,'脸部护理',53),
(473,'香水',54),
(474,'底妆',54),
(475,'腮红',54),
(476,'眼影',54),
(477,'唇部',54),
(478,'美甲',54),
(479,'眼线',54),
(480,'美妆工具',54),
(481,'套装',54),
(482,'防晒隔离',54),
(483,'卸妆',54),
(484,'眉笔',54),
(485,'睫毛膏',54),
(486,'T恤',55),
(487,'衬衫',55),
(488,'针织衫',55),
(489,'雪纺衫',55),
(490,'卫衣',55),
(491,'马甲',55),
(492,'连衣裙',55),
(493,'半身裙',55),
(494,'牛仔裤',55),
(495,'休闲裤',55),
(496,'打底裤',55),
(497,'正装裤',55),
(498,'小西装',55),
(499,'短外套',55),
(500,'风衣',55),
(501,'毛呢大衣',55),
(502,'真皮皮衣',55),
(503,'棉服',55),
(504,'羽绒服',55),
(505,'大码女装',55),
(506,'中老年女装',55),
(507,'婚纱',55),
(508,'打底衫',55),
(509,'旗袍/唐装',55),
(510,'加绒裤',55),
(511,'吊带/背心',55),
(512,'羊绒衫',55),
(513,'短裤',55),
(514,'皮草',55),
(515,'礼服',55),
(516,'仿皮皮衣',55),
(517,'羊毛衫',55),
(518,'设计师/潮牌',55),
(519,'衬衫',56),
(520,'T恤',56),
(521,'POLO衫',56),
(522,'针织衫',56),
(523,'羊绒衫',56),
(524,'卫衣',56),
(525,'马甲/背心',56),
(526,'夹克',56),
(527,'风衣',56),
(528,'毛呢大衣',56),
(529,'仿皮皮衣',56),
(530,'西服',56),
(531,'棉服',56),
(532,'羽绒服',56),
(533,'牛仔裤',56),
(534,'休闲裤',56),
(535,'西裤',56),
(536,'西服套装',56),
(537,'大码男装',56),
(538,'中老年男装',56),
(539,'唐装/中山装',56),
(540,'工装',56),
(541,'真皮皮衣',56),
(542,'加绒裤',56),
(543,'卫裤/运动裤',56),
(544,'短裤',56),
(545,'设计师/潮牌',56),
(546,'羊毛衫',56),
(547,'文胸',57),
(548,'女式内裤',57),
(549,'男式内裤',57),
(550,'睡衣/家居服',57),
(551,'塑身美体',57),
(552,'泳衣',57),
(553,'吊带/背心',57),
(554,'抹胸',57),
(555,'连裤袜/丝袜',57),
(556,'美腿袜',57),
(557,'商务男袜',57),
(558,'保暖内衣',57),
(559,'情侣睡衣',57),
(560,'文胸套装',57),
(561,'少女文胸',57),
(562,'休闲棉袜',57),
(563,'大码内衣',57),
(564,'内衣配件',57),
(565,'打底裤袜',57),
(566,'打底衫',57),
(567,'秋衣秋裤',57),
(568,'情趣内衣',57),
(569,'服装洗护',58),
(570,'太阳镜',59),
(571,'光学镜架/镜片',59),
(572,'围巾/手套/帽子套装',59),
(573,'袖扣',59),
(574,'棒球帽',59),
(575,'毛线帽',59),
(576,'遮阳帽',59),
(577,'老花镜',59),
(578,'装饰眼镜',59),
(579,'防辐射眼镜',59),
(580,'游泳镜',59),
(581,'女士丝巾/围巾/披肩',59),
(582,'男士丝巾/围巾',59),
(583,'鸭舌帽',59),
(584,'贝雷帽',59),
(585,'礼帽',59),
(586,'真皮手套',59),
(587,'毛线手套',59),
(588,'防晒手套',59),
(589,'男士腰带/礼盒',59),
(590,'女士腰带/礼盒',59),
(591,'钥匙扣',59),
(592,'遮阳伞/雨伞',59),
(593,'口罩',59),
(594,'耳罩/耳包',59),
(595,'假领',59),
(596,'毛线/布面料',59),
(597,'领带/领结/领带夹',59),
(598,'男表',60),
(599,'瑞表',60),
(600,'女表',60),
(601,'国表',60),
(602,'日韩表',60),
(603,'欧美表',60),
(604,'德表',60),
(605,'儿童手表',60),
(606,'智能手表',60),
(607,'闹钟',60),
(608,'座钟挂钟',60),
(609,'钟表配件',60),
(610,'商务休闲鞋',61),
(611,'正装鞋',61),
(612,'休闲鞋',61),
(613,'凉鞋/沙滩鞋',61),
(614,'男靴',61),
(615,'功能鞋',61),
(616,'拖鞋/人字拖',61),
(617,'雨鞋/雨靴',61),
(618,'传统布鞋',61),
(619,'鞋配件',61),
(620,'帆布鞋',61),
(621,'增高鞋',61),
(622,'工装鞋',61),
(623,'定制鞋',61),
(624,'高跟鞋',62),
(625,'单鞋',62),
(626,'休闲鞋',62),
(627,'凉鞋',62),
(628,'女靴',62),
(629,'雪地靴',62),
(630,'拖鞋/人字拖',62),
(631,'踝靴',62),
(632,'筒靴',62),
(633,'帆布鞋',62),
(634,'雨鞋/雨靴',62),
(635,'妈妈鞋',62),
(636,'鞋配件',62),
(637,'特色鞋',62),
(638,'鱼嘴鞋',62),
(639,'布鞋/绣花鞋',62),
(640,'马丁靴',62),
(641,'坡跟鞋',62),
(642,'松糕鞋',62),
(643,'内增高',62),
(644,'防水台',62),
(645,'婴幼奶粉',63),
(646,'孕妈奶粉',63),
(647,'益生菌/初乳',64),
(648,'米粉/菜粉',64),
(649,'果泥/果汁',64),
(650,'DHA',64),
(651,'宝宝零食',64),
(652,'钙铁锌/维生素',64),
(653,'清火/开胃',64),
(654,'面条/粥',64),
(655,'婴儿尿裤',65),
(656,'拉拉裤',65),
(657,'婴儿湿巾',65),
(658,'成人尿裤',65),
(659,'奶瓶奶嘴',66),
(660,'吸奶器',66),
(661,'暖奶消毒',66),
(662,'儿童餐具',66),
(663,'水壶/水杯',66),
(664,'牙胶安抚',66),
(665,'围兜/防溅衣',66),
(666,'辅食料理机',66),
(667,'食物存储',66),
(668,'宝宝护肤',67),
(669,'洗发沐浴',67),
(670,'奶瓶清洗',67),
(671,'驱蚊防晒',67),
(672,'理发器',67),
(673,'洗澡用具',67),
(674,'婴儿口腔清洁',67),
(675,'洗衣液/皂',67),
(676,'日常护理',67),
(677,'座便器',67),
(678,'婴儿推车',68),
(679,'餐椅摇椅',68),
(680,'婴儿床',68),
(681,'学步车',68),
(682,'三轮车',68),
(683,'自行车',68),
(684,'电动车',68),
(685,'扭扭车',68),
(686,'滑板车',68),
(687,'婴儿床垫',68),
(688,'婴儿外出服',69),
(689,'婴儿内衣',69),
(690,'婴儿礼盒',69),
(691,'婴儿鞋帽袜',69),
(692,'安全防护',69),
(693,'家居床品',69),
(694,'睡袋/抱被',69),
(695,'爬行垫',69),
(696,'妈咪包/背婴带',70),
(697,'产后塑身',70),
(698,'文胸/内裤',70),
(699,'防辐射服',70),
(700,'孕妈装',70),
(701,'孕期营养',70),
(702,'孕妇护肤',70),
(703,'待产护理',70),
(704,'月子装',70),
(705,'防溢乳垫',70),
(706,'套装',71),
(707,'上衣',71),
(708,'裤子',71),
(709,'裙子',71),
(710,'内衣/家居服',71),
(711,'羽绒服/棉服',71),
(712,'亲子装',71),
(713,'儿童配饰',71),
(714,'礼服/演出服',71),
(715,'运动鞋',71),
(716,'皮鞋/帆布鞋',71),
(717,'靴子',71),
(718,'凉鞋',71),
(719,'功能鞋',71),
(720,'户外/运动服',71),
(721,'提篮式',72),
(722,'安全座椅',72),
(723,'增高垫',72),
(724,'钱包',73),
(725,'手拿包',73),
(726,'单肩包',73),
(727,'双肩包',73),
(728,'手提包',73),
(729,'斜挎包',73),
(730,'钥匙包',73),
(731,'卡包/零钱包',73),
(732,'男士钱包',74),
(733,'男士手包',74),
(734,'卡包名片夹',74),
(735,'商务公文包',74),
(736,'双肩包',74),
(737,'单肩/斜挎包',74),
(738,'钥匙包',74),
(739,'电脑包',75),
(740,'拉杆箱',75),
(741,'旅行包',75),
(742,'旅行配件',75),
(743,'休闲运动包',75),
(744,'拉杆包',75),
(745,'登山包',75),
(746,'妈咪包',75),
(747,'书包',75),
(748,'相机包',75),
(749,'腰包/胸包',75),
(750,'火机烟具',76),
(751,'礼品文具',76),
(752,'军刀军具',76),
(753,'收藏品',76),
(754,'工艺礼品',76),
(755,'创意礼品',76),
(756,'礼盒礼券',76),
(757,'鲜花绿植',76),
(758,'婚庆节庆',76),
(759,'京东卡',76),
(760,'美妆礼品',76),
(761,'礼品定制',76),
(762,'京东福卡',76),
(763,'古董文玩',76),
(764,'箱包',77),
(765,'钱包',77),
(766,'服饰',77),
(767,'腰带',77),
(768,'太阳镜/眼镜框',77),
(769,'配件',77),
(770,'鞋靴',77),
(771,'饰品',77),
(772,'名品腕表',77),
(773,'高档化妆品',77),
(774,'婚嫁首饰',78),
(775,'婚纱摄影',78),
(776,'婚纱礼服',78),
(777,'婚庆服务',78),
(778,'婚庆礼品/用品',78),
(779,'婚宴',78),
(780,'饼干蛋糕',79),
(781,'糖果/巧克力',79),
(782,'休闲零食',79),
(783,'冲调饮品',79),
(784,'粮油调味',79),
(785,'牛奶',79),
(786,'其他特产',80),
(787,'新疆',80),
(788,'北京',80),
(789,'山西',80),
(790,'内蒙古',80),
(791,'福建',80),
(792,'湖南',80),
(793,'四川',80),
(794,'云南',80),
(795,'东北',80),
(796,'休闲零食',81),
(797,'坚果炒货',81),
(798,'肉干肉脯',81),
(799,'蜜饯果干',81),
(800,'糖果/巧克力',81),
(801,'饼干蛋糕',81),
(802,'无糖食品',81),
(803,'米面杂粮',82),
(804,'食用油',82),
(805,'调味品',82),
(806,'南北干货',82),
(807,'方便食品',82),
(808,'有机食品',82),
(809,'饮用水',83),
(810,'饮料',83),
(811,'牛奶乳品',83),
(812,'咖啡/奶茶',83),
(813,'冲饮谷物',83),
(814,'蜂蜜/柚子茶',83),
(815,'成人奶粉',83),
(816,'月饼',84),
(817,'大闸蟹',84),
(818,'粽子',84),
(819,'卡券',84),
(820,'铁观音',85),
(821,'普洱',85),
(822,'龙井',85),
(823,'绿茶',85),
(824,'红茶',85),
(825,'乌龙茶',85),
(826,'花草茶',85),
(827,'花果茶',85),
(828,'养生茶',85),
(829,'黑茶',85),
(830,'白茶',85),
(831,'其它茶',85),
(832,'项链',86),
(833,'手链/脚链',86),
(834,'戒指',86),
(835,'耳饰',86),
(836,'毛衣链',86),
(837,'发饰/发卡',86),
(838,'胸针',86),
(839,'饰品配件',86),
(840,'婚庆饰品',86),
(841,'黄金吊坠',87),
(842,'黄金项链',87),
(843,'黄金转运珠',87),
(844,'黄金手镯/手链/脚链',87),
(845,'黄金耳饰',87),
(846,'黄金戒指',87),
(847,'K金吊坠',88),
(848,'K金项链',88),
(849,'K金手镯/手链/脚链',88),
(850,'K金戒指',88),
(851,'K金耳饰',88),
(852,'投资金',89),
(853,'投资银',89),
(854,'投资收藏',89),
(855,'银吊坠/项链',90),
(856,'银手镯/手链/脚链',90),
(857,'银戒指',90),
(858,'银耳饰',90),
(859,'足银手镯',90),
(860,'宝宝银饰',90),
(861,'裸钻',91),
(862,'钻戒',91),
(863,'钻石项链/吊坠',91),
(864,'钻石耳饰',91),
(865,'钻石手镯/手链',91),
(866,'项链/吊坠',92),
(867,'手镯/手串',92),
(868,'戒指',92),
(869,'耳饰',92),
(870,'挂件/摆件/把件',92),
(871,'玉石孤品',92),
(872,'项链/吊坠',93),
(873,'耳饰',93),
(874,'手镯/手链/脚链',93),
(875,'戒指',93),
(876,'头饰/胸针',93),
(877,'摆件/挂件',93),
(878,'琥珀/蜜蜡',94),
(879,'碧玺',94),
(880,'红宝石/蓝宝石',94),
(881,'坦桑石',94),
(882,'珊瑚',94),
(883,'祖母绿',94),
(884,'葡萄石',94),
(885,'其他天然宝石',94),
(886,'项链/吊坠',94),
(887,'耳饰',94),
(888,'手镯/手链',94),
(889,'戒指',94),
(890,'铂金项链/吊坠',95),
(891,'铂金手镯/手链/脚链',95),
(892,'铂金戒指',95),
(893,'铂金耳饰',95),
(894,'小叶紫檀',96),
(895,'黄花梨',96),
(896,'沉香木',96),
(897,'金丝楠',96),
(898,'菩提',96),
(899,'其他',96),
(900,'橄榄核/核桃',96),
(901,'檀香',96),
(902,'珍珠项链',97),
(903,'珍珠吊坠',97),
(904,'珍珠耳饰',97),
(905,'珍珠手链',97),
(906,'珍珠戒指',97),
(907,'珍珠胸针',97),
(908,'机油',98),
(909,'正时皮带',98),
(910,'添加剂',98),
(911,'汽车喇叭',98),
(912,'防冻液',98),
(913,'汽车玻璃',98),
(914,'滤清器',98),
(915,'火花塞',98),
(916,'减震器',98),
(917,'柴机油/辅助油',98),
(918,'雨刷',98),
(919,'车灯',98),
(920,'后视镜',98),
(921,'轮胎',98),
(922,'轮毂',98),
(923,'刹车片/盘',98),
(924,'维修配件',98),
(925,'蓄电池',98),
(926,'底盘装甲/护板',98),
(927,'贴膜',98),
(928,'汽修工具',98),
(929,'改装配件',98),
(930,'导航仪',99),
(931,'安全预警仪',99),
(932,'行车记录仪',99),
(933,'倒车雷达',99),
(934,'蓝牙设备',99),
(935,'车载影音',99),
(936,'净化器',99),
(937,'电源',99),
(938,'智能驾驶',99),
(939,'车载电台',99),
(940,'车载电器配件',99),
(941,'吸尘器',99),
(942,'智能车机',99),
(943,'冰箱',99),
(944,'汽车音响',99),
(945,'车载生活电器',99),
(946,'车蜡',100),
(947,'补漆笔',100),
(948,'玻璃水',100),
(949,'清洁剂',100),
(950,'洗车工具',100),
(951,'镀晶镀膜',100),
(952,'打蜡机',100),
(953,'洗车配件',100),
(954,'洗车机',100),
(955,'洗车水枪',100),
(956,'毛巾掸子',100),
(957,'脚垫',101),
(958,'座垫',101),
(959,'座套',101),
(960,'后备箱垫',101),
(961,'头枕腰靠',101),
(962,'方向盘套',101),
(963,'香水',101),
(964,'空气净化',101),
(965,'挂件摆件',101),
(966,'功能小件',101),
(967,'车身装饰件',101),
(968,'车衣',101),
(969,'安全座椅',102),
(970,'胎压监测',102),
(971,'防盗设备',102),
(972,'应急救援',102),
(973,'保温箱',102),
(974,'地锁',102),
(975,'摩托车',102),
(976,'充气泵',102),
(977,'储物箱',102),
(978,'自驾野营',102),
(979,'摩托车装备',102),
(980,'清洗美容',103),
(981,'功能升级',103),
(982,'保养维修',103),
(983,'油卡充值',103),
(984,'车险',103),
(985,'加油卡',103),
(986,'ETC',103),
(987,'驾驶培训',103),
(988,'赛事服装',104),
(989,'赛事用品',104),
(990,'制动系统',104),
(991,'悬挂系统',104),
(992,'进气系统',104),
(993,'排气系统',104),
(994,'电子管理',104),
(995,'车身强化',104),
(996,'赛事座椅',104),
(997,'跑步鞋',105),
(998,'休闲鞋',105),
(999,'篮球鞋',105),
(1000,'板鞋',105),
(1001,'帆布鞋',105),
(1002,'足球鞋',105),
(1003,'乒羽网鞋',105),
(1004,'专项运动鞋',105),
(1005,'训练鞋',105),
(1006,'拖鞋',105),
(1007,'运动包',105),
(1008,'羽绒服',106),
(1009,'棉服',106),
(1010,'运动裤',106),
(1011,'夹克/风衣',106),
(1012,'卫衣/套头衫',106),
(1013,'T恤',106),
(1014,'套装',106),
(1015,'乒羽网服',106),
(1016,'健身服',106),
(1017,'运动背心',106),
(1018,'毛衫/线衫',106),
(1019,'运动配饰',106),
(1020,'折叠车',107),
(1021,'山地车/公路车',107),
(1022,'电动车',107),
(1023,'其他整车',107),
(1024,'骑行服',107),
(1025,'骑行装备',107),
(1026,'平衡车',107),
(1027,'鱼竿鱼线',108),
(1028,'浮漂鱼饵',108),
(1029,'钓鱼桌椅',108),
(1030,'钓鱼配件',108),
(1031,'钓箱鱼包',108),
(1032,'其它',108),
(1033,'泳镜',109),
(1034,'泳帽',109),
(1035,'游泳包防水包',109),
(1036,'女士泳衣',109),
(1037,'男士泳衣',109),
(1038,'比基尼',109),
(1039,'其它',109),
(1040,'冲锋衣裤',110),
(1041,'速干衣裤',110),
(1042,'滑雪服',110),
(1043,'羽绒服/棉服',110),
(1044,'休闲衣裤',110),
(1045,'抓绒衣裤',110),
(1046,'软壳衣裤',110),
(1047,'T恤',110),
(1048,'户外风衣',110),
(1049,'功能内衣',110),
(1050,'军迷服饰',110),
(1051,'登山鞋',110),
(1052,'雪地靴',110),
(1053,'徒步鞋',110),
(1054,'越野跑鞋',110),
(1055,'休闲鞋',110),
(1056,'工装鞋',110),
(1057,'溯溪鞋',110),
(1058,'沙滩/凉拖',110),
(1059,'户外袜',110),
(1060,'帐篷/垫子',111),
(1061,'睡袋/吊床',111),
(1062,'登山攀岩',111),
(1063,'户外配饰',111),
(1064,'背包',111),
(1065,'户外照明',111),
(1066,'户外仪表',111),
(1067,'户外工具',111),
(1068,'望远镜',111),
(1069,'旅游用品',111),
(1070,'便携桌椅床',111),
(1071,'野餐烧烤',111),
(1072,'军迷用品',111),
(1073,'救援装备',111),
(1074,'滑雪装备',111),
(1075,'极限户外',111),
(1076,'冲浪潜水',111),
(1077,'综合训练器',112),
(1078,'其他大型器械',112),
(1079,'哑铃',112),
(1080,'仰卧板/收腹机',112),
(1081,'其他中小型器材',112),
(1082,'瑜伽舞蹈',112),
(1083,'甩脂机',112),
(1084,'踏步机',112),
(1085,'武术搏击',112),
(1086,'健身车/动感单车',112),
(1087,'跑步机',112),
(1088,'运动护具',112),
(1089,'羽毛球',113),
(1090,'乒乓球',113),
(1091,'篮球',113),
(1092,'足球',113),
(1093,'网球',113),
(1094,'排球',113),
(1095,'高尔夫',113),
(1096,'台球',113),
(1097,'棋牌麻将',113),
(1098,'轮滑滑板',113),
(1099,'其他',113),
(1100,'0-6个月',114),
(1101,'6-12个月',114),
(1102,'1-3岁',114),
(1103,'3-6岁',114),
(1104,'6-14岁',114),
(1105,'14岁以上',114),
(1106,'遥控车',115),
(1107,'遥控飞机',115),
(1108,'遥控船',115),
(1109,'机器人',115),
(1110,'轨道/助力',115),
(1111,'毛绒/布艺',116),
(1112,'靠垫/抱枕',116),
(1113,'芭比娃娃',117),
(1114,'卡通娃娃',117),
(1115,'智能娃娃',117),
(1116,'仿真模型',118),
(1117,'拼插模型',118),
(1118,'收藏爱好',118),
(1119,'炫舞毯',119),
(1120,'爬行垫/毯',119),
(1121,'户外玩具',119),
(1122,'戏水玩具',119),
(1123,'电影周边',120),
(1124,'卡通周边',120),
(1125,'网游周边',120),
(1126,'摇铃/床铃',121),
(1127,'健身架',121),
(1128,'早教启智',121),
(1129,'拖拉玩具',121),
(1130,'积木',122),
(1131,'拼图',122),
(1132,'磁力棒',122),
(1133,'立体拼插',122),
(1134,'手工彩泥',123),
(1135,'绘画工具',123),
(1136,'情景玩具',123),
(1137,'减压玩具',124),
(1138,'创意玩具',124),
(1139,'钢琴',125),
(1140,'电子琴/电钢琴',125),
(1141,'吉他/尤克里里',125),
(1142,'打击乐器',125),
(1143,'西洋管弦',125),
(1144,'民族管弦乐器',125),
(1145,'乐器配件',125),
(1146,'电脑音乐',125),
(1147,'工艺礼品乐器',125),
(1148,'口琴/口风琴/竖笛',125),
(1149,'手风琴',125); | 16.691188 | 64 | 0.514186 |
3e6b2ce745161139aee46eed768f82ccb5951478 | 3,806 | h | C | SYTimeAndStringPublic/SYStringPublic.h | fengxueSY/SYTSPublic | 9d81d6457f48cc45b48f32b5028fea0bdf1c6a1e | [
"MIT"
] | null | null | null | SYTimeAndStringPublic/SYStringPublic.h | fengxueSY/SYTSPublic | 9d81d6457f48cc45b48f32b5028fea0bdf1c6a1e | [
"MIT"
] | null | null | null | SYTimeAndStringPublic/SYStringPublic.h | fengxueSY/SYTSPublic | 9d81d6457f48cc45b48f32b5028fea0bdf1c6a1e | [
"MIT"
] | 1 | 2020-09-10T01:46:45.000Z | 2020-09-10T01:46:45.000Z | //
// SYStringPublic.h
// SYTSPublic
//
// Created by 666gps on 2017/8/22.
// Copyright © 2017年 666gps. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface SYStringPublic : NSObject
/**
* 判断字符串为空
*
* @param str 字符串
*
* @return YES为空
*/
+ (BOOL)isBlankString:(NSString *)str;
/**
* 判断字符串是否为整形
*
* @param string 要判断的字符串
*
* @return 是否为整形
*/
+(BOOL)isPureInt:(NSString *)string;
/**
* 判断字符串是否为浮点型
*
* @param string 要判断的字符串
*
* @return 是否为浮点型
*/
+(BOOL)isPureFloat:(NSString *)string;
/**
* 根据文字的大小和确定高度 返回宽度
*
* @param content 字符串的内容
* @param font 字符串的font
* @param size 确定的高度,无限的宽度
*
* @return 字符串的宽度
*/
+(float)handelWideContent:(NSString *)content AndFontsize:(NSUInteger)font AndMaxsize:(CGSize )size;
/**
* 根据文字的大小和确定的宽度 返回高度
*
* @param content 字符串的内容
* @param font 字符串的font
* @param size 确定的宽度,无限的高度
*
* @return 字符串的高度
*/
+(float)handelHighContent:(NSString *)content AndFontsize:(UIFont *)font AndMaxsize:(CGSize )size;
/**
* 根据完整的电话号码获取缩略的电话号码
*
* @param mobile 完整的电话号码 13808823215
*
* @return 缩略的电话号码 138****3215
*/
+ (NSString *)getThumbnailMobileWithCompleteMobile:(NSString *)mobile;
/**
* 十六进制字符串转十六进制字节流
*
* @param hex 字符串
*
* @return 字节流
*/
+ (NSData *)hexStringToHexData:(NSString *)hex;
/**
* 十六进制字节流转十六进制字符串
*
* @param hex 字节流
*
* @return 字符串
*/
+ (NSString *)hexDataToHexString:(NSData *)hex;
/**
* 十六进制GBK字符串转普通字符串
*
* @param string GBK字符串
*
* @return 普通字符串
*/
+ (NSString *)hexGBKStringToNormalString:(NSString *)string;
/**
* 截取字符串中间部分
*
* @param string 字符串
* @param head 头部位置
* @param tail 尾部位置
*
* @return 结果字符串
*/
+ (NSString *)interceptMiddleString:(NSString *)string head:(NSUInteger)head andTail:(NSUInteger)tail;
/**
* 十六进制ASCII字符串转普通字符串
*
* @param string ASCII字符串
*
* @return 普通字符串
*/
+ (NSString *)hexASCIIStringToNormalString:(NSString *)string;
/**
* 十六进制字符串转十进制字符串
*
* @param string 十六进制字符串
*
* @return 十进制字符串
*/
+ (NSString *)hexStringToDecimalString:(NSString *)string;
/**
* 对两个相等长度的字符串进行异或运算
*
* @param pan 任意字符串
* @param pinv 任意字符串
*
* @return 结果字符串
*/
+ (NSString *)pinxCreator:(NSString *)pan withPinv:(NSString *)pinv;
/**
* 二进制 -> 十进制
*
* @param binary 二进制
*
* @return 十进制
*/
+ (NSString *)binaryToDecimal:(NSString *)binary;
/**
* 二进制 -> 八进制
*
* @param binary 二进制
*
* @return 八进制
*/
+ (NSString *)binaryToQ:(NSString *)binary;
/**
* 二进制 -> 十六进制
*
* @param binary 二进制
*
* @return 十六进制
*/
+ (NSString *)binaryToHex:(NSString *)binary;
/**
* 八进制 -> 二进制
*
* @param q 八进制
*
* @return 二进制
*/
+ (NSString *)qToBinary:(NSString *)q;
/**
* 八进制 -> 十进制
*
* @param q 八进制
*
* @return 十进制
*/
+ (NSString *)qToDecimal:(NSString *)q;
/**
* 八进制 -> 十六进制
*
* @param q 八进制
*
* @return 十六进制
*/
+ (NSString *)qToHex:(NSString *)q;
/**
* 十进制 -> 二进制
*
* @param tmpid 十进制
*
* @return 二进制
*/
+ (NSString *)decimalToBinary:(NSUInteger)tmpid;
/**
* 十进制 -> 八进制
*
* @param tmpid 十进制
*
* @return 八进制
*/
+ (NSString *)decimalToQ:(NSUInteger)tmpid;
/**
* 十进制 -> 十六进制
*
* @param tmpid 十进制
*
* @return 十六进制
*/
+ (NSString *)decimalToHex:(NSUInteger)tmpid;
/**
* 十六进制 -> 二进制
*
* @param hex 十六进制
*
* @return 二进制
*/
+ (NSString *)hexToBinary:(NSString *)hex;
/**
* 十六进制 -> 八进制
*
* @param hex 十六进制
*
* @return 八进制
*/
+ (NSString *)hexToQ:(NSString *)hex;
/**
* 十六进制 -> 十进制
*
* @param hex 十六进制
*
* @return 十进制
*/
+ (NSString *)hexToDecimal:(NSString *)hex;
/**
十六进制转rgb
@param color 十六进制
@return rgb
*/
+ (UIColor *) colorWithHexString: (NSString *)color Alpha:(CGFloat)alpha;
@end
| 16.547826 | 102 | 0.594325 |
abeb52b845ab5892134ad3b92ccab6cd2a4b938b | 133 | sql | SQL | SQL/16 th lesson/t3.sql | rjevdkimovs/progmeistars | d875c468e55e2b6a3fe9358dbdac435b957578a0 | [
"Apache-2.0"
] | null | null | null | SQL/16 th lesson/t3.sql | rjevdkimovs/progmeistars | d875c468e55e2b6a3fe9358dbdac435b957578a0 | [
"Apache-2.0"
] | null | null | null | SQL/16 th lesson/t3.sql | rjevdkimovs/progmeistars | d875c468e55e2b6a3fe9358dbdac435b957578a0 | [
"Apache-2.0"
] | null | null | null |
CREATE VIEW session
AS SELECT grade, abc
FROM lessons
WHERE EDATE != NULL;
COUNT students IN lessons
SELECT *
FROM lessons
| 14.777778 | 26 | 0.729323 |
572ed730e7711383640593c4cd253e279e0c42a6 | 962 | asm | Assembly | MicroProcessor Lab Programs/time.asm | vallabhiaf/4thSemIse | 55ed3c6fc29e4d2dd2c1fb71e31f5283ad47b9bf | [
"Apache-2.0"
] | null | null | null | MicroProcessor Lab Programs/time.asm | vallabhiaf/4thSemIse | 55ed3c6fc29e4d2dd2c1fb71e31f5283ad47b9bf | [
"Apache-2.0"
] | null | null | null | MicroProcessor Lab Programs/time.asm | vallabhiaf/4thSemIse | 55ed3c6fc29e4d2dd2c1fb71e31f5283ad47b9bf | [
"Apache-2.0"
] | null | null | null | assume cs:code
code segment
start:
mov ah,2ch ;function 2C under INT 21h returns time in ch(hrs), cl(mins)
int 21h ; in hex ( seconds and milliseconds omitted)
mov al,ch
call hex_bcd ; first convert the hrs into 24 hrs formatted bcd
call disp ; then, display it
mov dl,':'
mov ah,2
int 21h ; to display “ : “ in between HH and MM
mov al,cl ; same thing with minutes
call hex_bcd
call disp
mov ah,4ch
int 21h
disp proc ; procedure to display 2 bcd digits
push cx
mov ah,00h
mov cx,4
shl ax,cl
shr al,cl
add ax,3030h
push ax
mov dl,ah
mov ah,2
int 21h
pop ax
mov ah,2
mov dl,al
int 21h
pop cx
ret
disp endp
hex_bcd proc ; procedure to convert hex to bcd
push cx
mov cl,al
mov ch,0
mov al,0
next:
add al,1
daa
loop next
pop cx
ret
hex_bcd endp
code ends
end start
| 18.150943 | 77 | 0.586279 |
86932d4a16409f1d48672ea1d72454c6908e7029 | 6,277 | rs | Rust | src/renderer/shaders.rs | togglebyte/nightmaregl | a4ae82866ad55b1852ea60e6d53d665060d16ac8 | [
"MIT"
] | 7 | 2021-03-04T14:50:58.000Z | 2021-12-29T16:04:19.000Z | src/renderer/shaders.rs | togglebyte/nightmaregl | a4ae82866ad55b1852ea60e6d53d665060d16ac8 | [
"MIT"
] | null | null | null | src/renderer/shaders.rs | togglebyte/nightmaregl | a4ae82866ad55b1852ea60e6d53d665060d16ac8 | [
"MIT"
] | 5 | 2021-04-02T09:26:49.000Z | 2021-08-01T17:45:21.000Z | use std::ffi::CStr;
use log::info;
use gl33::global_loader::*;
use gl33::*;
use nalgebra::Matrix4;
use crate::Result;
use crate::errors::NightmareError;
// -----------------------------------------------------------------------------
// - Default shaders -
// -----------------------------------------------------------------------------
const DEFAULT_VERTEX: &[u8] = include_bytes!("../default.vert");
const DEFAULT_FRAGMENT: &[u8] = include_bytes!("../default.frag");
const DEFAULT_FONT: &[u8] = include_bytes!("../font.frag");
// -----------------------------------------------------------------------------
// - Shader types -
// -----------------------------------------------------------------------------
pub struct VertexShader;
pub struct FragmentShader;
// -----------------------------------------------------------------------------
// - Shader -
// -----------------------------------------------------------------------------
/// Either a vertex shader or a fragment shader.
pub struct Shader<T> {
pub(crate) id: u32,
_type: T,
}
impl Shader<VertexShader> {
/// Create a new vertex shader
pub fn new_vertex(src: impl AsRef<[u8]>) -> Result<Shader<VertexShader>> {
let id = glCreateShader(GL_VERTEX_SHADER);
info!("created new vertex shader: {}", id);
unsafe { load_shader(id, src.as_ref())? };
Ok(Self {
id,
_type: VertexShader,
})
}
pub fn default_vertex() -> Result<Shader<VertexShader>> {
Self::new_vertex(&DEFAULT_VERTEX)
}
}
impl Shader<FragmentShader> {
/// Create a new fragment shader
pub fn new_fragment(src: impl AsRef<[u8]>) -> Result<Shader<FragmentShader>> {
let id = glCreateShader(GL_FRAGMENT_SHADER);
info!("created new fragment shader: {}", id);
unsafe { load_shader(id, src.as_ref())? };
Ok(Self {
id,
_type: FragmentShader,
})
}
pub fn default_fragment() -> Result<Shader<FragmentShader>> {
Self::new_fragment(&DEFAULT_FRAGMENT)
}
pub fn default_font() -> Result<Shader<FragmentShader>> {
Self::new_fragment(&DEFAULT_FONT)
}
}
// -----------------------------------------------------------------------------
// - Shader program -
// -----------------------------------------------------------------------------
#[derive(Debug)]
pub struct ShaderProgram(pub(crate) u32);
impl ShaderProgram {
pub(crate) fn attach_shader(&self, shader_id: u32) {
glAttachShader(self.0, shader_id);
}
pub(crate) fn link(&self) -> Result<()> {
glLinkProgram(self.0);
let mut shader_compiled = 0;
unsafe { glGetProgramiv(self.0, GL_LINK_STATUS, &mut shader_compiled) };
// Failed to compile the shaders
if shader_compiled == GL_FALSE.0 as i32 {
let mut error_len = 1024;
unsafe {
glGetProgramiv(self.0, GL_INFO_LOG_LENGTH, &mut error_len);
let mut log: Vec<u8> = Vec::with_capacity(error_len as usize);
glGetProgramInfoLog(self.0, error_len, &mut error_len, log.as_mut_ptr().cast());
log.set_len(error_len as usize);
let error_message = String::from_utf8(log)?;
return Err(NightmareError::ShaderProgram(error_message));
}
}
Ok(())
}
// This should be called after `link()`.
pub(crate) fn cleanup(&self, shader_id: u32) {
glDeleteShader(shader_id);
}
pub(crate) fn enable(&self) {
glUseProgram(self.0);
}
fn get_uniform_location(&self, name: &CStr) -> Result<i32> {
let uniform_loc = unsafe { glGetUniformLocation(self.0, name.as_ptr().cast()) };
if uniform_loc == -1 {
return Err(NightmareError::ShaderProgram(format!(
"Invalid uniform name or location: {:?}",
name
)));
}
Ok(uniform_loc)
}
pub(crate) fn set_uniform_matrix(&self, matrix: Matrix4<f32>, name: &CStr) -> Result<()> {
let uniform_loc = self.get_uniform_location(name)?;
let transpose = false as u8;
unsafe { glUniformMatrix4fv(uniform_loc, 1, transpose, matrix.as_ptr()) };
Ok(())
}
pub(crate) fn set_uniform_float(&self, f: f32, name: &CStr) -> Result<()> {
let uniform_loc = self.get_uniform_location(name)?;
unsafe { glUniform1f(uniform_loc, f) };
Ok(())
}
pub fn default() -> Result<Self> {
let vertex_shader = Shader::default_vertex()?;
let fragment_shader = Shader::default_fragment()?;
Self::new(vertex_shader, fragment_shader)
}
pub fn default_font() -> Result<Self> {
let vertex_shader = Shader::default_vertex()?;
let fragment_shader = Shader::default_font()?;
Self::new(vertex_shader, fragment_shader)
}
pub fn new(vertex: Shader<VertexShader>, fragment: Shader<FragmentShader>) -> Result<Self> {
let shader_program = ShaderProgram(glCreateProgram());
info!("shader program {} created", shader_program.0);
shader_program.attach_shader(vertex.id);
shader_program.attach_shader(fragment.id);
shader_program.link()?;
shader_program.cleanup(vertex.id);
shader_program.cleanup(fragment.id);
Ok(shader_program)
}
}
// Load a shader.
// The shader will be compiled by the renderer.
unsafe fn load_shader(shader: u32, src: &[u8]) -> Result<()> {
assert_ne!(shader, 0);
glShaderSource(shader, 1, &src.as_ptr().cast(), &(src.len() as i32));
glCompileShader(shader);
let mut shader_compiled = 0;
glGetShaderiv(shader, GL_COMPILE_STATUS, &mut shader_compiled);
// Error compiling the shader
if shader_compiled == GL_FALSE.0 as i32 {
let mut error_len = 0;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &mut error_len);
let mut log: Vec<u8> = Vec::with_capacity(error_len as usize);
glGetShaderInfoLog(shader, error_len, &mut error_len, log.as_mut_ptr());
log.set_len(error_len as usize);
let error_message = String::from_utf8(log)?;
return Err(NightmareError::Shader(error_message));
}
Ok(())
}
| 31.385 | 96 | 0.549148 |
1fe6b9a88c566cd27a91b0b6b78d5a6979a79bf9 | 240 | css | CSS | hot-deploy/greenfire/webapp/greenfire/styles/chapter.css | ptayadeSPELTechnologies/ofbiz | 21259bb9e7243aa621fdd61c86cfe338f81a747b | [
"Apache-2.0"
] | null | null | null | hot-deploy/greenfire/webapp/greenfire/styles/chapter.css | ptayadeSPELTechnologies/ofbiz | 21259bb9e7243aa621fdd61c86cfe338f81a747b | [
"Apache-2.0"
] | null | null | null | hot-deploy/greenfire/webapp/greenfire/styles/chapter.css | ptayadeSPELTechnologies/ofbiz | 21259bb9e7243aa621fdd61c86cfe338f81a747b | [
"Apache-2.0"
] | null | null | null | @CHARSET "UTF-8";
.code{
background-color: #f2f2f2;
padding: 5px 5px 5px 5px;
border-style: solid;
border-width: 1px 1px 1px 1px;
width:200px;
}
ul{
list-style: none; /* Remove list bullets */
padding: 0;
margin: 0;
} | 16 | 47 | 0.629167 |
74588dc15897ec46286bbdc28ddaf510839254de | 3,067 | c | C | src/io_handler.c | RasimSadikoglu/Custom-Float-Generator | 400d05e0a87ae8d407b6d58f1b4f0d02a5539761 | [
"MIT"
] | null | null | null | src/io_handler.c | RasimSadikoglu/Custom-Float-Generator | 400d05e0a87ae8d407b6d58f1b4f0d02a5539761 | [
"MIT"
] | null | null | null | src/io_handler.c | RasimSadikoglu/Custom-Float-Generator | 400d05e0a87ae8d407b6d58f1b4f0d02a5539761 | [
"MIT"
] | null | null | null | #include "../include/io_handler.h"
#include <stdio.h>
#include <string.h>
#define STRING_SIZE 100
#define input(TEXT, VAR) do { printf(TEXT); scanf("%zu", VAR); getc(stdin); } while(0)
enum bool {false, true};
size_t sizes[] = {64, 11, 52};
int force_float = true;
void convert_file(char *input_path, char *output_path) {
FILE *input = fopen(input_path, "r");
FILE *output = output_path == NULL ? stdout : fopen(output_path, "a");
if (input == NULL) {
perror("File does not exist!");
exit(EXIT_FAILURE);
}
char buffer[STRING_SIZE];
while (fgets(buffer, STRING_SIZE, input) != NULL) {
if (strchr(buffer, '.') == NULL && !force_float) {
i64 number = strtoll(buffer, NULL, 10);
fprintf(output, "%-15lld -> 0x%lX\n", number, decimal_to_hex(number, sizes[0]));
} else {
double number = atof(buffer);
fprintf(output, "%-15G -> 0x%lX\n", number, float_to_hex(number, sizes[1], sizes[2]));
}
}
fclose(input);
if (output_path != NULL) {
printf("Results have been added to %s.\n", output_path);
fclose(output);
}
}
int command_parser(char *buffer) {
switch (buffer[0]) {
case 'q':
exit(EXIT_SUCCESS);
case 'o':
input("Decimal Size (in bits): ", sizes);
input("Exponent Size (in bits): ", sizes + 1);
input("Mantissa Size (in bits): ", sizes + 2);
break;
case 'd':
sizes[0] = strtoull(buffer + 1, NULL, 10);
printf("Decimal size is set to %zu.\n", sizes[0]);
break;
case 'e':
sizes[1] = strtoull(buffer + 1, NULL, 10);
printf("Exponent size is set to %zu.\n", sizes[1]);
break;
case 'm':
sizes[2] = strtoull(buffer + 1, NULL, 10);
printf("Mantissa size is set to %zu.\n", sizes[2]);
break;
case 'f':
if (buffer[1] == 'f') {
force_float = atoi(buffer + 2);
break;
}
char *input_path = strtok_r(buffer + 1, " \n", &buffer);
char *output_path = strtok_r(buffer, " \n", &buffer);
convert_file(input_path, output_path);
break;
case 'h':
printf("Please check the README file. This section will be written in the future.\n");
break;
default:
return false;
}
return true;
}
void command_line_interface() {
for (;;) {
printf(">>> ");
char buffer[STRING_SIZE];
fgets(buffer, STRING_SIZE, stdin);
if (command_parser(buffer)) continue;
if (strchr(buffer, '.') == NULL && !force_float) {
i64 number = strtoll(buffer, NULL, 10);
printf("%-15lld -> 0x%lX\n", number, decimal_to_hex(number, sizes[0]));
} else {
double number = atof(buffer);
printf("%-15g -> 0x%lX\n", number, float_to_hex((double)number, sizes[1], sizes[2]));
}
}
} | 29.209524 | 98 | 0.522661 |
7af00cb8c3599aa054e0a13bd9bef3969d631564 | 221 | rb | Ruby | app/controllers/api/v1/test_controller.rb | Telepic-Game/Telepic_BE | c3fc03bd8f60a326c7099c9497dcc18089a69358 | [
"Unlicense",
"MIT"
] | null | null | null | app/controllers/api/v1/test_controller.rb | Telepic-Game/Telepic_BE | c3fc03bd8f60a326c7099c9497dcc18089a69358 | [
"Unlicense",
"MIT"
] | 27 | 2021-07-03T01:49:31.000Z | 2021-09-13T20:17:12.000Z | app/controllers/api/v1/test_controller.rb | Telepic-Game/Telepic_BE | c3fc03bd8f60a326c7099c9497dcc18089a69358 | [
"Unlicense",
"MIT"
] | null | null | null | class Api::V1::TestController < ApplicationController
def destroy_database
WaitingRoomPlayer.destroy_all
WaitingRoom.destroy_all
PlayerGame.destroy_all
Game.destroy_all
Player.destroy_all
end
end
| 20.090909 | 53 | 0.782805 |
330e0026ec6f48bff70e4f7fa2738cc955a1b78d | 1,397 | py | Python | nucleotidefrequencies.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | null | null | null | nucleotidefrequencies.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | null | null | null | nucleotidefrequencies.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | 1 | 2021-10-30T07:37:19.000Z | 2021-10-30T07:37:19.000Z | #Usage: python nucleotidefrequencies.py <fasta file> <output file>
#Output is tab delimited frequencies of A, G, C, U
from Bio import SeqIO
import sys
def getfreqs(fasta):
freqs = [] #[afreq, gfreq, cfreq, ufreq]
a = 0
u = 0
c = 0
g = 0
tot = 0
for record in SeqIO.parse(fasta, 'fasta'):
seq = str(record.seq.transcribe().upper())
a += seq.count('A')
u += seq.count('U')
c += seq.count('C')
g += seq.count('G')
tot += len(seq)
freqs = [a/float(tot), g/float(tot), c/float(tot), u/float(tot)]
return freqs
def getfreqs_boxplot(fasta, outfile, classid):
freqs = {} # {seqname : [A,G,C,U]}
for record in SeqIO.parse(fasta, 'fasta'):
seq = str(record.seq.transcribe().upper())
seqname = record.id
tot = float(len(seq))
if tot < 100:
continue
a = seq.count('A') / tot
u = seq.count('U') / tot
c = seq.count('C') / tot
g = seq.count('G') / tot
freqs[seqname] = [str(a),str(g),str(c),str(u)]
outfh = open(outfile, 'w')
outfh.write(('\t').join(['A','G','C','U','Class']) + '\n')
for seq in freqs:
outfh.write(('\t').join([freqs[seq][0], freqs[seq][1], freqs[seq][2], freqs[seq][3], classid]) + '\n')
outfh.close()
#outfh = open(sys.argv[2], 'w')
#freqs = getfreqs(sys.argv[1])
#freqs = [str(freq) for freq in freqs]
#outfh.write(('\t').join(freqs) + '\t' + sys.argv[3] + '\n')
#outfh.close()
getfreqs_boxplot(sys.argv[1], sys.argv[2], sys.argv[3]) | 26.865385 | 104 | 0.602004 |
d3c20bc0994e96d8edeac1460c81c28e61399324 | 1,685 | sql | SQL | src/schema.sql | PyllrNL/Arduino_Log_Dashboard | 80829c75c56632ab043bdd173974ef9f90692af5 | [
"MIT"
] | null | null | null | src/schema.sql | PyllrNL/Arduino_Log_Dashboard | 80829c75c56632ab043bdd173974ef9f90692af5 | [
"MIT"
] | null | null | null | src/schema.sql | PyllrNL/Arduino_Log_Dashboard | 80829c75c56632ab043bdd173974ef9f90692af5 | [
"MIT"
] | 3 | 2022-02-23T15:41:03.000Z | 2022-03-16T09:13:19.000Z | create table users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT NOT NULL,
hashed_password TEXT NOT NULL,
UNIQUE(username)
);
create table dashboards (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
samples INTEGER NOT NULL,
FOREIGN KEY(user_id) REFERENCES users(id)
);
create table dashboard_fields (
id INTEGER PRIMARY KEY AUTOINCREMENT,
dashboard_id INTEGER NOT NULL,
device_fields_id INTEGER NOT NULL,
FOREIGN KEY(dashboard_id) REFERENCES dashboards(id),
FOREIGN KEY(device_fields_id) REFERENCES device_fields(id)
);
create table login_keys (
id INTEGER PRIMARY KEY AUTOINCREMENT,
timestamp INTEGER NOT NULL,
key TEXT NOT NULL
);
create table devices (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
name TEXT NOT NULL,
device_key TEXT NOT NULL,
FOREIGN KEY(user_id) REFERENCES users(id),
UNIQUE(user_id, name)
);
create table device_fields (
id INTEGER PRIMARY KEY AUTOINCREMENT,
field_index INTEGER NOT NULL,
field_name TEXT NOT NULL,
field_type INTEGER NOT NULL,
device_id INTEGER NOT NULL,
FOREIGN KEY(device_id) REFERENCES devices(id),
UNIQUE(field_index, device_id),
UNIQUE(field_name, device_id)
);
create table samples (
id INTEGER PRIMARY KEY AUTOINCREMENT,
device_id INTEGER NOT NULL,
timestamp INTEGER NOT NULL,
data BLOB NOT NULL,
FOREIGN KEY(device_id) REFERENCES devices(id)
);
| 30.089286 | 62 | 0.641543 |
b868d63a4975e8c108b91815ba8b0e910ae93c09 | 947 | asm | Assembly | programs/oeis/064/A064097.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/064/A064097.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/064/A064097.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A064097: A quasi-logarithm defined inductively by a(1) = 0 and a(p) = 1 + a(p-1) if p is prime and a(n*m) = a(n) + a(m) if m,n > 1.
; 0,1,2,2,3,3,4,3,4,4,5,4,5,5,5,4,5,5,6,5,6,6,7,5,6,6,6,6,7,6,7,5,7,6,7,6,7,7,7,6,7,7,8,7,7,8,9,6,8,7,7,7,8,7,8,7,8,8,9,7,8,8,8,6,8,8,9,7,9,8,9,7,8,8,8,8,9,8,9,7,8,8,9,8,8,9,9,8,9,8,9,9,9,10,9,7,8,9,9,8,9,8,9,8,9,9,10,8,9,9,9,8,9,9,10,9,9,10,9,8,10,9,9,9,9,9,10,7,10,9,10,9,10,10,9,8,9,10,11,9,11,10,10,8,10,9,10,9,10,9,10,9,9,10,10,9,10,10,10,8,11,9,10,9,10,10,11,9,10,9,10,10,11,10,10,9,11,10,11,9,10,10,10,10,10,10,10,11,10,10,11,8,9,9,10,10,11,10,11,9,11,10,11,9,10,10,11,9,11,10,11,10,11,11,11,9,11,10,10,10,10,10,11,9,10,10,11,10,11,11,11,10,11,10,12,11,11,10,11,9,10,11,10,10,11,10,11,10,11,10
lpb $0
mov $2,511879
cal $0,60681 ; Largest difference between consecutive divisors of n (ordered by size).
mul $0,2
add $1,511879
lpb $2
div $0,2
sub $0,1
mov $2,1
lpe
lpe
div $1,511879
| 59.1875 | 600 | 0.591341 |
21a40bed0a8ed690bb275e6a538633b8a4e1320d | 1,828 | sql | SQL | sql/n9e_ams.sql | xroa/nightingale | 66c93f472af82f1eab6a175327ecb1ab2989d499 | [
"Apache-2.0"
] | 1 | 2020-09-18T05:26:16.000Z | 2020-09-18T05:26:16.000Z | sql/n9e_ams.sql | xroa/nightingale | 66c93f472af82f1eab6a175327ecb1ab2989d499 | [
"Apache-2.0"
] | 1 | 2022-03-23T11:08:03.000Z | 2022-03-23T11:08:03.000Z | sql/n9e_ams.sql | xroa/nightingale | 66c93f472af82f1eab6a175327ecb1ab2989d499 | [
"Apache-2.0"
] | 1 | 2020-09-01T10:12:34.000Z | 2020-09-01T10:12:34.000Z | set names utf8;
drop database if exists n9e_ams;
create database n9e_ams;
use n9e_ams;
CREATE TABLE `host`
(
`id` int unsigned not null AUTO_INCREMENT,
`sn` char(128) not null default '',
`ip` char(15) not null,
`ident` varchar(128) not null default '',
`name` varchar(128) not null default '',
`cpu` varchar(255) not null default '',
`mem` varchar(255) not null default '',
`disk` varchar(255) not null default '',
`note` varchar(255) not null default 'different with resource note',
`cate` varchar(32) not null comment 'host,vm,container,switch',
`tenant` varchar(128) not null default '',
`clock` bigint not null comment 'heartbeat timestamp',
PRIMARY KEY (`id`),
UNIQUE KEY (`ip`),
UNIQUE KEY (`ident`),
KEY (`sn`),
KEY (`name`),
KEY (`tenant`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
CREATE TABLE `host_field`
(
`id` int unsigned not null AUTO_INCREMENT,
`field_ident` varchar(255) not null comment 'english identity',
`field_name` varchar(255) not null comment 'chinese name',
`field_type` varchar(64) not null,
`field_required` tinyint(1) not null default 0,
`field_extra` varchar(2048) not null default '',
`field_cate` varchar(255) not null default 'Default',
PRIMARY KEY (`id`),
KEY (`field_cate`, `field_ident`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
CREATE TABLE `host_field_value`
(
`id` int unsigned not null AUTO_INCREMENT,
`host_id` int unsigned not null,
`field_ident` varchar(255) not null,
`field_value` varchar(1024) not null default '',
PRIMARY KEY (`id`),
KEY (`host_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
/* 网络设备管理、机柜机架、配件耗材等相关的功能是商业版本才有的,表结构不要放到这里 */
| 32.642857 | 74 | 0.630744 |
756bf05aedd4f965d0ff52f715f68e7328142b2b | 2,191 | c | C | lib/guilds/obj/invis_resolve.c | vlehtola/questmud | 8bc3099b5ad00a9e0261faeb6637c76b521b6dbe | [
"MIT"
] | null | null | null | lib/guilds/obj/invis_resolve.c | vlehtola/questmud | 8bc3099b5ad00a9e0261faeb6637c76b521b6dbe | [
"MIT"
] | null | null | null | lib/guilds/obj/invis_resolve.c | vlehtola/questmud | 8bc3099b5ad00a9e0261faeb6637c76b521b6dbe | [
"MIT"
] | null | null | null | int percent, mastery, type, duration;
object ob, prot;
string text;
resolve(class,effect_bonus,target, caster_ob) {
int max, max_prot, type;
if (!target) {
tell_object(caster_ob, "Cast at whom?\n");
return 1;
}
ob = present(lower_case(target), environment(caster_ob));
if (!ob) {
tell_object(caster_ob, "There is no " + capitalize(target) + " here.\n");
return 1;
}
mastery = 0;
type = 1;
if(class == "fla" && ob->query_see_invisible()) {
tell_object(caster_ob, ob->query_name()+" already has magical vision.\n");
return 1;
}
if(class == "brr" && ob->query_invisibility_level()) {
tell_object(caster_ob, ob->query_name()+" is already invisible.\n");
return 1;
}
mastery = this_player()->query_skills("mastery of invisibility");
if(mastery > random(30)) type += 1;
if(mastery > (30+random(40))) type += 1;
if(mastery > (70+random(30))) type += 1;
if(type == 1) text = "a tiny";
if(type == 2) text = "an average";
if(type == 3) text = "a good";
if(type > 4) type = 4;
if(type == 4) text = "an incredible";
mastery += this_player()->query_skills("mastery of protection")/3;
duration = (5 * 60) + (effect_bonus/3) + (mastery * 3);
tell_object(caster_ob, "You feel like your spell had "+text+" effect.\n");
if(class == "fla") {
duration = duration * 3;
prot = clone_object("/guilds/spell_obj/see_invisibility");
prot->start(ob,type,duration);
if (ob != caster_ob) {
tell_object(caster_ob, capitalize(target)+"'s eyes glow blue for a while.\n");
}
tell_room(environment(caster_ob), capitalize(target) + "'s eyes flicker for a while.\n", ({ob}));
tell_object(ob, "You feel like your vision is enhanced.\n");
return 1;
}
prot = clone_object("/guilds/spell_obj/invisibility");
prot->start(ob,type,duration);
if (ob != this_player()) {
tell_object(caster_ob, capitalize(target)+" turns invisible.\n");
}
tell_room(environment(caster_ob), capitalize(target) + " suddenly disappears!\n", ({ ob }));
tell_object(ob, "You feel dizzy.\n");
return 1;
}
| 37.135593 | 103 | 0.605203 |
4c7afad13a25968ffb08500240fe3ef83cf896d3 | 2,110 | swift | Swift | GitWoodTests/RealmStorageTest.swift | nour7/GitWood | 9f66454f19b5c8121fa4c6e41264c9a8283a354b | [
"MIT"
] | null | null | null | GitWoodTests/RealmStorageTest.swift | nour7/GitWood | 9f66454f19b5c8121fa4c6e41264c9a8283a354b | [
"MIT"
] | null | null | null | GitWoodTests/RealmStorageTest.swift | nour7/GitWood | 9f66454f19b5c8121fa4c6e41264c9a8283a354b | [
"MIT"
] | null | null | null | //
// RealmStorageTest.swift
// GitWoodTests
//
// Created by Nour on 26/02/2019.
// Copyright © 2019 Nour Saffaf. All rights reserved.
//
import XCTest
import RealmSwift
@testable import GitWood
class RealmStorageTest: XCTestCase {
var realmStorage: RealmStorage!
override func setUp() {
Realm.Configuration.defaultConfiguration.inMemoryIdentifier = self.name
realmStorage = RealmStorage()
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testInsertOrUpdate() {
let repo = TrendingRepo(id: 0, isFavorited: false, owner: OwnerModel(login: "ok", avatarUrl: URL(string: "https://www.google.com/")!), name:"test", description: "unit testing", stars: 200, language: nil, forks: 300, creationDate: "21-10-2018", repoPage: URL(string: "https://www.google.com/")!)
XCTAssertTrue(realmStorage.insertOrUpdate(type: .Favorite, records: [repo]))
}
func testDeleteAndQuery() {
let repo = TrendingRepo(id: 0, isFavorited: false, owner: OwnerModel(login: "ok", avatarUrl: URL(string: "https://www.google.com/")!), name:"test", description: "unit testing", stars: 200, language: nil, forks: 300, creationDate: "21-10-2018", repoPage: URL(string: "https://www.google.com/")!)
let _ = realmStorage.insertOrUpdate(type: .Favorite, records: [repo])
var allFavorite = realmStorage.query(type: .Favorite, input: .AllFavorite)
XCTAssertNotNil(allFavorite)
XCTAssertEqual(allFavorite!.count, 1)
XCTAssertTrue(realmStorage.remove(type: .Favorite, id: 0))
allFavorite = realmStorage.query(type: .Favorite, input: .AllFavorite)
XCTAssertNotNil(allFavorite)
XCTAssertEqual(allFavorite!.count, 0)
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
| 35.166667 | 306 | 0.648341 |
c22f58562c403aa86f37c20ea16d7c15271adc92 | 32 | go | Go | pkg/agent/pyspy/placeholder.go | appleboy/pyroscope | 986989d0b8fb90d6ee34c8e38a2448c3079e5a17 | [
"Apache-2.0"
] | 2 | 2021-03-04T01:33:46.000Z | 2022-02-04T22:35:41.000Z | pkg/agent/pyspy/placeholder.go | appleboy/pyroscope | 986989d0b8fb90d6ee34c8e38a2448c3079e5a17 | [
"Apache-2.0"
] | null | null | null | pkg/agent/pyspy/placeholder.go | appleboy/pyroscope | 986989d0b8fb90d6ee34c8e38a2448c3079e5a17 | [
"Apache-2.0"
] | null | null | null | // +build !pyspy
package pyspy
| 8 | 16 | 0.6875 |
2a061c99352b8c48aafb14283b601b7ccc691134 | 9,359 | java | Java | gutta-apievolution-core/src/test/java/gutta/apievolution/core/resolution/DefinitionResolverTest.java | CexyChris/gutta-apievolution | 1439fb5e578817d13e43273f778fabad47c7012f | [
"MIT"
] | null | null | null | gutta-apievolution-core/src/test/java/gutta/apievolution/core/resolution/DefinitionResolverTest.java | CexyChris/gutta-apievolution | 1439fb5e578817d13e43273f778fabad47c7012f | [
"MIT"
] | null | null | null | gutta-apievolution-core/src/test/java/gutta/apievolution/core/resolution/DefinitionResolverTest.java | CexyChris/gutta-apievolution | 1439fb5e578817d13e43273f778fabad47c7012f | [
"MIT"
] | null | null | null | package gutta.apievolution.core.resolution;
import gutta.apievolution.core.apimodel.AtomicType;
import gutta.apievolution.core.apimodel.Optionality;
import gutta.apievolution.core.apimodel.QualifiedName;
import gutta.apievolution.core.apimodel.StringType;
import gutta.apievolution.core.apimodel.consumer.ConsumerApiDefinition;
import gutta.apievolution.core.apimodel.consumer.ConsumerField;
import gutta.apievolution.core.apimodel.consumer.ConsumerRecordType;
import gutta.apievolution.core.apimodel.provider.*;
import org.junit.jupiter.api.Test;
import java.util.*;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Test cases for definition resolution.
*/
class DefinitionResolverTest {
@Test
void testSimpleResolution() {
// Create the consumer revision
ConsumerApiDefinition consumerApi = new ConsumerApiDefinition(QualifiedName.of("some.test"),
Collections.emptySet(),
1);
ConsumerRecordType consumerType = new ConsumerRecordType("Test",
Optional.empty(),
0,
consumerApi,
false,
Optional.empty());
ConsumerField unchangedFieldConsumer = new ConsumerField("unchangedField",
Optional.empty(),
consumerType,
StringType.unbounded(),
Optionality.MANDATORY,
false);
// Create the provider revision history
ProviderApiDefinition revision1 = new ProviderApiDefinition(QualifiedName.of("test"),
Collections.emptySet(),
1,
Optional.empty());
ProviderRecordType testTypeV1 = new ProviderRecordType("Test",
Optional.empty(),
0,
revision1,
false,
Optional.empty(),
Optional.empty());
ProviderField unchangedFieldV1 = new ProviderField("unchangedField",
Optional.empty(),
testTypeV1,
StringType.unbounded(),
Optionality.MANDATORY);
ProviderField typeChangeFieldV1 = new ProviderField("typeChangeField",
Optional.empty(),
testTypeV1,
AtomicType.INT_32,
Optionality.OPT_IN);
ProviderField deletedFieldV1 = new ProviderField("deletedField",
Optional.empty(),
testTypeV1,
StringType.unbounded(),
Optionality.OPTIONAL);
ProviderEnumType testEnumV1 = new ProviderEnumType("TestEnum",
Optional.empty(),
0,
revision1,
Optional.empty());
ProviderEnumMember unchangedMemberV1 = new ProviderEnumMember("UNCHANGED",
Optional.empty(),
testEnumV1,
Optional.empty());
ProviderEnumMember deletedMemberV1 = new ProviderEnumMember("DELETED",
Optional.empty(),
testEnumV1,
Optional.empty());
ProviderApiDefinition revision2 = new ProviderApiDefinition(QualifiedName.of("test"),
Collections.emptySet(),
2,
Optional.empty());
ProviderRecordType testTypeV2 = new ProviderRecordType("Test",
Optional.of("TestInternal"),
0,
revision2,
false,
Optional.empty(),
Optional.of(testTypeV1));
ProviderField typeChangeFieldV2 = new ProviderField("typeChangeField",
Optional.of("newTypeChangeField"),
testTypeV2,
AtomicType.INT_64,
Optionality.MANDATORY);
ProviderField unchangedFieldV2 = new ProviderField("unchangedField",
Optional.empty(),
testTypeV2,
StringType.unbounded(),
Optionality.MANDATORY,
false,
Arrays.asList(unchangedFieldV1),
Optional.of(unchangedFieldV1));
ProviderField addedFieldV2 = new ProviderField("addedField",
Optional.empty(),
testTypeV2,
StringType.unbounded(),
Optionality.MANDATORY);
ProviderEnumType testEnumV2 = new ProviderEnumType("TestEnum",
Optional.empty(),
0,
revision2,
Optional.of(testEnumV1));
ProviderEnumMember unchangedMemberV2 = new ProviderEnumMember("UNCHANGED",
Optional.empty(),
testEnumV2,
Optional.of(unchangedMemberV1));
ProviderEnumMember addedMemberV2 = new ProviderEnumMember("ADDED",
Optional.empty(),
testEnumV2,
Optional.empty());
// Resolve the consumer API against the revision history
RevisionHistory revisionHistory = new RevisionHistory(revision1, revision2);
Set<Integer> supportedRevisions = new HashSet<>(Arrays.asList(0, 1));
new DefinitionResolver().resolveConsumerDefinition(revisionHistory, supportedRevisions, consumerApi);
}
/**
* Assert that a missing mapping of a mandatory field is appropriately reported.
*/
@Test
void testMissingMappingForMandatoryField() {
ConsumerApiDefinition consumerApi = new ConsumerApiDefinition(QualifiedName.of("test"),
Collections.emptySet(),
0);
ConsumerRecordType consumerType = new ConsumerRecordType("Test",
Optional.empty(),
1,
consumerApi,
false,
Optional.empty());
new ConsumerField("optionalField",
Optional.empty(),
consumerType,
AtomicType.INT_32,
Optionality.OPTIONAL,
false);
// Define a provider API with a mandatory field
ProviderApiDefinition revision = new ProviderApiDefinition(QualifiedName.of("test"),
Collections.emptySet(),
0,
Optional.empty());
ProviderRecordType recordType = new ProviderRecordType("Test",
Optional.empty(),
1,
revision,
false,
Optional.empty(),
Optional.empty());
new ProviderField("mandatoryField",
Optional.empty(),
recordType,
AtomicType.INT_32,
Optionality.MANDATORY);
new ProviderField("optionalField",
Optional.empty(),
recordType,
AtomicType.INT_32,
Optionality.OPTIONAL);
// Resolve the consumer definition against the revision history
RevisionHistory revisionHistory = new RevisionHistory(revision);
Set<Integer> supportedRevision = new HashSet<>(Arrays.asList(0));
DefinitionResolver resolver = new DefinitionResolver();
DefinitionResolutionException exception = assertThrows(DefinitionResolutionException.class,
() -> resolver.resolveConsumerDefinition(revisionHistory, supportedRevision, consumerApi)
);
// Ensure that the exception has the right error message
assertTrue(exception.getMessage().contains("is not mapped"));
}
@Test
void testIncompatibleTypesInMapping() {
// Provider revision
ProviderApiDefinition providerApi = new ProviderApiDefinition(QualifiedName.of("test"),
Collections.emptySet(),
0,
Optional.empty());
ProviderRecordType providerType = new ProviderRecordType("TestType",
Optional.empty(),
0,
providerApi,
false,
Optional.empty(),
Optional.empty());
new ProviderField("testField",
Optional.empty(),
providerType,
AtomicType.INT_32,
Optionality.MANDATORY);
// Consumer definition
ConsumerApiDefinition consumerApi = new ConsumerApiDefinition(QualifiedName.of("test"),
Collections.emptySet(),
0);
ConsumerRecordType consumerType = new ConsumerRecordType("TestType",
Optional.empty(),
0,
consumerApi,
false,
Optional.empty());
new ConsumerField("testField",
Optional.empty(),
consumerType,
AtomicType.INT_64,
Optionality.MANDATORY,
false);
//
RevisionHistory revisionHistory = new RevisionHistory(providerApi);
Set<Integer> supportedRevisions = new HashSet<>(Arrays.asList(0));
DefinitionResolver resolver = new DefinitionResolver();
DefinitionResolutionException exception = assertThrows(DefinitionResolutionException.class,
() -> resolver.resolveConsumerDefinition(revisionHistory, supportedRevisions, consumerApi));
assertTrue(exception.getMessage().contains("do not match"));
}
}
| 35.585551 | 109 | 0.5819 |
053dd88280d144edc65cab857144712ac47dcb1b | 1,836 | rb | Ruby | lib/book_toolkit/api_parser/open_library.rb | Yukaii/book_toolkit | e816268b2401f06de86c0883874196b01fd04712 | [
"MIT"
] | null | null | null | lib/book_toolkit/api_parser/open_library.rb | Yukaii/book_toolkit | e816268b2401f06de86c0883874196b01fd04712 | [
"MIT"
] | null | null | null | lib/book_toolkit/api_parser/open_library.rb | Yukaii/book_toolkit | e816268b2401f06de86c0883874196b01fd04712 | [
"MIT"
] | null | null | null | # {
# "ISBN:9780387290959": {
# "bib_key": "ISBN:9780387290959",
# "preview": "restricted",
# "preview_url": "https://archive.org/details/algebraiccombina2003liye",
# "info_url": "http://openlibrary.org/books/OL22723183M/Orthogonal_frequency_division_mutiplexing_for_wireless_communications",
# "details": {
# "publishers": [
# "Springer"
# ],
# "pagination": "xii, 306 p. :",
# "identifiers": {
# "librarything": [
# "6252855"
# ],
# "goodreads": [
# "1539554"
# ]
# },
# "lc_classifications": [
# "TK"
# ],
# "source_records": [
# "ia:algebraiccombina2003liye"
# ],
# "title": "Orthogonal frequency division mutiplexing for wireless communications",
# "type": {
# "key": "/type/edition"
# },
# "number_of_pages": 306,
# "created": {
# "type": "/type/datetime",
# "value": "2008-12-19T12:48:38.432497"
# },
# "languages": [
# {
# "key": "/languages/eng"
# }
# ],
# "isbn_10": [
# "0387290958"
# ],
# "latest_revision": 4,
# "publish_country": "us ",
# "key": "/books/OL22723183M",
# "last_modified": {
# "type": "/type/datetime",
# "value": "2014-07-28T10:19:56.239872"
# },
# "publish_date": "2004",
# "publish_places": [
# "New York, NY"
# ],
# "works": [
# {
# "key": "/works/OL16920397W"
# }
# ],
# "ocaid": "algebraiccombina2003liye",
# "by_statement": "edited by Ye (Geoffrey) Li, Gordon Stüber.",
# "revision": 4
# }
# }
# }
module BookToolkit
module ApiParser
class OpenLibrary
def initialize
end
end
end
end
| 24.48 | 131 | 0.486383 |
40fa3e8faf236cf11c391bbbffb1a673d67006ef | 2,541 | py | Python | autolens/interferometer/model/result.py | Jammy2211/PyAutoLens | 728100a3bf13f89f35030724aa08593ab44e65eb | [
"MIT"
] | 114 | 2018-03-05T07:31:47.000Z | 2022-03-08T06:40:52.000Z | autolens/interferometer/model/result.py | Jammy2211/PyAutoLens | 728100a3bf13f89f35030724aa08593ab44e65eb | [
"MIT"
] | 143 | 2018-01-31T09:57:13.000Z | 2022-03-16T09:41:05.000Z | autolens/interferometer/model/result.py | Jammy2211/PyAutoLens | 728100a3bf13f89f35030724aa08593ab44e65eb | [
"MIT"
] | 33 | 2018-01-31T12:15:57.000Z | 2022-01-08T18:31:02.000Z | import numpy as np
import autoarray as aa
import autogalaxy as ag
from autolens.lens.model.result import ResultDataset
class ResultInterferometer(ResultDataset):
@property
def max_log_likelihood_fit(self):
return self.analysis.fit_interferometer_for_instance(instance=self.instance)
@property
def real_space_mask(self):
return self.max_log_likelihood_fit.interferometer.real_space_mask
@property
def unmasked_model_visibilities(self):
return self.max_log_likelihood_fit.unmasked_blurred_image
@property
def unmasked_model_visibilities_of_planes(self):
return self.max_log_likelihood_fit.unmasked_blurred_image_of_planes
@property
def unmasked_model_visibilities_of_planes_and_galaxies(self):
fit = self.max_log_likelihood_fit
return fit.unmasked_blurred_image_of_planes_and_galaxies
def visibilities_for_galaxy(self, galaxy: ag.Galaxy) -> np.ndarray:
"""
Parameters
----------
galaxy
A galaxy used in this search
Returns
-------
ndarray or None
A numpy arrays giving the model visibilities of that galaxy
"""
return self.max_log_likelihood_fit.galaxy_model_visibilities_dict[galaxy]
@property
def visibilities_galaxy_dict(self) -> {str: ag.Galaxy}:
"""
A dictionary associating galaxy names with model visibilities of those galaxies
"""
return {
galaxy_path: self.visibilities_for_galaxy(galaxy)
for galaxy_path, galaxy in self.path_galaxy_tuples
}
@property
def hyper_galaxy_visibilities_path_dict(self):
"""
A dictionary associating 1D hyper_galaxies galaxy visibilities with their names.
"""
hyper_galaxy_visibilities_path_dict = {}
for path, galaxy in self.path_galaxy_tuples:
hyper_galaxy_visibilities_path_dict[path] = self.visibilities_galaxy_dict[
path
]
return hyper_galaxy_visibilities_path_dict
@property
def hyper_model_visibilities(self):
hyper_model_visibilities = aa.Visibilities.zeros(
shape_slim=(self.max_log_likelihood_fit.visibilities.shape_slim,)
)
for path, galaxy in self.path_galaxy_tuples:
hyper_model_visibilities += self.hyper_galaxy_visibilities_path_dict[path]
return hyper_model_visibilities
| 31.37037 | 89 | 0.675325 |
813338bd4abab3e9e3ece596433ba46b4b4e5f89 | 2,921 | go | Go | api/v1alpha1/jvmchaos_webhook.go | BearerPipelineTest/chaos-mesh | 804b9a7e7b2fe3f01e12927a917baac9e53172a8 | [
"Apache-2.0"
] | 1,954 | 2019-12-31T05:28:45.000Z | 2020-07-15T18:23:17.000Z | api/v1alpha1/jvmchaos_webhook.go | BearerPipelineTest/chaos-mesh | 804b9a7e7b2fe3f01e12927a917baac9e53172a8 | [
"Apache-2.0"
] | 591 | 2019-12-31T06:18:36.000Z | 2020-07-16T02:26:16.000Z | api/v1alpha1/jvmchaos_webhook.go | PhoenixRedflash/chaos-mesh | e02112240382f65ac8d021cffcc843946297b7d1 | [
"Apache-2.0"
] | 180 | 2019-12-31T05:46:24.000Z | 2020-07-15T21:35:01.000Z | // Copyright 2021 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 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 v1alpha1
import (
"fmt"
"reflect"
"time"
"k8s.io/apimachinery/pkg/util/validation/field"
)
const DefaultJVMAgentPort int32 = 9277
func (in *JVMChaosSpec) Default(root interface{}, field *reflect.StructField) {
if in == nil {
return
}
if len(in.Name) == 0 {
in.Name = fmt.Sprintf("%s-%s-%s-%d", in.Class, in.Method, in.Action, time.Now().Unix())
}
if in.Port == 0 {
in.Port = DefaultJVMAgentPort
}
}
func (in *JVMChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
switch in.Action {
case JVMStressAction:
if in.CPUCount == 0 && len(in.MemoryType) == 0 {
allErrs = append(allErrs, field.Invalid(path, in, "must set one of cpu-count and mem-type when action is 'stress'"))
}
if in.CPUCount > 0 && len(in.MemoryType) > 0 {
allErrs = append(allErrs, field.Invalid(path, in, "inject stress on both CPU and memory is not support now"))
}
if len(in.MemoryType) != 0 {
if in.MemoryType != "stack" && in.MemoryType != "heap" {
allErrs = append(allErrs, field.Invalid(path, in, "value should be 'stack' or 'heap'"))
}
}
case JVMGCAction:
// do nothing
case JVMExceptionAction, JVMReturnAction, JVMLatencyAction:
if len(in.Class) == 0 {
allErrs = append(allErrs, field.Invalid(path, in, "class not provided"))
}
if len(in.Method) == 0 {
allErrs = append(allErrs, field.Invalid(path, in, "method not provided"))
}
if in.Action == JVMExceptionAction && len(in.ThrowException) == 0 {
allErrs = append(allErrs, field.Invalid(path, in, "exception not provided"))
} else if in.Action == JVMReturnAction && len(in.ReturnValue) == 0 {
allErrs = append(allErrs, field.Invalid(path, in, "value not provided"))
} else if in.Action == JVMLatencyAction && in.LatencyDuration == 0 {
allErrs = append(allErrs, field.Invalid(path, in, "latency not provided"))
}
case JVMRuleDataAction:
if len(in.RuleData) == 0 {
allErrs = append(allErrs, field.Invalid(path, in, "rule data not provide"))
}
case "":
allErrs = append(allErrs, field.Invalid(path, in, "action not provided"))
default:
allErrs = append(allErrs, field.Invalid(path, in, fmt.Sprintf("action %s not supported, action can be 'latency', 'exception', 'return', 'stress', 'gc' or 'ruleData'", in.Action)))
}
return allErrs
}
| 32.455556 | 181 | 0.687778 |
617434cc54ad7fac61fa862d9751b842fd381981 | 1,311 | kt | Kotlin | oops/src/main/kotlin/io/nichijou/oops/ext/PackageManager.kt | iota9star/oops-android-kt | 81cfcfe281cd659e07c14defcafbcaee19cfed19 | [
"Apache-2.0"
] | 13 | 2018-10-28T03:03:23.000Z | 2021-09-01T16:39:57.000Z | oops/src/main/kotlin/io/nichijou/oops/ext/PackageManager.kt | iota9star/oops-android-kt | 81cfcfe281cd659e07c14defcafbcaee19cfed19 | [
"Apache-2.0"
] | null | null | null | oops/src/main/kotlin/io/nichijou/oops/ext/PackageManager.kt | iota9star/oops-android-kt | 81cfcfe281cd659e07c14defcafbcaee19cfed19 | [
"Apache-2.0"
] | 2 | 2018-09-18T16:10:00.000Z | 2018-10-14T07:07:37.000Z | package io.nichijou.oops.ext
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.drawable.AdaptiveIconDrawable
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.graphics.drawable.LayerDrawable
import android.os.Build
internal fun PackageManager.getAppIcon(packageName: String): Bitmap? {
try {
val drawable = getApplicationIcon(packageName)
if (drawable is BitmapDrawable) {
return drawable.bitmap
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && drawable is AdaptiveIconDrawable) {
val backgroundDr = drawable.background
val foregroundDr = drawable.foreground
val drr = arrayOfNulls<Drawable>(2)
drr[0] = backgroundDr
drr[1] = foregroundDr
val layerDrawable = LayerDrawable(drr)
val width = layerDrawable.intrinsicWidth
val height = layerDrawable.intrinsicHeight
val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
val canvas = Canvas(bitmap)
layerDrawable.setBounds(0, 0, canvas.width, canvas.height)
layerDrawable.draw(canvas)
return bitmap
}
} catch (e: PackageManager.NameNotFoundException) {
e.printStackTrace()
}
return null
}
| 33.615385 | 93 | 0.747521 |
8ee598b94f50cb616436dee249224db4cd8e55ff | 3,574 | swift | Swift | Releases/2.0/SuSift.swift | aIDserse/SuSift | 69443b94b8ed2d349fe45c23fa4c2ec348e5004d | [
"WTFPL"
] | 2 | 2020-11-20T11:18:10.000Z | 2020-12-04T10:10:03.000Z | Releases/2.0/SuSift.swift | aIDserse/SuSift | 69443b94b8ed2d349fe45c23fa4c2ec348e5004d | [
"WTFPL"
] | null | null | null | Releases/2.0/SuSift.swift | aIDserse/SuSift | 69443b94b8ed2d349fe45c23fa4c2ec348e5004d | [
"WTFPL"
] | null | null | null | import Foundation
func addition()
{
var a = Float()
var b = Float()
var c = Float()
print("First number?")
a = Float(readLine()!)!
print("Second number?")
b = Float(readLine()!)!
c = a + b
print("\(a) + \(b) =")
print(c)
}
func subtraction()
{
var a = Float()
var b = Float()
var c = Float()
print("First number?")
a = Float(readLine()!)!
print("Second number?")
b = Float(readLine()!)!
c = a - b
print("\(a) - \(b) =")
print(c)
}
func moltiplication()
{
var a = Float()
var b = Float()
var c = Float()
print("First number?")
a = Float(readLine()!)!
print("Second number?")
b = Float(readLine()!)!
c = a * b
print("\(a) x \(b) =")
print(c)
}
func division() //Easter Egg! If you are watching these
{ //and you like music go to check Joy
var a = Float() //Division! Glory to Ian Curtis!
var b = Float()
var c = Float()
print("First number?")
a = Float(readLine()!)!
print("Second number?")
b = Float(readLine()!)!
c = a / b
print("\(a) : \(b) =")
print(c)
}
func squaring()
{
var a = Float()
var c = Float()
print("Number to square:")
a = Float(readLine()!)!
c = a * a
print("\(a)^2 =")
print(c)
}
func cubing()
{
var a = Float()
var c = Float()
print("Number to cube:")
a = Float(readLine()!)!
c = a * a * a
print("\(a)^3 =")
print(c)
}
func sqrt()
{
var a = Float()
print("Sqrt of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = a.squareRoot()
print(c)
}
func cbrt()
{
var a = Float()
print("Cube root of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = pow(a, 1.0/3.0)
print(c)
}
func sin()
{
var a = Float()
print("Sin of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = sin(a)
print(c)
}
func cos()
{
var a = Float()
print("Cos of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = cos(a)
print(c)
}
func tan()
{
var a = Float()
print("Tan of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = tan(a)
print(c)
}
func asin()
{
var a = Float()
print("Sin^-1 of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = asin(a)
print(c)
}
func acos()
{
var a = Float()
print("Cos^-1 of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = acos(a)
print(c)
}
func atan()
{
var a = Float()
print("Tan^-1 of:")
a = Float(readLine()!)!
print("\(a)^2 =")
let c = atan(a)
print(c)
}
func quit()
{
print("Goodbye, good job:)")
}
var option = 0
print("Susift! A Swift(Not COBOL, Not Fortran, Not Simula) calculator!")
print("Choose an option!")
print("What do you want to do?")
print("1 - Addition")
print("2 - Subtraction")
print("3 - Moltiplication")
print("4 - Division")
print("5 - Squaring")
print("6 - Cubing")
print("7 - Sqrt")
print("8 - Cbrt")
print("9 - Sin")
print("10 - Cos")
print("11 - Tan")
print("12 - aSin")
print("13 - aCos")
print("14 - aTan")
print("15 - Quit")
option = Int(readLine()!)!
if(option == 1)
{
addition()
}
else if(option == 2)
{
subtraction()
}
else if(option == 3)
{
moltiplication()
}
else if(option == 4)
{
division()
}
else if(option == 5)
{
squaring()
}
else if(option == 6)
{
cubing()
}
else if(option == 7)
{
sqrt()
}
else if(option == 8)
{
cbrt()
}
else if(option == 8)
{
sin()
}
else if(option == 9)
{
sin()
}
else if(option == 10)
{
cos()
}
else if(option == 11)
{
tan()
}
else if(option == 12)
{
asin()
}
else if(option == 13)
{
acos()
}
else if(option == 14)
{
atan()
}
else if(option == 15)
{
quit()
}
| 15.208511 | 73 | 0.524902 |
581718c598615207caec96ab7adf162403d2a3d9 | 12,565 | swift | Swift | STORE/Core/Classes/Operation/OperationType.swift | instaloper/store-ios-framework | 9c2f9a0eb0fd3cd35bbad2ce33aa48bdb4fa17e9 | [
"MIT"
] | null | null | null | STORE/Core/Classes/Operation/OperationType.swift | instaloper/store-ios-framework | 9c2f9a0eb0fd3cd35bbad2ce33aa48bdb4fa17e9 | [
"MIT"
] | null | null | null | STORE/Core/Classes/Operation/OperationType.swift | instaloper/store-ios-framework | 9c2f9a0eb0fd3cd35bbad2ce33aa48bdb4fa17e9 | [
"MIT"
] | null | null | null | //
// OperationType.swift
// ECHO
//
// Created by Vladimir Sharaev on 17.08.2018.
// Copyright © 2018 PixelPlex. All rights reserved.
//
/**
Represents all blockchain operation types [Operations](https://dev-doc.myecho.app/group__operations.html#details)
*/
public enum OperationType: Int {
case transferOperation // 0
case transferToAddressOperation
case overrideTransferOperation
case accountCreateOperation
case accountUpdateOperation
case accountWhitelistOperation
case accountAddressCreateOperation
case assetCreateOperation
case assetUpdateOperation
case assetUpdateBitassetOperation
case assetUpdateFeedProducersOperation // 10
case assetIssueOperation
case assetReserveOperation
case assetFundFeePoolOperation
case assetPublishFeedOperation
case assetClaimFeesOperaion
case proposalCreateOperation
case proposalUpdateOperation
case proposalDeleteOperation
case committeeMemberCreateOperation
case committeeMemberUpdateOperation // 20
// swiftlint:disable variable_name
case committeeMemberUpdateGlobalParametersOperation
// swiftlint:enable variable_name
case committeeMemberActivateOperation
case committeeMemberDeactivateOperation
case committeeFrozenBalanceDepositOperation
case committeeFrozenBalanceWithdrawOperation
case vestingBalanceCreateOperation
case vestingBalanceWithdrawOperation
case balanceClaimOperation
case balanceFreezeOperation
case balanceUnfreezeOperation // 30 // VIRTUAL
case requestBalanceUnfreezeOperation
case contractCreateOperation
case contractCallOperation
case contractInternalCreateOperation // VIRTUAL
case contractInternalCallOperation // VIRTUAL
case contractSelfdestructOperation // VIRTUAL
case contractUpdateOperation
case contractFundPoolOperation
case contractWhitelistOperation
case sidechainETHCreateAddressOperation // 40
case sidechainETHApproveAddressOperation
case sidechainETHDepositOperation
case sidechainETHSendDepositOperation
case sidechainETHWithdrawOperation
case sidechainETHSendWithdrawOperation
case sidechainETHApproveWithdrawOperation
// swiftlint:disable variable_name
case sidechainETHUpdateContractAddressOperation
// swiftlint:enable variable_name
case sidechainIssueOperation // VIRTUAL
case sidechainBurnOperation // VIRTUAL
case sidechainERC20RegisterTokenOperation // 50
case sidechainERC20DepositTokenOperation
case sidechainERC20SendDepositTokenOperation
case sidechainERC20WithdrawTokenOperation
case sidechainERC20SendWithdrawTokenOperation
// swiftlint:disable variable_name
case sidechainERC20ApproveTokenWithdrawOperation
// swiftlint:enable variable_name
case sidechainERC20IssueOperation // VIRTUAL
case sidechainERC20BurnOperation // VIRTUAL
case sidechainBTCCreateAddressOperation
// swiftlint:disable variable_name
case sidechainBTCCreateIntermediateDepositOperation
// swiftlint:enable variable_name
case sidechainBTCIntermediateDepositOperation // 60
case sidechainBTCDepositOperation
case sidechainBTCWithdrawOperation
case sidechainBTCAggregateOperation
case sidechainBTCApproveAggregateOperation
case sidechainBTCBlockProcessOperation
case blockRewardOperation // VIRTUAL
case evmAddressRegisterOperation
case didCreateOperation
case didUpdateOperation
case didDeleteOperation //70
}
struct OperationDecoder {
func decode(_ operationId: Int, container: UnkeyedDecodingContainer) -> BaseOperation? {
guard let type = OperationType(rawValue: operationId) else {
return nil
}
switch type {
case .accountCreateOperation: return decode(AccountCreateOperation.self, container: container)
case .accountUpdateOperation: return decode(AccountUpdateOperation.self, container: container)
case .transferOperation: return decode(TransferOperation.self, container: container)
case .assetCreateOperation: return decode(CreateAssetOperation.self, container: container)
case .assetIssueOperation: return decode(IssueAssetOperation.self, container: container)
case .balanceClaimOperation: return decode(BalanceClaimOperation.self, container: container)
case .balanceFreezeOperation: return decode(BalanceFreezeOperation.self, container: container)
case .balanceUnfreezeOperation: return decode(BalanceUnfreezeOperation.self, container: container)
case .requestBalanceUnfreezeOperation: return decode(RequestBalanceUnfreezeOperation.self, container: container)
case .contractCreateOperation: return decode(CreateContractOperation.self, container: container)
case .contractCallOperation: return decode(CallContractOperation.self, container: container)
case .contractInternalCallOperation: return decode(ContractInternalCallOperation.self, container: container)
case .blockRewardOperation: return decode(BlockRewardOperation.self, container: container)
case .contractFundPoolOperation: return decode(ContractFundPoolOperation.self, container: container)
case .sidechainETHCreateAddressOperation: return decode(SidechainETHCreateAddressOperation.self, container: container)
case .sidechainETHDepositOperation: return decode(SidechainETHDepositOperation.self, container: container)
case .sidechainETHWithdrawOperation: return decode(SidechainETHWithdrawOperation.self, container: container)
case .sidechainETHApproveAddressOperation: return decode(SidechainETHApproveAddressOperation.self, container: container)
case .sidechainIssueOperation: return decode(SidechainIssueOperation.self, container: container)
case .sidechainBurnOperation: return decode(SidechainBurnOperation.self, container: container)
case .sidechainBTCCreateAddressOperation: return decode(SidechainBTCCreateAddressOperation.self, container: container)
case .sidechainBTCCreateIntermediateDepositOperation: return decode(SidechainBTCCreateIntermediateDepositOperation.self, container: container)
case .sidechainBTCWithdrawOperation: return decode(SidechainBTCWithdrawOperation.self, container: container)
case .sidechainERC20RegisterTokenOperation: return decode(SidechainERC20RegisterTokenOperation.self, container: container)
case .sidechainERC20WithdrawTokenOperation: return decode(SidechainERC20WithdrawTokenOperation.self, container: container)
case .sidechainERC20IssueOperation: return decode(SidechainERC20IssueOperation.self, container: container)
case .sidechainERC20BurnOperation: return decode(SidechainERC20BurnOperation.self, container: container)
case .sidechainERC20DepositTokenOperation: return decode(SidechainERC20DepositTokenOperation.self, container: container)
default: return nil
}
}
// swiftlint:disable function_body_length
func decode(operations: [Any]) -> [BaseOperation] {
var baseOperations = [BaseOperation]()
let decoder = JSONDecoder()
for array in operations {
guard let operation = array as? [Any] else { continue }
guard let operationId = operation[safe: 0] as? Int else { continue }
guard let type = OperationType(rawValue: operationId) else { continue }
guard let operationDict = operation[safe: 1] as? [String: Any] else { continue }
guard let data = try? JSONSerialization.data(withJSONObject: operationDict, options: []) else { continue }
var baseOperation: BaseOperation?
switch type {
case .accountCreateOperation:
baseOperation = try? decoder.decode(AccountCreateOperation.self, from: data)
case .accountUpdateOperation:
baseOperation = try? decoder.decode(AccountUpdateOperation.self, from: data)
case .transferOperation:
baseOperation = try? decoder.decode(TransferOperation.self, from: data)
case .assetCreateOperation:
baseOperation = try? decoder.decode(CreateAssetOperation.self, from: data)
case .assetIssueOperation:
baseOperation = try? decoder.decode(IssueAssetOperation.self, from: data)
case .balanceClaimOperation:
baseOperation = try? decoder.decode(BalanceClaimOperation.self, from: data)
case .balanceFreezeOperation:
baseOperation = try? decoder.decode(BalanceFreezeOperation.self, from: data)
case .balanceUnfreezeOperation:
baseOperation = try? decoder.decode(BalanceUnfreezeOperation.self, from: data)
case .requestBalanceUnfreezeOperation:
baseOperation = try? decoder.decode(RequestBalanceUnfreezeOperation.self, from: data)
case .contractCreateOperation:
baseOperation = try? decoder.decode(CreateContractOperation.self, from: data)
case .contractCallOperation:
baseOperation = try? decoder.decode(CallContractOperation.self, from: data)
case .contractInternalCallOperation:
baseOperation = try? decoder.decode(ContractInternalCallOperation.self, from: data)
case .sidechainETHCreateAddressOperation:
baseOperation = try? decoder.decode(SidechainETHCreateAddressOperation.self, from: data)
case .blockRewardOperation:
baseOperation = try? decoder.decode(BlockRewardOperation.self, from: data)
case .contractFundPoolOperation:
baseOperation = try? decoder.decode(ContractFundPoolOperation.self, from: data)
case .sidechainETHDepositOperation:
baseOperation = try? decoder.decode(SidechainETHDepositOperation.self, from: data)
case .sidechainETHWithdrawOperation:
baseOperation = try? decoder.decode(SidechainETHWithdrawOperation.self, from: data)
case .sidechainETHApproveAddressOperation:
baseOperation = try? decoder.decode(SidechainETHApproveAddressOperation.self, from: data)
case .sidechainIssueOperation:
baseOperation = try? decoder.decode(SidechainIssueOperation.self, from: data)
case .sidechainBurnOperation:
baseOperation = try? decoder.decode(SidechainBurnOperation.self, from: data)
case .sidechainBTCCreateAddressOperation:
baseOperation = try? decoder.decode(SidechainBTCCreateAddressOperation.self, from: data)
case .sidechainBTCCreateIntermediateDepositOperation:
baseOperation = try? decoder.decode(SidechainBTCCreateIntermediateDepositOperation.self, from: data)
case .sidechainBTCWithdrawOperation:
baseOperation = try? decoder.decode(SidechainBTCWithdrawOperation.self, from: data)
case .sidechainERC20RegisterTokenOperation:
baseOperation = try? decoder.decode(SidechainERC20RegisterTokenOperation.self, from: data)
case .sidechainERC20WithdrawTokenOperation:
baseOperation = try? decoder.decode(SidechainERC20WithdrawTokenOperation.self, from: data)
case .sidechainERC20IssueOperation:
baseOperation = try? decoder.decode(SidechainERC20IssueOperation.self, from: data)
case .sidechainERC20BurnOperation:
baseOperation = try? decoder.decode(SidechainERC20BurnOperation.self, from: data)
case .sidechainERC20DepositTokenOperation:
baseOperation = try? decoder.decode(SidechainERC20DepositTokenOperation.self, from: data)
default:
break
}
if let operation = baseOperation {
baseOperations.append(operation)
}
}
return baseOperations
}
// swiftlint:enable function_body_length
fileprivate func decode<T>(_ type: T.Type, container: UnkeyedDecodingContainer) -> T? where T: Decodable {
var container = container
return try? container.decode(type)
}
}
| 55.352423 | 150 | 0.723916 |
f9a7ffa1eafdd0569d37ca9febc07221bbe3c189 | 161 | go | Go | variables/go-without-package-scoped-variables/main.go | shahincsejnu/oh-my-go | 6fad1038162bbaf41208fc744f4f400861087812 | [
"MIT"
] | 1 | 2021-11-18T11:47:09.000Z | 2021-11-18T11:47:09.000Z | variables/go-without-package-scoped-variables/main.go | shahincsejnu/oh-my-go | 6fad1038162bbaf41208fc744f4f400861087812 | [
"MIT"
] | null | null | null | variables/go-without-package-scoped-variables/main.go | shahincsejnu/oh-my-go | 6fad1038162bbaf41208fc744f4f400861087812 | [
"MIT"
] | null | null | null | // Followed tuto : https://dave.cheney.net/2017/06/11/go-without-package-scoped-variables
package main
func main() {
var _ int = 10
var _ int = *new(int)
}
| 16.1 | 89 | 0.68323 |
971292c0c00479c25e64829f7f2e72b864a89e1c | 576 | swift | Swift | Cineaste/World.swift | spacepandas/cineaste-ios | 88b85deaa5cb2d52fb9e0a08f2cd8cfb458c1fff | [
"Apache-2.0"
] | 29 | 2018-07-01T20:03:18.000Z | 2021-05-04T07:44:46.000Z | Cineaste/World.swift | spacepandas/cineaste-ios | 88b85deaa5cb2d52fb9e0a08f2cd8cfb458c1fff | [
"Apache-2.0"
] | 74 | 2018-07-01T08:01:55.000Z | 2022-03-01T11:00:44.000Z | Cineaste/World.swift | spacepandas/cineaste-ios | 88b85deaa5cb2d52fb9e0a08f2cd8cfb458c1fff | [
"Apache-2.0"
] | 13 | 2018-07-16T19:06:34.000Z | 2021-06-07T20:16:10.000Z | //
// World.swift
// Cineaste App
//
// Created by Felizia Bernutz on 28.12.20.
// Copyright © 2020 spacepandas.de. All rights reserved.
//
import Foundation
/// Encapsulates dependencies to make it easier to mock and replace them
/// in tests.
///
/// See more about this concept:
/// https://www.pointfree.co/blog/posts/21-how-to-control-the-world
struct World {
var date = { Date() }
var locale: Locale = .current
var timeZone: TimeZone = .current
}
// swiftlint:disable identifier_name
#if DEBUG
var Current = World()
#else
let Current = World()
#endif
| 20.571429 | 72 | 0.6875 |
858ac91aadcce295595d3dd0aa81ab4829bfec4a | 46 | js | JavaScript | tests/yield/jsfmt.spec.js | fuelingtheweb/prettier | 53edfeb1ded1e2729e3f226f1a3fcc3b42516776 | [
"MIT"
] | 40,139 | 2017-02-20T22:01:11.000Z | 2022-03-31T19:56:19.000Z | tests/yield/jsfmt.spec.js | fuelingtheweb/prettier | 53edfeb1ded1e2729e3f226f1a3fcc3b42516776 | [
"MIT"
] | 9,185 | 2017-02-20T22:02:24.000Z | 2022-03-31T20:45:07.000Z | tests/yield/jsfmt.spec.js | fuelingtheweb/prettier | 53edfeb1ded1e2729e3f226f1a3fcc3b42516776 | [
"MIT"
] | 4,365 | 2017-02-21T16:30:33.000Z | 2022-03-31T02:49:26.000Z | run_spec(__dirname, ["babel", "typescript"]);
| 23 | 45 | 0.695652 |
ff238f570db7bbaf7daab1a9dd0dc775db1c4107 | 96 | sql | SQL | af/oometa/000-A-versioning.rollback.sql | vivivibo/pipeline | 2a24660ca4b53b51bde3daedde80d8489bdeb37c | [
"BSD-3-Clause"
] | 16 | 2018-08-23T11:45:00.000Z | 2022-01-21T18:41:58.000Z | af/oometa/000-A-versioning.rollback.sql | vivivibo/pipeline | 2a24660ca4b53b51bde3daedde80d8489bdeb37c | [
"BSD-3-Clause"
] | 241 | 2018-07-14T13:04:51.000Z | 2022-03-24T14:33:40.000Z | af/oometa/000-A-versioning.rollback.sql | vivivibo/pipeline | 2a24660ca4b53b51bde3daedde80d8489bdeb37c | [
"BSD-3-Clause"
] | 7 | 2019-02-15T14:58:26.000Z | 2021-12-31T17:47:56.000Z | BEGIN;
-- This file removes versioning support from database.
DROP SCHEMA _v CASCADE;
COMMIT;
| 13.714286 | 54 | 0.770833 |
f1cc3859d66541ce8c9cd93b7e49fc883b7051a4 | 2,925 | asm | Assembly | uuu/src/cells/io/mouse/microsoft/microsoft.asm | ekscrypto/Unununium | 4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f | [
"BSD-2-Clause"
] | 7 | 2019-03-04T08:53:33.000Z | 2022-01-28T19:32:12.000Z | uuu/src/cells/io/mouse/microsoft/microsoft.asm | ekscrypto/Unununium | 4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f | [
"BSD-2-Clause"
] | null | null | null | uuu/src/cells/io/mouse/microsoft/microsoft.asm | ekscrypto/Unununium | 4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f | [
"BSD-2-Clause"
] | null | null | null | ;====----------------------------------------------------------------------====
; Microsoft Serial Compatible Mouse Driver (c)2001 Richard Fillion
; MSLogitech Driver Cell Distributed under BSD License
;====----------------------------------------------------------------------====
[bits 32]
section .c_info
version: db 0,0,1,'a'
dd str_cellname
dd str_author
dd str_copyrights
str_cellname: db "Microsoft Serial Mouse Driver",0
str_author: db "Richard Fillion (Raptor-32) - rick@rhix.dhs.org",0
str_copyrights: db "Distributed under BSD license.",0
section .c_init
mov esi, incoming_data
xor ebx, ebx
mov bl, 0x60 ;baud rate divisor for 1200baud (serial mouse)
mov bh, 0x00
xor eax, eax
mov al, 1 ;com1
mov cl, 1
;; externfunc com.enable_port TODO: BROKEN! Fix Me! DevFS enabled code!!
section .text
incoming_data:
;mouse data looks like this:
; 7 6 5 4 3 2 1 0 bits
; 0 1 LB RB Y7 Y6 X7 X6
; 0 0 X5 X4 X3 X2 X1 X0
; 0 0 Y5 Y4 Y3 Y2 Y1 Y0
;byte is in AL, start by syncing driver with mouse
movzx ebx, byte [sync]
or ebx, 0
jnz .synced
;gotta sync it
mov bl, al
and bl, 01000000b
jz near .not_first
;we have first byte, sync this puppy
mov [byte_num], byte 1
mov [sync], byte 1
.synced:
movzx ebx, byte [byte_num]
cmp ebx, 2
jb .byte1
je near .byte2
.byte3:
;once 3rd byte is in, thats when you start doing major stuff
;al already = bits 0-5 of Y increment
mov [byte_num], byte 1
cmp dword [client], -1
je .get_out
mov bh, [byte_2] ;bh = bits 0-5 of X increment
mov bl, [byte_1] ;we have buttons already, so all we need to worry about is:
;- bits 6,7 for bits 6 and 7 of Y increment
;- bits 4, 5 for bits 6 and 7 of X increment
;mouse data looks like this:
; 7 6 5 4 3 2 1 0 bits
; 0 1 LB RB Y7 Y6 X7 X6 bl
; 0 0 X5 X4 X3 X2 X1 X0 bh
; 0 0 Y5 Y4 Y3 Y2 Y1 Y0 al
;we will use ah for X and bl for Y
mov ah, bl ;carbon copy of byte 1
and ah, 00000011b
shl ah, 6
or ah, bh
; now AH is X
and bl, 00001100b
shl bl, 4
or bl, al
; now BL is Y
movsx ecx, bl
movsx ebx, al
xor edx, edx
movzx eax, byte [right_button]
rol al, 1
and al, [left_button]
call [client]
.get_out:
retn
.byte1:
mov [byte_1], al
;set the buttons so we can ignore that later
mov bl, al ;check if it really is byte 1
and bl, 01000000b
jz .not_synced
mov bl, al
mov cl, al
and bl, 00100000b
;shr bl, 5
rol bl, 3
mov [left_button], byte bl
and cl, 00010000b
shr cl, 4
mov [right_button], cl
inc byte [byte_num]
retn
.not_synced:
mov [byte_num], byte 0
mov [sync], byte 0
retn
.byte2:
mov [byte_2], al
mov [byte_num], byte 3
.not_first:
retn
;===----[VARIABLES]-----===
right_button: db 0
left_button: db 0
byte_num: db 0
sync: db 0
byte_1: db 0
byte_2: db 0
byte_3: db 0
client: dd -1
| 19.897959 | 79 | 0.604786 |
b9f9871af368e89a3dbf7834f3a92b891cd90268 | 388 | sql | SQL | test-scripts/test-file.sql | lelanthran/libsqldb | b355a183ba560a16769d8125623c6faeb572931c | [
"Unlicense"
] | null | null | null | test-scripts/test-file.sql | lelanthran/libsqldb | b355a183ba560a16769d8125623c6faeb572931c | [
"Unlicense"
] | null | null | null | test-scripts/test-file.sql | lelanthran/libsqldb | b355a183ba560a16769d8125623c6faeb572931c | [
"Unlicense"
] | null | null | null |
-- A small SQL script. Note that no parameterisation is performed.
--
-- Testing that ';' in a comment works as expected.
-- select * from one;
--
-- Like that.
insert into one values (1001, 'script;test');
insert into two values (2001, 1001);
-- Try out the upsert functionality
insert into one values (1001, 'new;value1')
on conflict (col_a) do update set col_b='new;''value2';
| 22.823529 | 66 | 0.693299 |
811fb881d635c5c16d4fa30f27318e38bbf1037e | 203 | sql | SQL | src/FirebirdDbComparer.Tests/Compare/ComparerTestsData/Changing/ViewUsedInChangingProcedure_00.Target.sql | cincuranet/FirebirdDbComparer | d12c6c7fda24e6ff290984d00e80a5fb187d1ef1 | [
"MIT"
] | 17 | 2018-07-09T08:32:29.000Z | 2022-02-10T06:50:52.000Z | src/FirebirdDbComparer.Tests/Compare/ComparerTestsData/Changing/ViewUsedInChangingProcedure_00.Target.sql | cincuranet/FirebirdDbComparer | d12c6c7fda24e6ff290984d00e80a5fb187d1ef1 | [
"MIT"
] | 27 | 2019-01-08T14:20:57.000Z | 2022-02-21T10:02:16.000Z | src/FirebirdDbComparer.Tests/Compare/ComparerTestsData/Changing/ViewUsedInChangingProcedure_00.Target.sql | cincuranet/FirebirdDbComparer | d12c6c7fda24e6ff290984d00e80a5fb187d1ef1 | [
"MIT"
] | 4 | 2019-01-09T22:40:44.000Z | 2019-10-19T17:51:45.000Z | create view v
as
select 1 as i from rdb$database;
set term ^ ;
create procedure p
returns (out_i int)
as
begin
for select i from v into out_i do
begin
suspend;
end
end^
set term ;^ | 11.941176 | 37 | 0.660099 |
2ce037e27e8e8117661949752bcf15f93902ee23 | 260 | swift | Swift | Core/Domain/FactoryTypes/OnboardingModuleFactory.swift | SocratisM/TestLocation | cf920feb772c6e99f030456fab0a0a1f5d0586bc | [
"MIT"
] | null | null | null | Core/Domain/FactoryTypes/OnboardingModuleFactory.swift | SocratisM/TestLocation | cf920feb772c6e99f030456fab0a0a1f5d0586bc | [
"MIT"
] | null | null | null | Core/Domain/FactoryTypes/OnboardingModuleFactory.swift | SocratisM/TestLocation | cf920feb772c6e99f030456fab0a0a1f5d0586bc | [
"MIT"
] | null | null | null | //
// OnboardingModuleFactory.swift
// Core
//
// Created by Socratis Michaelides on 07/11/2018.
// Copyright © 2018 Socratis Michaelides. All rights reserved.
//
public protocol OnboardingModuleFactory {
func makeOnboardingModule() -> OnboardingView
}
| 21.666667 | 63 | 0.746154 |
fd24cb5fb573e48249707c4d75fd8d81cec08a11 | 104,939 | sql | SQL | sql/ry.sql | 1774214410/-ruoyi | db939b846337a8d682f780697c0233607e33ca2c | [
"MIT"
] | null | null | null | sql/ry.sql | 1774214410/-ruoyi | db939b846337a8d682f780697c0233607e33ca2c | [
"MIT"
] | null | null | null | sql/ry.sql | 1774214410/-ruoyi | db939b846337a8d682f780697c0233607e33ca2c | [
"MIT"
] | null | null | null | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50138
Source Host : localhost:3306
Source Database : ry
Target Server Type : MYSQL
Target Server Version : 50138
File Encoding : 65001
Date: 2018-09-01 09:41:07
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for custinfo
-- ----------------------------
DROP TABLE IF EXISTS `custinfo`;
CREATE TABLE `custinfo` (
`id` int(6) NOT NULL AUTO_INCREMENT,
`name` varchar(12) CHARACTER SET gbk DEFAULT '',
`gender` varchar(2) CHARACTER SET gbk DEFAULT '',
`age` varchar(4) DEFAULT '',
`address` varchar(50) CHARACTER SET gbk DEFAULT '',
`phone` varchar(11) DEFAULT '',
`imageaddr` varchar(100) DEFAULT '',
`status` varchar(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of custinfo
-- ----------------------------
INSERT INTO `custinfo` VALUES ('1', '张三', '男', '23', '杭州', '123456', '123', '0');
INSERT INTO `custinfo` VALUES ('4', '小霞', '女', '21', '湖北省武汉市', '13547892347', '123', '1');
INSERT INTO `custinfo` VALUES ('5', '', '', '', '', '', '', '1');
INSERT INTO `custinfo` VALUES ('6', '', '', '', '', '', '', '1');
INSERT INTO `custinfo` VALUES ('7', '', '', '', '', '', '', '1');
INSERT INTO `custinfo` VALUES ('8', '李四', '2', '12', '杭州滨江区', '13522223333', '123', '0');
-- ----------------------------
-- Table structure for qrtz_blob_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_blob_triggers`;
CREATE TABLE `qrtz_blob_triggers` (
`sched_name` varchar(120) NOT NULL,
`trigger_name` varchar(200) NOT NULL,
`trigger_group` varchar(200) NOT NULL,
`blob_data` blob,
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`),
CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_blob_triggers
-- ----------------------------
-- ----------------------------
-- Table structure for qrtz_calendars
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_calendars`;
CREATE TABLE `qrtz_calendars` (
`sched_name` varchar(120) NOT NULL,
`calendar_name` varchar(200) NOT NULL,
`calendar` blob NOT NULL,
PRIMARY KEY (`sched_name`,`calendar_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_calendars
-- ----------------------------
-- ----------------------------
-- Table structure for qrtz_cron_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_cron_triggers`;
CREATE TABLE `qrtz_cron_triggers` (
`sched_name` varchar(120) NOT NULL,
`trigger_name` varchar(200) NOT NULL,
`trigger_group` varchar(200) NOT NULL,
`cron_expression` varchar(200) NOT NULL,
`time_zone_id` varchar(80) DEFAULT NULL,
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`),
CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_cron_triggers
-- ----------------------------
INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', '__TASK_CLASS_NAME__1', 'DEFAULT', '0/10 * * * * ?', 'GMT+08:00');
INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', '__TASK_CLASS_NAME__2', 'DEFAULT', '0/20 * * * * ?', 'GMT+08:00');
-- ----------------------------
-- Table structure for qrtz_fired_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_fired_triggers`;
CREATE TABLE `qrtz_fired_triggers` (
`sched_name` varchar(120) NOT NULL,
`entry_id` varchar(95) NOT NULL,
`trigger_name` varchar(200) NOT NULL,
`trigger_group` varchar(200) NOT NULL,
`instance_name` varchar(200) NOT NULL,
`fired_time` bigint(13) NOT NULL,
`sched_time` bigint(13) NOT NULL,
`priority` int(11) NOT NULL,
`state` varchar(16) NOT NULL,
`job_name` varchar(200) DEFAULT NULL,
`job_group` varchar(200) DEFAULT NULL,
`is_nonconcurrent` varchar(1) DEFAULT NULL,
`requests_recovery` varchar(1) DEFAULT NULL,
PRIMARY KEY (`sched_name`,`entry_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_fired_triggers
-- ----------------------------
-- ----------------------------
-- Table structure for qrtz_job_details
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_job_details`;
CREATE TABLE `qrtz_job_details` (
`sched_name` varchar(120) NOT NULL,
`job_name` varchar(200) NOT NULL,
`job_group` varchar(200) NOT NULL,
`description` varchar(250) DEFAULT NULL,
`job_class_name` varchar(250) NOT NULL,
`is_durable` varchar(1) NOT NULL,
`is_nonconcurrent` varchar(1) NOT NULL,
`is_update_data` varchar(1) NOT NULL,
`requests_recovery` varchar(1) NOT NULL,
`job_data` blob,
PRIMARY KEY (`sched_name`,`job_name`,`job_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_job_details
-- ----------------------------
INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', '__TASK_CLASS_NAME__1', 'DEFAULT', null, 'com.ruoyi.project.monitor.job.util.ScheduleJob', '0', '0', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3130202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E697A0E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000174000672795461736B74000A72794E6F506172616D7374000074000130740001317800);
INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', '__TASK_CLASS_NAME__2', 'DEFAULT', null, 'com.ruoyi.project.monitor.job.util.ScheduleJob', '0', '0', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3230202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E69C89E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000274000672795461736B7400087279506172616D73740002727974000130740001317800);
-- ----------------------------
-- Table structure for qrtz_locks
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_locks`;
CREATE TABLE `qrtz_locks` (
`sched_name` varchar(120) NOT NULL,
`lock_name` varchar(40) NOT NULL,
PRIMARY KEY (`sched_name`,`lock_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_locks
-- ----------------------------
INSERT INTO `qrtz_locks` VALUES ('RuoyiScheduler', 'STATE_ACCESS');
INSERT INTO `qrtz_locks` VALUES ('RuoyiScheduler', 'TRIGGER_ACCESS');
-- ----------------------------
-- Table structure for qrtz_paused_trigger_grps
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
CREATE TABLE `qrtz_paused_trigger_grps` (
`sched_name` varchar(120) NOT NULL,
`trigger_group` varchar(200) NOT NULL,
PRIMARY KEY (`sched_name`,`trigger_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_paused_trigger_grps
-- ----------------------------
-- ----------------------------
-- Table structure for qrtz_scheduler_state
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_scheduler_state`;
CREATE TABLE `qrtz_scheduler_state` (
`sched_name` varchar(120) NOT NULL,
`instance_name` varchar(200) NOT NULL,
`last_checkin_time` bigint(13) NOT NULL,
`checkin_interval` bigint(13) NOT NULL,
PRIMARY KEY (`sched_name`,`instance_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_scheduler_state
-- ----------------------------
INSERT INTO `qrtz_scheduler_state` VALUES ('RuoyiScheduler', 'WINDOWS-1AJ0RQQ1535710326372', '1535710344139', '15000');
-- ----------------------------
-- Table structure for qrtz_simple_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
CREATE TABLE `qrtz_simple_triggers` (
`sched_name` varchar(120) NOT NULL,
`trigger_name` varchar(200) NOT NULL,
`trigger_group` varchar(200) NOT NULL,
`repeat_count` bigint(7) NOT NULL,
`repeat_interval` bigint(12) NOT NULL,
`times_triggered` bigint(10) NOT NULL,
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`),
CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_simple_triggers
-- ----------------------------
-- ----------------------------
-- Table structure for qrtz_simprop_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
CREATE TABLE `qrtz_simprop_triggers` (
`sched_name` varchar(120) NOT NULL,
`trigger_name` varchar(200) NOT NULL,
`trigger_group` varchar(200) NOT NULL,
`str_prop_1` varchar(512) DEFAULT NULL,
`str_prop_2` varchar(512) DEFAULT NULL,
`str_prop_3` varchar(512) DEFAULT NULL,
`int_prop_1` int(11) DEFAULT NULL,
`int_prop_2` int(11) DEFAULT NULL,
`long_prop_1` bigint(20) DEFAULT NULL,
`long_prop_2` bigint(20) DEFAULT NULL,
`dec_prop_1` decimal(13,4) DEFAULT NULL,
`dec_prop_2` decimal(13,4) DEFAULT NULL,
`bool_prop_1` varchar(1) DEFAULT NULL,
`bool_prop_2` varchar(1) DEFAULT NULL,
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`),
CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_simprop_triggers
-- ----------------------------
-- ----------------------------
-- Table structure for qrtz_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_triggers`;
CREATE TABLE `qrtz_triggers` (
`sched_name` varchar(120) NOT NULL,
`trigger_name` varchar(200) NOT NULL,
`trigger_group` varchar(200) NOT NULL,
`job_name` varchar(200) NOT NULL,
`job_group` varchar(200) NOT NULL,
`description` varchar(250) DEFAULT NULL,
`next_fire_time` bigint(13) DEFAULT NULL,
`prev_fire_time` bigint(13) DEFAULT NULL,
`priority` int(11) DEFAULT NULL,
`trigger_state` varchar(16) NOT NULL,
`trigger_type` varchar(8) NOT NULL,
`start_time` bigint(13) NOT NULL,
`end_time` bigint(13) DEFAULT NULL,
`calendar_name` varchar(200) DEFAULT NULL,
`misfire_instr` smallint(2) DEFAULT NULL,
`job_data` blob,
PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`),
KEY `sched_name` (`sched_name`,`job_name`,`job_group`),
CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `job_name`, `job_group`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of qrtz_triggers
-- ----------------------------
INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', '__TASK_CLASS_NAME__1', 'DEFAULT', '__TASK_CLASS_NAME__1', 'DEFAULT', null, '1534762090000', '-1', '5', 'PAUSED', 'CRON', '1534762084000', '0', null, '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3130202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E697A0E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000174000672795461736B74000A72794E6F506172616D7374000074000130740001317800);
INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', '__TASK_CLASS_NAME__2', 'DEFAULT', '__TASK_CLASS_NAME__2', 'DEFAULT', null, '1534762100000', '-1', '5', 'PAUSED', 'CRON', '1534762084000', '0', null, '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3230202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E69C89E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000274000672795461736B7400087279506172616D73740002727974000130740001317800);
-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
`config_id` int(5) NOT NULL AUTO_INCREMENT COMMENT '参数主键',
`config_name` varchar(100) DEFAULT '' COMMENT '参数名称',
`config_key` varchar(100) DEFAULT '' COMMENT '参数键名',
`config_value` varchar(100) DEFAULT '' COMMENT '参数键值',
`config_type` char(1) DEFAULT 'N' COMMENT '系统内置(Y是 N否)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`config_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='参数配置表';
-- ----------------------------
-- Records of sys_config
-- ----------------------------
INSERT INTO `sys_config` VALUES ('1', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-default', 'Y', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '默认 skin-default、蓝色 skin-blue、黄色 skin-yellow');
INSERT INTO `sys_config` VALUES ('2', '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '初始化密码 123456');
-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
`dept_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '部门id',
`parent_id` int(11) DEFAULT '0' COMMENT '父部门id',
`ancestors` varchar(50) DEFAULT '' COMMENT '祖级列表',
`dept_name` varchar(30) DEFAULT '' COMMENT '部门名称',
`order_num` int(4) DEFAULT '0' COMMENT '显示顺序',
`leader` varchar(20) DEFAULT '' COMMENT '负责人',
`phone` varchar(11) DEFAULT '' COMMENT '联系电话',
`email` varchar(50) DEFAULT '' COMMENT '邮箱',
`status` char(1) DEFAULT '0' COMMENT '部门状态(0正常 1停用)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`dept_id`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='部门表';
-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO `sys_dept` VALUES ('100', '0', '0', '若依集团', '0', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('101', '100', '0,100', '研发部门', '1', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('102', '100', '0,100', '市场部门', '2', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('103', '100', '0,100', '测试部门', '3', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('104', '100', '0,100', '财务部门', '4', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('105', '100', '0,100', '运维部门', '5', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('106', '101', '0,100,101', '研发一部', '1', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('107', '101', '0,100,101', '研发二部', '2', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('108', '102', '0,100,102', '市场一部', '1', '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
INSERT INTO `sys_dept` VALUES ('109', '102', '0,100,102', '市场二部', '2', '若依', '15888888888', 'ry@qq.com', '1', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00');
-- ----------------------------
-- Table structure for sys_dict_data
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_data`;
CREATE TABLE `sys_dict_data` (
`dict_code` int(11) NOT NULL AUTO_INCREMENT COMMENT '字典编码',
`dict_sort` int(4) DEFAULT '0' COMMENT '字典排序',
`dict_label` varchar(100) DEFAULT '' COMMENT '字典标签',
`dict_value` varchar(100) DEFAULT '' COMMENT '字典键值',
`dict_type` varchar(100) DEFAULT '' COMMENT '字典类型',
`css_class` varchar(500) DEFAULT '' COMMENT '样式属性',
`list_class` varchar(500) DEFAULT '' COMMENT '回显样式',
`is_default` char(1) DEFAULT 'N' COMMENT '是否默认(Y是 N否)',
`status` char(1) DEFAULT '0' COMMENT '状态(0正常 1停用)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`dict_code`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COMMENT='字典数据表';
-- ----------------------------
-- Records of sys_dict_data
-- ----------------------------
INSERT INTO `sys_dict_data` VALUES ('1', '1', '男', '0', 'sys_user_sex', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '性别男');
INSERT INTO `sys_dict_data` VALUES ('2', '2', '女', '1', 'sys_user_sex', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '性别女');
INSERT INTO `sys_dict_data` VALUES ('3', '3', '未知', '2', 'sys_user_sex', 'radio radio-warning radio-inline', 'warning', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '性别未知');
INSERT INTO `sys_dict_data` VALUES ('4', '1', '显示', '0', 'sys_show_hide', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '显示菜单');
INSERT INTO `sys_dict_data` VALUES ('5', '2', '隐藏', '1', 'sys_show_hide', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '隐藏菜单');
INSERT INTO `sys_dict_data` VALUES ('6', '1', '正常', '0', 'sys_normal_disable', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '正常状态');
INSERT INTO `sys_dict_data` VALUES ('7', '2', '停用', '1', 'sys_normal_disable', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '停用状态');
INSERT INTO `sys_dict_data` VALUES ('8', '1', '正常', '0', 'sys_job_status', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '正常状态');
INSERT INTO `sys_dict_data` VALUES ('9', '2', '暂停', '1', 'sys_job_status', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '停用状态');
INSERT INTO `sys_dict_data` VALUES ('10', '1', '是', 'Y', 'sys_yes_no', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统默认是');
INSERT INTO `sys_dict_data` VALUES ('11', '2', '否', 'N', 'sys_yes_no', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统默认否');
INSERT INTO `sys_dict_data` VALUES ('12', '1', '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '通知');
INSERT INTO `sys_dict_data` VALUES ('13', '2', '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '公告');
INSERT INTO `sys_dict_data` VALUES ('14', '1', '正常', '0', 'sys_notice_status', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '正常状态');
INSERT INTO `sys_dict_data` VALUES ('15', '2', '关闭', '1', 'sys_notice_status', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '关闭状态');
INSERT INTO `sys_dict_data` VALUES ('16', '1', '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('17', '2', '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('18', '3', '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('19', '4', '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('20', '5', '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('21', '6', '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('22', '7', '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('23', '8', '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '新增操作');
INSERT INTO `sys_dict_data` VALUES ('24', '1', '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '正常状态');
INSERT INTO `sys_dict_data` VALUES ('25', '2', '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '停用状态');
INSERT INTO `sys_dict_data` VALUES ('26', '3', '所有', '2', 'sys_show_hide', '', '', 'Y', '0', 'admin', '2018-08-31 14:16:54', 'admin', '2018-08-31 14:17:38', '展示所有');
-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_type`;
CREATE TABLE `sys_dict_type` (
`dict_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '字典主键',
`dict_name` varchar(100) DEFAULT '' COMMENT '字典名称',
`dict_type` varchar(100) DEFAULT '' COMMENT '字典类型',
`status` char(1) DEFAULT '0' COMMENT '状态(0正常 1停用)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`dict_id`),
UNIQUE KEY `dict_type` (`dict_type`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='字典类型表';
-- ----------------------------
-- Records of sys_dict_type
-- ----------------------------
INSERT INTO `sys_dict_type` VALUES ('1', '用户性别', 'sys_user_sex', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '用户性别列表');
INSERT INTO `sys_dict_type` VALUES ('2', '菜单状态', 'sys_show_hide', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '菜单状态列表');
INSERT INTO `sys_dict_type` VALUES ('3', '系统开关', 'sys_normal_disable', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统开关列表');
INSERT INTO `sys_dict_type` VALUES ('4', '任务状态', 'sys_job_status', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '任务状态列表');
INSERT INTO `sys_dict_type` VALUES ('5', '系统是否', 'sys_yes_no', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统是否列表');
INSERT INTO `sys_dict_type` VALUES ('6', '通知类型', 'sys_notice_type', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '通知类型列表');
INSERT INTO `sys_dict_type` VALUES ('7', '通知状态', 'sys_notice_status', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '通知状态列表');
INSERT INTO `sys_dict_type` VALUES ('8', '操作类型', 'sys_oper_type', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '操作类型列表');
INSERT INTO `sys_dict_type` VALUES ('9', '系统状态', 'sys_common_status', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '登录状态列表');
-- ----------------------------
-- Table structure for sys_job
-- ----------------------------
DROP TABLE IF EXISTS `sys_job`;
CREATE TABLE `sys_job` (
`job_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务ID',
`job_name` varchar(64) NOT NULL DEFAULT '' COMMENT '任务名称',
`job_group` varchar(64) NOT NULL DEFAULT '' COMMENT '任务组名',
`method_name` varchar(500) DEFAULT '' COMMENT '任务方法',
`method_params` varchar(200) DEFAULT '' COMMENT '方法参数',
`cron_expression` varchar(255) DEFAULT '' COMMENT 'cron执行表达式',
`misfire_policy` varchar(20) DEFAULT '0' COMMENT '计划执行错误策略(0默认 1继续 2等待 3放弃)',
`status` char(1) DEFAULT '0' COMMENT '状态(0正常 1暂停)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注信息',
PRIMARY KEY (`job_id`,`job_name`,`job_group`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='定时任务调度表';
-- ----------------------------
-- Records of sys_job
-- ----------------------------
INSERT INTO `sys_job` VALUES ('1', 'ryTask', '系统默认(无参)', 'ryNoParams', '', '0/10 * * * * ?', '0', '1', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_job` VALUES ('2', 'ryTask', '系统默认(有参)', 'ryParams', 'ry', '0/20 * * * * ?', '0', '1', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
-- ----------------------------
-- Table structure for sys_job_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_job_log`;
CREATE TABLE `sys_job_log` (
`job_log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID',
`job_name` varchar(64) NOT NULL COMMENT '任务名称',
`job_group` varchar(64) NOT NULL COMMENT '任务组名',
`method_name` varchar(500) DEFAULT NULL COMMENT '任务方法',
`method_params` varchar(200) DEFAULT '' COMMENT '方法参数',
`job_message` varchar(500) DEFAULT NULL COMMENT '日志信息',
`status` char(1) DEFAULT '0' COMMENT '执行状态(0正常 1失败)',
`exception_info` text COMMENT '异常信息',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`job_log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='定时任务调度日志表';
-- ----------------------------
-- Records of sys_job_log
-- ----------------------------
-- ----------------------------
-- Table structure for sys_logininfor
-- ----------------------------
DROP TABLE IF EXISTS `sys_logininfor`;
CREATE TABLE `sys_logininfor` (
`info_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '访问ID',
`login_name` varchar(50) DEFAULT '' COMMENT '登录账号',
`ipaddr` varchar(50) DEFAULT '' COMMENT '登录IP地址',
`login_location` varchar(255) DEFAULT '' COMMENT '登录地点',
`browser` varchar(50) DEFAULT '' COMMENT '浏览器类型',
`os` varchar(50) DEFAULT '' COMMENT '操作系统',
`status` char(1) DEFAULT '0' COMMENT '登录状态(0成功 1失败)',
`msg` varchar(255) DEFAULT '' COMMENT '提示消息',
`login_time` datetime DEFAULT NULL COMMENT '访问时间',
PRIMARY KEY (`info_id`)
) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=utf8 COMMENT='系统访问记录';
-- ----------------------------
-- Records of sys_logininfor
-- ----------------------------
INSERT INTO `sys_logininfor` VALUES ('100', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 18:48:32');
INSERT INTO `sys_logininfor` VALUES ('101', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 20:21:14');
INSERT INTO `sys_logininfor` VALUES ('102', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 22:26:53');
INSERT INTO `sys_logininfor` VALUES ('103', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 22:57:32');
INSERT INTO `sys_logininfor` VALUES ('104', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:04:33');
INSERT INTO `sys_logininfor` VALUES ('105', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:16:31');
INSERT INTO `sys_logininfor` VALUES ('106', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:22:36');
INSERT INTO `sys_logininfor` VALUES ('107', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:28:35');
INSERT INTO `sys_logininfor` VALUES ('108', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:30:50');
INSERT INTO `sys_logininfor` VALUES ('109', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:38:06');
INSERT INTO `sys_logininfor` VALUES ('110', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:53:38');
INSERT INTO `sys_logininfor` VALUES ('111', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-20 23:59:35');
INSERT INTO `sys_logininfor` VALUES ('112', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 00:04:34');
INSERT INTO `sys_logininfor` VALUES ('113', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 00:24:19');
INSERT INTO `sys_logininfor` VALUES ('114', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '退出成功', '2018-08-21 00:26:58');
INSERT INTO `sys_logininfor` VALUES ('115', 'lzw', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 00:27:12');
INSERT INTO `sys_logininfor` VALUES ('116', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 00:32:20');
INSERT INTO `sys_logininfor` VALUES ('117', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-21 00:37:39');
INSERT INTO `sys_logininfor` VALUES ('118', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-21 00:37:41');
INSERT INTO `sys_logininfor` VALUES ('119', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 00:37:45');
INSERT INTO `sys_logininfor` VALUES ('120', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 21:11:55');
INSERT INTO `sys_logininfor` VALUES ('121', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 21:46:05');
INSERT INTO `sys_logininfor` VALUES ('122', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 21:46:47');
INSERT INTO `sys_logininfor` VALUES ('123', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 21:55:31');
INSERT INTO `sys_logininfor` VALUES ('124', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-21 21:56:33');
INSERT INTO `sys_logininfor` VALUES ('125', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 21:56:37');
INSERT INTO `sys_logininfor` VALUES ('126', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 22:03:50');
INSERT INTO `sys_logininfor` VALUES ('127', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 22:56:32');
INSERT INTO `sys_logininfor` VALUES ('128', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:03:30');
INSERT INTO `sys_logininfor` VALUES ('129', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:06:51');
INSERT INTO `sys_logininfor` VALUES ('130', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:14:18');
INSERT INTO `sys_logininfor` VALUES ('131', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:28:26');
INSERT INTO `sys_logininfor` VALUES ('132', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:30:15');
INSERT INTO `sys_logininfor` VALUES ('133', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-21 23:35:35');
INSERT INTO `sys_logininfor` VALUES ('134', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:35:39');
INSERT INTO `sys_logininfor` VALUES ('135', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:41:26');
INSERT INTO `sys_logininfor` VALUES ('136', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:45:32');
INSERT INTO `sys_logininfor` VALUES ('137', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:48:18');
INSERT INTO `sys_logininfor` VALUES ('138', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-21 23:51:02');
INSERT INTO `sys_logininfor` VALUES ('139', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:07:26');
INSERT INTO `sys_logininfor` VALUES ('140', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:14:16');
INSERT INTO `sys_logininfor` VALUES ('141', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:20:05');
INSERT INTO `sys_logininfor` VALUES ('142', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:31:53');
INSERT INTO `sys_logininfor` VALUES ('143', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:36:54');
INSERT INTO `sys_logininfor` VALUES ('144', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:49:37');
INSERT INTO `sys_logininfor` VALUES ('145', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:51:52');
INSERT INTO `sys_logininfor` VALUES ('146', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 00:57:29');
INSERT INTO `sys_logininfor` VALUES ('147', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-22 17:12:05');
INSERT INTO `sys_logininfor` VALUES ('148', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 09:06:11');
INSERT INTO `sys_logininfor` VALUES ('149', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 11:02:13');
INSERT INTO `sys_logininfor` VALUES ('150', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 11:08:54');
INSERT INTO `sys_logininfor` VALUES ('151', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 12:53:01');
INSERT INTO `sys_logininfor` VALUES ('152', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 16:23:46');
INSERT INTO `sys_logininfor` VALUES ('153', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-30 16:29:56');
INSERT INTO `sys_logininfor` VALUES ('154', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 16:29:59');
INSERT INTO `sys_logininfor` VALUES ('155', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 16:32:59');
INSERT INTO `sys_logininfor` VALUES ('156', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-30 17:31:36');
INSERT INTO `sys_logininfor` VALUES ('157', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 10:01:57');
INSERT INTO `sys_logininfor` VALUES ('158', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 10:06:56');
INSERT INTO `sys_logininfor` VALUES ('159', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-31 10:09:54');
INSERT INTO `sys_logininfor` VALUES ('160', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 10:09:56');
INSERT INTO `sys_logininfor` VALUES ('161', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 13:34:13');
INSERT INTO `sys_logininfor` VALUES ('162', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '退出成功', '2018-08-31 13:49:37');
INSERT INTO `sys_logininfor` VALUES ('163', 'lzw', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '密码输入错误1次,123456', '2018-08-31 13:49:47');
INSERT INTO `sys_logininfor` VALUES ('164', 'lzw', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-31 13:49:58');
INSERT INTO `sys_logininfor` VALUES ('165', 'lzw', '127.0.0.1', '', 'Chrome', 'Windows 7', '1', '验证码错误', '2018-08-31 13:50:01');
INSERT INTO `sys_logininfor` VALUES ('166', 'lzw', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 13:50:11');
INSERT INTO `sys_logininfor` VALUES ('167', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 14:08:16');
INSERT INTO `sys_logininfor` VALUES ('168', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 14:11:52');
INSERT INTO `sys_logininfor` VALUES ('169', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '退出成功', '2018-08-31 14:12:28');
INSERT INTO `sys_logininfor` VALUES ('170', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 14:12:30');
INSERT INTO `sys_logininfor` VALUES ('171', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '退出成功', '2018-08-31 14:12:32');
INSERT INTO `sys_logininfor` VALUES ('172', 'lzw', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 14:12:47');
INSERT INTO `sys_logininfor` VALUES ('173', 'lzw', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '退出成功', '2018-08-31 14:15:27');
INSERT INTO `sys_logininfor` VALUES ('174', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 14:15:30');
INSERT INTO `sys_logininfor` VALUES ('175', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 15:21:35');
INSERT INTO `sys_logininfor` VALUES ('176', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 16:30:07');
INSERT INTO `sys_logininfor` VALUES ('177', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 16:33:02');
INSERT INTO `sys_logininfor` VALUES ('178', 'admin', '127.0.0.1', '', 'Chrome', 'Windows 7', '0', '登录成功', '2018-08-31 17:03:59');
-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`menu_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
`menu_name` varchar(50) NOT NULL COMMENT '菜单名称',
`parent_id` int(11) DEFAULT '0' COMMENT '父菜单ID',
`order_num` int(4) DEFAULT NULL COMMENT '显示顺序',
`url` varchar(200) DEFAULT '' COMMENT '请求地址',
`menu_type` char(1) DEFAULT '' COMMENT '菜单类型(M目录 C菜单 F按钮)',
`visible` char(1) NOT NULL COMMENT '菜单状态(0显示 1隐藏)',
`perms` varchar(100) DEFAULT '' COMMENT '权限标识',
`icon` varchar(100) DEFAULT '' COMMENT '菜单图标',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2008 DEFAULT CHARSET=utf8 COMMENT='菜单权限表';
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES ('1', '系统管理', '0', '1', '#', 'M', '0', '', 'fa fa-gear', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统管理目录');
INSERT INTO `sys_menu` VALUES ('2', '系统监控', '0', '2', '#', 'M', '0', '', 'fa fa-video-camera', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统监控目录');
INSERT INTO `sys_menu` VALUES ('3', '系统工具', '0', '3', '#', 'M', '0', '', 'fa fa-bars', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统工具目录');
INSERT INTO `sys_menu` VALUES ('100', '用户管理', '1', '1', '/system/user', 'C', '0', 'system:user:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '用户管理菜单');
INSERT INTO `sys_menu` VALUES ('101', '角色管理', '1', '2', '/system/role', 'C', '0', 'system:role:view', '#', 'admin', '2018-03-16 11:33:00', 'admin', '2018-08-21 00:06:28', '角色管理菜单');
INSERT INTO `sys_menu` VALUES ('102', '菜单管理', '1', '3', '/system/menu', 'C', '0', 'system:menu:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '菜单管理菜单');
INSERT INTO `sys_menu` VALUES ('103', '部门管理', '1', '4', '/system/dept', 'C', '0', 'system:dept:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '部门管理菜单');
INSERT INTO `sys_menu` VALUES ('104', '岗位管理', '1', '5', '/system/post', 'C', '0', 'system:post:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '岗位管理菜单');
INSERT INTO `sys_menu` VALUES ('105', '字典管理', '1', '6', '/system/dict', 'C', '0', 'system:dict:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '字典管理菜单');
INSERT INTO `sys_menu` VALUES ('106', '参数设置', '1', '7', '/system/config', 'C', '0', 'system:config:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '参数设置菜单');
INSERT INTO `sys_menu` VALUES ('107', '通知公告', '1', '8', '/system/notice', 'C', '0', 'system:notice:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '通知公告菜单');
INSERT INTO `sys_menu` VALUES ('108', '日志管理', '1', '9', '#', 'M', '0', '', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '日志管理菜单');
INSERT INTO `sys_menu` VALUES ('109', '在线用户', '2', '1', '/monitor/online', 'C', '0', 'monitor:online:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '在线用户菜单');
INSERT INTO `sys_menu` VALUES ('110', '定时任务', '2', '2', '/monitor/job', 'C', '0', 'monitor:job:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '定时任务菜单');
INSERT INTO `sys_menu` VALUES ('111', '数据监控', '2', '3', '/monitor/data', 'C', '0', 'monitor:data:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '数据监控菜单');
INSERT INTO `sys_menu` VALUES ('112', '表单构建', '3', '1', '/tool/build', 'C', '0', 'tool:build:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '表单构建菜单');
INSERT INTO `sys_menu` VALUES ('113', '代码生成', '3', '2', '/tool/gen', 'C', '0', 'tool:gen:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '代码生成菜单');
INSERT INTO `sys_menu` VALUES ('114', '系统接口', '3', '3', '/tool/swagger', 'C', '0', 'tool:swagger:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '系统接口菜单');
INSERT INTO `sys_menu` VALUES ('500', '操作日志', '108', '1', '/monitor/operlog', 'C', '0', 'monitor:operlog:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '操作日志菜单');
INSERT INTO `sys_menu` VALUES ('501', '登录日志', '108', '2', '/monitor/logininfor', 'C', '0', 'monitor:logininfor:view', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '登录日志菜单');
INSERT INTO `sys_menu` VALUES ('1000', '用户查询', '100', '1', '#', 'F', '0', 'system:user:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1001', '用户新增', '100', '2', '#', 'F', '0', 'system:user:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1002', '用户修改', '100', '3', '#', 'F', '0', 'system:user:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1003', '用户删除', '100', '4', '#', 'F', '0', 'system:user:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1004', '用户导出', '100', '5', '#', 'F', '0', 'system:user:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1005', '重置密码', '100', '5', '#', 'F', '0', 'system:user:resetPwd', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1006', '角色查询', '101', '1', '#', 'F', '0', 'system:role:list', '#', 'admin', '2018-03-16 11:33:00', 'admin', '2018-08-21 00:08:13', '');
INSERT INTO `sys_menu` VALUES ('1007', '角色新增', '101', '2', '#', 'F', '0', 'system:role:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1008', '角色修改', '101', '3', '#', 'F', '0', 'system:role:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1009', '角色删除', '101', '4', '#', 'F', '0', 'system:role:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1010', '角色导出', '101', '4', '#', 'F', '0', 'system:role:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1011', '菜单查询', '102', '1', '#', 'F', '0', 'system:menu:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1012', '菜单新增', '102', '2', '#', 'F', '0', 'system:menu:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1013', '菜单修改', '102', '3', '#', 'F', '0', 'system:menu:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1014', '菜单删除', '102', '4', '#', 'F', '0', 'system:menu:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1015', '部门查询', '103', '1', '#', 'F', '0', 'system:dept:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1016', '部门新增', '103', '2', '#', 'F', '0', 'system:dept:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1017', '部门修改', '103', '3', '#', 'F', '0', 'system:dept:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1018', '部门删除', '103', '4', '#', 'F', '0', 'system:dept:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1019', '岗位查询', '104', '1', '#', 'F', '0', 'system:post:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1020', '岗位新增', '104', '2', '#', 'F', '0', 'system:post:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1021', '岗位修改', '104', '3', '#', 'F', '0', 'system:post:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1022', '岗位删除', '104', '4', '#', 'F', '0', 'system:post:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1023', '岗位导出', '104', '4', '#', 'F', '0', 'system:post:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1024', '字典查询', '105', '1', '#', 'F', '0', 'system:dict:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1025', '字典新增', '105', '2', '#', 'F', '0', 'system:dict:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1026', '字典修改', '105', '3', '#', 'F', '0', 'system:dict:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1027', '字典删除', '105', '4', '#', 'F', '0', 'system:dict:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1028', '字典导出', '105', '4', '#', 'F', '0', 'system:dict:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1029', '参数查询', '106', '1', '#', 'F', '0', 'system:config:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1030', '参数新增', '106', '2', '#', 'F', '0', 'system:config:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1031', '参数修改', '106', '3', '#', 'F', '0', 'system:config:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1032', '参数删除', '106', '4', '#', 'F', '0', 'system:config:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1033', '参数导出', '106', '4', '#', 'F', '0', 'system:config:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1034', '公告查询', '107', '1', '#', 'F', '0', 'system:notice:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1035', '公告新增', '107', '2', '#', 'F', '0', 'system:notice:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1036', '公告修改', '107', '3', '#', 'F', '0', 'system:notice:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1037', '公告删除', '107', '4', '#', 'F', '0', 'system:notice:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1038', '操作查询', '500', '1', '#', 'F', '0', 'monitor:operlog:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1039', '操作删除', '500', '2', '#', 'F', '0', 'monitor:operlog:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1040', '详细信息', '500', '3', '#', 'F', '0', 'monitor:operlog:detail', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1041', '日志导出', '500', '3', '#', 'F', '0', 'monitor:operlog:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1042', '登录查询', '501', '1', '#', 'F', '0', 'monitor:logininfor:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1043', '登录删除', '501', '2', '#', 'F', '0', 'monitor:logininfor:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1044', '日志导出', '501', '2', '#', 'F', '0', 'monitor:logininfor:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1045', '在线查询', '109', '1', '#', 'F', '0', 'monitor:online:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1046', '批量强退', '109', '2', '#', 'F', '0', 'monitor:online:batchForceLogout', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1047', '单条强退', '109', '3', '#', 'F', '0', 'monitor:online:forceLogout', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1048', '任务查询', '110', '1', '#', 'F', '0', 'monitor:job:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1049', '任务新增', '110', '2', '#', 'F', '0', 'monitor:job:add', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1050', '任务修改', '110', '3', '#', 'F', '0', 'monitor:job:edit', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1051', '任务删除', '110', '4', '#', 'F', '0', 'monitor:job:remove', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1052', '状态修改', '110', '5', '#', 'F', '0', 'monitor:job:changeStatus', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1053', '任务导出', '110', '5', '#', 'F', '0', 'monitor:job:export', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1054', '生成查询', '113', '1', '#', 'F', '0', 'tool:gen:list', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('1055', '生成代码', '113', '2', '#', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_menu` VALUES ('2000', '个人中心', '0', '4', '', 'M', '0', '', 'fa fa-map', 'admin', '2018-08-20 22:59:22', 'admin', '2018-08-20 23:02:21', '');
INSERT INTO `sys_menu` VALUES ('2001', '客户管理', '2000', '1', '/hundsun/custinfo', 'C', '0', 'hundsun:custinfo:view', '', 'admin', '2018-08-20 23:01:00', 'admin', '2018-08-21 00:19:26', '');
INSERT INTO `sys_menu` VALUES ('2002', '客户查询', '2001', '1', '', 'F', '0', 'hundsun:custinfo:select', '', 'admin', '2018-08-21 00:17:32', 'admin', '2018-08-21 00:23:05', '');
INSERT INTO `sys_menu` VALUES ('2003', '客户新增', '2001', '2', '', 'F', '0', 'hundsun:custinfo:add', '', 'admin', '2018-08-21 22:58:31', '', null, '');
INSERT INTO `sys_menu` VALUES ('2005', '正常客户显示', '2001', '3', '', 'F', '0', 'hundsun:custinfo:check', '', 'admin', '2018-08-31 13:48:51', '', null, '');
INSERT INTO `sys_menu` VALUES ('2006', '客户编辑', '2001', '4', '', 'F', '0', 'hundsun:custinfo:edit', '', 'admin', '2018-08-31 16:07:48', '', null, '');
INSERT INTO `sys_menu` VALUES ('2007', '客户删除', '2001', '5', '', 'F', '0', 'hundsun:custinfo:remove', '', 'admin', '2018-08-31 16:08:23', '', null, '');
-- ----------------------------
-- Table structure for sys_notice
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice`;
CREATE TABLE `sys_notice` (
`notice_id` int(4) NOT NULL AUTO_INCREMENT COMMENT '公告ID',
`notice_title` varchar(50) NOT NULL COMMENT '公告标题',
`notice_type` char(2) NOT NULL COMMENT '公告类型(1通知 2公告)',
`notice_content` varchar(500) NOT NULL COMMENT '公告内容',
`status` char(1) DEFAULT '0' COMMENT '公告状态(0正常 1关闭)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(255) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`notice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='通知公告表';
-- ----------------------------
-- Records of sys_notice
-- ----------------------------
INSERT INTO `sys_notice` VALUES ('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '管理员');
INSERT INTO `sys_notice` VALUES ('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '管理员');
-- ----------------------------
-- Table structure for sys_oper_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_oper_log`;
CREATE TABLE `sys_oper_log` (
`oper_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '日志主键',
`title` varchar(50) DEFAULT '' COMMENT '模块标题',
`action` varchar(100) DEFAULT '' COMMENT '功能请求',
`method` varchar(100) DEFAULT '' COMMENT '方法名称',
`channel` varchar(20) DEFAULT '' COMMENT '来源渠道(manage后台用户 mobile手机端用户 other其它)',
`oper_name` varchar(50) DEFAULT '' COMMENT '操作人员',
`dept_name` varchar(50) DEFAULT '' COMMENT '部门名称',
`oper_url` varchar(255) DEFAULT '' COMMENT '请求URL',
`oper_ip` varchar(30) DEFAULT '' COMMENT '主机地址',
`oper_location` varchar(255) DEFAULT '' COMMENT '操作地点',
`oper_param` varchar(255) DEFAULT '' COMMENT '请求参数',
`status` char(1) DEFAULT '0' COMMENT '操作状态(0正常 1异常)',
`error_msg` varchar(2000) DEFAULT '' COMMENT '错误消息',
`oper_time` datetime DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`oper_id`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8 COMMENT='操作日志记录';
-- ----------------------------
-- Records of sys_oper_log
-- ----------------------------
INSERT INTO `sys_oper_log` VALUES ('100', '用户管理', '1', 'com.ruoyi.project.system.user.controller.UserController.addSave()', '1', 'admin', '研发一部', '/system/user/add', '127.0.0.1', '', '{\"deptId\":[\"106\"],\"loginName\":[\"lzw\"],\"userName\":[\"依然范特西\"],\"password\":[\"19950724lzw\"],\"email\":[\"a1774214410@163.com\"],\"phonenumber\":[\"13588439394\"],\"sex\":[\"0\"],\"status\":[\"0\"],\"roleIds\":[\"2\"],\"postIds\":[\"2\"]}', '0', null, '2018-08-20 21:16:41');
INSERT INTO `sys_oper_log` VALUES ('101', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"0\"],\"menuType\":[\"M\"],\"menuName\":[\"个人中心\"],\"url\":[\"\"],\"perms\":[\"\"],\"orderNum\":[\"1\"],\"icon\":[\"fa fa-map\"],\"visible\":[\"0\"]}', '0', null, '2018-08-20 22:59:22');
INSERT INTO `sys_oper_log` VALUES ('102', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"2000\"],\"menuType\":[\"C\"],\"menuName\":[\"客户管理\"],\"url\":[\"/hundsun/custinfo\"],\"perms\":[\"hundusn:custinfo:view\"],\"orderNum\":[\"1\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-20 23:01:00');
INSERT INTO `sys_oper_log` VALUES ('103', '角色管理', '2', 'com.ruoyi.project.system.role.controller.RoleController.editSave()', '1', 'admin', '研发一部', '/system/role/edit', '127.0.0.1', '', '{\"roleId\":[\"1\"],\"roleName\":[\"管理员\"],\"roleKey\":[\"admin\"],\"roleSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"管理员\"],\"menuIds\":[\"1,100,1000,1001,1002,1003,1004,1005,101,1006,1007,1008,1009,1010,102,1011,1012,1013,1014,103,1015,1016,1017,1018,104,1019,1020,1021,1022,10', '0', null, '2018-08-20 23:01:33');
INSERT INTO `sys_oper_log` VALUES ('104', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"2000\"],\"parentId\":[\"0\"],\"menuType\":[\"M\"],\"menuName\":[\"个人中心\"],\"url\":[\"\"],\"perms\":[\"\"],\"orderNum\":[\"4\"],\"icon\":[\"fa fa-map\"],\"visible\":[\"0\"]}', '0', null, '2018-08-20 23:02:21');
INSERT INTO `sys_oper_log` VALUES ('105', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"2001\"],\"parentId\":[\"2000\"],\"menuType\":[\"C\"],\"menuName\":[\"客户管理\"],\"url\":[\"/hundsun/custinfo\"],\"perms\":[\"hundsun:custinfo:view\"],\"orderNum\":[\"4\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-20 23:09:45');
INSERT INTO `sys_oper_log` VALUES ('106', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"2001\"],\"parentId\":[\"2000\"],\"menuType\":[\"C\"],\"menuName\":[\"客户管理\"],\"url\":[\"/hundsun/custinfo\"],\"perms\":[\"hundsun:custinfo:view1\"],\"orderNum\":[\"4\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-20 23:56:01');
INSERT INTO `sys_oper_log` VALUES ('107', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"2001\"],\"parentId\":[\"2000\"],\"menuType\":[\"C\"],\"menuName\":[\"客户管理\"],\"url\":[\"/hundsun/custinfo\"],\"perms\":[\"hundsun:custinfo:view\"],\"orderNum\":[\"4\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-20 23:56:19');
INSERT INTO `sys_oper_log` VALUES ('108', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"101\"],\"parentId\":[\"1\"],\"menuType\":[\"C\"],\"menuName\":[\"角色管理\"],\"url\":[\"/system/role\"],\"perms\":[\"system:role:view1\"],\"orderNum\":[\"2\"],\"icon\":[\"#\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:06:09');
INSERT INTO `sys_oper_log` VALUES ('109', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"101\"],\"parentId\":[\"1\"],\"menuType\":[\"C\"],\"menuName\":[\"角色管理\"],\"url\":[\"/system/role\"],\"perms\":[\"system:role:view\"],\"orderNum\":[\"2\"],\"icon\":[\"#\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:06:28');
INSERT INTO `sys_oper_log` VALUES ('110', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"1006\"],\"parentId\":[\"101\"],\"menuType\":[\"F\"],\"menuName\":[\"角色查询\"],\"url\":[\"#\"],\"perms\":[\"system:role:list1\"],\"orderNum\":[\"1\"],\"icon\":[\"#\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:06:51');
INSERT INTO `sys_oper_log` VALUES ('111', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"1006\"],\"parentId\":[\"101\"],\"menuType\":[\"F\"],\"menuName\":[\"角色查询\"],\"url\":[\"#\"],\"perms\":[\"system:role:list\"],\"orderNum\":[\"1\"],\"icon\":[\"#\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:08:13');
INSERT INTO `sys_oper_log` VALUES ('112', '角色管理', '5', 'com.ruoyi.project.system.role.controller.RoleController.export()', '1', 'admin', '研发一部', '/system/role/export', '127.0.0.1', '', '{\"roleName\":[\"\"],\"roleKey\":[\"\"],\"status\":[\"\"],\"params[beginTime]\":[\"\"],\"params[endTime]\":[\"\"]}', '0', null, '2018-08-21 00:10:34');
INSERT INTO `sys_oper_log` VALUES ('113', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"2001\"],\"menuType\":[\"F\"],\"menuName\":[\"查询\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:list\"],\"orderNum\":[\"1\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:17:32');
INSERT INTO `sys_oper_log` VALUES ('114', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"2001\"],\"parentId\":[\"2000\"],\"menuType\":[\"C\"],\"menuName\":[\"客户管理\"],\"url\":[\"/hundsun/custinfo\"],\"perms\":[\"hundsun:custinfo:view\"],\"orderNum\":[\"1\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:19:26');
INSERT INTO `sys_oper_log` VALUES ('115', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"2002\"],\"parentId\":[\"2001\"],\"menuType\":[\"F\"],\"menuName\":[\"客户查询\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:list\"],\"orderNum\":[\"1\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:19:46');
INSERT INTO `sys_oper_log` VALUES ('116', '菜单管理', '2', 'com.ruoyi.project.system.menu.controller.MenuController.editSave()', '1', 'admin', '研发一部', '/system/menu/edit', '127.0.0.1', '', '{\"menuId\":[\"2002\"],\"parentId\":[\"2001\"],\"menuType\":[\"F\"],\"menuName\":[\"客户查询\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:select\"],\"orderNum\":[\"1\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 00:23:05');
INSERT INTO `sys_oper_log` VALUES ('117', '角色管理', '2', 'com.ruoyi.project.system.role.controller.RoleController.editSave()', '1', 'admin', '研发一部', '/system/role/edit', '127.0.0.1', '', '{\"roleId\":[\"1\"],\"roleName\":[\"管理员\"],\"roleKey\":[\"admin\"],\"roleSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"管理员\"],\"menuIds\":[\"1,100,1000,1001,1002,1003,1004,1005,101,1006,1007,1008,1009,1010,102,1011,1012,1013,1014,103,1015,1016,1017,1018,104,1019,1020,1021,1022,10', '0', null, '2018-08-21 00:25:14');
INSERT INTO `sys_oper_log` VALUES ('118', '角色管理', '2', 'com.ruoyi.project.system.role.controller.RoleController.editSave()', '1', 'admin', '研发一部', '/system/role/edit', '127.0.0.1', '', '{\"roleId\":[\"1\"],\"roleName\":[\"管理员\"],\"roleKey\":[\"admin\"],\"roleSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"管理员\"],\"menuIds\":[\"1,100,1000,1001,1002,1003,1004,1005,101,1006,1007,1008,1009,1010,102,1011,1012,1013,1014,103,1015,1016,1017,1018,104,1019,1020,1021,1022,10', '0', null, '2018-08-21 00:25:38');
INSERT INTO `sys_oper_log` VALUES ('119', '用户管理', '2', 'com.ruoyi.project.system.user.controller.UserController.editSave()', '1', 'admin', '研发一部', '/system/user/edit', '127.0.0.1', '', '{\"userId\":[\"100\"],\"deptId\":[\"106\"],\"userName\":[\"依然范特西\"],\"email\":[\"a1774214410@163.com\"],\"phonenumber\":[\"13588439394\"],\"sex\":[\"0\"],\"status\":[\"0\"],\"roleIds\":[\"2\"],\"postIds\":[\"2\"]}', '0', null, '2018-08-21 00:26:40');
INSERT INTO `sys_oper_log` VALUES ('120', '角色管理', '2', 'com.ruoyi.project.system.role.controller.RoleController.editSave()', '1', 'admin', '研发一部', '/system/role/edit', '127.0.0.1', '', '{\"roleId\":[\"2\"],\"roleName\":[\"普通角色\"],\"roleKey\":[\"common\"],\"roleSort\":[\"2\"],\"status\":[\"0\"],\"remark\":[\"普通角色\"],\"menuIds\":[\"1,100,1000,1001,1002,1003,1004,1005,101,1006,1007,1008,1009,1010,102,1011,1012,1013,1014,103,1015,1016,1017,1018,104,1019,1020,1021,1022', '0', null, '2018-08-21 00:26:56');
INSERT INTO `sys_oper_log` VALUES ('121', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/hundsun/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"2001\"],\"menuType\":[\"F\"],\"menuName\":[\"客户新增\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:add\"],\"orderNum\":[\"2\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-21 22:58:31');
INSERT INTO `sys_oper_log` VALUES ('122', '角色管理', '2', 'com.ruoyi.project.system.role.controller.RoleController.editSave()', '1', 'admin', '研发一部', '/hundsun/system/role/edit', '127.0.0.1', '', '{\"roleId\":[\"1\"],\"roleName\":[\"管理员\"],\"roleKey\":[\"admin\"],\"roleSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"管理员\"],\"menuIds\":[\"1,100,1000,1001,1002,1003,1004,1005,101,1006,1007,1008,1009,1010,102,1011,1012,1013,1014,103,1015,1016,1017,1018,104,1019,1020,1021,1022,10', '0', null, '2018-08-21 22:58:46');
INSERT INTO `sys_oper_log` VALUES ('123', '岗位管理', '1', 'com.ruoyi.project.system.post.controller.PostController.addSave()', '1', 'admin', '研发一部', '/hundsun/system/post/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"]}', '1', '\r\n### Error updating database. Cause: java.sql.SQLException: Field \'post_code\' doesn\'t have a default value\r\n### The error may involve com.ruoyi.project.system.post.mapper.PostMapper.insertPost-Inline\r\n### The error occurred while setting parameters\r\n### SQL: insert into sys_post( create_by, create_time )values( ?, sysdate() )\r\n### Cause: java.sql.SQLException: Field \'post_code\' doesn\'t have a default value\n; ]; Field \'post_code\' doesn\'t have a default value; nested exception is java.sql.SQLException: Field \'post_code\' doesn\'t have a default value', '2018-08-21 23:04:35');
INSERT INTO `sys_oper_log` VALUES ('124', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"]}', '1', '\r\n### Error updating database. Cause: java.sql.SQLException: Field \'id\' doesn\'t have a default value\r\n### The error may involve com.ruoyi.project.hundsun.custinfo.mapper.CustinfoMapper.addOne-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO custinfo( ) values( )\r\n### Cause: java.sql.SQLException: Field \'id\' doesn\'t have a default value\n; ]; Field \'id\' doesn\'t have a default value; nested exception is java.sql.SQLException: Field \'id\' doesn\'t have a default value', '2018-08-21 23:14:37');
INSERT INTO `sys_oper_log` VALUES ('125', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"]}', '0', null, '2018-08-21 23:16:04');
INSERT INTO `sys_oper_log` VALUES ('126', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"]}', '0', null, '2018-08-21 23:36:12');
INSERT INTO `sys_oper_log` VALUES ('127', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"],\"status\":[\"0\"]}', '1', 'nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression \'name != null and name != ’‘\'. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: name != null and name != ’‘ [org.apache.ibatis.ognl.TokenMgrError: Lexical error at line 1, column 26. Encountered: \"\\u2019\" (8217), after : \"\"]', '2018-08-21 23:41:57');
INSERT INTO `sys_oper_log` VALUES ('128', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"],\"status\":[\"0\"]}', '1', 'nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression \'name != null and name != ’‘\'. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: name != null and name != ’‘ [org.apache.ibatis.ognl.TokenMgrError: Lexical error at line 1, column 26. Encountered: \"\\u2019\" (8217), after : \"\"]', '2018-08-21 23:45:59');
INSERT INTO `sys_oper_log` VALUES ('129', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"123\"],\"gender\":[\"123\"],\"age\":[\"123\"],\"address\":[\"123\"],\"phone\":[\"123\"],\"imageaddr\":[\"13\"],\"status\":[\"0\"]}', '1', 'nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression \'name != null and name != ’‘\'. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: name != null and name != ’‘ [org.apache.ibatis.ognl.TokenMgrError: Lexical error at line 1, column 26. Encountered: \"\\u2019\" (8217), after : \"\"]', '2018-08-21 23:46:38');
INSERT INTO `sys_oper_log` VALUES ('130', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"],\"status\":[\"0\"]}', '1', '\r\n### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10\r\n### The error may involve com.ruoyi.project.hundsun.custinfo.mapper.CustinfoMapper.addOne-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO custinfo( name, gender, age, address, phone, imageaddr, status, ) values( ?, ?, ?, ?, ?, ?, ? )\r\n### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10\n; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10', '2018-08-21 23:48:37');
INSERT INTO `sys_oper_log` VALUES ('131', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"],\"status\":[\"0\"]}', '1', '\r\n### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10\r\n### The error may involve com.ruoyi.project.hundsun.custinfo.mapper.CustinfoMapper.addOne-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO custinfo( name, gender, age, address, phone, imageaddr, status, ) values( ?, ?, ?, ?, ?, ?, ? )\r\n### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10\n; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10', '2018-08-21 23:52:08');
INSERT INTO `sys_oper_log` VALUES ('132', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"],\"status\":[\"1\"]}', '1', '\r\n### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10\r\n### The error may involve com.ruoyi.project.hundsun.custinfo.mapper.CustinfoMapper.addOne-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO custinfo( name, gender, age, address, phone, imageaddr, status, ) values( ?, ?, ?, ?, ?, ?, ? )\r\n### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10\n; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \') values(\n \n \'åˆ˜æ£æ–‡\', \n \'ç”·\', \n \'23\', \n \'æ�州滨江区\', \n \'1\' at line 10', '2018-08-22 00:04:17');
INSERT INTO `sys_oper_log` VALUES ('133', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"213\"],\"gender\":[\"qwe\"],\"age\":[\"qwe\"],\"address\":[\"qwe\"],\"phone\":[\"qwe\"],\"imageaddr\":[\"qwe\"],\"status\":[\"1\"]}', '1', '\r\n### Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column \'gender\' at row 1\r\n### The error may involve com.ruoyi.project.hundsun.custinfo.mapper.CustinfoMapper.addOne-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO custinfo( name, gender, age, address, phone, imageaddr, status ) values( ?, ?, ?, ?, ?, ?, ? )\r\n### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column \'gender\' at row 1\n; ]; Data truncation: Data too long for column \'gender\' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column \'gender\' at row 1', '2018-08-22 00:07:47');
INSERT INTO `sys_oper_log` VALUES ('134', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"213\"],\"gender\":[\"q\"],\"age\":[\"qwe\"],\"address\":[\"qwe\"],\"phone\":[\"qwe\"],\"imageaddr\":[\"qwe\"],\"status\":[\"1\"]}', '0', null, '2018-08-22 00:08:38');
INSERT INTO `sys_oper_log` VALUES ('135', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"刘正文\"],\"gender\":[\"男\"],\"age\":[\"23\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13588439394\"],\"imageaddr\":[\"123\"],\"status\":[\"1\"]}', '0', null, '2018-08-22 00:09:37');
INSERT INTO `sys_oper_log` VALUES ('136', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"\"],\"gender\":[\"\"],\"age\":[\"\"],\"address\":[\"\"],\"phone\":[\"\"],\"imageaddr\":[\"\"],\"status\":[\"0\"]}', '0', null, '2018-08-22 00:14:53');
INSERT INTO `sys_oper_log` VALUES ('137', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"\"],\"gender\":[\"\"],\"age\":[\"\"],\"address\":[\"\"],\"phone\":[\"\"],\"imageaddr\":[\"\"],\"status\":[\"0\"]}', '0', null, '2018-08-22 00:15:14');
INSERT INTO `sys_oper_log` VALUES ('138', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"\"],\"gender\":[\"\"],\"age\":[\"\"],\"address\":[\"\"],\"phone\":[\"\"],\"imageaddr\":[\"\"],\"status\":[\"1\"]}', '0', null, '2018-08-22 00:15:30');
INSERT INTO `sys_oper_log` VALUES ('139', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"\"],\"gender\":[\"\"],\"age\":[\"\"],\"address\":[\"\"],\"phone\":[\"\"],\"imageaddr\":[\"\"],\"status\":[\"0\"]}', '0', null, '2018-08-22 00:32:17');
INSERT INTO `sys_oper_log` VALUES ('140', '客户新增', '1', 'com.ruoyi.project.hundsun.custinfo.controller.CustinfoController.add()', '1', 'admin', '研发一部', '/hundsun/hundsun/custinfo/add', '127.0.0.1', '', '{\"name\":[\"李四\"],\"gender\":[\"2\"],\"age\":[\"12\"],\"address\":[\"杭州滨江区\"],\"phone\":[\"13522223333\"],\"imageaddr\":[\"123\"],\"status\":[\"0\"]}', '0', null, '2018-08-22 00:58:07');
INSERT INTO `sys_oper_log` VALUES ('141', '代码生成', '8', 'com.ruoyi.project.tool.gen.controller.GenController.genCode()', '1', 'admin', '研发一部', '/hundsun/tool/gen/genCode/sys_notice', '127.0.0.1', '', '{}', '1', 'name', '2018-08-30 16:48:22');
INSERT INTO `sys_oper_log` VALUES ('142', '代码生成', '8', 'com.ruoyi.project.tool.gen.controller.GenController.genCode()', '1', 'admin', '研发一部', '/hundsun/tool/gen/genCode/sys_dict_data', '127.0.0.1', '', '{}', '1', 'name', '2018-08-30 16:49:30');
INSERT INTO `sys_oper_log` VALUES ('143', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/hundsun/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"0\"],\"menuType\":[\"F\"],\"menuName\":[\"正常客户显示\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:check\"],\"orderNum\":[\"3\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-31 13:48:08');
INSERT INTO `sys_oper_log` VALUES ('144', '菜单管理', '3', 'com.ruoyi.project.system.menu.controller.MenuController.remove()', '1', 'admin', '研发一部', '/hundsun/system/menu/remove/2004', '127.0.0.1', '', '{}', '0', null, '2018-08-31 13:48:23');
INSERT INTO `sys_oper_log` VALUES ('145', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/hundsun/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"2001\"],\"menuType\":[\"F\"],\"menuName\":[\"正常客户显示\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:check\"],\"orderNum\":[\"3\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-31 13:48:51');
INSERT INTO `sys_oper_log` VALUES ('146', '角色管理', '2', 'com.ruoyi.project.system.role.controller.RoleController.editSave()', '1', 'admin', '研发一部', '/hundsun/system/role/edit', '127.0.0.1', '', '{\"roleId\":[\"1\"],\"roleName\":[\"管理员\"],\"roleKey\":[\"admin\"],\"roleSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"管理员\"],\"menuIds\":[\"1,100,1000,1001,1002,1003,1004,1005,101,1006,1007,1008,1009,1010,102,1011,1012,1013,1014,103,1015,1016,1017,1018,104,1019,1020,1021,1022,10', '0', null, '2018-08-31 13:49:08');
INSERT INTO `sys_oper_log` VALUES ('147', '字典数据', '1', 'com.ruoyi.project.system.dict.controller.DictDataController.addSave()', '1', 'admin', '研发一部', '/hundsun/system/dict/data/add', '127.0.0.1', '', '{\"dictLabel\":[\"所有\"],\"dictValue\":[\"2\"],\"dictType\":[\"sys_show_hide\"],\"cssClass\":[\"\"],\"listClass\":[\"\"],\"isDefault\":[\"Y\"],\"dictSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"\"]}', '0', null, '2018-08-31 14:16:54');
INSERT INTO `sys_oper_log` VALUES ('148', '字典数据', '2', 'com.ruoyi.project.system.dict.controller.DictDataController.editSave()', '1', 'admin', '研发一部', '/hundsun/system/dict/data/edit', '127.0.0.1', '', '{\"dictCode\":[\"26\"],\"dictLabel\":[\"所有\"],\"dictValue\":[\"2\"],\"dictType\":[\"sys_show_hide\"],\"cssClass\":[\"\"],\"listClass\":[\"\"],\"isDefault\":[\"Y\"],\"dictSort\":[\"0\"],\"status\":[\"0\"],\"remark\":[\"\"]}', '0', null, '2018-08-31 14:17:11');
INSERT INTO `sys_oper_log` VALUES ('149', '字典数据', '2', 'com.ruoyi.project.system.dict.controller.DictDataController.editSave()', '1', 'admin', '研发一部', '/hundsun/system/dict/data/edit', '127.0.0.1', '', '{\"dictCode\":[\"26\"],\"dictLabel\":[\"所有\"],\"dictValue\":[\"2\"],\"dictType\":[\"sys_show_hide\"],\"cssClass\":[\"\"],\"listClass\":[\"\"],\"isDefault\":[\"Y\"],\"dictSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"展示所有\"]}', '0', null, '2018-08-31 14:17:28');
INSERT INTO `sys_oper_log` VALUES ('150', '字典数据', '2', 'com.ruoyi.project.system.dict.controller.DictDataController.editSave()', '1', 'admin', '研发一部', '/hundsun/system/dict/data/edit', '127.0.0.1', '', '{\"dictCode\":[\"26\"],\"dictLabel\":[\"所有\"],\"dictValue\":[\"2\"],\"dictType\":[\"sys_show_hide\"],\"cssClass\":[\"\"],\"listClass\":[\"\"],\"isDefault\":[\"Y\"],\"dictSort\":[\"3\"],\"status\":[\"0\"],\"remark\":[\"展示所有\"]}', '0', null, '2018-08-31 14:17:38');
INSERT INTO `sys_oper_log` VALUES ('151', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/hundsun/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"2001\"],\"menuType\":[\"F\"],\"menuName\":[\"客户编辑\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:edit\"],\"orderNum\":[\"4\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-31 16:07:48');
INSERT INTO `sys_oper_log` VALUES ('152', '菜单管理', '1', 'com.ruoyi.project.system.menu.controller.MenuController.addSave()', '1', 'admin', '研发一部', '/hundsun/system/menu/add', '127.0.0.1', '', '{\"parentId\":[\"2001\"],\"menuType\":[\"F\"],\"menuName\":[\"客户删除\"],\"url\":[\"\"],\"perms\":[\"hundsun:custinfo:remove\"],\"orderNum\":[\"5\"],\"icon\":[\"\"],\"visible\":[\"0\"]}', '0', null, '2018-08-31 16:08:23');
INSERT INTO `sys_oper_log` VALUES ('153', '角色管理', '2', 'com.ruoyi.project.system.role.controller.RoleController.editSave()', '1', 'admin', '研发一部', '/hundsun/system/role/edit', '127.0.0.1', '', '{\"roleId\":[\"1\"],\"roleName\":[\"管理员\"],\"roleKey\":[\"admin\"],\"roleSort\":[\"1\"],\"status\":[\"0\"],\"remark\":[\"管理员\"],\"menuIds\":[\"1,100,1000,1001,1002,1003,1004,1005,101,1006,1007,1008,1009,1010,102,1011,1012,1013,1014,103,1015,1016,1017,1018,104,1019,1020,1021,1022,10', '0', null, '2018-08-31 16:08:33');
-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post` (
`post_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
`post_code` varchar(64) NOT NULL COMMENT '岗位编码',
`post_name` varchar(50) NOT NULL COMMENT '岗位名称',
`post_sort` int(4) NOT NULL COMMENT '显示顺序',
`status` char(1) NOT NULL COMMENT '状态(0正常 1停用)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`post_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='岗位信息表';
-- ----------------------------
-- Records of sys_post
-- ----------------------------
INSERT INTO `sys_post` VALUES ('1', 'ceo', '董事长', '1', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_post` VALUES ('2', 'se', '项目经理', '2', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_post` VALUES ('3', 'hr', '人力资源', '3', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
INSERT INTO `sys_post` VALUES ('4', 'user', '普通员工', '4', '0', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '');
-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`role_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
`role_name` varchar(30) NOT NULL COMMENT '角色名称',
`role_key` varchar(100) NOT NULL COMMENT '角色权限字符串',
`role_sort` int(4) NOT NULL COMMENT '显示顺序',
`status` char(1) NOT NULL COMMENT '角色状态(0正常 1停用)',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='角色信息表';
-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES ('1', '管理员', 'admin', '1', '0', 'admin', '2018-03-16 11:33:00', 'admin', '2018-08-31 16:08:33', '管理员');
INSERT INTO `sys_role` VALUES ('2', '普通角色', 'common', '2', '0', 'admin', '2018-03-16 11:33:00', 'admin', '2018-08-21 00:26:56', '普通角色');
-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`role_id` int(11) NOT NULL COMMENT '角色ID',
`menu_id` int(11) NOT NULL COMMENT '菜单ID',
PRIMARY KEY (`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色和菜单关联表';
-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES ('1', '1');
INSERT INTO `sys_role_menu` VALUES ('1', '2');
INSERT INTO `sys_role_menu` VALUES ('1', '3');
INSERT INTO `sys_role_menu` VALUES ('1', '100');
INSERT INTO `sys_role_menu` VALUES ('1', '101');
INSERT INTO `sys_role_menu` VALUES ('1', '102');
INSERT INTO `sys_role_menu` VALUES ('1', '103');
INSERT INTO `sys_role_menu` VALUES ('1', '104');
INSERT INTO `sys_role_menu` VALUES ('1', '105');
INSERT INTO `sys_role_menu` VALUES ('1', '106');
INSERT INTO `sys_role_menu` VALUES ('1', '107');
INSERT INTO `sys_role_menu` VALUES ('1', '108');
INSERT INTO `sys_role_menu` VALUES ('1', '109');
INSERT INTO `sys_role_menu` VALUES ('1', '110');
INSERT INTO `sys_role_menu` VALUES ('1', '111');
INSERT INTO `sys_role_menu` VALUES ('1', '112');
INSERT INTO `sys_role_menu` VALUES ('1', '113');
INSERT INTO `sys_role_menu` VALUES ('1', '114');
INSERT INTO `sys_role_menu` VALUES ('1', '500');
INSERT INTO `sys_role_menu` VALUES ('1', '501');
INSERT INTO `sys_role_menu` VALUES ('1', '1000');
INSERT INTO `sys_role_menu` VALUES ('1', '1001');
INSERT INTO `sys_role_menu` VALUES ('1', '1002');
INSERT INTO `sys_role_menu` VALUES ('1', '1003');
INSERT INTO `sys_role_menu` VALUES ('1', '1004');
INSERT INTO `sys_role_menu` VALUES ('1', '1005');
INSERT INTO `sys_role_menu` VALUES ('1', '1006');
INSERT INTO `sys_role_menu` VALUES ('1', '1007');
INSERT INTO `sys_role_menu` VALUES ('1', '1008');
INSERT INTO `sys_role_menu` VALUES ('1', '1009');
INSERT INTO `sys_role_menu` VALUES ('1', '1010');
INSERT INTO `sys_role_menu` VALUES ('1', '1011');
INSERT INTO `sys_role_menu` VALUES ('1', '1012');
INSERT INTO `sys_role_menu` VALUES ('1', '1013');
INSERT INTO `sys_role_menu` VALUES ('1', '1014');
INSERT INTO `sys_role_menu` VALUES ('1', '1015');
INSERT INTO `sys_role_menu` VALUES ('1', '1016');
INSERT INTO `sys_role_menu` VALUES ('1', '1017');
INSERT INTO `sys_role_menu` VALUES ('1', '1018');
INSERT INTO `sys_role_menu` VALUES ('1', '1019');
INSERT INTO `sys_role_menu` VALUES ('1', '1020');
INSERT INTO `sys_role_menu` VALUES ('1', '1021');
INSERT INTO `sys_role_menu` VALUES ('1', '1022');
INSERT INTO `sys_role_menu` VALUES ('1', '1023');
INSERT INTO `sys_role_menu` VALUES ('1', '1024');
INSERT INTO `sys_role_menu` VALUES ('1', '1025');
INSERT INTO `sys_role_menu` VALUES ('1', '1026');
INSERT INTO `sys_role_menu` VALUES ('1', '1027');
INSERT INTO `sys_role_menu` VALUES ('1', '1028');
INSERT INTO `sys_role_menu` VALUES ('1', '1029');
INSERT INTO `sys_role_menu` VALUES ('1', '1030');
INSERT INTO `sys_role_menu` VALUES ('1', '1031');
INSERT INTO `sys_role_menu` VALUES ('1', '1032');
INSERT INTO `sys_role_menu` VALUES ('1', '1033');
INSERT INTO `sys_role_menu` VALUES ('1', '1034');
INSERT INTO `sys_role_menu` VALUES ('1', '1035');
INSERT INTO `sys_role_menu` VALUES ('1', '1036');
INSERT INTO `sys_role_menu` VALUES ('1', '1037');
INSERT INTO `sys_role_menu` VALUES ('1', '1038');
INSERT INTO `sys_role_menu` VALUES ('1', '1039');
INSERT INTO `sys_role_menu` VALUES ('1', '1040');
INSERT INTO `sys_role_menu` VALUES ('1', '1041');
INSERT INTO `sys_role_menu` VALUES ('1', '1042');
INSERT INTO `sys_role_menu` VALUES ('1', '1043');
INSERT INTO `sys_role_menu` VALUES ('1', '1044');
INSERT INTO `sys_role_menu` VALUES ('1', '1045');
INSERT INTO `sys_role_menu` VALUES ('1', '1046');
INSERT INTO `sys_role_menu` VALUES ('1', '1047');
INSERT INTO `sys_role_menu` VALUES ('1', '1048');
INSERT INTO `sys_role_menu` VALUES ('1', '1049');
INSERT INTO `sys_role_menu` VALUES ('1', '1050');
INSERT INTO `sys_role_menu` VALUES ('1', '1051');
INSERT INTO `sys_role_menu` VALUES ('1', '1052');
INSERT INTO `sys_role_menu` VALUES ('1', '1053');
INSERT INTO `sys_role_menu` VALUES ('1', '1054');
INSERT INTO `sys_role_menu` VALUES ('1', '1055');
INSERT INTO `sys_role_menu` VALUES ('1', '2000');
INSERT INTO `sys_role_menu` VALUES ('1', '2001');
INSERT INTO `sys_role_menu` VALUES ('1', '2002');
INSERT INTO `sys_role_menu` VALUES ('1', '2003');
INSERT INTO `sys_role_menu` VALUES ('1', '2005');
INSERT INTO `sys_role_menu` VALUES ('1', '2006');
INSERT INTO `sys_role_menu` VALUES ('1', '2007');
INSERT INTO `sys_role_menu` VALUES ('2', '1');
INSERT INTO `sys_role_menu` VALUES ('2', '100');
INSERT INTO `sys_role_menu` VALUES ('2', '101');
INSERT INTO `sys_role_menu` VALUES ('2', '102');
INSERT INTO `sys_role_menu` VALUES ('2', '103');
INSERT INTO `sys_role_menu` VALUES ('2', '104');
INSERT INTO `sys_role_menu` VALUES ('2', '105');
INSERT INTO `sys_role_menu` VALUES ('2', '106');
INSERT INTO `sys_role_menu` VALUES ('2', '107');
INSERT INTO `sys_role_menu` VALUES ('2', '108');
INSERT INTO `sys_role_menu` VALUES ('2', '500');
INSERT INTO `sys_role_menu` VALUES ('2', '501');
INSERT INTO `sys_role_menu` VALUES ('2', '1000');
INSERT INTO `sys_role_menu` VALUES ('2', '1001');
INSERT INTO `sys_role_menu` VALUES ('2', '1002');
INSERT INTO `sys_role_menu` VALUES ('2', '1003');
INSERT INTO `sys_role_menu` VALUES ('2', '1004');
INSERT INTO `sys_role_menu` VALUES ('2', '1005');
INSERT INTO `sys_role_menu` VALUES ('2', '1006');
INSERT INTO `sys_role_menu` VALUES ('2', '1007');
INSERT INTO `sys_role_menu` VALUES ('2', '1008');
INSERT INTO `sys_role_menu` VALUES ('2', '1009');
INSERT INTO `sys_role_menu` VALUES ('2', '1010');
INSERT INTO `sys_role_menu` VALUES ('2', '1011');
INSERT INTO `sys_role_menu` VALUES ('2', '1012');
INSERT INTO `sys_role_menu` VALUES ('2', '1013');
INSERT INTO `sys_role_menu` VALUES ('2', '1014');
INSERT INTO `sys_role_menu` VALUES ('2', '1015');
INSERT INTO `sys_role_menu` VALUES ('2', '1016');
INSERT INTO `sys_role_menu` VALUES ('2', '1017');
INSERT INTO `sys_role_menu` VALUES ('2', '1018');
INSERT INTO `sys_role_menu` VALUES ('2', '1019');
INSERT INTO `sys_role_menu` VALUES ('2', '1020');
INSERT INTO `sys_role_menu` VALUES ('2', '1021');
INSERT INTO `sys_role_menu` VALUES ('2', '1022');
INSERT INTO `sys_role_menu` VALUES ('2', '1023');
INSERT INTO `sys_role_menu` VALUES ('2', '1024');
INSERT INTO `sys_role_menu` VALUES ('2', '1025');
INSERT INTO `sys_role_menu` VALUES ('2', '1026');
INSERT INTO `sys_role_menu` VALUES ('2', '1027');
INSERT INTO `sys_role_menu` VALUES ('2', '1028');
INSERT INTO `sys_role_menu` VALUES ('2', '1029');
INSERT INTO `sys_role_menu` VALUES ('2', '1030');
INSERT INTO `sys_role_menu` VALUES ('2', '1031');
INSERT INTO `sys_role_menu` VALUES ('2', '1032');
INSERT INTO `sys_role_menu` VALUES ('2', '1033');
INSERT INTO `sys_role_menu` VALUES ('2', '1034');
INSERT INTO `sys_role_menu` VALUES ('2', '1035');
INSERT INTO `sys_role_menu` VALUES ('2', '1036');
INSERT INTO `sys_role_menu` VALUES ('2', '1037');
INSERT INTO `sys_role_menu` VALUES ('2', '1038');
INSERT INTO `sys_role_menu` VALUES ('2', '1039');
INSERT INTO `sys_role_menu` VALUES ('2', '1040');
INSERT INTO `sys_role_menu` VALUES ('2', '1041');
INSERT INTO `sys_role_menu` VALUES ('2', '1042');
INSERT INTO `sys_role_menu` VALUES ('2', '1043');
INSERT INTO `sys_role_menu` VALUES ('2', '1044');
INSERT INTO `sys_role_menu` VALUES ('2', '2000');
INSERT INTO `sys_role_menu` VALUES ('2', '2001');
INSERT INTO `sys_role_menu` VALUES ('2', '2002');
-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`dept_id` int(11) DEFAULT NULL COMMENT '部门ID',
`login_name` varchar(30) NOT NULL COMMENT '登录账号',
`user_name` varchar(30) NOT NULL COMMENT '用户昵称',
`user_type` varchar(2) DEFAULT '00' COMMENT '用户类型(00系统用户)',
`email` varchar(50) DEFAULT '' COMMENT '用户邮箱',
`phonenumber` varchar(11) DEFAULT '' COMMENT '手机号码',
`sex` char(1) DEFAULT '0' COMMENT '用户性别(0男 1女 2未知)',
`avatar` varchar(100) DEFAULT '' COMMENT '头像路径',
`password` varchar(50) DEFAULT '' COMMENT '密码',
`salt` varchar(20) DEFAULT '' COMMENT '盐加密',
`status` char(1) DEFAULT '0' COMMENT '帐号状态(0正常 1停用)',
`del_flag` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
`login_ip` varchar(20) DEFAULT '' COMMENT '最后登陆IP',
`login_date` datetime DEFAULT NULL COMMENT '最后登陆时间',
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8 COMMENT='用户信息表';
-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES ('1', '106', 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', '2018-08-31 17:03:59', 'admin', '2018-03-16 11:33:00', 'ry', '2018-08-31 17:03:59', '管理员');
INSERT INTO `sys_user` VALUES ('2', '108', 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', '2018-03-16 11:33:00', 'admin', '2018-03-16 11:33:00', 'ry', '2018-03-16 11:33:00', '测试员');
INSERT INTO `sys_user` VALUES ('100', '106', 'lzw', '依然范特西', '00', 'a1774214410@163.com', '13588439394', '0', '', 'c8de6e5212c2771bac5fb6aca3e92831', 'f80b1e', '0', '0', '127.0.0.1', '2018-08-31 14:12:47', 'admin', '2018-08-20 21:16:41', 'admin', '2018-08-31 14:12:47', '');
-- ----------------------------
-- Table structure for sys_user_online
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_online`;
CREATE TABLE `sys_user_online` (
`sessionId` varchar(50) NOT NULL DEFAULT '' COMMENT '用户会话id',
`login_name` varchar(50) DEFAULT '' COMMENT '登录账号',
`dept_name` varchar(50) DEFAULT '' COMMENT '部门名称',
`ipaddr` varchar(50) DEFAULT '' COMMENT '登录IP地址',
`login_location` varchar(255) DEFAULT '' COMMENT '登录地点',
`browser` varchar(50) DEFAULT '' COMMENT '浏览器类型',
`os` varchar(50) DEFAULT '' COMMENT '操作系统',
`status` varchar(10) DEFAULT '' COMMENT '在线状态on_line在线off_line离线',
`start_timestsamp` datetime DEFAULT NULL COMMENT 'session创建时间',
`last_access_time` datetime DEFAULT NULL COMMENT 'session最后访问时间',
`expire_time` int(5) DEFAULT '0' COMMENT '超时时间,单位为分钟',
PRIMARY KEY (`sessionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='在线用户记录';
-- ----------------------------
-- Records of sys_user_online
-- ----------------------------
-- ----------------------------
-- Table structure for sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_post`;
CREATE TABLE `sys_user_post` (
`user_id` varchar(64) NOT NULL COMMENT '用户ID',
`post_id` varchar(64) NOT NULL COMMENT '岗位ID',
PRIMARY KEY (`user_id`,`post_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户与岗位关联表';
-- ----------------------------
-- Records of sys_user_post
-- ----------------------------
INSERT INTO `sys_user_post` VALUES ('1', '1');
INSERT INTO `sys_user_post` VALUES ('100', '2');
INSERT INTO `sys_user_post` VALUES ('2', '2');
-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
`user_id` int(11) NOT NULL COMMENT '用户ID',
`role_id` int(11) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户和角色关联表';
-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES ('1', '1');
INSERT INTO `sys_user_role` VALUES ('2', '2');
INSERT INTO `sys_user_role` VALUES ('100', '2');
| 97.98226 | 2,049 | 0.625135 |
af01cdff0b95ff48d87028cc1c6847f3e83e7eaf | 5,041 | kt | Kotlin | app/src/main/java/com/hollabrowser/meforce/utils/IntentUtils.kt | meforce/holla-android | 43bac79108cbd9074ab21ade96f1c12d30db4c9f | [
"MIT"
] | null | null | null | app/src/main/java/com/hollabrowser/meforce/utils/IntentUtils.kt | meforce/holla-android | 43bac79108cbd9074ab21ade96f1c12d30db4c9f | [
"MIT"
] | null | null | null | app/src/main/java/com/hollabrowser/meforce/utils/IntentUtils.kt | meforce/holla-android | 43bac79108cbd9074ab21ade96f1c12d30db4c9f | [
"MIT"
] | null | null | null | package com.hollabrowser.meforce.utils
import android.app.Activity
import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
import android.util.Log
import android.webkit.WebView
import androidx.annotation.NonNull
import androidx.annotation.Nullable
import com.hollabrowser.meforce.R
import com.hollabrowser.meforce.constant.INTENT_ORIGIN
import java.net.URISyntaxException
import java.util.regex.Matcher
import java.util.regex.Pattern
class IntentUtils(@field:NonNull @param:NonNull private val mActivity: Activity) {
/**
*
* @param tab
* @param url
* @return
*/
fun intentForUrl(@Nullable tab: WebView?, @NonNull url: String): Intent? {
var intent: Intent
intent = try {
Intent.parseUri(url, Intent.URI_INTENT_SCHEME)
} catch (ex: URISyntaxException) {
Log.w("Browser", "Bad URI " + url + ": " + ex.message)
return null
}
intent.addCategory(Intent.CATEGORY_BROWSABLE)
intent.component = null
intent.selector = null
if (mActivity.packageManager.resolveActivity(intent, 0) == null) {
// SL: Not sure what that special case is for
val packagename = intent.getPackage()
return if (packagename != null) {
intent = Intent(
Intent.ACTION_VIEW, Uri.parse(
"market://search?q=pname:"
+ packagename
)
)
intent.addCategory(Intent.CATEGORY_BROWSABLE)
//mActivity.startActivity(intent);
intent
} else {
null
}
}
if (tab != null) {
intent.putExtra(INTENT_ORIGIN, tab.hashCode())
}
val m: Matcher = ACCEPTED_URI_SCHEMA.matcher(url)
return if (m.matches() && !isSpecializedHandlerAvailable(intent)) {
null
} else intent
}
fun startActivityForIntent(aIntent: Intent): Boolean {
try {
if (mActivity.startActivityIfNeeded(aIntent, -1)) {
return true
}
} catch (exception: Exception) {
exception.printStackTrace()
}
return false
}
fun startActivityForUrl(@Nullable tab: WebView?, @NonNull url: String): Boolean? {
val intent = intentForUrl(tab, url)
return intent?.let { startActivityForIntent(it) }
}
/**
* Search for intent handlers that are specific to this URL aka, specialized
* apps like google maps or youtube
*/
private fun isSpecializedHandlerAvailable(@NonNull intent: Intent): Boolean {
val pm = mActivity.packageManager
val handlers = pm.queryIntentActivities(
intent,
PackageManager.GET_RESOLVED_FILTER
)
if (handlers.isEmpty()) {
return false
}
for (resolveInfo in handlers) {
val filter = resolveInfo.filter
?: // No intent filter matches this intent?
// Error on the side of staying in the browser, ignore
continue
// NOTICE: Use of && instead of || will cause the browser
// to launch a new intent for every URL, using OR only
// launches a new one if there is a non-browser app that
// can handle it.
// Previously we checked the number of data paths, but it is unnecessary
// filter.countDataAuthorities() == 0 || filter.countDataPaths() == 0
if (filter.countDataAuthorities() == 0) {
// Generic handler, skip
continue
}
return true
}
return false
}
/**
* Shares a URL to the system.
*
* @param url the URL to share. If the URL is null
* or a special URL, no sharing will occur.
* @param title the title of the URL to share. This
* is optional.
*/
fun shareUrl(@Nullable url: String?, @Nullable title: String?) {
if (url != null && !url.isSpecialUrl()) {
val shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.type = "text/plain"
if (title != null) {
shareIntent.putExtra(Intent.EXTRA_SUBJECT, title)
}
shareIntent.putExtra(Intent.EXTRA_TEXT, url)
mActivity.startActivity(
Intent.createChooser(
shareIntent,
mActivity.getString(R.string.dialog_title_share)
)
)
}
}
companion object {
private val ACCEPTED_URI_SCHEMA = Pattern.compile(
"(?i)"
+ // switch on case insensitive matching
'('
+ // begin group for schema
"(?:http|https|file)://" + "|(?:inline|data|about|javascript):" + "|(?:.*:.*@)"
+ ')' + "(.*)"
)
}
} | 34.527397 | 99 | 0.556834 |
ce7e23abcf05af5370d5a9d14eb425112664c165 | 2,198 | ps1 | PowerShell | manage_orphaned_disks.ps1 | nolanprewit1/manage_orphaned_disks | 5cbf56d7200ee50d728fc47f449e5335d8fcf94b | [
"Apache-2.0"
] | null | null | null | manage_orphaned_disks.ps1 | nolanprewit1/manage_orphaned_disks | 5cbf56d7200ee50d728fc47f449e5335d8fcf94b | [
"Apache-2.0"
] | null | null | null | manage_orphaned_disks.ps1 | nolanprewit1/manage_orphaned_disks | 5cbf56d7200ee50d728fc47f449e5335d8fcf94b | [
"Apache-2.0"
] | null | null | null | #===========================================================================
# PARAMETERS
#===========================================================================
param(
[Parameter(Mandatory=$true)]
[string]$vcenter_url,
[Parameter(Mandatory=$true)]
[string]$vcenter_username,
[Parameter(Mandatory=$true)]
[string]$vcenter_password
)
#===========================================================================
# VARIABLES
#===========================================================================
$current_date = Get-Date -Format ("MM-dd-yyyy_h.mm.ss")
$transcript_path = ".\transcripts\configmanage_orphaned_disks" + $current_date + ".txt"
#===========================================================================
# code
#===========================================================================
# CHECK FOR TRANSCRIPTS FOLDER AND CREATE IF IT DOES NOT EXIST
$test = Test-Path .\transcripts
if($test -eq $false){
Write-Host "Creating transcripts folder...."
New-Item -ItemType Directory -Name transcripts | Out-Null
}
else{
Write-Host "Transcripts folder checked..."
}
# START SCRIPT TRANSCRIPTION
Write-Host "Starting transcript..."
Start-Transcript -Path $transcript_path | Out-Null
# CHECK FOR POWERCLI MODULE
if (Get-Module -ListAvailable -Name VMware.PowerCLI) {
Write-Host "Powercli module exists..."
}
else {
Write-Host "Installing Powercli module..."
Install-Module -Name VMware.PowerCLI -RequiredVersion 11.1.0.11289667 -Force
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
}
# CONNECT TO VCENTER
try {
Write-Host "Connecting to vCenter..."
Connect-VIServer $vcenter_url -User $vcenter_username -Password $vcenter_password -ErrorAction stop | out-null
}
catch {
Write-Host "ERROR: Connecting to vCenter..."
Write-Host $PSItem.exception.message -ForegroundColor RED
Read-Host -Prompt "Press any key to exit..."
exit
}
# DISCONNECT FROM VCENTER
Write-Host "Disconnecting from vCenter..."
Disconnect-VIServer -Confirm:$false
# PROMPT TO CLOSE THE SHELL
# Read-Host -Prompt "Press any key to exit..."
# exit | 32.323529 | 113 | 0.578708 |
fb47c815d290e28c429797e0db9b1fc0083b09ac | 87 | java | Java | offer/src/main/java/com/java/study/algorithm/zuo/emiddle/class05/Code06_MinHeight.java | seawindnick/javaFamily | d8a6cf8b185e98d6e60961e306a4bbeb4e7360dc | [
"MIT"
] | 1 | 2020-12-02T03:14:19.000Z | 2020-12-02T03:14:19.000Z | offer/src/main/java/com/java/study/algorithm/zuo/emiddle/class05/Code06_MinHeight.java | seawindnick/javaFamily | d8a6cf8b185e98d6e60961e306a4bbeb4e7360dc | [
"MIT"
] | 1 | 2021-05-08T18:03:22.000Z | 2021-05-08T18:03:22.000Z | offer/src/main/java/com/java/study/algorithm/zuo/emiddle/class05/Code06_MinHeight.java | seawindnick/javafamily | f0ac988170bbc6ad562aaf562b2c7907ba68a56a | [
"MIT"
] | null | null | null | package com.java.study.algorithm.zuo.emiddle.class05;
public class Code06_MinHeight{
} | 21.75 | 53 | 0.827586 |
504f9d851865c73fd4958e9d82f814e4d681d3bd | 376 | swift | Swift | my-extensions/my-extensions/Extensions/Double+Extension.swift | winfredzen/my-extensions | 24924865ff40e5ad4b01a74a0413c3316e3e25a0 | [
"MIT"
] | null | null | null | my-extensions/my-extensions/Extensions/Double+Extension.swift | winfredzen/my-extensions | 24924865ff40e5ad4b01a74a0413c3316e3e25a0 | [
"MIT"
] | null | null | null | my-extensions/my-extensions/Extensions/Double+Extension.swift | winfredzen/my-extensions | 24924865ff40e5ad4b01a74a0413c3316e3e25a0 | [
"MIT"
] | null | null | null | //
// Double+Extension.swift
// my-extensions
//
// Created by 王振 on 2018/9/4.
// Copyright © 2018年 wz. All rights reserved.
//
import Foundation
public extension Double {
public func isValidLat() -> Bool {
return self <= 90.0 && self >= -90.0
}
public func validLong() -> Bool {
return self <= 180.0 && self >= -180.0
}
}
| 17.090909 | 46 | 0.558511 |
ddbc8815316eda16610c6e6c4f9e2690e41cccde | 1,825 | php | PHP | application/views/guru/tugas/lihat_pekerjaan.php | MuhammadSyamsi/sekolah | 12b9015d454b64f9105444af404c9cc17271a4a2 | [
"MIT"
] | null | null | null | application/views/guru/tugas/lihat_pekerjaan.php | MuhammadSyamsi/sekolah | 12b9015d454b64f9105444af404c9cc17271a4a2 | [
"MIT"
] | null | null | null | application/views/guru/tugas/lihat_pekerjaan.php | MuhammadSyamsi/sekolah | 12b9015d454b64f9105444af404c9cc17271a4a2 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html lang="en">
<div class='container-fluid' id="page-wrapper">
<br/>
<?php $this->load->view("admin/_partials/breadcrumb.php") ?>
<!-- DataTables -->
<div class="panel-group">
<div class='panel panel-info'>
<div class='panel-heading'>
<a href="<?php echo base_url('admin/tugas') ?>"><i class="glyphicon glyphicon-arrow-left"></i> Back</a>
</div>
<div class='panel-body'>
<div class="table-responsive">
<table class="table table-hover" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Soal</th>
<th>Terkumpul</th>
</tr>
</thead>
<tbody>
<?php foreach ($kerjaan as $baris): ?>
<tr>
<td width='550'>
<?php if($baris->pic_soal != NULL): ?>
<h5><?php echo $baris->soal ?></h5>
<img src="<?php echo base_url('upload/tugas/'.$baris->pic_soal) ?>" class='img-responsive' width='75px'>
Batas pengumpulan (<?php echo $baris->batas ?>)
<h6>Untuk kelas (<?php echo $baris->kelas ?>)</h6>
<?php else: ?>
<h5><?php echo $baris->soal ?></h5>
Batas pengumpulan (<?php echo $baris->batas ?>)
<h6>Untuk kelas (<?php echo $baris->kelas ?>)</h6>
<?php endif; ?>
</td>
<td width="50">
<h4><?php echo $baris->terkumpul ?></h4>
<a href="<?php echo base_url('admin/nilai_tugas/'.$baris->id_tugas) ?>"><i class="glyphicon glyphicon-file"></i> Lihat</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="<?php echo base_url('js/hapus.js') ?>"></script>
<?php $this->load->view("admin/_partials/modal.php") ?>
</html> | 33.181818 | 133 | 0.511233 |
04c60f213cc77cec0a2d3822ff44be2bcfdf0afe | 12,999 | java | Java | app/src/main/java/nkarasch/repeatingreminder/gui/DialogBuilder.java | nkarasch/RepeatingReminder | 090e7dbc0d7fac5c9ea7b431137f69c5f007ef77 | [
"Apache-2.0"
] | 2 | 2015-06-06T18:46:57.000Z | 2018-03-07T05:12:23.000Z | app/src/main/java/nkarasch/repeatingreminder/gui/DialogBuilder.java | nkarasch/RepeatingReminder | 090e7dbc0d7fac5c9ea7b431137f69c5f007ef77 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/nkarasch/repeatingreminder/gui/DialogBuilder.java | nkarasch/RepeatingReminder | 090e7dbc0d7fac5c9ea7b431137f69c5f007ef77 | [
"Apache-2.0"
] | 1 | 2019-06-11T04:12:07.000Z | 2019-06-11T04:12:07.000Z | package nkarasch.repeatingreminder.gui;
/*
* Copyright (C) 2014 Jared Rummler <jared.rummler@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnClickListener;
import android.content.DialogInterface.OnDismissListener;
import android.content.DialogInterface.OnKeyListener;
import android.content.DialogInterface.OnMultiChoiceClickListener;
import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.os.Build;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ProgressBar;
import android.widget.TextView;
/**
* Class which extends {@link AlertDialog.Builder}.</p>
* <p/>
* This adds the ability to set the color for the title, icon, divider, and progressbar.</p>
*
* @author Jared Rummler <jared.rummler@gmail.com>
* @since Dec 11, 2014
*/
public class DialogBuilder extends AlertDialog.Builder {
// ===========================================================
// STATIC FIELDS
// ===========================================================
private static final String DIALOG_COLOR_ERROR = "The dialog must be shown before any color changes can be made. Call dialog.show() beforehand.";
// ===========================================================
// STATIC METHODS
// ===========================================================
private static void setIconColor(Dialog dialog, final int color) {
if (!dialog.isShowing()) {
throw new RuntimeException(DIALOG_COLOR_ERROR);
}
if (color != -1) {
final int iconId = dialog.getContext().getResources()
.getIdentifier("android:id/icon", null, null);
if (iconId != 0) {
final ImageView icon = (ImageView) dialog.findViewById(iconId);
if (icon != null) {
icon.setColorFilter(color);
}
}
}
}
private static void setTitleColor(Dialog dialog, final int color) {
if (!dialog.isShowing()) {
throw new RuntimeException(DIALOG_COLOR_ERROR);
}
if (color != -1) {
final int textViewId = dialog.getContext().getResources()
.getIdentifier("android:id/alertTitle", null, null);
if (textViewId != 0) {
final TextView tv = (TextView) dialog.findViewById(textViewId);
if (tv != null) {
tv.setTextColor(color);
}
}
}
}
private static void setDividerColor(Dialog dialog, final int color) {
if (!dialog.isShowing()) {
throw new RuntimeException(DIALOG_COLOR_ERROR);
}
if (color != -1) {
final int dividerId = dialog.getContext().getResources()
.getIdentifier("android:id/titleDivider", null, null);
if (dividerId != 0) {
final View divider = dialog.findViewById(dividerId);
if (divider != null) {
divider.setBackgroundColor(color);
}
}
}
}
private static void setProgressBarColor(Dialog dialog, final int color) {
if (!dialog.isShowing()) {
throw new RuntimeException(DIALOG_COLOR_ERROR);
}
if (color != -1) {
try {
final ProgressBar bar = (ProgressBar) dialog.findViewById(android.R.id.progress);
final LayerDrawable ld = (LayerDrawable) bar.getProgressDrawable();
final Drawable progress = ld.getDrawable(2);
progress.setColorFilter(color, android.graphics.PorterDuff.Mode.SRC_ATOP);
ld.setDrawableByLayerId(android.R.id.progress, progress);
bar.setProgressDrawable(ld);
} catch (Exception ignore) {
}
}
}
// ===========================================================
// FIELDS
// ===========================================================
private int mIconColor = -1;
private int mTitleColor = -1;
private int mDividerColor = -1;
private int mProgressBarColor = -1;
// ===========================================================
// CONSTRUCTORS
// ===========================================================
public DialogBuilder(Context context) {
super(context);
}
// ===========================================================
// METHODS FOR/FROM SUPERCLASS/INTERFACES
// ===========================================================
@Override
public DialogBuilder setTitle(int titleId) {
super.setTitle(titleId);
return this;
}
@Override
public DialogBuilder setTitle(CharSequence title) {
super.setTitle(title);
return this;
}
@Override
public DialogBuilder setCustomTitle(View customTitleView) {
super.setCustomTitle(customTitleView);
return this;
}
@Override
public DialogBuilder setMessage(int messageId) {
super.setMessage(messageId);
return this;
}
@Override
public DialogBuilder setMessage(CharSequence message) {
super.setMessage(message);
return this;
}
@Override
public DialogBuilder setIcon(int iconId) {
super.setIcon(iconId);
return this;
}
@Override
public DialogBuilder setIcon(Drawable icon) {
super.setIcon(icon);
return this;
}
@Override
public DialogBuilder setIconAttribute(int attrId) {
super.setIconAttribute(attrId);
return this;
}
@Override
public DialogBuilder setPositiveButton(int textId, final OnClickListener listener) {
super.setPositiveButton(textId, listener);
return this;
}
@Override
public DialogBuilder setPositiveButton(CharSequence text, final OnClickListener listener) {
super.setPositiveButton(text, listener);
return this;
}
@Override
public DialogBuilder setNegativeButton(int textId, final OnClickListener listener) {
super.setNegativeButton(textId, listener);
return this;
}
@Override
public DialogBuilder setNegativeButton(CharSequence text, final OnClickListener listener) {
super.setNegativeButton(text, listener);
return this;
}
@Override
public DialogBuilder setNeutralButton(int textId, final OnClickListener listener) {
super.setNeutralButton(textId, listener);
return this;
}
@Override
public DialogBuilder setNeutralButton(CharSequence text, final OnClickListener listener) {
super.setNeutralButton(text, listener);
return this;
}
@Override
public DialogBuilder setCancelable(boolean cancelable) {
super.setCancelable(cancelable);
return this;
}
@Override
public DialogBuilder setOnCancelListener(OnCancelListener onCancelListener) {
super.setOnCancelListener(onCancelListener);
return this;
}
@Override
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public DialogBuilder setOnDismissListener(OnDismissListener onDismissListener) {
super.setOnDismissListener(onDismissListener);
return this;
}
@Override
public DialogBuilder setOnKeyListener(OnKeyListener onKeyListener) {
super.setOnKeyListener(onKeyListener);
return this;
}
@Override
public DialogBuilder setItems(int itemsId, final OnClickListener listener) {
super.setItems(itemsId, listener);
return this;
}
@Override
public DialogBuilder setItems(CharSequence[] items, final OnClickListener listener) {
super.setItems(items, listener);
return this;
}
@Override
public DialogBuilder setAdapter(ListAdapter adapter, final OnClickListener listener) {
super.setAdapter(adapter, listener);
return this;
}
@Override
public DialogBuilder setCursor(Cursor cursor, final OnClickListener listener,
final String labelColumn) {
super.setCursor(cursor, listener, labelColumn);
return this;
}
@Override
public DialogBuilder setMultiChoiceItems(int itemsId, final boolean[] checkedItems,
final OnMultiChoiceClickListener listener) {
super.setMultiChoiceItems(itemsId, checkedItems, listener);
return this;
}
@Override
public DialogBuilder setMultiChoiceItems(CharSequence[] items,
final boolean[] checkedItems, final OnMultiChoiceClickListener listener) {
super.setMultiChoiceItems(items, checkedItems, listener);
return this;
}
@Override
public DialogBuilder setMultiChoiceItems(Cursor cursor, final String isCheckedColumn,
final String labelColumn, final OnMultiChoiceClickListener listener) {
super.setMultiChoiceItems(cursor, isCheckedColumn, labelColumn, listener);
return this;
}
@Override
public DialogBuilder setSingleChoiceItems(int itemsId, final int checkedItem,
final OnClickListener listener) {
super.setSingleChoiceItems(itemsId, checkedItem, listener);
return this;
}
@Override
public DialogBuilder setSingleChoiceItems(Cursor cursor, final int checkedItem,
final String labelColumn, final OnClickListener listener) {
super.setSingleChoiceItems(cursor, checkedItem, labelColumn, listener);
return this;
}
@Override
public DialogBuilder setSingleChoiceItems(CharSequence[] items, final int checkedItem,
final OnClickListener listener) {
super.setSingleChoiceItems(items, checkedItem, listener);
return this;
}
@Override
public DialogBuilder setSingleChoiceItems(ListAdapter adapter, final int checkedItem,
final OnClickListener listener) {
super.setSingleChoiceItems(adapter, checkedItem, listener);
return this;
}
@Override
public DialogBuilder
setOnItemSelectedListener(AdapterView.OnItemSelectedListener listener) {
super.setOnItemSelectedListener(listener);
return this;
}
@Override
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public DialogBuilder setView(int layoutResId) {
super.setView(layoutResId);
return this;
}
@Override
public DialogBuilder setView(View view) {
super.setView(view);
return this;
}
@Override
public AlertDialog show() {
final AlertDialog dialog = super.show();
setIconColor(dialog, mIconColor);
setTitleColor(dialog, mTitleColor);
setDividerColor(dialog, mDividerColor);
setProgressBarColor(dialog, mProgressBarColor);
return dialog;
}
// ===========================================================
// METHODS
// ===========================================================
/**
* @param color The color for the title icon, text, divider, and progressbar.
* @return This Builder object to allow for chaining of calls to set methods
*/
public DialogBuilder setColor(int color) {
mIconColor = color;
mTitleColor = color;
mDividerColor = color;
mProgressBarColor = color;
return this;
}
/**
* @param titleColor The color for the title text.
* @return This Builder object to allow for chaining of calls to set methods
*/
public DialogBuilder setTitleColor(int titleColor) {
mTitleColor = titleColor;
return this;
}
/**
* @param dividerColor The color for the title divider.
* @return This Builder object to allow for chaining of calls to set methods
*/
public DialogBuilder setDividerColor(int dividerColor) {
mDividerColor = dividerColor;
return this;
}
} | 32.908861 | 149 | 0.608431 |
816370f0291b4f4c17031876542b792948b22bfe | 1,200 | go | Go | pkg/http/middlewares/path.go | contiamo/go-base | acc1e73b5964d01b9a99597ae08dc693324227ec | [
"MIT"
] | 13 | 2019-11-14T12:22:49.000Z | 2021-12-18T16:25:46.000Z | pkg/http/middlewares/path.go | contiamo/go-base | acc1e73b5964d01b9a99597ae08dc693324227ec | [
"MIT"
] | 74 | 2019-08-13T16:21:21.000Z | 2022-03-29T07:07:54.000Z | pkg/http/middlewares/path.go | contiamo/go-base | acc1e73b5964d01b9a99597ae08dc693324227ec | [
"MIT"
] | 1 | 2020-09-09T09:00:49.000Z | 2020-09-09T09:00:49.000Z | package middlewares
import (
"net/http"
"strconv"
"strings"
"github.com/go-chi/chi"
uuid "github.com/satori/go.uuid"
)
// PathWithCleanID replace string values that look like ids (uuids and int) with "*"
func PathWithCleanID(r *http.Request) string {
pathParts := strings.Split(r.URL.Path, "/")
for i, part := range pathParts {
if _, err := uuid.FromString(part); err == nil {
pathParts[i] = "*"
continue
}
if _, err := strconv.Atoi(part); err == nil {
pathParts[i] = "*"
}
}
return strings.Join(pathParts, "/")
}
// MethodAndPathCleanID replace string values that look like ids (uuids and int)
// with "*"
func MethodAndPathCleanID(r *http.Request) string {
pathParts := strings.Split(r.URL.Path, "/")
for i, part := range pathParts {
if _, err := uuid.FromString(part); err == nil {
pathParts[i] = "*"
continue
}
if _, err := strconv.Atoi(part); err == nil {
pathParts[i] = "*"
}
}
return "HTTP " + r.Method + " " + strings.Join(pathParts, "/")
}
// ChiRouteName replace route parameters from the Chi route mux with "*"
func ChiRouteName(r *http.Request) string {
return "HTTP " + r.Method + " " + chi.RouteContext(r.Context()).RoutePattern()
}
| 25.531915 | 84 | 0.646667 |
fb17373ff2fb4f1f32bab618d910fba84d69dc53 | 360 | h | C | src/obj/types/vertex_t.h | nsixcancode/game | aceaa7ea74f04e31baf9cef7c102d2e9d47d33d9 | [
"MIT"
] | null | null | null | src/obj/types/vertex_t.h | nsixcancode/game | aceaa7ea74f04e31baf9cef7c102d2e9d47d33d9 | [
"MIT"
] | null | null | null | src/obj/types/vertex_t.h | nsixcancode/game | aceaa7ea74f04e31baf9cef7c102d2e9d47d33d9 | [
"MIT"
] | null | null | null | /**
* @author nsix
* @file vertex_t
* @brief defines the obj vertex
* @note vertex indices start at 1 -- same as obj files
*/
#ifndef GAME_VERTEX_T_H
#define GAME_VERTEX_T_H
typedef struct vertex_t {
float x;
float y;
float z;
unsigned int index;
struct vertex_t *next;
struct vertex_t *last;
} vertex_t;
#endif //GAME_VERTEX_T_H
| 18.947368 | 55 | 0.683333 |
99f5faf6bcdc0e3a7b8d19699a351d87163ef016 | 2,601 | dart | Dart | lib/models/report.dart | Bhautik102/doctor-appointment | 510dd251b2903f5052fecd9a186038bde48c3f9e | [
"Apache-2.0"
] | null | null | null | lib/models/report.dart | Bhautik102/doctor-appointment | 510dd251b2903f5052fecd9a186038bde48c3f9e | [
"Apache-2.0"
] | null | null | null | lib/models/report.dart | Bhautik102/doctor-appointment | 510dd251b2903f5052fecd9a186038bde48c3f9e | [
"Apache-2.0"
] | null | null | null | import 'package:block1/models/Model.dart';
import 'package:enum_to_string/enum_to_string.dart';
enum ReportType {
Cancer,
Corona,
BloodPressure,
HeartReport,
Others,
}
class Report extends Model {
static const String IMAGES_KEY = "images";
static const String TITLE_KEY = "title";
static const String LABORATORYNAME_KEY = "laboratoryName";
// static const String SELLER_KEY = "seller";
static const String OWNER_KEY = "owner";
static const String REPORT_TYPE_KEY = "Report_type";
static const String SEARCH_TAGS_KEY = "search_tags";
List<String> images;
String title;
String laboratoryName;
String owner;
ReportType reportType;
List<String> searchTags;
Report(
String id, {
this.images,
this.title,
this.laboratoryName,
this.reportType,
// this.discountPrice,
// this.originalPrice,
this.owner,
this.searchTags,
}) : super(id);
// int calculatePercentageDiscount() {
// int discount =
// (((originalPrice - discountPrice) * 100) / originalPrice).round();
// return discount;
// }
factory Report.fromMap(Map<String, dynamic> map, {String id}) {
if (map[SEARCH_TAGS_KEY] == null) {
map[SEARCH_TAGS_KEY] = List<String>();
}
return Report(
id,
images: map[IMAGES_KEY].cast<String>(),
title: map[TITLE_KEY],
laboratoryName: map[LABORATORYNAME_KEY],
reportType:
EnumToString.fromString(ReportType.values, map[REPORT_TYPE_KEY]),
// discountPrice: map[DISCOUNT_PRICE_KEY],
// originalPrice: map[ORIGINAL_PRICE_KEY],
owner: map[OWNER_KEY],
searchTags: map[SEARCH_TAGS_KEY].cast<String>(),
);
}
@override
Map<String, dynamic> toMap() {
final map = <String, dynamic>{
IMAGES_KEY: images,
TITLE_KEY: title,
LABORATORYNAME_KEY: laboratoryName,
REPORT_TYPE_KEY: EnumToString.convertToString(reportType),
// DISCOUNT_PRICE_KEY: discountPrice,
// ORIGINAL_PRICE_KEY: originalPrice,
OWNER_KEY: owner,
SEARCH_TAGS_KEY: searchTags,
};
return map;
}
@override
Map<String, dynamic> toUpdateMap() {
final map = <String, dynamic>{};
if (images != null) map[IMAGES_KEY] = images;
if (title != null) map[TITLE_KEY] = title;
if(laboratoryName != null) map[LABORATORYNAME_KEY] = laboratoryName;
if (reportType != null)
map[REPORT_TYPE_KEY] = EnumToString.convertToString(reportType);
if (owner != null) map[OWNER_KEY] = owner;
if (searchTags != null) map[SEARCH_TAGS_KEY] = searchTags;
return map;
}
}
| 25.252427 | 77 | 0.664744 |
4c26be2bbae58fbe86876057d7af5c6ac957cf20 | 473 | lua | Lua | data/talents/death.lua | urmane/its | e7d90894edb479074cb4ff12b4fc8be3ed5f872a | [
"CC-BY-4.0"
] | null | null | null | data/talents/death.lua | urmane/its | e7d90894edb479074cb4ff12b4fc8be3ed5f872a | [
"CC-BY-4.0"
] | null | null | null | data/talents/death.lua | urmane/its | e7d90894edb479074cb4ff12b4fc8be3ed5f872a | [
"CC-BY-4.0"
] | null | null | null | newTalentType{ type="anti-elemental/death", name = "death", description = "Death skills" }
newTalent{
name = "Nerve Strike",
short_name = "Nervestrike",
type = {"anti-elemental/death", 1},
info = "Cause massive damage with a targeted shot to a vital spot",
mode = "activated",
}
newTalent{
name = "Touch of Death",
short_name = "deathtouch",
type = {"anti-elemental/death", 1},
info = "Instantly kill target",
mode = "activated",
}
| 27.823529 | 90 | 0.638478 |
e577b0b35c59bf69b3311fa405bdae638eda3da4 | 91 | ts | TypeScript | packages/IC-Development/marketplace/src/views/home/components/info-panel/components/tabs/components/index.ts | behfarkhosravi/Blockchain-in-a-Box | cde00b7a5073971e052e3fbb955781c380d18c8d | [
"MIT"
] | 33 | 2021-07-11T00:01:51.000Z | 2022-03-31T18:59:57.000Z | packages/IC-Development/marketplace/src/views/home/components/info-panel/components/tabs/components/index.ts | behfarkhosravi/Blockchain-in-a-Box | cde00b7a5073971e052e3fbb955781c380d18c8d | [
"MIT"
] | 70 | 2021-07-11T06:46:07.000Z | 2022-03-29T22:28:02.000Z | packages/IC-Development/marketplace/src/views/home/components/info-panel/components/tabs/components/index.ts | behfarkhosravi/Blockchain-in-a-Box | cde00b7a5073971e052e3fbb955781c380d18c8d | [
"MIT"
] | 19 | 2021-07-14T08:52:24.000Z | 2022-03-28T04:03:02.000Z | export * from './tab-details';
export * from './tab-history';
export * from './tab-panel';
| 22.75 | 30 | 0.637363 |
fee83aad069c809eb8e267d097a4d4bb77df401c | 1,692 | html | HTML | jekyll/deployment/render-db/index.html | toggle-corp/posm-admin | 4edaaecae7ebdbec9d376eadfde68eaa5243fb36 | [
"BSD-3-Clause"
] | 4 | 2016-04-04T19:23:49.000Z | 2017-01-03T15:40:15.000Z | jekyll/deployment/render-db/index.html | toggle-corp/posm-admin | 4edaaecae7ebdbec9d376eadfde68eaa5243fb36 | [
"BSD-3-Clause"
] | 7 | 2016-04-05T00:15:44.000Z | 2016-06-01T21:55:46.000Z | jekyll/deployment/render-db/index.html | toggle-corp/posm-admin | 4edaaecae7ebdbec9d376eadfde68eaa5243fb36 | [
"BSD-3-Clause"
] | 2 | 2016-08-11T15:58:04.000Z | 2016-11-11T21:56:46.000Z | ---
layout: default
title: Update Render DB
---
<div class="mdl-grid demo-content">
<div class="top-card mdl-card mdl-shadow--2dp mdl-cell mdl-cell--12-col">
<div class="mdl-card__title mdl-card--expand posm-grey">
<h2 class="mdl-card__title-text">Update Render DB</h2>
</div>
<div id="supporting-msg-div" class="mdl-card__supporting-text mdl-color-text--grey-600">
The OSM API database has the source OSM data that can be imported, edited, and submitted to OpenStreetMap.
The Render database contains data that is a derivative of what is found in the API DB.
This is needed for Mapnik to cut tiles in a timely fashion.
<div id="render-db-progress-spinner" class="mdl-spinner mdl-js-spinner is-active"></div>
<div id="supporting-msg-txt"></div>
</div>
<ul class="deploy-sub-nav">
<li id="api2pbf"><i class="mdl-color-text--grey-300 material-icons" role="presentation">brightness_1</i>Dump the API DB to a PBF</li>
<li id="pbf2render"><i class="mdl-color-text--grey-300 material-icons" role="presentation">brightness_1</i>Build Render DB from PBF dump via osm2pgsql</li>
<li id="restartTessera"><i class="mdl-color-text--grey-300 material-icons" role="presentation">brightness_1</i>Restart Tessera</li>
</ul>
<div class="mdl-card__actions mdl-card--border">
<button id="action-btn" type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect">Update Render DB</button>
</div>
</div>
</div>
<script src="render-db.js"></script>
<link rel="stylesheet" href="render-db.css">
| 51.272727 | 167 | 0.647754 |
94b0a38b930786f442321a4a10f5fd2aa5f13328 | 2,807 | rs | Rust | src/transform/transformer2.rs | NoelWidmer/game_engine | 646ea62a46af1a9c120cccba1e145ec94bb9ef8e | [
"Apache-2.0"
] | null | null | null | src/transform/transformer2.rs | NoelWidmer/game_engine | 646ea62a46af1a9c120cccba1e145ec94bb9ef8e | [
"Apache-2.0"
] | null | null | null | src/transform/transformer2.rs | NoelWidmer/game_engine | 646ea62a46af1a9c120cccba1e145ec94bb9ef8e | [
"Apache-2.0"
] | null | null | null | use crate::{
ecs::{
World,
EntityId
},
math::Vec2,
transform::Transform2,
};
use std::collections::HashSet;
pub struct Transformer2 { }
impl Transformer2 {
pub fn adopt(world: &mut World, parent_entity_id: EntityId, child_entity_id: EntityId) -> Result<(), ()> {
let parent_result =
if let Some(parent_transform) = world.component_mut::<Transform2>(parent_entity_id) {
// attach parent to child
parent_transform.add_child(child_entity_id);
Ok(parent_transform.abs_location())
} else {
Err(())
};
if let Ok(parent_abs_location) = parent_result {
if let Some(child_transform) = world.component_mut::<Transform2>(child_entity_id) {
// attach child to parent
child_transform.set_parent(parent_entity_id, parent_abs_location);
Ok(())
} else {
// revert partially comitted adoption
let parent_transform = world.component_mut::<Transform2>(parent_entity_id).unwrap();
parent_transform.remove_child(&child_entity_id);
Err(())
}
} else {
Err(())
}
}
pub fn set_location(world: &mut World, entity_id: EntityId, location: Vec2) -> Result<(), ()> {
world
.component_mut::<Transform2>(entity_id)
.map(|transform| {
transform.set_location(location);
(transform.abs_location(), transform.children_entity_ids().clone()) // todo optimize
})
.map(|data| Self::update_children_location(world, data.0, &data.1))
.ok_or(())
}
pub fn add_location(world: &mut World, entity_id: EntityId, location: Vec2) -> Result<(), ()> {
world
.component_mut::<Transform2>(entity_id)
.map(|transform| {
transform.add_location(location);
(transform.abs_location(), transform.children_entity_ids().clone()) // todo optimize
})
.map(|data| Self::update_children_location(world, data.0, &data.1))
.ok_or(())
}
fn update_children_location(world: &mut World, parent_location: Vec2, children_entity_ids: &HashSet<EntityId>) {
for child_entity_id in children_entity_ids {
let data = {
let child_transform = world.component_mut::<Transform2>(*child_entity_id).expect("");
child_transform.set_parent_location(parent_location);
(child_transform.abs_location(), child_transform.children_entity_ids().clone()) // todo optimize
};
Self::update_children_location(world, data.0, &data.1);
}
}
} | 38.452055 | 116 | 0.575704 |
32552d37f2f72e7bfd4517d0da863e833ee35abd | 186 | kt | Kotlin | EasyAdapter/src/main/java/com/chani/easyadapter/EasyViewHolder.kt | chani01/EasyAdapter | b30edc48b5d573539e3ef91266aa7c00895f5d22 | [
"Apache-2.0"
] | 2 | 2020-05-08T04:12:24.000Z | 2020-08-18T02:58:10.000Z | EasyAdapter/src/main/java/com/chani/easyadapter/EasyViewHolder.kt | chani01/EasyAdapter | b30edc48b5d573539e3ef91266aa7c00895f5d22 | [
"Apache-2.0"
] | null | null | null | EasyAdapter/src/main/java/com/chani/easyadapter/EasyViewHolder.kt | chani01/EasyAdapter | b30edc48b5d573539e3ef91266aa7c00895f5d22 | [
"Apache-2.0"
] | null | null | null | package com.chani.easyadapter
import android.view.View
import androidx.recyclerview.widget.RecyclerView
open class EasyViewHolder(itemsView: View): RecyclerView.ViewHolder(itemsView)
| 23.25 | 78 | 0.849462 |
1955c8605b474d9a748d330f1b344483579edcb7 | 3,242 | kt | Kotlin | thistle-console/src/commonMain/kotlin/com/copperleaf/thistle/console/renderer/ConsoleThistleRenderer.kt | copper-leaf/thistle | f661f01f6a97f68140c757ce300822a5f08d26d8 | [
"BSD-3-Clause"
] | 46 | 2021-05-06T17:37:08.000Z | 2022-02-01T19:23:29.000Z | thistle-console/src/commonMain/kotlin/com/copperleaf/thistle/console/renderer/ConsoleThistleRenderer.kt | copper-leaf/thistle | f661f01f6a97f68140c757ce300822a5f08d26d8 | [
"BSD-3-Clause"
] | 7 | 2021-05-13T15:05:56.000Z | 2022-03-03T20:48:31.000Z | thistle-console/src/commonMain/kotlin/com/copperleaf/thistle/console/renderer/ConsoleThistleRenderer.kt | copper-leaf/thistle | f661f01f6a97f68140c757ce300822a5f08d26d8 | [
"BSD-3-Clause"
] | 2 | 2021-12-08T08:44:47.000Z | 2021-12-19T16:34:20.000Z | package com.copperleaf.thistle.console.renderer
import com.copperleaf.kudzu.node.Node
import com.copperleaf.kudzu.node.many.ManyNode
import com.copperleaf.kudzu.node.tag.TagNode
import com.copperleaf.kudzu.node.text.TextNode
import com.copperleaf.thistle.console.ansi.AnsiEscapeCode
import com.copperleaf.thistle.console.ansi.AnsiNodeScope
import com.copperleaf.thistle.console.ansi.buildAnsiString
import com.copperleaf.thistle.console.ansi.flatten
import com.copperleaf.thistle.console.ansi.renderToString
import com.copperleaf.thistle.core.ThistleTagMap
import com.copperleaf.thistle.core.node.ThistleInterpolateNode
import com.copperleaf.thistle.core.node.ThistleRootNode
import com.copperleaf.thistle.core.node.ThistleValueMapNode
import com.copperleaf.thistle.core.parser.ThistleTagFactory
import com.copperleaf.thistle.core.renderer.ThistleRenderer
@ExperimentalStdlibApi
class ConsoleThistleRenderer(
tags: ThistleTagMap<ConsoleThistleRenderContext, AnsiEscapeCode, String>
) : ThistleRenderer<ConsoleThistleRenderContext, AnsiEscapeCode, String>(tags) {
override fun render(rootNode: ThistleRootNode, context: Map<String, Any>): String {
return buildAnsiString {
renderToBuilder(rootNode, context)
}.flatten()
.renderToString()
}
@Suppress("UNCHECKED_CAST")
private fun AnsiNodeScope.renderToBuilder(node: Node, context: Map<String, Any>) {
when (node) {
is TextNode -> {
appendText(node.text)
}
is ThistleRootNode -> {
node.nodeList.forEach {
renderToBuilder(it, context)
}
}
is ManyNode<*> -> {
node.nodeList.forEach {
renderToBuilder(it, context)
}
}
is TagNode<*, *, *> -> {
val tagName = node.opening.tagName
val openingTagNode = node.opening.wrapped
when (openingTagNode) {
is ThistleInterpolateNode -> {
val interpolatedValue = openingTagNode.getValue(context)
appendText(interpolatedValue.toString())
}
is ThistleValueMapNode -> {
val tagArgs = openingTagNode.getValueMap(context)
val span: ThistleTagFactory<ConsoleThistleRenderContext, AnsiEscapeCode> = tags[tagName]!!
appendChild({
val renderContext = ConsoleThistleRenderContext(
context = context,
args = tagArgs,
content = it
)
span(renderContext)
}) {
(node.content as ManyNode<Node>).nodeList.forEach {
renderToBuilder(it, context)
}
}
}
else -> error("unknown content in openingTagNode: $openingTagNode")
}
}
else -> error("unknown node: $node")
}
}
}
| 41.037975 | 114 | 0.580197 |
d4dbff542b75083d865511f0930bebc0feaf0923 | 2,016 | dart | Dart | shop_repository/lib/src/models/shopp.dart | AnandSaran/vivasayi | d0af7783055208853c3e602d311bc6d6b85c9f05 | [
"MIT"
] | null | null | null | shop_repository/lib/src/models/shopp.dart | AnandSaran/vivasayi | d0af7783055208853c3e602d311bc6d6b85c9f05 | [
"MIT"
] | null | null | null | shop_repository/lib/src/models/shopp.dart | AnandSaran/vivasayi | d0af7783055208853c3e602d311bc6d6b85c9f05 | [
"MIT"
] | null | null | null | /*
import 'package:flutter/material.dart';
import 'package:geoflutterfire/geoflutterfire.dart';
import 'package:shop_repository/src/entities/entities.dart';
@immutable
class Shopp {
final String id;
final String name;
final String imageUrl;
final String phoneNumber;
final String whatsAppNumber;
final String address;
final GeoFirePoint geoFirePoint;
Shopp({
required this.name,
required this.imageUrl,
required this.phoneNumber,
required this.whatsAppNumber,
String? id,
}) : this.id = id ?? '';
Shopp copyWith(
{String? name,
String? imageUrl,
String? phoneNumber,
String? whatsAppNumber}) {
return Shopp(
id: id,
name: name ?? this.name,
imageUrl: imageUrl ?? this.imageUrl,
phoneNumber: phoneNumber ?? this.phoneNumber,
whatsAppNumber: whatsAppNumber ?? this.whatsAppNumber,
);
}
@override
int get hashCode {
return name.hashCode ^
id.hashCode ^
imageUrl.hashCode ^
phoneNumber.hashCode ^
whatsAppNumber.hashCode;
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
other is Shopp &&
runtimeType == other.runtimeType &&
name == other.name &&
imageUrl == other.imageUrl &&
phoneNumber == other.phoneNumber &&
whatsAppNumber == other.whatsAppNumber &&
id == other.id;
}
@override
String toString() {
return 'Shop{name: $name, imageUrl: $imageUrl, phoneNumber: $phoneNumber, whatsAppNumber: $whatsAppNumber, id: $id}';
}
Shop toEntity() {
return Shop(
id: id,
name: name,
imageUrl: imageUrl,
phoneNumber: phoneNumber,
whatsAppNumber: whatsAppNumber,
);
}
static Shopp fromEntity(Shop entity) {
return Shopp(
id: entity.id,
name: entity.name,
imageUrl: entity.imageUrl,
phoneNumber: entity.phoneNumber,
whatsAppNumber: entity.whatsAppNumber,
);
}
}
*/
| 23.717647 | 121 | 0.631944 |
24aee9e90eacca61fec680a6b26468b58d2c1008 | 706 | swift | Swift | iOS/IssueTracker/IssueTracker/MilestoneScene/Models/MilestoneInteractor.swift | ahrimy/IssueTracker-16 | ef4587a5d4288590ebfb468df317e3a3ff9b0eab | [
"MIT"
] | 11 | 2020-10-26T12:48:59.000Z | 2021-06-20T08:52:33.000Z | iOS/IssueTracker/IssueTracker/MilestoneScene/Models/MilestoneInteractor.swift | ahrimy/IssueTracker-16 | ef4587a5d4288590ebfb468df317e3a3ff9b0eab | [
"MIT"
] | 159 | 2020-10-26T10:40:46.000Z | 2020-11-22T09:14:14.000Z | iOS/IssueTracker/IssueTracker/MilestoneScene/Models/MilestoneInteractor.swift | ahrimy/IssueTracker-16 | ef4587a5d4288590ebfb468df317e3a3ff9b0eab | [
"MIT"
] | 5 | 2020-11-21T12:55:32.000Z | 2021-09-01T13:17:56.000Z | //
// MilestoneInteractor.swift
// IssueTracker
//
// Created by woong on 2020/11/02.
//
import Foundation
import NetworkService
protocol MilestoneBusinessLogic {
func request<T: Codable>(endPoint: MilestoneEndPoint, completionHandler: @escaping (T?) -> Void)
}
class MilestoneInteractor: MilestoneBusinessLogic {
func request<T: Codable>(endPoint: MilestoneEndPoint, completionHandler: @escaping (T?) -> Void) {
NetworkManager.shared.request(endPoint: endPoint) { (data: T?, response: NetworkManager.Response?) in
guard response == nil else {
debugPrint(response)
return
}
completionHandler(data)
}
}
}
| 27.153846 | 109 | 0.65864 |
45fdadae5ae659912edd347a54d3fa681cfdd4eb | 311 | kt | Kotlin | app/src/main/java/com/myotive/celeryman/CeleryApplication.kt | myotive/celeryman | 39f1209326254be138d4d9cbe1925af01a06f4b8 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/myotive/celeryman/CeleryApplication.kt | myotive/celeryman | 39f1209326254be138d4d9cbe1925af01a06f4b8 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/myotive/celeryman/CeleryApplication.kt | myotive/celeryman | 39f1209326254be138d4d9cbe1925af01a06f4b8 | [
"Apache-2.0"
] | null | null | null | package com.myotive.celeryman
import android.app.Application
import com.myotive.celeryman.di.CeleryModule
import org.koin.android.ext.android.startKoin
class CeleryApplication(): Application(){
override fun onCreate() {
super.onCreate()
startKoin(this, listOf(CeleryModule.get()))
}
} | 23.923077 | 51 | 0.73955 |
a9cbe90132cd9404077bd0fa5c899c8b535aa68f | 8,465 | html | HTML | admin.html | charles2910/trab_Web | b854f97f1930c099fb9b3d62a7c5e920e8924750 | [
"MIT"
] | null | null | null | admin.html | charles2910/trab_Web | b854f97f1930c099fb9b3d62a7c5e920e8924750 | [
"MIT"
] | null | null | null | admin.html | charles2910/trab_Web | b854f97f1930c099fb9b3d62a7c5e920e8924750 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<!-- Feito por Carlos Henrique Lima Melara - 9805380 -->
<!-- com base no template disponibilizado em materialize.com -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Firehouse Pet Shop</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body>
<div class="navbar-fixed">
<nav class="white" role="navigation">
<div class="nav-wrapper container">
<a id="logo-container" href="#" class="brand-logo">Firehouse Pet Shop</a>
<ul class="right hide-on-med-and-down">
<li><a href="index.html">Início</a></li>
<li><a href="produtos.html">Produtos</a></li>
<li><a href="servicos.html">Serviços</a></li>
<li><a href="dicas.html">Dicas</a></li>
<li><a href="usuario.html">Área do Usuário</a></li>
<li><a href="#"><i class="material-icons">account_circle</i>
</a></li>
</ul>
<ul id="nav-mobile" class="sidenav">
<li><a href="index.html">Início</a></li>
<li><a href="produtos.html">Produtos</a></li>
<li><a href="servicos.html">Serviços</a></li>
<li><a href="dicas.html">Dicas</a></li>
<li><a href="usuario.html">Área do Usuário</a></li>
<li><a href="#"><i class="material-icons">account_circle</i>
</ul>
<a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
</div>
</nav>
</div>
<div class="container">
<div class="section">
<div class="row">
<div class="col s12">
<div class="card hoverable">
<div class="card-content teal">
<h4>Informações do Administrador</h4>
</div>
<div class="card-content">
<div class="row valign-wrapper">
<div class="col s2">
<i class="material-icons large">account_circle</i>
</div>
<div class="col s10">
<h6>Nome</h6>
<p>Jane Doe</p>
<h6>Endereço</h6>
<p>Rua Alceu Guimarães, 1535, São Carlos, SP</p>
<h6>Telefone</h6>
<p>(16) 3373-1551</p>
</div>
</div>
<div class="card-action center">
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Alterar Informações</a>
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Adicionar Administrador</a>
</div>
</div>
</div>
</div>
<div class="col s12">
<div class="card">
<div class="card-content teal">
<h4>Serviços Disponíveis</h4>
</div>
<div class="card-content">
<div class="row valign-wrapper">
<div class="col s12">
<table class="highlight responsive-table">
<thead>
<tr>
<th>Name</th>
<th>Preço Cobrado</th>
<th>Custo</th>
</tr>
</thead>
<tbody>
<tr>
<td>Banho</td>
<td>R$ 100.00</td>
<td>R$ 40.00</td>
</tr>
<tr>
<td>Tosa</td>
<td>R$ 60.00</td>
<td>R$ 20.00</td>
</tr>
<tr>
<td>Gravura</td>
<td>R$ 300.00</td>
<td>R$ 50.00</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-action center">
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Adicionar Serviço</a>
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Alterar Serviço</a>
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Excluir Serviço</a>
</div>
</div>
</div>
</div>
<div class="col s12">
<div class="card">
<div class="card-content teal">
<h4>Produtos Disponíveis</h4>
</div>
<div class="card-content">
<div class="row valign-wrapper">
<div class="col s12">
<table class="highlight responsive-table">
<thead>
<tr>
<th>ID Item</th>
<th>Nome</th>
<th>Quantidade Disponível</th>
<th>Preço Cobrado</th>
<th>Custo</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Coleira</td>
<td>10</td>
<td>R$ 100.00</td>
<td>R$ 40.00</td>
</tr>
<tr>
<td>2</td>
<td>Sapato</td>
<td>64</td>
<td>R$ 60.00</td>
<td>R$ 20.00</td>
</tr>
<tr>
<td>3</td>
<td>Roupa</td>
<td>13</td>
<td>R$ 300.00</td>
<td>R$ 50.00</td>
</tr>
<tr>
<td>4</td>
<td>Ração</td>
<td>160</td>
<td>R$ 100.00</td>
<td>R$ 50.00</td>
</tr>
<tr>
<td>5</td>
<td>Xampu</td>
<td>13</td>
<td>R$ 30.00</td>
<td>R$ 5.00</td>
</tr>
<tr>
<td>6</td>
<td>Laço</td>
<td>132</td>
<td>R$ 8.00</td>
<td>R$ 1.00</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-action center">
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Adicionar Produto</a>
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Alterar Produto</a>
<a href="#" class="btn-large waves-effect waves-light teal lighten-1">Excluir Produto</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="page-footer teal">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h5 class="white-text">A Empresa</h5>
<p class="grey-text text-lighten-4">A Firehouse Pet Shop é uma empresa criada por pessoas apaixonadas por animais. Faz 5 anos que continuamos mostrando nosso amor pelos <i>pets</i>.</p>
</div>
<div class="col l3 s12 right">
<h5 class="white-text">Connect</h5>
<ul>
<li><a class="white-text" href="#!">E-mail</a></li>
<li><a class="white-text" href="#!">Facebook</a></li>
<li><a class="white-text" href="#!">Instagram</a></li>
<li><a class="white-text" href="#!">Youtube</a></li>
</ul>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
Made using <a class="brown-text text-lighten-3" href="http://materializecss.com">Materialize</a>
</div>
</div>
</footer>
</body>
</html>
| 35.567227 | 195 | 0.41264 |
107c5c6259c5bf6318a58d0255aa83114cc01c09 | 3,804 | ps1 | PowerShell | JenkinsPipelines/Scripts/UpdatePublisherImages.ps1 | asofron/LISAv2 | 3817f304f2ab16830266f96f857e68b235fe2483 | [
"Apache-2.0"
] | null | null | null | JenkinsPipelines/Scripts/UpdatePublisherImages.ps1 | asofron/LISAv2 | 3817f304f2ab16830266f96f857e68b235fe2483 | [
"Apache-2.0"
] | 1 | 2018-07-17T12:30:35.000Z | 2018-07-17T12:30:35.000Z | JenkinsPipelines/Scripts/UpdatePublisherImages.ps1 | asofron/LISAv2 | 3817f304f2ab16830266f96f857e68b235fe2483 | [
"Apache-2.0"
] | 1 | 2018-07-30T18:55:31.000Z | 2018-07-30T18:55:31.000Z | ##############################################################################################
# UpdatePublisherImages.ps1
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License.
# Operations :
#
<#
.SYNOPSIS
<Description>
.PARAMETER
<Parameters>
.INPUTS
.NOTES
Creation Date:
Purpose/Change:
.EXAMPLE
#>
###############################################################################################
Param
(
$OutputFilePath = "J:\Jenkins_Shared_Do_Not_Delete\userContent\common\VMImages-ARM.txt",
$Publishers = "Canonical,SUSE,Oracle,CoreOS,RedHat,OpenLogic,credativ,kali-linux,clear-linux-project",
$LogFileName = "UpdatePublisherImages.log"
)
Set-Variable -Name LogFileName -Value $LogFileName -Scope Global -Force
Get-ChildItem .\Libraries -Recurse | Where-Object { $_.FullName.EndsWith(".psm1") } | ForEach-Object { Import-Module $_.FullName -Force -Global -DisableNameChecking }
try
{
$ExitCode = 1
#region Update All ARM Images
$tab = " "
$Location = "northeurope"
$allRMPubs = $Publishers.Split(",") | Sort-Object
$ARMImages = "Publisher Offer SKU Version`n"
foreach ( $newPub in $allRMPubs )
{
$offers = Get-AzureRmVMImageOffer -PublisherName $newPub -Location $Location
if ($offers)
{
Write-LogInfo "Found $($offers.Count) offers for $($newPub)..."
foreach ( $offer in $offers )
{
$SKUs = Get-AzureRmVMImageSku -Location $Location -PublisherName $newPub -Offer $offer.Offer -ErrorAction SilentlyContinue
Write-LogInfo "|--Found $($SKUs.Count) SKUs for $($offer.Offer)..."
foreach ( $SKU in $SKUs )
{
$rmImages = Get-AzureRmVMImage -Location $Location -PublisherName $newPub -Offer $offer.Offer -Skus $SKU.Skus
Write-LogInfo "|--|--Found $($rmImages.Count) Images for $($SKU.Skus)..."
if ( $rmImages.Count -gt 1 )
{
$isLatestAdded = $false
}
else
{
$isLatestAdded = $true
}
foreach ( $rmImage in $rmImages )
{
if ( $isLatestAdded )
{
Write-LogInfo "|--|--|--Added Version $($rmImage.Version)..."
$ARMImages += $newPub + $tab + $offer.Offer + $tab + $SKU.Skus + $tab + $newPub + " " + $offer.Offer + " " + $SKU.Skus + " " + $rmImage.Version + "`n"
}
else
{
Write-LogInfo "|--|--|--Added Generalized version: latest..."
$ARMImages += $newPub + $tab + $offer.Offer + $tab + $SKU.Skus + $tab + $newPub + " " + $offer.Offer + " " + $SKU.Skus + " " + "latest" + "`n"
Write-LogInfo "|--|--|--Added Version $($rmImage.Version)..."
$ARMImages += $newPub + $tab + $offer.Offer + $tab + $SKU.Skus + $tab + $newPub + " " + $offer.Offer + " " + $SKU.Skus + " " + $rmImage.Version + "`n"
$isLatestAdded = $true
}
}
}
}
}
}
$ARMImages = $ARMImages.TrimEnd("`n")
Write-LogInfo "Creating file $OutputFilePath..."
Set-Content -Value $ARMImages -Path $OutputFilePath -Force -NoNewline
Write-LogInfo "$OutputFilePath saved successfully."
$ExitCode = 0
#endregion
}
catch
{
$ExitCode = 1
Raise-Exception ($_)
}
finally
{
Write-LogInfo "Exiting with code: $ExitCode"
exit $ExitCode
}
#endregion
| 36.576923 | 178 | 0.495005 |
f0571f9fa4afbc250ffbbd1dd3bed40b228bfe8d | 46 | py | Python | cne/__init__.py | BartWojtowicz/cne | 16612292c1c938fc9ec53a14642fb7d40bcc9e25 | [
"Apache-2.0"
] | null | null | null | cne/__init__.py | BartWojtowicz/cne | 16612292c1c938fc9ec53a14642fb7d40bcc9e25 | [
"Apache-2.0"
] | null | null | null | cne/__init__.py | BartWojtowicz/cne | 16612292c1c938fc9ec53a14642fb7d40bcc9e25 | [
"Apache-2.0"
] | null | null | null | from .cne import CNE
__version__ = "0.0.dev"
| 11.5 | 23 | 0.695652 |
400512de1b938de4ea0af7890927aefcba57f312 | 4,134 | py | Python | kmeans.py | iqbalsublime/ML_DataScience | 85cf796d4568d246e3b814c64f0272c8c8dd5f8b | [
"MIT"
] | null | null | null | kmeans.py | iqbalsublime/ML_DataScience | 85cf796d4568d246e3b814c64f0272c8c8dd5f8b | [
"MIT"
] | null | null | null | kmeans.py | iqbalsublime/ML_DataScience | 85cf796d4568d246e3b814c64f0272c8c8dd5f8b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 9 01:58:58 2019
@author: iqbalsublime
"""
#================================================================================================================
#----------------------------------------------------------------------------------------------------------------
# K NEAREST NEIGHBOURS
#----------------------------------------------------------------------------------------------------------------
#================================================================================================================
# Details of implementation/tutorial is in : http://madhugnadig.com/articles/machine-learning/2017/01/13/implementing-k-nearest-neighbours-from-scratch-in-python.html
import math
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
import pandas as pd
import random
from collections import Counter
from sklearn import preprocessing
import time
#for plotting
plt.style.use('ggplot')
class CustomKNN:
def __init__(self):
self.accurate_predictions = 0
self.total_predictions = 0
self.accuracy = 0.0
def predict(self, training_data, to_predict, k = 3):
if len(training_data) >= k:
print("K cannot be smaller than the total voting groups(ie. number of training data points)")
return
distributions = []
for group in training_data:
for features in training_data[group]:
euclidean_distance = np.linalg.norm(np.array(features)- np.array(to_predict))
distributions.append([euclidean_distance, group])
results = [i[1] for i in sorted(distributions)[:k]]
result = Counter(results).most_common(1)[0][0]
confidence = Counter(results).most_common(1)[0][1]/k
return result, confidence
def test(self, test_set, training_set):
for group in test_set:
for data in test_set[group]:
predicted_class,confidence = self.predict(training_set, data, k =3)
if predicted_class == group:
self.accurate_predictions += 1
else:
print("Wrong classification with confidence " + str(confidence * 100) + " and class " + str(predicted_class))
self.total_predictions += 1
self.accuracy = 100*(self.accurate_predictions/self.total_predictions)
print("\nAcurracy :", str(self.accuracy) + "%")
def mod_data(df):
df.replace('?', -999999, inplace = True)
df.replace('yes', 4, inplace = True)
df.replace('no', 2, inplace = True)
df.replace('notpresent', 4, inplace = True)
df.replace('present', 2, inplace = True)
df.replace('abnormal', 4, inplace = True)
df.replace('normal', 2, inplace = True)
df.replace('poor', 4, inplace = True)
df.replace('good', 2, inplace = True)
df.replace('ckd', 4, inplace = True)
df.replace('notckd', 2, inplace = True)
def main():
df = pd.read_csv("chronic_kidney_disease.csv")
mod_data(df)
dataset = df.astype(float).values.tolist()
#Normalize the data
x = df.values #returns a numpy array
min_max_scaler = preprocessing.MinMaxScaler()
x_scaled = min_max_scaler.fit_transform(x)
df = pd.DataFrame(x_scaled) #Replace df with normalized values
#Shuffle the dataset
random.shuffle(dataset)
#20% of the available data will be used for testing
test_size = 0.2
#The keys of the dict are the classes that the data is classfied into
training_set = {2: [], 4:[]}
test_set = {2: [], 4:[]}
#Split data into training and test for cross validation
training_data = dataset[:-int(test_size * len(dataset))]
test_data = dataset[-int(test_size * len(dataset)):]
#Insert data into the training set
for record in training_data:
training_set[record[-1]].append(record[:-1]) # Append the list in the dict will all the elements of the record except the class
#Insert data into the test set
for record in test_data:
test_set[record[-1]].append(record[:-1]) # Append the list in the dict will all the elements of the record except the class
s = time.clock()
knn = CustomKNN()
knn.test(test_set, training_set)
e = time.clock()
print("Exec Time:" ,e-s)
if __name__ == "__main__":
main() | 33.609756 | 167 | 0.613449 |
3f68024020301d51c2ca64693b40f38bc0417e94 | 1,776 | kt | Kotlin | dashboard/src/main/java/com/kienht/gapo/dashboard/menu/adapter/loadmore/LoadmoreAdapter.kt | hantrungkien/Gapo-Dashboard-Demo | 32bdbc5f3e2ed9965898be9b892b06cb2da26da7 | [
"Apache-2.0"
] | 11 | 2020-05-20T09:45:32.000Z | 2022-03-06T08:09:39.000Z | dashboard/src/main/java/com/kienht/gapo/dashboard/menu/adapter/loadmore/LoadmoreAdapter.kt | hantrungkien/Gapo-Dashboard-Demo | 32bdbc5f3e2ed9965898be9b892b06cb2da26da7 | [
"Apache-2.0"
] | null | null | null | dashboard/src/main/java/com/kienht/gapo/dashboard/menu/adapter/loadmore/LoadmoreAdapter.kt | hantrungkien/Gapo-Dashboard-Demo | 32bdbc5f3e2ed9965898be9b892b06cb2da26da7 | [
"Apache-2.0"
] | 4 | 2020-05-27T03:32:46.000Z | 2021-03-03T10:41:53.000Z | package com.kienht.gapo.dashboard.menu.adapter.loadmore
import android.view.ViewGroup
import androidx.lifecycle.LifecycleOwner
import androidx.recyclerview.widget.RecyclerView
import com.kienht.gapo.core.utils.inflateViewDataBinding
import com.kienht.gapo.dashboard.R
import com.kienht.gapo.dashboard.databinding.LoadmoreItemBinding
import com.kienht.gapo.dashboard.news_feeds.adapter.viewholder.NewsFeedBaseViewHolder
/**
* @author vit
*/
class LoadmoreAdapter(private val viewLifecycleOwner: LifecycleOwner) :
RecyclerView.Adapter<LoadmoreAdapter.LoadmoreViewHolder>() {
var loading = false
set(value) {
when(field) {
value -> notifyItemChanged(0)
true -> {
itemsCount = 0
notifyItemRemoved(0)
}
false -> {
itemsCount = 1
notifyItemInserted(1)
}
}
field = value
}
private var itemsCount: Int = 0
override fun onCreateViewHolder(
parent: ViewGroup,
viewType: Int
): LoadmoreAdapter.LoadmoreViewHolder {
return LoadmoreViewHolder(
parent.inflateViewDataBinding(viewType),
viewLifecycleOwner
)
}
override fun onBindViewHolder(
holder: LoadmoreViewHolder,
position: Int
) {
holder.bind(loading, null)
}
override fun getItemViewType(position: Int): Int = R.layout.loadmore_item
override fun getItemCount(): Int = itemsCount
inner class LoadmoreViewHolder(
private val binding: LoadmoreItemBinding,
viewLifecycleOwner: LifecycleOwner
) : NewsFeedBaseViewHolder<Boolean>(binding, viewLifecycleOwner) {
}
} | 28.645161 | 85 | 0.644144 |
75009dac96ad78223644929135a8cd8ebe9b659e | 1,417 | ps1 | PowerShell | PSClarifai/Public/Add-ImageFromFileWithConcepts.ps1 | Claustn/Clarifai | e45d7b052c11002fd733bd096ac173233112f4a1 | [
"MIT"
] | null | null | null | PSClarifai/Public/Add-ImageFromFileWithConcepts.ps1 | Claustn/Clarifai | e45d7b052c11002fd733bd096ac173233112f4a1 | [
"MIT"
] | null | null | null | PSClarifai/Public/Add-ImageFromFileWithConcepts.ps1 | Claustn/Clarifai | e45d7b052c11002fd733bd096ac173233112f4a1 | [
"MIT"
] | null | null | null | #requires -Version 3.0
function Add-ImageFromFileWithConcepts
{
[CmdletBinding()]
param
(
[string]$ImagePath,
[string]$Token = (Get-ClarifaiToken),
[string[]]$Concepts,
[string[]]$Not_Concepts
)
$uri = 'https://api.clarifai.com/v2/inputs'
$headers = @{
Authorization = 'Bearer {0}' -f $Token
Accept = 'application/json'
'Content-Type' = 'application/json'
}
$base64 = [convert]::ToBase64String((Get-Content $ImagePath -Encoding byte))
$Cons = @()
Foreach ($Concept in $Concepts)
{
$Cons += New-Object -TypeName PSObject -Property @{
id = $Concept
value = $true
}
}
Foreach ($Concept in $Not_Concepts)
{
$Cons += New-Object -TypeName PSObject -Property @{
id = $Concept
value = $false
}
}
$jsonbody = [ordered]@{
inputs = @(
@{
data = @{
image = @{
base64 = $base64
}
concepts = @(
$Cons
)
}
}
)
}| ConvertTo-Json -Depth 6
Write-Debug -Message $jsonbody
Try
{
$Res = Invoke-RestMethod -Uri $uri -Body $jsonbody -Headers $headers -Method Post -ErrorAction Stop
$Res
}
Catch
{
$Err = $($_.ErrorDetails.Message| ConvertFrom-Json)
Write-output -Object "$($Err.inputs.status.Description) "
Throw $_
}
}
| 18.893333 | 103 | 0.530699 |
8c6fde3546da1c540bf7273edfd0e466d67c4fc5 | 797 | sql | SQL | backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5467750_sys_gh1996-remove-client-from-gridview-webui.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/5467750_sys_gh1996-remove-client-from-gridview-webui.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/5467750_sys_gh1996-remove-client-from-gridview-webui.sql | vestigegroup/metasfresh | 4b2d48c091fb2a73e6f186260a06c715f5e2fe96 | [
"RSA-MD"
] | 441 | 2016-04-29T08:06:07.000Z | 2022-03-28T06:09:56.000Z | --
-- Remove all ad_client_id from GridViews
--
update ad_ui_element
set isdisplayedgrid = 'N', seqnogrid = 0
where ad_ui_element_id in
(
select uie.AD_UI_Element_ID
from AD_UI_Element uie
left join ad_field f on uie.ad_field_id = f.ad_field_id
left join ad_column c on f.ad_column_id = c.ad_column_id
where true
and lower(c.columnname) like 'ad_client_id'
and uie.isdisplayedgrid = 'Y'
);
--
-- Remove all ad_client_id from SideLists
--
update ad_ui_element
set isdisplayed_sidelist = 'N', seqno_sidelist = 0
where ad_ui_element_id in
(
select uie.AD_UI_Element_ID
from AD_UI_Element uie
left join ad_field f on uie.ad_field_id = f.ad_field_id
left join ad_column c on f.ad_column_id = c.ad_column_id
where true
and lower(c.columnname) like 'ad_client_id'
and uie.isdisplayed_sidelist = 'Y'
); | 25.709677 | 56 | 0.78921 |
c3aba7c816394d4a97ff0f87ed3b7d70e2b3389c | 196 | kt | Kotlin | app/src/main/java/id/co/horveno/discovermovies/util/Constant.kt | MAlvinR/KotlinDiscoverMovies | 08be0254a3651c04e2b2b3971ce8dc76e97bbd1e | [
"Apache-2.0"
] | 1 | 2017-10-09T11:39:57.000Z | 2017-10-09T11:39:57.000Z | app/src/main/java/id/co/horveno/discovermovies/util/Constant.kt | MAlvinR/KotlinDiscoverMovies | 08be0254a3651c04e2b2b3971ce8dc76e97bbd1e | [
"Apache-2.0"
] | null | null | null | app/src/main/java/id/co/horveno/discovermovies/util/Constant.kt | MAlvinR/KotlinDiscoverMovies | 08be0254a3651c04e2b2b3971ce8dc76e97bbd1e | [
"Apache-2.0"
] | null | null | null | package id.co.horveno.discovermovies.util
/**
* Created by ASUS on 03/09/2017.
*/
object Constant {
/*val API_KEY = "YOUR_API_KEY"*/
val API_KEY = "5bcd103535c907563275e5c79a7abd77"
}
| 17.818182 | 52 | 0.69898 |
495d51dcb9d9a031048658a3664cc4424a3ca9ff | 887 | asm | Assembly | libsrc/vz/vz_plot_callee.asm | andydansby/z88dk-mk2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | 1 | 2020-09-15T08:35:49.000Z | 2020-09-15T08:35:49.000Z | libsrc/vz/vz_plot_callee.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | libsrc/vz/vz_plot_callee.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | ;*****************************************************
;
; Video Technology library for small C compiler
;
; Juergen Buchmueller
;
;*****************************************************
; ----- void __CALLEE__ vz_plot_callee(int x, int y, int c)
XLIB vz_plot_callee
XDEF ASMDISP_VZ_PLOT_CALLEE
XREF scrbase
.vz_plot_callee
pop af
pop bc
pop de
pop hl
push af
ld h,e
; l = x
; h = y
; c = colour
.asmentry
ld a,h
cp 64
ret nc
ld a,l
cp 128
ret nc
sla l ; calculate screen offset
srl h
rr l
srl h
rr l
srl h
rr l
and $03 ; pixel offset
inc a
ld b,a
ld a,$fc
.pset1
rrca
rrca
rrc c
rrc c
djnz pset1
ld de,(scrbase)
add hl,de
and (hl)
or c
ld (hl),a
ret
DEFC ASMDISP_VZ_PLOT_CALLEE = asmentry - vz_plot_callee
| 12.855072 | 59 | 0.483653 |
e8336d58f76085c418e0c61015fa2abf1da0c19e | 1,436 | sql | SQL | Ora_SQLPlus_SQLcL_sql_scripts/my_proxy.sql | gpipperr/OraPowerShell | 4209ef928229daf0942975610f1ff7a1bcc95e0f | [
"MS-PL"
] | 4 | 2018-02-19T11:07:37.000Z | 2021-04-22T17:34:47.000Z | Ora_SQLPlus_SQLcL_sql_scripts/my_proxy.sql | gpipperr/OraPowerShell | 4209ef928229daf0942975610f1ff7a1bcc95e0f | [
"MS-PL"
] | null | null | null | Ora_SQLPlus_SQLcL_sql_scripts/my_proxy.sql | gpipperr/OraPowerShell | 4209ef928229daf0942975610f1ff7a1bcc95e0f | [
"MS-PL"
] | 2 | 2018-06-20T14:57:56.000Z | 2019-06-06T03:38:39.000Z | --==============================================================================
-- GPI - Gunther Pippèrr
-- Desc: get the users of the database
-- Date: November 2017
--
--==============================================================================
set verify off
set linesize 130 pagesize 300
column CURRENT_USER format a14 heading "CURRENT|USER"
column CURRENT_USERID format a14 heading "CURRENT|USERID"
column PROXY_USER format a14 heading "PROXY|USER"
column PROXY_USERID format a14 heading "PROXY|USERID"
column AUTH_IDENT format a20 heading "AUTH|IDENT"
ttitle left "My akct Identity" skip 2
SELECT SYS_CONTEXT ('USERENV', 'CURRENT_USER') CURRENT_USER
, SYS_CONTEXT ('USERENV', 'CURRENT_USERID') CURRENT_USERID
, SYS_CONTEXT ('USERENV', 'PROXY_USER') PROXY_USER
, SYS_CONTEXT ('USERENV', 'PROXY_USERID') PROXY_USERID
, SYS_CONTEXT ('USERENV', 'AUTHENTICATED_IDENTITY') AUTH_IDENT
FROM DUAL
/
ttitle left "To which users I can proxy" skip 2
column proxy format a15 heading "Proxy"
column client format a15 heading "Client|User"
column authentication format a5 heading "Auth"
column authorization_constraint format a40 heading "Auth|Const"
column role format a15 heading "Role"
select CLIENT
, AUTHENTICATION
, AUTHORIZATION_CONSTRAINT
, ROLE
from USER_PROXIES
order by 1
/
ttitle off
| 29.916667 | 80 | 0.624652 |
047876ea1115288449181321cc2713ca86919fdc | 5,256 | java | Java | src/main/java/com/webix/ui/model/GraphItemConfig.java | zhv/webix-api | 84d44c89b9f162ecddf6cf40409ece02eaacf559 | [
"BSD-3-Clause"
] | null | null | null | src/main/java/com/webix/ui/model/GraphItemConfig.java | zhv/webix-api | 84d44c89b9f162ecddf6cf40409ece02eaacf559 | [
"BSD-3-Clause"
] | null | null | null | src/main/java/com/webix/ui/model/GraphItemConfig.java | zhv/webix-api | 84d44c89b9f162ecddf6cf40409ece02eaacf559 | [
"BSD-3-Clause"
] | null | null | null | // =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.8.3,
// any modifications will be overwritten.
// ==============================================================
package com.webix.ui.model;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import com.webix.ui.model.auxiliary.Calendar;
import com.webix.ui.model.auxiliary.Colorboard;
import com.webix.ui.model.auxiliary.Pager;
import com.webix.ui.model.auxiliary.Resizer;
import com.webix.ui.model.auxiliary.Spacer;
import com.webix.ui.model.auxiliary.Tooltip;
import com.webix.ui.model.auxiliary.Video;
import com.webix.ui.model.context.Context;
import com.webix.ui.model.context.Contextmenu;
import com.webix.ui.model.context.Datasuggest;
import com.webix.ui.model.context.Gridsuggest;
import com.webix.ui.model.context.Menu;
import com.webix.ui.model.context.Popup;
import com.webix.ui.model.context.Submenu;
import com.webix.ui.model.context.Suggest;
import com.webix.ui.model.context.Window;
import com.webix.ui.model.data.Chart;
import com.webix.ui.model.data.Datatable;
import com.webix.ui.model.data.Dataview;
import com.webix.ui.model.data.Grouplist;
import com.webix.ui.model.data.List;
import com.webix.ui.model.data.Property;
import com.webix.ui.model.data.Tree;
import com.webix.ui.model.data.Treetable;
import com.webix.ui.model.data.Unitlist;
import com.webix.ui.model.form.Button;
import com.webix.ui.model.form.Checkbox;
import com.webix.ui.model.form.Colorpicker;
import com.webix.ui.model.form.Combo;
import com.webix.ui.model.form.Counter;
import com.webix.ui.model.form.Datepicker;
import com.webix.ui.model.form.Fieldset;
import com.webix.ui.model.form.Icon;
import com.webix.ui.model.form.Label;
import com.webix.ui.model.form.Multiselect;
import com.webix.ui.model.form.Multitext;
import com.webix.ui.model.form.Radio;
import com.webix.ui.model.form.Richselect;
import com.webix.ui.model.form.Search;
import com.webix.ui.model.form.Segmented;
import com.webix.ui.model.form.Select;
import com.webix.ui.model.form.Slider;
import com.webix.ui.model.form.Tabbar;
import com.webix.ui.model.form.Text;
import com.webix.ui.model.form.Textarea;
import com.webix.ui.model.form.Toggle;
import com.webix.ui.model.html.Htmlform;
import com.webix.ui.model.html.Iframe;
import com.webix.ui.model.html.Scrollview;
import com.webix.ui.model.html.Template;
import com.webix.ui.model.layouts.Accordion;
import com.webix.ui.model.layouts.Accordionitem;
import com.webix.ui.model.layouts.Carousel;
import com.webix.ui.model.layouts.Form;
import com.webix.ui.model.layouts.Headerlayout;
import com.webix.ui.model.layouts.Layout;
import com.webix.ui.model.layouts.Multiview;
import com.webix.ui.model.layouts.Tabview;
import com.webix.ui.model.layouts.Toolbar;
/**
* Defines styling for a point on the graph line.
*
* @version $Revision$ $Date$
*/
public class GraphItemConfig
implements java.io.Serializable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Radius on the point in the chart.
*/
private Integer radius;
/**
* Radius of the virtual circle which events will fire for
* items within.
*/
private Integer eventRadius;
/**
* Border color for the point.
*/
private String borderColor;
/**
* Inner color of the point.
*/
private String color;
//-----------/
//- Methods -/
//-----------/
/**
* Get border color for the point.
*
* @return String
*/
public String getBorderColor()
{
return this.borderColor;
} //-- String getBorderColor()
/**
* Get inner color of the point.
*
* @return String
*/
public String getColor()
{
return this.color;
} //-- String getColor()
/**
* Get radius of the virtual circle which events will fire for
* items within.
*
* @return Integer
*/
public Integer getEventRadius()
{
return this.eventRadius;
} //-- Integer getEventRadius()
/**
* Get radius on the point in the chart.
*
* @return Integer
*/
public Integer getRadius()
{
return this.radius;
} //-- Integer getRadius()
/**
* Set border color for the point.
*
* @param borderColor
*/
public void setBorderColor( String borderColor )
{
this.borderColor = borderColor;
} //-- void setBorderColor( String )
/**
* Set inner color of the point.
*
* @param color
*/
public void setColor( String color )
{
this.color = color;
} //-- void setColor( String )
/**
* Set radius of the virtual circle which events will fire for
* items within.
*
* @param eventRadius
*/
public void setEventRadius( Integer eventRadius )
{
this.eventRadius = eventRadius;
} //-- void setEventRadius( Integer )
/**
* Set radius on the point in the chart.
*
* @param radius
*/
public void setRadius( Integer radius )
{
this.radius = radius;
} //-- void setRadius( Integer )
}
| 26.545455 | 66 | 0.646689 |
5590e3471302a1889da3009419a9ce30fd6ba7c0 | 33,328 | htm | HTML | railway/imag/1.htm | atiqur167/railway | 5295e3b25f166e9f2c48abe8cd58d5610514e843 | [
"MIT"
] | null | null | null | railway/imag/1.htm | atiqur167/railway | 5295e3b25f166e9f2c48abe8cd58d5610514e843 | [
"MIT"
] | null | null | null | railway/imag/1.htm | atiqur167/railway | 5295e3b25f166e9f2c48abe8cd58d5610514e843 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en"> <!--<![endif]-->
<head>
<title>Crowds of Ramadan travellers overwhelm train - ABC News (Australian Broadcasting Corporation)</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/>
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/"/>
<link rel="schema.iptc" href="urn:newsml:iptc.org:20031010:topicset.iptc-genre:8"/>
<link rel="canonical" data-abc-platform="standard" href="https://www.abc.net.au/news/2013-08-08/overcrowded-train-dhaka-bangladesh-ramadan-eid/4874386"/>
<meta name="title" content="Crowds of Ramadan travellers overwhelm train"/>
<meta name="description" content="Passengers climb to board an overcrowded train at a railway station in Dhaka."/>
<meta name="keywords" content="dhaka, train, bangladesh, ramadan, eid, islam, muslim"/>
<meta name="ICBM" content="24,90"/>
<meta name="geo.position" content="24;90"/>
<meta name="ContentId" content="4874386"/>
<meta name="ABC.site" content="ABC News"/>
<meta name="ABC.editorialGenre" content="News & Current Affairs"/>
<meta name="ABC.tags" content="islam"/>
<meta name="ABC_WCMS_sitesearch_include" content="true"/>
<meta name="twitter:card" content="summary"/>
<meta name="ABC.ContentType" content="ABCPictureProxy"/>
<meta name="DC.Publisher.CorporateName" content="Australian Broadcasting Corporation"/>
<meta name="DC.rights" scheme="DCTERMS.URI" content="https://www.abc.net.au/conditions.htm#UseOfContent"/>
<meta name="DC.rightsHolder" content="Reuters"/>
<meta name="DC.type" content="StillImage"/>
<meta name="DC.type" scheme="iptc-genre" content="Current"/>
<meta name="DC.title" content="Crowds of Ramadan travellers overwhelm train"/>
<meta name="DC.creator.CorporateName" content="Australian Broadcasting Corporation"/>
<meta name="DC.date" scheme="DCTERMS.W3CDTF" content="2013-08-08T16:13:16+1000"/>
<meta name="DC.format" scheme="DCTERMS.IMT" content="text/html"/>
<meta name="DC.identifier" scheme="DCTERMS.URI" content="https://www.abc.net.au/news/2013-08-08/overcrowded-train-dhaka-bangladesh-ramadan-eid/4874386"/>
<meta name="DC.subject" scheme="ABCTERMS.subject" content="Community and Society:Religion and Beliefs:Islam"/>
<meta name="DCTERMS.issued" scheme="DCTERMS.W3CDTF" content="2013-08-08T16:13:16+1000"/>
<meta name="DCTERMS.modified" scheme="DCTERMS.W3CDTF" content="2013-08-08T16:13:16+1000"/>
<meta name="DCTERMS.spatial" content="Bangladesh"/>
<meta name="DCTERMS.spatial" scheme="DCTERMS.DCMIPoint" content="east=90;north=24"/>
<meta property="og:title" content="Crowds of Ramadan travellers overwhelm train"/>
<meta property="og:description" content="Passengers climb to board an overcrowded train at a railway station in Dhaka."/>
<meta property="og:url" content="https://www.abc.net.au/news/2013-08-08/overcrowded-train-dhaka-bangladesh-ramadan-eid/4874386"/>
<meta property="og:image" content="https://www.abc.net.au/news/image/4874298-16x9-700x394.jpg"/>
<meta property="og:image:type" content="image/jpeg"/>
<meta property="og:image:width" content="700"/>
<meta property="og:image:height" content="394"/>
<meta name="twitter:image" content="https://www.abc.net.au/news/image/4874298-16x9-700x394.jpg"/>
<meta property="og:updated_time" content="2013-08-08T16:13:16+1000"/>
<meta property="og:site_name" content="ABC News"/>
<meta name="twitter:site" content="@ABCNews"/>
<meta name="apple-mobile-web-app-title" content="ABC News"/>
<meta property="fb:pages" content="72924719987"/>
<link rel="alternate" data-abc-platform="mobile" media="only screen and (max-width: 640px)" href="https://mobile.abc.net.au/news/2013-08-08/overcrowded-train-dhaka-bangladesh-ramadan-eid/4874386"/>
<link media="all" rel="stylesheet" type="text/css"
href="https://res.abc.net.au/bundles/2.4.0/styles/abc.bundle.2.4.0.min.css"/>
<link rel="stylesheet" type="text/css"
href="https://www.abc.net.au/res/sites/news-projects/news-core/1.19.23/desktop.css"/>
<link rel="alternate" type="application/rss+xml" title="Just In" href="/news/feed/51120/rss.xml">
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://www.abc.net.au/cm/cb/8413652/News+iOS+76x76+2017/data.png"/>
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://www.abc.net.au/cm/cb/8413658/News+iOS+120x120+2017/data.png"/>
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://www.abc.net.au/cm/cb/8413660/News+iOS+152x152+2017/data.png"/>
<link rel="apple-touch-icon-precomposed" sizes="180x180" href="https://www.abc.net.au/cm/cb/8413674/News+iOS+180x180+2017/data.png"/>
<script type="text/javascript" src="/news/ajax/45902/managed.js"></script>
<script type="text/javascript" src="https://www.abc.net.au/res/libraries/jquery/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="https://www.abc.net.au/res/libraries/location/abc.location-1.latest.min.js"></script>
<script type="text/javascript" src="https://www.abc.net.au/res/bundles/platforms/abc.bundle.platforms-1.0.min.js"></script>
<script type="text/javascript" src="https://www.abc.net.au/res/sites/news-projects/news-core/1.19.23/desktop.js"></script>
<script type="text/javascript" src="/cm/code/8724582/abc.news.config-2018-07-11.js" async></script>
<script>
window.dataLayer = window.dataLayer || [];
</script>
<script>
window.dataLayer.push({
'debug': {
'schemaVersion': '20180315',
},
'document': {
'language': '',
'canonicalUrl':'https://www.abc.net.au/news/2013-08-08/overcrowded-train-dhaka-bangladesh-ramadan-eid/4874386',
'contentType': 'imageproxy',
'uri':'coremedia://imageproxy/4874386',
'contentSource':'coremedia',
'id':'4874386',
'pageTitle':'Crowds of Ramadan travellers overwhelm train',
'title':{
'title':'Crowds of Ramadan travellers overwhelm train',
'teaser':'Crowds of Ramadan travellers overwhelm train',
'short':'Crowded train in Bangladesh',
},
'siteRoot':{
'segment':'news',
'title':'ABC News',
},
'lastModified':' Thu 08 Aug 2013, 16:13PM EST',
},
})
</script>
<script>
window.dataLayer.push({
'application': {
'generatorName': 'WCMS JSP',
'generatorVersion': '18.10.8.8.0',
'environment':'production',
'wcmsTheme':'phase1-news',
}
})
</script>
</head>
<body
class="platform-standard news">
<!-- Start ABC Bundle Header 2.4.0 (customised - p1) -->
<!--noindex-->
<nav id="abcHeader" class="global" aria-label="ABC Network Navigation" data-resourcebase="https://res.abc.net.au/bundles/2.4.0/" data-scriptsbase="https://res.abc.net.au/bundles/2.4.0/scripts/" data-version="2.4.0">
<a class="home" href="https://www.abc.net.au/" data-mobile="https://mobile.abc.net.au/"><img src="https://res.abc.net.au/bundles/2.4.0/images/logo-abc@2x.png" width="65" height="16" alt="" />ABC Home</a>
<div class="sites">
<a class="controller" href="javascript:;" aria-controls="abcNavSites"><img src="https://res.abc.net.au/bundles/2.4.0/images/icon-menu-grey@1x.gif" data-src="images/icon-menu-grey@1x.gif" data-hover="images/icon-menu-blue@1x.gif" class="icon" alt="" /><span class='text'><span>Open</span> Sites <span>menu</span></span></a>
<div id="abcNavSites" class="menu" role="menu" aria-expanded="false">
<ul>
<li class="odd"><a role="menuitem" href="https://www.abc.net.au/" data-mobile="https://mobile.abc.net.au/">ABC Home</a></li>
<li><a role="menuitem" href="https://www.abc.net.au/news/" data-mobile="https://mobile.abc.net.au/news/">News</a></li>
<li class="odd"><a role="menuitem" href="https://iview.abc.net.au" data-mobile="https://iview.abc.net.au">iview</a></li>
<li><a role="menuitem" href="https://www.abc.net.au/tv/" data-mobile="https://www.abc.net.au/tv/">TV</a></li>
<li class="odd"><a role="menuitem" href="https://radio.abc.net.au/" data-mobile="https://radio.abc.net.au/">Radio</a></li>
<li><a role="menuitem" href="https://www.abc.net.au/children/" data-mobile="https://mobile.abc.net.au/children/">Kids</a></li>
<li class="odd"><a role="menuitem" href="https://shop.abc.net.au/" data-mobile="https://shop.abc.net.au/">Shop</a></li>
<li><a role="menuitem" class="more" href="https://www.abc.net.au/more/" data-mobile="https://www.abc.net.au/more/">More</a></li>
</ul>
</div>
</div>
<div class="accounts">
<!-- Accounts is currently injected due to different URLs --><span data-src="images/icon-user-grey@1x.png" data-hover="images/icon-user-blue@1x.png"></span>
</div>
<a class="search" href="https://search.abc.net.au/" data-mobile="https://search.abc.net.au/"><span>Search</span>
<img src="https://res.abc.net.au/bundles/2.4.0/images/icon-search-grey@1x.png" data-hover="images/icon-search-blue@1x.png" class="icon" alt="" /></a>
</nav>
<!--endnoindex-->
<!-- End ABC Bundle Header 2.4.0 (p1) -->
<!--noindex-->
<div class="page_margins">
<div id="header" class="header">
<div class="brand">
<a href="/news/"><img class="print" src="/cm/lb/8212706/data/news-logo-2017---desktop-print-data.png" alt="ABC News" width="387" height="100" />
<img class="noprint" src="/cm/lb/8212704/data/news-logo2017-data.png" alt="ABC News" width="242" height="80" />
</a></div>
<a href="/news/australia/" class="location-widget">Australia</a><a href="/news/weather/" class="weather-widget">Weather</a></div>
<div id="nav" class="nav">
<ul id="primary-nav">
<li id="n-news" class="active"><a href="/news/">News Home</a></li><li id="n-justin" class=""><a href="/news/justin/">Just In</a></li><li id="n-politics" class=""><a href="/news/politics/">Politics</a></li><li id="n-world" class=""><a href="/news/world/">World</a></li><li id="n-business" class=""><a href="/news/business/">Business</a></li><li id="n-sport" class=""><a href="/news/sport/">Sport</a></li><li id="n-science" class=""><a href="/news/science/">Science</a></li><li id="n-health" class=""><a href="/news/health/">Health</a></li><li id="n-arts-culture" class=""><a href="/news/arts-culture/">Arts</a></li><li id="n-analysis-and-opinion" class=""><a href="/news/analysis-and-opinion/">Analysis</a></li><li id="n-factcheck" class=""><a href="/news/factcheck/">Fact Check</a></li><li id="n-more" class=""><a href="/news/more/">Other</a></li></ul>
</div>
<!-- A modules - start -->
<div class="section media-article media-article-photo">
<img src="https://www.abc.net.au/news/image/4874298-3x2-940x627.jpg" alt="Passengers climb to board an overcrowded train at a railway station in Dhaka" title="Crowds of Ramadan travellers overwhelm train" width="940" height="627"/></div>
<!-- A modules - end -->
<div class="page section">
<div class="subcolumns">
<div class="c75l">
<!-- B modules - start -->
<div class="article section">
<div class="tools">
<a class="button"
href="https://www2b.abc.net.au/EAF/View/MailToQuery.aspx?https://www.abc.net.au/news/2013-08-08/overcrowded-train-dhaka-bangladesh-ramadan-eid/4874386"><span>Email</span></a>
</div><!--endnoindex-->
<h1>Crowds of Ramadan travellers overwhelm train</h1>
<p class="published">
Posted
<span class="timestamp">
August 08, 2013 16:13:16
</span>
</p>
<p>Passengers climb to board an overcrowded train at a railway station in Dhaka, Bangladesh, as millions of residents travel home to celebrate the end of Ramadan.</p><div class="byline">
Reuters: Andrew Biraj</div>
<p class="topics">
<strong>Topics:</strong>
<a href="/news/topic/islam">islam</a>,
<a href="/news/topic/bangladesh">bangladesh</a>
</p>
<!--noindex-->
</div>
<!-- B modules - end -->
</div>
<div class="c25r sidebar">
<!-- Sidebar modules - start -->
<div class="section localised-top-stories">
<div class="inner">
<h2>Top Stories</h2>
<ul class="headlines">
<li>
<a href="/news/2019-03-02/sydney-mardi-gras-kicks-of-in-fearless-style/10864732">Thousands flock to Sydney's Mardi Gras to celebrate the fearless and fabulous</a>
<span class="media">
<span class="photos" title="Photos">(photos)</span>
</span>
</li>
<li>
<a href="/news/2019-03-02/india-australia-1st-odi-live-scorecentre-stats-score-commentary/10857032"><em>SPORT</em>
Live: In-form Australia takes on India in first ODI</a>
</li>
<li>
<a href="/news/2019-03-02/nicola-gobbo-informer-3838-lawyer-x-past-role-alp-letters-hoax/10861574">A political whodunnit: Nicola Gobbo's role in 1996 election eve hoax</a>
</li>
<li>
<a href="/news/2019-03-02/sheilas-shakedown-women-find-lifechanging-biking-campout/10850946">There's more to this women-only bikie rally than just beer, bikes and nudity</a>
</li>
<li>
<a href="/news/2019-03-02/bushfire-emergency-warning-for-gembrook-bunyip/10864312">Emergency warnings issued for bushfires east of Melbourne</a>
<span class="media">
<span class="photos" title="Photos">(photos)</span>
</span>
</li>
<li>
<a href="/news/2019-03-02/ita-buttrose-message-for-scott-morrison/10862366">Analysis: Ita Buttrose has a message about trust. Our politicians would do well to hear it</a>
<span class="media">
<span class="photos" title="Photos">(photos)</span>
</span>
</li>
<li>
<a href="/news/2019-03-02/lucky-escape-after-fishing-rod-struck-by-lightning/10864920">'Mate, we cheated death': Fishing trio in lucky escape as lightning destroys rod</a>
</li>
<li>
<a href="/news/2019-03-02/christopher-pyne-retires-from-politics/10864364">'I don't get flapped by these things': PM insists he's not distracted by ministerial exodus</a>
<span class="media">
<span class="photos" title="Photos">(photos)</span>
</span>
</li>
<li>
<a href="/news/2019-03-02/man-dies-five-weeks-after-dog-attack/10864514">Man dies five weeks after Sydney dog attack</a>
</li>
<li>
<a href="/news/2019-03-02/rescuers-hope-for-miracle-as-indonesia-mine-goes-silent/10864948">'A miracle if they can survive': Voices from inside collapsed Indonesian mine fall silent</a>
</li>
<li>
<a href="/news/2019-03-02/grandmother-nearly-floats-away-on-ice/10864738">'Iceberg queen' grandmother almost washed out to sea while posing for photo</a>
</li>
<li>
<a href="/news/2019-03-02/winx-sets-world-record-with-chipping-norton-win/10864412"><em>SPORT</em>
Winx sets Group One world record with Chipping Norton Stakes win</a>
</li>
<li>
<a href="/news/2019-03-02/top-bridge-player-banned-for-doping/10865072">World's top bridge player banned for doping </a>
</li>
<li>
<a href="/news/2019-03-02/pilot-with-bogus-credentials-charged-airline-seeking-millions/10864524">Pilot who lied about licence discovered after 'some strange turns' over Swiss Alps</a>
</li>
<li>
<a href="/news/2019-03-02/nick-kyrgios-beats-john-isner-to-make-mexico-atp-tour-final/10864928"><em>SPORT</em>
Kyrgios wins through to Mexico final after three-set epic</a>
</li>
<li>
<a href="/news/2019-03-02/whos-the-boss-actress-katherine-helmond-dies-in-los-angeles/10864718">Katherine Helmond, from Who's The Boss? and Cars, has died</a>
<span class="media">
<span class="photos" title="Photos">(photos)</span>
</span>
</li>
<li>
<a href="/news/2019-03-02/lamborghini-found-crashed-in-a-ditch-owned-by-bitcoin-investor-/10864498">Lamborghini abandoned in ditch owned by 'calmest guy in the world'</a>
</li>
<li>
<a href="/news/2019-03-02/what-happens-to-solar-panels-in-the-heat/10743650">Does heat help or hinder solar panels?</a>
</li>
<li>
<a href="/news/2019-03-02/woman-with-rare-bone-disease-donates-her-skeleton-to-a-museum/10864470">Woman who died with rare bone disease finds 'forever home' as museum exhibit</a>
<span class="media">
<span class="photos" title="Photos">(photos)</span>
</span>
</li>
<li>
<a href="/news/2019-03-02/australian-working-mums-ask-for-help-to-cut-back-booze-doctors/10847188">'It was misused to self-medicate': When the 'mummy juice' wine culture goes too far</a>
</li>
</ul>
</div>
</div>
<div class="section graphic">
<a href="http://m.me/abcnews.au?ref=welcomefromABCNewshomepage">
<img src="/cm/lb/10757972/data/messenger-data.png" alt="Get the headlines to your mobile. NEWS on Messenger." title="Get the headlines to your mobile. NEWS on Messenger." height="70" width="220" />
</a>
</div>
<div class="connect-with-abc section promo">
<h2>Connect with ABC News</h2>
<ul>
<li><a href="http://www.facebook.com/abcnews.au" target="_self" title="">
<span class="valign-helper"></span><img src="/cm/lb/6388890/data/facebook-data.png" alt="ABC News on Facebook" title="ABC News on Facebook" width="30" height="30" />
</a></li>
<li><a href="http://instagram.com/abcnews_au" target="_self" title="">
<span class="valign-helper"></span><img src="/cm/lb/6389068/data/instagram-data.png" alt="ABC News on Instagram" title="ABC News on Instagram" width="32" height="31" />
</a></li>
<li><a href="http://www.twitter.com/abcnews" target="_self" title="">
<span class="valign-helper"></span><img src="/cm/lb/6388894/data/twitter-data.png" alt="ABC News on Twitter" title="ABC News on Twitter" width="32" height="27" />
</a></li>
<li><a href="http://www.youtube.com/newsonabc" target="_self" title="">
<span class="valign-helper"></span><img src="/cm/lb/6389052/data/youtube-data.png" alt="ABC News on YouTube" title="ABC News on YouTube" width="50" height="22" />
</a></li>
<li><a href="https://apple.news/TsieN9U-WQ0SZbtP1VTI4uQ" target="_self" title="">
<span class="valign-helper"></span><img src="/cm/lb/8458084/data/applenews-data.png" alt="ABC News on Apple News" title="ABC News on Apple News" width="32" height="32" />
</a></li>
</ul>
<div class="clear"></div>
</div>
<div class="section graphic">
<a href="/news/feeds/">
<img src="/cm/lb/4745996/thumbnail/news-podcasts-sidebar-graphic-promo-thumbnail.jpg" alt="News Podcasts" title="News Podcasts" class="" width="220" />
</a></div><div class="section promo">
<div class="inner">
<h2>
<a href="/news/contact/tip-off/"
>
<span>Got a news tip?</span>
</a>
</h2><p>If you have inside knowledge of a topic in the news, <a href="/news/contact/tip-off/" target="_self" title="">contact the ABC</a>.</p></div>
</div>
<div class="related">
<div class="newsmail-signup card">
<h2>News in your inbox</h2>
<span class="spiel">Top headlines, analysis, breaking alerts</span>
<div class="form main">
</div>
<a href="/news/alerts/subscribe/">More info</a>
</div>
</div>
<div class="section promo">
<div class="inner">
<h2>
<a href="https://www.abc.net.au/news/about/backstory/"
>
<span>ABC Backstory</span>
</a>
</h2><p><a href="https://www.abc.net.au/news/about/backstory/" target="_self" title="">ABC teams share the story behind the story and insights into the making of digital, TV and radio content.</a></p></div>
</div>
<div class="section promo">
<div class="inner">
<h2>
<a href="https://about.abc.net.au/how-the-abc-is-run/what-guides-us/abc-editorial-standards/"
>
<span>Editorial Policies</span>
</a>
</h2><p><a href="https://about.abc.net.au/how-the-abc-is-run/what-guides-us/abc-editorial-standards/" target="_self" title="">Read about our editorial guiding principles and the enforceable standard our journalists follow.</a></p></div>
</div>
<!-- Sidebar modules - end -->
</div>
</div>
</div><!-- C modules - start -->
<!-- C modules - end -->
<div id="footer" class="page section">
<!-- program footer-->
<div class="subcolumns">
<div id="sitemap" class="c75l">
<div class="section">
<h2>Site Map</h2>
</div>
<div class="subcolumns">
<div class="c16l">
<div class="section">
<h3>Sections</h3><ul class="nav">
<li>
<a href="/news/"
>
<span>ABC News</span>
</a>
</li>
<li>
<a href="/news/justin/"
>
<span>Just In</span>
</a>
</li>
<li>
<a href="/news/world/"
>
<span>World</span>
</a>
</li>
<li>
<a href="/news/business/"
>
<span>Business</span>
</a>
</li>
<li>
<a href="/news/health/"
>
<span>Health</span>
</a>
</li>
<li>
<a href="/news/entertainment/"
>
<span>Entertainment</span>
</a>
</li>
<li>
<a href="/news/sport/"
>
<span>Sport</span>
</a>
</li>
<li>
<a href="/news/analysis-and-opinion/"
>
<span>Analysis & Opinion</span>
</a>
</li>
<li>
<a href="/news/weather/"
>
<span>Weather</span>
</a>
</li>
<li>
<a href="/news/topics/"
>
<span>Topics</span>
</a>
</li>
<li>
<a href="/news/archive/"
>
<span>Archive</span>
</a>
</li>
<li>
<a href="/news/corrections/"
>
<span>Corrections & Clarifications</span>
</a>
</li>
</ul>
</div>
</div>
<div class="c16l">
<div class="section">
<h3>Local Weather</h3><ul class="nav">
<li>
<a href="https://www.abc.net.au/sydney/weather/"
>
<span>Sydney Weather</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/melbourne/weather/"
>
<span>Melbourne Weather</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/adelaide/weather/"
>
<span>Adelaide Weather</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/brisbane/weather/"
>
<span>Brisbane Weather</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/perth/weather/"
>
<span>Perth Weather</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/hobart/weather/"
>
<span>Hobart Weather</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/darwin/weather/"
>
<span>Darwin Weather</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/canberra/weather/"
>
<span>Canberra Weather</span>
</a>
</li>
</ul>
</div>
</div>
<div class="c16l">
<div class="section">
<h3>Local News</h3><ul class="nav">
<li>
<a href="https://www.abc.net.au/sydney/news/"
>
<span>Sydney News</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/melbourne/news/"
>
<span>Melbourne News</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/adelaide/news/"
>
<span>Adelaide News</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/brisbane/news/"
>
<span>Brisbane News</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/perth/news/"
>
<span>Perth News</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/hobart/news/"
>
<span>Hobart News</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/darwin/news/"
>
<span>Darwin News</span>
</a>
</li>
<li>
<a href="https://www.abc.net.au/canberra/news/"
>
<span>Canberra News</span>
</a>
</li>
</ul>
</div>
</div>
<div class="c16l">
<div class="section">
<h3>Media</h3><ul class="nav">
<li>
<a href="/news/video/"
>
<span>Video</span>
</a>
</li>
<li>
<a href="/news/audio/"
>
<span>Audio</span>
</a>
</li>
<li>
<a href="/news/photos/"
>
<span>Photos</span>
</a>
</li>
</ul>
</div>
</div>
<div class="c16l">
<div class="section">
<h3>Subscribe</h3><ul class="nav">
<li>
<a href="/news/feeds/"
>
<span>Podcasts</span>
</a>
</li>
<li>
<a href="/news/alerts/"
>
<span>NewsMail</span>
</a>
</li>
</ul>
</div>
</div>
<div class="c16l">
<div class="section">
<h3>Connect</h3><ul class="nav">
<li>
<a href="/news/upload/"
>
<span>Upload</span>
</a>
</li>
<li>
<a href="/news/contact/"
>
<span>Contact Us</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- right section-->
<div class="c25r">
<div id="fineprint" class="section">
<p>
<small>This service may include material from Agence France-Presse (AFP), APTN, Reuters, AAP, CNN and the BBC World Service which is copyright and cannot be reproduced.</small>
</p>
<p>
<small>AEDT = Australian Eastern Daylight Savings Time which is 11 hours ahead of GMT (Greenwich Mean Time)</small>
</p>
</div>
</div>
</div>
<div class="platforms">
<a href="https://mobile.abc.net.au/news/2013-08-08/overcrowded-train-dhaka-bangladesh-ramadan-eid/4874386?pfm=sm" class="platform-mobile switch">Change to mobile view</a></div>
</div><!-- End footer --></div>
<!-- Start Webtrends -->
<div class="hide">
</div>
<!-- End Webtrends -->
<!--endnoindex--><!--Global footer-->
<!-- Start ABC Bundle Footer 2.4.0 (customised - p1) -->
<!--noindex-->
<nav id="abcFooter" class="global" aria-label="ABC Footer Navigation" data-version="2.4.0">
<ul>
<li><a href="https://about.abc.net.au/terms-of-use/">Terms of Use</a></li>
<li><a href="https://about.abc.net.au/abc-privacy-policy/">Privacy Policy</a></li>
<li><a href="https://about.abc.net.au/accessibility-statement/">Accessibility</a></li>
<li><a href="https://about.abc.net.au/talk-to-the-abc/">Contact the ABC</a></li>
<li><a href="https://about.abc.net.au/terms-of-use/#UseOfContent">© <time>2019</time> ABC</a></li>
</ul>
</nav>
<!-- ABC.Bundle Scripts -->
<script type="text/javascript" src="https://res.abc.net.au/bundles/2.4.0/scripts/abc.bundle.2.4.0.min.js"></script>
<!-- End ABC.Bundle Scripts -->
<!-- Webtrends -->
<script type="text/javascript" src="https://res.abc.net.au/libraries/stats/abc.stats.bundle.js"></script>
<!-- End Webtrends -->
<!-- Nielsen Online SiteCensus V6.0 -->
<!-- COPYRIGHT 2010 Nielsen Online -->
<noscript><div><img src="//secure-au.imrworldwide.com/cgi-bin/m?ci=abc-aust&cg=0&cc=1&ts=noscript" width="1" height="1" alt=""></div></noscript>
<!-- End Nielsen Online SiteCensus V6.0 -->
<!-- Google Tag Manager -->
<script type="text/javascript">
// <![CDATA[
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PB2GX');
// ]]>
</script>
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-PB2GX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager -->
<!-- ABC MyLogin -->
<script type="text/javascript" src="https://mylogin.abc.net.au/js/abc.mylogin.embedded.js"></script>
<script type="text/javascript">ABC.MyLoginEmbedded.init();</script>
<!-- End ABC MyLogin -->
<!--endnoindex-->
<!-- End ABC Bundle Footer 2.4.0 (customised - p1) -->
<!--end global footer-->
</body>
</html>
| 17.661897 | 860 | 0.528355 |
9b205a60732c94c37af22ba960cac937babdd224 | 125 | kt | Kotlin | src/main/kotlin/core/IRuleBuilder.kt | effe-megna/ValiflaKtion | 1262acd7dab65f9ce8bdaf246082de02e1d20032 | [
"MIT"
] | 8 | 2019-01-21T10:01:29.000Z | 2020-12-24T10:25:37.000Z | src/main/kotlin/core/IRuleBuilder.kt | effe-megna/ValiflaKtion | 1262acd7dab65f9ce8bdaf246082de02e1d20032 | [
"MIT"
] | null | null | null | src/main/kotlin/core/IRuleBuilder.kt | effe-megna/ValiflaKtion | 1262acd7dab65f9ce8bdaf246082de02e1d20032 | [
"MIT"
] | null | null | null | package org.example.core
interface IRuleBuilder <T : Any> {
fun buildFromAnnotation(annotation: Annotation): IRule<T>?
} | 25 | 62 | 0.752 |
9526064f60b57a18a31fa29a2f91921534ed9556 | 36 | ps1 | PowerShell | ROM/SumGame/Game/OnKey_Esc.ps1 | StartAutomating/PowerArcade | 2f45408db51c55c44c93d363eec551b29eb74f64 | [
"MIT"
] | 42 | 2020-04-01T11:33:08.000Z | 2022-01-09T16:22:33.000Z | ROM/SumGame/Game/OnKey_Esc.ps1 | StartAutomating/PowerArcade | 2f45408db51c55c44c93d363eec551b29eb74f64 | [
"MIT"
] | null | null | null | ROM/SumGame/Game/OnKey_Esc.ps1 | StartAutomating/PowerArcade | 2f45408db51c55c44c93d363eec551b29eb74f64 | [
"MIT"
] | null | null | null | $game.IsRunning = $false
Clear-Host | 18 | 25 | 0.75 |
f55aa8223efbded32f7102a3ee6a867a5d07455c | 5,461 | rs | Rust | src/day_16.rs | jacobguenther/advent_of_code_2020 | c1e4ea46e106b9845b9a30ec9240c7527ec5fd11 | [
"MIT"
] | null | null | null | src/day_16.rs | jacobguenther/advent_of_code_2020 | c1e4ea46e106b9845b9a30ec9240c7527ec5fd11 | [
"MIT"
] | null | null | null | src/day_16.rs | jacobguenther/advent_of_code_2020 | c1e4ea46e106b9845b9a30ec9240c7527ec5fd11 | [
"MIT"
] | null | null | null | // File: day_16.rs
// Author: Jacob Guenther
// Date: December 2020
/*
Copyright 2020 Jacob Guenther
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
use super::common::{vec2::Vec2, *};
pub struct Challenge {
part_1_result: usize,
notes: Notes,
}
impl ChallengeT for Challenge {
type Output1 = usize;
type Output2 = usize;
fn day() -> u8 {
16
}
fn new() -> Self {
let mut split_input = include_str!("../inputs/day_16.txt").split("\n\n");
let fields = split_input
.next()
.unwrap()
.lines()
.map(|line| {
let mut parts = line.split(": ");
let name = parts.next().unwrap();
let mut ranges = parts.next().unwrap().split(" or ");
let mut nums_1 = ranges.next().unwrap().split('-');
let mut nums_2 = ranges.next().unwrap().split('-');
(
name,
Vec2::new(
nums_1.next().unwrap().parse::<usize>().unwrap(),
nums_1.next().unwrap().parse::<usize>().unwrap(),
),
Vec2::new(
nums_2.next().unwrap().parse::<usize>().unwrap(),
nums_2.next().unwrap().parse::<usize>().unwrap(),
),
)
})
.collect::<Vec<(&str, Vec2<usize>, Vec2<usize>)>>();
let my_ticket = split_input
.next()
.unwrap()
.split(":\n")
.nth(1)
.unwrap()
.split(',')
.map(|s| s.parse::<usize>().unwrap())
.collect::<Vec<_>>();
let mut error_rate = 0;
let filtered_tickets = split_input
.next()
.unwrap()
.split(":\n")
.nth(1)
.unwrap()
.split_whitespace()
.filter_map(|line| {
let ticket = line
.split(',')
.map(|s| s.parse::<usize>().unwrap())
.collect::<Vec<_>>();
for value in ticket.iter() {
let mut in_range = false;
for (_, range1, range2) in fields.iter() {
if bound_by(*value, range1, range2) {
in_range = true;
break;
}
}
if !in_range {
error_rate += value;
return None;
}
}
Some(ticket)
})
.collect::<Vec<_>>();
Self {
part_1_result: error_rate,
notes: Notes {
fields,
my_ticket,
filtered_tickets,
},
}
}
fn part_1(&self) -> Self::Output1 {
self.part_1_result
}
fn part_2(&self) -> Self::Output2 {
let height = self.notes.filtered_tickets.len();
let width = self.notes.filtered_tickets[0].len();
let mut columns = vec![vec![0; height]; width];
for (y, column) in columns.iter_mut().enumerate() {
for (x, item) in column.iter_mut().enumerate() {
*item = self.notes.filtered_tickets[x][y];
}
}
let matches = columns
.iter()
.map(|column| {
self.notes
.fields
.iter()
.filter_map(|(field_name, range1, range2)| {
for value in column.iter() {
if !bound_by(*value, range1, range2) {
return None;
}
}
Some(*field_name)
})
.collect::<Vec<_>>()
})
.collect::<Vec<_>>();
let col_names = find_order(&matches, 0, &Vec::new()).unwrap();
col_names
.iter()
.zip(self.notes.my_ticket.iter())
.filter(|(col_name, _)| col_name.starts_with("de"))
.fold(1, |product, (_, &ticket_val)| product * ticket_val)
}
}
type FieldName = &'static str;
type Field = (FieldName, Vec2<usize>, Vec2<usize>);
type Ticket = Vec<usize>;
struct Notes {
fields: Vec<Field>,
my_ticket: Ticket,
filtered_tickets: Vec<Ticket>,
}
fn bound_by(value: usize, range1: &Vec2<usize>, range2: &Vec2<usize>) -> bool {
(value >= range1.x && value <= range1.y) || (value >= range2.x && value <= range2.y)
}
fn find_order(
matches: &[Vec<FieldName>],
current: usize,
partial: &[FieldName],
) -> Option<Vec<FieldName>> {
if current == matches.len() {
return Some(partial.to_owned());
}
let mut param = partial.to_owned();
for option in matches[current].iter() {
if partial.contains(option) {
continue;
}
param.push(option);
if let Some(result) = find_order(matches, current + 1, ¶m) {
return Some(result);
}
param.pop();
}
None
}
#[cfg(test)]
mod tests {
use super::Challenge;
use crate::common::ChallengeT;
use test::Bencher;
#[test]
fn part_1_test() {
assert_eq!(Challenge::new().part_1(), 26941);
}
#[test]
fn part_2_test() {
assert_eq!(Challenge::new().part_2(), 634796407951);
}
#[bench]
fn part_1_bench(b: &mut Bencher) {
b.iter(|| Challenge::new().part_1())
}
#[bench]
fn part_2_bench(b: &mut Bencher) {
b.iter(|| Challenge::new().part_2())
}
#[bench]
fn both(b: &mut Bencher) {
b.iter(|| {
let challenge = Challenge::new();
challenge.part_1();
challenge.part_2();
})
}
}
| 24.710407 | 85 | 0.627358 |
532f8abd35d6d5ee71f124b6cbcb324abbced5a5 | 4,506 | lua | Lua | src-lua/prelude.lua | Vespertinus/tarantool | 7b7f6168e1b8630ac059e9e747487df82ae48369 | [
"BSD-2-Clause"
] | 12 | 2017-03-14T11:33:08.000Z | 2022-01-18T13:23:17.000Z | src-lua/prelude.lua | Vespertinus/tarantool | 7b7f6168e1b8630ac059e9e747487df82ae48369 | [
"BSD-2-Clause"
] | null | null | null | src-lua/prelude.lua | Vespertinus/tarantool | 7b7f6168e1b8630ac059e9e747487df82ae48369 | [
"BSD-2-Clause"
] | 2 | 2019-09-24T23:36:05.000Z | 2020-12-14T18:49:48.000Z | local ffi = require("ffi")
local bit = require('bit')
local C = ffi.C
require('cdef_base')
require('cdef')
require('packer')
ddump = require('ddump')
make_repl_env = require 'repl'
function os.ev_time()
return C.ev_time()
end
function os.ev_now()
return C.ev_rt_now
end
local print_ = print
function print (...)
local s = {}
for i=1,select('#', ...) do
local v = select(i, ...)
s[#s+1] = tostring(v) or 'nil'
end
print_(table.concat(s, '\t'))
end
local format = string.format
function printf(...) print_(format(...)) end
function sddump(x)
local buf = {}
ddump(x, function (...) for i = 1,select('#',...) do table.insert(buf, (select(i, ...))) end end)
print(table.concat(buf))
end
-- prefer external files over bundled ones
package.loaders[2], package.loaders[1] = package.loaders[1], package.loaders[2]
-- .so exensions are currently unused - do not load them.
package.loaders[3] = nil
package.loaders[4] = nil
local type, getmetatable = type, getmetatable
function assertarg(arg, expected, n, level)
local argtype = type(arg)
if argtype == 'cdata' then
if ffi.typeof(arg) == expected then
return
end
elseif type(expected) == 'table' then
if argtype == 'table' and getmetatable(arg) == expected then
return
end
else
if argtype == expected then
return
end
end
local fname = debug.getinfo(2 + (level or 0), "n").name
local etype = type(arg) ~= 'cdata' and type(arg) or tostring(ffi.typeof(arg))
local msg = string.format("bad argument #%s to '%s' (%s expected, got %s)",
n and tostring(n) or '?', fname, expected, etype)
error(msg, 3 + (level or 0))
end
varint32 = {}
function varint32.read(ptr)
local result = 0
for i = 0,4 do
result = bit.bor(bit.lshift(result, 7),
bit.band(ptr[i], 0x7f))
if bit.band(ptr[i], 0x80) == 0 then
return result, i + 1
end
end
error('bad varint32')
end
local charptr = ffi.typeof('uint8_t *')
function varint32.write(ptr, value)
ptr = ffi.cast(charptr, ptr)
if value < 128 then
ptr[0] = value
return 1
elseif value < 128*128 then
ptr[0] = bit.bor(bit.rshift(value, 7), 0x80)
ptr[1] = bit.band(value, 0x7f)
return 2
else
local n = 3
local c = bit.rshift(value, 21)
while c > 0 do
c = bit.rshift(c, 7)
n = n + 1
end
ptr[n - 1] = bit.band(value, 0x7f)
value = bit.rshift(value, 7)
for i = n - 2, 0, -1 do
ptr[i] = bit.bor(bit.band(value, 0x7f), 0x80)
value = bit.rshift(value, 7)
end
return n
end
end
object_cast = {}
local object_t = ffi.typeof('struct tnt_object *')
local object_cast = object_cast
function object(ptr)
if ptr == nil then
return nil
end
local obj = ffi.cast(object_t, ptr)
local ct = object_cast[ffi.C.object_type(obj)]
if ct then
return ct(obj)
end
assert (false)
end
local safeptr_mt = {
__index = function(self, i)
if i < 1 or i > self.nelem then
error('index out of bounds', 2)
end
return self.ptr[i-1]
end,
__len = function(self)
return self.nelem
end
}
function safeptr(object, ptr, nelem)
return setmetatable({[0] = object, ptr = ptr, nelem = nelem}, safeptr_mt)
end
function say(level, filename, line, fmt, ...)
if level < say_level.ERROR or level > say_level.DEBUG3 then
error('bad log level', 2)
end
ffi.C._say(level, filename, line, "%s", format(fmt, ...))
end
for _, levelstr in ipairs({"ERROR", "WARN", "INFO", "DEBUG", "DEBUG2", "DEBUG3"}) do
local level = ffi.C[levelstr]
_G[("say_%s"):format(levelstr:lower())] = function (fmt, ...)
-- 'if' required because debug.getinfo disables JIT
if ffi.C.max_level >= level then
local dinfo = debug.getinfo(2, "Sl")
local filename, line = dinfo.short_src, dinfo.currentline
ffi.C._say(level, filename, line, "%s", format(fmt, ...))
end
end
end
function palloc(size)
return ffi.C.palloc(ffi.C.current_fiber().pool, size)
end
function cut_traceback(deep)
local current = debug.traceback('', 2)
local last_line_match = #deep
for i=1, #current do
if current:byte(-i) ~= deep:byte(-i) then
break
end
if current:byte(-i) == 10 then
last_line_match = #deep - i
end
end
return deep:sub(1, last_line_match)
end
| 26.046243 | 101 | 0.601864 |
24c38817d0b4623001ed1cd471a184038bfc62ae | 1,292 | asm | Assembly | libsrc/_DEVELOPMENT/adt/b_array/z80/asm_b_array_append_n.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/adt/b_array/z80/asm_b_array_append_n.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/adt/b_array/z80/asm_b_array_append_n.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; ===============================================================
; Mar 2014
; ===============================================================
;
; size_t b_array_append_n(b_array_t *a, size_t n, int c)
;
; Append n copies of char c to the end of the array, return
; index of new block.
;
; ===============================================================
SECTION code_clib
SECTION code_adt_b_array
PUBLIC asm_b_array_append_n
EXTERN asm_b_array_append_block, asm_memset, error_mc
asm_b_array_append_n:
; enter : hl = array *
; de = n
; bc = int c
;
; exit : success
;
; hl = idx of bytes appended
; de = & array.data[idx]
; carry reset
;
; fail if array too small
;
; hl = -1
; de = n
; carry set
;
; uses : af, bc, de, hl
push bc ; save char
call asm_b_array_append_block
jp c, error_mc - 1
; append successful, now fill appended area
; bc = n
; de = idx = old array.size
; hl = & array.data[idx]
; stack = char
ex de,hl
ex (sp),hl
ex de,hl
; bc = n
; de = int c
; hl = & array.data[idx]
; stack = idx
call asm_memset
pop de
ex de,hl
ret
| 19.283582 | 65 | 0.442724 |
57b303fb9186fb4e06af7f221fbc0590b3201c3a | 2,284 | lua | Lua | addons/cw2/lua/cw/client/cw_umsgs.lua | JacubRSTNC/PoliceRP-OpenSource | adcf19f765331521b6934ecb1c180a978ba7f44d | [
"MIT"
] | 17 | 2021-08-17T16:05:20.000Z | 2022-03-17T09:55:24.000Z | addons/cw2/lua/cw/client/cw_umsgs.lua | JacubRSTNC/PoliceRP-OpenSource | adcf19f765331521b6934ecb1c180a978ba7f44d | [
"MIT"
] | 1 | 2022-02-10T19:12:08.000Z | 2022-02-10T19:36:02.000Z | addons/cw2/lua/cw/client/cw_umsgs.lua | JacubRSTNC/PoliceRP-OpenSource | adcf19f765331521b6934ecb1c180a978ba7f44d | [
"MIT"
] | 4 | 2021-08-19T11:41:36.000Z | 2022-03-20T08:56:28.000Z | local function CW20_LOSTATTACHMENTS()
local ply = LocalPlayer()
CustomizableWeaponry.postSpawn(ply)
end
usermessage.Hook("CW20_LOSTATTACHMENTS", CW20_LOSTATTACHMENTS)
-- this event removes previous attachments and adds new ones
net.Receive("CW20_OVERWRITEATTACHMENTS", function()
local ply = LocalPlayer()
ply.CWAttachments = ply.CWAttachments or {}
local ply = LocalPlayer()
local str = net.ReadString()
-- remove previous attachments
for k, v in pairs(ply.CWAttachments) do
ply.CWAttachments[k] = nil
end
CustomizableWeaponry.decodeAttachmentString(ply, str)
end)
net.Receive("CW20_NEWATTACHMENTS", function()
local ply = LocalPlayer()
local str = net.ReadString()
CustomizableWeaponry.decodeAttachmentString(ply, str)
end)
local comma = ", "
net.Receive("CW20_NEWATTACHMENTS_NOTIFY", function()
local ply = LocalPlayer()
local str = net.ReadString()
-- decode the string
local attNames = string.Explode(" ", str)
-- figure out how many attachments we're missing
local missingAttachments = CustomizableWeaponry:countMissingAttachments(ply, attNames)
local final = ""
local arraySize = #attNames
local found = false
-- assemble the attachment names
for k, v in ipairs(attNames) do
local target = CustomizableWeaponry.registeredAttachmentsSKey[v]
-- make sure the player has the attachment and the specified attachment actually exists
if target and not ply.CWAttachments[v] then
if k == arraySize then
final = final .. target.displayName
else
-- if only 1 attachment is missing, we shouldn't place a comma
if missingAttachments == 1 then
final = final .. target.displayName
else
final = final .. target.displayName .. comma
end
end
-- add the attachments to the clientside table
ply.CWAttachments[v] = true
found = true
end
end
if found then
-- print the attachments we got
chat.AddText(Color(255, 255, 255, 255), "Got new attachments: ", Color(0, 175, 255, 255), final, Color(255, 255, 255, 255), ".")
else
-- if there are none, let the player know (this shouldn't happen, since he shouldn't be able to pick up a package the contents of which he already has anyway)
chat.AddText(Color(255, 175, 175, 255), "Got no new attachments from package.")
end
end) | 28.55 | 160 | 0.728546 |
aefda514c0d2a626d218711b3688b7cb104e668b | 372 | swift | Swift | CoronaContact/Scenes/Shared/LaunchScreen/LaunchScreenViewController.swift | emrdgrmnci/stopp-corona-ios | 2ce3d95cc9359e0f68dbc3c0a64c5ffcd096f899 | [
"Apache-2.0"
] | null | null | null | CoronaContact/Scenes/Shared/LaunchScreen/LaunchScreenViewController.swift | emrdgrmnci/stopp-corona-ios | 2ce3d95cc9359e0f68dbc3c0a64c5ffcd096f899 | [
"Apache-2.0"
] | null | null | null | CoronaContact/Scenes/Shared/LaunchScreen/LaunchScreenViewController.swift | emrdgrmnci/stopp-corona-ios | 2ce3d95cc9359e0f68dbc3c0a64c5ffcd096f899 | [
"Apache-2.0"
] | null | null | null | //
// LaunchScreenViewController.swift
// CoronaContact
//
import UIKit
import Reusable
final class LaunchScreenViewController: UIViewController, StoryboardBased {
@IBOutlet private weak var launchScreenView: LaunchScreenView!
func fadeOut(withDuration duration: TimeInterval) {
launchScreenView.startFadeOutAnimation(withDuration: duration)
}
}
| 21.882353 | 75 | 0.77957 |
53dd236bcea7912bff4d373b735186d03d530295 | 4,136 | java | Java | backend/de.metas.ui.web.base/src/main/java/de/metas/ui/web/payment_allocation/process/PaymentsView_PaymentWriteOff.java | metas-fresh/fresh | 265b6e00fbbf154d6a7bbb9aaf9cf7135f9d6a27 | [
"RSA-MD"
] | 1 | 2015-11-09T07:13:14.000Z | 2015-11-09T07:13:14.000Z | backend/de.metas.ui.web.base/src/main/java/de/metas/ui/web/payment_allocation/process/PaymentsView_PaymentWriteOff.java | metas-fresh/fresh | 265b6e00fbbf154d6a7bbb9aaf9cf7135f9d6a27 | [
"RSA-MD"
] | null | null | null | backend/de.metas.ui.web.base/src/main/java/de/metas/ui/web/payment_allocation/process/PaymentsView_PaymentWriteOff.java | metas-fresh/fresh | 265b6e00fbbf154d6a7bbb9aaf9cf7135f9d6a27 | [
"RSA-MD"
] | null | null | null | /*
* #%L
* de.metas.ui.web.base
* %%
* Copyright (C) 2022 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
* #L%
*/
package de.metas.ui.web.payment_allocation.process;
import com.google.common.collect.ImmutableList;
import de.metas.common.util.time.SystemTime;
import de.metas.currency.Amount;
import de.metas.i18n.ExplainedOptional;
import de.metas.i18n.ITranslatableString;
import de.metas.i18n.TranslatableStrings;
import de.metas.money.MoneyService;
import de.metas.payment.PaymentAmtMultiplier;
import de.metas.payment.PaymentId;
import de.metas.payment.api.IPaymentBL;
import de.metas.process.IProcessPrecondition;
import de.metas.process.Param;
import de.metas.process.ProcessPreconditionsResolution;
import de.metas.ui.web.payment_allocation.PaymentRow;
import de.metas.util.Services;
import de.metas.util.collections.CollectionUtils;
import lombok.Builder;
import lombok.NonNull;
import lombok.Value;
import org.compiere.SpringContextHolder;
import java.time.LocalDate;
public class PaymentsView_PaymentWriteOff extends PaymentsViewBasedProcess implements IProcessPrecondition
{
private final IPaymentBL paymentBL = Services.get(IPaymentBL.class);
private final MoneyService moneyService = SpringContextHolder.instance.getBean(MoneyService.class);
@Param(parameterName = "DateTrx", mandatory = true)
private LocalDate p_DateTrx;
@Override
protected ProcessPreconditionsResolution checkPreconditionsApplicable()
{
if (!getInvoiceRowsSelectedForAllocation().isEmpty())
{
return ProcessPreconditionsResolution.rejectWithInternalReason("No invoices shall be selected");
}
return creatPlan()
.resolve(plan -> ProcessPreconditionsResolution.accept().deriveWithCaptionOverride(computeCaption(plan.getAmountToWriteOff())),
ProcessPreconditionsResolution::rejectWithInternalReason);
}
private ExplainedOptional<Plan> creatPlan()
{
return createPlan(getPaymentRowsSelectedForAllocation());
}
private static ITranslatableString computeCaption(final Amount writeOffAmt)
{
return TranslatableStrings.builder()
.appendADElement("PaymentWriteOffAmt").append(": ").append(writeOffAmt)
.build();
}
@Override
protected String doIt()
{
final Plan plan = creatPlan().orElseThrow();
final PaymentAmtMultiplier amtMultiplier = plan.getAmtMultiplier();
final Amount amountToWriteOff = amtMultiplier.convertToRealValue(plan.getAmountToWriteOff());
paymentBL.paymentWriteOff(
plan.getPaymentId(),
amountToWriteOff.toMoney(moneyService::getCurrencyIdByCurrencyCode),
p_DateTrx.atStartOfDay(SystemTime.zoneId()).toInstant(),
null);
return MSG_OK;
}
//
//
//
private static ExplainedOptional<Plan> createPlan(@NonNull final ImmutableList<PaymentRow> paymentRows)
{
if (paymentRows.size() != 1)
{
return ExplainedOptional.emptyBecause("Only one payment row can be selected for write-off");
}
final PaymentRow paymentRow = CollectionUtils.singleElement(paymentRows);
final Amount openAmt = paymentRow.getOpenAmt();
if (openAmt.signum() == 0)
{
return ExplainedOptional.emptyBecause("Zero open amount. Nothing to write-off");
}
return ExplainedOptional.of(
Plan.builder()
.paymentId(paymentRow.getPaymentId())
.amtMultiplier(paymentRow.getPaymentAmtMultiplier())
.amountToWriteOff(openAmt)
.build());
}
@Value
@Builder
private static class Plan
{
@NonNull PaymentId paymentId;
@NonNull PaymentAmtMultiplier amtMultiplier;
@NonNull Amount amountToWriteOff;
}
}
| 31.097744 | 131 | 0.774662 |
502bfd12471286153d4b47ca59be229bf56aa928 | 866 | go | Go | api/product/TaobaoProductsSearch.go | phpyandong/opentaobao | a7e3cc3ec7eeb492b20a6b8023798d5592d15fe5 | [
"Apache-2.0"
] | 1 | 2021-06-29T08:56:24.000Z | 2021-06-29T08:56:24.000Z | api/product/TaobaoProductsSearch.go | phpyandong/opentaobao | a7e3cc3ec7eeb492b20a6b8023798d5592d15fe5 | [
"Apache-2.0"
] | null | null | null | api/product/TaobaoProductsSearch.go | phpyandong/opentaobao | a7e3cc3ec7eeb492b20a6b8023798d5592d15fe5 | [
"Apache-2.0"
] | null | null | null | package product
import (
"github.com/bububa/opentaobao/core"
"github.com/bububa/opentaobao/model/product"
)
/*
搜索产品信息
taobao.products.search
只有天猫商家发布商品时才需要用到,并非商品搜索api,当前暂不提供商品搜索api。<br/>二种方式搜索所有产品信息(二种至少传一种): <br/>
传入关键字q搜索<br/>
传入cid和props搜索<br/>
返回值支持:product_id,name,pic_path,cid,props,price,tsc<br/>
当用户指定了cid并且cid为垂直市场(3C电器城、鞋城)的类目id时,默认只返回小二确认<br/>的产品。如果用户没有指定cid,或cid为普通的类目,默认返回商家确认或小二确认的产<br/>品。如果用户自定了status字段,以指定的status类型为准。
<br/>新增一:
传入suite_items_str 按规格搜索套装产品。
返回字段增加suite_items_str,is_suite_effecitve支持。
*/
func TaobaoProductsSearch(clt *core.SDKClient, req *product.TaobaoProductsSearchRequest, session string) (*product.TaobaoProductsSearchAPIResponse, error) {
var resp product.TaobaoProductsSearchAPIResponse
err := clt.Post(req, &resp, session)
if err != nil {
return nil, err
}
return &resp, nil
}
| 29.862069 | 156 | 0.766744 |
043eb5ad96695889bfca135c737941c56f978ea6 | 9,472 | java | Java | testbench/modules/testBehavior/languages/L7/source_gen/BHL7/structure/StructureAspectDescriptor.java | trespasserw/MPS | dbc5c76496e8ccef46dd420eefcd5089b1bc234b | [
"Apache-2.0"
] | null | null | null | testbench/modules/testBehavior/languages/L7/source_gen/BHL7/structure/StructureAspectDescriptor.java | trespasserw/MPS | dbc5c76496e8ccef46dd420eefcd5089b1bc234b | [
"Apache-2.0"
] | null | null | null | testbench/modules/testBehavior/languages/L7/source_gen/BHL7/structure/StructureAspectDescriptor.java | trespasserw/MPS | dbc5c76496e8ccef46dd420eefcd5089b1bc234b | [
"Apache-2.0"
] | null | null | null | package BHL7.structure;
/*Generated by MPS */
import jetbrains.mps.smodel.runtime.BaseStructureAspectDescriptor;
import jetbrains.mps.smodel.runtime.ConceptDescriptor;
import java.util.Collection;
import java.util.Arrays;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.smodel.adapter.ids.SConceptId;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.runtime.impl.ConceptDescriptorBuilder2;
public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
/*package*/ final ConceptDescriptor myConceptA = createDescriptorForA();
/*package*/ final ConceptDescriptor myConceptB = createDescriptorForB();
/*package*/ final ConceptDescriptor myConceptC = createDescriptorForC();
/*package*/ final ConceptDescriptor myConceptD = createDescriptorForD();
/*package*/ final ConceptDescriptor myConceptE = createDescriptorForE();
/*package*/ final ConceptDescriptor myConceptF = createDescriptorForF();
/*package*/ final ConceptDescriptor myConceptG = createDescriptorForG();
/*package*/ final ConceptDescriptor myConceptH = createDescriptorForH();
/*package*/ final ConceptDescriptor myConceptI1 = createDescriptorForI1();
/*package*/ final ConceptDescriptor myConceptI2 = createDescriptorForI2();
/*package*/ final ConceptDescriptor myConceptI3 = createDescriptorForI3();
/*package*/ final ConceptDescriptor myConceptK = createDescriptorForK();
/*package*/ final ConceptDescriptor myConceptL = createDescriptorForL();
/*package*/ final ConceptDescriptor myConceptM = createDescriptorForM();
private final LanguageConceptSwitch myIndexSwitch;
public StructureAspectDescriptor() {
myIndexSwitch = new LanguageConceptSwitch();
}
@Override
public void reportDependencies(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.Dependencies deps) {
deps.extendedLanguage(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, "jetbrains.mps.lang.core");
}
@Override
public Collection<ConceptDescriptor> getDescriptors() {
return Arrays.asList(myConceptA, myConceptB, myConceptC, myConceptD, myConceptE, myConceptF, myConceptG, myConceptH, myConceptI1, myConceptI2, myConceptI3, myConceptK, myConceptL, myConceptM);
}
@Override
@Nullable
public ConceptDescriptor getDescriptor(SConceptId id) {
switch (myIndexSwitch.index(id)) {
case LanguageConceptSwitch.A:
return myConceptA;
case LanguageConceptSwitch.B:
return myConceptB;
case LanguageConceptSwitch.C:
return myConceptC;
case LanguageConceptSwitch.D:
return myConceptD;
case LanguageConceptSwitch.E:
return myConceptE;
case LanguageConceptSwitch.F:
return myConceptF;
case LanguageConceptSwitch.G:
return myConceptG;
case LanguageConceptSwitch.H:
return myConceptH;
case LanguageConceptSwitch.I1:
return myConceptI1;
case LanguageConceptSwitch.I2:
return myConceptI2;
case LanguageConceptSwitch.I3:
return myConceptI3;
case LanguageConceptSwitch.K:
return myConceptK;
case LanguageConceptSwitch.L:
return myConceptL;
case LanguageConceptSwitch.M:
return myConceptM;
default:
return null;
}
}
/*package*/ int internalIndex(SAbstractConcept c) {
return myIndexSwitch.index(c);
}
private static ConceptDescriptor createDescriptorForA() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "A", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x559729dec0466d3cL);
b.class_(false, false, false);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/6167444251392503100");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForB() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "B", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x559729dec0466d3dL);
b.class_(false, false, false);
// extends: BHL7.structure.A
b.super_(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x559729dec0466d3cL);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/6167444251392503101");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForC() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "C", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x4dcf589c68321a72L);
b.class_(false, false, false);
// extends: BHL7.structure.B
b.super_(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x559729dec0466d3dL);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/5606797489885813362");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForD() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "D", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x549fa4aa12af52b3L);
b.class_(false, false, false);
b.parent(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x549fa4aa12af5261L);
b.parent(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x549fa4aa12af528cL);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/6097773470847816371");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForE() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "E", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x10b2a2acd7137351L);
b.class_(false, false, false);
b.parent(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x10b2a2acd713731eL);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/1203202913687794513");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForF() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "F", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x75783c3114f90130L);
b.class_(false, false, false);
b.parent(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x549fa4aa12af5261L);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/8464581681145774384");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForG() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "G", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x75783c3114f90190L);
b.class_(false, false, false);
// extends: BHL7.structure.F
b.super_(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x75783c3114f90130L);
b.parent(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x549fa4aa12af528cL);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/8464581681145774480");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForH() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "H", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x3a674fdfabfcc7faL);
b.class_(false, false, false);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/4208420198882789370");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForI1() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "I1", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x549fa4aa12af5261L);
b.interface_();
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/6097773470847816289");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForI2() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "I2", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x549fa4aa12af528cL);
b.interface_();
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/6097773470847816332");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForI3() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "I3", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x10b2a2acd713731eL);
b.interface_();
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/1203202913687794462");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForK() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "K", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x66c9579bde227bd6L);
b.class_(false, false, false);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/7406547389145840598");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForL() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "L", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x65e1cc96389f813cL);
b.class_(false, true, false);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/7341373813157757244");
b.version(3);
return b.create();
}
private static ConceptDescriptor createDescriptorForM() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("BHL7", "M", 0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x65e1cc96389f81beL);
b.class_(false, false, false);
b.origin("r:0766eaf2-1894-47af-9a97-3484d14d48e4(BHL7.structure)/7341373813157757374");
b.version(3);
b.aggregate("myL", 0x65e1cc96389f81c7L).target(0x4239359f64574d2aL, 0xb1e014d3f948db39L, 0x65e1cc96389f813cL).optional(true).ordered(true).multiple(false).origin("7341373813157757383").done();
return b.create();
}
}
| 47.59799 | 196 | 0.761613 |
44d96563e3c673d68f88e1952782945c39c00b39 | 12,138 | swift | Swift | Sources/Satin/Core/Raycaster.swift | OskarGroth/Satin | c29677b9e7217c66511998fff10b72a00204f76a | [
"MIT"
] | null | null | null | Sources/Satin/Core/Raycaster.swift | OskarGroth/Satin | c29677b9e7217c66511998fff10b72a00204f76a | [
"MIT"
] | null | null | null | Sources/Satin/Core/Raycaster.swift | OskarGroth/Satin | c29677b9e7217c66511998fff10b72a00204f76a | [
"MIT"
] | null | null | null | //
// Raycaster.swift
// Satin
//
// Created by Reza Ali on 4/22/20.
//
#if os(iOS) || os(macOS)
import Combine
import Metal
import MetalPerformanceShaders
import simd
public struct RaycastResult {
public let barycentricCoordinates: simd_float3
public let distance: Float
public let normal: simd_float3
public let position: simd_float3
public let uv: simd_float2
public let primitiveIndex: UInt32
public let object: Object
public let submesh: Submesh?
public init(barycentricCoordinates: simd_float3, distance: Float, normal: simd_float3, position: simd_float3, uv: simd_float2, primitiveIndex: UInt32, object: Object, submesh: Submesh?) {
self.barycentricCoordinates = barycentricCoordinates
self.distance = distance
self.normal = normal
self.position = position
self.uv = uv
self.primitiveIndex = primitiveIndex
self.object = object
self.submesh = submesh
}
}
open class Raycaster {
public var ray = Ray() {
didSet {
originParam.value = ray.origin
directionParam.value = ray.direction
}
}
public var near: Float = 0.0 {
didSet {
nearParam.value = near
}
}
public var far = Float.infinity {
didSet {
farParam.value = far
}
}
internal lazy var originParam: PackedFloat3Parameter = {
PackedFloat3Parameter("origin", ray.origin)
}()
internal lazy var nearParam: FloatParameter = {
FloatParameter("near", near)
}()
internal lazy var directionParam: PackedFloat3Parameter = {
PackedFloat3Parameter("direction", ray.direction)
}()
internal lazy var farParam: FloatParameter = {
FloatParameter("far", far)
}()
internal lazy var rayParams: ParameterGroup = {
let params = ParameterGroup("Ray")
params.append(originParam)
params.append(nearParam)
params.append(directionParam)
params.append(farParam)
return params
}()
internal var distanceParam = FloatParameter("distance", 0.0)
internal var primitiveIndexParam = UInt32Parameter("index", 0)
internal var barycentricCoordinatesParam = Float2Parameter("coordinates", .zero)
internal lazy var intersectionParams: ParameterGroup = {
let params = ParameterGroup("Intersection")
params.append(distanceParam)
params.append(primitiveIndexParam)
params.append(barycentricCoordinatesParam)
return params
}()
internal weak var device: MTLDevice?
internal var commandQueue: MTLCommandQueue?
internal var intersector: MPSRayIntersector?
internal var accelerationStructures: [String: MPSTriangleAccelerationStructure] = [:]
internal var subscriptions: [String: AnyCancellable] = [:]
var _count: Int = -1 {
didSet {
if _count != oldValue {
setupRayBuffers()
setupIntersectionBuffers()
}
}
}
var rayBuffer: Buffer!
var intersectionBuffer: Buffer!
// Ideally you create a raycaster on start up and reuse it over and over
public init(device: MTLDevice) {
self.device = device
setup()
}
public init(device: MTLDevice, _ origin: simd_float3, _ direction: simd_float3, _ near: Float = 0.0, _ far: Float = Float.infinity) {
self.device = device
ray = Ray(origin, direction)
self.near = near
self.far = far
setup()
}
public init(device: MTLDevice, _ ray: Ray, _ near: Float = 0.0, _ far: Float = Float.infinity) {
self.device = device
self.ray = ray
self.near = near
self.far = far
setup()
}
public init(device: MTLDevice, _ camera: Camera, _ coordinate: simd_float2, _ near: Float = 0.0, _ far: Float = Float.infinity) {
self.device = device
setFromCamera(camera, coordinate)
self.near = near
self.far = far
setup()
}
deinit {
// subscriptions.removeAll()
accelerationStructures = [:]
intersector = nil
commandQueue = nil
device = nil
}
func setup() {
setupCommandQueue()
setupIntersector()
}
func setupCommandQueue() {
guard let device = device, let commandQueue = device.makeCommandQueue() else { fatalError("Unable to create Command Queue") }
self.commandQueue = commandQueue
}
func setupIntersector() {
guard let device = device else { fatalError("Unable to create Intersector") }
let intersector = MPSRayIntersector(device: device)
intersector.rayDataType = .originMinDistanceDirectionMaxDistance
intersector.rayStride = MemoryLayout<MPSRayOriginMinDistanceDirectionMaxDistance>.stride
intersector.intersectionDataType = .distancePrimitiveIndexCoordinates
intersector.triangleIntersectionTestType = .default
self.intersector = intersector
}
// expects a normalize point from -1 to 1 in both x & y directions
public func setFromCamera(_ camera: Camera, _ coordinate: simd_float2 = .zero) {
ray = Ray(camera, coordinate)
}
private func setupRayBuffers() {
guard let device = device, _count > 0 else { return }
rayBuffer = Buffer(device: device, parameters: rayParams, count: _count)
}
private func setupIntersectionBuffers() {
guard let device = device, _count > 0 else { return }
intersectionBuffer = Buffer(device: device, parameters: intersectionParams, count: _count)
}
public func intersect(_ object: Object, _ recursive: Bool = true, _ invisible: Bool = false, _ callback: @escaping (_ results: [RaycastResult]) -> ()) {
let intersectables = _getIntersectables([object], recursive, invisible)
guard let commandBuffer = _intersect(intersectables) else { return callback([]) }
commandBuffer.addCompletedHandler { [weak self] _ in
if let self = self {
callback(self.getResults(intersectables))
}
}
commandBuffer.commit()
}
public func intersect(_ object: Object, _ recursive: Bool = true, _ invisible: Bool = false) -> [RaycastResult] {
let intersectables = _getIntersectables([object], recursive, invisible)
guard let commandBuffer = _intersect(intersectables) else { return [] }
commandBuffer.commit()
commandBuffer.waitUntilCompleted()
return getResults(intersectables)
}
public func intersect(_ objects: [Object], _ recursive: Bool = true, _ invisible: Bool = false) -> [RaycastResult] {
let intersectables = _getIntersectables(objects, recursive, invisible)
guard let commandBuffer = _intersect(intersectables) else { return [] }
commandBuffer.commit()
commandBuffer.waitUntilCompleted()
return getResults(intersectables)
}
private func _getIntersectables(_ objects: [Object], _ recursive: Bool = true, _ invisible: Bool = false) -> [Intersectable] {
var results: [Intersectable] = []
for object in objects {
let intersectables: [Intersectable] = getIntersectables(object, recursive, invisible).filter { $0.intersects(ray: ray) }
for intersectable in intersectables {
if let mesh = intersectable as? Mesh, !mesh.submeshes.isEmpty {
let submeshes = mesh.submeshes.filter { $0.intersectable }
for submesh in submeshes {
results.append(submesh)
}
}
else {
results.append(intersectable)
}
}
}
_count = results.count
return results
}
private func _intersect(_ intersectables: [Intersectable]) -> MTLCommandBuffer? {
guard let commandBuffer = commandQueue?.makeCommandBuffer() else { return nil }
commandBuffer.label = "Raycaster Command Buffer"
for (index, intersectable) in intersectables.enumerated() {
intersect(commandBuffer, rayBuffer, intersectionBuffer, intersectable, index)
}
return commandBuffer
}
private func intersect(_ commandBuffer: MTLCommandBuffer,
_ rayBuffer: Buffer,
_ intersectionBuffer: Buffer,
_ intersectable: Intersectable,
_ index: Int)
{
let worldMatrix = intersectable.worldMatrix
let worldMatrixInverse = worldMatrix.inverse
let origin = worldMatrixInverse * simd_make_float4(ray.origin, 1.0)
let direction = worldMatrixInverse * simd_make_float4(ray.direction)
originParam.value = simd_make_float3(origin)
directionParam.value = simd_make_float3(direction)
rayBuffer.update(index)
var accelerationStructure: MPSAccelerationStructure?
if let structure = accelerationStructures[intersectable.id] {
accelerationStructure = structure
}
else if let device = device {
let newAccelerationStructure = MPSTriangleAccelerationStructure(device: device)
newAccelerationStructure.vertexBuffer = intersectable.vertexBuffer
newAccelerationStructure.vertexStride = intersectable.vertexStride
newAccelerationStructure.label = intersectable.label + " Acceleration Structure"
if let indexBuffer = intersectable.indexBuffer {
newAccelerationStructure.indexBuffer = indexBuffer
newAccelerationStructure.indexType = .uInt32
newAccelerationStructure.triangleCount = intersectable.indexCount / 3
}
else {
newAccelerationStructure.triangleCount = intersectable.vertexCount / 3
}
newAccelerationStructure.rebuild()
accelerationStructure = newAccelerationStructure
accelerationStructures[intersectable.id] = newAccelerationStructure
let subscription = intersectable.geometryPublisher.sink { [unowned self] _ in
self.accelerationStructures[intersectable.id] = nil
self.subscriptions[intersectable.id]?.cancel()
self.subscriptions[intersectable.id] = nil
}
subscriptions[intersectable.id] = subscription
}
intersector!.frontFacingWinding = (intersectable.windingOrder == .counterClockwise) ? .clockwise : .counterClockwise
intersector!.cullMode = intersectable.cullMode
intersector!.label = intersectable.label + " Raycaster Intersector"
intersector!.encodeIntersection(
commandBuffer: commandBuffer,
intersectionType: .nearest,
rayBuffer: rayBuffer.buffer,
rayBufferOffset: index * rayParams.stride,
intersectionBuffer: intersectionBuffer.buffer,
intersectionBufferOffset: index * intersectionParams.stride,
rayCount: 1,
accelerationStructure: accelerationStructure!
)
}
private func getResults(_ intersectables: [Intersectable]) -> [RaycastResult] {
var results: [RaycastResult] = []
for (index, intersectable) in intersectables.enumerated() {
intersectionBuffer.sync(index)
if distanceParam.value >= 0, let result = intersectable.getRaycastResult(ray: ray, distance: distanceParam.value, primitiveIndex: primitiveIndexParam.value, barycentricCoordinate: barycentricCoordinatesParam.value) {
results.append(result)
}
}
results.sort {
$0.distance < $1.distance
}
return results
}
public func reset() {
accelerationStructures = [:]
}
}
#endif
| 37.119266 | 228 | 0.630499 |
394409342b3e677bea8ec6d8071e8210e0a2a17b | 588 | asm | Assembly | src/hook_deploy_pfx_ninja.asm | szapp/Ninja | 7b018a5aa82bdb9f1eadea910ed1ff4711d4485a | [
"MIT"
] | 17 | 2018-07-11T20:53:46.000Z | 2022-03-01T18:20:42.000Z | src/hook_deploy_pfx_ninja.asm | szapp/Ninja | 7b018a5aa82bdb9f1eadea910ed1ff4711d4485a | [
"MIT"
] | 24 | 2018-10-23T07:47:33.000Z | 2021-02-09T09:06:25.000Z | src/hook_deploy_pfx_ninja.asm | szapp/Ninja | 7b018a5aa82bdb9f1eadea910ed1ff4711d4485a | [
"MIT"
] | null | null | null | ; Hook PFX parser in zCParticleFX::ParseParticleFXScript
%include "inc/macros.inc"
%if GOTHIC_BASE_VERSION == 1
%include "inc/symbols_g1.inc"
%elif GOTHIC_BASE_VERSION == 2
%include "inc/symbols_g2.inc"
%endif
%ifidn __OUTPUT_FORMAT__, bin
org g1g2(0x58CA22,0x5AC7BC)
%endif
bits 32
section .text align=1 ; Prevent auto-alignment
jmp deploy_pfx_ninja
; Overwrites
; resetStackoffset g1g2(0x8C,0xC8)
; lea eax, [esp+stackoffset+g1g2(-0x79,-0xB5)]
; push eax
| 22.615385 | 99 | 0.605442 |
83c966be27128ee19d1a29bbd37dc78a0884576a | 9,349 | sql | SQL | sql/data-cats.sql | novirael/school-codebase | efa2f99740d473a4121f62095dffe1b93f666819 | [
"MIT"
] | 1 | 2017-04-02T07:10:34.000Z | 2017-04-02T07:10:34.000Z | sql/data-cats.sql | novirael/school-codebase | efa2f99740d473a4121f62095dffe1b93f666819 | [
"MIT"
] | null | null | null | sql/data-cats.sql | novirael/school-codebase | efa2f99740d473a4121f62095dffe1b93f666819 | [
"MIT"
] | null | null | null | INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Fafik', 'Pies');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Stefan', 'Czlowiek');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Ochroniarz', 'Czlowiek');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Andrzej', 'Golab');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Dziecko', 'Czlowiek');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Kucharz', 'Czlowiek');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Lapek', 'Pies');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Zgrywus', 'Lis');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Tymek', 'Wiewiorka');
INSERT INTO Wrogowie
(nazwa_wroga, gatunek)
VALUES ('Mistrzunio', 'Czlowiek');
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Szef', 1, NULL);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Wabik', 1, 99);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Zwiadowca', 1, 199);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Lizus Tygrysa', 1, 200);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Medyczka', 10, 400);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Silacz', 100, 999);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Doradca', 100, 600);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Prychacz', 2, 700);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Pomoc', 300, 900);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Zaopatrzenie', 1, 99);
INSERT INTO Funkcje
(nazwa_funkcji, min_przydzial_myszy, max_przydzial_myszy)
VALUES ('Snajper', 99, 999);
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Kozaki', 1, 'Smietniki za restauracja');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Superbanda', 2, 'Park');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Pazurki', 3, 'Osiedle');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Ogoniasci', 4, 'Wybrzeze');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Pogromcy', 5, 'Centrum handlowe');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Niszczyciele', 6, 'Kolo rzeczki');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Nienawistni', 7, 'Schronisko');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Lesne Koty', 8, 'Las');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Tancerze', 9, 'Obwodnica');
INSERT INTO Bandy
(nazwa, nr_bandy, teren)
VALUES ('Smieszki', 10, 'Wies');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Tygrys', 'M', '18.01.1993', NULL, NULL, 'Szef');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Maja', 'K', '13.03.1995', 1, 'Tygrys', 'Wabik');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Mops', 'M', '21.05.1997', 1, 'Tygrys', 'Zwiadowca');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Kocur', 'M', '09.09.1997', 5, 'Tygrys', 'Lizus Tygrysa');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Szybka', 'K', '12.12.2000', 2, 'Kocur', 'Medyczka');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Ignacy', 'M', '01.01.2001', 4, 'Kocur', 'Silacz');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Madrala', 'M', '03.03.2003', 3, 'Tygrys', 'Doradca');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Zuch', 'M', '09.11.2004', 7, 'Tygrys', 'Prychacz');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Tosia', 'K', '14.02.2012', 7, 'Zuch', 'Pomoc');
INSERT INTO Koty
(pseudo, plec, data_wstapienia, nr_bandy, pseudo_szefa, nazwa_funkcji_kota)
VALUES ('Marysia', 'K', '01.02.2013', 7, 'Zuch', 'Zaopatrzenie');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Mistrzunio', 'Ignacy', 'Zlapal za ogon', 5, '01.01.2002');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Fafik', 'Tygrys', 'Dotkliwie pogryzl', 8, '13.05.2004');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Madrala', 'Kucharz', 'Gonil za kradziez kielbasy', 2, '23.08.2008');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Ochroniarz', 'Kocur', 'Zlapal w siec na ryby', 9, '11.11.2001');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Zgrywus', 'Mops', 'Ukradl szynke', 2, '18.09.2009');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Tymek', 'Tosia', 'Rzucal szyszkami', 4, '13.12.2012');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Andrzej', 'Marysia', 'Sploszyl krolika do zjedzenia', 10, '28.02.2013');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Lapek', 'Tygrys', 'Zaatakowal z nienacka', 7, '01.04.2004');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Fafik', 'Maja', 'Nie pozwolil na kradziez kury', 9, '01.05.2015');
INSERT INTO Incydenty
(nazwa_wroga, pseudo_kota, opis_incydentu, stopien_wrogosci, data_incydentu)
VALUES ('Stefan', 'Marysia', 'Krzyczal za miauczenie', 1, '13.11.2009');
INSERT INTO Lapowki
(nazwa)
VALUES ('Wodka');
INSERT INTO Lapowki
(nazwa)
VALUES ('Pieniadze');
INSERT INTO Lapowki
(nazwa)
VALUES ('Kosci');
INSERT INTO Lapowki
(nazwa)
VALUES ('Samochod');
INSERT INTO Lapowki
(nazwa)
VALUES ('Whisky');
INSERT INTO Lapowki
(nazwa)
VALUES ('Bizuteria');
INSERT INTO Lapowki
(nazwa)
VALUES ('Bursztyn');
INSERT INTO Lapowki
(nazwa)
VALUES ('Karma');
INSERT INTO Lapowki
(nazwa)
VALUES ('Jedzenie');
INSERT INTO Lapowki
(nazwa)
VALUES ('Telefon');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Wodka', 'Mistrzunio');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Karma', 'Lapek');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Pieniadze', 'Kucharz');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Telefon', 'Dziecko');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Whisky', 'Stefan');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Jedzenie', 'Tymek');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Jedzenie', 'Fafik');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Bizuteria', 'Ochroniarz');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Kosci', 'Andrzej');
INSERT INTO Lapowki_Wrogow
(nazwa_lapowki, nazwa_wroga)
VALUES ('Samochod', 'Mistrzunio');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (1, NULL, '10.01.1995', 15, 10, NULL, 'Tygrys');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (2, '10.01.2001', '10.01.1999', 11, 9, 'Tygrys', 'Mops');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (3, '20.12.2001', '12.12.2001', 15, 10, 'Maja', 'Kocur');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (4, '14.07.2002', '10.02.2002', 22, 8, 'Zuch', 'Maja');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (5, '24.05.2005', '23.05.2005', 15, 7, 'Tygrys', 'Zuch');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (6, NULL, '18.02.2008', 15, 25, NULL, 'Madrala');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (7, '11.11.2011', '16.06.2009', 12, 30, 'Madrala', 'Ignacy');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (8, NULL, '10.03.2012', 13, 31, NULL, 'Tygrys');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (9, '16.07.2013', '13.03.2013', 11, 34, 'Tosia', 'Zuch');
INSERT INTO Myszy
(nr, data_wydania, data_upolowania, waga_myszy, dlugosc_myszy, pseudo_zjadajacego_kota, pseudo_polujacego_kota)
VALUES (10, NULL, '3.07.2014', 11, 12, NULL, 'Kocur');
| 27.74184 | 111 | 0.74992 |
fb86f7d83d2f8babc49298ff083a2cdadf1058ab | 944 | java | Java | jms/jms-xa/src/main/java/org/javaee7/jms/xa/Mailman.java | ramsrib/javaee7-samples | a63598d3b56ea3eb1aed98ac36d2468e26b3b5c9 | [
"MIT"
] | 3 | 2017-05-29T02:01:24.000Z | 2020-02-27T20:55:04.000Z | jms/jms-xa/src/main/java/org/javaee7/jms/xa/Mailman.java | ramsrib/javaee7-samples | a63598d3b56ea3eb1aed98ac36d2468e26b3b5c9 | [
"MIT"
] | 1 | 2022-01-21T23:55:12.000Z | 2022-01-21T23:55:12.000Z | jms/jms-xa/src/main/java/org/javaee7/jms/xa/Mailman.java | ramsrib/javaee7-samples | a63598d3b56ea3eb1aed98ac36d2468e26b3b5c9 | [
"MIT"
] | 17 | 2016-03-27T22:49:33.000Z | 2022-03-30T11:55:16.000Z | package org.javaee7.jms.xa;
import javax.annotation.Resource;
import javax.ejb.Singleton;
import javax.inject.Inject;
import javax.jms.ConnectionFactory;
import javax.jms.JMSContext;
import javax.jms.JMSDestinationDefinition;
import javax.jms.Queue;
@JMSDestinationDefinition(
name = Mailman.CLASSIC_QUEUE,
resourceAdapter = "jmsra",
interfaceName = "javax.jms.Queue",
destinationName = "classicQueue",
description = "My Sync Queue")
@Singleton
public class Mailman {
public static final String CLASSIC_QUEUE = "java:jboss/jms/classicQueue";
@SuppressWarnings("CdiInjectionPointsInspection")
@Inject
ConnectionFactory connectionFactory;
@Resource(mappedName = CLASSIC_QUEUE)
Queue demoQueue;
public void sendMessage(String payload)
{
try (JMSContext context = connectionFactory.createContext()) {
context.createProducer().send(demoQueue, payload);
}
}
}
| 26.222222 | 77 | 0.73411 |
f0f3b8de8164ba560e89543bda9a448e5eb56e01 | 546 | dart | Dart | zold_wallet/test/wallet_test.dart | Nermeen78/zold-flutter-client | 2ca3e3dff69e622d4fd9765d9c1a9d4cf59bc40c | [
"MIT"
] | 22 | 2019-02-12T10:39:40.000Z | 2022-01-08T09:00:14.000Z | zold_wallet/test/wallet_test.dart | Nermeen78/zold-flutter-client | 2ca3e3dff69e622d4fd9765d9c1a9d4cf59bc40c | [
"MIT"
] | 135 | 2019-02-12T10:38:56.000Z | 2020-07-28T04:24:18.000Z | zold_wallet/test/wallet_test.dart | Nermeen78/zold-flutter-client | 2ca3e3dff69e622d4fd9765d9c1a9d4cf59bc40c | [
"MIT"
] | 11 | 2019-03-30T12:39:05.000Z | 2020-05-27T13:45:06.000Z |
import 'package:flutter_test/flutter_test.dart';
import 'package:zold_wallet/wallet.dart';
import 'secret.dart';
void main() {
final Wallet wallet = Wallet.instance()
..apiKey = Secrets.apiKey;
/// test the order of transactions (descending).
test('test transactions order', () async {
await wallet.updateTransactions();
expect(wallet.transactions.length, isNot(0));
for(int i=0; i<wallet.transactions.length-1; i++) {
expect(wallet.transactions[i+1].isAfter(wallet.transactions[i]), false);
}
}, skip: true);
} | 30.333333 | 78 | 0.695971 |
0cb15ac607e79bbb7d26c6e214f8e05599ab28c1 | 3,613 | lua | Lua | .config/nvim/lua/user/plugins.lua | abrfr/dotfiles | 8371a594ae88131c21c705d92ef01aa3b62d8b17 | [
"MIT"
] | null | null | null | .config/nvim/lua/user/plugins.lua | abrfr/dotfiles | 8371a594ae88131c21c705d92ef01aa3b62d8b17 | [
"MIT"
] | null | null | null | .config/nvim/lua/user/plugins.lua | abrfr/dotfiles | 8371a594ae88131c21c705d92ef01aa3b62d8b17 | [
"MIT"
] | null | null | null | local fn = vim.fn
-- Automatically install packer
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system({
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
})
print("Installing packer close and reopen Neovim...")
vim.api.nvim_command("packadd packer.nvim")
end
-- Autocommand that reloads neovim whenever you save the plugins.lua file
local packer_user_config_group = vim.api.nvim_create_augroup("Packer", { clear = true })
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "plugins.lua",
command = "source <afile> | PackerSync",
group = packer_user_config_group,
})
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
vim.notify("packer not found!")
return
end
-- Have packer use a popup window
packer.init({
display = {
open_fn = function()
return require("packer.util").float({})
end,
},
})
-- Install your plugins here
return packer.startup(function(use)
-- My plugins here
use("wbthomason/packer.nvim") -- Have packer manage itself
use("nvim-lua/popup.nvim") -- An implementation of the Popup API from vim in Neovim
use("nvim-lua/plenary.nvim") -- Useful lua functions used ny lots of plugins
use("lewis6991/impatient.nvim") -- cache lua modules for better startup time
-- readline
use("tpope/vim-rsi")
-- textobjects
use({ "kana/vim-textobj-entire", requires = { "kana/vim-textobj-user" } })
-- Keymaps
use("folke/which-key.nvim")
-- Theme
use("EdenEast/nightfox.nvim")
-- Dashboard
use("goolord/alpha-nvim")
-- Project management
use("ahmedkhalf/project.nvim")
-- completions
use("hrsh7th/nvim-cmp") -- The completion plugin
use("hrsh7th/cmp-buffer") -- buffer completions
use("hrsh7th/cmp-path") -- path completions
use("hrsh7th/cmp-cmdline") -- cmdline completions
use("hrsh7th/cmp-nvim-lsp") -- LSP completions
use("hrsh7th/cmp-nvim-lua") -- neovim lua config completions
use("saadparwaiz1/cmp_luasnip") -- snippet completions
-- snippets
use("L3MON4D3/LuaSnip") --snippet engine
use("rafamadriz/friendly-snippets") -- a bunch of snippets to use
-- LSP
use("neovim/nvim-lspconfig") -- enable LSP
use("williamboman/nvim-lsp-installer") -- auto install language servers
use("j-hui/fidget.nvim") -- language server progress indicator
use("simrat39/symbols-outline.nvim")
use("mfussenegger/nvim-jdtls") -- advanced jdtls functions
-- Lint, Format, etc
use("jose-elias-alvarez/null-ls.nvim")
-- Treesitter
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }) -- syntax highlights
-- Components
use("nvim-telescope/telescope.nvim") -- telescope
use("nvim-telescope/telescope-ui-select.nvim")
use("akinsho/toggleterm.nvim") -- terminal
use("nvim-lualine/lualine.nvim") -- status line
use("akinsho/bufferline.nvim") -- buffer line
-- Comment
use("numToStr/Comment.nvim") -- Easily comment stuff
use("JoosepAlviste/nvim-ts-context-commentstring") -- context commenting
-- Indentline indicator
use("lukas-reineke/indent-blankline.nvim")
-- Autopairs
use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter
-- NvimTree
use({ "kyazdani42/nvim-tree.lua", requires = { "kyazdani42/nvim-web-devicons" } }) -- Filetree and Icons
-- Git
use("lewis6991/gitsigns.nvim")
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if PACKER_BOOTSTRAP then
require("packer").sync()
end
end)
| 29.373984 | 105 | 0.718793 |