text
stringlengths
1
1.05M
def isPalindrome(str): for i in range(0, int(len(str)/2)): if str[i] != str[len(str)-i-1]: return False return True inputStr = 'madam' if (isPalindrome(inputStr)): print("Yes") else: print("No")
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Keep any values in here in sync with reserved_infos.py. namespace catapult { extern const char kStoriesDiagnostic[]; }
<gh_stars>0 package cli import ( "context" "flag" "fmt" "io/ioutil" "net/http" "strings" "time" "github.com/qdm12/gluetun/internal/constants" "github.com/qdm12/gluetun/internal/params" "github.com/qdm12/gluetun/internal/provider" "github.com/qdm12/gluetun/internal/settings" "github.com/qdm12/gluetun/internal/storage" "github.com/qdm12/gluetun/internal/updater" "github.com/qdm12/golibs/files" "github.com/qdm12/golibs/logging" ) func ClientKey(args []string) error { flagSet := flag.NewFlagSet("clientkey", flag.ExitOnError) filepath := flagSet.String("path", "/files/client.key", "file path to the client.key file") if err := flagSet.Parse(args); err != nil { return err } fileManager := files.NewFileManager() data, err := fileManager.ReadFile(*filepath) if err != nil { return err } s := string(data) s = strings.ReplaceAll(s, "\n", "") s = strings.ReplaceAll(s, "\r", "") s = strings.TrimPrefix(s, "-----BEGIN PRIVATE KEY-----") s = strings.TrimSuffix(s, "-----END PRIVATE KEY-----") fmt.Println(s) return nil } func HealthCheck() error { client := &http.Client{Timeout: time.Second} response, err := client.Get("http://localhost:8000/health") if err != nil { return err } defer response.Body.Close() if response.StatusCode == http.StatusOK { return nil } b, err := ioutil.ReadAll(response.Body) if err != nil { return err } return fmt.Errorf("HTTP status code %s with message: %s", response.Status, string(b)) } func OpenvpnConfig() error { logger, err := logging.NewLogger(logging.ConsoleEncoding, logging.InfoLevel, -1) if err != nil { return err } paramsReader := params.NewReader(logger, files.NewFileManager()) allSettings, err := settings.GetAllSettings(paramsReader) if err != nil { return err } allServers, err := storage.New(logger).SyncServers(constants.GetAllServers(), false) if err != nil { return err } providerConf := provider.New(allSettings.OpenVPN.Provider.Name, allServers) connections, err := providerConf.GetOpenVPNConnections(allSettings.OpenVPN.Provider.ServerSelection) if err != nil { return err } lines := providerConf.BuildConf( connections, allSettings.OpenVPN.Verbosity, allSettings.System.UID, allSettings.System.GID, allSettings.OpenVPN.Root, allSettings.OpenVPN.Cipher, allSettings.OpenVPN.Auth, allSettings.OpenVPN.Provider.ExtraConfigOptions, ) fmt.Println(strings.Join(lines, "\n")) return nil } func Update(args []string) error { var options updater.Options flagSet := flag.NewFlagSet("update", flag.ExitOnError) flagSet.BoolVar(&options.File, "file", false, "Write results to /gluetun/servers.json (for end users)") flagSet.BoolVar(&options.Stdout, "stdout", false, "Write results to console to modify the program (for maintainers)") flagSet.StringVar(&options.DNSAddress, "dns", "1.1.1.1", "DNS resolver address to use") flagSet.BoolVar(&options.Cyberghost, "cyberghost", false, "Update Cyberghost servers") flagSet.BoolVar(&options.Mullvad, "mullvad", false, "Update Mullvad servers") flagSet.BoolVar(&options.Nordvpn, "nordvpn", false, "Update Nordvpn servers") flagSet.BoolVar(&options.PIA, "pia", false, "Update Private Internet Access post-summer 2020 servers") flagSet.BoolVar(&options.PIAold, "piaold", false, "Update Private Internet Access pre-summer 2020 servers") flagSet.BoolVar(&options.Purevpn, "purevpn", false, "Update Purevpn servers") flagSet.BoolVar(&options.Surfshark, "surfshark", false, "Update Surfshark servers") flagSet.BoolVar(&options.Windscribe, "windscribe", false, "Update Windscribe servers") if err := flagSet.Parse(args); err != nil { return err } logger, err := logging.NewLogger(logging.ConsoleEncoding, logging.InfoLevel, -1) if err != nil { return err } if !options.File && !options.Stdout { return fmt.Errorf("at least one of -file or -stdout must be specified") } ctx := context.Background() httpClient := &http.Client{Timeout: 10 * time.Second} storage := storage.New(logger) updater := updater.New(options, storage, httpClient) if err := updater.UpdateServers(ctx); err != nil { return err } return nil }
#!/bin/bash mkdir -p puzzledb gen() { H=$1 W=$2 P=$3 N=$4 CV=$5 CF=$6 SQ=$7 DEP=$8 OF=$9 MW=${10} F="puzzledb/h=${H}_w=${W}_p=${P}_cv=${CV}_cf=${CF}_sq=${SQ}_dep=${DEP}" if [ "$OF" -ne "0" ]; then F="${F}_of=${OF}" fi if [ ! -f $F ]; then echo Generating $F MAP_HEIGHT=$H MAP_WIDTH=$W PIECES=$P cmake .; make && \ (seq 90210 90219 | parallel --will-cite --line-buffer bin/mklinjat --puzzle_count=$(($N/10)) --seed={} --score_cover=$CV --score_cant_fit=$CF --score_square=$SQ --score_dep=$DEP --score_one_of=$OF --score_max_width=$MW) > puzzledb/tmp && \ mv puzzledb/tmp $F fi } gen 9 6 7 100 1 1 0 0 0 -1 gen 9 6 8 100 1 1 0 0 0 -1 gen 9 6 9 100 1 1 0 0 0 -1 gen 9 6 10 100 1 1 0 0 0 -1 gen 9 6 7 200 1 3 0 0 0 -1 gen 9 6 8 200 1 3 0 0 0 -1 gen 9 6 9 200 1 3 0 0 0 -1 gen 9 6 10 200 1 3 0 0 0 -1 gen 10 7 15 200 1 3 0 0 0 -1 gen 10 7 16 200 1 3 0 0 0 -1 gen 10 7 17 200 1 3 0 0 0 -1 gen 10 7 18 200 1 3 0 0 0 -1 gen 10 7 19 200 1 3 0 0 0 -1 gen 10 7 20 200 1 3 0 0 0 -1 gen 11 8 19 400 1 3 50 0 0 -2 gen 11 8 20 400 1 3 50 0 0 -2 gen 11 8 21 400 1 3 50 0 0 -2 gen 11 8 22 400 1 3 50 0 0 -2 gen 13 9 23 400 1 3 50 100 60 -2 gen 13 9 24 400 1 3 50 100 60 -2 gen 13 9 25 400 1 3 50 100 60 -2 gen 13 9 26 400 1 3 50 100 60 -2
var searchData= [ ['randomisedenvironment_2ecs',['RandomisedEnvironment.cs',['../_randomised_environment_8cs.html',1,'']]], ['randomwalk_2ecs',['RandomWalk.cs',['../_random_walk_8cs.html',1,'']]], ['ray_2ecs',['Ray.cs',['../_ray_8cs.html',1,'']]], ['raycastsensor_2ecs',['RaycastSensor.cs',['../_raycast_sensor_8cs.html',1,'']]], ['reacharea_2ecs',['ReachArea.cs',['../_reach_area_8cs.html',1,'']]], ['reachgoal_2ecs',['ReachGoal.cs',['../_reach_goal_8cs.html',1,'']]], ['reaction_2ecs',['Reaction.cs',['../_reaction_8cs.html',1,'']]], ['reactionparameters_2ecs',['ReactionParameters.cs',['../_reaction_parameters_8cs.html',1,'']]], ['reactions_2ecs',['Reactions.cs',['../_reactions_8cs.html',1,'']]], ['readme_2emd',['README.md',['../_r_e_a_d_m_e_8md.html',1,'']]], ['rendertexturelist_2ecs',['RenderTextureList.cs',['../_render_texture_list_8cs.html',1,'']]], ['replacementshadereffect_2ecs',['ReplacementShaderEffect.cs',['../_replacement_shader_effect_8cs.html',1,'']]], ['resetablecomponentmenupath_2ecs',['ResetableComponentMenuPath.cs',['../_resetable_component_menu_path_8cs.html',1,'']]], ['restinarea_2ecs',['RestInArea.cs',['../_rest_in_area_8cs.html',1,'']]], ['rgbmcubedskyboxinspector_2ecs',['RgbmCubedSkyboxInspector.cs',['../_rgbm_cubed_skybox_inspector_8cs.html',1,'']]], ['rigidbody1dofactuator_2ecs',['Rigidbody1DofActuator.cs',['../_rigidbody1_dof_actuator_8cs.html',1,'']]], ['rigidbody3dofactuator_2ecs',['Rigidbody3DofActuator.cs',['../_rigidbody3_dof_actuator_8cs.html',1,'']]], ['rigidbodyactuator_2ecs',['RigidbodyActuator.cs',['../_rigidbody_actuator_8cs.html',1,'']]], ['rigidbodyconfigurable_2ecs',['RigidbodyConfigurable.cs',['../_rigidbody_configurable_8cs.html',1,'']]], ['rigidbodysensor_2ecs',['RigidbodySensor.cs',['../_rigidbody_sensor_8cs.html',1,'']]], ['rocketactuator_2ecs',['RocketActuator.cs',['../_rocket_actuator_8cs.html',1,'']]], ['rotationactuator_2ecs',['RotationActuator.cs',['../_rotation_actuator_8cs.html',1,'']]], ['rotationconfigurable_2ecs',['RotationConfigurable.cs',['../_rotation_configurable_8cs.html',1,'']]], ['rotationsensor_2ecs',['RotationSensor.cs',['../_rotation_sensor_8cs.html',1,'']]] ];
#!/usr/bin/env bash set -e echo "Updating pythonpath..." export PYTHONPATH=/opt/lfg/django:$PYTHONPATH echo "Reloading env variables..." . /opt/lfg/env echo "Displaying env vars for debugging..." env echo "Starting server..." make prodserver
<reponame>nepalez/separator<filename>spec/shared/generator.rb # encoding: utf-8 # Generates the condition object with regexp def generate(regexp) klass = Class.new(Selector::Condition) klass.send(:define_method, :[]) { |value| nil ^ value[regexp] } klass.new end
#include "syscall.h" #define NB 10 /* * Creation de plusieurs threads utilisateur qui affichent des caractères. * Le thread 1 doit afficher 'X' et le caractère 'a' passé en paramètre de UserThreadCreate. * Le thread 2 doit afficher 'Y' et 'b' passé en paramètre de UserThreadCreate. * Bug: * Le thread 1 affiche 'X' et 'b'. */ void g1(void *arg) { char n = *(char*) arg; PutChar('X'); PutChar(n); PutChar('\n'); UserThreadExit(); } void g2(void *arg) { char n = *(char*) arg; PutChar('Y'); PutChar(n); PutChar('\n'); UserThreadExit(); } int main(){ char a = 'a'; char b = 'b'; UserThreadCreate(g1, (void*) &a); UserThreadCreate(g2, (void*) &b); return 0; }
""" Generate a code snippet to print an ASCII tree of a given height """ def draw_tree(height): for i in range(height): for j in range(i+1): print('*', end='') print() if __name__ == '__main__': draw_tree(5) """ Output: * ** *** **** ***** """
#!/bin/bash #/ Usage: bin/strap.sh [--debug] #/ Install development dependencies on macOS. set -e [[ "$1" = "--debug" || -o xtrace ]] && STRAP_DEBUG="1" STRAP_SUCCESS="" sudo_askpass() { if [ -n "$SUDO_ASKPASS" ]; then sudo --askpass "$@" else sudo "$@" fi } cleanup() { set +e sudo_askpass rm -rf "$CLT_PLACEHOLDER" "$SUDO_ASKPASS" "$SUDO_ASKPASS_DIR" sudo --reset-timestamp if [ -z "$STRAP_SUCCESS" ]; then if [ -n "$STRAP_STEP" ]; then echo "!!! $STRAP_STEP FAILED" >&2 else echo "!!! FAILED" >&2 fi if [ -z "$STRAP_DEBUG" ]; then echo "!!! Run '$0 --debug' for debugging output." >&2 echo "!!! If you're stuck: file an issue with debugging output at:" >&2 echo "!!! $STRAP_ISSUES_URL" >&2 fi fi } trap "cleanup" EXIT if [ -n "$STRAP_DEBUG" ]; then set -x else STRAP_QUIET_FLAG="-q" Q="$STRAP_QUIET_FLAG" fi STDIN_FILE_DESCRIPTOR="0" [ -t "$STDIN_FILE_DESCRIPTOR" ] && STRAP_INTERACTIVE="1" # Set by web/app.rb # STRAP_GIT_NAME= # STRAP_GIT_EMAIL= # STRAP_GITHUB_USER= # STRAP_GITHUB_TOKEN= # CUSTOM_HOMEBREW_TAP= # CUSTOM_BREW_COMMAND= STRAP_ISSUES_URL='https://github.com/barklyprotects/strap/issues/new' # We want to always prompt for sudo password at least once rather than doing # root stuff unexpectedly. sudo --reset-timestamp # functions for turning off debug for use when handling the user password clear_debug() { set +x } reset_debug() { if [ -n "$STRAP_DEBUG" ]; then set -x fi } # Initialise (or reinitialise) sudo to save unhelpful prompts later. sudo_init() { if [ -z "$STRAP_INTERACTIVE" ]; then return fi local SUDO_PASSWORD SUDO_PASSWORD_SCRIPT if ! sudo --validate --non-interactive &>/dev/null; then while true; do read -rsp "--> Enter your password (for sudo access):" SUDO_PASSWORD echo if sudo --validate --stdin 2>/dev/null <<<"$SUDO_PASSWORD"; then break fi unset SUDO_PASSWORD echo "!!! Wrong password!" >&2 done clear_debug SUDO_PASSWORD_SCRIPT="$(cat <<BASH #!/bin/bash echo "$SUDO_PASSWORD" BASH )" unset SUDO_PASSWORD SUDO_ASKPASS_DIR="$(mktemp -d)" SUDO_ASKPASS="$(mktemp "$SUDO_ASKPASS_DIR"/strap-askpass-XXXXXXXX)" chmod 700 "$SUDO_ASKPASS_DIR" "$SUDO_ASKPASS" bash -c "cat > '$SUDO_ASKPASS'" <<<"$SUDO_PASSWORD_SCRIPT" unset SUDO_PASSWORD_SCRIPT reset_debug export SUDO_ASKPASS fi } sudo_refresh() { clear_debug if [ -n "$SUDO_ASKPASS" ]; then sudo --askpass --validate else sudo_init fi reset_debug } abort() { STRAP_STEP=""; echo "!!! $*" >&2; exit 1; } log() { STRAP_STEP="$*"; sudo_refresh; echo "--> $*"; } logn() { STRAP_STEP="$*"; sudo_refresh; printf -- "--> %s " "$*"; } logk() { STRAP_STEP=""; echo "OK"; } escape() { printf '%s' "${1//\'/\'}" } # Given a list of scripts in the dotfiles repo, run the first one that exists run_dotfile_scripts() { if [ -d ~/.dotfiles ]; then ( cd ~/.dotfiles for i in "$@"; do if [ -f "$i" ] && [ -x "$i" ]; then log "Running dotfiles $i:" if [ -z "$STRAP_DEBUG" ]; then "$i" 2>/dev/null else "$i" fi break fi done ) fi } [ "$USER" = "root" ] && abort "Run Strap as yourself, not root." groups | grep $Q -E "\b(admin)\b" || abort "Add $USER to the admin group." # Prevent sleeping during script execution, as long as the machine is on AC power caffeinate -s -w $$ & # Set some basic security settings. logn "Configuring security settings:" defaults write com.apple.Safari \ com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled \ -bool false defaults write com.apple.Safari \ com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabledForLocalFiles \ -bool false defaults write com.apple.screensaver askForPassword -int 1 defaults write com.apple.screensaver askForPasswordDelay -int 0 sudo_askpass defaults write /Library/Preferences/com.apple.alf globalstate -int 1 sudo_askpass launchctl load /System/Library/LaunchDaemons/com.apple.alf.agent.plist 2>/dev/null if [ -n "$STRAP_GIT_NAME" ] && [ -n "$STRAP_GIT_EMAIL" ]; then LOGIN_TEXT=$(escape "Found this computer? Please contact $STRAP_GIT_NAME at $STRAP_GIT_EMAIL.") echo "$LOGIN_TEXT" | grep -q '[()]' && LOGIN_TEXT="'$LOGIN_TEXT'" sudo_askpass defaults write /Library/Preferences/com.apple.loginwindow \ LoginwindowText \ "$LOGIN_TEXT" fi logk # Check and enable full-disk encryption. logn "Checking full-disk encryption status:" if fdesetup status | grep $Q -E "FileVault is (On|Off, but will be enabled after the next restart)."; then logk elif [ -n "$STRAP_CI" ]; then echo "SKIPPED (for CI)" elif [ -n "$STRAP_INTERACTIVE" ]; then echo log "Enabling full-disk encryption on next reboot:" sudo_askpass fdesetup enable -user "$USER" \ | tee ~/Desktop/"FileVault Recovery Key.txt" logk else echo abort "Run 'sudo fdesetup enable -user \"$USER\"' to enable full-disk encryption." fi # Install the Xcode Command Line Tools. if ! [ -f "/Library/Developer/CommandLineTools/usr/bin/git" ] then log "Installing the Xcode Command Line Tools:" CLT_PLACEHOLDER="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress" sudo_askpass touch "$CLT_PLACEHOLDER" CLT_PACKAGE=$(softwareupdate -l | \ grep -B 1 "Command Line Tools" | \ awk -F"*" '/^ *\*/ {print $2}' | \ sed -e 's/^ *Label: //' -e 's/^ *//' | \ sort -V | tail -n1) sudo_askpass softwareupdate -i "$CLT_PACKAGE" sudo_askpass rm -f "$CLT_PLACEHOLDER" if ! [ -f "/Library/Developer/CommandLineTools/usr/bin/git" ] then if [ -n "$STRAP_INTERACTIVE" ]; then echo logn "Requesting user install of Xcode Command Line Tools:" xcode-select --install else echo abort "Run 'xcode-select --install' to install the Xcode Command Line Tools." fi fi logk fi # Check if the Xcode license is agreed to and agree if not. xcode_license() { if /usr/bin/xcrun clang 2>&1 | grep $Q license; then if [ -n "$STRAP_INTERACTIVE" ]; then logn "Asking for Xcode license confirmation:" sudo_askpass xcodebuild -license logk else abort "Run 'sudo xcodebuild -license' to agree to the Xcode license." fi fi } xcode_license # Setup Git configuration. logn "Configuring Git:" if [ -n "$STRAP_GIT_NAME" ] && ! git config user.name >/dev/null; then git config --global user.name "$STRAP_GIT_NAME" fi if [ -n "$STRAP_GIT_EMAIL" ] && ! git config user.email >/dev/null; then git config --global user.email "$STRAP_GIT_EMAIL" fi if [ -n "$STRAP_GITHUB_USER" ] && [ "$(git config github.user)" != "$STRAP_GITHUB_USER" ]; then git config --global github.user "$STRAP_GITHUB_USER" fi # Squelch git 2.x warning message when pushing if ! git config push.default >/dev/null; then git config --global push.default simple fi # Setup GitHub HTTPS credentials. if git credential-osxkeychain 2>&1 | grep $Q "git.credential-osxkeychain" then if [[ "$(git config --global credential.helper)" != *"osxkeychain"* ]] then git config --global credential.helper osxkeychain fi if [ -n "$STRAP_GITHUB_USER" ] && [ -n "$STRAP_GITHUB_TOKEN" ] then printf "protocol=https\\nhost=github.com\\n" | git credential reject printf "protocol=https\\nhost=github.com\\nusername=%s\\npassword=%s\\n" \ "$STRAP_GITHUB_USER" "$STRAP_GITHUB_TOKEN" \ | git credential approve fi fi logk # Setup Homebrew directory and permissions. logn "Installing Homebrew:" HOMEBREW_PREFIX="$(brew --prefix 2>/dev/null || true)" HOMEBREW_REPOSITORY="$(brew --repository 2>/dev/null || true)" if [ -z "$HOMEBREW_PREFIX" ] || [ -z "$HOMEBREW_REPOSITORY" ]; then UNAME_MACHINE="$(/usr/bin/uname -m)" if [[ "$UNAME_MACHINE" == "arm64" ]]; then HOMEBREW_PREFIX="/opt/homebrew" HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}" else HOMEBREW_PREFIX="/usr/local" HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}/Homebrew" fi fi [ -d "$HOMEBREW_PREFIX" ] || sudo_askpass mkdir -p "$HOMEBREW_PREFIX" if [ "$HOMEBREW_PREFIX" = "/usr/local" ] then sudo_askpass chown "root:wheel" "$HOMEBREW_PREFIX" 2>/dev/null || true fi ( cd "$HOMEBREW_PREFIX" sudo_askpass mkdir -p Cellar Caskroom Frameworks bin etc include lib opt sbin share var sudo_askpass chown "$USER:admin" Cellar Caskroom Frameworks bin etc include lib opt sbin share var ) [ -d "$HOMEBREW_REPOSITORY" ] || sudo_askpass mkdir -p "$HOMEBREW_REPOSITORY" sudo_askpass chown -R "$USER:admin" "$HOMEBREW_REPOSITORY" if [ $HOMEBREW_PREFIX != $HOMEBREW_REPOSITORY ] then ln -sf "$HOMEBREW_REPOSITORY/bin/brew" "$HOMEBREW_PREFIX/bin/brew" fi # Download Homebrew. export GIT_DIR="$HOMEBREW_REPOSITORY/.git" GIT_WORK_TREE="$HOMEBREW_REPOSITORY" git init $Q git config remote.origin.url "https://github.com/Homebrew/brew" git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" git fetch $Q --tags --force git reset $Q --hard origin/master unset GIT_DIR GIT_WORK_TREE logk # Update Homebrew. export PATH="$HOMEBREW_PREFIX/bin:$PATH" logn "Updating Homebrew:" brew update --quiet logk # Install Homebrew Bundle, Cask and Services tap. log "Installing Homebrew taps and extensions:" brew bundle --quiet --file=- <<RUBY tap "homebrew/cask" tap "homebrew/core" tap "homebrew/services" RUBY logk # Check and install any remaining software updates. logn "Checking for software updates:" if softwareupdate -l 2>&1 | grep $Q "No new software available."; then logk else echo log "Installing software updates:" if [ -z "$STRAP_CI" ]; then sudo_askpass softwareupdate --install --all xcode_license logk else echo "SKIPPED (for CI)" fi fi # Setup dotfiles if [ -n "$STRAP_GITHUB_USER" ]; then DOTFILES_URL="https://github.com/$STRAP_GITHUB_USER/dotfiles" if git ls-remote "$DOTFILES_URL" &>/dev/null; then log "Fetching $STRAP_GITHUB_USER/dotfiles from GitHub:" if [ ! -d "$HOME/.dotfiles" ]; then log "Cloning to ~/.dotfiles:" git clone $Q "$DOTFILES_URL" ~/.dotfiles else ( cd ~/.dotfiles git pull $Q --rebase --autostash ) fi run_dotfile_scripts script/setup script/bootstrap logk fi fi # Setup Brewfile if [ -n "$STRAP_GITHUB_USER" ] && { [ ! -f "$HOME/.Brewfile" ] || [ "$HOME/.Brewfile" -ef "$HOME/.homebrew-brewfile/Brewfile" ]; }; then HOMEBREW_BREWFILE_URL="https://github.com/$STRAP_GITHUB_USER/homebrew-brewfile" if git ls-remote "$HOMEBREW_BREWFILE_URL" &>/dev/null; then log "Fetching $STRAP_GITHUB_USER/homebrew-brewfile from GitHub:" if [ ! -d "$HOME/.homebrew-brewfile" ]; then log "Cloning to ~/.homebrew-brewfile:" git clone $Q "$HOMEBREW_BREWFILE_URL" ~/.homebrew-brewfile logk else ( cd ~/.homebrew-brewfile git pull $Q ) fi ln -sf ~/.homebrew-brewfile/Brewfile ~/.Brewfile logk fi fi # Install from local Brewfile if [ -f "$HOME/.Brewfile" ]; then log "Installing from user Brewfile on GitHub:" brew bundle check --global || brew bundle --global logk fi # Tap a custom Homebrew tap if [ -n "$CUSTOM_HOMEBREW_TAP" ]; then read -ra CUSTOM_HOMEBREW_TAP <<< "$CUSTOM_HOMEBREW_TAP" log "Running 'brew tap ${CUSTOM_HOMEBREW_TAP[*]}':" brew tap "${CUSTOM_HOMEBREW_TAP[@]}" logk fi # Run a custom `brew` command if [ -n "$CUSTOM_BREW_COMMAND" ]; then log "Executing 'brew $CUSTOM_BREW_COMMAND':" # shellcheck disable=SC2086 brew $CUSTOM_BREW_COMMAND logk fi # Run post-install dotfiles script run_dotfile_scripts script/strap-after-setup STRAP_SUCCESS="1" log "Your system is now Strap'd!"
var searchFilter = searchFilter ||  {}; searchFilter.data = function (searchElement, mainElement, subElements, searching) { var search = $(searchElement), container = $(mainElement), sub = container.find($(subElements)), filterSearch = search.val().toLowerCase(); for (i = 0; i < sub.length; i++) { var element = sub.eq(i).find(searching).eq(0); if (element.text().toLowerCase().indexOf(filterSearch) > -1) { sub.eq(i).find(searching).eq(0).css("display", "block"); } else { sub.eq(i).find(searching).eq(0).css("display", "none"); } } }
<filename>tdt4250.mush.model/src/tdt4250/mush/model/Variable.java /** */ package tdt4250.mush.model; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Variable</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link tdt4250.mush.model.Variable#getName <em>Name</em>}</li> * <li>{@link tdt4250.mush.model.Variable#getValue <em>Value</em>}</li> * <li>{@link tdt4250.mush.model.Variable#getType <em>Type</em>}</li> * <li>{@link tdt4250.mush.model.Variable#getOp <em>Op</em>}</li> * </ul> * * @see tdt4250.mush.model.MushPackage#getVariable() * @model * @generated */ public interface Variable extends Expression { /** * Returns the value of the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Name</em>' attribute. * @see #setName(String) * @see tdt4250.mush.model.MushPackage#getVariable_Name() * @model * @generated */ String getName(); /** * Sets the value of the '{@link tdt4250.mush.model.Variable#getName <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Name</em>' attribute. * @see #getName() * @generated */ void setName(String value); /** * Returns the value of the '<em><b>Value</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Value</em>' containment reference. * @see #setValue(Expression) * @see tdt4250.mush.model.MushPackage#getVariable_Value() * @model containment="true" * @generated */ Expression getValue(); /** * Sets the value of the '{@link tdt4250.mush.model.Variable#getValue <em>Value</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Value</em>' containment reference. * @see #getValue() * @generated */ void setValue(Expression value); /** * Returns the value of the '<em><b>Type</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Type</em>' containment reference. * @see #setType(Type) * @see tdt4250.mush.model.MushPackage#getVariable_Type() * @model containment="true" * @generated */ Type getType(); /** * Sets the value of the '{@link tdt4250.mush.model.Variable#getType <em>Type</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Type</em>' containment reference. * @see #getType() * @generated */ void setType(Type value); /** * Returns the value of the '<em><b>Op</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Op</em>' attribute. * @see #setOp(String) * @see tdt4250.mush.model.MushPackage#getVariable_Op() * @model * @generated */ String getOp(); /** * Sets the value of the '{@link tdt4250.mush.model.Variable#getOp <em>Op</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Op</em>' attribute. * @see #getOp() * @generated */ void setOp(String value); } // Variable
//T(n) = log2(n) #include <iostream> using namespace std; int main(){ int i, j;//contadores int x;//aux int cont; int n;//tamanho do problema cin >> n; cont = 0; i = 1; while(i < n){ x = i * 2; i *= 2; cont ++; } cout << cont << endl; return 0; }
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" elif [ -r "$1" ]; then local source="$1" fi local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." source="$(readlink "${source}")" fi # use filter instead of exclude so missing patterns dont' throw errors echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" if ! [ -r "$binary" ]; then binary="${destination}/${basename}" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then strip_invalid_archs "$binary" fi # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" code_sign_if_enabled "${destination}/${lib}" done fi } # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" fi echo "$code_sign_cmd" eval "$code_sign_cmd" fi } # Strip invalid architectures strip_invalid_archs() { binary="$1" # Get architectures for current file archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi } if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "$BUILT_PRODUCTS_DIR/Jelly/Jelly.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "$BUILT_PRODUCTS_DIR/Jelly/Jelly.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi
<filename>src/main/java/cn/gobyte/apply/security/config/MvcConfig.java package cn.gobyte.apply.security.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /* TODO: 权限页面控制器;该类负责主页、登录页面跳转的 * @author shanLan <EMAIL> * @date 2019/4/1 0:07 */ @Configuration public class MvcConfig implements WebMvcConfigurer { public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/home").setViewName("homes"); registry.addViewController("/").setViewName("indexs"); registry.addViewController("/hello").setViewName("hello"); registry.addViewController("/login").setViewName("indexs"); } }
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by <NAME>, <EMAIL>, All rights reserved. # LLNL-CODE-647188 # # For details, see https://github.com/spack/spack # Please also see the NOTICE and LICENSE files for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (as # published by the Free Software Foundation) version 2.1, February 1999. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and # conditions of the GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * class RPermute(RPackage): """A set of restricted permutation designs for freely exchangeable, line transects (time series), and spatial grid designs plus permutation of blocks (groups of samples) is provided. 'permute' also allows split-plot designs, in which the whole-plots or split-plots or both can be freely-exchangeable or one of the restricted designs. The 'permute' package is modelled after the permutation schemes of 'Canoco 3.1' (and later) by Cajo ter Braak.""" homepage = "https://github.com/gavinsimpson/permute" url = "https://cran.r-project.org/src/contrib/permute_0.9-4.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/permute" version('0.9-4', '569fc2442d72a1e3b7e2d456019674c9') depends_on('r@2.14:')
if [[ "$OSTYPE" == "msys" ]]; then alias apache='~/Apache24/bin/httpd.exe' alias hibernate="rundll32.exe powrprof.dll,SetSuspendState" alias ifconfig="ipconfig -all" alias lock="rundll32.exe user32.dll,LockWorkStation" else alias apache='sudo /opt/apache2/bin/httpd' fi
load test_helpers setup() { load "${BATS_UTILS_PATH}/bats-support/load.bash" load "${BATS_UTILS_PATH}/bats-assert/load.bash" cd ./tests/command_after } @test "command_after: should run after script if cmd string" { run lets cmd-with-after assert_success assert_line --index 0 "Main" assert_line --index 1 "After" } @test "command_after: should run after script if cmd as map" { run lets cmd-as-map-with-after assert_success assert_line --index 0 "Main" assert_line --index 1 "After" } @test "command_after: should not shadow exit code from cmd" { run lets failure [[ $status = 113 ]] assert_line --index 0 "After" } @test "command_after: should not shadow exit code from cmd-as-map" { run lets failure-as-map [[ $status = 113 ]] assert_line --index 0 "After" }
<gh_stars>0 /* * 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 brooklyn.location.basic; import static com.google.common.base.Preconditions.checkNotNull; import java.util.List; import java.util.Map; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import brooklyn.location.Location; import brooklyn.location.LocationRegistry; import brooklyn.location.LocationResolver; import brooklyn.location.LocationSpec; import brooklyn.management.ManagementContext; import brooklyn.util.collections.MutableMap; import brooklyn.util.exceptions.Exceptions; import brooklyn.util.text.KeyValueParser; import brooklyn.util.text.StringEscapes.JavaStringEscapes; import com.google.common.collect.Lists; public class MultiLocationResolver implements LocationResolver { private static final Logger LOG = LoggerFactory.getLogger(MultiLocationResolver.class); private static final String MULTI = "multi"; private static final Pattern PATTERN = Pattern.compile("(" + MULTI + "|" + MULTI.toUpperCase() + ")" + ":" + "\\((.*)\\)$"); private volatile ManagementContext managementContext; @Override public void init(ManagementContext managementContext) { this.managementContext = checkNotNull(managementContext, "managementContext"); } @Override public Location newLocationFromString(Map locationFlags, String spec, brooklyn.location.LocationRegistry registry) { // FIXME pass all flags into the location Map globalProperties = registry.getProperties(); Map<String,?> locationArgs; if (spec.equalsIgnoreCase(MULTI)) { locationArgs = MutableMap.copyOf(locationFlags); } else { Matcher matcher = PATTERN.matcher(spec); if (!matcher.matches()) { throw new IllegalArgumentException("Invalid location '" + spec + "'; must specify something like multi(targets=named:foo)"); } String args = matcher.group(2); // TODO we are ignoring locationFlags after this (apart from named), looking only at these args locationArgs = KeyValueParser.parseMap(args); } String namedLocation = (String) locationFlags.get("named"); Map<String, Object> filteredProperties = new LocationPropertiesFromBrooklynProperties().getLocationProperties(null, namedLocation, globalProperties); MutableMap<String, Object> flags = MutableMap.<String, Object>builder() .putAll(filteredProperties) .putAll(locationFlags) .removeAll("named") .putAll(locationArgs).build(); if (locationArgs.get("targets") == null) { throw new IllegalArgumentException("target must be specified in single-machine spec"); } // TODO do we need to pass location flags etc into the children to ensure they are inherited? List<Location> targets = Lists.newArrayList(); Object targetSpecs = locationArgs.remove("targets"); try { if (targetSpecs instanceof String) { for (String targetSpec : JavaStringEscapes.unwrapJsonishListIfPossible((String)targetSpecs)) { targets.add(managementContext.getLocationRegistry().resolve(targetSpec)); } } else if (targetSpecs instanceof Iterable) { for (Object targetSpec: (Iterable<?>)targetSpecs) { if (targetSpec instanceof String) { targets.add(managementContext.getLocationRegistry().resolve((String)targetSpec)); } else { Set<?> keys = ((Map<?,?>)targetSpec).keySet(); if (keys.size()!=1) throw new IllegalArgumentException("targets supplied to MultiLocation must be a list of single-entry maps (got map of size "+keys.size()+": "+targetSpec+")"); Object key = keys.iterator().next(); Object flagsS = ((Map<?,?>)targetSpec).get(key); targets.add(managementContext.getLocationRegistry().resolve((String)key, (Map<?,?>)flagsS)); } } } else throw new IllegalArgumentException("targets must be supplied to MultiLocation, either as string spec or list of single-entry maps each being a location spec"); MultiLocation result = managementContext.getLocationManager().createLocation(LocationSpec.create(MultiLocation.class) .configure(flags) .configure("subLocations", targets) .configure(LocationConfigUtils.finalAndOriginalSpecs(spec, locationFlags, globalProperties, namedLocation))); // TODO Important workaround for BasicLocationRegistry.resolveForPeeking. // That creates a location (from the resolver) and immediately unmanages it. // The unmanage *must* remove all the targets created here; otherwise we have a leak. // Adding the targets as children achieves this. for (Location target : targets) { target.setParent(result); } return result; } catch (Exception e) { // Must clean up after ourselves: don't leak sub-locations on error if (LOG.isDebugEnabled()) LOG.debug("Problem resolving MultiLocation; cleaning up any sub-locations and rethrowing: "+e); for (Location target : targets) { Locations.unmanage(target); } throw Exceptions.propagate(e); } } @Override public String getPrefix() { return MULTI; } @Override public boolean accepts(String spec, LocationRegistry registry) { return BasicLocationRegistry.isResolverPrefixForSpec(this, spec, true); } }
import { IAchievementPrerequisite, ICraftingPrerequisite, IRecipe } from "../api"; import { getFromMapNum, getFromMapStr } from "./mapoperations"; export interface IBaseComputerNode { neededAmount: number; ownedAmount: number; } export interface IBaseComputerItemNode extends IBaseComputerNode { itemId: number; recipes: IBaseComputerNodeRecipe[]; } export function isBaseComputerItemNode( n: IBaseComputerItemNode | IBaseComputerCurrencyNode | IBaseComputerAchievementNode): n is IBaseComputerItemNode { throw new Error("NotImplemented"); } export interface IBaseComputerNodeRecipe { amount: number; type: "MysticForge" | "Salvage" | "Vendor" | "Charge" | "DoubleClick" | "Achievement" | "Crafting"; ingredients: Array<IBaseComputerItemNode | IBaseComputerCurrencyNode | IBaseComputerAchievementNode>; results: IBaseComputerNode[]; prerequisites: Array<IAchievementPrerequisite | ICraftingPrerequisite>; } export interface IBaseComputerCurrencyNode extends IBaseComputerNode { currencyName: string; } export interface IBaseComputerAchievementNode extends IBaseComputerNode { achievementId: number; } const computer = ( rootItemId: number, getRecipes: (outputId: number) => Promise<IRecipe[]>, ownedItems: { [id: number]: number }, ownedCurrencies: { [name: string]: number }, ): Promise<IBaseComputerItemNode> => { /*const innerComputer = (itemId: number, amount: number) => { const currentlyOwnedAmount = getFromMapNum(ownedItems, itemId); const usedAmount = Math.min(amount, currentlyOwnedAmount); const newOwnedItems = removeFromMapNum(ownedItems, itemId, usedAmount); if(currentlyOwnedAmount >= amount) { } }; return innerComputer(rootItemId, 1);*/ throw new Error("NotImplemented"); }; export default computer;
public function pictureStore(Request $request) { $this->validate($request, [ 'foto.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg', ]); if ($request->hasfile('foto')) { foreach ($request->file('foto') as $file) { $name_file = "Lumban-Gaol_Foto-" . rand() . "-" . time() . "." . $file->getClientOriginalExtension(); // Further processing and storage of the validated file can be implemented here } } }
#!/usr/bin/env bash # PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here # will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also # benefit from the improvement. set -xeuo pipefail export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh ( endgroup "Start Docker" ) 2> /dev/null ( startgroup "Configuring conda" ) 2> /dev/null export PYTHONUNBUFFERED=1 export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc <<CONDARC conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC GET_BOA=boa BUILD_CMD=mambabuild conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup # Install the yum requirements defined canonically in the # "recipe/yum_requirements.txt" file. After updating that file, # run "conda smithy rerender" and this line will be updated # automatically. /usr/bin/sudo -n yum install -y crontabs firefox # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" ( endgroup "Configuring conda" ) 2> /dev/null if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" fi conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" # Drop into an interactive shell /bin/bash else conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" ( endgroup "Validating outputs" ) 2> /dev/null ( startgroup "Uploading packages" ) 2> /dev/null if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" fi ( endgroup "Uploading packages" ) 2> /dev/null fi ( startgroup "Final checks" ) 2> /dev/null touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}"
// Define the macro for infinite casting from one numeric type to another macro_rules! impl_inf_cast_from { ($from:ty, $to:ty) => { impl InfCast for $from { fn inf_cast(self) -> $to { self as $to } } }; } // Define the macro for infinite casting between integer and floating-point types macro_rules! impl_inf_cast_int_float { ($from:ty, $to:ty) => { impl InfCast for $from { fn inf_cast(self) -> $to { self as $to } } impl InfCast for $to { fn inf_cast(self) -> $from { self as $from } } }; } // Define the trait for infinite casting trait InfCast { fn inf_cast(self) -> Self; } // Implement the infinite casting for u32 to f64 impl_inf_cast_from!(u32, f64); // Implement the infinite casting for i32 to f32 and vice versa impl_inf_cast_int_float!(i32, f32);
package io.swagger.model.pheno; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import org.springframework.validation.annotation.Validated; /** * ObservationVariableNewRequest */ @Validated @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-03-20T16:32:22.556Z[GMT]") public class ObservationVariableNewRequest extends VariableBaseClass { @JsonProperty("observationVariableName") private String observationVariableName = null; public ObservationVariableNewRequest observationVariableName(String observationVariableName) { this.observationVariableName = observationVariableName; return this; } public String getObservationVariableName() { return observationVariableName; } public void setObservationVariableName(String observationVariableName) { this.observationVariableName = observationVariableName; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ObservationVariableNewRequest observationVariableNewRequest = (ObservationVariableNewRequest) o; return Objects.equals(this.observationVariableName, observationVariableNewRequest.observationVariableName) && super.equals(o); } @Override public int hashCode() { return Objects.hash(observationVariableName, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ObservationVariableNewRequest {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" observationVariableName: ").append(toIndentedString(observationVariableName)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
set -aux DATA_PATH='data/' if [ ! -d $DATA_PATH ]; then mkdir ${DATA_PATH} fi if [ ! -d $DATA_PATH'VOC' ]; then wget https://oneflow-static.oss-cn-beijing.aliyuncs.com/train_data_zjlab/VOC2012.zip unzip VOC2012.zip -d $DATA_PATH fi PRETRAIN_MODEL_PATH="vgg_imagenet_pretrain_model/" MODEL="vgg16" #choose from vgg16, vgg16_bn, vgg19, vgg19_bn if [ ! -d "$PRETRAIN_MODEL_PATH" ]; then mkdir ${PRETRAIN_MODEL_PATH} fi if [ ! -d "${PRETRAIN_MODEL_PATH}${MODEL}_oneflow_model" ]; then wget https://oneflow-public.oss-cn-beijing.aliyuncs.com/model_zoo/cv/classification/vgg_models/${MODEL}_oneflow_model.tar.gz tar zxf ${MODEL}_oneflow_model.tar.gz --directory ${PRETRAIN_MODEL_PATH} fi LEARNING_RATE=0.0002 WEIGHT_DECAY_A=0.5 WEIGHT_DECAY_B=0.999 EPOCH=100 BATCH_SIZE=64 HR_SIZE=88 python3 train_of_srgan.py \ --lr $LEARNING_RATE \ --b1 $WEIGHT_DECAY_A \ --b2 $WEIGHT_DECAY_B \ --num_epochs $EPOCH \ --batch_size $BATCH_SIZE \ --data_dir $DATA_PATH'VOC' \ --vgg_path ${PRETRAIN_MODEL_PATH}${MODEL}_oneflow_model \ --hr_size $HR_SIZE
<gh_stars>0 import browser from "./browser" import device from "./device" import operatingSystem from "./operatingsystem" import screen from "./screen" import windowInfo from "./window" export default function browserInfo() { return { browser: browser.browser(), device: { height: device.pixelHeight(), pixelRatio: device.pixelRatio(), width: device.pixelWidth(), }, operatingSystem: operatingSystem.operatingSystem(), screen: { colorDepth: screen.screenColorDepth(), height: screen.screenHeight(), touchEvents: screen.screenSupportTouch(), width: screen.screenWidth(), }, window: { height: windowInfo.windowHeight(), screenX: windowInfo.windowScreenX(), width: windowInfo.windowWidth(), }, }; }
import random lst = random.sample(range(10, 21), 10) print(lst)
from typing import List def get_mx_records(domain: str) -> List[str]: if domain.endswith('.com'): # Replace with actual logic to determine domain provider mx_records = MXRecords().get_mx_records(domain) elif domain.endswith('.google.com'): # Replace with actual logic to determine Google domain mx_records = GoogleMXRecords().get_mx_records(domain) elif domain.endswith('.cloudflare.com'): # Replace with actual logic to determine Cloudflare domain mx_records = CFlareRecord().get_mx_records(domain) else: raise ValueError("Unsupported domain provider") return mx_records
<gh_stars>10-100 package io.opensphere.core.cache.jdbc; import java.io.NotSerializableException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.log4j.Logger; import gnu.trove.list.TIntList; import gnu.trove.map.hash.TIntObjectHashMap; import io.opensphere.core.cache.Cache; import io.opensphere.core.cache.CacheDeposit; import io.opensphere.core.cache.CacheException; import io.opensphere.core.cache.CacheModificationListener; import io.opensphere.core.cache.CacheRemovalListener; import io.opensphere.core.cache.ClassProvider; import io.opensphere.core.cache.PropertyValueMap; import io.opensphere.core.cache.SingleSatisfaction; import io.opensphere.core.cache.accessor.PersistentPropertyAccessor; import io.opensphere.core.cache.accessor.PropertyAccessor; import io.opensphere.core.cache.jdbc.ConnectionAppropriator.ConnectionUser; import io.opensphere.core.cache.jdbc.StatementAppropriator.StatementUser; import io.opensphere.core.cache.matcher.IntervalPropertyMatcher; import io.opensphere.core.cache.matcher.PropertyMatcher; import io.opensphere.core.cache.matcher.PropertyMatcherUtilities; import io.opensphere.core.cache.util.IntervalPropertyValueSet; import io.opensphere.core.cache.util.PropertyDescriptor; import io.opensphere.core.data.util.DataModelCategory; import io.opensphere.core.data.util.OrderSpecifier; import io.opensphere.core.data.util.Satisfaction; import io.opensphere.core.model.Accumulator; import io.opensphere.core.util.TimingMessageProvider; import io.opensphere.core.util.Utilities; import io.opensphere.core.util.collections.CollectionUtilities; import io.opensphere.core.util.collections.New; import io.opensphere.core.util.concurrent.InlineExecutor; import io.opensphere.core.util.lang.ImpossibleException; import io.opensphere.core.util.lang.StringUtilities; /** * JDBC implementation of the {@link Cache} interface. */ @SuppressWarnings("PMD.GodClass") public class JdbcCacheImpl implements Cache { /** Schema version. */ public static final String SCHEMA_VERSION = "17"; /** Logger reference. */ private static final Logger LOGGER = Logger.getLogger(JdbcCacheImpl.class); /** The SQL generator. */ private static final SQLGenerator SQL_GENERATOR = new SQLGeneratorImpl(); /** The type mapper responsible for mapping Java types to database types. */ private static final TypeMapper TYPE_MAPPER = new TypeMapper(); /** Cache utility class. */ private final CacheUtilities myCacheUtil; /** Flag indicating if the cache is closed. */ private volatile boolean myClosed = true; /** The connection appropriator. */ private final ConnectionAppropriator myConnectionAppropriator; /** My connection source. */ private final ConnectionSource myConnectionSource = this::getConnection; /** An in-memory cache of the database state. */ private final DatabaseState myDatabaseState = new DatabaseState(); /** The database task factory. */ private volatile DatabaseTaskFactory myDatabaseTaskFactory; /** A data trimmer. */ private volatile RowLimitDataTrimmer myDataTrimmer; /** Executor for background tasks. */ private final Executor myExecutor; /** Exception indicating if the cache has failed to initialize. */ private volatile CacheException myInitializationFailed; /** * Lock used for situations that require single-threaded database access. */ private final ReadWriteLock myLock = new ReentrantReadWriteLock(); /** The DB password. */ private final String myPassword; /** * The maximum number of rows in the table before trimming occurs. A * negative number indicates no limit. */ private final int myRowLimit; /** The DB url. */ private final String myUrl; /** The DB username. */ private final String myUsername; /** * Create the JDBC cache implementation. * * @param driver The name of the db driver class. * @param url The DB url. * @param username The DB username. * @param password The DB password. * @param rowLimit The maximum number of rows in a table before trimming * occurs. A negative number indicates no limit. * @param executor An executor for background database tasks. * @throws ClassNotFoundException If the DB driver class cannot be found. */ public JdbcCacheImpl(String driver, String url, String username, String password, int rowLimit, ScheduledExecutorService executor) throws ClassNotFoundException { Class.forName(driver); myUrl = url; myUsername = username; myPassword = password; myRowLimit = rowLimit; myCacheUtil = new CacheUtilities(getDbString(), getLock().readLock()); myConnectionAppropriator = new ConnectionAppropriator(myConnectionSource); myExecutor = executor == null ? new InlineExecutor() : executor; } @Override public boolean acceptsPropertyDescriptor(PropertyDescriptor<?> desc) { return getTypeMapper().hasValueTranslator(desc); } @Override public void clear() { if (isClosed()) { return; } Lock writeLock = getLock().writeLock(); writeLock.lock(); try { runTask(getDatabaseTaskFactory().getDeleteNonSessionGroupsTask()); } catch (CacheException e) { LOGGER.error("Failed to clear cache: " + e, e); } finally { writeLock.unlock(); } } @Override public void clear(DataModelCategory dmc, boolean returnIds, CacheRemovalListener listener) throws CacheException { int[] groupIds = getGroupIds(dmc); if (returnIds) { try { getIds(groupIds, (List<? extends PropertyMatcher<?>>)null, (List<? extends OrderSpecifier>)null, 0, Integer.MAX_VALUE); } catch (NotSerializableException e) { throw new ImpossibleException(e); } } clearGroups(groupIds); listener.valuesRemoved(dmc, null); } @Override public void clear(final long[] ids) throws CacheException { if (isClosed() || ids == null || ids.length == 0) { return; } runTask(getDatabaseTaskFactory().getDeleteModelsTask(ids)); } @Override public void clear(long[] ids, CacheRemovalListener listener) throws CacheException { clear(ids); // This implementation does not notify the listener. } @Override public void clearGroups(int[] groupIds) throws CacheException { if (isClosed() || groupIds.length == 0) { return; } runTask(getDatabaseTaskFactory().getDeleteGroupsTask(groupIds)); } @Override public synchronized void close() { if (isClosed()) { return; } try { runTask(getDatabaseTaskFactory().getDeleteSessionGroupsTask()); } catch (CacheException e) { LOGGER.warn("Failed to remove old session groups: " + e, e); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("Closing cache."); } myClosed = true; if (myExecutor instanceof ScheduledExecutorService) { ((ScheduledExecutorService)myExecutor).shutdownNow(); try { ((ScheduledExecutorService)myExecutor).awaitTermination(300, TimeUnit.SECONDS); } catch (InterruptedException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Interrupted while awaiting termination: " + e, e); } } } } @Override public DataModelCategory[] getDataModelCategories(final long[] ids) throws CacheException { if (isClosed() || ids.length == 0) { return New.emptyArray(DataModelCategory.class); } long t0 = System.nanoTime(); int[] groupIds = getGroupIds(ids, false); int[] distinctGroupIds = Utilities.uniqueUnsorted(groupIds); List<DataModelCategory> dataModelCategories = getDataModelCategoriesByGroupId(distinctGroupIds, true, true, true, false); TIntObjectHashMap<DataModelCategory> map = new TIntObjectHashMap<>(); for (int index = 0; index < distinctGroupIds.length; ++index) { map.put(distinctGroupIds[index], dataModelCategories.get(index)); } DataModelCategory[] results = new DataModelCategory[ids.length]; for (int index = 0; index < results.length;) { results[index] = map.get(groupIds[index++]); } if (LOGGER.isDebugEnabled()) { LOGGER.debug(StringUtilities.formatTimingMessage( distinctGroupIds.length + " data model categories retrieved from cache in ", System.nanoTime() - t0)); } return results; } @Override public List<DataModelCategory> getDataModelCategoriesByGroupId(final int[] groupIds, final boolean source, final boolean family, final boolean category, boolean distinct) throws CacheException { if (isClosed() || groupIds.length == 0 || !(source || family || category)) { return Collections.<DataModelCategory>emptyList(); } return runTask(getDatabaseTaskFactory().getRetrieveDataModelCategoriesTask(groupIds, source, family, category, distinct)); } @Override public List<DataModelCategory> getDataModelCategoriesByModelId(final long[] ids, final boolean source, final boolean family, final boolean category) throws CacheException { int[] groupIds = getGroupIds(ids, true); return getDataModelCategoriesByGroupId(groupIds, source, family, category, true); } @Override public int[] getGroupIds(final DataModelCategory category) throws CacheException { if (isClosed()) { return new int[0]; } return runTask(getDatabaseTaskFactory().getRetrieveGroupIdsTask(category, (List<IntervalPropertyMatcher<?>>)null)); } @Override public int[] getGroupIds(final long[] ids, final boolean distinct) { return getCacheUtil().getGroupIdsFromCombinedIds(ids, distinct); } @Override public long[] getIds(Collection<? extends Satisfaction> satisfactions, Collection<? extends PropertyMatcher<?>> parameters, List<? extends OrderSpecifier> orderSpecifiers, int startIndex, int limit) throws CacheException, NotSerializableException { Utilities.checkNull(satisfactions, "satisfactions"); if (isClosed() || satisfactions.isEmpty()) { return new long[0]; } int[] groupIds = new int[satisfactions.size()]; int index = 0; for (Satisfaction satisfaction : satisfactions) { groupIds[index++] = ((JdbcSatisfaction)satisfaction).getGroupId(); } return getIds(groupIds, parameters, orderSpecifiers, startIndex, limit); } @Override public long[] getIds(DataModelCategory category, Collection<? extends PropertyMatcher<?>> parameters, List<? extends OrderSpecifier> orderSpecifiers, int startIndex, int limit) throws CacheException, NotSerializableException { Utilities.checkNull(category, "category"); if (isClosed()) { return new long[0]; } final List<IntervalPropertyMatcher<?>> intervalParameters; if (CollectionUtilities.hasContent(parameters)) { intervalParameters = PropertyMatcherUtilities.getGroupMatchers(parameters); // Replace the matchers with their group matchers. ListIterator<IntervalPropertyMatcher<?>> iterator = intervalParameters.listIterator(); while (iterator.hasNext()) { IntervalPropertyMatcher<?> matcher = iterator.next(); IntervalPropertyMatcher<?> groupMatcher = matcher.getGroupMatcher(); if (!Utilities.sameInstance(matcher, groupMatcher)) { iterator.remove(); iterator.add(groupMatcher); } } } else { intervalParameters = null; } try { int[] groupIds = runTask(getDatabaseTaskFactory().getRetrieveGroupIdsTask(category, intervalParameters)); if (groupIds.length == 0) { return new long[0]; } return runTask(getDatabaseTaskFactory().getRetrieveCombinedIdsTask(groupIds, parameters, orderSpecifiers, startIndex, limit)); } catch (CacheException e) { if (e.getCause() instanceof NotSerializableException) { throw (NotSerializableException)e.getCause(); } throw e; } } @Override public long[] getIds(int[] groupIds, Collection<? extends PropertyMatcher<?>> parameters, List<? extends OrderSpecifier> orderSpecifiers, int startIndex, int limit) throws NotSerializableException, CacheException { try { return runTask(getDatabaseTaskFactory().getRetrieveCombinedIdsTask(groupIds, parameters, orderSpecifiers, startIndex, limit)); } catch (CacheException e) { if (e.getCause() instanceof NotSerializableException) { throw (NotSerializableException)e.getCause(); } throw e; } } @Override public Collection<? extends Satisfaction> getIntervalSatisfactions(DataModelCategory category, Collection<? extends IntervalPropertyMatcher<?>> parameters) { Utilities.checkNull(category, "category"); Utilities.checkNull(parameters, "parameters"); List<IntervalPropertyValueSet.Builder> ipvsBuilders = New.randomAccessList(); Map<PropertyDescriptor<?>, List<Object>> resultMap = New.insertionOrderMap(parameters.size()); for (IntervalPropertyMatcher<?> param : parameters) { resultMap.put(param.getPropertyDescriptor(), New.randomAccessList()); } int[] groupIds; try { // Get the group ids that overlap the intervals. RetrieveGroupValuesTask task = getDatabaseTaskFactory().getRetrieveGroupValuesTask(category, parameters, resultMap); groupIds = runTask(task); // Now check to see if the group tables are empty, if so this // interval does not satisfy the query. RetrieveCombinedIdsTask idsTask = getDatabaseTaskFactory().getRetrieveCombinedIdsTask(groupIds, New.collection(), New.list(), 0, 1); long[] combinedIds = runTask(idsTask); Collection<Satisfaction> results = null; if (combinedIds != null && combinedIds.length > 0) { // Create an ipvs builder for each group. for (int index = 0; index < task.getResultCount(); ++index) { ipvsBuilders.add(new IntervalPropertyValueSet.Builder()); } /* Check for the case where one of the groups has an indefinite * interval. In this case, retrieve the values from the group * table and replace the indefinite interval with the extent of * the actual values. */ Iterator<List<Object>> valueIter = resultMap.values().iterator(); Iterator<? extends IntervalPropertyMatcher<?>> paramIter = parameters.iterator(); while (valueIter.hasNext() && paramIter.hasNext()) { List<Object> values = valueIter.next(); IntervalPropertyMatcher<?> param = paramIter.next(); for (int groupIndex = 0; groupIndex < groupIds.length; ++groupIndex) { if (param.isIndefinite(values.get(groupIndex))) { int groupId = groupIds[groupIndex]; long[] ids = getIds(new int[] { groupId }, parameters, null, 0, Integer.MAX_VALUE); if (ids.length > 0) { PropertyValueMap drillDownMap = new PropertyValueMap(); drillDownMap.addResultList(param.getPropertyDescriptor(), ids.length); getValues(ids, drillDownMap, null); List<?> resultList = drillDownMap.getResultList(param.getPropertyDescriptor()); @SuppressWarnings("unchecked") Accumulator<Object> accumulator = (Accumulator<Object>)param.getAccumulator(); accumulator.addAll(resultList); values.set(groupIndex, accumulator.getExtent()); } } } } // Put the group properties into the ipvs builders. for (Entry<PropertyDescriptor<?>, List<Object>> entry : resultMap.entrySet()) { for (int index = 0; index < entry.getValue().size(); ++index) { ipvsBuilders.get(index).add(entry.getKey(), entry.getValue().get(index)); } } // Create a satisfaction for each group. results = New.collection(ipvsBuilders.size()); for (int index = 0; index < ipvsBuilders.size(); ++index) { results.add(new JdbcSatisfaction(groupIds[index], ipvsBuilders.get(index).create())); } } else { results = New.collection(); } return results; } catch (CacheException | NotSerializableException e) { LOGGER.error("Failed to retrieve satisfaction: " + e, e); return Collections.emptyList(); } } /** * Get the schema version required by the implementation. * * @return The schemaVersion. */ public String getSchemaVersion() { return SCHEMA_VERSION; } @Override public void getValues(final long[] ids, final PropertyValueMap cacheResultMap, final TIntList failedIndices) throws CacheException { if (isClosed() || ids.length == 0) { return; } runTask(getDatabaseTaskFactory().getRetrieveValuesTask(ids, cacheResultMap, failedIndices)); } @Override public long[] getValueSizes(long[] ids, PropertyDescriptor<?> desc) throws CacheException { if (isClosed() || ids.length == 0) { return new long[0]; } return runTask(getDatabaseTaskFactory().getRetrieveValueSizesTask(ids, desc)); } @Override public void initialize(final long millisecondsWait) throws CacheException { Runnable initTask = () -> { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Initializing cache with url: " + getUrl()); } @SuppressWarnings("PMD.PrematureDeclaration") long t0 = System.nanoTime(); try { getConnectionAppropriator().appropriateStatement((conn, stmt) -> { initSchema(conn, stmt); return null; }); } catch (CacheException e) { setInitializationFailed(e); return; } createDataTrimmer(); setOpen(); if (LOGGER.isDebugEnabled()) { LOGGER.debug(StringUtilities.formatTimingMessage("Cache initialized in ", System.nanoTime() - t0)); } ScheduledExecutorService executor = getExecutor(); if (executor != null) { getCacheUtil().startGarbageCollector(getDatabaseTaskFactory(), getSQLGenerator(), getConnectionAppropriator(), executor); } }; ScheduledExecutorService executor = getExecutor(); if (executor == null) { initTask.run(); } else { executor.execute(initTask); if (millisecondsWait > 0) { waitForInitialization(millisecondsWait); } else if (millisecondsWait < 0) { waitForInitialization(0); } } } /** * Get if the cache has been closed. * * @return If the cache has been closed. */ public boolean isClosed() { if (myClosed) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Cache is closed."); } return true; } return false; } @Override public <T> long[] put(final CacheDeposit<T> insert, CacheModificationListener listener) throws CacheException, NotSerializableException { Utilities.checkNull(insert, "insert"); Utilities.checkNull(insert.getCategory(), "insert.getCategory()"); Utilities.checkNull(insert.getAccessors(), "insert.getAccessors()"); Utilities.checkNull(insert.getInput(), "insert.getInput()"); if (insert.isNew()) { DataModelCategory category = insert.getCategory(); Utilities.checkNull(category.getSource(), "insert.getCategory().getSource()"); Utilities.checkNull(category.getFamily(), "insert.getCategory().getFamily()"); Utilities.checkNull(category.getCategory(), "insert.getCategory().getCategory()"); } if (isClosed()) { return new long[0]; } long[] ids = runTask(getDatabaseTaskFactory().getInsertTask(insert, listener)); if (ids.length > 0 && myRowLimit >= 0) { scheduleDataTrimmer(); } return ids; } @Override public void setClassProvider(ClassProvider provider) { } @Override public void setInMemorySizeBytes(long bytes) throws CacheException { } @Override public void setOnDiskSizeLimitBytes(long bytes) { } @Override public <T> void updateValues(final long[] ids, final Collection<? extends T> input, final Collection<? extends PropertyAccessor<? super T, ?>> accessors, Executor executor, CacheModificationListener listener) throws CacheException, NotSerializableException { Utilities.checkNull(ids, "ids"); Utilities.checkNull(input, "input"); Utilities.checkNull(accessors, "accessors"); if (input.size() != 1 && ids.length != input.size()) { throw new IllegalArgumentException( "Either the input collection must be a singleton or must match the size of the id array."); } Collection<PersistentPropertyAccessor<? super T, ?>> persistentAccessors = New.collection(); for (PropertyAccessor<? super T, ?> propertyAccessor : accessors) { if (propertyAccessor instanceof PersistentPropertyAccessor) { persistentAccessors.add((PersistentPropertyAccessor<? super T, ?>)propertyAccessor); } } if (!persistentAccessors.isEmpty()) { runTask(getDatabaseTaskFactory().getUpdateTask(ids, input, persistentAccessors, listener)); } } /** * Block until the cache is initialized or the thread is interrupted. * * @param timeout How long to wait, in milliseconds. If the timeout is * <code>0</code>, the wait is indefinite. * @return <code>true</code> if initialization was completed before the * timeout. * @throws CacheException If initialization fails. */ public boolean waitForInitialization(long timeout) throws CacheException { try { while (myClosed) { synchronized (this) { wait(timeout); if (myInitializationFailed != null) { throw new CacheException("Cache initialization failed: " + myInitializationFailed.getMessage(), myInitializationFailed); } } } } catch (InterruptedException e) { } return !myClosed; } /** * Create the database task factory. * * @return The factory. */ protected DatabaseTaskFactory createDatabaseTaskFactory() { return new DatabaseTaskFactory(getCacheUtil(), getDatabaseState(), getSQLGenerator(), getTypeMapper()); } /** * Create the data trimmer. */ protected void createDataTrimmer() { if (myRowLimit >= 0) { myDataTrimmer = new RowLimitDataTrimmer(myRowLimit, getCacheUtil(), getConnectionAppropriator(), getSQLGenerator(), getLock().readLock()); } } /** * Access the cache utilities. * * @return The cache utilities. */ protected CacheUtilities getCacheUtil() { return myCacheUtil; } /** * Get a connection to the database. * * @return The database connection. * @throws CacheException If the connection could not be created. */ protected Connection getConnection() throws CacheException { try { return DriverManager.getConnection(getUrl(), getUsername(), getPassword()); } catch (SQLException e) { throw new CacheException("Failed to get database connection: " + e, e); } } /** * Get the connection appropriator. * * @return The connection appropriator. */ protected ConnectionAppropriator getConnectionAppropriator() { return myConnectionAppropriator; } /** * Get the connection source. * * @return The connection source. */ protected final ConnectionSource getConnectionSource() { return myConnectionSource; } /** * Get the in-memory cache of the database state. * * @return The database state. */ protected DatabaseState getDatabaseState() { return myDatabaseState; } /** * Get the database task factory. * * @return The database task factory. */ protected DatabaseTaskFactory getDatabaseTaskFactory() { if (myDatabaseTaskFactory == null) { synchronized (this) { if (myDatabaseTaskFactory == null) { myDatabaseTaskFactory = createDatabaseTaskFactory(); } } } return myDatabaseTaskFactory; } /** * Construct a string that identifies a database for logging purposes. * * @return The database string. */ protected final String getDbString() { return "[" + getUsername() + "@" + getUrl() + "]"; } /** * Get the executor service for background activities. * * @return The executor service. */ protected ScheduledExecutorService getExecutor() { return (ScheduledExecutorService)(myExecutor instanceof ScheduledExecutorService ? myExecutor : null); } /** * Access the database lock. This is used to change the database structure * and for deleting data groups. * * @return The lock. */ protected ReadWriteLock getLock() { return myLock; } /** * Get the DB password. * * @return The DB password. */ protected String getPassword() { return myPassword; } /** * Get the SQL generator. * * @return The SQL generator. */ protected SQLGenerator getSQLGenerator() { return SQL_GENERATOR; } /** * Get the type mapper. This is a hook to allow subclasses to override the * type mapper. * * @return The type mapper. */ protected TypeMapper getTypeMapper() { return TYPE_MAPPER; } /** * Get the DB URL. * * @return The DB URL. */ protected final String getUrl() { return myUrl; } /** * Get the DB username. * * @return The DB username. */ protected final String getUsername() { return myUsername; } /** * Create the tables and sequences in the database. * * @param conn The DB connection. * @param stmt The DB statement. * * @throws CacheException If the schema cannot be initialized. */ protected void initSchema(Connection conn, Statement stmt) throws CacheException { Lock writeLock = getLock().writeLock(); writeLock.lock(); try { String version; try { version = getDatabaseTaskFactory().getRetrieveSchemaVersionTask().run(conn, stmt); } catch (CacheException e) { // The version table may not have been created. version = null; } if (!getSchemaVersion().equals(version)) { runTask(getDatabaseTaskFactory().getResetSchemaTask(getSchemaVersion()), conn, stmt); } runTask(getDatabaseTaskFactory().getInitSchemaTask(), conn, stmt); runTask(getDatabaseTaskFactory().getDeleteSessionGroupsTask(), conn, stmt); } finally { writeLock.unlock(); } } /** * Run a database task. * * @param <T> The return type of the task. * @param task The task. * @return The value from the task. * @throws CacheException If there is a database error. */ protected <T> T runTask(final ConnectionUser<T> task) throws CacheException { Lock readLock = getLock().readLock(); readLock.lock(); try { return getConnectionAppropriator().appropriateConnection(c -> runTask(task, c), false); } finally { readLock.unlock(); } } /** * Run a database task with an existing connection. * * @param <T> The return type of the task. * @param task The task. * @param conn The database connection. * @return The value from the task. * @throws CacheException If there is a database error. */ protected <T> T runTask(final ConnectionUser<T> task, Connection conn) throws CacheException { T result; long t0 = System.nanoTime(); result = task.run(conn); if (LOGGER.isDebugEnabled() && task instanceof TimingMessageProvider) { LOGGER.debug(StringUtilities.formatTimingMessage((TimingMessageProvider)task, System.nanoTime() - t0)); } return result; } /** * Run a database task that requires a statement. * * @param <T> The return type of the task. * @param task The task. * @return The value from the task. * @throws CacheException If there is a database error. */ protected <T> T runTask(final StatementUser<T> task) throws CacheException { return runTask(c -> runTask(task, c)); } /** * Run a database task that requires a statement, with an existing * connection. * * @param <T> The return type of the task. * @param task The task. * @param conn The database connection. * @return The value from the task. * @throws CacheException If there is a database error. */ protected <T> T runTask(final StatementUser<T> task, Connection conn) throws CacheException { return new StatementAppropriator(conn).appropriateStatement((c, s) -> runTask(task, c, s)); } /** * Run a database task that requires a statement, providing the statement. * * @param <T> The return type of the task. * @param task The task. * @param conn The database connection. * @param stmt The database statement. * @return The value from the task. * @throws CacheException If there is a database error. */ protected <T> T runTask(StatementUser<T> task, Connection conn, Statement stmt) throws CacheException { T result; long t0 = System.nanoTime(); result = task.run(conn, stmt); if (LOGGER.isDebugEnabled() && task instanceof TimingMessageProvider) { LOGGER.debug(StringUtilities.formatTimingMessage((TimingMessageProvider)task, System.nanoTime() - t0)); } return result; } /** * Schedule the data trimmer. */ protected void scheduleDataTrimmer() { getCacheUtil().scheduleDataTrimmer(myDataTrimmer, getExecutor()); } /** * Set the initialization failed flag. * * @param e The exception that occurred. */ protected void setInitializationFailed(CacheException e) { synchronized (this) { myInitializationFailed = e; notifyAll(); } } /** * Mark the cache as open. This is called upon on the completion of the * initialize sequence and should not be called again. */ protected void setOpen() { if (myExecutor instanceof ScheduledExecutorService && ((ScheduledExecutorService)myExecutor).isShutdown()) { throw new IllegalStateException("Cannot reopen cache after it has been closed."); } synchronized (this) { myClosed = false; notifyAll(); } } /** * Implementation of {@link io.opensphere.core.data.util.Satisfaction}. */ protected static class JdbcSatisfaction extends SingleSatisfaction { /** The group id. */ private final int myGroupId; /** * Constructor. * * @param groupId The group id. * @param intervalPropertyValueSet The interval property value set. */ public JdbcSatisfaction(int groupId, IntervalPropertyValueSet intervalPropertyValueSet) { super(intervalPropertyValueSet); myGroupId = groupId; } /** * The id for the group that provides this satisfaction. * * @return The group id. */ public int getGroupId() { return myGroupId; } } }
fn find_latest_version(versions: Vec<String>) -> String { let mut latest_version = String::new(); for version in versions { if latest_version.is_empty() || is_newer_version(&version, &latest_version) { latest_version = version; } } latest_version } fn is_newer_version(version1: &str, version2: &str) -> bool { let v1 = semver::Version::parse(version1).unwrap(); let v2 = semver::Version::parse(version2).unwrap(); v1 > v2 }
from flask import Flask, jsonify, request import requests app = Flask(__name__) @app.route('/get_data', methods=['GET']) def get_data(): user_input = request.args.get('input') if user_input: api_url = 'https://api.example.com/data' params = {'query': user_input} response = requests.get(api_url, params=params) if response.status_code == 200: external_data = response.json() result = { "input": user_input, "external_data": external_data } return jsonify(result), 200 else: error_message = f"Failed to retrieve data from external API: {response.status_code}" return jsonify({"error": error_message}), 500 else: return jsonify({"error": "No input provided"}), 400 if __name__ == '__main__': app.run()
The 5 devices should be connected to one another in a star topology, with all 5 devices connected to a central "hub". The hub should be connected to a router, which is then connected to the internet. The devices should each be given an IP address so they can communicate with each other over the network, and the router should be given a static IP address so it can handle data requests from the internet.
<reponame>ksh9241/java8_in_action<filename>src/java_8_in_action/functionalprograming/TreeExample.java package java_8_in_action.functionalprograming; public class TreeExample { public static void main(String[] args) { Tree a = update("a", 100, null); System.out.println(a); System.out.println(); a = update ("b", 200, a); System.out.println(a); System.out.println(); a = update ("c", 300, a); System.out.println(a); System.out.println(); Tree aa = fupdate("a", 100, null); System.out.println(aa); aa = fupdate("b", 300, aa); System.out.println(aa); } // 함수형으로 구현하기 // 아래 코드는 if-then-else 대신 하나의 조건문을 사용했는데 이렇게 해서 위 코드가 부작용이 없는 하나의 표현식임을 강조헀다. static Tree fupdate (String k, int newVal, Tree t) { return (t == null) ? new Tree (k, newVal, null, null) : k.equals(t.getKey()) ? new Tree (k, newVal, t.getLeft(), t.getRight()) : k.compareTo(t.getKey()) < 0 ? new Tree(t.getKey(), t.getVal(), fupdate(k, newVal, t.getLeft()), t.getRight()) : new Tree(t.getKey(), t.getVal(), t.getLeft(), fupdate(k, newVal, t.getRight())); } static Tree update (String k, int newVal, Tree t) { if (t == null) { new Tree (k, newVal, null, null); } else if (k.equals(t.getKey())) { t.setVal(newVal); } else if (k.compareTo(t.getKey()) < 0) { t.setLeft(update (k, newVal, t.getLeft())); } else { t.setRight(update (k, newVal, t.getRight())); } return t; } } class Tree { private String key; private int val; private Tree left, right; public Tree (String k, int v, Tree l, Tree r) { key = k; val = v; left = l; right = r; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public int getVal() { return val; } public void setVal(int val) { this.val = val; } public Tree getLeft() { return left; } public void setLeft(Tree left) { this.left = left; } public Tree getRight() { return right; } public void setRight(Tree right) { this.right = right; } @Override public String toString() { return "key = " + key + " val = " + val + " left = " + left + " right = " + right; } } class TreeProcessor { public static int lookup (String k, int defaultVal, Tree t) { if (t == null) return defaultVal; if (k.equals(t.getKey())) { return t.getVal(); } return lookup (k, defaultVal, k.compareTo(t.getKey()) < 0 ? t.getLeft() : t.getRight()); } }
import path from 'path'; import fs from 'fs-extra'; import inquirer from 'inquirer'; import spawn from 'cross-spawn'; import update from './update'; import npmType from '../utils/npm-type'; import log from '../utils/log'; import conflictResolve from '../utils/conflict-resolve'; import generateTemplate from '../utils/generate-template'; import { PROJECT_TYPES, PKG_NAME } from '../utils/constants'; let step = 0; /** * 选择项目语言和框架 */ const chooseEslintType = async () => { const { type } = await inquirer.prompt({ type: 'list', name: 'type', message: `Step ${++step}. 请选择项目的语言(JS/TS)和框架(React/Vue)类型:`, choices: PROJECT_TYPES, }); return type; }; /** * 选择是否启用 stylelint * @param defaultValue */ const chooseEnableStylelint = async (defaultValue) => { const { enable } = await inquirer.prompt({ type: 'confirm', name: 'enable', message: `Step ${++step}. 是否需要使用 stylelint(若没有样式文件则不需要):`, default: defaultValue, }); return enable; }; /** * 选择是否启用 markdownlint */ const chooseEnableMarkdownLint = async () => { const { enable } = await inquirer.prompt({ type: 'confirm', name: 'enable', message: `Step ${++step}. 是否需要使用 markdownlint(若没有 Markdown 文件则不需要):`, default: true, }); return enable; }; /** * 选择是否启用 prettier */ const chooseEnablePrettier = async () => { const { enable } = await inquirer.prompt({ type: 'confirm', name: 'enable', message: `Step ${++step}. 是否需要使用 Prettier 格式化代码:`, default: true, }); return enable; }; export default async (options) => { const cwd = options.cwd || process.cwd(); const isTest = process.env.NODE_ENV === 'test'; const checkVersionUpdate = options.checkVersionUpdate || false; const disableNpmInstall = options.disableNpmInstall || false; const config = {}; const pkgPath = path.resolve(cwd, 'package.json'); let pkg = fs.readJSONSync(pkgPath); // 版本检查 if (!isTest && checkVersionUpdate) { await update(false); } // 初始化 `eslintType`。 if (options.eslintType && PROJECT_TYPES.find((choice) => choice.value === options.eslintType)) { config.eslintType = options.eslintType; } else { config.eslintType = await chooseEslintType(); } // 初始化 `enableStylelint`。 if (typeof options.enableStylelint === 'boolean') { config.enableStylelint = options.enableStylelint; } else { config.enableStylelint = await chooseEnableStylelint(!/node/.test(config.eslintType)); } // 初始化 `enableMarkdownlint`。 if (typeof options.enableMarkdownlint === 'boolean') { config.enableMarkdownlint = options.enableMarkdownlint; } else { config.enableMarkdownlint = await chooseEnableMarkdownLint(); } // 初始化 `enablePrettier`。 if (typeof options.enablePrettier === 'boolean') { config.enablePrettier = options.enablePrettier; } else { config.enablePrettier = await chooseEnablePrettier(); } if (!isTest) { log.info(`Step ${++step}. 检查并处理项目中可能存在的依赖和配置冲突`); pkg = await conflictResolve(cwd, options.rewriteConfig); log.success(`Step ${step}. 已完成项目依赖和配置冲突检查处理 :D`); if(!disableNpmInstall){ log.info(`Step ${++step}. 安装依赖`); const npm = await npmType; spawn.sync( npm, ['i', '-D', PKG_NAME], { stdio: 'inherit', cwd }, ); log.success(`Step ${step}. 安装依赖成功 :D`); } } // 更新 pkg.json pkg = fs.readJSONSync(pkgPath); // 在 `package.json` 中写入 `scripts`。 if (!pkg.scripts) { pkg.scripts = {}; } if (!pkg.scripts[`${PKG_NAME}-scan`]) { pkg.scripts[`${PKG_NAME}-scan`] = `${PKG_NAME} scan`; } if (!pkg.scripts[`${PKG_NAME}-fix`]) { pkg.scripts[`${PKG_NAME}-fix`] = `${PKG_NAME} fix`; } // 配置 commit 卡点 log.info(`Step ${++step}. 配置 git commit 卡点`); if (!pkg.husky) pkg.husky = {}; if (!pkg.husky.hooks) pkg.husky.hooks = {}; pkg.husky.hooks['pre-commit'] = `${PKG_NAME} commit-file-scan`; pkg.husky.hooks['commit-msg'] = `${PKG_NAME} commit-msg-scan`; fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); log.success(`Step ${step}. 配置 git commit 卡点成功 :D`); log.info(`Step ${++step}. 写入配置文件`); generateTemplate(cwd, config); log.success(`Step ${step}. 写入配置文件成功 :D`); // 完成信息。 const logs = [`${PKG_NAME} 初始化完成 :D`].join('\r\n'); log.success(logs); };
<reponame>Hoovs/OpenLibraryClient<filename>server/handlers/search_test.go package handlers import ( "go.uber.org/zap" "net/url" "testing" ) func TestCreateUrl(t *testing.T) { baseUrl := "http://test?q=" cases := []struct { name string v url.Values validate func(error) bool expectedStr string }{ { name: "nil values fails", v: nil, validate: func(e error) bool { return e != nil }, expectedStr: "", }, { name: "single word", v: url.Values{"q": []string{"test"}}, validate: func(e error) bool { return e == nil }, expectedStr: "http://test%3Fq=test", }, { name: "two words", v: url.Values{"q": []string{"test query"}}, validate: func(e error) bool { return e == nil }, expectedStr: "http://test%3Fq=test%20query", }, } l, _ := zap.NewDevelopment() h := SearchHandler{ Logger: l, BaseSearchUrl: baseUrl, } for _, c := range cases { t.Run(c.name, func(t *testing.T) { u, err := h.createLibraryURL(c.v) if !c.validate(err) { t.Errorf("Error didn't match expected") } if u != c.expectedStr { t.Errorf("%s didn't match expected: %s", u, c.expectedStr) } }) } }
from typing import Iterable class Table: def __init__(self, *, name: str, key: str, description: str, cluster: str, database: str, schema_name: str, column_names: Iterable[str], tags: Iterable[str], last_updated_epoch: int) -> None: self.name = name self.key = key self.description = description self.cluster = cluster self.database = database self.schema_name = schema_name self.column_names = column_names self.tags = tags self.last_updated_epoch = last_updated_epoch def __repr__(self) -> str: return 'Table(name={!r}, key={!r}, description={!r}, ' \ 'cluster={!r} database={!r}, schema_name={!r}, column_names={!r}, ' \ 'tags={!r}, last_updated={!r})'.format(self.name, self.key, self.description, self.cluster, self.database, self.schema_name, self.column_names, self.tags, self.last_updated_epoch)
#!/usr/bin/env python3.9 import asyncio import os import shutil import tempfile import unittest import eris.tools as tools import eris.worker as worker class WorkerTestCase(unittest.TestCase): def setUp(self): self.temp_dir = tempfile.mkdtemp() self.original_working_dir = os.getcwd() os.chdir(self.temp_dir) os.mkdir(tools.CACHE_PATH) open("foo", "w").close() def tearDown(self): shutil.rmtree(self.temp_dir) os.chdir(self.original_working_dir) def test_run_job(self): loop = asyncio.get_event_loop() compression = "none" worker_ = worker.Worker(False, compression) loop.run_until_complete(worker_.create_process()) worker_.process.stdin.write(f"{compression}\n".encode("utf-8")) future = worker_.run_tool("foo", tools.metadata) status = loop.run_until_complete(future) self.assertEqual(status, tools.Status.ok) result_path = os.path.join(tools.CACHE_PATH, "foo-metadata") self.assertTrue(os.path.exists(result_path)) if __name__ == "__main__": unittest.main()
<filename>index.js import { create } from 'rung-sdk'; import { OneOf, Double } from 'rung-sdk/dist/types'; import Bluebird from 'bluebird'; import agent from 'superagent'; import promisifyAgent from 'superagent-promise'; import { gt, keys, lt, merge, path } from 'ramda'; const request = promisifyAgent(agent, Bluebird); const styles = { image: { width: '70px', height: '50px', float: 'left', marginTop: '16px', background: 'url(https://i.imgur.com/a0dpeTx.png) no-repeat', backgroundSize: 'contain', fontWeight: 'bolder', textAlign: 'left', paddingTop: '24px', color: '#333333' }, label: { width: '24px', display: 'inline-block', textAlign: 'center' }, text: { width: '60px', position: 'absolute', marginLeft: '79px', top: '50%', transform: 'translateY(-50%)' } }; const currencies = { AUD: { name: _('Australian Dollar'), symbol: 'AU$' }, BGN: { name: _('Bulgarian Lev'), symbol: 'BGN' }, BRL: { name: _('Brazilian Real'), symbol: 'R$' }, CAD: { name: _('Canadian Dollar'), symbol: 'CA$' }, CHF: { name: _('Swiss Franc'), symbol: 'CHF' }, CNY: { name: _('Chinese Yuan'), symbol: 'CN¥' }, CZK: { name: _('Czech Republic Koruna'), symbol: 'Kč' }, DKK: { name: _('Danish Krone'), symbol: 'Dkr' }, EUR: { name: _('Euro'), symbol: '€' }, GBP: { name: _('British Pound Sterling'), symbol: '£' }, HKD: { name: _('Hong Kong Dollar'), symbol: 'HK$' }, HRK: { name: _('Croatian Kuna'), symbol: 'kn' }, HUF: { name: _('Hungarian Forint'), symbol: 'Ft' }, IDR: { name: _('Indonesian Rupiah'), symbol: 'Rp' }, ILS: { name: _('Israeli New Sheqel'), symbol: '₪' }, INR: { name: _('Indian Rupee'), symbol: 'Rs' }, JPY: { name: _('Japanese Yen'), symbol: '¥' }, KRW: { name: _('South Korean Won'), symbol: '₩' }, MXN: { name: _('Mexican Peso'), symbol: 'MX$' }, MYR: { name: _('Malaysian Ringgit'), symbol: 'RM' }, NOK: { name: _('Norwegian Krone'), symbol: 'Nkr' }, NZD: { name: _('New Zealand Dollar'), symbol: 'NZ$' }, PHP: { name: _('Philippine Peso'), symbol: '₱' }, PLN: { name: _('Polish Zloty'), symbol: 'zł' }, RON: { name: _('Romanian Leu'), symbol: 'RON' }, RUB: { name: _('Russian Ruble'), symbol: 'RUB' }, SEK: { name: _('Swedish Krona'), symbol: 'Skr' }, SGD: { name: _('Singapore Dollar'), symbol: 'S$' }, THB: { name: _('Thai Baht'), symbol: '฿' }, TRY: { name: _('Turkish Lira'), symbol: 'TL' }, USD: { name: _('US Dollar'), symbol: '$' }, ZAR: { name: _('South African Rand'), symbol: 'R' } }; function render(base, baseName, target, result) { return ( <div> <div style={ styles.image }> <label style={ merge(styles.label, { fontSize: base.length > 2 ? '12px' : '19px', marginLeft: '6px' }) }> { base } </label> <label style={ merge(styles.label, { fontSize: target.length > 2 ? '12px' : '19px', marginLeft: '10px' }) }> { target } </label> </div> <div style={ styles.text }> { baseName }<br/> { `${_('at')} ${target} ${result}` } </div> </div> ); } function renderAlert(base, target, result) { const baseCurrency = currencies[base].symbol; const baseName = currencies[base].name; const targetCurrency = currencies[target].symbol; const formattedResult = result.toString().replace('.', ','); return { [base + target]: { title: `${baseName} ${_('at')} ${targetCurrency} ${formattedResult}`, content: render(baseCurrency, baseName, targetCurrency, formattedResult), comment: `${baseName} ${_('at')} ${targetCurrency} ${formattedResult}` } }; } function main(context, done) { const { base, target, comparator, value } = context.params; const compare = comparator === 'maior' ? gt : lt; if (base === target) { return done({ alerts: {} }); } return request.get(`https://api.fixer.io/latest`) .query({ base }) .then(path(['body', 'rates', target])) .then(result => compare(result, value) ? { alerts: renderAlert(base, target, result.toFixed(2)) } : { alerts: {} }) .then(done) .catch(() => done({ alerts: {} })); } const params = { base: { description: _('Base currency'), type: OneOf(keys(currencies)), default: 'USD' }, target: { description: _('Destination currency'), type: OneOf(keys(currencies)), default: 'BRL' }, comparator: { description: _('Comparison type'), type: OneOf(['maior', 'menor']), default: 'menor' }, value: { description: _('Comparison value'), type: Double, default: 4.0 } }; export default create(main, { params, primaryKey: true, title: _('Currency quotation'), description: _('Identify the best exchange opportunities!'), preview: render('$', currencies.USD.name, 'R$', '3,29') });
<reponame>tatjam/Photon #include "Model.h" #define TINYOBJLOADER_IMPLEMENTATION #include "../../dep/tiny_obj_loader.h" namespace ph { Vertex vVertex(glm::vec3 pos, glm::vec3 nrm, glm::vec2 tex) { Vertex out; out.pX = pos.x; out.pY = pos.y; out.pZ = pos.z; out.nX = nrm.x; out.nY = nrm.y; out.nZ = nrm.z; out.tX = tex.x; out.tY = tex.y; return out; } void Mesh::create() { glGenBuffers(1, &EBO); glGenBuffers(1, &VBO); glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); { glBindBuffer(GL_ARRAY_BUFFER, VBO); { glBufferData(GL_ARRAY_BUFFER, vertices.size() * sizeof(Vertex), vertices.data(), GL_STATIC_DRAW); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, EBO); glBufferData(GL_ELEMENT_ARRAY_BUFFER, indices.size() * sizeof(int), indices.data(), GL_STATIC_DRAW); // Position (3f) glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (GLvoid*)0); glEnableVertexAttribArray(0); // Normal (3f) glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (GLvoid*)(3 * sizeof(GLfloat))); glEnableVertexAttribArray(1); // Uv (2f) glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (GLvoid*)(6 * sizeof(GLfloat))); glEnableVertexAttribArray(2); } } glBindVertexArray(0); } void Mesh::render(glm::mat4 world, glm::mat4 view, glm::mat4 proj, Shader* shader) { // Push the matrices glUniformMatrix4fv(glGetUniformLocation(shader->pr, "world"), 1, GL_FALSE, glm::value_ptr(world)); glUniformMatrix4fv(glGetUniformLocation(shader->pr, "view"), 1, GL_FALSE, glm::value_ptr(view)); glUniformMatrix4fv(glGetUniformLocation(shader->pr, "proj"), 1, GL_FALSE, glm::value_ptr(proj)); glBindVertexArray(VAO); glDrawElements(GL_TRIANGLES, indices.size(), GL_UNSIGNED_INT, 0); glBindVertexArray(0); } glm::mat4 Model::getMatrix() { return world; } void Model::render(glm::mat4 view, glm::mat4 proj) { for (int i = 0; i < meshes.size(); i++) { if (meshes[i].mat != NULL) { meshes[i].mat->use(); meshes[i].render(world, view, proj, meshes[i].mat->shader); } else { if (defaultMaterial != NULL) { defaultMaterial->use(); meshes[i].render(world, view, proj, defaultMaterial->shader); } else { // Use engine global shader } } } } void Model::load(std::string objpath) { e->log(INF) << "Loading obj file: " << objpath << endlog; tinyobj::attrib_t attrib; std::vector<tinyobj::shape_t> shapes; std::vector<tinyobj::material_t> materials; std::string err; int flags = 1; bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &err, objpath.c_str(), FileUtil::stripFilename(objpath).c_str(), true); bool errors = false; if (!err.empty()) { e->log(ERR) << err << endlog; errors = true; } if (!ret) { e->log(ERR) << "Could not load object file, aborting!" << endlog; return; } // Read obj data // Over every shape Vertex worker = Vertex(); for (int i = 0; i < shapes.size(); i++) { Mesh n = Mesh(); int indexOffset = 0; int vIndex = 0; // Loop over every polygon for (int p = 0; p < shapes[i].mesh.num_face_vertices.size(); p++) { int fv = shapes[i].mesh.num_face_vertices[p]; for (int v = 0; v < fv; v++) { // Vertex data tinyobj::index_t idx = shapes[i].mesh.indices[indexOffset + v]; tinyobj::real_t vx = attrib.vertices[3 * idx.vertex_index + 0]; tinyobj::real_t vy = attrib.vertices[3 * idx.vertex_index + 1]; tinyobj::real_t vz = attrib.vertices[3 * idx.vertex_index + 2]; tinyobj::real_t nx = attrib.normals[3 * idx.normal_index + 0]; tinyobj::real_t ny = attrib.normals[3 * idx.normal_index + 1]; tinyobj::real_t nz = attrib.normals[3 * idx.normal_index + 2]; tinyobj::real_t tx = 0; tinyobj::real_t ty = 0; if (!attrib.texcoords.empty()) { tx = attrib.texcoords[2 * idx.texcoord_index + 0]; ty = attrib.texcoords[2 * idx.texcoord_index + 1]; } worker.pX = vx; worker.pY = vy; worker.pZ = vz; worker.nX = nx; worker.nY = ny; worker.nZ = nz; worker.tX = tx; worker.tY = ty; n.vertices.push_back(worker); n.indices.push_back(vIndex); vIndex++; } indexOffset += fv; // Material info is loaded to an LMaterial per mesh } n.create(); meshes.push_back(n); } if (!errors) { e->log(WIN) << "Obj file loaded successfully!" << endlog; } else { e->log(WRN) << "Obj file loaded with errors, check log behind" << endlog; } } Model::Model(Engine* en, Shader* s) { e = en; this->s = s; } Model::~Model() { } }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /** * * Header * */ import React, { useEffect, useRef, useState } from 'react'; import PropTypes from 'prop-types'; import { HeaderTitle, HeaderActions } from '@buffetjs/core'; import { Header as Wrapper, LoadingBar } from '@buffetjs/styles'; function Header(_ref) { var actions = _ref.actions, content = _ref.content, isLoading = _ref.isLoading, stickable = _ref.stickable, title = _ref.title; var _useState = useState(false), _useState2 = _slicedToArray(_useState, 2), isHeaderSticky = _useState2[0], setHeaderSticky = _useState2[1]; var headerRef = useRef(null); var label = title.label, cta = title.cta; var handleScroll = function handleScroll() { if (headerRef.current) { setHeaderSticky(headerRef.current.getBoundingClientRect().top <= 20); } }; useEffect(function () { window.addEventListener('scroll', handleScroll); return function () { window.removeEventListener('scroll', function () { return handleScroll; }); }; }, []); return /*#__PURE__*/React.createElement(Wrapper, { ref: headerRef }, /*#__PURE__*/React.createElement("div", { className: "sticky-wrapper".concat(isHeaderSticky && stickable ? ' sticky' : '') }, /*#__PURE__*/React.createElement("div", { className: "row" }, /*#__PURE__*/React.createElement("div", { className: "col-sm-6 header-title" }, /*#__PURE__*/React.createElement(HeaderTitle, { title: label, cta: cta }), isLoading ? /*#__PURE__*/React.createElement(LoadingBar, null) : /*#__PURE__*/React.createElement("p", null, content)), /*#__PURE__*/React.createElement("div", { className: "col-sm-6 justify-content-end" }, /*#__PURE__*/React.createElement(HeaderActions, { actions: actions }))))); } Header.defaultProps = { actions: [], content: null, isLoading: false, stickable: true, title: { label: null, cta: null } }; Header.propTypes = { actions: PropTypes.arrayOf(PropTypes.shape({ onClick: PropTypes.func, title: PropTypes.string })), content: PropTypes.string, isLoading: PropTypes.bool, stickable: PropTypes.bool, title: PropTypes.shape({ cta: PropTypes.shape({ icon: PropTypes.string, onClick: PropTypes.func }), label: PropTypes.string }) }; export default Header;
public void mergeSort(int arr[], int l, int r) { if (l < r) { // Find the middle point int m = (l+r)/2; // Sort first and second halves mergeSort(arr, l, m); mergeSort(arr, m+1, r); // Merge the sorted halves merge(arr, l, m, r); } }
#!/usr/bin/env bash ./vimrc.sh ./brew.sh # add brew to current path source ~/.profile ./zsh.sh ./tmux.sh
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> template <typename T1, typename T2, typename T3> struct VirtActionInvoker3 { typedef void (*Action)(void*, T1, T2, T3, const RuntimeMethod*); static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); ((Action)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method); } }; template <typename R, typename T1, typename T2, typename T3> struct VirtFuncInvoker3 { typedef R (*Func)(void*, T1, T2, T3, const RuntimeMethod*); static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method); } }; // System.Action`1<System.Object> struct Action_1_tD9663D9715FAA4E62035CFCF1AD4D094EE7872DC; // System.Action`1<UnityEngine.U2D.SpriteAtlas> struct Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF; // System.Char[] struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34; // System.Delegate[] struct DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8; // UnityEngine.Sprite[] struct SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77; // System.AsyncCallback struct AsyncCallback_tA7921BEF974919C46FF8F9D9867C567B200BB0EA; // System.DelegateData struct DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288; // UnityEngine.GameObject struct GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319; // System.IAsyncResult struct IAsyncResult_tC9F97BF36FCF122D29D3101D80642278297BF370; // UnityEngine.Tilemaps.ITilemap struct ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013; // System.Reflection.MethodInfo struct MethodInfo_t; // UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A; // UnityEngine.Sprite struct Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9; // UnityEngine.U2D.SpriteAtlas struct SpriteAtlas_t72834B063A58822D683F5557DF8D164740C8A5F9; // System.String struct String_t; // UnityEngine.Tilemaps.Tile struct Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27; // UnityEngine.Tilemaps.TileBase struct TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052; // UnityEngine.Tilemaps.Tilemap struct Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31; // UnityEngine.Tilemaps.TilemapRenderer struct TilemapRenderer_t8E3D220C1B3617980570642AB943280E4B1B6BC8; // System.Void struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5; IL2CPP_EXTERN_C RuntimeClass* Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* SpriteAtlasManager_t7D972A1381969245B36EB0ABCC60C3AE033FF53F_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C const RuntimeMethod* Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* ITilemap_CreateInstance_mAFF78AF4B2AB532C3A95FB324D2DB5F062D7E821_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* ITilemap_RefreshTile_mC602A7D2A938BFF0D959CAE20BCF8253A34B4D87_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* ITilemap__ctor_m94E2A628CC647832AA3B576274241AAB0CDAC504_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileBase_GetTileAnimationDataNoRef_m0562FCB94DCECA5DFD526806900B14D69ADB2FBF_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileBase_GetTileAnimationData_mA54F70D100129EC2074DC2F17471FDE315FF0C02_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileBase_GetTileDataNoRef_mF9B5CA6886A8761D504478146F053484AF3CFACA_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileBase_GetTileData_m936097A6D3A32A3C3E54EE7FF4EDA22CC7FF6088_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileBase_RefreshTile_m5614A37F408CCA8FABACB0A911D5EB5883ED051D_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileBase_StartUp_mD3221FE426FCFC3F0CC0ECDEE2DFEE7E6F94C8E7_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileBase__ctor_mEF753C200728FD143A358A5AF2B7978D9A982A67_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_GetTileData_m6BDFA53AD74BF38AAD340203F43D1C796BAB8F9A_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile__ctor_m8783DD13225005DB9323B7A7E86AB8641033B4A8_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_get_colliderType_m978D12FD1D9210E990576B0515A6296B0566025E_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_get_color_mD8EBC5D6FFD0CCCE7AE4C23F4AFEE7FA73CCE838_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_get_flags_m10DF194D35F7B96B52795369365B332F1432143C_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_get_gameObject_m5121800140E9009AE43AA782AC2437EB05E0477B_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_get_sprite_m55D8F25A18CA3FA4DAF1FB60E77D8552978FC7E9_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_get_transform_m010FA5FE2A3C48BCE79DAF095D2B7A652BD2B32B_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_set_colliderType_m0D7FFF0A6A80C2C026030149CF924E9FB8A852C1_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_set_color_m855E5C00F35C08077450D27BC5BB18BA7F2D67FC_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_set_flags_mAF0336180878A6D396DFFE4B9D3C188F6D6010CB_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_set_gameObject_mB450C0800EDB44EDB8E8F56DAFF75B7C13FC6420_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_set_sprite_m29904A3BC52CDFB8BF48604CD0FED0EF3477BCE4_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tile_set_transform_mDD4E70226F1A89377D3E4822DDD666B1E4F7EDFB_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TilemapRenderer_RegisterSpriteAtlasRegistered_mB338307A0CCCF3193B76CAF873FCC898463C1DF8_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* TilemapRenderer_UnregisterSpriteAtlasRegistered_mCE258B84F549040922D062E22F1205C562E0577A_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32_RuntimeMethod_var; IL2CPP_EXTERN_C const RuntimeMethod* Tilemap_RefreshTile_m1A2B0119B58A5E409BF899A1F88CBD3E23599193_RuntimeMethod_var; struct Delegate_t_marshaled_com; struct Delegate_t_marshaled_pinvoke; struct SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77; IL2CPP_EXTERN_C_BEGIN IL2CPP_EXTERN_C_END #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <Module> struct U3CModuleU3E_t76F5102420855B99D8AB78E8C4721C49E0DD7F30 { public: public: }; // System.Object struct Il2CppArrayBounds; // System.Array // UnityEngine.Tilemaps.ITilemap struct ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 : public RuntimeObject { public: // UnityEngine.Tilemaps.Tilemap UnityEngine.Tilemaps.ITilemap::m_Tilemap Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * ___m_Tilemap_1; public: inline static int32_t get_offset_of_m_Tilemap_1() { return static_cast<int32_t>(offsetof(ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013, ___m_Tilemap_1)); } inline Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * get_m_Tilemap_1() const { return ___m_Tilemap_1; } inline Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 ** get_address_of_m_Tilemap_1() { return &___m_Tilemap_1; } inline void set_m_Tilemap_1(Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * value) { ___m_Tilemap_1 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_Tilemap_1), (void*)value); } }; struct ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_StaticFields { public: // UnityEngine.Tilemaps.ITilemap UnityEngine.Tilemaps.ITilemap::s_Instance ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___s_Instance_0; public: inline static int32_t get_offset_of_s_Instance_0() { return static_cast<int32_t>(offsetof(ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_StaticFields, ___s_Instance_0)); } inline ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * get_s_Instance_0() const { return ___s_Instance_0; } inline ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 ** get_address_of_s_Instance_0() { return &___s_Instance_0; } inline void set_s_Instance_0(ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * value) { ___s_Instance_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___s_Instance_0), (void*)value); } }; // System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 : public RuntimeObject { public: public: }; // Native definition for P/Invoke marshalling of System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_pinvoke { }; // Native definition for COM marshalling of System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_com { }; // System.Boolean struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37 { public: // System.Boolean System.Boolean::m_value bool ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37, ___m_value_0)); } inline bool get_m_value_0() const { return ___m_value_0; } inline bool* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(bool value) { ___m_value_0 = value; } }; struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields { public: // System.String System.Boolean::TrueString String_t* ___TrueString_5; // System.String System.Boolean::FalseString String_t* ___FalseString_6; public: inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___TrueString_5)); } inline String_t* get_TrueString_5() const { return ___TrueString_5; } inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; } inline void set_TrueString_5(String_t* value) { ___TrueString_5 = value; Il2CppCodeGenWriteBarrier((void**)(&___TrueString_5), (void*)value); } inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___FalseString_6)); } inline String_t* get_FalseString_6() const { return ___FalseString_6; } inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; } inline void set_FalseString_6(String_t* value) { ___FalseString_6 = value; Il2CppCodeGenWriteBarrier((void**)(&___FalseString_6), (void*)value); } }; // UnityEngine.Color struct Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 { public: // System.Single UnityEngine.Color::r float ___r_0; // System.Single UnityEngine.Color::g float ___g_1; // System.Single UnityEngine.Color::b float ___b_2; // System.Single UnityEngine.Color::a float ___a_3; public: inline static int32_t get_offset_of_r_0() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___r_0)); } inline float get_r_0() const { return ___r_0; } inline float* get_address_of_r_0() { return &___r_0; } inline void set_r_0(float value) { ___r_0 = value; } inline static int32_t get_offset_of_g_1() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___g_1)); } inline float get_g_1() const { return ___g_1; } inline float* get_address_of_g_1() { return &___g_1; } inline void set_g_1(float value) { ___g_1 = value; } inline static int32_t get_offset_of_b_2() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___b_2)); } inline float get_b_2() const { return ___b_2; } inline float* get_address_of_b_2() { return &___b_2; } inline void set_b_2(float value) { ___b_2 = value; } inline static int32_t get_offset_of_a_3() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___a_3)); } inline float get_a_3() const { return ___a_3; } inline float* get_address_of_a_3() { return &___a_3; } inline void set_a_3(float value) { ___a_3 = value; } }; // System.Enum struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA : public ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 { public: public: }; struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields { public: // System.Char[] System.Enum::enumSeperatorCharArray CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* ___enumSeperatorCharArray_0; public: inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields, ___enumSeperatorCharArray_0)); } inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; } inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; } inline void set_enumSeperatorCharArray_0(CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* value) { ___enumSeperatorCharArray_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___enumSeperatorCharArray_0), (void*)value); } }; // Native definition for P/Invoke marshalling of System.Enum struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_pinvoke { }; // Native definition for COM marshalling of System.Enum struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_com { }; // System.IntPtr struct IntPtr_t { public: // System.Void* System.IntPtr::m_value void* ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); } inline void* get_m_value_0() const { return ___m_value_0; } inline void** get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(void* value) { ___m_value_0 = value; } }; struct IntPtr_t_StaticFields { public: // System.IntPtr System.IntPtr::Zero intptr_t ___Zero_1; public: inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); } inline intptr_t get_Zero_1() const { return ___Zero_1; } inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; } inline void set_Zero_1(intptr_t value) { ___Zero_1 = value; } }; // UnityEngine.Matrix4x4 struct Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 { public: // System.Single UnityEngine.Matrix4x4::m00 float ___m00_0; // System.Single UnityEngine.Matrix4x4::m10 float ___m10_1; // System.Single UnityEngine.Matrix4x4::m20 float ___m20_2; // System.Single UnityEngine.Matrix4x4::m30 float ___m30_3; // System.Single UnityEngine.Matrix4x4::m01 float ___m01_4; // System.Single UnityEngine.Matrix4x4::m11 float ___m11_5; // System.Single UnityEngine.Matrix4x4::m21 float ___m21_6; // System.Single UnityEngine.Matrix4x4::m31 float ___m31_7; // System.Single UnityEngine.Matrix4x4::m02 float ___m02_8; // System.Single UnityEngine.Matrix4x4::m12 float ___m12_9; // System.Single UnityEngine.Matrix4x4::m22 float ___m22_10; // System.Single UnityEngine.Matrix4x4::m32 float ___m32_11; // System.Single UnityEngine.Matrix4x4::m03 float ___m03_12; // System.Single UnityEngine.Matrix4x4::m13 float ___m13_13; // System.Single UnityEngine.Matrix4x4::m23 float ___m23_14; // System.Single UnityEngine.Matrix4x4::m33 float ___m33_15; public: inline static int32_t get_offset_of_m00_0() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m00_0)); } inline float get_m00_0() const { return ___m00_0; } inline float* get_address_of_m00_0() { return &___m00_0; } inline void set_m00_0(float value) { ___m00_0 = value; } inline static int32_t get_offset_of_m10_1() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m10_1)); } inline float get_m10_1() const { return ___m10_1; } inline float* get_address_of_m10_1() { return &___m10_1; } inline void set_m10_1(float value) { ___m10_1 = value; } inline static int32_t get_offset_of_m20_2() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m20_2)); } inline float get_m20_2() const { return ___m20_2; } inline float* get_address_of_m20_2() { return &___m20_2; } inline void set_m20_2(float value) { ___m20_2 = value; } inline static int32_t get_offset_of_m30_3() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m30_3)); } inline float get_m30_3() const { return ___m30_3; } inline float* get_address_of_m30_3() { return &___m30_3; } inline void set_m30_3(float value) { ___m30_3 = value; } inline static int32_t get_offset_of_m01_4() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m01_4)); } inline float get_m01_4() const { return ___m01_4; } inline float* get_address_of_m01_4() { return &___m01_4; } inline void set_m01_4(float value) { ___m01_4 = value; } inline static int32_t get_offset_of_m11_5() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m11_5)); } inline float get_m11_5() const { return ___m11_5; } inline float* get_address_of_m11_5() { return &___m11_5; } inline void set_m11_5(float value) { ___m11_5 = value; } inline static int32_t get_offset_of_m21_6() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m21_6)); } inline float get_m21_6() const { return ___m21_6; } inline float* get_address_of_m21_6() { return &___m21_6; } inline void set_m21_6(float value) { ___m21_6 = value; } inline static int32_t get_offset_of_m31_7() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m31_7)); } inline float get_m31_7() const { return ___m31_7; } inline float* get_address_of_m31_7() { return &___m31_7; } inline void set_m31_7(float value) { ___m31_7 = value; } inline static int32_t get_offset_of_m02_8() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m02_8)); } inline float get_m02_8() const { return ___m02_8; } inline float* get_address_of_m02_8() { return &___m02_8; } inline void set_m02_8(float value) { ___m02_8 = value; } inline static int32_t get_offset_of_m12_9() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m12_9)); } inline float get_m12_9() const { return ___m12_9; } inline float* get_address_of_m12_9() { return &___m12_9; } inline void set_m12_9(float value) { ___m12_9 = value; } inline static int32_t get_offset_of_m22_10() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m22_10)); } inline float get_m22_10() const { return ___m22_10; } inline float* get_address_of_m22_10() { return &___m22_10; } inline void set_m22_10(float value) { ___m22_10 = value; } inline static int32_t get_offset_of_m32_11() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m32_11)); } inline float get_m32_11() const { return ___m32_11; } inline float* get_address_of_m32_11() { return &___m32_11; } inline void set_m32_11(float value) { ___m32_11 = value; } inline static int32_t get_offset_of_m03_12() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m03_12)); } inline float get_m03_12() const { return ___m03_12; } inline float* get_address_of_m03_12() { return &___m03_12; } inline void set_m03_12(float value) { ___m03_12 = value; } inline static int32_t get_offset_of_m13_13() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m13_13)); } inline float get_m13_13() const { return ___m13_13; } inline float* get_address_of_m13_13() { return &___m13_13; } inline void set_m13_13(float value) { ___m13_13 = value; } inline static int32_t get_offset_of_m23_14() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m23_14)); } inline float get_m23_14() const { return ___m23_14; } inline float* get_address_of_m23_14() { return &___m23_14; } inline void set_m23_14(float value) { ___m23_14 = value; } inline static int32_t get_offset_of_m33_15() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461, ___m33_15)); } inline float get_m33_15() const { return ___m33_15; } inline float* get_address_of_m33_15() { return &___m33_15; } inline void set_m33_15(float value) { ___m33_15 = value; } }; struct Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461_StaticFields { public: // UnityEngine.Matrix4x4 UnityEngine.Matrix4x4::zeroMatrix Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___zeroMatrix_16; // UnityEngine.Matrix4x4 UnityEngine.Matrix4x4::identityMatrix Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___identityMatrix_17; public: inline static int32_t get_offset_of_zeroMatrix_16() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461_StaticFields, ___zeroMatrix_16)); } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 get_zeroMatrix_16() const { return ___zeroMatrix_16; } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 * get_address_of_zeroMatrix_16() { return &___zeroMatrix_16; } inline void set_zeroMatrix_16(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 value) { ___zeroMatrix_16 = value; } inline static int32_t get_offset_of_identityMatrix_17() { return static_cast<int32_t>(offsetof(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461_StaticFields, ___identityMatrix_17)); } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 get_identityMatrix_17() const { return ___identityMatrix_17; } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 * get_address_of_identityMatrix_17() { return &___identityMatrix_17; } inline void set_identityMatrix_17(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 value) { ___identityMatrix_17 = value; } }; // UnityEngine.Tilemaps.TileAnimationData struct TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 { public: // UnityEngine.Sprite[] UnityEngine.Tilemaps.TileAnimationData::m_AnimatedSprites SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77* ___m_AnimatedSprites_0; // System.Single UnityEngine.Tilemaps.TileAnimationData::m_AnimationSpeed float ___m_AnimationSpeed_1; // System.Single UnityEngine.Tilemaps.TileAnimationData::m_AnimationStartTime float ___m_AnimationStartTime_2; public: inline static int32_t get_offset_of_m_AnimatedSprites_0() { return static_cast<int32_t>(offsetof(TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26, ___m_AnimatedSprites_0)); } inline SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77* get_m_AnimatedSprites_0() const { return ___m_AnimatedSprites_0; } inline SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77** get_address_of_m_AnimatedSprites_0() { return &___m_AnimatedSprites_0; } inline void set_m_AnimatedSprites_0(SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77* value) { ___m_AnimatedSprites_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_AnimatedSprites_0), (void*)value); } inline static int32_t get_offset_of_m_AnimationSpeed_1() { return static_cast<int32_t>(offsetof(TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26, ___m_AnimationSpeed_1)); } inline float get_m_AnimationSpeed_1() const { return ___m_AnimationSpeed_1; } inline float* get_address_of_m_AnimationSpeed_1() { return &___m_AnimationSpeed_1; } inline void set_m_AnimationSpeed_1(float value) { ___m_AnimationSpeed_1 = value; } inline static int32_t get_offset_of_m_AnimationStartTime_2() { return static_cast<int32_t>(offsetof(TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26, ___m_AnimationStartTime_2)); } inline float get_m_AnimationStartTime_2() const { return ___m_AnimationStartTime_2; } inline float* get_address_of_m_AnimationStartTime_2() { return &___m_AnimationStartTime_2; } inline void set_m_AnimationStartTime_2(float value) { ___m_AnimationStartTime_2 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.Tilemaps.TileAnimationData struct TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_pinvoke { SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77* ___m_AnimatedSprites_0; float ___m_AnimationSpeed_1; float ___m_AnimationStartTime_2; }; // Native definition for COM marshalling of UnityEngine.Tilemaps.TileAnimationData struct TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_com { SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77* ___m_AnimatedSprites_0; float ___m_AnimationSpeed_1; float ___m_AnimationStartTime_2; }; // UnityEngine.Vector3Int struct Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA { public: // System.Int32 UnityEngine.Vector3Int::m_X int32_t ___m_X_0; // System.Int32 UnityEngine.Vector3Int::m_Y int32_t ___m_Y_1; // System.Int32 UnityEngine.Vector3Int::m_Z int32_t ___m_Z_2; public: inline static int32_t get_offset_of_m_X_0() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA, ___m_X_0)); } inline int32_t get_m_X_0() const { return ___m_X_0; } inline int32_t* get_address_of_m_X_0() { return &___m_X_0; } inline void set_m_X_0(int32_t value) { ___m_X_0 = value; } inline static int32_t get_offset_of_m_Y_1() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA, ___m_Y_1)); } inline int32_t get_m_Y_1() const { return ___m_Y_1; } inline int32_t* get_address_of_m_Y_1() { return &___m_Y_1; } inline void set_m_Y_1(int32_t value) { ___m_Y_1 = value; } inline static int32_t get_offset_of_m_Z_2() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA, ___m_Z_2)); } inline int32_t get_m_Z_2() const { return ___m_Z_2; } inline int32_t* get_address_of_m_Z_2() { return &___m_Z_2; } inline void set_m_Z_2(int32_t value) { ___m_Z_2 = value; } }; struct Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields { public: // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_Zero Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_Zero_3; // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_One Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_One_4; // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_Up Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_Up_5; // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_Down Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_Down_6; // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_Left Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_Left_7; // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_Right Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_Right_8; // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_Forward Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_Forward_9; // UnityEngine.Vector3Int UnityEngine.Vector3Int::s_Back Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___s_Back_10; public: inline static int32_t get_offset_of_s_Zero_3() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_Zero_3)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_Zero_3() const { return ___s_Zero_3; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_Zero_3() { return &___s_Zero_3; } inline void set_s_Zero_3(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_Zero_3 = value; } inline static int32_t get_offset_of_s_One_4() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_One_4)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_One_4() const { return ___s_One_4; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_One_4() { return &___s_One_4; } inline void set_s_One_4(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_One_4 = value; } inline static int32_t get_offset_of_s_Up_5() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_Up_5)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_Up_5() const { return ___s_Up_5; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_Up_5() { return &___s_Up_5; } inline void set_s_Up_5(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_Up_5 = value; } inline static int32_t get_offset_of_s_Down_6() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_Down_6)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_Down_6() const { return ___s_Down_6; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_Down_6() { return &___s_Down_6; } inline void set_s_Down_6(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_Down_6 = value; } inline static int32_t get_offset_of_s_Left_7() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_Left_7)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_Left_7() const { return ___s_Left_7; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_Left_7() { return &___s_Left_7; } inline void set_s_Left_7(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_Left_7 = value; } inline static int32_t get_offset_of_s_Right_8() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_Right_8)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_Right_8() const { return ___s_Right_8; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_Right_8() { return &___s_Right_8; } inline void set_s_Right_8(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_Right_8 = value; } inline static int32_t get_offset_of_s_Forward_9() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_Forward_9)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_Forward_9() const { return ___s_Forward_9; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_Forward_9() { return &___s_Forward_9; } inline void set_s_Forward_9(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_Forward_9 = value; } inline static int32_t get_offset_of_s_Back_10() { return static_cast<int32_t>(offsetof(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA_StaticFields, ___s_Back_10)); } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA get_s_Back_10() const { return ___s_Back_10; } inline Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * get_address_of_s_Back_10() { return &___s_Back_10; } inline void set_s_Back_10(Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA value) { ___s_Back_10 = value; } }; // System.Void struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5 { public: union { struct { }; uint8_t Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5__padding[1]; }; public: }; // System.Delegate struct Delegate_t : public RuntimeObject { public: // System.IntPtr System.Delegate::method_ptr Il2CppMethodPointer ___method_ptr_0; // System.IntPtr System.Delegate::invoke_impl intptr_t ___invoke_impl_1; // System.Object System.Delegate::m_target RuntimeObject * ___m_target_2; // System.IntPtr System.Delegate::method intptr_t ___method_3; // System.IntPtr System.Delegate::delegate_trampoline intptr_t ___delegate_trampoline_4; // System.IntPtr System.Delegate::extra_arg intptr_t ___extra_arg_5; // System.IntPtr System.Delegate::method_code intptr_t ___method_code_6; // System.Reflection.MethodInfo System.Delegate::method_info MethodInfo_t * ___method_info_7; // System.Reflection.MethodInfo System.Delegate::original_method_info MethodInfo_t * ___original_method_info_8; // System.DelegateData System.Delegate::data DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___data_9; // System.Boolean System.Delegate::method_is_virtual bool ___method_is_virtual_10; public: inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_ptr_0)); } inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; } inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; } inline void set_method_ptr_0(Il2CppMethodPointer value) { ___method_ptr_0 = value; } inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t, ___invoke_impl_1)); } inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; } inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; } inline void set_invoke_impl_1(intptr_t value) { ___invoke_impl_1 = value; } inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t, ___m_target_2)); } inline RuntimeObject * get_m_target_2() const { return ___m_target_2; } inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; } inline void set_m_target_2(RuntimeObject * value) { ___m_target_2 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_target_2), (void*)value); } inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_3)); } inline intptr_t get_method_3() const { return ___method_3; } inline intptr_t* get_address_of_method_3() { return &___method_3; } inline void set_method_3(intptr_t value) { ___method_3 = value; } inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t, ___delegate_trampoline_4)); } inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; } inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; } inline void set_delegate_trampoline_4(intptr_t value) { ___delegate_trampoline_4 = value; } inline static int32_t get_offset_of_extra_arg_5() { return static_cast<int32_t>(offsetof(Delegate_t, ___extra_arg_5)); } inline intptr_t get_extra_arg_5() const { return ___extra_arg_5; } inline intptr_t* get_address_of_extra_arg_5() { return &___extra_arg_5; } inline void set_extra_arg_5(intptr_t value) { ___extra_arg_5 = value; } inline static int32_t get_offset_of_method_code_6() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_code_6)); } inline intptr_t get_method_code_6() const { return ___method_code_6; } inline intptr_t* get_address_of_method_code_6() { return &___method_code_6; } inline void set_method_code_6(intptr_t value) { ___method_code_6 = value; } inline static int32_t get_offset_of_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_info_7)); } inline MethodInfo_t * get_method_info_7() const { return ___method_info_7; } inline MethodInfo_t ** get_address_of_method_info_7() { return &___method_info_7; } inline void set_method_info_7(MethodInfo_t * value) { ___method_info_7 = value; Il2CppCodeGenWriteBarrier((void**)(&___method_info_7), (void*)value); } inline static int32_t get_offset_of_original_method_info_8() { return static_cast<int32_t>(offsetof(Delegate_t, ___original_method_info_8)); } inline MethodInfo_t * get_original_method_info_8() const { return ___original_method_info_8; } inline MethodInfo_t ** get_address_of_original_method_info_8() { return &___original_method_info_8; } inline void set_original_method_info_8(MethodInfo_t * value) { ___original_method_info_8 = value; Il2CppCodeGenWriteBarrier((void**)(&___original_method_info_8), (void*)value); } inline static int32_t get_offset_of_data_9() { return static_cast<int32_t>(offsetof(Delegate_t, ___data_9)); } inline DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * get_data_9() const { return ___data_9; } inline DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 ** get_address_of_data_9() { return &___data_9; } inline void set_data_9(DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * value) { ___data_9 = value; Il2CppCodeGenWriteBarrier((void**)(&___data_9), (void*)value); } inline static int32_t get_offset_of_method_is_virtual_10() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_is_virtual_10)); } inline bool get_method_is_virtual_10() const { return ___method_is_virtual_10; } inline bool* get_address_of_method_is_virtual_10() { return &___method_is_virtual_10; } inline void set_method_is_virtual_10(bool value) { ___method_is_virtual_10 = value; } }; // Native definition for P/Invoke marshalling of System.Delegate struct Delegate_t_marshaled_pinvoke { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___data_9; int32_t ___method_is_virtual_10; }; // Native definition for COM marshalling of System.Delegate struct Delegate_t_marshaled_com { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___data_9; int32_t ___method_is_virtual_10; }; // UnityEngine.Object struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A : public RuntimeObject { public: // System.IntPtr UnityEngine.Object::m_CachedPtr intptr_t ___m_CachedPtr_0; public: inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A, ___m_CachedPtr_0)); } inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; } inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; } inline void set_m_CachedPtr_0(intptr_t value) { ___m_CachedPtr_0 = value; } }; struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_StaticFields { public: // System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1; public: inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); } inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; } inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; } inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value) { ___OffsetOfInstanceIDInCPlusPlusObject_1 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.Object struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke { intptr_t ___m_CachedPtr_0; }; // Native definition for COM marshalling of UnityEngine.Object struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com { intptr_t ___m_CachedPtr_0; }; // UnityEngine.Tilemaps.TileFlags struct TileFlags_tAA2786C2FC3467D33A613BE2AE244E9E43EF510B { public: // System.Int32 UnityEngine.Tilemaps.TileFlags::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(TileFlags_tAA2786C2FC3467D33A613BE2AE244E9E43EF510B, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; // UnityEngine.Tilemaps.Tile/ColliderType struct ColliderType_tB8E55E3EB1D378726420E99E6F7646DC119923FB { public: // System.Int32 UnityEngine.Tilemaps.Tile/ColliderType::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ColliderType_tB8E55E3EB1D378726420E99E6F7646DC119923FB, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; // UnityEngine.Component struct Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // UnityEngine.GameObject struct GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // System.MulticastDelegate struct MulticastDelegate_t : public Delegate_t { public: // System.Delegate[] System.MulticastDelegate::delegates DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* ___delegates_11; public: inline static int32_t get_offset_of_delegates_11() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___delegates_11)); } inline DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* get_delegates_11() const { return ___delegates_11; } inline DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8** get_address_of_delegates_11() { return &___delegates_11; } inline void set_delegates_11(DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* value) { ___delegates_11 = value; Il2CppCodeGenWriteBarrier((void**)(&___delegates_11), (void*)value); } }; // Native definition for P/Invoke marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_pinvoke : public Delegate_t_marshaled_pinvoke { Delegate_t_marshaled_pinvoke** ___delegates_11; }; // Native definition for COM marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_com : public Delegate_t_marshaled_com { Delegate_t_marshaled_com** ___delegates_11; }; // UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // Native definition for P/Invoke marshalling of UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_pinvoke : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke { }; // Native definition for COM marshalling of UnityEngine.ScriptableObject struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_com : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com { }; // UnityEngine.Sprite struct Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // UnityEngine.U2D.SpriteAtlas struct SpriteAtlas_t72834B063A58822D683F5557DF8D164740C8A5F9 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A { public: public: }; // UnityEngine.Tilemaps.TileData struct TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 { public: // UnityEngine.Sprite UnityEngine.Tilemaps.TileData::m_Sprite Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___m_Sprite_0; // UnityEngine.Color UnityEngine.Tilemaps.TileData::m_Color Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___m_Color_1; // UnityEngine.Matrix4x4 UnityEngine.Tilemaps.TileData::m_Transform Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___m_Transform_2; // UnityEngine.GameObject UnityEngine.Tilemaps.TileData::m_GameObject GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___m_GameObject_3; // UnityEngine.Tilemaps.TileFlags UnityEngine.Tilemaps.TileData::m_Flags int32_t ___m_Flags_4; // UnityEngine.Tilemaps.Tile/ColliderType UnityEngine.Tilemaps.TileData::m_ColliderType int32_t ___m_ColliderType_5; public: inline static int32_t get_offset_of_m_Sprite_0() { return static_cast<int32_t>(offsetof(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6, ___m_Sprite_0)); } inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * get_m_Sprite_0() const { return ___m_Sprite_0; } inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 ** get_address_of_m_Sprite_0() { return &___m_Sprite_0; } inline void set_m_Sprite_0(Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * value) { ___m_Sprite_0 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_Sprite_0), (void*)value); } inline static int32_t get_offset_of_m_Color_1() { return static_cast<int32_t>(offsetof(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6, ___m_Color_1)); } inline Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 get_m_Color_1() const { return ___m_Color_1; } inline Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 * get_address_of_m_Color_1() { return &___m_Color_1; } inline void set_m_Color_1(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 value) { ___m_Color_1 = value; } inline static int32_t get_offset_of_m_Transform_2() { return static_cast<int32_t>(offsetof(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6, ___m_Transform_2)); } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 get_m_Transform_2() const { return ___m_Transform_2; } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 * get_address_of_m_Transform_2() { return &___m_Transform_2; } inline void set_m_Transform_2(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 value) { ___m_Transform_2 = value; } inline static int32_t get_offset_of_m_GameObject_3() { return static_cast<int32_t>(offsetof(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6, ___m_GameObject_3)); } inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * get_m_GameObject_3() const { return ___m_GameObject_3; } inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 ** get_address_of_m_GameObject_3() { return &___m_GameObject_3; } inline void set_m_GameObject_3(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * value) { ___m_GameObject_3 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_GameObject_3), (void*)value); } inline static int32_t get_offset_of_m_Flags_4() { return static_cast<int32_t>(offsetof(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6, ___m_Flags_4)); } inline int32_t get_m_Flags_4() const { return ___m_Flags_4; } inline int32_t* get_address_of_m_Flags_4() { return &___m_Flags_4; } inline void set_m_Flags_4(int32_t value) { ___m_Flags_4 = value; } inline static int32_t get_offset_of_m_ColliderType_5() { return static_cast<int32_t>(offsetof(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6, ___m_ColliderType_5)); } inline int32_t get_m_ColliderType_5() const { return ___m_ColliderType_5; } inline int32_t* get_address_of_m_ColliderType_5() { return &___m_ColliderType_5; } inline void set_m_ColliderType_5(int32_t value) { ___m_ColliderType_5 = value; } }; // Native definition for P/Invoke marshalling of UnityEngine.Tilemaps.TileData struct TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_pinvoke { Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___m_Sprite_0; Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___m_Color_1; Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___m_Transform_2; GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___m_GameObject_3; int32_t ___m_Flags_4; int32_t ___m_ColliderType_5; }; // Native definition for COM marshalling of UnityEngine.Tilemaps.TileData struct TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_com { Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___m_Sprite_0; Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___m_Color_1; Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___m_Transform_2; GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___m_GameObject_3; int32_t ___m_Flags_4; int32_t ___m_ColliderType_5; }; // System.Action`1<UnityEngine.U2D.SpriteAtlas> struct Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF : public MulticastDelegate_t { public: public: }; // UnityEngine.Behaviour struct Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9 : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 { public: public: }; // UnityEngine.Renderer struct Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 { public: public: }; // UnityEngine.Tilemaps.TileBase struct TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 : public ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A { public: public: }; // UnityEngine.GridLayout struct GridLayout_t7BA9C388D3466CA1F18CAD50848F670F670D5D29 : public Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9 { public: public: }; // UnityEngine.Tilemaps.Tile struct Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 : public TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 { public: // UnityEngine.Sprite UnityEngine.Tilemaps.Tile::m_Sprite Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___m_Sprite_4; // UnityEngine.Color UnityEngine.Tilemaps.Tile::m_Color Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___m_Color_5; // UnityEngine.Matrix4x4 UnityEngine.Tilemaps.Tile::m_Transform Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___m_Transform_6; // UnityEngine.GameObject UnityEngine.Tilemaps.Tile::m_InstancedGameObject GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___m_InstancedGameObject_7; // UnityEngine.Tilemaps.TileFlags UnityEngine.Tilemaps.Tile::m_Flags int32_t ___m_Flags_8; // UnityEngine.Tilemaps.Tile/ColliderType UnityEngine.Tilemaps.Tile::m_ColliderType int32_t ___m_ColliderType_9; public: inline static int32_t get_offset_of_m_Sprite_4() { return static_cast<int32_t>(offsetof(Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27, ___m_Sprite_4)); } inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * get_m_Sprite_4() const { return ___m_Sprite_4; } inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 ** get_address_of_m_Sprite_4() { return &___m_Sprite_4; } inline void set_m_Sprite_4(Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * value) { ___m_Sprite_4 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_Sprite_4), (void*)value); } inline static int32_t get_offset_of_m_Color_5() { return static_cast<int32_t>(offsetof(Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27, ___m_Color_5)); } inline Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 get_m_Color_5() const { return ___m_Color_5; } inline Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 * get_address_of_m_Color_5() { return &___m_Color_5; } inline void set_m_Color_5(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 value) { ___m_Color_5 = value; } inline static int32_t get_offset_of_m_Transform_6() { return static_cast<int32_t>(offsetof(Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27, ___m_Transform_6)); } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 get_m_Transform_6() const { return ___m_Transform_6; } inline Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 * get_address_of_m_Transform_6() { return &___m_Transform_6; } inline void set_m_Transform_6(Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 value) { ___m_Transform_6 = value; } inline static int32_t get_offset_of_m_InstancedGameObject_7() { return static_cast<int32_t>(offsetof(Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27, ___m_InstancedGameObject_7)); } inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * get_m_InstancedGameObject_7() const { return ___m_InstancedGameObject_7; } inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 ** get_address_of_m_InstancedGameObject_7() { return &___m_InstancedGameObject_7; } inline void set_m_InstancedGameObject_7(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * value) { ___m_InstancedGameObject_7 = value; Il2CppCodeGenWriteBarrier((void**)(&___m_InstancedGameObject_7), (void*)value); } inline static int32_t get_offset_of_m_Flags_8() { return static_cast<int32_t>(offsetof(Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27, ___m_Flags_8)); } inline int32_t get_m_Flags_8() const { return ___m_Flags_8; } inline int32_t* get_address_of_m_Flags_8() { return &___m_Flags_8; } inline void set_m_Flags_8(int32_t value) { ___m_Flags_8 = value; } inline static int32_t get_offset_of_m_ColliderType_9() { return static_cast<int32_t>(offsetof(Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27, ___m_ColliderType_9)); } inline int32_t get_m_ColliderType_9() const { return ___m_ColliderType_9; } inline int32_t* get_address_of_m_ColliderType_9() { return &___m_ColliderType_9; } inline void set_m_ColliderType_9(int32_t value) { ___m_ColliderType_9 = value; } }; // UnityEngine.Tilemaps.TilemapRenderer struct TilemapRenderer_t8E3D220C1B3617980570642AB943280E4B1B6BC8 : public Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C { public: public: }; // UnityEngine.Tilemaps.Tilemap struct Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 : public GridLayout_t7BA9C388D3466CA1F18CAD50848F670F670D5D29 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif // UnityEngine.Sprite[] struct SpriteU5BU5D_t8DB77E112FFC97B722E701189DCB4059F943FD77 : public RuntimeArray { public: ALIGN_FIELD (8) Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * m_Items[1]; public: inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value); } inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value); } }; // System.Void System.Action`1<System.Object>::.ctor(System.Object,System.IntPtr) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Action_1__ctor_mA671E933C9D3DAE4E3F71D34FDDA971739618158_gshared (Action_1_tD9663D9715FAA4E62035CFCF1AD4D094EE7872DC * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method); // System.Void System.Object::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405 (RuntimeObject * __this, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.Tilemap::RefreshTile(UnityEngine.Vector3Int) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tilemap_RefreshTile_m1A2B0119B58A5E409BF899A1F88CBD3E23599193 (Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.ITilemap::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ITilemap__ctor_m94E2A628CC647832AA3B576274241AAB0CDAC504 (ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * __this, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.TileData::set_sprite(UnityEngine.Sprite) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___value0, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.TileData::set_color(UnityEngine.Color) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___value0, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.TileData::set_transform(UnityEngine.Matrix4x4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___value0, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.TileData::set_gameObject(UnityEngine.GameObject) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___value0, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.TileData::set_flags(UnityEngine.Tilemaps.TileFlags) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, int32_t ___value0, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.TileData::set_colliderType(UnityEngine.Tilemaps.Tile/ColliderType) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, int32_t ___value0, const RuntimeMethod* method); // UnityEngine.Color UnityEngine.Color::get_white() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 Color_get_white_mB21E47D20959C3AEC41AF8BA04F63AC89FAF319E (const RuntimeMethod* method); // UnityEngine.Matrix4x4 UnityEngine.Matrix4x4::get_identity() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 Matrix4x4_get_identity_mC91289718DDD3DDBE0A10551BDA59A446414A596 (const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.TileBase::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileBase__ctor_mEF753C200728FD143A358A5AF2B7978D9A982A67 (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.ITilemap::RefreshTile(UnityEngine.Vector3Int) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ITilemap_RefreshTile_mC602A7D2A938BFF0D959CAE20BCF8253A34B4D87 (ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, const RuntimeMethod* method); // System.Void UnityEngine.ScriptableObject::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063 (ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A * __this, const RuntimeMethod* method); // System.Void UnityEngine.Tilemaps.Tilemap::RefreshTile_Injected(UnityEngine.Vector3Int&) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32 (Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * ___position0, const RuntimeMethod* method); // System.Void System.Action`1<UnityEngine.U2D.SpriteAtlas>::.ctor(System.Object,System.IntPtr) inline void Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02 (Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method) { (( void (*) (Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF *, RuntimeObject *, intptr_t, const RuntimeMethod*))Action_1__ctor_mA671E933C9D3DAE4E3F71D34FDDA971739618158_gshared)(__this, ___object0, ___method1, method); } // System.Void UnityEngine.U2D.SpriteAtlasManager::add_atlasRegistered(System.Action`1<UnityEngine.U2D.SpriteAtlas>) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void SpriteAtlasManager_add_atlasRegistered_mE6C9446A8FA30F4F4B317CFCFC5AE98EE060C3FE (Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF * ___value0, const RuntimeMethod* method); // System.Void UnityEngine.U2D.SpriteAtlasManager::remove_atlasRegistered(System.Action`1<UnityEngine.U2D.SpriteAtlas>) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void SpriteAtlasManager_remove_atlasRegistered_m9B9CFC51E64BF35DFFCBC83EF2BBCDDA3870F0CE (Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF * ___value0, const RuntimeMethod* method); #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Tilemaps.ITilemap::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ITilemap__ctor_m94E2A628CC647832AA3B576274241AAB0CDAC504 (ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ITilemap__ctor_m94E2A628CC647832AA3B576274241AAB0CDAC504_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(ITilemap__ctor_m94E2A628CC647832AA3B576274241AAB0CDAC504_RuntimeMethod_var); { Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Tilemaps.ITilemap::RefreshTile(UnityEngine.Vector3Int) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ITilemap_RefreshTile_mC602A7D2A938BFF0D959CAE20BCF8253A34B4D87 (ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ITilemap_RefreshTile_mC602A7D2A938BFF0D959CAE20BCF8253A34B4D87_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(ITilemap_RefreshTile_mC602A7D2A938BFF0D959CAE20BCF8253A34B4D87_RuntimeMethod_var); { Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * L_0 = __this->get_m_Tilemap_1(); Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA L_1 = ___position0; NullCheck(L_0); Tilemap_RefreshTile_m1A2B0119B58A5E409BF899A1F88CBD3E23599193(L_0, L_1, /*hidden argument*/NULL); return; } } // UnityEngine.Tilemaps.ITilemap UnityEngine.Tilemaps.ITilemap::CreateInstance() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ITilemap_CreateInstance_mAFF78AF4B2AB532C3A95FB324D2DB5F062D7E821 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ITilemap_CreateInstance_mAFF78AF4B2AB532C3A95FB324D2DB5F062D7E821_RuntimeMethod_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(ITilemap_CreateInstance_mAFF78AF4B2AB532C3A95FB324D2DB5F062D7E821_RuntimeMethod_var); ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * V_0 = NULL; { ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * L_0 = (ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 *)il2cpp_codegen_object_new(ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_il2cpp_TypeInfo_var); ITilemap__ctor_m94E2A628CC647832AA3B576274241AAB0CDAC504(L_0, /*hidden argument*/NULL); ((ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_StaticFields*)il2cpp_codegen_static_fields_for(ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_il2cpp_TypeInfo_var))->set_s_Instance_0(L_0); ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * L_1 = ((ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_StaticFields*)il2cpp_codegen_static_fields_for(ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013_il2cpp_TypeInfo_var))->get_s_Instance_0(); V_0 = L_1; goto IL_0013; } IL_0013: { ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * L_2 = V_0; return L_2; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Sprite UnityEngine.Tilemaps.Tile::get_sprite() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * Tile_get_sprite_m55D8F25A18CA3FA4DAF1FB60E77D8552978FC7E9 (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_get_sprite_m55D8F25A18CA3FA4DAF1FB60E77D8552978FC7E9_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_get_sprite_m55D8F25A18CA3FA4DAF1FB60E77D8552978FC7E9_RuntimeMethod_var); Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * V_0 = NULL; { Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * L_0 = __this->get_m_Sprite_4(); V_0 = L_0; goto IL_000a; } IL_000a: { Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.Tilemaps.Tile::set_sprite(UnityEngine.Sprite) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile_set_sprite_m29904A3BC52CDFB8BF48604CD0FED0EF3477BCE4 (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_set_sprite_m29904A3BC52CDFB8BF48604CD0FED0EF3477BCE4_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_set_sprite_m29904A3BC52CDFB8BF48604CD0FED0EF3477BCE4_RuntimeMethod_var); { Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * L_0 = ___value0; __this->set_m_Sprite_4(L_0); return; } } // UnityEngine.Color UnityEngine.Tilemaps.Tile::get_color() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 Tile_get_color_mD8EBC5D6FFD0CCCE7AE4C23F4AFEE7FA73CCE838 (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_get_color_mD8EBC5D6FFD0CCCE7AE4C23F4AFEE7FA73CCE838_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_get_color_mD8EBC5D6FFD0CCCE7AE4C23F4AFEE7FA73CCE838_RuntimeMethod_var); Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 V_0; memset((&V_0), 0, sizeof(V_0)); { Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 L_0 = __this->get_m_Color_5(); V_0 = L_0; goto IL_000a; } IL_000a: { Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 L_1 = V_0; return L_1; } } // System.Void UnityEngine.Tilemaps.Tile::set_color(UnityEngine.Color) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile_set_color_m855E5C00F35C08077450D27BC5BB18BA7F2D67FC (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_set_color_m855E5C00F35C08077450D27BC5BB18BA7F2D67FC_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_set_color_m855E5C00F35C08077450D27BC5BB18BA7F2D67FC_RuntimeMethod_var); { Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 L_0 = ___value0; __this->set_m_Color_5(L_0); return; } } // UnityEngine.Matrix4x4 UnityEngine.Tilemaps.Tile::get_transform() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 Tile_get_transform_m010FA5FE2A3C48BCE79DAF095D2B7A652BD2B32B (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_get_transform_m010FA5FE2A3C48BCE79DAF095D2B7A652BD2B32B_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_get_transform_m010FA5FE2A3C48BCE79DAF095D2B7A652BD2B32B_RuntimeMethod_var); Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 V_0; memset((&V_0), 0, sizeof(V_0)); { Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 L_0 = __this->get_m_Transform_6(); V_0 = L_0; goto IL_000a; } IL_000a: { Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 L_1 = V_0; return L_1; } } // System.Void UnityEngine.Tilemaps.Tile::set_transform(UnityEngine.Matrix4x4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile_set_transform_mDD4E70226F1A89377D3E4822DDD666B1E4F7EDFB (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_set_transform_mDD4E70226F1A89377D3E4822DDD666B1E4F7EDFB_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_set_transform_mDD4E70226F1A89377D3E4822DDD666B1E4F7EDFB_RuntimeMethod_var); { Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 L_0 = ___value0; __this->set_m_Transform_6(L_0); return; } } // UnityEngine.GameObject UnityEngine.Tilemaps.Tile::get_gameObject() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * Tile_get_gameObject_m5121800140E9009AE43AA782AC2437EB05E0477B (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_get_gameObject_m5121800140E9009AE43AA782AC2437EB05E0477B_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_get_gameObject_m5121800140E9009AE43AA782AC2437EB05E0477B_RuntimeMethod_var); GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * V_0 = NULL; { GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = __this->get_m_InstancedGameObject_7(); V_0 = L_0; goto IL_000a; } IL_000a: { GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.Tilemaps.Tile::set_gameObject(UnityEngine.GameObject) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile_set_gameObject_mB450C0800EDB44EDB8E8F56DAFF75B7C13FC6420 (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_set_gameObject_mB450C0800EDB44EDB8E8F56DAFF75B7C13FC6420_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_set_gameObject_mB450C0800EDB44EDB8E8F56DAFF75B7C13FC6420_RuntimeMethod_var); { GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = ___value0; __this->set_m_InstancedGameObject_7(L_0); return; } } // UnityEngine.Tilemaps.TileFlags UnityEngine.Tilemaps.Tile::get_flags() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Tile_get_flags_m10DF194D35F7B96B52795369365B332F1432143C (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_get_flags_m10DF194D35F7B96B52795369365B332F1432143C_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_get_flags_m10DF194D35F7B96B52795369365B332F1432143C_RuntimeMethod_var); int32_t V_0 = 0; { int32_t L_0 = __this->get_m_Flags_8(); V_0 = L_0; goto IL_000a; } IL_000a: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.Tilemaps.Tile::set_flags(UnityEngine.Tilemaps.TileFlags) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile_set_flags_mAF0336180878A6D396DFFE4B9D3C188F6D6010CB (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, int32_t ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_set_flags_mAF0336180878A6D396DFFE4B9D3C188F6D6010CB_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_set_flags_mAF0336180878A6D396DFFE4B9D3C188F6D6010CB_RuntimeMethod_var); { int32_t L_0 = ___value0; __this->set_m_Flags_8(L_0); return; } } // UnityEngine.Tilemaps.Tile/ColliderType UnityEngine.Tilemaps.Tile::get_colliderType() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Tile_get_colliderType_m978D12FD1D9210E990576B0515A6296B0566025E (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_get_colliderType_m978D12FD1D9210E990576B0515A6296B0566025E_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_get_colliderType_m978D12FD1D9210E990576B0515A6296B0566025E_RuntimeMethod_var); int32_t V_0 = 0; { int32_t L_0 = __this->get_m_ColliderType_9(); V_0 = L_0; goto IL_000a; } IL_000a: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.Tilemaps.Tile::set_colliderType(UnityEngine.Tilemaps.Tile/ColliderType) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile_set_colliderType_m0D7FFF0A6A80C2C026030149CF924E9FB8A852C1 (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, int32_t ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_set_colliderType_m0D7FFF0A6A80C2C026030149CF924E9FB8A852C1_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_set_colliderType_m0D7FFF0A6A80C2C026030149CF924E9FB8A852C1_RuntimeMethod_var); { int32_t L_0 = ___value0; __this->set_m_ColliderType_9(L_0); return; } } // System.Void UnityEngine.Tilemaps.Tile::GetTileData(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap,UnityEngine.Tilemaps.TileData&) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile_GetTileData_m6BDFA53AD74BF38AAD340203F43D1C796BAB8F9A (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___tilemap1, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * ___tileData2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile_GetTileData_m6BDFA53AD74BF38AAD340203F43D1C796BAB8F9A_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile_GetTileData_m6BDFA53AD74BF38AAD340203F43D1C796BAB8F9A_RuntimeMethod_var); { TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * L_0 = ___tileData2; Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * L_1 = __this->get_m_Sprite_4(); TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8((TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *)L_0, L_1, /*hidden argument*/NULL); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * L_2 = ___tileData2; Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 L_3 = __this->get_m_Color_5(); TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF((TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *)L_2, L_3, /*hidden argument*/NULL); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * L_4 = ___tileData2; Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 L_5 = __this->get_m_Transform_6(); TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C((TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *)L_4, L_5, /*hidden argument*/NULL); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * L_6 = ___tileData2; GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_7 = __this->get_m_InstancedGameObject_7(); TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685((TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *)L_6, L_7, /*hidden argument*/NULL); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * L_8 = ___tileData2; int32_t L_9 = __this->get_m_Flags_8(); TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4((TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *)L_8, L_9, /*hidden argument*/NULL); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * L_10 = ___tileData2; int32_t L_11 = __this->get_m_ColliderType_9(); TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3((TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *)L_10, L_11, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Tilemaps.Tile::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tile__ctor_m8783DD13225005DB9323B7A7E86AB8641033B4A8 (Tile_tA049C8EDFA25A7FFBFE6ED4C73B4121A7FB65C27 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tile__ctor_m8783DD13225005DB9323B7A7E86AB8641033B4A8_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tile__ctor_m8783DD13225005DB9323B7A7E86AB8641033B4A8_RuntimeMethod_var); { Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 L_0; L_0 = Color_get_white_mB21E47D20959C3AEC41AF8BA04F63AC89FAF319E(/*hidden argument*/NULL); __this->set_m_Color_5(L_0); Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 L_1; L_1 = Matrix4x4_get_identity_mC91289718DDD3DDBE0A10551BDA59A446414A596(/*hidden argument*/NULL); __this->set_m_Transform_6(L_1); __this->set_m_Flags_8(1); __this->set_m_ColliderType_9(1); TileBase__ctor_mEF753C200728FD143A358A5AF2B7978D9A982A67(__this, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.Tilemaps.TileAnimationData IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke(const TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26& unmarshaled, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_pinvoke& marshaled) { Exception_t* ___m_AnimatedSprites_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_AnimatedSprites' of type 'TileAnimationData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_AnimatedSprites_0Exception, NULL); } IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke_back(const TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_pinvoke& marshaled, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26& unmarshaled) { Exception_t* ___m_AnimatedSprites_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_AnimatedSprites' of type 'TileAnimationData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_AnimatedSprites_0Exception, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.Tilemaps.TileAnimationData IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke_cleanup(TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.Tilemaps.TileAnimationData IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_com(const TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26& unmarshaled, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_com& marshaled) { Exception_t* ___m_AnimatedSprites_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_AnimatedSprites' of type 'TileAnimationData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_AnimatedSprites_0Exception, NULL); } IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_com_back(const TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_com& marshaled, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26& unmarshaled) { Exception_t* ___m_AnimatedSprites_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_AnimatedSprites' of type 'TileAnimationData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_AnimatedSprites_0Exception, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.Tilemaps.TileAnimationData IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_com_cleanup(TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshaled_com& marshaled) { } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Tilemaps.TileBase::RefreshTile(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileBase_RefreshTile_m5614A37F408CCA8FABACB0A911D5EB5883ED051D (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___tilemap1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileBase_RefreshTile_m5614A37F408CCA8FABACB0A911D5EB5883ED051D_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileBase_RefreshTile_m5614A37F408CCA8FABACB0A911D5EB5883ED051D_RuntimeMethod_var); { ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * L_0 = ___tilemap1; Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA L_1 = ___position0; NullCheck(L_0); ITilemap_RefreshTile_mC602A7D2A938BFF0D959CAE20BCF8253A34B4D87(L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Tilemaps.TileBase::GetTileData(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap,UnityEngine.Tilemaps.TileData&) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileBase_GetTileData_m936097A6D3A32A3C3E54EE7FF4EDA22CC7FF6088 (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___tilemap1, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * ___tileData2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileBase_GetTileData_m936097A6D3A32A3C3E54EE7FF4EDA22CC7FF6088_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileBase_GetTileData_m936097A6D3A32A3C3E54EE7FF4EDA22CC7FF6088_RuntimeMethod_var); { return; } } // UnityEngine.Tilemaps.TileData UnityEngine.Tilemaps.TileBase::GetTileDataNoRef(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 TileBase_GetTileDataNoRef_mF9B5CA6886A8761D504478146F053484AF3CFACA (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___tilemap1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileBase_GetTileDataNoRef_mF9B5CA6886A8761D504478146F053484AF3CFACA_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileBase_GetTileDataNoRef_mF9B5CA6886A8761D504478146F053484AF3CFACA_RuntimeMethod_var); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 V_0; memset((&V_0), 0, sizeof(V_0)); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 V_1; memset((&V_1), 0, sizeof(V_1)); { il2cpp_codegen_initobj((&V_0), sizeof(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 )); Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA L_0 = ___position0; ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * L_1 = ___tilemap1; VirtActionInvoker3< Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA , ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 *, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * >::Invoke(5 /* System.Void UnityEngine.Tilemaps.TileBase::GetTileData(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap,UnityEngine.Tilemaps.TileData&) */, __this, L_0, L_1, (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *)(&V_0)); TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 L_2 = V_0; V_1 = L_2; goto IL_0018; } IL_0018: { TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 L_3 = V_1; return L_3; } } // System.Boolean UnityEngine.Tilemaps.TileBase::GetTileAnimationData(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap,UnityEngine.Tilemaps.TileAnimationData&) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool TileBase_GetTileAnimationData_mA54F70D100129EC2074DC2F17471FDE315FF0C02 (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___tilemap1, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 * ___tileAnimationData2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileBase_GetTileAnimationData_mA54F70D100129EC2074DC2F17471FDE315FF0C02_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileBase_GetTileAnimationData_mA54F70D100129EC2074DC2F17471FDE315FF0C02_RuntimeMethod_var); bool V_0 = false; { V_0 = (bool)0; goto IL_0005; } IL_0005: { bool L_0 = V_0; return L_0; } } // UnityEngine.Tilemaps.TileAnimationData UnityEngine.Tilemaps.TileBase::GetTileAnimationDataNoRef(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 TileBase_GetTileAnimationDataNoRef_m0562FCB94DCECA5DFD526806900B14D69ADB2FBF (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___tilemap1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileBase_GetTileAnimationDataNoRef_m0562FCB94DCECA5DFD526806900B14D69ADB2FBF_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileBase_GetTileAnimationDataNoRef_m0562FCB94DCECA5DFD526806900B14D69ADB2FBF_RuntimeMethod_var); TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 V_0; memset((&V_0), 0, sizeof(V_0)); TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 V_1; memset((&V_1), 0, sizeof(V_1)); { il2cpp_codegen_initobj((&V_0), sizeof(TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 )); Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA L_0 = ___position0; ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * L_1 = ___tilemap1; bool L_2; L_2 = VirtFuncInvoker3< bool, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA , ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 *, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 * >::Invoke(6 /* System.Boolean UnityEngine.Tilemaps.TileBase::GetTileAnimationData(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap,UnityEngine.Tilemaps.TileAnimationData&) */, __this, L_0, L_1, (TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 *)(&V_0)); TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 L_3 = V_0; V_1 = L_3; goto IL_0018; } IL_0018: { TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26 L_4 = V_1; return L_4; } } // System.Boolean UnityEngine.Tilemaps.TileBase::StartUp(UnityEngine.Vector3Int,UnityEngine.Tilemaps.ITilemap,UnityEngine.GameObject) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool TileBase_StartUp_mD3221FE426FCFC3F0CC0ECDEE2DFEE7E6F94C8E7 (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, ITilemap_t706EAD5C1A9032E29FF4454BDDED85C53C5E0013 * ___tilemap1, GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___go2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileBase_StartUp_mD3221FE426FCFC3F0CC0ECDEE2DFEE7E6F94C8E7_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileBase_StartUp_mD3221FE426FCFC3F0CC0ECDEE2DFEE7E6F94C8E7_RuntimeMethod_var); bool V_0 = false; { V_0 = (bool)0; goto IL_0005; } IL_0005: { bool L_0 = V_0; return L_0; } } // System.Void UnityEngine.Tilemaps.TileBase::.ctor() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileBase__ctor_mEF753C200728FD143A358A5AF2B7978D9A982A67 (TileBase_t151317678DF54EED207F0AD6F4C590272B9AA052 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileBase__ctor_mEF753C200728FD143A358A5AF2B7978D9A982A67_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileBase__ctor_mEF753C200728FD143A358A5AF2B7978D9A982A67_RuntimeMethod_var); { ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063(__this, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // Conversion methods for marshalling of: UnityEngine.Tilemaps.TileData IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke(const TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6& unmarshaled, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_pinvoke& marshaled) { Exception_t* ___m_Sprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_Sprite' of type 'TileData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_Sprite_0Exception, NULL); } IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke_back(const TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_pinvoke& marshaled, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6& unmarshaled) { Exception_t* ___m_Sprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_Sprite' of type 'TileData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_Sprite_0Exception, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.Tilemaps.TileData IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke_cleanup(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.Tilemaps.TileData IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_com(const TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6& unmarshaled, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_com& marshaled) { Exception_t* ___m_Sprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_Sprite' of type 'TileData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_Sprite_0Exception, NULL); } IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_com_back(const TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_com& marshaled, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6& unmarshaled) { Exception_t* ___m_Sprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_Sprite' of type 'TileData': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_Sprite_0Exception, NULL); } // Conversion method for clean up from marshalling of: UnityEngine.Tilemaps.TileData IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_com_cleanup(TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshaled_com& marshaled) { } // System.Void UnityEngine.Tilemaps.TileData::set_sprite(UnityEngine.Sprite) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8_RuntimeMethod_var); { Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * L_0 = ___value0; __this->set_m_Sprite_0(L_0); return; } } IL2CPP_EXTERN_C void TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8_AdjustorThunk (RuntimeObject * __this, Sprite_t5B10B1178EC2E6F53D33FFD77557F31C08A51ED9 * ___value0, const RuntimeMethod* method) { int32_t _offset = 1; TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * _thisAdjusted = reinterpret_cast<TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *>(__this + _offset); TileData_set_sprite_m24F99D8E52155C9E6F56B5CF647C7A423ACB76E8(_thisAdjusted, ___value0, method); } // System.Void UnityEngine.Tilemaps.TileData::set_color(UnityEngine.Color) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF_RuntimeMethod_var); { Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 L_0 = ___value0; __this->set_m_Color_1(L_0); return; } } IL2CPP_EXTERN_C void TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF_AdjustorThunk (RuntimeObject * __this, Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___value0, const RuntimeMethod* method) { int32_t _offset = 1; TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * _thisAdjusted = reinterpret_cast<TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *>(__this + _offset); TileData_set_color_m821F675529A25C6ED8D8786DBD2DFE286A6385AF(_thisAdjusted, ___value0, method); } // System.Void UnityEngine.Tilemaps.TileData::set_transform(UnityEngine.Matrix4x4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C_RuntimeMethod_var); { Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 L_0 = ___value0; __this->set_m_Transform_2(L_0); return; } } IL2CPP_EXTERN_C void TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C_AdjustorThunk (RuntimeObject * __this, Matrix4x4_tDE7FF4F2E2EA284F6EFE00D627789D0E5B8B4461 ___value0, const RuntimeMethod* method) { int32_t _offset = 1; TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * _thisAdjusted = reinterpret_cast<TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *>(__this + _offset); TileData_set_transform_m39FBC6A129739589B8993B4185DFF72B0B472E2C(_thisAdjusted, ___value0, method); } // System.Void UnityEngine.Tilemaps.TileData::set_gameObject(UnityEngine.GameObject) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685_RuntimeMethod_var); { GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = ___value0; __this->set_m_GameObject_3(L_0); return; } } IL2CPP_EXTERN_C void TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685_AdjustorThunk (RuntimeObject * __this, GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___value0, const RuntimeMethod* method) { int32_t _offset = 1; TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * _thisAdjusted = reinterpret_cast<TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *>(__this + _offset); TileData_set_gameObject_m02BDDD787C6E5AD0DFA29E510E4FFD101090D685(_thisAdjusted, ___value0, method); } // System.Void UnityEngine.Tilemaps.TileData::set_flags(UnityEngine.Tilemaps.TileFlags) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, int32_t ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4_RuntimeMethod_var); { int32_t L_0 = ___value0; __this->set_m_Flags_4(L_0); return; } } IL2CPP_EXTERN_C void TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4_AdjustorThunk (RuntimeObject * __this, int32_t ___value0, const RuntimeMethod* method) { int32_t _offset = 1; TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * _thisAdjusted = reinterpret_cast<TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *>(__this + _offset); TileData_set_flags_m1AC7BA3912E9B4B85F4F0B322FE2361AE475B0E4(_thisAdjusted, ___value0, method); } // System.Void UnityEngine.Tilemaps.TileData::set_colliderType(UnityEngine.Tilemaps.Tile/ColliderType) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3 (TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * __this, int32_t ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3_RuntimeMethod_var); { int32_t L_0 = ___value0; __this->set_m_ColliderType_5(L_0); return; } } IL2CPP_EXTERN_C void TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3_AdjustorThunk (RuntimeObject * __this, int32_t ___value0, const RuntimeMethod* method) { int32_t _offset = 1; TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 * _thisAdjusted = reinterpret_cast<TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6 *>(__this + _offset); TileData_set_colliderType_mEF741658774E43C8AB0986EEA9FBDA1838BF34A3(_thisAdjusted, ___value0, method); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Tilemaps.Tilemap::RefreshTile(UnityEngine.Vector3Int) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tilemap_RefreshTile_m1A2B0119B58A5E409BF899A1F88CBD3E23599193 (Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA ___position0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tilemap_RefreshTile_m1A2B0119B58A5E409BF899A1F88CBD3E23599193_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tilemap_RefreshTile_m1A2B0119B58A5E409BF899A1F88CBD3E23599193_RuntimeMethod_var); { Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32(__this, (Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA *)(&___position0), /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Tilemaps.Tilemap::RefreshTile_Injected(UnityEngine.Vector3Int&) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32 (Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 * __this, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA * ___position0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32_RuntimeMethod_var); typedef void (*Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32_ftn) (Tilemap_t0A1D80C1C0EDF8BDB0A2E274DC0826EF03642F31 *, Vector3Int_t197C3BA05CF19F1A22D40F8AE64CD4102AFB77EA *); static Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Tilemap_RefreshTile_Injected_mB711BD24637434562FA9278325FEE07FC0931B32_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Tilemaps.Tilemap::RefreshTile_Injected(UnityEngine.Vector3Int&)"); _il2cpp_icall_func(__this, ___position0); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Tilemaps.TilemapRenderer::RegisterSpriteAtlasRegistered() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TilemapRenderer_RegisterSpriteAtlasRegistered_mB338307A0CCCF3193B76CAF873FCC898463C1DF8 (TilemapRenderer_t8E3D220C1B3617980570642AB943280E4B1B6BC8 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02_RuntimeMethod_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&SpriteAtlasManager_t7D972A1381969245B36EB0ABCC60C3AE033FF53F_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_RuntimeMethod_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TilemapRenderer_RegisterSpriteAtlasRegistered_mB338307A0CCCF3193B76CAF873FCC898463C1DF8_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TilemapRenderer_RegisterSpriteAtlasRegistered_mB338307A0CCCF3193B76CAF873FCC898463C1DF8_RuntimeMethod_var); { Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF * L_0 = (Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF *)il2cpp_codegen_object_new(Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF_il2cpp_TypeInfo_var); Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02(L_0, __this, (intptr_t)((intptr_t)TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_RuntimeMethod_var), /*hidden argument*/Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02_RuntimeMethod_var); IL2CPP_RUNTIME_CLASS_INIT(SpriteAtlasManager_t7D972A1381969245B36EB0ABCC60C3AE033FF53F_il2cpp_TypeInfo_var); SpriteAtlasManager_add_atlasRegistered_mE6C9446A8FA30F4F4B317CFCFC5AE98EE060C3FE(L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Tilemaps.TilemapRenderer::UnregisterSpriteAtlasRegistered() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TilemapRenderer_UnregisterSpriteAtlasRegistered_mCE258B84F549040922D062E22F1205C562E0577A (TilemapRenderer_t8E3D220C1B3617980570642AB943280E4B1B6BC8 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02_RuntimeMethod_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&SpriteAtlasManager_t7D972A1381969245B36EB0ABCC60C3AE033FF53F_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_RuntimeMethod_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TilemapRenderer_UnregisterSpriteAtlasRegistered_mCE258B84F549040922D062E22F1205C562E0577A_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TilemapRenderer_UnregisterSpriteAtlasRegistered_mCE258B84F549040922D062E22F1205C562E0577A_RuntimeMethod_var); { Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF * L_0 = (Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF *)il2cpp_codegen_object_new(Action_1_tFA33A618CBBE03EC01FE6A4CD6489392526BA5FF_il2cpp_TypeInfo_var); Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02(L_0, __this, (intptr_t)((intptr_t)TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_RuntimeMethod_var), /*hidden argument*/Action_1__ctor_mA1131790E07477705CD8A08A98BBDF0B61EC3E02_RuntimeMethod_var); IL2CPP_RUNTIME_CLASS_INIT(SpriteAtlasManager_t7D972A1381969245B36EB0ABCC60C3AE033FF53F_il2cpp_TypeInfo_var); SpriteAtlasManager_remove_atlasRegistered_m9B9CFC51E64BF35DFFCBC83EF2BBCDDA3870F0CE(L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Tilemaps.TilemapRenderer::OnSpriteAtlasRegistered(UnityEngine.U2D.SpriteAtlas) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093 (TilemapRenderer_t8E3D220C1B3617980570642AB943280E4B1B6BC8 * __this, SpriteAtlas_t72834B063A58822D683F5557DF8D164740C8A5F9 * ___atlas0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_RuntimeMethod_var); s_Il2CppMethodInitialized = true; } StackTraceSentry _stackTraceSentry(TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_RuntimeMethod_var); typedef void (*TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_ftn) (TilemapRenderer_t8E3D220C1B3617980570642AB943280E4B1B6BC8 *, SpriteAtlas_t72834B063A58822D683F5557DF8D164740C8A5F9 *); static TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (TilemapRenderer_OnSpriteAtlasRegistered_m5C732CF912E2BC489C5E621EB3820DA1AF0A7093_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Tilemaps.TilemapRenderer::OnSpriteAtlasRegistered(UnityEngine.U2D.SpriteAtlas)"); _il2cpp_icall_func(__this, ___atlas0); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif
package hex.tree.xgboost; import org.junit.Test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.text.NumberFormat; import java.text.ParseException; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; import static org.junit.Assert.*; public class XGBoostUtilsTest { @Test public void parseFeatureScores() throws IOException, ParseException { String[] modelDump = readLines(getClass().getResource("xgbdump.txt")); String[] expectedVarImps = readLines(getClass().getResource("xgbvarimps.txt")); Map<String, XGBoostUtils.FeatureScore> scores = XGBoostUtils.parseFeatureScores(modelDump); double totalGain = 0; double totalCover = 0; double totalFrequency = 0; for (XGBoostUtils.FeatureScore score : scores.values()) { totalGain += score._gain; totalCover += score._cover; totalFrequency += score._frequency; } NumberFormat nf = NumberFormat.getInstance(Locale.US); for (String varImp : expectedVarImps) { String[] vals = varImp.split(" "); XGBoostUtils.FeatureScore score = scores.get(vals[0]); assertNotNull("Score " + vals[0] + " should ve calculated", score); float expectedGain = nf.parse(vals[1]).floatValue(); assertEquals("Gain of " + vals[0], expectedGain, score._gain / totalGain, 1e-6); float expectedCover = nf.parse(vals[2]).floatValue(); assertEquals("Cover of " + vals[0], expectedCover, score._cover / totalCover, 1e-6); float expectedFrequency = nf.parse(vals[3]).floatValue(); assertEquals("Frequency of " + vals[0], expectedFrequency, score._frequency / totalFrequency, 1e-6); } } private static String[] readLines(URL url) throws IOException{ List<String> lines = new ArrayList<>(); try (BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream()))) { String line; while ((line = r.readLine()) != null) { lines.add(line); } } return lines.toArray(new String[0]); } }
numbers = [4, 11, 18, 12, 7] def median(array) sorted = array.sort len = sorted.length (sorted[(len - 1) / 2] + sorted[len / 2]) / 2.0 end puts median(numbers) # Output: 11.0
<reponame>ddv12138/spider-bing-wallpaper package getBingWallpaer; import java.net.MalformedURLException; import java.net.URL; public class StartConection { public static void main(String[] args) { URL url = null; try { for(int i = -1;i<8;i++) { url = new URL("http://cn.bing.com/HPImageArchive.aspx?idx="+i+"&n=1"); HandleUrl handler = new HandleUrl(url); handler.saveWallpaperFromUrl(); } } catch (MalformedURLException e) { e.printStackTrace(); } } }
#!/bin/sh unzip -o appleseed-2.0.0-beta-0-g5cff7b96b-mac64-clang.zip unzip -o emily_1.4.zip unzip -o disney_material_1.2.zip unzip -o material_tester_1.4.zip cp -va emily/* appleseed cp -va disney_material/* appleseed cp -va material_tester/* appleseed echo "#!/bin/bash cd appleseed ./bin/appleseed.cli --benchmark-mode \$@ > \$LOG_FILE 2>&1" > appleseed-benchmark chmod +x appleseed-benchmark
#!/bin/bash #"***************************************************************************************************" # common initialization #"***************************************************************************************************" # select master or some GitHub hash version, and whether or not to force a clean THIS_CHECKOUT=master THIS_CLEAN=true # perform some version control checks on this file ./gitcheck.sh $0 # initialize some environment variables and perform some sanity checks . ./init.sh # we don't want tee to capture exit codes set -o pipefail # ensure we alwaye start from the $WORKSPACE directory cd "$WORKSPACE" #"***************************************************************************************************" # fetch the ULX3S examples into the workspace #"***************************************************************************************************" THIS_LOG=$LOG_DIRECTORY"/"$THIS_FILE_NAME"_ulx3s-bin_"$LOG_SUFFIX".log" echo "***************************************************************************************************" echo " ulx3s-examples. Saving log to $THIS_LOG" echo "***************************************************************************************************" # Call the common github checkout: $SAVED_CURRENT_PATH/fetch_github.sh https://github.com/ulx3s/ulx3s-examples.git ulx3s-examples $THIS_CHECKOUT 2>&1 | tee -a "$THIS_LOG" $SAVED_CURRENT_PATH/check_for_error.sh $? "$THIS_LOG" cd ulx3s-examples # TODO - any checks? cd $SAVED_CURRENT_PATH echo "Completed $0 " | tee -a "$THIS_LOG"
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.smile2 = void 0; var smile2 = { "viewBox": "0 0 16 16", "children": [{ "name": "path", "attribs": { "fill": "#000000", "d": "M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM11 4c0.552 0 1 0.448 1 1s-0.448 1-1 1-1-0.448-1-1 0.448-1 1-1zM5 4c0.552 0 1 0.448 1 1s-0.448 1-1 1-1-0.448-1-1 0.448-1 1-1zM8 13c-1.82 0-3.413-0.973-4.288-2.427l1.286-0.772c0.612 1.018 1.727 1.699 3.002 1.699s2.389-0.681 3.002-1.699l1.286 0.772c-0.874 1.454-2.467 2.427-4.288 2.427z" } }] }; exports.smile2 = smile2;
const { Pool } = require("pg"); module.exports = new Pool({ user: "gbinqkrx", password: "<PASSWORD>", host: "motty.db.elephantsql.com", port: 5432, database: "gbinqkrx" });
<reponame>lananh265/social-network "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.pinterest2 = void 0; var pinterest2 = { "viewBox": "0 0 16 16", "children": [{ "name": "path", "attribs": { "fill": "#000000", "d": "M8 0c-4.412 0-8 3.587-8 8s3.587 8 8 8 8-3.588 8-8-3.588-8-8-8zM8 14.931c-0.716 0-1.403-0.109-2.053-0.309 0.281-0.459 0.706-1.216 0.862-1.816 0.084-0.325 0.431-1.647 0.431-1.647 0.225 0.431 0.888 0.797 1.587 0.797 2.091 0 3.597-1.922 3.597-4.313 0-2.291-1.869-4.003-4.272-4.003-2.991 0-4.578 2.009-4.578 4.194 0 1.016 0.541 2.281 1.406 2.684 0.131 0.063 0.2 0.034 0.231-0.094 0.022-0.097 0.141-0.566 0.194-0.787 0.016-0.069 0.009-0.131-0.047-0.2-0.287-0.347-0.516-0.988-0.516-1.581 0-1.528 1.156-3.009 3.128-3.009 1.703 0 2.894 1.159 2.894 2.819 0 1.875-0.947 3.175-2.178 3.175-0.681 0-1.191-0.563-1.025-1.253 0.197-0.825 0.575-1.713 0.575-2.306 0-0.531-0.284-0.975-0.878-0.975-0.697 0-1.253 0.719-1.253 1.684 0 0.612 0.206 1.028 0.206 1.028s-0.688 2.903-0.813 3.444c-0.141 0.6-0.084 1.441-0.025 1.988-2.578-1.006-4.406-3.512-4.406-6.45 0-3.828 3.103-6.931 6.931-6.931s6.931 3.103 6.931 6.931c0 3.828-3.103 6.931-6.931 6.931z" } }] }; exports.pinterest2 = pinterest2;
var morgan = require('morgan'); //payload delivered through a prototype pollution attack Object.prototype[':method :url :status :res[content-length] - :response-time ms'] = '25 \\" + console.log(\'hello!\'); + //:method :url :status :res[content-length] - :response-time ms'; //benign looking usage of morgan that can be exploited due to the prototype pollution attack var f = morgan(':method :url :status :res[content-length] - :response-time ms'); f({}, {}, function () { });
#!/bin/bash if [ ! $# == 2 ]; then echo 'Put first string' read $ONE echo 'And now second string' read $TWO else ONE="$1" TWO="$2" fi if [ "$ONE" == "$TWO" ]; then echo -e '\e[92mSame' else echo -e '\e[91mNot the same' fi echo -e '\e[39m'
<gh_stars>1-10 # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/api/serviceusage/v1beta1/serviceusage.proto for package 'Google.Api.ServiceUsage.V1beta1' # Original file comments: # Copyright 2021 Google LLC # # 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. # require 'grpc' require 'google/api/serviceusage/v1beta1/serviceusage_pb' module Google module Api module ServiceUsage module V1beta1 module ServiceUsage # [Service Usage API](https://cloud.google.com/service-usage/docs/overview) class Service include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode self.service_name = 'google.api.serviceusage.v1beta1.ServiceUsage' # Enables a service so that it can be used with a project. # # Operation response type: `google.protobuf.Empty` rpc :EnableService, ::Google::Api::ServiceUsage::V1beta1::EnableServiceRequest, ::Google::Longrunning::Operation # Disables a service so that it can no longer be used with a project. # This prevents unintended usage that may cause unexpected billing # charges or security leaks. # # It is not valid to call the disable method on a service that is not # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if # the target service is not currently enabled. # # Operation response type: `google.protobuf.Empty` rpc :DisableService, ::Google::Api::ServiceUsage::V1beta1::DisableServiceRequest, ::Google::Longrunning::Operation # Returns the service configuration and enabled state for a given service. rpc :GetService, ::Google::Api::ServiceUsage::V1beta1::GetServiceRequest, ::Google::Api::ServiceUsage::V1beta1::Service # Lists all services available to the specified project, and the current # state of those services with respect to the project. The list includes # all public services, all services for which the calling user has the # `servicemanagement.services.bind` permission, and all services that have # already been enabled on the project. The list can be filtered to # only include services in a specific state, for example to only include # services enabled on the project. rpc :ListServices, ::Google::Api::ServiceUsage::V1beta1::ListServicesRequest, ::Google::Api::ServiceUsage::V1beta1::ListServicesResponse # Enables multiple services on a project. The operation is atomic: if # enabling any service fails, then the entire batch fails, and no state # changes occur. # # Operation response type: `google.protobuf.Empty` rpc :BatchEnableServices, ::Google::Api::ServiceUsage::V1beta1::BatchEnableServicesRequest, ::Google::Longrunning::Operation # Retrieves a summary of all quota information visible to the service # consumer, organized by service metric. Each metric includes information # about all of its defined limits. Each limit includes the limit # configuration (quota unit, preciseness, default value), the current # effective limit value, and all of the overrides applied to the limit. rpc :ListConsumerQuotaMetrics, ::Google::Api::ServiceUsage::V1beta1::ListConsumerQuotaMetricsRequest, ::Google::Api::ServiceUsage::V1beta1::ListConsumerQuotaMetricsResponse # Retrieves a summary of quota information for a specific quota metric rpc :GetConsumerQuotaMetric, ::Google::Api::ServiceUsage::V1beta1::GetConsumerQuotaMetricRequest, ::Google::Api::ServiceUsage::V1beta1::ConsumerQuotaMetric # Retrieves a summary of quota information for a specific quota limit. rpc :GetConsumerQuotaLimit, ::Google::Api::ServiceUsage::V1beta1::GetConsumerQuotaLimitRequest, ::Google::Api::ServiceUsage::V1beta1::ConsumerQuotaLimit # Creates an admin override. # An admin override is applied by an administrator of a parent folder or # parent organization of the consumer receiving the override. An admin # override is intended to limit the amount of quota the consumer can use out # of the total quota pool allocated to all children of the folder or # organization. rpc :CreateAdminOverride, ::Google::Api::ServiceUsage::V1beta1::CreateAdminOverrideRequest, ::Google::Longrunning::Operation # Updates an admin override. rpc :UpdateAdminOverride, ::Google::Api::ServiceUsage::V1beta1::UpdateAdminOverrideRequest, ::Google::Longrunning::Operation # Deletes an admin override. rpc :DeleteAdminOverride, ::Google::Api::ServiceUsage::V1beta1::DeleteAdminOverrideRequest, ::Google::Longrunning::Operation # Lists all admin overrides on this limit. rpc :ListAdminOverrides, ::Google::Api::ServiceUsage::V1beta1::ListAdminOverridesRequest, ::Google::Api::ServiceUsage::V1beta1::ListAdminOverridesResponse # Creates or updates multiple admin overrides atomically, all on the # same consumer, but on many different metrics or limits. # The name field in the quota override message should not be set. rpc :ImportAdminOverrides, ::Google::Api::ServiceUsage::V1beta1::ImportAdminOverridesRequest, ::Google::Longrunning::Operation # Creates a consumer override. # A consumer override is applied to the consumer on its own authority to # limit its own quota usage. Consumer overrides cannot be used to grant more # quota than would be allowed by admin overrides, producer overrides, or the # default limit of the service. rpc :CreateConsumerOverride, ::Google::Api::ServiceUsage::V1beta1::CreateConsumerOverrideRequest, ::Google::Longrunning::Operation # Updates a consumer override. rpc :UpdateConsumerOverride, ::Google::Api::ServiceUsage::V1beta1::UpdateConsumerOverrideRequest, ::Google::Longrunning::Operation # Deletes a consumer override. rpc :DeleteConsumerOverride, ::Google::Api::ServiceUsage::V1beta1::DeleteConsumerOverrideRequest, ::Google::Longrunning::Operation # Lists all consumer overrides on this limit. rpc :ListConsumerOverrides, ::Google::Api::ServiceUsage::V1beta1::ListConsumerOverridesRequest, ::Google::Api::ServiceUsage::V1beta1::ListConsumerOverridesResponse # Creates or updates multiple consumer overrides atomically, all on the # same consumer, but on many different metrics or limits. # The name field in the quota override message should not be set. rpc :ImportConsumerOverrides, ::Google::Api::ServiceUsage::V1beta1::ImportConsumerOverridesRequest, ::Google::Longrunning::Operation # Generates service identity for service. rpc :GenerateServiceIdentity, ::Google::Api::ServiceUsage::V1beta1::GenerateServiceIdentityRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class end end end end end
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'rubygems' require 'webmock/rspec' require 'userapi' include WebMock
x = 'curso de python no cursoemvideo' count = x.count('curso') print(count)
#!/bin/bash ###################################################################### # Script building manylinux silx wheels # The silx sources are dowloaded from the git repository # # Run it on a manylinux CentOS docker image. # For 64 bits wheels, run: # sudo docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/scriptname.sh # For 32 bits wheels, run: # sudo docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_i686 /io/scriptname.sh # # The option "-v `pwd`:/io" bind mounts the local directory on the # host to "/io" on the docker container. The wheels are saved in # ./build/wheelhouse. ###################################################################### set -e -x # uncomment and complete the following lines with your network # proxy address if necessary: #export http_proxy="http://proxy:port" #export https_proxy="http://proxy:port" #cat > /etc/yum/yum.conf <<EOF #[main] #proxy=http://proxy:port #EOF # x86_64 or i686 arch=`arch` # Install a system package required by our library # yum --disablerepo="*" --enablerepo="epel" install -y hdf5-devel.${arch} hdf5.${arch} git clone https://github.com/silx-kit/silx.git cd silx # build silx wheels for PYBIN in /opt/python/cp27-*/bin /opt/python/cp34-*/bin /opt/python/cp35-*/bin; do ${PYBIN}/pip install numpy # put initial wheels in /wheelhouse ${PYBIN}/pip wheel . -w /wheelhouse done # include libraries and move new wheels to ./build/wheelhouse/ for whl in /wheelhouse/silx*_${arch}.whl; do auditwheel repair $whl -w /io/build/wheelhouse/ done # run tests cat > /silx_tests.py <<EOF import silx.test silx.test.run_tests() EOF for PYBIN in /opt/python/cp27-*/bin /opt/python/cp34-*/bin /opt/python/cp35-*/bin; do # test ${PYBIN}/pip install h5py ${PYBIN}/pip install silx --no-index -f /io/build/wheelhouse WITH_QT_TEST=False ${PYBIN}/python /silx_tests.py done
package io.opensphere.feedback; import java.awt.Insets; import io.opensphere.core.PluginLoaderData; import io.opensphere.core.Toolbox; import io.opensphere.core.api.adapter.PluginAdapter; import io.opensphere.core.control.ui.ToolbarManager.SeparatorLocation; import io.opensphere.core.control.ui.ToolbarManager.ToolbarLocation; import io.opensphere.core.preferences.Preferences; import io.opensphere.core.util.image.IconUtil; import io.opensphere.core.util.image.IconUtil.IconType; import io.opensphere.core.util.swing.SplitButton; /** * The Class FeedbackPlugin. This plugin provides a mechanism for users to * submit feedback via a web page. */ public class FeedbackPlugin extends PluginAdapter { /** The Feedback button. */ private SplitButton myFeedbackButton; /** The Feedback manager. */ private FeedbackManager myFeedbackManager; /** * Gets the feedback button. * * @return the feedback button */ public SplitButton getFeedbackButton() { if (myFeedbackButton == null) { myFeedbackButton = new SplitButton("Feedback", null, false); IconUtil.setIcons(myFeedbackButton, IconType.BUG); myFeedbackButton.setToolTipText("Please provide your feedback!"); } return myFeedbackButton; } /** * Gets the feedback manager. * * @return the feedback manager */ public FeedbackManager getFeedbackManager() { return myFeedbackManager; } @Override public void initialize(PluginLoaderData plugindata, Toolbox toolbox) { super.initialize(plugindata, toolbox); // Check for one of the URL's and make sure there is a value before // loading the button // for this plugin. Preferences prefs = toolbox.getPreferencesRegistry().getPreferences(FeedbackManager.class); final String provideFeedbackStr = prefs.getString(FeedbackManager.PROVIDE_FEEDBACK, null); if (provideFeedbackStr != null) { myFeedbackManager = new FeedbackManager(); myFeedbackManager.addMenuItems(toolbox, getFeedbackButton()); toolbox.getUIRegistry().getToolbarComponentRegistry().registerToolbarComponent(ToolbarLocation.NORTH, "Feedback", getFeedbackButton(), 11000, SeparatorLocation.NONE, new Insets(0, 2, 0, 2)); } } }
#!/usr/bin/env bash ZIP_NAME=jetifier.zip curl "https://dl.google.com/dl/android/studio/jetifier-zips/1.0.0-beta09/jetifier-standalone.zip" -o $ZIP_NAME unzip $ZIP_NAME rm -rf $ZIP_NAME mv jetifier-standalone/bin/jetifier-standalone jetifier-standalone/bin/jetifier rm jetifier-standalone/bin/jetifier-standalone.bat echo "Done. jetifier ready"
git config --global user.email "travis@travis-ci.org" git config --global user.name "Travis CI" git checkout master git add instapi/version.txt git commit -m "Bump Version (Build $TRAVIS_BUILD_NUMBER) [skip version travis]" git remote rm origin git remote add origin https://breuerfelix:${GH_TOKEN}@github.com/breuerfelix/instapi.git git push --set-upstream origin master cat instapi/version.txt | xargs git tag git push --tags
package elasta.sql.ex; /** * Created by sohan on 6/27/2017. */ final public class SqlDbException extends RuntimeException { public SqlDbException(String msg) { super(msg); } }
#!/bin/sh #################################################################### # Script Name : maxminddownloader.sh # Description : Script to download Maxmind CVS and .mmdb Datafiles # Args : Use the .conf file to specify the licence # Author : Gerardo Gonzalez # Email : gerardoj.gonzalezg@bigg.blog #################################################################### # # Defining the colors sequences # you can update this to tput # GREEN="\e[38;5;46m" BLUE="\e[38;5;39m" RED="\e[38;5;196m" STOP="\e[0m" # # Printing the script name (while I think what to do next :) # printf "${GREEN}Maxmind GeoIP2 Downloader${STOP} by BigG\n\n" # # Config File # CONFIG_FILE="maxminddownloader.conf" printf "${BLUE}Loading the config from $CONFIG_FILE ...${STOP}\n" if [ -e $CONFIG_FILE ] then LICENSE_KEY=`cat $CONFIG_FILE | grep -Po 'LICENSE_KEY="?\K[^"?]*'` else printf "${RED}Config File $CONFIG_FILE not found.${STOP}\n" exit 1 fi # # Prep a new dir # DDIR="download_"`date +"%Y%m%d%H%M%S"` printf "${BLUE}Preparing a new Directory: ${STOP}$DDIR\n\n" mkdir $DDIR cd $DDIR # # Downloading Country CSV database # OFSHA="GeoLite2-Country-CSV.sha256" printf "${BLUE}Downloading Country CSV Database${STOP} ...\n" wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=$LICENSE_KEY&suffix=zip.sha256" -O $OFSHA OFDB=`head -1 $OFSHA | cut -d' ' -f3` DDATE=`echo $OFDB|cut -d_ -f2|cut -d. -f1` OFSHAD=`echo $OFSHA|cut -d. -f1`_$DDATE.`echo $OFSHA|cut -d. -f2` #printf "Updating: $OFSHA to $OFSHAD\n" mv $OFSHA $OFSHAD wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=$LICENSE_KEY&suffix=zip" -O $OFDB printf "\n" # # Downloading Country MMDB database # OFSHA="GeoLite2-Country.sha256" printf "${BLUE}Downloading Country MMDB Database${STOP} ...\n" wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$LICENSE_KEY&suffix=tar.gz.sha256" -O $OFSHA OFDB=`head -1 $OFSHA | cut -d' ' -f3` DDATE=`echo $OFDB|cut -d_ -f2|cut -d. -f1` OFSHAD=`echo $OFSHA|cut -d. -f1`_$DDATE.`echo $OFSHA|cut -d. -f2` #printf "Updating: $OFSHA to $OFSHAD\n" mv $OFSHA $OFSHAD wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$LICENSE_KEY&suffix=tar.gz" -O $OFDB printf "\n" # # Downloading City CSV database # OFSHA="GeoLite2-City-CSV.sha256" printf "${BLUE}Downloading City CSV database${STOP} ...\n" wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City-CSV&license_key=$LICENSE_KEY&suffix=zip.sha256" -O $OFSHA OFDB=`head -1 $OFSHA | cut -d' ' -f3` DDATE=`echo $OFDB|cut -d_ -f2|cut -d. -f1` OFSHAD=`echo $OFSHA|cut -d. -f1`_$DDATE.`echo $OFSHA|cut -d. -f2` #printf "Updating: $OFSHA to $OFSHAD\n" mv $OFSHA $OFSHAD wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City-CSV&license_key=$LICENSE_KEY&suffix=zip" -O $OFDB printf "\n" # # Downloading City MMDB database # OFSHA="GeoLite2-City.sha256" printf "${BLUE}Downloading City MMDB database${STOP} ...\n" wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$LICENSE_KEY&suffix=tar.gz.sha256" -O $OFSHA OFDB=`head -1 $OFSHA | cut -d' ' -f3` DDATE=`echo $OFDB|cut -d_ -f2|cut -d. -f1` OFSHAD=`echo $OFSHA|cut -d. -f1`_$DDATE.`echo $OFSHA|cut -d. -f2` #printf "Updating: $OFSHA to $OFSHAD\n" mv $OFSHA $OFSHAD wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$LICENSE_KEY&suffix=tar.gz" -O $OFDB printf "\n" # # Downloading ASN (Autonomous System Number [ORG]) CSV database # OFSHA="GeoLite2-ASN-CSV.sha256" printf "${BLUE}Downloading ANS/ORG CSV database${STOP} ...\n" wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN-CSV&license_key=$LICENSE_KEY&suffix=zip.sha256" -O $OFSHA OFDB=`head -1 $OFSHA | cut -d' ' -f3` DDATE=`echo $OFDB|cut -d_ -f2|cut -d. -f1` OFSHAD=`echo $OFSHA|cut -d. -f1`_$DDATE.`echo $OFSHA|cut -d. -f2` #printf "Updating: $OFSHA to $OFSHAD\n" mv $OFSHA $OFSHAD wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN-CSV&license_key=$LICENSE_KEY&suffix=zip" -O $OFDB printf "\n" # # Downloading ASN (Autonomous System Number [ORG]) MMDB database # OFSHA="GeoLite2-ASN.sha256" printf "${BLUE}Downloading ANS/ORG MMDB database${STOP} ...\n" wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=$LICENSE_KEY&suffix=tar.gz.sha256" -O $OFSHA OFDB=`head -1 $OFSHA | cut -d' ' -f3` DDATE=`echo $OFDB|cut -d_ -f2|cut -d. -f1` OFSHAD=`echo $OFSHA|cut -d. -f1`_$DDATE.`echo $OFSHA|cut -d. -f2` #printf "Updating: $OFSHA to $OFSHAD\n" mv $OFSHA $OFSHAD wget -q --show-progress "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=$LICENSE_KEY&suffix=tar.gz" -O $OFDB printf "\n" # Checking .... printf "${BLUE}Verifying with sha256sum ...${STOP}\n" sha256sum -c *.sha256 printf "\n"
<reponame>jrfaller/maracas package com.github.maracas.forges; public class ForgeException extends RuntimeException { public ForgeException(String message, Throwable cause) { super(message, cause); } public ForgeException(Throwable cause) { super(cause); } }
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-shuffled-N-VB/7-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-shuffled-N-VB/7-512+0+512-SS-N-1 --do_eval --per_device_eval_batch_size 1 --dataloader_drop_last --augmented --augmentation_function shuffle_sentences_remove_all_but_nouns_first_half_full --eval_function last_element_eval
function printElements(arr) { for (let i=0;i<arr.length;i++) console.log(arr[i]); }
package jssim; /** * * @author rodrigo */ import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import org.openimaj.image.MBFImage; import org.openimaj.video.xuggle.XuggleVideo; public class SSIMXuggleVideo{ public int qtdeFrames; public double[] quadrosSSIM; public XuggleVideo videoOriginal; public XuggleVideo videoProcessado; public SSIMXuggleVideo(File videoOriginal, File videoProcessado){ this.videoOriginal = new XuggleVideo(videoOriginal); this.videoProcessado = new XuggleVideo(videoProcessado); this.qtdeFrames = 61; this.quadrosSSIM = new double[61]; } //Separa o video em quadros public MBFImage[] separaEmFrames(XuggleVideo video){ System.out.println("separaEmFrames()"); MBFImage[] arrayImagens = new MBFImage[this.qtdeFrames]; int i = 0; for(MBFImage frame: video){ arrayImagens[i] = frame; i++; System.out.println("frame: "+i); if(i == this.qtdeFrames){break;} } return arrayImagens; } //Criar array com SSIMs de cada quadro public double[] framesParaSSIM(MBFImage[] arrayframesOriginal, MBFImage[] arrayframesProcessado)throws SsimException, IOException{ SsimCalculator ssimc; int quantidadeDeFrames = arrayframesProcessado.length; System.out.println("Quantidade de frames usada: "+quantidadeDeFrames); double[] arraySSIM = new double[quantidadeDeFrames]; for(int i = 0; i < quantidadeDeFrames - 4; i++){ System.out.println("i:"+i); ssimc = new SsimCalculator(arrayframesOriginal[i]); arraySSIM[i] = ssimc.compareMBFImageTo(arrayframesProcessado[i]); } System.out.println("Tamanho do array SSIM: "+arraySSIM.length); return arraySSIM; } // exibe o resultado dos SSIMs public void imprimeArraySsim(double[] arraySSIM){ short comprimento = (short)arraySSIM.length; System.out.println("Frame\tSSIM"); for(int i=0; i<comprimento; i++){ System.out.println(i+":\t"+arraySSIM[i]); } } // escreve o resultado calculado em um arquivo public void imprimeArraySsimEmArquivo(String processado, double[] arraySSIM) throws IOException{ processado = processado.replaceAll(".mov", "_SSIM.txt"); FileWriter fr = new FileWriter(processado); BufferedWriter br = new BufferedWriter(fr); PrintWriter out = new PrintWriter(br); for(int i=0; i<arraySSIM.length; i++){ if(arraySSIM[i] != 0.0){ out.write(arraySSIM[i]+""); out.write("\n"); } } out.close(); } }
package sandbox.either import scala.collection.immutable object Main21 extends App { val either1 = Right(11) val either2 = Right(33) val test: Either[Nothing, Int] = for { a <- either1 b <- either2 } yield a + b import cats.syntax.either._ val a: Either[String, Int] = 3.asRight[String] val b = 4.asRight[String] val result: Either[String, Int] = for { x <- a y <- b } yield x + y def count(num: List[Int]) = { // Either型を返したいので、Right(0)ではなくて 0.asRightを使う num.foldLeft(0.asRight[String]){(acc: Either[String, Int], num: Int) => { if(num > 0) { acc.map(_ + 1) } else { Left("noooooooo") } }} } for { a <- 1.asRight[String] b <- 0.asRight[String] c <- if(b == 0) "Error".asLeft[Int] else (a/b).asRight[String] } yield c * 100 } object Main22 extends App { import cats.syntax.either._ sealed trait LoginError // case classを定義すると、自動的にtrait Product trait Serializableがミックスインされる final case class UserNameError(userName: String) extends LoginError final case class PasswordError(password: String) extends LoginError case object UnexpectedError extends LoginError case class User(name: String, password: String) // 自前で型を作ってあげている // わかりやすいように type LoginResult = Either[LoginError, User] def errorHandling(error: LoginError): Unit = { error match { case UserNameError(u) => println("username is not found") case PasswordError(_) => println("password is not correct") case UnexpectedError => println("unexpected error") } val result1: LoginResult = User("tomoya", "kinsho").asRight[LoginError] // either.foldは、Leftの場合は第一引数が実行、Rightの場合は第二引数が実行される result1.fold(errorHandling, println) val result2: LoginResult = UserNameError("tomoya").asLeft[User] result2.fold( _ => errorHandling(_), _ => println(_) ) } }
const crange = document.querySelector(".crange--input"); const moneyL = document.querySelector(".crange--money"); crange.addEventListener("input", (e) => { // Printing Range Value let donation = e.target.value; moneyL.classList.add("animate"); donation == 0 ? (moneyL.innerHTML = `Fiyat. 0`) : (moneyL.innerHTML = `Fiyat: ` + `${e.target.value}`); // Removing Animation const removeAnim = () => { moneyL.classList.remove("animate"); }; moneyL.addEventListener("webkitAnimationEnd", removeAnim); moneyL.addEventListener("animationend", removeAnim); // Range-Bar BGColor Fill const percent = (100 * (e.target.value - e.target.min)) / (e.target.max - e.target.min); const fill = `#36f ${percent}%, #e7e8ec ${percent + 0.1}%`; e.target.style.background = `linear-gradient(90deg, ${fill})`; });
#include <stdio.h> #include <string.h> int areRotations(char *str1, char *str2) { int size = strlen(str1); char temp[size*2]; strcpy(temp, str1); strcat(temp, str1); if (strstr(temp, str2)) return 1; return 0; } int main() { char string1[] = "abcd"; char string2[] = "dcba"; if(areRotations(string1, string2)) printf("Yes"); else printf("No"); return 0; }
SELECT * FROM users_orders WHERE user_id = 1 ORDER BY order_date;
#!/bin/bash # Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file. DIR="$( cd "$( dirname "$0" )" && cd .. && pwd )" OUT_PATH="${DIR}/out/docs" $JAVA_HOME/bin/javadoc -Xdoclint:none -windowtitle "CEF3 Java API Docs" -footer "<center><a href="https://bitbucket.org/chromiumembedded/java-cef" target="_top">Chromium Embedded Framework (CEF)</a> Copyright &copy 2013 Marshall A. Greenblatt</center>" -nodeprecated -d "$OUT_PATH" -sourcepath "${DIR}/java" -link http://docs.oracle.com/javase/7/docs/api/ -subpackages org.cef cd ../tools
import { json } from 'express' import asyncHandler from 'express-async-handler' import Category from '../models/categoryModel.js' export const addCategory = async(req,res) => { const image = req.file const data = req.body const category = await Category.findOne({name : data.name}) if(!category){ const newCategory = new Category({ name: data.name, image: image.path }) await newCategory.save() console.log(newCategory) res.json({msg:'Category Added'}) } res.json({msg:'Category Already exist!'}) } export const getCategory = asyncHandler(async (req, res) => { const pageSize = 10 const page = Number(req.query.pageNumber) || 1 const keyword = req.query.keyword ? { name: { $regex: req.query.keyword, $options: 'i', }, } : {} const count = await Category.countDocuments({ ...keyword }) const category = await Category.find({ ...keyword }) .limit(pageSize) .skip(pageSize * (page - 1)) res.json({ category, page, pages: Math.ceil(count / pageSize) }) })
/* * Copyright 2008-2009 MOPAS(Ministry of Public Administration and Security). * * 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 org.egovframe.rte.fdl.security.securedobject.impl; import java.util.LinkedHashMap; import java.util.List; import java.util.Set; import org.egovframe.rte.fdl.security.config.SecurityConfig; import org.egovframe.rte.fdl.security.securedobject.EgovSecuredObjectService; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.security.access.ConfigAttribute; import org.springframework.security.web.util.matcher.RequestMatcher; /** * 보호객체 관리를 지원하는 구현 클래스 * * <p><b>NOTE:</b> Spring Security의 초기 데이터를 DB로 부터 조회하여 * 보호된 자원 접근 권한을 지원, 제어 할 수 있도록 구현한 클래스이다.</p> * * @author <NAME> * @since 2009.06.01 * @version 1.0 * <pre> * 개정이력(Modification Information) * * 수정일 수정자 수정내용 * ---------------------------------------------- * 2009.06.01 윤성종 최초 생성 * 2014.01.22 한성곤 Spring Security 3.2.X 업그레이드 적용 * </pre> */ public class SecuredObjectServiceImpl implements EgovSecuredObjectService, ApplicationContextAware { private SecuredObjectDAO securedObjectDAO; private String requestMatcherType = "ant"; // default public void setApplicationContext(ApplicationContext context) throws BeansException { if (context.getBeanNamesForType(SecurityConfig.class).length > 0) { SecurityConfig config = context.getBean(SecurityConfig.class); if (config != null) { requestMatcherType = config.getRequestMatcherType(); } } } public void setSecuredObjectDAO(SecuredObjectDAO securedObjectDAO) { this.securedObjectDAO = securedObjectDAO; } public void setRequestMatcherType(String requestMatcherType) { this.requestMatcherType = requestMatcherType; } public LinkedHashMap<RequestMatcher, List<ConfigAttribute>> getRolesAndUrl() throws Exception { LinkedHashMap<RequestMatcher, List<ConfigAttribute>> ret = new LinkedHashMap<RequestMatcher, List<ConfigAttribute>>(); LinkedHashMap<Object, List<ConfigAttribute>> data = securedObjectDAO.getRolesAndUrl(requestMatcherType); Set<Object> keys = data.keySet(); for (Object key : keys) { ret.put((RequestMatcher) key, data.get(key)); } return ret; } public LinkedHashMap<String, List<ConfigAttribute>> getRolesAndMethod() throws Exception { LinkedHashMap<String, List<ConfigAttribute>> ret = new LinkedHashMap<String, List<ConfigAttribute>>(); LinkedHashMap<Object, List<ConfigAttribute>> data = securedObjectDAO.getRolesAndMethod(); return getRolesAndPath(ret, data); } public LinkedHashMap<String, List<ConfigAttribute>> getRolesAndPointcut() throws Exception { LinkedHashMap<String, List<ConfigAttribute>> ret = new LinkedHashMap<String, List<ConfigAttribute>>(); LinkedHashMap<Object, List<ConfigAttribute>> data = securedObjectDAO.getRolesAndPointcut(); return getRolesAndPath(ret, data); } private LinkedHashMap<String, List<ConfigAttribute>> getRolesAndPath(LinkedHashMap<String, List<ConfigAttribute>> ret, LinkedHashMap<Object, List<ConfigAttribute>> data) { Set<Object> keys = data.keySet(); for (Object key : keys) { ret.put((String) key, data.get(key)); } return ret; } public List<ConfigAttribute> getMatchedRequestMapping(String url) throws Exception { return securedObjectDAO.getRegexMatchedRequestMapping(url); } public String getHierarchicalRoles() throws Exception { return securedObjectDAO.getHierarchicalRoles(); } }
# Decision Tree # # Create the root node # root_node = Node("Will the person purchase chocolate?") # Create the branch nodes # age_node = Node("Age") salary_node = Node("Salary") consumption_node = Node("Consumption") # Connect each branch node to the root node # root_node.add_children(age_node) root_node.add_children(salary_node) root_node.add_children(consumption_node) # Create the leaf nodes # under_20_node = Node("Under 20") between_20_30_node = Node("Between 20-30") above_30_node = Node("Above 30") low_salary_node = Node("Low Salary") medium_salary_node = Node("Medium Salary") high_salary_node = Node("High salary") no_consumption_node = Node("No Consumption") some_consumption_node = Node("Some Consumption") # Connect the leaf nodes to the branch nodes # age_node.add_children(under_20_node, between_20_30_node, above_30_node) salary_node.add_children(low_salary_node, medium_salary_node, high_salary_node) consumption_node.add_children(no_consumption_node, some_consumption_node) # Set the leaf nodes outcome # under_20_node.set_result("Yes") between_20_30_node.set_result("Yes") above_30_node.set_result("No") low_salary_node.set_result("No") medium_salary_node.set_result("Yes") high_salary_node.set_result("No") no_consumption_node.set_result("No") some_consumption_node.set_result("Yes")
const copyClip = (text: string) => { return navigator.clipboard.writeText(text); }; export { copyClip };
<reponame>pulsar-chem/BPModule<filename>lib/systems/l-phenylalanine.py<gh_stars>0 import pulsar as psr def load_ref_system(): """ Returns l-phenylalanine as found in the IQMol fragment library. All credit to https://github.com/nutjunkie/IQmol """ return psr.make_system(""" N 0.7060 -1.9967 -0.0757 C 1.1211 -0.6335 -0.4814 C 0.6291 0.4897 0.4485 C -0.8603 0.6071 0.4224 C -1.4999 1.1390 -0.6995 C -2.8840 1.2600 -0.7219 C -3.6384 0.8545 0.3747 C -3.0052 0.3278 1.4949 C -1.6202 0.2033 1.5209 C 2.6429 -0.5911 -0.5338 O 3.1604 -0.2029 -1.7213 O 3.4477 -0.8409 0.3447 H -0.2916 -2.0354 -0.0544 H 1.0653 -2.2124 0.8310 H 0.6990 -0.4698 -1.5067 H 1.0737 1.4535 0.1289 H 0.9896 0.3214 1.4846 H -0.9058 1.4624 -1.5623 H -3.3807 1.6765 -1.6044 H -4.7288 0.9516 0.3559 H -3.5968 0.0108 2.3601 H -1.1260 -0.2065 2.4095 H 4.1118 -0.2131 -1.6830 """)
import { ICommandProps } from '.' import { client } from '../index' import { randomNumber } from '../utils' export const description = 'ths command will look into the future to answer your yes or no question!' const eightBallResponses = [ 'It is certain.', 'It is decidedly so.', 'Without a doubt.', 'Yes – definitely.', 'You may rely on it.', 'As I see it, yes.', 'Most likely.', 'Outlook good.', 'Yes.', 'Signs point to yes.', 'Reply hazy, try again.', 'Ask again later.', 'Better not tell you now.', 'Cannot predict now.', 'Concentrate and ask again.', "Don't count on it.", 'My reply is no.', 'My sources say no.', 'Outlook not so good.', 'Very doubtful.', ] as const export default ({ channel, context }: ICommandProps) => { client.say( channel, `@${context['display-name']} The magic eight ball says: ${ eightBallResponses[randomNumber(eightBallResponses.length)] }`, ) }
# python3 md070crosslevenshteinPhon.py ../../../xdata/y2016riga-cog-ukru/pattr-internet-ua-dict07.txt ../../../xdata/y2016riga-cog-ukru/pattr-internet-ru-dict2.txt ua ru >../../../xdata/y2016riga-cog-ukru/pattr-internet-crosslev-ua-ru07.txt # python3 md070crosslevenshteinPhonV02TopCand.py ../../../xdata/y2016riga-cog-ukru/pattr-internet-ua-dictV02.txt ../../../xdata/y2016riga-cog-ukru/pattr-internet-ru-dict2.txt ua ru >../../../xdata/y2016riga-cog-ukru/pattr-internet-crosslev-ua-ruV02TopCand.txt # head -n 20 <cs.num | tail -n 10 >cs-t00020.num # head -n 30 <cs.num | tail -n 10 >cs-t00030.num # python3 md070crosslevenshteinPhonV03TopCzech.py ../../../xdata/morpho/cs-t00010.num ../../../xdata/morpho/ru.num en ru >../../../xdata/morpho/cs-ru-crosslevV03TopCzech.txt python3 md070crosslevenshteinPhonV03TopCzech.py ../../../xdata/morpho/uk2k-1050.num ../../../xdata/morpho/ru.num ua ru >../../../xdata/morpho/uk-ru-crosslevV03-1050.txt
<filename>main.cpp<gh_stars>0 #include "pop3_ssl/pop3_ssl.hpp" #include <iostream> #include <regex> #include <urlmon.h> #include <sstream> #pragma comment(lib, "urlmon.lib") std::string pop3_host = "your pop3 host", pop3_port = "your pop3 port", //Usually 995 pop3_user = "your pop3 user", pop3_pass = "<PASSWORD>"; int main( ) { std::regex steam_email_verification_link_regex( "https:\\/\\/store\\.steampowered\\.com\\/account\\/newaccountverification\\?stoken=.*&creationid=.*", std::regex::icase ); try { /* * Loop that connects to a POP3 server, tries to verifiy Steam accounts and disconnects again. * We need to put this into a loop because e-mails only get deleted if we send the QUIT command, * which will disconnect us from the server and we will have to reconnect again. */ while ( true ) { std::this_thread::sleep_for( std::chrono::seconds( 1 ) ); //Create a POP3 object with our host, port and login information forceinline::pop3_ssl pop3( pop3_host, pop3_port, pop3_user, pop3_pass ); //Try to connect auto connect_result = pop3.connect( ); if ( !connect_result.success ) return 1; std::cout << "Got welcome message from POP3 server" << std::endl; //Try to login auto login_result = pop3.login( ); if ( !login_result.success ) return 1; std::cout << "Successfully logged in as " << pop3_user << std::endl; //Get a list of our e-mails auto email_list = pop3.get_email_list( ); if ( email_list.empty( ) ) { std::cout << "No e-mails currently in inbox." << std::endl; //Disconnect to refresh inbox pop3.disconnect( ); continue; } std::cout << email_list.size( ) << " e-mail(s) in inbox." << std::endl; //Get our e-mail content for ( auto email : email_list ) { //Get specific e-mail auto email_result = pop3.get_email( email.email_id ); if ( !email_result.success ) continue; //Regex search for the verification link inside our e-mail std::smatch regex_match; if ( !std::regex_search( email_result.raw_response, regex_match, steam_email_verification_link_regex ) ) continue; //Get the e-mail verification link auto email_verification_link = regex_match.str( ); std::cout << "E-Mail #" << email.email_id << " is a Steam verification e-mail, trying to confirm" << std::endl; //Verify the e-mail through a HTTP GET request IStream* stream = nullptr; if ( URLOpenBlockingStreamA( 0, email_verification_link.data( ), &stream, 0, 0 ) != 0 ) { std::cout << "Failed to confirm email #" << email.email_id << std::endl; continue; } std::cout << "E-Mail #" << email.email_id << " confirmed, trying to delete it" << std::endl; stream->Release( ); //Mark the e-mail to be deleted auto delete_result = pop3.delete_email( email.email_id ); if ( !delete_result.success ) std::cout << "Failed to delete e-mail #" << email.email_id << std::endl; else std::cout << "Marked e-mail #" << email.email_id << " to be deleted" << std::endl; } std::cout << "Disconnecting from POP3 server" << std::endl; //Disconnect to refresh inbox and to delete marked e-mails. pop3.disconnect( ); } } catch ( const std::exception& e ) { std::cout << e.what( ) << std::endl; } std::cin.get( ); return 0; }
import keras from keras.layers import Embedding, LSTM, Dense, Dropout from keras.models import Sequential # Define model model = Sequential() model.add(Embedding(vocab_size, output_dim=128)) model.add(LSTM(1024)) model.add(Dropout(0.3)) model.add(Dense(vocab_size, activation='softmax')) # Compile and fit model.compile(optimizer='adam', loss='categorical_crossentropy') model.fit(x, y, epochs=50)
#!/bin/bash cloned_dir=`dirname $0` # NOTE: abs path needed just bc of some bash errors abs_path=`realpath $cloned_dir` cd $cloned_dir echo "Loading generated configuration" source "$cloned_dir/.env" echo "Running temporary container for database user set up" temp_network=temp_network temp_name=temp_name echo "Creating temporary network" docker network create "$temp_network" docker run -it -d \ -v "$abs_path/.docker/content_db":"/data/db" \ --name "$temp_name" \ --network "$temp_network" \ --expose "$CONTENT_MONGODB_PORT" \ -e MONGO_INITDB_ROOT_USERNAME="$CONTENT_MONGODB_ROOT_USER" \ -e MONGO_INITDB_ROOT_PASSWORD="$CONTENT_MONGODB_ROOT_PASSWORD" \ -e MONGO_INITDB_DATABASE="$CONTENT_MONGODB_DATABASE" \ mongo \ mongod --auth user_record="{user:\"$CONTENT_MONGODB_USER\",pwd:\"$CONTENT_MONGODB_PASSWORD\",roles:[{role:\"readWrite\",db:\"$CONTENT_MONGODB_DATABASE\"}]}" create_db_collection_js="db.getSiblingDB(\"$CONTENT_MONGODB_DATABASE\").createCollection(\"$CONTENT_MONGODB_DATABASE\")" create_db_user_js="db.getSiblingDB(\"$CONTENT_MONGODB_DATABASE\").createUser($user_record)" # Collection needs to be setup, because otherwise database won't be created echo "Creating collection and mongo user for challenge database" docker run -it --rm --network "$temp_network" -v "$abs_path/wait-for-it.sh:/utils/wait-for-it.sh" mongo:$IMAGE_TAG_MONGO \ bash -c "/utils/wait-for-it.sh -h \"$temp_name\" -p \"$CONTENT_MONGODB_PORT\" && sleep 10 && mongo --host $temp_name \ -u $CONTENT_MONGODB_ROOT_USER \ -p $CONTENT_MONGODB_ROOT_PASSWORD \ --eval '$create_db_collection_js;$create_db_user_js'" # NOTE: all of this is required in order to run mongod in --auth mode, it assumes that user and database already exist echo "Stopping and removing temporary container" docker stop "$temp_name" docker container rm "$temp_name" temp_name=temp_postgres_name echo "Generating scripting file for postgres entrypoint" echo " CREATE ROLE $ACCOUNT_POSTGRES_USER WITH LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION PASSWORD '$ACCOUNT_POSTGRES_PASSWORD'; CREATE DATABASE $ACCOUNT_POSTGRES_DATABASE; GRANT ALL PRIVILEGES ON DATABASE $ACCOUNT_POSTGRES_DATABASE TO $ACCOUNT_POSTGRES_USER; CREATE ROLE $CHALLENGE_POSTGRES_USER WITH LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION PASSWORD '$CHALLENGE_POSTGRES_PASSWORD'; CREATE DATABASE $CHALLENGE_POSTGRES_DATABASE; GRANT ALL PRIVILEGES ON DATABASE $CHALLENGE_POSTGRES_DATABASE TO $CHALLENGE_POSTGRES_USER; " > "$abs_path/.docker/postgres-scripts/init-postgres.sql" echo "Removing temporary network" docker network rm "$temp_network" echo "Running docker-compose for executing migrations" echo "[WARNING] In case of bad configuration following command will fail" docker-compose up -d echo "Executing migrations" cd $cloned_dir docker-compose exec account_service npm run orm -- migration:run docker-compose exec challenge_service npm run orm -- migration:run #docker-compose exec gateway npm run migrate:mongo up # CLEANUP docker-compose down echo "Docker setup complete"
directories=(/scratch/2020-04-22/bio-zhaoy1/01.Rawdata/X101SC20030251-Z01-F004/00.Rawdata /scratch/2020-04-22/bio-zhaoy1/01.Rawdata/X101SC20030251-Z01-F005/00.Rawdata /scratch/2020-04-22/bio-zhaoy1/01.Rawdata/X101SC20030251-Z01-J002/00.Raw_data) for directory in ${directories[@]} do #directory=/home/shareDir/bio-share-chenwei/data/Yan/01.COVID19/01.Rawdata/X101SC20030251-Z01-J002/00.Raw_data #directory=/home/shareDir/bio-share-chenwei/data/Yan/01.COVID19/01.Rawdata/X101SC20030251-Z01-F006/00.Rawdata cd $directory samples=`ls -d H*` for i in $samples do #if [ "$i" != "HB2" ]; then #DIR=/home/shareDir/bio-share-chenwei/data/Yan/01.COVID19/90.scripts DIR=/scratch/2020-04-22/bio-zhaoy1/90.script/1.fastp_jobs mkdir -p $DIR sampledir=$directory/$i samplename=`basename $sampledir` echo $samplename cd $DIR config=$DIR/$samplename.pbs touch $config echo '##fastp deal with raw data' > $config echo "#PBS -N "$samplename >> $config echo "#PBS -l nodes=1:ppn=8" >> $config echo "#PBS -j oe" >> $config echo "#PBS -o "$samplename"_pbs.log" >> $config echo "#PBS -q ser" >> $config #echo "#PBS -l nodes=1:ppn=8" >> $config echo "export OMP_NUM_THREADS=8" >> $config echo "#PBS -V" >> $config echo "folder="$sampledir >> $config echo "outdir=/scratch/2020-04-22/bio-zhaoy1/02.cleandata" >> $config echo "fq1=\$folder/*1.fq.gz" >> $config echo "fq2=\$folder/*2.fq.gz" >> $config #echo "base=\`basename \$fq1 _1.fq.gz\`" >> $config #echo "fastp -n 10 -q 35 -w 8 --detect_adapter_for_pe -i \$fq1 -I \$fq2 -o \$outdir/"$samplename"\_1.clean.fq.gz -O \$outdir/"$samplename"\_2.clean.fq.gz -j \$outdir/"$samplename".json -h \$outdir/"$samplename".html -R "$samplename >> $config echo "fastp -n 10 -q 35 -w 8 --overrepresentation_analysis --adapter_fasta /scratch/2020-04-22/bio-zhaoy1/90.script/adapters.fasta -i \$fq1 -I \$fq2 -o \$outdir/"$samplename"\_1.clean.fq.gz -O \$outdir/"$samplename"\_2.clean.fq.gz -j \$outdir/"$samplename".json -h \$outdir/"$samplename".html -R "$samplename >> $config qsub $config #fi done #done
#!/bin/sh export OPENRAM_TECH="/home/mrg/openram/technology:/home/mrg/data/sky130_fd_bd_sram/tools/openram/technology" cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_dp_cell.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_dp_cell_dummy.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_dp_cell_replica.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_cell_opt1a.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_sp_cell_opt1a_dummy.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_cell_opt1_ce.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_cell_opt1.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_sp_cell_opt1_replica.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_sp_cell_opt1a_replica.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_colend.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_colend_cent.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_colend_p_cent.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_colenda.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_colenda_cent.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_colenda_p_cent.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_rowend.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_rowenda.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_sp_rowend_replica.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__openram_sp_rowenda_replica.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_corner.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_cornera.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_cornerb.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_wlstrapa.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_wlstrap_ce.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_wlstrap.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_wlstrap_p_ce.mag . cp /home/mrg/data/sky130_fd_bd_sram/tools/openram/technology/sky130/maglef_lib/sky130_fd_bd_sram__sram_sp_wlstrap_p.mag . echo "$(date): Starting DRC using Magic /usr/local/bin/magic" /usr/local/bin/magic -dnull -noconsole << EOF load sky130_sram_1kbytes_1rw1r_8x1024_8 -dereference puts "Finished loading cell sky130_sram_1kbytes_1rw1r_8x1024_8" cellname delete \(UNNAMED\) select top cell expand puts "Finished expanding" drc euclidean on drc check puts "Finished drc check" drc catchup puts "Finished drc catchup" drc count total quit -noprompt EOF magic_retcode=$? echo "$(date): Finished ($magic_retcode) DRC using Magic /usr/local/bin/magic" exit $magic_retcode
from FSM import * from myhdl import * import random @block def tbFSM(): # Entradas OPcode = Signal(modbv(35)[8:0]) #si se coloca 35 realiza store, 3 load y otra cosa fecth/decode. RAMdone = Signal(modbv(0)[1:0]) #EstadoPresente = Signal(modbv(0)[2:0]) #EstadoPresente = Signal(Estado.Fetch) clk = Signal(bool(0)) reset = ResetSignal(0, active = 1, async=True) #EstadoPresente = Signal(modbv(0)[2:0]) #SiguienteEstado = Signal(modbv(0)[2:0]) # Salidas RAMwrite = Signal(modbv(0)[1:0]) RAMread = Signal(modbv(0)[1:0]) Demux_Sel = Signal(modbv(0)[1:0]) Mux5_Sel = Signal(modbv(0)[1:0]) MBR_go = Signal(modbv(0)[1:0]) RegOk = Signal(modbv(0)[1:0]) ok_pc = Signal(modbv(0)[1:0]) dut = FSM(clk, reset, OPcode, RAMdone, RAMwrite, RAMread, Demux_Sel, Mux5_Sel, MBR_go, RegOk, ok_pc) wait = delay(40) @always(delay(10)) def clkgen(): clk.next = not clk @instance def stim(): RAMdone.next = 0 #OPcode.next = 0b0000011 yield wait RAMdone.next = 1 yield delay(10) RAMdone.next = 0 #OPcode.next = 0b0100011 yield wait RAMdone.next = 1 yield delay(10) RAMdone.next = 0 #OPcode.next = random.randrange(0, 2**7) yield delay(60) RAMdone.next = 1 yield delay(10) RAMdone.next = 0 #OPcode = random.randrange(0, 2**7) yield delay(60) RAMdone.next = 1 yield wait return dut, stim, clkgen test = tbFSM() test.config_sim(trace=True) test.run_sim(1000)
#!/usr/bin/env bash # Copyright 2020 Google LLC # # 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. set -euo pipefail source ./scripts/env.sh # Project 1 - Create GKE Cluster 1 gcloud config set project $PROJECT_1 gcloud beta container clusters create $CLUSTER_1 --zone $ZONE --username "admin" \ --machine-type $NODE_TYPE --image-type "COS" --disk-size "100" \ --scopes "https://www.googleapis.com/auth/compute","https://www.googleapis.com/auth/devstorage.read_only",\ "https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring",\ "https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly",\ "https://www.googleapis.com/auth/trace.append" \ --num-nodes "4" --network "default" --enable-stackdriver-kubernetes --async --enable-autoscaling --min-nodes 4 --max-nodes 15 \ --addons HorizontalPodAutoscaling,HttpLoadBalancing,Istio \ --istio-config auth=MTLS_PERMISSIVE \ --enable-autoupgrade \ --enable-autorepair # Project 2 - Create GKE Cluster 2 gcloud config set project $PROJECT_2 gcloud beta container clusters create $CLUSTER_2 --zone $ZONE --username "admin" \ --machine-type $NODE_TYPE --image-type "COS" --disk-size "100" \ --num-nodes "4" --network "default" --enable-stackdriver-kubernetes --async --enable-autoscaling --min-nodes 4 --max-nodes 15 \ --addons HorizontalPodAutoscaling,HttpLoadBalancing,Istio \ --istio-config auth=MTLS_PERMISSIVE \ --enable-autoupgrade \ --enable-autorepair
<gh_stars>0 FactoryGirl.define do factory :review do new "MyString" end end
#!/bin/bash source bin/util/toolbox.sh build_image() { error_message="temporary docker image failed to build." success_message="temporary docker image successfully built." cmd='docker build . --rm -t tmp:build' INFO "build temporary docker image" && eval_command -f "$error_message" -s "$success_message" "$cmd" } remove_image() { error_message="removal of temporary docker image failed." success_message="temporary docker image successfully removed." cmd='docker rmi -f tmp:build' INFO "remove temporary docker image" && eval_command -f "$error_message" -s "$success_message" "$cmd" } main() { build_image && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e "ARGS=$*" tmp:build && remove_image } main "$@"
<reponame>3Xpl0it3r/loki-operator<filename>pkg/client/clientset/versioned/typed/lokioperator.l0calh0st.cn/v1alpha1/fake/fake_promtail.go /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( "context" v1alpha1 "github.com/l0calh0st/loki-operator/pkg/apis/lokioperator.l0calh0st.cn/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" ) // FakePromtails implements PromtailInterface type FakePromtails struct { Fake *FakeLokioperatorV1alpha1 ns string } var promtailsResource = schema.GroupVersionResource{Group: "lokioperator.l0calh0st.cn", Version: "v1alpha1", Resource: "promtails"} var promtailsKind = schema.GroupVersionKind{Group: "lokioperator.l0calh0st.cn", Version: "v1alpha1", Kind: "Promtail"} // Get takes name of the promtail, and returns the corresponding promtail object, and an error if there is any. func (c *FakePromtails) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Promtail, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(promtailsResource, c.ns, name), &v1alpha1.Promtail{}) if obj == nil { return nil, err } return obj.(*v1alpha1.Promtail), err } // List takes label and field selectors, and returns the list of Promtails that match those selectors. func (c *FakePromtails) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PromtailList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(promtailsResource, promtailsKind, c.ns, opts), &v1alpha1.PromtailList{}) if obj == nil { return nil, err } label, _, _ := testing.ExtractFromListOptions(opts) if label == nil { label = labels.Everything() } list := &v1alpha1.PromtailList{ListMeta: obj.(*v1alpha1.PromtailList).ListMeta} for _, item := range obj.(*v1alpha1.PromtailList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } } return list, err } // Watch returns a watch.Interface that watches the requested promtails. func (c *FakePromtails) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(promtailsResource, c.ns, opts)) } // Create takes the representation of a promtail and creates it. Returns the server's representation of the promtail, and an error, if there is any. func (c *FakePromtails) Create(ctx context.Context, promtail *v1alpha1.Promtail, opts v1.CreateOptions) (result *v1alpha1.Promtail, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(promtailsResource, c.ns, promtail), &v1alpha1.Promtail{}) if obj == nil { return nil, err } return obj.(*v1alpha1.Promtail), err } // Update takes the representation of a promtail and updates it. Returns the server's representation of the promtail, and an error, if there is any. func (c *FakePromtails) Update(ctx context.Context, promtail *v1alpha1.Promtail, opts v1.UpdateOptions) (result *v1alpha1.Promtail, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(promtailsResource, c.ns, promtail), &v1alpha1.Promtail{}) if obj == nil { return nil, err } return obj.(*v1alpha1.Promtail), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). func (c *FakePromtails) UpdateStatus(ctx context.Context, promtail *v1alpha1.Promtail, opts v1.UpdateOptions) (*v1alpha1.Promtail, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(promtailsResource, "status", c.ns, promtail), &v1alpha1.Promtail{}) if obj == nil { return nil, err } return obj.(*v1alpha1.Promtail), err } // Delete takes name of the promtail and deletes it. Returns an error if one occurs. func (c *FakePromtails) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteActionWithOptions(promtailsResource, c.ns, name, opts), &v1alpha1.Promtail{}) return err } // DeleteCollection deletes a collection of objects. func (c *FakePromtails) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionAction(promtailsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.PromtailList{}) return err } // Patch applies the patch and returns the patched promtail. func (c *FakePromtails) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Promtail, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(promtailsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Promtail{}) if obj == nil { return nil, err } return obj.(*v1alpha1.Promtail), err }
#include <iostream> #include <string> #include <cctype> char caesarCipher(char c, int key) { char A = (islower(c)) ? 'a' : 'A'; c = (isalpha(c)) ? (c - A + (26 - key)) % 26 + A : c; return c; } int main() { std::string input; int key; std::cout << "Enter a line of text:\n"; std::getline(std::cin, input); std::cout << "Enter an integer to shift the text (1-25):\n"; std::cin >> key; while (key < 1 || key > 25) { std::cout << "Invalid shift value. Please enter an integer between 1 and 25:\n"; std::cin >> key; } std::string encryptedText; for (char c : input) { encryptedText += caesarCipher(c, key); } std::cout << "Encrypted text: " << encryptedText << std::endl; return 0; }
package cyclops.pure.typeclasses.foldable; import cyclops.function.higherkinded.Higher; import cyclops.pure.arrow.MonoidK; import cyclops.function.companion.Monoids; import cyclops.container.control.Option; import cyclops.container.immutable.impl.LazySeq; import cyclops.container.immutable.impl.Seq; import cyclops.function.combiner.Monoid; import cyclops.reactive.ReactiveSeq; import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.function.Predicate; /** * Type class for foldables * * @param <CRE> The core type of the foldable (e.g. the HKT witness type, not the generic type : ListType.µ) * @author johnmcclean */ public interface Foldable<CRE> { /** * Starting from the right combine each value in turn with an accumulator * * @param monoid Monoid to combine values * @param ds DataStructure to foldRight * @return Reduced value */ <T> T foldRight(Monoid<T> monoid, Higher<CRE, T> ds); /** * Starting from the right combine each value in turn with an accumulator * * @param identity Identity value &amp; default * @param semigroup Combining function * @param ds DataStructure to foldRight * @return reduced value */ default <T> T foldRight(T identity, BinaryOperator<T> semigroup, Higher<CRE, T> ds) { return foldRight(Monoid.fromBiFunction(identity, semigroup), ds); } /** * Starting from the left combine each value in turn with an accumulator * * @param monoid Monoid to combine values * @param ds DataStructure to foldLeft * @return Reduced value */ <T> T foldLeft(Monoid<T> monoid, Higher<CRE, T> ds); /** * Starting from the left combine each value in turn with an accumulator * * @param identity Identity value &amp; default * @param semigroup Combining function * @param ds DataStructure to foldLeft * @return Reduced value */ default <T> T foldLeft(T identity, BinaryOperator<T> semigroup, Higher<CRE, T> ds) { return foldLeft(Monoid.fromBiFunction(identity, semigroup), ds); } <T, R> R foldMap(final Monoid<R> mb, final Function<? super T, ? extends R> fn, Higher<CRE, T> nestedA); default <T, R> R foldr(final Function<T, Function<R, R>> fn, R b, Higher<CRE, T> ds) { return foldMap(Monoids.functionComposition(), fn, ds).apply(b); } default <C2, T, R> Higher<C2, T> foldK(MonoidK<C2> monoid, Higher<CRE, Higher<C2, T>> ds) { return foldLeft(monoid.asMonoid(), ds); } default <T> long size(Higher<CRE, T> ds) { return foldMap(Monoids.longSum, __ -> 1l, ds); } default <T> Seq<T> seq(Higher<CRE, T> ds) { return foldMap(Monoids.seqConcat(), t -> Seq.of(t), ds); } default <T> LazySeq<T> lazySeq(Higher<CRE, T> ds) { return foldMap(Monoids.lazySeqConcat(), t -> LazySeq.of(t), ds); } default <T> ReactiveSeq<T> stream(Higher<CRE, T> ds) { return lazySeq(ds).stream(); } default <T> T intercalate(Monoid<T> monoid, T value, Higher<CRE, T> ds) { return seq(ds).intersperse(value) .foldLeft(monoid); } default <T> Option<T> getAt(Higher<CRE, T> ds, int index) { return seq(ds).get(index); } default <T> boolean anyMatch(Predicate<? super T> pred, Higher<CRE, T> ds) { return foldMap(Monoids.booleanDisjunction, i -> pred.test(i), ds); } default <T> boolean allMatch(Predicate<? super T> pred, Higher<CRE, T> ds) { return foldMap(Monoids.booleanConjunction, i -> pred.test(i), ds); } }
package admin import ( adminHandlers "github.com/backpulse/core/handlers/admin" "github.com/gorilla/mux" ) func handleConstants(r *mux.Router) { r.HandleFunc("/constants/languages", adminHandlers.GetLanguages).Methods("GET") }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class ModifyCoursesTableColorColumn extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('courses', function (Blueprint $table) { $table->string('color')->default('red')->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('courses', function (Blueprint $table) { $table->string('color')->default('red')->change(); }); } }
function compareStrings(str1, str2) { let distinctChars = new Set(); for (let char of str1) { distinctChars.add(char); } for (let char of str2) { if (distinctChars.has(char)) return false; } return true; }
#!/bin/bash cd /home/spinningtop/ && python3 -u ./spinningtop.py
<reponame>smagill/opensphere-desktop package io.opensphere.mantle.data.geom.impl; import java.awt.Color; import java.util.List; import edu.umd.cs.findbugs.annotations.NonNull; import io.opensphere.core.model.time.TimeSpan; import io.opensphere.core.util.lang.BitArrays; import io.opensphere.mantle.data.geom.CallOutSupport; import io.opensphere.mantle.data.geom.MapGeometrySupport; import io.opensphere.mantle.util.TimeSpanUtility; /** * The Class SimpleLocationGeometrySupport. */ public abstract class AbstractSimpleGeometrySupport implements MapGeometrySupport { /** Mask for Follow Terrain flag. */ public static final byte FOLLOW_TERRAIN_MASK = 1; /** * Serial version UID. */ private static final long serialVersionUID = 1L; /** * The value of the highest bit defined by this class. This is to be used as * an offset by subclasses that need to define their own bits. */ protected static final byte HIGH_BIT = FOLLOW_TERRAIN_MASK; /** * Color of the support. Stored as an integer behind the scenes to save * memory as Color is larger */ private int myColor = java.awt.Color.WHITE.getRGB(); /** The my duration. */ private long myEndTime = TimeSpanUtility.TIMELESS_END; /** Bit Field for flag storage. 8 bits max. */ private byte myFlagField1; /** The my start time. */ private long myStartTime = TimeSpanUtility.TIMELESS_START; /** Default constructor. */ public AbstractSimpleGeometrySupport() { super(); } /** * Copy constructor. * * @param source the source object from which to copy data. */ public AbstractSimpleGeometrySupport(AbstractSimpleGeometrySupport source) { myColor = source.myColor; myEndTime = source.myEndTime; myFlagField1 = source.myFlagField1; myStartTime = source.myStartTime; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } AbstractSimpleGeometrySupport other = (AbstractSimpleGeometrySupport)obj; return myColor == other.myColor && myEndTime == other.myEndTime && getFlagField() == other.getFlagField() && myStartTime == other.myStartTime; } @Override public boolean followTerrain() { return isFlagSet(FOLLOW_TERRAIN_MASK); } @Override public CallOutSupport getCallOutSupport() { return null; } @Override public List<MapGeometrySupport> getChildren() { return null; } @Override @NonNull public Color getColor() { return new Color(myColor, true); } @Override public TimeSpan getTimeSpan() { return TimeSpanUtility.fromStartEnd(myStartTime, myEndTime); } @Override public String getToolTip() { return null; } @Override public boolean hasChildren() { return false; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + myColor; result = prime * result + (int)(myEndTime ^ myEndTime >>> 32); result = prime * result + getFlagField(); result = prime * result + (int)(myStartTime ^ myStartTime >>> 32); return result; } /** * Checks to see if a flag is set in the internal bit field. * * @param mask - the mask to check * @return true if set, false if not */ public synchronized boolean isFlagSet(byte mask) { return BitArrays.isFlagSet(mask, myFlagField1); } @Override public void setCallOutSupport(CallOutSupport cos) { throw new UnsupportedOperationException(); } @Override public void setColor(Color c, Object source) { myColor = c == null ? 0 : c.getRGB(); } /** * Sets (or un-sets) a flag in the internal bit field. * * @param mask - the mask to use * @param on - true to set on, false to set off * @return true if changed. */ public synchronized boolean setFlag(byte mask, boolean on) { byte newBitField = BitArrays.setFlag(mask, on, myFlagField1); myFlagField1 = newBitField; return newBitField != myFlagField1; } @Override public void setFollowTerrain(boolean follow, Object source) { setFlag(FOLLOW_TERRAIN_MASK, follow); } @Override public void setTimeSpan(TimeSpan ts) { myStartTime = TimeSpanUtility.getWorkaroundStart(ts); myEndTime = TimeSpanUtility.getWorkaroundEnd(ts); } @Override public void setToolTip(String tip) { throw new UnsupportedOperationException(); } /** * Gets the flag field. * * @return the flag field */ private synchronized byte getFlagField() { return myFlagField1; } }
#!/bin/bash fw_depends() { for dependency in "$@"; do if ! command -v "$dependency" &> /dev/null; then echo "Installing $dependency..." sudo apt-get install -y "$dependency" # Assuming the package manager is apt if [ $? -ne 0 ]; then echo "Failed to install $dependency. Aborting deployment." exit 1 else echo "$dependency installed successfully." fi else echo "$dependency is already installed." fi done } fw_depends postgresql java ./gradlew clean build jetty
<gh_stars>100-1000 // Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // ospray #include "MultiDevice.h" #include "MultiDeviceRenderTask.h" #include "camera/registration.h" #include "fb/LocalFB.h" #include "fb/registration.h" #include "geometry/registration.h" #include "lights/registration.h" #include "render/LoadBalancer.h" #include "render/RenderTask.h" #include "render/registration.h" #include "rkcommon/tasking/parallel_for.h" #include "rkcommon/tasking/tasking_system_init.h" #include "rkcommon/utility/CodeTimer.h" #include "rkcommon/utility/getEnvVar.h" #include "rkcommon/utility/multidim_index_sequence.h" #include "texture/registration.h" #include "volume/transferFunction/registration.h" namespace ospray { namespace api { ///////////////////////////////////////////////////////////////////////// // ManagedObject Implementation ///////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// void MultiDevice::commit() { Device::commit(); if (subdevices.empty()) { auto OSPRAY_NUM_SUBDEVICES = utility::getEnvVar<int>("OSPRAY_NUM_SUBDEVICES"); int numSubdevices = OSPRAY_NUM_SUBDEVICES.value_or(getParam("numSubdevices", 1)); postStatusMsg(OSP_LOG_DEBUG) << "# of subdevices =" << numSubdevices; std::vector<std::shared_ptr<TiledLoadBalancer>> subdeviceLoadBalancers; for (int i = 0; i < numSubdevices; ++i) { auto d = make_unique<ISPCDevice>(); d->commit(); subdevices.emplace_back(std::move(d)); subdeviceLoadBalancers.push_back(subdevices.back()->loadBalancer); } loadBalancer = rkcommon::make_unique<MultiDeviceLoadBalancer>(subdeviceLoadBalancers); } // ISPCDevice::commit will init the tasking system but here we can reset // it to the global desired number of threads tasking::initTaskingSystem(numThreads, true); } ///////////////////////////////////////////////////////////////////////// // Device Implementation //////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// int MultiDevice::loadModule(const char *name) { OSPError err = OSP_NO_ERROR; for (auto &d : subdevices) { auto e = d->loadModule(name); if (e != OSP_NO_ERROR) { err = (OSPError)e; } } return err; } // OSPRay Data Arrays /////////////////////////////////////////////////// OSPData MultiDevice::newSharedData(const void *sharedData, OSPDataType type, const vec3ul &numItems, const vec3l &byteStride) { MultiDeviceObject *o = new MultiDeviceObject; // Data arrays of OSPRay objects need to populate the corresponding subdevice // data arrays with the objects for that subdevice if (type & OSP_OBJECT) { for (size_t i = 0; i < subdevices.size(); ++i) { o->objects.push_back((OSPObject) new Data(type, numItems)); } // A little lazy here, but using the Data object to just give me a view // + the index sequence iterator to use to step over the stride Data *multiData = new Data(sharedData, type, numItems, byteStride); o->sharedDataDirtyReference = multiData; index_sequence_3D seq(numItems); for (auto idx : seq) { MultiDeviceObject *mobj = *(MultiDeviceObject **)multiData->data(idx); retain((OSPObject)mobj); // Copy the subdevice object handles to the data arrays for each subdevice for (size_t i = 0; i < subdevices.size(); ++i) { Data *subdeviceData = (Data *)o->objects[i]; std::memcpy( subdeviceData->data(idx), &mobj->objects[i], sizeof(OSPObject)); } } } else { for (auto &d : subdevices) { o->objects.push_back( d->newSharedData(sharedData, type, numItems, byteStride)); } } return (OSPData)o; } OSPData MultiDevice::newData(OSPDataType type, const vec3ul &numItems) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newData(type, numItems)); } return (OSPData)o; } void MultiDevice::copyData( const OSPData source, OSPData destination, const vec3ul &destinationIndex) { const MultiDeviceObject *srcs = (const MultiDeviceObject *)source; MultiDeviceObject *dsts = (MultiDeviceObject *)destination; for (size_t i = 0; i < subdevices.size(); ++i) { subdevices[i]->copyData( (OSPData)srcs->objects[i], (OSPData)dsts->objects[i], destinationIndex); } } // Renderable Objects /////////////////////////////////////////////////// OSPLight MultiDevice::newLight(const char *type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newLight(type)); } return (OSPLight)o; } OSPCamera MultiDevice::newCamera(const char *type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newCamera(type)); } return (OSPCamera)o; } OSPGeometry MultiDevice::newGeometry(const char *type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newGeometry(type)); } return (OSPGeometry)o; } OSPVolume MultiDevice::newVolume(const char *type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newVolume(type)); } return (OSPVolume)o; } OSPGeometricModel MultiDevice::newGeometricModel(OSPGeometry geom) { MultiDeviceObject *g = (MultiDeviceObject *)geom; MultiDeviceObject *o = new MultiDeviceObject; for (size_t i = 0; i < subdevices.size(); ++i) { o->objects.push_back( subdevices[i]->newGeometricModel((OSPGeometry)g->objects[i])); } return (OSPGeometricModel)o; } OSPVolumetricModel MultiDevice::newVolumetricModel(OSPVolume volume) { MultiDeviceObject *v = (MultiDeviceObject *)volume; MultiDeviceObject *o = new MultiDeviceObject; for (size_t i = 0; i < subdevices.size(); ++i) { o->objects.push_back( subdevices[i]->newVolumetricModel((OSPVolume)v->objects[i])); } return (OSPVolumetricModel)o; } // Model Meta-Data ////////////////////////////////////////////////////// OSPMaterial MultiDevice::newMaterial(const char *, const char *material_type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newMaterial(nullptr, material_type)); } return (OSPMaterial)o; } OSPTransferFunction MultiDevice::newTransferFunction(const char *type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newTransferFunction(type)); } return (OSPTransferFunction)o; } OSPTexture MultiDevice::newTexture(const char *type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newTexture(type)); } return (OSPTexture)o; } // Instancing /////////////////////////////////////////////////////////// OSPGroup MultiDevice::newGroup() { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newGroup()); } return (OSPGroup)o; } OSPInstance MultiDevice::newInstance(OSPGroup group) { MultiDeviceObject *g = (MultiDeviceObject *)group; MultiDeviceObject *o = new MultiDeviceObject; for (size_t i = 0; i < subdevices.size(); ++i) { o->objects.push_back(subdevices[i]->newInstance((OSPGroup)g->objects[i])); } return (OSPInstance)o; } // Top-level Worlds ///////////////////////////////////////////////////// OSPWorld MultiDevice::newWorld() { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newWorld()); } return (OSPWorld)o; } box3f MultiDevice::getBounds(OSPObject obj) { MultiDeviceObject *o = (MultiDeviceObject *)obj; // Everything is replicated across the subdevices, so we // can just query the bounds from one of them return subdevices[0]->getBounds(o->objects[0]); } // Object + Parameter Lifetime Management /////////////////////////////// void MultiDevice::setObjectParam( OSPObject object, const char *name, OSPDataType type, const void *mem) { // If the type is an OSPObject, we need to find the per-subdevice objects // and set them appropriately MultiDeviceObject *o = (MultiDeviceObject *)object; if (type & OSP_OBJECT) { MultiDeviceObject *p = *(MultiDeviceObject **)mem; for (size_t i = 0; i < subdevices.size(); ++i) { subdevices[i]->setObjectParam(o->objects[i], name, type, &p->objects[i]); } } else { for (size_t i = 0; i < subdevices.size(); ++i) { subdevices[i]->setObjectParam(o->objects[i], name, type, mem); } } } void MultiDevice::removeObjectParam(OSPObject object, const char *name) { MultiDeviceObject *o = (MultiDeviceObject *)object; for (size_t i = 0; i < subdevices.size(); ++i) { subdevices[i]->removeObjectParam(o->objects[i], name); } } void MultiDevice::commit(OSPObject object) { MultiDeviceObject *o = (MultiDeviceObject *)object; // Applications can change their shared buffer contents directly, // so shared arrays of objects have to do more to ensure that the // contents are up to date. Specifically the handles have to be // translated down to the subdevice specific handles correctly. if (o->sharedDataDirtyReference) { Data *multiData = o->sharedDataDirtyReference; const vec3ul &numItems = multiData->numItems; index_sequence_3D seq(numItems); for (auto idx : seq) { MultiDeviceObject *mobj = *(MultiDeviceObject **)multiData->data(idx); retain((OSPObject)mobj); // Copy the subdevice object handles to the data arrays for each subdevice for (size_t i = 0; i < subdevices.size(); ++i) { Data *subdeviceData = (Data *)o->objects[i]; std::memcpy( subdeviceData->data(idx), &mobj->objects[i], sizeof(OSPObject)); } } } for (size_t i = 0; i < subdevices.size(); ++i) { subdevices[i]->commit(o->objects[i]); } } void MultiDevice::release(OSPObject object) { memory::RefCount *o = (memory::RefCount *)object; MultiDeviceObject *mo = dynamic_cast<MultiDeviceObject *>(o); if (mo) { if (mo->sharedDataDirtyReference) { Data *multiData = mo->sharedDataDirtyReference; const vec3ul &numItems = multiData->numItems; index_sequence_3D seq(numItems); for (auto idx : seq) { MultiDeviceObject *mobj = *(MultiDeviceObject **)multiData->data(idx); mobj->refDec(); } } for (size_t i = 0; i < mo->objects.size(); ++i) { subdevices[i]->release(mo->objects[i]); } } o->refDec(); } void MultiDevice::retain(OSPObject object) { memory::RefCount *o = (memory::RefCount *)object; MultiDeviceObject *mo = dynamic_cast<MultiDeviceObject *>(o); if (mo) { for (size_t i = 0; i < mo->objects.size(); ++i) { subdevices[i]->retain(mo->objects[i]); } } o->refInc(); } // FrameBuffer Manipulation ///////////////////////////////////////////// OSPFrameBuffer MultiDevice::frameBufferCreate( const vec2i &size, const OSPFrameBufferFormat mode, const uint32 channels) { MultiDeviceObject *o = new MultiDeviceObject(); for (size_t i = 0; i < subdevices.size(); ++i) { FrameBuffer *fbi = new LocalFrameBuffer(size, mode, channels); o->objects.push_back((OSPFrameBuffer)fbi); } return (OSPFrameBuffer)o; } OSPImageOperation MultiDevice::newImageOp(const char *type) { // Same note for image ops as for framebuffers in terms of how they are // treated as shared. Eventually we would have per hardware device ones though // for cpu/gpus auto *op = ImageOp::createInstance(type); MultiDeviceObject *o = new MultiDeviceObject(); for (size_t i = 0; i < subdevices.size(); ++i) { o->objects.push_back((OSPImageOperation)op); } return (OSPImageOperation)o; } const void *MultiDevice::frameBufferMap( OSPFrameBuffer _fb, const OSPFrameBufferChannel channel) { MultiDeviceObject *o = (MultiDeviceObject *)_fb; LocalFrameBuffer *fb = (LocalFrameBuffer *)o->objects[0]; return fb->mapBuffer(channel); } void MultiDevice::frameBufferUnmap(const void *mapped, OSPFrameBuffer _fb) { MultiDeviceObject *o = (MultiDeviceObject *)_fb; LocalFrameBuffer *fb = (LocalFrameBuffer *)o->objects[0]; fb->unmap(mapped); } float MultiDevice::getVariance(OSPFrameBuffer _fb) { MultiDeviceObject *o = (MultiDeviceObject *)_fb; LocalFrameBuffer *fb = (LocalFrameBuffer *)o->objects[0]; return fb->getVariance(); } void MultiDevice::resetAccumulation(OSPFrameBuffer _fb) { MultiDeviceObject *o = (MultiDeviceObject *)_fb; for (size_t i = 0; i < subdevices.size(); ++i) { LocalFrameBuffer *fbi = (LocalFrameBuffer *)o->objects[i]; fbi->clear(); } } // Frame Rendering ////////////////////////////////////////////////////// OSPRenderer MultiDevice::newRenderer(const char *type) { MultiDeviceObject *o = new MultiDeviceObject; for (auto &d : subdevices) { o->objects.push_back(d->newRenderer(type)); } return (OSPRenderer)o; } OSPFuture MultiDevice::renderFrame(OSPFrameBuffer _framebuffer, OSPRenderer _renderer, OSPCamera _camera, OSPWorld _world) { MultiDeviceObject *multiFb = (MultiDeviceObject *)_framebuffer; FrameBuffer *fb0 = (FrameBuffer *)multiFb->objects[0]; fb0->setCompletedEvent(OSP_NONE_FINISHED); MultiDeviceObject *multiRenderer = (MultiDeviceObject *)_renderer; MultiDeviceObject *multiCamera = (MultiDeviceObject *)_camera; MultiDeviceObject *multiWorld = (MultiDeviceObject *)_world; retain((OSPObject)multiFb); retain((OSPObject)multiRenderer); retain((OSPObject)multiCamera); retain((OSPObject)multiWorld); auto *f = new MultiDeviceRenderTask(multiFb, [=]() { utility::CodeTimer timer; timer.start(); loadBalancer->renderFrame(multiFb, multiRenderer, multiCamera, multiWorld); timer.stop(); release((OSPObject)multiFb); release((OSPObject)multiRenderer); release((OSPObject)multiCamera); release((OSPObject)multiWorld); return timer.seconds(); }); return (OSPFuture)f; } int MultiDevice::isReady(OSPFuture _task, OSPSyncEvent event) { auto *task = (Future *)_task; return task->isFinished(event); } void MultiDevice::wait(OSPFuture _task, OSPSyncEvent event) { auto *task = (Future *)_task; task->wait(event); } void MultiDevice::cancel(OSPFuture _task) { auto *task = (Future *)_task; return task->cancel(); } float MultiDevice::getProgress(OSPFuture _task) { auto *task = (Future *)_task; return task->getProgress(); } float MultiDevice::getTaskDuration(OSPFuture _task) { auto *task = (Future *)_task; return task->getTaskDuration(); } OSPPickResult MultiDevice::pick(OSPFrameBuffer _fb, OSPRenderer _renderer, OSPCamera _camera, OSPWorld _world, const vec2f &screenPos) { MultiDeviceObject *multiFb = (MultiDeviceObject *)_fb; FrameBuffer *fb = (FrameBuffer *)multiFb->objects[0]; MultiDeviceObject *multiRenderer = (MultiDeviceObject *)_renderer; MultiDeviceObject *multiCamera = (MultiDeviceObject *)_camera; MultiDeviceObject *multiWorld = (MultiDeviceObject *)_world; // Data in the multidevice is all replicated, so we just run the pick on the // first subdevice return subdevices[0]->pick((OSPFrameBuffer)fb, (OSPRenderer)multiRenderer->objects[0], (OSPCamera)multiCamera->objects[0], (OSPWorld)multiWorld->objects[0], screenPos); } } // namespace api } // namespace ospray
package gov.cms.bfd.server.war.stu3.providers; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; import com.newrelic.api.agent.Trace; import gov.cms.bfd.model.codebook.data.CcwCodebookVariable; import gov.cms.bfd.model.rif.HospiceClaim; import gov.cms.bfd.model.rif.HospiceClaimLine; import gov.cms.bfd.server.war.commons.Diagnosis; import gov.cms.bfd.server.war.commons.MedicareSegment; import gov.cms.bfd.sharedutils.exceptions.BadCodeMonkeyException; import java.util.Arrays; import java.util.Optional; import org.hl7.fhir.dstu3.model.Address; import org.hl7.fhir.dstu3.model.ExplanationOfBenefit; import org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ItemComponent; /** * Transforms CCW {@link HospiceClaim} instances into FHIR {@link ExplanationOfBenefit} resources. */ final class HospiceClaimTransformer { /** * @param metricRegistry the {@link MetricRegistry} to use * @param claim the CCW {@link HospiceClaim} to transform * @param includeTaxNumbers whether or not to include tax numbers in the result (see {@link * ExplanationOfBenefitResourceProvider#HEADER_NAME_INCLUDE_TAX_NUMBERS}, defaults to <code> * false</code>) * @return a FHIR {@link ExplanationOfBenefit} resource that represents the specified {@link * HospiceClaim} */ @Trace static ExplanationOfBenefit transform( MetricRegistry metricRegistry, Object claim, Optional<Boolean> includeTaxNumbers) { Timer.Context timer = metricRegistry .timer(MetricRegistry.name(HospiceClaimTransformer.class.getSimpleName(), "transform")) .time(); if (!(claim instanceof HospiceClaim)) throw new BadCodeMonkeyException(); ExplanationOfBenefit eob = transformClaim((HospiceClaim) claim); timer.stop(); return eob; } /** * @param claimGroup the CCW {@link HospiceClaim} to transform * @return a FHIR {@link ExplanationOfBenefit} resource that represents the specified {@link * HospiceClaim} */ private static ExplanationOfBenefit transformClaim(HospiceClaim claimGroup) { ExplanationOfBenefit eob = new ExplanationOfBenefit(); // Common group level fields between all claim types TransformerUtils.mapEobCommonClaimHeaderData( eob, claimGroup.getClaimId(), claimGroup.getBeneficiaryId(), ClaimType.HOSPICE, claimGroup.getClaimGroupId().toPlainString(), MedicareSegment.PART_A, Optional.of(claimGroup.getDateFrom()), Optional.of(claimGroup.getDateThrough()), Optional.of(claimGroup.getPaymentAmount()), claimGroup.getFinalAction()); TransformerUtils.mapEobWeeklyProcessDate(eob, claimGroup.getWeeklyProcessDate()); // map eob type codes into FHIR TransformerUtils.mapEobType( eob, ClaimType.HOSPICE, Optional.of(claimGroup.getNearLineRecordIdCode()), Optional.of(claimGroup.getClaimTypeCode())); // set the provider number which is common among several claim types TransformerUtils.setProviderNumber(eob, claimGroup.getProviderNumber()); if (claimGroup.getPatientStatusCd().isPresent()) { TransformerUtils.addInformationWithCode( eob, CcwCodebookVariable.NCH_PTNT_STUS_IND_CD, CcwCodebookVariable.NCH_PTNT_STUS_IND_CD, claimGroup.getPatientStatusCd()); } // Common group level fields between Inpatient, HHA, Hospice and SNF TransformerUtils.mapEobCommonGroupInpHHAHospiceSNF( eob, claimGroup.getClaimHospiceStartDate(), claimGroup.getBeneficiaryDischargeDate(), Optional.of(claimGroup.getUtilizationDayCount())); if (claimGroup.getHospicePeriodCount().isPresent()) { eob.getHospitalization() .addExtension( TransformerUtils.createExtensionQuantity( CcwCodebookVariable.BENE_HOSPC_PRD_CNT, claimGroup.getHospicePeriodCount())); } // Common group level fields between Inpatient, Outpatient Hospice, HHA and SNF TransformerUtils.mapEobCommonGroupInpOutHHAHospiceSNF( eob, claimGroup.getOrganizationNpi(), claimGroup.getClaimFacilityTypeCode(), claimGroup.getClaimFrequencyCode(), claimGroup.getClaimNonPaymentReasonCode(), claimGroup.getPatientDischargeStatusCode(), claimGroup.getClaimServiceClassificationTypeCode(), claimGroup.getClaimPrimaryPayerCode(), claimGroup.getAttendingPhysicianNpi(), claimGroup.getTotalChargeAmount(), claimGroup.getPrimaryPayerPaidAmount(), claimGroup.getFiscalIntermediaryNumber(), claimGroup.getFiDocumentClaimControlNumber(), claimGroup.getFiOriginalClaimControlNumber()); for (Diagnosis diagnosis : TransformerUtils.extractDiagnoses1Thru12( claimGroup.getDiagnosisPrincipalCode(), claimGroup.getDiagnosisPrincipalCodeVersion(), claimGroup.getDiagnosis1Code(), claimGroup.getDiagnosis1CodeVersion(), claimGroup.getDiagnosis2Code(), claimGroup.getDiagnosis2CodeVersion(), claimGroup.getDiagnosis3Code(), claimGroup.getDiagnosis3CodeVersion(), claimGroup.getDiagnosis4Code(), claimGroup.getDiagnosis4CodeVersion(), claimGroup.getDiagnosis5Code(), claimGroup.getDiagnosis5CodeVersion(), claimGroup.getDiagnosis6Code(), claimGroup.getDiagnosis6CodeVersion(), claimGroup.getDiagnosis7Code(), claimGroup.getDiagnosis7CodeVersion(), claimGroup.getDiagnosis8Code(), claimGroup.getDiagnosis8CodeVersion(), claimGroup.getDiagnosis9Code(), claimGroup.getDiagnosis9CodeVersion(), claimGroup.getDiagnosis10Code(), claimGroup.getDiagnosis10CodeVersion(), claimGroup.getDiagnosis11Code(), claimGroup.getDiagnosis11CodeVersion(), claimGroup.getDiagnosis12Code(), claimGroup.getDiagnosis12CodeVersion())) TransformerUtils.addDiagnosisCode(eob, diagnosis); for (Diagnosis diagnosis : TransformerUtils.extractDiagnoses13Thru25( claimGroup.getDiagnosis13Code(), claimGroup.getDiagnosis13CodeVersion(), claimGroup.getDiagnosis14Code(), claimGroup.getDiagnosis14CodeVersion(), claimGroup.getDiagnosis15Code(), claimGroup.getDiagnosis15CodeVersion(), claimGroup.getDiagnosis16Code(), claimGroup.getDiagnosis16CodeVersion(), claimGroup.getDiagnosis17Code(), claimGroup.getDiagnosis17CodeVersion(), claimGroup.getDiagnosis18Code(), claimGroup.getDiagnosis18CodeVersion(), claimGroup.getDiagnosis19Code(), claimGroup.getDiagnosis19CodeVersion(), claimGroup.getDiagnosis20Code(), claimGroup.getDiagnosis20CodeVersion(), claimGroup.getDiagnosis21Code(), claimGroup.getDiagnosis21CodeVersion(), claimGroup.getDiagnosis22Code(), claimGroup.getDiagnosis22CodeVersion(), claimGroup.getDiagnosis23Code(), claimGroup.getDiagnosis23CodeVersion(), claimGroup.getDiagnosis24Code(), claimGroup.getDiagnosis24CodeVersion(), claimGroup.getDiagnosis25Code(), claimGroup.getDiagnosis25CodeVersion())) TransformerUtils.addDiagnosisCode(eob, diagnosis); for (Diagnosis diagnosis : TransformerUtils.extractExternalDiagnoses1Thru12( claimGroup.getDiagnosisExternalFirstCode(), claimGroup.getDiagnosisExternalFirstCodeVersion(), claimGroup.getDiagnosisExternal1Code(), claimGroup.getDiagnosisExternal1CodeVersion(), claimGroup.getDiagnosisExternal2Code(), claimGroup.getDiagnosisExternal2CodeVersion(), claimGroup.getDiagnosisExternal3Code(), claimGroup.getDiagnosisExternal3CodeVersion(), claimGroup.getDiagnosisExternal4Code(), claimGroup.getDiagnosisExternal4CodeVersion(), claimGroup.getDiagnosisExternal5Code(), claimGroup.getDiagnosisExternal5CodeVersion(), claimGroup.getDiagnosisExternal6Code(), claimGroup.getDiagnosisExternal6CodeVersion(), claimGroup.getDiagnosisExternal7Code(), claimGroup.getDiagnosisExternal7CodeVersion(), claimGroup.getDiagnosisExternal8Code(), claimGroup.getDiagnosisExternal8CodeVersion(), claimGroup.getDiagnosisExternal9Code(), claimGroup.getDiagnosisExternal9CodeVersion(), claimGroup.getDiagnosisExternal10Code(), claimGroup.getDiagnosisExternal10CodeVersion(), claimGroup.getDiagnosisExternal11Code(), claimGroup.getDiagnosisExternal11CodeVersion(), claimGroup.getDiagnosisExternal12Code(), claimGroup.getDiagnosisExternal12CodeVersion())) TransformerUtils.addDiagnosisCode(eob, diagnosis); for (HospiceClaimLine claimLine : claimGroup.getLines()) { ItemComponent item = eob.addItem(); item.setSequence(claimLine.getLineNumber().intValue()); item.setLocation(new Address().setState((claimGroup.getProviderStateCode()))); TransformerUtils.mapHcpcs( eob, item, Optional.empty(), claimLine.getHcpcsCode(), Arrays.asList( claimLine.getHcpcsInitialModifierCode(), claimLine.getHcpcsSecondModifierCode())); item.addAdjudication() .setCategory( TransformerUtils.createAdjudicationCategory( CcwCodebookVariable.REV_CNTR_PRVDR_PMT_AMT)) .setAmount(TransformerUtils.createMoney(claimLine.getProviderPaymentAmount())); item.addAdjudication() .setCategory( TransformerUtils.createAdjudicationCategory( CcwCodebookVariable.REV_CNTR_BENE_PMT_AMT)) .setAmount(TransformerUtils.createMoney(claimLine.getBenficiaryPaymentAmount())); // Common item level fields between Inpatient, Outpatient, HHA, Hospice and SNF TransformerUtils.mapEobCommonItemRevenue( item, eob, claimLine.getRevenueCenterCode(), claimLine.getRateAmount(), claimLine.getTotalChargeAmount(), claimLine.getNonCoveredChargeAmount().get(), claimLine.getUnitCount(), claimLine.getNationalDrugCodeQuantity(), claimLine.getNationalDrugCodeQualifierCode(), claimLine.getRevenueCenterRenderingPhysicianNPI()); // Common item level fields between Outpatient, HHA and Hospice TransformerUtils.mapEobCommonItemRevenueOutHHAHospice( item, claimLine.getRevenueCenterDate(), claimLine.getPaymentAmount()); // Common group level field coinsurance between Inpatient, HHA, Hospice and SNF TransformerUtils.mapEobCommonGroupInpHHAHospiceSNFCoinsurance( eob, item, claimLine.getDeductibleCoinsuranceCd()); } TransformerUtils.setLastUpdated(eob, claimGroup.getLastUpdated()); return eob; } }
package io.opensphere.subterrain.xraygoggles.ui; import java.awt.Color; import java.util.List; import java.util.Observable; import java.util.Observer; import io.opensphere.core.api.DefaultTransformer; import io.opensphere.core.data.DataRegistry; import io.opensphere.core.geometry.Geometry; import io.opensphere.core.geometry.PolylineGeometry; import io.opensphere.core.geometry.PolylineGeometry.Builder; import io.opensphere.core.geometry.renderproperties.DefaultPolylineRenderProperties; import io.opensphere.core.geometry.renderproperties.ZOrderRenderProperties; import io.opensphere.core.model.ScreenPosition; import io.opensphere.core.util.collections.New; import io.opensphere.subterrain.xraygoggles.model.XrayGogglesModel; /** * The window that shows the borders of the xray viewing area. */ public class XrayWindow extends DefaultTransformer implements Observer { /** * The previously published window geometry. */ private Geometry myGeometry; /** * The model containing the screen coordinates of the window. */ private final XrayGogglesModel myModel; /** * Constructs a new xray view window. * * @param dataRegistry The data registry. * @param model The model containing the screen coordinates of the window. */ public XrayWindow(DataRegistry dataRegistry, XrayGogglesModel model) { super(dataRegistry); myModel = model; } @Override public void close() { myModel.deleteObserver(this); super.close(); } @Override public void open() { super.open(); publishUnpublishWindow(); myModel.addObserver(this); } @Override public void update(Observable o, Object arg) { if (XrayGogglesModel.SCREEN_POSITION.equals(arg)) { publishUnpublishWindow(); } } /** * Draws or removes the xray view window from the screen. */ private synchronized void publishUnpublishWindow() { List<Geometry> unpublish = New.list(); List<Geometry> publish = New.list(); if (myGeometry != null) { unpublish.add(myGeometry); myModel.setWindowGeometry(null); } if (myModel.getLowerLeft() != null && myModel.getLowerRight() != null && myModel.getUpperLeft() != null && myModel.getUpperRight() != null) { Builder<ScreenPosition> builder = new Builder<>(); builder.setVertices( New.list(myModel.getUpperLeft(), myModel.getUpperRight(), myModel.getLowerRight(), myModel.getLowerLeft(), myModel.getUpperLeft())); DefaultPolylineRenderProperties renderProperties = new DefaultPolylineRenderProperties(ZOrderRenderProperties.TOP_Z, true, true); renderProperties.setColor(Color.WHITE); renderProperties.setWidth(5); myGeometry = new PolylineGeometry(builder, renderProperties, null); myModel.setWindowGeometry(myGeometry); publish.add(myGeometry); } publishGeometries(publish, unpublish); } }
#!/bin/sh -e DIRECTORY=$(dirname "${0}") SCRIPT_DIRECTORY=$( cd "${DIRECTORY}" || exit 1 pwd ) # shellcheck source=/dev/null . "${SCRIPT_DIRECTORY}/../configuration/project.sh" if [ "${1}" = --help ]; then echo "Usage: ${0} [--ci-mode]" exit 0 fi CONCERN_FOUND=false CONTINUOUS_INTEGRATION_MODE=false if [ "${1}" = --ci-mode ]; then shift mkdir -p build/log CONTINUOUS_INTEGRATION_MODE=true fi SYSTEM=$(uname) if [ "${SYSTEM}" = Darwin ]; then FIND='gfind' UNIQ='guniq' SED='gsed' else FIND='find' UNIQ='uniq' SED='sed' fi MARKDOWN_FILES=$(${FIND} . -regextype posix-extended -name '*.md' -regex "${INCLUDE_FILTER}" -printf '%P\n') DICTIONARY=en_US mkdir -p tmp if [ -d documentation/dictionary ]; then cat documentation/dictionary/*.dic >tmp/combined.dic else touch tmp/combined.dic fi for FILE in ${MARKDOWN_FILES}; do WORDS=$(hunspell -d "${DICTIONARY}" -p tmp/combined.dic -l "${FILE}" | sort | ${UNIQ}) if [ ! "${WORDS}" = '' ]; then echo "${FILE}" for WORD in ${WORDS}; do if [ "${CONTINUOUS_INTEGRATION_MODE}" = true ]; then grep --line-number "${WORD}" "${FILE}" else # The equals character is required. grep --line-number --color=always "${WORD}" "${FILE}" fi done echo fi done TEX_FILES=$(${FIND} . -regextype posix-extended -name '*.tex' -regex "${INCLUDE_FILTER}" -printf '%P\n') for FILE in ${TEX_FILES}; do WORDS=$(hunspell -d "${DICTIONARY}" -p tmp/combined.dic -l -t "${FILE}") if [ ! "${WORDS}" = '' ]; then echo "${FILE}" for WORD in ${WORDS}; do STARTS_WITH_DASH=$(echo "${WORD}" | grep -q '^-') || STARTS_WITH_DASH=false if [ "${STARTS_WITH_DASH}" = false ]; then if [ "${CONTINUOUS_INTEGRATION_MODE}" = true ]; then grep --line-number "${WORD}" "${FILE}" else # The equals character is required. grep --line-number --color=always "${WORD}" "${FILE}" fi else echo "Skip invalid: ${WORD}" fi done echo fi done if [ "${CONTINUOUS_INTEGRATION_MODE}" = true ]; then FILES=$(${FIND} . -regextype posix-extended -name '*.sh' -regex "${INCLUDE_FILTER}" -printf '%P\n') for FILE in ${FILES}; do FILE_REPLACED=$(echo "${FILE}" | ${SED} 's/\//-/g') shellcheck --external-sources --format checkstyle "${FILE}" >"build/log/checkstyle-${FILE_REPLACED}.xml" || true done fi # shellcheck disable=SC2016 SHELL_SCRIPT_CONCERNS=$(${FIND} . -regextype posix-extended -name '*.sh' -regex "${INCLUDE_FILTER}" -exec sh -c 'shellcheck --external-sources ${1} || true' '_' '{}' \;) if [ ! "${SHELL_SCRIPT_CONCERNS}" = '' ]; then CONCERN_FOUND=true echo "[WARNING] Shell script concerns:" echo "${SHELL_SCRIPT_CONCERNS}" fi # shellcheck disable=SC2016 EMPTY_FILES=$(${FIND} . -regextype posix-extended -type f -empty -regex "${INCLUDE_FILTER}") if [ ! "${EMPTY_FILES}" = '' ]; then CONCERN_FOUND=true echo echo "[WARNING] Empty files:" echo echo "${EMPTY_FILES}" fi # shellcheck disable=SC2016 TO_DOS=$(${FIND} . -regextype posix-extended -type f -regex "${INCLUDE_FILTER}" -exec sh -c 'grep -Hrn TODO "${1}" | grep -v "${2}"' '_' '{}' '${0}' \;) if [ ! "${TO_DOS}" = '' ]; then echo echo "[INFO] To dos:" echo echo "${TO_DOS}" fi DUPLICATE_WORDS=$(cat documentation/dictionary/** | ${SED} '/^$/d' | sort | ${UNIQ} -cd) if [ ! "${DUPLICATE_WORDS}" = '' ]; then CONCERN_FOUND=true echo echo "[WARNING] Duplicate words:" echo "${DUPLICATE_WORDS}" fi # shellcheck disable=SC2016 SHELLCHECK_DISABLES=$(${FIND} . -regextype posix-extended -type f -regex "${INCLUDE_FILTER}" -exec sh -c 'grep -Hrn "# shellcheck disable" "${1}" | grep -v "${2}"' '_' '{}' '${0}' \;) if [ ! "${SHELLCHECK_DISABLES}" = '' ]; then echo echo "[INFO] Shellcheck disables:" echo echo "${SHELLCHECK_DISABLES}" fi if [ "${CONCERN_FOUND}" = true ]; then echo echo "Warning level concern(s) found." >&2 exit 2 fi if [ "${CONTINUOUS_INTEGRATION_MODE}" = true ]; then script/java/check.sh --ci-mode else script/java/check.sh fi