text stringlengths 27 775k |
|---|
#!/bin/bash
set -e
if [[ "$EUID" == 0 ]]
then echo "Please run as normal user (w/o sudo)"
exit
fi
echo
echo "MS' Surfece can have issue with this"
echo "Do you want to install? (y/n)"
echo
read -n 1 ans
echo
if [[ $ans == "y" ]]
then
sudo add-apt-repository ppa:linrunner/tlp
sudo apt update
sudo apt ... |
require 'json'
require 'yaml'
require_relative './../utils/kubectl'
module Kerbi
class StateManager
def patch
self.create_configmap_if_missing
patch_values = self.compile_patch
config_map = self.get_configmap
crt_values = self.get_configmap_values(config_map)
merged_vars = crt_value... |
import type { IFile, IUploadRequest, IUploadTask } from "./types";
import { EUploadStatus } from './enums';
import * as api from './api';
import { updateTask, pushWorker, removeWorker, terminateWorkers, pushFile } from "./store";
import { inferFileType } from "./util";
export async function upload(task: IUploadTask) {... |
require 'httparty'
require 'ampsy/version'
require 'ampsy/response'
require 'ampsy/client'
|
// Copyright 2018 Grove Enterprises 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 ... |
package shmp.lang.language.lexis
import shmp.lang.containers.SemanticsCoreTemplate
sealed class SemanticsCoreMatcher {
abstract fun match(core: SemanticsCoreTemplate): Boolean
}
object PassingMatcher: SemanticsCoreMatcher() {
override fun match(core: SemanticsCoreTemplate) = true
}
data class SpeechPartMatc... |
use crate::prelude::{debug, Logger, Value};
use stable_hash::{prelude::*, utils::StableHasherWrapper, SequenceNumberInt};
use std::collections::{BTreeMap, HashMap};
use std::fmt;
use strum::AsStaticRef as _;
use strum_macros::AsStaticStr;
use twox_hash::XxHash64;
use lazy_static::lazy_static;
lazy_static! {
stati... |
#pragma once
#include <cassert>
#include <memory>
#include "../Actor/Actor.h"
#include "../Actor/ActorTypes.h"
#include "../Actor/Player.h"
namespace Factory
{
class ActorFactory
{
public:
std::unique_ptr<Actor::Actor> createActor(Actor::ActorType actorType)
{
switch (actorType)
{
case Actor::ActorType... |
# frozen_string_literal: true
require_relative "install_dash_docs/version"
require_relative "install_dash_docs/bundler_plugin"
require_relative "install_dash_docs/cli"
require_relative "install_dash_docs/dash"
require_relative "install_dash_docs/dash_install_url"
require_relative "install_dash_docs/lockfile"
module B... |
import { join } from 'path';
import {
renderPlaygroundPage,
RenderPageOptions as PlaygroundRenderPageOptions,
} from '@apollographql/graphql-playground-html';
import { loadFilesSync } from '@graphql-tools/load-files';
import { mergeTypeDefs, mergeResolvers } from '@graphql-tools/merge';
import { makeExecutableSche... |
package com.lucidsoftworksllc.sabotcommunity.models
class UserListRecycler(val id: String,
val user_id: String,
val profile_pic: String,
val nickname: String,
val username: String,
val verified: String,
... |
cask 'flixster-desktop' do
version '2.5.12.333'
sha256 '2916b4f2fd2c50f355e427369f57b4f51ec32d22add34ba0abbc3467a849892c'
# cloudfront.net is the official download host per the vendor homepage
url 'https://dtmmt9rxsy2no.cloudfront.net/desktop/mac/FlixsterDesktop.zip'
appcast 'https://dtmmt9rxsy2no.cloudfront... |
`LineAppendableImpl`是旨在简化`LineFormattingAppendable`的替代品
创建基于行的格式化输出,包括通过以下方式跟踪源偏移信息
使用`SegmentedBuilder`累积输出到`SegmentedSequence`最终结果。
:warning:正在进行中
## Format
格式化功能包括在每行生成时删除/添加前缀,折叠
将空格跨度扩展为单个空格,删除每行的前导和/或尾随空格。
该实现将输出累积为行列表。对于每一行,可追加项保持不变
前缀结尾和行文本开始的每行的位置。
在附加EOL时,将提交累积的行并将其添加到累积的列表中
线。
正在累积的行以其自己的`SegmentBuild... |
import { graphql, useStaticQuery } from 'gatsby';
import React from 'react';
import { Helmet } from 'react-helmet';
interface HeadProps {
title: string;
}
const Head: React.FC<HeadProps> = ({title}) => {
return (
<Helmet titleTemplate={`%s | A11Y Accceptance Criteria Library`}>
<html lang="en... |
function doTest() {
var objA = {};
Object.defineProperty(objA, 'prop', {
get: function () {
return 'foo'
},
set: function (newVal) {
log(newVal);
}
}); Object.defineProperty(objA, 'isObjA', {
get: function () {
return this === objA;... |
class DownloadsController < ApplicationController
attr_reader :tsvs, :files
def show
@tsvs = ['interactions.tsv', 'genes.tsv', 'drugs.tsv', 'categories.tsv']
tsv_dir = File.join('data', 'monthly_tsvs')
unsorted_files = Dir.entries(File.join(Rails.root, 'public', tsv_dir)).each_with_object({}) do |subdi... |
module Netverify
class ResponseFetcher
def initialize(params = {})
@params = params
@validation = find_stored_validation
end
def fetch!
prepare_fields
fetch_personal_info_fields
fetch_image_fields
fetch_reject_reason_fields
fetch_additional_info
@validatio... |
use super::POW_CHAIN_DB_COLUMN as DB_COLUMN;
use super::{ClientDB, DBError};
use std::sync::Arc;
pub struct PoWChainStore<T>
where
T: ClientDB,
{
db: Arc<T>,
}
impl<T: ClientDB> PoWChainStore<T> {
pub fn new(db: Arc<T>) -> Self {
Self { db }
}
pub fn put_block_hash(&self, hash: &[u8]) -> ... |
package jp.kght6123.floating.window.core.utils
import android.content.Context
import android.graphics.Point
import android.view.WindowManager
/**
* 画面系のユーティリティクラス
*
* @author kght6123
* @copyright 2017/07/29 Hirotaka Koga
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
*/
class DisplayUtil... |
package com.elementalg.minigame
import com.badlogic.gdx.ApplicationAdapter
import com.badlogic.gdx.graphics.FPSLogger
import com.elementalg.client.managers.DependencyManager
import com.elementalg.client.managers.LocaleManager
import com.elementalg.client.managers.ScreenManager
import com.elementalg.managers.Eve... |
require 'singleton'
require 'logger'
require 'date'
require 'fileutils'
module SrLog
class Log
include Singleton
def log log_key, msg, opts = {}
@logfiles ||= {}
log_month = Date.today.strftime '%Y.%m'
unless @logfiles.has_key?(log_key) && @logfiles[log_key][:log_month] == log_month
... |
# Copyright 2015 Andrew Kerr
# 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
#
# Unless required by a... |
#!/bin/bash -x
set -e
set -o pipefail
# Note this script assumes that the current working directory
# is the root of the repository
if [ ! -f ./.travis.yml ]; then
echo "This script must be run from the root of the repository"
exit 1
fi
: ${LLVM_INCLUDE:?"LLVM_INCLUDE must be specified"}
: ${LLVM_LIB:?"LLVM_LIB m... |
import symbolTable from './symbol-table';
import noNestedFunction from './no-nested-function';
import validVariableType from './valid-variable-type';
import variableCasing from './variable-casing';
export default {
symbolTable,
noNestedFunction,
validVariableType,
variableCasing,
};
|
package main
import (
"bytes"
"fmt"
"io"
"log"
"time"
"github.com/zenhotels/astranet"
)
func main() {
var astraNet1 = astranet.New().Server()
var astraNet2 = astranet.New().Client()
var client, server IOLoop
server.Reader, client.Writer = io.Pipe()
client.Reader, server.Writer = io.Pipe()
// Use IOLoop... |
#--
# Copyright 2017 Red Hat Inc.
#
# 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 writ... |
import React, { PureComponent } from 'react';
import { Popover, Button } from 'antd';
import MenuItem from './MenuItem';
class AdvancedContextMenu extends PureComponent {
constructor(props) {
super(props);
this.state = {
visible: false,
};
}
closeMenu = () => {
this.setState({
visib... |
# C++ Playground
A CMake based C++ project with various libraries.
The top `CMakeLists.txt` presents two stages: "thirdparty" and "main".
When `-DTHIRDPARTY=TRUE` is passed to cmake configure command, the thirdparty stage is configured,
the "binary directory" is `thirdparty/build`. This build employs
[ExternalProjec... |
package com.funckyhacker.capofiler.view.main
import android.Manifest
import android.annotation.SuppressLint
import android.content.ActivityNotFoundException
import android.content.Intent
import android.databinding.DataBindingUtil
import android.os.Bundle
import android.os.Environment
import android.support.annotation.... |
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2012 The ZAP Development Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... |
jOOλ - Java 8中的缺失部分
jOOλ改进了专家组关注其他地方的JDK库。它在顺序Streams周围添加了元组支持,功能支持和许多附加功能。
JDK 8的主要工作(默认方法,lambdas和Stream API)主要围绕保持向后兼容性和实现并行功能API。
jOOR - Java中的流利反思
jOOR是一个非常简单的流畅API,它以更直观的方式访问您的Java类结构。
JDK的反射API很难并且使用起来很冗长。其他语言具有更简单的构造,以在运行时访问类型元信息。让我们更好地进行Java反射。
jOOU - 无符号整数,Object Oriented Unsigned无符号的
女王提供无符号整数版本为... |
## DemoASM - Demos and Examples
### ASKPSWD.ASM
Extremely simple password prompt demo. It should not be used AS-IS. Since,
it uses the command line to provide the username an password. Does not
provide a hashing function. These are only a few of the reasons it is
not secure and should not be used in a production ... |
use reqwest;
use client::voting_choose;
use lib::VoteOption;
use lib::BOARD_PORT;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let options: Vec<VoteOption> = reqwest::get(format!("http://localhost:{}/options", BOARD_PORT))
.await?
.json()
.await?;
voting_c... |
#!/usr/bin/env perl
# Demian Riccardi 06/02/2014
# use kmeans clustering from Math::Vector::Real::kdTree to process the results from FTMap into a set of
# binding sites. Print out as XYZ of mercury atoms.
#
# ftmap.bu.edu
#
# the ftmap pdbs have the small molecule binders in between /HEADER crosscluster/ and a /REMAR... |
(in-package "ACL2")
; hifat-entry-count.lisp Mihir Mehta
; hifat-entry-count is related to the problem of transforming a potentially loopy
; FAT32 disk image into a tree in a bounded amount of time. Some lemmas for
; reasoning about it are placed here.
(include-book "hifat-equiv")
;... |
package admin
import (
adminPb "github.com/textileio/powergate/v2/api/gen/powergate/admin/v1"
"github.com/textileio/powergate/v2/ffs/manager"
"github.com/textileio/powergate/v2/ffs/scheduler"
"github.com/textileio/powergate/v2/wallet"
)
// Service implements the Admin API.
type Service struct {
adminPb.Unimpleme... |
@file:OptIn(UnstableKatanApi::class)
package me.devnatan.katan.webserver
import io.ktor.http.*
import me.devnatan.katan.api.account.Account
import me.devnatan.katan.api.annotations.UnstableKatanApi
import me.devnatan.katan.api.plugin.Plugin
import me.devnatan.katan.api.role.Role
import me.devnatan.katan.api.security.... |
# coding: UTF-8
require 'spec_helper'
describe file('/etc/zookeeper') do
it { should be_directory }
it { should be_linked_to '/opt/confluent/confluent-2.0.1/etc/kafka' }
end
describe file('/opt/confluent/confluent-2.0.1/bin/zookeeper-server-stop') do
it { should be_file }
it { should be_owned_by 'confluent' ... |
# Spherical harmonic I/O, storage, and conversions
# Spherical harmonic I/O
# SHRead
# SHRead2
# SHReadJPL
# Spherical harmonic storage
export SHCilmToCindex!
"""
cindex = SHCilmToCindex!(cindex::AbstractArray{Cdouble,2},
cilm::AbstractArray{Cdouble,3};
... |
# frozen_string_literal: true
module Kanrisuru
module Core
module IP
def ip_route(action, opts)
case action
when 'show', 'list'
version = ip_version.to_i
command = ip_route_show(opts, version)
when 'flush'
command = ip_route_flush(opts)
when 'ad... |
package com.redhat.vertx.pipeline;
public interface EventBusMessage {
String DOCUMENT_STARTED = "documentStarted";
String DOCUMENT_COMPLETED = "documentCompleted";
String DOCUMENT_CHANGED = "documentChanged";
String CHANGE_REQUEST = "changeRequest";
String SECTION_STARTED = "sectionStarted";
S... |
import { CommandParser } from "../lib";
let parser = new CommandParser({ prefix: "~" });
let str = "~hello world";
let { success, command, args } = parser.parse(str);
console.log(success); // true
console.log(command); // "hello"
console.log(args); // ["world"]
|
package com.mahendran_sakkarai.camera.utils;
import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.Camera;
/**
* Created by Mahendran Sakkarai on 1/5/2017.
*/
public class CameraUtil {
/** Check if this device has a camera */
public static boolean checkCameraHardw... |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Jso... |
class TenantLogin {
TenantLogin({
required this.status,
required this.data,
});
late final String status;
late final Data data;
TenantLogin.fromJson(Map<String, dynamic> json) {
status = json['status'];
data = Data.fromJson(json['data']);
}
Map<String, dynamic> toJson() {
final _data... |
// Copyright (c) Facebook, Inc. and its affiliates.
//
// 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 applicabl... |
package com.sama.slotsuggestion.domain
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import java.time.ZonedDateTime
internal class BlockTest {
@Test
fun testZeroDuration() {
val now = ZonedDateTime.now()
assertThat(Block(now, now, false, false, 0).zeroDu... |
package step
func ModVendor() error {
return runCommand(
"failed to vendor project dependencies: %v",
createCommand("go", "mod", "vendor"),
)()
}
|
const GENERATE_CODE = 'GENERATE_CODE'
const START_PROJECT = 'START_PROJECT'
const KILL_PROJECT = 'KILL_PROJECT'
const CHECK_SERVERS_STARTED = 'CHECK_SERVERS_STARTED'
module.exports = {
GENERATE_CODE,
START_PROJECT,
KILL_PROJECT,
CHECK_SERVERS_STARTED,
}
|
import { PassportStrategy } from '@nestjs/passport'
import { Injectable } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'
import { Strategy, ExtractJwt } from 'passport-jwt'
import { User } from '../../entities/example/user.entity'
import { ValidateToken } from '../utils/validateToken.service'
imp... |
using System;
using System.Threading.Tasks;
using TensorFlowMLNETInceptionv3ModelScoring.Model;
namespace TensorFlowMLNETInceptionv3ModelScoring
{
public class Program
{
static async Task Main(string[] args)
{
try
{
var modelBuilder = new ModelTrainer(
... |
using System;
using System.IO;
namespace MonoBrickFirmware.Native
{
internal class AOTHelper
{
public static bool IsFileCompiled (string fileName)
{
return File.Exists(fileName + ".so");
}
public static bool Compile(string fileName){
if (IsFileCompiled(fileName))
File.Delete(new FileInf... |
/**
* @fileOverview The Drone model.
*/
module.exports = function(data) {
this.id = data.id;
this.col = data.col;
this.row = data.row;
this.maxLoad = data.maxLoad;
this.inventory = data.inventory;
};
|
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using DF.EntityFramework;
using DF.Test.SqlCe.DataModels;
namespace DF.Test.SqlCe.CustomiedRepository
{
public class PostRepository : Repository<Post>, IPostRepository
{
public PostRepository(DbContext contex... |
# Showtime | All your favourite tv series in one place
A demo of a tv-shows list. You can search trhough it and rate your favourite ones.
[DEMO](http://gianveracoder.xyz/demos/showtime/)
|
(function($) {
siteHeaderSubMenu = function() {
$(".site-header .web-menu .menu-item-has-children").hover(function () {
$(this).find(".sub-menu").show();
}, function () {
$(this).find(".sub-menu").hide();
});
};
})(jQuery); |
/*
* 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 React, { FunctionComponent } from 'react';
export const Point2PointLa... |
/*
* Copyright 2017-2020 47 Degrees, LLC. <http://www.47deg.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 require... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.darkkilauea.intotheheavens;
/**
*
* @author joshua
*/
public class GameMode
{
public enum State
{
Unknown,
Initialized,
Running,
Paused,
Stopped
}
... |
<!DOCTYPE html>
<html lang="en">
<head>
@include('layout.partials.head')
</head>
<body>
@include('layout.partials.nav')
<div class="py-5 bg-light">
@foreach($answeredQuestions as $questionId => $answers)
<div class="container">
<div class="form-group">
<h2>{{$answers->first(... |
package main
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
// MagicPacket is simple enough that it doesn't require any test
func TestParseArguments(tester *testing.T) {
tester.Run("empty-target", func(t *testing.T) {
_, _, _, err := ParseArguments("", "0:9009", "192.168.0.255:9")
assert.Equ... |
package com.corndog.dataprotocol
import dataprotocol.DataProtocol
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class DataProtocolTest {
val protocol... |
class Solution {
fun canBeEqual(A: IntArray, B: IntArray): Boolean {
return A.sorted() == B.sorted()
}
} |
object Test {
def main(args: Array[String]): Unit = {
val testData = Seq(("blah", Color.Unknown), ("red", Color.Red(10)))
println(testData)
}
} |
program life
! A simple implementation of John Conway's "Game of life"
! The system is im x jm cells and runs for nsteps iterations
! Boundary conditions may be periodic or 'closed'.
implicit none
integer, parameter :: im = 16
integer, parameter :: jm = 16
integer, parameter :: imp1 = im+1
integer, p... |
---
home: true
heroImage: /awesome.png
actionText: 404
actionLink: /notexists/
features:
- title: Foo
details: Foo details
- title: Foo
details: Foo details
- title: Foo
details: Foo details
footer: MIT Licensed
---
Table of content
[[toc]]
# Usage
````bash
# dev server listen on localhost:8080
npm run docs... |
# 月日选择
本例展示:月日UI控件绑定默认数据。
[试一试](http://tinper.org/webide/#/demos/kero/monthdate)
# API
## \# u-meta 属性
* type:`u-monthdate`
u-meta基础api请参考[这里](http://tinper.org/dist/kero/docs/moduleapi.html)
相关内容:
[基础月日控件](http://tinper.org/dist/neoui/plugin/monthdate.html)
|
require 'tempfile'
require 'parallel'
require 'parallel_calabash/version'
require 'parallel_calabash/adb_helper'
require 'parallel_calabash/runner'
require 'parallel_calabash/feature_grouper'
require 'parallel_calabash/result_formatter'
require 'rbconfig'
module ParallelCalabash
WINDOWS = (RbConfig::CONFIG['host_os'... |
module Msf::DBManager::Loot
#
# Loot collection
#
#
# This method iterates the loot table calling the supplied block with the
# instance of each entry.
#
def each_loot(wspace=workspace, &block)
::ActiveRecord::Base.connection_pool.with_connection {
wspace.loots.each do |note|
block.call(note... |
pub use crate::{
drivers::{arm::*, look_at::*, positional::*, smooth::*, yaw_pitch::*},
rig::CameraRig,
};
|
package com.senierr.mortal.domain.setting.vm
import android.app.Application
import android.util.Log
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.viewModelScope
import com.senierr.base.support.arch.StatefulData
import com.senierr.base.support.arch.ext.emitFailure
import com.senierr.base.support.... |
---
id: "_connector_write_"
title: "connector/write"
sidebar_label: "connector/write"
---
## Index
### Functions
* [write](_connector_write_.md#write)
## Functions
### write
▸ **write**(`operations`: [Operation](../interfaces/_diff_operation_.operation.md)[], `config`: Config, `schemaName`: string, `tablePrefix`... |
---
title: 清华软院零字班上网配置
author: 孙子平
date: 2021-01-17T15:49:14Z
category: 配置
tags: [配置]
---
这篇文章是关于清华软院零字班学生上网所需要的配置方案的。
<!-- more -->
::: encrypt encrypted key=lzb owners=sunziping2016
FZEevv0jRNC93NbfX3rJa1tv9kohqbP4Ps4F8+mtNAKWJ6u72lj9QNpz6CVP61kGLMPC48c9espuqiI
wHPLFCpypphBPayIRTAkhoMj+wq3Ln+191Lo8zwHGALPhf62FMQhG... |
<?php
namespace App\Controllers;
use App\Models\ConsModel;
use App\Models\AccountModel;
use App\Models\DepModel;
use CodeIgniter\Controller;
use Google_Service_Oauth2;
class Home extends BaseController
{
protected $loginModel;
protected $prodiModel;
protected $konsModel;
protected $googleAPI;
pu... |
import {NextApiRequest, NextApiResponse} from "next";
import {Config} from "../../../../config";
import fetcher from "../../../../utils/fetcher";
import firebaseDB from "../../../../init/firebase";
export type ChartData = {
data: {
stockValues: Array<number[]>
}
}
export default async (req: NextApiReq... |
#!/usr/bin/perl -w
# This file was preprocessed, do not edit!
package Debconf::FrontEnd::Kde;
use strict;
use utf8;
use Debconf::Gettext;
use Debconf::Config;
BEGIN {
eval { require QtCore4 };
die "Unable to load QtCore -- is libqtcore4-perl installed?\n" if $@;
eval { require QtGui4 };
die "Unable to load QtGui ... |
// Copyright (c) 2018, Gregor Riepl <onitake@gmail.com>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this ... |
/*eslint-env node, es6*/
/*eslint no-unused-vars:1*/
/*eslint no-console:0*/
module.exports = [{
"id": "announcements",
"position": 2,
"hidden": false,
}, {
"id": "syllabus",
"position": 3,
"hidden": false,
}, {
"id": "modules",
"position": 4,
"hidden": false,
}, {
"... |
# irc-message-stream
> A tiny Stream interface for [irc-message](https://github.com/expr/irc-message).
## Installation
`npm install irc-message-stream`
## Usage
```JavaScript
var net = require("net"),
MessageStream = require("irc-message-stream");
var messageStream = new MessageStream;
messageStream.on("line"... |
module AffectedByGravity
GravityFallSpeed = 5
def apply_gravity
unless tile_below?(GravityFallSpeed)
@y += GravityFallSpeed
end
end
end
|
// Copyright (c) 2012 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.
#include "chrome/browser/ui/webui/options2/chromeos/pointer_handler.h"
#include "base/basictypes.h"
#include "base/utf_string_conversions.h"
#include... |
/*
*
* Copyright(c) 2018 VerstSiu
*
* 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 agree... |
from clld.web.maps import LanguageMap as BaseLanguageMap
from clld.web.maps import ParameterMap, Map, FilterLegend
class LanguageMap(BaseLanguageMap):
"""small map on contribution detail page
"""
def __init__(self, ctx, req, eid='map'):
super(LanguageMap, self).__init__(ctx.variety, req, eid=eid)
... |
package cn.navigational.dbfx.kit;
import cn.navigational.dbfx.kit.enums.Clients;
import cn.navigational.dbfx.kit.ex.NotSupportException;
import io.vertx.core.Vertx;
import io.vertx.mysqlclient.MySQLConnectOptions;
import io.vertx.mysqlclient.MySQLPool;
import io.vertx.pgclient.PgConnectOptions;
import io.vertx.pgclien... |
using System.Linq;
using System.Web.Mvc;
using Casper.Mvc.Models;
namespace Casper.Mvc.Controllers
{
//Disclaimer, this is DEMO code and should not be used in production!
// If you do please do not accreditate me
// No honestly don't...
public class AccountController : Controller
{
pub... |
from microbit import *
obj = {
"key": "val"
}
arr = [
'a',
'b'
]
def show_num(num):
if 1 + 1 == 2 and 2 + 2 == 4 or 3 + 3 == 6 \
and 3 - 3 == 0 and 'this is nonsense' == 'this is nonsense':
print('Hello')
text = """
This should survive
"""
i = Image()
... |
#coding=utf-8
import sys
import os
path = os.path.split(os.path.realpath(__file__))[0]
sys.path.append(path+"/../src")
from common.zk import *
from common.util import *
zk = ZK(CONF.zk_address)
root = zk.get_node(CONF.root)
if root:
root.delete()
zk.create_node(CONF.task_path)
host = zk.create_node(CONF.host_path)... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Backdrop : MonoBehaviour
{
public GameObject prefab = null;
public int resolutionX = 10;
public int resolutionY = 10;
public float size = 5f;
private void Awake()
{
for (int y = 0; y < resolutionY; y++)
for (int x ... |
using System.Collections.Generic;
using System.Net.Mime;
using System.Threading;
using System.Threading.Tasks;
using API.Routes;
using API.Services.Interfaces;
using Ardalis.ApiEndpoints;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
namespace API.Endpoints.Blobs;
[Route(BlobRoutes.List)]... |
# frozen_string_literal: true
RSpec.describe "repository plugin" do
include_context "repository / database"
include_context "relations"
include_context "seeds"
include_context "repo"
let(:nullify_plugin) do
Module.new do
def self.apply(target, **)
target.prepend(self)
end
def ... |
import {IsEmail} from '../../../../src/decorators/validate/IsEmail';
import {Required} from '../../../../src';
export class ValidEMail {
// detect by reflactions
@IsEmail()
mail: string;
@IsEmail({message: 'something else should happen for field %propertyName'})
mailOtherMessage: string;
}
export class ... |
import type { DefaultTheme } from 'styled-components';
import {
defaultLightTheme,
LIGHT_GRAY_300,
LIGHT_GRAY_600,
BLACK,
} from '../lightThemeDefault';
const SECONDARY_200 = '#285e28';
const SECONDARY_300 = 'rgba(75, 219, 75, 0.1)';
const SECONDARY_400 = '#4BDB4B';
const SECONDARY_500 = '#36a337';
const SECON... |
import { isFunction } from '@redesign-system/theme'
import { FormRadioInterface } from './formRadio.types'
export function formRadioTheme(props: FormRadioInterface) {
const {
theme: { FormRadio },
} = props
return {
position: 'relative',
...(isFunction(FormRadio) ? FormRadio(props)?.default : FormRa... |
@php
$aboutme = get_field('personal_info');
@endphp
<section class="section section-about">
<div class="container">
<div class="row justify-content-between">
<div class="col-lg-4 mb-3 mb-lg-0">
<div class="about-img-frame">
<div class="about-img">
@if ($aboutme['personal_im... |
package net.dinkla.raytracer.math
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Assertions.*
internal class Point2DTest {
private val p = Point2D(1.0, 2.0)
@Test
fun `add a vector`() {
val v = Vector2D(-1.0, -2.0)
assertEquals(Point2D.ORIGIN, p + v)
}
@Test
... |
package chapter7
import io.reactivex.Observable
fun main(args: Array<String>) {
val publisher = Observable.create<Int> {
for (i in 1..10_000) {
it.onNext(i)
}
}
publisher.subscribe {
println("S1 $it")
}
publisher.subscribe {
println("S2 $it")
}
... |
package main
import (
"flag"
"github.com/serverless-ss/slss"
log "github.com/sirupsen/logrus"
)
var (
configFilePath string
)
func main() {
flag.StringVar(&configFilePath, "c", "./config.json", "path to the configuration file")
flag.Parse()
config, err := slss.LoadConfig(configFilePath)
if err != nil {
s... |
###
# Copyright (c) 2015, Upnext Technologies Sp. z o.o.
# All rights reserved.
#
# This source code is licensed under the BSD 3-Clause License found in the
# LICENSE.txt file in the root directory of this source tree.
###
module KontaktIo
module Resource
#
# Kontakt.io Beacon object
#
class Venue ... |
namespace codingfreaks.blogsamples.MvvmSample.Ui.TestConsole
{
using System;
using System.ComponentModel;
using System.Linq;
internal class Program
{
#region methods
private static void Main(string[] args)
{
TestPropertyChanged();
Console.ReadKey();... |
# SocialPsychologyOverview
## 背景:
社会心理学是心理学的重要分支,有大量大牛和高阶模型出没;
在微信、抖音等大热的app中,也有大量社会心理学的应用;
做这个项目能获得阳老师亲自指导,还有和“行为分析”课程进行横向对比,获得高质量压力测试的机会。
## 项目初步思路:
1. 通过通识读本获得时空大框架;
2. 定位领域大牛及其贡献;
3. 积累领域内高阶模型及其商业领域的实际应用;
## 项目目标:
1. 完成一份结业报告;
2. 完成一份ppt,并参加路演。
## 协作方式:
1. 信息积累和流通,通过Github issue;
2. 项目进度,通过Github Project看板;
3. ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.