identifier
stringlengths
42
383
collection
stringclasses
1 value
open_type
stringclasses
1 value
license
stringlengths
0
1.81k
date
float64
1.99k
2.02k
title
stringlengths
0
100
creator
stringlengths
1
39
language
stringclasses
157 values
language_type
stringclasses
2 values
word_count
int64
1
20k
token_count
int64
4
1.32M
text
stringlengths
5
1.53M
__index_level_0__
int64
0
57.5k
https://github.com/hapejot/hape_c/blob/master/io/io_std_seek.c
Github Open Source
Open Source
Apache-2.0
null
hape_c
hapejot
C
Code
89
248
#include "platform.h" #include "io_int.h" #include <stdio.h> /*--------------------------------------------------------------------------- * NAME * io_std_seek - * * SYNOPSIS */ INT io_std_seek ( IN IO_FILE p_io, IN UINT64 p_pos ) /* * DESCRIPTION * * PARAMETERS * * RETURN VALUES * * ERRORS * [RC_OK] Successful completion. * *---------------------------------------------------------------------------*/ { INT status = RC_OK; /* end of local var. */ /* parameter check */ /* environment check */ fprintf(stderr, "std_seek\n" ); /* processing. */ if ( status == RC_OK ) { lseek( p_io->pint, p_pos, SEEK_SET ); } /* return */ return status; }
28,769
https://github.com/aguinet/dragonffi/blob/master/examples/CMakeLists.txt
Github Open Source
Open Source
Apache-2.0
2,021
dragonffi
aguinet
CMake
Code
51
314
if (BUILD_TESTS) set(EXAMPLES_DIR "${PROJECT_SOURCE_DIR}/examples") if (PYTHON_BINDINGS) set(EXAMPLES "${EXAMPLES_DIR}/archive.py" "${EXAMPLES_DIR}/fftw.py" "${EXAMPLES_DIR}/readdir.py" ) set(PYDFFI_LIB_DIR $<TARGET_FILE_DIR:pydffi>) configure_file("lit.site.cfg.in" "${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg" ESCAPE_QUOTES @ONLY) # NOTE: added --max-time to timeout lit after specified seconds. # Default timeout is one week add_custom_target(check_python_examples COMMAND ${CMAKE_COMMAND} -E env PYDFFI_DIR=${PYDFFI_LIB_DIR} "${PYTHON_EXECUTABLE}" "${LIT_RUNNER}" "${CMAKE_CURRENT_BINARY_DIR}" -v --max-time=900 DEPENDS ${EXAMPLES} ) add_dependencies(check check_python_examples) endif() endif()
13,245
https://github.com/mk0sojo/allReady/blob/master/AllReadyApp/Web-App/AllReady.UnitTest/Areas/Admin/Controllers/Builders/EventControllerBuilder.cs
Github Open Source
Open Source
MIT
2,022
allReady
mk0sojo
C#
Code
191
792
using System; using AllReady.Areas.Admin.Controllers; using AllReady.Areas.Admin.ViewModels.Validators; using AllReady.Security; using AllReady.Services; using MediatR; using Moq; namespace AllReady.UnitTest.Areas.Admin.Controllers.Builders { public class EventControllerBuilder { private IImageService _imageService; private IMediator _mediator; private IValidateEventEditViewModels _validateEventEditViewModels; private IUserAuthorizationService _userAuthorizationService; private IImageSizeValidator _imageSizeValidator; private Func<DateTime> _dateTimeTodayDate; private EventControllerBuilder(IImageService imageService, IMediator mediator, IValidateEventEditViewModels validateEventEditViewModels, IUserAuthorizationService userAuthorizationService, IImageSizeValidator imageSizeValidator) { _imageService = imageService; _mediator = mediator; _validateEventEditViewModels= validateEventEditViewModels; _userAuthorizationService = userAuthorizationService; _imageSizeValidator= imageSizeValidator; } public static EventControllerBuilder FullyMockedInstance() { return new EventControllerBuilder(Mock.Of<IImageService>(), Mock.Of<IMediator>(), Mock.Of<IValidateEventEditViewModels>(), Mock.Of<IUserAuthorizationService>(), Mock.Of<IImageSizeValidator>()); } public static EventControllerBuilder WithSuppliedInstances(IImageService imageService, IMediator mediator, IValidateEventEditViewModels validateEventEditViewModels) { return new EventControllerBuilder(imageService, mediator, validateEventEditViewModels, Mock.Of<IUserAuthorizationService>(), Mock.Of<IImageSizeValidator>()); } public static EventControllerBuilder CommonNullTestParams() { return new EventControllerBuilder(null, Mock.Of<IMediator>(), null, Mock.Of<IUserAuthorizationService>(), Mock.Of<IImageSizeValidator>()); } public static EventControllerBuilder AllNullParamsInstance() { return new EventControllerBuilder(null, null, null, null, null); } public EventControllerBuilder WithNullImageService() { _imageService = null; return this; } public EventControllerBuilder WithNullValidateEventEditViewModels() { _validateEventEditViewModels = null; return this; } public EventControllerBuilder WithMediator(IMediator mediatorObject) { _mediator = mediatorObject; return this; } public EventControllerBuilder WithToday(Func<DateTime> func) { _dateTimeTodayDate = func; return this; } public EventController Build() { var container = new EventController(_imageService, _mediator, _validateEventEditViewModels, _userAuthorizationService, _imageSizeValidator); if (_dateTimeTodayDate != null) { container.DateTimeTodayDate = _dateTimeTodayDate; } return container; } } }
45,100
https://github.com/noahamar/smlscrn/blob/master/src/client/app/server.js
Github Open Source
Open Source
MIT
2,016
smlscrn
noahamar
JavaScript
Code
535
1,440
import axios from 'axios'; import React from 'react'; import { renderToString } from 'react-dom/server'; import { createMemoryHistory, match, RouterContext } from 'react-router'; import { Provider } from 'react-redux'; import createRoutes from './routes'; import configureStore from './store'; import preRenderMiddleware from './middlewares/preRenderMiddleware'; import header from './components/Meta/Meta'; const clientConfig = { host: process.env.HOSTNAME || 'localhost', port: process.env.PORT || '3000' }; // configure baseURL for axios requests (for serverside API calls) axios.defaults.baseURL = `http://${clientConfig.host}:${clientConfig.port}`; const analtyicsScript = typeof trackingID === "undefined" ? `` : `<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', ${trackingID}, 'auto'); ga('send', 'pageview'); </script>`; /* * To Enable Google analytics simply replace the hashes with your tracking ID * and move the constant to above the analtyicsScript constant. * * Currently because the ID is declared beneath where is is being used, the * declaration will get hoisted to the top of the file. * however the assignement does not, so it is undefined for the type check above. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var#var_hoisting */ const trackingID = "'UA-########-#'"; /* * Export render function to be used in server/config/routes.js * We grab the state passed in from the server and the req object from Express/Koa * and pass it into the Router.run function. */ export default function render(req, res) { // const authenticated = req.isAuthenticated(); const history = createMemoryHistory(); const store = configureStore({ // user: { // authenticated, // isWaiting: false, // message: '', // isLogin: true // } }, history); const routes = createRoutes(store); /* * From the react-router docs: * * This function is to be used for server-side rendering. It matches a set of routes to * a location, without rendering, and calls a callback(err, redirect, props) * when it's done. * * The function will create a `history` for you, passing additional `options` to create it. * These options can include `basename` to control the base name for URLs, as well as the pair * of `parseQueryString` and `stringifyQuery` to control query string parsing and serializing. * You can also pass in an already instantiated `history` object, which can be constructured * however you like. * * The three arguments to the callback function you pass to `match` are: * - err: A javascript Error object if an error occured, `undefined` otherwise. * - redirect: A `Location` object if the route is a redirect, `undefined` otherwise * - props: The props you should pass to the routing context if the route matched, * `undefined` otherwise. * If all three parameters are `undefined`, this means that there was no route found matching the * given location. */ match({routes, location: req.url}, (err, redirect, props) => { if (err) { res.status(500).json(err); } else if (redirect) { res.redirect(302, redirect.pathname + redirect.search); } else if (props) { // This method waits for all render component // promises to resolve before returning to browser preRenderMiddleware( store.dispatch, props.components, props.params ) .then(() => { const initialState = store.getState(); const componentHTML = renderToString( <Provider store={store}> <RouterContext {...props} /> </Provider> ); res.status(200).send(` <!doctype html> <html ${header.htmlAttributes.toString()}> <head> ${header.title.toString()} ${header.meta.toString()} ${header.link.toString()} <link rel="stylesheet" href="/assets/styles/main.css" /> <link rel="icon" href="https://i.imgur.com/3hGdjE7.png" /> </head> <body> <div id="app"><div>${componentHTML}</div></div> <script>window.__INITIAL_STATE__ = ${JSON.stringify(initialState)};</script> ${analtyicsScript} <script type="text/javascript" charset="utf-8" src="/assets/client.js"></script> </body> </html> `); }) .catch((err) => { res.status(500).json(err); }); } else { res.sendStatus(404); } }); }
17,573
https://github.com/pulumi/pulumi-aws/blob/master/sdk/dotnet/Ec2ClientVpn/Inputs/EndpointClientConnectOptionsGetArgs.cs
Github Open Source
Open Source
BSD-3-Clause, Apache-2.0, MPL-2.0
2,023
pulumi-aws
pulumi
C#
Code
118
292
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Aws.Ec2ClientVpn.Inputs { public sealed class EndpointClientConnectOptionsGetArgs : global::Pulumi.ResourceArgs { /// <summary> /// Indicates whether client connect options are enabled. The default is `false` (not enabled). /// </summary> [Input("enabled")] public Input<bool>? Enabled { get; set; } /// <summary> /// The Amazon Resource Name (ARN) of the Lambda function used for connection authorization. /// </summary> [Input("lambdaFunctionArn")] public Input<string>? LambdaFunctionArn { get; set; } public EndpointClientConnectOptionsGetArgs() { } public static new EndpointClientConnectOptionsGetArgs Empty => new EndpointClientConnectOptionsGetArgs(); } }
41,116
https://github.com/pavl0sh/Paper-blog/blob/master/client/src/components/categoriesList/Item.vue
Github Open Source
Open Source
MIT
2,019
Paper-blog
pavl0sh
Vue
Code
31
103
<template> <div class="title"> <h4> <a>{{ categoryName }}</a> </h4> </div> </template> <style scoped> a { cursor: pointer; } </style> <script> export default { name: "category-item", props: { categoryName: String } }; </script>
13,431
https://github.com/s6056826/netty-study/blob/master/src/main/java/cn/dbw/netty/ssy/TestServerInitHandler.java
Github Open Source
Open Source
MIT
2,019
netty-study
s6056826
Java
Code
36
175
package cn.dbw.netty.ssy; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelPipeline; import io.netty.channel.socket.SocketChannel; import io.netty.handler.codec.http.HttpRequestDecoder; import io.netty.handler.codec.http.HttpServerCodec; public class TestServerInitHandler extends ChannelInitializer<SocketChannel> { @Override protected void initChannel(SocketChannel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast(new HttpServerCodec()); pipeline.addLast(new TestServerHandler()); } }
43,721
https://github.com/mifm/FUSED-Wake/blob/master/fusedwake/noj/interface.py
Github Open Source
Open Source
MIT
2,018
FUSED-Wake
mifm
Python
Code
960
3,288
# import python.noj as noj import fusedwake.noj.fortran as fnoj import fusedwake.noj.fortran_mod as fnoj_mod import numpy as np class NOJ(object): # The different versions and their respective inputs inputs = { # 'py0': ['WF', 'WS', 'WD', 'K'], 'fort_noj_av': ['x_g', 'y_g', 'z_g', 'dt', 'p_c', 'ct_c', 'ws', 'wd', 'kj', 'av', 'rho', 'ws_ci', 'ws_co', 'ct_idle'], 'fort_noj': ['x_g', 'y_g', 'z_g', 'dt', 'p_c', 'ct_c', 'ws', 'wd', 'kj', 'rho', 'ws_ci', 'ws_co', 'ct_idle'], 'fort_noj_s': ['x_g', 'y_g', 'z_g', 'dt', 'p_c', 'ct_c', 'ws', 'wd', 'kj', 'rho', 'ws_ci', 'ws_co', 'ct_idle'], 'fort_mod_noj_av': ['x_g', 'y_g', 'z_g', 'dt', 'p_c', 'ct_c', 'ws', 'wd', 'kj', 'av', 'rho', 'ws_ci', 'ws_co', 'ct_idle'], 'fort_mod_noj': ['x_g', 'y_g', 'z_g', 'dt', 'p_c', 'ct_c', 'ws', 'wd', 'kj', 'rho', 'ws_ci', 'ws_co', 'ct_idle'], 'fort_mod_noj_s': ['x_g', 'y_g', 'z_g', 'dt', 'p_c', 'ct_c', 'ws', 'wd', 'kj', 'rho', 'ws_ci', 'ws_co', 'ct_idle'], } # Default variables for running the wind farm flow model defaults = { 'rho': 1.225, 'K': 0.04, 'version': 'fort_noj_s', 'sup': 'quad', # ['lin' | 'quad'] } def __init__(self, **kwargs): self.set(self.defaults) self.set(kwargs) @property def versions(self): versions = list(self.inputs.keys()) versions.sort() return versions def set(self, dic): """ Set the attributes of a dictionary as instance variables. Prepares for the different versions of the wake model Parameters ---------- dic: dict An input dictionary """ for k, v in dic.items(): setattr(self, k, v) # Preparing for the inputs for the fortran version if 'WF' in dic: self.x_g, self.y_g, self.z_g = self.WF.get_T2T_gl_coord2() self.dt = self.WF.rotor_diameter self.p_c = self.WF.power_curve self.ct_c = self.WF.c_t_curve self.ws_ci = self.WF.cut_in_wind_speed self.ws_co = self.WF.cut_out_wind_speed self.ct_idle = self.WF.c_t_idle def _get_kwargs(self, version): """Prepare a dictionary of inputs to be passed to the wind farm flow model Parameters ---------- version: str The version of the wind farm flow model to run ['py0' | 'py1' | 'fort0'] """ if 'py' in version: return {k:getattr(self, k) for k in self.inputs[version] if hasattr(self, k)} if 'fort' in version: # fortran only get lowercase inputs return {(k).lower():getattr(self, k) for k in self.inputs[version] if hasattr(self, k)} def fort_noj_av(self): # Prepare the inputs if isinstance(self.WS, float) or isinstance(self.WS, int): self.ws = np.array([self.WS]) self.wd = np.array([self.WD]) self.kj = np.array([self.K]) if not hasattr(self, 'wt_available'): self.wt_available = np.ones([len(self.ws), self.WF.nWT]) self.av = self.wt_available elif self.wt_available.shape == (len(self.ws), self.WF.nWT): self.av = self.wt_available else: # stacking up the availability vector for each flow case self.av = np.vstack([self.wt_available for i in range(len(self.ws))]) # Run the fortran code try: self.p_wt, self.t_wt, self.u_wt = fnoj.noj_av(**self._get_kwargs(self.version)) except Exception as e: raise Exception('The fortran version {} failed with the followind inputs: {}, and the error message: {}'.format( self.version, self._get_kwargs(self.version), e)) A = 0.25 * self.WF.WT.rotor_diameter**2.0 self.c_t = self.t_wt / (0.5 * A * self.rho * self.u_wt**2.0) self.p_wt *= 1.0E3 # Scaling the power back to Watt if len(self.ws) == 1: # We are only returning a 1D array self.p_wt = self.p_wt[0] self.u_wt = self.u_wt[0] self.c_t = self.c_t[0] def fort_noj(self): # Prepare the inputs if isinstance(self.WS, float) or isinstance(self.WS, int): self.ws = np.array([self.WS]) self.wd = np.array([self.WD]) self.kj = np.array([self.K]) # Run the fortran code try: self.p_wt, self.t_wt, self.u_wt = fnoj.noj(**self._get_kwargs(self.version)) except Exception as e: raise Exception('The fortran version {} failed with the followind inputs: {}, and the error message: {}'.format( self.version, self._get_kwargs(self.version), e)) A = 0.25 * self.WF.WT.rotor_diameter**2.0 self.c_t = self.t_wt / (0.5 * A * self.rho * self.u_wt**2.0) self.p_wt *= 1.0E3 # Scaling the power back to Watt if len(self.ws) == 1: # We are only returning a 1D array self.p_wt = self.p_wt[0] self.u_wt = self.u_wt[0] self.c_t = self.c_t[0] def fort_noj_s(self): self.kj = self.K try: self.p_wt, self.t_wt, self.u_wt = fnoj.noj_s(**self._get_kwargs(self.version)) except Exception as e: raise Exception('The fortran version {} failed with the followind inputs: {}, and the error message: {}'.format( self.version, self._get_kwargs(self.version), e)) A = 0.25 * self.WF.WT.rotor_diameter**2.0 self.c_t = self.t_wt / (0.5 * A * self.rho * self.u_wt**2.0) self.p_wt *= 1.0E3 # Scaling the power back to Watt def fort_mod_noj_av(self): # Prepare the inputs if isinstance(self.WS, float) or isinstance(self.WS, int): self.ws = np.array([self.WS]) self.wd = np.array([self.WD]) self.kj = np.array([self.K]) if not hasattr(self, 'wt_available'): self.wt_available = np.ones([len(self.ws), self.WF.nWT]) self.av = self.wt_available elif self.wt_available.shape == (len(self.ws), self.WF.nWT): self.av = self.wt_available else: # stacking up the availability vector for each flow case self.av = np.vstack([self.wt_available for i in range(len(self.ws))]) # Run the fortran code try: self.p_wt, self.t_wt, self.u_wt = fnoj_mod.mod_noj_av(**self._get_kwargs(self.version)) except Exception as e: raise Exception('The fortran version {} failed with the followind inputs: {}, and the error message: {}'.format( self.version, self._get_kwargs(self.version), e)) A = 0.25 * self.WF.WT.rotor_diameter**2.0 self.c_t = self.t_wt / (0.5 * A * self.rho * self.u_wt**2.0) self.p_wt *= 1.0E3 # Scaling the power back to Watt if len(self.ws) == 1: # We are only returning a 1D array self.p_wt = self.p_wt[0] self.u_wt = self.u_wt[0] self.c_t = self.c_t[0] def fort_mod_noj(self): # Prepare the inputs if isinstance(self.WS, float) or isinstance(self.WS, int): self.ws = np.array([self.WS]) self.wd = np.array([self.WD]) self.kj = np.array([self.K]) # Run the fortran code try: self.p_wt, self.t_wt, self.u_wt = fnoj_mod.mod_noj(**self._get_kwargs(self.version)) except Exception as e: raise Exception('The fortran version {} failed with the followind inputs: {}, and the error message: {}'.format( self.version, self._get_kwargs(self.version), e)) A = 0.25 * self.WF.WT.rotor_diameter**2.0 self.c_t = self.t_wt / (0.5 * A * self.rho * self.u_wt**2.0) self.p_wt *= 1.0E3 # Scaling the power back to Watt if len(self.ws) == 1: # We are only returning a 1D array self.p_wt = self.p_wt[0] self.u_wt = self.u_wt[0] self.c_t = self.c_t[0] def fort_mod_noj_s(self): self.kj = self.K try: self.p_wt, self.t_wt, self.u_wt = fnoj_mod.mod_noj_s(**self._get_kwargs(self.version)) except Exception as e: raise Exception('The fortran version {} failed with the followind inputs: {}, and the error message: {}'.format( self.version, self._get_kwargs(self.version), e)) A = 0.25 * self.WF.WT.rotor_diameter**2.0 self.c_t = self.t_wt / (0.5 * A * self.rho * self.u_wt**2.0) self.p_wt *= 1.0E3 # Scaling the power back to Watt # def python_v0(self): # self.p_wt, self.u_wt, self.c_t = noj.nojarsen_v0(**self._get_kwargs(self.version)) # # def python_v1(self): # self.p_wt, self.u_wt, self.c_t = noj.nojarsen(**self._get_kwargs(self.version)) def __call__(self, **kwargs): self.set(kwargs) if hasattr(self, 'version'): getattr(self, self.version)() if not self.version in self.versions: raise Exception("Version %s is not valid: version=[%s]"%(self.version, '|'.join(self.versions))) else: raise Exception("Version hasn't been set: version=[%s]"%('|'.join(self.versions))) return self
49,111
https://github.com/inovua/reactdatagrid/blob/master/community-edition/NumericEditor/NumericEditor.tsx
Github Open Source
Open Source
MIT
2,023
reactdatagrid
inovua
TSX
Code
187
572
/** * Copyright © INOVUA TRADING. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import NumericInput from '../packages/NumericInput'; type TypeFilterValue = { name: string; operator: string; type: string; value: string | null; filterEditorProps?: any; }; type NumberEditorProps = { filterValue?: TypeFilterValue; filterDelay?: number; onChange?: Function; readOnly?: boolean; disabled?: boolean; theme?: string; i18n?: (key?: string, defaultLabel?: string) => void; filterEditorProps?: any; render?: Function; autoFocus?: boolean; value?: string; cellProps?: any; onComplete?: Function; onCancel?: Function; onTabNavigation?: Function; editorProps?: any; }; const NumericEditor = (props: NumberEditorProps) => { const { editorProps } = props; const editorPropsStyle = editorProps ? editorProps.style : null; return ( <div className={ 'InovuaReactDataGrid__cell__editor InovuaReactDataGrid__cell__editor--number' } > <NumericInput {...editorProps} autoFocus={props.autoFocus} defaultValue={props.value} onChange={props.onChange} theme={props.theme} style={{ ...editorPropsStyle, minWidth: Math.max(0, props.cellProps.computedWidth - 30), }} onBlur={props.onComplete} onKeyDown={(e: any) => { if (e.key === 'Escape') { props.onCancel && props.onCancel(e); } if (e.key === 'Enter') { props.onComplete && props.onComplete(e); } if (e.key == 'Tab') { props.onTabNavigation && props.onTabNavigation(true, e.shiftKey ? -1 : 1); } }} /> </div> ); }; export default NumericEditor;
48,018
https://github.com/sohrabmistri/-inflatable-airfoil-geometric/blob/master/supporting files/support files for Internal_Bumpy_Airfoil/get_Tangent_Circle_Data_01.m
Github Open Source
Open Source
MIT
2,021
-inflatable-airfoil-geometric
sohrabmistri
MATLAB
Code
127
545
function [ Cy r ] = get_Tangent_Circle_Data_01( airfoil_Top_Equation, airfoil_Bottom_Equation, Cx ) %UNTITLED3 Summary of this function goes here % Detailed explanation goes here Cx %fun = @(x) (((airfoil_Top_Equation(x(1)) - x(3))^2) + ((x(1) - Cx)^2) - ((airfoil_Bottom_Equation(x(2)) - x(3))^2) - ((x(2) - Cx)^2))^2; %fun = @(x) (((airfoil_Top_Equation(x(1)) - x(3))^2) + ((x(1) - Cx)^2) - ((airfoil_Bottom_Equation(x(2)) - x(3))^2) - ((x(2) - Cx)^2))^2;% + ((airfoil_Top_Equation(x(1)) - x(3))^2) + ((x(1) - Cx)^2)+((airfoil_Bottom_Equation(x(2)) - x(3))^2) + ((x(2) - Cx)^2) ; fun = @(x) (((airfoil_Top_Equation(x(1)) - x(3))^2) + ((x(1) - Cx)^2) + ((airfoil_Bottom_Equation(x(2)) - x(3))^2) +((x(2) - Cx)^2)); x1_start = Cx; x2_start = Cx; Cy_start = (airfoil_Top_Equation(Cx) + airfoil_Bottom_Equation(Cx))/2; options = optimoptions('fminunc','TolFun',1e-12); options = optimoptions('fminunc','Display','iter-detailed'); [x,fval,exitflag,output] = fminunc(fun,[x1_start, x2_start, Cy_start],options); Cy = x(3); r = sqrt(((Cy - airfoil_Top_Equation(x(1)))^2) + ((Cx - x(1))^2)); end
13,692
https://github.com/codepongo/TyranScript/blob/master/.gitignore
Github Open Source
Open Source
MIT
2,012
TyranScript
codepongo
Ignore List
Code
3
10
*.o build/ *.out
24,866
https://github.com/ImedAdel/flaub/blob/master/src/components/FontSwitcher.tsx
Github Open Source
Open Source
MIT
2,022
flaub
ImedAdel
TypeScript
Code
129
405
import { useFont } from "../contexts/font" import { useEffect, useState } from "react" import { ReactComponent as Square } from "../icons/Feather/square.svg" import { ReactComponent as Circle } from "../icons/Feather/circle.svg" import { ReactComponent as Loader } from "../icons/Feather/loader.svg" import clsx from "clsx" export function FontSwitcher({ className, ...props }: Omit<React.ComponentProps<"button">, "onClick">) { const [mounted, setMounted] = useState(false) const { font, setFont } = useFont() useEffect(() => setMounted(true), []) function handleClick() { setFont(font === "sans" ? "serif" : "sans") } return ( <button className={clsx( "transition p-2 hover:bg-gray3 active:bg-gray4 rounded text-gray12", className != null && className )} onClick={handleClick} disabled={!mounted} title="Font Switcher" {...props} > {!mounted ? ( <Loader className="animate-spin w-[1em] h-[1em]" /> ) : font === "sans" ? ( <Circle className="w-[1em] h-[1em]" /> ) : ( <Square className="w-[1em] h-[1em]" /> )} </button> ) }
29,029
https://github.com/theogobinet/armorydesbuissons/blob/master/components/live/LastKills.js
Github Open Source
Open Source
MIT
2,021
armorydesbuissons
theogobinet
JavaScript
Code
260
862
import React, { useState, useEffect } from 'react'; import { useTransition, animated } from 'react-spring'; import useTranslation from 'next-translate/useTranslation'; import { isDarkMode } from '../../helpers/theme'; import LastKill from './LastKill'; import Player from './Player'; import EVENTS from '../../helpers/liveEventList'; function getKillHeight() { const height = isDarkMode() ? 126 : 130; return window.innerWidth < 575 ? 172 : height; } function getPrintedLastKills(lastKills) { return lastKills.map((lastKill) => ({ id: lastKill.id, killer: <Player name={lastKill.nomTueur} id={lastKill.idTueur} />, killed: <Player name={lastKill.nomTue} id={lastKill.idTue} />, date: lastKill.date, distance: lastKill.distance, weapon: lastKill.arme, })); } function useSocket(socket) { const [lastKills, setLastKills] = useState([]); const [, updateState] = useState(); useEffect(() => { if (socket !== false) { const onVisiChange = () => { updateState({}); }; document.addEventListener('visibilitychange', onVisiChange); socket.on(EVENTS.KILL_ADDED, (_players, _lastKills) => { setLastKills(_lastKills); }); socket.on(EVENTS.INITIED, (initInfo) => { setLastKills(initInfo.lastKills); }); return () => { document.removeEventListener('visibilitychange', onVisiChange); }; } return () => false; }, [socket]); return lastKills; } let printLastKills = []; function LastKills({ socket }) { const lastKills = useSocket(socket); if (process.browser) { printLastKills = (!document.hidden) ? getPrintedLastKills(lastKills) : []; } const transitions = process.browser ? useTransition(printLastKills, (kill) => kill.id, { from: { height: 0, opacity: 0, transform: 'scale(0,0)', }, enter: { height: getKillHeight(), opacity: 1, transform: 'scale(1,1)' }, leave: { transform: 'scale(1,0)', height: 0, opacity: 0 }, }) : []; const { t } = useTranslation(); return ( <div className="col-xl-5 py-2"> <div className="card card-accent shadow last-kill" style={{ maxHeight: '100%' }}> <h4 className="text-white mb-3">{t('live:lastKills.title')}</h4> { transitions.map(({ key, item, props }) => ( <animated.div key={key} style={props}> <LastKill killer={item.killer} killed={item.killed} date={item.date} distance={item.distance} weapon={item.weapon} /> </animated.div> )) } </div> </div> ); } export default LastKills;
50,224
https://github.com/lvqier/fishingjoy/blob/master/src/app.common.ui.gadget.SceneSwitcherLoading.lua
Github Open Source
Open Source
Unlicense
null
fishingjoy
lvqier
Lua
Code
93
383
slot2 = "SceneSwitcherLoading" SceneSwitcherLoading = class(slot1) SceneSwitcherLoading.ctor = function (slot0) return end SceneSwitcherLoading.switchTo = function (slot0, slot1, slot2, slot3, slot4, slot5, slot6, slot7, slot8) slot7 = 0 slot8 = slot8 or 0 function slot9() if slot0 then slot0() end end function slot10(slot0) slot3 = slot0 display.runScene(slot2) slot4 = uiMgr.setCurUiLayer uiMgr.setCurUiLayer(slot2, uiMgr) slot4 = GameEvent.OnSceneChanged eventMgr.dispatch(slot2, eventMgr) slot3 = slot0 applyFunction(slot2) end if slot1 then slot14 = "LoadingModule" requireModule(slot13) slot15 = slot9 ProxyLoading.show(slot13, ProxyLoading) function slot17() slot2 = slot1 slot0(slot1) end ProxyLoading.updatePercent(slot13, ProxyLoading, 0.5, 0.5) else slot13 = slot6 slot10(slot12) slot9() end end return
5,008
https://github.com/steakknife/ObjectFabric/blob/master/objectfabric.examples/intro/part09/versioning/Main.java
Github Open Source
Open Source
Apache-2.0
2,016
ObjectFabric
steakknife
Java
Code
514
1,013
/** * Copyright (c) ObjectFabric Inc. All rights reserved. * * This file is part of ObjectFabric (objectfabric.com). * * ObjectFabric is licensed under the Apache License, Version 2.0, the terms * of which may be found at http://www.apache.org/licenses/LICENSE-2.0.html. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ package part09.versioning; import org.junit.Test; import part09.versioning.generated.ObjectModel; import part09.versioning.generated.SimpleClass; import com.objectfabric.TObject; import com.objectfabric.misc.PlatformAdapter; /** * Shows how an application can load several versions of the same object model, for * versioning purposes. This is useful e.g. to read objects from a store, or communicate * with a process, which uses an older version of an object model. * <nl> * Loading two versions of an object model simplifies development of data transformation * tools when updating an application. It also enables always-on and large scale systems, * which must keep running while their data is progressively upgraded to a new model. Old * code and object models can be removed once the new version is validated and all data * has been converted. * <nl> * In practice, before generating a new version of an object model, copy the old generated * code to a new package, e.g. "generated.v1". Packages and class names are ignored by * ObjectFabric which relies only on UID and class id embedded in generated code. * <nl> * TODO: We are working on a tool to generate interfaces from an object model. Those * interfaces would implement the common subset between two versions of a model, and * simplify application code related to versioning. */ public class Main { public static void run() { /* * Register both the new and old renamed version of your object model. */ ObjectModel.register(); part09.versioning.generated.v1.ObjectModel.register(); /* * Let's say your application needs to load an object from a store, or download it * from a remote machine which might be running an old version of your software. */ TObject object = loadDataWithUnknownVersion(); /* * If object turns out to be old version, either run old code, or convert it to * new version. */ if (object instanceof part09.versioning.generated.v1.SimpleClass) { /* * Create a new version object. */ SimpleClass newVersion = new SimpleClass(); part09.versioning.generated.v1.SimpleClass oldVersion = (part09.versioning.generated.v1.SimpleClass) object; /* * Transform data from the old model to the new one (e.g. text to int). */ newVersion.setValue(Integer.parseInt(oldVersion.getText())); } /* * If data must be migrated to new store instead, unmodified objects also needs to * be copied, since an object cannot be part of two different stores. ObjectFabric * offers methods to access fields using an index without resorting to reflection * (For GWT and .NET support). */ SimpleClass unmodifiedObjectFromStoreA = new SimpleClass(); SimpleClass newInstanceToWriteToStoreB = new SimpleClass(); for (int i = 0; i < SimpleClass.FIELD_COUNT; i++) { Object field = unmodifiedObjectFromStoreA.getField(i); newInstanceToWriteToStoreB.setField(i, field); } } private static TObject loadDataWithUnknownVersion() { part09.versioning.generated.v1.SimpleClass object = new part09.versioning.generated.v1.SimpleClass(); object.setText("42"); return object; } public static void main(String[] args) throws Exception { run(); } @Test public void asTest() { run(); PlatformAdapter.reset(); } }
9,654
https://github.com/xiaokun19931126/guanggoo-android/blob/master/app/src/main/java/org/mazhuang/guanggoo/data/entity/Comment.java
Github Open Source
Open Source
Apache-2.0
2,021
guanggoo-android
xiaokun19931126
Java
Code
218
560
package org.mazhuang.guanggoo.data.entity; /** * * @author mazhuang * @date 2017/9/17 */ public class Comment { private String avatar; private Meta meta; private String content; public static class Meta { private User replier; private String time; private int floor; private Vote vote; public User getReplier() { return replier; } public void setReplier(User replier) { this.replier = replier; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } public int getFloor() { return floor; } public void setFloor(int floor) { this.floor = floor; } public Vote getVote() { return vote; } public void setVote(Vote vote) { this.vote = vote; } } public static class Vote { private String url; private int count; private boolean voted; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } public boolean isVoted() { return voted; } public void setVoted(boolean voted) { this.voted = voted; } } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public Meta getMeta() { return meta; } public void setMeta(Meta meta) { this.meta = meta; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } }
44,066
https://github.com/GustavoAT/sistemalojista/blob/master/system/language/portugues/imglib_lang.php
Github Open Source
Open Source
MIT
null
sistemalojista
GustavoAT
PHP
Code
275
701
<?php $lang['imglib_source_image_required'] = "Você deve especificar uma imagem de origem em suas preferências."; $lang['imglib_gd_required'] = "A biblioteca de imagens GD é necessária para esse recurso."; $lang['imglib_gd_required_for_props'] = "Seu servidor deve suportar a biblioteca de imagens GD para determinar as propriedades da imagem."; $lang['imglib_unsupported_imagecreate'] = "Seu servidor não suporta a função GD necessária para processar esse tipo de imagem."; $lang['imglib_gif_not_supported'] = "As imagens GIF geralmente não são suportadas devido a restrições de licenciamento. Talvez você precise usar imagens JPG ou PNG."; $lang['imglib_jpg_not_supported'] = "As imagens JPG não são suportadas."; $lang['imglib_png_not_supported'] = "As imagens PNG não são suportadas."; $lang['imglib_jpg_or_png_required'] = "O protocolo de redimensionamento da imagem especificado nas suas preferências só funciona com os tipos de imagem JPEG ou PNG."; $lang['imglib_copy_error'] = "Ocorreu um erro ao tentar substituir o arquivo. Certifique-se de que seu diretório de arquivos pode ser gravado."; $lang['imglib_rotate_unsupported'] = "A rotação da imagem não parece ser suportada pelo seu servidor."; $lang['imglib_libpath_invalid'] = "O caminho para sua biblioteca de imagens não está correto. Defina o caminho correto nas suas preferências de imagem."; $lang['imglib_image_process_failed'] = "O processamento de imagem falhou. Verifique se o seu servidor suporta o protocolo escolhido e se o caminho para sua biblioteca de imagens está correto."; $lang['imglib_rotation_angle_required'] = "É necessário um ângulo de rotação para rodar a imagem."; $lang['imglib_writing_failed_gif'] = "Imagem GIF."; $lang['imglib_invalid_path'] = "O caminho para a imagem não está correto."; $lang['imglib_copy_failed'] = "A rotina de cópia de imagem falhou."; $lang['imglib_missing_font'] = "Não é possível encontrar uma fonte para usar."; $lang['imglib_save_failed'] = "Não é possível salvar a imagem. Certifique-se de que a imagem e o diretório de arquivos podem ser gravados."; /* End of file imglib_lang.php */ /* Location: ./system/language/english/imglib_lang.php */
14,928
https://github.com/ydua/HP-ReportCard/blob/master/node_modules/rhea-promise/dist/lib/eventContext.js
Github Open Source
Open Source
Apache-2.0
2,021
HP-ReportCard
ydua
JavaScript
Code
217
524
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the Apache License. See License in the project root for license information. Object.defineProperty(exports, "__esModule", { value: true }); const connection_1 = require("./connection"); const session_1 = require("./session"); const link_1 = require("./link"); const log = require("./log"); var EventContext; (function (EventContext) { /** * Translates rhea's EventContext into rhea-promise EventContext * @param rheaContext The received context from rhea's event emitter * @param emitter The rhea-promise equivalent object that is supposed emit the same event * @param eventName The name of the event for which the context will be translated * * @returns EventContext The translated EventContext. */ function translate(rheaContext, emitter, eventName) { const connection = emitter instanceof connection_1.Connection ? emitter : emitter.connection; log.contextTranslator("[%s] Translating the context for event: '%s'.", connection.id, eventName); // initialize the result const result = Object.assign({ _context: rheaContext }, rheaContext); // set rhea-promise connection and container result.connection = connection; result.container = connection.container; // set rhea-promise session, sender/receiver. if (emitter instanceof link_1.Link) { result.session = emitter.session; if (emitter.type === link_1.LinkType.receiver && rheaContext.receiver) { result.receiver = emitter; } else if (emitter.type === link_1.LinkType.sender && rheaContext.sender) { result.sender = emitter; } } else if (emitter instanceof session_1.Session) { result.session = emitter; } return result; } EventContext.translate = translate; })(EventContext = exports.EventContext || (exports.EventContext = {})); //# sourceMappingURL=eventContext.js.map
17,106
https://github.com/valgur/OCP/blob/master/opencascade/Aspect_TypeOfDisplayText.hxx
Github Open Source
Open Source
Apache-2.0
2,022
OCP
valgur
C++
Code
186
394
// Created by: NW,JPB,CAL // Copyright (c) 1991-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #ifndef _Aspect_TypeOfDisplayText_HeaderFile #define _Aspect_TypeOfDisplayText_HeaderFile //! Define the display type of the text. enum Aspect_TypeOfDisplayText { Aspect_TODT_NORMAL, //!< default display, text only Aspect_TODT_SUBTITLE, //!< there is a subtitle under the text Aspect_TODT_DEKALE, //!< the text is displayed with a 3D style Aspect_TODT_BLEND, //!< the text is displayed in XOR Aspect_TODT_DIMENSION, //!< dimension line under text will be invisible Aspect_TODT_SHADOW //!< the text will have a shadow at the right-bottom corner }; #endif // _Aspect_TypeOfDisplayText_HeaderFile
22,491
https://github.com/cisco-open-source/libass/blob/master/libass/x86/blend_bitmaps.h
Github Open Source
Open Source
ISC
2,016
libass
cisco-open-source
C
Code
273
786
/* * Copyright (C) 2013 Rodger Combs <rcombs@rcombs.me> * * This file is part of libass. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef INTEL_BLEND_BITMAPS_H #define INTEL_BLEND_BITMAPS_H void ass_add_bitmaps_avx2( uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, intptr_t height, intptr_t width ); void ass_add_bitmaps_sse2( uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, intptr_t height, intptr_t width ); void ass_add_bitmaps_x86( uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, intptr_t height, intptr_t width ); void ass_sub_bitmaps_avx2( uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, intptr_t height, intptr_t width ); void ass_sub_bitmaps_sse2( uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, intptr_t height, intptr_t width ); void ass_sub_bitmaps_x86( uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, intptr_t height, intptr_t width ); void ass_mul_bitmaps_avx2( uint8_t *dst, intptr_t dst_stride, uint8_t *src1, intptr_t src1_stride, uint8_t *src2, intptr_t src2_stride, intptr_t width, intptr_t height ); void ass_mul_bitmaps_sse2( uint8_t *dst, intptr_t dst_stride, uint8_t *src1, intptr_t src1_stride, uint8_t *src2, intptr_t src2_stride, intptr_t width, intptr_t height ); #endif
42,873
https://github.com/alexgorbatchev/quotaservice/blob/master/admin/public/__tests__/reducers/CurrentVersion.react-test.js
Github Open Source
Open Source
Apache-2.0, LicenseRef-scancode-unknown-license-reference
2,017
quotaservice
alexgorbatchev
JavaScript
Code
69
256
import { currentVersion } from '../../src/reducers/configs.jsx' import { CONFIGS_FETCH_SUCCESS } from '../../src/actions/configs.jsx' describe('currentVersion reducer', () => { it('should return the initial state', () => { expect(currentVersion(undefined, {})).toEqual(0) }) it('should handle CONFIGS_FETCH_SUCCESS', () => { expect(currentVersion(undefined, { type: CONFIGS_FETCH_SUCCESS, payload: { configs: [{ version: 3 }] } })).toEqual(3) expect(currentVersion(undefined, { type: CONFIGS_FETCH_SUCCESS, payload: { configs: [{}] } })).toEqual(0) expect(currentVersion(undefined, { type: CONFIGS_FETCH_SUCCESS, payload: { configs: [] } })).toEqual(0) }) })
27,830
https://github.com/klinem/circuit-ui/blob/master/src/components/Badge/Badge.story.tsx
Github Open Source
Open Source
Apache-2.0
2,020
circuit-ui
klinem
TSX
Code
199
495
/** * Copyright 2019, SumUp Ltd. * 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 React, { Fragment } from 'react'; import { select, boolean } from '@storybook/addon-knobs'; import docs from './Badge.docs.mdx'; import { Badge, BadgeProps } from './Badge'; export default { title: 'Components/Badge', component: Badge, parameters: { docs: { page: docs }, }, }; const BaseBadge = (props: Partial<BadgeProps>) => ( <Badge variant={select( 'Variant', ['neutral', 'success', 'warning', 'danger'], 'neutral', )} circle={boolean('Circular', false)} {...props} /> ); export const base = () => <BaseBadge>Badge</BaseBadge>; export const variants = () => ( <Fragment> <BaseBadge variant="neutral">Neutral</BaseBadge> <BaseBadge variant="success">Success</BaseBadge> <BaseBadge variant="warning">Warning</BaseBadge> <BaseBadge variant="danger">Danger</BaseBadge> </Fragment> ); export const circular = () => ( <Fragment> <BaseBadge circle>1</BaseBadge> <BaseBadge circle>42</BaseBadge> <BaseBadge circle>999</BaseBadge> </Fragment> );
37,908
https://github.com/nokeedev/gradle-native/blob/master/subprojects/platform-base/src/main/java/dev/nokee/platform/base/TaskView.java
Github Open Source
Open Source
Apache-2.0
2,023
gradle-native
nokeedev
Java
Code
236
403
/* * Copyright 2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package dev.nokee.platform.base; import org.gradle.api.NamedDomainObjectProvider; import org.gradle.api.Task; /** * A view of the tasks that are created and configured as they are required. * * @param <T> type of the tasks in this view * @since 0.3 */ public interface TaskView<T extends Task> extends View<T>, ComponentTasks { /** * Returns a task view containing the objects in this view of the given type. * The returned view is live, so that when matching objects are later added to this view, they are also visible in the filtered task view. * * @param type The type of task to find. * @param <S> The base type of the new task view. * @return the matching element as a {@link TaskView}, never null. */ <S extends T> TaskView<S> withType(Class<S> type); <S extends T> NamedDomainObjectProvider<S> named(String name, Class<S> type); }
43,720
https://github.com/RT-Thread/IoT_Board/blob/master/examples/13_component_fal/applications/main.c
Github Open Source
Open Source
Apache-2.0
2,022
IoT_Board
RT-Thread
C
Code
496
1,526
/* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-08-16 armink first implementation * 2018-08-28 MurphyZhao add fal */ #include <rtthread.h> #include <fal.h> #define DBG_TAG "main" #define DBG_LVL DBG_LOG #include <rtdbg.h> #define BUF_SIZE 1024 static int fal_test(const char *partiton_name); int main(void) { fal_init(); if (fal_test("param") == 0) { LOG_I("Fal partition (%s) test success!", "param"); } else { LOG_E("Fal partition (%s) test failed!", "param"); } if (fal_test("download") == 0) { LOG_I("Fal partition (%s) test success!", "download"); } else { LOG_E("Fal partition (%s) test failed!", "download"); } return 0; } static int fal_test(const char *partiton_name) { int ret; int i, j, len; uint8_t buf[BUF_SIZE]; const struct fal_flash_dev *flash_dev = RT_NULL; const struct fal_partition *partition = RT_NULL; if (!partiton_name) { LOG_E("Input param partition name is null!"); return -1; } partition = fal_partition_find(partiton_name); if (partition == RT_NULL) { LOG_E("Find partition (%s) failed!", partiton_name); ret = -1; return ret; } flash_dev = fal_flash_device_find(partition->flash_name); if (flash_dev == RT_NULL) { LOG_E("Find flash device (%s) failed!", partition->flash_name); ret = -1; return ret; } LOG_I("Flash device : %s " "Flash size : %dK " "Partition : %s " "Partition size: %dK", partition->flash_name, flash_dev->len/1024, partition->name, partition->len/1024); /* 擦除 `partition` 分区上的全部数据 */ ret = fal_partition_erase_all(partition); if (ret < 0) { LOG_E("Partition (%s) erase failed!", partition->name); ret = -1; return ret; } LOG_I("Erase (%s) partition finish!", partiton_name); /* 循环读取整个分区的数据,并对内容进行检验 */ for (i = 0; i < partition->len;) { rt_memset(buf, 0x00, BUF_SIZE); len = (partition->len - i) > BUF_SIZE ? BUF_SIZE : (partition->len - i); /* 从 Flash 读取 len 长度的数据到 buf 缓冲区 */ ret = fal_partition_read(partition, i, buf, len); if (ret < 0) { LOG_E("Partition (%s) read failed!", partition->name); ret = -1; return ret; } for(j = 0; j < len; j++) { /* 校验数据内容是否为 0xFF */ if (buf[j] != 0xFF) { LOG_E("The erase operation did not really succeed!"); ret = -1; return ret; } } i += len; } /* 把 0 写入指定分区 */ for (i = 0; i < partition->len;) { /* 设置写入的数据 0x00 */ rt_memset(buf, 0x00, BUF_SIZE); len = (partition->len - i) > BUF_SIZE ? BUF_SIZE : (partition->len - i); /* 写入数据 */ ret = fal_partition_write(partition, i, buf, len); if (ret < 0) { LOG_E("Partition (%s) write failed!", partition->name); ret = -1; return ret; } i += len; } LOG_I("Write (%s) partition finish! Write size %d(%dK).", partiton_name, i, i / 1024); /* 从指定的分区读取数据并校验数据 */ for (i = 0; i < partition->len;) { /* 清空读缓冲区,以 0xFF 填充 */ rt_memset(buf, 0xFF, BUF_SIZE); len = (partition->len - i) > BUF_SIZE ? BUF_SIZE : (partition->len - i); /* 读取数据到 buf 缓冲区 */ ret = fal_partition_read(partition, i, buf, len); if (ret < 0) { LOG_E("Partition (%s) read failed!", partition->name); ret = -1; return ret; } for(j = 0; j < len; j++) { /* 校验读取的数据是否为步骤 3 中写入的数据 0x00 */ if (buf[j] != 0x00) { LOG_E("The write operation did not really succeed!"); ret = -1; return ret; } } i += len; } ret = 0; return ret; }
38,472
https://github.com/Zhangoufei/NotePractice/blob/master/Website/DotNetCore/CoreWebsite/Views/File/EditorImageUpload.cshtml
Github Open Source
Open Source
Apache-2.0
2,022
NotePractice
Zhangoufei
C#
Code
142
871
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!--加载js/css需要翻墙!!!--> <!-- Include external CSS. --> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> @*<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.css">*@ <!-- Include Editor style. --> <link href="~/lib/froala_editor/css/froala_editor.min.css" rel="stylesheet" type="text/css" /> <link href="~/lib/froala_editor/css/froala_style.min.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- Include external JS libs. --> <!-- If jquery is loaded from CDN make sure that you remove it from _Layout file --> <script type="text/javascript" src="~/lib/jquery/dist/jquery.min.js"></script> @*<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/mode/xml/xml.min.js"></script>*@ <!-- Include Editor JS files. --> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1//js/froala_editor.pkgd.min.js"></script> <script type="text/javascript" src="~/lib/froala_editor/js/plugins/image.min.js"></script> <script type="text/javascript" src="~/lib/froala_editor/js/plugins/image_manager.min.js"></script> <div class="sample"> <h2>Image upload example.</h2> <textarea id="edit" name="content"></textarea> <button onclick="GetContent()">获得html</button> </div> <!-- Initialize the editor. --> <script> $(function () { $.getScript("https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.5.1//js/froala_editor.pkgd.min.js", function () { $('#edit').froalaEditor({ // Set the image upload URL. //设置富文本框上传图片路径 imageUploadURL: '/UploadFiles', imageUploadParams: { id: 'my_editor' } }); //赋值富文本框 $('#edit').froalaEditor('html.set', '<p>ttttt</p>'); }); }); function GetContent() { //获得富文本框内容 var html = $('#edit').froalaEditor('html.get'); console.log(html); } </script> </body> </html>
36,797
https://github.com/carousel/dev.dynastydog/blob/master/app/libraries/Floats.php
Github Open Source
Open Source
MIT
2,015
dev.dynastydog
carousel
PHP
Code
472
1,279
<?php namespace Floats; class Floats { public static function compare($float1, $float2, $operator = '=') { // Check numbers to 5 digits of precision $epsilon = 0.00001; $float1 = (float)$float1; $float2 = (float)$float2; switch ($operator) { // equal case "===" : case "==" : case "=" : case "eq" : if (abs($float1 - $float2) < $epsilon) { return true; } break; // less than case "<" : case "lt" : if (abs($float1 - $float2) < $epsilon) { return false; } else if ($float1 < $float2) { return true; } break; // less than or equal case "<=" : case "lte" : if (self::compare($float1, $float2, '<') || self::compare($float1, $float2, '=')) { return true; } break; // greater than case ">" : case "gt" : if (abs($float1 - $float2) < $epsilon) { return false; } else if ($float1 > $float2) { return true; } break; // greater than or equal case ">=" : case "gte" : if (self::compare($float1, $float2, '>') || self::compare($float1, $float2, '=')) { return true; } break; case "<>" : case "!=" : case "ne" : if (abs($float1 - $float2) > $epsilon) { return true; } break; default: break; } return false; } public static function mtRand($val1, $val2, $decimalPlaces = 2) { $min = min($val1, $val2); $max = max($val1, $val2); $precision = 1; for($i = 0; $i < $decimalPlaces; ++$i) { $precision *= 10; } return mt_rand($min * $precision, $max * $precision) / $precision; } public static function standardValue($val1, $val2) { $lowest = min($val1, $val2) * 0.9; $highest = max($val1, $val2) * 1.1; $avg = ($highest + $lowest) / 2; $stddev = ($highest - $lowest) / 8; $chance = mt_rand(1, 100); if ($chance <= 1) { if (mt_rand(1, 2) === 1) // < 0 { $lb = $avg - (4 * $stddev); $ub = $avg - (3 * $stddev); } else { $lb = $avg + (3 * $stddev); $ub = $avg + (4 * $stddev); } } else if ($chance <= 4) { if (mt_rand(1, 2) === 1) // < 0 { $lb = $avg - (3 * $stddev); $ub = $avg - (2 * $stddev); } else { $lb = $avg + (2 * $stddev); $ub = $avg + (3 * $stddev); } } else if ($chance <= 27) { if (mt_rand(1, 2) === 1) // < 0 { $lb = $avg - (2 * $stddev); $ub = $avg - (1 * $stddev); } else { $lb = $avg + (1 * $stddev); $ub = $avg + (2 * $stddev); } } else { $lb = $avg - $stddev; $ub = $avg + $stddev; } return [ $lb, $ub ]; } public static function normalizeValueInRange($value, $oldRange, $newRange) { $divisor = $oldRange[1] - $oldRange[0]; $a = ($divisor == 0) ? $divisor : ($newRange[1] - $newRange[0]) / $divisor; $b = $newRange[1] - ($a * $oldRange[1]); return ($a * $value) + $b; } }
7,972
https://github.com/Aevit/SCWrapDemo/blob/master/SCWrapDemo/SCWrapDemo/SCWrap/SCHelper/SCCommon/SCCommon.m
Github Open Source
Open Source
MIT
2,015
SCWrapDemo
Aevit
Objective-C
Code
157
489
// // SCCommon.m // SCWrapDemo // // Created by Aevitx on 14/12/25. // Copyright (c) 2014年 Aevit. All rights reserved. // #import "SCCommon.h" #import <UIKit/UIKit.h> @implementation SCCommon /** * find the topest presenting controller * (the result maybe a navigationController, a tabbarController or a normal controller) * * @return a navigationController, a tabbarController or a normal controller */ + (UIViewController *)getTopPresentedViewController { UIViewController *topViewController = [[[UIApplication sharedApplication].windows objectAtIndex:0] rootViewController]; while (topViewController.presentedViewController) { topViewController = topViewController.presentedViewController; } return topViewController; } /** * find the topest controller * (if the result is a navigationController or tabbarController, then find the topest controller of them) * * @return a normal controller */ + (UIViewController *)getTopViewController { UIViewController *topViewController = [[[UIApplication sharedApplication].windows objectAtIndex:0] rootViewController]; while (topViewController.presentedViewController) { topViewController = topViewController.presentedViewController; } if ([topViewController isKindOfClass:[UINavigationController class]]) { UINavigationController *nav = (UINavigationController*)topViewController; topViewController = [nav.viewControllers lastObject]; } if ([topViewController isKindOfClass:[UITabBarController class]]) { UITabBarController *tab = (UITabBarController*)topViewController; topViewController = tab.selectedViewController; } return topViewController; } @end
4,022
https://github.com/bangsus-sistem/bangsus-sistem/blob/master/resources/js/components/sidebar/SidebarItemIcon.vue
Github Open Source
Open Source
Apache-2.0
null
bangsus-sistem
bangsus-sistem
Vue
Code
31
105
<template> <FeatherIcon :icon="icon" :size="20" class="sidebar-item-icon" /> </template> <script> import FeatherIcon from '../icons/FeatherIcon' export default { components: { FeatherIcon, }, props: { icon: { required: true, type: String, }, } } </script>
35,850
https://github.com/snaekobbi/jsass/blob/master/src/test/resources/sass/error.sass
Github Open Source
Open Source
MIT
2,022
jsass
snaekobbi
Sass
Code
3
8
@error "Test exception"
50,292
https://github.com/djx314/poi-collection/blob/master/build.sbt
Github Open Source
Open Source
MIT
2,020
poi-collection
djx314
Scala
Code
41
195
//bintrayOrganization := Some("scalax") //bintrayRepository := "poi-collection" resolvers += Resolver.jcenterRepo resolvers += Resolver.bintrayRepo("djx314", "maven") licenses += ("MIT", url("http://opensource.org/licenses/MIT")) bintrayVcsUrl := Some("git@github.com:scalax/poi-collection.git") bintrayPackageLabels := Seq("scala", "poi") organization := "net.scalax" name := "poi-collection" scalaVersion := "2.13.1" crossScalaVersions := Seq("2.13.1", "2.12.10") scalacOptions ++= Seq("-feature", "-deprecation")
18,511
https://github.com/sudhan499/rdf2x/blob/master/src/main/java/com/merck/rdf2x/flavors/WikidataFlavor.java
Github Open Source
Open Source
Apache-2.0
2,020
rdf2x
sudhan499
Java
Code
391
1,268
/* * Copyright 2017 Merck Sharp & Dohme Corp. a subsidiary of Merck & Co., * Inc., Kenilworth, NJ, USA. * * 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 com.merck.rdf2x.flavors; import com.google.common.collect.Sets; import com.merck.rdf2x.jobs.convert.ConvertConfig; import com.merck.rdf2x.jobs.convert.ConvertJob; import com.merck.rdf2x.processing.schema.RelationSchemaStrategy; import org.apache.jena.graph.NodeFactory; import org.apache.jena.sparql.core.Quad; import org.apache.spark.api.java.JavaRDD; import org.eclipse.rdf4j.model.vocabulary.RDFS; import java.util.Arrays; import java.util.Collections; /** * WikidataFlavor provides default settings and methods to improve conversion of the Wikidata RDF dump */ public class WikidataFlavor implements Flavor { private static final String WIKIDATA_PREFIX = "http://www.wikidata.org/"; private static final String ENTITY_PREFIX = WIKIDATA_PREFIX + "entity/"; private static final String PROPERTY_ENTITY_PREFIX = ENTITY_PREFIX + "P"; private static final String PROPERTY_DIRECT_PREFIX = "http://www.wikidata.org/prop/direct/P"; private static final String PROPERTY_STATEMENT_PREFIX = "http://www.wikidata.org/prop/statement/P"; private static final String PROPERTY_QUALIFIER_PREFIX = "http://www.wikidata.org/prop/qualifier/P"; /** * Set default values for {@link ConvertJob} * * @param config config to update */ @Override public void setDefaultValues(ConvertConfig config) { config.getRdfSchemaCollectorConfig() .setSubclassPredicates(Arrays.asList( "http://www.wikidata.org/prop/direct/P279" // subclass of )) .setTypePredicates(Arrays.asList( "http://www.wikidata.org/prop/direct/P31", // instance of "http://www.wikidata.org/prop/direct/P279" // subclass of - consider subclasses to also be instances of the class (to include instances such as Piano, which does not have 'instance of' information) )); config.getSchemaFormatterConfig() .setUseLabels(true) .setMaxTableNameLength(50); config.getRelationConfig() .setSchemaStrategy(RelationSchemaStrategy.Predicates); } /** * Modify RDD of quads in any needed way (filtering, flatMapping, ...) * * @param quads RDD of quads to modify * @return modified RDD of quads, returns original RDD in default */ @Override public JavaRDD<Quad> modifyQuads(JavaRDD<Quad> quads) { final String labelURI = RDFS.LABEL.toString(); return quads.flatMap(quad -> { if (quad.getSubject().isURI()) { String subjectURI = quad.getSubject().getURI(); // for each quad specifying property label, create label quads for each URI variant of this property // done because Wikidata only provides entity labels, for example http://www.wikidata.org/entity/P279 and not http://www.wikidata.org/prop/direct/P279 if (subjectURI.contains(PROPERTY_ENTITY_PREFIX) && quad.getPredicate().getURI().equals(labelURI)) { return Sets.newHashSet( quad, new Quad(quad.getGraph(), NodeFactory.createURI(subjectURI.replace(PROPERTY_ENTITY_PREFIX, PROPERTY_DIRECT_PREFIX)), quad.getPredicate(), quad.getObject()), new Quad(quad.getGraph(), NodeFactory.createURI(subjectURI.replace(PROPERTY_ENTITY_PREFIX, PROPERTY_STATEMENT_PREFIX)), quad.getPredicate(), quad.getObject()), new Quad(quad.getGraph(), NodeFactory.createURI(subjectURI.replace(PROPERTY_ENTITY_PREFIX, PROPERTY_QUALIFIER_PREFIX)), quad.getPredicate(), quad.getObject()) ); } } return Collections.singleton(quad); }); } }
7,280
https://github.com/Joralmi/wot-hive/blob/master/src/main/java/directory/things/Things.java
Github Open Source
Open Source
Apache-2.0
null
wot-hive
Joralmi
Java
Code
433
2,020
package directory.things; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import java.net.URI; import java.net.URISyntaxException; import org.apache.jena.datatypes.BaseDatatype; import org.apache.jena.rdf.model.Literal; import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.Property; import org.apache.jena.rdf.model.RDFNode; import org.apache.jena.rdf.model.Resource; import org.apache.jena.rdf.model.ResourceFactory; import com.apicatalog.jsonld.JsonLd; import com.apicatalog.jsonld.JsonLdError; import com.apicatalog.jsonld.JsonLdOptions; import com.apicatalog.jsonld.JsonLdVersion; import com.apicatalog.jsonld.document.Document; import com.apicatalog.jsonld.document.JsonDocument; import com.apicatalog.rdf.RdfDataset; import com.apicatalog.rdf.RdfLiteral; import com.apicatalog.rdf.RdfNQuad; import com.apicatalog.rdf.RdfValue; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import directory.Directory; import directory.Utils; import directory.exceptions.ThingException; public class Things { public static String TDD_RAW_CONTEXT = "https://w3c.github.io/wot-discovery/context/discovery-context.jsonld"; protected static String inject(JsonObject json, String key, String injection) { JsonElement value = json.deepCopy().get(key); JsonArray values = new JsonArray(); if(value instanceof JsonArray) { values = value.getAsJsonArray(); }else if(value instanceof JsonPrimitive) { values.add(value); } values.add(injection); return values.toString(); } protected static void cleanThingType(JsonObject td) { if(td.has("@type")) { if( td.get("@type") instanceof JsonPrimitive) { td.remove("@type"); }else if(td.get("@type") instanceof JsonArray) { JsonArray array = td.remove("@type").getAsJsonArray(); array.remove(new JsonPrimitive("Thing")); array.remove(new JsonPrimitive("https://www.w3.org/2019/wot/td#Thing")); td.add("@type", array); } } } protected static Boolean hasThingType(JsonObject td) { boolean hasType = td.has("@type"); if(hasType) { JsonElement type = td.get("@type"); hasType = type instanceof JsonPrimitive && (type.toString().equals("Thing") || type.toString().equals("https://www.w3.org/2019/wot/td#Thing")); if(!hasType && type instanceof JsonArray) { JsonArray array = type.getAsJsonArray(); hasType = array.contains(new JsonPrimitive("Thing")) || array.contains(new JsonPrimitive("https://www.w3.org/2019/wot/td#Thing")); } } return hasType; } public static JsonObject toJsonLd11(JsonObject jsonLd, String frame) { try { Document document = JsonDocument.of(new StringReader(jsonLd.toString())); Document frameDocument = JsonDocument.of(new StringReader(frame)); JsonLdOptions options = new JsonLdOptions(); options.setBase(new URI(Directory.getConfiguration().getService().getDirectoryURIBase())); options.setCompactArrays(true); // // IMPORTANT FOR WOT TEST SUITE options.setCompactToRelative(true); options.setExplicit(false); options.setProduceGeneralizedRdf(true); options.setProcessingMode(JsonLdVersion.V1_1); String thing = JsonLd.frame(document, frameDocument).options(options).get().toString(); JsonObject thingJson = Utils.toJson(thing.replaceAll(Directory.getConfiguration().getService().getDirectoryURIBase(), "")); // TODO: needed for wot validation if(thingJson.has("security") && !(thingJson.get("security") instanceof JsonArray) ) { JsonArray sec = new JsonArray(); sec.add(thingJson.remove("security")); thingJson.add("security", sec); } return thingJson; }catch(Exception e) { throw new ThingException("Error translating JSON-LD 1.0 into JSON-LD 1.1"); } } public static String printModel(Model model, String serialisation) { Writer writer = new StringWriter(); model.write(writer, serialisation, Directory.getConfiguration().getService().getDirectoryURIBase()); return writer.toString(); } public static Model toModel(JsonObject td) { Model model = ModelFactory.createDefaultModel(); toRDF(td).toList() .stream() .forEach(elem -> model.add(toTriple(elem))); return model; } private static RdfDataset toRDF(JsonObject jsonld11) { try { Document jsonDocument = JsonDocument.of(new StringReader(jsonld11.toString())); JsonLdOptions options = new JsonLdOptions(); options.setBase(new URI(Directory.getConfiguration().getService().getDirectoryURIBase())); options.setProcessingMode(JsonLdVersion.V1_1); return JsonLd.toRdf(jsonDocument).options(options).get(); } catch (JsonLdError | URISyntaxException e) { throw new ThingException("Error translating JSON-LD 1.1 into RDF"); } } private static Model toTriple(RdfNQuad quadTriple) { Model model = ModelFactory.createDefaultModel(); try { Resource subject = ResourceFactory.createResource(quadTriple.getSubject().toString()); Property predicate = ResourceFactory.createProperty(quadTriple.getPredicate().toString()); RdfValue objectRaw = quadTriple.getObject(); if(objectRaw.isIRI() || objectRaw.isBlankNode()) { Resource object = ResourceFactory.createResource(quadTriple.getObject().getValue()); model.add(subject, predicate, (RDFNode) object); }else { RdfLiteral literal = objectRaw.asLiteral(); Literal jenaLiteral = ResourceFactory.createPlainLiteral(literal.getValue()); if(literal.getLanguage().isPresent()) { jenaLiteral = ResourceFactory.createLangLiteral(literal.getValue(), literal.getLanguage().get()); }else if(literal.getDatatype()!=null && !literal.getDatatype().isEmpty()) { jenaLiteral = ResourceFactory.createTypedLiteral(literal.getValue(), new BaseDatatype(literal.getDatatype())); } model.add(subject, predicate, jenaLiteral); } }catch(Exception e) { Directory.LOGGER.error("Error adding tirple : "+quadTriple); Directory.LOGGER.error(e.toString()); } return model; } }
1,828
https://github.com/rswijesena/Flow_Stripe/blob/master/update.js
Github Open Source
Open Source
MIT
2,019
Flow_Stripe
rswijesena
JavaScript
Code
161
594
const copy = require('recursive-copy'); const download = require('download'); const fs = require('fs-extra'); const merger = require('three-way-merger'); (async function() { console.log('Downloading update...'); await download('https://github.com/manywho/ui-custom-component/archive/master.zip', '__update__', { extract: true }); console.log('Merging updated dependencies in package.json'); const source = JSON.parse(await fs.readFile('__update__/ui-custom-component-master/package.json')); const ours = JSON.parse(await fs.readFile('package.json')); const theirs = JSON.parse(await fs.readFile('__update__/ui-custom-component-master/package.json')); const result = merger.merge({source: source, ours: ours, theirs: theirs}); Object.keys(result).forEach(key => { if (!ours[key]) ours[key] = key === 'bundledDependencies' ? [] : {}; applyOperations(result[key], ours[key]); }); console.log('Applying update to source files:'); const copied = await copy('__update__/ui-custom-component-master', './', { overwrite: true, filter: (filename) => { if (filename.includes('interfaces') || filename.includes('src/utils') || (filename.includes('webpack') && !process.argv.includes('-exclude-webpack')) || filename === 'upload.js' || filename === 'tslint.json' || filename === 'tsconfig.json' || filename === 'upload.js') return true; return false; } }); copied .map(item => item.dest) .forEach(item => console.log(item)); await fs.writeFile('package.json', JSON.stringify(ours, null, 2)); await fs.remove('__update__'); console.log('Update complete'); }()); const applyOperations = (operations, deps) => { operations.remove.forEach(dep => delete deps[dep.name]); operations.add.forEach(dep => deps[dep.name] = dep.version); operations.change.forEach(dep => deps[dep.name] = dep.version); }
3,081
https://github.com/Asbaharoon/ome-files-performance/blob/master/results/tubhiswt-pixeldata-win-cpp-20.tsv
Github Open Source
Open Source
BSD-2-Clause
2,021
ome-files-performance
Asbaharoon
TSV
Code
48
238
test.lang test.name test.file proc.real proc.user proc.system C++ pixeldata.read tubhiswt_C0_TP0.ome.tif 1166 608 561 C++ pixeldata.read.init tubhiswt_C0_TP0.ome.tif 411 327 93 C++ pixeldata.read.pixels tubhiswt_C0_TP0.ome.tif 755 280 468 C++ pixeldata.write tubhiswt_C0_TP0.ome.tif 2039 327 1669 C++ pixeldata.write.init tubhiswt_C0_TP0.ome.tif 66 46 15 C++ pixeldata.write.pixels tubhiswt_C0_TP0.ome.tif 1839 156 1653 C++ pixeldata.write.close tubhiswt_C0_TP0.ome.tif 134 124 0
30,313
https://github.com/fahmilu/sgcall/blob/master/system/cms/modules/navigation/language/lithuanian/navigation_lang.php
Github Open Source
Open Source
PHP-3.01, PHP-3.0
null
sgcall
fahmilu
PHP
Code
186
833
<?php defined('BASEPATH') OR exit('No direct script access allowed'); // labels $lang['nav:parent_label'] = 'Tėvas'; $lang['nav:target_label'] = 'Target'; $lang['nav:class_label'] = 'Class'; $lang['nav:url_label'] = 'URL'; $lang['nav:details_label'] = 'Informacija'; $lang['nav:text_label'] = 'Tekstas'; $lang['nav:group_label'] = 'Grupė'; $lang['nav:location_label'] = 'Lokacija'; $lang['nav:type_label'] = 'Nuorodos tipas'; $lang['nav:uri_label'] = 'Site Link (URI)'; $lang['nav:page_label'] = 'Puslapis'; $lang['nav:module_label'] = 'Modulis'; $lang['nav:restricted_to'] = 'Leisti tik'; $lang['nav:abbrev_label'] = 'Santrumpa'; $lang['nav:link_target_self'] = 'Dabartinis langas (default)'; $lang['nav:link_target_blank'] = 'Naujas langas (_blank)'; // titles $lang['nav:link_create_title'] = 'Pridėti navigacijos nuorodą'; $lang['nav:group_create_title'] = 'Pridėti grupę'; $lang['nav:link_edit_title'] = 'Redaguoti navigacijos nuorodą "%s"'; $lang['nav:link_list_title'] = 'Nuorodų sąrašas'; $lang['nav:group_list_title'] = 'Grupės'; // messages $lang['nav:group_no_links'] = 'Nėra nuorodų šioje grupėje.'; $lang['nav:no_groups'] = 'Nėra nvigacijos grupių.'; $lang['nav:group_delete_confirm'] = 'Ar jūs tikras, kad norite ištrinti šią navigacijos grupę? Išsitrins visos navigacijos nuorodos ir jums reikės iš naujo redaguoti pašalintasias.'; $lang['nav:group_add_success'] = 'Navigacijos grupė išsaugota.'; $lang['nav:group_add_error'] = 'Įvyko klaida.'; $lang['nav:group_mass_delete_success'] = 'Navigacijos grupė ištrinta.'; $lang['nav:link_add_success'] = 'Navigacijos nuoroda pridėta.'; $lang['nav:link_add_error'] = 'Įvyko netikėta klaida.'; $lang['nav:link_not_exist_error'] = 'Ši navigacijos nuoroda neegzistuoja.'; $lang['nav:link_edit_success'] = 'Navigacijos nuorda išsaugota.'; $lang['nav:link_delete_success'] = 'Navigacijos nuoroda ištrinta.'; $lang['nav:choose_value'] = 'Laukas %s negali būti tuščias.'; $lang['nav:link_type_desc'] = 'Prašome pasirinkti nuorodos tipą, kad būtų suteikta daugiau galimybių kurti savo nuorodą.';
20,105
https://github.com/JetBrains/intellij-community/blob/master/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/NameValuePairElement.java
Github Open Source
Open Source
Apache-2.0
2,023
intellij-community
JetBrains
Java
Code
275
833
/* * Copyright 2000-2012 JetBrains s.r.o. * * 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 com.intellij.psi.impl.source.tree.java; import com.intellij.lang.ASTNode; import com.intellij.psi.JavaTokenType; import com.intellij.psi.impl.source.tree.*; import com.intellij.psi.tree.ChildRoleBase; import com.intellij.util.CharTable; import org.jetbrains.annotations.NotNull; //Retrieves method reference from this pair, do NOT reuse!!! public class NameValuePairElement extends CompositeElement { public NameValuePairElement() { super(JavaElementType.NAME_VALUE_PAIR); } @Override public int getChildRole(@NotNull ASTNode child) { if (ElementType.ANNOTATION_MEMBER_VALUE_BIT_SET.contains(child.getElementType())) { return ChildRole.ANNOTATION_VALUE; } if (child.getElementType() == JavaTokenType.IDENTIFIER) { return ChildRole.NAME; } if (child.getElementType() == JavaTokenType.EQ) { return ChildRole.OPERATION_SIGN; } return ChildRoleBase.NONE; } @Override public ASTNode findChildByRole(int role) { if (role == ChildRole.NAME) { return findChildByType(JavaTokenType.IDENTIFIER); } if (role == ChildRole.ANNOTATION_VALUE) { return findChildByType(ElementType.ANNOTATION_MEMBER_VALUE_BIT_SET); } if (role == ChildRole.OPERATION_SIGN) { return findChildByType(JavaTokenType.EQ); } return null; } @Override public TreeElement addInternal(TreeElement first, ASTNode last, ASTNode anchor, Boolean before) { final CharTable treeCharTab = SharedImplUtil.findCharTableByTree(this); final TreeElement treeElement = super.addInternal(first, last, anchor, before); if (first == last && first.getElementType() == JavaTokenType.IDENTIFIER) { LeafElement eq = Factory.createSingleLeafElement(JavaTokenType.EQ, "=", 0, 1, treeCharTab, getManager()); super.addInternal(eq, eq, first, Boolean.FALSE); } return treeElement; } @Override public void deleteChildInternal(@NotNull ASTNode child) { super.deleteChildInternal(child); if (child.getElementType() == JavaTokenType.IDENTIFIER) { final ASTNode sign = findChildByRole(ChildRole.OPERATION_SIGN); if (sign != null) { super.deleteChildInternal(sign); } } } }
19,918
https://github.com/RaviPatel75/ScalajsReactTyped/blob/master/l/lazy_dot_js/src/main/scala/typingsJapgolly/lazyJs/LazyJS/AsyncHandle.scala
Github Open Source
Open Source
MIT
2,020
ScalajsReactTyped
RaviPatel75
Scala
Code
61
332
package typingsJapgolly.lazyJs.LazyJS import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation._ trait AsyncHandle[T] extends js.Object { def cancel(): Unit def onComplete(callback: Callback): Unit def onError(callback: ErrorCallback): Unit } object AsyncHandle { @scala.inline def apply[T]( cancel: japgolly.scalajs.react.Callback, onComplete: Callback => japgolly.scalajs.react.Callback, onError: ErrorCallback => japgolly.scalajs.react.Callback ): AsyncHandle[T] = { val __obj = js.Dynamic.literal() __obj.updateDynamic("cancel")(cancel.toJsFn) __obj.updateDynamic("onComplete")(js.Any.fromFunction1((t0: typingsJapgolly.lazyJs.LazyJS.Callback) => onComplete(t0).runNow())) __obj.updateDynamic("onError")(js.Any.fromFunction1((t0: typingsJapgolly.lazyJs.LazyJS.ErrorCallback) => onError(t0).runNow())) __obj.asInstanceOf[AsyncHandle[T]] } }
13,367
https://github.com/Mega-Mewthree/tile-trials-visualizer/blob/master/src/App.vue
Github Open Source
Open Source
MIT
null
tile-trials-visualizer
Mega-Mewthree
Vue
Code
54
238
<template> <v-app> <v-main> <router-view/> </v-main> </v-app> </template> <script> export default { name: "App" }; </script> <style lang="scss"> @import "@/styles/variables.scss"; html { --white-text-color: $white-text-color; } .v-application { background-color: var(--v-background-base) !important; } .v-btn { text-transform:none !important; a#{&} { color: $white-text-color; text-decoration: none; } } .v-text-field.v-input--is-focused > .v-input__control > .v-input__slot:after { background: currentColor; height: 2px; } </style>
27,766
https://github.com/openebs/sparse-tools/blob/master/sparse/test/client_test.go
Github Open Source
Open Source
Apache-2.0
2,019
sparse-tools
openebs
Go
Code
2,590
8,032
package test import ( "testing" . "github.com/longhorn/sparse-tools/sparse" "github.com/longhorn/sparse-tools/sparse/rest" ) const ( localhost = "127.0.0.1" timeout = 5 //seconds port = "5000" ) func TestSyncSmallFile1(t *testing.T) { localPath := tempFilePath("ssync-small-src-") remotePath := tempFilePath("ssync-small-dst-") filesCleanup(localPath, remotePath) defer filesCleanup(localPath, remotePath) data := []byte("json-fault") createTestSmallFile(localPath, len(data), data) testSyncAnyFile(t, localPath, remotePath) } func TestSyncSmallFile2(t *testing.T) { localPath := tempFilePath("ssync-small-src-") remotePath := tempFilePath("ssync-small-dst-") filesCleanup(localPath, remotePath) defer filesCleanup(localPath, remotePath) data := []byte("json-fault") data1 := []byte("json") createTestSmallFile(localPath, len(data), data) createTestSmallFile(remotePath, len(data1), data1) testSyncAnyFile(t, localPath, remotePath) } func TestSyncSmallFile3(t *testing.T) { localPath := tempFilePath("ssync-small-src-") remotePath := tempFilePath("ssync-small-dst-") filesCleanup(localPath, remotePath) defer filesCleanup(localPath, remotePath) data := []byte("json-fault") createTestSmallFile(localPath, len(data), data) createTestSmallFile(remotePath, len(data), data) testSyncAnyFile(t, localPath, remotePath) } func TestSyncSmallFile4(t *testing.T) { localPath := tempFilePath("ssync-small-src-") remotePath := tempFilePath("ssync-small-dst-") filesCleanup(localPath, remotePath) defer filesCleanup(localPath, remotePath) data := []byte("json-fault") createTestSmallFile(localPath, 0, make([]byte, 0)) createTestSmallFile(remotePath, len(data), data) testSyncAnyFile(t, localPath, remotePath) } func TestSyncAnyFile(t *testing.T) { src := "src.bar" dst := "dst.bar" run := false // ad hoc test for testing specific problematic files // disabled by default if run { testSyncAnyFile(t, src, dst) } } func testSyncAnyFile(t *testing.T, src, dst string) { // Sync go rest.TestServer(port, dst, timeout) err := SyncFile(src, localhost+":"+port, timeout) // Verify if err != nil { t.Fatal("sync error") } if !filesAreEqual(src, dst) { t.Fatal("file content diverged") } } func TestSyncFile1(t *testing.T) { // D H D => D D H layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile2(t *testing.T) { // H D H => D H H layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile3(t *testing.T) { // D H D => D D layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile4(t *testing.T) { // H D H => D H layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile5(t *testing.T) { // H D H => H D layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile6(t *testing.T) { // H D H => D layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile7(t *testing.T) { // H D H => H layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile8(t *testing.T) { // D H D => layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{} testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFile9(t *testing.T) { // H D H => layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 2 * Blocks, End: 3 * Blocks}}, } layoutRemote := []FileInterval{} testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff1(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff2(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff3(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff4(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff5(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff6(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff7(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff8(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff9(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff10(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff11(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff12(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff13(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff14(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff15(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff16(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff17(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 28 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 28 * Blocks, End: 32 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 32 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff18(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 28 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 28 * Blocks, End: 36 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 36 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff19(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 31 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 31 * Blocks, End: 33 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 33 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff20(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 32 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 32 * Blocks, End: 36 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 36 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff21(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 28 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 28 * Blocks, End: 32 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 32 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff22(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 28 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 28 * Blocks, End: 36 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 36 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff23(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 31 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 31 * Blocks, End: 33 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 33 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncDiff24(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 32 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 32 * Blocks, End: 36 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 36 * Blocks, End: 100 * Blocks}}, } layoutRemote := []FileInterval{ {Kind: SparseHole, Interval: Interval{Begin: 0, End: 30 * Blocks}}, {Kind: SparseData, Interval: Interval{Begin: 30 * Blocks, End: 34 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 34 * Blocks, End: 100 * Blocks}}, } testSyncFile(t, layoutLocal, layoutRemote) } func TestSyncFileHashRetry(t *testing.T) { layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: 1 * Blocks}}, {Kind: SparseHole, Interval: Interval{Begin: 1 * Blocks, End: 2 * Blocks}}, } layoutRemote := []FileInterval{} // Simulate file hash mismatch SetFailPointFileHashMatch(true) testSyncFile(t, layoutLocal, layoutRemote) } func testSyncFile(t *testing.T, layoutLocal, layoutRemote []FileInterval) (hashLocal []byte) { localPath := tempFilePath("ssync-src-") remotePath := tempFilePath("ssync-dst-") filesCleanup(localPath, remotePath) defer filesCleanup(localPath, remotePath) // Create test files createTestSparseFile(localPath, layoutLocal) if len(layoutRemote) > 0 { // only create destination test file if layout is speciifed createTestSparseFile(remotePath, layoutRemote) } // Sync go rest.TestServer(port, remotePath, timeout) err := SyncFile(localPath, localhost+":"+port, timeout) // Verify if err != nil { t.Fatal("sync error") } if !filesAreEqual(localPath, remotePath) { t.Fatal("file content diverged") } return } // created in current dir for benchmark tests var localBigPath = "ssync-src-file.bar" var remoteBigPath = "ssync-dst-file.bar" func Test_1G_cleanup(*testing.T) { // remove temporaries if the benchmarks below are not run filesCleanup(localBigPath, remoteBigPath) } func Benchmark_1G_InitFiles(b *testing.B) { // Setup files layoutLocal := []FileInterval{ {Kind: SparseData, Interval: Interval{Begin: 0, End: (256 << 10) * Blocks}}, } layoutRemote := []FileInterval{} filesCleanup(localBigPath, remoteBigPath) createTestSparseFile(localBigPath, layoutLocal) createTestSparseFile(remoteBigPath, layoutRemote) } func Benchmark_1G_SendFiles_Whole(b *testing.B) { go rest.TestServer(port, remoteBigPath, timeout) err := SyncFile(localBigPath, localhost+":"+port, timeout) if err != nil { b.Fatal("sync error") } } func Benchmark_1G_SendFiles_Diff(b *testing.B) { go rest.TestServer(port, remoteBigPath, timeout) err := SyncFile(localBigPath, localhost+":"+port, timeout) if err != nil { b.Fatal("sync error") } } func Benchmark_1G_CheckFiles(b *testing.B) { if !filesAreEqual(localBigPath, remoteBigPath) { b.Error("file content diverged") return } filesCleanup(localBigPath, remoteBigPath) }
46,896
https://github.com/andysomers/ax-docs-across/blob/master/docs/modules/across-web/pages/basic-features/servlets-and-filters.adoc
Github Open Source
Open Source
Apache-2.0
null
ax-docs-across
andysomers
AsciiDoc
Code
220
549
:page-partial: [[dynamic-servlet-registration]] [#registering-servlets-and-filters] == Registering servlets and filters It is possible to register `Servlet` and `Filter` instances from within an Across module by providing `ServletContextInitializer` beans. During bootstrap, AcrossWebModule will detect these beans and execute them <<developing-applications.adoc#bean-order,in order>>. For the `ServletContext` to be customized, the `AcrossContext` must be bootstrapped during the `ServletContext` initialization. This is the default when you use `@AcrossApplication` with an embedded container (Spring Boot application). When deploying to a separate container, you can use `AbstractAcrossServletInitializer` to achieve the same. .Conditionals `@ConditionalOnConfigurableServletContext` can be used to verify that the context is being bootstrapped in a web configuration where the `ServletContext` allows customization. Likewise `@ConditionalOnNotConfigurableServletContext` can be used to check the opposite is true. .Example registering the resourceUrlEncodingFilter after all other filters [source,java,indent=0] [subs="verbatim,attributes"] ---- @Bean @ConditionalOnProperty(prefix = "acrossWebModule.resources.versioning", value = "enabled", matchIfMissing = true) @ConditionalOnConfigurableServletContext public FilterRegistrationBean resourceUrlEncodingFilterRegistration() { FilterRegistrationBean registration = new FilterRegistrationBean(); registration.setName( RESOURCE_URL_ENCODING_FILTER ); registration.setFilter( new ResourceUrlEncodingFilter() ); registration.setAsyncSupported( true ); registration.setMatchAfter( true ); registration.setUrlPatterns( Collections.singletonList( "/*" ) ); registration.setDispatcherTypes( DispatcherType.REQUEST, DispatcherType.ERROR, DispatcherType.ASYNC ); registration.setOrder( Ordered.LOWEST_PRECEDENCE ); return registration; } ---- WARNING: `ServletContextInitializer` beans can be ordered but the order between initializers defined inside the Across context and outside the context (on application configuration level) is _non deterministic_. To enforce overall ordering, it might be easiest to add those initializers to a module using `@ModuleConfiguration`.
33,941
https://github.com/meowpub/meow/blob/master/lib/errors.go
Github Open Source
Open Source
MIT
2,021
meow
meowpub
Go
Code
226
460
package lib import ( "context" "github.com/pkg/errors" "go.uber.org/zap" ) // Error attaches a status code to an error. type Err struct { Err error StatusCode int } // Wraps an error with an error code. func Code(err error, code int) error { if err != nil { return Err{err, code} } return nil } // Wraps an error with an error code and message. func Wrap(err error, code int, s string) error { return errors.Wrap(Code(err, code), s) } // Wraps an error with an error code and message. func Wrapf(err error, code int, s string, args ...interface{}) error { return errors.Wrapf(Code(err, code), s, args...) } // Returns an error with the given message and status code. func Error(code int, s string) error { return Code(errors.New(s), code) } // Returns an error with the given message format and status code. func Errorf(code int, s string, args ...interface{}) error { return Code(errors.Errorf(s, args...), code) } // Satisfies error. func (err Err) Error() string { return err.Err.Error() } // Satisfies errors.causer. func (err Err) Cause() error { return err.Err } // Report logs an error to the global logger. Useful for `defer conn.Close()`-type constructs, // where there's not really anything useful to do with the error, but you still want to log it. func Report(ctx context.Context, err error, msg string) { if err != nil { GetLogger(ctx).Error(msg, zap.Error(err)) } }
18,225
https://github.com/oneOffJS/zuen/blob/master/standard/f/src/internal/first.js
Github Open Source
Open Source
MIT
2,020
zuen
oneOffJS
JavaScript
Code
11
24
const first = (target) => ( target?.[0] ) export default first
34,732
https://github.com/LexChiang/LexChiang/blob/master/SinaWeibo_Objective-C/SinaWeibo_Objective-C/ViewController.h
Github Open Source
Open Source
Apache-2.0
null
LexChiang
LexChiang
C
Code
28
89
// // ViewController.h // SinaWeibo_Objective-C // // Created by SteveChiang on 15/11/25. // Copyright © 2015年 SteveChiang. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
16,679
https://github.com/renjithraj2005/go-playbook/blob/master/error.go
Github Open Source
Open Source
Apache-2.0
2,018
go-playbook
renjithraj2005
Go
Code
92
204
package main import ( "fmt" "time" ) type MyError struct { When time.Time What string } //Go programs express error state with error values. //The error type is a built-in interface similar to fmt.Stringer: func (e *MyError) Error() string { return fmt.Sprintf("at %v, %s", e.When, e.What) } func run() error { return &MyError{ time.Now(), "it didn't work", } } func errorExample() { //Functions often return an error value, and calling code should handle errors by //testing whether the error equals nil. if err := run(); err != nil { fmt.Println(err) } }
22,116
https://github.com/zimekk/scene/blob/master/src/Video.tsx
Github Open Source
Open Source
MIT
2,021
scene
zimekk
TSX
Code
181
548
import {Composition} from 'remotion'; import phone from './assets/phone.mp4'; import tablet from './assets/tablet.mp4'; import {Scene} from './Scene'; import { GooBallCSS } from './GooBallCSS' import {GLTransitions} from './GLTransitions'; const FPS = 30 // Welcome to the Remotion Three Starter Kit! // Two compositions have been created, showing how to use // the `ThreeCanvas` component and the `useVideoTexture` hook. // You can play around with the example or delete everything inside the canvas. // The device frame automatically adjusts to the video aspect ratio. // Change the variable below to try out tablet mode: type Device = 'phone' | 'tablet'; const deviceType: Device = 'phone'; // Remotion Docs: // https://remotion.dev/docs // @remotion/three Docs: // https://remotion.dev/docs/three // React Three Fiber Docs: // https://docs.pmnd.rs/react-three-fiber/getting-started/introduction export const RemotionVideo: React.FC = () => { return ( <> <Composition id="Scene" component={Scene} durationInFrames={300} fps={30} width={1280} height={720} defaultProps={{ videoSrc: deviceType === 'phone' ? phone : tablet, baseScale: deviceType === 'phone' ? 1 : 1.8, }} /> <Composition id="GooBallCSS" component={GooBallCSS} durationInFrames={10 * FPS} fps={FPS} width={500} height={500} /> <Composition id="Directional" component={GLTransitions} durationInFrames={30} fps={30} width={1920} height={1080} defaultProps={{ name: 'Directional', }} /> </> ); };
10,741
https://github.com/Naeviant/DigitalPeopleLabs/blob/master/web/static/js/links_management.js
Github Open Source
Open Source
MIT
null
DigitalPeopleLabs
Naeviant
JavaScript
Code
46
181
$('#newLinkSubmit').click(() => { const linkName = $('#newLinkName').val(); const linkTextColour = $('#newLinkTextColour').val(); const linkBackgroundColour = $('#newLinkBackgroundColour').val(); const linkURL = $('#newLinkURL').val(); $.ajax('/api/admin/links', { data: JSON.stringify({ "name": linkName, "textColour": linkTextColour, "backgroundColour": linkBackgroundColour, "url": linkURL }), contentType: 'application/json', method: 'POST', complete: () => { window.location = '/dashboard/admin/links' } }) });
36,846
https://github.com/maxima-us/crypto-dom/blob/master/src/crypto_dom/binance/market_data/depth.py
Github Open Source
Open Source
MIT
null
crypto-dom
maxima-us
Python
Code
228
670
import typing from decimal import Decimal import pydantic import stackprinter from typing_extensions import Literal stackprinter.set_excepthook(style="darkbg2") from crypto_dom.binance.definitions import TIMEFRAME, SYMBOL # ============================================================ # DEPTH (ORDERBOOK) # ============================================================ # doc: https://binance-docs.github.io/apidocs/spot/en/#order-book URL = "https://api.binance.com/api/v3/depth" METHOD = "GET" WEIGHT = None # adjusted based on the limit, from 1 to 50 # ------------------------------ # Sample Response (doc) # ------------------------------ # { # "lastUpdateId": 1027024, # "bids": [ # [ # "4.00000000", // PRICE # "431.00000000" // QTY # ] # ], # "asks": [ # [ # "4.00000200", # "12.00000000" # ] # ] # } # ------------------------------ # Request Model # ------------------------------ class Request(pydantic.BaseModel): """Request model for endpoint https://api.binance.com/api/v3/depth Model Fields: ------------- symbol : str Asset pair to get OHLC data for limit : int Default 100; max 5000. Valid limits:[5, 10, 20, 50, 100, 500, 1000, 5000] (Optional) """ symbol: SYMBOL limit: typing.Optional[Literal[5, 10, 20, 50, 100, 500, 1000, 5000]] # ------------------------------ # Response Model # ------------------------------ # tuple of PRICE, QTY _bidask_level = typing.Tuple[Decimal, Decimal] class _Depth(pydantic.BaseModel): lastUpdateId: int bids: typing.Tuple[_bidask_level, ...] asks: typing.Tuple[_bidask_level, ...] # this class is just to be consistent with our API class Response: """Validated Response for endpoint https://api.binance.com/api/v3/depth Type: pydantic.BaseModel Model Fields: ------------- lastUpdateID : int Id of last update (not a timestamp) bids: list List of tuples (`price`, `qty`) asks: list List of tuples (`price`, `qty`) """ def __new__(_cls): return _Depth
27,159
https://github.com/dvpravin/org.ops4j.pax.jms/blob/master/pax-jms-api/src/main/java/org/ops4j/pax/jms/service/PooledConnectionFactoryFactory.java
Github Open Source
Open Source
ECL-2.0, Apache-2.0
null
org.ops4j.pax.jms
dvpravin
Java
Code
264
539
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.ops4j.pax.jms.service; import java.util.Map; import javax.jms.ConnectionFactory; import javax.jms.JMSRuntimeException; import javax.jms.XAConnectionFactory; /** * A factory for pooled JMS {@link ConnectionFactory}. It's an equivalent of pax-jdbc's * {@code org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory} */ public interface PooledConnectionFactoryFactory { /** * A logical name (key) of registered {@code PooledConnectionFactoryFactory} */ String POOL_KEY = "pool"; /** * A boolean flag indicating whether the registered {@code PooledConnectionFactoryFactory} is or is not XA-Aware. */ String XA_KEY = "xa"; /** * Method similar to {@link ConnectionFactoryFactory} factory methods. * It creates pooled {@link ConnectionFactory} using {@link ConnectionFactoryFactory}. * @param cff existing {@link ConnectionFactoryFactory} that can be used to create {@link ConnectionFactory} or * {@link XAConnectionFactory} depending on configuration properties * @param props pooling and connection factory configuration * @return poolable {@link ConnectionFactory} * @throws JMSRuntimeException */ ConnectionFactory create(ConnectionFactoryFactory cff, Map<String, Object> props) throws JMSRuntimeException; }
12,873
https://github.com/smartdevicelink/sdl_ios/blob/master/SmartDeviceLink/private/SDLDynamicMenuUpdateAlgorithm.m
Github Open Source
Open Source
2,023
sdl_ios
smartdevicelink
Objective-C
Code
556
1,724
// // SDLMenuUpdateAlgorithm.m // SmartDeviceLink // // Created by Justin Gluck on 5/14/19. // Copyright © 2019 smartdevicelink. All rights reserved. // #import "SDLDynamicMenuUpdateAlgorithm.h" #import "SDLDynamicMenuUpdateRunScore.h" #import "SDLMenuCell.h" #import "SDLLogMacros.h" #import "SDLWindowCapability.h" NS_ASSUME_NONNULL_BEGIN @interface SDLMenuCell () - (BOOL)sdl_isEqualToCellWithUniqueTitle:(SDLMenuCell *)cell; @end @implementation SDLDynamicMenuUpdateAlgorithm #pragma mark Compatibility Menu Run Score + (SDLDynamicMenuUpdateRunScore *)compatibilityRunScoreWithOldMenuCells:(NSArray<SDLMenuCell *> *)oldMenuCells updatedMenuCells:(NSArray<SDLMenuCell *> *)updatedMenuCells { return [[SDLDynamicMenuUpdateRunScore alloc] initWithOldStatus:[self sdl_buildAllDeleteStatusesForMenu:oldMenuCells] updatedStatus:[self sdl_buildAllAddStatusesForMenu:updatedMenuCells] score:updatedMenuCells.count]; } #pragma mark - Dynamic Menu Run Score + (SDLDynamicMenuUpdateRunScore *)dynamicRunScoreOldMenuCells:(NSArray<SDLMenuCell *> *)oldMenuCells updatedMenuCells:(NSArray<SDLMenuCell *> *)updatedMenuCells { if (oldMenuCells.count > 0 && updatedMenuCells.count == 0) { // Deleting all cells return [[SDLDynamicMenuUpdateRunScore alloc] initWithOldStatus:[SDLDynamicMenuUpdateAlgorithm sdl_buildAllDeleteStatusesForMenu:oldMenuCells] updatedStatus:@[] score:0]; }else if (oldMenuCells.count == 0 && updatedMenuCells.count > 0) { // No cells to delete return [[SDLDynamicMenuUpdateRunScore alloc] initWithOldStatus:@[] updatedStatus:[SDLDynamicMenuUpdateAlgorithm sdl_buildAllAddStatusesForMenu:updatedMenuCells] score:updatedMenuCells.count]; } else if (oldMenuCells.count == 0 && updatedMenuCells.count == 0) { // Empty menu to empty menu return [[SDLDynamicMenuUpdateRunScore alloc] initWithOldStatus:@[] updatedStatus:@[] score:0]; } return [SDLDynamicMenuUpdateAlgorithm sdl_startCompareAtRun:0 oldMenuCells:oldMenuCells updatedMenuCells:updatedMenuCells]; } + (SDLDynamicMenuUpdateRunScore *)sdl_startCompareAtRun:(NSUInteger)startRun oldMenuCells:(NSArray<SDLMenuCell *> *)oldMenuCells updatedMenuCells:(NSArray<SDLMenuCell *> *)updatedMenuCells { SDLDynamicMenuUpdateRunScore *bestScore = [[SDLDynamicMenuUpdateRunScore alloc] initWithOldStatus:@[] updatedStatus:@[] score:0]; for (NSUInteger run = startRun; run < oldMenuCells.count; run++) { // Set the menu status as a 1-1 array, start off will oldMenus = all Deletes, newMenu = all Adds NSMutableArray<NSNumber *> *oldMenuStatus = [SDLDynamicMenuUpdateAlgorithm sdl_buildAllDeleteStatusesForMenu:oldMenuCells]; NSMutableArray<NSNumber *> *newMenuStatus = [SDLDynamicMenuUpdateAlgorithm sdl_buildAllAddStatusesForMenu:updatedMenuCells]; NSUInteger startIndex = 0; for (NSUInteger oldCellIndex = run; oldCellIndex < oldMenuCells.count; oldCellIndex++) { //For each old item // Create inner loop to compare old cells to new cells to find a match, if a match if found we mark the index at match for both the old and the new status to keep since we do not want to send RPCs for those cases for (NSUInteger newCellIndex = startIndex; newCellIndex < updatedMenuCells.count; newCellIndex++) { if ([oldMenuCells[oldCellIndex] sdl_isEqualToCellWithUniqueTitle:updatedMenuCells[newCellIndex]]) { oldMenuStatus[oldCellIndex] = @(SDLMenuCellUpdateStateKeep); newMenuStatus[newCellIndex] = @(SDLMenuCellUpdateStateKeep); startIndex = newCellIndex + 1; break; } } } // Add RPC are the biggest operation so we need to find the run with the least amount of Adds. We will reset the run we use each time a runscore is less than the current score. NSUInteger numberOfAdds = 0; for (NSUInteger status = 0; status < newMenuStatus.count; status++) { // 0 = Delete 1 = Add 2 = Keep if (newMenuStatus[status].integerValue == SDLMenuCellUpdateStateAdd) { numberOfAdds++; } } // As soon as we a run that requires 0 Adds we will use it since we cant do better then 0 if (numberOfAdds == 0) { return [[SDLDynamicMenuUpdateRunScore alloc] initWithOldStatus:oldMenuStatus updatedStatus:newMenuStatus score:numberOfAdds]; } // if we haven't create the bestScore object or if the current score beats the old score then we will create a new bestScore if (bestScore.isEmpty || numberOfAdds < bestScore.score) { bestScore = [[SDLDynamicMenuUpdateRunScore alloc] initWithOldStatus:oldMenuStatus updatedStatus:newMenuStatus score:numberOfAdds]; } } return bestScore; } /** Builds a 1-1 array of Deletes for every element in the array @param oldMenu The old menu array */ + (NSMutableArray<NSNumber *> *)sdl_buildAllDeleteStatusesForMenu:(NSArray<SDLMenuCell *> *)oldMenu { NSMutableArray<NSNumber *> *oldMenuStatus = [[NSMutableArray alloc] initWithCapacity:oldMenu.count]; for (NSUInteger index = 0; index < oldMenu.count; index++) { [oldMenuStatus addObject:@(SDLMenuCellUpdateStateDelete)]; } return oldMenuStatus; } /** Builds a 1-1 array of Adds for every element in the array @param newMenu The new menu array */ + (NSMutableArray<NSNumber *> *)sdl_buildAllAddStatusesForMenu:(NSArray<SDLMenuCell *> *)newMenu { NSMutableArray<NSNumber *> *newMenuStatus = [[NSMutableArray alloc] initWithCapacity:newMenu.count]; for (NSUInteger index = 0; index < newMenu.count; index++) { [newMenuStatus addObject:@(SDLMenuCellUpdateStateAdd)]; } return newMenuStatus; } @end NS_ASSUME_NONNULL_END
939
https://github.com/NicoLaval/Bauhaus/blob/master/app/src/js/components/shared/input-multi-rmes/input-multi-rmes.stories.js
Github Open Source
Open Source
MIT
2,022
Bauhaus
NicoLaval
JavaScript
Code
71
262
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import InputMulti from './'; import { withKnobs, text } from '@storybook/addon-knobs'; const stories = storiesOf('Input multi', module); stories.addDecorator(withKnobs); const styleDecorator = storyFn => ( <div className="col-md-12" style={{ marginTop: '5%' }}> {storyFn()} </div> ); stories.addDecorator(styleDecorator); stories.add('Default', () => ( <InputMulti label={text('Label', 'Label')} inputLg1={[]} inputLg2={[]} handleChangeLg1={action('update lang1')} handleChangeLg2={action('update lang2')} langs={{ lg1: 'fr', lg2: 'en' }} /> ));
22,682
https://github.com/karkisubash/TutionMgmt/blob/master/application/controllers/studentFunctions.php
Github Open Source
Open Source
MIT
null
TutionMgmt
karkisubash
PHP
Code
130
865
<?php class studentFunctions extends CI_Controller{ public function student_login(){ //login for student $uname=$this->input->post('uname'); $pword=md5($this->input->post('pword')); $this->load->model('studentModel'); $log_id=$this->studentModel->check_login($uname,$pword); If($log_id){ $this->load->library('session');//loading session $this->session->set_userdata('sess_id',$log_id);//setting data in session extrated from teh database $this->session->set_userdata('sess_uname',$uname); $this->load->view('studentdashboard');//redirecting to studentdashboard }else{ echo ("Username or Password Error");//error } } public function logout() { $this->session->unset_userdata('sess_id'); $this->load->view('studentlogin'); } public function studentView(){//displays student in the update form $session=$this->session->userdata('sess_id');//setting the user session if ($session!=''){ $this->load->model('studentModel'); $profile=$this->studentModel->showStudent($session); $this->load->view('studentSupdate',['profile'=>$profile]); }else{ $this->load->view('studentlogin'); } } public function studentModify(){//student update their personal profile //getting data from the input of user in textfield of the form $sid=$this->input->post('sid'); $fname=$this->input->post('firstname'); $lname=$this->input->post('lastname'); $contact=$this->input->post('contact'); $address=$this->input->post('location'); $email=$this->input->post('email'); $uname=$this->input->post('uname'); $pword=md5($this->input->post('pword')); $this->load->model('studentModel'); $this->studentModel->modifyStudentDetail($sid,$fname,$lname,$contact,$address,$email,$uname,$pword); $this->load->view('studentDashboard');//loading student dashboard echo "User Sucessfully Updated";//result message } public function showStudent(){ $session=$this->session->userdata('sess_id'); if ($session!=''){ $this->load->model('studentModel'); $profile=$this->studentModel->showStudent($session); $this->load->view('displayStudent',['profile'=>$profile]); }else{ $this->load->view('studentlogin'); } } public function attendance(){ $session=$this->session->userdata('sess_id'); if ($session!=''){ $this->load->model('studentModel'); $profile=$this->studentModel->studentDesc($session); $this->load->view('attendanceStudent',['profile'=>$profile]); } } } ?>
3,269
https://github.com/trentmillar/haraka-test/blob/master/node_modules/maxmind/lib/data/region_name_data.js
Github Open Source
Open Source
MIT
null
haraka-test
trentmillar
JavaScript
Code
10,364
46,191
/* jshint indent: 2 */ // Do not modify this file, it was generated by // ./tools/gen_time_zone.rb module.exports = { "AD": { "2": "Canillo", "3": "Encamp", "4": "La Massana", "5": "Ordino", "6": "Sant Julia de Loria", "7": "Andorra la Vella", "8": "Escaldes-Engordany" }, "AE": { "1": "Abu Dhabi", "2": "Ajman", "3": "Dubai", "4": "Fujairah", "5": "Ras Al Khaimah", "6": "Sharjah", "7": "Umm Al Quwain" }, "AF": { "1": "Badakhshan", "2": "Badghis", "3": "Baghlan", "5": "Bamian", "6": "Farah", "7": "Faryab", "8": "Ghazni", "9": "Ghowr", "10": "Helmand", "11": "Herat", "13": "Kabol", "14": "Kapisa", "17": "Lowgar", "18": "Nangarhar", "19": "Nimruz", "23": "Kandahar", "24": "Kondoz", "26": "Takhar", "27": "Vardak", "28": "Zabol", "29": "Paktika", "30": "Balkh", "31": "Jowzjan", "32": "Samangan", "33": "Sar-e Pol", "34": "Konar", "35": "Laghman", "36": "Paktia", "37": "Khowst", "38": "Nurestan", "39": "Oruzgan", "40": "Parvan", "41": "Daykondi", "42": "Panjshir" }, "AG": { "1": "Barbuda", "3": "Saint George", "4": "Saint John", "5": "Saint Mary", "6": "Saint Paul", "7": "Saint Peter", "8": "Saint Philip", "9": "Redonda" }, "AL": { "40": "Berat", "41": "Diber", "42": "Durres", "43": "Elbasan", "44": "Fier", "45": "Gjirokaster", "46": "Korce", "47": "Kukes", "48": "Lezhe", "49": "Shkoder", "50": "Tirane", "51": "Vlore" }, "AM": { "1": "Aragatsotn", "2": "Ararat", "3": "Armavir", "4": "Geghark'unik'", "5": "Kotayk'", "6": "Lorri", "7": "Shirak", "8": "Syunik'", "9": "Tavush", "10": "Vayots' Dzor", "11": "Yerevan" }, "AO": { "1": "Benguela", "2": "Bie", "3": "Cabinda", "4": "Cuando Cubango", "5": "Cuanza Norte", "6": "Cuanza Sul", "7": "Cunene", "8": "Huambo", "9": "Huila", "12": "Malanje", "13": "Namibe", "14": "Moxico", "15": "Uige", "16": "Zaire", "17": "Lunda Norte", "18": "Lunda Sul", "19": "Bengo", "20": "Luanda" }, "AR": { "1": "Buenos Aires", "2": "Catamarca", "3": "Chaco", "4": "Chubut", "5": "Cordoba", "6": "Corrientes", "7": "Distrito Federal", "8": "Entre Rios", "9": "Formosa", "10": "Jujuy", "11": "La Pampa", "12": "La Rioja", "13": "Mendoza", "14": "Misiones", "15": "Neuquen", "16": "Rio Negro", "17": "Salta", "18": "San Juan", "19": "San Luis", "20": "Santa Cruz", "21": "Santa Fe", "22": "Santiago del Estero", "23": "Tierra del Fuego", "24": "Tucuman" }, "AT": { "1": "Burgenland", "2": "Karnten", "3": "Niederosterreich", "4": "Oberosterreich", "5": "Salzburg", "6": "Steiermark", "7": "Tirol", "8": "Vorarlberg", "9": "Wien" }, "AU": { "1": "Australian Capital Territory", "2": "New South Wales", "3": "Northern Territory", "4": "Queensland", "5": "South Australia", "6": "Tasmania", "7": "Victoria", "8": "Western Australia" }, "AZ": { "1": "Abseron", "2": "Agcabadi", "3": "Agdam", "4": "Agdas", "5": "Agstafa", "6": "Agsu", "7": "Ali Bayramli", "8": "Astara", "9": "Baki", "10": "Balakan", "11": "Barda", "12": "Beylaqan", "13": "Bilasuvar", "14": "Cabrayil", "15": "Calilabad", "16": "Daskasan", "17": "Davaci", "18": "Fuzuli", "19": "Gadabay", "20": "Ganca", "21": "Goranboy", "22": "Goycay", "23": "Haciqabul", "24": "Imisli", "25": "Ismayilli", "26": "Kalbacar", "27": "Kurdamir", "28": "Lacin", "29": "Lankaran", "30": "Lankaran", "31": "Lerik", "32": "Masalli", "33": "Mingacevir", "34": "Naftalan", "35": "Naxcivan", "36": "Neftcala", "37": "Oguz", "38": "Qabala", "39": "Qax", "40": "Qazax", "41": "Qobustan", "42": "Quba", "43": "Qubadli", "44": "Qusar", "45": "Saatli", "46": "Sabirabad", "47": "Saki", "48": "Saki", "49": "Salyan", "50": "Samaxi", "51": "Samkir", "52": "Samux", "53": "Siyazan", "54": "Sumqayit", "55": "Susa", "56": "Susa", "57": "Tartar", "58": "Tovuz", "59": "Ucar", "60": "Xacmaz", "61": "Xankandi", "62": "Xanlar", "63": "Xizi", "64": "Xocali", "65": "Xocavand", "66": "Yardimli", "67": "Yevlax", "68": "Yevlax", "69": "Zangilan", "70": "Zaqatala", "71": "Zardab" }, "BA": { "1": "Federation of Bosnia and Herzegovina", "3": "Brcko District", "2": "Republika Srpska" }, "BB": { "1": "Christ Church", "2": "Saint Andrew", "3": "Saint George", "4": "Saint James", "5": "Saint John", "6": "Saint Joseph", "7": "Saint Lucy", "8": "Saint Michael", "9": "Saint Peter", "10": "Saint Philip", "11": "Saint Thomas" }, "BD": { "81": "Dhaka", "82": "Khulna", "83": "Rajshahi", "84": "Chittagong", "85": "Barisal", "86": "Sylhet", "87": "Rangpur" }, "BE": { "1": "Antwerpen", "3": "Hainaut", "4": "Liege", "5": "Limburg", "6": "Luxembourg", "7": "Namur", "8": "Oost-Vlaanderen", "9": "West-Vlaanderen", "10": "Brabant Wallon", "11": "Brussels Hoofdstedelijk Gewest", "12": "Vlaams-Brabant", "13": "Flanders", "14": "Wallonia" }, "BF": { "15": "Bam", "19": "Boulkiemde", "20": "Ganzourgou", "21": "Gnagna", "28": "Kouritenga", "33": "Oudalan", "34": "Passore", "36": "Sanguie", "40": "Soum", "42": "Tapoa", "44": "Zoundweogo", "45": "Bale", "46": "Banwa", "47": "Bazega", "48": "Bougouriba", "49": "Boulgou", "50": "Gourma", "51": "Houet", "52": "Ioba", "53": "Kadiogo", "54": "Kenedougou", "55": "Komoe", "56": "Komondjari", "57": "Kompienga", "58": "Kossi", "59": "Koulpelogo", "60": "Kourweogo", "61": "Leraba", "62": "Loroum", "63": "Mouhoun", "64": "Namentenga", "65": "Naouri", "66": "Nayala", "67": "Noumbiel", "68": "Oubritenga", "69": "Poni", "70": "Sanmatenga", "71": "Seno", "72": "Sissili", "73": "Sourou", "74": "Tuy", "75": "Yagha", "76": "Yatenga", "77": "Ziro", "78": "Zondoma" }, "BG": { "33": "Mikhaylovgrad", "38": "Blagoevgrad", "39": "Burgas", "40": "Dobrich", "41": "Gabrovo", "42": "Grad Sofiya", "43": "Khaskovo", "44": "Kurdzhali", "45": "Kyustendil", "46": "Lovech", "47": "Montana", "48": "Pazardzhik", "49": "Pernik", "50": "Pleven", "51": "Plovdiv", "52": "Razgrad", "53": "Ruse", "54": "Shumen", "55": "Silistra", "56": "Sliven", "57": "Smolyan", "58": "Sofiya", "59": "Stara Zagora", "60": "Turgovishte", "61": "Varna", "62": "Veliko Turnovo", "63": "Vidin", "64": "Vratsa", "65": "Yambol" }, "BH": { "1": "Al Hadd", "2": "Al Manamah", "5": "Jidd Hafs", "6": "Sitrah", "8": "Al Mintaqah al Gharbiyah", "9": "Mintaqat Juzur Hawar", "10": "Al Mintaqah ash Shamaliyah", "11": "Al Mintaqah al Wusta", "12": "Madinat", "13": "Ar Rifa", "14": "Madinat Hamad", "15": "Al Muharraq", "16": "Al Asimah", "17": "Al Janubiyah", "18": "Ash Shamaliyah", "19": "Al Wusta" }, "BI": { "2": "Bujumbura", "9": "Bubanza", "10": "Bururi", "11": "Cankuzo", "12": "Cibitoke", "13": "Gitega", "14": "Karuzi", "15": "Kayanza", "16": "Kirundo", "17": "Makamba", "18": "Muyinga", "19": "Ngozi", "20": "Rutana", "21": "Ruyigi", "22": "Muramvya", "23": "Mwaro" }, "BJ": { "7": "Alibori", "8": "Atakora", "9": "Atlanyique", "10": "Borgou", "11": "Collines", "12": "Kouffo", "13": "Donga", "14": "Littoral", "15": "Mono", "16": "Oueme", "17": "Plateau", "18": "Zou" }, "BM": { "1": "Devonshire", "2": "Hamilton", "3": "Hamilton", "4": "Paget", "5": "Pembroke", "6": "Saint George", "7": "Saint George's", "8": "Sandys", "9": "Smiths", "10": "Southampton", "11": "Warwick" }, "BN": { "7": "Alibori", "8": "Belait", "9": "Brunei and Muara", "10": "Temburong", "11": "Collines", "12": "Kouffo", "13": "Donga", "14": "Littoral", "15": "Tutong", "16": "Oueme", "17": "Plateau", "18": "Zou" }, "BO": { "1": "Chuquisaca", "2": "Cochabamba", "3": "El Beni", "4": "La Paz", "5": "Oruro", "6": "Pando", "7": "Potosi", "8": "Santa Cruz", "9": "Tarija" }, "BR": { "1": "Acre", "2": "Alagoas", "3": "Amapa", "4": "Amazonas", "5": "Bahia", "6": "Ceara", "7": "Distrito Federal", "8": "Espirito Santo", "11": "Mato Grosso do Sul", "13": "Maranhao", "14": "Mato Grosso", "15": "Minas Gerais", "16": "Para", "17": "Paraiba", "18": "Parana", "20": "Piaui", "21": "Rio de Janeiro", "22": "Rio Grande do Norte", "23": "Rio Grande do Sul", "24": "Rondonia", "25": "Roraima", "26": "Santa Catarina", "27": "Sao Paulo", "28": "Sergipe", "29": "Goias", "30": "Pernambuco", "31": "Tocantins" }, "BS": { "5": "Bimini", "6": "Cat Island", "10": "Exuma", "13": "Inagua", "15": "Long Island", "16": "Mayaguana", "18": "Ragged Island", "22": "Harbour Island", "23": "New Providence", "24": "Acklins and Crooked Islands", "25": "Freeport", "26": "Fresh Creek", "27": "Governor's Harbour", "28": "Green Turtle Cay", "29": "High Rock", "30": "Kemps Bay", "31": "Marsh Harbour", "32": "Nichollstown and Berry Islands", "33": "Rock Sound", "34": "Sandy Point", "35": "San Salvador and Rum Cay" }, "BT": { "5": "Bumthang", "6": "Chhukha", "7": "Chirang", "8": "Daga", "9": "Geylegphug", "10": "Ha", "11": "Lhuntshi", "12": "Mongar", "13": "Paro", "14": "Pemagatsel", "15": "Punakha", "16": "Samchi", "17": "Samdrup", "18": "Shemgang", "19": "Tashigang", "20": "Thimphu", "21": "Tongsa", "22": "Wangdi Phodrang" }, "BW": { "1": "Central", "3": "Ghanzi", "4": "Kgalagadi", "5": "Kgatleng", "6": "Kweneng", "8": "North-East", "9": "South-East", "10": "Southern", "11": "North-West" }, "BY": { "1": "Brestskaya Voblasts'", "2": "Homyel'skaya Voblasts'", "3": "Hrodzyenskaya Voblasts'", "4": "Minsk", "5": "Minskaya Voblasts'", "6": "Mahilyowskaya Voblasts'", "7": "Vitsyebskaya Voblasts'" }, "BZ": { "1": "Belize", "2": "Cayo", "3": "Corozal", "4": "Orange Walk", "5": "Stann Creek", "6": "Toledo" }, "CA": { "849": "Alberta", "893": "British Columbia", "1365": "Manitoba", "1408": "New Brunswick", "1418": "Newfoundland", "1425": "Nova Scotia", "1426": "Northwest Territories", "1427": "Nunavut", "1463": "Ontario", "1497": "Prince Edward Island", "1538": "Quebec", "1632": "Saskatchewan", "1899": "Yukon Territory" }, "CD": { "1": "Bandundu", "2": "Equateur", "4": "Kasai-Oriental", "5": "Katanga", "6": "Kinshasa", "8": "Bas-Congo", "9": "Orientale", "10": "Maniema", "11": "Nord-Kivu", "12": "Sud-Kivu" }, "CF": { "1": "Bamingui-Bangoran", "2": "Basse-Kotto", "3": "Haute-Kotto", "4": "Mambere-Kadei", "5": "Haut-Mbomou", "6": "Kemo", "7": "Lobaye", "8": "Mbomou", "9": "Nana-Mambere", "11": "Ouaka", "12": "Ouham", "13": "Ouham-Pende", "14": "Cuvette-Ouest", "15": "Nana-Grebizi", "16": "Sangha-Mbaere", "17": "Ombella-Mpoko", "18": "Bangui" }, "CG": { "1": "Bouenza", "4": "Kouilou", "5": "Lekoumou", "6": "Likouala", "7": "Niari", "8": "Plateaux", "10": "Sangha", "11": "Pool", "12": "Brazzaville", "13": "Cuvette", "14": "Cuvette-Ouest" }, "CH": { "1": "Aargau", "2": "Ausser-Rhoden", "3": "Basel-Landschaft", "4": "Basel-Stadt", "5": "Bern", "6": "Fribourg", "7": "Geneve", "8": "Glarus", "9": "Graubunden", "10": "Inner-Rhoden", "11": "Luzern", "12": "Neuchatel", "13": "Nidwalden", "14": "Obwalden", "15": "Sankt Gallen", "16": "Schaffhausen", "17": "Schwyz", "18": "Solothurn", "19": "Thurgau", "20": "Ticino", "21": "Uri", "22": "Valais", "23": "Vaud", "24": "Zug", "25": "Zurich", "26": "Jura" }, "CI": { "74": "Agneby", "75": "Bafing", "76": "Bas-Sassandra", "77": "Denguele", "78": "Dix-Huit Montagnes", "79": "Fromager", "80": "Haut-Sassandra", "81": "Lacs", "82": "Lagunes", "83": "Marahoue", "84": "Moyen-Cavally", "85": "Moyen-Comoe", "86": "N'zi-Comoe", "87": "Savanes", "88": "Sud-Bandama", "89": "Sud-Comoe", "90": "Vallee du Bandama", "91": "Worodougou", "92": "Zanzan" }, "CL": { "1": "Valparaiso", "2": "Aisen del General Carlos Ibanez del Campo", "3": "Antofagasta", "4": "Araucania", "5": "Atacama", "6": "Bio-Bio", "7": "Coquimbo", "8": "Libertador General Bernardo O'Higgins", "9": "Los Lagos", "10": "Magallanes y de la Antartica Chilena", "11": "Maule", "12": "Region Metropolitana", "13": "Tarapaca", "14": "Los Lagos", "15": "Tarapaca", "16": "Arica y Parinacota", "17": "Los Rios" }, "CM": { "4": "Est", "5": "Littoral", "7": "Nord-Ouest", "8": "Ouest", "9": "Sud-Ouest", "10": "Adamaoua", "11": "Centre", "12": "Extreme-Nord", "13": "Nord", "14": "Sud" }, "CN": { "1": "Anhui", "2": "Zhejiang", "3": "Jiangxi", "4": "Jiangsu", "5": "Jilin", "6": "Qinghai", "7": "Fujian", "8": "Heilongjiang", "9": "Henan", "10": "Hebei", "11": "Hunan", "12": "Hubei", "13": "Xinjiang", "14": "Xizang", "15": "Gansu", "16": "Guangxi", "18": "Guizhou", "19": "Liaoning", "20": "Nei Mongol", "21": "Ningxia", "22": "Beijing", "23": "Shanghai", "24": "Shanxi", "25": "Shandong", "26": "Shaanxi", "28": "Tianjin", "29": "Yunnan", "30": "Guangdong", "31": "Hainan", "32": "Sichuan", "33": "Chongqing" }, "CO": { "1": "Amazonas", "2": "Antioquia", "3": "Arauca", "4": "Atlantico", "8": "Caqueta", "9": "Cauca", "10": "Cesar", "11": "Choco", "12": "Cordoba", "14": "Guaviare", "15": "Guainia", "16": "Huila", "17": "La Guajira", "19": "Meta", "20": "Narino", "21": "Norte de Santander", "22": "Putumayo", "23": "Quindio", "24": "Risaralda", "25": "San Andres y Providencia", "26": "Santander", "27": "Sucre", "28": "Tolima", "29": "Valle del Cauca", "30": "Vaupes", "31": "Vichada", "32": "Casanare", "33": "Cundinamarca", "34": "Distrito Especial", "35": "Bolivar", "36": "Boyaca", "37": "Caldas", "38": "Magdalena" }, "CR": { "1": "Alajuela", "2": "Cartago", "3": "Guanacaste", "4": "Heredia", "6": "Limon", "7": "Puntarenas", "8": "San Jose" }, "CU": { "1": "Pinar del Rio", "2": "Ciudad de la Habana", "3": "Matanzas", "4": "Isla de la Juventud", "5": "Camaguey", "7": "Ciego de Avila", "8": "Cienfuegos", "9": "Granma", "10": "Guantanamo", "11": "La Habana", "12": "Holguin", "13": "Las Tunas", "14": "Sancti Spiritus", "15": "Santiago de Cuba", "16": "Villa Clara" }, "CV": { "1": "Boa Vista", "2": "Brava", "4": "Maio", "5": "Paul", "7": "Ribeira Grande", "8": "Sal", "10": "Sao Nicolau", "11": "Sao Vicente", "13": "Mosteiros", "14": "Praia", "15": "Santa Catarina", "16": "Santa Cruz", "17": "Sao Domingos", "18": "Sao Filipe", "19": "Sao Miguel", "20": "Tarrafal" }, "CY": { "1": "Famagusta", "2": "Kyrenia", "3": "Larnaca", "4": "Nicosia", "5": "Limassol", "6": "Paphos" }, "CZ": { "52": "Hlavni mesto Praha", "78": "Jihomoravsky kraj", "79": "Jihocesky kraj", "80": "Vysocina", "81": "Karlovarsky kraj", "82": "Kralovehradecky kraj", "83": "Liberecky kraj", "84": "Olomoucky kraj", "85": "Moravskoslezsky kraj", "86": "Pardubicky kraj", "87": "Plzensky kraj", "88": "Stredocesky kraj", "89": "Ustecky kraj", "90": "Zlinsky kraj" }, "DE": { "1": "Baden-Wurttemberg", "2": "Bayern", "3": "Bremen", "4": "Hamburg", "5": "Hessen", "6": "Niedersachsen", "7": "Nordrhein-Westfalen", "8": "Rheinland-Pfalz", "9": "Saarland", "10": "Schleswig-Holstein", "11": "Brandenburg", "12": "Mecklenburg-Vorpommern", "13": "Sachsen", "14": "Sachsen-Anhalt", "15": "Thuringen", "16": "Berlin" }, "DJ": { "1": "Ali Sabieh", "4": "Obock", "5": "Tadjoura", "6": "Dikhil", "7": "Djibouti", "8": "Arta" }, "DK": { "17": "Hovedstaden", "18": "Midtjylland", "19": "Nordjylland", "20": "Sjelland", "21": "Syddanmark" }, "DM": { "2": "Saint Andrew", "3": "Saint David", "4": "Saint George", "5": "Saint John", "6": "Saint Joseph", "7": "Saint Luke", "8": "Saint Mark", "9": "Saint Patrick", "10": "Saint Paul", "11": "Saint Peter" }, "DO": { "1": "Azua", "2": "Baoruco", "3": "Barahona", "4": "Dajabon", "5": "Distrito Nacional", "6": "Duarte", "8": "Espaillat", "9": "Independencia", "10": "La Altagracia", "11": "Elias Pina", "12": "La Romana", "14": "Maria Trinidad Sanchez", "15": "Monte Cristi", "16": "Pedernales", "17": "Peravia", "18": "Puerto Plata", "19": "Salcedo", "20": "Samana", "21": "Sanchez Ramirez", "23": "San Juan", "24": "San Pedro De Macoris", "25": "Santiago", "26": "Santiago Rodriguez", "27": "Valverde", "28": "El Seibo", "29": "Hato Mayor", "30": "La Vega", "31": "Monsenor Nouel", "32": "Monte Plata", "33": "San Cristobal", "34": "Distrito Nacional", "35": "Peravia", "36": "San Jose de Ocoa", "37": "Santo Domingo" }, "DZ": { "1": "Alger", "3": "Batna", "4": "Constantine", "6": "Medea", "7": "Mostaganem", "9": "Oran", "10": "Saida", "12": "Setif", "13": "Tiaret", "14": "Tizi Ouzou", "15": "Tlemcen", "18": "Bejaia", "19": "Biskra", "20": "Blida", "21": "Bouira", "22": "Djelfa", "23": "Guelma", "24": "Jijel", "25": "Laghouat", "26": "Mascara", "27": "M'sila", "29": "Oum el Bouaghi", "30": "Sidi Bel Abbes", "31": "Skikda", "33": "Tebessa", "34": "Adrar", "35": "Ain Defla", "36": "Ain Temouchent", "37": "Annaba", "38": "Bechar", "39": "Bordj Bou Arreridj", "40": "Boumerdes", "41": "Chlef", "42": "El Bayadh", "43": "El Oued", "44": "El Tarf", "45": "Ghardaia", "46": "Illizi", "47": "Khenchela", "48": "Mila", "49": "Naama", "50": "Ouargla", "51": "Relizane", "52": "Souk Ahras", "53": "Tamanghasset", "54": "Tindouf", "55": "Tipaza", "56": "Tissemsilt" }, "EC": { "1": "Galapagos", "2": "Azuay", "3": "Bolivar", "4": "Canar", "5": "Carchi", "6": "Chimborazo", "7": "Cotopaxi", "8": "El Oro", "9": "Esmeraldas", "10": "Guayas", "11": "Imbabura", "12": "Loja", "13": "Los Rios", "14": "Manabi", "15": "Morona-Santiago", "17": "Pastaza", "18": "Pichincha", "19": "Tungurahua", "20": "Zamora-Chinchipe", "22": "Sucumbios", "23": "Napo", "24": "Orellana" }, "EE": { "1": "Harjumaa", "2": "Hiiumaa", "3": "Ida-Virumaa", "4": "Jarvamaa", "5": "Jogevamaa", "6": "Kohtla-Jarve", "7": "Laanemaa", "8": "Laane-Virumaa", "9": "Narva", "10": "Parnu", "11": "Parnumaa", "12": "Polvamaa", "13": "Raplamaa", "14": "Saaremaa", "15": "Sillamae", "16": "Tallinn", "17": "Tartu", "18": "Tartumaa", "19": "Valgamaa", "20": "Viljandimaa", "21": "Vorumaa" }, "EG": { "1": "Ad Daqahliyah", "2": "Al Bahr al Ahmar", "3": "Al Buhayrah", "4": "Al Fayyum", "5": "Al Gharbiyah", "6": "Al Iskandariyah", "7": "Al Isma'iliyah", "8": "Al Jizah", "9": "Al Minufiyah", "10": "Al Minya", "11": "Al Qahirah", "12": "Al Qalyubiyah", "13": "Al Wadi al Jadid", "14": "Ash Sharqiyah", "15": "As Suways", "16": "Aswan", "17": "Asyut", "18": "Bani Suwayf", "19": "Bur Sa'id", "20": "Dumyat", "21": "Kafr ash Shaykh", "22": "Matruh", "23": "Qina", "24": "Suhaj", "26": "Janub Sina'", "27": "Shamal Sina'", "28": "Al Uqsur" }, "ER": { "1": "Anseba", "2": "Debub", "3": "Debubawi K'eyih Bahri", "4": "Gash Barka", "5": "Ma'akel", "6": "Semenawi K'eyih Bahri" }, "ES": { "7": "Islas Baleares", "27": "La Rioja", "29": "Madrid", "31": "Murcia", "32": "Navarra", "34": "Asturias", "39": "Cantabria", "51": "Andalucia", "52": "Aragon", "53": "Canarias", "54": "Castilla-La Mancha", "55": "Castilla y Leon", "56": "Catalonia", "57": "Extremadura", "58": "Galicia", "59": "Pais Vasco", "60": "Comunidad Valenciana" }, "ET": { "44": "Adis Abeba", "45": "Afar", "46": "Amara", "47": "Binshangul Gumuz", "48": "Dire Dawa", "49": "Gambela Hizboch", "50": "Hareri Hizb", "51": "Oromiya", "52": "Sumale", "53": "Tigray", "54": "YeDebub Biheroch Bihereseboch na Hizboch" }, "FI": { "1": "Aland", "6": "Lapland", "8": "Oulu", "13": "Southern Finland", "14": "Eastern Finland", "15": "Western Finland" }, "FJ": { "1": "Central", "2": "Eastern", "3": "Northern", "4": "Rotuma", "5": "Western" }, "FM": { "1": "Kosrae", "2": "Pohnpei", "3": "Chuuk", "4": "Yap" }, "FR": { "97": "Aquitaine", "98": "Auvergne", "99": "Basse-Normandie", "832": "Bourgogne", "833": "Bretagne", "834": "Centre", "835": "Champagne-Ardenne", "836": "Corse", "837": "Franche-Comte", "838": "Haute-Normandie", "839": "Ile-de-France", "840": "Languedoc-Roussillon", "875": "Limousin", "876": "Lorraine", "877": "Midi-Pyrenees", "878": "Nord-Pas-de-Calais", "879": "Pays de la Loire", "880": "Picardie", "881": "Poitou-Charentes", "882": "Provence-Alpes-Cote d'Azur", "883": "Rhone-Alpes", "918": "Alsace" }, "GA": { "1": "Estuaire", "2": "Haut-Ogooue", "3": "Moyen-Ogooue", "4": "Ngounie", "5": "Nyanga", "6": "Ogooue-Ivindo", "7": "Ogooue-Lolo", "8": "Ogooue-Maritime", "9": "Woleu-Ntem" }, "GB": { "832": "Barking and Dagenham", "833": "Barnet", "834": "Barnsley", "835": "Bath and North East Somerset", "836": "Bedfordshire", "837": "Bexley", "838": "Birmingham", "839": "Blackburn with Darwen", "840": "Blackpool", "875": "Bolton", "876": "Bournemouth", "877": "Bracknell Forest", "878": "Bradford", "879": "Brent", "880": "Brighton and Hove", "881": "Bristol", "882": "Bromley", "883": "Buckinghamshire", "918": "Bury", "919": "Calderdale", "920": "Cambridgeshire", "921": "Camden", "922": "Cheshire", "923": "Cornwall", "924": "Coventry", "925": "Croydon", "926": "Cumbria", "961": "Darlington", "962": "Derby", "963": "Derbyshire", "964": "Devon", "965": "Doncaster", "966": "Dorset", "967": "Dudley", "968": "Durham", "969": "Ealing", "1004": "East Riding of Yorkshire", "1005": "East Sussex", "1006": "Enfield", "1007": "Essex", "1008": "Gateshead", "1009": "Gloucestershire", "1010": "Greenwich", "1011": "Hackney", "1012": "Halton", "1047": "Hammersmith and Fulham", "1048": "Hampshire", "1049": "Haringey", "1050": "Harrow", "1051": "Hartlepool", "1052": "Havering", "1053": "Herefordshire", "1054": "Hertford", "1055": "Hillingdon", "1090": "Hounslow", "1091": "Isle of Wight", "1092": "Islington", "1093": "Kensington and Chelsea", "1094": "Kent", "1095": "Kingston upon Hull", "1096": "Kingston upon Thames", "1097": "Kirklees", "1098": "Knowsley", "1133": "Lambeth", "1134": "Lancashire", "1135": "Leeds", "1136": "Leicester", "1137": "Leicestershire", "1138": "Lewisham", "1139": "Lincolnshire", "1140": "Liverpool", "1141": "London", "1176": "Luton", "1177": "Manchester", "1178": "Medway", "1179": "Merton", "1180": "Middlesbrough", "1181": "Milton Keynes", "1182": "Newcastle upon Tyne", "1183": "Newham", "1184": "Norfolk", "1219": "Northamptonshire", "1220": "North East Lincolnshire", "1221": "North Lincolnshire", "1222": "North Somerset", "1223": "North Tyneside", "1224": "Northumberland", "1225": "North Yorkshire", "1226": "Nottingham", "1227": "Nottinghamshire", "1262": "Oldham", "1263": "Oxfordshire", "1264": "Peterborough", "1265": "Plymouth", "1266": "Poole", "1267": "Portsmouth", "1268": "Reading", "1269": "Redbridge", "1270": "Redcar and Cleveland", "1305": "Richmond upon Thames", "1306": "Rochdale", "1307": "Rotherham", "1308": "Rutland", "1309": "Salford", "1310": "Shropshire", "1311": "Sandwell", "1312": "Sefton", "1313": "Sheffield", "1348": "Slough", "1349": "Solihull", "1350": "Somerset", "1351": "Southampton", "1352": "Southend-on-Sea", "1353": "South Gloucestershire", "1354": "South Tyneside", "1355": "Southwark", "1356": "Staffordshire", "1391": "St. Helens", "1392": "Stockport", "1393": "Stockton-on-Tees", "1394": "Stoke-on-Trent", "1395": "Suffolk", "1396": "Sunderland", "1397": "Surrey", "1398": "Sutton", "1399": "Swindon", "1434": "Tameside", "1435": "Telford and Wrekin", "1436": "Thurrock", "1437": "Torbay", "1438": "Tower Hamlets", "1439": "Trafford", "1440": "Wakefield", "1441": "Walsall", "1442": "Waltham Forest", "1477": "Wandsworth", "1478": "Warrington", "1479": "Warwickshire", "1480": "West Berkshire", "1481": "Westminster", "1482": "West Sussex", "1483": "Wigan", "1484": "Wiltshire", "1485": "Windsor and Maidenhead", "1520": "Wirral", "1521": "Wokingham", "1522": "Wolverhampton", "1523": "Worcestershire", "1524": "York", "1525": "Antrim", "1526": "Ards", "1527": "Armagh", "1528": "Ballymena", "1563": "Ballymoney", "1564": "Banbridge", "1565": "Belfast", "1566": "Carrickfergus", "1567": "Castlereagh", "1568": "Coleraine", "1569": "Cookstown", "1570": "Craigavon", "1571": "Down", "1606": "Dungannon", "1607": "Fermanagh", "1608": "Larne", "1609": "Limavady", "1610": "Lisburn", "1611": "Derry", "1612": "Magherafelt", "1613": "Moyle", "1614": "Newry and Mourne", "1649": "Newtownabbey", "1650": "North Down", "1651": "Omagh", "1652": "Strabane", "1653": "Aberdeen City", "1654": "Aberdeenshire", "1655": "Angus", "1656": "Argyll and Bute", "1657": "Scottish Borders", "1692": "Clackmannanshire", "1693": "Dumfries and Galloway", "1694": "Dundee City", "1695": "East Ayrshire", "1696": "East Dunbartonshire", "1697": "East Lothian", "1698": "East Renfrewshire", "1699": "Edinburgh", "1700": "Falkirk", "1735": "Fife", "1736": "Glasgow City", "1737": "Highland", "1738": "Inverclyde", "1739": "Midlothian", "1740": "Moray", "1741": "North Ayrshire", "1742": "North Lanarkshire", "1743": "Orkney", "1778": "Perth and Kinross", "1779": "Renfrewshire", "1780": "Shetland Islands", "1781": "South Ayrshire", "1782": "South Lanarkshire", "1783": "Stirling", "1784": "West Dunbartonshire", "1785": "Eilean Siar", "1786": "West Lothian", "1821": "Isle of Anglesey", "1822": "Blaenau Gwent", "1823": "Bridgend", "1824": "Caerphilly", "1825": "Cardiff", "1826": "Ceredigion", "1827": "Carmarthenshire", "1828": "Conwy", "1829": "Denbighshire", "1864": "Flintshire", "1865": "Gwynedd", "1866": "Merthyr Tydfil", "1867": "Monmouthshire", "1868": "Neath Port Talbot", "1869": "Newport", "1870": "Pembrokeshire", "1871": "Powys", "1872": "Rhondda Cynon Taff", "1907": "Swansea", "1908": "Torfaen", "1909": "Vale of Glamorgan", "1910": "Wrexham", "1911": "Bedfordshire", "1912": "Central Bedfordshire", "1913": "Cheshire East", "1914": "Cheshire West and Chester", "1915": "Isles of Scilly" }, "GD": { "1": "Saint Andrew", "2": "Saint David", "3": "Saint George", "4": "Saint John", "5": "Saint Mark", "6": "Saint Patrick" }, "GE": { "1": "Abashis Raioni", "2": "Abkhazia", "3": "Adigenis Raioni", "4": "Ajaria", "5": "Akhalgoris Raioni", "6": "Akhalk'alak'is Raioni", "7": "Akhalts'ikhis Raioni", "8": "Akhmetis Raioni", "9": "Ambrolauris Raioni", "10": "Aspindzis Raioni", "11": "Baghdat'is Raioni", "12": "Bolnisis Raioni", "13": "Borjomis Raioni", "14": "Chiat'ura", "15": "Ch'khorotsqus Raioni", "16": "Ch'okhatauris Raioni", "17": "Dedop'listsqaros Raioni", "18": "Dmanisis Raioni", "19": "Dushet'is Raioni", "20": "Gardabanis Raioni", "21": "Gori", "22": "Goris Raioni", "23": "Gurjaanis Raioni", "24": "Javis Raioni", "25": "K'arelis Raioni", "26": "Kaspis Raioni", "27": "Kharagaulis Raioni", "28": "Khashuris Raioni", "29": "Khobis Raioni", "30": "Khonis Raioni", "31": "K'ut'aisi", "32": "Lagodekhis Raioni", "33": "Lanch'khut'is Raioni", "34": "Lentekhis Raioni", "35": "Marneulis Raioni", "36": "Martvilis Raioni", "37": "Mestiis Raioni", "38": "Mts'khet'is Raioni", "39": "Ninotsmindis Raioni", "40": "Onis Raioni", "41": "Ozurget'is Raioni", "42": "P'ot'i", "43": "Qazbegis Raioni", "44": "Qvarlis Raioni", "45": "Rust'avi", "46": "Sach'kheris Raioni", "47": "Sagarejos Raioni", "48": "Samtrediis Raioni", "49": "Senakis Raioni", "50": "Sighnaghis Raioni", "51": "T'bilisi", "52": "T'elavis Raioni", "53": "T'erjolis Raioni", "54": "T'et'ritsqaros Raioni", "55": "T'ianet'is Raioni", "56": "Tqibuli", "57": "Ts'ageris Raioni", "58": "Tsalenjikhis Raioni", "59": "Tsalkis Raioni", "60": "Tsqaltubo", "61": "Vanis Raioni", "62": "Zestap'onis Raioni", "63": "Zugdidi", "64": "Zugdidis Raioni" }, "GH": { "1": "Greater Accra", "2": "Ashanti", "3": "Brong-Ahafo", "4": "Central", "5": "Eastern", "6": "Northern", "8": "Volta", "9": "Western", "10": "Upper East", "11": "Upper West" }, "GL": { "1": "Nordgronland", "2": "Ostgronland", "3": "Vestgronland" }, "GM": { "1": "Banjul", "2": "Lower River", "3": "Central River", "4": "Upper River", "5": "Western", "7": "North Bank" }, "GN": { "1": "Beyla", "2": "Boffa", "3": "Boke", "4": "Conakry", "5": "Dabola", "6": "Dalaba", "7": "Dinguiraye", "9": "Faranah", "10": "Forecariah", "11": "Fria", "12": "Gaoual", "13": "Gueckedou", "15": "Kerouane", "16": "Kindia", "17": "Kissidougou", "18": "Koundara", "19": "Kouroussa", "21": "Macenta", "22": "Mali", "23": "Mamou", "25": "Pita", "27": "Telimele", "28": "Tougue", "29": "Yomou", "30": "Coyah", "31": "Dubreka", "32": "Kankan", "33": "Koubia", "34": "Labe", "35": "Lelouma", "36": "Lola", "37": "Mandiana", "38": "Nzerekore", "39": "Siguiri" }, "GQ": { "3": "Annobon", "4": "Bioko Norte", "5": "Bioko Sur", "6": "Centro Sur", "7": "Kie-Ntem", "8": "Litoral", "9": "Wele-Nzas" }, "GR": { "1": "Evros", "2": "Rodhopi", "3": "Xanthi", "4": "Drama", "5": "Serrai", "6": "Kilkis", "7": "Pella", "8": "Florina", "9": "Kastoria", "10": "Grevena", "11": "Kozani", "12": "Imathia", "13": "Thessaloniki", "14": "Kavala", "15": "Khalkidhiki", "16": "Pieria", "17": "Ioannina", "18": "Thesprotia", "19": "Preveza", "20": "Arta", "21": "Larisa", "22": "Trikala", "23": "Kardhitsa", "24": "Magnisia", "25": "Kerkira", "26": "Levkas", "27": "Kefallinia", "28": "Zakinthos", "29": "Fthiotis", "30": "Evritania", "31": "Aitolia kai Akarnania", "32": "Fokis", "33": "Voiotia", "34": "Evvoia", "35": "Attiki", "36": "Argolis", "37": "Korinthia", "38": "Akhaia", "39": "Ilia", "40": "Messinia", "41": "Arkadhia", "42": "Lakonia", "43": "Khania", "44": "Rethimni", "45": "Iraklion", "46": "Lasithi", "47": "Dhodhekanisos", "48": "Samos", "49": "Kikladhes", "50": "Khios", "51": "Lesvos" }, "GT": { "1": "Alta Verapaz", "2": "Baja Verapaz", "3": "Chimaltenango", "4": "Chiquimula", "5": "El Progreso", "6": "Escuintla", "7": "Guatemala", "8": "Huehuetenango", "9": "Izabal", "10": "Jalapa", "11": "Jutiapa", "12": "Peten", "13": "Quetzaltenango", "14": "Quiche", "15": "Retalhuleu", "16": "Sacatepequez", "17": "San Marcos", "18": "Santa Rosa", "19": "Solola", "20": "Suchitepequez", "21": "Totonicapan", "22": "Zacapa" }, "GW": { "1": "Bafata", "2": "Quinara", "4": "Oio", "5": "Bolama", "6": "Cacheu", "7": "Tombali", "10": "Gabu", "11": "Bissau", "12": "Biombo" }, "GY": { "10": "Barima-Waini", "11": "Cuyuni-Mazaruni", "12": "Demerara-Mahaica", "13": "East Berbice-Corentyne", "14": "Essequibo Islands-West Demerara", "15": "Mahaica-Berbice", "16": "Pomeroon-Supenaam", "17": "Potaro-Siparuni", "18": "Upper Demerara-Berbice", "19": "Upper Takutu-Upper Essequibo" }, "HN": { "1": "Atlantida", "2": "Choluteca", "3": "Colon", "4": "Comayagua", "5": "Copan", "6": "Cortes", "7": "El Paraiso", "8": "Francisco Morazan", "9": "Gracias a Dios", "10": "Intibuca", "11": "Islas de la Bahia", "12": "La Paz", "13": "Lempira", "14": "Ocotepeque", "15": "Olancho", "16": "Santa Barbara", "17": "Valle", "18": "Yoro" }, "HR": { "1": "Bjelovarsko-Bilogorska", "2": "Brodsko-Posavska", "3": "Dubrovacko-Neretvanska", "4": "Istarska", "5": "Karlovacka", "6": "Koprivnicko-Krizevacka", "7": "Krapinsko-Zagorska", "8": "Licko-Senjska", "9": "Medimurska", "10": "Osjecko-Baranjska", "11": "Pozesko-Slavonska", "12": "Primorsko-Goranska", "13": "Sibensko-Kninska", "14": "Sisacko-Moslavacka", "15": "Splitsko-Dalmatinska", "16": "Varazdinska", "17": "Viroviticko-Podravska", "18": "Vukovarsko-Srijemska", "19": "Zadarska", "20": "Zagrebacka", "21": "Grad Zagreb" }, "HT": { "3": "Nord-Ouest", "6": "Artibonite", "7": "Centre", "9": "Nord", "10": "Nord-Est", "11": "Ouest", "12": "Sud", "13": "Sud-Est", "14": "Grand' Anse", "15": "Nippes" }, "HU": { "1": "Bacs-Kiskun", "2": "Baranya", "3": "Bekes", "4": "Borsod-Abauj-Zemplen", "5": "Budapest", "6": "Csongrad", "7": "Debrecen", "8": "Fejer", "9": "Gyor-Moson-Sopron", "10": "Hajdu-Bihar", "11": "Heves", "12": "Komarom-Esztergom", "13": "Miskolc", "14": "Nograd", "15": "Pecs", "16": "Pest", "17": "Somogy", "18": "Szabolcs-Szatmar-Bereg", "19": "Szeged", "20": "Jasz-Nagykun-Szolnok", "21": "Tolna", "22": "Vas", "23": "Veszprem", "24": "Zala", "25": "Gyor", "26": "Bekescsaba", "27": "Dunaujvaros", "28": "Eger", "29": "Hodmezovasarhely", "30": "Kaposvar", "31": "Kecskemet", "32": "Nagykanizsa", "33": "Nyiregyhaza", "34": "Sopron", "35": "Szekesfehervar", "36": "Szolnok", "37": "Szombathely", "38": "Tatabanya", "39": "Veszprem", "40": "Zalaegerszeg", "41": "Salgotarjan", "42": "Szekszard", "43": "Erd" }, "ID": { "1": "Aceh", "2": "Bali", "3": "Bengkulu", "4": "Jakarta Raya", "5": "Jambi", "7": "Jawa Tengah", "8": "Jawa Timur", "10": "Yogyakarta", "11": "Kalimantan Barat", "12": "Kalimantan Selatan", "13": "Kalimantan Tengah", "14": "Kalimantan Timur", "15": "Lampung", "17": "Nusa Tenggara Barat", "18": "Nusa Tenggara Timur", "21": "Sulawesi Tengah", "22": "Sulawesi Tenggara", "24": "Sumatera Barat", "26": "Sumatera Utara", "28": "Maluku", "29": "Maluku Utara", "30": "Jawa Barat", "31": "Sulawesi Utara", "32": "Sumatera Selatan", "33": "Banten", "34": "Gorontalo", "35": "Kepulauan Bangka Belitung", "36": "Papua", "37": "Riau", "38": "Sulawesi Selatan", "39": "Irian Jaya Barat", "40": "Kepulauan Riau", "41": "Sulawesi Barat" }, "IE": { "1": "Carlow", "2": "Cavan", "3": "Clare", "4": "Cork", "6": "Donegal", "7": "Dublin", "10": "Galway", "11": "Kerry", "12": "Kildare", "13": "Kilkenny", "14": "Leitrim", "15": "Laois", "16": "Limerick", "18": "Longford", "19": "Louth", "20": "Mayo", "21": "Meath", "22": "Monaghan", "23": "Offaly", "24": "Roscommon", "25": "Sligo", "26": "Tipperary", "27": "Waterford", "29": "Westmeath", "30": "Wexford", "31": "Wicklow" }, "IL": { "1": "HaDarom", "2": "HaMerkaz", "3": "HaZafon", "4": "Hefa", "5": "Tel Aviv", "6": "Yerushalayim" }, "IN": { "1": "Andaman and Nicobar Islands", "2": "Andhra Pradesh", "3": "Assam", "5": "Chandigarh", "6": "Dadra and Nagar Haveli", "7": "Delhi", "9": "Gujarat", "10": "Haryana", "11": "Himachal Pradesh", "12": "Jammu and Kashmir", "13": "Kerala", "14": "Lakshadweep", "16": "Maharashtra", "17": "Manipur", "18": "Meghalaya", "19": "Karnataka", "20": "Nagaland", "21": "Orissa", "22": "Puducherry", "23": "Punjab", "24": "Rajasthan", "25": "Tamil Nadu", "26": "Tripura", "28": "West Bengal", "29": "Sikkim", "30": "Arunachal Pradesh", "31": "Mizoram", "32": "Daman and Diu", "33": "Goa", "34": "Bihar", "35": "Madhya Pradesh", "36": "Uttar Pradesh", "37": "Chhattisgarh", "38": "Jharkhand", "39": "Uttarakhand" }, "IQ": { "1": "Al Anbar", "2": "Al Basrah", "3": "Al Muthanna", "4": "Al Qadisiyah", "5": "As Sulaymaniyah", "6": "Babil", "7": "Baghdad", "8": "Dahuk", "9": "Dhi Qar", "10": "Diyala", "11": "Arbil", "12": "Karbala'", "13": "At Ta'mim", "14": "Maysan", "15": "Ninawa", "16": "Wasit", "17": "An Najaf", "18": "Salah ad Din" }, "IR": { "1": "Azarbayjan-e Bakhtari", "3": "Chahar Mahall va Bakhtiari", "4": "Sistan va Baluchestan", "5": "Kohkiluyeh va Buyer Ahmadi", "7": "Fars", "8": "Gilan", "9": "Hamadan", "10": "Ilam", "11": "Hormozgan", "12": "Kerman", "13": "Bakhtaran", "15": "Khuzestan", "16": "Kordestan", "17": "Mazandaran", "18": "Semnan Province", "19": "Markazi", "21": "Zanjan", "22": "Bushehr", "23": "Lorestan", "24": "Markazi", "25": "Semnan", "26": "Tehran", "27": "Zanjan", "28": "Esfahan", "29": "Kerman", "30": "Khorasan", "31": "Yazd", "32": "Ardabil", "33": "East Azarbaijan", "34": "Markazi", "35": "Mazandaran", "36": "Zanjan", "37": "Golestan", "38": "Qazvin", "39": "Qom", "40": "Yazd", "41": "Khorasan-e Janubi", "42": "Khorasan-e Razavi", "43": "Khorasan-e Shemali", "44": "Alborz" }, "IS": { "3": "Arnessysla", "5": "Austur-Hunavatnssysla", "6": "Austur-Skaftafellssysla", "7": "Borgarfjardarsysla", "9": "Eyjafjardarsysla", "10": "Gullbringusysla", "15": "Kjosarsysla", "17": "Myrasysla", "20": "Nordur-Mulasysla", "21": "Nordur-Tingeyjarsysla", "23": "Rangarvallasysla", "28": "Skagafjardarsysla", "29": "Snafellsnes- og Hnappadalssysla", "30": "Strandasysla", "31": "Sudur-Mulasysla", "32": "Sudur-Tingeyjarsysla", "34": "Vestur-Bardastrandarsysla", "35": "Vestur-Hunavatnssysla", "36": "Vestur-Isafjardarsysla", "37": "Vestur-Skaftafellssysla", "38": "Austurland", "39": "Hofuoborgarsvaoio", "40": "Norourland Eystra", "41": "Norourland Vestra", "42": "Suourland", "43": "Suournes", "44": "Vestfiroir", "45": "Vesturland" }, "IT": { "1": "Abruzzi", "2": "Basilicata", "3": "Calabria", "4": "Campania", "5": "Emilia-Romagna", "6": "Friuli-Venezia Giulia", "7": "Lazio", "8": "Liguria", "9": "Lombardia", "10": "Marche", "11": "Molise", "12": "Piemonte", "13": "Puglia", "14": "Sardegna", "15": "Sicilia", "16": "Toscana", "17": "Trentino-Alto Adige", "18": "Umbria", "19": "Valle d'Aosta", "20": "Veneto" }, "JM": { "1": "Clarendon", "2": "Hanover", "4": "Manchester", "7": "Portland", "8": "Saint Andrew", "9": "Saint Ann", "10": "Saint Catherine", "11": "Saint Elizabeth", "12": "Saint James", "13": "Saint Mary", "14": "Saint Thomas", "15": "Trelawny", "16": "Westmoreland", "17": "Kingston" }, "JO": { "2": "Al Balqa'", "9": "Al Karak", "12": "At Tafilah", "15": "Al Mafraq", "16": "Amman", "17": "Az Zaraqa", "18": "Irbid", "19": "Ma'an", "20": "Ajlun", "21": "Al Aqabah", "22": "Jarash", "23": "Madaba" }, "JP": { "1": "Aichi", "2": "Akita", "3": "Aomori", "4": "Chiba", "5": "Ehime", "6": "Fukui", "7": "Fukuoka", "8": "Fukushima", "9": "Gifu", "10": "Gumma", "11": "Hiroshima", "12": "Hokkaido", "13": "Hyogo", "14": "Ibaraki", "15": "Ishikawa", "16": "Iwate", "17": "Kagawa", "18": "Kagoshima", "19": "Kanagawa", "20": "Kochi", "21": "Kumamoto", "22": "Kyoto", "23": "Mie", "24": "Miyagi", "25": "Miyazaki", "26": "Nagano", "27": "Nagasaki", "28": "Nara", "29": "Niigata", "30": "Oita", "31": "Okayama", "32": "Osaka", "33": "Saga", "34": "Saitama", "35": "Shiga", "36": "Shimane", "37": "Shizuoka", "38": "Tochigi", "39": "Tokushima", "40": "Tokyo", "41": "Tottori", "42": "Toyama", "43": "Wakayama", "44": "Yamagata", "45": "Yamaguchi", "46": "Yamanashi", "47": "Okinawa" }, "KE": { "1": "Central", "2": "Coast", "3": "Eastern", "5": "Nairobi Area", "6": "North-Eastern", "7": "Nyanza", "8": "Rift Valley", "9": "Western" }, "KG": { "1": "Bishkek", "2": "Chuy", "3": "Jalal-Abad", "4": "Naryn", "5": "Osh", "6": "Talas", "7": "Ysyk-Kol", "8": "Osh", "9": "Batken" }, "KH": { "1": "Batdambang", "2": "Kampong Cham", "3": "Kampong Chhnang", "4": "Kampong Speu", "5": "Kampong Thum", "6": "Kampot", "7": "Kandal", "8": "Koh Kong", "9": "Kracheh", "10": "Mondulkiri", "11": "Phnum Penh", "12": "Pursat", "13": "Preah Vihear", "14": "Prey Veng", "15": "Ratanakiri Kiri", "16": "Siem Reap", "17": "Stung Treng", "18": "Svay Rieng", "19": "Takeo", "22": "Phnum Penh", "23": "Ratanakiri", "25": "Banteay Meanchey", "28": "Preah Seihanu", "29": "Batdambang", "30": "Pailin" }, "KI": { "1": "Gilbert Islands", "2": "Line Islands", "3": "Phoenix Islands" }, "KM": { "1": "Anjouan", "2": "Grande Comore", "3": "Moheli" }, "KN": { "1": "Christ Church Nichola Town", "2": "Saint Anne Sandy Point", "3": "Saint George Basseterre", "4": "Saint George Gingerland", "5": "Saint James Windward", "6": "Saint John Capisterre", "7": "Saint John Figtree", "8": "Saint Mary Cayon", "9": "Saint Paul Capisterre", "10": "Saint Paul Charlestown", "11": "Saint Peter Basseterre", "12": "Saint Thomas Lowland", "13": "Saint Thomas Middle Island", "15": "Trinity Palmetto Point" }, "KP": { "1": "Chagang-do", "3": "Hamgyong-namdo", "6": "Hwanghae-namdo", "7": "Hwanghae-bukto", "8": "Kaesong-si", "9": "Kangwon-do", "11": "P'yongan-bukto", "12": "P'yongyang-si", "13": "Yanggang-do", "14": "Namp'o-si", "15": "P'yongan-namdo", "17": "Hamgyong-bukto", "18": "Najin Sonbong-si" }, "KR": { "1": "Cheju-do", "3": "Cholla-bukto", "5": "Ch'ungch'ong-bukto", "6": "Kangwon-do", "10": "Pusan-jikhalsi", "11": "Seoul-t'ukpyolsi", "12": "Inch'on-jikhalsi", "13": "Kyonggi-do", "14": "Kyongsang-bukto", "15": "Taegu-jikhalsi", "16": "Cholla-namdo", "17": "Ch'ungch'ong-namdo", "18": "Kwangju-jikhalsi", "19": "Taejon-jikhalsi", "20": "Kyongsang-namdo", "21": "Ulsan-gwangyoksi" }, "KW": { "1": "Al Ahmadi", "2": "Al Kuwayt", "5": "Al Jahra", "7": "Al Farwaniyah", "8": "Hawalli", "9": "Mubarak al Kabir" }, "KY": { "1": "Creek", "2": "Eastern", "3": "Midland", "4": "South Town", "5": "Spot Bay", "6": "Stake Bay", "7": "West End", "8": "Western" }, "KZ": { "1": "Almaty", "2": "Almaty City", "3": "Aqmola", "4": "Aqtobe", "5": "Astana", "6": "Atyrau", "7": "West Kazakhstan", "8": "Bayqonyr", "9": "Mangghystau", "10": "South Kazakhstan", "11": "Pavlodar", "12": "Qaraghandy", "13": "Qostanay", "14": "Qyzylorda", "15": "East Kazakhstan", "16": "North Kazakhstan", "17": "Zhambyl" }, "LA": { "1": "Attapu", "2": "Champasak", "3": "Houaphan", "4": "Khammouan", "5": "Louang Namtha", "7": "Oudomxai", "8": "Phongsali", "9": "Saravan", "10": "Savannakhet", "11": "Vientiane", "13": "Xaignabouri", "14": "Xiangkhoang", "17": "Louangphrabang" }, "LB": { "1": "Beqaa", "2": "Al Janub", "3": "Liban-Nord", "4": "Beyrouth", "5": "Mont-Liban", "6": "Liban-Sud", "7": "Nabatiye", "8": "Beqaa", "9": "Liban-Nord", "10": "Aakk", "11": "Baalbek-Hermel" }, "LC": { "1": "Anse-la-Raye", "2": "Dauphin", "3": "Castries", "4": "Choiseul", "5": "Dennery", "6": "Gros-Islet", "7": "Laborie", "8": "Micoud", "9": "Soufriere", "10": "Vieux-Fort", "11": "Praslin" }, "LI": { "1": "Balzers", "2": "Eschen", "3": "Gamprin", "4": "Mauren", "5": "Planken", "6": "Ruggell", "7": "Schaan", "8": "Schellenberg", "9": "Triesen", "10": "Triesenberg", "11": "Vaduz", "21": "Gbarpolu", "22": "River Gee" }, "LK": { "29": "Central", "30": "North Central", "32": "North Western", "33": "Sabaragamuwa", "34": "Southern", "35": "Uva", "36": "Western", "37": "Eastern", "38": "Northern" }, "LR": { "1": "Bong", "4": "Grand Cape Mount", "5": "Lofa", "6": "Maryland", "7": "Monrovia", "9": "Nimba", "10": "Sino", "11": "Grand Bassa", "12": "Grand Cape Mount", "13": "Maryland", "14": "Montserrado", "17": "Margibi", "18": "River Cess", "19": "Grand Gedeh", "20": "Lofa", "21": "Gbarpolu", "22": "River Gee" }, "LS": { "10": "Berea", "11": "Butha-Buthe", "12": "Leribe", "13": "Mafeteng", "14": "Maseru", "15": "Mohales Hoek", "16": "Mokhotlong", "17": "Qachas Nek", "18": "Quthing", "19": "Thaba-Tseka" }, "LT": { "56": "Alytaus Apskritis", "57": "Kauno Apskritis", "58": "Klaipedos Apskritis", "59": "Marijampoles Apskritis", "60": "Panevezio Apskritis", "61": "Siauliu Apskritis", "62": "Taurages Apskritis", "63": "Telsiu Apskritis", "64": "Utenos Apskritis", "65": "Vilniaus Apskritis" }, "LU": { "1": "Diekirch", "2": "Grevenmacher", "3": "Luxembourg" }, "LV": { "1": "Aizkraukles", "2": "Aluksnes", "3": "Balvu", "4": "Bauskas", "5": "Cesu", "6": "Daugavpils", "7": "Daugavpils", "8": "Dobeles", "9": "Gulbenes", "10": "Jekabpils", "11": "Jelgava", "12": "Jelgavas", "13": "Jurmala", "14": "Kraslavas", "15": "Kuldigas", "16": "Liepaja", "17": "Liepajas", "18": "Limbazu", "19": "Ludzas", "20": "Madonas", "21": "Ogres", "22": "Preilu", "23": "Rezekne", "24": "Rezeknes", "25": "Riga", "26": "Rigas", "27": "Saldus", "28": "Talsu", "29": "Tukuma", "30": "Valkas", "31": "Valmieras", "32": "Ventspils", "33": "Ventspils" }, "LY": { "3": "Al Aziziyah", "5": "Al Jufrah", "8": "Al Kufrah", "13": "Ash Shati'", "30": "Murzuq", "34": "Sabha", "41": "Tarhunah", "42": "Tubruq", "45": "Zlitan", "47": "Ajdabiya", "48": "Al Fatih", "49": "Al Jabal al Akhdar", "50": "Al Khums", "51": "An Nuqat al Khams", "52": "Awbari", "53": "Az Zawiyah", "54": "Banghazi", "55": "Darnah", "56": "Ghadamis", "57": "Gharyan", "58": "Misratah", "59": "Sawfajjin", "60": "Surt", "61": "Tarabulus", "62": "Yafran" }, "MA": { "45": "Grand Casablanca", "46": "Fes-Boulemane", "47": "Marrakech-Tensift-Al Haouz", "48": "Meknes-Tafilalet", "49": "Rabat-Sale-Zemmour-Zaer", "50": "Chaouia-Ouardigha", "51": "Doukkala-Abda", "52": "Gharb-Chrarda-Beni Hssen", "53": "Guelmim-Es Smara", "54": "Oriental", "55": "Souss-Massa-Dr", "56": "Tadla-Azilal", "57": "Tanger-Tetouan", "58": "Taza-Al Hoceima-Taounate", "59": "La" }, "MC": { "1": "La Condamine", "2": "Monaco", "3": "Monte-Carlo" }, "MD": { "51": "Gagauzia", "57": "Chisinau", "58": "Stinga Nistrului", "59": "Anenii Noi", "60": "Balti", "61": "Basarabeasca", "62": "Bender", "63": "Briceni", "64": "Cahul", "65": "Cantemir", "66": "Calarasi", "67": "Causeni", "68": "Cimislia", "69": "Criuleni", "70": "Donduseni", "71": "Drochia", "72": "Dubasari", "73": "Edinet", "74": "Falesti", "75": "Floresti", "76": "Glodeni", "77": "Hincesti", "78": "Ialoveni", "79": "Leova", "80": "Nisporeni", "81": "Ocnita", "82": "Orhei", "83": "Rezina", "84": "Riscani", "85": "Singerei", "86": "Soldanesti", "87": "Soroca", "88": "Stefan-Voda", "89": "Straseni", "90": "Taraclia", "91": "Telenesti", "92": "Ungheni" }, "MG": { "1": "Antsiranana", "2": "Fianarantsoa", "3": "Mahajanga", "4": "Toamasina", "5": "Antananarivo", "6": "Toliara" }, "MK": { "1": "Aracinovo", "2": "Bac", "3": "Belcista", "4": "Berovo", "5": "Bistrica", "6": "Bitola", "7": "Blatec", "8": "Bogdanci", "9": "Bogomila", "10": "Bogovinje", "11": "Bosilovo", "12": "Brvenica", "13": "Cair", "14": "Capari", "15": "Caska", "16": "Cegrane", "17": "Centar", "18": "Centar Zupa", "19": "Cesinovo", "20": "Cucer-Sandevo", "21": "Debar", "22": "Delcevo", "23": "Delogozdi", "24": "Demir Hisar", "25": "Demir Kapija", "26": "Dobrusevo", "27": "Dolna Banjica", "28": "Dolneni", "29": "Dorce Petrov", "30": "Drugovo", "31": "Dzepciste", "32": "Gazi Baba", "33": "Gevgelija", "34": "Gostivar", "35": "Gradsko", "36": "Ilinden", "37": "Izvor", "38": "Jegunovce", "39": "Kamenjane", "40": "Karbinci", "41": "Karpos", "42": "Kavadarci", "43": "Kicevo", "44": "Kisela Voda", "45": "Klecevce", "46": "Kocani", "47": "Konce", "48": "Kondovo", "49": "Konopiste", "50": "Kosel", "51": "Kratovo", "52": "Kriva Palanka", "53": "Krivogastani", "54": "Krusevo", "55": "Kuklis", "56": "Kukurecani", "57": "Kumanovo", "58": "Labunista", "59": "Lipkovo", "60": "Lozovo", "61": "Lukovo", "62": "Makedonska Kamenica", "63": "Makedonski Brod", "64": "Mavrovi Anovi", "65": "Meseista", "66": "Miravci", "67": "Mogila", "68": "Murtino", "69": "Negotino", "70": "Negotino-Polosko", "71": "Novaci", "72": "Novo Selo", "73": "Oblesevo", "74": "Ohrid", "75": "Orasac", "76": "Orizari", "77": "Oslomej", "78": "Pehcevo", "79": "Petrovec", "80": "Plasnica", "81": "Podares", "82": "Prilep", "83": "Probistip", "84": "Radovis", "85": "Rankovce", "86": "Resen", "87": "Rosoman", "88": "Rostusa", "89": "Samokov", "90": "Saraj", "91": "Sipkovica", "92": "Sopiste", "93": "Sopotnica", "94": "Srbinovo", "95": "Staravina", "96": "Star Dojran", "97": "Staro Nagoricane", "98": "Stip", "99": "Struga", "832": "Strumica", "833": "Studenicani", "834": "Suto Orizari", "835": "Sveti Nikole", "836": "Tearce", "837": "Tetovo", "838": "Topolcani", "839": "Valandovo", "840": "Vasilevo", "875": "Veles", "876": "Velesta", "877": "Vevcani", "878": "Vinica", "879": "Vitoliste", "880": "Vranestica", "881": "Vrapciste", "882": "Vratnica", "883": "Vrutok", "918": "Zajas", "919": "Zelenikovo", "920": "Zelino", "921": "Zitose", "922": "Zletovo", "923": "Zrnovci", "925": "Cair", "926": "Caska", "962": "Debar", "963": "Demir Hisar", "964": "Gostivar", "966": "Kavadarci", "967": "Kumanovo", "968": "Makedonski Brod", "1005": "Ohrid", "1006": "Prilep", "1008": "Dojran", "1009": "Struga", "1010": "Strumica", "1011": "Tetovo", "1012": "Valandovo", "1047": "Veles", "1048": "Aerodrom" }, "ML": { "1": "Bamako", "3": "Kayes", "4": "Mopti", "5": "Segou", "6": "Sikasso", "7": "Koulikoro", "8": "Tombouctou", "9": "Gao", "10": "Kidal" }, "MM": { "1": "Rakhine State", "2": "Chin State", "3": "Irrawaddy", "4": "Kachin State", "5": "Karan State", "6": "Kayah State", "7": "Magwe", "8": "Mandalay", "9": "Pegu", "10": "Sagaing", "11": "Shan State", "12": "Tenasserim", "13": "Mon State", "14": "Rangoon", "17": "Yangon" }, "MN": { "1": "Arhangay", "2": "Bayanhongor", "3": "Bayan-Olgiy", "5": "Darhan", "6": "Dornod", "7": "Dornogovi", "8": "Dundgovi", "9": "Dzavhan", "10": "Govi-Altay", "11": "Hentiy", "12": "Hovd", "13": "Hovsgol", "14": "Omnogovi", "15": "Ovorhangay", "16": "Selenge", "17": "Suhbaatar", "18": "Tov", "19": "Uvs", "20": "Ulaanbaatar", "21": "Bulgan", "22": "Erdenet", "23": "Darhan-Uul", "24": "Govisumber", "25": "Orhon" }, "MO": { "1": "Ilhas", "2": "Macau" }, "MR": { "1": "Hodh Ech Chargui", "2": "Hodh El Gharbi", "3": "Assaba", "4": "Gorgol", "5": "Brakna", "6": "Trarza", "7": "Adrar", "8": "Dakhlet Nouadhibou", "9": "Tagant", "10": "Guidimaka", "11": "Tiris Zemmour", "12": "Inchiri" }, "MS": { "1": "Saint Anthony", "2": "Saint Georges", "3": "Saint Peter" }, "MU": { "12": "Black River", "13": "Flacq", "14": "Grand Port", "15": "Moka", "16": "Pamplemousses", "17": "Plaines Wilhems", "18": "Port Louis", "19": "Riviere du Rempart", "20": "Savanne", "21": "Agalega Islands", "22": "Cargados Carajos", "23": "Rodrigues" }, "MV": { "1": "Seenu", "5": "Laamu", "30": "Alifu", "31": "Baa", "32": "Dhaalu", "33": "Faafu ", "34": "Gaafu Alifu", "35": "Gaafu Dhaalu", "36": "Haa Alifu", "37": "Haa Dhaalu", "38": "Kaafu", "39": "Lhaviyani", "40": "Maale", "41": "Meemu", "42": "Gnaviyani", "43": "Noonu", "44": "Raa", "45": "Shaviyani", "46": "Thaa", "47": "Vaavu" }, "MW": { "2": "Chikwawa", "3": "Chiradzulu", "4": "Chitipa", "5": "Thyolo", "6": "Dedza", "7": "Dowa", "8": "Karonga", "9": "Kasungu", "11": "Lilongwe", "12": "Mangochi", "13": "Mchinji", "15": "Mzimba", "16": "Ntcheu", "17": "Nkhata Bay", "18": "Nkhotakota", "19": "Nsanje", "20": "Ntchisi", "21": "Rumphi", "22": "Salima", "23": "Zomba", "24": "Blantyre", "25": "Mwanza", "26": "Balaka", "27": "Likoma", "28": "Machinga", "29": "Mulanje", "30": "Phalombe" }, "MX": { "1": "Aguascalientes", "2": "Baja California", "3": "Baja California Sur", "4": "Campeche", "5": "Chiapas", "6": "Chihuahua", "7": "Coahuila de Zaragoza", "8": "Colima", "9": "Distrito Federal", "10": "Durango", "11": "Guanajuato", "12": "Guerrero", "13": "Hidalgo", "14": "Jalisco", "15": "Mexico", "16": "Michoacan de Ocampo", "17": "Morelos", "18": "Nayarit", "19": "Nuevo Leon", "20": "Oaxaca", "21": "Puebla", "22": "Queretaro de Arteaga", "23": "Quintana Roo", "24": "San Luis Potosi", "25": "Sinaloa", "26": "Sonora", "27": "Tabasco", "28": "Tamaulipas", "29": "Tlaxcala", "30": "Veracruz-Llave", "31": "Yucatan", "32": "Zacatecas" }, "MY": { "1": "Johor", "2": "Kedah", "3": "Kelantan", "4": "Melaka", "5": "Negeri Sembilan", "6": "Pahang", "7": "Perak", "8": "Perlis", "9": "Pulau Pinang", "11": "Sarawak", "12": "Selangor", "13": "Terengganu", "14": "Kuala Lumpur", "15": "Labuan", "16": "Sabah", "17": "Putrajaya" }, "MZ": { "1": "Cabo Delgado", "2": "Gaza", "3": "Inhambane", "4": "Maputo", "5": "Sofala", "6": "Nampula", "7": "Niassa", "8": "Tete", "9": "Zambezia", "10": "Manica", "11": "Maputo" }, "NA": { "1": "Bethanien", "2": "Caprivi Oos", "3": "Boesmanland", "4": "Gobabis", "5": "Grootfontein", "6": "Kaokoland", "7": "Karibib", "8": "Keetmanshoop", "9": "Luderitz", "10": "Maltahohe", "11": "Okahandja", "12": "Omaruru", "13": "Otjiwarongo", "14": "Outjo", "15": "Owambo", "16": "Rehoboth", "17": "Swakopmund", "18": "Tsumeb", "20": "Karasburg", "21": "Windhoek", "22": "Damaraland", "23": "Hereroland Oos", "24": "Hereroland Wes", "25": "Kavango", "26": "Mariental", "27": "Namaland", "28": "Caprivi", "29": "Erongo", "30": "Hardap", "31": "Karas", "32": "Kunene", "33": "Ohangwena", "34": "Okavango", "35": "Omaheke", "36": "Omusati", "37": "Oshana", "38": "Oshikoto", "39": "Otjozondjupa" }, "NE": { "1": "Agadez", "2": "Diffa", "3": "Dosso", "4": "Maradi", "5": "Niamey", "6": "Tahoua", "7": "Zinder", "8": "Niamey" }, "NG": { "5": "Lagos", "11": "Federal Capital Territory", "16": "Ogun", "21": "Akwa Ibom", "22": "Cross River", "23": "Kaduna", "24": "Katsina", "25": "Anambra", "26": "Benue", "27": "Borno", "28": "Imo", "29": "Kano", "30": "Kwara", "31": "Niger", "32": "Oyo", "35": "Adamawa", "36": "Delta", "37": "Edo", "39": "Jigawa", "40": "Kebbi", "41": "Kogi", "42": "Osun", "43": "Taraba", "44": "Yobe", "45": "Abia", "46": "Bauchi", "47": "Enugu", "48": "Ondo", "49": "Plateau", "50": "Rivers", "51": "Sokoto", "52": "Bayelsa", "53": "Ebonyi", "54": "Ekiti", "55": "Gombe", "56": "Nassarawa", "57": "Zamfara" }, "NI": { "1": "Boaco", "2": "Carazo", "3": "Chinandega", "4": "Chontales", "5": "Esteli", "6": "Granada", "7": "Jinotega", "8": "Leon", "9": "Madriz", "10": "Managua", "11": "Masaya", "12": "Matagalpa", "13": "Nueva Segovia", "14": "Rio San Juan", "15": "Rivas", "16": "Zelaya", "17": "Autonoma Atlantico Norte", "18": "Region Autonoma Atlantico Sur" }, "NL": { "1": "Drenthe", "2": "Friesland", "3": "Gelderland", "4": "Groningen", "5": "Limburg", "6": "Noord-Brabant", "7": "Noord-Holland", "9": "Utrecht", "10": "Zeeland", "11": "Zuid-Holland", "15": "Overijssel", "16": "Flevoland" }, "NO": { "1": "Akershus", "2": "Aust-Agder", "4": "Buskerud", "5": "Finnmark", "6": "Hedmark", "7": "Hordaland", "8": "More og Romsdal", "9": "Nordland", "10": "Nord-Trondelag", "11": "Oppland", "12": "Oslo", "13": "Ostfold", "14": "Rogaland", "15": "Sogn og Fjordane", "16": "Sor-Trondelag", "17": "Telemark", "18": "Troms", "19": "Vest-Agder", "20": "Vestfold" }, "NP": { "1": "Bagmati", "2": "Bheri", "3": "Dhawalagiri", "4": "Gandaki", "5": "Janakpur", "6": "Karnali", "7": "Kosi", "8": "Lumbini", "9": "Mahakali", "10": "Mechi", "11": "Narayani", "12": "Rapti", "13": "Sagarmatha", "14": "Seti" }, "NR": { "1": "Aiwo", "2": "Anabar", "3": "Anetan", "4": "Anibare", "5": "Baiti", "6": "Boe", "7": "Buada", "8": "Denigomodu", "9": "Ewa", "10": "Ijuw", "11": "Meneng", "12": "Nibok", "13": "Uaboe", "14": "Yaren" }, "NZ": { "10": "Chatham Islands", "1010": "Auckland", "1011": "Bay of Plenty", "1012": "Canterbury", "1047": "Gisborne", "1048": "Hawke's Bay", "1049": "Manawatu-Wanganui", "1050": "Marlborough", "1051": "Nelson", "1052": "Northland", "1053": "Otago", "1054": "Southland", "1055": "Taranaki", "1090": "Waikato", "1091": "Wellington", "1092": "West Coast" }, "OM": { "1": "Ad Dakhiliyah", "2": "Al Batinah", "3": "Al Wusta", "4": "Ash Sharqiyah", "5": "Az Zahirah", "6": "Masqat", "7": "Musandam", "8": "Zufar" }, "PA": { "1": "Bocas del Toro", "2": "Chiriqui", "3": "Cocle", "4": "Colon", "5": "Darien", "6": "Herrera", "7": "Los Santos", "8": "Panama", "9": "San Blas", "10": "Veraguas" }, "PE": { "1": "Amazonas", "2": "Ancash", "3": "Apurimac", "4": "Arequipa", "5": "Ayacucho", "6": "Cajamarca", "7": "Callao", "8": "Cusco", "9": "Huancavelica", "10": "Huanuco", "11": "Ica", "12": "Junin", "13": "La Libertad", "14": "Lambayeque", "15": "Lima", "16": "Loreto", "17": "Madre de Dios", "18": "Moquegua", "19": "Pasco", "20": "Piura", "21": "Puno", "22": "San Martin", "23": "Tacna", "24": "Tumbes", "25": "Ucayali" }, "PG": { "1": "Central", "2": "Gulf", "3": "Milne Bay", "4": "Northern", "5": "Southern Highlands", "6": "Western", "7": "North Solomons", "8": "Chimbu", "9": "Eastern Highlands", "10": "East New Britain", "11": "East Sepik", "12": "Madang", "13": "Manus", "14": "Morobe", "15": "New Ireland", "16": "Western Highlands", "17": "West New Britain", "18": "Sandaun", "19": "Enga", "20": "National Capital" }, "PH": { "1": "Abra", "2": "Agusan del Norte", "3": "Agusan del Sur", "4": "Aklan", "5": "Albay", "6": "Antique", "7": "Bataan", "8": "Batanes", "9": "Batangas", "10": "Benguet", "11": "Bohol", "12": "Bukidnon", "13": "Bulacan", "14": "Cagayan", "15": "Camarines Norte", "16": "Camarines Sur", "17": "Camiguin", "18": "Capiz", "19": "Catanduanes", "20": "Cavite", "21": "Cebu", "22": "Basilan", "23": "Eastern Samar", "24": "Davao", "25": "Davao del Sur", "26": "Davao Oriental", "27": "Ifugao", "28": "Ilocos Norte", "29": "Ilocos Sur", "30": "Iloilo", "31": "Isabela", "32": "Kalinga-Apayao", "33": "Laguna", "34": "Lanao del Norte", "35": "Lanao del Sur", "36": "La Union", "37": "Leyte", "38": "Marinduque", "39": "Masbate", "40": "Mindoro Occidental", "41": "Mindoro Oriental", "42": "Misamis Occidental", "43": "Misamis Oriental", "44": "Mountain", "45": "Negros Occidental", "46": "Negros Oriental", "47": "Nueva Ecija", "48": "Nueva Vizcaya", "49": "Palawan", "50": "Pampanga", "51": "Pangasinan", "53": "Rizal", "54": "Romblon", "55": "Samar", "56": "Maguindanao", "57": "North Cotabato", "58": "Sorsogon", "59": "Southern Leyte", "60": "Sulu", "61": "Surigao del Norte", "62": "Surigao del Sur", "63": "Tarlac", "64": "Zambales", "65": "Zamboanga del Norte", "66": "Zamboanga del Sur", "67": "Northern Samar", "68": "Quirino", "69": "Siquijor", "70": "South Cotabato", "71": "Sultan Kudarat", "72": "Tawitawi", "832": "Angeles", "833": "Bacolod", "834": "Bago", "835": "Baguio", "836": "Bais", "837": "Basilan City", "838": "Batangas City", "839": "Butuan", "840": "Cabanatuan", "875": "Cadiz", "876": "Cagayan de Oro", "877": "Calbayog", "878": "Caloocan", "879": "Canlaon", "880": "Cavite City", "881": "Cebu City", "882": "Cotabato", "883": "Dagupan", "918": "Danao", "919": "Dapitan", "920": "Davao City", "921": "Dipolog", "922": "Dumaguete", "923": "General Santos", "924": "Gingoog", "925": "Iligan", "926": "Iloilo City", "961": "Iriga", "962": "La Carlota", "963": "Laoag", "964": "Lapu-Lapu", "965": "Legaspi", "966": "Lipa", "967": "Lucena", "968": "Mandaue", "969": "Manila", "1004": "Marawi", "1005": "Naga", "1006": "Olongapo", "1007": "Ormoc", "1008": "Oroquieta", "1009": "Ozamis", "1010": "Pagadian", "1011": "Palayan", "1012": "Pasay", "1047": "Puerto Princesa", "1048": "Quezon City", "1049": "Roxas", "1050": "San Carlos", "1051": "San Carlos", "1052": "San Jose", "1053": "San Pablo", "1054": "Silay", "1055": "Surigao", "1090": "Tacloban", "1091": "Tagaytay", "1092": "Tagbilaran", "1093": "Tangub", "1094": "Toledo", "1095": "Trece Martires", "1096": "Zamboanga", "1097": "Aurora", "1134": "Quezon", "1135": "Negros Occidental", "1141": "Biliran", "1181": "Compostela Valley", "1182": "Davao del Norte", "1221": "Guimaras", "1222": "Himamaylan", "1225": "Kalinga", "1262": "Las Pinas", "1266": "Malabon", "1267": "Malaybalay", "1308": "Muntinlupa", "1309": "Navotas", "1311": "Paranaque", "1313": "Passi", "1477": "Zambales", "1352": "San Jose del Monte", "1353": "San Juan", "1355": "Santiago", "1356": "Sarangani", "1391": "Sipalay", "1393": "Surigao del Norte", "1478": "Zamboanga" }, "PK": { "1": "Federally Administered Tribal Areas", "2": "Balochistan", "3": "North-West Frontier", "4": "Punjab", "5": "Sindh", "6": "Azad Kashmir", "7": "Northern Areas", "8": "Islamabad" }, "PL": { "72": "Dolnoslaskie", "73": "Kujawsko-Pomorskie", "74": "Lodzkie", "75": "Lubelskie", "76": "Lubuskie", "77": "Malopolskie", "78": "Mazowieckie", "79": "Opolskie", "80": "Podkarpackie", "81": "Podlaskie", "82": "Pomorskie", "83": "Slaskie", "84": "Swietokrzyskie", "85": "Warminsko-Mazurskie", "86": "Wielkopolskie", "87": "Zachodniopomorskie" }, "PS": { "1131": "Gaza", "1798": "West Bank" }, "PT": { "2": "Aveiro", "3": "Beja", "4": "Braga", "5": "Braganca", "6": "Castelo Branco", "7": "Coimbra", "8": "Evora", "9": "Faro", "10": "Madeira", "11": "Guarda", "13": "Leiria", "14": "Lisboa", "16": "Portalegre", "17": "Porto", "18": "Santarem", "19": "Setubal", "20": "Viana do Castelo", "21": "Vila Real", "22": "Viseu", "23": "Azores" }, "PY": { "1": "Alto Parana", "2": "Amambay", "4": "Caaguazu", "5": "Caazapa", "6": "Central", "7": "Concepcion", "8": "Cordillera", "10": "Guaira", "11": "Itapua", "12": "Misiones", "13": "Neembucu", "15": "Paraguari", "16": "Presidente Hayes", "17": "San Pedro", "19": "Canindeyu", "22": "Asuncion", "23": "Alto Paraguay", "24": "Boqueron" }, "QA": { "1": "Ad Dawhah", "2": "Al Ghuwariyah", "3": "Al Jumaliyah", "4": "Al Khawr", "5": "Al Wakrah Municipality", "6": "Ar Rayyan", "8": "Madinat ach Shamal", "9": "Umm Salal", "10": "Al Wakrah", "11": "Jariyan al Batnah", "12": "Umm Sa'id" }, "RO": { "1": "Alba", "2": "Arad", "3": "Arges", "4": "Bacau", "5": "Bihor", "6": "Bistrita-Nasaud", "7": "Botosani", "8": "Braila", "9": "Brasov", "10": "Bucuresti", "11": "Buzau", "12": "Caras-Severin", "13": "Cluj", "14": "Constanta", "15": "Covasna", "16": "Dambovita", "17": "Dolj", "18": "Galati", "19": "Gorj", "20": "Harghita", "21": "Hunedoara", "22": "Ialomita", "23": "Iasi", "25": "Maramures", "26": "Mehedinti", "27": "Mures", "28": "Neamt", "29": "Olt", "30": "Prahova", "31": "Salaj", "32": "Satu Mare", "33": "Sibiu", "34": "Suceava", "35": "Teleorman", "36": "Timis", "37": "Tulcea", "38": "Vaslui", "39": "Valcea", "40": "Vrancea", "41": "Calarasi", "42": "Giurgiu", "43": "Ilfov" }, "RS": { "1": "Kosovo", "2": "Vojvodina" }, "RU": { "1": "Adygeya", "2": "Aginsky Buryatsky AO", "3": "Gorno-Altay", "4": "Altaisky krai", "5": "Amur", "6": "Arkhangel'sk", "7": "Astrakhan'", "8": "Bashkortostan", "9": "Belgorod", "10": "Bryansk", "11": "Buryat", "12": "Chechnya", "13": "Chelyabinsk", "14": "Chita", "15": "Chukot", "16": "Chuvashia", "17": "Dagestan", "18": "Evenk", "19": "Ingush", "20": "Irkutsk", "21": "Ivanovo", "22": "Kabardin-Balkar", "23": "Kaliningrad", "24": "Kalmyk", "25": "Kaluga", "26": "Kamchatka", "27": "Karachay-Cherkess", "28": "Karelia", "29": "Kemerovo", "30": "Khabarovsk", "31": "Khakass", "32": "Khanty-Mansiy", "33": "Kirov", "34": "Komi", "36": "Koryak", "37": "Kostroma", "38": "Krasnodar", "39": "Krasnoyarsk", "40": "Kurgan", "41": "Kursk", "42": "Leningrad", "43": "Lipetsk", "44": "Magadan", "45": "Mariy-El", "46": "Mordovia", "47": "Moskva", "48": "Moscow City", "49": "Murmansk", "50": "Nenets", "51": "Nizhegorod", "52": "Novgorod", "53": "Novosibirsk", "54": "Omsk", "55": "Orenburg", "56": "Orel", "57": "Penza", "58": "Perm'", "59": "Primor'ye", "60": "Pskov", "61": "Rostov", "62": "Ryazan'", "63": "Sakha", "64": "Sakhalin", "65": "Samara", "66": "Saint Petersburg City", "67": "Saratov", "68": "North Ossetia", "69": "Smolensk", "70": "Stavropol'", "71": "Sverdlovsk", "72": "Tambovskaya oblast", "73": "Tatarstan", "74": "Taymyr", "75": "Tomsk", "76": "Tula", "77": "Tver'", "78": "Tyumen'", "79": "Tuva", "80": "Udmurt", "81": "Ul'yanovsk", "83": "Vladimir", "84": "Volgograd", "85": "Vologda", "86": "Voronezh", "87": "Yamal-Nenets", "88": "Yaroslavl'", "89": "Yevrey", "90": "Permskiy Kray", "91": "Krasnoyarskiy Kray", "92": "Kamchatskiy Kray", "93": "Zabaykal'skiy Kray" }, "RW": { "1": "Butare", "6": "Gitarama", "7": "Kibungo", "9": "Kigali", "11": "Est", "12": "Kigali", "13": "Nord", "14": "Ouest", "15": "Sud" }, "SA": { "2": "Al Bahah", "5": "Al Madinah", "6": "Ash Sharqiyah", "8": "Al Qasim", "10": "Ar Riyad", "11": "Asir Province", "13": "Ha'il", "14": "Makkah", "15": "Al Hudud ash Shamaliyah", "16": "Najran", "17": "Jizan", "19": "Tabuk", "20": "Al Jawf" }, "SB": { "3": "Malaita", "6": "Guadalcanal", "7": "Isabel", "8": "Makira", "9": "Temotu", "10": "Central", "11": "Western", "12": "Choiseul", "13": "Rennell and Bellona" }, "SC": { "1": "Anse aux Pins", "2": "Anse Boileau", "3": "Anse Etoile", "4": "Anse Louis", "5": "Anse Royale", "6": "Baie Lazare", "7": "Baie Sainte Anne", "8": "Beau Vallon", "9": "Bel Air", "10": "Bel Ombre", "11": "Cascade", "12": "Glacis", "13": "Grand' Anse", "14": "Grand' Anse", "15": "La Digue", "16": "La Riviere Anglaise", "17": "Mont Buxton", "18": "Mont Fleuri", "19": "Plaisance", "20": "Pointe La Rue", "21": "Port Glaud", "22": "Saint Louis", "23": "Takamaka" }, "SD": { "27": "Al Wusta", "28": "Al Istiwa'iyah", "29": "Al Khartum", "30": "Ash Shamaliyah", "31": "Ash Sharqiyah", "32": "Bahr al Ghazal", "33": "Darfur", "34": "Kurdufan", "35": "Upper Nile", "40": "Al Wahadah State", "44": "Central Equatoria State", "49": "Southern Darfur", "50": "Southern Kordofan", "52": "Kassala", "53": "River Nile", "55": "Northern Darfur" }, "SE": { "2": "Blekinge Lan", "3": "Gavleborgs Lan", "5": "Gotlands Lan", "6": "Hallands Lan", "7": "Jamtlands Lan", "8": "Jonkopings Lan", "9": "Kalmar Lan", "10": "Dalarnas Lan", "12": "Kronobergs Lan", "14": "Norrbottens Lan", "15": "Orebro Lan", "16": "Ostergotlands Lan", "18": "Sodermanlands Lan", "21": "Uppsala Lan", "22": "Varmlands Lan", "23": "Vasterbottens Lan", "24": "Vasternorrlands Lan", "25": "Vastmanlands Lan", "26": "Stockholms Lan", "27": "Skane Lan", "28": "Vastra Gotaland" }, "SH": { "1": "Ascension", "2": "Saint Helena", "3": "Tristan da Cunha" }, "SI": { "1": "Ajdovscina Commune", "2": "Beltinci Commune", "3": "Bled Commune", "4": "Bohinj Commune", "5": "Borovnica Commune", "6": "Bovec Commune", "7": "Brda Commune", "8": "Brezice Commune", "9": "Brezovica Commune", "11": "Celje Commune", "12": "Cerklje na Gorenjskem Commune", "13": "Cerknica Commune", "14": "Cerkno Commune", "15": "Crensovci Commune", "16": "Crna na Koroskem Commune", "17": "Crnomelj Commune", "19": "Divaca Commune", "20": "Dobrepolje Commune", "22": "Dol pri Ljubljani Commune", "24": "Dornava Commune", "25": "Dravograd Commune", "26": "Duplek Commune", "27": "Gorenja vas-Poljane Commune", "28": "Gorisnica Commune", "29": "Gornja Radgona Commune", "30": "Gornji Grad Commune", "31": "Gornji Petrovci Commune", "32": "Grosuplje Commune", "34": "Hrastnik Commune", "35": "Hrpelje-Kozina Commune", "36": "Idrija Commune", "37": "Ig Commune", "38": "Ilirska Bistrica Commune", "39": "Ivancna Gorica Commune", "40": "Izola-Isola Commune", "42": "Jursinci Commune", "44": "Kanal Commune", "45": "Kidricevo Commune", "46": "Kobarid Commune", "47": "Kobilje Commune", "49": "Komen Commune", "50": "Koper-Capodistria Urban Commune", "51": "Kozje Commune", "52": "Kranj Commune", "53": "Kranjska Gora Commune", "54": "Krsko Commune", "55": "Kungota Commune", "57": "Lasko Commune", "61": "Ljubljana Urban Commune", "62": "Ljubno Commune", "64": "Logatec Commune", "66": "Loski Potok Commune", "68": "Lukovica Commune", "71": "Medvode Commune", "72": "Menges Commune", "73": "Metlika Commune", "74": "Mezica Commune", "76": "Mislinja Commune", "77": "Moravce Commune", "78": "Moravske Toplice Commune", "79": "Mozirje Commune", "80": "Murska Sobota Urban Commune", "81": "Muta Commune", "82": "Naklo Commune", "83": "Nazarje Commune", "84": "Nova Gorica Urban Commune", "86": "Odranci Commune", "87": "Ormoz Commune", "88": "Osilnica Commune", "89": "Pesnica Commune", "91": "Pivka Commune", "92": "Podcetrtek Commune", "94": "Postojna Commune", "97": "Puconci Commune", "98": "Race-Fram Commune", "99": "Radece Commune", "832": "Radenci Commune", "833": "Radlje ob Dravi Commune", "834": "Radovljica Commune", "837": "Rogasovci Commune", "838": "Rogaska Slatina Commune", "839": "Rogatec Commune", "875": "Semic Commune", "876": "Sencur Commune", "877": "Sentilj Commune", "878": "Sentjernej Commune", "880": "Sevnica Commune", "881": "Sezana Commune", "882": "Skocjan Commune", "883": "Skofja Loka Commune", "918": "Skofljica Commune", "919": "Slovenj Gradec Urban Commune", "921": "Slovenske Konjice Commune", "922": "Smarje pri Jelsah Commune", "923": "Smartno ob Paki Commune", "924": "Sostanj Commune", "925": "Starse Commune", "926": "Store Commune", "961": "Sveti Jurij Commune", "962": "Tolmin Commune", "963": "Trbovlje Commune", "964": "Trebnje Commune", "965": "Trzic Commune", "966": "Turnisce Commune", "967": "Velenje Urban Commune", "968": "Velike Lasce Commune", "1004": "Vipava Commune", "1005": "Vitanje Commune", "1006": "Vodice Commune", "1008": "Vrhnika Commune", "1009": "Vuzenica Commune", "1010": "Zagorje ob Savi Commune", "1012": "Zavrc Commune", "1047": "Zelezniki Commune", "1048": "Ziri Commune", "1049": "Zrece Commune", "1050": "Benedikt Commune", "1051": "Bistrica ob Sotli Commune", "1052": "Bloke Commune", "1053": "Braslovce Commune", "1054": "Cankova Commune", "1055": "Cerkvenjak Commune", "1090": "Destrnik Commune", "1091": "Dobje Commune", "1092": "Dobrna Commune", "1093": "Dobrova-Horjul-Polhov Gradec Commune", "1094": "Dobrovnik-Dobronak Commune", "1095": "Dolenjske Toplice Commune", "1096": "Domzale Commune", "1097": "Grad Commune", "1098": "Hajdina Commune", "1133": "Hoce-Slivnica Commune", "1134": "Hodos-Hodos Commune", "1135": "Horjul Commune", "1136": "Jesenice Commune", "1137": "Jezersko Commune", "1138": "Kamnik Commune", "1139": "Kocevje Commune", "1140": "Komenda Commune", "1141": "Kostel Commune", "1176": "Krizevci Commune", "1177": "Kuzma Commune", "1178": "Lenart Commune", "1179": "Lendava-Lendva Commune", "1180": "Litija Commune", "1181": "Ljutomer Commune", "1182": "Loska Dolina Commune", "1183": "Lovrenc na Pohorju Commune", "1184": "Luce Commune", "1219": "Majsperk Commune", "1220": "Maribor Commune", "1221": "Markovci Commune", "1222": "Miklavz na Dravskem polju Commune", "1223": "Miren-Kostanjevica Commune", "1224": "Mirna Pec Commune", "1225": "Novo mesto Urban Commune", "1226": "Oplotnica Commune", "1227": "Piran-Pirano Commune", "1262": "Podlehnik Commune", "1263": "Podvelka Commune", "1264": "Polzela Commune", "1265": "Prebold Commune", "1266": "Preddvor Commune", "1267": "Prevalje Commune", "1268": "Ptuj Urban Commune", "1269": "Ravne na Koroskem Commune", "1270": "Razkrizje Commune", "1305": "Ribnica Commune", "1306": "Ribnica na Pohorju Commune", "1307": "Ruse Commune", "1308": "Salovci Commune", "1309": "Selnica ob Dravi Commune", "1310": "Sempeter-Vrtojba Commune", "1311": "Sentjur pri Celju Commune", "1312": "Slovenska Bistrica Commune", "1313": "Smartno pri Litiji Commune", "1348": "Sodrazica Commune", "1349": "Solcava Commune", "1350": "Sveta Ana Commune", "1351": "Sveti Andraz v Slovenskih goricah Commune", "1352": "Tabor Commune", "1353": "Tisina Commune", "1354": "Trnovska vas Commune", "1355": "Trzin Commune", "1356": "Velika Polana Commune", "1391": "Verzej Commune", "1392": "Videm Commune", "1393": "Vojnik Commune", "1394": "Vransko Commune", "1395": "Zalec Commune", "1396": "Zetale Commune", "1397": "Zirovnica Commune", "1398": "Zuzemberk Commune", "1399": "Apace Commune", "1434": "Cirkulane Commune", "1435": "Gorje", "1436": "Kostanjevica na Krki", "1437": "Log-Dragomer", "1438": "Makole", "1439": "Mirna", "1440": "Mokronog-Trebelno", "1441": "Poljcane", "1442": "Recica ob Savinji", "1477": "Rence-Vogrsko", "1478": "Sentrupert", "1479": "Smarjesk Toplice", "1480": "Sredisce ob Dravi", "1481": "Straza", "1483": "Sveti Jurij v Slovenskih Goricah" }, "SK": { "1": "Banska Bystrica", "2": "Bratislava", "3": "Kosice", "4": "Nitra", "5": "Presov", "6": "Trencin", "7": "Trnava", "8": "Zilina" }, "SL": { "1": "Eastern", "2": "Northern", "3": "Southern", "4": "Western Area" }, "SM": { "1": "Acquaviva", "2": "Chiesanuova", "3": "Domagnano", "4": "Faetano", "5": "Fiorentino", "6": "Borgo Maggiore", "7": "San Marino", "8": "Monte Giardino", "9": "Serravalle" }, "SN": { "1": "Dakar", "3": "Diourbel", "5": "Tambacounda", "7": "Thies", "9": "Fatick", "10": "Kaolack", "11": "Kolda", "12": "Ziguinchor", "13": "Louga", "14": "Saint-Louis", "15": "Matam" }, "SO": { "1": "Bakool", "2": "Banaadir", "3": "Bari", "4": "Bay", "5": "Galguduud", "6": "Gedo", "7": "Hiiraan", "8": "Jubbada Dhexe", "9": "Jubbada Hoose", "10": "Mudug", "11": "Nugaal", "12": "Sanaag", "13": "Shabeellaha Dhexe", "14": "Shabeellaha Hoose", "16": "Woqooyi Galbeed", "18": "Nugaal", "19": "Togdheer", "20": "Woqooyi Galbeed", "21": "Awdal", "22": "Sool" }, "SR": { "10": "Brokopondo", "11": "Commewijne", "12": "Coronie", "13": "Marowijne", "14": "Nickerie", "15": "Para", "16": "Paramaribo", "17": "Saramacca", "18": "Sipaliwini", "19": "Wanica" }, "SS": { "1": "Central Equatoria", "2": "Eastern Equatoria", "3": "Jonglei", "4": "Lakes", "5": "Northern Bahr el Ghazal", "6": "Unity", "7": "Upper Nile", "8": "Warrap", "9": "Western Bahr el Ghazal", "10": "Western Equatoria" }, "ST": { "1": "Principe", "2": "Sao Tome" }, "SV": { "1": "Ahuachapan", "2": "Cabanas", "3": "Chalatenango", "4": "Cuscatlan", "5": "La Libertad", "6": "La Paz", "7": "La Union", "8": "Morazan", "9": "San Miguel", "10": "San Salvador", "11": "Santa Ana", "12": "San Vicente", "13": "Sonsonate", "14": "Usulutan" }, "SY": { "1": "Al Hasakah", "2": "Al Ladhiqiyah", "3": "Al Qunaytirah", "4": "Ar Raqqah", "5": "As Suwayda'", "6": "Dar", "7": "Dayr az Zawr", "8": "Rif Dimashq", "9": "Halab", "10": "Hamah", "11": "Hims", "12": "Idlib", "13": "Dimashq", "14": "Tartus" }, "SZ": { "1": "Hhohho", "2": "Lubombo", "3": "Manzini", "4": "Shiselweni", "5": "Praslin" }, "TD": { "1": "Batha", "2": "Biltine", "3": "Borkou-Ennedi-Tibesti", "4": "Chari-Baguirmi", "5": "Guera", "6": "Kanem", "7": "Lac", "8": "Logone Occidental", "9": "Logone Oriental", "10": "Mayo-Kebbi", "11": "Moyen-Chari", "12": "Ouaddai", "13": "Salamat", "14": "Tandjile" }, "TG": { "22": "Centrale", "23": "Kara", "24": "Maritime", "25": "Plateaux", "26": "Savanes" }, "TH": { "1": "Mae Hong Son", "2": "Chiang Mai", "3": "Chiang Rai", "4": "Nan", "5": "Lamphun", "6": "Lampang", "7": "Phrae", "8": "Tak", "9": "Sukhothai", "10": "Uttaradit", "11": "Kamphaeng Phet", "12": "Phitsanulok", "13": "Phichit", "14": "Phetchabun", "15": "Uthai Thani", "16": "Nakhon Sawan", "17": "Nong Khai", "18": "Loei", "20": "Sakon Nakhon", "21": "Nakhon Phanom", "22": "Khon Kaen", "23": "Kalasin", "24": "Maha Sarakham", "25": "Roi Et", "26": "Chaiyaphum", "27": "Nakhon Ratchasima", "28": "Buriram", "29": "Surin", "30": "Sisaket", "31": "Narathiwat", "32": "Chai Nat", "33": "Sing Buri", "34": "Lop Buri", "35": "Ang Thong", "36": "Phra Nakhon Si Ayutthaya", "37": "Saraburi", "38": "Nonthaburi", "39": "Pathum Thani", "40": "Krung Thep", "41": "Phayao", "42": "Samut Prakan", "43": "Nakhon Nayok", "44": "Chachoengsao", "45": "Prachin Buri", "46": "Chon Buri", "47": "Rayong", "48": "Chanthaburi", "49": "Trat", "50": "Kanchanaburi", "51": "Suphan Buri", "52": "Ratchaburi", "53": "Nakhon Pathom", "54": "Samut Songkhram", "55": "Samut Sakhon", "56": "Phetchaburi", "57": "Prachuap Khiri Khan", "58": "Chumphon", "59": "Ranong", "60": "Surat Thani", "61": "Phangnga", "62": "Phuket", "63": "Krabi", "64": "Nakhon Si Thammarat", "65": "Trang", "66": "Phatthalung", "67": "Satun", "68": "Songkhla", "69": "Pattani", "70": "Yala", "71": "Ubon Ratchathani", "72": "Yasothon", "73": "Nakhon Phanom", "74": "Prachin Buri", "75": "Ubon Ratchathani", "76": "Udon Thani", "77": "Amnat Charoen", "78": "Mukdahan", "79": "Nong Bua Lamphu", "80": "Sa Kaeo", "81": "Bueng Kan" }, "TJ": { "1": "Kuhistoni Badakhshon", "2": "Khatlon", "3": "Sughd", "4": "Dushanbe", "5": "Nohiyahoi Tobei Jumhuri" }, "TL": { "6": "Dili" }, "TM": { "1": "Ahal", "2": "Balkan", "3": "Dashoguz", "4": "Lebap", "5": "Mary" }, "TN": { "2": "Kasserine", "3": "Kairouan", "6": "Jendouba", "10": "Qafsah", "14": "El Kef", "15": "Al Mahdia", "16": "Al Munastir", "17": "Bajah", "18": "Bizerte", "19": "Nabeul", "22": "Siliana", "23": "Sousse", "27": "Ben Arous", "28": "Madanin", "29": "Gabes", "31": "Kebili", "32": "Sfax", "33": "Sidi Bou Zid", "34": "Tataouine", "35": "Tozeur", "36": "Tunis", "37": "Zaghouan", "38": "Aiana", "39": "Manouba" }, "TO": { "1": "Ha", "2": "Tongatapu", "3": "Vava" }, "TR": { "2": "Adiyaman", "3": "Afyonkarahisar", "4": "Agri", "5": "Amasya", "7": "Antalya", "8": "Artvin", "9": "Aydin", "10": "Balikesir", "11": "Bilecik", "12": "Bingol", "13": "Bitlis", "14": "Bolu", "15": "Burdur", "16": "Bursa", "17": "Canakkale", "19": "Corum", "20": "Denizli", "21": "Diyarbakir", "22": "Edirne", "23": "Elazig", "24": "Erzincan", "25": "Erzurum", "26": "Eskisehir", "28": "Giresun", "31": "Hatay", "32": "Mersin", "33": "Isparta", "34": "Istanbul", "35": "Izmir", "37": "Kastamonu", "38": "Kayseri", "39": "Kirklareli", "40": "Kirsehir", "41": "Kocaeli", "43": "Kutahya", "44": "Malatya", "45": "Manisa", "46": "Kahramanmaras", "48": "Mugla", "49": "Mus", "50": "Nevsehir", "52": "Ordu", "53": "Rize", "54": "Sakarya", "55": "Samsun", "57": "Sinop", "58": "Sivas", "59": "Tekirdag", "60": "Tokat", "61": "Trabzon", "62": "Tunceli", "63": "Sanliurfa", "64": "Usak", "65": "Van", "66": "Yozgat", "68": "Ankara", "69": "Gumushane", "70": "Hakkari", "71": "Konya", "72": "Mardin", "73": "Nigde", "74": "Siirt", "75": "Aksaray", "76": "Batman", "77": "Bayburt", "78": "Karaman", "79": "Kirikkale", "80": "Sirnak", "81": "Adana", "82": "Cankiri", "83": "Gaziantep", "84": "Kars", "85": "Zonguldak", "86": "Ardahan", "87": "Bartin", "88": "Igdir", "89": "Karabuk", "90": "Kilis", "91": "Osmaniye", "92": "Yalova", "93": "Duzce" }, "TT": { "1": "Arima", "2": "Caroni", "3": "Mayaro", "4": "Nariva", "5": "Port-of-Spain", "6": "Saint Andrew", "7": "Saint David", "8": "Saint George", "9": "Saint Patrick", "10": "San Fernando", "11": "Tobago", "12": "Victoria" }, "TW": { "1": "Fu-chien", "2": "Kao-hsiung", "3": "T'ai-pei", "4": "T'ai-wan" }, "TZ": { "2": "Pwani", "3": "Dodoma", "4": "Iringa", "5": "Kigoma", "6": "Kilimanjaro", "7": "Lindi", "8": "Mara", "9": "Mbeya", "10": "Morogoro", "11": "Mtwara", "12": "Mwanza", "13": "Pemba North", "14": "Ruvuma", "15": "Shinyanga", "16": "Singida", "17": "Tabora", "18": "Tanga", "19": "Kagera", "20": "Pemba South", "21": "Zanzibar Central", "22": "Zanzibar North", "23": "Dar es Salaam", "24": "Rukwa", "25": "Zanzibar Urban", "26": "Arusha", "27": "Manyara" }, "UA": { "1": "Cherkas'ka Oblast'", "2": "Chernihivs'ka Oblast'", "3": "Chernivets'ka Oblast'", "4": "Dnipropetrovs'ka Oblast'", "5": "Donets'ka Oblast'", "6": "Ivano-Frankivs'ka Oblast'", "7": "Kharkivs'ka Oblast'", "8": "Khersons'ka Oblast'", "9": "Khmel'nyts'ka Oblast'", "10": "Kirovohrads'ka Oblast'", "11": "Krym", "12": "Kyyiv", "13": "Kyyivs'ka Oblast'", "14": "Luhans'ka Oblast'", "15": "L'vivs'ka Oblast'", "16": "Mykolayivs'ka Oblast'", "17": "Odes'ka Oblast'", "18": "Poltavs'ka Oblast'", "19": "Rivnens'ka Oblast'", "20": "Sevastopol'", "21": "Sums'ka Oblast'", "22": "Ternopil's'ka Oblast'", "23": "Vinnyts'ka Oblast'", "24": "Volyns'ka Oblast'", "25": "Zakarpats'ka Oblast'", "26": "Zaporiz'ka Oblast'", "27": "Zhytomyrs'ka Oblast'" }, "UG": { "26": "Apac", "28": "Bundibugyo", "29": "Bushenyi", "30": "Gulu", "31": "Hoima", "33": "Jinja", "36": "Kalangala", "37": "Kampala", "38": "Kamuli", "39": "Kapchorwa", "40": "Kasese", "41": "Kibale", "42": "Kiboga", "43": "Kisoro", "45": "Kotido", "46": "Kumi", "47": "Lira", "50": "Masindi", "52": "Mbarara", "56": "Mubende", "58": "Nebbi", "59": "Ntungamo", "60": "Pallisa", "61": "Rakai", "65": "Adjumani", "66": "Bugiri", "67": "Busia", "69": "Katakwi", "70": "Luwero", "71": "Masaka", "72": "Moyo", "73": "Nakasongola", "74": "Sembabule", "76": "Tororo", "77": "Arua", "78": "Iganga", "79": "Kabarole", "80": "Kaberamaido", "81": "Kamwenge", "82": "Kanungu", "83": "Kayunga", "84": "Kitgum", "85": "Kyenjojo", "86": "Mayuge", "87": "Mbale", "88": "Moroto", "89": "Mpigi", "90": "Mukono", "91": "Nakapiripirit", "92": "Pader", "93": "Rukungiri", "94": "Sironko", "95": "Soroti", "96": "Wakiso", "97": "Yumbe" }, "US": { "848": "Armed Forces Americas", "852": "Armed Forces Europe", "858": "Alaska", "859": "Alabama", "863": "Armed Forces Pacific", "865": "Arkansas", "866": "American Samoa", "873": "Arizona", "934": "California", "948": "Colorado", "953": "Connecticut", "979": "District of Columbia", "981": "Delaware", "1074": "Florida", "1075": "Federated States of Micronesia", "1106": "Georgia", "1126": "Guam", "1157": "Hawaii", "1192": "Iowa", "1195": "Idaho", "1203": "Illinois", "1205": "Indiana", "1296": "Kansas", "1302": "Kentucky", "1321": "Louisiana", "1364": "Massachusetts", "1367": "Maryland", "1368": "Maine", "1371": "Marshall Islands", "1372": "Michigan", "1377": "Minnesota", "1378": "Missouri", "1379": "Northern Mariana Islands", "1382": "Mississippi", "1383": "Montana", "1409": "North Carolina", "1410": "North Dakota", "1411": "Nebraska", "1414": "New Hampshire", "1416": "New Jersey", "1419": "New Mexico", "1428": "Nevada", "1431": "New York", "1457": "Ohio", "1460": "Oklahoma", "1467": "Oregon", "1493": "Pennsylvania", "1515": "Palau", "1587": "Rhode Island", "1624": "South Carolina", "1625": "South Dakota", "1678": "Tennessee", "1688": "Texas", "1727": "Utah", "1751": "Virginia", "1759": "Virgin Islands", "1770": "Vermont", "1794": "Washington", "1802": "Wisconsin", "1815": "West Virginia", "1818": "Wyoming" }, "UY": { "1": "Artigas", "2": "Canelones", "3": "Cerro Largo", "4": "Colonia", "5": "Durazno", "6": "Flores", "7": "Florida", "8": "Lavalleja", "9": "Maldonado", "10": "Montevideo", "11": "Paysandu", "12": "Rio Negro", "13": "Rivera", "14": "Rocha", "15": "Salto", "16": "San Jose", "17": "Soriano", "18": "Tacuarembo", "19": "Treinta y Tres" }, "UZ": { "1": "Andijon", "2": "Bukhoro", "3": "Farghona", "4": "Jizzakh", "5": "Khorazm", "6": "Namangan", "7": "Nawoiy", "8": "Qashqadaryo", "9": "Qoraqalpoghiston", "10": "Samarqand", "11": "Sirdaryo", "12": "Surkhondaryo", "13": "Toshkent", "14": "Toshkent", "15": "Jizzax" }, "VC": { "1": "Charlotte", "2": "Saint Andrew", "3": "Saint David", "4": "Saint George", "5": "Saint Patrick", "6": "Grenadines" }, "VE": { "1": "Amazonas", "2": "Anzoategui", "3": "Apure", "4": "Aragua", "5": "Barinas", "6": "Bolivar", "7": "Carabobo", "8": "Cojedes", "9": "Delta Amacuro", "11": "Falcon", "12": "Guarico", "13": "Lara", "14": "Merida", "15": "Miranda", "16": "Monagas", "17": "Nueva Esparta", "18": "Portuguesa", "19": "Sucre", "20": "Tachira", "21": "Trujillo", "22": "Yaracuy", "23": "Zulia", "24": "Dependencias Federales", "25": "Distrito Federal", "26": "Vargas" }, "VN": { "1": "An Giang", "3": "Ben Tre", "5": "Cao Bang", "9": "Dong Thap", "13": "Hai Phong", "20": "Ho Chi Minh", "21": "Kien Giang", "23": "Lam Dong", "24": "Long An", "30": "Quang Ninh", "32": "Son La", "33": "Tay Ninh", "34": "Thanh Hoa", "35": "Thai Binh", "37": "Tien Giang", "39": "Lang Son", "43": "Dong Nai", "44": "Ha Noi", "45": "Ba Ria-Vung Tau", "46": "Binh Dinh", "47": "Binh Thuan", "49": "Gia Lai", "50": "Ha Giang", "52": "Ha Tinh", "53": "Hoa Binh", "54": "Khanh Hoa", "55": "Kon Tum", "58": "Nghe An", "59": "Ninh Binh", "60": "Ninh Thuan", "61": "Phu Yen", "62": "Quang Binh", "63": "Quang Ngai", "64": "Quang Tri", "65": "Soc Trang", "66": "Thua Thien-Hue", "67": "Tra Vinh", "68": "Tuyen Quang", "69": "Vinh Long", "70": "Yen Bai", "71": "Bac Giang", "72": "Bac Kan", "73": "Bac Lieu", "74": "Bac Ninh", "75": "Binh Duong", "76": "Binh Phuoc", "77": "Ca Mau", "78": "Da Nang", "79": "Hai Duong", "80": "Ha Nam", "81": "Hung Yen", "82": "Nam Dinh", "83": "Phu Tho", "84": "Quang Nam", "85": "Thai Nguyen", "86": "Vinh Phuc", "87": "Can Tho", "88": "Dac Lak", "89": "Lai Chau", "90": "Lao Cai", "91": "Dak Nong", "92": "Dien Bien", "93": "Hau Giang" }, "VU": { "5": "Ambrym", "6": "Aoba", "7": "Torba", "8": "Efate", "9": "Epi", "10": "Malakula", "11": "Paama", "12": "Pentecote", "13": "Sanma", "14": "Shepherd", "15": "Tafea", "16": "Malampa", "17": "Penama", "18": "Shefa" }, "WS": { "2": "Aiga-i-le-Tai", "3": "Atua", "4": "Fa", "5": "Gaga", "6": "Va", "7": "Gagaifomauga", "8": "Palauli", "9": "Satupa", "10": "Tuamasaga", "11": "Vaisigano" }, "YE": { "1": "Abyan", "2": "Adan", "3": "Al Mahrah", "4": "Hadramawt", "5": "Shabwah", "6": "Lahij", "7": "Al Bayda'", "8": "Al Hudaydah", "9": "Al Jawf", "10": "Al Mahwit", "11": "Dhamar", "12": "Hajjah", "13": "Ibb", "14": "Ma'rib", "15": "Sa'dah", "16": "San'a'", "17": "Taizz", "18": "Ad Dali", "19": "Amran", "20": "Al Bayda'", "21": "Al Jawf", "22": "Hajjah", "23": "Ibb", "24": "Lahij", "25": "Taizz" }, "ZA": { "1": "North-Western Province", "2": "KwaZulu-Natal", "3": "Free State", "5": "Eastern Cape", "6": "Gauteng", "7": "Mpumalanga", "8": "Northern Cape", "9": "Limpopo", "10": "North-West", "11": "Western Cape" }, "ZM": { "1": "Western", "2": "Central", "3": "Eastern", "4": "Luapula", "5": "Northern", "6": "North-Western", "7": "Southern", "8": "Copperbelt", "9": "Lusaka" }, "ZW": { "1": "Manicaland", "2": "Midlands", "3": "Mashonaland Central", "4": "Mashonaland East", "5": "Mashonaland West", "6": "Matabeleland North", "7": "Matabeleland South", "8": "Masvingo", "9": "Bulawayo", "10": "Harare" } };
2,848
https://github.com/XiangHuang-LMC/ijava-binder/blob/master/CSC176/textbook/book/mytest/ArrayListTest.java
Github Open Source
Open Source
OFL-1.1, MIT, Unlicense
2,020
ijava-binder
XiangHuang-LMC
Java
Code
57
224
package mytest; import org.junit.*; import static org.junit.Assert.*; import java.util.*; public class ArrayListTest { private ArrayList<String> list = new ArrayList<String>(); @Before public void setUp() throws Exception { } @Test public void testInsertion() { list.add("Beijing"); assertEquals("Beijing", list.get(0)); list.add("Shanghai"); list.add("Hongkong"); assertEquals("Hongkong", list.get(list.size() - 1)); } @Test public void testDeletion() { list.clear(); assertTrue(list.isEmpty()); list.add("A"); list.add("B"); list.add("C"); list.remove("B"); assertEquals(2, list.size()); } }
43,489
https://github.com/truthencode/ddo-calc/blob/master/subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/SilverFlameExorcism.scala
Github Open Source
Open Source
Apache-2.0
2,020
ddo-calc
truthencode
Scala
Code
243
559
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.truthencode.ddo.model.feats import io.truthencode.ddo.activation.OnSpellLikeAbilityEvent import io.truthencode.ddo.model.religions.SilverFlame import io.truthencode.ddo.support.requisite.{FeatRequisiteImpl, RequiresAllOfFeat} import java.time.Duration /** * [[https://ddowiki.com/page/Silver_Flame_Exorcism Silver Flame Exorcism]] You are a devoted * follower of the Silver Flame, and your faith has been rewarded. Activate this ability to attempt * to exorcise an extraplanar creature, which is entirely consumed in holy fire on a failed Will * save or savagely burned by the light of the Silver Flame. A successful Fortitude save reduces the * damage to half. The Save DC for this ability is 10 + Cleric Level + Charisma Modifier. Cooldown: * 10 minutes. Created by adarr on 4/7/2017. * @todo * Add difficulty check */ trait SilverFlameExorcism extends FeatRequisiteImpl with EberronReligionNonWarforged with DeityUniqueLevelBase with RequiresAllOfFeat with SilverFlame with TheSilverFlameFeatBase with ActiveFeat with OnSpellLikeAbilityEvent { self: DeityFeat => override def allOfFeats: Seq[Feat] = List(DeityFeat.ChildOfTheSilverFlame) override def coolDown: Option[Duration] = Some(Duration.ofMinutes(10)) }
16,122
https://github.com/freebsd/freebsd-ports/blob/master/net/liboping/files/patch-src_liboping.c
Github Open Source
Open Source
BSD-2-Clause
2,023
freebsd-ports
freebsd
C
Code
48
164
--- src/liboping.c.orig 2014-09-28 09:21:20 UTC +++ src/liboping.c @@ -801,6 +801,11 @@ static ssize_t ping_sendto (pingobj_t *obj, pinghost_t if (errno == ENETUNREACH) return (0); #endif + /* BSDs return EHOSTDOWN on ARP/ND failure */ +#if defined(EHOSTDOWN) + if (errno == EHOSTDOWN) + return (0); +#endif ping_set_errno (obj, errno); }
47,234
https://github.com/zeroday0619/zerodayAPI/blob/master/routes/v1/__init__.py
Github Open Source
Open Source
MIT
2,020
zerodayAPI
zeroday0619
Python
Code
24
74
from sanic.blueprints import Blueprint from sanic.response import json from sanic import response from routes.v1.index_root import api_info from routes.v1.rtsq import rtsq_Api index = Blueprint.group(api_info, rtsq_Api)
37,543
https://github.com/KazeJiyu/eclipse-discord-integration/blob/master/tests/fr.kazejiyu.discord.rpc.integration.tests/src/fr/kazejiyu/discord/rpc/integration/settings/GlobalPreferencesListenerTest.java
Github Open Source
Open Source
Apache-2.0
2,019
eclipse-discord-integration
KazeJiyu
Java
Code
395
2,292
package fr.kazejiyu.discord.rpc.integration.settings; import static java.util.Arrays.asList; import static org.mockito.Mockito.only; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; import java.util.EnumMap; import java.util.Map; import java.util.stream.Stream; import org.assertj.core.api.WithAssertions; import org.eclipse.jface.util.PropertyChangeEvent; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.mockito.Mock; import fr.kazejiyu.discord.rpc.integration.tests.mock.MockitoExtension; /** * Unit test the {@link GlobalPreferencesListener} class. */ @ExtendWith(MockitoExtension.class) @DisplayName("A GlobalPreferencesListener") public class GlobalPreferencesListenerTest implements WithAssertions { private GlobalPreferencesListener listener; @Mock private SettingChangeListener settingChangeListener; @Mock private PropertyChangeEvent event; @BeforeEach void instanciateListenerUnderTest() { listener = new GlobalPreferencesListener(asList(settingChangeListener)); } @Test @DisplayName("throws if instanciated with null listeners") void throws_if_instanciated_with_null_listeners() { assertThatNullPointerException().isThrownBy(() -> new GlobalPreferencesListener(null) ); } @Test @DisplayName("does nothing when project name changes (should not happen)") void does_nothing_when_project_name_changes() { when(event.getProperty()).thenReturn(Settings.PROJECT_NAME.property()); listener.propertyChange(event); verifyZeroInteractions(settingChangeListener); } @ParameterizedTest(name = "when old value={0} and new value={1}") @MethodSource("pairsOfBooleans") @DisplayName("notifies its listeners when showFileName property changes") void notifies_its_listeners_when_showFileName_property_changes(boolean oldValue, boolean newValue) { when(event.getProperty()).thenReturn(Settings.SHOW_FILE_NAME.property()); when(event.getOldValue()).thenReturn(String.valueOf(oldValue)); when(event.getNewValue()).thenReturn(String.valueOf(newValue)); listener.propertyChange(event); verify(settingChangeListener).fileNameVisibilityChanged(newValue); verify(settingChangeListener, only()).fileNameVisibilityChanged(newValue); } @ParameterizedTest(name = "when old value={0} and new value={1}") @MethodSource("pairsOfBooleans") @DisplayName("notifies its listeners when showProjectName property changes") void notifies_its_listeners_when_showProjectName_property_changes(boolean oldValue, boolean newValue) { when(event.getProperty()).thenReturn(Settings.SHOW_PROJECT_NAME.property()); when(event.getOldValue()).thenReturn(String.valueOf(oldValue)); when(event.getNewValue()).thenReturn(String.valueOf(newValue)); listener.propertyChange(event); verify(settingChangeListener).projectNameVisibilityChanged(newValue); verify(settingChangeListener, only()).projectNameVisibilityChanged(newValue); } @ParameterizedTest(name = "when old value={0} and new value={1}") @MethodSource("pairsOfBooleans") @DisplayName("notifies its listeners when showElapsedTime property changes") void notifies_its_listeners_when_showElapsedTime_property_changes(boolean oldValue, boolean newValue) { when(event.getProperty()).thenReturn(Settings.SHOW_ELAPSED_TIME.property()); when(event.getOldValue()).thenReturn(String.valueOf(oldValue)); when(event.getNewValue()).thenReturn(String.valueOf(newValue)); listener.propertyChange(event); verify(settingChangeListener).elapsedTimeVisibilityChanged(newValue); verify(settingChangeListener, only()).elapsedTimeVisibilityChanged(newValue); } @ParameterizedTest(name = "when old value={0} and new value={1}") @MethodSource("pairsOfBooleans") @DisplayName("notifies its listeners when showLanguageIcon property changes") void notifies_its_listeners_when_showLanguageIcon_property_changes(boolean oldValue, boolean newValue) { when(event.getProperty()).thenReturn(Settings.SHOW_LANGUAGE_ICON.property()); when(event.getOldValue()).thenReturn(String.valueOf(oldValue)); when(event.getNewValue()).thenReturn(String.valueOf(newValue)); listener.propertyChange(event); verify(settingChangeListener).languageIconVisibilityChanged(newValue); verify(settingChangeListener, only()).languageIconVisibilityChanged(newValue); } @ParameterizedTest(name = "when old value={0} and new value = {1}") @MethodSource("pairsOfBooleans") @DisplayName("notifies its listeners when showRichPresence property changes") void notifies_its_listeners_when_showRichPresence_property_changes(boolean oldValue, boolean newValue) { when(event.getProperty()).thenReturn(Settings.SHOW_RICH_PRESENCE.property()); when(event.getOldValue()).thenReturn(String.valueOf(oldValue)); when(event.getNewValue()).thenReturn(String.valueOf(newValue)); listener.propertyChange(event); verify(settingChangeListener).richPresenceVisibilityChanged(newValue); verify(settingChangeListener, only()).richPresenceVisibilityChanged(newValue); } static Stream<Arguments> pairsOfBooleans() { return Stream.of( Arguments.of(true, true), Arguments.of(true, false), Arguments.of(false, false), Arguments.of(false, true) ); } @ParameterizedTest(name = "when old value={0} and new value={1}") @MethodSource("momentCombinations") @DisplayName("notifies its listeners when resetElapsedTime property changes") void notifies_its_listeners_when_resetElapsedTime_property_changes(Moment oldMoment, String oldProperty, Moment newMoment, String newProperty) { when(event.getProperty()).thenReturn(Settings.RESET_ELAPSED_TIME.property()); when(event.getOldValue()).thenReturn(oldProperty); when(event.getNewValue()).thenReturn(newProperty); listener.propertyChange(event); verify(settingChangeListener).elapsedTimeResetMomentChanged(oldMoment, newMoment); verify(settingChangeListener, only()).elapsedTimeResetMomentChanged(oldMoment, newMoment); } static Stream<Arguments> momentCombinations() { Stream.Builder<Arguments> moments = Stream.builder(); Map<Moment,Settings> momentToProperty = new EnumMap<>(Moment.class); momentToProperty.put(Moment.ON_NEW_FILE, Settings.RESET_ELAPSED_TIME_ON_NEW_FILE); momentToProperty.put(Moment.ON_NEW_PROJECT, Settings.RESET_ELAPSED_TIME_ON_NEW_PROJECT); momentToProperty.put(Moment.ON_STARTUP, Settings.RESET_ELAPSED_TIME_ON_STARTUP); for (Moment oldMoment : Moment.values()) { for (Moment newMoment : Moment.values()) { moments.add(Arguments.of( oldMoment, momentToProperty.get(oldMoment).property(), newMoment, momentToProperty.get(newMoment).property() )); } } return moments.build(); } @Test @DisplayName("notifies its listeners with null when resetElapsedTime property changes incorrectly") void notifies_its_listeners_with_null_when_resetElapsedTime_property_changes_incorrectly() { when(event.getProperty()).thenReturn(Settings.RESET_ELAPSED_TIME.property()); when(event.getOldValue()).thenReturn("incorrect"); // should never happen when(event.getNewValue()).thenReturn("incorrect"); // should never happen listener.propertyChange(event); verify(settingChangeListener).elapsedTimeResetMomentChanged(null, null); verify(settingChangeListener, only()).elapsedTimeResetMomentChanged(null, null); } }
12,613
https://github.com/rboman/progs/blob/master/sandbox/tbb/thead_local_storage/main.cpp
Github Open Source
Open Source
Apache-2.0
2,022
progs
rboman
C++
Code
78
310
// from // https://www.threadingbuildingblocks.org/tutorial-intel-tbb-thread-local-storage #include <tbb/tbb.h> #include <cstdio> using namespace tbb; typedef tbb::enumerable_thread_specific<std::pair<int, int>> CounterType; CounterType MyCounters(std::make_pair(0, 0)); struct Body { void operator()(const tbb::blocked_range<int> &r) const { CounterType::reference my_counter = MyCounters.local(); ++my_counter.first; for (int i = r.begin(); i != r.end(); ++i) ++my_counter.second; } }; int main() { tbb::parallel_for(tbb::blocked_range<int>(0, 100000000), Body()); for (CounterType::const_iterator i = MyCounters.begin(); i != MyCounters.end(); ++i) { printf("Thread stats:\n"); printf(" calls to operator(): %d", i->first); printf(" total # of iterations executed: %d\n\n", i->second); } }
42,008
https://github.com/wirenic/news-feed/blob/master/news-cleaner/go.mod
Github Open Source
Open Source
MIT
2,021
news-feed
wirenic
Go Module
Code
13
92
module github.com/panz3r/news.panz3r.dev/news-cleaner go 1.13 require ( github.com/ericaro/frontmatter v0.0.0-20200210094738-46863cd917e2 gopkg.in/yaml.v2 v2.4.0 // indirect )
36,973
https://github.com/The0x539/wasp/blob/master/libc/winsup/cygwin/include/sys/poll.h
Github Open Source
Open Source
MIT
2,022
wasp
The0x539
C
Code
189
471
/* sys/poll.h This file is part of Cygwin. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ #ifndef _SYS_POLL_H #define _SYS_POLL_H #include <sys/cdefs.h> #include <sys/types.h> #include <signal.h> __BEGIN_DECLS #define POLLIN 1 /* Set if data to read. */ #define POLLPRI 2 /* Set if urgent data to read. */ #define POLLOUT 4 /* Set if writing data wouldn't block. */ #define POLLERR 8 /* An error occured. */ #define POLLHUP 16 /* Shutdown or close happened. */ #define POLLNVAL 32 /* Invalid file descriptor. */ #define NPOLLFILE 64 /* Number of canonical fd's in one call to poll(). */ /* The following values are defined by XPG4. */ #define POLLRDNORM POLLIN #define POLLRDBAND POLLPRI #define POLLWRNORM POLLOUT #define POLLWRBAND POLLOUT struct pollfd { int fd; short events; short revents; }; typedef unsigned int nfds_t; extern int poll __P ((struct pollfd *fds, nfds_t nfds, int timeout)); #if __GNU_VISIBLE extern int ppoll __P ((struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts, const sigset_t *sigmask)); #endif __END_DECLS #if __SSP_FORTIFY_LEVEL > 0 #include <ssp/poll.h> #endif #endif /* _SYS_POLL_H */
50,703
https://github.com/MetaVoidTeam/Insta-Anime-Bot/blob/master/index.js/src/structures/ClientUser.js
Github Open Source
Open Source
MIT
2,022
Insta-Anime-Bot
MetaVoidTeam
JavaScript
Code
191
432
const User = require('./User') /** * Represents the logged in client's Instagram user. * @extends {User} */ class ClientUser extends User { /** * @param {Client} client The instantiating client * @param {object} data The data for the client user. */ constructor (client, data) { super(client, data) this._patch(data) } _patch (data) { super._patch(data) /** * @type {boolean} * Whether the user has enabled contact synchronization */ this.allowContactsSync = data.allowContactsSync /** * @type {string} * The phone number of the user */ this.phoneNumber = data.phoneNumber } get follow () { return undefined } get unfollow () { return undefined } get block () { return undefined } get unblock () { return undefined } get approveFollow () { return undefined } get denyFollow () { return undefined } get removeFollower () { return undefined } get send () { return undefined } /** * Change the bot's biography * @param {string} content The new biography * @returns {Promise<string>} The new biography */ async setBiography (content) { this.biography = content await this.client.ig.account.setBiography(content) return this.biography } toJSON () { return { ...super.toJSON(), ...{ allowContactsSync: this.allowContactsSync, phoneNumber: this.phoneNumber } } } } module.exports = ClientUser
29,515
https://github.com/corbinmcneill/codejam/blob/master/sheep_py/solve.py
Github Open Source
Open Source
Apache-2.0
null
codejam
corbinmcneill
Python
Code
65
210
def solve(case, n): marker = [False]*10 p = n for i in range(101): stringN = str(n) for charN in stringN: marker[int(charN)] = True done = True for j in range(len(marker)): if not marker[j]: done = False break if done: print "Case #%d: %d"%(case,n) return n+=p print "Case #%d: INSOMNIA"%case infile = open("input.txt", 'r') T = int(infile.readline()) for t in range(1,T+1): N = int(infile.readline()) solve(t, N)
27,303
https://github.com/heavendarren/dangqun/blob/master/src/main/java/com/thinkgem/jeesite/modules/partyManage/service/SPmPcService.java
Github Open Source
Open Source
Apache-2.0
null
dangqun
heavendarren
Java
Code
143
689
/** * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.thinkgem.jeesite.modules.partyManage.service; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.thinkgem.jeesite.common.persistence.Page; import com.thinkgem.jeesite.common.service.CrudService; import com.thinkgem.jeesite.modules.partyManage.entity.SPmMass; import com.thinkgem.jeesite.modules.partyManage.entity.SPmPc; import com.thinkgem.jeesite.modules.partyManage.dao.SPmPcDao; /** * 这是党委会议记录表Service * @author one * @version 2017-04-26 */ @Service @Transactional(readOnly = true) public class SPmPcService extends CrudService<SPmPcDao, SPmPc> { public SPmPc get(String id) { return super.get(id); } public List<SPmPc> findList(SPmPc sPmPc) { return super.findList(sPmPc); } public Page<SPmPc> findPage(Page<SPmPc> page, SPmPc sPmPc) { return super.findPage(page, sPmPc); } @Transactional(readOnly = false) public String save(SPmPc sPmPc, String proId) { if (proId != null && proId != "") { SPmPc sPmPcs = dao.getByproId(proId); if (sPmPcs == null) { sPmPc.setProId(proId); super.save(sPmPc); } else { sPmPc.setId(sPmPcs.getId()); sPmPc.setProId(proId); super.save(sPmPc); } return "success"; } return "error proId is not found"; } @Transactional(readOnly = false) public void delete(SPmPc sPmPc) { super.delete(sPmPc); } public SPmPc getByproId(String proId) { return dao.getByproId(proId); } }
29,623
https://github.com/shoulderhu/heroku-cloud/blob/master/app/www/routes.py
Github Open Source
Open Source
MIT
null
heroku-cloud
shoulderhu
Python
Code
75
342
import os import sys from . import www from flask import current_app as app, request, render_template, url_for, json, jsonify @www.route("/") def index(): with app.open_resource("static/json/www-index-card.json") as f: cards = json.load(f) return render_template("index.html", title="Big Data", cards=cards["data"]) @www.route("/student") def student(): with app.open_resource("static/json/www-student-col.json") as f: col = json.load(f) return render_template("student.html", title="大專院校校別學生數", col=col, url=app.config["API_HOST"]) @www.route("/aqi") def aqi(): with app.open_resource("static/json/www-aqi-tab.json") as f: tab = json.load(f) with app.open_resource("static/json/www-aqi-col.json") as f: col = json.load(f) return render_template("aqi.html", title="空氣品質指標(AQI)", col=col, tab=tab) @www.route("/test") def test(): pass
13,836
https://github.com/guilhermejccavalcanti/orientdb/blob/master/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/binary/OBinaryComparator.java
Github Open Source
Open Source
Apache-2.0
2,019
orientdb
guilhermejccavalcanti
Java
Code
268
550
/* * * * Copyright 2010-2016 OrientDB LTD (http://orientdb.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. * * * * For more information: http://orientdb.com * */ package com.orientechnologies.orient.core.serialization.serializer.record.binary; import com.orientechnologies.orient.core.metadata.schema.OType; /** * Compares types at binary level: super fast, using of literals as much as it can. * * @author Luca Garulli (l.garulli--(at)--orientdb.com) */ public interface OBinaryComparator { /** * Compares if two binary values are the same. * * @param iFirstValue * First value to compare * @param iSecondValue * Second value to compare * @return true if they match, otherwise false */ boolean isEqual(OBinaryField iFirstValue, OBinaryField iSecondValue); /** * Compares two binary values executing also conversion between types. * * @param iValue1 * First value to compare * @param iValue2 * Second value to compare * @return 0 if they matches, >0 if first value is major than second, <0 in case is minor */ int compare(OBinaryField iValue1, OBinaryField iValue2); /** * Returns true if the type is binary comparable * * @param iType * @return */ boolean isBinaryComparable(OType iType); }
19,629
https://github.com/jordanbray/chess_uci/blob/master/src/engine/registration.rs
Github Open Source
Open Source
MIT
2,020
chess_uci
jordanbray
Rust
Code
157
573
use error::Error; use std::fmt; use std::str::FromStr; use nom::IResult; use nom::combinator::{map, complete, value}; use nom::bytes::streaming::tag; use nom::branch::alt; use nom::sequence::tuple; use parsers::*; #[derive(Copy, Clone, PartialEq, PartialOrd, Debug)] pub enum Registration { Good, Checking, Error, } pub fn parse_registration(input: &str) -> IResult<&str, Registration> { map( tuple(( tag("registration"), space, alt(( complete(value(Registration::Good, tag("ok"))), complete(value(Registration::Checking, tag("checking"))), complete(value(Registration::Error, tag("error"))), )), )), |(_, _, reg)| reg )(input) } impl FromStr for Registration { type Err = Error; fn from_str(s: &str) -> Result<Self, Self::Err> { Ok(parse_registration(s)?.1) } } impl fmt::Display for Registration { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Registration::Good => writeln!(f, "registration ok"), Registration::Checking => writeln!(f, "registration checking"), Registration::Error => writeln!(f, "registration error"), } } } #[cfg(test)] fn test_registration(s: &str, c: Registration) { let parsed = Registration::from_str(s); let text = c.to_string().trim().to_string(); assert_eq!(parsed, Ok(c)); assert_eq!(text, s.trim().to_string()); } #[test] fn test_registration_ok() { test_registration("registration ok\n", Registration::Good); } #[test] fn test_registration_checking() { test_registration("registration checking\n", Registration::Checking); } #[test] fn test_registration_error() { test_registration("registration error\n", Registration::Error); }
49,737
https://github.com/ivanbanov/xstyled/blob/master/packages/prop-types/src/index.ts
Github Open Source
Open Source
MIT, LicenseRef-scancode-unknown-license-reference
2,021
xstyled
ivanbanov
TypeScript
Code
52
119
import { oneOfType, number, string, object, bool } from 'prop-types' export const getSystemPropTypes = (system?: any) => { if (!system) return {} return system.meta.props.reduce( (obj: { [key: string]: any }, prop: string) => { obj[prop] = oneOfType([number, string, object, bool]) return obj }, {} as { [key: string]: any }, ) }
7,706
https://github.com/shopgate/ext-cart/blob/master/extension/test/unit/cart/deleteProductsFromCart-test.js
Github Open Source
Open Source
Apache-2.0
null
ext-cart
shopgate
JavaScript
Code
119
387
const assert = require('assert') const deleteProductsFromCart = require('../../../cart/deleteProductsFromCart') const {PRODUCT, COUPON} = require('../../../common/consts') describe('deleteProductsFromCart', () => { const cart = [ { id: 'qwerty123', productId: 'QWERTY123', quantity: 1, type: PRODUCT }, { id: '10off', productId: '10off', code: '10off', type: COUPON, quantity: 1 } ] const context = { storage: { device: { get: (key, cb) => { assert.equal(key, 'cart') cb(null, cart) } } } } const cartStorageName = 'device' it('Should remove product from cart', (done) => { const input = { cartItemIds: ['qwerty123'], cartStorageName } const expectedCart = [ cart[1] // coupon ] context.storage[cartStorageName].set = (key, newCartArg, cb) => { assert.equal(key, 'cart') assert.deepEqual(newCartArg, expectedCart) cb() } // noinspection JSCheckFunctionSignatures deleteProductsFromCart(context, input, (err) => { assert.ifError(err) done() }) }) })
34,494
https://github.com/cafemoca/MinecraftCommandStudio/blob/master/MinecraftCommandStudio/ViewModels/Flips/SettingFlips/EditorViewModel.cs
Github Open Source
Open Source
MIT
null
MinecraftCommandStudio
cafemoca
C#
Code
255
814
using Cafemoca.MinecraftCommandStudio.Settings; using Livet; namespace Cafemoca.MinecraftCommandStudio.ViewModels.Flips.SettingFlips { public class EditorViewModel : ViewModel { public bool AllowScrollBelowDocument { get { return Setting.Current.EditorOptions.AllowScrollBelowDocument; } set { Setting.Current.EditorOptions.AllowScrollBelowDocument = value; } } public bool CutCopyWholeLine { get { return Setting.Current.EditorOptions.CutCopyWholeLine; } set { Setting.Current.EditorOptions.CutCopyWholeLine = value; } } public bool EnableTextDragDrop { get { return Setting.Current.EditorOptions.EnableTextDragDrop; } set { Setting.Current.EditorOptions.EnableTextDragDrop = value; } } public bool HideCursorWhileTyping { get { return Setting.Current.EditorOptions.HideCursorWhileTyping; } set { Setting.Current.EditorOptions.HideCursorWhileTyping = value; } } public bool ConvertTabsToSpaces { get { return Setting.Current.EditorOptions.ConvertTabsToSpaces; } set { Setting.Current.EditorOptions.ConvertTabsToSpaces = value; } } public int IndentationSize { get { return Setting.Current.EditorOptions.IndentationSize; } set { Setting.Current.EditorOptions.IndentationSize = value; } } public bool ShowColumnRuler { get { return Setting.Current.EditorOptions.ShowColumnRuler; } set { Setting.Current.EditorOptions.ShowColumnRuler = value; } } public int ColumnRulerPosition { get { return Setting.Current.EditorOptions.ColumnRulerPosition; } set { Setting.Current.EditorOptions.ColumnRulerPosition = value; } } public bool ShowSpaces { get { return Setting.Current.EditorOptions.ShowSpaces; } set { Setting.Current.EditorOptions.ShowSpaces = value; } } public bool ShowTabs { get { return Setting.Current.EditorOptions.ShowTabs; } set { Setting.Current.EditorOptions.ShowTabs = value; } } public bool ShowEndOfLine { get { return Setting.Current.EditorOptions.ShowEndOfLine; } set { Setting.Current.EditorOptions.ShowEndOfLine = value; } } public bool ShowLineNumbers { get { return Setting.Current.ShowLineNumbers; } set { Setting.Current.ShowLineNumbers = value; } } public bool TextWrapping { get { return Setting.Current.TextWrapping; } set { Setting.Current.TextWrapping = value; } } public string FontFamily { get { return Setting.Current.FontFamily; } set { Setting.Current.FontFamily = value; } } public int FontSize { get { return Setting.Current.FontSize; } set { Setting.Current.FontSize = value; } } } }
16,399
https://github.com/uurdev/kodluyoruz-graduation-project/blob/master/project/src/main/java/kodluyoruz/graduation/project/dto/AuthorDto.java
Github Open Source
Open Source
MIT
2,021
kodluyoruz-graduation-project
uurdev
Java
Code
45
151
package kodluyoruz.graduation.project.dto; public class AuthorDto { private String authorName; private String authorSurname; public String getAuthorName() { return authorName; } public void setAuthorName(String authorName) { this.authorName = authorName; } public String getAuthorSurname() { return authorSurname; } public void setAuthorSurname(String authorSurname) { this.authorSurname = authorSurname; } }
45,737
https://github.com/Spark100k/frpmgr/blob/master/ui/icon.go
Github Open Source
Open Source
Apache-2.0
2,021
frpmgr
Spark100k
Go
Code
209
738
package ui import ( "github.com/koho/frpmgr/pkg/consts" "github.com/lxn/walk" ) var cachedSystemIconsForWidthAndDllIdx = make(map[widthDllIdx]*walk.Icon) func loadSysIcon(dll string, index int32, size int) (icon *walk.Icon) { icon = cachedSystemIconsForWidthAndDllIdx[widthDllIdx{size, index, dll}] if icon != nil { return } var err error icon, err = walk.NewIconFromSysDLLWithSize(dll, int(index), size) if err == nil { cachedSystemIconsForWidthAndDllIdx[widthDllIdx{size, index, dll}] = icon } return } type widthDllIdx struct { width int idx int32 dll string } type widthAndState struct { width int state consts.ServiceState } var cachedIconsForWidthAndState = make(map[widthAndState]*walk.Icon) func iconForState(state consts.ServiceState, size int) (icon *walk.Icon) { icon = cachedIconsForWidthAndState[widthAndState{size, state}] if icon != nil { return } switch state { case consts.StateStarted: icon = loadSysIcon("imageres", consts.IconStateRunning, size) case consts.StateStopped, consts.StateUnknown: icon = loadResourceIcon(consts.IconStateStopped, size) default: icon = loadSysIcon("shell32", consts.IconStateWorking, size) } cachedIconsForWidthAndState[widthAndState{size, state}] = icon return } func loadLogoIcon(size int) *walk.Icon { return loadResourceIcon(consts.IconLogo, size) } func loadNewVersionIcon(size int) (icon *walk.Icon) { icon = loadSysIcon("imageres", consts.IconNewVersion1, size) if icon == nil { icon = loadSysIcon("imageres", consts.IconNewVersion2, size) } return } var cachedResourceIcons = make(map[widthDllIdx]*walk.Icon) func loadResourceIcon(id int, size int) (icon *walk.Icon) { icon = cachedResourceIcons[widthDllIdx{width: size, idx: int32(id)}] if icon != nil { return } var err error icon, err = walk.NewIconFromResourceIdWithSize(id, walk.Size{size, size}) if err == nil { cachedResourceIcons[widthDllIdx{width: size, idx: int32(id)}] = icon } return }
35,850
https://github.com/arcogelderblom/HC-SR04-Ultrasonic-Sensor/blob/master/hwlib/html/search/defines_0.js
Github Open Source
Open Source
BSL-1.0
null
HC-SR04-Ultrasonic-Sensor
arcogelderblom
JavaScript
Code
11
525
var searchData= [ ['hwlib_5fhere',['HWLIB_HERE',['../hwlib-defines_8hpp.html#a360fe3b1713068844a760bed1aa1384a',1,'hwlib-defines.hpp']]], ['hwlib_5finline',['HWLIB_INLINE',['../hwlib-defines_8hpp.html#a520a8905adc71f1757aea4ce05183585',1,'hwlib-defines.hpp']]], ['hwlib_5fnoinline',['HWLIB_NOINLINE',['../hwlib-defines_8hpp.html#a2bec10dcdff9c6b29f603813007f2ffa',1,'hwlib-defines.hpp']]], ['hwlib_5fnoreturn',['HWLIB_NORETURN',['../hwlib-defines_8hpp.html#aef311f1f416fdcbd1fa22376dcc01029',1,'hwlib-defines.hpp']]], ['hwlib_5fpanic_5fwith_5flocation',['HWLIB_PANIC_WITH_LOCATION',['../hwlib-defines_8hpp.html#a63e41f8f1231b208819549fe26a58440',1,'HWLIB_PANIC_WITH_LOCATION():&#160;hwlib-defines.hpp'],['../hwlib-panic_8hpp.html#a63e41f8f1231b208819549fe26a58440',1,'HWLIB_PANIC_WITH_LOCATION():&#160;hwlib-panic.hpp']]], ['hwlib_5ftrace',['HWLIB_TRACE',['../hwlib-defines_8hpp.html#a536d8e892418f0e4127db75a6f653add',1,'hwlib-defines.hpp']]], ['hwlib_5fweak',['HWLIB_WEAK',['../hwlib-defines_8hpp.html#a04be4340016df60d6636c1d1c6d94fc9',1,'hwlib-defines.hpp']]] ];
28,244
https://github.com/ilonazakharova/java_course/blob/master/sandbox/src/test/java/ru/stqa/pft/sandbox/Lecture2/HomeTask2_2.java
Github Open Source
Open Source
Apache-2.0
null
java_course
ilonazakharova
Java
Code
110
368
package ru.stqa.pft.sandbox.Lecture2; import java.util.Scanner; public class HomeTask2_2 { public static void main(String[] args) { int a, b, c; double function; int r; double square; double length; Scanner conin = new Scanner(System.in); System.out.println("Введите a: "); while (!conin.hasNextInt()) conin.next(); a = conin.nextInt(); System.out.println("Введите b: "); while (!conin.hasNextInt()) conin.next(); b = conin.nextInt(); System.out.println("Введите c: "); while (!conin.hasNextInt()) conin.next(); c = conin.nextInt(); if (a != 0) { System.out.println("Знаменатель a не равен нулю"); function = (b + Math.sqrt(b * b + 4 * a * c) / 2 * a - Math.pow(a, 3) + b); } else { System.out.println("Знаменатель равен нулю"); function = Double.NaN; } System.out.println("Значение функциии function равно = " + function); } }
42,016
https://github.com/iotbusters/assistant.net/blob/master/src/Messaging.Web.Server/Internal/ErrorHandlingMiddleware.cs
Github Open Source
Open Source
Apache-2.0
null
assistant.net
iotbusters
C#
Code
120
420
using Assistant.Net.Messaging.Exceptions; using Microsoft.AspNetCore.Http; using System; using System.Threading.Tasks; namespace Assistant.Net.Messaging.Internal { /// <summary> /// Global error handling middleware. /// </summary> internal class ExceptionHandlingMiddleware : IMiddleware { public async Task InvokeAsync(HttpContext context, RequestDelegate next) { if (context.Request.Method != HttpMethods.Post || !context.Request.Path.StartsWithSegments("/messages")) { await next(context); return; } try { await next(context); } catch (Exception ex) { await HandleException(context, ex); } } private Task HandleException(HttpContext context, Exception ex) { if (ex is AggregateException e) return HandleException(context, e.InnerException!); if (ex is MessageDeferredException || ex is TimeoutException || ex is OperationCanceledException) return context.WriteMessageResponse(StatusCodes.Status202Accepted); if (ex is MessageNotFoundException || ex is MessageNotRegisteredException) return context.WriteMessageResponse(StatusCodes.Status404NotFound, ex); if (ex is MessageContractException) return context.WriteMessageResponse(StatusCodes.Status400BadRequest, ex); if (ex is MessageException) return context.WriteMessageResponse(StatusCodes.Status500InternalServerError, ex); return context.WriteMessageResponse(StatusCodes.Status500InternalServerError, new MessageFailedException(ex)); } } }
32,011
https://github.com/meyerluk/mailmerge/blob/master/src/Http/Middleware/ClientSwitcher.php
Github Open Source
Open Source
MIT
2,020
mailmerge
meyerluk
PHP
Code
80
311
<?php namespace MailMerge\Http\Middleware; use Closure; use Illuminate\Foundation\Application; use Illuminate\Http\Request; use MailMerge\MailClient; class ClientSwitcher { public Application $app; public function __construct(Application $app) { $this->app = $app; } public function handle(Request $request, Closure $next) { switch ($request->header('API-SERVICE')) { case 'mailgun': $this->app->bind(MailClient::class, function () { return get_mail_client('mailgun'); }); break; case 'pepipost': $this->app->bind(MailClient::class, function () { return get_mail_client('pepipost'); }); break; case 'sendgrid': $this->app->bind(MailClient::class, function () { return get_mail_client('sendgrid'); }); break; default: $this->app->bind(MailClient::class, function () { return get_mail_client(); }); break; } return $next($request); } }
18,519
https://github.com/AlexITC/scala-js-chrome/blob/master/bindings/src/main/scala/chrome/system/cpu/bindings/package.scala
Github Open Source
Open Source
MIT
2,023
scala-js-chrome
AlexITC
Scala
Code
55
151
package chrome.system.cpu package object bindings { type Feature = String object Features { val MMX: Feature = "mmx" val SSE: Feature = "sse" val SSE2: Feature = "sse2" val SSE3: Feature = "sse3" val SSSE3: Feature = "ssse3" val SSE4_1: Feature = "sse4_1" val SSE4_2: Feature = "sse4_2" val AVX: Feature = "avx" } }
42,754
https://github.com/varumug/Ed-Fi-ODS/blob/master/Application/EdFi.Ods.Standard/Artifacts/PgSql/Structure/Ods/0020-Tables.sql
Github Open Source
Open Source
Apache-2.0
null
Ed-Fi-ODS
varumug
SQL
Code
20,000
54,848
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. -- Table edfi.AbsenceEventCategoryDescriptor -- CREATE TABLE edfi.AbsenceEventCategoryDescriptor ( AbsenceEventCategoryDescriptorId INT NOT NULL, CONSTRAINT AbsenceEventCategoryDescriptor_PK PRIMARY KEY (AbsenceEventCategoryDescriptorId) ); -- Table edfi.AcademicHonorCategoryDescriptor -- CREATE TABLE edfi.AcademicHonorCategoryDescriptor ( AcademicHonorCategoryDescriptorId INT NOT NULL, CONSTRAINT AcademicHonorCategoryDescriptor_PK PRIMARY KEY (AcademicHonorCategoryDescriptorId) ); -- Table edfi.AcademicSubjectDescriptor -- CREATE TABLE edfi.AcademicSubjectDescriptor ( AcademicSubjectDescriptorId INT NOT NULL, CONSTRAINT AcademicSubjectDescriptor_PK PRIMARY KEY (AcademicSubjectDescriptorId) ); -- Table edfi.AcademicWeek -- CREATE TABLE edfi.AcademicWeek ( SchoolId INT NOT NULL, WeekIdentifier VARCHAR(80) NOT NULL, BeginDate DATE NOT NULL, EndDate DATE NOT NULL, TotalInstructionalDays INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT AcademicWeek_PK PRIMARY KEY (SchoolId, WeekIdentifier) ); ALTER TABLE edfi.AcademicWeek ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.AcademicWeek ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.AcademicWeek ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AccommodationDescriptor -- CREATE TABLE edfi.AccommodationDescriptor ( AccommodationDescriptorId INT NOT NULL, CONSTRAINT AccommodationDescriptor_PK PRIMARY KEY (AccommodationDescriptorId) ); -- Table edfi.Account -- CREATE TABLE edfi.Account ( AccountIdentifier VARCHAR(50) NOT NULL, EducationOrganizationId INT NOT NULL, FiscalYear INT NOT NULL, AccountName VARCHAR(100) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Account_PK PRIMARY KEY (AccountIdentifier, EducationOrganizationId, FiscalYear) ); ALTER TABLE edfi.Account ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Account ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Account ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AccountabilityRating -- CREATE TABLE edfi.AccountabilityRating ( EducationOrganizationId INT NOT NULL, RatingTitle VARCHAR(60) NOT NULL, SchoolYear SMALLINT NOT NULL, Rating VARCHAR(35) NOT NULL, RatingDate DATE NULL, RatingOrganization VARCHAR(35) NULL, RatingProgram VARCHAR(30) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT AccountabilityRating_PK PRIMARY KEY (EducationOrganizationId, RatingTitle, SchoolYear) ); ALTER TABLE edfi.AccountabilityRating ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.AccountabilityRating ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.AccountabilityRating ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AccountAccountCode -- CREATE TABLE edfi.AccountAccountCode ( AccountClassificationDescriptorId INT NOT NULL, AccountCodeNumber VARCHAR(50) NOT NULL, AccountIdentifier VARCHAR(50) NOT NULL, EducationOrganizationId INT NOT NULL, FiscalYear INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AccountAccountCode_PK PRIMARY KEY (AccountClassificationDescriptorId, AccountCodeNumber, AccountIdentifier, EducationOrganizationId, FiscalYear) ); ALTER TABLE edfi.AccountAccountCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AccountClassificationDescriptor -- CREATE TABLE edfi.AccountClassificationDescriptor ( AccountClassificationDescriptorId INT NOT NULL, CONSTRAINT AccountClassificationDescriptor_PK PRIMARY KEY (AccountClassificationDescriptorId) ); -- Table edfi.AccountCode -- CREATE TABLE edfi.AccountCode ( AccountClassificationDescriptorId INT NOT NULL, AccountCodeNumber VARCHAR(50) NOT NULL, EducationOrganizationId INT NOT NULL, FiscalYear INT NOT NULL, AccountCodeDescription VARCHAR(1024) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT AccountCode_PK PRIMARY KEY (AccountClassificationDescriptorId, AccountCodeNumber, EducationOrganizationId, FiscalYear) ); ALTER TABLE edfi.AccountCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.AccountCode ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.AccountCode ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AchievementCategoryDescriptor -- CREATE TABLE edfi.AchievementCategoryDescriptor ( AchievementCategoryDescriptorId INT NOT NULL, CONSTRAINT AchievementCategoryDescriptor_PK PRIMARY KEY (AchievementCategoryDescriptorId) ); -- Table edfi.Actual -- CREATE TABLE edfi.Actual ( AccountIdentifier VARCHAR(50) NOT NULL, AsOfDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, FiscalYear INT NOT NULL, AmountToDate MONEY NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Actual_PK PRIMARY KEY (AccountIdentifier, AsOfDate, EducationOrganizationId, FiscalYear) ); ALTER TABLE edfi.Actual ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Actual ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Actual ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AdditionalCreditTypeDescriptor -- CREATE TABLE edfi.AdditionalCreditTypeDescriptor ( AdditionalCreditTypeDescriptorId INT NOT NULL, CONSTRAINT AdditionalCreditTypeDescriptor_PK PRIMARY KEY (AdditionalCreditTypeDescriptorId) ); -- Table edfi.AddressTypeDescriptor -- CREATE TABLE edfi.AddressTypeDescriptor ( AddressTypeDescriptorId INT NOT NULL, CONSTRAINT AddressTypeDescriptor_PK PRIMARY KEY (AddressTypeDescriptorId) ); -- Table edfi.AdministrationEnvironmentDescriptor -- CREATE TABLE edfi.AdministrationEnvironmentDescriptor ( AdministrationEnvironmentDescriptorId INT NOT NULL, CONSTRAINT AdministrationEnvironmentDescriptor_PK PRIMARY KEY (AdministrationEnvironmentDescriptorId) ); -- Table edfi.AdministrativeFundingControlDescriptor -- CREATE TABLE edfi.AdministrativeFundingControlDescriptor ( AdministrativeFundingControlDescriptorId INT NOT NULL, CONSTRAINT AdministrativeFundingControlDescriptor_PK PRIMARY KEY (AdministrativeFundingControlDescriptorId) ); -- Table edfi.AncestryEthnicOriginDescriptor -- CREATE TABLE edfi.AncestryEthnicOriginDescriptor ( AncestryEthnicOriginDescriptorId INT NOT NULL, CONSTRAINT AncestryEthnicOriginDescriptor_PK PRIMARY KEY (AncestryEthnicOriginDescriptorId) ); -- Table edfi.Assessment -- CREATE TABLE edfi.Assessment ( AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, AssessmentTitle VARCHAR(100) NOT NULL, AssessmentCategoryDescriptorId INT NULL, AssessmentForm VARCHAR(60) NULL, AssessmentVersion INT NULL, RevisionDate DATE NULL, MaxRawScore DECIMAL(15, 5) NULL, Nomenclature VARCHAR(35) NULL, AssessmentFamily VARCHAR(60) NULL, EducationOrganizationId INT NULL, AdaptiveAssessment BOOLEAN NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Assessment_PK PRIMARY KEY (AssessmentIdentifier, Namespace) ); ALTER TABLE edfi.Assessment ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Assessment ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Assessment ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentAcademicSubject -- CREATE TABLE edfi.AssessmentAcademicSubject ( AcademicSubjectDescriptorId INT NOT NULL, AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentAcademicSubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, AssessmentIdentifier, Namespace) ); ALTER TABLE edfi.AssessmentAcademicSubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentAssessedGradeLevel -- CREATE TABLE edfi.AssessmentAssessedGradeLevel ( AssessmentIdentifier VARCHAR(60) NOT NULL, GradeLevelDescriptorId INT NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentAssessedGradeLevel_PK PRIMARY KEY (AssessmentIdentifier, GradeLevelDescriptorId, Namespace) ); ALTER TABLE edfi.AssessmentAssessedGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentCategoryDescriptor -- CREATE TABLE edfi.AssessmentCategoryDescriptor ( AssessmentCategoryDescriptorId INT NOT NULL, CONSTRAINT AssessmentCategoryDescriptor_PK PRIMARY KEY (AssessmentCategoryDescriptorId) ); -- Table edfi.AssessmentContentStandard -- CREATE TABLE edfi.AssessmentContentStandard ( AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, Title VARCHAR(75) NOT NULL, Version VARCHAR(50) NULL, URI VARCHAR(255) NULL, PublicationDate DATE NULL, PublicationYear SMALLINT NULL, PublicationStatusDescriptorId INT NULL, MandatingEducationOrganizationId INT NULL, BeginDate DATE NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentContentStandard_PK PRIMARY KEY (AssessmentIdentifier, Namespace) ); ALTER TABLE edfi.AssessmentContentStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentContentStandardAuthor -- CREATE TABLE edfi.AssessmentContentStandardAuthor ( AssessmentIdentifier VARCHAR(60) NOT NULL, Author VARCHAR(100) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentContentStandardAuthor_PK PRIMARY KEY (AssessmentIdentifier, Author, Namespace) ); ALTER TABLE edfi.AssessmentContentStandardAuthor ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentIdentificationCode -- CREATE TABLE edfi.AssessmentIdentificationCode ( AssessmentIdentificationSystemDescriptorId INT NOT NULL, AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, AssigningOrganizationIdentificationCode VARCHAR(60) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentIdentificationCode_PK PRIMARY KEY (AssessmentIdentificationSystemDescriptorId, AssessmentIdentifier, Namespace) ); ALTER TABLE edfi.AssessmentIdentificationCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentIdentificationSystemDescriptor -- CREATE TABLE edfi.AssessmentIdentificationSystemDescriptor ( AssessmentIdentificationSystemDescriptorId INT NOT NULL, CONSTRAINT AssessmentIdentificationSystemDescriptor_PK PRIMARY KEY (AssessmentIdentificationSystemDescriptorId) ); -- Table edfi.AssessmentItem -- CREATE TABLE edfi.AssessmentItem ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, AssessmentItemCategoryDescriptorId INT NULL, MaxRawScore DECIMAL(15, 5) NULL, ItemText VARCHAR(1024) NULL, CorrectResponse VARCHAR(20) NULL, ExpectedTimeAssessed VARCHAR(30) NULL, Nomenclature VARCHAR(35) NULL, AssessmentItemURI VARCHAR(255) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT AssessmentItem_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, Namespace) ); ALTER TABLE edfi.AssessmentItem ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.AssessmentItem ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.AssessmentItem ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentItemCategoryDescriptor -- CREATE TABLE edfi.AssessmentItemCategoryDescriptor ( AssessmentItemCategoryDescriptorId INT NOT NULL, CONSTRAINT AssessmentItemCategoryDescriptor_PK PRIMARY KEY (AssessmentItemCategoryDescriptorId) ); -- Table edfi.AssessmentItemLearningStandard -- CREATE TABLE edfi.AssessmentItemLearningStandard ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentItemLearningStandard_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, LearningStandardId, Namespace) ); ALTER TABLE edfi.AssessmentItemLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentItemPossibleResponse -- CREATE TABLE edfi.AssessmentItemPossibleResponse ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, ResponseValue VARCHAR(60) NOT NULL, ResponseDescription VARCHAR(1024) NULL, CorrectResponse BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentItemPossibleResponse_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, Namespace, ResponseValue) ); ALTER TABLE edfi.AssessmentItemPossibleResponse ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentItemResultDescriptor -- CREATE TABLE edfi.AssessmentItemResultDescriptor ( AssessmentItemResultDescriptorId INT NOT NULL, CONSTRAINT AssessmentItemResultDescriptor_PK PRIMARY KEY (AssessmentItemResultDescriptorId) ); -- Table edfi.AssessmentLanguage -- CREATE TABLE edfi.AssessmentLanguage ( AssessmentIdentifier VARCHAR(60) NOT NULL, LanguageDescriptorId INT NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentLanguage_PK PRIMARY KEY (AssessmentIdentifier, LanguageDescriptorId, Namespace) ); ALTER TABLE edfi.AssessmentLanguage ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentPerformanceLevel -- CREATE TABLE edfi.AssessmentPerformanceLevel ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, Namespace VARCHAR(255) NOT NULL, PerformanceLevelDescriptorId INT NOT NULL, MinimumScore VARCHAR(35) NULL, MaximumScore VARCHAR(35) NULL, ResultDatatypeTypeDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentPerformanceLevel_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, Namespace, PerformanceLevelDescriptorId) ); ALTER TABLE edfi.AssessmentPerformanceLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentPeriod -- CREATE TABLE edfi.AssessmentPeriod ( AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, AssessmentPeriodDescriptorId INT NOT NULL, BeginDate DATE NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentPeriod_PK PRIMARY KEY (AssessmentIdentifier, Namespace) ); ALTER TABLE edfi.AssessmentPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentPeriodDescriptor -- CREATE TABLE edfi.AssessmentPeriodDescriptor ( AssessmentPeriodDescriptorId INT NOT NULL, CONSTRAINT AssessmentPeriodDescriptor_PK PRIMARY KEY (AssessmentPeriodDescriptorId) ); -- Table edfi.AssessmentPlatformType -- CREATE TABLE edfi.AssessmentPlatformType ( AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, PlatformTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentPlatformType_PK PRIMARY KEY (AssessmentIdentifier, Namespace, PlatformTypeDescriptorId) ); ALTER TABLE edfi.AssessmentPlatformType ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentProgram -- CREATE TABLE edfi.AssessmentProgram ( AssessmentIdentifier VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, Namespace VARCHAR(255) NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentProgram_PK PRIMARY KEY (AssessmentIdentifier, EducationOrganizationId, Namespace, ProgramName, ProgramTypeDescriptorId) ); ALTER TABLE edfi.AssessmentProgram ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentReportingMethodDescriptor -- CREATE TABLE edfi.AssessmentReportingMethodDescriptor ( AssessmentReportingMethodDescriptorId INT NOT NULL, CONSTRAINT AssessmentReportingMethodDescriptor_PK PRIMARY KEY (AssessmentReportingMethodDescriptorId) ); -- Table edfi.AssessmentScore -- CREATE TABLE edfi.AssessmentScore ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, Namespace VARCHAR(255) NOT NULL, MinimumScore VARCHAR(35) NULL, MaximumScore VARCHAR(35) NULL, ResultDatatypeTypeDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentScore_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, Namespace) ); ALTER TABLE edfi.AssessmentScore ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentScoreRangeLearningStandard -- CREATE TABLE edfi.AssessmentScoreRangeLearningStandard ( AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, ScoreRangeId VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NULL, MinimumScore VARCHAR(35) NOT NULL, MaximumScore VARCHAR(35) NOT NULL, IdentificationCode VARCHAR(60) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT AssessmentScoreRangeLearningStandard_PK PRIMARY KEY (AssessmentIdentifier, Namespace, ScoreRangeId) ); ALTER TABLE edfi.AssessmentScoreRangeLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.AssessmentScoreRangeLearningStandard ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.AssessmentScoreRangeLearningStandard ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentScoreRangeLearningStandardLearningStandard -- CREATE TABLE edfi.AssessmentScoreRangeLearningStandardLearningStandard ( AssessmentIdentifier VARCHAR(60) NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, ScoreRangeId VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentScoreRangeLearningStandardLearningStandard_PK PRIMARY KEY (AssessmentIdentifier, LearningStandardId, Namespace, ScoreRangeId) ); ALTER TABLE edfi.AssessmentScoreRangeLearningStandardLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AssessmentSection -- CREATE TABLE edfi.AssessmentSection ( AssessmentIdentifier VARCHAR(60) NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT AssessmentSection_PK PRIMARY KEY (AssessmentIdentifier, LocalCourseCode, Namespace, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.AssessmentSection ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.AttemptStatusDescriptor -- CREATE TABLE edfi.AttemptStatusDescriptor ( AttemptStatusDescriptorId INT NOT NULL, CONSTRAINT AttemptStatusDescriptor_PK PRIMARY KEY (AttemptStatusDescriptorId) ); -- Table edfi.AttendanceEventCategoryDescriptor -- CREATE TABLE edfi.AttendanceEventCategoryDescriptor ( AttendanceEventCategoryDescriptorId INT NOT NULL, CONSTRAINT AttendanceEventCategoryDescriptor_PK PRIMARY KEY (AttendanceEventCategoryDescriptorId) ); -- Table edfi.BarrierToInternetAccessInResidenceDescriptor -- CREATE TABLE edfi.BarrierToInternetAccessInResidenceDescriptor ( BarrierToInternetAccessInResidenceDescriptorId INT NOT NULL, CONSTRAINT BarrierToInternetAccessInResidenceDescriptor_PK PRIMARY KEY (BarrierToInternetAccessInResidenceDescriptorId) ); -- Table edfi.BehaviorDescriptor -- CREATE TABLE edfi.BehaviorDescriptor ( BehaviorDescriptorId INT NOT NULL, CONSTRAINT BehaviorDescriptor_PK PRIMARY KEY (BehaviorDescriptorId) ); -- Table edfi.BellSchedule -- CREATE TABLE edfi.BellSchedule ( BellScheduleName VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, AlternateDayName VARCHAR(20) NULL, StartTime TIME NULL, EndTime TIME NULL, TotalInstructionalTime INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT BellSchedule_PK PRIMARY KEY (BellScheduleName, SchoolId) ); ALTER TABLE edfi.BellSchedule ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.BellSchedule ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.BellSchedule ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.BellScheduleClassPeriod -- CREATE TABLE edfi.BellScheduleClassPeriod ( BellScheduleName VARCHAR(60) NOT NULL, ClassPeriodName VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT BellScheduleClassPeriod_PK PRIMARY KEY (BellScheduleName, ClassPeriodName, SchoolId) ); ALTER TABLE edfi.BellScheduleClassPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.BellScheduleDate -- CREATE TABLE edfi.BellScheduleDate ( BellScheduleName VARCHAR(60) NOT NULL, Date DATE NOT NULL, SchoolId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT BellScheduleDate_PK PRIMARY KEY (BellScheduleName, Date, SchoolId) ); ALTER TABLE edfi.BellScheduleDate ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.BellScheduleGradeLevel -- CREATE TABLE edfi.BellScheduleGradeLevel ( BellScheduleName VARCHAR(60) NOT NULL, GradeLevelDescriptorId INT NOT NULL, SchoolId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT BellScheduleGradeLevel_PK PRIMARY KEY (BellScheduleName, GradeLevelDescriptorId, SchoolId) ); ALTER TABLE edfi.BellScheduleGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.Budget -- CREATE TABLE edfi.Budget ( AccountIdentifier VARCHAR(50) NOT NULL, AsOfDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, FiscalYear INT NOT NULL, Amount MONEY NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Budget_PK PRIMARY KEY (AccountIdentifier, AsOfDate, EducationOrganizationId, FiscalYear) ); ALTER TABLE edfi.Budget ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Budget ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Budget ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.Calendar -- CREATE TABLE edfi.Calendar ( CalendarCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, CalendarTypeDescriptorId INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Calendar_PK PRIMARY KEY (CalendarCode, SchoolId, SchoolYear) ); ALTER TABLE edfi.Calendar ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Calendar ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Calendar ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CalendarDate -- CREATE TABLE edfi.CalendarDate ( CalendarCode VARCHAR(60) NOT NULL, Date DATE NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT CalendarDate_PK PRIMARY KEY (CalendarCode, Date, SchoolId, SchoolYear) ); ALTER TABLE edfi.CalendarDate ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.CalendarDate ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.CalendarDate ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CalendarDateCalendarEvent -- CREATE TABLE edfi.CalendarDateCalendarEvent ( CalendarCode VARCHAR(60) NOT NULL, CalendarEventDescriptorId INT NOT NULL, Date DATE NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CalendarDateCalendarEvent_PK PRIMARY KEY (CalendarCode, CalendarEventDescriptorId, Date, SchoolId, SchoolYear) ); ALTER TABLE edfi.CalendarDateCalendarEvent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CalendarEventDescriptor -- CREATE TABLE edfi.CalendarEventDescriptor ( CalendarEventDescriptorId INT NOT NULL, CONSTRAINT CalendarEventDescriptor_PK PRIMARY KEY (CalendarEventDescriptorId) ); -- Table edfi.CalendarGradeLevel -- CREATE TABLE edfi.CalendarGradeLevel ( CalendarCode VARCHAR(60) NOT NULL, GradeLevelDescriptorId INT NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CalendarGradeLevel_PK PRIMARY KEY (CalendarCode, GradeLevelDescriptorId, SchoolId, SchoolYear) ); ALTER TABLE edfi.CalendarGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CalendarTypeDescriptor -- CREATE TABLE edfi.CalendarTypeDescriptor ( CalendarTypeDescriptorId INT NOT NULL, CONSTRAINT CalendarTypeDescriptor_PK PRIMARY KEY (CalendarTypeDescriptorId) ); -- Table edfi.CareerPathwayDescriptor -- CREATE TABLE edfi.CareerPathwayDescriptor ( CareerPathwayDescriptorId INT NOT NULL, CONSTRAINT CareerPathwayDescriptor_PK PRIMARY KEY (CareerPathwayDescriptorId) ); -- Table edfi.CharterApprovalAgencyTypeDescriptor -- CREATE TABLE edfi.CharterApprovalAgencyTypeDescriptor ( CharterApprovalAgencyTypeDescriptorId INT NOT NULL, CONSTRAINT CharterApprovalAgencyTypeDescriptor_PK PRIMARY KEY (CharterApprovalAgencyTypeDescriptorId) ); -- Table edfi.CharterStatusDescriptor -- CREATE TABLE edfi.CharterStatusDescriptor ( CharterStatusDescriptorId INT NOT NULL, CONSTRAINT CharterStatusDescriptor_PK PRIMARY KEY (CharterStatusDescriptorId) ); -- Table edfi.CitizenshipStatusDescriptor -- CREATE TABLE edfi.CitizenshipStatusDescriptor ( CitizenshipStatusDescriptorId INT NOT NULL, CONSTRAINT CitizenshipStatusDescriptor_PK PRIMARY KEY (CitizenshipStatusDescriptorId) ); -- Table edfi.ClassPeriod -- CREATE TABLE edfi.ClassPeriod ( ClassPeriodName VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, OfficialAttendancePeriod BOOLEAN NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT ClassPeriod_PK PRIMARY KEY (ClassPeriodName, SchoolId) ); ALTER TABLE edfi.ClassPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.ClassPeriod ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.ClassPeriod ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.ClassPeriodMeetingTime -- CREATE TABLE edfi.ClassPeriodMeetingTime ( ClassPeriodName VARCHAR(60) NOT NULL, EndTime TIME NOT NULL, SchoolId INT NOT NULL, StartTime TIME NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ClassPeriodMeetingTime_PK PRIMARY KEY (ClassPeriodName, EndTime, SchoolId, StartTime) ); ALTER TABLE edfi.ClassPeriodMeetingTime ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ClassroomPositionDescriptor -- CREATE TABLE edfi.ClassroomPositionDescriptor ( ClassroomPositionDescriptorId INT NOT NULL, CONSTRAINT ClassroomPositionDescriptor_PK PRIMARY KEY (ClassroomPositionDescriptorId) ); -- Table edfi.Cohort -- CREATE TABLE edfi.Cohort ( CohortIdentifier VARCHAR(20) NOT NULL, EducationOrganizationId INT NOT NULL, CohortDescription VARCHAR(1024) NULL, CohortTypeDescriptorId INT NOT NULL, CohortScopeDescriptorId INT NULL, AcademicSubjectDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Cohort_PK PRIMARY KEY (CohortIdentifier, EducationOrganizationId) ); ALTER TABLE edfi.Cohort ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Cohort ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Cohort ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CohortProgram -- CREATE TABLE edfi.CohortProgram ( CohortIdentifier VARCHAR(20) NOT NULL, EducationOrganizationId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CohortProgram_PK PRIMARY KEY (CohortIdentifier, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId) ); ALTER TABLE edfi.CohortProgram ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CohortScopeDescriptor -- CREATE TABLE edfi.CohortScopeDescriptor ( CohortScopeDescriptorId INT NOT NULL, CONSTRAINT CohortScopeDescriptor_PK PRIMARY KEY (CohortScopeDescriptorId) ); -- Table edfi.CohortTypeDescriptor -- CREATE TABLE edfi.CohortTypeDescriptor ( CohortTypeDescriptorId INT NOT NULL, CONSTRAINT CohortTypeDescriptor_PK PRIMARY KEY (CohortTypeDescriptorId) ); -- Table edfi.CohortYearTypeDescriptor -- CREATE TABLE edfi.CohortYearTypeDescriptor ( CohortYearTypeDescriptorId INT NOT NULL, CONSTRAINT CohortYearTypeDescriptor_PK PRIMARY KEY (CohortYearTypeDescriptorId) ); -- Table edfi.CommunityOrganization -- CREATE TABLE edfi.CommunityOrganization ( CommunityOrganizationId INT NOT NULL, CONSTRAINT CommunityOrganization_PK PRIMARY KEY (CommunityOrganizationId) ); -- Table edfi.CommunityProvider -- CREATE TABLE edfi.CommunityProvider ( CommunityProviderId INT NOT NULL, CommunityOrganizationId INT NULL, ProviderProfitabilityDescriptorId INT NULL, ProviderStatusDescriptorId INT NOT NULL, ProviderCategoryDescriptorId INT NOT NULL, SchoolIndicator BOOLEAN NULL, LicenseExemptIndicator BOOLEAN NULL, CONSTRAINT CommunityProvider_PK PRIMARY KEY (CommunityProviderId) ); -- Table edfi.CommunityProviderLicense -- CREATE TABLE edfi.CommunityProviderLicense ( CommunityProviderId INT NOT NULL, LicenseIdentifier VARCHAR(20) NOT NULL, LicensingOrganization VARCHAR(75) NOT NULL, LicenseEffectiveDate DATE NOT NULL, LicenseExpirationDate DATE NULL, LicenseIssueDate DATE NULL, LicenseStatusDescriptorId INT NULL, LicenseTypeDescriptorId INT NOT NULL, AuthorizedFacilityCapacity INT NULL, OldestAgeAuthorizedToServe INT NULL, YoungestAgeAuthorizedToServe INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT CommunityProviderLicense_PK PRIMARY KEY (CommunityProviderId, LicenseIdentifier, LicensingOrganization) ); ALTER TABLE edfi.CommunityProviderLicense ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.CommunityProviderLicense ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.CommunityProviderLicense ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CompetencyLevelDescriptor -- CREATE TABLE edfi.CompetencyLevelDescriptor ( CompetencyLevelDescriptorId INT NOT NULL, CONSTRAINT CompetencyLevelDescriptor_PK PRIMARY KEY (CompetencyLevelDescriptorId) ); -- Table edfi.CompetencyObjective -- CREATE TABLE edfi.CompetencyObjective ( EducationOrganizationId INT NOT NULL, Objective VARCHAR(60) NOT NULL, ObjectiveGradeLevelDescriptorId INT NOT NULL, CompetencyObjectiveId VARCHAR(60) NULL, Description VARCHAR(1024) NULL, SuccessCriteria VARCHAR(150) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT CompetencyObjective_PK PRIMARY KEY (EducationOrganizationId, Objective, ObjectiveGradeLevelDescriptorId) ); ALTER TABLE edfi.CompetencyObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.CompetencyObjective ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.CompetencyObjective ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.ContactTypeDescriptor -- CREATE TABLE edfi.ContactTypeDescriptor ( ContactTypeDescriptorId INT NOT NULL, CONSTRAINT ContactTypeDescriptor_PK PRIMARY KEY (ContactTypeDescriptorId) ); -- Table edfi.ContentClassDescriptor -- CREATE TABLE edfi.ContentClassDescriptor ( ContentClassDescriptorId INT NOT NULL, CONSTRAINT ContentClassDescriptor_PK PRIMARY KEY (ContentClassDescriptorId) ); -- Table edfi.ContinuationOfServicesReasonDescriptor -- CREATE TABLE edfi.ContinuationOfServicesReasonDescriptor ( ContinuationOfServicesReasonDescriptorId INT NOT NULL, CONSTRAINT ContinuationOfServicesReasonDescriptor_PK PRIMARY KEY (ContinuationOfServicesReasonDescriptorId) ); -- Table edfi.ContractedStaff -- CREATE TABLE edfi.ContractedStaff ( AccountIdentifier VARCHAR(50) NOT NULL, AsOfDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, FiscalYear INT NOT NULL, StaffUSI INT NOT NULL, AmountToDate MONEY NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT ContractedStaff_PK PRIMARY KEY (AccountIdentifier, AsOfDate, EducationOrganizationId, FiscalYear, StaffUSI) ); ALTER TABLE edfi.ContractedStaff ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.ContractedStaff ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.ContractedStaff ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CostRateDescriptor -- CREATE TABLE edfi.CostRateDescriptor ( CostRateDescriptorId INT NOT NULL, CONSTRAINT CostRateDescriptor_PK PRIMARY KEY (CostRateDescriptorId) ); -- Table edfi.CountryDescriptor -- CREATE TABLE edfi.CountryDescriptor ( CountryDescriptorId INT NOT NULL, CONSTRAINT CountryDescriptor_PK PRIMARY KEY (CountryDescriptorId) ); -- Table edfi.Course -- CREATE TABLE edfi.Course ( CourseCode VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, CourseTitle VARCHAR(60) NOT NULL, NumberOfParts INT NOT NULL, AcademicSubjectDescriptorId INT NULL, CourseDescription VARCHAR(1024) NULL, TimeRequiredForCompletion INT NULL, DateCourseAdopted DATE NULL, HighSchoolCourseRequirement BOOLEAN NULL, CourseGPAApplicabilityDescriptorId INT NULL, CourseDefinedByDescriptorId INT NULL, MinimumAvailableCredits DECIMAL(9, 3) NULL, MinimumAvailableCreditTypeDescriptorId INT NULL, MinimumAvailableCreditConversion DECIMAL(9, 2) NULL, MaximumAvailableCredits DECIMAL(9, 3) NULL, MaximumAvailableCreditTypeDescriptorId INT NULL, MaximumAvailableCreditConversion DECIMAL(9, 2) NULL, CareerPathwayDescriptorId INT NULL, MaxCompletionsForCredit INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Course_PK PRIMARY KEY (CourseCode, EducationOrganizationId) ); ALTER TABLE edfi.Course ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Course ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Course ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CourseAttemptResultDescriptor -- CREATE TABLE edfi.CourseAttemptResultDescriptor ( CourseAttemptResultDescriptorId INT NOT NULL, CONSTRAINT CourseAttemptResultDescriptor_PK PRIMARY KEY (CourseAttemptResultDescriptorId) ); -- Table edfi.CourseCompetencyLevel -- CREATE TABLE edfi.CourseCompetencyLevel ( CompetencyLevelDescriptorId INT NOT NULL, CourseCode VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseCompetencyLevel_PK PRIMARY KEY (CompetencyLevelDescriptorId, CourseCode, EducationOrganizationId) ); ALTER TABLE edfi.CourseCompetencyLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseDefinedByDescriptor -- CREATE TABLE edfi.CourseDefinedByDescriptor ( CourseDefinedByDescriptorId INT NOT NULL, CONSTRAINT CourseDefinedByDescriptor_PK PRIMARY KEY (CourseDefinedByDescriptorId) ); -- Table edfi.CourseGPAApplicabilityDescriptor -- CREATE TABLE edfi.CourseGPAApplicabilityDescriptor ( CourseGPAApplicabilityDescriptorId INT NOT NULL, CONSTRAINT CourseGPAApplicabilityDescriptor_PK PRIMARY KEY (CourseGPAApplicabilityDescriptorId) ); -- Table edfi.CourseIdentificationCode -- CREATE TABLE edfi.CourseIdentificationCode ( CourseCode VARCHAR(60) NOT NULL, CourseIdentificationSystemDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, AssigningOrganizationIdentificationCode VARCHAR(60) NULL, CourseCatalogURL VARCHAR(255) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseIdentificationCode_PK PRIMARY KEY (CourseCode, CourseIdentificationSystemDescriptorId, EducationOrganizationId) ); ALTER TABLE edfi.CourseIdentificationCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseIdentificationSystemDescriptor -- CREATE TABLE edfi.CourseIdentificationSystemDescriptor ( CourseIdentificationSystemDescriptorId INT NOT NULL, CONSTRAINT CourseIdentificationSystemDescriptor_PK PRIMARY KEY (CourseIdentificationSystemDescriptorId) ); -- Table edfi.CourseLearningObjective -- CREATE TABLE edfi.CourseLearningObjective ( CourseCode VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseLearningObjective_PK PRIMARY KEY (CourseCode, EducationOrganizationId, LearningObjectiveId, Namespace) ); ALTER TABLE edfi.CourseLearningObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseLearningStandard -- CREATE TABLE edfi.CourseLearningStandard ( CourseCode VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseLearningStandard_PK PRIMARY KEY (CourseCode, EducationOrganizationId, LearningStandardId) ); ALTER TABLE edfi.CourseLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseLevelCharacteristic -- CREATE TABLE edfi.CourseLevelCharacteristic ( CourseCode VARCHAR(60) NOT NULL, CourseLevelCharacteristicDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseLevelCharacteristic_PK PRIMARY KEY (CourseCode, CourseLevelCharacteristicDescriptorId, EducationOrganizationId) ); ALTER TABLE edfi.CourseLevelCharacteristic ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseLevelCharacteristicDescriptor -- CREATE TABLE edfi.CourseLevelCharacteristicDescriptor ( CourseLevelCharacteristicDescriptorId INT NOT NULL, CONSTRAINT CourseLevelCharacteristicDescriptor_PK PRIMARY KEY (CourseLevelCharacteristicDescriptorId) ); -- Table edfi.CourseOfferedGradeLevel -- CREATE TABLE edfi.CourseOfferedGradeLevel ( CourseCode VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, GradeLevelDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseOfferedGradeLevel_PK PRIMARY KEY (CourseCode, EducationOrganizationId, GradeLevelDescriptorId) ); ALTER TABLE edfi.CourseOfferedGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseOffering -- CREATE TABLE edfi.CourseOffering ( LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SessionName VARCHAR(60) NOT NULL, LocalCourseTitle VARCHAR(60) NULL, InstructionalTimePlanned INT NULL, CourseCode VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT CourseOffering_PK PRIMARY KEY (LocalCourseCode, SchoolId, SchoolYear, SessionName) ); ALTER TABLE edfi.CourseOffering ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.CourseOffering ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.CourseOffering ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CourseOfferingCourseLevelCharacteristic -- CREATE TABLE edfi.CourseOfferingCourseLevelCharacteristic ( CourseLevelCharacteristicDescriptorId INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseOfferingCourseLevelCharacteristic_PK PRIMARY KEY (CourseLevelCharacteristicDescriptorId, LocalCourseCode, SchoolId, SchoolYear, SessionName) ); ALTER TABLE edfi.CourseOfferingCourseLevelCharacteristic ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseOfferingCurriculumUsed -- CREATE TABLE edfi.CourseOfferingCurriculumUsed ( CurriculumUsedDescriptorId INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseOfferingCurriculumUsed_PK PRIMARY KEY (CurriculumUsedDescriptorId, LocalCourseCode, SchoolId, SchoolYear, SessionName) ); ALTER TABLE edfi.CourseOfferingCurriculumUsed ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseOfferingOfferedGradeLevel -- CREATE TABLE edfi.CourseOfferingOfferedGradeLevel ( GradeLevelDescriptorId INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseOfferingOfferedGradeLevel_PK PRIMARY KEY (GradeLevelDescriptorId, LocalCourseCode, SchoolId, SchoolYear, SessionName) ); ALTER TABLE edfi.CourseOfferingOfferedGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseRepeatCodeDescriptor -- CREATE TABLE edfi.CourseRepeatCodeDescriptor ( CourseRepeatCodeDescriptorId INT NOT NULL, CONSTRAINT CourseRepeatCodeDescriptor_PK PRIMARY KEY (CourseRepeatCodeDescriptorId) ); -- Table edfi.CourseTranscript -- CREATE TABLE edfi.CourseTranscript ( CourseAttemptResultDescriptorId INT NOT NULL, CourseCode VARCHAR(60) NOT NULL, CourseEducationOrganizationId INT NOT NULL, EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, AttemptedCredits DECIMAL(9, 3) NULL, AttemptedCreditTypeDescriptorId INT NULL, AttemptedCreditConversion DECIMAL(9, 2) NULL, EarnedCredits DECIMAL(9, 3) NOT NULL, EarnedCreditTypeDescriptorId INT NULL, EarnedCreditConversion DECIMAL(9, 2) NULL, WhenTakenGradeLevelDescriptorId INT NULL, MethodCreditEarnedDescriptorId INT NULL, FinalLetterGradeEarned VARCHAR(20) NULL, FinalNumericGradeEarned DECIMAL(9, 2) NULL, CourseRepeatCodeDescriptorId INT NULL, CourseTitle VARCHAR(60) NULL, AlternativeCourseTitle VARCHAR(60) NULL, AlternativeCourseCode VARCHAR(60) NULL, ExternalEducationOrganizationId INT NULL, ExternalEducationOrganizationNameOfInstitution VARCHAR(75) NULL, AssigningOrganizationIdentificationCode VARCHAR(60) NULL, CourseCatalogURL VARCHAR(255) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT CourseTranscript_PK PRIMARY KEY (CourseAttemptResultDescriptorId, CourseCode, CourseEducationOrganizationId, EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.CourseTranscript ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.CourseTranscript ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.CourseTranscript ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CourseTranscriptAcademicSubject -- CREATE TABLE edfi.CourseTranscriptAcademicSubject ( AcademicSubjectDescriptorId INT NOT NULL, CourseAttemptResultDescriptorId INT NOT NULL, CourseCode VARCHAR(60) NOT NULL, CourseEducationOrganizationId INT NOT NULL, EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseTranscriptAcademicSubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, CourseAttemptResultDescriptorId, CourseCode, CourseEducationOrganizationId, EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.CourseTranscriptAcademicSubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseTranscriptAlternativeCourseIdentificationCode -- CREATE TABLE edfi.CourseTranscriptAlternativeCourseIdentificationCode ( CourseAttemptResultDescriptorId INT NOT NULL, CourseCode VARCHAR(60) NOT NULL, CourseEducationOrganizationId INT NOT NULL, CourseIdentificationSystemDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, AssigningOrganizationIdentificationCode VARCHAR(60) NULL, CourseCatalogURL VARCHAR(255) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseTranscriptAlternativeCourseIdentificationCode_PK PRIMARY KEY (CourseAttemptResultDescriptorId, CourseCode, CourseEducationOrganizationId, CourseIdentificationSystemDescriptorId, EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.CourseTranscriptAlternativeCourseIdentificationCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseTranscriptCreditCategory -- CREATE TABLE edfi.CourseTranscriptCreditCategory ( CourseAttemptResultDescriptorId INT NOT NULL, CourseCode VARCHAR(60) NOT NULL, CourseEducationOrganizationId INT NOT NULL, CreditCategoryDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseTranscriptCreditCategory_PK PRIMARY KEY (CourseAttemptResultDescriptorId, CourseCode, CourseEducationOrganizationId, CreditCategoryDescriptorId, EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.CourseTranscriptCreditCategory ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseTranscriptEarnedAdditionalCredits -- CREATE TABLE edfi.CourseTranscriptEarnedAdditionalCredits ( AdditionalCreditTypeDescriptorId INT NOT NULL, CourseAttemptResultDescriptorId INT NOT NULL, CourseCode VARCHAR(60) NOT NULL, CourseEducationOrganizationId INT NOT NULL, EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, Credits DECIMAL(9, 3) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseTranscriptEarnedAdditionalCredits_PK PRIMARY KEY (AdditionalCreditTypeDescriptorId, CourseAttemptResultDescriptorId, CourseCode, CourseEducationOrganizationId, EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.CourseTranscriptEarnedAdditionalCredits ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CourseTranscriptPartialCourseTranscriptAwards -- CREATE TABLE edfi.CourseTranscriptPartialCourseTranscriptAwards ( AwardDate DATE NOT NULL, CourseAttemptResultDescriptorId INT NOT NULL, CourseCode VARCHAR(60) NOT NULL, CourseEducationOrganizationId INT NOT NULL, EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, EarnedCredits DECIMAL(9, 3) NOT NULL, MethodCreditEarnedDescriptorId INT NULL, LetterGradeEarned VARCHAR(20) NULL, NumericGradeEarned VARCHAR(20) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CourseTranscriptPartialCourseTranscriptAwards_PK PRIMARY KEY (AwardDate, CourseAttemptResultDescriptorId, CourseCode, CourseEducationOrganizationId, EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.CourseTranscriptPartialCourseTranscriptAwards ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.Credential -- CREATE TABLE edfi.Credential ( CredentialIdentifier VARCHAR(60) NOT NULL, StateOfIssueStateAbbreviationDescriptorId INT NOT NULL, EffectiveDate DATE NULL, ExpirationDate DATE NULL, CredentialFieldDescriptorId INT NULL, IssuanceDate DATE NOT NULL, CredentialTypeDescriptorId INT NOT NULL, TeachingCredentialDescriptorId INT NULL, TeachingCredentialBasisDescriptorId INT NULL, Namespace VARCHAR(255) NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Credential_PK PRIMARY KEY (CredentialIdentifier, StateOfIssueStateAbbreviationDescriptorId) ); ALTER TABLE edfi.Credential ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Credential ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Credential ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.CredentialAcademicSubject -- CREATE TABLE edfi.CredentialAcademicSubject ( AcademicSubjectDescriptorId INT NOT NULL, CredentialIdentifier VARCHAR(60) NOT NULL, StateOfIssueStateAbbreviationDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CredentialAcademicSubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, CredentialIdentifier, StateOfIssueStateAbbreviationDescriptorId) ); ALTER TABLE edfi.CredentialAcademicSubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CredentialEndorsement -- CREATE TABLE edfi.CredentialEndorsement ( CredentialEndorsement VARCHAR(255) NOT NULL, CredentialIdentifier VARCHAR(60) NOT NULL, StateOfIssueStateAbbreviationDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CredentialEndorsement_PK PRIMARY KEY (CredentialEndorsement, CredentialIdentifier, StateOfIssueStateAbbreviationDescriptorId) ); ALTER TABLE edfi.CredentialEndorsement ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CredentialFieldDescriptor -- CREATE TABLE edfi.CredentialFieldDescriptor ( CredentialFieldDescriptorId INT NOT NULL, CONSTRAINT CredentialFieldDescriptor_PK PRIMARY KEY (CredentialFieldDescriptorId) ); -- Table edfi.CredentialGradeLevel -- CREATE TABLE edfi.CredentialGradeLevel ( CredentialIdentifier VARCHAR(60) NOT NULL, GradeLevelDescriptorId INT NOT NULL, StateOfIssueStateAbbreviationDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT CredentialGradeLevel_PK PRIMARY KEY (CredentialIdentifier, GradeLevelDescriptorId, StateOfIssueStateAbbreviationDescriptorId) ); ALTER TABLE edfi.CredentialGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.CredentialTypeDescriptor -- CREATE TABLE edfi.CredentialTypeDescriptor ( CredentialTypeDescriptorId INT NOT NULL, CONSTRAINT CredentialTypeDescriptor_PK PRIMARY KEY (CredentialTypeDescriptorId) ); -- Table edfi.CreditCategoryDescriptor -- CREATE TABLE edfi.CreditCategoryDescriptor ( CreditCategoryDescriptorId INT NOT NULL, CONSTRAINT CreditCategoryDescriptor_PK PRIMARY KEY (CreditCategoryDescriptorId) ); -- Table edfi.CreditTypeDescriptor -- CREATE TABLE edfi.CreditTypeDescriptor ( CreditTypeDescriptorId INT NOT NULL, CONSTRAINT CreditTypeDescriptor_PK PRIMARY KEY (CreditTypeDescriptorId) ); -- Table edfi.CTEProgramServiceDescriptor -- CREATE TABLE edfi.CTEProgramServiceDescriptor ( CTEProgramServiceDescriptorId INT NOT NULL, CONSTRAINT CTEProgramServiceDescriptor_PK PRIMARY KEY (CTEProgramServiceDescriptorId) ); -- Table edfi.CurriculumUsedDescriptor -- CREATE TABLE edfi.CurriculumUsedDescriptor ( CurriculumUsedDescriptorId INT NOT NULL, CONSTRAINT CurriculumUsedDescriptor_PK PRIMARY KEY (CurriculumUsedDescriptorId) ); -- Table edfi.DeliveryMethodDescriptor -- CREATE TABLE edfi.DeliveryMethodDescriptor ( DeliveryMethodDescriptorId INT NOT NULL, CONSTRAINT DeliveryMethodDescriptor_PK PRIMARY KEY (DeliveryMethodDescriptorId) ); -- Table edfi.Descriptor -- CREATE TABLE edfi.Descriptor ( DescriptorId SERIAL NOT NULL, Namespace VARCHAR(255) NOT NULL, CodeValue VARCHAR(50) NOT NULL, ShortDescription VARCHAR(75) NOT NULL, Description VARCHAR(1024) NULL, PriorDescriptorId INT NULL, EffectiveBeginDate DATE NULL, EffectiveEndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Descriptor_PK PRIMARY KEY (DescriptorId), CONSTRAINT Descriptor_AK UNIQUE (CodeValue, Namespace) ); ALTER TABLE edfi.Descriptor ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Descriptor ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Descriptor ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.DiagnosisDescriptor -- CREATE TABLE edfi.DiagnosisDescriptor ( DiagnosisDescriptorId INT NOT NULL, CONSTRAINT DiagnosisDescriptor_PK PRIMARY KEY (DiagnosisDescriptorId) ); -- Table edfi.DiplomaLevelDescriptor -- CREATE TABLE edfi.DiplomaLevelDescriptor ( DiplomaLevelDescriptorId INT NOT NULL, CONSTRAINT DiplomaLevelDescriptor_PK PRIMARY KEY (DiplomaLevelDescriptorId) ); -- Table edfi.DiplomaTypeDescriptor -- CREATE TABLE edfi.DiplomaTypeDescriptor ( DiplomaTypeDescriptorId INT NOT NULL, CONSTRAINT DiplomaTypeDescriptor_PK PRIMARY KEY (DiplomaTypeDescriptorId) ); -- Table edfi.DisabilityDescriptor -- CREATE TABLE edfi.DisabilityDescriptor ( DisabilityDescriptorId INT NOT NULL, CONSTRAINT DisabilityDescriptor_PK PRIMARY KEY (DisabilityDescriptorId) ); -- Table edfi.DisabilityDesignationDescriptor -- CREATE TABLE edfi.DisabilityDesignationDescriptor ( DisabilityDesignationDescriptorId INT NOT NULL, CONSTRAINT DisabilityDesignationDescriptor_PK PRIMARY KEY (DisabilityDesignationDescriptorId) ); -- Table edfi.DisabilityDeterminationSourceTypeDescriptor -- CREATE TABLE edfi.DisabilityDeterminationSourceTypeDescriptor ( DisabilityDeterminationSourceTypeDescriptorId INT NOT NULL, CONSTRAINT DisabilityDeterminationSourceTypeDescriptor_PK PRIMARY KEY (DisabilityDeterminationSourceTypeDescriptorId) ); -- Table edfi.DisciplineAction -- CREATE TABLE edfi.DisciplineAction ( DisciplineActionIdentifier VARCHAR(20) NOT NULL, DisciplineDate DATE NOT NULL, StudentUSI INT NOT NULL, DisciplineActionLength DECIMAL(5, 2) NULL, ActualDisciplineActionLength DECIMAL(5, 2) NULL, DisciplineActionLengthDifferenceReasonDescriptorId INT NULL, RelatedToZeroTolerancePolicy BOOLEAN NULL, ResponsibilitySchoolId INT NOT NULL, AssignmentSchoolId INT NULL, ReceivedEducationServicesDuringExpulsion BOOLEAN NULL, IEPPlacementMeetingIndicator BOOLEAN NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT DisciplineAction_PK PRIMARY KEY (DisciplineActionIdentifier, DisciplineDate, StudentUSI) ); ALTER TABLE edfi.DisciplineAction ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.DisciplineAction ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.DisciplineAction ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineActionDiscipline -- CREATE TABLE edfi.DisciplineActionDiscipline ( DisciplineActionIdentifier VARCHAR(20) NOT NULL, DisciplineDate DATE NOT NULL, DisciplineDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT DisciplineActionDiscipline_PK PRIMARY KEY (DisciplineActionIdentifier, DisciplineDate, DisciplineDescriptorId, StudentUSI) ); ALTER TABLE edfi.DisciplineActionDiscipline ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineActionLengthDifferenceReasonDescriptor -- CREATE TABLE edfi.DisciplineActionLengthDifferenceReasonDescriptor ( DisciplineActionLengthDifferenceReasonDescriptorId INT NOT NULL, CONSTRAINT DisciplineActionLengthDifferenceReasonDescriptor_PK PRIMARY KEY (DisciplineActionLengthDifferenceReasonDescriptorId) ); -- Table edfi.DisciplineActionStaff -- CREATE TABLE edfi.DisciplineActionStaff ( DisciplineActionIdentifier VARCHAR(20) NOT NULL, DisciplineDate DATE NOT NULL, StaffUSI INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT DisciplineActionStaff_PK PRIMARY KEY (DisciplineActionIdentifier, DisciplineDate, StaffUSI, StudentUSI) ); ALTER TABLE edfi.DisciplineActionStaff ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineActionStudentDisciplineIncidentAssociation -- CREATE TABLE edfi.DisciplineActionStudentDisciplineIncidentAssociation ( DisciplineActionIdentifier VARCHAR(20) NOT NULL, DisciplineDate DATE NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT DisciplineActionStudentDisciplineIncidentAssociation_PK PRIMARY KEY (DisciplineActionIdentifier, DisciplineDate, IncidentIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.DisciplineActionStudentDisciplineIncidentAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineActionStudentDisciplineIncidentBehaviorAssociation -- CREATE TABLE edfi.DisciplineActionStudentDisciplineIncidentBehaviorAssociation ( BehaviorDescriptorId INT NOT NULL, DisciplineActionIdentifier VARCHAR(20) NOT NULL, DisciplineDate DATE NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT DisciplineActionStudentDisciplineIncidentBehaviorAssociation_PK PRIMARY KEY (BehaviorDescriptorId, DisciplineActionIdentifier, DisciplineDate, IncidentIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.DisciplineActionStudentDisciplineIncidentBehaviorAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineDescriptor -- CREATE TABLE edfi.DisciplineDescriptor ( DisciplineDescriptorId INT NOT NULL, CONSTRAINT DisciplineDescriptor_PK PRIMARY KEY (DisciplineDescriptorId) ); -- Table edfi.DisciplineIncident -- CREATE TABLE edfi.DisciplineIncident ( IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, IncidentDate DATE NOT NULL, IncidentTime TIME NULL, IncidentLocationDescriptorId INT NULL, IncidentDescription VARCHAR(1024) NULL, ReporterDescriptionDescriptorId INT NULL, ReporterName VARCHAR(75) NULL, ReportedToLawEnforcement BOOLEAN NULL, CaseNumber VARCHAR(20) NULL, IncidentCost MONEY NULL, StaffUSI INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT DisciplineIncident_PK PRIMARY KEY (IncidentIdentifier, SchoolId) ); ALTER TABLE edfi.DisciplineIncident ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.DisciplineIncident ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.DisciplineIncident ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineIncidentBehavior -- CREATE TABLE edfi.DisciplineIncidentBehavior ( BehaviorDescriptorId INT NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, BehaviorDetailedDescription VARCHAR(1024) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT DisciplineIncidentBehavior_PK PRIMARY KEY (BehaviorDescriptorId, IncidentIdentifier, SchoolId) ); ALTER TABLE edfi.DisciplineIncidentBehavior ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineIncidentExternalParticipant -- CREATE TABLE edfi.DisciplineIncidentExternalParticipant ( DisciplineIncidentParticipationCodeDescriptorId INT NOT NULL, FirstName VARCHAR(75) NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, LastSurname VARCHAR(75) NOT NULL, SchoolId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT DisciplineIncidentExternalParticipant_PK PRIMARY KEY (DisciplineIncidentParticipationCodeDescriptorId, FirstName, IncidentIdentifier, LastSurname, SchoolId) ); ALTER TABLE edfi.DisciplineIncidentExternalParticipant ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.DisciplineIncidentParticipationCodeDescriptor -- CREATE TABLE edfi.DisciplineIncidentParticipationCodeDescriptor ( DisciplineIncidentParticipationCodeDescriptorId INT NOT NULL, CONSTRAINT DisciplineIncidentParticipationCodeDescriptor_PK PRIMARY KEY (DisciplineIncidentParticipationCodeDescriptorId) ); -- Table edfi.DisciplineIncidentWeapon -- CREATE TABLE edfi.DisciplineIncidentWeapon ( IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, WeaponDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT DisciplineIncidentWeapon_PK PRIMARY KEY (IncidentIdentifier, SchoolId, WeaponDescriptorId) ); ALTER TABLE edfi.DisciplineIncidentWeapon ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationalEnvironmentDescriptor -- CREATE TABLE edfi.EducationalEnvironmentDescriptor ( EducationalEnvironmentDescriptorId INT NOT NULL, CONSTRAINT EducationalEnvironmentDescriptor_PK PRIMARY KEY (EducationalEnvironmentDescriptorId) ); -- Table edfi.EducationContent -- CREATE TABLE edfi.EducationContent ( ContentIdentifier VARCHAR(225) NOT NULL, LearningResourceMetadataURI VARCHAR(255) NULL, ShortDescription VARCHAR(75) NULL, Description VARCHAR(1024) NULL, AdditionalAuthorsIndicator BOOLEAN NULL, Publisher VARCHAR(50) NULL, TimeRequired VARCHAR(30) NULL, InteractivityStyleDescriptorId INT NULL, ContentClassDescriptorId INT NULL, UseRightsURL VARCHAR(255) NULL, PublicationDate DATE NULL, PublicationYear SMALLINT NULL, Version VARCHAR(10) NULL, LearningStandardId VARCHAR(60) NULL, Cost MONEY NULL, CostRateDescriptorId INT NULL, Namespace VARCHAR(255) NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT EducationContent_PK PRIMARY KEY (ContentIdentifier) ); ALTER TABLE edfi.EducationContent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.EducationContent ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.EducationContent ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.EducationContentAppropriateGradeLevel -- CREATE TABLE edfi.EducationContentAppropriateGradeLevel ( ContentIdentifier VARCHAR(225) NOT NULL, GradeLevelDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationContentAppropriateGradeLevel_PK PRIMARY KEY (ContentIdentifier, GradeLevelDescriptorId) ); ALTER TABLE edfi.EducationContentAppropriateGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationContentAppropriateSex -- CREATE TABLE edfi.EducationContentAppropriateSex ( ContentIdentifier VARCHAR(225) NOT NULL, SexDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationContentAppropriateSex_PK PRIMARY KEY (ContentIdentifier, SexDescriptorId) ); ALTER TABLE edfi.EducationContentAppropriateSex ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationContentAuthor -- CREATE TABLE edfi.EducationContentAuthor ( Author VARCHAR(100) NOT NULL, ContentIdentifier VARCHAR(225) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationContentAuthor_PK PRIMARY KEY (Author, ContentIdentifier) ); ALTER TABLE edfi.EducationContentAuthor ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationContentDerivativeSourceEducationContent -- CREATE TABLE edfi.EducationContentDerivativeSourceEducationContent ( ContentIdentifier VARCHAR(225) NOT NULL, DerivativeSourceContentIdentifier VARCHAR(225) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationContentDerivativeSourceEducationContent_PK PRIMARY KEY (ContentIdentifier, DerivativeSourceContentIdentifier) ); ALTER TABLE edfi.EducationContentDerivativeSourceEducationContent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationContentDerivativeSourceLearningResourceMetadataURI -- CREATE TABLE edfi.EducationContentDerivativeSourceLearningResourceMetadataURI ( ContentIdentifier VARCHAR(225) NOT NULL, DerivativeSourceLearningResourceMetadataURI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationContentDerivativeSourceLearningResourceMetadataURI_PK PRIMARY KEY (ContentIdentifier, DerivativeSourceLearningResourceMetadataURI) ); ALTER TABLE edfi.EducationContentDerivativeSourceLearningResourceMetadataURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationContentDerivativeSourceURI -- CREATE TABLE edfi.EducationContentDerivativeSourceURI ( ContentIdentifier VARCHAR(225) NOT NULL, DerivativeSourceURI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationContentDerivativeSourceURI_PK PRIMARY KEY (ContentIdentifier, DerivativeSourceURI) ); ALTER TABLE edfi.EducationContentDerivativeSourceURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationContentLanguage -- CREATE TABLE edfi.EducationContentLanguage ( ContentIdentifier VARCHAR(225) NOT NULL, LanguageDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationContentLanguage_PK PRIMARY KEY (ContentIdentifier, LanguageDescriptorId) ); ALTER TABLE edfi.EducationContentLanguage ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganization -- CREATE TABLE edfi.EducationOrganization ( EducationOrganizationId INT NOT NULL, NameOfInstitution VARCHAR(75) NOT NULL, ShortNameOfInstitution VARCHAR(75) NULL, WebSite VARCHAR(255) NULL, OperationalStatusDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT EducationOrganization_PK PRIMARY KEY (EducationOrganizationId) ); ALTER TABLE edfi.EducationOrganization ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.EducationOrganization ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.EducationOrganization ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationAddress -- CREATE TABLE edfi.EducationOrganizationAddress ( AddressTypeDescriptorId INT NOT NULL, City VARCHAR(30) NOT NULL, EducationOrganizationId INT NOT NULL, PostalCode VARCHAR(17) NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, StreetNumberName VARCHAR(150) NOT NULL, ApartmentRoomSuiteNumber VARCHAR(50) NULL, BuildingSiteNumber VARCHAR(20) NULL, NameOfCounty VARCHAR(30) NULL, CountyFIPSCode VARCHAR(5) NULL, Latitude VARCHAR(20) NULL, Longitude VARCHAR(20) NULL, DoNotPublishIndicator BOOLEAN NULL, CongressionalDistrict VARCHAR(30) NULL, LocaleDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationAddress_PK PRIMARY KEY (AddressTypeDescriptorId, City, EducationOrganizationId, PostalCode, StateAbbreviationDescriptorId, StreetNumberName) ); ALTER TABLE edfi.EducationOrganizationAddress ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationAddressPeriod -- CREATE TABLE edfi.EducationOrganizationAddressPeriod ( AddressTypeDescriptorId INT NOT NULL, BeginDate DATE NOT NULL, City VARCHAR(30) NOT NULL, EducationOrganizationId INT NOT NULL, PostalCode VARCHAR(17) NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, StreetNumberName VARCHAR(150) NOT NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationAddressPeriod_PK PRIMARY KEY (AddressTypeDescriptorId, BeginDate, City, EducationOrganizationId, PostalCode, StateAbbreviationDescriptorId, StreetNumberName) ); ALTER TABLE edfi.EducationOrganizationAddressPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationCategory -- CREATE TABLE edfi.EducationOrganizationCategory ( EducationOrganizationCategoryDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationCategory_PK PRIMARY KEY (EducationOrganizationCategoryDescriptorId, EducationOrganizationId) ); ALTER TABLE edfi.EducationOrganizationCategory ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationCategoryDescriptor -- CREATE TABLE edfi.EducationOrganizationCategoryDescriptor ( EducationOrganizationCategoryDescriptorId INT NOT NULL, CONSTRAINT EducationOrganizationCategoryDescriptor_PK PRIMARY KEY (EducationOrganizationCategoryDescriptorId) ); -- Table edfi.EducationOrganizationIdentificationCode -- CREATE TABLE edfi.EducationOrganizationIdentificationCode ( EducationOrganizationId INT NOT NULL, EducationOrganizationIdentificationSystemDescriptorId INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationIdentificationCode_PK PRIMARY KEY (EducationOrganizationId, EducationOrganizationIdentificationSystemDescriptorId) ); ALTER TABLE edfi.EducationOrganizationIdentificationCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationIdentificationSystemDescriptor -- CREATE TABLE edfi.EducationOrganizationIdentificationSystemDescriptor ( EducationOrganizationIdentificationSystemDescriptorId INT NOT NULL, CONSTRAINT EducationOrganizationIdentificationSystemDescriptor_PK PRIMARY KEY (EducationOrganizationIdentificationSystemDescriptorId) ); -- Table edfi.EducationOrganizationIndicator -- CREATE TABLE edfi.EducationOrganizationIndicator ( EducationOrganizationId INT NOT NULL, IndicatorDescriptorId INT NOT NULL, DesignatedBy VARCHAR(60) NULL, IndicatorValue VARCHAR(60) NULL, IndicatorLevelDescriptorId INT NULL, IndicatorGroupDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationIndicator_PK PRIMARY KEY (EducationOrganizationId, IndicatorDescriptorId) ); ALTER TABLE edfi.EducationOrganizationIndicator ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationIndicatorPeriod -- CREATE TABLE edfi.EducationOrganizationIndicatorPeriod ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, IndicatorDescriptorId INT NOT NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationIndicatorPeriod_PK PRIMARY KEY (BeginDate, EducationOrganizationId, IndicatorDescriptorId) ); ALTER TABLE edfi.EducationOrganizationIndicatorPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationInstitutionTelephone -- CREATE TABLE edfi.EducationOrganizationInstitutionTelephone ( EducationOrganizationId INT NOT NULL, InstitutionTelephoneNumberTypeDescriptorId INT NOT NULL, TelephoneNumber VARCHAR(24) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationInstitutionTelephone_PK PRIMARY KEY (EducationOrganizationId, InstitutionTelephoneNumberTypeDescriptorId) ); ALTER TABLE edfi.EducationOrganizationInstitutionTelephone ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationInternationalAddress -- CREATE TABLE edfi.EducationOrganizationInternationalAddress ( AddressTypeDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, AddressLine1 VARCHAR(150) NOT NULL, AddressLine2 VARCHAR(150) NULL, AddressLine3 VARCHAR(150) NULL, AddressLine4 VARCHAR(150) NULL, CountryDescriptorId INT NOT NULL, Latitude VARCHAR(20) NULL, Longitude VARCHAR(20) NULL, BeginDate DATE NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT EducationOrganizationInternationalAddress_PK PRIMARY KEY (AddressTypeDescriptorId, EducationOrganizationId) ); ALTER TABLE edfi.EducationOrganizationInternationalAddress ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationInterventionPrescriptionAssociation -- CREATE TABLE edfi.EducationOrganizationInterventionPrescriptionAssociation ( EducationOrganizationId INT NOT NULL, InterventionPrescriptionEducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, BeginDate DATE NULL, EndDate DATE NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT EducationOrganizationInterventionPrescriptionAssociation_PK PRIMARY KEY (EducationOrganizationId, InterventionPrescriptionEducationOrganizationId, InterventionPrescriptionIdentificationCode) ); ALTER TABLE edfi.EducationOrganizationInterventionPrescriptionAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.EducationOrganizationInterventionPrescriptionAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.EducationOrganizationInterventionPrescriptionAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationNetwork -- CREATE TABLE edfi.EducationOrganizationNetwork ( EducationOrganizationNetworkId INT NOT NULL, NetworkPurposeDescriptorId INT NOT NULL, CONSTRAINT EducationOrganizationNetwork_PK PRIMARY KEY (EducationOrganizationNetworkId) ); -- Table edfi.EducationOrganizationNetworkAssociation -- CREATE TABLE edfi.EducationOrganizationNetworkAssociation ( EducationOrganizationNetworkId INT NOT NULL, MemberEducationOrganizationId INT NOT NULL, BeginDate DATE NULL, EndDate DATE NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT EducationOrganizationNetworkAssociation_PK PRIMARY KEY (EducationOrganizationNetworkId, MemberEducationOrganizationId) ); ALTER TABLE edfi.EducationOrganizationNetworkAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.EducationOrganizationNetworkAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.EducationOrganizationNetworkAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.EducationOrganizationPeerAssociation -- CREATE TABLE edfi.EducationOrganizationPeerAssociation ( EducationOrganizationId INT NOT NULL, PeerEducationOrganizationId INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT EducationOrganizationPeerAssociation_PK PRIMARY KEY (EducationOrganizationId, PeerEducationOrganizationId) ); ALTER TABLE edfi.EducationOrganizationPeerAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.EducationOrganizationPeerAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.EducationOrganizationPeerAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.EducationPlanDescriptor -- CREATE TABLE edfi.EducationPlanDescriptor ( EducationPlanDescriptorId INT NOT NULL, CONSTRAINT EducationPlanDescriptor_PK PRIMARY KEY (EducationPlanDescriptorId) ); -- Table edfi.EducationServiceCenter -- CREATE TABLE edfi.EducationServiceCenter ( EducationServiceCenterId INT NOT NULL, StateEducationAgencyId INT NULL, CONSTRAINT EducationServiceCenter_PK PRIMARY KEY (EducationServiceCenterId) ); -- Table edfi.ElectronicMailTypeDescriptor -- CREATE TABLE edfi.ElectronicMailTypeDescriptor ( ElectronicMailTypeDescriptorId INT NOT NULL, CONSTRAINT ElectronicMailTypeDescriptor_PK PRIMARY KEY (ElectronicMailTypeDescriptorId) ); -- Table edfi.EmploymentStatusDescriptor -- CREATE TABLE edfi.EmploymentStatusDescriptor ( EmploymentStatusDescriptorId INT NOT NULL, CONSTRAINT EmploymentStatusDescriptor_PK PRIMARY KEY (EmploymentStatusDescriptorId) ); -- Table edfi.EntryGradeLevelReasonDescriptor -- CREATE TABLE edfi.EntryGradeLevelReasonDescriptor ( EntryGradeLevelReasonDescriptorId INT NOT NULL, CONSTRAINT EntryGradeLevelReasonDescriptor_PK PRIMARY KEY (EntryGradeLevelReasonDescriptorId) ); -- Table edfi.EntryTypeDescriptor -- CREATE TABLE edfi.EntryTypeDescriptor ( EntryTypeDescriptorId INT NOT NULL, CONSTRAINT EntryTypeDescriptor_PK PRIMARY KEY (EntryTypeDescriptorId) ); -- Table edfi.EventCircumstanceDescriptor -- CREATE TABLE edfi.EventCircumstanceDescriptor ( EventCircumstanceDescriptorId INT NOT NULL, CONSTRAINT EventCircumstanceDescriptor_PK PRIMARY KEY (EventCircumstanceDescriptorId) ); -- Table edfi.ExitWithdrawTypeDescriptor -- CREATE TABLE edfi.ExitWithdrawTypeDescriptor ( ExitWithdrawTypeDescriptorId INT NOT NULL, CONSTRAINT ExitWithdrawTypeDescriptor_PK PRIMARY KEY (ExitWithdrawTypeDescriptorId) ); -- Table edfi.FeederSchoolAssociation -- CREATE TABLE edfi.FeederSchoolAssociation ( BeginDate DATE NOT NULL, FeederSchoolId INT NOT NULL, SchoolId INT NOT NULL, EndDate DATE NULL, FeederRelationshipDescription VARCHAR(1024) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT FeederSchoolAssociation_PK PRIMARY KEY (BeginDate, FeederSchoolId, SchoolId) ); ALTER TABLE edfi.FeederSchoolAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.FeederSchoolAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.FeederSchoolAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.GeneralStudentProgramAssociation -- CREATE TABLE edfi.GeneralStudentProgramAssociation ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, EndDate DATE NULL, ReasonExitedDescriptorId INT NULL, ServedOutsideOfRegularSession BOOLEAN NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT GeneralStudentProgramAssociation_PK PRIMARY KEY (BeginDate, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI) ); ALTER TABLE edfi.GeneralStudentProgramAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.GeneralStudentProgramAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.GeneralStudentProgramAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.GeneralStudentProgramAssociationParticipationStatus -- CREATE TABLE edfi.GeneralStudentProgramAssociationParticipationStatus ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, ParticipationStatusDescriptorId INT NOT NULL, StatusBeginDate DATE NULL, StatusEndDate DATE NULL, DesignatedBy VARCHAR(60) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GeneralStudentProgramAssociationParticipationStatus_PK PRIMARY KEY (BeginDate, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI) ); ALTER TABLE edfi.GeneralStudentProgramAssociationParticipationStatus ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GeneralStudentProgramAssociationProgramParticipationStatus -- CREATE TABLE edfi.GeneralStudentProgramAssociationProgramParticipationStatus ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, ParticipationStatusDescriptorId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StatusBeginDate DATE NOT NULL, StudentUSI INT NOT NULL, StatusEndDate DATE NULL, DesignatedBy VARCHAR(60) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GeneralStudentProgramAssociationProgramParticipationStatus_PK PRIMARY KEY (BeginDate, EducationOrganizationId, ParticipationStatusDescriptorId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StatusBeginDate, StudentUSI) ); ALTER TABLE edfi.GeneralStudentProgramAssociationProgramParticipationStatus ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.Grade -- CREATE TABLE edfi.Grade ( BeginDate DATE NOT NULL, GradeTypeDescriptorId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, LetterGradeEarned VARCHAR(20) NULL, NumericGradeEarned DECIMAL(9, 2) NULL, DiagnosticStatement VARCHAR(1024) NULL, PerformanceBaseConversionDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Grade_PK PRIMARY KEY (BeginDate, GradeTypeDescriptorId, GradingPeriodDescriptorId, GradingPeriodSchoolYear, GradingPeriodSequence, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName, StudentUSI) ); ALTER TABLE edfi.Grade ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Grade ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Grade ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.GradebookEntry -- CREATE TABLE edfi.GradebookEntry ( DateAssigned DATE NOT NULL, GradebookEntryTitle VARCHAR(60) NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, GradebookEntryTypeDescriptorId INT NULL, Description VARCHAR(1024) NULL, GradingPeriodDescriptorId INT NULL, PeriodSequence INT NULL, DueDate DATE NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT GradebookEntry_PK PRIMARY KEY (DateAssigned, GradebookEntryTitle, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.GradebookEntry ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.GradebookEntry ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.GradebookEntry ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.GradebookEntryLearningObjective -- CREATE TABLE edfi.GradebookEntryLearningObjective ( DateAssigned DATE NOT NULL, GradebookEntryTitle VARCHAR(60) NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GradebookEntryLearningObjective_PK PRIMARY KEY (DateAssigned, GradebookEntryTitle, LearningObjectiveId, LocalCourseCode, Namespace, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.GradebookEntryLearningObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GradebookEntryLearningStandard -- CREATE TABLE edfi.GradebookEntryLearningStandard ( DateAssigned DATE NOT NULL, GradebookEntryTitle VARCHAR(60) NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GradebookEntryLearningStandard_PK PRIMARY KEY (DateAssigned, GradebookEntryTitle, LearningStandardId, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.GradebookEntryLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GradebookEntryTypeDescriptor -- CREATE TABLE edfi.GradebookEntryTypeDescriptor ( GradebookEntryTypeDescriptorId INT NOT NULL, CONSTRAINT GradebookEntryTypeDescriptor_PK PRIMARY KEY (GradebookEntryTypeDescriptorId) ); -- Table edfi.GradeLearningStandardGrade -- CREATE TABLE edfi.GradeLearningStandardGrade ( BeginDate DATE NOT NULL, GradeTypeDescriptorId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, LetterGradeEarned VARCHAR(20) NULL, NumericGradeEarned DECIMAL(9, 2) NULL, DiagnosticStatement VARCHAR(1024) NULL, PerformanceBaseConversionDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GradeLearningStandardGrade_PK PRIMARY KEY (BeginDate, GradeTypeDescriptorId, GradingPeriodDescriptorId, GradingPeriodSchoolYear, GradingPeriodSequence, LearningStandardId, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName, StudentUSI) ); ALTER TABLE edfi.GradeLearningStandardGrade ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GradeLevelDescriptor -- CREATE TABLE edfi.GradeLevelDescriptor ( GradeLevelDescriptorId INT NOT NULL, CONSTRAINT GradeLevelDescriptor_PK PRIMARY KEY (GradeLevelDescriptorId) ); -- Table edfi.GradePointAverageTypeDescriptor -- CREATE TABLE edfi.GradePointAverageTypeDescriptor ( GradePointAverageTypeDescriptorId INT NOT NULL, CONSTRAINT GradePointAverageTypeDescriptor_PK PRIMARY KEY (GradePointAverageTypeDescriptorId) ); -- Table edfi.GradeTypeDescriptor -- CREATE TABLE edfi.GradeTypeDescriptor ( GradeTypeDescriptorId INT NOT NULL, CONSTRAINT GradeTypeDescriptor_PK PRIMARY KEY (GradeTypeDescriptorId) ); -- Table edfi.GradingPeriod -- CREATE TABLE edfi.GradingPeriod ( GradingPeriodDescriptorId INT NOT NULL, PeriodSequence INT NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, BeginDate DATE NOT NULL, EndDate DATE NOT NULL, TotalInstructionalDays INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT GradingPeriod_PK PRIMARY KEY (GradingPeriodDescriptorId, PeriodSequence, SchoolId, SchoolYear) ); ALTER TABLE edfi.GradingPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.GradingPeriod ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.GradingPeriod ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.GradingPeriodDescriptor -- CREATE TABLE edfi.GradingPeriodDescriptor ( GradingPeriodDescriptorId INT NOT NULL, CONSTRAINT GradingPeriodDescriptor_PK PRIMARY KEY (GradingPeriodDescriptorId) ); -- Table edfi.GraduationPlan -- CREATE TABLE edfi.GraduationPlan ( EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, IndividualPlan BOOLEAN NULL, TotalRequiredCredits DECIMAL(9, 3) NOT NULL, TotalRequiredCreditTypeDescriptorId INT NULL, TotalRequiredCreditConversion DECIMAL(9, 2) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT GraduationPlan_PK PRIMARY KEY (EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear) ); ALTER TABLE edfi.GraduationPlan ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.GraduationPlan ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.GraduationPlan ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanCreditsByCourse -- CREATE TABLE edfi.GraduationPlanCreditsByCourse ( CourseSetName VARCHAR(120) NOT NULL, EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, Credits DECIMAL(9, 3) NOT NULL, CreditTypeDescriptorId INT NULL, CreditConversion DECIMAL(9, 2) NULL, WhenTakenGradeLevelDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GraduationPlanCreditsByCourse_PK PRIMARY KEY (CourseSetName, EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear) ); ALTER TABLE edfi.GraduationPlanCreditsByCourse ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanCreditsByCourseCourse -- CREATE TABLE edfi.GraduationPlanCreditsByCourseCourse ( CourseCode VARCHAR(60) NOT NULL, CourseEducationOrganizationId INT NOT NULL, CourseSetName VARCHAR(120) NOT NULL, EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GraduationPlanCreditsByCourseCourse_PK PRIMARY KEY (CourseCode, CourseEducationOrganizationId, CourseSetName, EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear) ); ALTER TABLE edfi.GraduationPlanCreditsByCourseCourse ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanCreditsByCreditCategory -- CREATE TABLE edfi.GraduationPlanCreditsByCreditCategory ( CreditCategoryDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, Credits DECIMAL(9, 3) NOT NULL, CreditTypeDescriptorId INT NULL, CreditConversion DECIMAL(9, 2) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GraduationPlanCreditsByCreditCategory_PK PRIMARY KEY (CreditCategoryDescriptorId, EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear) ); ALTER TABLE edfi.GraduationPlanCreditsByCreditCategory ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanCreditsBySubject -- CREATE TABLE edfi.GraduationPlanCreditsBySubject ( AcademicSubjectDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, Credits DECIMAL(9, 3) NOT NULL, CreditTypeDescriptorId INT NULL, CreditConversion DECIMAL(9, 2) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GraduationPlanCreditsBySubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear) ); ALTER TABLE edfi.GraduationPlanCreditsBySubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanRequiredAssessment -- CREATE TABLE edfi.GraduationPlanRequiredAssessment ( AssessmentIdentifier VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GraduationPlanRequiredAssessment_PK PRIMARY KEY (AssessmentIdentifier, EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear, Namespace) ); ALTER TABLE edfi.GraduationPlanRequiredAssessment ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanRequiredAssessmentPerformanceLevel -- CREATE TABLE edfi.GraduationPlanRequiredAssessmentPerformanceLevel ( AssessmentIdentifier VARCHAR(60) NOT NULL, EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, Namespace VARCHAR(255) NOT NULL, PerformanceLevelDescriptorId INT NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, MinimumScore VARCHAR(35) NULL, MaximumScore VARCHAR(35) NULL, ResultDatatypeTypeDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GraduationPlanRequiredAssessmentPerformanceLevel_PK PRIMARY KEY (AssessmentIdentifier, EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear, Namespace) ); ALTER TABLE edfi.GraduationPlanRequiredAssessmentPerformanceLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanRequiredAssessmentScore -- CREATE TABLE edfi.GraduationPlanRequiredAssessmentScore ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, GraduationPlanTypeDescriptorId INT NOT NULL, GraduationSchoolYear SMALLINT NOT NULL, Namespace VARCHAR(255) NOT NULL, MinimumScore VARCHAR(35) NULL, MaximumScore VARCHAR(35) NULL, ResultDatatypeTypeDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT GraduationPlanRequiredAssessmentScore_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, EducationOrganizationId, GraduationPlanTypeDescriptorId, GraduationSchoolYear, Namespace) ); ALTER TABLE edfi.GraduationPlanRequiredAssessmentScore ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.GraduationPlanTypeDescriptor -- CREATE TABLE edfi.GraduationPlanTypeDescriptor ( GraduationPlanTypeDescriptorId INT NOT NULL, CONSTRAINT GraduationPlanTypeDescriptor_PK PRIMARY KEY (GraduationPlanTypeDescriptorId) ); -- Table edfi.GunFreeSchoolsActReportingStatusDescriptor -- CREATE TABLE edfi.GunFreeSchoolsActReportingStatusDescriptor ( GunFreeSchoolsActReportingStatusDescriptorId INT NOT NULL, CONSTRAINT GunFreeSchoolsActReportingStatusDescriptor_PK PRIMARY KEY (GunFreeSchoolsActReportingStatusDescriptorId) ); -- Table edfi.HomelessPrimaryNighttimeResidenceDescriptor -- CREATE TABLE edfi.HomelessPrimaryNighttimeResidenceDescriptor ( HomelessPrimaryNighttimeResidenceDescriptorId INT NOT NULL, CONSTRAINT HomelessPrimaryNighttimeResidenceDescriptor_PK PRIMARY KEY (HomelessPrimaryNighttimeResidenceDescriptorId) ); -- Table edfi.HomelessProgramServiceDescriptor -- CREATE TABLE edfi.HomelessProgramServiceDescriptor ( HomelessProgramServiceDescriptorId INT NOT NULL, CONSTRAINT HomelessProgramServiceDescriptor_PK PRIMARY KEY (HomelessProgramServiceDescriptorId) ); -- Table edfi.IdentificationDocumentUseDescriptor -- CREATE TABLE edfi.IdentificationDocumentUseDescriptor ( IdentificationDocumentUseDescriptorId INT NOT NULL, CONSTRAINT IdentificationDocumentUseDescriptor_PK PRIMARY KEY (IdentificationDocumentUseDescriptorId) ); -- Table edfi.IncidentLocationDescriptor -- CREATE TABLE edfi.IncidentLocationDescriptor ( IncidentLocationDescriptorId INT NOT NULL, CONSTRAINT IncidentLocationDescriptor_PK PRIMARY KEY (IncidentLocationDescriptorId) ); -- Table edfi.IndicatorDescriptor -- CREATE TABLE edfi.IndicatorDescriptor ( IndicatorDescriptorId INT NOT NULL, CONSTRAINT IndicatorDescriptor_PK PRIMARY KEY (IndicatorDescriptorId) ); -- Table edfi.IndicatorGroupDescriptor -- CREATE TABLE edfi.IndicatorGroupDescriptor ( IndicatorGroupDescriptorId INT NOT NULL, CONSTRAINT IndicatorGroupDescriptor_PK PRIMARY KEY (IndicatorGroupDescriptorId) ); -- Table edfi.IndicatorLevelDescriptor -- CREATE TABLE edfi.IndicatorLevelDescriptor ( IndicatorLevelDescriptorId INT NOT NULL, CONSTRAINT IndicatorLevelDescriptor_PK PRIMARY KEY (IndicatorLevelDescriptorId) ); -- Table edfi.InstitutionTelephoneNumberTypeDescriptor -- CREATE TABLE edfi.InstitutionTelephoneNumberTypeDescriptor ( InstitutionTelephoneNumberTypeDescriptorId INT NOT NULL, CONSTRAINT InstitutionTelephoneNumberTypeDescriptor_PK PRIMARY KEY (InstitutionTelephoneNumberTypeDescriptorId) ); -- Table edfi.InteractivityStyleDescriptor -- CREATE TABLE edfi.InteractivityStyleDescriptor ( InteractivityStyleDescriptorId INT NOT NULL, CONSTRAINT InteractivityStyleDescriptor_PK PRIMARY KEY (InteractivityStyleDescriptorId) ); -- Table edfi.InternetAccessDescriptor -- CREATE TABLE edfi.InternetAccessDescriptor ( InternetAccessDescriptorId INT NOT NULL, CONSTRAINT InternetAccessDescriptor_PK PRIMARY KEY (InternetAccessDescriptorId) ); -- Table edfi.InternetAccessTypeInResidenceDescriptor -- CREATE TABLE edfi.InternetAccessTypeInResidenceDescriptor ( InternetAccessTypeInResidenceDescriptorId INT NOT NULL, CONSTRAINT InternetAccessTypeInResidenceDescriptor_PK PRIMARY KEY (InternetAccessTypeInResidenceDescriptorId) ); -- Table edfi.InternetPerformanceInResidenceDescriptor -- CREATE TABLE edfi.InternetPerformanceInResidenceDescriptor ( InternetPerformanceInResidenceDescriptorId INT NOT NULL, CONSTRAINT InternetPerformanceInResidenceDescriptor_PK PRIMARY KEY (InternetPerformanceInResidenceDescriptorId) ); -- Table edfi.Intervention -- CREATE TABLE edfi.Intervention ( EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, InterventionClassDescriptorId INT NOT NULL, DeliveryMethodDescriptorId INT NOT NULL, BeginDate DATE NOT NULL, EndDate DATE NULL, MinDosage INT NULL, MaxDosage INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Intervention_PK PRIMARY KEY (EducationOrganizationId, InterventionIdentificationCode) ); ALTER TABLE edfi.Intervention ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Intervention ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Intervention ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.InterventionAppropriateGradeLevel -- CREATE TABLE edfi.InterventionAppropriateGradeLevel ( EducationOrganizationId INT NOT NULL, GradeLevelDescriptorId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionAppropriateGradeLevel_PK PRIMARY KEY (EducationOrganizationId, GradeLevelDescriptorId, InterventionIdentificationCode) ); ALTER TABLE edfi.InterventionAppropriateGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionAppropriateSex -- CREATE TABLE edfi.InterventionAppropriateSex ( EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, SexDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionAppropriateSex_PK PRIMARY KEY (EducationOrganizationId, InterventionIdentificationCode, SexDescriptorId) ); ALTER TABLE edfi.InterventionAppropriateSex ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionClassDescriptor -- CREATE TABLE edfi.InterventionClassDescriptor ( InterventionClassDescriptorId INT NOT NULL, CONSTRAINT InterventionClassDescriptor_PK PRIMARY KEY (InterventionClassDescriptorId) ); -- Table edfi.InterventionDiagnosis -- CREATE TABLE edfi.InterventionDiagnosis ( DiagnosisDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionDiagnosis_PK PRIMARY KEY (DiagnosisDescriptorId, EducationOrganizationId, InterventionIdentificationCode) ); ALTER TABLE edfi.InterventionDiagnosis ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionEducationContent -- CREATE TABLE edfi.InterventionEducationContent ( ContentIdentifier VARCHAR(225) NOT NULL, EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionEducationContent_PK PRIMARY KEY (ContentIdentifier, EducationOrganizationId, InterventionIdentificationCode) ); ALTER TABLE edfi.InterventionEducationContent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionEffectivenessRatingDescriptor -- CREATE TABLE edfi.InterventionEffectivenessRatingDescriptor ( InterventionEffectivenessRatingDescriptorId INT NOT NULL, CONSTRAINT InterventionEffectivenessRatingDescriptor_PK PRIMARY KEY (InterventionEffectivenessRatingDescriptorId) ); -- Table edfi.InterventionInterventionPrescription -- CREATE TABLE edfi.InterventionInterventionPrescription ( EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, InterventionPrescriptionEducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionInterventionPrescription_PK PRIMARY KEY (EducationOrganizationId, InterventionIdentificationCode, InterventionPrescriptionEducationOrganizationId, InterventionPrescriptionIdentificationCode) ); ALTER TABLE edfi.InterventionInterventionPrescription ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionLearningResourceMetadataURI -- CREATE TABLE edfi.InterventionLearningResourceMetadataURI ( EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, LearningResourceMetadataURI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionLearningResourceMetadataURI_PK PRIMARY KEY (EducationOrganizationId, InterventionIdentificationCode, LearningResourceMetadataURI) ); ALTER TABLE edfi.InterventionLearningResourceMetadataURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionMeetingTime -- CREATE TABLE edfi.InterventionMeetingTime ( EducationOrganizationId INT NOT NULL, EndTime TIME NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, StartTime TIME NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionMeetingTime_PK PRIMARY KEY (EducationOrganizationId, EndTime, InterventionIdentificationCode, StartTime) ); ALTER TABLE edfi.InterventionMeetingTime ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPopulationServed -- CREATE TABLE edfi.InterventionPopulationServed ( EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, PopulationServedDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPopulationServed_PK PRIMARY KEY (EducationOrganizationId, InterventionIdentificationCode, PopulationServedDescriptorId) ); ALTER TABLE edfi.InterventionPopulationServed ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescription -- CREATE TABLE edfi.InterventionPrescription ( EducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, InterventionClassDescriptorId INT NOT NULL, DeliveryMethodDescriptorId INT NOT NULL, MinDosage INT NULL, MaxDosage INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT InterventionPrescription_PK PRIMARY KEY (EducationOrganizationId, InterventionPrescriptionIdentificationCode) ); ALTER TABLE edfi.InterventionPrescription ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.InterventionPrescription ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.InterventionPrescription ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescriptionAppropriateGradeLevel -- CREATE TABLE edfi.InterventionPrescriptionAppropriateGradeLevel ( EducationOrganizationId INT NOT NULL, GradeLevelDescriptorId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPrescriptionAppropriateGradeLevel_PK PRIMARY KEY (EducationOrganizationId, GradeLevelDescriptorId, InterventionPrescriptionIdentificationCode) ); ALTER TABLE edfi.InterventionPrescriptionAppropriateGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescriptionAppropriateSex -- CREATE TABLE edfi.InterventionPrescriptionAppropriateSex ( EducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, SexDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPrescriptionAppropriateSex_PK PRIMARY KEY (EducationOrganizationId, InterventionPrescriptionIdentificationCode, SexDescriptorId) ); ALTER TABLE edfi.InterventionPrescriptionAppropriateSex ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescriptionDiagnosis -- CREATE TABLE edfi.InterventionPrescriptionDiagnosis ( DiagnosisDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPrescriptionDiagnosis_PK PRIMARY KEY (DiagnosisDescriptorId, EducationOrganizationId, InterventionPrescriptionIdentificationCode) ); ALTER TABLE edfi.InterventionPrescriptionDiagnosis ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescriptionEducationContent -- CREATE TABLE edfi.InterventionPrescriptionEducationContent ( ContentIdentifier VARCHAR(225) NOT NULL, EducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPrescriptionEducationContent_PK PRIMARY KEY (ContentIdentifier, EducationOrganizationId, InterventionPrescriptionIdentificationCode) ); ALTER TABLE edfi.InterventionPrescriptionEducationContent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescriptionLearningResourceMetadataURI -- CREATE TABLE edfi.InterventionPrescriptionLearningResourceMetadataURI ( EducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, LearningResourceMetadataURI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPrescriptionLearningResourceMetadataURI_PK PRIMARY KEY (EducationOrganizationId, InterventionPrescriptionIdentificationCode, LearningResourceMetadataURI) ); ALTER TABLE edfi.InterventionPrescriptionLearningResourceMetadataURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescriptionPopulationServed -- CREATE TABLE edfi.InterventionPrescriptionPopulationServed ( EducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, PopulationServedDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPrescriptionPopulationServed_PK PRIMARY KEY (EducationOrganizationId, InterventionPrescriptionIdentificationCode, PopulationServedDescriptorId) ); ALTER TABLE edfi.InterventionPrescriptionPopulationServed ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionPrescriptionURI -- CREATE TABLE edfi.InterventionPrescriptionURI ( EducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, URI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionPrescriptionURI_PK PRIMARY KEY (EducationOrganizationId, InterventionPrescriptionIdentificationCode, URI) ); ALTER TABLE edfi.InterventionPrescriptionURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStaff -- CREATE TABLE edfi.InterventionStaff ( EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStaff_PK PRIMARY KEY (EducationOrganizationId, InterventionIdentificationCode, StaffUSI) ); ALTER TABLE edfi.InterventionStaff ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudy -- CREATE TABLE edfi.InterventionStudy ( EducationOrganizationId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, InterventionPrescriptionEducationOrganizationId INT NOT NULL, InterventionPrescriptionIdentificationCode VARCHAR(60) NOT NULL, Participants INT NOT NULL, DeliveryMethodDescriptorId INT NOT NULL, InterventionClassDescriptorId INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT InterventionStudy_PK PRIMARY KEY (EducationOrganizationId, InterventionStudyIdentificationCode) ); ALTER TABLE edfi.InterventionStudy ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.InterventionStudy ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.InterventionStudy ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyAppropriateGradeLevel -- CREATE TABLE edfi.InterventionStudyAppropriateGradeLevel ( EducationOrganizationId INT NOT NULL, GradeLevelDescriptorId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyAppropriateGradeLevel_PK PRIMARY KEY (EducationOrganizationId, GradeLevelDescriptorId, InterventionStudyIdentificationCode) ); ALTER TABLE edfi.InterventionStudyAppropriateGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyAppropriateSex -- CREATE TABLE edfi.InterventionStudyAppropriateSex ( EducationOrganizationId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, SexDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyAppropriateSex_PK PRIMARY KEY (EducationOrganizationId, InterventionStudyIdentificationCode, SexDescriptorId) ); ALTER TABLE edfi.InterventionStudyAppropriateSex ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyEducationContent -- CREATE TABLE edfi.InterventionStudyEducationContent ( ContentIdentifier VARCHAR(225) NOT NULL, EducationOrganizationId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyEducationContent_PK PRIMARY KEY (ContentIdentifier, EducationOrganizationId, InterventionStudyIdentificationCode) ); ALTER TABLE edfi.InterventionStudyEducationContent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyInterventionEffectiveness -- CREATE TABLE edfi.InterventionStudyInterventionEffectiveness ( DiagnosisDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, GradeLevelDescriptorId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, PopulationServedDescriptorId INT NOT NULL, ImprovementIndex INT NULL, InterventionEffectivenessRatingDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyInterventionEffectiveness_PK PRIMARY KEY (DiagnosisDescriptorId, EducationOrganizationId, GradeLevelDescriptorId, InterventionStudyIdentificationCode, PopulationServedDescriptorId) ); ALTER TABLE edfi.InterventionStudyInterventionEffectiveness ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyLearningResourceMetadataURI -- CREATE TABLE edfi.InterventionStudyLearningResourceMetadataURI ( EducationOrganizationId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, LearningResourceMetadataURI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyLearningResourceMetadataURI_PK PRIMARY KEY (EducationOrganizationId, InterventionStudyIdentificationCode, LearningResourceMetadataURI) ); ALTER TABLE edfi.InterventionStudyLearningResourceMetadataURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyPopulationServed -- CREATE TABLE edfi.InterventionStudyPopulationServed ( EducationOrganizationId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, PopulationServedDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyPopulationServed_PK PRIMARY KEY (EducationOrganizationId, InterventionStudyIdentificationCode, PopulationServedDescriptorId) ); ALTER TABLE edfi.InterventionStudyPopulationServed ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyStateAbbreviation -- CREATE TABLE edfi.InterventionStudyStateAbbreviation ( EducationOrganizationId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyStateAbbreviation_PK PRIMARY KEY (EducationOrganizationId, InterventionStudyIdentificationCode, StateAbbreviationDescriptorId) ); ALTER TABLE edfi.InterventionStudyStateAbbreviation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionStudyURI -- CREATE TABLE edfi.InterventionStudyURI ( EducationOrganizationId INT NOT NULL, InterventionStudyIdentificationCode VARCHAR(60) NOT NULL, URI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionStudyURI_PK PRIMARY KEY (EducationOrganizationId, InterventionStudyIdentificationCode, URI) ); ALTER TABLE edfi.InterventionStudyURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.InterventionURI -- CREATE TABLE edfi.InterventionURI ( EducationOrganizationId INT NOT NULL, InterventionIdentificationCode VARCHAR(60) NOT NULL, URI VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT InterventionURI_PK PRIMARY KEY (EducationOrganizationId, InterventionIdentificationCode, URI) ); ALTER TABLE edfi.InterventionURI ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LanguageDescriptor -- CREATE TABLE edfi.LanguageDescriptor ( LanguageDescriptorId INT NOT NULL, CONSTRAINT LanguageDescriptor_PK PRIMARY KEY (LanguageDescriptorId) ); -- Table edfi.LanguageInstructionProgramServiceDescriptor -- CREATE TABLE edfi.LanguageInstructionProgramServiceDescriptor ( LanguageInstructionProgramServiceDescriptorId INT NOT NULL, CONSTRAINT LanguageInstructionProgramServiceDescriptor_PK PRIMARY KEY (LanguageInstructionProgramServiceDescriptorId) ); -- Table edfi.LanguageUseDescriptor -- CREATE TABLE edfi.LanguageUseDescriptor ( LanguageUseDescriptorId INT NOT NULL, CONSTRAINT LanguageUseDescriptor_PK PRIMARY KEY (LanguageUseDescriptorId) ); -- Table edfi.LearningObjective -- CREATE TABLE edfi.LearningObjective ( LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, Objective VARCHAR(60) NOT NULL, Description VARCHAR(1024) NULL, Nomenclature VARCHAR(35) NULL, SuccessCriteria VARCHAR(150) NULL, ParentLearningObjectiveId VARCHAR(60) NULL, ParentNamespace VARCHAR(255) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT LearningObjective_PK PRIMARY KEY (LearningObjectiveId, Namespace) ); ALTER TABLE edfi.LearningObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.LearningObjective ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.LearningObjective ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.LearningObjectiveAcademicSubject -- CREATE TABLE edfi.LearningObjectiveAcademicSubject ( AcademicSubjectDescriptorId INT NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningObjectiveAcademicSubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, LearningObjectiveId, Namespace) ); ALTER TABLE edfi.LearningObjectiveAcademicSubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningObjectiveContentStandard -- CREATE TABLE edfi.LearningObjectiveContentStandard ( LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, Title VARCHAR(75) NOT NULL, Version VARCHAR(50) NULL, URI VARCHAR(255) NULL, PublicationDate DATE NULL, PublicationYear SMALLINT NULL, PublicationStatusDescriptorId INT NULL, MandatingEducationOrganizationId INT NULL, BeginDate DATE NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningObjectiveContentStandard_PK PRIMARY KEY (LearningObjectiveId, Namespace) ); ALTER TABLE edfi.LearningObjectiveContentStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningObjectiveContentStandardAuthor -- CREATE TABLE edfi.LearningObjectiveContentStandardAuthor ( Author VARCHAR(100) NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningObjectiveContentStandardAuthor_PK PRIMARY KEY (Author, LearningObjectiveId, Namespace) ); ALTER TABLE edfi.LearningObjectiveContentStandardAuthor ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningObjectiveGradeLevel -- CREATE TABLE edfi.LearningObjectiveGradeLevel ( GradeLevelDescriptorId INT NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningObjectiveGradeLevel_PK PRIMARY KEY (GradeLevelDescriptorId, LearningObjectiveId, Namespace) ); ALTER TABLE edfi.LearningObjectiveGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningObjectiveLearningStandard -- CREATE TABLE edfi.LearningObjectiveLearningStandard ( LearningObjectiveId VARCHAR(60) NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningObjectiveLearningStandard_PK PRIMARY KEY (LearningObjectiveId, LearningStandardId, Namespace) ); ALTER TABLE edfi.LearningObjectiveLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandard -- CREATE TABLE edfi.LearningStandard ( LearningStandardId VARCHAR(60) NOT NULL, Description VARCHAR(1024) NOT NULL, LearningStandardItemCode VARCHAR(60) NULL, URI VARCHAR(255) NULL, CourseTitle VARCHAR(60) NULL, SuccessCriteria VARCHAR(150) NULL, ParentLearningStandardId VARCHAR(60) NULL, Namespace VARCHAR(255) NOT NULL, LearningStandardCategoryDescriptorId INT NULL, LearningStandardScopeDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT LearningStandard_PK PRIMARY KEY (LearningStandardId) ); ALTER TABLE edfi.LearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.LearningStandard ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.LearningStandard ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardAcademicSubject -- CREATE TABLE edfi.LearningStandardAcademicSubject ( AcademicSubjectDescriptorId INT NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningStandardAcademicSubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, LearningStandardId) ); ALTER TABLE edfi.LearningStandardAcademicSubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardCategoryDescriptor -- CREATE TABLE edfi.LearningStandardCategoryDescriptor ( LearningStandardCategoryDescriptorId INT NOT NULL, CONSTRAINT LearningStandardCategoryDescriptor_PK PRIMARY KEY (LearningStandardCategoryDescriptorId) ); -- Table edfi.LearningStandardContentStandard -- CREATE TABLE edfi.LearningStandardContentStandard ( LearningStandardId VARCHAR(60) NOT NULL, Title VARCHAR(75) NOT NULL, Version VARCHAR(50) NULL, URI VARCHAR(255) NULL, PublicationDate DATE NULL, PublicationYear SMALLINT NULL, PublicationStatusDescriptorId INT NULL, MandatingEducationOrganizationId INT NULL, BeginDate DATE NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningStandardContentStandard_PK PRIMARY KEY (LearningStandardId) ); ALTER TABLE edfi.LearningStandardContentStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardContentStandardAuthor -- CREATE TABLE edfi.LearningStandardContentStandardAuthor ( Author VARCHAR(100) NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningStandardContentStandardAuthor_PK PRIMARY KEY (Author, LearningStandardId) ); ALTER TABLE edfi.LearningStandardContentStandardAuthor ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardEquivalenceAssociation -- CREATE TABLE edfi.LearningStandardEquivalenceAssociation ( Namespace VARCHAR(255) NOT NULL, SourceLearningStandardId VARCHAR(60) NOT NULL, TargetLearningStandardId VARCHAR(60) NOT NULL, EffectiveDate DATE NULL, LearningStandardEquivalenceStrengthDescriptorId INT NULL, LearningStandardEquivalenceStrengthDescription VARCHAR(255) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT LearningStandardEquivalenceAssociation_PK PRIMARY KEY (Namespace, SourceLearningStandardId, TargetLearningStandardId) ); ALTER TABLE edfi.LearningStandardEquivalenceAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.LearningStandardEquivalenceAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.LearningStandardEquivalenceAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardEquivalenceStrengthDescriptor -- CREATE TABLE edfi.LearningStandardEquivalenceStrengthDescriptor ( LearningStandardEquivalenceStrengthDescriptorId INT NOT NULL, CONSTRAINT LearningStandardEquivalenceStrengthDescriptor_PK PRIMARY KEY (LearningStandardEquivalenceStrengthDescriptorId) ); -- Table edfi.LearningStandardGradeLevel -- CREATE TABLE edfi.LearningStandardGradeLevel ( GradeLevelDescriptorId INT NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningStandardGradeLevel_PK PRIMARY KEY (GradeLevelDescriptorId, LearningStandardId) ); ALTER TABLE edfi.LearningStandardGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardIdentificationCode -- CREATE TABLE edfi.LearningStandardIdentificationCode ( ContentStandardName VARCHAR(65) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningStandardIdentificationCode_PK PRIMARY KEY (ContentStandardName, IdentificationCode, LearningStandardId) ); ALTER TABLE edfi.LearningStandardIdentificationCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardPrerequisiteLearningStandard -- CREATE TABLE edfi.LearningStandardPrerequisiteLearningStandard ( LearningStandardId VARCHAR(60) NOT NULL, PrerequisiteLearningStandardId VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LearningStandardPrerequisiteLearningStandard_PK PRIMARY KEY (LearningStandardId, PrerequisiteLearningStandardId) ); ALTER TABLE edfi.LearningStandardPrerequisiteLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LearningStandardScopeDescriptor -- CREATE TABLE edfi.LearningStandardScopeDescriptor ( LearningStandardScopeDescriptorId INT NOT NULL, CONSTRAINT LearningStandardScopeDescriptor_PK PRIMARY KEY (LearningStandardScopeDescriptorId) ); -- Table edfi.LevelOfEducationDescriptor -- CREATE TABLE edfi.LevelOfEducationDescriptor ( LevelOfEducationDescriptorId INT NOT NULL, CONSTRAINT LevelOfEducationDescriptor_PK PRIMARY KEY (LevelOfEducationDescriptorId) ); -- Table edfi.LicenseStatusDescriptor -- CREATE TABLE edfi.LicenseStatusDescriptor ( LicenseStatusDescriptorId INT NOT NULL, CONSTRAINT LicenseStatusDescriptor_PK PRIMARY KEY (LicenseStatusDescriptorId) ); -- Table edfi.LicenseTypeDescriptor -- CREATE TABLE edfi.LicenseTypeDescriptor ( LicenseTypeDescriptorId INT NOT NULL, CONSTRAINT LicenseTypeDescriptor_PK PRIMARY KEY (LicenseTypeDescriptorId) ); -- Table edfi.LimitedEnglishProficiencyDescriptor -- CREATE TABLE edfi.LimitedEnglishProficiencyDescriptor ( LimitedEnglishProficiencyDescriptorId INT NOT NULL, CONSTRAINT LimitedEnglishProficiencyDescriptor_PK PRIMARY KEY (LimitedEnglishProficiencyDescriptorId) ); -- Table edfi.LocaleDescriptor -- CREATE TABLE edfi.LocaleDescriptor ( LocaleDescriptorId INT NOT NULL, CONSTRAINT LocaleDescriptor_PK PRIMARY KEY (LocaleDescriptorId) ); -- Table edfi.LocalEducationAgency -- CREATE TABLE edfi.LocalEducationAgency ( LocalEducationAgencyId INT NOT NULL, LocalEducationAgencyCategoryDescriptorId INT NOT NULL, CharterStatusDescriptorId INT NULL, ParentLocalEducationAgencyId INT NULL, EducationServiceCenterId INT NULL, StateEducationAgencyId INT NULL, CONSTRAINT LocalEducationAgency_PK PRIMARY KEY (LocalEducationAgencyId) ); -- Table edfi.LocalEducationAgencyAccountability -- CREATE TABLE edfi.LocalEducationAgencyAccountability ( LocalEducationAgencyId INT NOT NULL, SchoolYear SMALLINT NOT NULL, GunFreeSchoolsActReportingStatusDescriptorId INT NULL, SchoolChoiceImplementStatusDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LocalEducationAgencyAccountability_PK PRIMARY KEY (LocalEducationAgencyId, SchoolYear) ); ALTER TABLE edfi.LocalEducationAgencyAccountability ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.LocalEducationAgencyCategoryDescriptor -- CREATE TABLE edfi.LocalEducationAgencyCategoryDescriptor ( LocalEducationAgencyCategoryDescriptorId INT NOT NULL, CONSTRAINT LocalEducationAgencyCategoryDescriptor_PK PRIMARY KEY (LocalEducationAgencyCategoryDescriptorId) ); -- Table edfi.LocalEducationAgencyFederalFunds -- CREATE TABLE edfi.LocalEducationAgencyFederalFunds ( FiscalYear INT NOT NULL, LocalEducationAgencyId INT NOT NULL, InnovativeDollarsSpent MONEY NULL, InnovativeDollarsSpentStrategicPriorities MONEY NULL, InnovativeProgramsFundsReceived MONEY NULL, SchoolImprovementAllocation MONEY NULL, SchoolImprovementReservedFundsPercentage DECIMAL(5, 4) NULL, SupplementalEducationalServicesFundsSpent MONEY NULL, SupplementalEducationalServicesPerPupilExpenditure MONEY NULL, StateAssessmentAdministrationFunding DECIMAL(5, 4) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT LocalEducationAgencyFederalFunds_PK PRIMARY KEY (FiscalYear, LocalEducationAgencyId) ); ALTER TABLE edfi.LocalEducationAgencyFederalFunds ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.Location -- CREATE TABLE edfi.Location ( ClassroomIdentificationCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, MaximumNumberOfSeats INT NULL, OptimalNumberOfSeats INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Location_PK PRIMARY KEY (ClassroomIdentificationCode, SchoolId) ); ALTER TABLE edfi.Location ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Location ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Location ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.MagnetSpecialProgramEmphasisSchoolDescriptor -- CREATE TABLE edfi.MagnetSpecialProgramEmphasisSchoolDescriptor ( MagnetSpecialProgramEmphasisSchoolDescriptorId INT NOT NULL, CONSTRAINT MagnetSpecialProgramEmphasisSchoolDescriptor_PK PRIMARY KEY (MagnetSpecialProgramEmphasisSchoolDescriptorId) ); -- Table edfi.MediumOfInstructionDescriptor -- CREATE TABLE edfi.MediumOfInstructionDescriptor ( MediumOfInstructionDescriptorId INT NOT NULL, CONSTRAINT MediumOfInstructionDescriptor_PK PRIMARY KEY (MediumOfInstructionDescriptorId) ); -- Table edfi.MethodCreditEarnedDescriptor -- CREATE TABLE edfi.MethodCreditEarnedDescriptor ( MethodCreditEarnedDescriptorId INT NOT NULL, CONSTRAINT MethodCreditEarnedDescriptor_PK PRIMARY KEY (MethodCreditEarnedDescriptorId) ); -- Table edfi.MigrantEducationProgramServiceDescriptor -- CREATE TABLE edfi.MigrantEducationProgramServiceDescriptor ( MigrantEducationProgramServiceDescriptorId INT NOT NULL, CONSTRAINT MigrantEducationProgramServiceDescriptor_PK PRIMARY KEY (MigrantEducationProgramServiceDescriptorId) ); -- Table edfi.MonitoredDescriptor -- CREATE TABLE edfi.MonitoredDescriptor ( MonitoredDescriptorId INT NOT NULL, CONSTRAINT MonitoredDescriptor_PK PRIMARY KEY (MonitoredDescriptorId) ); -- Table edfi.NeglectedOrDelinquentProgramDescriptor -- CREATE TABLE edfi.NeglectedOrDelinquentProgramDescriptor ( NeglectedOrDelinquentProgramDescriptorId INT NOT NULL, CONSTRAINT NeglectedOrDelinquentProgramDescriptor_PK PRIMARY KEY (NeglectedOrDelinquentProgramDescriptorId) ); -- Table edfi.NeglectedOrDelinquentProgramServiceDescriptor -- CREATE TABLE edfi.NeglectedOrDelinquentProgramServiceDescriptor ( NeglectedOrDelinquentProgramServiceDescriptorId INT NOT NULL, CONSTRAINT NeglectedOrDelinquentProgramServiceDescriptor_PK PRIMARY KEY (NeglectedOrDelinquentProgramServiceDescriptorId) ); -- Table edfi.NetworkPurposeDescriptor -- CREATE TABLE edfi.NetworkPurposeDescriptor ( NetworkPurposeDescriptorId INT NOT NULL, CONSTRAINT NetworkPurposeDescriptor_PK PRIMARY KEY (NetworkPurposeDescriptorId) ); -- Table edfi.ObjectiveAssessment -- CREATE TABLE edfi.ObjectiveAssessment ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, MaxRawScore DECIMAL(15, 5) NULL, PercentOfAssessment DECIMAL(5, 4) NULL, Nomenclature VARCHAR(35) NULL, Description VARCHAR(1024) NULL, ParentIdentificationCode VARCHAR(60) NULL, AcademicSubjectDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT ObjectiveAssessment_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, Namespace) ); ALTER TABLE edfi.ObjectiveAssessment ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.ObjectiveAssessment ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.ObjectiveAssessment ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.ObjectiveAssessmentAssessmentItem -- CREATE TABLE edfi.ObjectiveAssessmentAssessmentItem ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentItemIdentificationCode VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ObjectiveAssessmentAssessmentItem_PK PRIMARY KEY (AssessmentIdentifier, AssessmentItemIdentificationCode, IdentificationCode, Namespace) ); ALTER TABLE edfi.ObjectiveAssessmentAssessmentItem ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ObjectiveAssessmentLearningObjective -- CREATE TABLE edfi.ObjectiveAssessmentLearningObjective ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, LearningObjectiveNamespace VARCHAR(255) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ObjectiveAssessmentLearningObjective_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, LearningObjectiveId, LearningObjectiveNamespace, Namespace) ); ALTER TABLE edfi.ObjectiveAssessmentLearningObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ObjectiveAssessmentLearningStandard -- CREATE TABLE edfi.ObjectiveAssessmentLearningStandard ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ObjectiveAssessmentLearningStandard_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, LearningStandardId, Namespace) ); ALTER TABLE edfi.ObjectiveAssessmentLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ObjectiveAssessmentPerformanceLevel -- CREATE TABLE edfi.ObjectiveAssessmentPerformanceLevel ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, PerformanceLevelDescriptorId INT NOT NULL, MinimumScore VARCHAR(35) NULL, MaximumScore VARCHAR(35) NULL, ResultDatatypeTypeDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ObjectiveAssessmentPerformanceLevel_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, IdentificationCode, Namespace, PerformanceLevelDescriptorId) ); ALTER TABLE edfi.ObjectiveAssessmentPerformanceLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ObjectiveAssessmentScore -- CREATE TABLE edfi.ObjectiveAssessmentScore ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, MinimumScore VARCHAR(35) NULL, MaximumScore VARCHAR(35) NULL, ResultDatatypeTypeDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ObjectiveAssessmentScore_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, IdentificationCode, Namespace) ); ALTER TABLE edfi.ObjectiveAssessmentScore ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.OldEthnicityDescriptor -- CREATE TABLE edfi.OldEthnicityDescriptor ( OldEthnicityDescriptorId INT NOT NULL, CONSTRAINT OldEthnicityDescriptor_PK PRIMARY KEY (OldEthnicityDescriptorId) ); -- Table edfi.OpenStaffPosition -- CREATE TABLE edfi.OpenStaffPosition ( EducationOrganizationId INT NOT NULL, RequisitionNumber VARCHAR(20) NOT NULL, EmploymentStatusDescriptorId INT NOT NULL, StaffClassificationDescriptorId INT NOT NULL, PositionTitle VARCHAR(100) NULL, ProgramAssignmentDescriptorId INT NULL, DatePosted DATE NOT NULL, DatePostingRemoved DATE NULL, PostingResultDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT OpenStaffPosition_PK PRIMARY KEY (EducationOrganizationId, RequisitionNumber) ); ALTER TABLE edfi.OpenStaffPosition ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.OpenStaffPosition ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.OpenStaffPosition ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.OpenStaffPositionAcademicSubject -- CREATE TABLE edfi.OpenStaffPositionAcademicSubject ( AcademicSubjectDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, RequisitionNumber VARCHAR(20) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT OpenStaffPositionAcademicSubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, EducationOrganizationId, RequisitionNumber) ); ALTER TABLE edfi.OpenStaffPositionAcademicSubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.OpenStaffPositionInstructionalGradeLevel -- CREATE TABLE edfi.OpenStaffPositionInstructionalGradeLevel ( EducationOrganizationId INT NOT NULL, GradeLevelDescriptorId INT NOT NULL, RequisitionNumber VARCHAR(20) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT OpenStaffPositionInstructionalGradeLevel_PK PRIMARY KEY (EducationOrganizationId, GradeLevelDescriptorId, RequisitionNumber) ); ALTER TABLE edfi.OpenStaffPositionInstructionalGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.OperationalStatusDescriptor -- CREATE TABLE edfi.OperationalStatusDescriptor ( OperationalStatusDescriptorId INT NOT NULL, CONSTRAINT OperationalStatusDescriptor_PK PRIMARY KEY (OperationalStatusDescriptorId) ); -- Table edfi.OrganizationDepartment -- CREATE TABLE edfi.OrganizationDepartment ( OrganizationDepartmentId INT NOT NULL, AcademicSubjectDescriptorId INT NULL, ParentEducationOrganizationId INT NULL, CONSTRAINT OrganizationDepartment_PK PRIMARY KEY (OrganizationDepartmentId) ); -- Table edfi.OtherNameTypeDescriptor -- CREATE TABLE edfi.OtherNameTypeDescriptor ( OtherNameTypeDescriptorId INT NOT NULL, CONSTRAINT OtherNameTypeDescriptor_PK PRIMARY KEY (OtherNameTypeDescriptorId) ); -- Table edfi.Parent -- CREATE TABLE edfi.Parent ( ParentUSI SERIAL NOT NULL, PersonalTitlePrefix VARCHAR(30) NULL, FirstName VARCHAR(75) NOT NULL, MiddleName VARCHAR(75) NULL, LastSurname VARCHAR(75) NOT NULL, GenerationCodeSuffix VARCHAR(10) NULL, MaidenName VARCHAR(75) NULL, SexDescriptorId INT NULL, LoginId VARCHAR(60) NULL, PersonId VARCHAR(32) NULL, SourceSystemDescriptorId INT NULL, HighestCompletedLevelOfEducationDescriptorId INT NULL, ParentUniqueId VARCHAR(32) NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Parent_PK PRIMARY KEY (ParentUSI) ); CREATE UNIQUE INDEX Parent_UI_ParentUniqueId ON edfi.Parent (ParentUniqueId); ALTER TABLE edfi.Parent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Parent ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Parent ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.ParentAddress -- CREATE TABLE edfi.ParentAddress ( AddressTypeDescriptorId INT NOT NULL, City VARCHAR(30) NOT NULL, ParentUSI INT NOT NULL, PostalCode VARCHAR(17) NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, StreetNumberName VARCHAR(150) NOT NULL, ApartmentRoomSuiteNumber VARCHAR(50) NULL, BuildingSiteNumber VARCHAR(20) NULL, NameOfCounty VARCHAR(30) NULL, CountyFIPSCode VARCHAR(5) NULL, Latitude VARCHAR(20) NULL, Longitude VARCHAR(20) NULL, DoNotPublishIndicator BOOLEAN NULL, CongressionalDistrict VARCHAR(30) NULL, LocaleDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentAddress_PK PRIMARY KEY (AddressTypeDescriptorId, City, ParentUSI, PostalCode, StateAbbreviationDescriptorId, StreetNumberName) ); ALTER TABLE edfi.ParentAddress ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentAddressPeriod -- CREATE TABLE edfi.ParentAddressPeriod ( AddressTypeDescriptorId INT NOT NULL, BeginDate DATE NOT NULL, City VARCHAR(30) NOT NULL, ParentUSI INT NOT NULL, PostalCode VARCHAR(17) NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, StreetNumberName VARCHAR(150) NOT NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentAddressPeriod_PK PRIMARY KEY (AddressTypeDescriptorId, BeginDate, City, ParentUSI, PostalCode, StateAbbreviationDescriptorId, StreetNumberName) ); ALTER TABLE edfi.ParentAddressPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentElectronicMail -- CREATE TABLE edfi.ParentElectronicMail ( ElectronicMailAddress VARCHAR(128) NOT NULL, ElectronicMailTypeDescriptorId INT NOT NULL, ParentUSI INT NOT NULL, PrimaryEmailAddressIndicator BOOLEAN NULL, DoNotPublishIndicator BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentElectronicMail_PK PRIMARY KEY (ElectronicMailAddress, ElectronicMailTypeDescriptorId, ParentUSI) ); ALTER TABLE edfi.ParentElectronicMail ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentInternationalAddress -- CREATE TABLE edfi.ParentInternationalAddress ( AddressTypeDescriptorId INT NOT NULL, ParentUSI INT NOT NULL, AddressLine1 VARCHAR(150) NOT NULL, AddressLine2 VARCHAR(150) NULL, AddressLine3 VARCHAR(150) NULL, AddressLine4 VARCHAR(150) NULL, CountryDescriptorId INT NOT NULL, Latitude VARCHAR(20) NULL, Longitude VARCHAR(20) NULL, BeginDate DATE NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentInternationalAddress_PK PRIMARY KEY (AddressTypeDescriptorId, ParentUSI) ); ALTER TABLE edfi.ParentInternationalAddress ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentLanguage -- CREATE TABLE edfi.ParentLanguage ( LanguageDescriptorId INT NOT NULL, ParentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentLanguage_PK PRIMARY KEY (LanguageDescriptorId, ParentUSI) ); ALTER TABLE edfi.ParentLanguage ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentLanguageUse -- CREATE TABLE edfi.ParentLanguageUse ( LanguageDescriptorId INT NOT NULL, LanguageUseDescriptorId INT NOT NULL, ParentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentLanguageUse_PK PRIMARY KEY (LanguageDescriptorId, LanguageUseDescriptorId, ParentUSI) ); ALTER TABLE edfi.ParentLanguageUse ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentOtherName -- CREATE TABLE edfi.ParentOtherName ( OtherNameTypeDescriptorId INT NOT NULL, ParentUSI INT NOT NULL, PersonalTitlePrefix VARCHAR(30) NULL, FirstName VARCHAR(75) NOT NULL, MiddleName VARCHAR(75) NULL, LastSurname VARCHAR(75) NOT NULL, GenerationCodeSuffix VARCHAR(10) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentOtherName_PK PRIMARY KEY (OtherNameTypeDescriptorId, ParentUSI) ); ALTER TABLE edfi.ParentOtherName ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentPersonalIdentificationDocument -- CREATE TABLE edfi.ParentPersonalIdentificationDocument ( IdentificationDocumentUseDescriptorId INT NOT NULL, ParentUSI INT NOT NULL, PersonalInformationVerificationDescriptorId INT NOT NULL, DocumentTitle VARCHAR(60) NULL, DocumentExpirationDate DATE NULL, IssuerDocumentIdentificationCode VARCHAR(60) NULL, IssuerName VARCHAR(150) NULL, IssuerCountryDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentPersonalIdentificationDocument_PK PRIMARY KEY (IdentificationDocumentUseDescriptorId, ParentUSI, PersonalInformationVerificationDescriptorId) ); ALTER TABLE edfi.ParentPersonalIdentificationDocument ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParentTelephone -- CREATE TABLE edfi.ParentTelephone ( ParentUSI INT NOT NULL, TelephoneNumber VARCHAR(24) NOT NULL, TelephoneNumberTypeDescriptorId INT NOT NULL, OrderOfPriority INT NULL, TextMessageCapabilityIndicator BOOLEAN NULL, DoNotPublishIndicator BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ParentTelephone_PK PRIMARY KEY (ParentUSI, TelephoneNumber, TelephoneNumberTypeDescriptorId) ); ALTER TABLE edfi.ParentTelephone ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ParticipationDescriptor -- CREATE TABLE edfi.ParticipationDescriptor ( ParticipationDescriptorId INT NOT NULL, CONSTRAINT ParticipationDescriptor_PK PRIMARY KEY (ParticipationDescriptorId) ); -- Table edfi.ParticipationStatusDescriptor -- CREATE TABLE edfi.ParticipationStatusDescriptor ( ParticipationStatusDescriptorId INT NOT NULL, CONSTRAINT ParticipationStatusDescriptor_PK PRIMARY KEY (ParticipationStatusDescriptorId) ); -- Table edfi.Payroll -- CREATE TABLE edfi.Payroll ( AccountIdentifier VARCHAR(50) NOT NULL, AsOfDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, FiscalYear INT NOT NULL, StaffUSI INT NOT NULL, AmountToDate MONEY NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Payroll_PK PRIMARY KEY (AccountIdentifier, AsOfDate, EducationOrganizationId, FiscalYear, StaffUSI) ); ALTER TABLE edfi.Payroll ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Payroll ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Payroll ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.PerformanceBaseConversionDescriptor -- CREATE TABLE edfi.PerformanceBaseConversionDescriptor ( PerformanceBaseConversionDescriptorId INT NOT NULL, CONSTRAINT PerformanceBaseConversionDescriptor_PK PRIMARY KEY (PerformanceBaseConversionDescriptorId) ); -- Table edfi.PerformanceLevelDescriptor -- CREATE TABLE edfi.PerformanceLevelDescriptor ( PerformanceLevelDescriptorId INT NOT NULL, CONSTRAINT PerformanceLevelDescriptor_PK PRIMARY KEY (PerformanceLevelDescriptorId) ); -- Table edfi.Person -- CREATE TABLE edfi.Person ( PersonId VARCHAR(32) NOT NULL, SourceSystemDescriptorId INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Person_PK PRIMARY KEY (PersonId, SourceSystemDescriptorId) ); ALTER TABLE edfi.Person ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Person ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Person ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.PersonalInformationVerificationDescriptor -- CREATE TABLE edfi.PersonalInformationVerificationDescriptor ( PersonalInformationVerificationDescriptorId INT NOT NULL, CONSTRAINT PersonalInformationVerificationDescriptor_PK PRIMARY KEY (PersonalInformationVerificationDescriptorId) ); -- Table edfi.PlatformTypeDescriptor -- CREATE TABLE edfi.PlatformTypeDescriptor ( PlatformTypeDescriptorId INT NOT NULL, CONSTRAINT PlatformTypeDescriptor_PK PRIMARY KEY (PlatformTypeDescriptorId) ); -- Table edfi.PopulationServedDescriptor -- CREATE TABLE edfi.PopulationServedDescriptor ( PopulationServedDescriptorId INT NOT NULL, CONSTRAINT PopulationServedDescriptor_PK PRIMARY KEY (PopulationServedDescriptorId) ); -- Table edfi.PostingResultDescriptor -- CREATE TABLE edfi.PostingResultDescriptor ( PostingResultDescriptorId INT NOT NULL, CONSTRAINT PostingResultDescriptor_PK PRIMARY KEY (PostingResultDescriptorId) ); -- Table edfi.PostSecondaryEvent -- CREATE TABLE edfi.PostSecondaryEvent ( EventDate DATE NOT NULL, PostSecondaryEventCategoryDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, PostSecondaryInstitutionId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT PostSecondaryEvent_PK PRIMARY KEY (EventDate, PostSecondaryEventCategoryDescriptorId, StudentUSI) ); ALTER TABLE edfi.PostSecondaryEvent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.PostSecondaryEvent ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.PostSecondaryEvent ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.PostSecondaryEventCategoryDescriptor -- CREATE TABLE edfi.PostSecondaryEventCategoryDescriptor ( PostSecondaryEventCategoryDescriptorId INT NOT NULL, CONSTRAINT PostSecondaryEventCategoryDescriptor_PK PRIMARY KEY (PostSecondaryEventCategoryDescriptorId) ); -- Table edfi.PostSecondaryInstitution -- CREATE TABLE edfi.PostSecondaryInstitution ( PostSecondaryInstitutionId INT NOT NULL, PostSecondaryInstitutionLevelDescriptorId INT NULL, AdministrativeFundingControlDescriptorId INT NULL, CONSTRAINT PostSecondaryInstitution_PK PRIMARY KEY (PostSecondaryInstitutionId) ); -- Table edfi.PostSecondaryInstitutionLevelDescriptor -- CREATE TABLE edfi.PostSecondaryInstitutionLevelDescriptor ( PostSecondaryInstitutionLevelDescriptorId INT NOT NULL, CONSTRAINT PostSecondaryInstitutionLevelDescriptor_PK PRIMARY KEY (PostSecondaryInstitutionLevelDescriptorId) ); -- Table edfi.PostSecondaryInstitutionMediumOfInstruction -- CREATE TABLE edfi.PostSecondaryInstitutionMediumOfInstruction ( MediumOfInstructionDescriptorId INT NOT NULL, PostSecondaryInstitutionId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT PostSecondaryInstitutionMediumOfInstruction_PK PRIMARY KEY (MediumOfInstructionDescriptorId, PostSecondaryInstitutionId) ); ALTER TABLE edfi.PostSecondaryInstitutionMediumOfInstruction ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.PrimaryLearningDeviceAccessDescriptor -- CREATE TABLE edfi.PrimaryLearningDeviceAccessDescriptor ( PrimaryLearningDeviceAccessDescriptorId INT NOT NULL, CONSTRAINT PrimaryLearningDeviceAccessDescriptor_PK PRIMARY KEY (PrimaryLearningDeviceAccessDescriptorId) ); -- Table edfi.PrimaryLearningDeviceAwayFromSchoolDescriptor -- CREATE TABLE edfi.PrimaryLearningDeviceAwayFromSchoolDescriptor ( PrimaryLearningDeviceAwayFromSchoolDescriptorId INT NOT NULL, CONSTRAINT PrimaryLearningDeviceAwayFromSchoolDescriptor_PK PRIMARY KEY (PrimaryLearningDeviceAwayFromSchoolDescriptorId) ); -- Table edfi.PrimaryLearningDeviceProviderDescriptor -- CREATE TABLE edfi.PrimaryLearningDeviceProviderDescriptor ( PrimaryLearningDeviceProviderDescriptorId INT NOT NULL, CONSTRAINT PrimaryLearningDeviceProviderDescriptor_PK PRIMARY KEY (PrimaryLearningDeviceProviderDescriptorId) ); -- Table edfi.ProficiencyDescriptor -- CREATE TABLE edfi.ProficiencyDescriptor ( ProficiencyDescriptorId INT NOT NULL, CONSTRAINT ProficiencyDescriptor_PK PRIMARY KEY (ProficiencyDescriptorId) ); -- Table edfi.Program -- CREATE TABLE edfi.Program ( EducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, ProgramId VARCHAR(20) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Program_PK PRIMARY KEY (EducationOrganizationId, ProgramName, ProgramTypeDescriptorId) ); ALTER TABLE edfi.Program ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Program ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Program ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.ProgramAssignmentDescriptor -- CREATE TABLE edfi.ProgramAssignmentDescriptor ( ProgramAssignmentDescriptorId INT NOT NULL, CONSTRAINT ProgramAssignmentDescriptor_PK PRIMARY KEY (ProgramAssignmentDescriptorId) ); -- Table edfi.ProgramCharacteristic -- CREATE TABLE edfi.ProgramCharacteristic ( EducationOrganizationId INT NOT NULL, ProgramCharacteristicDescriptorId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ProgramCharacteristic_PK PRIMARY KEY (EducationOrganizationId, ProgramCharacteristicDescriptorId, ProgramName, ProgramTypeDescriptorId) ); ALTER TABLE edfi.ProgramCharacteristic ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ProgramCharacteristicDescriptor -- CREATE TABLE edfi.ProgramCharacteristicDescriptor ( ProgramCharacteristicDescriptorId INT NOT NULL, CONSTRAINT ProgramCharacteristicDescriptor_PK PRIMARY KEY (ProgramCharacteristicDescriptorId) ); -- Table edfi.ProgramLearningObjective -- CREATE TABLE edfi.ProgramLearningObjective ( EducationOrganizationId INT NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ProgramLearningObjective_PK PRIMARY KEY (EducationOrganizationId, LearningObjectiveId, Namespace, ProgramName, ProgramTypeDescriptorId) ); ALTER TABLE edfi.ProgramLearningObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ProgramLearningStandard -- CREATE TABLE edfi.ProgramLearningStandard ( EducationOrganizationId INT NOT NULL, LearningStandardId VARCHAR(60) NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ProgramLearningStandard_PK PRIMARY KEY (EducationOrganizationId, LearningStandardId, ProgramName, ProgramTypeDescriptorId) ); ALTER TABLE edfi.ProgramLearningStandard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ProgramService -- CREATE TABLE edfi.ProgramService ( EducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, ServiceDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ProgramService_PK PRIMARY KEY (EducationOrganizationId, ProgramName, ProgramTypeDescriptorId, ServiceDescriptorId) ); ALTER TABLE edfi.ProgramService ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ProgramSponsor -- CREATE TABLE edfi.ProgramSponsor ( EducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramSponsorDescriptorId INT NOT NULL, ProgramTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ProgramSponsor_PK PRIMARY KEY (EducationOrganizationId, ProgramName, ProgramSponsorDescriptorId, ProgramTypeDescriptorId) ); ALTER TABLE edfi.ProgramSponsor ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ProgramSponsorDescriptor -- CREATE TABLE edfi.ProgramSponsorDescriptor ( ProgramSponsorDescriptorId INT NOT NULL, CONSTRAINT ProgramSponsorDescriptor_PK PRIMARY KEY (ProgramSponsorDescriptorId) ); -- Table edfi.ProgramTypeDescriptor -- CREATE TABLE edfi.ProgramTypeDescriptor ( ProgramTypeDescriptorId INT NOT NULL, CONSTRAINT ProgramTypeDescriptor_PK PRIMARY KEY (ProgramTypeDescriptorId) ); -- Table edfi.ProgressDescriptor -- CREATE TABLE edfi.ProgressDescriptor ( ProgressDescriptorId INT NOT NULL, CONSTRAINT ProgressDescriptor_PK PRIMARY KEY (ProgressDescriptorId) ); -- Table edfi.ProgressLevelDescriptor -- CREATE TABLE edfi.ProgressLevelDescriptor ( ProgressLevelDescriptorId INT NOT NULL, CONSTRAINT ProgressLevelDescriptor_PK PRIMARY KEY (ProgressLevelDescriptorId) ); -- Table edfi.ProviderCategoryDescriptor -- CREATE TABLE edfi.ProviderCategoryDescriptor ( ProviderCategoryDescriptorId INT NOT NULL, CONSTRAINT ProviderCategoryDescriptor_PK PRIMARY KEY (ProviderCategoryDescriptorId) ); -- Table edfi.ProviderProfitabilityDescriptor -- CREATE TABLE edfi.ProviderProfitabilityDescriptor ( ProviderProfitabilityDescriptorId INT NOT NULL, CONSTRAINT ProviderProfitabilityDescriptor_PK PRIMARY KEY (ProviderProfitabilityDescriptorId) ); -- Table edfi.ProviderStatusDescriptor -- CREATE TABLE edfi.ProviderStatusDescriptor ( ProviderStatusDescriptorId INT NOT NULL, CONSTRAINT ProviderStatusDescriptor_PK PRIMARY KEY (ProviderStatusDescriptorId) ); -- Table edfi.PublicationStatusDescriptor -- CREATE TABLE edfi.PublicationStatusDescriptor ( PublicationStatusDescriptorId INT NOT NULL, CONSTRAINT PublicationStatusDescriptor_PK PRIMARY KEY (PublicationStatusDescriptorId) ); -- Table edfi.QuestionFormDescriptor -- CREATE TABLE edfi.QuestionFormDescriptor ( QuestionFormDescriptorId INT NOT NULL, CONSTRAINT QuestionFormDescriptor_PK PRIMARY KEY (QuestionFormDescriptorId) ); -- Table edfi.RaceDescriptor -- CREATE TABLE edfi.RaceDescriptor ( RaceDescriptorId INT NOT NULL, CONSTRAINT RaceDescriptor_PK PRIMARY KEY (RaceDescriptorId) ); -- Table edfi.ReasonExitedDescriptor -- CREATE TABLE edfi.ReasonExitedDescriptor ( ReasonExitedDescriptorId INT NOT NULL, CONSTRAINT ReasonExitedDescriptor_PK PRIMARY KEY (ReasonExitedDescriptorId) ); -- Table edfi.ReasonNotTestedDescriptor -- CREATE TABLE edfi.ReasonNotTestedDescriptor ( ReasonNotTestedDescriptorId INT NOT NULL, CONSTRAINT ReasonNotTestedDescriptor_PK PRIMARY KEY (ReasonNotTestedDescriptorId) ); -- Table edfi.RecognitionTypeDescriptor -- CREATE TABLE edfi.RecognitionTypeDescriptor ( RecognitionTypeDescriptorId INT NOT NULL, CONSTRAINT RecognitionTypeDescriptor_PK PRIMARY KEY (RecognitionTypeDescriptorId) ); -- Table edfi.RelationDescriptor -- CREATE TABLE edfi.RelationDescriptor ( RelationDescriptorId INT NOT NULL, CONSTRAINT RelationDescriptor_PK PRIMARY KEY (RelationDescriptorId) ); -- Table edfi.RepeatIdentifierDescriptor -- CREATE TABLE edfi.RepeatIdentifierDescriptor ( RepeatIdentifierDescriptorId INT NOT NULL, CONSTRAINT RepeatIdentifierDescriptor_PK PRIMARY KEY (RepeatIdentifierDescriptorId) ); -- Table edfi.ReportCard -- CREATE TABLE edfi.ReportCard ( EducationOrganizationId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, StudentUSI INT NOT NULL, GPAGivenGradingPeriod DECIMAL(18, 4) NULL, GPACumulative DECIMAL(18, 4) NULL, NumberOfDaysAbsent DECIMAL(18, 4) NULL, NumberOfDaysInAttendance DECIMAL(18, 4) NULL, NumberOfDaysTardy INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT ReportCard_PK PRIMARY KEY (EducationOrganizationId, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, StudentUSI) ); ALTER TABLE edfi.ReportCard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.ReportCard ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.ReportCard ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.ReportCardGrade -- CREATE TABLE edfi.ReportCardGrade ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, GradeTypeDescriptorId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ReportCardGrade_PK PRIMARY KEY (BeginDate, EducationOrganizationId, GradeTypeDescriptorId, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName, StudentUSI) ); ALTER TABLE edfi.ReportCardGrade ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ReportCardGradePointAverage -- CREATE TABLE edfi.ReportCardGradePointAverage ( EducationOrganizationId INT NOT NULL, GradePointAverageTypeDescriptorId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, StudentUSI INT NOT NULL, IsCumulative BOOLEAN NULL, GradePointAverageValue DECIMAL(18, 4) NOT NULL, MaxGradePointAverageValue DECIMAL(18, 4) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ReportCardGradePointAverage_PK PRIMARY KEY (EducationOrganizationId, GradePointAverageTypeDescriptorId, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, StudentUSI) ); ALTER TABLE edfi.ReportCardGradePointAverage ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ReportCardStudentCompetencyObjective -- CREATE TABLE edfi.ReportCardStudentCompetencyObjective ( EducationOrganizationId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, Objective VARCHAR(60) NOT NULL, ObjectiveEducationOrganizationId INT NOT NULL, ObjectiveGradeLevelDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ReportCardStudentCompetencyObjective_PK PRIMARY KEY (EducationOrganizationId, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, Objective, ObjectiveEducationOrganizationId, ObjectiveGradeLevelDescriptorId, StudentUSI) ); ALTER TABLE edfi.ReportCardStudentCompetencyObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ReportCardStudentLearningObjective -- CREATE TABLE edfi.ReportCardStudentLearningObjective ( EducationOrganizationId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, LearningObjectiveId VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT ReportCardStudentLearningObjective_PK PRIMARY KEY (EducationOrganizationId, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, LearningObjectiveId, Namespace, StudentUSI) ); ALTER TABLE edfi.ReportCardStudentLearningObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.ReporterDescriptionDescriptor -- CREATE TABLE edfi.ReporterDescriptionDescriptor ( ReporterDescriptionDescriptorId INT NOT NULL, CONSTRAINT ReporterDescriptionDescriptor_PK PRIMARY KEY (ReporterDescriptionDescriptorId) ); -- Table edfi.ResidencyStatusDescriptor -- CREATE TABLE edfi.ResidencyStatusDescriptor ( ResidencyStatusDescriptorId INT NOT NULL, CONSTRAINT ResidencyStatusDescriptor_PK PRIMARY KEY (ResidencyStatusDescriptorId) ); -- Table edfi.ResponseIndicatorDescriptor -- CREATE TABLE edfi.ResponseIndicatorDescriptor ( ResponseIndicatorDescriptorId INT NOT NULL, CONSTRAINT ResponseIndicatorDescriptor_PK PRIMARY KEY (ResponseIndicatorDescriptorId) ); -- Table edfi.ResponsibilityDescriptor -- CREATE TABLE edfi.ResponsibilityDescriptor ( ResponsibilityDescriptorId INT NOT NULL, CONSTRAINT ResponsibilityDescriptor_PK PRIMARY KEY (ResponsibilityDescriptorId) ); -- Table edfi.RestraintEvent -- CREATE TABLE edfi.RestraintEvent ( RestraintEventIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, EventDate DATE NOT NULL, EducationalEnvironmentDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT RestraintEvent_PK PRIMARY KEY (RestraintEventIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.RestraintEvent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.RestraintEvent ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.RestraintEvent ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.RestraintEventProgram -- CREATE TABLE edfi.RestraintEventProgram ( EducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, RestraintEventIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT RestraintEventProgram_PK PRIMARY KEY (EducationOrganizationId, ProgramName, ProgramTypeDescriptorId, RestraintEventIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.RestraintEventProgram ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.RestraintEventReason -- CREATE TABLE edfi.RestraintEventReason ( RestraintEventIdentifier VARCHAR(20) NOT NULL, RestraintEventReasonDescriptorId INT NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT RestraintEventReason_PK PRIMARY KEY (RestraintEventIdentifier, RestraintEventReasonDescriptorId, SchoolId, StudentUSI) ); ALTER TABLE edfi.RestraintEventReason ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.RestraintEventReasonDescriptor -- CREATE TABLE edfi.RestraintEventReasonDescriptor ( RestraintEventReasonDescriptorId INT NOT NULL, CONSTRAINT RestraintEventReasonDescriptor_PK PRIMARY KEY (RestraintEventReasonDescriptorId) ); -- Table edfi.ResultDatatypeTypeDescriptor -- CREATE TABLE edfi.ResultDatatypeTypeDescriptor ( ResultDatatypeTypeDescriptorId INT NOT NULL, CONSTRAINT ResultDatatypeTypeDescriptor_PK PRIMARY KEY (ResultDatatypeTypeDescriptorId) ); -- Table edfi.RetestIndicatorDescriptor -- CREATE TABLE edfi.RetestIndicatorDescriptor ( RetestIndicatorDescriptorId INT NOT NULL, CONSTRAINT RetestIndicatorDescriptor_PK PRIMARY KEY (RetestIndicatorDescriptorId) ); -- Table edfi.School -- CREATE TABLE edfi.School ( SchoolId INT NOT NULL, SchoolTypeDescriptorId INT NULL, CharterStatusDescriptorId INT NULL, TitleIPartASchoolDesignationDescriptorId INT NULL, MagnetSpecialProgramEmphasisSchoolDescriptorId INT NULL, AdministrativeFundingControlDescriptorId INT NULL, InternetAccessDescriptorId INT NULL, LocalEducationAgencyId INT NULL, CharterApprovalAgencyTypeDescriptorId INT NULL, CharterApprovalSchoolYear SMALLINT NULL, CONSTRAINT School_PK PRIMARY KEY (SchoolId) ); -- Table edfi.SchoolCategory -- CREATE TABLE edfi.SchoolCategory ( SchoolCategoryDescriptorId INT NOT NULL, SchoolId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SchoolCategory_PK PRIMARY KEY (SchoolCategoryDescriptorId, SchoolId) ); ALTER TABLE edfi.SchoolCategory ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SchoolCategoryDescriptor -- CREATE TABLE edfi.SchoolCategoryDescriptor ( SchoolCategoryDescriptorId INT NOT NULL, CONSTRAINT SchoolCategoryDescriptor_PK PRIMARY KEY (SchoolCategoryDescriptorId) ); -- Table edfi.SchoolChoiceImplementStatusDescriptor -- CREATE TABLE edfi.SchoolChoiceImplementStatusDescriptor ( SchoolChoiceImplementStatusDescriptorId INT NOT NULL, CONSTRAINT SchoolChoiceImplementStatusDescriptor_PK PRIMARY KEY (SchoolChoiceImplementStatusDescriptorId) ); -- Table edfi.SchoolFoodServiceProgramServiceDescriptor -- CREATE TABLE edfi.SchoolFoodServiceProgramServiceDescriptor ( SchoolFoodServiceProgramServiceDescriptorId INT NOT NULL, CONSTRAINT SchoolFoodServiceProgramServiceDescriptor_PK PRIMARY KEY (SchoolFoodServiceProgramServiceDescriptorId) ); -- Table edfi.SchoolGradeLevel -- CREATE TABLE edfi.SchoolGradeLevel ( GradeLevelDescriptorId INT NOT NULL, SchoolId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SchoolGradeLevel_PK PRIMARY KEY (GradeLevelDescriptorId, SchoolId) ); ALTER TABLE edfi.SchoolGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SchoolTypeDescriptor -- CREATE TABLE edfi.SchoolTypeDescriptor ( SchoolTypeDescriptorId INT NOT NULL, CONSTRAINT SchoolTypeDescriptor_PK PRIMARY KEY (SchoolTypeDescriptorId) ); -- Table edfi.SchoolYearType -- CREATE TABLE edfi.SchoolYearType ( SchoolYear SMALLINT NOT NULL, SchoolYearDescription VARCHAR(50) NOT NULL, CurrentSchoolYear BOOLEAN NOT NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT SchoolYearType_PK PRIMARY KEY (SchoolYear) ); ALTER TABLE edfi.SchoolYearType ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.SchoolYearType ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.SchoolYearType ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.Section -- CREATE TABLE edfi.Section ( LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, SequenceOfCourse INT NULL, EducationalEnvironmentDescriptorId INT NULL, MediumOfInstructionDescriptorId INT NULL, PopulationServedDescriptorId INT NULL, AvailableCredits DECIMAL(9, 3) NULL, AvailableCreditTypeDescriptorId INT NULL, AvailableCreditConversion DECIMAL(9, 2) NULL, InstructionLanguageDescriptorId INT NULL, LocationSchoolId INT NULL, LocationClassroomIdentificationCode VARCHAR(60) NULL, OfficialAttendancePeriod BOOLEAN NULL, SectionName VARCHAR(100) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Section_PK PRIMARY KEY (LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.Section ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Section ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Section ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.SectionAttendanceTakenEvent -- CREATE TABLE edfi.SectionAttendanceTakenEvent ( CalendarCode VARCHAR(60) NOT NULL, Date DATE NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, EventDate DATE NOT NULL, StaffUSI INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT SectionAttendanceTakenEvent_PK PRIMARY KEY (CalendarCode, Date, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.SectionAttendanceTakenEvent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.SectionAttendanceTakenEvent ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.SectionAttendanceTakenEvent ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.SectionCharacteristic -- CREATE TABLE edfi.SectionCharacteristic ( LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionCharacteristicDescriptorId INT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SectionCharacteristic_PK PRIMARY KEY (LocalCourseCode, SchoolId, SchoolYear, SectionCharacteristicDescriptorId, SectionIdentifier, SessionName) ); ALTER TABLE edfi.SectionCharacteristic ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SectionCharacteristicDescriptor -- CREATE TABLE edfi.SectionCharacteristicDescriptor ( SectionCharacteristicDescriptorId INT NOT NULL, CONSTRAINT SectionCharacteristicDescriptor_PK PRIMARY KEY (SectionCharacteristicDescriptorId) ); -- Table edfi.SectionClassPeriod -- CREATE TABLE edfi.SectionClassPeriod ( ClassPeriodName VARCHAR(60) NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SectionClassPeriod_PK PRIMARY KEY (ClassPeriodName, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.SectionClassPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SectionCourseLevelCharacteristic -- CREATE TABLE edfi.SectionCourseLevelCharacteristic ( CourseLevelCharacteristicDescriptorId INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SectionCourseLevelCharacteristic_PK PRIMARY KEY (CourseLevelCharacteristicDescriptorId, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.SectionCourseLevelCharacteristic ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SectionOfferedGradeLevel -- CREATE TABLE edfi.SectionOfferedGradeLevel ( GradeLevelDescriptorId INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SectionOfferedGradeLevel_PK PRIMARY KEY (GradeLevelDescriptorId, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.SectionOfferedGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SectionProgram -- CREATE TABLE edfi.SectionProgram ( EducationOrganizationId INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SectionProgram_PK PRIMARY KEY (EducationOrganizationId, LocalCourseCode, ProgramName, ProgramTypeDescriptorId, SchoolId, SchoolYear, SectionIdentifier, SessionName) ); ALTER TABLE edfi.SectionProgram ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SeparationDescriptor -- CREATE TABLE edfi.SeparationDescriptor ( SeparationDescriptorId INT NOT NULL, CONSTRAINT SeparationDescriptor_PK PRIMARY KEY (SeparationDescriptorId) ); -- Table edfi.SeparationReasonDescriptor -- CREATE TABLE edfi.SeparationReasonDescriptor ( SeparationReasonDescriptorId INT NOT NULL, CONSTRAINT SeparationReasonDescriptor_PK PRIMARY KEY (SeparationReasonDescriptorId) ); -- Table edfi.ServiceDescriptor -- CREATE TABLE edfi.ServiceDescriptor ( ServiceDescriptorId INT NOT NULL, CONSTRAINT ServiceDescriptor_PK PRIMARY KEY (ServiceDescriptorId) ); -- Table edfi.Session -- CREATE TABLE edfi.Session ( SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SessionName VARCHAR(60) NOT NULL, BeginDate DATE NOT NULL, EndDate DATE NOT NULL, TermDescriptorId INT NOT NULL, TotalInstructionalDays INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Session_PK PRIMARY KEY (SchoolId, SchoolYear, SessionName) ); ALTER TABLE edfi.Session ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Session ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Session ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.SessionAcademicWeek -- CREATE TABLE edfi.SessionAcademicWeek ( SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SessionName VARCHAR(60) NOT NULL, WeekIdentifier VARCHAR(80) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SessionAcademicWeek_PK PRIMARY KEY (SchoolId, SchoolYear, SessionName, WeekIdentifier) ); ALTER TABLE edfi.SessionAcademicWeek ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SessionGradingPeriod -- CREATE TABLE edfi.SessionGradingPeriod ( GradingPeriodDescriptorId INT NOT NULL, PeriodSequence INT NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SessionName VARCHAR(60) NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT SessionGradingPeriod_PK PRIMARY KEY (GradingPeriodDescriptorId, PeriodSequence, SchoolId, SchoolYear, SessionName) ); ALTER TABLE edfi.SessionGradingPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.SexDescriptor -- CREATE TABLE edfi.SexDescriptor ( SexDescriptorId INT NOT NULL, CONSTRAINT SexDescriptor_PK PRIMARY KEY (SexDescriptorId) ); -- Table edfi.SourceSystemDescriptor -- CREATE TABLE edfi.SourceSystemDescriptor ( SourceSystemDescriptorId INT NOT NULL, CONSTRAINT SourceSystemDescriptor_PK PRIMARY KEY (SourceSystemDescriptorId) ); -- Table edfi.SpecialEducationProgramServiceDescriptor -- CREATE TABLE edfi.SpecialEducationProgramServiceDescriptor ( SpecialEducationProgramServiceDescriptorId INT NOT NULL, CONSTRAINT SpecialEducationProgramServiceDescriptor_PK PRIMARY KEY (SpecialEducationProgramServiceDescriptorId) ); -- Table edfi.SpecialEducationSettingDescriptor -- CREATE TABLE edfi.SpecialEducationSettingDescriptor ( SpecialEducationSettingDescriptorId INT NOT NULL, CONSTRAINT SpecialEducationSettingDescriptor_PK PRIMARY KEY (SpecialEducationSettingDescriptorId) ); -- Table edfi.Staff -- CREATE TABLE edfi.Staff ( StaffUSI SERIAL NOT NULL, PersonalTitlePrefix VARCHAR(30) NULL, FirstName VARCHAR(75) NOT NULL, MiddleName VARCHAR(75) NULL, LastSurname VARCHAR(75) NOT NULL, GenerationCodeSuffix VARCHAR(10) NULL, MaidenName VARCHAR(75) NULL, SexDescriptorId INT NULL, BirthDate DATE NULL, HispanicLatinoEthnicity BOOLEAN NULL, OldEthnicityDescriptorId INT NULL, CitizenshipStatusDescriptorId INT NULL, HighestCompletedLevelOfEducationDescriptorId INT NULL, YearsOfPriorProfessionalExperience DECIMAL(5, 2) NULL, YearsOfPriorTeachingExperience DECIMAL(5, 2) NULL, LoginId VARCHAR(60) NULL, HighlyQualifiedTeacher BOOLEAN NULL, PersonId VARCHAR(32) NULL, SourceSystemDescriptorId INT NULL, StaffUniqueId VARCHAR(32) NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Staff_PK PRIMARY KEY (StaffUSI) ); CREATE UNIQUE INDEX Staff_UI_StaffUniqueId ON edfi.Staff (StaffUniqueId); ALTER TABLE edfi.Staff ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Staff ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Staff ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffAbsenceEvent -- CREATE TABLE edfi.StaffAbsenceEvent ( AbsenceEventCategoryDescriptorId INT NOT NULL, EventDate DATE NOT NULL, StaffUSI INT NOT NULL, AbsenceEventReason VARCHAR(40) NULL, HoursAbsent DECIMAL(18, 2) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffAbsenceEvent_PK PRIMARY KEY (AbsenceEventCategoryDescriptorId, EventDate, StaffUSI) ); ALTER TABLE edfi.StaffAbsenceEvent ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffAbsenceEvent ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffAbsenceEvent ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffAddress -- CREATE TABLE edfi.StaffAddress ( AddressTypeDescriptorId INT NOT NULL, City VARCHAR(30) NOT NULL, PostalCode VARCHAR(17) NOT NULL, StaffUSI INT NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, StreetNumberName VARCHAR(150) NOT NULL, ApartmentRoomSuiteNumber VARCHAR(50) NULL, BuildingSiteNumber VARCHAR(20) NULL, NameOfCounty VARCHAR(30) NULL, CountyFIPSCode VARCHAR(5) NULL, Latitude VARCHAR(20) NULL, Longitude VARCHAR(20) NULL, DoNotPublishIndicator BOOLEAN NULL, CongressionalDistrict VARCHAR(30) NULL, LocaleDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffAddress_PK PRIMARY KEY (AddressTypeDescriptorId, City, PostalCode, StaffUSI, StateAbbreviationDescriptorId, StreetNumberName) ); ALTER TABLE edfi.StaffAddress ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffAddressPeriod -- CREATE TABLE edfi.StaffAddressPeriod ( AddressTypeDescriptorId INT NOT NULL, BeginDate DATE NOT NULL, City VARCHAR(30) NOT NULL, PostalCode VARCHAR(17) NOT NULL, StaffUSI INT NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, StreetNumberName VARCHAR(150) NOT NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffAddressPeriod_PK PRIMARY KEY (AddressTypeDescriptorId, BeginDate, City, PostalCode, StaffUSI, StateAbbreviationDescriptorId, StreetNumberName) ); ALTER TABLE edfi.StaffAddressPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffAncestryEthnicOrigin -- CREATE TABLE edfi.StaffAncestryEthnicOrigin ( AncestryEthnicOriginDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffAncestryEthnicOrigin_PK PRIMARY KEY (AncestryEthnicOriginDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffAncestryEthnicOrigin ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffClassificationDescriptor -- CREATE TABLE edfi.StaffClassificationDescriptor ( StaffClassificationDescriptorId INT NOT NULL, CONSTRAINT StaffClassificationDescriptor_PK PRIMARY KEY (StaffClassificationDescriptorId) ); -- Table edfi.StaffCohortAssociation -- CREATE TABLE edfi.StaffCohortAssociation ( BeginDate DATE NOT NULL, CohortIdentifier VARCHAR(20) NOT NULL, EducationOrganizationId INT NOT NULL, StaffUSI INT NOT NULL, EndDate DATE NULL, StudentRecordAccess BOOLEAN NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffCohortAssociation_PK PRIMARY KEY (BeginDate, CohortIdentifier, EducationOrganizationId, StaffUSI) ); ALTER TABLE edfi.StaffCohortAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffCohortAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffCohortAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffCredential -- CREATE TABLE edfi.StaffCredential ( CredentialIdentifier VARCHAR(60) NOT NULL, StaffUSI INT NOT NULL, StateOfIssueStateAbbreviationDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffCredential_PK PRIMARY KEY (CredentialIdentifier, StaffUSI, StateOfIssueStateAbbreviationDescriptorId) ); ALTER TABLE edfi.StaffCredential ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffDisciplineIncidentAssociation -- CREATE TABLE edfi.StaffDisciplineIncidentAssociation ( IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StaffUSI INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffDisciplineIncidentAssociation_PK PRIMARY KEY (IncidentIdentifier, SchoolId, StaffUSI) ); ALTER TABLE edfi.StaffDisciplineIncidentAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffDisciplineIncidentAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffDisciplineIncidentAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffDisciplineIncidentAssociationDisciplineIncidentPart_7fa4be -- CREATE TABLE edfi.StaffDisciplineIncidentAssociationDisciplineIncidentPart_7fa4be ( DisciplineIncidentParticipationCodeDescriptorId INT NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffDisciplineIncidentAssociationDisciplineIncide_7fa4be_PK PRIMARY KEY (DisciplineIncidentParticipationCodeDescriptorId, IncidentIdentifier, SchoolId, StaffUSI) ); ALTER TABLE edfi.StaffDisciplineIncidentAssociationDisciplineIncidentPart_7fa4be ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffEducationOrganizationAssignmentAssociation -- CREATE TABLE edfi.StaffEducationOrganizationAssignmentAssociation ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, StaffClassificationDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, PositionTitle VARCHAR(100) NULL, EndDate DATE NULL, OrderOfAssignment INT NULL, EmploymentEducationOrganizationId INT NULL, EmploymentStatusDescriptorId INT NULL, EmploymentHireDate DATE NULL, CredentialIdentifier VARCHAR(60) NULL, StateOfIssueStateAbbreviationDescriptorId INT NULL, FullTimeEquivalency DECIMAL(5, 4) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffEducationOrganizationAssignmentAssociation_PK PRIMARY KEY (BeginDate, EducationOrganizationId, StaffClassificationDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffEducationOrganizationAssignmentAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffEducationOrganizationAssignmentAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffEducationOrganizationAssignmentAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffEducationOrganizationContactAssociation -- CREATE TABLE edfi.StaffEducationOrganizationContactAssociation ( ContactTitle VARCHAR(75) NOT NULL, EducationOrganizationId INT NOT NULL, StaffUSI INT NOT NULL, ContactTypeDescriptorId INT NULL, ElectronicMailAddress VARCHAR(128) NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffEducationOrganizationContactAssociation_PK PRIMARY KEY (ContactTitle, EducationOrganizationId, StaffUSI) ); ALTER TABLE edfi.StaffEducationOrganizationContactAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffEducationOrganizationContactAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffEducationOrganizationContactAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffEducationOrganizationContactAssociationAddress -- CREATE TABLE edfi.StaffEducationOrganizationContactAssociationAddress ( ContactTitle VARCHAR(75) NOT NULL, EducationOrganizationId INT NOT NULL, StaffUSI INT NOT NULL, StreetNumberName VARCHAR(150) NOT NULL, ApartmentRoomSuiteNumber VARCHAR(50) NULL, BuildingSiteNumber VARCHAR(20) NULL, City VARCHAR(30) NOT NULL, StateAbbreviationDescriptorId INT NOT NULL, PostalCode VARCHAR(17) NOT NULL, NameOfCounty VARCHAR(30) NULL, CountyFIPSCode VARCHAR(5) NULL, Latitude VARCHAR(20) NULL, Longitude VARCHAR(20) NULL, AddressTypeDescriptorId INT NOT NULL, DoNotPublishIndicator BOOLEAN NULL, CongressionalDistrict VARCHAR(30) NULL, LocaleDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffEducationOrganizationContactAssociationAddress_PK PRIMARY KEY (ContactTitle, EducationOrganizationId, StaffUSI) ); ALTER TABLE edfi.StaffEducationOrganizationContactAssociationAddress ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffEducationOrganizationContactAssociationAddressPeriod -- CREATE TABLE edfi.StaffEducationOrganizationContactAssociationAddressPeriod ( BeginDate DATE NOT NULL, ContactTitle VARCHAR(75) NOT NULL, EducationOrganizationId INT NOT NULL, StaffUSI INT NOT NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffEducationOrganizationContactAssociationAddressPeriod_PK PRIMARY KEY (BeginDate, ContactTitle, EducationOrganizationId, StaffUSI) ); ALTER TABLE edfi.StaffEducationOrganizationContactAssociationAddressPeriod ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffEducationOrganizationContactAssociationTelephone -- CREATE TABLE edfi.StaffEducationOrganizationContactAssociationTelephone ( ContactTitle VARCHAR(75) NOT NULL, EducationOrganizationId INT NOT NULL, StaffUSI INT NOT NULL, TelephoneNumber VARCHAR(24) NOT NULL, TelephoneNumberTypeDescriptorId INT NOT NULL, OrderOfPriority INT NULL, TextMessageCapabilityIndicator BOOLEAN NULL, DoNotPublishIndicator BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffEducationOrganizationContactAssociationTelephone_PK PRIMARY KEY (ContactTitle, EducationOrganizationId, StaffUSI, TelephoneNumber, TelephoneNumberTypeDescriptorId) ); ALTER TABLE edfi.StaffEducationOrganizationContactAssociationTelephone ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffEducationOrganizationEmploymentAssociation -- CREATE TABLE edfi.StaffEducationOrganizationEmploymentAssociation ( EducationOrganizationId INT NOT NULL, EmploymentStatusDescriptorId INT NOT NULL, HireDate DATE NOT NULL, StaffUSI INT NOT NULL, EndDate DATE NULL, SeparationDescriptorId INT NULL, SeparationReasonDescriptorId INT NULL, Department VARCHAR(60) NULL, FullTimeEquivalency DECIMAL(5, 4) NULL, OfferDate DATE NULL, HourlyWage MONEY NULL, CredentialIdentifier VARCHAR(60) NULL, StateOfIssueStateAbbreviationDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffEducationOrganizationEmploymentAssociation_PK PRIMARY KEY (EducationOrganizationId, EmploymentStatusDescriptorId, HireDate, StaffUSI) ); ALTER TABLE edfi.StaffEducationOrganizationEmploymentAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffEducationOrganizationEmploymentAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffEducationOrganizationEmploymentAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffElectronicMail -- CREATE TABLE edfi.StaffElectronicMail ( ElectronicMailAddress VARCHAR(128) NOT NULL, ElectronicMailTypeDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, PrimaryEmailAddressIndicator BOOLEAN NULL, DoNotPublishIndicator BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffElectronicMail_PK PRIMARY KEY (ElectronicMailAddress, ElectronicMailTypeDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffElectronicMail ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffIdentificationCode -- CREATE TABLE edfi.StaffIdentificationCode ( StaffIdentificationSystemDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, AssigningOrganizationIdentificationCode VARCHAR(60) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffIdentificationCode_PK PRIMARY KEY (StaffIdentificationSystemDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffIdentificationCode ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffIdentificationDocument -- CREATE TABLE edfi.StaffIdentificationDocument ( IdentificationDocumentUseDescriptorId INT NOT NULL, PersonalInformationVerificationDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, DocumentTitle VARCHAR(60) NULL, DocumentExpirationDate DATE NULL, IssuerDocumentIdentificationCode VARCHAR(60) NULL, IssuerName VARCHAR(150) NULL, IssuerCountryDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffIdentificationDocument_PK PRIMARY KEY (IdentificationDocumentUseDescriptorId, PersonalInformationVerificationDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffIdentificationDocument ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffIdentificationSystemDescriptor -- CREATE TABLE edfi.StaffIdentificationSystemDescriptor ( StaffIdentificationSystemDescriptorId INT NOT NULL, CONSTRAINT StaffIdentificationSystemDescriptor_PK PRIMARY KEY (StaffIdentificationSystemDescriptorId) ); -- Table edfi.StaffInternationalAddress -- CREATE TABLE edfi.StaffInternationalAddress ( AddressTypeDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, AddressLine1 VARCHAR(150) NOT NULL, AddressLine2 VARCHAR(150) NULL, AddressLine3 VARCHAR(150) NULL, AddressLine4 VARCHAR(150) NULL, CountryDescriptorId INT NOT NULL, Latitude VARCHAR(20) NULL, Longitude VARCHAR(20) NULL, BeginDate DATE NULL, EndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffInternationalAddress_PK PRIMARY KEY (AddressTypeDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffInternationalAddress ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffLanguage -- CREATE TABLE edfi.StaffLanguage ( LanguageDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffLanguage_PK PRIMARY KEY (LanguageDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffLanguage ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffLanguageUse -- CREATE TABLE edfi.StaffLanguageUse ( LanguageDescriptorId INT NOT NULL, LanguageUseDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffLanguageUse_PK PRIMARY KEY (LanguageDescriptorId, LanguageUseDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffLanguageUse ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffLeave -- CREATE TABLE edfi.StaffLeave ( BeginDate DATE NOT NULL, StaffLeaveEventCategoryDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, EndDate DATE NULL, Reason VARCHAR(40) NULL, SubstituteAssigned BOOLEAN NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffLeave_PK PRIMARY KEY (BeginDate, StaffLeaveEventCategoryDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffLeave ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffLeave ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffLeave ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffLeaveEventCategoryDescriptor -- CREATE TABLE edfi.StaffLeaveEventCategoryDescriptor ( StaffLeaveEventCategoryDescriptorId INT NOT NULL, CONSTRAINT StaffLeaveEventCategoryDescriptor_PK PRIMARY KEY (StaffLeaveEventCategoryDescriptorId) ); -- Table edfi.StaffOtherName -- CREATE TABLE edfi.StaffOtherName ( OtherNameTypeDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, PersonalTitlePrefix VARCHAR(30) NULL, FirstName VARCHAR(75) NOT NULL, MiddleName VARCHAR(75) NULL, LastSurname VARCHAR(75) NOT NULL, GenerationCodeSuffix VARCHAR(10) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffOtherName_PK PRIMARY KEY (OtherNameTypeDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffOtherName ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffPersonalIdentificationDocument -- CREATE TABLE edfi.StaffPersonalIdentificationDocument ( IdentificationDocumentUseDescriptorId INT NOT NULL, PersonalInformationVerificationDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, DocumentTitle VARCHAR(60) NULL, DocumentExpirationDate DATE NULL, IssuerDocumentIdentificationCode VARCHAR(60) NULL, IssuerName VARCHAR(150) NULL, IssuerCountryDescriptorId INT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffPersonalIdentificationDocument_PK PRIMARY KEY (IdentificationDocumentUseDescriptorId, PersonalInformationVerificationDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffPersonalIdentificationDocument ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffProgramAssociation -- CREATE TABLE edfi.StaffProgramAssociation ( BeginDate DATE NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, EndDate DATE NULL, StudentRecordAccess BOOLEAN NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffProgramAssociation_PK PRIMARY KEY (BeginDate, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffProgramAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffProgramAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffProgramAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffRace -- CREATE TABLE edfi.StaffRace ( RaceDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffRace_PK PRIMARY KEY (RaceDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffRace ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffRecognition -- CREATE TABLE edfi.StaffRecognition ( RecognitionTypeDescriptorId INT NOT NULL, StaffUSI INT NOT NULL, AchievementTitle VARCHAR(60) NULL, AchievementCategoryDescriptorId INT NULL, AchievementCategorySystem VARCHAR(60) NULL, IssuerName VARCHAR(150) NULL, IssuerOriginURL VARCHAR(255) NULL, Criteria VARCHAR(150) NULL, CriteriaURL VARCHAR(255) NULL, EvidenceStatement VARCHAR(150) NULL, ImageURL VARCHAR(255) NULL, RecognitionDescription VARCHAR(80) NULL, RecognitionAwardDate DATE NULL, RecognitionAwardExpiresDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffRecognition_PK PRIMARY KEY (RecognitionTypeDescriptorId, StaffUSI) ); ALTER TABLE edfi.StaffRecognition ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffSchoolAssociation -- CREATE TABLE edfi.StaffSchoolAssociation ( ProgramAssignmentDescriptorId INT NOT NULL, SchoolId INT NOT NULL, StaffUSI INT NOT NULL, CalendarCode VARCHAR(60) NULL, SchoolYear SMALLINT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffSchoolAssociation_PK PRIMARY KEY (ProgramAssignmentDescriptorId, SchoolId, StaffUSI) ); ALTER TABLE edfi.StaffSchoolAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffSchoolAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffSchoolAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffSchoolAssociationAcademicSubject -- CREATE TABLE edfi.StaffSchoolAssociationAcademicSubject ( AcademicSubjectDescriptorId INT NOT NULL, ProgramAssignmentDescriptorId INT NOT NULL, SchoolId INT NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffSchoolAssociationAcademicSubject_PK PRIMARY KEY (AcademicSubjectDescriptorId, ProgramAssignmentDescriptorId, SchoolId, StaffUSI) ); ALTER TABLE edfi.StaffSchoolAssociationAcademicSubject ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffSchoolAssociationGradeLevel -- CREATE TABLE edfi.StaffSchoolAssociationGradeLevel ( GradeLevelDescriptorId INT NOT NULL, ProgramAssignmentDescriptorId INT NOT NULL, SchoolId INT NOT NULL, StaffUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffSchoolAssociationGradeLevel_PK PRIMARY KEY (GradeLevelDescriptorId, ProgramAssignmentDescriptorId, SchoolId, StaffUSI) ); ALTER TABLE edfi.StaffSchoolAssociationGradeLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffSectionAssociation -- CREATE TABLE edfi.StaffSectionAssociation ( LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, StaffUSI INT NOT NULL, ClassroomPositionDescriptorId INT NOT NULL, BeginDate DATE NULL, EndDate DATE NULL, HighlyQualifiedTeacher BOOLEAN NULL, TeacherStudentDataLinkExclusion BOOLEAN NULL, PercentageContribution DECIMAL(5, 4) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StaffSectionAssociation_PK PRIMARY KEY (LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName, StaffUSI) ); ALTER TABLE edfi.StaffSectionAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StaffSectionAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StaffSectionAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StaffTelephone -- CREATE TABLE edfi.StaffTelephone ( StaffUSI INT NOT NULL, TelephoneNumber VARCHAR(24) NOT NULL, TelephoneNumberTypeDescriptorId INT NOT NULL, OrderOfPriority INT NULL, TextMessageCapabilityIndicator BOOLEAN NULL, DoNotPublishIndicator BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffTelephone_PK PRIMARY KEY (StaffUSI, TelephoneNumber, TelephoneNumberTypeDescriptorId) ); ALTER TABLE edfi.StaffTelephone ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffTribalAffiliation -- CREATE TABLE edfi.StaffTribalAffiliation ( StaffUSI INT NOT NULL, TribalAffiliationDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffTribalAffiliation_PK PRIMARY KEY (StaffUSI, TribalAffiliationDescriptorId) ); ALTER TABLE edfi.StaffTribalAffiliation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StaffVisa -- CREATE TABLE edfi.StaffVisa ( StaffUSI INT NOT NULL, VisaDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StaffVisa_PK PRIMARY KEY (StaffUSI, VisaDescriptorId) ); ALTER TABLE edfi.StaffVisa ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StateAbbreviationDescriptor -- CREATE TABLE edfi.StateAbbreviationDescriptor ( StateAbbreviationDescriptorId INT NOT NULL, CONSTRAINT StateAbbreviationDescriptor_PK PRIMARY KEY (StateAbbreviationDescriptorId) ); -- Table edfi.StateEducationAgency -- CREATE TABLE edfi.StateEducationAgency ( StateEducationAgencyId INT NOT NULL, CONSTRAINT StateEducationAgency_PK PRIMARY KEY (StateEducationAgencyId) ); -- Table edfi.StateEducationAgencyAccountability -- CREATE TABLE edfi.StateEducationAgencyAccountability ( SchoolYear SMALLINT NOT NULL, StateEducationAgencyId INT NOT NULL, CTEGraduationRateInclusion BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StateEducationAgencyAccountability_PK PRIMARY KEY (SchoolYear, StateEducationAgencyId) ); ALTER TABLE edfi.StateEducationAgencyAccountability ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StateEducationAgencyFederalFunds -- CREATE TABLE edfi.StateEducationAgencyFederalFunds ( FiscalYear INT NOT NULL, StateEducationAgencyId INT NOT NULL, FederalProgramsFundingAllocation MONEY NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StateEducationAgencyFederalFunds_PK PRIMARY KEY (FiscalYear, StateEducationAgencyId) ); ALTER TABLE edfi.StateEducationAgencyFederalFunds ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.Student -- CREATE TABLE edfi.Student ( StudentUSI SERIAL NOT NULL, PersonalTitlePrefix VARCHAR(30) NULL, FirstName VARCHAR(75) NOT NULL, MiddleName VARCHAR(75) NULL, LastSurname VARCHAR(75) NOT NULL, GenerationCodeSuffix VARCHAR(10) NULL, MaidenName VARCHAR(75) NULL, BirthDate DATE NOT NULL, BirthCity VARCHAR(30) NULL, BirthStateAbbreviationDescriptorId INT NULL, BirthInternationalProvince VARCHAR(150) NULL, BirthCountryDescriptorId INT NULL, DateEnteredUS DATE NULL, MultipleBirthStatus BOOLEAN NULL, BirthSexDescriptorId INT NULL, CitizenshipStatusDescriptorId INT NULL, PersonId VARCHAR(32) NULL, SourceSystemDescriptorId INT NULL, StudentUniqueId VARCHAR(32) NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT Student_PK PRIMARY KEY (StudentUSI) ); CREATE UNIQUE INDEX Student_UI_StudentUniqueId ON edfi.Student (StudentUniqueId); ALTER TABLE edfi.Student ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.Student ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.Student ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StudentAcademicRecord -- CREATE TABLE edfi.StudentAcademicRecord ( EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, CumulativeEarnedCredits DECIMAL(9, 3) NULL, CumulativeEarnedCreditTypeDescriptorId INT NULL, CumulativeEarnedCreditConversion DECIMAL(9, 2) NULL, CumulativeAttemptedCredits DECIMAL(9, 3) NULL, CumulativeAttemptedCreditTypeDescriptorId INT NULL, CumulativeAttemptedCreditConversion DECIMAL(9, 2) NULL, CumulativeGradePointsEarned DECIMAL(18, 4) NULL, CumulativeGradePointAverage DECIMAL(18, 4) NULL, GradeValueQualifier VARCHAR(80) NULL, ProjectedGraduationDate DATE NULL, SessionEarnedCredits DECIMAL(9, 3) NULL, SessionEarnedCreditTypeDescriptorId INT NULL, SessionEarnedCreditConversion DECIMAL(9, 2) NULL, SessionAttemptedCredits DECIMAL(9, 3) NULL, SessionAttemptedCreditTypeDescriptorId INT NULL, SessionAttemptedCreditConversion DECIMAL(9, 2) NULL, SessionGradePointsEarned DECIMAL(18, 4) NULL, SessionGradePointAverage DECIMAL(18, 4) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StudentAcademicRecord_PK PRIMARY KEY (EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.StudentAcademicRecord ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StudentAcademicRecord ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StudentAcademicRecord ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StudentAcademicRecordAcademicHonor -- CREATE TABLE edfi.StudentAcademicRecordAcademicHonor ( AcademicHonorCategoryDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, HonorDescription VARCHAR(80) NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, AchievementTitle VARCHAR(60) NULL, AchievementCategoryDescriptorId INT NULL, AchievementCategorySystem VARCHAR(60) NULL, IssuerName VARCHAR(150) NULL, IssuerOriginURL VARCHAR(255) NULL, Criteria VARCHAR(150) NULL, CriteriaURL VARCHAR(255) NULL, EvidenceStatement VARCHAR(150) NULL, ImageURL VARCHAR(255) NULL, HonorAwardDate DATE NULL, HonorAwardExpiresDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAcademicRecordAcademicHonor_PK PRIMARY KEY (AcademicHonorCategoryDescriptorId, EducationOrganizationId, HonorDescription, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.StudentAcademicRecordAcademicHonor ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAcademicRecordClassRanking -- CREATE TABLE edfi.StudentAcademicRecordClassRanking ( EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, ClassRank INT NOT NULL, TotalNumberInClass INT NOT NULL, PercentageRanking INT NULL, ClassRankingDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAcademicRecordClassRanking_PK PRIMARY KEY (EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.StudentAcademicRecordClassRanking ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAcademicRecordDiploma -- CREATE TABLE edfi.StudentAcademicRecordDiploma ( DiplomaAwardDate DATE NOT NULL, DiplomaTypeDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, AchievementTitle VARCHAR(60) NULL, AchievementCategoryDescriptorId INT NULL, AchievementCategorySystem VARCHAR(60) NULL, IssuerName VARCHAR(150) NULL, IssuerOriginURL VARCHAR(255) NULL, Criteria VARCHAR(150) NULL, CriteriaURL VARCHAR(255) NULL, EvidenceStatement VARCHAR(150) NULL, ImageURL VARCHAR(255) NULL, DiplomaLevelDescriptorId INT NULL, CTECompleter BOOLEAN NULL, DiplomaDescription VARCHAR(80) NULL, DiplomaAwardExpiresDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAcademicRecordDiploma_PK PRIMARY KEY (DiplomaAwardDate, DiplomaTypeDescriptorId, EducationOrganizationId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.StudentAcademicRecordDiploma ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAcademicRecordGradePointAverage -- CREATE TABLE edfi.StudentAcademicRecordGradePointAverage ( EducationOrganizationId INT NOT NULL, GradePointAverageTypeDescriptorId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, IsCumulative BOOLEAN NULL, GradePointAverageValue DECIMAL(18, 4) NOT NULL, MaxGradePointAverageValue DECIMAL(18, 4) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAcademicRecordGradePointAverage_PK PRIMARY KEY (EducationOrganizationId, GradePointAverageTypeDescriptorId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.StudentAcademicRecordGradePointAverage ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAcademicRecordRecognition -- CREATE TABLE edfi.StudentAcademicRecordRecognition ( EducationOrganizationId INT NOT NULL, RecognitionTypeDescriptorId INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, AchievementTitle VARCHAR(60) NULL, AchievementCategoryDescriptorId INT NULL, AchievementCategorySystem VARCHAR(60) NULL, IssuerName VARCHAR(150) NULL, IssuerOriginURL VARCHAR(255) NULL, Criteria VARCHAR(150) NULL, CriteriaURL VARCHAR(255) NULL, EvidenceStatement VARCHAR(150) NULL, ImageURL VARCHAR(255) NULL, RecognitionDescription VARCHAR(80) NULL, RecognitionAwardDate DATE NULL, RecognitionAwardExpiresDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAcademicRecordRecognition_PK PRIMARY KEY (EducationOrganizationId, RecognitionTypeDescriptorId, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.StudentAcademicRecordRecognition ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAcademicRecordReportCard -- CREATE TABLE edfi.StudentAcademicRecordReportCard ( EducationOrganizationId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, SchoolYear SMALLINT NOT NULL, StudentUSI INT NOT NULL, TermDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAcademicRecordReportCard_PK PRIMARY KEY (EducationOrganizationId, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, SchoolYear, StudentUSI, TermDescriptorId) ); ALTER TABLE edfi.StudentAcademicRecordReportCard ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessment -- CREATE TABLE edfi.StudentAssessment ( AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, AdministrationDate TIMESTAMP NOT NULL, AdministrationEndDate TIMESTAMP NULL, SerialNumber VARCHAR(60) NULL, AdministrationLanguageDescriptorId INT NULL, AdministrationEnvironmentDescriptorId INT NULL, RetestIndicatorDescriptorId INT NULL, ReasonNotTestedDescriptorId INT NULL, WhenAssessedGradeLevelDescriptorId INT NULL, EventCircumstanceDescriptorId INT NULL, EventDescription VARCHAR(1024) NULL, SchoolYear SMALLINT NULL, PlatformTypeDescriptorId INT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StudentAssessment_PK PRIMARY KEY (AssessmentIdentifier, Namespace, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessment ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StudentAssessment ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StudentAssessment ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessmentAccommodation -- CREATE TABLE edfi.StudentAssessmentAccommodation ( AccommodationDescriptorId INT NOT NULL, AssessmentIdentifier VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAssessmentAccommodation_PK PRIMARY KEY (AccommodationDescriptorId, AssessmentIdentifier, Namespace, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessmentAccommodation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessmentItem -- CREATE TABLE edfi.StudentAssessmentItem ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, AssessmentResponse VARCHAR(60) NULL, DescriptiveFeedback VARCHAR(1024) NULL, ResponseIndicatorDescriptorId INT NULL, AssessmentItemResultDescriptorId INT NOT NULL, RawScoreResult DECIMAL(15, 5) NULL, TimeAssessed VARCHAR(30) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAssessmentItem_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, Namespace, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessmentItem ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessmentPerformanceLevel -- CREATE TABLE edfi.StudentAssessmentPerformanceLevel ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, Namespace VARCHAR(255) NOT NULL, PerformanceLevelDescriptorId INT NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, PerformanceLevelMet BOOLEAN NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAssessmentPerformanceLevel_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, Namespace, PerformanceLevelDescriptorId, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessmentPerformanceLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessmentScoreResult -- CREATE TABLE edfi.StudentAssessmentScoreResult ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, Namespace VARCHAR(255) NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, Result VARCHAR(35) NOT NULL, ResultDatatypeTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAssessmentScoreResult_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, Namespace, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessmentScoreResult ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessmentStudentObjectiveAssessment -- CREATE TABLE edfi.StudentAssessmentStudentObjectiveAssessment ( AssessmentIdentifier VARCHAR(60) NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAssessmentStudentObjectiveAssessment_PK PRIMARY KEY (AssessmentIdentifier, IdentificationCode, Namespace, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessmentStudentObjectiveAssessment ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessmentStudentObjectiveAssessmentPerformanceLevel -- CREATE TABLE edfi.StudentAssessmentStudentObjectiveAssessmentPerformanceLevel ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, PerformanceLevelDescriptorId INT NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, PerformanceLevelMet BOOLEAN NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAssessmentStudentObjectiveAssessmentPerformanceLevel_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, IdentificationCode, Namespace, PerformanceLevelDescriptorId, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessmentStudentObjectiveAssessmentPerformanceLevel ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentAssessmentStudentObjectiveAssessmentScoreResult -- CREATE TABLE edfi.StudentAssessmentStudentObjectiveAssessmentScoreResult ( AssessmentIdentifier VARCHAR(60) NOT NULL, AssessmentReportingMethodDescriptorId INT NOT NULL, IdentificationCode VARCHAR(60) NOT NULL, Namespace VARCHAR(255) NOT NULL, StudentAssessmentIdentifier VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, Result VARCHAR(35) NOT NULL, ResultDatatypeTypeDescriptorId INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentAssessmentStudentObjectiveAssessmentScoreResult_PK PRIMARY KEY (AssessmentIdentifier, AssessmentReportingMethodDescriptorId, IdentificationCode, Namespace, StudentAssessmentIdentifier, StudentUSI) ); ALTER TABLE edfi.StudentAssessmentStudentObjectiveAssessmentScoreResult ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentCharacteristicDescriptor -- CREATE TABLE edfi.StudentCharacteristicDescriptor ( StudentCharacteristicDescriptorId INT NOT NULL, CONSTRAINT StudentCharacteristicDescriptor_PK PRIMARY KEY (StudentCharacteristicDescriptorId) ); -- Table edfi.StudentCohortAssociation -- CREATE TABLE edfi.StudentCohortAssociation ( BeginDate DATE NOT NULL, CohortIdentifier VARCHAR(20) NOT NULL, EducationOrganizationId INT NOT NULL, StudentUSI INT NOT NULL, EndDate DATE NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StudentCohortAssociation_PK PRIMARY KEY (BeginDate, CohortIdentifier, EducationOrganizationId, StudentUSI) ); ALTER TABLE edfi.StudentCohortAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StudentCohortAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StudentCohortAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StudentCohortAssociationSection -- CREATE TABLE edfi.StudentCohortAssociationSection ( BeginDate DATE NOT NULL, CohortIdentifier VARCHAR(20) NOT NULL, EducationOrganizationId INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentCohortAssociationSection_PK PRIMARY KEY (BeginDate, CohortIdentifier, EducationOrganizationId, LocalCourseCode, SchoolId, SchoolYear, SectionIdentifier, SessionName, StudentUSI) ); ALTER TABLE edfi.StudentCohortAssociationSection ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentCompetencyObjective -- CREATE TABLE edfi.StudentCompetencyObjective ( GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, Objective VARCHAR(60) NOT NULL, ObjectiveEducationOrganizationId INT NOT NULL, ObjectiveGradeLevelDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, CompetencyLevelDescriptorId INT NOT NULL, DiagnosticStatement VARCHAR(1024) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StudentCompetencyObjective_PK PRIMARY KEY (GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, Objective, ObjectiveEducationOrganizationId, ObjectiveGradeLevelDescriptorId, StudentUSI) ); ALTER TABLE edfi.StudentCompetencyObjective ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StudentCompetencyObjective ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StudentCompetencyObjective ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StudentCompetencyObjectiveGeneralStudentProgramAssociation -- CREATE TABLE edfi.StudentCompetencyObjectiveGeneralStudentProgramAssociation ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, Objective VARCHAR(60) NOT NULL, ObjectiveEducationOrganizationId INT NOT NULL, ObjectiveGradeLevelDescriptorId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentCompetencyObjectiveGeneralStudentProgramAssociation_PK PRIMARY KEY (BeginDate, EducationOrganizationId, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, Objective, ObjectiveEducationOrganizationId, ObjectiveGradeLevelDescriptorId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI) ); ALTER TABLE edfi.StudentCompetencyObjectiveGeneralStudentProgramAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentCompetencyObjectiveStudentSectionAssociation -- CREATE TABLE edfi.StudentCompetencyObjectiveStudentSectionAssociation ( BeginDate DATE NOT NULL, GradingPeriodDescriptorId INT NOT NULL, GradingPeriodSchoolId INT NOT NULL, GradingPeriodSchoolYear SMALLINT NOT NULL, GradingPeriodSequence INT NOT NULL, LocalCourseCode VARCHAR(60) NOT NULL, Objective VARCHAR(60) NOT NULL, ObjectiveEducationOrganizationId INT NOT NULL, ObjectiveGradeLevelDescriptorId INT NOT NULL, SchoolId INT NOT NULL, SchoolYear SMALLINT NOT NULL, SectionIdentifier VARCHAR(255) NOT NULL, SessionName VARCHAR(60) NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentCompetencyObjectiveStudentSectionAssociation_PK PRIMARY KEY (BeginDate, GradingPeriodDescriptorId, GradingPeriodSchoolId, GradingPeriodSchoolYear, GradingPeriodSequence, LocalCourseCode, Objective, ObjectiveEducationOrganizationId, ObjectiveGradeLevelDescriptorId, SchoolId, SchoolYear, SectionIdentifier, SessionName, StudentUSI) ); ALTER TABLE edfi.StudentCompetencyObjectiveStudentSectionAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentCTEProgramAssociation -- CREATE TABLE edfi.StudentCTEProgramAssociation ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, NonTraditionalGenderStatus BOOLEAN NULL, PrivateCTEProgram BOOLEAN NULL, TechnicalSkillsAssessmentDescriptorId INT NULL, CONSTRAINT StudentCTEProgramAssociation_PK PRIMARY KEY (BeginDate, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI) ); -- Table edfi.StudentCTEProgramAssociationCTEProgram -- CREATE TABLE edfi.StudentCTEProgramAssociationCTEProgram ( BeginDate DATE NOT NULL, CareerPathwayDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, CIPCode VARCHAR(120) NULL, PrimaryCTEProgramIndicator BOOLEAN NULL, CTEProgramCompletionIndicator BOOLEAN NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentCTEProgramAssociationCTEProgram_PK PRIMARY KEY (BeginDate, CareerPathwayDescriptorId, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI) ); ALTER TABLE edfi.StudentCTEProgramAssociationCTEProgram ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentCTEProgramAssociationCTEProgramService -- CREATE TABLE edfi.StudentCTEProgramAssociationCTEProgramService ( BeginDate DATE NOT NULL, CTEProgramServiceDescriptorId INT NOT NULL, EducationOrganizationId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, PrimaryIndicator BOOLEAN NULL, ServiceBeginDate DATE NULL, ServiceEndDate DATE NULL, CIPCode VARCHAR(120) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentCTEProgramAssociationCTEProgramService_PK PRIMARY KEY (BeginDate, CTEProgramServiceDescriptorId, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, StudentUSI) ); ALTER TABLE edfi.StudentCTEProgramAssociationCTEProgramService ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentCTEProgramAssociationService -- CREATE TABLE edfi.StudentCTEProgramAssociationService ( BeginDate DATE NOT NULL, EducationOrganizationId INT NOT NULL, ProgramEducationOrganizationId INT NOT NULL, ProgramName VARCHAR(60) NOT NULL, ProgramTypeDescriptorId INT NOT NULL, ServiceDescriptorId INT NOT NULL, StudentUSI INT NOT NULL, PrimaryIndicator BOOLEAN NULL, ServiceBeginDate DATE NULL, ServiceEndDate DATE NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentCTEProgramAssociationService_PK PRIMARY KEY (BeginDate, EducationOrganizationId, ProgramEducationOrganizationId, ProgramName, ProgramTypeDescriptorId, ServiceDescriptorId, StudentUSI) ); ALTER TABLE edfi.StudentCTEProgramAssociationService ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentDisciplineIncidentAssociation -- CREATE TABLE edfi.StudentDisciplineIncidentAssociation ( IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, StudentParticipationCodeDescriptorId INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StudentDisciplineIncidentAssociation_PK PRIMARY KEY (IncidentIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.StudentDisciplineIncidentAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StudentDisciplineIncidentAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StudentDisciplineIncidentAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StudentDisciplineIncidentAssociationBehavior -- CREATE TABLE edfi.StudentDisciplineIncidentAssociationBehavior ( BehaviorDescriptorId INT NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, BehaviorDetailedDescription VARCHAR(1024) NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentDisciplineIncidentAssociationBehavior_PK PRIMARY KEY (BehaviorDescriptorId, IncidentIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.StudentDisciplineIncidentAssociationBehavior ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentDisciplineIncidentBehaviorAssociation -- CREATE TABLE edfi.StudentDisciplineIncidentBehaviorAssociation ( BehaviorDescriptorId INT NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, BehaviorDetailedDescription VARCHAR(1024) NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StudentDisciplineIncidentBehaviorAssociation_PK PRIMARY KEY (BehaviorDescriptorId, IncidentIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.StudentDisciplineIncidentBehaviorAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StudentDisciplineIncidentBehaviorAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StudentDisciplineIncidentBehaviorAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; -- Table edfi.StudentDisciplineIncidentBehaviorAssociationDisciplineIn_ae6a21 -- CREATE TABLE edfi.StudentDisciplineIncidentBehaviorAssociationDisciplineIn_ae6a21 ( BehaviorDescriptorId INT NOT NULL, DisciplineIncidentParticipationCodeDescriptorId INT NOT NULL, IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, CreateDate TIMESTAMP NOT NULL, CONSTRAINT StudentDisciplineIncidentBehaviorAssociationDiscip_ae6a21_PK PRIMARY KEY (BehaviorDescriptorId, DisciplineIncidentParticipationCodeDescriptorId, IncidentIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.StudentDisciplineIncidentBehaviorAssociationDisciplineIn_ae6a21 ALTER COLUMN CreateDate SET DEFAULT current_timestamp; -- Table edfi.StudentDisciplineIncidentNonOffenderAssociation -- CREATE TABLE edfi.StudentDisciplineIncidentNonOffenderAssociation ( IncidentIdentifier VARCHAR(20) NOT NULL, SchoolId INT NOT NULL, StudentUSI INT NOT NULL, Discriminator VARCHAR(128) NULL, CreateDate TIMESTAMP NOT NULL, LastModifiedDate TIMESTAMP NOT NULL, Id UUID NOT NULL, CONSTRAINT StudentDisciplineIncidentNonOffenderAssociation_PK PRIMARY KEY (IncidentIdentifier, SchoolId, StudentUSI) ); ALTER TABLE edfi.StudentDisciplineIncidentNonOffenderAssociation ALTER COLUMN CreateDate SET DEFAULT current_timestamp; ALTER TABLE edfi.StudentDisciplineIncidentNonOffenderAssociation ALTER COLUMN Id SET DEFAULT gen_random_uuid(); ALTER TABLE edfi.StudentDisciplineIncidentNonOffenderAssociation ALTER COLUMN LastModifiedDate SET DEFAULT current_timestamp; --
22,373
https://github.com/looms-polimi/Parallel_manipulators/blob/master/Modelica_models/DeltaRobot/Types/ReducerParameters.mo
Github Open Source
Open Source
BSD-3-Clause
null
Parallel_manipulators
looms-polimi
Modelica
Code
23
77
within DeltaRobot.Types; record ReducerParameters "Parameters of a gear reducer" extends DeltaRobot.Icons.Record; // Icon parameter Real ratio(min=0) = 20 "Transmission ratio (flange_a.phi/flange_b.phi)"; end ReducerParameters;
16,803
https://github.com/henrique15775/Programa-oWeb--Pr-tica-01/blob/master/app/js/model/conta.js
Github Open Source
Open Source
MIT
null
Programa-oWeb--Pr-tica-01
henrique15775
JavaScript
Code
67
201
class Conta { constructor(numero, saldo = 0) { this._numero = numero; this._saldo = saldo; } get numero() { return this._numero; } set numero(numero) { this._numero = numero; } get saldo() { return this._saldo; } debitar(valor) { //apenas debita se houver saldo if (valor < this._saldo) { this._saldo -= valor; } } creditar(valor) { this._saldo += valor; } toString() { return `Número: ${this._numero} - Saldo: ${this._saldo}`; } }
34,854
https://github.com/boisebrigade/cute-pets-boise/blob/master/apikeys.py
Github Open Source
Open Source
MIT
null
cute-pets-boise
boisebrigade
Python
Code
25
161
# All API keys needed by the script to function pet_finder_key = "YOUR_PETFINDER_API_KEY_GOES_HERE" twitter_consumer_key = "YOUR_TIWTTER_CONSUMER_KEY_GOES_HERE" twitter_consumer_secret = "YOUR_TWITTER_CONSUMER_SECRET_GOES_HERE" twitter_access_token_key = "YOUR_TWITTER_ACCESS_TOKEN_KEY_GOES_HERE" twitter_access_token_secret = "YOUR_TWITTER_ACCESS_TOKEN_SECRET_GOES_HERE"
47,632
https://github.com/omunroe-com/nasabingo/blob/master/examples/serial_example.py
Github Open Source
Open Source
LicenseRef-scancode-warranty-disclaimer, LicenseRef-scancode-us-govt-public-domain
2,018
nasabingo
omunroe-com
Python
Code
647
2,298
""" example of regression done using the serial island manager (islands done serially on a single process) """ import random import numpy as np from bingo.AGraph import AGraphManipulator as agm from bingo.AGraph import AGNodes from bingo import AGraphCpp from bingo.FitnessPredictor import FPManipulator as fpm from bingo.IslandManager import SerialIslandManager from bingo.Utils import snake_walk from bingo.FitnessMetric import ImplicitRegression, StandardRegression from bingo.TrainingData import ExplicitTrainingData, ImplicitTrainingData from bingocpp.build import bingocpp import logging logging.basicConfig(level=logging.DEBUG, format='%(message)s') def make_circle_data(data_size): """makes test data for circular constant regression""" x = np.empty([data_size, 2]) for i, theta in enumerate(np.linspace(0, 3.14 * 2, data_size)): x[i, 0] = np.cos(theta) x[i, 1] = np.sin(theta) return x def make_norm_data(data_size): """makes test data for finding 3d norm with standard regression""" n_lin = int(np.power(data_size, 1.0/3)) + 1 x_1 = np.linspace(0, 5, n_lin) x_2 = np.linspace(0, 5, n_lin) x_3 = np.linspace(0, 5, n_lin) x = np.array(np.meshgrid(x_1, x_2, x_3)).T.reshape(-1, 3) x = x[np.random.choice(x.shape[0], data_size, replace=False), :] # make solution y = (np.linalg.norm(x, axis=1)) y = y.reshape([-1, 1]) return x, y def make_1d_data(data_size, test_num): """makes test data for 1d standard symbolic regression""" x = np.empty(0) if test_num == 1: x = np.linspace(-2, 2, data_size, False) y = x * x + 0.5 elif test_num == 2: x = np.linspace(-5, 5, data_size, False) y = 1.5*x*x - x*x*x elif test_num == 3: x = np.linspace(-3, 3, data_size, False) y = np.exp(np.abs(x))*np.sin(x) elif test_num == 4: x = np.linspace(-10, 10, data_size, False) y = x*x*np.exp(np.sin(x)) + x + np.sin(3.14159/4 - x*x*x) x = x.reshape([-1, 1]) y = y.reshape([-1, 1]) return x, y def make_sphere_data(data_size): """makes test data for spherical constant regression""" x = np.empty([data_size, 3]) for i in range(data_size): phi = (3.140*.9*i)/data_size+3.14*.05 theta = (3.14*20*i)/data_size+3.14/2 x[i, 0] = np.cos(theta)*np.sin(phi) x[i, 1] = np.sin(theta)*np.sin(phi) x[i, 2] = np.cos(phi) i += 1 return x def make_sphere_data_changing_rad(data_size): """makes test data for spherical constant regression with varying radius""" x = np.empty([data_size, 4]) radius = 10 for i in range(data_size): if random.random() > 0.5: radius += 0.2 else: radius += -0.2 phi = (3.140 * .9 * i) / data_size + 3.14 * .05 theta = (3.14 * 20 * i) / data_size + 3.14 / 2 x[i, 0] = np.cos(theta) * np.sin(phi) * radius x[i, 1] = np.sin(theta) * np.sin(phi) * radius x[i, 2] = np.cos(phi) * radius x[i, 3] = radius i += 1 return x def main(max_steps, epsilon, data_size, n_islands): """main regression function""" # -------------------------------------------- # MAKE DATA (uncomment one of the below lines) # -------------------------------------------- # data for standard regression # (use with ExplicitTrainingData and StandardRegression) # x_true, y_true = make_1d_data(data_size, 1) x_true, y_true = make_1d_data(data_size, 2) # x_true, y_true = make_1d_data(data_size, 3) # x_true, y_true = make_1d_data(data_size, 4) # x_true, y_true = make_norm_data(data_size) # data for implicit regression # (use with ImplicitTrainingData and ImplicitRegression) # x_true = make_circle_data(data_size) # ------------------------------------------------ # MAKE TRAINING DATA (uncomment one of the below) # ------------------------------------------------ training_data = ExplicitTrainingData(x_true, y_true) # training_data = ImplicitTrainingData(x_true) # ------------------------------------------------------------ # MAKE SOLUTION MANIPULATOR (uncomment one of the below blocks) # ------------------------------------------------------------ # using AGraph.py for the solution manipulator # sol_manip = agm(x_true.shape[1], 32, nloads=2) # sol_manip.add_node_type(AGNodes.Add) # sol_manip.add_node_type(AGNodes.Subtract) # sol_manip.add_node_type(AGNodes.Multiply) # sol_manip.add_node_type(AGNodes.Divide) # # sol_manip.add_node_type(AGNodes.Exp) # # sol_manip.add_node_type(AGNodes.Log) # # sol_manip.add_node_type(AGNodes.Sin) # # sol_manip.add_node_type(AGNodes.Cos) # # sol_manip.add_node_type(AGNodes.Abs) # sol_manip.add_node_type(AGNodes.Sqrt) # using AGraphCpp.py for the solution manipulator sol_manip = AGraphCpp.AGraphCppManipulator(x_true.shape[1], 32, nloads=2) sol_manip.add_node_type(2) # + sol_manip.add_node_type(3) # - sol_manip.add_node_type(4) # * sol_manip.add_node_type(5) # / sol_manip.add_node_type(12) # sqrt # ---------------------------------- # MAKE FITNESS PREDICTOR MANIPULATOR # ---------------------------------- pred_manip = fpm(128, data_size) # ------------------------------------------------ # MAKE FITNESS METRIC (uncomment one of the below) # ------------------------------------------------ regressor = StandardRegression() # regressor = ImplicitRegression() # -------------------------------------- # MAKE SERIAL ISLAND MANAGER THEN RUN IT # -------------------------------------- islmngr = SerialIslandManager(n_islands, solution_training_data=training_data, solution_manipulator=sol_manip, predictor_manipulator=pred_manip, solution_pop_size=64, fitness_metric=regressor, solution_age_fitness=True ) islmngr.run_islands(max_steps, epsilon, step_increment=100) # example of saving/loading # islmngr.save_state('test.p') # islmngr.load_state('test.p') # islmngr.run_islands(max_steps, epsilon, step_increment=100) if __name__ == "__main__": MAX_STEPS = 1000 CONVERGENCE_EPSILON = 1.0e-8 DATA_SIZE = 100 N_ISLANDS = 2 bingocpp.rand_init() main(MAX_STEPS, CONVERGENCE_EPSILON, DATA_SIZE, N_ISLANDS)
26,977
https://github.com/cesantaniello/rick-and-morty-vue/blob/master/src/components/FilterByName.vue
Github Open Source
Open Source
MIT
2,022
rick-and-morty-vue
cesantaniello
Vue
Code
81
229
<template> <div class="search"> <input type="text" placeholder="Search by name" v-model="name" @keyup="filter()"> </div> </template> <script> import { ref } from 'vue' import { useStore } from 'vuex' export default { setup() { const store = useStore() const name = ref('') const filter = () => { store.dispatch('filterByName', name.value) } return { name, filter } } } </script> <style lang="scss"> .search { width: 400px; margin: 3rem auto 0; input { height: 53px; width: 400px; border: none; border-radius: 10px; padding: 0 0.5rem; } } </style>
13,026
https://github.com/Aminou/SonataMediaBundle/blob/master/src/Model/MediaInterface.php
Github Open Source
Open Source
MIT
2,022
SonataMediaBundle
Aminou
PHP
Code
412
1,232
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Model; use Doctrine\Common\Collections\Collection; use Imagine\Image\Box; use Sonata\ClassificationBundle\Model\CategoryInterface; interface MediaInterface { public const STATUS_OK = 1; public const STATUS_SENDING = 2; public const STATUS_PENDING = 3; public const STATUS_ERROR = 4; public const STATUS_ENCODING = 5; public const MISSING_BINARY_REFERENCE = 'missing_binary_content'; public function __toString(): string; /** * @return int|string|null */ public function getId(); public function setName(?string $name): void; public function getName(): ?string; public function setDescription(?string $description): void; public function getDescription(): ?string; public function setEnabled(bool $enabled): void; public function getEnabled(): bool; public function setProviderName(?string $providerName): void; public function getProviderName(): ?string; public function setProviderStatus(?int $providerStatus): void; public function getProviderStatus(): ?int; public function setProviderReference(?string $providerReference): void; public function getProviderReference(): ?string; /** * @param array<string, mixed> $providerMetadata */ public function setProviderMetadata(array $providerMetadata = []): void; /** * @return array<string, mixed> */ public function getProviderMetadata(): array; public function setWidth(?int $width): void; public function getWidth(): ?int; public function setHeight(?int $height): void; public function getHeight(): ?int; public function setLength(?float $length): void; public function getLength(): ?float; public function setCopyright(?string $copyright): void; public function getCopyright(): ?string; public function setAuthorName(?string $authorName): void; public function getAuthorName(): ?string; public function setContext(?string $context): void; public function getContext(): ?string; public function setCdnStatus(?int $cdnStatus): void; public function getCdnStatus(): ?int; public function setCdnIsFlushable(bool $cdnIsFlushable): void; public function getCdnIsFlushable(): bool; public function setCdnFlushIdentifier(?string $cdnFlushIdentifier): void; public function getCdnFlushIdentifier(): ?string; public function setCdnFlushAt(?\DateTimeInterface $cdnFlushAt): void; public function getCdnFlushAt(): ?\DateTimeInterface; public function setUpdatedAt(?\DateTimeInterface $updatedAt): void; public function getUpdatedAt(): ?\DateTimeInterface; public function setCreatedAt(?\DateTimeInterface $createdAt): void; public function getCreatedAt(): ?\DateTimeInterface; public function setContentType(?string $contentType): void; public function getContentType(): ?string; public function setSize(?int $size): void; public function getSize(): ?int; /** * @return CategoryInterface|null */ public function getCategory(): ?object; /** * @param CategoryInterface|null $category */ public function setCategory(?object $category = null): void; /** * @param iterable<int, GalleryItemInterface> $galleryItems */ public function setGalleryItems(iterable $galleryItems): void; /** * @return Collection<int, GalleryItemInterface> */ public function getGalleryItems(): Collection; public function getBox(): Box; public function getExtension(): ?string; public function getPreviousProviderReference(): ?string; /** * @param mixed $binaryContent */ public function setBinaryContent($binaryContent): void; /** * @return mixed */ public function getBinaryContent(); public function resetBinaryContent(): void; /** * @param mixed $default * * @return mixed */ public function getMetadataValue(string $name, $default = null); /** * @param mixed $value */ public function setMetadataValue(string $name, $value): void; public function unsetMetadataValue(string $name): void; }
758
https://github.com/thierry-martinez/dune/blob/master/src/stdune/console.ml
Github Open Source
Open Source
MIT
2,020
dune
thierry-martinez
OCaml
Code
392
1,014
module Display = struct type t = | Progress | Short | Verbose | Quiet let all = [ ("progress", Progress) ; ("verbose", Verbose) ; ("short", Short) ; ("quiet", Quiet) ] end let reset_terminal () = print_string "\x1bc"; flush stdout module T = struct type t = { display : Display.t ; mutable status_line : Ansi_color.Style.t list Pp.t ; mutable status_line_len : int } let hide_status_line t = if t.status_line_len > 0 then Printf.eprintf "\r%*s\r" t.status_line_len "" let show_status_line t = if t.status_line_len > 0 then Ansi_color.prerr t.status_line let update_status_line t status_line = if t.display = Progress then ( let status_line = Pp.map_tags status_line ~f:User_message.Print_config.default in let status_line_len = String.length (Format.asprintf "%a" Pp.render_ignore_tags status_line) in hide_status_line t; t.status_line <- status_line; t.status_line_len <- status_line_len; show_status_line t; flush stderr ) let print t msg = hide_status_line t; prerr_string msg; show_status_line t; flush stderr let print_user_message t ?config msg = hide_status_line t; Option.iter msg.User_message.loc ~f:(Loc.print Format.err_formatter); User_message.prerr ?config { msg with loc = None }; show_status_line t; flush stderr let clear_status_line t = hide_status_line t; t.status_line <- Pp.nop; t.status_line_len <- 0; flush stderr end let t_var = ref None let init display = t_var := Some { T.display; status_line = Pp.nop; status_line_len = 0 } let t () = Option.value_exn !t_var let display () = (t ()).display module Status_line = struct type t = unit -> User_message.Style.t Pp.t option let status_line = ref (Fn.const None) let refresh () = match !status_line () with | None -> T.clear_status_line (t ()) | Some pp -> (* Always put the status line inside a horizontal to force the [Format] module to prefer a single line. In particular, it seems that [Format.pp_print_text] split sthe line before the last word, unless it is succeeded by a space. This seems like a bug in [Format] and putting the whole thing into a [hbox] works around this bug. See https://github.com/ocaml/dune/issues/2779 *) T.update_status_line (t ()) (Pp.hbox pp) let set x = status_line := x; refresh () let set_temporarily x f = let old = !status_line in set x; Exn.protect ~finally:(fun () -> set old) ~f end let print msg = match !t_var with | None -> Printf.eprintf "%s%!" msg | Some t -> T.print t msg let print_user_message ?config msg = match !t_var with | None -> User_message.prerr ?config msg | Some t -> T.print_user_message t ?config msg let () = User_warning.set_reporter print_user_message
33,400
https://github.com/Lexicality/Hanover_Flipdot/blob/master/hanover_flipdot/fonts.py
Github Open Source
Open Source
MIT
null
Hanover_Flipdot
Lexicality
Python
Code
10,200
50,178
unscii = [ [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x10, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x3C, 0x64, 0x3C, 0x00], [0x1F, 0x05, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x04, 0x1F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x10, 0x10, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x0F, 0x10, 0x0F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x34, 0x5C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x44, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x44, 0x7C, 0x44, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x48, 0x7C, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x74, 0x54, 0x5C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x44, 0x54, 0x7C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x1C, 0x10, 0x7C, 0x00], [0x1F, 0x01, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x1C, 0x70, 0x1C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x54, 0x28, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x04, 0x7C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x08, 0x7C, 0x00], [0x00, 0x06, 0x0F, 0x59, 0x51, 0x07, 0x06, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x44, 0x44, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x11, 0x1D, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x0D, 0x17, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x10, 0x1F, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x5F, 0x5F, 0x00, 0x00, 0x00], [0x00, 0x07, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00], [0x14, 0x7F, 0x7F, 0x14, 0x7F, 0x7F, 0x14, 0x00], [0x00, 0x24, 0x2E, 0x6B, 0x6B, 0x3A, 0x12, 0x00], [0x46, 0x66, 0x30, 0x18, 0x0C, 0x66, 0x62, 0x00], [0x30, 0x7A, 0x4F, 0x5D, 0x37, 0x7A, 0x48, 0x00], [0x00, 0x00, 0x04, 0x07, 0x03, 0x00, 0x00, 0x00], [0x00, 0x00, 0x1C, 0x3E, 0x63, 0x41, 0x00, 0x00], [0x00, 0x00, 0x41, 0x63, 0x3E, 0x1C, 0x00, 0x00], [0x08, 0x2A, 0x3E, 0x1C, 0x1C, 0x3E, 0x2A, 0x08], [0x00, 0x08, 0x08, 0x3E, 0x3E, 0x08, 0x08, 0x00], [0x00, 0x00, 0x80, 0xE0, 0x60, 0x00, 0x00, 0x00], [0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00], [0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00], [0x40, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01], [0x00, 0x3E, 0x7F, 0x49, 0x45, 0x7F, 0x3E, 0x00], [0x00, 0x40, 0x42, 0x7F, 0x7F, 0x40, 0x40, 0x00], [0x00, 0x62, 0x73, 0x59, 0x4D, 0x47, 0x42, 0x00], [0x00, 0x22, 0x63, 0x49, 0x49, 0x7F, 0x36, 0x00], [0x18, 0x1C, 0x16, 0x13, 0x7F, 0x7F, 0x10, 0x00], [0x00, 0x27, 0x67, 0x45, 0x45, 0x7D, 0x39, 0x00], [0x00, 0x3C, 0x7E, 0x4B, 0x49, 0x79, 0x30, 0x00], [0x00, 0x01, 0x01, 0x71, 0x79, 0x0F, 0x07, 0x00], [0x00, 0x36, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00], [0x00, 0x06, 0x4F, 0x49, 0x69, 0x3F, 0x1E, 0x00], [0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00], [0x00, 0x00, 0x80, 0xE6, 0x66, 0x00, 0x00, 0x00], [0x00, 0x08, 0x1C, 0x36, 0x63, 0x41, 0x00, 0x00], [0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00], [0x00, 0x41, 0x63, 0x36, 0x1C, 0x08, 0x00, 0x00], [0x00, 0x02, 0x03, 0x51, 0x59, 0x0F, 0x06, 0x00], [0x3E, 0x7F, 0x41, 0x5D, 0x5D, 0x5F, 0x1E, 0x00], [0x00, 0x7C, 0x7E, 0x13, 0x13, 0x7E, 0x7C, 0x00], [0x00, 0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00], [0x00, 0x3E, 0x7F, 0x41, 0x41, 0x63, 0x22, 0x00], [0x00, 0x7F, 0x7F, 0x41, 0x63, 0x3E, 0x1C, 0x00], [0x00, 0x7F, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00], [0x00, 0x7F, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00], [0x00, 0x3E, 0x7F, 0x41, 0x49, 0x7B, 0x7A, 0x00], [0x00, 0x7F, 0x7F, 0x08, 0x08, 0x7F, 0x7F, 0x00], [0x00, 0x41, 0x41, 0x7F, 0x7F, 0x41, 0x41, 0x00], [0x00, 0x20, 0x60, 0x40, 0x40, 0x7F, 0x3F, 0x00], [0x7F, 0x7F, 0x08, 0x1C, 0x36, 0x63, 0x41, 0x00], [0x00, 0x7F, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00], [0x7F, 0x7F, 0x06, 0x0C, 0x06, 0x7F, 0x7F, 0x00], [0x7F, 0x7F, 0x06, 0x0C, 0x18, 0x7F, 0x7F, 0x00], [0x00, 0x3E, 0x7F, 0x41, 0x41, 0x7F, 0x3E, 0x00], [0x00, 0x7F, 0x7F, 0x09, 0x09, 0x0F, 0x06, 0x00], [0x00, 0x3E, 0x7F, 0x41, 0x21, 0x7F, 0x5E, 0x00], [0x00, 0x7F, 0x7F, 0x09, 0x19, 0x7F, 0x66, 0x00], [0x00, 0x26, 0x6F, 0x49, 0x49, 0x7B, 0x32, 0x00], [0x00, 0x01, 0x01, 0x7F, 0x7F, 0x01, 0x01, 0x00], [0x00, 0x3F, 0x7F, 0x40, 0x40, 0x7F, 0x3F, 0x00], [0x00, 0x1F, 0x3F, 0x60, 0x60, 0x3F, 0x1F, 0x00], [0x7F, 0x7F, 0x30, 0x18, 0x30, 0x7F, 0x7F, 0x00], [0x41, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x41], [0x01, 0x03, 0x06, 0x7C, 0x7C, 0x06, 0x03, 0x01], [0x00, 0x61, 0x71, 0x59, 0x4D, 0x47, 0x43, 0x00], [0x00, 0x00, 0x7F, 0x7F, 0x41, 0x41, 0x00, 0x00], [0x01, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40], [0x00, 0x00, 0x41, 0x41, 0x7F, 0x7F, 0x00, 0x00], [0x08, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x08, 0x00], [0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80], [0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04, 0x00], [0x00, 0x20, 0x74, 0x54, 0x54, 0x7C, 0x78, 0x00], [0x00, 0x7F, 0x7F, 0x44, 0x44, 0x7C, 0x38, 0x00], [0x00, 0x38, 0x7C, 0x44, 0x44, 0x44, 0x00, 0x00], [0x00, 0x38, 0x7C, 0x44, 0x44, 0x7F, 0x7F, 0x00], [0x00, 0x38, 0x7C, 0x54, 0x54, 0x5C, 0x18, 0x00], [0x00, 0x04, 0x7E, 0x7F, 0x05, 0x05, 0x00, 0x00], [0x00, 0x98, 0xBC, 0xA4, 0xA4, 0xFC, 0x7C, 0x00], [0x00, 0x7F, 0x7F, 0x04, 0x04, 0x7C, 0x78, 0x00], [0x00, 0x00, 0x04, 0x7D, 0x7D, 0x40, 0x40, 0x00], [0x00, 0x80, 0x80, 0x80, 0xFD, 0x7D, 0x00, 0x00], [0x00, 0x7F, 0x7F, 0x10, 0x38, 0x6C, 0x44, 0x00], [0x00, 0x00, 0x01, 0x7F, 0x7F, 0x40, 0x40, 0x00], [0x7C, 0x7C, 0x08, 0x38, 0x0C, 0x7C, 0x78, 0x00], [0x00, 0x7C, 0x7C, 0x04, 0x04, 0x7C, 0x78, 0x00], [0x00, 0x38, 0x7C, 0x44, 0x44, 0x7C, 0x38, 0x00], [0x00, 0xFC, 0xFC, 0x24, 0x24, 0x3C, 0x18, 0x00], [0x00, 0x18, 0x3C, 0x24, 0x24, 0xFC, 0xFC, 0x00], [0x00, 0x7C, 0x7C, 0x04, 0x04, 0x0C, 0x08, 0x00], [0x00, 0x48, 0x5C, 0x54, 0x54, 0x74, 0x24, 0x00], [0x00, 0x04, 0x3F, 0x7F, 0x44, 0x44, 0x44, 0x00], [0x00, 0x3C, 0x7C, 0x40, 0x40, 0x7C, 0x7C, 0x00], [0x00, 0x1C, 0x3C, 0x60, 0x60, 0x3C, 0x1C, 0x00], [0x1C, 0x7C, 0x60, 0x30, 0x60, 0x7C, 0x1C, 0x00], [0x44, 0x6C, 0x38, 0x10, 0x38, 0x6C, 0x44, 0x00], [0x00, 0x1C, 0xBC, 0xA0, 0xA0, 0xFC, 0x7C, 0x00], [0x00, 0x44, 0x64, 0x74, 0x5C, 0x4C, 0x44, 0x00], [0x00, 0x08, 0x08, 0x3E, 0x77, 0x41, 0x41, 0x00], [0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00], [0x00, 0x41, 0x41, 0x77, 0x3E, 0x08, 0x08, 0x00], [0x02, 0x03, 0x01, 0x03, 0x02, 0x03, 0x01, 0x00], ] unscii_tall = [ [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x03, 0x3F, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3C, 0x03, 0x3C, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3C, 0x03, 0x3C, 0x00], [0x03, 0x03, 0x03, 0x00, 0x00, 0x3F, 0x00, 0x00], [0x03, 0x03, 0x03, 0x00, 0x0F, 0x3C, 0x0F, 0x00], [0x03, 0x00, 0x03, 0x00, 0x3F, 0x03, 0x3C, 0x00], [0x03, 0x03, 0x00, 0x00, 0x3F, 0x30, 0x30, 0x00], [0x03, 0x03, 0x00, 0x00, 0x33, 0x33, 0x3F, 0x00], [0x03, 0x00, 0x03, 0x00, 0x00, 0x3F, 0x00, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x03, 0x00, 0x00], [0x00, 0x03, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00], [0x03, 0x00, 0x00, 0x00, 0x3F, 0x03, 0x00, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x0F, 0x33, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x30, 0x3F, 0x00], [0x03, 0x03, 0x03, 0x00, 0x30, 0x3F, 0x30, 0x00], [0x03, 0x03, 0x00, 0x00, 0x3F, 0x30, 0x30, 0x00], [0x03, 0x03, 0x00, 0x00, 0x30, 0x3F, 0x30, 0x00], [0x03, 0x03, 0x00, 0x00, 0x3F, 0x33, 0x33, 0x00], [0x03, 0x03, 0x00, 0x00, 0x30, 0x33, 0x3F, 0x00], [0x03, 0x03, 0x00, 0x00, 0x03, 0x03, 0x3F, 0x00], [0x03, 0x00, 0x03, 0x00, 0x3F, 0x03, 0x3C, 0x00], [0x03, 0x03, 0x03, 0x00, 0x03, 0x3F, 0x03, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x33, 0x0C, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x00, 0x3F, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x00, 0x3F, 0x00], [0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00], [0x03, 0x03, 0x03, 0x00, 0x3F, 0x30, 0x30, 0x00], [0x03, 0x00, 0x00, 0x00, 0x33, 0x33, 0x3F, 0x00], [0x03, 0x03, 0x03, 0x00, 0x33, 0x33, 0x3F, 0x00], [0x03, 0x00, 0x03, 0x00, 0x33, 0x33, 0x3F, 0x00], [0x03, 0x03, 0x03, 0x00, 0x33, 0x33, 0x3F, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x03, 0x3F, 0x3F, 0x03, 0x3F, 0x3F, 0x03, 0x00], [0x00, 0x0C, 0x0C, 0x3C, 0x3C, 0x0F, 0x03, 0x00], [0x30, 0x3C, 0x0F, 0x03, 0x00, 0x3C, 0x3C, 0x00], [0x0F, 0x3F, 0x30, 0x33, 0x0F, 0x3F, 0x30, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x03, 0x0F, 0x3C, 0x30, 0x00, 0x00], [0x00, 0x00, 0x30, 0x3C, 0x0F, 0x03, 0x00, 0x00], [0x00, 0x0C, 0x0F, 0x03, 0x03, 0x0F, 0x0C, 0x00], [0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00], [0x00, 0x00, 0xC0, 0xFC, 0x3C, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x3C, 0x3C, 0x00, 0x00, 0x00], [0x30, 0x3C, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x30, 0x30, 0x3F, 0x3F, 0x30, 0x30, 0x00], [0x00, 0x3C, 0x3F, 0x33, 0x30, 0x30, 0x30, 0x00], [0x00, 0x0C, 0x3C, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x03, 0x03, 0x03, 0x03, 0x3F, 0x3F, 0x03, 0x00], [0x00, 0x0C, 0x3C, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x00, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x00, 0x30, 0x30, 0x3C, 0x0F, 0x03, 0x00], [0x00, 0x00, 0x00, 0x3C, 0x3C, 0x00, 0x00, 0x00], [0x00, 0x00, 0xC0, 0xFC, 0x3C, 0x00, 0x00, 0x00], [0x00, 0x00, 0x03, 0x0F, 0x3C, 0x30, 0x00, 0x00], [0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00], [0x00, 0x30, 0x3C, 0x0F, 0x03, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00], [0x0F, 0x3F, 0x30, 0x33, 0x33, 0x33, 0x03, 0x00], [0x00, 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F, 0x00], [0x00, 0x3F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3C, 0x0C, 0x00], [0x00, 0x3F, 0x3F, 0x30, 0x3C, 0x0F, 0x03, 0x00], [0x00, 0x3F, 0x3F, 0x30, 0x30, 0x30, 0x30, 0x00], [0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x3F, 0x00], [0x00, 0x3F, 0x3F, 0x00, 0x00, 0x3F, 0x3F, 0x00], [0x00, 0x30, 0x30, 0x3F, 0x3F, 0x30, 0x30, 0x00], [0x00, 0x0C, 0x3C, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x3F, 0x3F, 0x00, 0x03, 0x0F, 0x3C, 0x30, 0x00], [0x00, 0x3F, 0x3F, 0x30, 0x30, 0x30, 0x30, 0x00], [0x3F, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x00], [0x3F, 0x3F, 0x00, 0x00, 0x03, 0x3F, 0x3F, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x0C, 0x3F, 0x33, 0x00], [0x00, 0x3F, 0x3F, 0x00, 0x03, 0x3F, 0x3C, 0x00], [0x00, 0x0C, 0x3C, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x00, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x03, 0x0F, 0x3C, 0x3C, 0x0F, 0x03, 0x00], [0x3F, 0x3F, 0x0F, 0x03, 0x0F, 0x3F, 0x3F, 0x00], [0x30, 0x3C, 0x0F, 0x03, 0x03, 0x0F, 0x3C, 0x30], [0x00, 0x00, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00], [0x00, 0x3C, 0x3F, 0x33, 0x30, 0x30, 0x30, 0x00], [0x00, 0x00, 0x3F, 0x3F, 0x30, 0x30, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x3C, 0x30], [0x00, 0x00, 0x30, 0x30, 0x3F, 0x3F, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x0C, 0x3F, 0x33, 0x33, 0x3F, 0x3F, 0x00], [0x00, 0x3F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x30, 0x00, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x3F, 0x00], [0x00, 0x0F, 0x3F, 0x33, 0x33, 0x33, 0x03, 0x00], [0x00, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00], [0x00, 0xC3, 0xCF, 0xCC, 0xCC, 0xFF, 0x3F, 0x00], [0x00, 0x3F, 0x3F, 0x00, 0x00, 0x3F, 0x3F, 0x00], [0x00, 0x00, 0x00, 0x3F, 0x3F, 0x30, 0x30, 0x00], [0x00, 0xC0, 0xC0, 0xC0, 0xFF, 0x3F, 0x00, 0x00], [0x00, 0x3F, 0x3F, 0x03, 0x0F, 0x3C, 0x30, 0x00], [0x00, 0x00, 0x00, 0x3F, 0x3F, 0x30, 0x30, 0x00], [0x3F, 0x3F, 0x00, 0x0F, 0x00, 0x3F, 0x3F, 0x00], [0x00, 0x3F, 0x3F, 0x00, 0x00, 0x3F, 0x3F, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x0F, 0x00], [0x00, 0xFF, 0xFF, 0x0C, 0x0C, 0x0F, 0x03, 0x00], [0x00, 0x03, 0x0F, 0x0C, 0x0C, 0xFF, 0xFF, 0x00], [0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x30, 0x33, 0x33, 0x33, 0x3F, 0x0C, 0x00], [0x00, 0x00, 0x0F, 0x3F, 0x30, 0x30, 0x30, 0x00], [0x00, 0x0F, 0x3F, 0x30, 0x30, 0x3F, 0x3F, 0x00], [0x00, 0x03, 0x0F, 0x3C, 0x3C, 0x0F, 0x03, 0x00], [0x03, 0x3F, 0x3C, 0x0F, 0x3C, 0x3F, 0x03, 0x00], [0x30, 0x3C, 0x0F, 0x03, 0x0F, 0x3C, 0x30, 0x00], [0x00, 0x03, 0xCF, 0xCC, 0xCC, 0xFF, 0x3F, 0x00], [0x00, 0x30, 0x3C, 0x3F, 0x33, 0x30, 0x30, 0x00], [0x00, 0x00, 0x00, 0x0F, 0x3F, 0x30, 0x30, 0x00], [0x00, 0x00, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00], [0x00, 0x30, 0x30, 0x3F, 0x0F, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], ] unscii_thin = [ [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x10, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x3C, 0x64, 0x3C, 0x00], [0x1F, 0x05, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x04, 0x1F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x10, 0x10, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x0F, 0x10, 0x0F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x34, 0x5C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x44, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x44, 0x7C, 0x44, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x48, 0x7C, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x74, 0x54, 0x5C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x44, 0x54, 0x7C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x1C, 0x10, 0x7C, 0x00], [0x1F, 0x01, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x1C, 0x70, 0x1C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x54, 0x28, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x04, 0x7C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x08, 0x7C, 0x00], [0x00, 0x06, 0x0F, 0x59, 0x51, 0x07, 0x06, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x44, 0x44, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x11, 0x1D, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x0D, 0x17, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x10, 0x1F, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00], [0x00, 0x14, 0x7F, 0x14, 0x14, 0x7F, 0x14, 0x00], [0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, 0x00], [0x00, 0x46, 0x26, 0x10, 0x08, 0x64, 0x62, 0x00], [0x00, 0x36, 0x49, 0x49, 0x56, 0x20, 0x50, 0x00], [0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00], [0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x00], [0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x00], [0x00, 0x22, 0x14, 0x7F, 0x14, 0x22, 0x00, 0x00], [0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x00], [0x00, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x00], [0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00], [0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00], [0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00], [0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x00], [0x00, 0x44, 0x42, 0x7F, 0x40, 0x40, 0x00, 0x00], [0x00, 0x62, 0x51, 0x51, 0x49, 0x46, 0x00, 0x00], [0x00, 0x22, 0x41, 0x49, 0x49, 0x36, 0x00, 0x00], [0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, 0x00], [0x00, 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, 0x00], [0x00, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, 0x00], [0x00, 0x01, 0x71, 0x09, 0x05, 0x03, 0x00, 0x00], [0x00, 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x00], [0x00, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00], [0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x80, 0x64, 0x00, 0x00, 0x00, 0x00], [0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00, 0x00], [0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00], [0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x00], [0x00, 0x02, 0x01, 0x01, 0x59, 0x05, 0x02, 0x00], [0x00, 0x3E, 0x41, 0x49, 0x55, 0x59, 0x0E, 0x00], [0x00, 0x7C, 0x0A, 0x09, 0x09, 0x0A, 0x7C, 0x00], [0x00, 0x7F, 0x49, 0x49, 0x49, 0x49, 0x36, 0x00], [0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x22, 0x00], [0x00, 0x7F, 0x41, 0x41, 0x41, 0x22, 0x1C, 0x00], [0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x41, 0x00], [0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x01, 0x00], [0x00, 0x3E, 0x41, 0x41, 0x49, 0x49, 0x3A, 0x00], [0x00, 0x7F, 0x08, 0x08, 0x08, 0x08, 0x7F, 0x00], [0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, 0x00], [0x00, 0x20, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x00], [0x00, 0x7F, 0x08, 0x08, 0x14, 0x22, 0x41, 0x00], [0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00], [0x00, 0x7F, 0x02, 0x04, 0x04, 0x02, 0x7F, 0x00], [0x00, 0x7F, 0x02, 0x04, 0x08, 0x10, 0x7F, 0x00], [0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x3E, 0x00], [0x00, 0x7F, 0x09, 0x09, 0x09, 0x09, 0x06, 0x00], [0x00, 0x3E, 0x41, 0x41, 0x51, 0x21, 0x5E, 0x00], [0x00, 0x7F, 0x09, 0x09, 0x19, 0x29, 0x46, 0x00], [0x00, 0x26, 0x49, 0x49, 0x49, 0x49, 0x32, 0x00], [0x00, 0x01, 0x01, 0x7F, 0x01, 0x01, 0x00, 0x00], [0x00, 0x3F, 0x40, 0x40, 0x40, 0x40, 0x3F, 0x00], [0x00, 0x1F, 0x20, 0x40, 0x40, 0x20, 0x1F, 0x00], [0x00, 0x7F, 0x20, 0x10, 0x10, 0x20, 0x7F, 0x00], [0x00, 0x63, 0x14, 0x08, 0x08, 0x14, 0x63, 0x00], [0x00, 0x07, 0x08, 0x78, 0x08, 0x07, 0x00, 0x00], [0x00, 0x61, 0x51, 0x49, 0x45, 0x43, 0x00, 0x00], [0x00, 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00, 0x00], [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x00], [0x00, 0x00, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x00], [0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x00], [0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00], [0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00], [0x00, 0x20, 0x54, 0x54, 0x54, 0x78, 0x00, 0x00], [0x00, 0x7F, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00], [0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, 0x00], [0x00, 0x38, 0x44, 0x44, 0x44, 0x7F, 0x00, 0x00], [0x00, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x00], [0x00, 0x08, 0x08, 0x7E, 0x09, 0x09, 0x02, 0x00], [0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C, 0x00, 0x00], [0x00, 0x7F, 0x04, 0x04, 0x04, 0x78, 0x00, 0x00], [0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, 0x00], [0x00, 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00, 0x00], [0x00, 0x7F, 0x10, 0x10, 0x28, 0x44, 0x00, 0x00], [0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, 0x00], [0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, 0x00], [0x00, 0x7C, 0x04, 0x04, 0x04, 0x78, 0x00, 0x00], [0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00], [0x00, 0xFC, 0x24, 0x24, 0x24, 0x18, 0x00, 0x00], [0x00, 0x18, 0x24, 0x24, 0x24, 0xFC, 0x00, 0x00], [0x00, 0x7C, 0x08, 0x04, 0x04, 0x04, 0x00, 0x00], [0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x00], [0x00, 0x04, 0x3F, 0x44, 0x44, 0x20, 0x00, 0x00], [0x00, 0x3C, 0x40, 0x40, 0x40, 0x3C, 0x00, 0x00], [0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, 0x00], [0x00, 0x3C, 0x40, 0x38, 0x40, 0x3C, 0x00, 0x00], [0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x00], [0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C, 0x00, 0x00], [0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x00], [0x00, 0x08, 0x36, 0x41, 0x41, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x41, 0x41, 0x36, 0x08, 0x00, 0x00], [0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x00], ] unscii_alt = [ [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x10, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x3C, 0x64, 0x3C, 0x00], [0x1F, 0x05, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x04, 0x1F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x10, 0x10, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x0F, 0x10, 0x0F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x34, 0x5C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x44, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x44, 0x7C, 0x44, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x48, 0x7C, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x74, 0x54, 0x5C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x44, 0x54, 0x7C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x1C, 0x10, 0x7C, 0x00], [0x1F, 0x01, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x1C, 0x70, 0x1C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x54, 0x28, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x04, 0x7C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x08, 0x7C, 0x00], [0x00, 0x06, 0x0F, 0x59, 0x51, 0x07, 0x06, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x44, 0x44, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x11, 0x1D, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x0D, 0x17, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x10, 0x1F, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x06, 0x5F, 0x5F, 0x06, 0x00, 0x00, 0x00], [0x00, 0x03, 0x03, 0x00, 0x03, 0x03, 0x00, 0x00], [0x24, 0x7E, 0x7E, 0x24, 0x24, 0x7E, 0x7E, 0x24], [0x24, 0x2E, 0x6A, 0x7F, 0x2B, 0x3A, 0x12, 0x00], [0x00, 0x23, 0x33, 0x18, 0x0C, 0x66, 0x62, 0x00], [0x32, 0x7F, 0x4D, 0x4D, 0x77, 0x72, 0x50, 0x00], [0x00, 0x00, 0x04, 0x06, 0x03, 0x01, 0x00, 0x00], [0x00, 0x00, 0x00, 0x3C, 0x7E, 0x66, 0x42, 0x00], [0x00, 0x42, 0x66, 0x7E, 0x3C, 0x00, 0x00, 0x00], [0x00, 0x14, 0x1C, 0x3E, 0x3E, 0x1C, 0x14, 0x00], [0x00, 0x08, 0x08, 0x3E, 0x3E, 0x08, 0x08, 0x00], [0x00, 0x00, 0x80, 0xE0, 0x60, 0x00, 0x00, 0x00], [0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00], [0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00], [0x40, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01], [0x1C, 0x3E, 0x71, 0x49, 0x47, 0x3E, 0x1C, 0x00], [0x00, 0x04, 0x06, 0x7F, 0x7F, 0x00, 0x00, 0x00], [0x62, 0x73, 0x79, 0x59, 0x5D, 0x4F, 0x66, 0x00], [0x20, 0x61, 0x49, 0x4D, 0x4F, 0x7B, 0x31, 0x00], [0x18, 0x1C, 0x16, 0x53, 0x7F, 0x7F, 0x50, 0x00], [0x00, 0x2F, 0x6F, 0x49, 0x49, 0x79, 0x33, 0x00], [0x3E, 0x7F, 0x49, 0x49, 0x4B, 0x7A, 0x30, 0x00], [0x00, 0x03, 0x03, 0x79, 0x7D, 0x07, 0x03, 0x00], [0x36, 0x4D, 0x49, 0x59, 0x59, 0x76, 0x30, 0x00], [0x06, 0x2F, 0x69, 0x49, 0x49, 0x7F, 0x3E, 0x00], [0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x00], [0x00, 0x00, 0x80, 0xE4, 0x64, 0x00, 0x00, 0x00], [0x00, 0x08, 0x08, 0x14, 0x14, 0x22, 0x22, 0x00], [0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00], [0x00, 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, 0x00], [0x00, 0x02, 0x03, 0x51, 0x59, 0x0F, 0x06, 0x00], [0x00, 0x3E, 0x7F, 0x41, 0x4D, 0x4F, 0x2E, 0x00], [0x00, 0x7E, 0x7F, 0x05, 0x05, 0x7F, 0x7E, 0x00], [0x41, 0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00], [0x1C, 0x3E, 0x63, 0x41, 0x41, 0x63, 0x22, 0x00], [0x41, 0x7F, 0x7F, 0x41, 0x63, 0x3E, 0x1C, 0x00], [0x41, 0x7F, 0x7F, 0x49, 0x5D, 0x41, 0x63, 0x00], [0x41, 0x7F, 0x7F, 0x49, 0x1D, 0x01, 0x03, 0x00], [0x1C, 0x3E, 0x63, 0x41, 0x51, 0x73, 0x72, 0x00], [0x00, 0x7F, 0x7F, 0x08, 0x08, 0x7F, 0x7F, 0x00], [0x00, 0x41, 0x41, 0x7F, 0x7F, 0x41, 0x41, 0x00], [0x30, 0x70, 0x41, 0x41, 0x7F, 0x3F, 0x01, 0x00], [0x41, 0x7F, 0x7F, 0x18, 0x7C, 0x77, 0x63, 0x00], [0x41, 0x7F, 0x7F, 0x41, 0x40, 0x60, 0x70, 0x00], [0x7F, 0x7F, 0x06, 0x1C, 0x06, 0x7F, 0x7F, 0x00], [0x7F, 0x7F, 0x06, 0x0C, 0x18, 0x7F, 0x7F, 0x00], [0x1C, 0x3E, 0x63, 0x41, 0x63, 0x3E, 0x1C, 0x00], [0x41, 0x7F, 0x7F, 0x49, 0x09, 0x0F, 0x06, 0x00], [0x3C, 0x7E, 0x43, 0x51, 0x33, 0x6E, 0x5C, 0x00], [0x41, 0x7F, 0x7F, 0x11, 0x39, 0x7F, 0x4E, 0x00], [0x26, 0x6F, 0x49, 0x49, 0x4B, 0x7A, 0x30, 0x00], [0x00, 0x03, 0x41, 0x7F, 0x7F, 0x41, 0x03, 0x00], [0x00, 0x3F, 0x7F, 0x40, 0x40, 0x7F, 0x7F, 0x00], [0x0F, 0x1F, 0x30, 0x60, 0x30, 0x1F, 0x0F, 0x00], [0x7F, 0x7F, 0x30, 0x1C, 0x30, 0x7F, 0x7F, 0x00], [0x63, 0x77, 0x3E, 0x1C, 0x3E, 0x77, 0x63, 0x00], [0x00, 0x07, 0x4F, 0x78, 0x78, 0x4F, 0x07, 0x00], [0x47, 0x63, 0x71, 0x59, 0x4D, 0x67, 0x73, 0x00], [0x00, 0x00, 0x7F, 0x7F, 0x41, 0x41, 0x00, 0x00], [0x01, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40], [0x00, 0x00, 0x41, 0x41, 0x7F, 0x7F, 0x00, 0x00], [0x00, 0x0C, 0x06, 0x03, 0x03, 0x06, 0x0C, 0x00], [0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80], [0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04, 0x00], [0x20, 0x74, 0x54, 0x54, 0x3C, 0x78, 0x40, 0x00], [0x41, 0x7F, 0x3F, 0x48, 0x48, 0x78, 0x30, 0x00], [0x38, 0x7C, 0x44, 0x44, 0x6C, 0x28, 0x00, 0x00], [0x30, 0x78, 0x48, 0x49, 0x3F, 0x7F, 0x40, 0x00], [0x00, 0x38, 0x7C, 0x54, 0x54, 0x5C, 0x18, 0x00], [0x00, 0x48, 0x7E, 0x7F, 0x49, 0x03, 0x02, 0x00], [0x18, 0xBC, 0xA4, 0xA4, 0xF8, 0x7C, 0x04, 0x00], [0x41, 0x7F, 0x7F, 0x08, 0x04, 0x7C, 0x78, 0x00], [0x00, 0x00, 0x00, 0x3D, 0x7D, 0x40, 0x00, 0x00], [0x00, 0x60, 0xE0, 0x80, 0x84, 0xFD, 0x7D, 0x00], [0x41, 0x7F, 0x7F, 0x10, 0x38, 0x68, 0x40, 0x00], [0x00, 0x00, 0x00, 0x3F, 0x7F, 0x40, 0x00, 0x00], [0x78, 0x7C, 0x0C, 0x38, 0x0C, 0x7C, 0x78, 0x00], [0x04, 0x7C, 0x78, 0x04, 0x04, 0x7C, 0x78, 0x00], [0x00, 0x38, 0x7C, 0x44, 0x44, 0x7C, 0x38, 0x00], [0x04, 0xFC, 0xF8, 0x44, 0x44, 0x7C, 0x38, 0x00], [0x38, 0x7C, 0x44, 0x44, 0xF8, 0xFC, 0x04, 0x00], [0x44, 0x7C, 0x78, 0x4C, 0x04, 0x1C, 0x18, 0x00], [0x00, 0x48, 0x5C, 0x54, 0x54, 0x74, 0x20, 0x00], [0x00, 0x04, 0x3E, 0x7F, 0x44, 0x64, 0x20, 0x00], [0x3C, 0x7C, 0x40, 0x40, 0x3C, 0x7C, 0x40, 0x00], [0x00, 0x1C, 0x3C, 0x60, 0x60, 0x3C, 0x1C, 0x00], [0x3C, 0x7C, 0x60, 0x38, 0x60, 0x7C, 0x3C, 0x00], [0x00, 0x44, 0x6C, 0x38, 0x38, 0x6C, 0x44, 0x00], [0x00, 0x1C, 0xBC, 0xE0, 0x60, 0x3C, 0x1C, 0x00], [0x4C, 0x64, 0x74, 0x5C, 0x4C, 0x64, 0x00, 0x00], [0x00, 0x08, 0x08, 0x3E, 0x77, 0x41, 0x00, 0x00], [0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00], [0x00, 0x00, 0x41, 0x77, 0x3E, 0x08, 0x08, 0x00], [0x02, 0x03, 0x01, 0x03, 0x02, 0x03, 0x01, 0x00], ] unscii_mcr = [ [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x10, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x3C, 0x64, 0x3C, 0x00], [0x1F, 0x05, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x04, 0x1F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x10, 0x10, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x0F, 0x10, 0x0F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x34, 0x5C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x44, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x44, 0x7C, 0x44, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x48, 0x7C, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x74, 0x54, 0x5C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x44, 0x54, 0x7C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x1C, 0x10, 0x7C, 0x00], [0x1F, 0x01, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x1C, 0x70, 0x1C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x54, 0x28, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x04, 0x7C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x08, 0x7C, 0x00], [0x00, 0x06, 0x0F, 0x59, 0x51, 0x07, 0x06, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x44, 0x44, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x11, 0x1D, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x0D, 0x17, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x10, 0x1F, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x6F, 0x6F, 0x07, 0x00, 0x00], [0x07, 0x07, 0x03, 0x00, 0x07, 0x07, 0x03, 0x00], [0x14, 0x7F, 0x7F, 0x14, 0x7F, 0x7F, 0x14, 0x00], [0x2E, 0x2E, 0x6A, 0x6B, 0x7B, 0x3A, 0x3A, 0x00], [0x67, 0x77, 0x3B, 0x1C, 0x6E, 0x77, 0x73, 0x00], [0x78, 0x7F, 0x4F, 0x49, 0x7D, 0x7D, 0x08, 0x00], [0x00, 0x00, 0x04, 0x07, 0x07, 0x03, 0x00, 0x00], [0x00, 0x00, 0x1C, 0x3E, 0x73, 0x61, 0x40, 0x00], [0x00, 0x40, 0x61, 0x73, 0x3E, 0x1C, 0x00, 0x00], [0x08, 0x2A, 0x3E, 0x1C, 0x1C, 0x3E, 0x2A, 0x08], [0x00, 0x08, 0x08, 0x3E, 0x3E, 0x08, 0x08, 0x00], [0x00, 0x80, 0xE0, 0xE0, 0x60, 0x00, 0x00, 0x00], [0x18, 0x18, 0x18, 0x18, 0x08, 0x08, 0x08, 0x00], [0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00], [0x40, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01], [0x78, 0x7F, 0x7F, 0x41, 0x41, 0x7F, 0x7F, 0x00], [0x00, 0x00, 0x71, 0x7F, 0x7F, 0x70, 0x70, 0x00], [0x7B, 0x7B, 0x79, 0x49, 0x49, 0x4F, 0x4F, 0x00], [0x49, 0x49, 0x49, 0x49, 0x7F, 0x7F, 0x78, 0x00], [0x1F, 0x1F, 0x10, 0x70, 0x7C, 0x7C, 0x10, 0x00], [0x6F, 0x6F, 0x49, 0x49, 0x79, 0x79, 0x79, 0x00], [0x7F, 0x7F, 0x79, 0x49, 0x49, 0x7B, 0x7B, 0x00], [0x01, 0x01, 0x01, 0x01, 0x79, 0x7F, 0x7F, 0x00], [0x78, 0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x7F, 0x00], [0x0F, 0x0F, 0x09, 0x09, 0x79, 0x7F, 0x7F, 0x00], [0x00, 0x00, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00], [0x00, 0x80, 0xE6, 0xE6, 0x66, 0x00, 0x00, 0x00], [0x00, 0x08, 0x1C, 0x36, 0x63, 0x41, 0x00, 0x00], [0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00], [0x00, 0x41, 0x63, 0x36, 0x1C, 0x08, 0x00, 0x00], [0x03, 0x03, 0x59, 0x59, 0x59, 0x0F, 0x0F, 0x00], [0x7F, 0x7F, 0x41, 0x5D, 0x5D, 0x5F, 0x5F, 0x00], [0x78, 0x7F, 0x7F, 0x09, 0x09, 0x7F, 0x7F, 0x00], [0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x7F, 0x78, 0x00], [0x70, 0x7F, 0x7F, 0x41, 0x41, 0x63, 0x63, 0x00], [0x7F, 0x7F, 0x79, 0x41, 0x7F, 0x7F, 0x78, 0x00], [0x70, 0x7F, 0x7F, 0x49, 0x49, 0x41, 0x41, 0x00], [0x78, 0x7F, 0x7F, 0x09, 0x09, 0x01, 0x01, 0x00], [0x78, 0x7F, 0x7F, 0x41, 0x49, 0x7B, 0x7B, 0x00], [0x78, 0x7F, 0x7F, 0x08, 0x08, 0x7F, 0x7F, 0x00], [0x00, 0x00, 0x00, 0x7F, 0x7F, 0x78, 0x00, 0x00], [0x70, 0x70, 0x40, 0x40, 0x7F, 0x7F, 0x78, 0x00], [0x7F, 0x7F, 0x08, 0x0C, 0x7F, 0x7B, 0x78, 0x00], [0x00, 0x78, 0x7F, 0x7F, 0x40, 0x40, 0x40, 0x00], [0x7F, 0x7F, 0x73, 0x06, 0x03, 0x7F, 0x7F, 0x00], [0x78, 0x7F, 0x7F, 0x01, 0x01, 0x7F, 0x7F, 0x00], [0x78, 0x7F, 0x7F, 0x41, 0x41, 0x7F, 0x7F, 0x00], [0x70, 0x7F, 0x7F, 0x09, 0x09, 0x0F, 0x0F, 0x00], [0x3F, 0x3F, 0x21, 0x21, 0x79, 0x7F, 0x7F, 0x00], [0x7F, 0x7F, 0x79, 0x09, 0x0F, 0x7F, 0x78, 0x00], [0x77, 0x77, 0x75, 0x45, 0x45, 0x7D, 0x7D, 0x00], [0x01, 0x01, 0x7F, 0x7F, 0x79, 0x01, 0x01, 0x00], [0x70, 0x7F, 0x7F, 0x40, 0x40, 0x7F, 0x7F, 0x00], [0x7F, 0x7F, 0x78, 0x60, 0x30, 0x1F, 0x0F, 0x00], [0x7F, 0x7F, 0x33, 0x38, 0x30, 0x7F, 0x7F, 0x00], [0x77, 0x7F, 0x0F, 0x08, 0x78, 0x7F, 0x77, 0x00], [0x0F, 0x0F, 0x78, 0x78, 0x7F, 0x0F, 0x0F, 0x00], [0x00, 0x61, 0x71, 0x79, 0x6D, 0x67, 0x63, 0x00], [0x00, 0x00, 0x7F, 0x7F, 0x41, 0x41, 0x00, 0x00], [0x01, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40], [0x00, 0x00, 0x41, 0x41, 0x7F, 0x7F, 0x00, 0x00], [0x08, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x08, 0x00], [0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80], [0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04, 0x00], [0x74, 0x74, 0x74, 0x54, 0x54, 0x7C, 0x7C, 0x00], [0x7F, 0x7F, 0x74, 0x44, 0x44, 0x7C, 0x7C, 0x00], [0x7C, 0x7C, 0x74, 0x44, 0x44, 0x44, 0x44, 0x00], [0x7C, 0x7C, 0x74, 0x44, 0x44, 0x7F, 0x7F, 0x00], [0x7C, 0x7C, 0x74, 0x54, 0x54, 0x5C, 0x5C, 0x00], [0x08, 0x08, 0x7F, 0x7F, 0x79, 0x09, 0x01, 0x00], [0xBC, 0xBC, 0xA4, 0xA4, 0xF4, 0xFC, 0xFC, 0x00], [0x7F, 0x7F, 0x74, 0x04, 0x04, 0x7C, 0x7C, 0x00], [0x00, 0x00, 0x7A, 0x7A, 0x72, 0x00, 0x00, 0x00], [0xC0, 0xC0, 0x80, 0x80, 0xFA, 0xFA, 0xE0, 0x00], [0x7E, 0x7E, 0x70, 0x18, 0x1C, 0x74, 0x70, 0x00], [0x00, 0x00, 0x7F, 0x7F, 0x70, 0x00, 0x00, 0x00], [0x7C, 0x7C, 0x64, 0x1C, 0x04, 0x7C, 0x7C, 0x00], [0x7C, 0x7C, 0x74, 0x04, 0x04, 0x7C, 0x7C, 0x00], [0x7C, 0x7C, 0x74, 0x44, 0x44, 0x7C, 0x7C, 0x00], [0xFC, 0xFC, 0xE4, 0x24, 0x24, 0x3C, 0x3C, 0x00], [0x3C, 0x3C, 0x24, 0x24, 0xE4, 0xFC, 0xFC, 0x00], [0x7C, 0x7C, 0x74, 0x04, 0x04, 0x0C, 0x0C, 0x00], [0x5C, 0x5C, 0x54, 0x54, 0x74, 0x74, 0x74, 0x00], [0x04, 0x04, 0x7F, 0x7F, 0x7C, 0x44, 0x40, 0x00], [0x7C, 0x7C, 0x70, 0x40, 0x40, 0x7C, 0x7C, 0x00], [0x7C, 0x7C, 0x70, 0x60, 0x30, 0x1C, 0x0C, 0x00], [0x7C, 0x7C, 0x4C, 0x70, 0x40, 0x7C, 0x7C, 0x00], [0x6C, 0x6C, 0x70, 0x10, 0x10, 0x6C, 0x6C, 0x00], [0xBC, 0xBC, 0xB8, 0xA0, 0xA0, 0xFC, 0xFC, 0x00], [0x44, 0x64, 0x74, 0x74, 0x5C, 0x4C, 0x44, 0x00], [0x00, 0x08, 0x08, 0x3E, 0x77, 0x41, 0x41, 0x00], [0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00], [0x00, 0x41, 0x41, 0x77, 0x3E, 0x08, 0x08, 0x00], [0x02, 0x03, 0x01, 0x03, 0x02, 0x03, 0x01, 0x00], ] unscii_fantasy = [ [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x10, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x6C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x3C, 0x64, 0x3C, 0x00], [0x1F, 0x05, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x15, 0x0A, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x04, 0x1F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x10, 0x10, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x0F, 0x10, 0x0F, 0x00, 0x04, 0x7C, 0x04, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x7C, 0x14, 0x04, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x34, 0x5C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x7C, 0x44, 0x7C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x44, 0x7C, 0x44, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x7C, 0x40, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x48, 0x7C, 0x40, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x74, 0x54, 0x5C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x44, 0x54, 0x7C, 0x00], [0x1F, 0x11, 0x0E, 0x00, 0x1C, 0x10, 0x7C, 0x00], [0x1F, 0x01, 0x1F, 0x00, 0x7C, 0x10, 0x6C, 0x00], [0x17, 0x15, 0x1D, 0x00, 0x1C, 0x70, 0x1C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x54, 0x28, 0x00], [0x1F, 0x11, 0x11, 0x00, 0x7C, 0x04, 0x7C, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x08, 0x7C, 0x00], [0x00, 0x06, 0x0F, 0x59, 0x51, 0x07, 0x06, 0x00], [0x1F, 0x15, 0x11, 0x00, 0x7C, 0x44, 0x44, 0x00], [0x1F, 0x05, 0x01, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x11, 0x1D, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x0D, 0x17, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x1F, 0x10, 0x1F, 0x00, 0x5C, 0x54, 0x74, 0x00], [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x5F, 0x5F, 0x00, 0x00, 0x00], [0x00, 0x07, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00], [0x14, 0x7F, 0x7F, 0x14, 0x7F, 0x7F, 0x14, 0x00], [0x00, 0x24, 0x2E, 0x6B, 0x6B, 0x3A, 0x12, 0x00], [0x46, 0x66, 0x30, 0x18, 0x0C, 0x66, 0x62, 0x00], [0x30, 0x7A, 0x4F, 0x5D, 0x37, 0x7A, 0x48, 0x00], [0x00, 0x00, 0x04, 0x07, 0x03, 0x00, 0x00, 0x00], [0x00, 0x00, 0x1C, 0x3E, 0x63, 0x41, 0x00, 0x00], [0x00, 0x00, 0x41, 0x63, 0x3E, 0x1C, 0x00, 0x00], [0x08, 0x2A, 0x3E, 0x1C, 0x1C, 0x3E, 0x2A, 0x08], [0x00, 0x08, 0x08, 0x3E, 0x3E, 0x08, 0x08, 0x00], [0x00, 0x00, 0x80, 0xE0, 0x60, 0x00, 0x00, 0x00], [0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00], [0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00], [0x40, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01], [0x3C, 0x7E, 0x63, 0x41, 0x63, 0x3F, 0x1E, 0x00], [0x00, 0x00, 0x04, 0x3E, 0x7F, 0x00, 0x00, 0x00], [0x66, 0x73, 0x51, 0x59, 0x4F, 0x6F, 0x26, 0x00], [0x00, 0x22, 0x43, 0x49, 0x6D, 0x3F, 0x12, 0x00], [0x0E, 0x1F, 0x08, 0x08, 0x7E, 0x3F, 0x08, 0x00], [0x27, 0x77, 0x65, 0x45, 0x4D, 0x3D, 0x38, 0x00], [0x00, 0x3C, 0x7E, 0x67, 0x45, 0x4D, 0x38, 0x00], [0x02, 0x03, 0x6B, 0x79, 0x7D, 0x0F, 0x0B, 0x00], [0x30, 0x7A, 0x4F, 0x4F, 0x79, 0x7F, 0x36, 0x00], [0x00, 0x0E, 0x59, 0x51, 0x73, 0x3F, 0x1E, 0x00], [0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00], [0x00, 0x00, 0x80, 0xE6, 0x66, 0x00, 0x00, 0x00], [0x00, 0x08, 0x1C, 0x36, 0x63, 0x41, 0x00, 0x00], [0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00], [0x00, 0x41, 0x63, 0x36, 0x1C, 0x08, 0x00, 0x00], [0x00, 0x02, 0x03, 0x51, 0x59, 0x0F, 0x06, 0x00], [0x3E, 0x7F, 0x41, 0x5D, 0x5D, 0x5F, 0x1E, 0x00], [0x5C, 0x7E, 0x6A, 0x09, 0x7F, 0x7F, 0x41, 0x00], [0x45, 0x7F, 0x7F, 0x45, 0x4F, 0x7A, 0x30, 0x00], [0x3C, 0x7E, 0x63, 0x41, 0x43, 0x62, 0x20, 0x00], [0x41, 0x7F, 0x7F, 0x43, 0x46, 0x7C, 0x38, 0x00], [0x3C, 0x7E, 0x6B, 0x49, 0x43, 0x62, 0x20, 0x00], [0x45, 0x7F, 0x3F, 0x09, 0x09, 0x03, 0x02, 0x00], [0x1C, 0x3E, 0x63, 0x49, 0x7B, 0x7A, 0x08, 0x00], [0x49, 0x7F, 0x7F, 0x08, 0x59, 0x7F, 0x7F, 0x00], [0x00, 0x42, 0x42, 0x7F, 0x7F, 0x21, 0x21, 0x00], [0x30, 0x72, 0x43, 0x41, 0x7F, 0x3F, 0x01, 0x00], [0x45, 0x7F, 0x7F, 0x04, 0x3E, 0x7B, 0x41, 0x00], [0x40, 0x71, 0x3F, 0x6E, 0x40, 0x40, 0x40, 0x00], [0x7E, 0x7F, 0x05, 0x0C, 0x46, 0x7F, 0x3F, 0x00], [0x41, 0x7F, 0x3F, 0x06, 0x4C, 0x7F, 0x3F, 0x00], [0x3C, 0x7E, 0x63, 0x41, 0x63, 0x3E, 0x1C, 0x00], [0x41, 0x7F, 0x3E, 0x09, 0x0D, 0x07, 0x02, 0x00], [0x3C, 0x7E, 0x63, 0x41, 0x33, 0x6E, 0x5C, 0x00], [0x41, 0x7F, 0x3E, 0x09, 0x3D, 0x77, 0x42, 0x00], [0x20, 0x64, 0x4E, 0x4B, 0x49, 0x7B, 0x32, 0x00], [0x02, 0x07, 0x71, 0x7F, 0x0F, 0x01, 0x01, 0x00], [0x39, 0x7F, 0x67, 0x40, 0x41, 0x7F, 0x3F, 0x00], [0x19, 0x3F, 0x67, 0x60, 0x31, 0x1F, 0x0F, 0x00], [0x7E, 0x7F, 0x31, 0x18, 0x30, 0x7E, 0x3F, 0x00], [0x41, 0x73, 0x3E, 0x1C, 0x3E, 0x67, 0x41, 0x00], [0x26, 0x6F, 0x49, 0x68, 0x3E, 0x1F, 0x01, 0x00], [0x75, 0x7D, 0x59, 0x4D, 0x5F, 0x16, 0x00, 0x00], [0x00, 0x00, 0x7F, 0x7F, 0x41, 0x41, 0x00, 0x00], [0x01, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40], [0x00, 0x00, 0x41, 0x41, 0x7F, 0x7F, 0x00, 0x00], [0x08, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x08, 0x00], [0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80], [0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04, 0x00], [0x00, 0x38, 0x7C, 0x44, 0x3C, 0x7C, 0x40, 0x00], [0x00, 0x40, 0x7F, 0x3F, 0x44, 0x7C, 0x38, 0x00], [0x00, 0x78, 0x7C, 0x44, 0x44, 0x6C, 0x68, 0x00], [0x00, 0x38, 0x7C, 0x45, 0x7F, 0x7E, 0x40, 0x00], [0x00, 0x78, 0x7C, 0x54, 0x54, 0x5C, 0x1C, 0x00], [0x00, 0x48, 0x7E, 0x3F, 0x09, 0x0B, 0x0A, 0x00], [0x00, 0xB8, 0xBC, 0xA4, 0xA4, 0xFC, 0x7C, 0x00], [0x00, 0x7F, 0x7F, 0x08, 0x38, 0x70, 0x40, 0x00], [0x00, 0x00, 0x00, 0x3A, 0x7A, 0x40, 0x00, 0x00], [0x00, 0x80, 0x80, 0x80, 0xFA, 0x7A, 0x08, 0x00], [0x00, 0x7F, 0x7F, 0x14, 0x3C, 0x6C, 0x40, 0x00], [0x00, 0x00, 0x00, 0x3F, 0x7F, 0x40, 0x00, 0x00], [0x78, 0x7C, 0x0C, 0x18, 0x08, 0x7C, 0x7C, 0x00], [0x00, 0x7C, 0x7C, 0x04, 0x3C, 0x78, 0x40, 0x00], [0x00, 0x78, 0x7C, 0x44, 0x44, 0x7C, 0x3C, 0x00], [0x20, 0xF8, 0xFC, 0x24, 0x24, 0x3C, 0x1C, 0x00], [0x00, 0x38, 0x3C, 0x24, 0x24, 0xFC, 0xFC, 0x00], [0x00, 0x7C, 0x7C, 0x08, 0x04, 0x0C, 0x08, 0x00], [0x00, 0x58, 0x5C, 0x54, 0x54, 0x74, 0x34, 0x00], [0x00, 0x04, 0x04, 0x3F, 0x7E, 0x44, 0x04, 0x00], [0x3C, 0x7C, 0x40, 0x40, 0x3C, 0x7C, 0x40, 0x00], [0x7C, 0x7C, 0x40, 0x60, 0x3C, 0x1C, 0x04, 0x00], [0x7C, 0x7C, 0x20, 0x30, 0x60, 0x7C, 0x3C, 0x00], [0x00, 0x44, 0x6C, 0x38, 0x38, 0x6C, 0x44, 0x00], [0x1C, 0x3C, 0xA0, 0xA0, 0xFC, 0x7C, 0x04, 0x00], [0x00, 0x40, 0x64, 0x74, 0x5C, 0x4C, 0x04, 0x00], [0x00, 0x08, 0x08, 0x3E, 0x77, 0x41, 0x41, 0x00], [0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00], [0x00, 0x41, 0x41, 0x77, 0x3E, 0x08, 0x08, 0x00], [0x02, 0x03, 0x01, 0x03, 0x02, 0x03, 0x01, 0x00], ] unscii_16 = [ [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x033F, 0x0333, 0x03F3, 0x0000, 0x3FF0, 0x0300, 0x3FF0, 0x0000], [0x033F, 0x0333, 0x03F3, 0x0000, 0x3CF0, 0x0300, 0x3CF0, 0x0000], [0x03FF, 0x0333, 0x0303, 0x0000, 0x3CF0, 0x0300, 0x3CF0, 0x0000], [0x03FF, 0x0333, 0x0303, 0x0000, 0x0030, 0x3FF0, 0x0030, 0x0000], [0x03FF, 0x0333, 0x0303, 0x0000, 0x0FF0, 0x3C30, 0x0FF0, 0x0000], [0x03FF, 0x0033, 0x03FF, 0x0000, 0x3FF0, 0x0300, 0x3CF0, 0x0000], [0x03FF, 0x0333, 0x00CC, 0x0000, 0x3FF0, 0x3000, 0x3000, 0x0000], [0x03FF, 0x0333, 0x00CC, 0x0000, 0x33F0, 0x3330, 0x3F30, 0x0000], [0x03FF, 0x0030, 0x03FF, 0x0000, 0x0030, 0x3FF0, 0x0030, 0x0000], [0x03FF, 0x0300, 0x0300, 0x0000, 0x3FF0, 0x0330, 0x0030, 0x0000], [0x00FF, 0x0300, 0x00FF, 0x0000, 0x0030, 0x3FF0, 0x0030, 0x0000], [0x03FF, 0x0033, 0x0003, 0x0000, 0x3FF0, 0x0330, 0x0030, 0x0000], [0x03FF, 0x0303, 0x0303, 0x0000, 0x3FF0, 0x0F30, 0x33F0, 0x0000], [0x033F, 0x0333, 0x03F3, 0x0000, 0x3FF0, 0x3030, 0x3FF0, 0x0000], [0x033F, 0x0333, 0x03F3, 0x0000, 0x3030, 0x3FF0, 0x3030, 0x0000], [0x03FF, 0x0303, 0x00FC, 0x0000, 0x3FF0, 0x3000, 0x3000, 0x0000], [0x03FF, 0x0303, 0x00FC, 0x0000, 0x30C0, 0x3FF0, 0x3000, 0x0000], [0x03FF, 0x0303, 0x00FC, 0x0000, 0x3F30, 0x3330, 0x33F0, 0x0000], [0x03FF, 0x0303, 0x00FC, 0x0000, 0x3030, 0x3330, 0x3FF0, 0x0000], [0x03FF, 0x0303, 0x00FC, 0x0000, 0x03F0, 0x0300, 0x3FF0, 0x0000], [0x03FF, 0x0003, 0x03FF, 0x0000, 0x3FF0, 0x0300, 0x3CF0, 0x0000], [0x033F, 0x0333, 0x03F3, 0x0000, 0x03F0, 0x3F00, 0x03F0, 0x0000], [0x03FF, 0x0333, 0x0303, 0x0000, 0x3FF0, 0x3330, 0x0CC0, 0x0000], [0x03FF, 0x0303, 0x0303, 0x0000, 0x3FF0, 0x0030, 0x3FF0, 0x0000], [0x03FF, 0x0333, 0x0303, 0x0000, 0x3FF0, 0x00C0, 0x3FF0, 0x0000], [0x0000, 0x003C, 0x00FF, 0x33C3, 0x3303, 0x003F, 0x003C, 0x0000], [0x03FF, 0x0333, 0x0303, 0x0000, 0x3FF0, 0x3030, 0x3030, 0x0000], [0x03FF, 0x0033, 0x0003, 0x0000, 0x33F0, 0x3330, 0x3F30, 0x0000], [0x03FF, 0x0303, 0x03F3, 0x0000, 0x33F0, 0x3330, 0x3F30, 0x0000], [0x03FF, 0x00F3, 0x033F, 0x0000, 0x33F0, 0x3330, 0x3F30, 0x0000], [0x03FF, 0x0300, 0x03FF, 0x0000, 0x33F0, 0x3330, 0x3F30, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x19FE, 0x19FE, 0x0000, 0x0000, 0x0000], [0x0000, 0x000E, 0x000E, 0x0000, 0x0000, 0x000E, 0x000E, 0x0000], [0x0220, 0x1FFC, 0x1FFC, 0x0220, 0x1FFC, 0x1FFC, 0x0220, 0x0000], [0x0000, 0x0430, 0x0C78, 0x38CE, 0x398E, 0x0F18, 0x0610, 0x0000], [0x3038, 0x3C38, 0x0F00, 0x03C0, 0x00F0, 0x1C3C, 0x1C0C, 0x0000], [0x0F00, 0x1F98, 0x10FC, 0x11E4, 0x0FBC, 0x1F18, 0x1180, 0x0000], [0x0000, 0x0000, 0x0010, 0x001E, 0x000E, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x07F0, 0x1FFC, 0x380E, 0x2002, 0x0000, 0x0000], [0x0000, 0x0000, 0x2002, 0x380E, 0x1FFC, 0x07F0, 0x0000, 0x0000], [0x0080, 0x06B0, 0x07F0, 0x01C0, 0x01C0, 0x07F0, 0x06B0, 0x0080], [0x0000, 0x0080, 0x0080, 0x07F0, 0x07F0, 0x0080, 0x0080, 0x0000], [0x0000, 0x4000, 0x6400, 0x3C00, 0x1C00, 0x0000, 0x0000, 0x0000], [0x0000, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0000], [0x0000, 0x0000, 0x0000, 0x1C00, 0x1C00, 0x0000, 0x0000, 0x0000], [0x3000, 0x3C00, 0x0F00, 0x03C0, 0x00F0, 0x003C, 0x000F, 0x0003], [0x07F0, 0x0FF8, 0x190C, 0x1084, 0x184C, 0x0FF8, 0x07F0, 0x0000], [0x0000, 0x1010, 0x1018, 0x1FFC, 0x1FFC, 0x1000, 0x1000, 0x0000], [0x0000, 0x1C18, 0x1E1C, 0x1304, 0x1184, 0x10FC, 0x1078, 0x0000], [0x0000, 0x0C18, 0x1C1C, 0x1084, 0x1084, 0x1FFC, 0x0F78, 0x0000], [0x01C0, 0x01E0, 0x0130, 0x0118, 0x1FFC, 0x1FFC, 0x0100, 0x0000], [0x0000, 0x0C7C, 0x1C7C, 0x1044, 0x1044, 0x1FC4, 0x0F84, 0x0000], [0x0000, 0x0FF0, 0x1FF8, 0x104C, 0x1044, 0x1FC4, 0x0F80, 0x0000], [0x0000, 0x0004, 0x0004, 0x1F04, 0x1FC4, 0x00FC, 0x003C, 0x0000], [0x0000, 0x0F78, 0x1FFC, 0x10C4, 0x1184, 0x1FFC, 0x0F78, 0x0000], [0x0000, 0x0078, 0x10FC, 0x1084, 0x1884, 0x0FFC, 0x07F8, 0x0000], [0x0000, 0x0000, 0x0000, 0x1C38, 0x1C38, 0x0000, 0x0000, 0x0000], [0x0000, 0x4000, 0x6400, 0x3C38, 0x1C38, 0x0000, 0x0000, 0x0000], [0x0000, 0x0080, 0x01C0, 0x0360, 0x0630, 0x0C18, 0x0808, 0x0000], [0x0000, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0000], [0x0000, 0x0808, 0x0C18, 0x0630, 0x0360, 0x01C0, 0x0080, 0x0000], [0x0000, 0x000C, 0x000E, 0x19C2, 0x19E2, 0x003E, 0x001C, 0x0000], [0x0FF8, 0x1FFC, 0x1004, 0x13C4, 0x13C4, 0x13FC, 0x01F8, 0x0000], [0x0000, 0x1FF0, 0x1FF8, 0x008C, 0x008C, 0x1FF8, 0x1FF0, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x1084, 0x11C4, 0x1F7C, 0x0E38, 0x0000], [0x0000, 0x0FF8, 0x1FFC, 0x1004, 0x1004, 0x1C1C, 0x0C18, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x1004, 0x180C, 0x0FF8, 0x07F0, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x1084, 0x1084, 0x1084, 0x1004, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x0044, 0x0044, 0x0044, 0x0004, 0x0000], [0x0000, 0x0FF8, 0x1FFC, 0x1004, 0x1084, 0x1F9C, 0x1F98, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x0080, 0x0080, 0x1FFC, 0x1FFC, 0x0000], [0x0000, 0x1004, 0x1004, 0x1FFC, 0x1FFC, 0x1004, 0x1004, 0x0000], [0x0000, 0x0C00, 0x1C00, 0x1000, 0x1000, 0x1FFC, 0x0FFC, 0x0000], [0x1FFC, 0x1FFC, 0x0080, 0x01C0, 0x0770, 0x1E3C, 0x180C, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000], [0x1FFC, 0x1FFC, 0x0038, 0x00E0, 0x0038, 0x1FFC, 0x1FFC, 0x0000], [0x1FFC, 0x1FFC, 0x00F0, 0x01C0, 0x0780, 0x1FFC, 0x1FFC, 0x0000], [0x0000, 0x0FF8, 0x1FFC, 0x1004, 0x1004, 0x1FFC, 0x0FF8, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x0084, 0x0084, 0x00FC, 0x0078, 0x0000], [0x0000, 0x0FF8, 0x1FFC, 0x1004, 0x3004, 0x7FFC, 0x4FF8, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x0084, 0x0184, 0x1FFC, 0x1E78, 0x0000], [0x0000, 0x0C38, 0x1C7C, 0x10C4, 0x1184, 0x1F1C, 0x0E18, 0x0000], [0x0000, 0x0004, 0x0004, 0x1FFC, 0x1FFC, 0x0004, 0x0004, 0x0000], [0x0000, 0x0FFC, 0x1FFC, 0x1000, 0x1000, 0x1FFC, 0x0FFC, 0x0000], [0x0000, 0x01FC, 0x07FC, 0x1E00, 0x1E00, 0x07FC, 0x01FC, 0x0000], [0x1FFC, 0x1FFC, 0x0E00, 0x0380, 0x0E00, 0x1FFC, 0x1FFC, 0x0000], [0x180C, 0x1C1C, 0x0630, 0x03E0, 0x03E0, 0x0630, 0x1C1C, 0x180C], [0x000C, 0x003C, 0x0070, 0x1FC0, 0x1FC0, 0x0070, 0x003C, 0x000C], [0x0000, 0x1C04, 0x1F04, 0x1384, 0x10E4, 0x107C, 0x101C, 0x0000], [0x0000, 0x0000, 0x3FFE, 0x3FFE, 0x2002, 0x2002, 0x0000, 0x0000], [0x0003, 0x000F, 0x003C, 0x00F0, 0x03C0, 0x0F00, 0x3C00, 0x3000], [0x0000, 0x0000, 0x2002, 0x2002, 0x3FFE, 0x3FFE, 0x0000, 0x0000], [0x0060, 0x0078, 0x001C, 0x0006, 0x001C, 0x0078, 0x0060, 0x0000], [0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000], [0x0000, 0x0000, 0x0000, 0x0006, 0x000E, 0x0018, 0x0010, 0x0000], [0x0000, 0x0E00, 0x1F40, 0x1140, 0x1140, 0x1FC0, 0x1F80, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x1040, 0x1040, 0x1FC0, 0x0F80, 0x0000], [0x0000, 0x0F80, 0x1FC0, 0x1040, 0x1040, 0x18C0, 0x0880, 0x0000], [0x0000, 0x0F80, 0x1FC0, 0x1040, 0x1040, 0x1FFC, 0x1FFC, 0x0000], [0x0000, 0x0F80, 0x1FC0, 0x1240, 0x1240, 0x13C0, 0x0380, 0x0000], [0x0000, 0x0040, 0x1FF8, 0x1FFC, 0x0044, 0x0044, 0x0044, 0x0000], [0x0000, 0x8F80, 0x9FC0, 0x9040, 0x9040, 0xFFC0, 0x7FC0, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x0040, 0x0040, 0x1FC0, 0x1F80, 0x0000], [0x0000, 0x0040, 0x0040, 0x1FCC, 0x1FCC, 0x1000, 0x1000, 0x0000], [0x0000, 0x8000, 0x8000, 0x8000, 0xFFCC, 0x7FCC, 0x0000, 0x0000], [0x0000, 0x1FFC, 0x1FFC, 0x0200, 0x0700, 0x1DC0, 0x18C0, 0x0000], [0x0000, 0x0004, 0x0004, 0x1FFC, 0x1FFC, 0x1000, 0x1000, 0x0000], [0x1FC0, 0x1FC0, 0x0080, 0x0F80, 0x00C0, 0x1FC0, 0x1F80, 0x0000], [0x0000, 0x1FC0, 0x1FC0, 0x0040, 0x0040, 0x1FC0, 0x1F80, 0x0000], [0x0000, 0x0F80, 0x1FC0, 0x1040, 0x1040, 0x1FC0, 0x0F80, 0x0000], [0x0000, 0xFFC0, 0xFFC0, 0x1040, 0x1040, 0x1FC0, 0x0F80, 0x0000], [0x0000, 0x0F80, 0x1FC0, 0x1040, 0x1040, 0xFFC0, 0xFFC0, 0x0000], [0x0000, 0x1FC0, 0x1FC0, 0x0040, 0x0040, 0x01C0, 0x0180, 0x0000], [0x0000, 0x1180, 0x13C0, 0x1240, 0x1240, 0x1E40, 0x0C40, 0x0000], [0x0000, 0x0040, 0x0FF8, 0x1FF8, 0x1040, 0x1040, 0x1040, 0x0000], [0x0000, 0x0FC0, 0x1FC0, 0x1000, 0x1000, 0x1FC0, 0x1FC0, 0x0000], [0x0000, 0x07C0, 0x0FC0, 0x1800, 0x1800, 0x0FC0, 0x07C0, 0x0000], [0x07C0, 0x1FC0, 0x1800, 0x0F00, 0x1800, 0x1FC0, 0x07C0, 0x0000], [0x18C0, 0x1DC0, 0x0700, 0x0200, 0x0700, 0x1DC0, 0x18C0, 0x0000], [0x0000, 0x0FC0, 0x9FC0, 0x9000, 0x9000, 0xFFC0, 0x7FC0, 0x0000], [0x0000, 0x1840, 0x1C40, 0x1640, 0x1340, 0x11C0, 0x10C0, 0x0000], [0x0080, 0x0080, 0x0080, 0x1FFC, 0x3F7E, 0x2002, 0x2002, 0x0000], [0x0000, 0x0000, 0x0000, 0x3FFF, 0x3FFF, 0x0000, 0x0000, 0x0000], [0x2002, 0x2002, 0x3F7E, 0x1FFC, 0x0080, 0x0080, 0x0080, 0x0000], [0x000C, 0x0006, 0x0002, 0x000E, 0x0008, 0x000C, 0x0006, 0x0000], ] amiga_16 = [ [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x003C, 0x33FF, 0x33FF, 0x003C, 0x0000, 0x0000], [0x0000, 0x000F, 0x000F, 0x0000, 0x000F, 0x000F, 0x0000, 0x0000], [0x0330, 0x3FFF, 0x3FFF, 0x0330, 0x3FFF, 0x3FFF, 0x0330, 0x0000], [0x0000, 0x0C30, 0x0CFC, 0x3CCF, 0x3CCF, 0x0FCC, 0x030C, 0x0000], [0xF03C, 0x3C3C, 0x0F00, 0x03C0, 0x00F0, 0x3C3C, 0x3C0F, 0x0003], [0x0F00, 0x3FFC, 0x30FF, 0x33C3, 0x0F3F, 0x3FCC, 0x30C0, 0x0000], [0x0000, 0x0000, 0x0030, 0x003F, 0x000F, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x03F0, 0x0FFC, 0x1C0E, 0x3807, 0x3003], [0x3003, 0x3807, 0x1C0E, 0x0FFC, 0x03F0, 0x0000, 0x0000, 0x0000], [0x00C0, 0x0CCC, 0x0FFC, 0x03F0, 0x03F0, 0x0FFC, 0x0CCC, 0x00C0], [0x0000, 0x00C0, 0x00C0, 0x0FFC, 0x0FFC, 0x00C0, 0x00C0, 0x0000], [0x0000, 0x0000, 0xC000, 0xFC00, 0x3C00, 0x0000, 0x0000, 0x0000], [0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0], [0x0000, 0x0000, 0x0000, 0x3C00, 0x3C00, 0x0000, 0x0000, 0x0000], [0xF000, 0x3C00, 0x0F00, 0x03C0, 0x00F0, 0x003C, 0x000F, 0x0003], [0x0000, 0x0FFC, 0x3FFF, 0x33C3, 0x30F3, 0x3FFF, 0x0FFC, 0x0000], [0x0000, 0x3000, 0x300C, 0x3FFF, 0x3FFF, 0x3000, 0x3000, 0x0000], [0x0000, 0x3C0C, 0x3F0F, 0x33C3, 0x30C3, 0x3CFF, 0x3C3C, 0x0000], [0x0000, 0x0C0C, 0x3C0F, 0x30C3, 0x30C3, 0x3FFF, 0x0F3C, 0x0000], [0x03C0, 0x03F0, 0x033C, 0x330F, 0x3FFF, 0x3FFF, 0x3300, 0x0000], [0x0000, 0x0C3F, 0x3C3F, 0x3033, 0x3033, 0x3FF3, 0x0FC3, 0x0000], [0x0000, 0x0FF0, 0x3FFC, 0x30CF, 0x30C3, 0x3FC3, 0x0F00, 0x0000], [0x0000, 0x000F, 0x000F, 0x3F03, 0x3FC3, 0x00FF, 0x003F, 0x0000], [0x0000, 0x0F3C, 0x3FFF, 0x30C3, 0x30C3, 0x3FFF, 0x0F3C, 0x0000], [0x0000, 0x003C, 0x30FF, 0x30C3, 0x3CC3, 0x0FFF, 0x03FC, 0x0000], [0x0000, 0x0000, 0x0000, 0x3C3C, 0x3C3C, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0xC000, 0xFC3C, 0x3C3C, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x00C0, 0x03F0, 0x0F3C, 0x3C0F, 0x3003], [0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330, 0x0330], [0x3003, 0x3C0F, 0x0F3C, 0x03F0, 0x00C0, 0x0000, 0x0000, 0x0000], [0x0000, 0x000C, 0x000F, 0x3303, 0x33C3, 0x00FF, 0x003C, 0x0000], [0x0FFC, 0x3FFF, 0x3003, 0x33F3, 0x33F3, 0x03FF, 0x03FC, 0x0000], [0x3C00, 0x3FC0, 0x03FC, 0x033F, 0x033F, 0x03FC, 0x3FC0, 0x3C00], [0x3003, 0x3FFF, 0x3FFF, 0x30C3, 0x30C3, 0x3FFF, 0x0F3C, 0x0000], [0x03F0, 0x0FFC, 0x3C0F, 0x3003, 0x3003, 0x3C0F, 0x0C0C, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x3003, 0x3C0F, 0x0FFC, 0x03F0, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x30C3, 0x30C3, 0x3C0F, 0x3C0F, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x30C3, 0x00C3, 0x000F, 0x000F, 0x0000], [0x03F0, 0x0FFC, 0x3C0F, 0x3003, 0x30C3, 0x3FCF, 0x3FCC, 0x0000], [0x0000, 0x3FFF, 0x3FFF, 0x00C0, 0x00C0, 0x3FFF, 0x3FFF, 0x0000], [0x0000, 0x3003, 0x3003, 0x3FFF, 0x3FFF, 0x3003, 0x3003, 0x0000], [0x0000, 0x0F00, 0x3F00, 0x3000, 0x3003, 0x3FFF, 0x0FFF, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x00C0, 0x03F0, 0x3F3F, 0x3C0F, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x3003, 0x3000, 0x3C00, 0x3F00, 0x0000], [0x3FFF, 0x3FFC, 0x00F0, 0x03C0, 0x00F0, 0x3FFC, 0x3FFF, 0x0000], [0x3FFF, 0x3FFF, 0x003C, 0x00F0, 0x03C0, 0x3FFF, 0x3FFF, 0x0000], [0x03F0, 0x0FFC, 0x3C0F, 0x3003, 0x3C0F, 0x0FFC, 0x03F0, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x30C3, 0x00C3, 0x00FF, 0x003C, 0x0000], [0x03F0, 0x0FFC, 0x3C0F, 0x3003, 0x3C0F, 0xFFFC, 0xC3F0, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x00C3, 0x03C3, 0x0FFF, 0x3C3C, 0x3000], [0x0000, 0x0C3C, 0x3CFF, 0x30F3, 0x33C3, 0x3F0F, 0x0F0C, 0x0000], [0x0000, 0x000F, 0x3003, 0x3FFF, 0x3FFF, 0x3003, 0x000F, 0x0000], [0x0000, 0x0FFF, 0x3FFF, 0x3000, 0x3000, 0x3FFF, 0x3FFF, 0x0000], [0x000F, 0x00FF, 0x0FF0, 0x3F00, 0x3F00, 0x0FF0, 0x00FF, 0x000F], [0x3FFF, 0x3FFF, 0x0F00, 0x03C0, 0x0F00, 0x3FFF, 0x3FFF, 0x0000], [0x3003, 0x3C0F, 0x0F3C, 0x03F0, 0x03F0, 0x0F3C, 0x3C0F, 0x3003], [0x000F, 0x003F, 0x30F0, 0x3FC0, 0x3FC0, 0x30F0, 0x003F, 0x000F], [0x303F, 0x3C0F, 0x3F03, 0x33C3, 0x30F3, 0x3C3F, 0x3F0F, 0x0000], [0x0000, 0x0000, 0x3FFF, 0x3FFF, 0x3003, 0x3003, 0x1002, 0x1002], [0x0003, 0x000F, 0x003C, 0x00F0, 0x03C0, 0x0F00, 0x3C00, 0xF000], [0x1002, 0x1002, 0x3003, 0x3003, 0x3FFF, 0x3FFF, 0x0000, 0x0000], [0x00C0, 0x00F0, 0x003C, 0x000F, 0x000F, 0x003C, 0x00F0, 0x00C0], [0xC000, 0xC000, 0xC000, 0xC000, 0xC000, 0xC000, 0xC000, 0xC000], [0x0000, 0x0000, 0x0000, 0x000F, 0x003F, 0x0030, 0x0000, 0x0000], [0x0000, 0x0C00, 0x3C30, 0x3330, 0x3330, 0x0FF0, 0x3FC0, 0x3000], [0x0003, 0x0FFF, 0x3FFF, 0x30C0, 0x3030, 0x3FF0, 0x0FC0, 0x0000], [0x0000, 0x0FC0, 0x3FF0, 0x3030, 0x3030, 0x3CF0, 0x0CC0, 0x0000], [0x0000, 0x0FC0, 0x3FF0, 0x3030, 0x30C3, 0x0FFF, 0x3FFF, 0x3000], [0x0000, 0x0FC0, 0x3FF0, 0x3330, 0x3330, 0x33F0, 0x03C0, 0x0000], [0x0000, 0x30C0, 0x3FFC, 0x3FFF, 0x30C3, 0x000F, 0x000C, 0x0000], [0x3000, 0xF3C0, 0xCFF0, 0xCC30, 0xCC30, 0xFFC0, 0x33F0, 0x0030], [0x3003, 0x3FFF, 0x3FFF, 0x00C0, 0x0030, 0x3FF0, 0x3FC0, 0x0000], [0x0000, 0x0000, 0x3030, 0x3FF3, 0x3FF3, 0x3000, 0x0000, 0x0000], [0x0000, 0x3000, 0xF000, 0xC000, 0xC000, 0xFFF3, 0x3FF3, 0x0000], [0x3003, 0x3FFF, 0x3FFF, 0x0300, 0x0FC0, 0x3CF0, 0x3030, 0x0000], [0x0000, 0x0000, 0x3003, 0x3FFF, 0x3FFF, 0x3000, 0x0000, 0x0000], [0x0000, 0x3FF0, 0x3FF0, 0x00C0, 0x0300, 0x00F0, 0x3FF0, 0x3FC0], [0x0000, 0x3FF0, 0x3FF0, 0x0030, 0x0030, 0x3FF0, 0x3FC0, 0x0000], [0x0000, 0x0FC0, 0x3FF0, 0x3030, 0x3030, 0x3FF0, 0x0FC0, 0x0000], [0xC030, 0xFFF0, 0xFFC0, 0xCC30, 0x0C30, 0x0FF0, 0x03C0, 0x0000], [0x0000, 0x03C0, 0x0FF0, 0x0C30, 0x0C30, 0xFFF0, 0xFFC0, 0xC030], [0x3030, 0x3FF0, 0x3FF0, 0x30C0, 0x0030, 0x03F0, 0x03C0, 0x0000], [0x0000, 0x30C0, 0x33F0, 0x3330, 0x3330, 0x3F30, 0x0C30, 0x0000], [0x0000, 0x0000, 0x0030, 0x0FFC, 0x3FFF, 0x3030, 0x0C30, 0x0000], [0x0000, 0x0FF0, 0x3FF0, 0x3000, 0x3000, 0x0FF0, 0x3FF0, 0x3000], [0x0000, 0x03F0, 0x0FF0, 0x3C00, 0x3C00, 0x0FF0, 0x03F0, 0x0000], [0x0000, 0x03F0, 0x3FF0, 0x3C00, 0x03C0, 0x3C00, 0x3FF0, 0x03F0], [0x0000, 0x3030, 0x3CF0, 0x0FC0, 0x0300, 0x0FC0, 0x3CF0, 0x3030], [0x0000, 0xC3F0, 0xCFF0, 0xFC00, 0x3C00, 0x0FF0, 0x03F0, 0x0000], [0x0000, 0x30F0, 0x3C30, 0x3F30, 0x33F0, 0x30F0, 0x3C30, 0x0000], [0x0000, 0x00C0, 0x00C0, 0x0FFC, 0x3F3F, 0x3003, 0x3003, 0x1806], [0x0000, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0x0000], [0x1806, 0x3003, 0x3003, 0x3F3F, 0x0FFC, 0x00C0, 0x00C0, 0x0000], [0x000C, 0x0003, 0x0003, 0x000F, 0x000C, 0x000C, 0x0003, 0x0000], ] ice_16 = [ [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x2AAE, 0x5556, 0x2AAE, 0x555E, 0x2ABE, 0x555E, 0x2ABE], [0x5556, 0x2AFE, 0x555A, 0x2AAE, 0x557E, 0x2BFE, 0x556E, 0x2EBE], [0x55FE, 0x2AFE, 0x5FFE, 0x2B7E, 0x55FE, 0x6FFE, 0x5DFE, 0x0000], [0x001F, 0x001F, 0x001F, 0x001F, 0x001F, 0x001F, 0x001F, 0x001F], [0x000F, 0x000F, 0x000F, 0x000F, 0x000F, 0x000F, 0x000F, 0x000F], [0x07FF, 0x01FF, 0x00FF, 0x00FF, 0x007F, 0x007F, 0x007F, 0x007F], [0x0000, 0x0000, 0x0180, 0x03C0, 0x03C0, 0x0180, 0x0000, 0x0000], [0xFFFF, 0xFFFF, 0xFE7F, 0xFC3F, 0xFC3F, 0xFE7F, 0xFFFF, 0xFFFF], [0x0000, 0x03C0, 0x0660, 0x0420, 0x0420, 0x0660, 0x03C0, 0x0000], [0xFFFF, 0xFC3F, 0xF99F, 0xFBDF, 0xFBDF, 0xF99F, 0xFC3F, 0xFFFF], [0x0780, 0x0FC0, 0x0860, 0x0874, 0x0FDC, 0x078C, 0x003C, 0x0000], [0x0000, 0x0278, 0x02FC, 0x0F84, 0x0F84, 0x02FC, 0x0278, 0x0000], [0x0C00, 0x0E00, 0x0FFC, 0x07FC, 0x0014, 0x0014, 0x001C, 0x001C], [0x8000, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x0000, 0x0000], [0xFFFE, 0xFFFE, 0xFFFE, 0xFFFE, 0xFFFE, 0xFFFE, 0xFFFE, 0xFFFE], [0xFFFC, 0xFFFC, 0xFFFC, 0xFFFC, 0xFFFC, 0xFFFC, 0xFFFC, 0xFFFC], [0xF0FC, 0xC07C, 0x803C, 0x803C, 0x803C, 0x803C, 0xC07C, 0xF0FC], [0x0000, 0x0DFC, 0x0DFC, 0x0000, 0x0000, 0x0DFC, 0x0DFC, 0x0000], [0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001], [0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0000], [0x0000, 0x1210, 0x1618, 0x1FFC, 0x1FFC, 0x1618, 0x1210, 0x0000], [0xA000, 0x9000, 0xC100, 0xC100, 0x8000, 0x8404, 0xC000, 0xE400], [0x01FF, 0x007F, 0x001F, 0x0007, 0x0003, 0x0003, 0x0001, 0x0001], [0x0080, 0x0080, 0x0080, 0x02A0, 0x03E0, 0x01C0, 0x0080, 0x0000], [0x0080, 0x01C0, 0x03E0, 0x02A0, 0x0080, 0x0080, 0x0080, 0x0000], [0x03E0, 0x03E0, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0000], [0xFFFF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF], [0x0001, 0x0001, 0x0003, 0x0003, 0x0007, 0x001F, 0x007F, 0x01FF], [0x807F, 0x807F, 0xC07F, 0xC07F, 0xE07F, 0xF07F, 0xF87F, 0xFF7F], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0038, 0x0DFC, 0x0DFC, 0x0038, 0x0000, 0x0000], [0x0000, 0x000E, 0x001E, 0x0000, 0x0000, 0x0000, 0x001E, 0x000E], [0x0220, 0x0FF8, 0x0FF8, 0x0220, 0x0FF8, 0x0FF8, 0x0220, 0x0000], [0x0338, 0x067C, 0x0444, 0x1C47, 0x1C47, 0x07CC, 0x0398, 0x0000], [0x0C30, 0x0630, 0x0300, 0x0180, 0x00C0, 0x0C60, 0x0C30, 0x0000], [0x0780, 0x0FD8, 0x087C, 0x08E4, 0x07BC, 0x0FD8, 0x0840, 0x0000], [0x0000, 0x0010, 0x001E, 0x000E, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x03F0, 0x07F8, 0x0C0C, 0x0804, 0x0000, 0x0000], [0x0000, 0x0000, 0x0804, 0x0C0C, 0x07F8, 0x03F0, 0x0000, 0x0000], [0x0080, 0x02A0, 0x03E0, 0x01C0, 0x01C0, 0x03E0, 0x02A0, 0x0080], [0x001F, 0x001F, 0x001F, 0x001F, 0x001F, 0x001F, 0x001F, 0x001F], [0x0000, 0x0000, 0x1000, 0x1C00, 0x0C00, 0x0000, 0x0000, 0x0000], [0xF800, 0xFE00, 0xFF00, 0xFF00, 0xFF80, 0xFF80, 0xFF80, 0xFF80], [0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000], [0x0C00, 0x0600, 0x0300, 0x0180, 0x00C0, 0x0060, 0x0030, 0x0000], [0x07F8, 0x0FFC, 0x0904, 0x08C4, 0x0824, 0x0FFC, 0x07F8, 0x0000], [0x0000, 0x0810, 0x0818, 0x0FFC, 0x0FFC, 0x0800, 0x0800, 0x0000], [0x0E08, 0x0F0C, 0x0984, 0x08C4, 0x0864, 0x0C3C, 0x0C18, 0x0000], [0x0408, 0x0C0C, 0x0844, 0x0844, 0x0844, 0x0FFC, 0x07B8, 0x0000], [0x00C0, 0x00E0, 0x00B0, 0x0898, 0x0FFC, 0x0FFC, 0x0880, 0x0000], [0x047C, 0x0C7C, 0x0844, 0x0844, 0x08C4, 0x0FC4, 0x0784, 0x0000], [0x07F0, 0x0FF8, 0x084C, 0x0844, 0x0844, 0x0FC0, 0x0780, 0x0000], [0x000C, 0x000C, 0x0F04, 0x0F84, 0x00C4, 0x007C, 0x003C, 0x0000], [0x07B8, 0x0FFC, 0x0844, 0x0844, 0x0844, 0x0FFC, 0x07B8, 0x0000], [0x0038, 0x087C, 0x0844, 0x0844, 0x0C44, 0x07FC, 0x03F8, 0x0000], [0x0000, 0x0000, 0x0000, 0x0C60, 0x0C60, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x1000, 0x1C60, 0x0C60, 0x0000, 0x0000, 0x0000], [0x0000, 0x0080, 0x01C0, 0x0360, 0x0630, 0x0C18, 0x0808, 0x0000], [0x0380, 0x0FE0, 0x1FF0, 0x3FF8, 0x3FF8, 0x7FFC, 0x7FFC, 0x7FFC], [0x0000, 0x0808, 0x0C18, 0x0630, 0x0360, 0x01C0, 0x0080, 0x0000], [0x0018, 0x001C, 0x0004, 0x0DC4, 0x0DE4, 0x003C, 0x0018, 0x0000], [0x07F0, 0x0FF8, 0x0808, 0x0BC8, 0x0BC8, 0x0BF8, 0x01F0, 0x0000], [0x0FE0, 0x0FF0, 0x0098, 0x008C, 0x0098, 0x0FF0, 0x0FE0, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x0844, 0x0844, 0x0FFC, 0x07B8, 0x0000], [0x03F0, 0x07F8, 0x0C0C, 0x0804, 0x0804, 0x0C0C, 0x0618, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x0804, 0x0C0C, 0x07F8, 0x03F0, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x0844, 0x08E4, 0x0C0C, 0x0E1C, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x0844, 0x00E4, 0x000C, 0x001C, 0x0000], [0x03F0, 0x07F8, 0x0C0C, 0x0884, 0x0884, 0x078C, 0x0F98, 0x0000], [0x0FFC, 0x0FFC, 0x0040, 0x0040, 0x0040, 0x0FFC, 0x0FFC, 0x0000], [0x0000, 0x0000, 0x0804, 0x0FFC, 0x0FFC, 0x0804, 0x0000, 0x0000], [0x0700, 0x0F00, 0x0800, 0x0804, 0x0FFC, 0x07FC, 0x0004, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x00C0, 0x01F0, 0x0F3C, 0x0E0C, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x0804, 0x0800, 0x0C00, 0x0E00, 0x0000], [0x0FFC, 0x0FFC, 0x0018, 0x0070, 0x0070, 0x0018, 0x0FFC, 0x0FFC], [0x0FFC, 0x0FFC, 0x0038, 0x0070, 0x00E0, 0x0FFC, 0x0FFC, 0x0000], [0x03F0, 0x07F8, 0x0C0C, 0x0804, 0x0C0C, 0x07F8, 0x03F0, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x0844, 0x0044, 0x007C, 0x0038, 0x0000], [0x07F8, 0x0FFC, 0x0804, 0x0E04, 0x3C04, 0x3FFC, 0x27F8, 0x0000], [0x0804, 0x0FFC, 0x0FFC, 0x0044, 0x00C4, 0x0FFC, 0x0F38, 0x0000], [0x0618, 0x0E3C, 0x0864, 0x0844, 0x08C4, 0x0F9C, 0x0718, 0x0000], [0x001C, 0x000C, 0x0804, 0x0FFC, 0x0FFC, 0x0804, 0x000C, 0x001C], [0x07FC, 0x0FFC, 0x0800, 0x0800, 0x0800, 0x0FFC, 0x07FC, 0x0000], [0x01FC, 0x03FC, 0x0600, 0x0C00, 0x0600, 0x03FC, 0x01FC, 0x0000], [0x03FC, 0x0FFC, 0x0E00, 0x0380, 0x0380, 0x0E00, 0x0FFC, 0x03FC], [0x0C0C, 0x0F3C, 0x03F0, 0x00C0, 0x03F0, 0x0F3C, 0x0C0C, 0x0000], [0x0000, 0x003C, 0x087C, 0x0FC0, 0x0FC0, 0x087C, 0x003C, 0x0000], [0x0C1C, 0x0E0C, 0x0B04, 0x0984, 0x08C4, 0x0864, 0x0C3C, 0x0E1C], [0x0000, 0x0000, 0x0FFC, 0x0FFC, 0x0804, 0x0804, 0x0804, 0x0000], [0x0038, 0x0070, 0x00E0, 0x01C0, 0x0380, 0x0700, 0x0E00, 0x0000], [0x0000, 0x0000, 0x0804, 0x0804, 0x0804, 0x0FFC, 0x0FFC, 0x0000], [0x0008, 0x000C, 0x0006, 0x0003, 0x0006, 0x000C, 0x0008, 0x0000], [0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000], [0x0000, 0x0000, 0x0003, 0x0007, 0x0004, 0x0000, 0x0000, 0x0000], [0x0000, 0x07B0, 0x07B0, 0x0490, 0x0490, 0x0FF0, 0x0FF0, 0x0000], [0x0000, 0x07F8, 0x07F8, 0x0410, 0x0410, 0x07F0, 0x07F0, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0410, 0x0410, 0x06F0, 0x06F0, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0410, 0x0410, 0x07F8, 0x07F8, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0450, 0x0450, 0x0770, 0x0770, 0x0000], [0x0000, 0x0000, 0x07FC, 0x07FE, 0x0042, 0x0046, 0x001C, 0x0000], [0x0000, 0x37F0, 0x37F0, 0x2410, 0x2410, 0x3FF0, 0x3FF0, 0x0000], [0x0000, 0x07F8, 0x07F8, 0x0010, 0x0010, 0x07F0, 0x07F0, 0x0000], [0x0000, 0x0000, 0x0000, 0x07F4, 0x07F4, 0x0000, 0x0000, 0x0000], [0x0000, 0x3000, 0x3000, 0x2000, 0x2000, 0x3FD0, 0x3FD0, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0040, 0x0040, 0x07B0, 0x07B0, 0x0000], [0x0000, 0x0000, 0x0000, 0x07F8, 0x07F8, 0x0000, 0x0000, 0x0000], [0x07F0, 0x07F0, 0x0010, 0x07F0, 0x07F0, 0x0010, 0x07F0, 0x07F0], [0x0000, 0x07F0, 0x07F0, 0x0010, 0x0010, 0x07F0, 0x07F0, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0410, 0x0410, 0x07F0, 0x07F0, 0x0000], [0x0000, 0x3FF0, 0x3FF0, 0x0410, 0x0410, 0x07F0, 0x07F0, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0410, 0x0410, 0x3FF0, 0x3FF0, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0010, 0x0010, 0x0070, 0x0070, 0x0000], [0x0000, 0x06F0, 0x06F0, 0x0490, 0x0490, 0x07B0, 0x07B0, 0x0000], [0x0000, 0x07F8, 0x07F8, 0x0410, 0x0410, 0x0710, 0x0710, 0x0000], [0x0000, 0x07F0, 0x07F0, 0x0400, 0x0400, 0x07F0, 0x07F0, 0x0000], [0x0000, 0x01F0, 0x03F0, 0x0400, 0x0400, 0x03F0, 0x01F0, 0x0000], [0x07F0, 0x07F0, 0x0400, 0x07F0, 0x07F0, 0x0400, 0x07F0, 0x07F0], [0x0000, 0x0630, 0x0360, 0x01C0, 0x01C0, 0x0360, 0x0630, 0x0000], [0x0000, 0x37F0, 0x37F0, 0x2400, 0x2400, 0x3FF0, 0x3FF0, 0x0000], [0x0000, 0x0630, 0x0730, 0x0590, 0x04D0, 0x0770, 0x0730, 0x0000], [0x0000, 0x0040, 0x0040, 0x07F8, 0x0FBC, 0x0804, 0x0804, 0x0000], [0x0000, 0x0000, 0x0000, 0x0FBC, 0x0FBC, 0x0000, 0x0000, 0x0000], [0x0000, 0x0804, 0x0804, 0x0FBC, 0x07F8, 0x0040, 0x0040, 0x0000], [0x000F, 0x000F, 0x000F, 0x000F, 0x000F, 0x000F, 0x000F, 0x000F], ] shade_16 = [ [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x07F8, 0x0804, 0x0894, 0x0984, 0x0984, 0x0894, 0x0804, 0x07F8], [0x07F8, 0x0FFC, 0x0F6C, 0x0E7C, 0x0E7C, 0x0F6C, 0x0FFC, 0x07F8], [0x01E0, 0x03F0, 0x07F0, 0x0FE0, 0x07F0, 0x03F0, 0x01E0, 0x0000], [0x0080, 0x01C0, 0x03E0, 0x07F0, 0x03E0, 0x01C0, 0x0080, 0x0000], [0x01C0, 0x01C0, 0x09F0, 0x0E38, 0x0E38, 0x09F0, 0x01C0, 0x01C0], [0x00C0, 0x01E0, 0x09F0, 0x0FF8, 0x0FF8, 0x09F0, 0x01E0, 0x00C0], [0x0000, 0x0000, 0x0180, 0x03C0, 0x03C0, 0x0180, 0x0000, 0x0000], [0xFFFF, 0xFFFF, 0xFE7F, 0xFC3F, 0xFC3F, 0xFE7F, 0xFFFF, 0xFFFF], [0x0000, 0x03C0, 0x0660, 0x0420, 0x0420, 0x0660, 0x03C0, 0x0000], [0xFFFF, 0xFC3F, 0xF99F, 0xFBDF, 0xFBDF, 0xF99F, 0xFC3F, 0xFFFF], [0x0780, 0x0FC0, 0x0860, 0x0874, 0x0FDC, 0x078C, 0x003C, 0x0000], [0x0000, 0x0278, 0x02FC, 0x0F84, 0x0F84, 0x02FC, 0x0278, 0x0000], [0x0C00, 0x0E00, 0x0FFC, 0x07FC, 0x0014, 0x0014, 0x001C, 0x001C], [0x1C00, 0x1FFC, 0x0FFC, 0x0014, 0x0014, 0x0E14, 0x0FFC, 0x07FC], [0x02A0, 0x02A0, 0x01C0, 0x0F78, 0x0F78, 0x01C0, 0x02A0, 0x02A0], [0xFFFF, 0xFFFF, 0xFFFF, 0xF81F, 0xF00F, 0xE007, 0xE007, 0xE007], [0xE007, 0xE007, 0xE007, 0xF00F, 0xF81F, 0xFFFF, 0xFFFF, 0xFFFF], [0x007F, 0x007F, 0x003E, 0x0000, 0x0000, 0x003E, 0x007F, 0x007F], [0x0000, 0x0DFC, 0x0DFC, 0x0000, 0x0000, 0x0DFC, 0x0DFC, 0x0000], [0xFF80, 0xFF80, 0xFFC0, 0xFFC0, 0xFFE0, 0xFFC0, 0xFFC0, 0xFF80], [0xFF00, 0xFF00, 0xFE00, 0xFE00, 0xFC00, 0xFE00, 0xFE00, 0xFF00], [0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0F00, 0x0000], [0x0000, 0x0910, 0x0B18, 0x0FFC, 0x0FFC, 0x0B18, 0x0910, 0x0000], [0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFF7F, 0xFE1E, 0xF800, 0xE000], [0xE000, 0xF800, 0xFE1E, 0xFF7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF], [0x0080, 0x0080, 0x0080, 0x02A0, 0x03E0, 0x01C0, 0x0080, 0x0000], [0x0080, 0x01C0, 0x03E0, 0x02A0, 0x0080, 0x0080, 0x0080, 0x0000], [0x03C0, 0x03C0, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0000], [0xFF80, 0xFF80, 0x7F00, 0x0000, 0x0000, 0x7F00, 0xFF80, 0xFF80], [0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFEFF, 0x7C7F, 0x101F, 0x0007], [0x0007, 0x001F, 0x787F, 0xFEFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF], [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x180C, 0x1BFC, 0x180C, 0x0000, 0x0000], [0x0000, 0x000E, 0x001E, 0x0000, 0x0000, 0x001E, 0x000E, 0x0000], [0x0000, 0x0660, 0x1FF8, 0x0660, 0x0660, 0x1FF8, 0x0660, 0x0000], [0x0000, 0x01F8, 0x1998, 0x3FFC, 0x3FFC, 0x1998, 0x1F80, 0x0000], [0x0C30, 0x0630, 0x0300, 0x0180, 0x00C0, 0x0C60, 0x0C30, 0x0000], [0x0000, 0x1F80, 0x19F8, 0x1998, 0x1998, 0x19F8, 0x3F80, 0x1800], [0x0000, 0x0010, 0x001E, 0x000E, 0x0000, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x03F0, 0x07F8, 0x0C0C, 0x0804, 0x0000, 0x0000], [0x0000, 0x0000, 0x0804, 0x0C0C, 0x07F8, 0x03F0, 0x0000, 0x0000], [0x0080, 0x02A0, 0x03E0, 0x01C0, 0x01C0, 0x03E0, 0x02A0, 0x0080], [0x0000, 0x0080, 0x0080, 0x03E0, 0x03E0, 0x0080, 0x0080, 0x0000], [0x0000, 0x0000, 0x1000, 0x1E00, 0x0E00, 0x0000, 0x0000, 0x0000], [0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0000], [0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0000, 0x0380, 0x0380, 0x0000, 0x0000, 0x0000], [0x0000, 0x1FFC, 0x180C, 0x18CC, 0x18CC, 0x180C, 0x1FFC, 0x0000], [0x0000, 0x0000, 0x180C, 0x180C, 0x1FFC, 0x1800, 0x1800, 0x0000], [0x0000, 0x1FCC, 0x18CC, 0x18CC, 0x18CC, 0x00CC, 0x00FC, 0x0000], [0x0000, 0x00CC, 0x00CC, 0x18CC, 0x18CC, 0x18CC, 0x1FFC, 0x0000], [0x0000, 0x0C00, 0x0F00, 0x0DC0, 0x0C70, 0x0C1C, 0x1FFC, 0x0C00], [0x0000, 0x00FC, 0x00CC, 0x18CC, 0x18CC, 0x18CC, 0x1FCC, 0x0000], [0x0000, 0x1FFC, 0x18CC, 0x18CC, 0x18CC, 0x18C0, 0x1FC0, 0x0000], [0x0000, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x1FFC, 0x0000], [0x0000, 0x1FBC, 0x18CC, 0x18CC, 0x18CC, 0x18CC, 0x1F7C, 0x0000], [0x0000, 0x01FC, 0x018C, 0x198C, 0x198C, 0x198C, 0x1FFC, 0x0000], [0x0000, 0x0000, 0x0000, 0x0630, 0x0630, 0x0000, 0x0000, 0x0000], [0x0000, 0x0000, 0x0800, 0x0E30, 0x0630, 0x0000, 0x0000, 0x0000], [0x0000, 0x0080, 0x01C0, 0x0360, 0x0630, 0x0C18, 0x0808, 0x0000], [0x0000, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0000], [0x0000, 0x0808, 0x0C18, 0x0630, 0x0360, 0x01C0, 0x0080, 0x0000], [0x0018, 0x001C, 0x0004, 0x0DC4, 0x0DE4, 0x003C, 0x0018, 0x0000], [0x0000, 0x01FC, 0x018C, 0x198C, 0x19CC, 0x180C, 0x1FFC, 0x0000], [0x0000, 0x1F80, 0x1980, 0x1998, 0x1998, 0x1998, 0x1FF8, 0x0000], [0x0000, 0x1FFC, 0x1818, 0x1818, 0x1818, 0x1818, 0x1FF8, 0x0000], [0x0000, 0x1FF8, 0x1818, 0x1818, 0x1818, 0x0018, 0x0018, 0x0000], [0x0000, 0x1FF8, 0x1818, 0x1818, 0x1818, 0x1818, 0x1FFC, 0x0000], [0x0000, 0x1FF8, 0x1998, 0x1998, 0x1998, 0x0198, 0x0198, 0x0000], [0x0000, 0x1FF8, 0x0198, 0x0198, 0x0198, 0x0198, 0x0198, 0x0000], [0x0000, 0x1FF8, 0x1818, 0x1818, 0x1818, 0x1818, 0x3FF8, 0x0000], [0x0000, 0x1FFC, 0x0018, 0x0018, 0x0018, 0x0018, 0x1FF8, 0x0000], [0x0000, 0x0000, 0x1818, 0x1818, 0x1FF8, 0x1818, 0x1818, 0x0000], [0x0000, 0x0018, 0x0018, 0x1818, 0x1818, 0x1818, 0x1FF8, 0x0000], [0x0000, 0x1FF8, 0x0180, 0x0180, 0x0180, 0x01F8, 0x1F00, 0x0000], [0x0000, 0x1FF8, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x0000], [0x0000, 0x1FF8, 0x0018, 0x0030, 0x0030, 0x0018, 0x1FF8, 0x0000], [0x0000, 0x1FF8, 0x0018, 0x0018, 0x0018, 0x0018, 0x1FF8, 0x0000], [0x0000, 0x1FF8, 0x1818, 0x1818, 0x1818, 0x1818, 0x1FF8, 0x0000], [0x0000, 0x3FF8, 0x1818, 0x1818, 0x1818, 0x1818, 0x1FF8, 0x0000], [0x0000, 0x1FF8, 0x1818, 0x1818, 0x1818, 0x1818, 0x3FF8, 0x1800], [0x0000, 0x1FF8, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0000], [0x0000, 0x01F8, 0x0198, 0x1998, 0x1998, 0x1980, 0x1F80, 0x0000], [0x0000, 0x1FF8, 0x18C0, 0x18C0, 0x18C0, 0x1800, 0x1800, 0x0000], [0x0000, 0x1FF8, 0x1800, 0x1800, 0x1800, 0x1800, 0x1FF8, 0x0000], [0x0000, 0x07F8, 0x0C00, 0x1800, 0x1800, 0x0C00, 0x07F8, 0x0000], [0x0000, 0x1FF8, 0x1800, 0x0C00, 0x0C00, 0x1800, 0x1FF8, 0x0000], [0x0000, 0x1F78, 0x0180, 0x0180, 0x0180, 0x0180, 0x1EF8, 0x0000], [0x0000, 0x1FF8, 0x1800, 0x1800, 0x1800, 0x1800, 0x3FF8, 0x0000], [0x0000, 0x1F80, 0x1980, 0x1998, 0x1998, 0x0198, 0x01F8, 0x0000], [0x0000, 0x0000, 0x0000, 0x300C, 0x300C, 0x3FFC, 0x0000, 0x0000], [0x0038, 0x0070, 0x00E0, 0x01C0, 0x0380, 0x0700, 0x0E00, 0x0000], [0x0000, 0x0000, 0x0000, 0x3FFC, 0x300C, 0x300C, 0x0000, 0x0000], [0x0008, 0x000C, 0x0006, 0x0003, 0x0006, 0x000C, 0x0008, 0x0000], [0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000], [0x0000, 0x0000, 0x0002, 0x0006, 0x000C, 0x0008, 0x0000, 0x0000], [0x0000, 0x1F00, 0x1B00, 0x1B60, 0x1B60, 0x1B60, 0x1FE0, 0x0000], [0x0000, 0x1FF0, 0x1860, 0x1860, 0x1860, 0x1860, 0x1FE0, 0x0000], [0x0000, 0x1FE0, 0x1860, 0x1860, 0x1860, 0x0060, 0x0060, 0x0000], [0x0000, 0x1FE0, 0x1860, 0x1860, 0x1860, 0x1860, 0x1FF0, 0x0000], [0x0000, 0x1FE0, 0x1B60, 0x1B60, 0x1B60, 0x0360, 0x0360, 0x0000], [0x0000, 0x1FE0, 0x0360, 0x0360, 0x0360, 0x0360, 0x0360, 0x0000], [0x0000, 0x1FE0, 0x1860, 0x1860, 0x1860, 0x1860, 0x3FE0, 0x0000], [0x0000, 0x1FF0, 0x0060, 0x0060, 0x0060, 0x0060, 0x1FE0, 0x0000], [0x0000, 0x0000, 0x1860, 0x1860, 0x1FE0, 0x1860, 0x1860, 0x0000], [0x0000, 0x0060, 0x0060, 0x1860, 0x1860, 0x1860, 0x1FE0, 0x0000], [0x0000, 0x1FE0, 0x0300, 0x0300, 0x0300, 0x03E0, 0x1F00, 0x0000], [0x0000, 0x1FE0, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x0000], [0x0000, 0x1FE0, 0x0060, 0x00C0, 0x00C0, 0x0060, 0x1FE0, 0x0000], [0x0000, 0x1FE0, 0x0060, 0x0060, 0x0060, 0x0060, 0x1FE0, 0x0000], [0x0000, 0x1FE0, 0x1860, 0x1860, 0x1860, 0x1860, 0x1FE0, 0x0000], [0x0000, 0x3FE0, 0x1860, 0x1860, 0x1860, 0x1860, 0x1FE0, 0x0000], [0x0000, 0x1FE0, 0x1860, 0x1860, 0x1860, 0x1860, 0x3FE0, 0x1800], [0x0000, 0x1FE0, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0000], [0x0000, 0x03E0, 0x0360, 0x1B60, 0x1B60, 0x1B00, 0x1F00, 0x0000], [0x0000, 0x1FE0, 0x1980, 0x1980, 0x1980, 0x1800, 0x1800, 0x0000], [0x0000, 0x1FE0, 0x1800, 0x1800, 0x1800, 0x1800, 0x1FE0, 0x0000], [0x0000, 0x07E0, 0x0C00, 0x1800, 0x1800, 0x0C00, 0x07E0, 0x0000], [0x0000, 0x1FE0, 0x1800, 0x0C00, 0x0C00, 0x1800, 0x1FE0, 0x0000], [0x0000, 0x1EE0, 0x0300, 0x0300, 0x0300, 0x0300, 0x1DE0, 0x0000], [0x0000, 0x1FE0, 0x1800, 0x1800, 0x1800, 0x1800, 0x3FE0, 0x0000], [0x0000, 0x1F00, 0x1B00, 0x1B60, 0x1B60, 0x0360, 0x03E0, 0x0000], [0x0000, 0x0040, 0x0040, 0x07F8, 0x0FBC, 0x0804, 0x0804, 0x0000], [0x0000, 0x0000, 0x0000, 0x0FFC, 0x0FFC, 0x0000, 0x0000, 0x0000], [0x0000, 0x0804, 0x0804, 0x0FBC, 0x07F8, 0x0040, 0x0040, 0x0000], [0x0004, 0x0006, 0x0002, 0x0006, 0x0004, 0x0006, 0x0002, 0x0000], ]
40,840
https://github.com/echoghi/calorie-tracker/blob/master/src/app/components/Nutrition/index.tsx
Github Open Source
Open Source
MIT
null
calorie-tracker
echoghi
TypeScript
Code
536
1,864
import React, { useState, useEffect } from 'react'; import { connect } from 'react-redux'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import Loading from '../Loading'; import { useWindowSize } from '@echoghi/hooks'; import isEmpty from 'lodash.isempty'; import moment from 'moment'; import Bar from '../ProgressBar/Bar'; import MealTable from './MealTable'; import MealForm from './MealForm'; import Notes from '../Notes'; import { NutritionWrapper, HeaderWrapper, HeaderContent, NavIcon, Overview, Box, BoxHeader, Grams, Content } from './styles'; import { RootState, ProgressBarConfig, Day, UserData } from '../types'; import { parseUrlDay } from '../Calendar/utils'; const progressBarConfig: ProgressBarConfig = { calories: { color: '#ffab3e', trailColor: '#FFE9C6' }, carbs: { color: '#5b6aee', trailColor: '#D0D4FA' }, fat: { color: '#f08ec1', trailColor: '#FCDFED' }, protein: { color: '#32c9d5', trailColor: '#E6FDF3' } }; const mapStateToProps = (state: RootState) => ({ data: state.adminState.data, loading: state.adminState.loading, userData: state.adminState.userData, userLoading: state.adminState.userLoading }); const dayShape: Day = { day: moment(), nutrition: { calories: 0, carbs: 0, fat: 0, protein: 0 } }; interface NutritionProps extends RouteComponentProps { data: UserData; } const Nutrition = ({ data, history }: NutritionProps) => { const [day, setDay] = useState(dayShape); const [dayIndex, setDayIndex] = useState(0); const [today, setToday] = useState(true); const { width } = useWindowSize(); // will read the url and set today to true/false function isToday() { let date = moment(); if (location.search) { date = parseUrlDay(); setToday(moment().isSame(date, 'day')); } else if (today) { setToday(true); } } useEffect(() => { window.scrollTo(0, 0); isToday(); }, []); const loadDay = (date: moment.Moment = moment()) => { if (location.search) { date = parseUrlDay(); setToday(moment().isSame(date, 'day')); } else { setToday(true); } // save the queried day to state for (let i = 0; i < data.calendar.length; i++) { if (data.calendar[i].day.isSame(date, 'day')) { setDay(data.calendar[i]); setDayIndex(+i); return; } } }; // fetch data when requested date changes useEffect(() => { loadDay(); }); function ProgressBar({ type }: { type: 'calories' | 'protein' | 'fat' | 'carbs' }) { const { trailColor, color } = progressBarConfig[type]; const progress: number = day.nutrition[type] / data.user.goals[type]; const text: string = `${Math.round((day.nutrition[type] / data.user.goals[type]) * 100)}% of daily goal`; const options = { className: '', color, containerStyle: { margin: '30px auto', width: '80%' }, height: 25, text, trailColor }; return <Bar progress={progress} options={options} />; } function goToToday() { setToday(true); history.push({ pathname: '/nutrition', search: '' }); } function navigateDayBack() { const date = location.search ? parseUrlDay().subtract(1, 'days') : moment().subtract(1, 'days'); history.push(`/nutrition?d=${date.format('x')}`); } function navigateDayForward() { if (location.search) { const newDate = parseUrlDay().add(1, 'days'); if (newDate.isSame(moment(), 'day')) { history.push({ pathname: '/nutrition', search: '' }); } else { history.push(`/nutrition?d=${newDate.format('x')}`); } } } function rewind() { setToday(false); history.push(`/nutrition?d=${data.calendar[0].day.format('x')}`); } if (isEmpty(day)) { return <Loading />; } const { protein, carbs, fat } = day.nutrition; return ( <NutritionWrapper> <HeaderWrapper> <HeaderContent> <h1>Nutrition</h1> </HeaderContent> <HeaderContent> <NavIcon className="icon-chevrons-left" active={dayIndex !== 0} onClick={rewind} /> <NavIcon className="icon-chevron-left" onClick={navigateDayBack} active={dayIndex !== 0} /> <h3>{!isEmpty(day.day) ? day.day.format('dddd, MMMM Do, YYYY') : ''}</h3> <NavIcon className="icon-chevron-right" active={!today} onClick={navigateDayForward} /> <NavIcon className="icon-chevrons-right" active={!today} onClick={goToToday} /> </HeaderContent> </HeaderWrapper> <Overview> <Box> <BoxHeader> <h1>{protein}</h1> <Grams>g</Grams> <h3>Protein</h3> </BoxHeader> <ProgressBar type="protein" /> </Box> <Box> <BoxHeader> <h1>{carbs}</h1> <Grams>g</Grams> <h3>{width < 768 ? 'Carbs' : 'Carbohydrates'}</h3> </BoxHeader> <ProgressBar type="carbs" /> </Box> <Box> <BoxHeader> <h1>{fat}</h1> <Grams>g</Grams> <h3>Fat</h3> </BoxHeader> <ProgressBar type="fat" /> </Box> </Overview> <Content> <Notes day={day} index={dayIndex} /> <MealForm day={day} index={dayIndex} /> </Content> <MealTable day={day} index={dayIndex} /> </NutritionWrapper> ); }; export default withRouter(connect(mapStateToProps)(Nutrition));
49,665
https://github.com/ReyhanPatria/OpenMetadata/blob/master/ingestion/src/airflow_provider_openmetadata/__init__.py
Github Open Source
Open Source
Apache-2.0
2,021
OpenMetadata
ReyhanPatria
Python
Code
16
74
import metadata def get_provider_config(): return { "name": "OpenMetadata", "description": "OpenMetadata <https://open-metadata.org/>", "package-name": "openmetadata-ingestion", "version": "0.4.1", }
25,357
https://github.com/jstanden/cerb6/blob/master/features/cerberusweb.core/patches/10.x/10.2.0.php
Github Open Source
Open Source
Naumen, Condor-1.1, MS-PL
null
cerb6
jstanden
PHP
Code
2,888
12,499
<?php /** @noinspection SqlResolve */ $db = DevblocksPlatform::services()->database(); $queue = DevblocksPlatform::services()->queue(); $logger = DevblocksPlatform::services()->log(); $tables = $db->metaTables(); // =========================================================================== // Add `queue` table if(!isset($tables['queue'])) { $sql = sprintf(" CREATE TABLE `queue` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL DEFAULT '', `created_at` int(10) unsigned NOT NULL DEFAULT 0, `updated_at` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (id), UNIQUE (name), INDEX (updated_at) ) ENGINE=%s ", APP_DB_ENGINE); $db->ExecuteMaster($sql) or die("[MySQL Error] " . $db->ErrorMsgMaster()); $tables['queue'] = 'queue'; } // =========================================================================== // Add `queue_message` table if(!isset($tables['queue_message'])) { $sql = sprintf(" CREATE TABLE `queue_message` ( `uuid` binary(16), `queue_id` int(10) unsigned NOT NULL, `status_id` tinyint unsigned NOT NULL DEFAULT 0, `status_at` int unsigned NOT NULL DEFAULT 0, `consumer_id` binary(16), `message` TEXT, PRIMARY KEY (uuid), INDEX queue_claimed (queue_id, status_id, consumer_id) ) ENGINE=%s ", APP_DB_ENGINE); $db->ExecuteMaster($sql) or die("[MySQL Error] " . $db->ErrorMsgMaster()); $tables['queue_message'] = 'queue_message'; } // =========================================================================== // Add new queues if(!$db->GetOneMaster("SELECT 1 FROM queue WHERE name = 'cerb.update.migrations'")) { // Configure the scheduler job $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.migrations', 'enabled', '1')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.migrations', 'duration', '5')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.migrations', 'term', 'm')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.migrations', 'lastrun', '0')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.migrations', 'locked', '0')"); // Add default queues $db->ExecuteWriter("INSERT IGNORE INTO queue (name, created_at, updated_at) VALUES ('cerb.update.migrations', UNIX_TIMESTAMP(), UNIX_TIMESTAMP())"); } // =========================================================================== // Add new automation events if(!$db->GetOneMaster("SELECT 1 FROM automation_event WHERE name = 'worker.authenticated'")) { $db->ExecuteMaster(sprintf('INSERT IGNORE INTO automation_event (name, extension_id, description, automations_kata, updated_at) VALUES (%s,%s,%s,%s,%d)', $db->qstr('worker.authenticated'), $db->qstr('cerb.trigger.worker.authenticated'), $db->qstr('After a worker has authenticated a new session'), $db->qstr(''), time() )); } if(!$db->GetOneMaster("SELECT 1 FROM automation_event WHERE name = 'worker.authenticate.failed'")) { $db->ExecuteMaster(sprintf('INSERT IGNORE INTO automation_event (name, extension_id, description, automations_kata, updated_at) VALUES (%s,%s,%s,%s,%d)', $db->qstr('worker.authenticate.failed'), $db->qstr('cerb.trigger.worker.authenticate.failed'), $db->qstr('After a worker has failed to authenticate a new session'), $db->qstr(''), time() )); } if(!$db->GetOneMaster("SELECT 1 FROM automation_event WHERE name = 'mail.reply.validate'")) { $db->ExecuteMaster(sprintf('INSERT IGNORE INTO automation_event (name, extension_id, description, automations_kata, updated_at) VALUES (%s,%s,%s,%s,%d)', $db->qstr('mail.reply.validate'), $db->qstr('cerb.trigger.mail.reply.validate'), $db->qstr('Validate before a worker starts a new reply'), $db->qstr("automation/recentActivity:\n uri: cerb:automation:cerb.reply.recentActivity\n inputs:\n message@key: message_id\n disabled@bool: no\n\n"), time() )); } if(!$db->GetOneMaster("SELECT 1 FROM automation_event WHERE name = 'record.profile.viewed'")) { $db->ExecuteMaster(sprintf('INSERT IGNORE INTO automation_event (name, extension_id, description, automations_kata, updated_at) VALUES (%s,%s,%s,%s,%d)', $db->qstr('record.profile.viewed'), $db->qstr('cerb.trigger.record.profile.viewed'), $db->qstr('After a record profile is viewed by a worker'), $db->qstr(""), time() )); } // =========================================================================== // Add new toolbars if(!$db->GetOneMaster("SELECT 1 FROM toolbar WHERE name = 'global.search'")) { $db->ExecuteMaster(sprintf('INSERT IGNORE INTO toolbar (name, extension_id, description, toolbar_kata, created_at, updated_at) VALUES (%s,%s,%s,%s,%d,%d)', $db->qstr('global.search'), $db->qstr('cerb.toolbar.global.search'), $db->qstr('Searching from the top right of any page'), $db->qstr(''), time(), time() )); } // =========================================================================== // Add `automation_resource` if(!isset($tables['automation_resource'])) { $sql = sprintf(" CREATE TABLE `automation_resource` ( id int(10) unsigned NOT NULL AUTO_INCREMENT, token varchar(255) NOT NULL DEFAULT '', mime_type varchar(255) NOT NULL DEFAULT '', expires_at int(10) unsigned NOT NULL DEFAULT '0', storage_size int(10) unsigned NOT NULL DEFAULT '0', storage_key varchar(255) NOT NULL DEFAULT '', storage_extension varchar(255) NOT NULL DEFAULT '', storage_profile_id int(10) unsigned NOT NULL DEFAULT '0', updated_at int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (id), UNIQUE KEY `token` (`token`(6)), KEY `expires_at` (`expires_at`), KEY `storage_extension` (`storage_extension`), KEY `updated_at` (`updated_at`) ) ENGINE=%s ", APP_DB_ENGINE); $db->ExecuteMaster($sql) or die("[MySQL Error] " . $db->ErrorMsgMaster()); $tables['automation_resource'] = 'automation_resource'; } // =========================================================================== // Update built-in automations $automation_files = [ 'ai.cerb.automationBuilder.json', 'ai.cerb.automationBuilder.action.dataQuery.json', 'ai.cerb.automationBuilder.action.function.json', 'ai.cerb.automationBuilder.action.httpRequest.json', 'ai.cerb.automationBuilder.action.metricIncrement.json', 'ai.cerb.automationBuilder.action.recordCreate.json', 'ai.cerb.automationBuilder.action.recordDelete.json', 'ai.cerb.automationBuilder.action.recordSearch.json', 'ai.cerb.automationBuilder.action.recordUpdate.json', 'ai.cerb.automationBuilder.action.recordUpsert.json', 'ai.cerb.automationBuilder.input.text.json', 'ai.cerb.automationBuilder.interaction.worker.await.promptEditor.json', 'ai.cerb.automationBuilder.interaction.worker.await.promptSheet.json', 'ai.cerb.automationBuilder.interaction.worker.await.promptText.json', 'ai.cerb.cardEditor.automation.triggerChooser.json', 'ai.cerb.editor.mapBuilder.json', 'ai.cerb.editor.toolbar.markdownLink.json', 'ai.cerb.eventHandler.automation.json', 'ai.cerb.eventHandler.automation.mail.received.json', 'ai.cerb.interaction.search.json', 'ai.cerb.metricBuilder.dimension.json', 'ai.cerb.metricBuilder.help.json', 'ai.cerb.toolbarBuilder.interaction.json', 'cerb.data.platform.extension.points.json', 'cerb.data.records.json', 'cerb.mailRouting.moveToGroup.json', 'cerb.mailRouting.recipientRules.json', 'cerb.projectBoard.toolbar.task.find.json', 'cerb.reminder.remind.email.json', 'cerb.reminder.remind.notification.json', 'cerb.reply.recentActivity.json', 'cerb.ticket.move.json', 'cerb.ticket.participants.manage.json', ]; foreach($automation_files as $automation_file) { $path = realpath(APP_PATH . '/features/cerberusweb.core/assets/automations/') . '/' . $automation_file; if(!file_exists($path) || false === ($automation_data = json_decode(file_get_contents($path), true))) continue; DAO_Automation::importFromJson($automation_data); unset($automation_data); } // =========================================================================== // Add `metric` table if(!isset($tables['metric'])) { $sql = sprintf(" CREATE TABLE `metric` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL DEFAULT '', `type` varchar(128) NOT NULL DEFAULT '', `description` varchar(128) NOT NULL DEFAULT '', `dimensions_kata` mediumtext, `created_at` int(10) unsigned NOT NULL DEFAULT 0, `updated_at` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (id), UNIQUE (name), INDEX (updated_at) ) ENGINE=%s ", APP_DB_ENGINE); $db->ExecuteMaster($sql) or die("[MySQL Error] " . $db->ErrorMsgMaster()); $tables['metric'] = 'metric'; // Configure the scheduler job $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.metrics', 'enabled', '1')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.metrics', 'duration', '1')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.metrics', 'term', 'm')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.metrics', 'lastrun', '0')"); $db->ExecuteMaster("REPLACE INTO cerb_property_store (extension_id, property, value) VALUES ('cron.metrics', 'locked', '0')"); // Add default queues $db->ExecuteWriter("INSERT IGNORE INTO queue (name, created_at, updated_at) VALUES ('cerb.metrics.publish', UNIX_TIMESTAMP(), UNIX_TIMESTAMP())"); } else { list($columns,) = $db->metaTable('metric'); if(!array_key_exists('type', $columns)) { $db->ExecuteMaster("ALTER TABLE metric ADD COLUMN type VARCHAR(128) NOT NULL DEFAULT ''"); $db->ExecuteMaster("UPDATE metric SET type = 'gauge' WHERE name IN ('cerb.tickets.open','cerb.workers.active')"); $db->ExecuteMaster("UPDATE metric SET type = 'counter' WHERE type = ''"); } } // =========================================================================== // Add `metric_dimension` table if(!isset($tables['metric_dimension'])) { $sql = sprintf(" CREATE TABLE `metric_dimension` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (id), UNIQUE (name) ) ENGINE=%s ", APP_DB_ENGINE); $db->ExecuteMaster($sql) or die("[MySQL Error] " . $db->ErrorMsgMaster()); $tables['metric_dimension'] = 'metric_dimension'; } // =========================================================================== // Add `metric_value` table if(!isset($tables['metric_value'])) { $sql = sprintf(" CREATE TABLE `metric_value` ( `metric_id` int unsigned NOT NULL, `granularity` mediumint unsigned NOT NULL DEFAULT 0, `bin` int unsigned NOT NULL DEFAULT 0, `samples` mediumint NOT NULL DEFAULT 0, `sum` decimal(22,4) NOT NULL DEFAULT 0, `min` decimal(22,4) NOT NULL DEFAULT 0, `max` decimal(22,4) NOT NULL DEFAULT 0, `dim0_value_id` int unsigned NOT NULL DEFAULT 0, `dim1_value_id` int unsigned NOT NULL DEFAULT 0, `dim2_value_id` int unsigned NOT NULL DEFAULT 0, `expires_at` int unsigned NOT NULL DEFAULT 0, PRIMARY KEY (metric_id, granularity, bin, dim0_value_id, dim1_value_id, dim2_value_id), INDEX metric_dim0 (metric_id, granularity, dim0_value_id, dim1_value_id, dim2_value_id), INDEX metric_dim1 (metric_id, granularity, bin, dim1_value_id, dim2_value_id), INDEX metric_dim2 (metric_id, granularity, bin, dim2_value_id), INDEX (expires_at) ) ENGINE=%s ", APP_DB_ENGINE); $db->ExecuteMaster($sql) or die("[MySQL Error] " . $db->ErrorMsgMaster()); $tables['metric_value'] = 'metric_value'; } else { list(, $indexes) = $db->metaTable('metric_value'); if(!array_key_exists('metric_dim0', $indexes)) { $db->ExecuteMaster("ALTER TABLE metric_value ADD INDEX metric_dim0 (metric_id, granularity, dim0_value_id, dim1_value_id, dim2_value_id)"); } } // =========================================================================== // Add default metrics $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.automation.invocations'), $db->qstr('Invocation count by automation and trigger'), $db->qstr('counter'), $db->qstr("record/automation_id:\n record_type: automation\nextension/trigger:"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.automation.duration'), $db->qstr('Invocation duration by automation and trigger'), $db->qstr('counter'), $db->qstr("record/automation_id:\n record_type: automation\nextension/trigger:"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.webhook.invocations'), $db->qstr('Invocation count by webhook and client IP'), $db->qstr('counter'), $db->qstr("record/webhook_id:\n record_type: webhook_listener\ntext/client_ip:"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.record.search'), $db->qstr('Search popup count by record type and worker'), $db->qstr('counter'), $db->qstr("text/record_type:\nrecord/worker_id:\n record_type: worker"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.workers.active'), $db->qstr('Seat usage by worker'), $db->qstr('gauge'), $db->qstr("record/worker_id:\n record_type: worker"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.tickets.open'), $db->qstr('Open ticket counts over time by group and bucket'), $db->qstr('gauge'), $db->qstr("record/group_id:\n record_type: group\nrecord/bucket_id:\n record_type: bucket"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.snippet.uses'), $db->qstr('Snippet usage by worker over time'), $db->qstr('counter'), $db->qstr("record/snippet_id:\n record_type: snippet\nrecord/worker_id:\n record_type: worker"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.behavior.invocations'), $db->qstr('Invocation count by behavior and event'), $db->qstr('counter'), $db->qstr("record/behavior_id:\n record_type: behavior\nextension/event:"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.behavior.duration'), $db->qstr('Invocation duration by behavior and event'), $db->qstr('counter'), $db->qstr("record/behavior_id:\n record_type: behavior\nextension/event:"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.mail.transport.deliveries'), $db->qstr('Successful outbound mail deliveries by transport and sender email'), $db->qstr('counter'), $db->qstr("record/transport_id:\n record_type: mail_transport\nrecord/sender_id:\n record_type: address"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.mail.transport.failures'), $db->qstr('Unsuccessful outbound mail deliveries by transport and sender email'), $db->qstr('counter'), $db->qstr("record/transport_id:\n record_type: mail_transport\nrecord/sender_id:\n record_type: address"), time(), time() )); $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric (name, description, type, dimensions_kata, created_at, updated_at) ". "VALUES (%s, %s, %s, %s, %d, %d)", $db->qstr('cerb.tickets.open.elapsed'), $db->qstr('Time elapsed in the open status for tickets by group and bucket'), $db->qstr('counter'), $db->qstr("record/group_id:\n record_type: group\nrecord/bucket_id:\n record_type: bucket"), time(), time() )); // =========================================================================== // Migrate `snippet_use_history` to metric if(array_key_exists('snippet_use_history', $tables)) { $metric_id = $db->GetOneMaster("SELECT id FROM metric WHERE name = 'cerb.snippet.uses'"); if($metric_id) { /** @noinspection SqlResolve */ $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric_value (metric_id, granularity, bin, samples, sum, min, max, dim0_value_id, dim1_value_id, dim2_value_id, expires_at) ". "SELECT %d, 86400, ts_day, 1, uses, uses, uses, snippet_id, worker_id, 0, 0 from snippet_use_history;", $metric_id )); } /** @noinspection SqlResolve */ $db->ExecuteWriter("DROP TABLE snippet_use_history"); unset($tables['snippet_use_history']); } // =========================================================================== // Migrate `trigger_event_history` to metric if(array_key_exists('trigger_event_history', $tables)) { $metric_id_invocations = $db->GetOneMaster("SELECT id FROM metric WHERE name = 'cerb.behavior.invocations'"); $metric_id_duration = $db->GetOneMaster("SELECT id FROM metric WHERE name = 'cerb.behavior.duration'"); // Insert behavior triggers as dimensions $db->ExecuteWriter("INSERT IGNORE INTO metric_dimension (name) SELECT DISTINCT event_point FROM trigger_event"); if($metric_id_invocations) { /** @noinspection SqlResolve */ $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric_value (metric_id, granularity, bin, samples, sum, min, max, dim0_value_id, dim1_value_id, dim2_value_id, expires_at) ". "SELECT %d, 86400, th.ts_day, 1, th.uses, th.uses, th.uses, th.trigger_id, (SELECT id FROM metric_dimension WHERE name = b.event_point), 0, 0 from trigger_event_history th inner join trigger_event b on (b.id=th.trigger_id)", $metric_id_invocations )); } if($metric_id_duration) { /** @noinspection SqlResolve */ $db->ExecuteWriter(sprintf("INSERT IGNORE INTO metric_value (metric_id, granularity, bin, samples, sum, min, max, dim0_value_id, dim1_value_id, dim2_value_id, expires_at) ". "SELECT %d, 86400, th.ts_day, 1, th.elapsed_ms, th.elapsed_ms, th.elapsed_ms, th.trigger_id, (SELECT id FROM metric_dimension WHERE name = b.event_point), 0, 0 from trigger_event_history th inner join trigger_event b on (b.id=th.trigger_id)", $metric_id_duration )); } /** @noinspection SqlResolve */ $db->ExecuteWriter("DROP TABLE trigger_event_history"); unset($tables['trigger_event_history']); } // =========================================================================== // Add stats widget to metric cards if(!$db->GetOneMaster("select 1 from card_widget where record_type = 'cerb.contexts.metric' and extension_id = 'cerb.card.widget.chart.timeseries' and name = 'Statistics'")) { $package_json = <<< 'EOD' { "package": {}, "records": [ { "uid": "card_widget_metric_stats", "_context": "cerb.contexts.card.widget", "name": "Statistics", "record_type": "cerb.contexts.metric", "extension_id": "cerb.card.widget.chart.timeseries", "pos": "1", "width_units": "4", "zone": "content", "extension_params": { "data_query": "type:metrics.timeseries\r\nrange:\"-24 hours to now\"\r\nperiod:hour\r\nseries.samples:(\r\n label:Samples\r\n metric:{{record_name}}\r\n function:count\r\n)\r\nseries.sum:(\r\n label:Sum\r\n metric:{{record_name}}\r\n function:sum\r\n)\r\nseries.avg:(\r\n label:Average\r\n metric:{{record_name}}\r\n function:avg\r\n)\r\nseries.min:(\r\n label:Min\r\n metric:{{record_name}}\r\n function:min\r\n)\r\nseries.avg:(\r\n label:Max\r\n metric:{{record_name}}\r\n function:max\r\n)\r\nformat:timeseries", "chart_as": "line", "xaxis_label": "", "yaxis_label": "", "yaxis_format": "number", "height": "", "options": { "show_legend": "1", "show_points": "1" } } } ] } EOD; try { $records_created = []; CerberusApplication::packages()->import($package_json, [], $records_created); } catch (Exception_DevblocksValidationError $e) { DevblocksPlatform::logError($e->getMessage()); } } else { $db->ExecuteMaster("UPDATE card_widget SET extension_params_json=replace(extension_params_json,'period:3600','period:hour') WHERE name = 'Statistics' AND record_type = 'cerb.contexts.metric' AND extension_params_json LIKE '%period:3600%'"); } // =========================================================================== // Add stats widget to automation cards if(!$db->GetOneMaster("select 1 from card_widget where record_type = 'cerb.contexts.automation' and extension_id = 'cerb.card.widget.chart.timeseries' and name = 'Statistics'")) { $package_json = <<< 'EOD' { "package": {}, "records": [ { "uid": "card_widget_automation_stats", "_context": "cerb.contexts.card.widget", "name": "Statistics", "record_type": "cerb.contexts.automation", "extension_id": "cerb.card.widget.chart.timeseries", "pos": "3", "width_units": "4", "zone": "content", "extension_params": { "data_query": "type:metrics.timeseries\r\nperiod:day\r\nrange:\"-7 days\"\r\nseries.invocations:(\r\n label:Invocations\r\n metric:cerb.automation.invocations\r\n function:sum\r\n missing:zero\r\n query:(\r\n automation_id:{{record_id}}\r\n )\r\n)\r\nseries.duration:(\r\n label:Duration\r\n metric:cerb.automation.duration\r\n function:sum\r\n missing:zero\r\n query:(\r\n automation_id:{{record_id}}\r\n )\r\n)\r\nformat:timeseries", "chart_as": "line", "xaxis_label": "", "yaxis_label": "", "yaxis_format": "number", "height": "", "options": { "show_legend": "1", "show_points": "1" } } } ] } EOD; try { $records_created = []; CerberusApplication::packages()->import($package_json, [], $records_created); } catch (Exception_DevblocksValidationError $e) { DevblocksPlatform::logError($e->getMessage()); } } // =========================================================================== // Add stats widget to mail transport cards if(!$db->GetOneMaster("select 1 from card_widget where record_type = 'cerberusweb.contexts.mail.transport' and extension_id = 'cerb.card.widget.chart.timeseries' and name = 'Outbound Email'")) { $package_json = <<< 'EOD' { "package": {}, "records": [ { "uid": "card_widget_transport", "_context": "cerb.contexts.card.widget", "name": "Outbound Email", "record_type": "cerberusweb.contexts.mail.transport", "extension_id": "cerb.card.widget.chart.timeseries", "pos": "2", "width_units": "4", "zone": "content", "extension_params": { "data_query": "type:metrics.timeseries\r\nperiod:hour\r\nrange:\"-24 hours\"\r\nseries.deliveries:(\r\n label:\"Deliveries\"\r\n metric:cerb.mail.transport.deliveries\r\n function:sum\r\n query:(transport_id:{{record_id}})\r\n)\r\nseries.failures:(\r\n label:\"Failures\"\r\n metric:cerb.mail.transport.failures\r\n function:sum\r\n query:(transport_id:{{record_id}})\r\n)\r\nformat:timeseries", "chart_as": "bar_stacked", "xaxis_label": "", "yaxis_label": "", "yaxis_format": "number", "height": "", "options": { "show_legend": "1", "show_points": "1" } } } ] } EOD; try { $records_created = []; CerberusApplication::packages()->import($package_json, [], $records_created); } catch (Exception_DevblocksValidationError $e) { DevblocksPlatform::logError($e->getMessage()); } } // =========================================================================== // Default tab/widgets for message profiles if(!$db->GetOneMaster("select 1 from profile_tab where context = 'cerberusweb.contexts.message' and name = 'Overview'")) { $package_json = <<< EOD { "package": { }, "records": [ { "uid": "profile_tab_msg_overview", "_context": "cerberusweb.contexts.profile.tab", "name": "Overview", "context": "message", "extension_id": "cerb.profile.tab.dashboard", "extension_params": { "layout": "sidebar_right" } }, { "uid": "profile_widget_msg_convo", "_context": "cerberusweb.contexts.profile.widget", "name": "Conversation", "profile_tab_id": "{{{uid.profile_tab_msg_overview}}}", "extension_id": "cerb.profile.tab.widget.ticket.convo", "pos": 1, "width_units": 4, "zone": "content", "extension_params": { "comments_mode": "0" } }, { "uid": "profile_widget_record_fields", "_context": "cerberusweb.contexts.profile.widget", "name": "Message", "profile_tab_id": "{{{uid.profile_tab_msg_overview}}}", "extension_id": "cerb.profile.tab.widget.fields", "pos": 1, "width_units": 4, "zone": "sidebar", "extension_params": { "context": "cerberusweb.contexts.message", "context_id": "{{record_id}}", "properties": [ [ "sender", "created", "response_time", "signed_key_fingerprint", "signed_at", "ticket", "was_encrypted", "worker" ] ], "toolbar_kata": "" } } ] } EOD; try { $records_created = []; CerberusApplication::packages()->import($package_json, [], $records_created); // Insert profile tab ID in devblocks_settings $db->ExecuteMaster(sprintf("INSERT IGNORE INTO devblocks_setting (plugin_id, setting, value) VALUES ('cerberusweb.core','profile:tabs:cerberusweb.contexts.message',%s)", $db->qstr(sprintf('[%d]', $records_created[CerberusContexts::CONTEXT_PROFILE_TAB]['profile_tab_msg_overview']['id'])) )); } catch (Exception_DevblocksValidationError $e) { DevblocksPlatform::logError($e->getMessage()); } } // =========================================================================== // Fix `custom_field` for older installs if(!isset($tables['custom_field'])) return FALSE; list($columns,) = $db->metaTable('custom_field'); if($columns['type'] && in_array(strtolower($columns['type']['type']), ['varchar(1)','char(1)'])) { $db->ExecuteMaster("ALTER TABLE custom_field MODIFY COLUMN type VARCHAR(255)"); } // =========================================================================== // Add `timezone` to calendars if(!isset($tables['calendar'])) return FALSE; list($columns,) = $db->metaTable('calendar'); if(!array_key_exists('timezone', $columns)) { $db->ExecuteMaster("ALTER TABLE calendar ADD COLUMN timezone varchar(128) not null default ''"); // Default worker-owned calendars to their timezone $db->ExecuteMaster("UPDATE calendar INNER JOIN worker ON (calendar.owner_context = 'cerberusweb.contexts.worker' AND calendar.owner_context_id=worker.id) SET calendar.timezone=worker.timezone"); } // =========================================================================== // Add `extension_kata` to resources if(!isset($tables['resource'])) return FALSE; list($columns,) = $db->metaTable('resource'); if(!array_key_exists('extension_kata', $columns)) { $db->ExecuteMaster("ALTER TABLE resource ADD COLUMN extension_kata TEXT AFTER extension_id"); } // =========================================================================== // Convert storage logo to a resource record $logo_id = $db->GetOneMaster("SELECT id FROM resource WHERE name = 'ui.logo'"); if(!$logo_id && file_exists(APP_STORAGE_PATH . '/logo')) { $image_stats = getimagesizefromstring(file_get_contents(APP_STORAGE_PATH . '/logo')); if($image_stats) { $logo_params = [ 'width' => $image_stats[0] ?? 0, 'height' => $image_stats[1] ?? 0, 'mime_type' => $image_stats['mime'] ?? '', ]; $db->ExecuteWriter( sprintf( "INSERT INTO resource (name, storage_size, storage_key, storage_extension, storage_profile_id, updated_at, description, extension_id, extension_kata, automation_kata, is_dynamic, expires_at) " . "VALUES (%s, %d, %s, %s, %d, %d, %s, %s, %s, %s, %d, %d)", $db->qstr('ui.logo'), 0, $db->qstr(''), $db->qstr(''), 0, time(), $db->qstr('The logo displayed in the top left of the UI'), $db->qstr('cerb.resource.image'), $db->qstr(DevblocksPlatform::services()->kata()->emit($logo_params)), $db->qstr(''), 0, 0 ) ); $logo_id = $db->LastInsertId(); if($logo_id) { $fp = fopen(APP_STORAGE_PATH . '/logo', 'rb'); $fp_stat = fstat($fp); $storage = new DevblocksStorageEngineDatabase(); $storage->setOptions([]); $storage_key = $storage->put('resources', $logo_id, $fp); $sql = sprintf("UPDATE resource SET storage_extension = %s, storage_key = %s, storage_size = %d WHERE id = %d", $db->qstr('devblocks.storage.engine.database'), $db->qstr($storage_key), $fp_stat['size'], $logo_id ); $db->ExecuteMaster($sql); fclose($fp); $db->ExecuteMaster("UPDATE IGNORE devblocks_setting SET value = UNIX_TIMESTAMP() WHERE setting = 'ui_user_logo_updated_at'"); $db->ExecuteMaster("DELETE FROM devblocks_setting WHERE setting = 'ui_user_logo_mimetype'"); } rename(APP_STORAGE_PATH . '/logo', APP_STORAGE_PATH . '/logo.old'); } } // =========================================================================== // Add `last_opened_at` and `last_opened_delta` to ticket if(!isset($tables['ticket'])) return FALSE; list($columns,) = $db->metaTable('ticket'); $changes = []; if(!array_key_exists('last_opened_at', $columns)) { $changes[] = 'ADD COLUMN last_opened_at INT UNSIGNED NOT NULL DEFAULT 0'; $changes[] = 'ADD INDEX last_opened_and_status (last_opened_at,status_id)'; } if(!array_key_exists('last_opened_delta', $columns)) { $changes[] = 'ADD COLUMN last_opened_delta INT UNSIGNED NOT NULL DEFAULT 0'; } if(!array_key_exists('elapsed_status_open', $columns)) { $changes[] = 'ADD COLUMN elapsed_status_open INT UNSIGNED NOT NULL DEFAULT 0'; $changes[] = 'ADD INDEX elapsed_status_open (elapsed_status_open)'; } if($changes) { $db->ExecuteMaster("ALTER TABLE ticket " . implode(', ', $changes)); // Prime the last_opened_delta field for all open tickets if( !array_key_exists('last_opened_at', $columns) || !array_key_exists('last_opened_delta', $columns) ) { $db->ExecuteMaster("update ticket set last_opened_at=created_date, last_opened_delta=created_date where status_id=0"); $db->ExecuteMaster("create temporary table _tmp_ticket_last_opened select ticket.id as ticket_id,ifnull((select max(created) from context_activity_log where activity_point in ('ticket.status.open','ticket.moved') and target_context = 'cerberusweb.contexts.ticket' and target_context_id=ticket.id),created_date) as created from ticket where status_id = 0"); $db->ExecuteMaster("alter table _tmp_ticket_last_opened add primary key (ticket_id)"); $db->ExecuteMaster("update ticket inner join _tmp_ticket_last_opened lo on (lo.ticket_id=ticket.id) set last_opened_delta=lo.created, last_opened_at=lo.created"); $db->ExecuteMaster("drop table _tmp_ticket_last_opened"); } if(!array_key_exists('elapsed_status_open', $columns)) { $ptr_ticket_id = $db->GetOneMaster('SELECT MAX(id) FROM ticket'); // Enqueue jobs for retroactively calculating the field $jobs = []; $limit = 25000; while($ptr_ticket_id > 0) { $jobs[] = [ 'job' => 'dao.ticket.rebuild.elapsed_status_open', 'params' => [ 'to_id' => intval($ptr_ticket_id), 'from_id' => intval(max($ptr_ticket_id - $limit,0)) ] ]; $ptr_ticket_id -= ($limit + 1); } if($jobs) { $queue->enqueue('cerb.update.migrations', $jobs); } } } // =========================================================================== // Update package library $packages = [ 'cerb_profile_tab_ticket_overview.json', 'cerb_profile_widget_ticket_actions.json', 'cerb_profile_widget_ticket_owner.json', 'cerb_profile_widget_ticket_status.json', ]; CerberusApplication::packages()->importToLibraryFromFiles($packages, APP_PATH . '/features/cerberusweb.core/packages/library/'); // =========================================================================== // Fix light/dark styles in widgets // Opp $db->ExecuteMaster("UPDATE profile_widget set extension_params_json = replace(extension_params_json,'color:rgb(100,100,100);','color:var(--cerb-color-background-contrast-100);') where profile_tab_id in (select id from profile_tab where context = 'cerberusweb.contexts.opportunity') and name IN ('Status')"); $db->ExecuteMaster("UPDATE profile_widget set extension_params_json = replace(extension_params_json,'color:rgb(102,172,87);','color:var(--cerb-color-tag-green);') where profile_tab_id in (select id from profile_tab where context = 'cerberusweb.contexts.opportunity') and name IN ('Status')"); $db->ExecuteMaster("UPDATE profile_widget set extension_params_json = replace(extension_params_json,'color:rgb(211,53,43);','color:var(--cerb-color-tag-red);') where profile_tab_id in (select id from profile_tab where context = 'cerberusweb.contexts.opportunity') and name IN ('Status')"); // Ticket $db->ExecuteMaster("UPDATE profile_widget set extension_params_json = replace(extension_params_json,'color:rgb(100,100,100);','color:var(--cerb-color-background-contrast-100);') where profile_tab_id in (select id from profile_tab where context = 'cerberusweb.contexts.ticket') and name IN ('Status','Owner')"); $db->ExecuteMaster("UPDATE profile_widget set extension_params_json = replace(extension_params_json,'color:rgb(150,150,150);','color:var(--cerb-color-background-contrast-150);') where profile_tab_id in (select id from profile_tab where context = 'cerberusweb.contexts.ticket') and name IN ('Status','Owner')"); $db->ExecuteMaster("UPDATE profile_widget set extension_params_json = replace(extension_params_json,'color:black;','color:var(--cerb-color-text);') where profile_tab_id in (select id from profile_tab where context = 'cerberusweb.contexts.ticket') and name IN ('Status','Owner')"); // =========================================================================== // Fix 'Time spent by' reports to use seconds vs mins if(array_key_exists('workspace_widget', $tables)) { $db->qstr("UPDATE workspace_widget SET params_json = replace(params_json, 'number.minutes', 'number.seconds') where extension_id = 'cerb.workspace.widget.chart.timeseries' and label like 'Time Spent by %'"); } // =========================================================================== // Add an `is_pinned` field to comments list($columns,) = $db->metaTable('comment'); if(!array_key_exists('is_pinned', $columns)) { $db->ExecuteMaster("ALTER TABLE comment ADD COLUMN is_pinned TINYINT NOT NULL DEFAULT 0"); } // =========================================================================== // Add `worker_view_model.params_timezone` if(!array_key_exists('worker_view_model', $tables)) { $logger->error("The 'worker_view_model' table does not exist."); return FALSE; } list($columns, $indexes) = $db->metaTable('worker_view_model'); if(!array_key_exists('params_timezone', $columns)) { $db->ExecuteMaster("ALTER TABLE worker_view_model ADD COLUMN params_timezone varchar(255) not null default ''"); } // =========================================================================== // Finish up return TRUE;
47,646
https://github.com/stjordanis/codecs/blob/master/src/uuid.test.ts
Github Open Source
Open Source
MIT
2,019
codecs
stjordanis
TypeScript
Code
73
224
import { runAndCatch } from '@carnesen/run-and-catch'; import { uuid } from './uuid'; import { cast } from './cast'; import { isRight } from 'fp-ts/lib/Either'; const validValue = '00000000-0000-0000-0000-000000000000'; describe(uuid.name, () => { it('validates a uuid', () => { const decoded = uuid.decode(validValue); expect(isRight(decoded)).toBe(true); expect((decoded as any).right).toBe(validValue); expect(cast(uuid, validValue)).toBe(validValue); }); it('throws a validation error if the input is bad', async () => { const ex = await runAndCatch(cast, uuid, '0-0'); expect(ex.message).toMatch(/invalid value.*uuid/i); }); });
47,473
https://github.com/sirio3mil/sql-parser/blob/master/app/Utilities/FileName.php
Github Open Source
Open Source
MIT
null
sql-parser
sirio3mil
PHP
Code
166
536
<?php /** * Created by PhpStorm. * User: reynier.delarosa * Date: 16/03/2018 * Time: 14:15 */ namespace App\Utilities; class FileName { protected $filename; protected const ROOT_FILE_FOLDER_NAME = "split"; public function __construct(string $type, string $object_name) { $this->SetFileName($type, $object_name); } protected function SetFileName(string $type, string $object_name): void { $extension = 'sql'; switch ($type) { case 'assembly': $this->filename = self::ROOT_FILE_FOLDER_NAME . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . ObjectName::RemoveBrackets($object_name) . '.' . $extension; break; default: $obj = ObjectName::GetCleanName($object_name); $this->filename = self::ROOT_FILE_FOLDER_NAME . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $obj->schema . DIRECTORY_SEPARATOR . $obj->name . '.' . $extension; } } protected function ValidateFolder(): void { if (file_exists($this->filename)) { if(!unlink($this->filename)){ throw new \Exception('Error deleting file: ' + $this->filename); } } else { $path = dirname($this->filename); if (!is_dir($path)) { if (!mkdir($path, 0777, true)) { throw new \Exception('Folder can not be created: ' + $path); } } } } public function SaveContent(string $content): void { $this->ValidateFolder(); $content = str_replace("¬","", str_replace("¬¬","\n", $content)); if(!file_put_contents($this->filename, $content)){ throw new \Exception('Error writing file: ' + $this->filename); } } }
236
https://github.com/japinol7/flask_examples/blob/master/flask_02_ex/app/utils/utils.py
Github Open Source
Open Source
MIT
2,020
flask_examples
japinol7
Python
Code
42
183
import logging logging.basicConfig(format='%(asctime)s %(levelname)s %(name)s: %(message)s') logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) def read_file_as_string(file_name): res = [] try: with open(file_name, "r", encoding='utf-8') as in_file: for line_in in in_file: res.append(line_in) except FileNotFoundError: logger.critical(f"Input file not found: {file_name}") except Exception: logger.critical(f"Error reading file: {file_name}") return ''.join(res)
45,040
https://github.com/MobileDev418/react_redux_master/blob/master/src/components/common/sidebar.js
Github Open Source
Open Source
MIT
2,019
react_redux_master
MobileDev418
JavaScript
Code
212
989
import React from 'react' const Icon = require('./Icon'); import {Grid, Col, Row} from 'react-bootstrap'; import SidebarControlBtn from './SidebarControlBtn'; class ApplicationSidebar extends React.Component { render() { return ( <div> <Grid fluid> <Row> <Col xs={12}> <div className='sidebar-header'>PAGES</div> <div className='sidebar-nav-container'> <SidebarNav style={{marginBottom: 0}}> <SidebarNavItem glyph='icon-fontello-gauge' name='Blank' href='/'/> <SidebarNavItem glyph='icon-feather-mail' name={<span>Menu <BLabel className='bg-darkgreen45 fg-white'>3</BLabel></span>}> <SidebarNav> <SidebarNavItem glyph='icon-feather-inbox' name='Inbox' href='#'/> <SidebarNavItem glyph='icon-outlined-mail-open' name='Mail' href='#'/> <SidebarNavItem glyph='icon-dripicons-message' name='Compose' href='#'/> </SidebarNav> </SidebarNavItem> </SidebarNav> </div> </Col> </Row> </Grid> </div> ); } } class DummySidebar extends React.Component { render() { return ( <Grid fluid> <Row> <Col xs={12}> <div className='sidebar-header'>DUMMY SIDEBAR</div> <LoremIpsum query='1p'/> </Col> </Row> </Grid> ); } } export default class extends React.Component { render() { return ( <div id='sidebar' {...this.props}> <div id='avatar'> <Grid fluid> <Row className='fg-white'> <Col xs={4} collapseRight> <img src='/imgs/avatars/avatar0.png' width='40' height='40'/> </Col> <Col xs={8} collapseLeft id='avatar-col'> <div style={{top: 23, fontSize: 16, lineHeight: 1, position: 'relative'}}>Anna Sanchez</div> <div> <Progress id='demo-progress' value={30} min={0} max={100} color='#ffffff'/> <a href='#'><Icon id='demo-icon' bundle='fontello' glyph='lock-5'/></a> </div> </Col> </Row> </Grid> </div> <SidebarControls> <SidebarControlBtn bundle='fontello' glyph='docs' sidebar={0}/> <SidebarControlBtn bundle='fontello' glyph='chat-1' sidebar={1}/> <SidebarControlBtn bundle='fontello' glyph='chart-pie-2' sidebar={2}/> <SidebarControlBtn bundle='fontello' glyph='th-list-2' sidebar={3}/> <SidebarControlBtn bundle='fontello' glyph='bell-5' sidebar={4}/> </SidebarControls> <div id='sidebar-container'> <Sidebar sidebar={0} active> <ApplicationSidebar /> </Sidebar> <Sidebar sidebar={1}> <DummySidebar /> </Sidebar> <Sidebar sidebar={2}> <DummySidebar /> </Sidebar> <Sidebar sidebar={3}> <DummySidebar /> </Sidebar> <Sidebar sidebar={4}> <DummySidebar /> </Sidebar> </div> </div> ); } };
15,075
https://github.com/netgenlayouts/content-browser/blob/master/bundle/Resources/views/form/form_div_layout.html.twig
Github Open Source
Open Source
MIT
2,021
content-browser
netgenlayouts
Twig
Code
442
1,408
{% trans_default_domain 'ngcb' %} {%- block ngcb_widget -%} <div class="js-input-browse {% if value is empty %}item-empty{% endif %}" data-disabled="{% if form.vars.disabled %}true{% else %}false{% endif %}" {% if start_location is not null %} data-start_location="{{ start_location }}" {% endif %} {% for param_name, param_value in custom_params %} data-custom-{{ param_name }}="{{ param_value is iterable ? param_value|join(',') : param_value }}" {% endfor %} data-min_selected="1" data-max_selected="1" data-input > <div class="input-browse"> {% if not required %} <span class="js-clear"><i class="material-icons">close</i></span> {% endif %} <a class="js-trigger" href="#"> <span class="js-name" data-empty-note="{{ 'form.messages.no_item_selected'|trans }}"> {% if value is not empty %} {{ item ? item.name : 'form.messages.invalid_item'|trans }} {% else %} {{ 'form.messages.no_item_selected'|trans }} {% endif %} </span> </a> </div> <input type="hidden" class="js-item-type" value="{{ item_type }}" /> <input type="hidden" class="js-value" {{ block('widget_attributes') }} {% if value is not empty %} value="{{ value }}" {% endif %} /> </div> {%- endblock -%} {%- block ngcb_dynamic_widget -%} <div class="js-input-browse {% if form.item_value.vars.value is empty %}item-empty{% endif %}" data-disabled="{% if form.vars.disabled %}true{% else %}false{% endif %}" {% if start_location is not null %} data-start_location="{{ start_location }}" {% endif %} {% for param_name, param_value in custom_params %} data-custom-{{ param_name }}="{{ param_value is iterable ? param_value|join(',') : param_value }}" {% endfor %} data-min_selected="1" data-max_selected="1" data-input > {{ form_row(form.item_type, {label: false, attr: {class: 'js-item-type'}}) }} {{ form_row(form.item_value, {attr: {class: 'js-value'}}) }} <div class="input-browse"> {% if not required %} <span class="js-clear"><i class="material-icons">close</i></span> {% endif %} <a class="js-trigger" href="#"> <span class="js-name" data-empty-note="{{ 'form.messages.no_item_selected'|trans }}"> {% if form.item_value.vars.value is not empty %} {{ item ? item.name : 'form.messages.invalid_item'|trans }} {% else %} {{ 'form.messages.no_item_selected'|trans }} {% endif %} </span> </a> </div> </div> {%- endblock -%} {%- block ngcb_multiple_widget -%} {% macro prototype(form, items) %} <div class="item"> <a href="#" class="js-remove"><i class="material-icons">close</i></a> <span class="name"> {% if form.vars.data is not empty %} {% if items[form.vars.data] is defined %} {{ items[form.vars.data].name }} {% else %} {{ 'form.messages.invalid_item'|trans }} {% endif %} {% endif %} </span> {{ form_widget(form) }} </div> {% endmacro %} <div class="js-multiple-browse {% if form is empty %}items-empty{% endif %}" data-disabled="{% if form.vars.disabled %}true{% else %}false{% endif %}" {% if start_location is not null %} data-start_location="{{ start_location }}" {% endif %} {% for param_name, param_value in custom_params %} data-custom-{{ param_name }}="{{ param_value is iterable ? param_value|join(',') : param_value }}" {% endfor %} {% if min is not null %} data-min_selected="{{ min }}" {% endif %} {% if max is not null %} data-max_selected="{{ max }}" {% endif %} data-browser-prototype="{{ _self.prototype(form.vars.prototype, items)|e }}" data-input > <div class="items"> {% for child in form %} {{ _self.prototype(child, items) }} {% endfor %} <div class="no-items"> {{ 'form.messages.no_items_selected'|trans }} </div> </div> <input type="hidden" class="js-item-type" value="{{ item_type }}" /> <a href="#" class="js-trigger">{{ 'form.add_items'|trans }}</a> </div> {%- endblock -%}
4,536
https://github.com/suver/r4sky/blob/master/custom_components/ready4sky/switch.py
Github Open Source
Open Source
Apache-2.0
null
r4sky
suver
Python
Code
279
1,020
"""Platform for light integration.""" import logging import homeassistant.util.color as color_util from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.components.switch import ( SwitchEntity ) from . import DOMAIN from .kettle_entity import KettleEntity _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the sensor platform.""" # We only want this platform to be set up via discovery. if discovery_info is None: return switches = [] for device in hass.data[DOMAIN]: switches.append(R4SkyKettleSwitch(hass.data[DOMAIN][device])) if len(switches) > 0: add_entities(switches) class R4SkyKettleSwitch(SwitchEntity, KettleEntity): """Representation of an Awesome Light.""" _energy_kwh = 0 _started_count = 0 async def async_added_to_hass(self): self._handle_update() self.async_on_remove(async_dispatcher_connect(self.hass, 'ready4sky_update', self._handle_update)) def _handle_update(self): self._state = self._connect._state_boil self._started_count = self._connect._started_count self.schedule_update_ha_state() @property def icon(self): """Icon is a lightning bolt.""" return "mdi:kettle-steam" if self.is_on else "mdi:kettle" def rgbhex_to_hs(self, rgbhex): rgb = color_util.rgb_hex_to_rgb_list(rgbhex) return color_util.color_RGB_to_hs(*rgb) def hs_to_rgbhex(self, hs): rgb = color_util.color_hs_to_RGB(*hs) return color_util.color_rgb_to_hex(*rgb) @property def available(self): return True @property def name(self): """Return the display name of this light.""" return f"{self._name}" @property def brightness(self): """Return the brightness of the light. This method is optional. Removing it indicates to Home Assistant that brightness is not supported for this light. """ return self._brightness @property def is_on(self): """Return true if light is on.""" return self._state @property def is_standby(self): """Return true if light is on.""" return self._is_standby @property def energy_kwh(self): """Return true if light is on.""" return self._energy_kwh @property def _current_power_w(self): """Return true if light is on.""" return self.__current_power_w def turn_on(self, **kwargs) -> None: """Turn the entity on.""" self.log('R4SkyKettleSwitch.turn_on') self._connect.onModeBoil() async def async_turn_on(self, **kwargs): """Turn the entity on.""" self.turn_on() def turn_off(self, **kwargs): """Turn the entity off.""" self.log('R4SkyKettleSwitch.turn_off') self._connect.off() async def async_turn_off(self, **kwargs): """Turn the entity off.""" self.turn_off() def toggle(self, **kwargs): """Toggle the entity.""" if self._state: self.turn_off() else: self.turn_on() async def async_toggle(self, **kwargs): """Toggle the entity.""" self.toggle()
29,772
https://github.com/DaniilStepanov/kotlinWithFuzzer/blob/master/bbfgradle/tmp/results/diffABI/hscemom_FILE.kt
Github Open Source
Open Source
LicenseRef-scancode-unknown-license-reference, Apache-2.0
2,021
kotlinWithFuzzer
DaniilStepanov
Kotlin
Code
35
126
// Bug happens on JVM , JVM -Xuse-ir // FILE: tmp0.kt @file:JvmMultifileClass() @file:JvmName("wodpa") import kotlin.collections.* import kotlin.sequences.* import kotlin.jvm.* import kotlin.coroutines.* import kotlin.annotation.* import kotlin.test.* import kotlin.time.* @Test() external fun <T, S> gbyyu(a: UInt): Long
22,294
https://github.com/romanbrickie/CTRmodel/blob/master/src/main/com/ggstar/serving/mleap/serialization/ModelSerializer.scala
Github Open Source
Open Source
Apache-2.0
2,020
CTRmodel
romanbrickie
Scala
Code
44
235
package com.ggstar.serving.mleap.serialization import ml.combust.bundle.BundleFile import org.apache.spark.ml.PipelineModel import org.apache.spark.ml.bundle.SparkBundleContext import org.apache.spark.ml.mleap.SparkUtil import ml.combust.mleap.spark.SparkSupport._ import org.apache.spark.sql.DataFrame import resource.managed class ModelSerializer { def serializeModel(pipelineModel:PipelineModel, modelSavePath:String, transformedData:DataFrame): Unit ={ val pipeline = SparkUtil.createPipelineModel(uid = "pipeline", Array(pipelineModel)) val sbc = SparkBundleContext().withDataset(transformedData) for(bf <- managed(BundleFile(modelSavePath))) { pipeline.writeBundle.save(bf)(sbc).get } } }
48,486
https://github.com/DDiimmkkaass/lets-cook/blob/master/resources/themes/admin/views/weekly_menu/show.blade.php
Github Open Source
Open Source
MIT
null
lets-cook
DDiimmkkaass
PHP
Code
187
826
@extends('layouts.editable') @section('content') <div class="row"> <div class="col-lg-12"> {!! Form::model($model, ['role' => 'form', 'method' => 'put', 'class' => 'form-horizontal weekly-menu-form', 'route' => ['admin.weekly_menu.update', $model->id]]) !!} @include('weekly_menu.partials._buttons', ['class' => 'buttons-top', 'show' => true]) <div class="row"> <div class="col-md-12"> <div class="box box-primary"> <div class="box-body"> <div class="form-group no-margin"> <div class="col-xs-12 margin-bottom-5 font-size-16 text-left"> @lang('labels.week') </div> <div class="margin-bottom-10 col-xs-12 col-sm-3 col-md-2 col-lg-1"> {!! Form::text('week', null, ['id' => 'week_menu_date', 'class' => 'form-control select2 pull-left input-sm', 'required' => true, 'readonly' => true]) !!} </div> <div class="margin-bottom-10 col-xs-12 col-sm-3 col-md-2 col-lg-1"> {!! Form::text('year', null, ['id' => 'year_menu_date', 'class' => 'form-control select2 pull-left input-sm', 'required' => true, 'readonly' => true]) !!} </div> <div class="clearfix"></div> </div> <div class="clearfix margin-bottom-15"></div> <div class="nav-tabs-custom"> <ul class="nav nav-tabs"> @foreach($model->baskets as $key => $basket) <li @if ($key == 0) class="active" @endif> <a aria-expanded="false" href="#basket_{!! $basket->basket_id !!}_{!! $basket->portions !!}" data-toggle="tab" class="pull-left"> {!! $basket->basket->name !!} <span class="text-lowercase"> (@lang('labels.portions') : {!! $basket->portions !!}) </span> </a> </li> @endforeach </ul> <div class="tab-content"> @foreach($model->baskets as $key => $basket) <div class="tab-pane @if ($key == 0) active @endif" id="basket_{!! $basket->basket_id !!}_{!! $basket->portions !!}"> @include('weekly_menu.tabs.show_basket_content') </div> @endforeach </div> </div> </div> </div> </div> </div> @include('weekly_menu.partials._buttons', ['show' => true]) {!! Form::close() !!} </div> </div> @stop
4,845
https://github.com/masud-technope/ACER-Replication-Package-ASE2017/blob/master/corpus/class/sling/1447.java
Github Open Source
Open Source
MIT
null
ACER-Replication-Package-ASE2017
masud-technope
Java
Code
402
1,919
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sling.commons.osgi; import junit.framework.TestCase; /** * Tests for the manifest header parsing. */ public class ManifestHeaderTest extends TestCase { public void testNonExisting() { String header = null; final ManifestHeader entry = ManifestHeader.parse(header); assertNull(entry); } public void testSinglePath() { String header = "something"; final ManifestHeader entry = ManifestHeader.parse(header); assertEquals(1, entry.getEntries().length); assertEquals(header, entry.getEntries()[0].getValue()); assertEquals(0, entry.getEntries()[0].getAttributes().length); assertEquals(0, entry.getEntries()[0].getDirectives().length); } public void testSeveralPaths() { String header = "one,two, three ,\n four, \n five"; final ManifestHeader entry = ManifestHeader.parse(header); assertEquals(5, entry.getEntries().length); assertEquals("one", entry.getEntries()[0].getValue()); assertEquals(0, entry.getEntries()[0].getAttributes().length); assertEquals(0, entry.getEntries()[0].getDirectives().length); assertEquals("two", entry.getEntries()[1].getValue()); assertEquals(0, entry.getEntries()[1].getAttributes().length); assertEquals(0, entry.getEntries()[1].getDirectives().length); assertEquals("three", entry.getEntries()[2].getValue()); assertEquals(0, entry.getEntries()[2].getAttributes().length); assertEquals(0, entry.getEntries()[2].getDirectives().length); assertEquals("four", entry.getEntries()[3].getValue()); assertEquals(0, entry.getEntries()[3].getAttributes().length); assertEquals(0, entry.getEntries()[3].getDirectives().length); assertEquals("five", entry.getEntries()[4].getValue()); assertEquals(0, entry.getEntries()[4].getAttributes().length); assertEquals(0, entry.getEntries()[4].getDirectives().length); } public void testAttributes() { String header = "one;a=1;b=2"; final ManifestHeader entry = ManifestHeader.parse(header); assertEquals(1, entry.getEntries().length); assertEquals("one", entry.getEntries()[0].getValue()); assertEquals(2, entry.getEntries()[0].getAttributes().length); assertEquals(0, entry.getEntries()[0].getDirectives().length); assertEquals("a", entry.getEntries()[0].getAttributes()[0].getName()); assertEquals("b", entry.getEntries()[0].getAttributes()[1].getName()); assertEquals("1", entry.getEntries()[0].getAttributes()[0].getValue()); assertEquals("2", entry.getEntries()[0].getAttributes()[1].getValue()); } public void testDirectives() { String header = "one;a:=1;b:=2"; final ManifestHeader entry = ManifestHeader.parse(header); assertEquals(1, entry.getEntries().length); assertEquals("one", entry.getEntries()[0].getValue()); assertEquals(2, entry.getEntries()[0].getDirectives().length); assertEquals(0, entry.getEntries()[0].getAttributes().length); assertEquals("a", entry.getEntries()[0].getDirectives()[0].getName()); assertEquals("b", entry.getEntries()[0].getDirectives()[1].getName()); assertEquals("1", entry.getEntries()[0].getDirectives()[0].getValue()); assertEquals("2", entry.getEntries()[0].getDirectives()[1].getValue()); } public void testQuoting() { String header = "one;a:=\"1,2\""; final ManifestHeader entry = ManifestHeader.parse(header); assertEquals(1, entry.getEntries().length); assertEquals("one", entry.getEntries()[0].getValue()); assertEquals(1, entry.getEntries()[0].getDirectives().length); assertEquals(0, entry.getEntries()[0].getAttributes().length); assertEquals("a", entry.getEntries()[0].getDirectives()[0].getName()); assertEquals("1,2", entry.getEntries()[0].getDirectives()[0].getValue()); } public void testQuoting2() { String header = "CQ-INF/content/apps/xyz/docroot;overwrite:=true;path:=/apps/xyz/docroot;ignoreImportProviders:=\"json,xml\""; final ManifestHeader entry = ManifestHeader.parse(header); assertEquals(1, entry.getEntries().length); assertEquals("CQ-INF/content/apps/xyz/docroot", entry.getEntries()[0].getValue()); assertEquals(3, entry.getEntries()[0].getDirectives().length); assertEquals(0, entry.getEntries()[0].getAttributes().length); assertEquals("overwrite", entry.getEntries()[0].getDirectives()[0].getName()); assertEquals("true", entry.getEntries()[0].getDirectives()[0].getValue()); assertEquals("path", entry.getEntries()[0].getDirectives()[1].getName()); assertEquals("/apps/xyz/docroot", entry.getEntries()[0].getDirectives()[1].getValue()); assertEquals("ignoreImportProviders", entry.getEntries()[0].getDirectives()[2].getName()); assertEquals("json,xml", entry.getEntries()[0].getDirectives()[2].getValue()); } public void testMultipleEntries() { String header = "SLING-INF/content/etc;checkin:=true;path:=/etc,\nSLING-INF/content/libs;overwrite:=true;path:=/libs"; final ManifestHeader entry = ManifestHeader.parse(header); assertEquals(2, entry.getEntries().length); assertEquals("SLING-INF/content/etc", entry.getEntries()[0].getValue()); assertEquals(2, entry.getEntries()[0].getDirectives().length); assertEquals(0, entry.getEntries()[0].getAttributes().length); assertEquals("checkin", entry.getEntries()[0].getDirectives()[0].getName()); assertEquals("path", entry.getEntries()[0].getDirectives()[1].getName()); assertEquals("true", entry.getEntries()[0].getDirectives()[0].getValue()); assertEquals("/etc", entry.getEntries()[0].getDirectives()[1].getValue()); assertEquals("SLING-INF/content/libs", entry.getEntries()[1].getValue()); assertEquals(2, entry.getEntries()[1].getDirectives().length); assertEquals(0, entry.getEntries()[1].getAttributes().length); assertEquals("overwrite", entry.getEntries()[1].getDirectives()[0].getName()); assertEquals("path", entry.getEntries()[1].getDirectives()[1].getName()); assertEquals("true", entry.getEntries()[1].getDirectives()[0].getValue()); assertEquals("/libs", entry.getEntries()[1].getDirectives()[1].getValue()); } }
13,319
https://github.com/Bernardstanislas/institu-de-la-neo-pensee-francaise/blob/master/src/templates/blog-post.tsx
Github Open Source
Open Source
MIT
null
institu-de-la-neo-pensee-francaise
Bernardstanislas
TypeScript
Code
107
372
import * as React from 'react' import { Disqus, CommentCount } from 'gatsby-plugin-disqus'; import { graphql } from 'gatsby' import Layout from "../components/Layout"; export default ({data: {markdownRemark: post}}) => { const disqusConfig = { identifier: post.id, title: post.frontmatter.title, }; return ( <Layout> <div className="bg-white"> <div className="container m-auto p-4"> <h1 className="text-3xl mb-3">{post.frontmatter.title}</h1> <CommentCount config={disqusConfig} placeholder={'...'} /> <h2 className="text-gray-500 text-sm mb-6"><i>{post.frontmatter.date}</i></h2> <div className="text-base" dangerouslySetInnerHTML={{__html: post.html}} /> <div className="mt-5"> <Disqus config={disqusConfig} /> </div> </div> </div> </Layout> ) } export const pageQuery = graphql` query($path: String!) { markdownRemark(fields: { slug: { eq: $path } }) { html id frontmatter { title date(formatString: "DD MMMM YYYY", locale: "fr") } } } `;
21,773
https://github.com/tulip-control/omega/blob/master/tests/cover_enum_test.py
Github Open Source
Open Source
BSD-3-Clause
2,021
omega
tulip-control
Python
Code
2,609
7,919
"""Test `omega.symbolic.cover_enum`.""" import itertools import pprint from nose.tools import assert_raises from omega.symbolic import cover as cov from omega.symbolic import cover_enum as cov_enum from omega.symbolic import fol as _fol from omega.symbolic import orthotopes as lat def test_cyclic_core_with_care_set(): fol = _fol.Context() fol.declare(x=(0, 17)) s = '(x < 15)' f = fol.add_expr(s) care_set = fol.true mincovers = cov_enum.minimize(f, care_set, fol) mincovers_ = {fol.add_expr('a_x = 0 /\ b_x = 14')} assert mincovers == mincovers_, list( fol.pick_iter(mincovers)) def test_example_of_strong_reduction(): """Computing all minimal covers for the counterexample.""" # For now `cov.minimize` creates the primes etc in # a specific way, for a specific basis (orthotopes). # This example doesn't fit in that recipe, # so we rewrite some of the code in `minimize`. fol = _fol.Context() fol.to_bdd = fol.add_expr x_vars = dict(x=(0, 8)) p_vars = dict(p=(0, 8)) q_vars = dict(q=(0, 8)) u_vars = dict(p_cp=(0, 8)) fol.declare(**x_vars) fol.declare(**p_vars) fol.declare(**q_vars) fol.declare(**u_vars) p_eq_q = fol.to_bdd(r'p \in 0..8 /\ q \in 0..8 /\ p = q') leq = r''' # (* layer 1 *) \/ (p = 0 /\ q = 6) \/ (p = 0 /\ q = 7) \/ (p = 0 /\ q = 8) # (* layer 2 *) \/ (p = 6 /\ q = 2) \/ (p = 6 /\ q = 3) \/ (p = 7 /\ q = 3) \/ (p = 7 /\ q = 4) \/ (p = 8 /\ q = 4) \/ (p = 8 /\ q = 5) # (* layer 3 *) \/ (p = 2 /\ q = 1) \/ (p = 3 /\ q = 1) \/ (p = 4 /\ q = 1) \/ (p = 5 /\ q = 1) # transitivity \/ (p = 0 /\ q = 2) \/ (p = 0 /\ q = 3) \/ (p = 0 /\ q = 4) \/ (p = 0 /\ q = 5) \/ (p = 0 /\ q = 1) \/ (p = 6 /\ q = 1) \/ (p = 7 /\ q = 1) \/ (p = 8 /\ q = 1) # equality \/ (p = q /\ p \in 0..8 /\ q \in 0..8) ''' p_leq_q = fol.to_bdd(leq) u_leq_p = fol.to_bdd(leq.replace('p', 'p_cp').replace('q', 'p')) p_leq_u = fol.to_bdd(leq.replace('q', 'p_cp')) # bundle prm = Parameters() prm.x_vars = set(x_vars) prm.p_vars = set(p_vars) prm.q_vars = set(q_vars) prm.u_vars = set(u_vars) # prm.p_to_q = dict(p='q') prm.q_to_p = dict(q='p') prm.p_to_u = dict(p='p_cp') # prm.u_leq_p = u_leq_p prm.p_leq_u = p_leq_u prm.p_leq_q = p_leq_q prm.p_eq_q = p_eq_q # x = fol.add_expr(r'p \in 6..8') y = fol.add_expr(r'p \in 2..5') # path_cost = 0.0 bab = cov._BranchAndBound(prm, fol) bab.upper_bound = cov._upper_bound( x, y, prm.p_leq_q, prm.p_to_q, fol) path_cost = 0.0 mincovers = cov_enum._cyclic_core_fixpoint_recursive( x, y, path_cost, bab, fol) # enumerative check enumerated_covers(x, y, prm, fol) print('all minimal covers:') cov_enum._print_mincovers(mincovers, fol) # assert set of minimal covers is as expected assert len(mincovers) == 3, mincovers mincovers_t = set() for cover in mincovers: c = set() for d in fol.pick_iter(cover): r, = d.values() c.add(r) c = tuple(sorted(c)) mincovers_t.add(c) mincovers_t_ = {(2, 4), (3, 4), (3, 5)} assert mincovers_t == mincovers_t_, (mincovers_t, mincovers_t_) def enumerated_covers(x, y, prm, fol): """Return all minimal covers by enumerative search.""" xelem = list(fol.pick_iter(x)) yelem = list(fol.pick_iter(y)) all_subsets = subsets(yelem) covers = list() for subset in all_subsets: if subset_is_cover(xelem, subset, prm.p_leq_q, prm.p_to_q, fol): covers.append(subset) assert covers n = len(next(iter(covers))) for subset in covers: n = min(n, len(subset)) mincovers = [c for c in covers if len(c) == n] pprint.pprint(mincovers) return mincovers def subset_is_cover(x, subset, p_leq_q, p_to_q, fol): """Return `True` if `subset` covers `x` using `p_leq_q`.""" for u in x: if not element_is_covered(u, subset, p_leq_q, p_to_q, fol): return False return True def element_is_covered(u, subset, p_leq_q, p_to_q, fol): """Return `True` if some element of `subset` covers `u`. Covering is computed using `p_leq_q`. """ r = fol.let(u, p_leq_q) for y in subset: yq = {p_to_q[k]: v for k, v in y.items()} if fol.let(yq, r) == fol.true: return True return False def subsets(c): """Return a `set` with all subsets of `c`, as tuples.""" sets = list() for i in range(len(c) + 1): t = itertools.combinations(c, i) sets.extend(t) return sets class Parameters(object): """Stores parameter values and lattice definition.""" def __init__(self): x_vars = list() # variable type hints (as `set`) self.x_vars = None self.p_vars = None self.q_vars = None self.u_vars = None # mappings between variables self.p_to_q = None self.q_to_p = None self.p_to_u = None # relations self.u_leq_p = None self.p_leq_u = None self.p_leq_q = None self.p_eq_q = None self.fol = None def test_cyclic_core_recursion(): """One cyclic core.""" fol = _fol.Context() fol.declare( x=(0, 1), y=(0, 1), z=(0, 1)) s = r''' ( \/ (z = 1 /\ y = 0) \/ (x = 0 /\ z = 1) \/ (y = 1 /\ x = 0) \/ (y = 1 /\ z = 0) \/ (x = 1 /\ z = 0) \/ (x = 1 /\ y = 0) ) ''' f = fol.add_expr(s) care = fol.true # setup variables and lattice prm = lat.setup_aux_vars(f, care, fol) lat.setup_lattice(prm, fol) # covering problem fcare = f | ~ care x = lat.embed_as_implicants(f, prm, fol) y = lat.prime_implicants(fcare, prm, fol) # enumerative check enumerated_covers(x, y, prm, fol) # symbolically minimize mincovers = cov_enum.minimize(f, care, fol) n = len(mincovers) assert n == 2, (n, mincovers) for cover in mincovers: n = fol.count(cover) primes = list(fol.pick_iter(cover)) assert n == 3, (n, primes) def test_cyclic_core_recursion_1(): """One cyclic core.""" fol = _fol.Context() fol.declare( x=(0, 1), y=(0, 1), z=(0, 1)) s = r''' ( \/ (z = 1 /\ y = 0) \/ (x = 0 /\ z = 1) \/ (y = 1 /\ x = 0) \/ (y = 1 /\ z = 0) \/ (x = 1 /\ z = 0) \/ (x = 1 /\ y = 0) ) ''' f = fol.add_expr(s) care_set = fol.true mincovers = cov_enum.minimize(f, care_set, fol) n = len(mincovers) assert n == 2, (n, mincovers) for cover in mincovers: n = fol.count(cover) primes = list(fol.pick_iter(cover)) assert n == 3, (n, primes) def test_cyclic_core_recursion_2(): """Two cyclic cores, in orthogonal subspaces.""" fol = _fol.Context() fol.declare( x=(0, 1), y=(0, 1), z=(0, 1), u=(0, 1), v=(0, 1), w=(0, 1)) s = r''' ( \/ (z = 1 /\ y = 0) \/ (x = 0 /\ z = 1) \/ (y = 1 /\ x = 0) \/ (y = 1 /\ z = 0) \/ (x = 1 /\ z = 0) \/ (x = 1 /\ y = 0) ) \/ ( \/ (w = 1 /\ v = 0) \/ (u = 0 /\ w = 1) \/ (v = 1 /\ u = 0) \/ (v = 1 /\ w = 0) \/ (u = 1 /\ w = 0) \/ (u = 1 /\ v = 0) ) ''' f = fol.add_expr(s) care_set = fol.true mincovers = cov_enum.minimize(f, care_set, fol) n = len(mincovers) assert n == 4, (n, mincovers) for cover in mincovers: n = fol.count(cover) primes = list(fol.pick_iter(cover)) assert n == 6, (n, primes) def test_cyclic_core_recursion_3(): """Three cyclic cores, in orthogonal subspaces.""" fol = _fol.Context() fol.declare( x=(0, 1), y=(0, 1), z=(0, 1), u=(0, 1), v=(0, 1), w=(0, 1), a=(0, 1), b=(0, 1), c=(0, 1)) s = r''' ( \/ (z = 1 /\ y = 0) \/ (x = 0 /\ z = 1) \/ (y = 1 /\ x = 0) \/ (y = 1 /\ z = 0) \/ (x = 1 /\ z = 0) \/ (x = 1 /\ y = 0) ) \/ ( \/ (w = 1 /\ v = 0) \/ (u = 0 /\ w = 1) \/ (v = 1 /\ u = 0) \/ (v = 1 /\ w = 0) \/ (u = 1 /\ w = 0) \/ (u = 1 /\ v = 0) ) \/ ( \/ (c = 1 /\ b = 0) \/ (a = 0 /\ c = 1) \/ (b = 1 /\ a = 0) \/ (b = 1 /\ c = 0) \/ (a = 1 /\ c = 0) \/ (a = 1 /\ b = 0) ) ''' f = fol.add_expr(s) care_set = fol.true mincovers = cov_enum.minimize(f, care_set, fol) n = len(mincovers) assert n == 8, (n, mincovers) for cover in mincovers: n = fol.count(cover) primes = list(fol.pick_iter(cover)) assert n == 9, (n, primes) def test_cyclic_core_fixpoint_recursive(): fol = _fol.Context() p_vars = dict(p=(0, 3)) q_vars = dict(q=(0, 3)) u_vars = dict(p_cp=(0, 3)) fol.declare(**p_vars) fol.declare(**q_vars) fol.declare(**u_vars) p_eq_q = fol.to_bdd(r'p \in 0..3 /\ p = q') # 3 # | | # 1 2 # | | # 0 leq = r''' # (* layer 1 *) \/ (p = 0 /\ q = 1) \/ (p = 0 /\ q = 2) # (* layer 2 *) \/ (p = 1 /\ q = 3) \/ (p = 2 /\ q = 3) # transitivity \/ (p = 0 /\ q = 3) # equality \/ (p = q /\ p \in 0..3) ''' p_leq_q = fol.to_bdd(leq) u_leq_p = fol.to_bdd(leq.replace('p', 'p_cp').replace('q', 'p')) p_leq_u = fol.to_bdd(leq.replace('q', 'p_cp')) # bundle prm = Parameters() prm.p_vars = set(p_vars) prm.q_vars = set(q_vars) prm.u_vars = set(u_vars) # prm.p_to_q = dict(p='q') prm.q_to_p = dict(q='p') prm.p_to_u = dict(p='p_cp') # prm.u_leq_p = u_leq_p prm.p_leq_u = p_leq_u prm.p_leq_q = p_leq_q prm.p_eq_q = p_eq_q # x = fol.add_expr('p = 0') y = fol.add_expr(r'p \in 1..2') # path_cost = 0.0 bab = cov._BranchAndBound(prm, fol) bab.upper_bound = cov._upper_bound( x, y, prm.p_leq_q, prm.p_to_q, fol) path_cost = 0.0 mincovers = cov_enum._cyclic_core_fixpoint_recursive( x, y, path_cost, bab, fol) assert len(mincovers) == 2, mincovers mincovers_ = { fol.add_expr('p = 1'), fol.add_expr('p = 2')} assert mincovers == mincovers_, list( fol.pick_iter(mincovers)) def test_assert_are_covers(): fol = _fol.Context() fol.declare(p=(0, 4), q=(0, 4)) x = fol.add_expr('p = 1') covers = { fol.add_expr('p = 1'), fol.add_expr('p = 2'), fol.add_expr(r'p \in 3..4')} prm = Parameters() prm.p_vars = {'p'} prm.q_vars = {'q'} prm.p_to_q = {'p': 'q'} prm.p_leq_q = fol.add_expr('p <= q') cov_enum._assert_are_covers(x, covers, prm, fol) # not covers x = fol.add_expr('p = 2') with assert_raises(AssertionError): cov_enum._assert_are_covers(x, covers, prm, fol) def test_assert_covers_from(): fol = _fol.Context() fol.declare(p=(0, 4)) y = fol.add_expr(r'p \in 1..3') covers = { fol.add_expr('p = 1'), fol.add_expr(r'p \in 1..2'), fol.add_expr(r'p \in 2..3')} cov_enum._assert_covers_from(covers, y, fol) # not covers from `y` y = fol.add_expr('p = 4') with assert_raises(AssertionError): cov_enum._assert_covers_from(covers, y, fol) def test_assert_uniform_cardinality(): fol = _fol.Context() fol.declare(p=(0, 3)) bdds = { fol.add_expr(r'p \in 0..1'), fol.add_expr(r'p \in 2..3'), fol.add_expr(r'p = 0 \/ p = 3')} cov_enum._assert_uniform_cardinality(bdds, fol) # not of uniform cardinality bdds = { fol.add_expr('p = 0'), fol.add_expr(r'p \in 2..3')} with assert_raises(AssertionError): cov_enum._assert_uniform_cardinality(bdds, fol) def test_enumerate_mincovers_unfloor(): fol = _fol.Context() fol.declare(p=(0, 4), q=(0, 4)) # define a fragment of a lattice prm = Parameters() prm.p_vars = {'p'} prm.p_to_q = {'p': 'q'} prm.q_to_p = {'q': 'p'} # 2 3 # | | # 0 1 prm.p_leq_q = fol.add_expr(r''' \/ (p = 0 /\ q = 2) \/ (p = 1 /\ q = 3) ''') # {0..1} |-> {2..3} y = fol.add_expr(r'p \in 2..3') cover_from_floors = fol.add_expr(r'p \in 0..1') mincovers = cov_enum._enumerate_mincovers_unfloor( cover_from_floors, y, prm, fol) assert len(mincovers) == 1, mincovers assert y in mincovers, (mincovers, y) # non-injective case # 2 2 3 # | | | # 0 1 1 prm.p_leq_q = fol.add_expr(r''' \/ (p = 0 /\ q = 2) \/ (p = 1 /\ q = 2) \/ (p = 1 /\ q = 3) ''') y = fol.add_expr(r'p \in 2..3') cover_from_floors = fol.add_expr(r'p \in 0..1') with assert_raises(AssertionError): # The assertion error is raised because the cover's cardinality # is reduced by the mapping, so the cardinality of the # partial cover is smaller than expected (`assert k == k_` within # the function `_enumerate_mincovers_unfloor`). mincovers = cov_enum._enumerate_mincovers_unfloor( cover_from_floors, y, prm, fol) # {0..1} |-> {2..3, {2, 4}} prm.p_leq_q = fol.add_expr(r''' \/ (p = 0 /\ q = 2) \/ (p = 1 /\ q = 3) \/ (p = 1 /\ q = 4) ''') y = fol.add_expr(r'p \in 2..4') cover_from_floors = fol.add_expr(r'p \in 0..1') mincovers = cov_enum._enumerate_mincovers_unfloor( cover_from_floors, y, prm, fol) assert len(mincovers) == 2, mincovers cover = fol.add_expr(r'p \in 2..3') assert cover in mincovers, (mincovers, cover) cover = fol.add_expr(r'p = 2 \/ p = 4') assert cover in mincovers, (mincovers, cover) def test_y_unfloor(): fol = _fol.Context() fol.declare(p=(0, 3), q=(0, 3)) # define a fragment of a lattice prm = Parameters() prm.p_vars = {'p'} prm.p_to_q = {'p': 'q'} prm.q_to_p = {'q': 'p'} # 2 3 # | | # 0 1 prm.p_leq_q = fol.add_expr(r''' \/ (p = 0 /\ q = 2) \/ (p = 1 /\ q = 3) ''') y = fol.add_expr(r'p \in 2..3') # yfloor = 0 yfloor = fol.add_expr('p = 0') y_over = cov_enum._y_unfloor(yfloor, y, prm, fol) y_over_ = fol.add_expr('p = 2') assert y_over == y_over_, list(fol.pick_iter(y_over)) # yfloor = 1 yfloor = fol.add_expr('p = 1') y_over = cov_enum._y_unfloor(yfloor, y, prm, fol) y_over_ = fol.add_expr('p = 3') assert y_over == y_over_, list(fol.pick_iter(y_over)) def test_enumerate_mincovers_below(): """Test the function `enumerate_mincovers_below`.""" fol = _fol.Context() fol.declare(x=(0, 5)) u = fol.add_expr(r' x \in 0..1 ') care = fol.true prm = lat.setup_aux_vars(u, care, fol) lat.setup_lattice(prm, fol) x = fol.add_expr(r' a_x = 0 /\ b_x = 2 ') y = fol.add_expr(r''' \/ (a_x = 0 /\ b_x = 1) \/ (a_x = 0 /\ b_x = 3) \/ (a_x = 0 /\ b_x = 4) ''') cover_from_max = fol.add_expr(r''' a_x = 0 /\ b_x = 4 ''') mincovers_below = cov_enum._enumerate_mincovers_below( cover_from_max, x, y, prm, fol) mincovers_below_ = cov_enum._enumerate_mincovers_below_set_based( cover_from_max, x, y, prm, fol) assert mincovers_below == mincovers_below_, mincovers_below r = fol.add_expr(r''' \/ (a_x = 0 /\ b_x = 3) \/ (a_x = 0 /\ b_x = 4) ''') mincovers_below_ = set( fol.assign_from(d) for d in fol.pick_iter(r)) assert mincovers_below == mincovers_below_, ( mincovers_below, mincovers_below_) def test_pick_iter_as_bdd(): fol = _fol.Context() fol.declare(x=(0, 5)) u = fol.add_expr(r' x \in 0..1 ') t = list(cov_enum._pick_iter_as_bdd(u, fol)) t_ = [fol.add_expr('x = 0'), fol.add_expr('x = 1')] assert t == t_, (t, t_) def test_below_and_suff(): fol = _fol.Context() fol.declare(p=(0, 3), q=(0, 3)) # define a fragment of a lattice prm = Parameters() prm.p_vars = {'p'} prm.q_vars = {'q'} prm.p_to_q = {'p': 'q'} prm.q_to_p = {'q': 'p'} # 3 # | | # 1 2 # | # 0 prm.p_leq_q = fol.add_expr(r''' \/ (p = 0 /\ q = 1) \/ (p = 0 /\ q = 3) \/ (p = 1 /\ q = 3) \/ (p = 2 /\ q = 3) \/ (p \in 0..3 /\ p = q) ''') ymax = fol.add_expr('p = 3') cover = fol.add_expr('p = 3') x = fol.add_expr('p = 0') y = fol.add_expr(r'p \in 1..3') yk_set = cov_enum._below_and_suff( ymax, cover, x, y, prm, fol) yk_set_ = fol.add_expr(r'p = 1 \/ p = 3') assert yk_set == yk_set_, list( fol.pick_iter(yk_set)) def test_lm_tail(): fol = _fol.Context() fol.declare(x=(0, 5)) # N = 3 lm = [fol.add_expr('x = 0'), # index 1 fol.add_expr('x = 1'), # index 2 fol.add_expr('x = 2')] # index 3 k = 0 with assert_raises(AssertionError): cov_enum._lm_tail(k, lm) k = 1 r = cov_enum._lm_tail(k, lm) r_ = fol.add_expr(r'x \in 0..2') assert r == r_, list(fol.pick_iter(r)) k = 2 r = cov_enum._lm_tail(k, lm) r_ = fol.add_expr(r'x \in 1..2') assert r == r_, list(fol.pick_iter(r)) k = 3 r = cov_enum._lm_tail(k, lm) r_ = fol.add_expr('x = 2') assert r == r_, list(fol.pick_iter(r)) k = 4 with assert_raises(AssertionError): cov_enum._lm_tail(k, lm) def test_to_expr(): fol = _fol.Context() fol.declare(x=(0, 1), y=(0, 1), z=(0, 1)) s = r''' \/ (z = 1 /\ y = 0) \/ (x = 0 /\ z = 1) \/ (y = 1 /\ x = 0) \/ (y = 1 /\ z = 0) \/ (x = 1 /\ z = 0) \/ (x = 1 /\ y = 0) ''' u = fol.add_expr(s) care = fol.true dnfs = cov_enum.to_expr(fol, u, care=care, show_dom=True) assert len(dnfs) == 2, dnfs for dnf in dnfs: print(dnf) if __name__ == '__main__': test_example_of_strong_reduction()
560