text stringlengths 27 775k |
|---|
// Copyright 2019 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 ... |
@extends('layouts.error')
@section('title', 'Server error')
@section('message_title', 'There is something wrong')
@section('message_content')
<p>
BerryCloud is still in devolpment and you found a bug!<br>
Please report it on the repository<br>
Please attach your logs
</p>
@endsection... |
import d3 from "../d3"
import {WeyaElementFunction} from "../../../lib/weya/weya"
const FORMAT = d3.format(".3s")
export function numberWithCommas(x: string) {
const parts = x.split('.')
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
return parts.join('.')
}
export function formatScalar(value:... |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Register_company extends CI_Controller {
// Login controller
public function __construct() {
parent::__construct();
// load common model
//$this->load->model('Login_model');
}
// main index function
... |
// Automatically generated - do not modify!
package react.dom.events
import org.w3c.dom.Element
external interface DragEvent<out T : Element> : MouseEvent<T, NativeDragEvent> {
val dataTransfer: org.w3c.dom.DataTransfer
}
|
<?php
namespace Vision\Http\Controllers;
use Illuminate\Http\Request;
use Vision\StudyTipsTest;
use Vision\StudyTipsData;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\DB;
class StudyTipsController extends Controller
{
/**
* Handle the incoming... |
import { QueueStrategy, Options, Comparator } from "./PriorityQueue.js";
export default class BinaryHeapStrategy<T> implements QueueStrategy<T> {
private comparator: Comparator<T>;
private data: T[];
constructor(options: Options<T>) {
this.comparator = options.comparator;
this.data = options.initialValu... |
package com.ozantopuz.sixtcodingchallenge.ui.list
import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.ozantopuz.sixtcodingchallenge.data.entity.Car
import com.ozantopuz.sixtcodingchallenge.databinding.ItemCa... |
package me.syari.ss.job.skill
class ActiveSkillBuilder {
private val skills = mutableMapOf<ActiveSkill.Type, ActiveSkill>()
fun set(type: ActiveSkill.Type, activeSkill: ActiveSkill) {
skills[type] = activeSkill
}
fun build(): Map<ActiveSkill.Type, ActiveSkill> {
return skills
}
... |
// Libraries
import React, {PureComponent} from 'react'
import {connect} from 'react-redux'
// Components
import {Alert, ComponentColor} from '@influxdata/clockface'
import TelegrafEditorSidebar from 'src/dataLoaders/components/TelegrafEditorSidebar'
import TelegrafEditorPluginLookup from 'src/dataLoaders/components/T... |
using EyesGuard.Views.Windows;
using System.Windows;
namespace EyesGuard
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public static App AsApp() => (App)Current;
public static MainWindow GetMainWindow() => (MainWindow)Ap... |
use std::fs::read_to_string;
use clap::{
crate_authors, crate_description, crate_version, App, Arg, ArgGroup,
};
use opml::{Outline, OPML};
fn main() {
let cli = App::new("OPML CLI")
.about(crate_description!())
.author(crate_authors!())
.version(crate_version!())
.args(&[
// Format flags.
... |
class Command
def initialize(command, value, original_value)
@command = command
@value = value
@original_value = original_value
end
def run
`#{@command} #{@value}`
end
def undo
`#command #original_value`
end
end |
<?php
namespace app\Models;
use Illuminate\Database\Eloquent\Model;
class ResiProjectType extends Model {
protected $table = 'resi_project_type';
protected $primaryKey = 'PROJECT_TYPE_ID';
public static function getProjectTypesByType($type) {
if($type == 'Residential'){//residentials t... |
from story3.memo import memoize
class Parser:
def __init__(self, tokenizer):
self.tokenizer = tokenizer
self.memos = {}
def mark(self):
return self.tokenizer.mark()
def reset(self, pos):
self.tokenizer.reset(pos)
def show_rule(self, name, alts):
# alts is a l... |
module Naturally
class Tokenizer
def initialize(string)
@string = string
end
def tokens
@tokens = []
@current = ''
@string.chars.each do |c|
if c =~ / /
add_to_tokens
else
if c =~ /[0-9]/ and @current !~ /^[0-9]+$/
add_to_tokens
... |
//*******************************************************************
// Copyright (C) 2004 Garrett Potts
//
// LICENSE: MIT see top level LICENSE.txt for more details
//
// Author: Garrett Potts
// Description: Nitf support class
//
//********************************************************************
// $Id: ossim... |
export { WithManagedTransitions, IManagedModal } from './WithManagedTransitions';
export { ModalManager } from './ModalManager';
|
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { getFormattedBuckets } from '../view';
describe('Distribution', () =... |
import React from 'react';
import Image from 'next/image';
import Link from 'next/link';
import logo from '../../public/assets/images/logo.svg';
export function Header() {
return (
<Link passHref href="/">
<header className="text-center cursor-pointer">
<Image className="text-center" src={logo} a... |
const validator = require("express-validator");
// Check if validation errors exist and if so return a 400 with the errors attached
module.exports = (req, res, next) => {
const errors = validator.validationResult(req);
if (!errors.isEmpty()) {
res
.status(400)
.json({
success: false,
msg: "... |
#!/usr/bin/python
"""Fake connection_check implementation."""
RESULTS = {}
def mock(interface, result):
RESULTS[interface] = result
def call(*args):
interface = args[args.index('-I') + 1]
result = RESULTS.get(interface, 'fail')
if result == 'restricted' and '-a' in args:
result = 'succeed'
return ... |
import Ember from 'ember';
import layout from '../templates/components/translate';
/**
* Translate
*/
var TranslateComponent = Ember.Component.extend({
layout: layout,
classNames: ['translate'],
translation: Ember.computed('original', function() {
return this.get('original') + ' dude';
})
});
export d... |
require 'spec_helper'
require 'services/calendar/update_event'
module Sykus
describe Calendar::UpdateEvent do
let (:identity) { IdentityTestGod.new }
let (:update_event) { Calendar::UpdateEvent.new identity }
let (:user) { Factory Users::User }
let! (:event) { Factory Calendar::Event, type: :glo... |
"use strict";
/*
* Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Un... |
import {
Col,
Layout,
Row,
Table
} from "antd";
import {QueryHPCCData} from "../utils/QueryHPCCData";
import React, { useEffect, useState } from "react";
import {Column} from "@antv/g2plot";
import { Chart } from "../components/Chart";
export function Main() {
const [vaccineData, setVaccineData] = useStat... |
#!/bin/sh
../bin/rshell << 'EOF'
cat < tempA; cat < tempB
echo hello world > tempA && cat < tempA
echo riverside > tempB;cat < tempB && echo told you it works
echo hello || echo yeet > tempA
cat < tempA
echo this && echo that > tempA
cat < tempA
fake < tempA; cat < tempA
(echo A && echo B) < tempB
cat < tempB
(echo A ... |
module ShipCompliant
# === ShipCompliant::SearchSalesOrderSummary
#
# Wraps the +SalesOrderSummary+ hash with a simple DSL
# to provide easy access to various keys.
class SearchSalesOrderSummary < Struct.new(:data)
# Returns a +DateTime+ from the order +purchase_date+
def purchase_date
data[:pu... |
import httpClient from '@/infrastructure/http/httpClient';
import cache from '@/infrastructure/cache';
import CreateTodoListUsecase from './CreateTodoList.usecase';
const createTodoListUsecase = new CreateTodoListUsecase(cache, httpClient);
export { createTodoListUsecase };
|
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import tensorflow_datasets as tfds
from randaugment import randaugment
tfds_dataset, tfds_info = tfds.load("kmnist", split="train", with_info=True)
num_images = tfds_info.splits["train"].num_examples
num_classes = tfds_info.features["label"].n... |
import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import moment from 'moment';
import DateRangePicker from 'react-daterange-picker';
import Geosuggest from 'react-geosuggest';
import assignToEmpty from '../../utils/assign';
/* CSS Module */
import styles from '../../../css/compo... |
def palindrome?(str)
s = str.downcase
s == s.reverse
end
|
# @leafygreen-ui/callout
## 1.2.1
### Patch Changes
- Updated dependencies [729c79f8]
- @leafygreen-ui/code@5.0.0
## 1.2.0
### Minor Changes
- 699a65c: Adds `example` variant to Callout component
### Patch Changes
- Updated dependencies [699a65c]
- @leafygreen-ui/icon@6.4.0
## 1.1.2
### Patch Changes
- 6... |
# mini_blog
两年前就想开发一个博客来练手,最后还是因为web实践需要开发了一个博客。
博客主题是根据 [hexo-theme-apollo](https://github.com/pinggod/hexo-theme-apollo) 改的。
由于赶时间代码写的不是很好,以后打算重写一下
## 致谢
为了方便开发我使用了[hexo-theme-apollo](https://github.com/pinggod/hexo-theme-apollo)作为自己的前端
## demo
http://ccreater.top:60080
管理员账号/密码:admin/123456
## 截图
![i... |
package io.gumga.business.deductions;
import io.gumga.business.entity.Metric;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* <b>Dedução de repetição de letras em caixa ALTA de "A" a "Z"</b><br>
*
* @author Carlos Eduardo Justino
*/
public class ConsecutiveUppercaseLettersMetric implements ... |
package com.fasterxml.jackson.databind.ser;
import com.fasterxml.jackson.core.util.Snapshottable;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.SerializerProvider;
/**
* Interface for objects that provides instances of {@link PropertyFilter}
* that match given ids... |
@testset "Functions to extend" begin
@testset "predicates" begin
@test GroupsCore.isabelian isa Function
@test GroupsCore.issolvable isa Function
@test GroupsCore.isnilpotent isa Function
@test GroupsCore.isperfect isa Function
end
@testset "generic constructions" begin
... |
/*
* Copyright © 2020 Software AG, Darmstadt, Germany and/or its licensors
*
* SPDX-License-Identifier: Apache-2.0
*
* 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.a... |
# @author Mike Bland (michael.bland@gsa.gov)
module GuidesStyle18F
def self.update_theme
exec({ 'RUBYOPT' => nil }, 'bundle', *%w(update --source guides_style_18f))
end
end
|
package app.lawnchair
import android.content.Context
import androidx.annotation.Keep
import androidx.arch.core.util.Function
import app.lawnchair.bugreport.LawnchairBugReporter
import app.lawnchair.theme.color.ColorTokens
import com.android.launcher3.Utilities
import com.android.launcher3.icons.ThemedIconDrawable
impo... |
unit CktElementClass;
{
----------------------------------------------------------
Copyright (c) 2008-2015, Electric Power Research Institute, Inc.
All rights reserved.
----------------------------------------------------------
}
{ Created 5/17/01 RCD to balance inheritance tree for Circuit Elements}
{... |
var disqus_config = function () {
// we are using document.location.* here because Jekyll code does not work well in JS code.
this.page.url = document.location.href;
this.page.identifier = document.location.pathname;
};
// You should be able to get the following lines of code from your Disqus admin.
// https://d... |
/*
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... |
package rosetta
import scala.annotation.tailrec
object MoveToFront {
/**
* Default radix
*/
private val R = 256
/**
* Default symbol table
*/
private def symbolTable = (0 until R).map(_.toChar).mkString
/**
* Apply move-to-front encoding using default symbol table.
*/
def encode(s: ... |
mongoURI = 'mongodb://127.0.0.1/users';
module.exports = {
mongoURI: mongoURI
}; |
#include "train_template.h"
#include <catboost/cuda/targets/pair_logit.h>
namespace NCatboostCuda {
using TPairLogitTrainer = TGpuTrainer<TPairLogit>;
TGpuTrainerFactory::TRegistrator<TPairLogitTrainer> PairLogitRegistrator(ELossFunction::PairLogit);
}
|
<?php
namespace App\Http\Controllers\fertilizer;
use App\Http\Controllers\Controller;
use App\Http\Requests\fertilizer\FertilizerCropUpdateRequest;
use App\Http\Requests\fertlizer\FertilizerCropRequest;
use App\Models\fertilizer\category;
use App\Models\fertilizer\fertilizer_crop;
use Illuminate\Contracts\View\View;
... |
import type { Format } from '@stoplight/spectral-core';
import { isPlainObject } from '@stoplight/json';
import type { JSONSchema4, JSONSchema6, JSONSchema7 } from 'json-schema';
const KNOWN_JSON_SCHEMA_TYPES = ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'];
const KNOWN_JSON_SCHEMA_COMPOUND_KEYW... |
#ifndef K52_COMMON_SETTINGS_MANAGER_H
#define K52_COMMON_SETTINGS_MANAGER_H
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <iostream>
#include <stdexcept>
namespace k52
{
/// @brief SettingsManager
/// The one stores <property name, value> pairs with different type of... |
class BitcoinQt < Cask
url 'http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.8.5/bitcoin-0.8.5-macosx.dmg'
homepage 'http://sourceforge.net/projects/bitcoin/'
version '0.8.5'
sha1 '995cd84286c8baea5ce5c7307e25c3d8fd65526d'
link 'Bitcoin-Qt.app'
end
|
# encoding: utf-8
def run_tests(dir_glob)
ENV['ARGS'] ||= ''
ENV['QUIET'] ||= 'true'
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/..'))
# require our test helper so we don't have to in each individual test
require 'test/helper'
test_files = Dir["#{dir_glob}*_spec.rb"] + Dir["#{dir_glob... |
class Project < ActiveRecord::Base
belongs_to :user
has_many :work_days
validates :name, presence: true
def total_minutes
work_days.sum(:minutes)
end
def total_hours
total_minutes/60.0
end
def total_score
(multiply * total_minutes).to_i
end
def all_data
data = []
begin_time ... |
<?php
namespace App\Http\Controllers;
use App\Review;
use App\Page;
class ReviewController extends Controller
{
public function index()
{
$pageName = Page::where('id', 8)->first();
$reviews = $this->getReviews();
return view('site.reviews', [
'pageName' => $pageName,
... |
# 解释器模式(Interpreter)

## 定义
解释器模式的定义:给分析对象定义一个语言,并定义该语言的文法表示,再设计一个解析器来解释语言中的句子。也就是说,用编译语言的方式来分析应用中的实例。这种模式实现了文法表达式处理的接口,该接口解释一个特定的上下文
## 优点
- 扩展性好。由于在解释器模式中使用类来表示语言的文法规则,因此可以通过继承等机制来改变或扩展文法。
- 容易实现。在语法树中的每个表达式节点类都是相似的,所以实现其文法较为容易。
## 缺点
- 执行效率较低。解释器模式中通常使用大量的循环和递归调用,当要解释的句子较复杂时,其运行速度很慢,且代码的调试过程也比较麻烦。
-... |
import * as types from './constants';
const initState = {
tokenInfo: null,
tokenList: null,
tokenHolderList: null,
tokenTransactionList: null,
isLoadingMore: false,
};
export default function reducers(state: any = initState, action: any) {
switch (action.type) {
case types.SET_TOKEN_INFO: {
retu... |
OpenFlow 1.3 TODO LIST
=============================
Please take a look on the list of new features added, ongoing work and to do items.
B.11.1 Refactor capabilities negotiation
----------------------------------------
TODO
- Enable ’multipart’ requests (requests spanning multiple messages).
ONGOING
DONE
- Pa... |
using UnityEditor;
using UnityEngine;
class PlayerPrefsDeleteAll
{
[MenuItem ("TeamBrookvale/PlayerPrefsDeleteAll")]
static void Build_iOS_Device ()
{
PlayerPrefs.DeleteAll ();
/* Start Xcode build script
ProcessStartInfo proc = new ProcessStartInfo();
proc.FileName = "open";
proc.WorkingDirectory = "/u... |
<?php
/**
* Copyright 2014 SURFnet bv
*
* 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 agr... |
<?php
namespace GitList\Exception;
class BlankDataException extends \RuntimeException
{
}
|
export class Declaration {
year: string;
rent: number;
homeLoanInterest: number;
homeLoanPrincipal: number;
savings: number;
insurance: number;
npspension: number;
educationLoan: number;
phoneBill: number;
ownerPan: string;
sodexo: number;
}
|
<#
Функция для проверки блокировки файла другим процессом
#>
function Test-FileLock {
param (
[parameter(Mandatory = $true)][string]$Path,
[parameter(Mandatory = $false)][System.IO.FileAccess]$AccessType = [System.IO.FileAccess]::Read
)
$oFile = New-Object System.IO.FileInfo $Path
i... |
<?php
namespace App;
use App\Feed;
use App\User;
use App\UserPost;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
protected $fillable = [
'feed_id', 'title', 'description', 'url', 'date_published',
];
public function feed()
{
... |
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import time,random
time.sleep(5)
x,y,z = mc.player.getTilePos()
colar = random.randrange(0,16)
mc.setBlocks(x+100,y-1,z+100,x-100,y-1,z-100,95)
|
package net.fornwall.jelf;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* An {@link ElfSection} with information necessary for dynamic linking.
*
* This section contains a list of {@link ElfDynamicStructure}
*
* <pre>
* typedef struct { Elf32_Sword d_tag; union { Elf32_Word... |
ENV_NAME=$1
yes | jupyter kernelspec remove $ENV_NAME
conda env remove -n $ENV_NAME
|
package com.egarcia.myfriendz.addFriend.view
interface AddFriendActionHandler {
fun saveFriend()
} |
export type GameIdentifier = string;
export type GameIdentifiers = Array<string>;
export enum Color {
White = "w",
Black = "b",
}
export enum Turn {
User = "User",
Machine = "Machine",
}
export interface GameState {
FEN?: string;
ValidMoves?: string[];
Turn?: Turn;
Color?: string;
Outcome?: string... |
package com.javarush.task.task20.task2021;
import java.io.*;
/*
Сериализация под запретом
*/
public class Solution implements Serializable {
public static class SubSolution extends Solution {
protected void writeObject(ObjectOutputStream objectOutputStream) throws NotSerializableException {
... |
package github.sachin2dehury.nitrresources.ui.adapter
import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import github.sachin2dehury.nitrresources.R
import github.sachin2dehury.nitrresources.c... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Binary_Search_Tree
{
class Program
{
static void Main(string[] args)
{
BinarySearchTree<int> tree = new BinarySearchTree<int>();
tree.Add(1);
... |
import getUsername from './getUsername';
import { format } from 'date-fns';
// Creates a Markdown link to a Jira issue
const getMarkdownJiraLink = (key: string, host: string, title: string) => {
return '[' + key + ' - ' + title + '](' + host + '/browse/' + key + ')';
};
const getIssueLink = (link: any, issue: any) ... |
# LSW-1188-29-1F Communication Protocol
This repository tries to describe the communication protocol used in the LSW-1188-29-1F e-bike controller.
|
class ProposalClosedActivity < Activity
include ProposalActivity
field :final_state, type: String
after_create :notify_proposal_owner
end
|
from binaryninja import *
from wasamole.io import from_bytes
from .branch_resolver import compute_branch_map
HEADER_SIZE = 8
class WASMView(BinaryView):
name = "WASM"
long_name = "WASM File"
def __init__(self, data):
BinaryView.__init__(self, parent_view=data, file_metadata=data.file)
se... |
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OOP_Lab3_Honchar_Maxim_KP_51
{
// This class implements a 'singleton' pattern.
public sealed class FileSystem
{
private static FileSystem instance... |
module Blockbuster
# file helper methods
module FileHelpers
def file_digest(file)
Digest::MD5.file(file).hexdigest
end
def tar_digest(content)
Digest::MD5.hexdigest(content)
end
end
end
|
CREATE TABLE users
(
id BIGINT AUTO_INCREMENT,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
display_name VARCHAR(255) NOT NULL,
bio text NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIME... |
### c-pane 用法
> 参数
- class 自定义样式
- dir 方向
- vertical
- horizontal |
# encoding: UTF-8
#
# Copyright (c) 2010-2018 GoodData Corporation. All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
describe GoodData::LCM2::SynchronizeClients do
subject { GoodData::LCM2::SynchronizeClients }
le... |
<?php
session_start();
//cek apakah sudah login
if(!isset($_SESSION['username'])){
die("Anda belum login");//jika belum login jangan lanjut..
}
//cek status
if($_SESSION['status']!="admin"){
die("Anda bukan admin");//jika bukan admin jangan lanjut
}
include('atas.php');
echo "<fieldset><legend>We... |
public interface IBaseBehaviorSettings
{
ScatterPosition ScatterPosition { get; }
}
|
pub mod actor;
pub mod state;
use self::actor::{ControlMessage, WorldActor};
use crate::chat::{ChatSocket, ToClientMessage};
use crate::lua::LuaHost;
use crate::object::types::Message;
pub use crate::object::types::{Id, ObjectKind};
use crate::repo;
use crate::util::WeakRw;
use actix;
use actix::Actor;
use git2;
use mu... |
import path from 'path'
import { spawn } from 'child_process'
import { Config } from './config'
import { outDir } from './utils'
/**
* Open `index` with `bin`.
* @see https://nodejs.org/api/child_process.html#child_process_options_detached
* @param {string} bin
* @param {string} index
*/
function open(bin, inde... |
Neevo extension for Nette Framework
===================================
This package provides tools to optimize Neevo DBAL for use in
a Nette Framework application. It will register Neevo as a service to
the DI Container, add a panel to DebugBar showing performed queries
and a panel to Bluescreen with SQL query in cas... |
//
// GUI_App.hpp
// GUI_EditText
//
// Created by Panutat Tejasen on 18/1/2562 BE.
// Copyright © 2562 Jimmy Software Co., Ltd. All rights reserved.
//
#ifndef GUI_App_hpp
#define GUI_App_hpp
#include <stdio.h>
#include <iostream>
#include <SDL.h>
#include "skgui.h"
#include "include/core/SkCanvas.h"
#define GU... |
package me.geometrically.prehistoric.server.entity.dinosaur.herbivore;
import me.geometrically.prehistoric.server.entity.ai.EntityAIDinoEatGrass;
import me.geometrically.prehistoric.server.entity.dinosaur.EntityDinosaur;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.EntityAILookIdle;
imp... |
class Knj::Fs
@drivers = []
drivers_path = Php4r.realpath("#{File.dirname(__FILE__)}/drivers")
Dir.new(drivers_path).each do |file|
fn = "#{drivers_path}/#{file}"
next if file == "." or file == ".." or File.directory?(fn)
class_name = Php4r.ucwords(file.slice(0..-4)).to_sym
print "Classname: ... |
CREATE TABLE user (
id INT NOT NULL AUTO_INCREMENT,
username VARCHAR(50) NOT NULL,
password VARCHAR(32) NOT NULL COMMENT '{"type":"password"}',
email VARCHAR(255) NOT NULL,
user_groups TEXT COMMENT '{"type":"multi_select","from":"user_group"}',
use_2fa BOOLEAN,
salt_2fa VARCHAR(32) COMMENT '{"type"... |
game.resources = [
//// Graphics
// Level graphics
{name: "hobocalypse_tiles", type:"image", src: "data/img/map/hobocalypse_tiles.png"},
// Houses
{name: "house1", type:"image", src: "data/img/map/house1.png"},
{name: "house2", type:"image", src: "data/img/map/house2.png"},
// Signs
... |
CREATE TABLE cliente (
codigo INT AUTO_INCREMENT,
nome VARCHAR(50) NOT NULL,
endereco VARCHAR(50) NOT NULL,
PRIMARY KEY (codigo)
);
CREATE TABLE piloto (
codigo INT AUTO_INCREMENT,
nome VARCHAR(50) NOT NULL,
num_voos INT,
PRIMARY KEY (codigo)
);
CREATE TABLE voo (
codigo INT AUTO_INCREMENT,
tipo VARCHAR... |
<?php
namespace App\Http\Controllers;
use App\Http\Requests\TicketTypeRequest;
use App\TicketType;
use App\Classes\Helper;
use Config;
Class TicketTypeController extends Controller{
public function index(){
}
public function show(){
}
public function create(){
}
public function edit(TicketType $ticket_type)... |
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft... |
// MIT/Apaache2 License
use std::{
env,
fs::File,
io::{prelude::*, BufReader, BufWriter},
iter,
};
struct Key {
name: String,
value: Option<char>,
}
#[inline]
fn read_keys<T: Read>(reader: &mut T) -> impl Iterator<Item = Key> + '_ {
// iterate over lines
struct LineIterator<'a, T> {
... |
// import {render} from '@testing-library/react';
// import App from './App';
test('testing library is properly configured', () => {});
// test('renders footer with copyright', () => {
// const {getByText} = render(<App />);
// const footerElement = getByText(/copyright/i);
// expect(footerElement).toBeInTheDoc... |
#/usr/bin/env python
# -*- Coding: UTF-8 -*-
#
# WPSeku: Wordpress Security Scanner
#
# @url: https://github.com/m4ll0k/WPSeku
# @author: Momo Outaadi (M4ll0k)
import re
import json
import requests
from lib import wphttp
from lib import wpprint
class wptheme:
chk = wphttp.UCheck()
out = wpprint.wpprint()
def... |
% Largest palindrome product
% A palindromic number reads the same both ways.
% The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
% Find the largest palindrome made from the product of two 3-digit numbers.
% https://projecteuler.net/problem=4
% Author: Joao Henrique Machado Silva
%... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2018 Red Hat, Inc. and/or its affiliates
# and other contributors as indicated by the @author tags.
#
# 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... |
using SceneLessLogic.Bases;
using Scenes.InGameEditor.Logic;
namespace Scenes.InGameEditor.Ui.InputFields
{
public class Lives : InputFieldBase
{
protected override string Input
{
get => EditorInitializer.BeatMapMeta.Lives == 0
? null
: EditorInitia... |
import { CompositeMap, CompositeMap2, CompositeMap3, RecursiveEntries, RecursiveEntries2 } from "composite-map";
enum StringEnum {
String1 = "String1",
String2 = "String2",
}
enum NumberEnum {
Number1,
Number2,
}
enum MixedEnum {
Number1,
String1 = "String1",
}
describe("Typing Tests", () =>... |
package models
import org.squeryl.annotations.Transient
import java.util.Date
import play.api.libs.json._
import org.squeryl.KeyedEntity
import org.squeryl.PrimitiveTypeMode._
import org.squeryl.dsl.ManyToOne
import models.Database._
import scala.annotation.meta.getter
import models.format.ZoneJsonFormat
/**
* @auth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.