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 |
|---|---|---|---|---|---|---|---|
C# | UTF-8 | 1,628 | 3.53125 | 4 | [
"MIT"
] | permissive | // <copyright file="Program.cs" company="OSIsoft, LLC">
// Copyright © 2016 John L. Swartzentruber
// </copyright>
namespace PerfectSquaresBenchmarking
{
/// <summary>
/// Combine different solutions in an attempt to create an optimal solution
/// </summary>
public class HybridSolution : IPerfe... |
JavaScript | UTF-8 | 5,362 | 2.65625 | 3 | [] | no_license | const puppeteer = require('puppeteer');
const mongoose = require('mongoose');
const EventEmitter = require('events');
EventEmitter.defaultMaxListeners = 1000; // depends on number of items scraped
const constants = require('./util/constants.js');
const Job = require('./models/job');
const jobTitle = 'Graduate... |
Go | UTF-8 | 10,208 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | package keeper
import (
"bytes"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types"
"github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"
commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/23-c... |
Markdown | UTF-8 | 603 | 3.65625 | 4 | [] | no_license | # Tic-Tac-Toe-Game
A simple C++ program to play Tic-Tac-Toe.
The program lets two players play the Tic-Tac-Toe game on a 3 by 3 board.
You probably already know how to play Tic-Tac-Toe, but in case you don't...
The player who first fills the box with 3 X's or 3 O's in a horizontal, vertical, or diagonal manner will win... |
JavaScript | UTF-8 | 205 | 2.5625 | 3 | [] | no_license | const sentiment = require('sentiment')
/**
* param: Trump tweet
* returns: 'happy' or 'sad'
*/
module.exports = {
happyOrSad(tweet) {
return sentiment(tweet).score > 0 ? 'Happy!' : 'Sad!'
}
}
|
Java | UTF-8 | 4,560 | 2.21875 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright (C) 2007 The Android Open Source Project
*
* 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... |
Markdown | UTF-8 | 609 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | ## Development
The Fastly CLI requires [Go 1.16 or above](https://golang.org). Clone this repo
to any path and type `make` to run all of the tests and generate a development
build locally.
```sh
git clone git@github.com:fastly/cli
cd cli
make
./fastly version
```
The `make` task requires the following executables to... |
Markdown | UTF-8 | 4,091 | 2.828125 | 3 | [] | no_license | [*<<返回主页*](../index.md)<br><br>
**本文为作者原创,转载请注明出处**<br>
### 使用pytorch融合多模型结果
本文讲解如何使用pytorch融合多模型结果;<br><br>
#### 问题背景
在工作中优化一个二分类问题,针对这个二分类问题有多个模型(每个模型的特征和模型结构有差别)输出多个结果,每个结果均是一个(0, 1)之间的浮点数;融合模型的任务是为每个基模型找一个权重,对多个基模型的结果加权平均;一开始由于基模型数量比较少(2~3个),我们直接使用遍历权重的方法,即取步长为0.01、范围为(0, 1),遍历权重的所有可能值,选取一个最优的权重组合,权重选取的标准是eer(equal... |
Java | UTF-8 | 450 | 2.59375 | 3 | [] | no_license | package com.xixi.jimeihui.definition;
public enum SuperClass {
Home("主页",0),
Imagine("图册", 1),
Video("视频",2),
Mine("我的",3);
private String name;
private int position;
private SuperClass(String name, int position) {
this.name = name;
this.position = position;
}
publ... |
C++ | UTF-8 | 1,341 | 2.8125 | 3 | [] | no_license | #include "Force.h"
#include "Player.h"
#include "..\Util.h"
using namespace BroodWar;
namespace BroodWar
{
namespace Api
{
Force^ ConvertForce(BWAPI::Force force)
{
if(force == NULL)
return nullptr;
return gcnew Force(force);
}
Force::Force(BWAPI::Force force)
{
instance = force;
}
int ... |
C# | UTF-8 | 4,787 | 2.96875 | 3 | [
"MIT"
] | permissive | using UnityEngine;
/*
* Most functions taken from Tween.js - Licensed under the MIT license
* at https://github.com/sole/tween.js
* Quadratic.Bezier by @fonserbc - Licensed under WTFPL license
*/
namespace PenetrationTech {
public delegate float EasingFunction(float k);
public class Easing
{
public static ... |
Java | UTF-8 | 3,702 | 2.578125 | 3 | [] | no_license | package edu.gvsu.kurmasz.zawilinski.test;
import edu.gvsu.kurmasz.warszawa.io.InputHelper;
import edu.gvsu.kurmasz.warszawa.io.OutputHelper;
import edu.gvsu.kurmasz.warszawa.log.Log;
import edu.gvsu.kurmasz.warszawa.log.SimpleLog;
import edu.gvsu.kurmasz.zawilinski.*;
import edu.gvsu.kurmasz.zawilinski.mw.current.Medi... |
C# | UTF-8 | 5,096 | 2.921875 | 3 | [] | no_license | using System;
using Xenko.Engine;
namespace VL.Xenko.Layer
{
/// <summary>
/// Establishes a parent-child relationship between a parent and a child <see cref="Entity"/>.
/// </summary>
public sealed class EntityLink : IDisposable
{
readonly Entity parent;
Entity child;
... |
TypeScript | UTF-8 | 498 | 3.859375 | 4 | [] | no_license |
/**
* 爬楼梯求的是多少种方法,而不是多少步 到前 n-1 n-2后 就是最终的方法数
* dp[i] 到第i步有多少种走法
* @param n
*/
function climbStairs(n: number): number {
if (n <= 2)
return n;
let dp: number[] = new Array<number>(n + 1);
dp[0] = 0
dp[1] = 1;
dp[2] = 2;
for (let i = 3; i <= n; ++i) {
dp[i] = dp[i - 1]... |
Python | UTF-8 | 729 | 2.828125 | 3 | [] | no_license | def dfs(L,s,sum_): #레벨,시작점,해당 지점까지의 합
global count
if L==k: # 종료지점
if sum_%m==0: # m의 배수이면
count+=1 # 카운트
else:
for i in range(s,n): # 시작 인덱스 s부터 n-1까지
res[L]=a[i] # 해당 레벨에서 간택받은 숫자
dfs(L+1,i+1,sum_+a[i]) # 레벨 증가... |
JavaScript | UTF-8 | 2,750 | 2.890625 | 3 | [] | no_license | function Slider () {}
Slider.prototype.gestures = function() {
var _this = this;
this.touchstartX = 0;
this.touchstartY = 0;
this.touchendX = 0;
this.touchendY = 0;
this.container.addEventListener('touchstart', function(event) {
_this.touchstartX = event.changedTouches[0].screenX;
_this.touchstartY ... |
Java | UTF-8 | 338 | 2.140625 | 2 | [] | no_license | package com.example.firstspringboot.reposity;
import com.example.firstspringboot.domain.Girl;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
//其中第二个参数为Id的类型
public interface GirlRepository extends JpaRepository<Girl,Integer> {
public List<Girl> findByAge(Integer age);
}
|
Java | UTF-8 | 1,134 | 3.40625 | 3 | [] | no_license | package org.billing.jlab.factory.pizzas;
/**
* Клиент фабрики.
* Класс который способен определять какую пиццу он будет готовить и далее её готовить
* PazzaStore сохраняет ссылку на фабрику в конструкторе, далее, orderPizza обращается к фабрике
* с запросом на создание объекта, передавая тип заказа.
*/
public cla... |
PHP | UTF-8 | 3,371 | 3.078125 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: zhalnin
* Date: 07.12.12
* Time: 15:20
* To change this template use File | Settings | File Templates.
*/
/**
* Root class for inheritance
*/
abstract class Field
{
// Name of control element
protected $_name;
// Type of control element
protected $_type... |
Java | UTF-8 | 31,443 | 2.796875 | 3 | [] | no_license | package java.util.stream;
import java.util.*;
import java.util.function.*;
class SpinedBuffer<E> extends AbstractSpinedBuffer implements Consumer<E>, Iterable<E>
{
protected E[] curChunk;
protected E[][] spine;
private static final int SPLITERATOR_CHARACTERISTICS = 16464;
SpinedBuffer(final int n... |
Python | UTF-8 | 450 | 2.640625 | 3 | [] | no_license | import cv2
import numpy as np
import scipy
img = cv2.imread(r'C:\Users\jclat\OneDrive\Desktop\353\sudoku.jpg')
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
edges = cv2.Canny(gray,50,150,apertureSize = 3)
minLineLength = 100
maxLineGap = 10
lines = cv2.HoughLinesP(edges,1,np.pi/180,200,0,0)
for x1,y1,x2,y2 ... |
C# | UTF-8 | 469 | 2.765625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeReviewByMilka
{
class Animal
{
public Animal()
:this("no name", 0) { }
public Animal(string name, int numberOfLegs)
{
Name = name;
... |
C++ | UTF-8 | 1,664 | 2.71875 | 3 | [] | no_license | #pragma once
#include "Handler.h"
class Handlers
{
public:
Handlers();
virtual ~Handlers();
/* Opens a decoder.
* 'filename' - file to open.
* Returns the decoder, or nullptr if the stream could not be opened.
*/
Decoder::Ptr OpenDecoder(const std::wstring& filename) const;
// Reads 'tags' from 'filename', ... |
JavaScript | UTF-8 | 3,451 | 2.640625 | 3 | [] | no_license | Page({
/**
* 页面的初始数据
*/
data: {
bookInfo: {},
bookCommentList: [],
isBuyBook: false,
downloadBoolFilePercent: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
// 初始化书籍信息
const bookInfo = JSON.parse(options.bookInfo)
// 初始化书籍评论
let bookCommentList = []... |
PHP | UTF-8 | 9,628 | 2.546875 | 3 | [] | no_license | //items.php (Page 1)
<?php
require_once 'itemsfunction.php';
// array of images
$photos =array("<img src = 'kakashi.jpg' width='300' height='300'>",
"<img src = 'allmight.jpg' width='300' height='300'>",
"<img src = 'simondominic.jpg' width='300' height='300'>",
"<img src = 'mlazi.jpg' width='300' he... |
Java | UTF-8 | 2,365 | 3.875 | 4 | [] | no_license | import java.util.Scanner;
/**
*This program tells the user their discount and how much they saved based on how much they spent
* @author Zachary Balean
*/
public class Main {
/**
* The method that is executed when you hit the run button.
* @param args the command line arguments
*/
public sta... |
Python | UTF-8 | 201 | 2.90625 | 3 | [
"MIT"
] | permissive | import time
def printPeak(soundAnalysis):
for i in range(10000):
print(i , ": Peack count", soundAnalysis[0])
print(i , ": Weight Feed", soundAnalysis[1])
time.sleep(0.1)
|
Python | UTF-8 | 6,870 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | from exceptions import NotImplementedError, Exception
import logging
from threading import RLock, local as thread_local
import re
class EventDispatcher(object):
def __init__(self):
self.listeners = dict()
self.listeners[None] = set()
self.lock = RLock()
def dispatch_event(self, name, ... |
Java | UTF-8 | 2,669 | 2.203125 | 2 | [] | no_license | package com.kpetrov.loftcoin.ui.wallets;
import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import com.kpetrov.loftcoin.data.Coin;
import com.kpetrov.loftcoin.data.CurrencyRepo;
import com.kpetrov.loftcoin.data.Transaction;
import com.kpetrov.loftcoin.data.Wallet;
import com.kpetrov.loftcoin.data... |
C++ | WINDOWS-1250 | 2,546 | 2.9375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive |
/***************************************************************************\
* *
* Buffer pemapovn index *
* *
\***************************************************************************/
class CBufIndex
{
// ------------------------- intern promnn a funkce ... |
Markdown | UTF-8 | 2,699 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | Puppet Dashboard's Rake API
=====
This is a chapter of the [Puppet Dashboard manual](./index.markdown).
#### Navigation
* [Installing Dashboard](./bootstrapping.markdown)
* [Upgrading Dashboard](./upgrading.markdown)
* [Configuring Dashboard](./configuring.markdown)
* [Maintaining Dashboard](./maintaining.markdown)
... |
Markdown | UTF-8 | 31,429 | 3.765625 | 4 | [] | no_license | # movie_recommendation_system
A program which uses data from movies and databases, including user ratings -- and can answer questions about the data, including which items should be recommended to a user based on their ratings of several movies.
To execute the program, upload the 'Final.zip' file to https://www.dukele... |
Go | UTF-8 | 719 | 3.6875 | 4 | [] | no_license | package main
import (
"fmt"
"time"
)
func main() {
queue := make(chan string, 2)
//这个通道设置了缓冲,所以直接发送,数据会放在缓冲区中,等待读取,
//可以尝试改变缓冲区大小来进行调试, 改成1, 第一个数据会发送到通道,第二个就deadlock
queue <- "one"
fmt.Println("send one")
queue <- "two"
fmt.Println("send two")
close(queue)
time.Sleep(time.Second * 3)
for msg := range qu... |
Python | UTF-8 | 16,947 | 2.96875 | 3 | [
"MIT"
] | permissive | """
Implementation of optimization benchmark function using Pytorch
reference: https://www.sfu.ca/~ssurjano/optimization.html
"""
import torch
from torch import Tensor
import math
import numpy as np
from .utils import DataTransformer, standardize
class BenchmarkFunction(object):
def __init__(self, noise_std=None,... |
Markdown | UTF-8 | 5,448 | 3.15625 | 3 | [
"MIT"
] | permissive | ---
date: 2021-07-19 09:02:48
permalink: /leetcode236/
categories:
- leetcode
- 学习笔记
- 算法
tags:
- leetcode
---
# [236. 二叉树的最近公共祖先](https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree)
[English Version](https://github.com/doocs/leetcode/blob/main/solution/0200-0299/0236.Lowest%20Common%2... |
Python | UTF-8 | 13,556 | 2.890625 | 3 | [] | no_license | import sqlite3 as sql
from random import randint
from myConfig import *
def checkDatabaseVersion(dbFile):
conn = sql.connect(dbFile)
cur = conn.cursor()
#Set the default version. The SQL below should override this
dbVersion = 0
try:
cur.execute('SELECT version FROM BotDbVersion')
row = cur.fetchone()
dbVer... |
Markdown | UTF-8 | 585 | 2.53125 | 3 | [] | no_license | #e-shop ecommerce project
E-shop is an ecommerce project built with
spring framework, java, mySql and maven as a build tool.
#Features
Add products to database
Find products by id
Find all products
Delete product
Spring MVC with thymeleaf template engine for viewing product details
#installation
Step 1: Clone ... |
Java | UTF-8 | 1,731 | 2.5 | 2 | [
"Apache-2.0"
] | permissive | package l10;
import l10.hibernate.DbServiceHibernateImpl;
import l10.hibernate.HibernateConfigurator;
import l10.model.AddressDataSet;
import l10.model.UserDataSet;
import org.hibernate.cfg.Configuration;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEqu... |
Java | UTF-8 | 418 | 1.9375 | 2 | [] | no_license | package catproducts.catdb.api;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.stereotype.Repository;
import catproducts.catdb.api.entities.Product;
@Repository
public interface IProductRespository extends Mongo... |
C# | UTF-8 | 878 | 2.671875 | 3 | [] | no_license | using System;
using uLearn.CSharp;
namespace uLearn.Courses.BasicProgramming.Slides.U00_Basics
{
[Slide("Первый шаг", "{90BCB61E-57F0-4BAA-8BC9-10C9CFD27F58}")]
public class S011_FirstStep : SlideTestBase
{
/*
Любая, даже самая сложная дорога, начинается с первого шага.
Выведите на консоль фразу `The first... |
C++ | UHC | 1,826 | 3.5625 | 4 | [] | no_license | // 5_Ϲȭ α
// : Ϲ αְ STL
// C++ ̺귯(STL) Ϸ ݵ Ϲȭ ؾ մϴ.
// C++ : ü + Լ + Ϲ(Generic)
#include <iostream>
using namespace std;
// C ڿ ˻
char* xstrchr(char *s, char c)
{
while (*s != '\0' && *s != c)
++s;
return *s == c ? s : 0;
}
// 1. ˻ Ϲȭ : κ ڿ ˻ ϰ .
// ˻ - ݰ [first, last)
char* xstrch... |
C++ | UTF-8 | 2,008 | 3.078125 | 3 | [] | no_license | /*
Author: coderqiuan@163.com
Created on: 2016-12-21 22:09
*/
#pragma once
#include "util.h"
namespace qiuan
{
template<uint32_t streamsize = 1024> class Stream
{
private:
Stream(const Stream& r);
const Stream& operator=(const Stream& r);
bool less(int inlen)
... |
C# | UTF-8 | 4,105 | 2.875 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using Horizon;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Falsy.Tests
{
static class Timings
{
public static void Main()
{
const double interval ... |
Shell | UTF-8 | 576 | 3.28125 | 3 | [
"MIT"
] | permissive | #!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
if [ -n "$(podman ps -q --filter name=simple_dir_server)" ]; then
echo "Stopping existing directory server..."
podman stop $(podman ps -q --filter name=simple_dir_server) &>/dev/null
fi
if [ "${1:-}" = "-q" ]; then
# If the argument is to just quit, the ab... |
C | UTF-8 | 3,252 | 3.640625 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "myio.h"
/**************************ReadInteger*****************************************
int ReadInteger();
Purpose: Calls ReadLine() function to read string and convert to an Integer
with atoi()
Returns: char *iInput the converted int fr... |
C# | UTF-8 | 3,551 | 2.6875 | 3 | [] | no_license | using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Week_1;
namespace Formele_methoden_tests
{
[TestClass]
public class TestHopcroftAlgorithm
{
[TestMethod]
public void HopcroftTest1()
{
char[] alphabet = {'a', 'b'};
Automaat<string>... |
Markdown | UTF-8 | 11,918 | 2.859375 | 3 | [] | no_license | # C9 settings
1. python 설치
```bash
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
so... |
JavaScript | UTF-8 | 2,471 | 2.578125 | 3 | [] | no_license | 'use strict';
const request = require('request-promise');
const querystring = require('querystring');
const MAP_URL = 'https://www.realtor.ca/Residential/Map.aspx';
const API_URL = 'https://api2.realtor.ca';
const clientSettingsDefaults = {
CultureId: 1,
ApplicationId: 37
}
const priceTiers = [0, 25000, 50000, 750... |
Java | UTF-8 | 1,809 | 2.734375 | 3 | [] | no_license | package server.handlers;
import server.Handler;
import server.data.Header;
import server.data.Method;
import server.data.Request;
import server.data.Response;
import server.data.Status;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class Authori... |
C# | UTF-8 | 904 | 2.6875 | 3 | [] | no_license | using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
namespace CommonDataService.Models.Mapping
{
public class ProgramMap : EntityTypeConfiguration<Program>
{
public ProgramMap()
{
// Primary Key
this.HasKey(t => t.ProgramID);
... |
Markdown | UTF-8 | 5,235 | 3.703125 | 4 | [
"MIT"
] | permissive | # ICE CREAM PARLOR
#### A website for an ice cream parlor, hosted on [GitHub Pages](https://kristarutz.github.io/Ice-Cream-Parlor/), where a user can choose one or more individual toppings (sprinkles, whipped cream, hot fudge, etc) and a size to order an ice cream and see the final cost.
### _By **Krista Rutz** Last... |
Shell | UTF-8 | 1,348 | 2.9375 | 3 | [
"MIT"
] | permissive | #!/bin/bash
main_dir="./"
bindings_dir="src/bindings-pkcs11"
rpc_dir="src/rpc-pkcs11"
server_dir="src/pkcs11proxyd"
client_dir="src/client-lib"
filter_dir="src/filter"
filter_filter_dir="src/filter/filter"
filter_backend_dir="src/filter/backend"
filter_frontend_dir="src/filter/frontend"
tests_dir="src/tests"
ocaml_tes... |
JavaScript | UTF-8 | 207 | 3.0625 | 3 | [] | no_license | const partialApply = (fn, arg1) => arg2 => fn(arg2, arg1);
const pow = (a, b) => a ** b;
const f1 = partialApply(pow, 2);
console.log(f1(1)); // 1
console.log(f1(10)); // 100
export default partialApply;
|
Java | UTF-8 | 419 | 2.75 | 3 | [] | no_license | package com.weather.core.bean;
public enum DeviceName {
IPHONE("iphone"), ANDROID("android");
private String name;
private DeviceName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public static DeviceName getDeviceName(String name) {
for (DeviceName deviceName : values())... |
Python | UTF-8 | 2,987 | 2.625 | 3 | [] | no_license | # vi:syntax=python
__doc__ = """
# Pipeline
This module provides methods useful for crafting the basic Dispatch pipeline resources in Starlark.
Import URL: `github.com/mesosphere/dispatch-catalog/starlark/stable/pipeline`
"""
def push(**kwargs):
"""
A sugar function for creating a new push condition.
E... |
Java | UTF-8 | 745 | 1.976563 | 2 | [] | no_license | package net.younguard.bighorn.broadcast.dao;
import net.younguard.bighorn.broadcast.domain.Page;
import net.younguard.bighorn.domain.PlayerDetailInfo;
import net.younguard.bighorn.domain.PlayerMasterInfo;
public interface PlayerDao
{
public void add(String accountId);
public void updateInviteNum(String accountId, ... |
Java | UTF-8 | 1,376 | 2.75 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | package ca.uhn.fhir.example.ex2;
import java.util.HashMap;
import java.util.Map;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.annotation.IdParam;
import ca.uhn.fhir.rest.annotation.Read;
import ca.uhn.fhir.rest... |
C# | UTF-8 | 30,219 | 3.09375 | 3 | [
"Unlicense"
] | permissive | using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace NDex.Tests
{
/// <summary>
/// Tests the StableSortCopy methods.
/// </summary>
[TestClass]
public class StableSortCopyTester
{
#region Real World Example
/// <summary... |
Markdown | UTF-8 | 4,409 | 2.828125 | 3 | [
"MIT"
] | permissive | # inject-some
inject-some is Javascript helper library to assist in injecting scripts, styles and html from userscripts. Tested with the Greasemonkey extension on Firefox and with the TamperMonkey extension on Google Chrome and Microsoft Edge.
## Examples
These examples show how to inject additional javascript, html ... |
Java | UTF-8 | 1,321 | 2.9375 | 3 | [
"MIT"
] | permissive | package bean;
/**
* A Student class wrapping fields to be used as samples in validation by Criteria.
*/
public class Student {
private String name;
private String lastName;
private String address;
private int age;
private String phoneNumber;
private float mark;
private Matters matters;
... |
C++ | UTF-8 | 690 | 3.1875 | 3 | [] | no_license | /*****************************************************************************
* * Author: Christopher Chu
* * Date: 02/19/2018
* * Description: This file includes a class called MyInteger.
*****************************************************************************/
#ifndef MYINTEGER_HPP
#define MYINTEGER_HPP
#i... |
C++ | UTF-8 | 933 | 2.8125 | 3 | [] | no_license | #ifndef TILE_LAYER_H
#define TILE_LAYER_H
#include "PositionalLayer.h"
class TileLayerCell;
class TileLayer : public PositionalLayer
{
public:
static TileLayer* Create(int width, int height, int tileWidth, int tileHeight);
~TileLayer();
int GetWidth() const { return m_width; }
int GetHeight() const ... |
C# | UTF-8 | 739 | 2.65625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Calculator
{
static class Program
{
/// <summary>
/// Główny punkt wejścia dla aplikacji.
/// </summary>
[STAThread]
static void Main()... |
JavaScript | UTF-8 | 753 | 4.46875 | 4 | [] | no_license | const number = [1,2,3,4]
console.log("orginal array is = " + number)
//starting
//for shift first element will be removed and returned
let snum = number.shift()
console.log("shifted number is = " +snum)
console.log("After shifting array is " + number)
// unshift is used for adding element at the first
number.unsh... |
Ruby | UTF-8 | 162 | 2.765625 | 3 | [] | no_license | arr = [1,4,8,9,12,14,27]
puts arr
i = 0
while i < arr.size/2
temp = arr[-1*(i+1)]
arr[-1*(i+1)] = arr[i]
arr[i] = temp
i += 1
end
puts arr
# adding a comment
|
JavaScript | UTF-8 | 438 | 3.875 | 4 | [] | no_license | // conditionals are used to perform different actions based on different conditions
// let hungry = true
// let food
// if(hungry) {
// console.log('I am so hungry')
// }
// let age = 19
// if(age >=21) {
// console.log('You can drink!')
// } else if(age >= 18) {
// console.log('You can drive!')
// }
l... |
C++ | UTF-8 | 485 | 3.03125 | 3 | [] | no_license | /*
1 -> 100 (incl)
3 => Fizz
5 => Buzz
7 => 7
15 => FizzBuzz
*/
#include <iostream>
using namespace std;
int main()
{
for (int num = 1; num < 101; num += 1){
if (num % 15 == 0){
cout << "FizzBuzz";
}
else if (num % 3 == 0){
cout << "Fizz";
}
... |
Java | UTF-8 | 1,454 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | package com.backbase.test.parcelable;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Objects;
/**
* A basic {@link Parcelable} implementation for use by {@link TestParcelable}.
*/
public final class TestMemberParcelable implements Parcelable {
public static final Creator<TestMemberPa... |
Markdown | UTF-8 | 6,413 | 2.875 | 3 | [] | no_license | 6/15/2018 知與不知
士師記2:6-3:6
士師記第一章紀錄的是約書亞死後以色列人各支派在應許之地攻城掠地得產業的情況。神吩咐說,他所應許的地的城市,“凡有氣息的,一個不可存留”(申命記20:16-17),但是以色列每個支派都沒有按照神的吩咐去行。即使是日後他們強盛了,他們還是選擇將迦南人留在自己的地業成為服苦役的人。
他們所做所為並不僅僅是沒有將迦南人全部逐出,還容忍迦南人的偶像崇拜在應許之地繼續進行。士師記2:1-5,神的使者責備上一代的這些見過他的大作為並在應許之地爭戰的以色列民,說他們還與迦南人立約,並且沒有拆毀假神的祭壇。因此神“必不將他們從你們面前趕出;他們必作你們肋下的荊棘。他們的神必作你們的網羅”。
士... |
Markdown | UTF-8 | 2,265 | 2.671875 | 3 | [] | no_license | # uampMusicPlayerProject
This is a uamp android music player project
HOW TO RUN THE FRAMEWORK
- RUN USING JENKINS
prerequisite
1. Ensure you have started appium from command propmt
- to start appium: open cmd and type "appium" to start appium server
2. Ensure you have started your emulator using comm... |
PHP | UTF-8 | 1,237 | 2.6875 | 3 | [] | no_license | <?php session_start();?>
<?php
if(!isset($_SESSION["username"])){
echo '<script>alert("请登录再进入");location.href="login.php";</script>';
exit();
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<?php
$username=$_POST["username"];//接收用户名
$password=$_POST["password"];//接收... |
Java | UTF-8 | 928 | 2.421875 | 2 | [
"Apache-2.0"
] | permissive | package com.savvasdalkitsis.android.aspect.example.loading;
import android.app.LoaderManager;
import android.content.Context;
import android.content.Loader;
import android.os.Bundle;
public class DataFetcher<T> extends LoaderBackedFetcher<T> {
private final DataRetriever<T> retriever;
public DataFetcher(Loa... |
PHP | UTF-8 | 2,108 | 2.78125 | 3 | [] | no_license | <?php
/**
* mithra62 - Backup Pro Server
*
* @author Eric Lamb <eric@mithra62.com>
* @copyright Copyright (c) 2014, mithra62, Eric Lamb.
* @link http://backup-pro.com/
* @version 2.0
* @filesource ./module/Application/View/Helper/Pagination.php
*/
namespace Application\View\Helper;
use Base\View\Helper\Bas... |
Java | GB18030 | 14,521 | 2.15625 | 2 | [] | no_license | package com.sinosoft.claim.ui.control.viewHelper;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import javax.servlet.http.HttpServletRequest;
import com.sinosoft.claim.dto.custom.StatStatusDto;
import com.sinosoft.claim.dto.custom.UserDto;
import com.sinosoft.claim.dto.domain.Swf... |
Go | UTF-8 | 281 | 2.921875 | 3 | [] | no_license | package hamming
import "errors"
const TestVersion = 2
func Distance(s1, s2 string) (int, error) {
if len(s1) != len(s2) {
return 0, errors.New("strings must be of equal length")
}
dist := 0
for i := range s1 {
if s1[i] != s2[i] {
dist += 1
}
}
return dist, nil
}
|
Shell | UTF-8 | 472 | 3.21875 | 3 | [] | no_license | #!/bin/bash
#this scripts will begin training,
#setup vec files, and train
#takes one argument (no. of positive files)
if [[ $# -lt 1 ]]; then
cat <<- EOF
this scripts takes minimum 1 argument:
(the number of positive images)
and optional (view images : "true" ? )
EOF
exit 0
fi
opencv_createsamples -info posi... |
Java | UTF-8 | 1,806 | 3.640625 | 4 | [] | no_license | package edu.institution.clazz;
import edu.institution.person.Person;
import java.util.ArrayList;
import java.util.List;
/**
* Represents an academic class at an institution.
*/
public class AcademicClass {
final int id;
private final String name;
private final Person faculty;
// A faculty membe... |
Swift | UTF-8 | 1,603 | 3 | 3 | [
"MIT"
] | permissive | //
// XcodeConsoleLogger.swift
//
//
// Created by 刘万林 on 2021/9/2.
//
import Foundation
#if SPM
import BSKUtils
#endif
/// 在Xcode的控制台输出日志
open class BSKLogConsoleDestination: LogDestination {
/// 详细模式,输出更多调试信息
open var detailMode = true
/// 单条日志显示的最大长度,过长的日志打印会导致Xcode Console 白屏,可以设置这个属性来限制输出的最大长度,... |
TypeScript | UTF-8 | 3,791 | 2.71875 | 3 | [
"MIT"
] | permissive | import { helpers } from '../../src/helpers';
// helpers.getMeasure-positive
// import iMyModule from '../interfaces/IMyModule';
import { QueueWorker } from '../../src/modules/QueueWorker';
// private async processItem(item: PackageInfo): Promise<PackageInfo> {
const delay = 100;
const delayPadded = delay + delay * 0.... |
Java | UTF-8 | 1,758 | 2.15625 | 2 | [] | no_license | package com.im.commons.zookeeper.properties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
/**
* <p>Title: </p>
* <p>Description: TODO(zookeeper配置文件)</p>
* <p>Company: laixun</p>
* @author Alix
* @date 2019年8月15日 下午2:09:20
... |
Python | UTF-8 | 718 | 3.328125 | 3 | [] | no_license | from random import shuffle
class Trainer(object):
def __init__(self, cards):
self.cards = cards
def shuffle(self):
shuffle(self.cards)
def train(self):
for card in self.cards:
Trainer.train_card(card)
@staticmethod
def train_card(card):
for turn in ca... |
Markdown | UTF-8 | 2,116 | 3.34375 | 3 | [] | no_license | # cs-vis-project
CS 329E Elements of Data Visualization Project
By Anna-Maria Andreeva, Ishita Kumar, and Crystal Tse
In this project, two visualizations were developed using Altair (Python visualization library) to inform prospective and current University of Texas system students about salary prospects of different... |
Java | UTF-8 | 284 | 1.8125 | 2 | [] | no_license | package client.model;
import shared.util.PropertyChangeSubject;
public interface BlackJackDataModel extends PropertyChangeSubject
{
void giveCardToPlayer();
void giveCardToDealer();
void giveCardToDealer2();
void giveCardToPlayer2();
void getTheScore();
}
|
Java | UTF-8 | 18,315 | 1.757813 | 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 br.telas;
import br.caixageral.CaixaGeral;
import br.caixageral.CaixaGeralDAO;
import br.contabancaria.ContaBancaria;
import b... |
Markdown | UTF-8 | 9,848 | 2.875 | 3 | [
"MIT"
] | permissive | ---
id: Foldable2v
title: Foldable2v
---
[Source](https://github.com/gcanti/fp-ts/blob/master/src/Foldable2v.ts)
# Foldable2v
**Signature** (type class) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Foldable2v.ts#L36-L39)
```ts
export interface Foldable2v<F> extends Foldable<F> {
readonly foldMap: <M>(... |
Shell | UTF-8 | 389 | 2.71875 | 3 | [] | no_license | #!/bin/bash
set timeout 60
set host 192.168.60.225
set name mlbc
set password mlbc2019
spawn ssh $host -l $name
expect{
"(yes/no)?"{
send "yes\n"
expect "assword:"
send "$password\n"
}
"assword:"{
send "$password\n"
}
}
expect "#"
send "uname\n"
expect "mlbc"
sen... |
Python | UTF-8 | 2,324 | 2.5625 | 3 | [] | no_license | import json
from flask_restplus import Namespace, Resource, fields
# import mongoengine.fields as fields
from flask import request, jsonify
from mongoengine import DoesNotExist, ValidationError
from controller.campaign_controller import CampaignController
from models.campaign import Campaign
api = Namespace('campaig... |
Python | UTF-8 | 1,112 | 2.890625 | 3 | [
"MIT"
] | permissive | import altair as alt
import pandas as pd
def history_to_dataframe(history, key):
if isinstance(history, dict):
dfs = []
for name, history_ in history.items():
df = history_to_dataframe(history_, key)
df["name"] = name
dfs.append(df)
return pd.concat(dfs)... |
Java | UTF-8 | 2,548 | 2.5 | 2 | [] | no_license | package com.tmw.tracking.service.impl;
import com.tmw.tracking.entity.TrackingSite;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.SocketTimeoutException;
import java.text.MessageFormat;
import java.util.concurrent.Callable;
/**
* Cr... |
Python | UTF-8 | 998 | 3.15625 | 3 | [
"MIT"
] | permissive | import unittest
import os
from dfs_connected_cell_in_a_grid import maxRegion
class TestMaxRegion(unittest.TestCase):
def parse_test_data_file(self, file):
n = int(file.readline())
m = int(file.readline())
grid = []
for _ in range(n):
grid.append(list(map(in... |
Markdown | UTF-8 | 1,250 | 2.59375 | 3 | [] | no_license | ---
layout: post
title: Technical Thanksgiving
tags: [technology, musings]
last_updated: 2011-12-13
---
I'm thankful for standards and software that supports them. I can now
charge my wife's phone and my phone using the same micro-USB connector. My
machine can talk to a wide variety of printers without me w... |
Markdown | UTF-8 | 16,922 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | #Advanced usage
## Getting Tipser ids
<aside class="notice">
To run Tipser Elements components you will need to pass <code>productId</code> or <code>collectionId</code>. To get <code>productId</code>, log in to <a href="https://app.tipser.com/" target="_blank">app.tipser.com</a> using your publisher's account, find a... |
Java | UTF-8 | 1,612 | 2.46875 | 2 | [] | no_license | package com.unqualsevol.moviesproject1.adapters;
import android.content.Context;
import android.database.Cursor;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.unqualsevol.moviesproject1.R;
import com.unqualsevol.m... |
Swift | UTF-8 | 1,543 | 2.75 | 3 | [
"MIT"
] | permissive | import XCTest
import AttributedString_swift
class Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
func testForegroundColor() {
let color = UIColor.red
let attributedText = ... |
C# | UTF-8 | 9,363 | 2.640625 | 3 | [
"LicenseRef-scancode-nysl-0.9982"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SimpleFTP
{
sealed class ReplyCode
{
/// <summary>再開のマーカー応答。テキストは厳密で特有の実装は許されない。フォーマットはMARK yyyy = mmmmでyyyyはユーザプロセスデータストリームマーカ、mmmmはサーバに対応するマーカ</summary>
public static readonly ReplyCode ... |
PHP | UTF-8 | 1,117 | 2.984375 | 3 | [] | no_license | <?php
class Timezone {
var $id;
var $ht;
function Timezone($id){
$this->id=0;
return $this->load($id);
}
function load($id=0) {
if(!$id && !($id=$this->getId()))
return false;
$sql='SELECT * FROM '.TIMEZONE_TABLE.' WHERE id='.db_input($id);
i... |
PHP | UTF-8 | 470 | 2.703125 | 3 | [] | no_license | <?php
namespace Neko\Facade;
use Neko\Session\SessionManager;
class Session
{
protected static $Instance;
public static function __callStatic($method, $args)
{
if (!static::$Instance) {
static::$Instance = new SessionManager(null);
}
return call_user_func_array(array(s... |
Java | UTF-8 | 3,857 | 2 | 2 | [] | no_license | package org.chromium.media.mojom;
import org.chromium.mojo.bindings.DeserializationException;
import org.chromium.mojo.bindings.Interface$AbstractProxy;
import org.chromium.mojo.bindings.Interface$Manager;
import org.chromium.mojo.bindings.Interface;
import org.chromium.mojo.bindings.InterfaceControlMessagesHelper;
im... |
Rust | UTF-8 | 11,687 | 3.09375 | 3 | [] | no_license | use scrap::{Capturer, Display};
use std::io::ErrorKind;
use std::is_x86_feature_detected;
use log::debug;
mod converters;
use converters::{ avx2_bgra_to_rgba, avx2_cmp_and_convert, avx2_cmp, avx2_convert_in_place };
#[derive(PartialEq, Eq, Debug)]
enum RegionType {
Unknown = 0,
Similarity = 1,
Difference ... |
Java | UTF-8 | 397 | 1.632813 | 2 | [] | no_license | package com.cheetahlabs.quiz.models;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import java.util.Map;
@Getter
@Setter
public class SubmitRequestDTO {
@JsonProperty("test_id")
private int testId;
@JsonProperty("user_id")
private int userId;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.