text stringlengths 27 775k |
|---|
require 'httparty'
require 'builder'
require 'openssl'
require 'cgi'
module FreshBooks
API_VERSION = '2.1'
# provides a Hash-like response object with structure
# isomorphic to actual xml response, slightly tidied.
class Response < Hash
attr_reader :status
def initialize(data)
super nil
r... |
#!/bin/bash
# Use unofficial Bash Strict Mode
set -euo pipefail
IFS=$'\n\t'
# LOG
NC='\033[0m' # No Color
RED='\033[0;31m'
YELLOW='\033[0;33m'
GREEN='\033[0;32m'
function error() {
typeset message
message=$1
printf "${RED}[ERROR]${NC} - $message\n"
}
function warning() {
typeset message
message... |
#!/usr/bin/perl
use DBI;
use strict;
use Data::UUID;
my $driver = "SQLite";
my $database = "db/cablix.db";
my $dsn = "DBI:$driver:dbname=$database";
my $userid = "";
my $password = "";
my $dbh = DBI->connect($dsn, $userid, $password, { RaiseError => 1 })
or die $DBI::errstr;
print "Opened database successfull... |
package com.system.po;
import java.util.List;
/**
* Student的扩展类
*/
public class StudentCustom extends Student {
//所属院系名
private String collegeName;
//选课列表
private List<SelectedCourseCustom> selectedCourseList;
public void setcollegeName(String collegeName) {
this.collegeName = college... |
use std::fs;
use std::fs::File;
use std::path::PathBuf;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct Config {
/// The port to host the daemon on.
pub port: u16,
/// The volume of the played songs. Normal volume is `1.0`.
pub volume: f32,
/// Whether to l... |
package es.upm.fi.dia.oeg.morph.base.path
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
class JSONPath_PathExpressionTest {
@Test def TestEvaluate() {
println("------------------ TestEvaluate ------------------")
val json: String = """[
... |
#!/bin/bash -e
export NAME=udp
# shellcheck source=examples/verify-common.sh
. "$(dirname "${BASH_SOURCE[0]}")/../verify-common.sh"
run_log "Send some UDP packets"
echo -n HELO | nc -4u -w1 127.0.0.1 10000
echo -n OLEH | nc -4u -w1 127.0.0.1 10000
run_log "Check backend log"
docker-compose logs service-udp | grep H... |
using System.CommandLine;
using System.Threading.Tasks;
using Miru.Consolables;
using Miru.Core;
namespace Miru.Makers;
public class MakeJobConsolable : Consolable
{
public MakeJobConsolable() :
base("make.job", "Make a new Job")
{
Add(new Argument<string>("in"));
Add(new Argument<stri... |
AccountSettings = new Mongo.Collection('accountSettings');
AccountSettings.attachSchema(new SimpleSchema({
_id: {
type: String,
},
booleanValue: {
type: Boolean,
optional: true,
},
sort: {
type: Number,
decimal: true,
},
}));
AccountSettings.allow({
update(userId) {
const user = ... |
package com.HBuilder.integrate;
import java.util.Random;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.wid... |
use super::{FileInfo, HeadInfo, MabiError, HEADER_SIZE};
use byteorder::{LittleEndian, WriteBytesExt};
use libflate::zlib;
use mersenne_twister::MT19937;
use rand::{Rng, SeedableRng};
use std::fs::{metadata, File, OpenOptions};
use std::io::{BufWriter, Read, Seek, SeekFrom, Write};
use std::path::{Path, MAIN_SEP... |
package com.android.inputmethodcommon;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.preference.PreferenceFragment;
/**
* This is a helper class for an IME's settings preference fragment. It's recommended for every
* IME to have its own settings ... |
//
import * as Vts from 'vue-property-decorator'
import { mixins as Mixins } from 'vue-class-component'
import Vue from 'vue'
import VMixin from '../../mixins/v.mixin'
import RHMixin from '../../mixins/robinhood.mixin'
import * as _ from '../../../common/lodash'
import * as core from '../../../common/core'
import * as... |
<?php
namespace app\modules\swagger\actions;
use OpenApi\Annotations\OpenApi;
use Yii;
use yii\base\Action;
use yii\base\InvalidConfigException;
use yii\base\Response;
use yii\caching\Cache;
use yii\di\Instance;
use function OpenApi\scan;
/**
* Class OpenAPIRenderer is responsible for generating the JSON spec.
*/
... |
# newfile-cli
`newfile folder/file.js then cd` 👈 newfile can do more like this!
---
🌞🌈 Create a file or folder recursively then do something at once ~

## Quick Use
```
$ npx newfile-cli src/index.js then cd
```
Will create index.js in src folder,... |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Parsing
-- Description : Handle parsing data
-- License : MIT
-- Maintainer : The Lusitanian King <alexlusitanian@gmail.com>
module Parsing where
import Input
import Data.Text (Text)
import qualified Data.Text as T
-- | Parsing a CSV file
parseCSVFile :: ... |
#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::C2 {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W)... |
# Overview
## Packages
`BuffettCode` ソリューションは下記の package を含みます
1. BuffettCodeAddinRibbon and Test
2. BuffettCodeAPIAdapter and Test
3. BuffettCodeExcelFunctions and Test
4. BuffettCodeInstaller
ここでは、各 package の役割について簡単に説明します
### 1. BuffettCodeAddinRibbon
バフェット・コードアドインの、Excel の「リボン」部分の実装です。
- CSV出力やTokenの入力フォームを提供しま... |
import React, { useEffect } from 'react';
const WSClient: React.FC = () => {
useEffect(() => {
document.title = 'WebSockets Client';
});
return (
<article className="w-full mx-auto px-5 pt-5 sm:pt-10 md:pt-15 lg:pt-20 xl:pt-25 font-sans text-center">
<h1 className="text-2xl sm:... |
/*
* Copyright (C) 2021 Rick Busarow
* 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 ... |
package com.unimicron.chapter06
object CatDemo {
def main(args: Array[String]): Unit = {
// 創建一個Cat類
val cat = new Cat
// 屬性賦值
// 1. 賦值時cat.name = "Lucky"其實不是直接訪問屬性,而是cat.name_$eq("Lucky")
cat.name = "Lucky"
cat.age = 5
cat.color = "black"
cat.height = "120" // 可以給String
cat.weig... |
---
title: All Things New- Week 2
date: 2016-01-10 00:00:00 Z
link: https://s3.amazonaws.com/podcast.lifestonechurch.net/2016-01-10.mp3
podcastLength: '00:40:41'
size: 79228898
image:
speaker: Pastor Ben Helton
description: All Things New
vimeoId: 151858663
verse: Hebrews 11:23-27
---
## Sermon Notes
**Life-Shaping ... |
<?php
use Illuminate\Support\Facades\DB;
/*return [
'List' => 'DB::table('notifications')
->where('created_at', '=', Carbon::today()->subDays(30)->toDateString())->get()'
return ['List'];
];*/
?> |
'use strict';
(function () {
var dependencies = ['gettext', 'ionic', 'ui.router', 'DrugDoseFrameworkControllers'];
var app = angular.module('DrugDoseFrameworkApp', dependencies).run(function ($ionicPlatform, gettextCatalog) {
var language = 'en_EN';
if (window.localStorage.getItem('language')... |
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\BackendController;
use App\Http\Controllers\Controller;
use App\User;
use App\Role;
use Illuminate\Http\Request;
use Throwable;
use Illuminate\Support\Facades\Hash;
class UserController extends BackendController
{
//
public function userP... |
package com.upseil.gdx.artemis;
import com.badlogic.gdx.utils.JsonValue;
import com.upseil.gdx.properties.EnumerizedJsonBasedProperties;
public final class ArtemisConfigs {
public static enum SaveConfigValues {
SaveStoreName, AutoSaveInterval, AutoSaveSlot, SaveSlots, SlotPrefix, TimeSuffix, NameSuff... |
gnuplot << EOF
set term pngcairo size 1920,1080 enhanced
set datafile separator ","
set output 'output.png'
set title 'Balsa FPS'
set xlabel 'Time (s)'
set ylabel 'FPS'
set yrange [0:100]
set key off
plot 'FrameTimePlot.csv' using 1:3 with lines
EOF
okular output.png
|
using System.Collections.Generic;
using System.Threading.Tasks;
using UniversalDownloaderPlatform.Common.Interfaces.Models;
namespace UniversalDownloaderPlatform.Common.Interfaces
{
public interface ICrawlResultsExporter
{
/// <summary>
/// Generate file with crawl results inside the download ... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
using UniRx;
using Summer;
using System.Linq;
public class PanelTextController : MonoBehaviour {
public float speed = 1.0f;
/// <summary>
/// TextBoxに表示するテキストをバッファしておく
/// </summary>
public L... |
<?php
namespace App\Controller;
use App\Api\AbstractController;
use App\Attributes\UrlAttribute;
use Psr\Http\Message\ResponseInterface;
class WhoopsTest extends AbstractController
{
#[UrlAttribute('/whoops')]
public function whoops(): ResponseInterface
{
throw new \Exception('whoops... |
package sttp.tapir.generic.internal
import sttp.tapir.encodedName
import scala.reflect.macros.blackbox
private[generic] class CaseClassUtil[C <: blackbox.Context, T: C#WeakTypeTag](val c: C) {
import c.universe._
val t: Type = weakTypeOf[T]
if (!t.typeSymbol.isClass || !t.typeSymbol.asClass.isCaseClass) {
... |
module ProxyEnforce
module Errors
class Base < ::Exception; end
end
end
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Dashboard adaptada de criative - tim
// https://demos.creative-tim.com/now-ui-dashboard/docs/1.0/getting-started/introduction.html
class Dashboard {
function show($view, $data=array()){
$CI = & get_instance();
// carrega cabe... |
import MdxCard from 'src/components/MdxCard';
<MdxCard>
## User (Avatar)
Represents a component showing a user avatar (picture) with a user name on the right.
[Size](demo://Size.tsx)
### Usage
```js
import User from '@paljs/ui/User';
```
You can hide unnecessary captions (name, title or both):
[Hide](demo://Hid... |
package codes.quine.labo.lite.crazy
/** Tardis a state monad implementation holds both of backward and forward states. */
final case class Tardis[BW, FW, A](run: (Lazy[BW], Lazy[FW]) => (Lazy[BW], Lazy[FW], Lazy[A])) {
/** Applies a result value to the given mapping, and returns a new tardis monad holds this result... |
package com.github.vickumar1981.stringdistance
import com.github.vickumar1981.stringdistance.impl._
import com.github.vickumar1981.stringdistance.interfaces.NGramTokenizer
/**
* Main class to organize functionality of different string distance algorithms
*
* {{{
* import com.github.vickumar1981.stringdistance.Str... |
//
// CwCardDelegate.h
// CwTest
//
// Created by CP Hsiao on 2014/12/8.
// Copyright (c) 2014年 CP Hsiao. All rights reserved.
//
#ifndef CwTest_CwCardDelegate_h
#define CwTest_CwCardDelegate_h
#import <Foundation/Foundation.h>
#import "CwCard.h"
#import "CwAddress.h"
@class CwCard;
@protocol CwCardDelegate <N... |
import { Controller, Get, UseGuards, Param } from '@nestjs/common';
import { ParticipantService } from './participant.service';
import { JwtAuthGuard } from 'src/auth/jwt-auth.guard';
import { GetUser } from 'src/user/user.decorator';
@UseGuards(JwtAuthGuard)
@Controller('events/:event_id')
export class ParticipantCon... |
/** @babel */
import { CompositeDisposable } from 'atom'
let RecentsView
const VIEW_URI = 'atom://recents/view'
export default class Recents {
async activate() {
this.subscriptions = new CompositeDisposable()
this.subscriptions.add(
atom.workspace.addOpener(uri => {
if (uri === VIEW_URI) {... |
module Data.TokenUsageLikelihood.Internal
( noTestOccurrences
, totalFileCount
, occurrenceCountByFileType
, occursMoreThanOnce
, oneTestOccurrence
, occursInOneFile
, matchesAutomaticLowLikelihood
, oneApplicationOccurrence
) where
import qualified Data.Text as T
import Data.TokenU... |
/* Generated from "toaster_base.dxf" on Aug-22-2014.
Smoothed vertex normals. Normalized to unit bounding box.
*/
#include "gllist.h"
static const float toaster_base_data[] = {
-0.10666,0.994296,0,-0.242083,0.5,0.052679,
0.10666,0.994296,0,0.242083,0.5,-0.052679,
-0.21332,0.976982,0,-0.242083,0.5,-0.052679,
0... |
---
title: test post
date: 2019-08-27T07:00:00.000Z
description: TEST POST
---
asdasdfgghh
|
#!/usr/bin/env sh
printf 'Building LESS files %s\n\n' $(date --iso=seconds)
cp less/normalize.css css/normalize.css
lessc less/index.less css/index.css --source-map --verbose
printf 'Done\n'
|
**FNAMP笔记(FreeBSD 12.2 + Nginx 1.18 + Apache 2.4 + MariaDB 10.5 + PHP 8.0 + Tomcat 9.0 + Python 3.7)**
```
tzsetup
freebsd-update fetch
freebsd-update install
freebsd-update upgrade -r 12.2-RELEASE
freebsd-update install
shutdown -r now
freebsd-update install
```
/usr/local/etc/pkg/repos/FreeBSD.conf
```
FreeBSD: {
... |
import os
import unittest
@unittest.skip('Skipping unittest for namespace')
class TestNameSpace(unittest.TestCase):
"""
This test makes sure we don't remove anything from the pysal NameSpace that
1.0 users might expect to be there. 1.0 Namespace was taken from the 1.1
Code sprint wave, wit... |
module Sailsify
module Generators
autoload :Model, 'sailsify/generators/model'
autoload :Controller, 'sailsify/generators/controller'
autoload :AbstractGenerator, 'sailsify/generators/abstract_generator'
end
mattr_accessor :destination_dir
def self.config
yield self
end
end
require 'sailsif... |
#include <llarp/encode.hpp>
#include <stdexcept>
namespace llarp
{
int
char2int(char input)
{
if(input >= '0' && input <= '9')
return input - '0';
if(input >= 'A' && input <= 'F')
return input - 'A' + 10;
if(input >= 'a' && input <= 'f')
return input - 'a' + 10;
throw std::inval... |
export function getRenderPanels() {
return [
{
id: 'layout-basic-actions',
el: '#panel__layout-basic-actions',
buttons: [
{
id: 'visibility',
active: true, // active by default
className: 'btn-toggle-borders',
label: '<i class="fas fa-border-none"></i>',
c... |
from os import walk, remove
def get_all_files(directory):
""" Method for listing files within a directory
"""
f = []
for (_, _, filenames) in walk(directory):
f.extend(filenames)
return f
def remove_file(filename, directory):
""" Method for removing a file within a directory
"""
try:
remove(d... |
/* Composer.scala
*
* Copyright (c) 2021 wayfarerx (@thewayfarerx).
*
* 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 app... |
<?php
namespace WordPress\V1\Rest\Taxonomies;
use Zend\Paginator\Paginator;
class TaxonomiesCollection extends Paginator
{
}
|
package grammar
import grammar.model.CFGrammar
interface GrammarParser {
fun parse(filename: String): CFGrammar
}
|
#include <bits/stdc++.h>
#define ll long long
#define ls id<<1
#define rs id<<1|1
#define mem(a,b) memset(a,b,sizeof(a))
#define pii pair<int,int>
#define flush fflush(stdout)
#define pb(x) push_back(x)
using namespace std;
const int inf=0x3f3f3f3f;
const ll mod=1e9+7;
const int N=1000050;
int t[10];
int c;
void solve... |
package info.smart_tools.smartactors.task.thread_pool;
import info.smart_tools.smartactors.task.interfaces.itask.ITask;
import info.smart_tools.smartactors.task.interfaces.itask.exception.TaskExecutionException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.mockito.Mockito.... |
module montecarlo
use approx
use conversion
use energy
use global
use neighborhood
use plot
use transposition
implicit none
private
interface vary
module procedure vary_blind, vary_sighted
end interface vary
public :: vary, markov
contains
subroutine vary_blind(change)
... |
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace PiRhoSoft.Variables
{
public interface IVariableDictionary
{
IReadOnlyCollection<string> VariableNames { get; }
Variable GetVariable(string name);
SetVariableResult SetVariable(string name, Variable var... |
package cmd
/*
Onix Config Manager - Artisan
Copyright (c) 2018-Present by www.gatblau.org
Licensed under the Apache License, Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0
Contributors to this project, hereby assign copyright in this code to the project,
to be licensed under the same terms as the... |
from pytest import raises
from graphql.core.language.error import LanguageError
from graphql.core.language.source import Source
from graphql.core.language.parser import parse
from graphql.core.language import ast
from fixtures import KITCHEN_SINK
def test_parse_provides_useful_errors():
with raises(LanguageError)... |
---
prev: 4_quick-start
next: 6_retrieve-visits-and-stats
---
# Increments and Decrements
## Increment
### One
```php
visits($post)->increment();
```
### More than one
```php
visits($post)->increment(10);
```
## Decrement
### One
```php
visits($post)->decrement();
```
### More than one
```php
visits($post)->decreme... |
# frozen_string_literal: true
class FakeHttpLibrary
def get(_url, _params = nil); end
end
|
package org.apache.lucene.store;
/**
* 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, Versi... |
import pickle
import traceback
from os.path import exists, join
from utils import create_if_not_exists
from settings import ClientSettings
class Channel:
def __init__(self, client, server, channel):
self.name = channel.name
self.id = channel.id
self.channel_loc = '{}'.format(channel.id)
... |
use crate::utils::{is_dir, libc_call, with_c_str};
use std::ffi::{CStr, CString};
use std::os::unix::ffi::OsStrExt;
use std::path::Path;
use std::{fs, io, ptr};
use anyhow::Result;
use nix::fcntl::{self, OFlag};
use nix::sys::stat::Mode;
use nix::unistd::{self, AccessFlags};
pub fn bind_mount(src_path: &Path, dst... |
# CCA matching personality test
A more efficient way to choose your CCA by narrowing down your choices based on your skills, talents and interests. :D
(my previous README.md is in the infocomm club file)
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SocialElement = exports.Social = undefined;
var _Social2 = require('./Social');
var _Social3 = _interopRequireDefault(_Social2);
var _SocialElement2 = require('./SocialElement');
var _SocialElement3 = _interopRequireDefault(_Soc... |
import React, { useState } from 'react';
import {
Admin,
ListGuesser,
Resource,
ShowGuesser,
EditGuesser,
Create,
SimpleForm,
TextInput,
} from 'react-admin';
import { createTRPCDataProvider, Resources } from 'ra-trpc/client';
import superjson from 'superjson';
import { createTRPCClient } from '@trpc/cl... |
import React from "react";
import { Avatar } from "@windmill/react-ui";
export const AvatarWithName: React.FC<{
name: string;
subtitle?: string;
ImageIcon: any;
}> = ({ name, subtitle, ImageIcon }) => {
return (
<div className="flex items-center text-sm">
<Avatar
className="hidden mr-3 md:blo... |
<?php
namespace CleaniqueCoders\Profile\Traits\Morphs;
/**
* Emailable Trait.
*/
trait Emailable
{
/**
* Get all emails.
*/
public function emails()
{
return $this->morphMany(
config('profile.providers.email.model'),
config('profile.providers.email.type')
... |
import React from 'react'
import { Link } from 'gatsby'
import styles from './footer-handbook.module.css'
export default () => (
<div className={styles.footer}>
<div className={styles.column}>
<div className={styles.header}>Get in touch</div>
<div className={styles.contactEmail}>
<a href="... |
class CreateOpenidUrls < ActiveRecord::Migration[4.2]
def change
create_table :openid_urls do |t|
t.string "str"
t.integer "profile_id"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "primary_openid"
t.timestamps
end
create_table "open_id_associations",... |
---
layout: post
title: "xShell 介绍"
subtitle: "xShell 是一个很好用的 ssh远程访问 linux 服务器的工具"
date: 2018-01-01
author: Mcoder
catalog: true
---
# 介绍
xShell 是一个对个人和教育用户免费的远程终端软件,可以用来连接远程的 linux 服务器,反应很快,样式也不错。

# Reference
- [xShell download](http://www.netsarang.com/download/down_fo... |
// fileDownload is a wrapper for the blodDownload function, but allows users to specify the data as string.
export const fileDownload = (data: string, filename: string): void => {
const blob = new Blob([data]);
blobDownload(blob, filename);
};
// blobDownload can be used to download the given data as file.
// See:... |
cd $TRESTLE_BASEDIR/catalogs/mycatalog
# Splits the properties listed in the -e option that must exist in the file specified in the -f option.
trestle split -f ./catalog.json -e 'catalog.metadata,catalog.groups,catalog.back-matter'
# In the near future, trestle split should be smart enough to figure out which json fi... |
#ifndef HR_EDL_STOPWATCH_H_
#define HR_EDL_STOPWATCH_H_
#include <atomic>
#include <chrono>
namespace hr_edl {
// Thanks to Incomputable
// https://codereview.stackexchange.com/questions/196245/extremely-simple-timer-class-in-c
// for this.
template <typename Clock = std::chrono::steady_clock>
class Stopwatch {
pub... |
/*
* The contents of this file are subject to the terms of the Common Development
* and Distribution License (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at http://www.netbeans.org/cddl.html
* or http://www.netbeans.org/cddl.txt.
*
* ... |
namespace BotFramework.Setup
{
/// <summary>
/// Chat Type
/// </summary>
public enum InChat
{
/// <summary>
/// Private chat aka peer-to-peer with bot
/// </summary>
Private,
/// <summary>
/// Public chats (in both privacy mode), not pee... |
---
layout: post
title: " 2022 Flag "
date: 2022-01-17
categories: 思考我自己 十年后的我 职业生涯规划
---
### 2022 Flag Description:
思考我自己的 - Feature,本文主要围绕三大问题 :
当下的工作是我想要的的吗?
当下自己的状态是自己喜欢的吗?
10年后的我在干什么?现在的我对十年后的我帮助很大吗?
---
<h3> 当下的工作是我想要的的吗?
```python
class MyThink1():
pass
... |
package info.unbelievable9.environment.db;
import bitronix.tm.resource.jdbc.PoolingDataSource;
import info.unbelievable9.shared.util.ImprovedH2Dialect;
import org.hibernate.dialect.MySQL57Dialect;
/**
* Created on : 2018/8/8
* Author : Unbelievable9
**/
public enum DatabaseProduct {
H2(
(pooli... |
# Simulation Models of Power Systems
## SimPowerSystem Model of San Francisco Bay Area electric power system (PG & E)
Requires SimPower libraries.
Can be converted and used using real-time simulators, such as Opal-RT
WARNING: The model is figuratative, composed of few substations, and not for research and represent... |
'use strict';
/* eslint-env node */
const Funnel = require('broccoli-funnel');
module.exports = function(env) {
let file;
if (env === 'debug') {
file = 'external-helpers-dev.js';
} else if (env === 'prod') {
file = 'external-helpers-prod.js'
}
return new Funnel('packages/external-helpers/lib', {
... |
# MATLAB
MATLAB is a platform for solving engineering, mathematical, and graphical problems.
To find out more, visit the MATLAB website at: http://se.mathworks.com/help/matlab
## License Information
### Academic users
Academic users need a link to a MATLAB license server for their university
(UiB, UiT, UiO or NTNU... |
package com.redberrystudios.whatsfordinner.security.authenticators;
public interface ThirdPartyAuthentication {
String getName();
String getEmail();
String getProfileImage();
}
|
namespace Joker.OData.Hosting
{
public class IISODataWebHostConfig : ODataWebHostConfig
{
}
} |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: client_proto_id.proto
package com.gc.patrol_robot.protobuf;
public final class CliProtoId {
private CliProtoId() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void... |
package com.evguard.tools;
import android.content.Context;
import android.util.DisplayMetrics;
import android.util.SparseArray;
import android.view.View;
import android.view.WindowManager;
public class DateUtils {
/**
* 获取屏幕的比例
*
* @return
*/
public static float getScaledDensity(Context context) {
Displ... |
## Spring Data JPA - Repositories
### Relevant Articles:
- [Introduction to Spring Data JPA](https://www.baeldung.com/the-persistence-layer-with-spring-data-jpa)
- More articles: [[<-- prev]](/spring-data-jpa-repo/) |
package io.github.wulkanowy.data.repositories.appcreator
import android.content.res.AssetManager
import com.google.gson.Gson
import io.github.wulkanowy.data.pojos.AppCreator
import io.reactivex.Single
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class AppCreatorRepository @Inject constructor(pr... |
import { model, Schema } from 'mongoose';
const Users = model('User', new Schema({
username: { type: String, required: true },
password: { type: String, required: true },
salt: String,
firstName: String,
lastName: String,
email: String,
role: { type: String, enum: ['user', 'developer'], default: 'user' }... |
package trace
import (
"context"
"math/rand"
"sync"
"time"
)
var (
traceRand = rand.New(rand.NewSource(time.Now().UnixNano()))
traceRandMutex = sync.Mutex{}
)
// value 记录了 context 里面的 trace 信息。
//
// 这里为了能够实现跨越 rpc 边界传递 trace 信息,特别是时间相关信息,
// 专门设计了 Now、Timeout、ElapsedTime 这三个字段来持久化这些信息。
// 对于任何一个新创建的 trac... |
import 'dart:convert';
import 'package:at_base2e15/at_base2e15.dart';
import 'package:at_commons/at_commons.dart';
import 'package:at_wavi_app/model/user.dart';
import 'package:at_wavi_app/services/at_key_set_service.dart';
import 'package:at_wavi_app/services/backend_service.dart';
import 'package:at_wavi_app/service... |
<?php
date_default_timezone_set('asia/jakarta');
function dateEng($date){
$dateConvert = str_replace('/', '-', $date);
$newDate = date('Y-m-d', strtotime($dateConvert));
return $newDate;
}
function dateTime($date, $sts){
$dateConvert = str_replace('/', '-', $date);
if($sts == true){
$newDate = d... |
% 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 ... |
<?php
declare(strict_types=1);
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace bovigo\vfs\tests;
use bovigo\vfs\vfsStream;
use bovigo\vfs\vfsStreamDirectory;
use PHPUnit\Framework\T... |
#!/bin/bash
set -e +x
clean_project() {
# Remove compiled files that might cause conflicts
rm -rf /io/.cache /io/.eggs /io/build /io/*.egg-info
find /io/ -name "__pycache__" -type d -print0 | xargs -0 rm -rf
find /io/ -name "*.pyc" -type f -print0 | xargs -0 rm -rf
find /io/ -name "*.so" -type f -p... |
/**
* 模块作用:统计推荐算法
* 启动服务:mongodb
*/
/**
* MongoDB:
* RateMoreMovies
* RateMoreRecentlyMovies
* AverageMovies
* GenresTopMovies
*/
package com.zyx.statistics
import java.text.SimpleDateFormat
import java.util.Date
import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession
/**
* movies.csv
* ... |
@extends('layout.v_template')
@section('title','Home')
@section('content')
<!-- Begin Page Content -->
<div class="container-fluid">
<br>
<h2 class="text-center">Selamat Datang di Sistem Informasi GadgetShop</h2>
</div>
<!-- End of Main Content -->
@endsection |
package opengis.process
/**
* Created by Chris on 12/08/2017.
*/
class Projections {
companion object {
fun main( args: Array<String> ) {
/*
fun Usage(s = ""):
print "Usage: globalmaptiles.py [-profile 'mercator'|'geodetic'] zoomlevel lat lon [latmax lonmax]"
... |
package ftl.reports.util
import java.io.File
import java.nio.file.Paths
fun File.getMatrixPath(objectName: String) = getShardName(objectName)?.asObjectPath()
private fun File.getShardName(objectName: String) = shardNameRegex(objectName)
.find(toString())
?.value
?.removePrefix("/")?.removeSuffix("/")
pr... |
package phonetics
import (
"errors"
"regexp"
"strings"
)
func EncodeMetaphone(word string, lang ...string) string {
_lang := "en"
if len(lang) > 0 {
_lang = lang[0]
} else {
var re = regexp.MustCompile("^[A-Za-z0-1]+$")
if re.MatchString(word) {
_lang = "en"
} else {
var re = regexp.MustCompile("^... |
# Copyright (C) 2013, 2014 by Dmitry Maksyoma <ledestin@gmail.com>
module FrugalTimeout
# Timeout request, holding expiry time, what exception to raise and in which
# thread. It is active by default, but can be defused. If it's defused, then
# timeout won't be enforced when #enforce is called.
class Request #:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.