language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Swift | UTF-8 | 3,178 | 2.78125 | 3 | [
"MIT"
] | permissive | //
// RestAPIRequest.swift
// Jarvis
//
// Created by Jianguo Wu on 2018/10/25.
// Copyright © 2018年 wujianguo. All rights reserved.
//
import Foundation
enum RestAPIError: Error {
case serverError(Int, String)
case networkError(Int, String)
case defaultError
}
protocol RestAPIResponseProtocol: Decod... |
TypeScript | UTF-8 | 1,339 | 3.0625 | 3 | [] | no_license | import { CharacterState, CharacterActionTypes } from "./types";
import * as types from "./constants";
const initialState: CharacterState = {
info: null,
characters: null,
loading: true,
error: false,
error_message: null
};
export function characterReducer(
state = initialState,
action: CharacterActionTy... |
PHP | UTF-8 | 652 | 2.734375 | 3 | [
"Unlicense"
] | permissive | <?php
namespace BitWasp\Bitcoin\Serializer\Transaction;
use BitWasp\Bitcoin\Transaction\TransactionInterface;
use BitWasp\Buffertools\BufferInterface;
use BitWasp\Buffertools\Parser;
interface TransactionSerializerInterface
{
/**
* @param Parser $parser
* @return TransactionInterface
*/
public... |
TypeScript | UTF-8 | 1,781 | 2.953125 | 3 | [] | no_license | import { Bet } from './bet';
import { BetPlacedEvent } from './bet-placed-event';
import { BetResultEvent } from './bet-result-event';
export class BetList {
bets: Bet[] = [];
newBet(): Bet {
let bet = new Bet();
this.bets.unshift(bet);
return bet;
}
confirmBet(id: number, bet... |
Java | UTF-8 | 479 | 1.96875 | 2 | [] | no_license | package sharedclasses;
public class Constants {
public static final Integer DEFAULT_SERVER_PORT = 1337;
public static final Integer DEFAULT_SLEEP_TIME = 500;
public static final Integer DEFAULT_MAX_COUNT_CLIENTS = 20;
public static final String MESSAGE = "message";
public static final String DISC... |
Java | UTF-8 | 501 | 2.15625 | 2 | [] | no_license | package com.dmto.response;
import com.dmto.request.Request;
/**
* Created by ankitkha on 14-Dec-15.
*/
public interface ISendReceiveResponse {
/**
* When a person from WITH_VEHICLE category has accepted request of a PEDESTRIAN.
* Server will send a response
* @param response
*/... |
JavaScript | UTF-8 | 9,969 | 3.03125 | 3 | [] | no_license | /* JpnNumText 2016.11.26
* Coded by Raymai97
* Ported from C# for modern JS
*/
/* make this usable on outdated browser */
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(key, index) {
index = index || 0;
return this.indexOf(key, index) === index;
}
}
if (!String.prototyp... |
Python | UTF-8 | 1,575 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | from selenium.webdriver.common.by import By
class SessionHelper:
def __init__(self, app):
self.app = app
def login(self, username, password):
browser = self.app.browser
self.app.open_home_page()
browser.find_element(By.NAME, "username").clear()
browser.find_element(By... |
C++ | UTF-8 | 9,055 | 3.140625 | 3 | [] | no_license | #include <algorithm>
#include <set>
#include <string>
#include <vector>
#include "bitvec.hpp"
#include "gtest/gtest.h"
using namespace std;
string binstring(uint64_t value, size_t len) {
string res;
do {
uint64_t rem = value % 2;
char ch = (rem == 0) ? '0' : '1';
res.push_back(ch);
value /= 2;
... |
Java | UTF-8 | 492 | 2.21875 | 2 | [
"Apache-2.0"
] | permissive | package org.concordion.ext.selenium;
import org.concordion.ext.translator.MessageTranslator;
public final class SeleniumExceptionMessageTranslator implements MessageTranslator {
@Override
public String translate(String originalMessage) {
int webDriverDebugInfoStart = originalMessage.indexOf("Build inf... |
Shell | UTF-8 | 106 | 2.640625 | 3 | [] | no_license | #!/bin/bash
# Ankit Hriday
username=$1
password=$2
echo "Username is $username"
echo "Password is $password" |
C# | UTF-8 | 3,734 | 3.53125 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Task03
{
class TableBuilder
{
private const int defaultLength = 40;
public static void BuildBy2DArr<T>(T[,] arr)
{
int maxArrLength = arr.GetLength(... |
Markdown | UTF-8 | 1,385 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | # `zed` Python Package
The `zed` Python package provides a client for the REST API served by
[`zed lake serve`](../../cmd/zed/lake#serve).
## Installation
Install the latest version like this:
```sh
pip3 install "git+https://github.com/brimdata/zed#subdirectory=python/zed"
```
Install the version compatible with a ... |
Markdown | UTF-8 | 14,419 | 2.78125 | 3 | [] | no_license | <p data-nodeid="3032" class="">你好,我是莫敏。自 2006 年开始接触敏捷,到 2010 年参与组织每年一届的敏捷大会,再到 2012 年加入腾讯先后从事项目管理和产品管理工作,可以说从过去到现在,我一直身处敏捷实践的前线,对于敏捷理论如何有效地在公司落地有切实的体会和认识。</p>
<p data-nodeid="3033">而无论是在腾讯帮助游戏工作室、游戏研发部与安全中心进行效率提升,还是后来通过敏捷导入工作帮助上百家企业(如腾讯、平安、华润)的产研团队完成业绩和效率的双向提升,这些经历都让我发现:<strong data-nodeid="3098">只要你工作中涉及协作,就一定需要项目管理能力... |
JavaScript | UTF-8 | 5,228 | 2.796875 | 3 | [
"MIT"
] | permissive | var wholenoteImg = document.getElementById("wholenoteImg");
var halfnoteImg = document.getElementById("halfnoteImg");
var quarternoteImg = document.getElementById("quarternoteImg");
var eightnoteImg = document.getElementById("eightnoteImg");
var sixthnoteImg = document.getElementById("sixthnoteImg");
var footstepsImg =... |
C++ | UTF-8 | 1,085 | 2.546875 | 3 | [
"MIT"
] | permissive | #include <prox_gui_widget.h>
#include <QApplication>
#include <QDesktopWidget>
#include <QtOpenGL/QGLFormat>
#include <cstring>
int main(int argc, char *argv[])
{
int fullscreen = -1;
for (int i = 0; i < argc && fullscreen != 0; ++i)
{
fullscreen = strcmp(argv[i], "--fullscreen");
}
QApplication ... |
Java | UTF-8 | 2,145 | 2.375 | 2 | [] | no_license | package com.example.listtutorial;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.LinearLayoutMa... |
C | UTF-8 | 257 | 2.734375 | 3 | [
"MIT"
] | permissive | #include <lib.h>
void
mmemset(void *pp, int v, int sz)
{
char *p = (char *)pp;
while (sz-- > 0)
*p++ = v;
}
void
mmemcpy(void *dd, const void *ss, int sz)
{
char *d = (char *)dd;
const char *s = (const char *)ss;
while (sz-- > 0)
*d++ = *s++;
}
|
Markdown | UTF-8 | 1,165 | 2.609375 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Interview questions for Swift"
date: 2010-05-23
categories: iOS, developer
comments: true
published: false
---
At the end of the interview they gonna ask you "Do you have any questions for me?"
What do you ask?
Ask about their technology stack. is there more obj C code or swift? any back ... |
C | UTF-8 | 3,040 | 2.765625 | 3 | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | /* megablastInfo.h was originally generated by the autoSql program, which also
* generated megablastInfo.c and megablastInfo.sql. This header links the database and
* the RAM representation of objects. */
/* Copyright (C) 2009 The Regents of the University of California
* See README in this or parent directory f... |
Java | UTF-8 | 2,596 | 3.390625 | 3 | [] | no_license | package practica1;
import java.util.ArrayList;
import java.util.Scanner;
public class Practica1 {
public static void main(String[] args) {
// TODO code application logic here
Scanner entrada = new Scanner(System.in);
int seleccion;
int numero_cel=0;
boolean s... |
C# | UTF-8 | 786 | 2.65625 | 3 | [] | no_license | using Facade.Class;
namespace Facade
{
public class Facade
{
readonly SubsistemaUm subsistemaUm;
readonly SubsistemaDois subsistemaDois;
readonly SubsistemaTres subsistemaTres;
public Facade()
{
subsistemaUm = new SubsistemaUm();
subsistemaDois ... |
Java | UTF-8 | 4,234 | 2.859375 | 3 | [] | no_license | package data.manager;
import data.entity.Customer;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import sample.ui.SystemHelper;
import java.sql.*;
public class CustomerManager
{
private SystemHelper systemHelper = new SystemHelper();
public ObservableList<Customer> getAl... |
Ruby | UTF-8 | 320 | 2.953125 | 3 | [] | no_license | require "minitest/autorun"
require_relative "../../lib/1/max_profit.rb"
# SESSION
# 1
describe "#max_profit" do
it "returns the maximum profit" do
assert_equal(5, max_profit([7, 1, 5, 3, 6, 4]))
end
it "returns 0 if profit cannot be made" do
assert_equal(0, max_profit([7, 6, 5, 4, 3, 2, 1]))
end
end
|
Java | UTF-8 | 1,113 | 2.28125 | 2 | [] | no_license | package com.ycl.fileselector.ui.preview.audio;
import androidx.fragment.app.Fragment;
public class BaseFragmentJudgeVisible extends Fragment {
protected boolean mIsVisibleToUser;
private String TAG="";
@Override
public void onStart() {
super.onStart();
if (mIsVisibleToUser) {
... |
C++ | UTF-8 | 1,780 | 2.796875 | 3 | [] | no_license | #define DEBUG
#ifdef DEBUG
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <map>
#include <unordered_set>
using namespace std;
struct ListNode {
int val;
ListNode *next;... |
C# | UTF-8 | 1,473 | 2.890625 | 3 | [] | no_license | using RomController;
using ShComp;
using System;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RomPointChecker
{
class Program
{
static void Main(string[] args)
{
RunAsync().Wait();
}
private static async Task RunAsync()
... |
Java | UTF-8 | 981 | 1.929688 | 2 | [] | no_license | package com.resto.brand.web.service;
import java.util.List;
import com.resto.brand.core.generic.GenericService;
import com.resto.brand.web.model.Permission;
/**
* 权限 业务接口
*
* @author StarZou
* @since 2014年6月10日 下午12:02:39
**/
public interface PermissionService extends GenericService<Permission, Long> {
/*... |
Python | UTF-8 | 628 | 3.109375 | 3 | [] | no_license | from math import sqrt
from drawtraj import drawtraj
def force(x,y,m,mstar):
r2=x**2+y**2
r32=r2*sqrt(r2)
fx=-x*m*mstar/r32
fy=-y*m*mstar/r32
return fx,fy
def integrate(x,y,vx,vy,fx,fy,m,dt):
ax, ay = fx/m, fy/m
vx += ax*dt
vy += ay*dt
x += vx*dt
y += vy*dt
return x, y, vx, vy... |
Java | UTF-8 | 1,159 | 2.015625 | 2 | [] | no_license | package com.ca.arcflash.ui.client.model;
import com.extjs.gxt.ui.client.data.BaseModelData;
public class SearchContextModel extends BaseModelData {
/**
*
*/
private static final long serialVersionUID = -3977798498329806405L;
public Long getContextID() {
return (Long)get("contextID");
}
public void setCo... |
Swift | UTF-8 | 1,366 | 2.59375 | 3 | [
"MIT"
] | permissive | //
// DeepLinkFactory.swift
// UalaNavigationEngine
//
// Created by Miguel Olmedo on 10/08/21.
//
import Foundation
import CoreLocation
public class DeepLinkFactory {
let scheme: String
let host: String
public init(scheme: String, host: String) {
self.scheme = scheme
self.hos... |
Java | GB18030 | 2,613 | 3.40625 | 3 | [] | no_license | package server;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
/**
* Ϸķ
* @author ZhuYingtao
*
*/
public class GameChatServer implements Runnable {
/**
* Ķ˿ں
*... |
Java | UTF-8 | 1,256 | 2.34375 | 2 | [] | no_license | package failure_detector;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.Date;
import java.util.TimerTask;
import failure_detector.data.Counter;
import failure_detector.data.FD;
import failure_detector.int... |
Swift | UTF-8 | 2,776 | 2.875 | 3 | [
"MIT"
] | permissive | //
// View.swift
// Katana
//
// Copyright © 2016 Bending Spoons.
// Distributed under the MIT License.
// See the LICENSE file for more information.
import UIKit
import KatanaUI
import Katana
public extension View {
public struct Props: NodeDescriptionProps, Childrenable, Buildable {
public var frame = CG... |
Java | UTF-8 | 1,749 | 2.59375 | 3 | [] | no_license | package Logiikka.Generointi;
import Logiikka.Ruudukko.Ruudukko;
import Logiikka.Ruudukko.Ruutu;
/**
* Olio on vastuussa Luolapelin koko kerroksen kaikesta tiedosta ja sen
* käsittelystä.
*
* @author htommi
*/
public class Kerros {
private Ruudukko ruudukko;
private AluePuu ap;
/**
* Luo uuden ... |
SQL | UTF-8 | 2,026 | 3.109375 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS buhodb.delete_smartphone_with_imei;
CREATE DEFINER=`root`@`%` PROCEDURE `delete_smartphone_with_imei`(IN p_imei VARCHAR(255))
BEGIN
DELETE from positions WHERE device_id in (select id from device where imei = p_imei);
DELETE from positions_buffer WHERE device_id in (select id from devic... |
C++ | UTF-8 | 605 | 3.046875 | 3 | [] | no_license | /*
演習1-4 コンソールに名前を改行して出力すること
作成日 2017.5.4
作成者 平澤敬介
*/
// 入出力のヘッダ
#include<iostream>
// 名前空間の指定
using namespace std;
// プログラム本文 始まり これ以降の文が順次実行されていく
int main()
{
// コンソールに改行して出力
// 名前が一文字流れて一句ごとに改行文字が
// 流れていきコンソールに表示されるとき縦に表示されます。
cout << "平\n澤\n敬\n介\n";
return 0;// プログラム終了
} // プログラム本文 終わり
|
TypeScript | UTF-8 | 10,125 | 3.6875 | 4 | [
"MIT"
] | permissive | import { Common } from "../CommonUtils";
import { Point, ImmutablePointPrimitive, isPointPrimitive } from "./Point";
export type RectanglePrimitive = {
x: number,
y: number,
width: number,
height: number,
}
function isRectangle(o: any): o is RectanglePrimitive {
const {x,y,width,height} = o;
return [x,y,w... |
Java | UTF-8 | 30,614 | 1.578125 | 2 | [] | no_license | package com.richitec.chinesetelephone.assist;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.app.AlertDialog;
import android.content.Context;
import android.c... |
Java | UTF-8 | 6,368 | 2.28125 | 2 | [] | no_license | package org.cruxframework.test.cruxtestwidgets.client;
import java.util.Date;
import org.cruxframework.crux.core.client.controller.Controller;
import org.cruxframework.crux.core.client.controller.Expose;
import org.cruxframework.crux.core.client.ioc.Inject;
import org.cruxframework.crux.core.client.rest.Ca... |
Java | UTF-8 | 1,512 | 2.6875 | 3 | [] | no_license | package redgear.core.block;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemBlock;
import redgear.core.util.StringHelper;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relau... |
Java | UTF-8 | 1,065 | 3.203125 | 3 | [] | no_license | package hr.fer.zemris.java.gui.layouts;
/**
* This class represents constraints for the costum layout manager.
*
* @author Lovro Marković
*
*/
public class RCPosition {
/**
* Row position.
*/
private int row;
/**
* Column position.
*/
private int column;
/**
* Constructor. ... |
Java | UTF-8 | 1,416 | 2 | 2 | [] | no_license | package com.pj.keycloak.model;
import java.io.Serializable;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistenc... |
TypeScript | UTF-8 | 360 | 2.5625 | 3 | [] | no_license | import { Pipe, PipeTransform } from '@angular/core';
import { IUsuario } from '../clases/usuario';
@Pipe({
name: 'tipo'
})
export class TipoPipe implements PipeTransform {
transform(lista: IUsuario[], tipo: string): IUsuario[] {
if(tipo == 'todos'){
return lista;
} else {
return lista.filter(i... |
C++ | UTF-8 | 1,186 | 2.875 | 3 | [] | no_license |
#include <iostream>
using namespace std;
#include <cmath>
#include <math.h>
void displayArray(int x[], int n);
void merge(int A[], int l, int m, int r);
void mergeSort(int A[], int p, int r);
int main() {
//int x[] = {5,3,2,5,1,6,3,6,2,3,5,5123,1,3,989,1,1,5,2,3,3,15,1,13,123,5123,512,3512,36,1236,1236,123,12351};... |
C# | UTF-8 | 1,506 | 2.578125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
namespace VK_Music
{
class DownloadClient
{
public DownloadClient(CheckedListBox.CheckedIndexCollection _collect, string _patch)
{
... |
Go | UTF-8 | 4,954 | 3.09375 | 3 | [
"MIT"
] | permissive | package packetio
import (
"bufio"
"errors"
"fmt"
"io"
"log"
"net"
"os"
"sync"
)
var consoleLog = log.New(os.Stdout, "[packetio] ", log.LstdFlags)
// DEBUG is switcher for debug
var DEBUG = false
const (
defaultReaderSize int = 8 * 1024
maxPayloadLen int = 1<<24 - 1
)
// Error Code
var (
ErrBadConn =... |
Java | UTF-8 | 749 | 2.125 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package yucroq.entity;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.*;
import lombok.*;
@Entity
// Lo... |
C | ISO-8859-1 | 3,356 | 2.6875 | 3 | [
"MIT"
] | permissive | //
// POV (Persistence of Vision)
//
// (C) 2015, Daniel Quadros
//
// ----------------------------------------------------------------------------
// "THE BEER-WARE LICENSE" (Revision 42):
// <dqsoft.blogspot@gmail.com> wrote this file. As long as you retain this
// notice you can do whatever you want with th... |
JavaScript | UTF-8 | 783 | 2.6875 | 3 | [] | no_license | const PropsMap = {
children: "innerHTML"
}
const Events = {
SUBMIT: "submit",
CLICK: "click"
}
function addListeners(el, events) {
Object.keys(events).forEach(e => {
el.addEventListener(e, events[e])
})
}
function createElement(type, props = {}, events = {}) {
const el = document.createElement(type);... |
C++ | UTF-8 | 2,397 | 3.71875 | 4 | [] | no_license | #include <iostream>
#include<iomanip>
#include<fstream>
#include<vector>
#include<cstdlib>
#include<string>
#include<algorithm>
void ShowStr(const std::string & str) { std::cout << str << std::endl; }
using vstr = std::vector<std::string>;
std::ifstream & GetStrs(std::ifstream & fin, vstr &vistr);
class Store
{
char ... |
PHP | UTF-8 | 432 | 2.65625 | 3 | [] | no_license | <?php
session_start();
require_once "pdo.php";
require_once "validation.php";
if (isset($_REQUEST['term']))
{
$stmt = $pdo->prepare('
SELECT name FROM Institution
WHERE name LIKE :prefix'
);
$stmt->execute([
':prefix' => $_REQUEST['term']."%"
]);
$retval = [];
while ( $row = $stmt->fetch(P... |
Java | UTF-8 | 6,099 | 2.015625 | 2 | [] | no_license | package hw5.servlet;
import hw5.model.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Http... |
Markdown | UTF-8 | 254 | 2.5625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Hello World
description: First blog post.
comments: true
---
#### Intro
A blog seemed like a good way to keep track of ideas and share knowledge I might gain in the process of building things, so here we are. Hope this goes well! |
Python | UTF-8 | 1,573 | 3.84375 | 4 | [] | no_license | #
# @lc app=leetcode.cn id=94 lang=python3
#
# [94] 二叉树的中序遍历
#
# https://leetcode-cn.com/problems/binary-tree-inorder-traversal/description/
#
# algorithms
# Medium (75.28%)
# Likes: 930
# Dislikes: 0
# Total Accepted: 409.1K
# Total Submissions: 543.4K
# Testcase Example: '[1,null,2,3]'
#
# 给定一个二叉树的根节点 root ,返回... |
Go | UTF-8 | 1,228 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | package main
import (
"html/template"
"log"
"net/http"
)
func main() {
templates := populateTemplates()
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
requestedFile := req.URL.Path[1:]
t := templates.Lookup(requestedFile + ".html")
if t != nil {
err := t.Execute(w, nil)
if err... |
Python | UTF-8 | 1,342 | 2.734375 | 3 | [] | no_license | from datetime import datetime, timedelta
from django import template
register = template.Library()
@register.filter
def format_date(value):
def get_hours(hours):
return {
hours == 0 or 5 <= hours <= 20: 'часов',
hours == 1 or hours == 21: 'час',
2 <= hours <= 4 or 22 ... |
PHP | UTF-8 | 3,308 | 2.546875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = $_GET['a'];
$password = $_GET['b'];
$dbname = $_GET['c'];
$id = $_GET['id'];
$cliente = $_GET['cli'];
$fyear = $_GET['year'];
$fmonth = $_GET['mes'];
$fday = $_GET['day'];
$dtos = $_GET['desc'];
$notas = $_GET['nota'];
$guardar = $_GET['save'];
$tabla = "Albaran";
$separado... |
Markdown | UTF-8 | 1,319 | 2.734375 | 3 | [
"CC-BY-3.0",
"CC-BY-4.0"
] | permissive | ---
layout: event
title: 2018
timespan: April 2018
---
“I’ve been back in Toronto for four days now, but the Writers in the Woods festival at the Canadian Ecological Centre in Mattawa still runs in my veins. The generosity I found there—from the pro organizers, from the CEC staff, from the community who came to the ev... |
PHP | UTF-8 | 776 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>WinsVideo - Realtime Stats</title>
<meta http-equiv="refresh" content="1">
</head>
<body>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto:300&display=swap');
div {
font-family: 'Roboto', sans-serif;
font-weight: 300;
color: #455a64;
... |
Swift | UTF-8 | 1,060 | 2.765625 | 3 | [] | no_license | //
// CustomTableViewCell.swift
// Project4
//
// Created by Dimas on 15/08/21.
//
import UIKit
class CustomTableViewCell: UITableViewCell {
@IBOutlet weak var websiteLabel: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
contentView.layer.cornerRadius = 10
contentView.layer.masksT... |
Java | UTF-8 | 2,434 | 1.820313 | 2 | [] | no_license | package com.mobisoft.library;
public class Constants {
public static final String RELEASE = android.os.Build.VERSION.RELEASE;
public static final String MODEL = android.os.Build.MODEL;
public static final String OS_SYSTEM = "android";
/** APP 版本号,版本名称 */
public static String VERSION_NAME = "";
/** APP 版本号,数字 *... |
Python | UTF-8 | 163 | 3 | 3 | [] | no_license | m,p=map(int,input().split())
l2=list(map(int,input().strip().split()))[:m]
for i in range(0,m):
if(l2[i]==p):
print("yes")
break
else:
print("no")
|
Python | UTF-8 | 3,745 | 3.375 | 3 | [
"Apache-2.0"
] | permissive | """Parse data in the format:
Age Uncertainty
Sample data assumning a normal distrubtion with mean defined by Age and sigma
defined by Uncertainty
"""
import numpy as np
from scipy.stats import norm
from QuakeRates.dataman.event_dates import EventDate, EventSet
def parse_age_sigma(filename, sigma_level, event_order, ... |
Python | UTF-8 | 1,729 | 3.828125 | 4 | [] | no_license | """Input buffer implementation"""
class InBuffer:
def __init__(self, in_file=None, data=None):
"""Initialize in_buffer with either file content or bytes array"""
self.buffer = None
if in_file is not None:
with open(in_file, "rb") as inp:
self.buffer = inp.read(... |
Java | UTF-8 | 1,439 | 1.898438 | 2 | [] | no_license |
package com.hrdb.service;
// Generated 7 Oct, 2014 3:41:51 PM
import java.util.HashMap;
import java.util.Map;
import java.util.Collections;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframewo... |
Python | UTF-8 | 861 | 2.65625 | 3 | [] | no_license | from input_handler import parse_input, validate_input, parse_obstacle_file
from graph_handler import find_path, construct_free_space_graph, validate_source_point, validate_target_point
from output_handler import write_output
if __name__ == "__main__":
# handle input
sx, sy, sz, dx, dy, dz, filename = parse_inp... |
Python | UTF-8 | 921 | 3 | 3 | [] | no_license | def equation_system(b, time_linspace):
"""
The ordinary system of equations that will be solved in order to determine
the position of the molecule based on the b-field.
@type b: float (bfield)
@type t: Numpy linspace
@type: List (change of bfield over time)
"""
xt, yt, zt, vxt,... |
Go | UTF-8 | 546 | 3.375 | 3 | [] | no_license | package preprocess
import (
"regexp"
"strings"
)
type removeStopWordsProcessor struct {
stopWords *regexp.Regexp
}
func createRemoveStopWordsProcessor(stopwords []string) Preprocessor {
stopWordsReg := regexp.MustCompile(strings.Join(stopwords, "|"))
return &removeStopWordsProcessor{stopWordsReg}
}
func (p *re... |
C# | UTF-8 | 11,932 | 2.53125 | 3 | [] | no_license | using JetBrains.Annotations;
using System.Collections.Generic;
using UnityEditorInternal;
using UnityEngine;
using UnityEngine.Events;
//By Seth
//
//A Trick is a class that holds a lot of information about each individual Trick. This information is set in the inspector.
//
//A TrickStep is one of the steps that is r... |
Java | UTF-8 | 2,154 | 3.8125 | 4 | [] | no_license | package chapter02_Basics;
public class P2_2_VarAndConst {
public static void main(String[] args) {
int x; // объявление переменной
x = 10; // присвоение значения
System.out.println(x); // 10
int a = 10; // объявление и инициализация переменной
System.out.print... |
C++ | UTF-8 | 4,797 | 2.59375 | 3 | [] | no_license | #include <network/EasyWifiManager.h>
using namespace std;
EasyWifiManager::EasyWifiManager(){
// Default MQTT values for WifiManager configuration portal
strcpy(mqtt_server, DEFAULT_MQTT_SERVER);
strcpy(mqtt_port, DEFAULT_MQTT_PORT);
strcpy(mqtt_user, DEFAULT_MQTT_USER);
strcpy(mqtt_passw... |
JavaScript | UTF-8 | 2,697 | 2.8125 | 3 | [] | no_license | import React from 'react';
const currentTechnologies = [
"html", "css", "javascript", "sass", "react", "redux", "php", "node", "laravel", "java", "android", "gitlab", "github",
"mysql", "mongodb"
]
class Tech extends React.Component {
constructor(props) {
super(props);
this.state = {
... |
C | UTF-8 | 238 | 3.640625 | 4 | [] | no_license | /* EXOR OF TWO NUMBER W/O USING ^ OPERATOR'*/
#include<stdio.h>
#define EXOR_NUMBER(X,Y) (~X & Y)|(X & (~Y))
int main()
{
int a,b;
printf("enter the number\n");
scanf("%d%d",&a,&b);
printf("exor_number:%d\n",EXOR_NUMBER(a,b));
}
|
C++ | UTF-8 | 1,289 | 3.171875 | 3 | [] | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
// DFS
class Solution0 {
public:
int scoreOfParentheses(string S) {
int i = 0;
return dfs(S, i);
}
int dfs(const string& s, int& i) {
int res = 0;
while (i < s.size()) {
... |
C++ | UTF-8 | 752 | 3.109375 | 3 | [] | no_license | #include <iostream>
#include <dlfcn.h>
#include "h1.h"
#include "sanpa.h"
using namespace std;
int main(int argc, char **argv){
cout<<"Hello world"<<endl;
cout<<"Starting uses of a dynamic library"<<endl;
void* handle = dlopen("sanpa.dll", RTLD_LAZY);
sanpa* (*create)();
void (*destroy)(sanpa*);
... |
Python | UTF-8 | 758 | 2.703125 | 3 | [] | no_license | import mysql.connector as connector
class SQLConnector:
def __init__(self, data=None):
self.data = data
connection_ = {"host": "192.168.43.65",
"user": "pacuser",
"password": "pacuser"
}
self.connection = connector.connec... |
C++ | UTF-8 | 391 | 4.25 | 4 | [] | no_license | //Write a program to read two numbers from the keyboard and display the larger value on the screen
#include<iostream>
using namespace std;
int main(){
int num1, num2, max;
cout << "Enter two numbers:" << endl;
cin >> num1 >> num2;
max = (num1 > num2) ? num1 : num2;
cout << "The largest between "... |
Java | UTF-8 | 488 | 1.976563 | 2 | [] | no_license | package com.spc.schedule.job.count;
import com.spc.schedule.job.JobHelper;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;
/**
* 实现Job接口
* @author yvan
*
*/
@Component
public class ItemsCountJob implements Job{... |
Java | SHIFT_JIS | 10,257 | 3.078125 | 3 | [] | no_license | package game;
import game.TheBoard;
import game.TheMove;
import game.TheMove.DIRECTION;
import org.junit.Assert;
import org.junit.Test;
public class TheBoardTest {
/**
* {[hړ̃eXg
*NGp^[1:iǁjɈړ
* NGp^[2:̃ubN̏ꏊɈړ
* OKp^[FĂꏊ
* ꂼeXg܂B
* OKp^[̎́AƑzʂ̈ʒuɈړoĂ邩mF܂B
* @author works
*/
@Test
... |
Java | UTF-8 | 7,894 | 1.890625 | 2 | [] | no_license | package com.example.gpstrackerapp;
import android.os.Bundle;
import android.view.MenuItem;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentTransaction;
import com.example.gpstrackerapp.ui.AccountFragment;
i... |
Java | UTF-8 | 352 | 1.804688 | 2 | [] | no_license | package com.app.dao.impl;
import org.springframework.stereotype.Repository;
import com.app.dao.VilleDao;
import com.bo.Ville;
import com.genericdao.impl.HibernateSpringGenericDaoImpl;
@Repository
public class VilleDaoImpl extends HibernateSpringGenericDaoImpl<Ville, Long> implements VilleDao{
public VilleDaoImpl() ... |
Java | UTF-8 | 663 | 3.0625 | 3 | [] | no_license | package Composite.EX2;
import java.util.ArrayList;
import java.util.List;
public class Folder extends SystemFIle {
private List<SystemFIle> systemFIles = new ArrayList<>();
public Folder(String systemFileName) {
super(systemFileName);
}
@Override
public void browse() {
super.bro... |
C++ | UTF-8 | 704 | 2.96875 | 3 | [] | no_license | #define PIN_ANALOG_RAIN_SENSOR A7 // Entrada analógica para la señal del sensor lluvia
#define PIN_DIGITAL_RAIN_SENSOR 21 // Entrada digital para la señal del sensor de lluvia
void setup(){
Serial.begin(9600);
}
void loop(){
int sensorValue = analogRead(PIN_ANALOG_RAIN_SENSOR); // Leer datos del puerto analóg... |
Python | UTF-8 | 4,055 | 2.734375 | 3 | [] | no_license | class BankData:
def __str__(self):
return "{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t".format(self.age,
self.job,
... |
Java | UTF-8 | 2,387 | 2.296875 | 2 | [] | no_license | package br.com.oak.webly.authentication;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.BadCredentialsException;
import org.s... |
Java | UTF-8 | 3,007 | 2.390625 | 2 | [] | no_license | package com.homer.fantasy.dao.impl;
import com.homer.fantasy.MinorLeagueDraftPick;
import com.homer.fantasy.Team;
import com.homer.fantasy.dao.HomerDAO;
import com.homer.fantasy.dao.IMinorLeagueDraftPickDAO;
import org.hibernate.Session;
import org.hibernate.criterion.Example;
import org.hibernate.criterion.Restrictio... |
Java | UTF-8 | 7,760 | 2.765625 | 3 | [
"CC0-1.0"
] | permissive | import java.io.File;
import java.util.BitSet;
import java.util.Scanner;
public class MainClass
{
public static String[] wordsStr;
public static String[] wordsStrPart;
public static String[] wordsStrTotal;
public static int[] trainInts;
public static String train;
public static short[][] coocFreqArr;
public stat... |
PHP | UTF-8 | 724 | 2.765625 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\Profile;
use App\Models\Post;
class PostSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$profile = Profile::find(1);
$post = new Post;
... |
Python | UTF-8 | 1,062 | 3.4375 | 3 | [] | no_license | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#Created by Chukwunyere Igbokwe on December 29, 2016 by 10:31 PM
def romanToInt( s):
roman_dict = {'I':1, 'V':5, 'X':10, 'L':50, 'C':100, 'D':500, 'M':1000}
roman_ixc = {'I':5, 'X':50, 'C':500}
value = 0
for i in reversed(s):
if i in roman_ixc and v... |
C# | UTF-8 | 3,666 | 4 | 4 | [] | no_license | using System;
/*Write a program that finds the sequence of maximal sum in given array. Example:
* {2, 3, -6, -1, 2, -1, 6, 4, -8, 8} {2, -1, 6, 4}
* Can you do it with only one loop (with single scan through the elements of the array)?*/
public class FindMaxSumSequenceInArray
{
public static void Main()
... |
JavaScript | UTF-8 | 1,826 | 3.140625 | 3 | [] | no_license | // Use this file when you want to clear
// and seed new data into your db
// In terminal: node seed.js
const mongoose = require('mongoose');
const EduBlock = require('./models/eduBlock');
mongoose.connect('mongodb://localhost:27017/fruitful-supply', {
useNewUrlParser: true,
useCreateIndex: true,
useUnif... |
Markdown | UTF-8 | 677 | 2.8125 | 3 | [] | no_license | #Voici mon projet qui a été réalisé en classe de Terminale.
Le point central de ce projet consistait à créer un programme en python permmettant de coder/décoder un message grâce à la méthide César(1).
De plus, nous devions créer un site web qui serait un support pour présenter ce projet.
#(1): La méthode César ou chi... |
Java | UTF-8 | 1,475 | 2.96875 | 3 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package InputOutput;
import datatstructures.EmployeeRecord;
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
import utilities.Encryption;
/**
*
* @author n... |
C++ | UTF-8 | 326 | 3.203125 | 3 | [] | no_license | #include "stdafx.h"
//DISPLAY_ARRAY(), prints the array
void display_array(int** target, unsigned int dimension)
{
unsigned int i, j;
cout << endl;
cout << "Array output: ";
cout << endl;
for (i = 0; i < dimension; i++)
{
for (j = 0; j < dimension; j++)
{
cout << target[i][j] << " ";
}
cout << endl... |
Python | UTF-8 | 2,779 | 2.703125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
from zope.interface import Interface
from zope.interface.interfaces import IInterface
from zope.interface import Attribute
from zope import schema
class ITimezoneGetter(Interface):
""" Get the configured timezone.
The implementation of ITimezoneGetter is registered as utility, which c... |
Markdown | UTF-8 | 8,280 | 3 | 3 | [] | no_license | 你好,我是崔俊涛,今天继续聊聊技术团队的激励这个话题,上文中提到,我们可以从设定目标、进行考核以及实施激励这三个阶段着手来做好激励。今天,我将继续分享一些我在目标考核及实施激励这两个阶段的经验,希望能对你有所帮助。
## 目标考核
目标设定完毕后,团队就需要定期监控目标的达成进度和完成情况,并及时向团队成员进行反馈,修正目标的偏离和漂移,并且及时根据市场及业务的发展情况对目标进行调整,保持公司的竞争力和活力。目标考核一般分为几个方面:即时反馈、量化考核及目标修正。
### 即时反馈
积极心理学奠基人米哈里在《心流》一书中着重提到,获得即时反馈能够帮助我们进入心流状态,即全神贯注、投入忘我的状态。回想一下我们玩游戏时的状态,全... |
Python | UTF-8 | 1,967 | 2.609375 | 3 | [] | no_license | #!/usr/bin/env python
# encoding: utf-8
__author__ = 'Florian Bauer'
import archive.config.reader as reader
import archive.config.writer as writer
import archive.config.xmlhandler as xmlhandler
import unittest
def _as_int(value):
'''
Converts value to int if string is numeric
'''
if type(value) is s... |
C++ | UHC | 457 | 2.859375 | 3 | [] | no_license | /*
ۼ : 2018 04 04
:
*/
#include <iostream>
int main(void){
std::cout<<"prac01_1_4 : ̿"<<std::endl;
int sell=0;
while(sell!=-1){
std::cout<<"Ǹ ݾ Էϼ. :(-1 to end)"<<std::endl;
std::cin>>sell;
if(sell==-1) break;
std::cout<<"̹ : "<< 50+sell*0.12<<std::endl;
}
std::cout<<"α մϴ.";
return 0;... |
Markdown | UTF-8 | 5,512 | 3.671875 | 4 | [] | no_license | # Homework #3
### 1. Classify the following as a syntax error, semantic error, or not a compile time error. In the case where code is given, assume all identifiers are properly declared and in scope. All items refer to the Java language.
#### a. x+++-y
Not a compile time error
#### b. x---+y
Not a compile time err... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.