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
563
2.671875
3
[]
no_license
using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace WebApplication11.Controllers { public class HelloWorldController : Controller { public string Index() { return "Default action"; } ...
Java
UTF-8
298
1.757813
2
[]
no_license
public class KnowledgeBase { static boolean arrowUsed = false; static int agentX = 0, agentY = 0; static String facing = "right"; static int score = 0, timesAtStart = 0; static boolean noSafeMoves = false, scream = false; static Slot[][] knowledgeBoard = new Slot[4][4]; }
Python
UTF-8
802
2.875
3
[ "MIT" ]
permissive
import collections import datetime import arrow def none_default_namedtuple(typename, field_names, default_values=()): """ Helper function for defining a namedtuple with defined defaults """ T = collections.namedtuple(typename, field_names) T.__new__.__defaults__ = (None,) * len(T._fields) ...
Rust
UTF-8
2,848
2.921875
3
[]
no_license
use log::debug; use super::CrosswordGrid; impl CrosswordGrid { pub fn count_all_words(&self) -> usize { self.word_map.len() } pub fn count_placed_words(&self) -> usize { self.word_map.values().filter(|w| w.is_placed()).count() } pub fn count_unplaced_words(&self) -> usize { ...
PHP
UTF-8
5,286
2.5625
3
[ "MIT" ]
permissive
<?php namespace Game\ItemBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping\DiscriminatorColumn; use Doctrine\ORM\Mapping\DiscriminatorMap; /** * Item * * @ORM\Entity(repositoryClass="Game\ItemBundle\Entity\Repository\ItemRepository") * @ORM\Table() * @ORM\InheritanceType("JOINED") * @Dis...
PHP
UTF-8
4,453
2.8125
3
[]
no_license
<?php // Starting the session session_start(); require_once('MiniTemplator.class.php'); require_once('twitteroauth-master/twitteroauth/OAuth.php'); require_once('twitteroauth-master/twitteroauth/twitteroauth.php'); require_once('twitteroauth-master/config.php'); // Get user access tokens out of the session $access_to...
Java
UTF-8
473
1.648438
2
[]
no_license
package controller.util; public interface ProfissionalParamsUtils { public static String PROFISSAO = "Profissao"; public static String SERVICOS = "Servicos"; public static String PSICOLOGO = "Psicologo"; public static String PSIQUIATRA = "Psiquiatra"; public static String DENTISTA = "Dentista"; public static St...
Go
UTF-8
6,048
2.546875
3
[]
no_license
package api import ( "my_mange_system-gin/common" "my_mange_system-gin/model" "my_mange_system-gin/server" "net/http" "strconv" "strings" "time" "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" ) type UserLoginParams struct { Username string `form:"username"` Password string `form:"password"` ...
C
UTF-8
837
2.65625
3
[ "MIT" ]
permissive
/* * Display the fingerprints of the PGP Master Keys to the user. * * (This is in its own file rather than in uxcons.c, because it's * appropriate even for Unix GUI apps.) */ #include "putty.h" void pgp_fingerprints(void) { fputs("These are the fingerprints of the PuTTY PGP Master Keys. They can\n" ...
Markdown
UTF-8
23,832
3.75
4
[]
no_license
ECMAScript 中所有值都属于以下6种数据类型之一 基本数据类型(5) - Undefined - Null - Boolean - Number - String 复杂数据类型(1) - Object(无序键值对) # 基本类型 ## Undefined - Undefined 类型只有一个值,```undifined```,可以用来比较 - 使用```var```声明,但是没有初始化的变量,值为 ```undefined``` - 不要将变量显式设置为```undefined``` ```javascript var item; alert(item === undefined); // true ``` ...
Markdown
UTF-8
1,363
2.78125
3
[ "MIT" ]
permissive
--- title: Zelda + a11y? author: lon layout: post categories: - posts - meetups when: 2018-07-17T19:30:00-05:00 --- {% assign speakr = 'Dave Rupert' %} {% assign twiturl = 'https://twitter.com/davatron5000' %} {% assign huburl = 'https://github.com/davatron5000/' %} Accessibility is hard. Oftentimes, it’s difficult t...
Markdown
UTF-8
1,254
3.109375
3
[]
no_license
# CourseProj_GetCleanData CourseProject Coursera Getting_Cleaning Data This script is very simple. Simply locate the script "run_analysis.R" in the folder "UCI HAR Dataset" (that shlud contains folders "test" and "train" and other files. Open R. In the prompt type "dataset<-run_analysis() and after few time dataset co...
Ruby
UTF-8
1,475
3
3
[]
no_license
require_relative '../utils/printer' require_relative '../utils/input_reader' require_relative '../../universe/ship/amplifiers_chain' require_relative '../../universe/ship/amplifiers_loop' include Utils::Printer input_reader = Utils::InputReader.new(File.expand_path('input.txt')) program = input_reader.one_line.split...
Java
UTF-8
19,727
1.640625
2
[]
no_license
package com.imsweb.datagenerator.naaccr.rule.tumor; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import com.imsweb.datagenerator.naaccr.NaaccrData...
JavaScript
UTF-8
3,500
2.703125
3
[]
no_license
// imports require('dotenv').config(); const passport = require('passport'); const bcrypt = require('bcrypt'); const jwt = require('jsonwebtoken'); const { JWT_SECRET } = process.env; // Database const db = require('../models'); const { User } = require('../models'); const { Error } = require('mongoose'); //controlle...
C
UTF-8
2,675
2.609375
3
[]
no_license
struct StringNode { int cnt; int len; char *pCurStr; struct StringNode *pChildNxt; struct StringNode *pSubStrNxt; }; int CntToSubStrEnd(char *s) { int RetVal = 0; while (*s && ((*s < '0') || (*s > '9')) && (*s != '[') && (*s != ']')) { s++; RetVal++; } return RetVal; } int GetNum(char *s, int *pNum) { int...
Ruby
UTF-8
755
2.96875
3
[ "BSD-2-Clause" ]
permissive
require "rfetch/rfetch" class GenericCommand def initialize(name, description) @name = name @description = description @parse = nil @options = {} end attr_accessor :name attr_accessor :description def init() parser = OptionParser.new do |parse| @parse = pars...
JavaScript
UTF-8
2,894
2.734375
3
[]
no_license
import React, { Component, useEffect, useState } from "react"; import { useSelector, useDispatch } from "react-redux"; import ReactPaginate from 'react-paginate'; import PropTypes from "prop-types"; import { connect } from "react-redux"; import { fetchPosts } from "../actions/postActions"; const Posts = () => { //g...
C++
UTF-8
172
2.53125
3
[]
no_license
#include<stdio.h> int main() { int m,max=0; scanf("%d",&m); for(int i=0;i<m;i++) { int a,b; scanf("%d%d",&a,&b); if(a+b>max) max=a+b; } printf("%d\n",max); }
Markdown
UTF-8
2,079
2.609375
3
[ "MIT" ]
permissive
# Brainstorming for Final Project ## CS 462 - Distributed Systems Blaine Backman Braden Hitchcock Jonathon Meng ### Fast Flower Delivery **Underlying Data Structures** - DeliveryRequest - Driver - Store **Pico Types** - Driver Pico - Store Pico **Events** | Domain | Type | Descriptio...
Go
UTF-8
524
3.9375
4
[ "MIT" ]
permissive
/* A 10-second "bomb" to show the awesomeness and simplicity of Go * * Based off one of the Go Tour examples to show channel usage * */ package main import ( "fmt" "time" ) func main() { tick := time.Tick(1 * time.Second) boom := time.After(10 * time.Second) counter := 10 fmt.Println(counter) counter-- ...
Markdown
UTF-8
1,439
2.6875
3
[]
no_license
# Scrape Fandom Fandom.com provides Wiki dumps at https://*.fandom.com/wiki/Special:Statistics, but most of the dumps are outdated, and require contacting an admin to produce a new dump. This script scrapes Fandom.com for an updated Wiki dump. It scrapes the Special:AllPages to get a list of article names and requests...
Java
UTF-8
3,540
2.296875
2
[ "MIT" ]
permissive
package reka.modules.admin; import static com.google.common.base.Preconditions.checkArgument; import static reka.util.Util.deleteRecursively; import static reka.util.Util.runtime; import static reka.util.Util.unwrap; import static reka.util.Util.unzip; import java.io.File; import java.util.function.Function; import ...
Java
UTF-8
2,857
1.960938
2
[]
no_license
package com.codejoys.company.mapper; import com.codejoys.company.entity.DeptManager; import com.codejoys.company.entity.DeptManagerExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface DeptManagerMapper { /** * This method was generated by MyBatis Generator. * This...
Java
UTF-8
3,269
2.171875
2
[]
no_license
package com.epam.preprod.bohdanov.controller.servlet; import java.io.IOException; import java.util.Map; import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.ht...
PHP
UTF-8
6,021
2.53125
3
[]
no_license
<?php require_once($_SERVER['DOCUMENT_ROOT'].'/v1/controls/utilities/Guid.php'); /** * Created by PhpStorm. * User: Maestro * Date: 10/7/2015 * Time: 4:24 PM */ class ModelEntity { const SELECT_SEATS_BY_ID = <<<EOF SELECT u.*, b.seatId, b.date FROM seating_chart u JOIN seatId b ON u.id = b.us...
TypeScript
UTF-8
1,812
2.625
3
[]
no_license
import * as fromApp from "../../../../../../store/app.reducers"; import { EditSectionActions, EditSectionActionTypes } from "./edit-section.actions"; import { createFeatureSelector, createSelector } from "@ngrx/store"; export interface EditSectionState { loading: boolean; error: boolean; success: boolean; ...
Java
UTF-8
1,349
1.796875
2
[ "Apache-2.0" ]
permissive
package com.soundink.lib; import android.content.Context; import android.os.AsyncTask; import com.soundink.lib.b.b; import java.io.IOException; import org.json.JSONException; final class a extends AsyncTask<Void, Void, String> { static String a = ""; private d b = new d(this.c); private String c = com.sou...
Java
UTF-8
1,100
2.171875
2
[]
no_license
package jokrey.utilities.network.link2peer.node.protocols_old; /** * @author jokrey */ public class WhoAmIProtocolOld { // static int R_WHO_AM_I_ANSWER = -999; // public static P2Link asInitiator(P2LNodeInternal parent, InetSocketAddress to) throws IOException { // return P2Link.from(parent.tryReceive(P...
Markdown
UTF-8
9,511
3.359375
3
[]
no_license
# Getting Started As part of this module we will set up the development environment to develop an application to copy data from JSON Files to a target database (Postgres). * Problem Statement - Data Copier * Setup Docker * Quick Overview of Docker * Prepare Dataset * Setup Postgres Database * Overview of Postgres * Se...
Python
UTF-8
553
4.03125
4
[]
no_license
""" 챕터: day3 주제: set (mutable) 작성자: 주동석 작성일: 2018. 9. 11 """ s = {7, 8, 9} print(s) # set은 순서 의미 없음. 중복은 허용하지 않는다. fruits = {'a' : '사과', 'b' : '배', 'c' : '복숭아', 'd' : '딸기'}; print(set(fruits)) # [3, 4, 5]를 set으로 형변환하여 s에 저장하고, 이를 출력하라. print(set([3, 4, 5])) # 인덱스를 사용할 수 없음. 위치가 의미 없으므로. s.add(10) print(s) # remove로...
Java
UTF-8
1,184
2.359375
2
[]
no_license
package uk.ac.ucl.jsh.Parser; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import uk.ac.ucl.jsh.Parser.Call.*; import uk.ac.ucl.jsh.Parser.CommandLine.*; import uk.ac.ucl.jsh.Visitor.CallVisitor; import uk.ac.ucl.jsh.Visitor.CommandLineVisitor; import uk.ac.ucl.jsh.Visitor.Vi...
Java
UTF-8
2,682
2.296875
2
[]
no_license
package cs190i.cs.ucsb.edu.recyclerviewtest; import android.content.Intent; import android.os.Parcelable; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import andro...
C#
UTF-8
1,369
2.8125
3
[ "MIT" ]
permissive
namespace MagicModels.Schemas { using System; using System.Collections.Generic; using System.Reflection; using MagicModels.Attributes; public sealed class RenderableClassSchema { /// <summary> /// Renderer component type. When null, default renderer will be used. /// </...
Python
UTF-8
1,127
3.609375
4
[]
no_license
# -*- coding: utf-8 -*- # @Time : 2020/6/21 14:33 # @Author : Mamamooo # @Site : # @File : ht_40.py # @Software: PyCharm """ 题目描述 现有一组砝码,重量互不相等,分别为m1,m2,m3…mn; 每种砝码对应的数量为x1,x2,x3...xn。现在要用这些砝码去称物体的重量(放在同一侧),问能称出多少种不同的重量。 注: 称重重量包括0 输入描述: 输入包含多组测试数据。 对于每组测试数据: 第一行:n --- 砝码数(范围[1,10]) 第二行:m1 m2 m3 ... mn --- 每个砝码的重量(范围[...
C#
UTF-8
1,683
2.578125
3
[]
no_license
using PMAircraftIngress.Context; using System; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; namespace PMAircraftIngress.App_Utils { internal class ApplicationLog { private string LogPath { get; set; } protected ApplicationLog(string logPath) { this.LogPath = lo...
Java
UTF-8
1,200
3.90625
4
[]
no_license
/** * 有一个类似结点的数据结构TreeNode,包含了val属性和指向其它结点的指针。 * 请编写一个方法,将二叉查找树转换为一个链表,其中二叉查找树的数据结构用TreeNode实现,链表的数据结构用ListNode实现。 * 给定二叉查找树的根结点指针root,请返回转换成的链表的头指针。 */ public class Ex_68 { public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } ...
PHP
UTF-8
99
2.625
3
[]
no_license
<?php $word = "hello world"; $num = 2019; echo $word.$num; echo '<br>'; echo "hello world".$num; ?>
Java
UTF-8
7,869
1.828125
2
[]
no_license
package org.ace.insurance.system.common.ggiorganization; import java.io.Serializable; import java.util.Date; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.AssociationOverride; import javax.persistence.AttributeOverride; import javax.persistence.Column; import javax.per...
Java
UTF-8
7,728
2.15625
2
[]
no_license
/** * * @author Miriam */ package cat.xtec.ioc.ctrlr; import cat.xtec.ioc.domini.Familiar; import cat.xtec.ioc.domini.Model; import cat.xtec.ioc.servei.ModelService; import cat.xtec.ioc.servei.OptionsService; import java.io.IOException; import java.util.List; import java.util.Map; import javax.servlet.ServletExcept...
JavaScript
UTF-8
999
4.125
4
[]
no_license
// 605. 种花问题 // 假设有一个很长的花坛,一部分地块种植了花,另一部分却没有。可是,花不能种植在相邻的地块上,它们会争夺水源,两者都会死去。 // 给你一个整数数组 flowerbed 表示花坛,由若干 0 和 1 组成,其中 0 表示没种植花,1 表示种植了花。另有一个数 n , // 能否在不打破种植规则的情况下种入 n 朵花?能则返回 true ,不能则返回 false。 // 示例 1: // 输入:flowerbed = [1,0,0,0,1], n = 1 // 输出:true // 示例 2: // 输入:flowerbed = [1,0,0,0,1], n = 2 // 输出:false fu...
Python
UTF-8
1,897
2.65625
3
[ "Apache-2.0" ]
permissive
from django.test import TestCase class TestCreateAccount(TestCase): def testcase_create_account(self): customer_id = 'customer1' from wallet.models import Account account_details = Account.create_account(customer_id) self.assertEquals(account_details['customer_id'], customer_i...
Markdown
UTF-8
2,102
2.890625
3
[]
no_license
Profit maximization from LendingClub investment. From Wikipedia: “LendingClub is a US peer-to-peer lending company, headquartered in San Francisco, California.[3] It was the first peer-to-peer lender to register its offerings as securities with the Securities and Exchange Commission (SEC), and to offer loan trading ...
PHP
UTF-8
4,131
3.015625
3
[]
no_license
<?php /** * @namespace */ namespace Fw\Mvc; use Fw\Library\Arrayable; /** * Class Model */ abstract class Model implements Arrayable, \JsonSerializable { /** * @var string|array Name the primary key field */ protected static $primaryKey; /** * @var array */ private static $re...
Java
UTF-8
7,529
2.171875
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. */ /** * * @author gizachew */ /* * To change this license header, choose License Headers in Project Properties. *...
C
UTF-8
589
3.078125
3
[ "Unlicense" ]
permissive
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <fcntl.h> int main(){ char buf[BUFSIZ]; // BUFSIZ to makro z stdio.h zwracajace optymalny rozmiar bufora (na solarisach 1024) (wielkosc bloku dyskowego w systemie) int fp; int nread; if((fp=open("fifo",O_WRONLY))==-1){...
JavaScript
UTF-8
6,962
2.59375
3
[]
no_license
// React var React = require('react') var ReactDOM = require('react-dom') // Google Maps var ReactGMaps = require('react-gmaps') var {Gmaps, Marker,InfoWindow} = ReactGMaps // Movie data var movieData = require('./data/movies.json') var theatres = require('./data/theatres.json') // Components var Header = require('....
Java
UTF-8
1,600
2.53125
3
[]
no_license
package com.powerdata.openpa.psse; public abstract class SwitchList extends PsseBaseList<Switch> { public static final SwitchList Empty = new SwitchList() { @Override public Bus getFromBus(int ndx) {return null;} @Override public Bus getToBus(int ndx) {return null;} @Override public String getObjectID(in...
Java
UTF-8
1,203
2.203125
2
[]
no_license
package com.test.firstAutoamtionFramework.ulTestingAutomation.homePage; import org.apache.log4j.Logger; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import com.test.firstAutoamtionFramework.ulTestingAutomation...
C++
UTF-8
1,034
2.5625
3
[]
no_license
#include <RcppEigen.h> #include <Eigen/Dense> #include <Eigen/Cholesky> #include <cmath> #include <valarray> #include <iostream> #include "covNonSep.h" using namespace Eigen; using namespace Rcpp; //' @export // [[Rcpp::depends(RcppEigen)]] // [[Rcpp::export]] Eigen::MatrixXd covNonSep(const Eigen::MatrixXd DS, const...
Java
UTF-8
6,815
1.796875
2
[]
no_license
package views.core.soap_web_services; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * ...
Java
UTF-8
4,569
2.265625
2
[]
no_license
package com.ljtao3.service; import com.google.common.base.Preconditions; import com.ljtao3.common.MyRequestHolder; import com.ljtao3.dao.SysDeptMapper; import com.ljtao3.dao.SysUserMapper; import com.ljtao3.exception.ParamException; import com.ljtao3.model.SysDept; import com.ljtao3.param.DeptParam; import com.ljtao3....
JavaScript
UTF-8
36,967
2.828125
3
[]
no_license
<!-- var alertError; // 放到网上的时候可以禁止别的页面调用,但是在本地测试的时候要先注销掉 /* var arrHost = window.location.host.split ( '.' ); var domain = arrHost[arrHost.length - 2] + '.' + arrHost[arrHost.length - 1]; if ( document.domain != domain ) { document.domain = domain; } */ /* window.onerror = handle_error; function han...
Markdown
UTF-8
2,089
2.734375
3
[ "MIT" ]
permissive
--- template: HomePage slug: "" title: Ellelly featuredImage: https://ucarecdn.com/ca8fc208-001b-4343-a3d1-3e5e13e5ddfe/ subtitle: >- ***Your Total Period Solution*** The self-sufficient, durable and reusable period pants and pads that are practical, comfortable, sustainable and affordable for all menstruating p...
JavaScript
UTF-8
2,470
3.375
3
[]
no_license
var game = function (gameID) { this.playerA = null; this.playerB = null; this.playerC = null; this.playerD = null; this.id = gameID; this.gameState = "0 JOINT"; //"A" means A won, "B" means B won, "ABORTED" means the game was aborted }; game.prototype.transitionStates = {}; game.prototype.transitionStat...
Java
UTF-8
4,063
1.710938
2
[]
no_license
package org.tgcloud.zhanzhang.entity.base; import com.jfinal.plugin.activerecord.Model; import com.jfinal.plugin.activerecord.IBean; /** * Generated by JFinal, do not modify this file. */ @SuppressWarnings("serial") public abstract class BaseZFindworker<M extends BaseZFindworker<M>> extends Model<M> implements IBea...
JavaScript
UTF-8
2,209
2.65625
3
[]
no_license
// Generated by CoffeeScript 1.6.3 (function() { var color, force, height, svg, width; width = 1200; height = 900; svg = d3.select("body").append("svg").attr("width", width).attr("height", height); color = d3.scale.category10(); force = d3.layout.force().charge(-120).linkDistance(30).size([width, heigh...
Java
UTF-8
5,610
1.90625
2
[ "MIT" ]
permissive
package com.jannchie.biliob.model; import com.fasterxml.jackson.annotation.JsonInclude; import org.bson.types.ObjectId; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.util.Date; import java.util.List; /** * @author jannchie */ @JsonInclude(...
Java
UTF-8
246
2.75
3
[]
no_license
public class main { public static void main(String[] args) { Human humanObject = new Human(); System.out.println(humanObject.name); Food something = new Food(12, "pizza"); humanObject.eat(something); } }
C#
WINDOWS-1252
9,933
2.765625
3
[]
no_license
#region Using Directives and Copyright Notice // Copyright (c) 2007-2010, Computer Consultancy Pty Ltd // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of sour...
C++
UTF-8
624
2.84375
3
[]
no_license
//13:13 start //13:19 error answer //13:21 finish #include <iostream> #include <iomanip> using namespace std; int main() { float x[4],y[4]; int centeri, centerj; while(1){ for(int i=0;i<4;i++){ cin>>x[i]>>y[i]; } if(cin.eof())break; for(int i=0;i<4;i++) for(int j=i+1;j<4;j++){ if(x[i]==x[j] && y[i]...
C++
UTF-8
1,461
3.125
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { int n=1; int length; cin >> length; vector<double> a(length); for (int i = 0;i < length;i++) { cin >> a[i]; } while (n < length) { n *= 2; } int merge_size = 2; int submerge_size; double tem; int temsize; for (;merge_size <= n;m...
Markdown
UTF-8
5,706
2.65625
3
[]
no_license
--- description: "Simple Way to Make Favorite Okonomiyaki" title: "Simple Way to Make Favorite Okonomiyaki" slug: 60-simple-way-to-make-favorite-okonomiyaki date: 2020-09-27T12:34:16.460Z image: https://img-global.cpcdn.com/recipes/e1345aebe03f11ab/751x532cq70/okonomiyaki-recipe-main-photo.jpg thumbnail: https://img-gl...
C++
UTF-8
5,704
2.921875
3
[]
no_license
#include "sprite.h" Sprite::Sprite() { _alive = 1; _leftOrRightSide = 0; _direction = 1; _animDir = 1; _animColumns = 0; _width = 0; _height = 0; _xDelay = 0; _yDelay = 0; _xCount = 0; _yCount = 0; _curFrame = 0; _totalFrames = 1; _frameCount = 0; _frameDelay = 1; _animStartX = 0; _animStartY = 0; _f...
Java
UTF-8
1,533
2.9375
3
[]
no_license
import org.junit.Test; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class ReplaceBannedWords { @Test public void readFile() throws FileNotFoundException { File bannedWords = new File("/Users/bothi/Desktop/banned_words.txt"); File prose = new Fil...
Java
UTF-8
1,037
2.828125
3
[]
no_license
package br.unipe.mlpIII.modelo; public class Aluno { protected String nome; protected double media; protected String matricula; protected int faltas; public Aluno(String nome,double media,String matricula,int faltas) { this.nome=nome; this.media=media; this.matricula=matricula; this.faltas=fa...
JavaScript
UTF-8
557
3.78125
4
[]
no_license
const dog={ name: "Baron", legs: 4 , color: "white" , age:5, bark (){ return "woof woof" ;}, // getDogInfo (){ // return `${this.name} is ${this.age} years old` // }, calcAge(){ let humanage=0; if(this.age>=2){ humanage=(2*10.5)+(this.age-2)*4; }else if(this.age==1){ hu...
C#
UTF-8
2,429
2.625
3
[ "MIT", "CC-BY-3.0-US", "CC-BY-3.0" ]
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Collections.Generic; using System.Web.Http; using Microsoft.OData.Edm; namespace System.Web.OData.Routing { /// <summary> /// An <see cre...
Markdown
UTF-8
4,836
2.6875
3
[ "MIT" ]
permissive
\mainpage Main Page --- # MRAM click MRAM click features MRAM module which contains 262,144 magnetoresistive memory cells, organized into 32,768 bytes of memory. It means that MRAM click is a memory storage device with 32KB of memory space. <p align="center"> <img src="https://download.mikroe.com/image...
Markdown
UTF-8
1,188
2.671875
3
[]
no_license
```yaml area: Cambridgeshire og: description: A man has died following a three-vehicle collision in Wansford yesterday. publish: date: 22 Apr 2020 title: Appeal following fatal collision in Wansford url: https://www.cambs.police.uk/news-and-appeals/appeal-following-fatal-collision-in-wansford-1 ``` A man has died ...
JavaScript
UTF-8
1,645
2.53125
3
[ "MIT" ]
permissive
// @flow import React, { Component } from 'react'; import $ from 'jquery'; // import timeago from '../../utils/timeago'; // const dateFormat = require('dateformat'); import type { Feedback } from '../../utils/globalTypes'; type Props = { feedback: Feedback, index: number, markClass: string, handleClick: (feed...
Markdown
UTF-8
1,461
3.671875
4
[]
no_license
在C#中,我们可以非常自由的、毫无限制的访问公有字段,但在一些场合中,我们可能希望限制只能给字段赋于某个范围的值、或是要求字段只能读或只能写,或是在改变字段时能改变对象的其他一些状态,这些单靠字段是无法做到的,于是就有了属性,属性中包含两个块:**set和get,set块负责属性的写入工作,get块负责属性的读取工作。**在两个块中都可以做一些其他操作,如在set中验证赋的值是否符合要求并决定是否进行赋值。当缺少其中一块时属性就只能读或只能写,set和get块中属性必需有一个,因为即不能读又不能写的属性是没有意义的。 ```java class MyClass { Private string name ...
C#
UTF-8
697
2.609375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Awesome_Meal_App_191546_181510 { public class EmployeeClass { public string EmployeeId { get; set; } public string LoginPassword{ get; set; } publ...
Python
UTF-8
78
3.109375
3
[]
no_license
numbers = [47,95,88,73,88,84] print("Min value is: {}".format(min(numbers)))
Python
UTF-8
2,588
3
3
[]
no_license
from scipy import signal import matplotlib.pyplot as plt import numpy as np # fftfreq => gave corresponding freq from tx # fft => fourier transformation # abs => converted imaginary # to real # # fftshift => set zero at center # Number of test ...
Java
UTF-8
1,941
2.296875
2
[ "MIT" ]
permissive
package com.example.konrad.start_app; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import androi...
Ruby
UTF-8
3,230
3.140625
3
[]
no_license
# require 'pry' # add a constructor shortcut to hash containing initial data class DataHash < Hash def initialize(probability = '0.0', credits = '0', total_probab = 0) end_of_range = total_probab + (probability.to_f * 10).to_i - 1 self[:probability] = probability.to_f / 100 self[:credits] = credits.to_f ...
Java
UTF-8
2,562
2.1875
2
[]
no_license
package com.qtone.hdkt.model.classes; import java.util.Date; public class ClassLesson { private Integer id; private Integer classId; private String name; private String date; private String startTime; private String endTime; private Integer status; private String scheduleNum; ...
Shell
UTF-8
5,542
3.890625
4
[]
no_license
#!/bin/bash ######################################################### # # Matthew Page # 11/20/2014 # CSCS 1730 # # timeonline - a script to caclulate number of logins # and time online. # ######################################################### #establishing user if [ $# -eq 1 ];then userexists=`...
C++
UTF-8
6,150
2.65625
3
[ "MIT" ]
permissive
// // Copyright (c) 1999-2014 Jean-Luc Thiffeault <jeanluc@mailaps.org> // // See the file LICENSE for copying permission. // #include <iostream> #include <vector> #include <complex> #include <cassert> #include <cmath> #include <jlt/matrix.hpp> #include <jlt/stlio.hpp> #include <jlt/math.hpp> class ADrwave { private...
Swift
UTF-8
1,134
3.609375
4
[]
no_license
// // WordTypeProtocol.swift // TypesOfWords // // Created by Raluca Ionescu on 5/9/19. // Copyright © 2019 Raluca Ionescu. All rights reserved. // import Foundation class WordTypeClass { private let dictionary: [InputDictionary] private let outputProtocol = InteractiveOutputStrategy() init(input...
Python
UTF-8
392
3.1875
3
[]
no_license
# Uses python3 import sys import numpy as np def get_change(W): #write your code here c=0 while W!=0: if W >= 10: w1 = 10 elif W>=5 : w1 = 5 elif W>= 1: w1 =1 a = np.minimum(w1,W) W = W- a c = c+ 1 return c if __name_...
Java
UTF-8
19,144
2.03125
2
[ "MIT" ]
permissive
package com.zys.pilu.utils; import android.content.ContentResolver; import android.content.ContentUris; import android.content.Context; import android.content.SharedPreferences; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.MediaMetadataRetr...
Java
UTF-8
1,943
2.140625
2
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2013-2021, Bingo.Chen (finesoft@gmail.com). * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
PHP
UTF-8
787
2.703125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: romix * Date: 8/3/2017 * Time: 06:15 AM */ namespace Core; use Core\Model\Repository; class Repo { /** * @var Repository */ protected static $repo; public function init() { if (!isset(static::$repo)) { self::$repo = new Repo...
Java
UTF-8
7,219
1.710938
2
[]
no_license
package com.hk.common.interceptor; public enum InterceptorDirectoryEnum { MASTER_USER("/master/user"), MASTER_MODULE("/master/module"), MASTER_ACCESSUSER("/master/accessuser"), MASTER_PROSPEK("/master/prospek"), MASTER_GUDANG_GRUP("/master/gudangGrup"), MASTER_SALES("/master/sales"), MASTER_GUDANG("/master/g...
Java
UTF-8
2,538
3.484375
3
[]
no_license
package checkPrimesMultithreading.workers; import checkPrimesMultithreading.util.Results; import checkPrimesMultithreading.util.FileProcessor; import checkPrimesMultithreading.util.IsPrime; import checkPrimesMultithreading.util.MyLogger; import checkPrimesMultithreading.workers.ThreadPool; import java.lang.IllegalThr...
JavaScript
UTF-8
1,385
3.421875
3
[]
no_license
var vote1=localStorage.getItem('key1'); var vote2=localStorage.getItem('key2') var vote3=localStorage.getItem('key3') function vote(){ if(selector.value == 1) { vote1++; alert("Y...
TypeScript
UTF-8
5,146
2.8125
3
[ "MIT" ]
permissive
import { CommandAPI, Tag, Command, CommandErrorCode, CommandMetaData, CommandError } from '../../command/commandapi'; import { ExtendedBotAPI } from '../../bot/botapi'; import { DiscordChannel, DiscordPermissionResolvable } from '../../discord/discordtypes'; import { Plugin } from '../../plugins/plugin'; import { Permi...
Java
WINDOWS-1250
8,920
2.1875
2
[]
no_license
package com.github.lyokofirelyte.WaterClosetIC; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; import org.bukkit.command.Command; ...
Python
UTF-8
2,900
2.78125
3
[ "MIT" ]
permissive
import struct import unittest from datasketch.partition_minhash import PartitionMinHash, BetterWeightedPartitionMinHash class FakeHash(object): def __init__(self, h): ''' Initialize with an integer ''' self.h = h def digest(self): ''' Return the bytes represen...
SQL
UTF-8
2,165
3.203125
3
[]
no_license
CREATE TABLE dxf_record ( pk serial primary key, provider character varying(20) DEFAULT ''::character varying NOT NULL, service character varying(20) NOT NULL, ns character varying(20) NOT NULL, ac character varying(20) NOT NULL, detail character varying(5), dxf text NOT NULL, create_tim...
Shell
UTF-8
2,090
2.84375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#!/bin/bash # # Copyright 2012 Akiban Technologies, 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 applicabl...
Python
UTF-8
221
2.765625
3
[]
no_license
#import sys #import os f = open("test.in",'r') count = 0 while(True): ss =f.readline().split() if not ss : break if float(ss[4])>=0.0 and float(ss[4])<=1.0: print ss[4] count+=1 print count
Java
GB18030
2,118
2.375
2
[]
no_license
package com.plugins.dirtree.service.dao.hibernate; import java.util.Iterator; import java.util.List; import org.hibernate.internal.util.collections.EmptyIterator; import org.springline.orm.dao.hibernate.HibernateCommonDao; import com.plugins.dirtree.entity.DirType; import com.plugins.dirtree.service.dao.I...
Java
UTF-8
152
1.585938
2
[ "Apache-2.0" ]
permissive
package com.hyphenate.easeui.jxcontrol.login; /** * 修改备注 */ public interface RemarkInterface { public void onSuccess(Boolean sucess); }
Python
UTF-8
1,321
3.28125
3
[]
no_license
""" 多进程并发网络模型 重点代码!!! 步骤思路 创建网络套接字用于接收客户端请求 等待客户端连接 客户端连接,则创建新的进程具体处理客户端请求 主进程继续等待其他客户端连接 如果客户端退出,则销毁对应的进程 """ from socket import * from multiprocessing import Process from signal import * # 全局变量定义地址 HOST = "0.0.0.0" PORT = 8888 ADDR = (HOST,PORT) # 具体处理客户端请求 函数结束即客户端退出 def handle(connfd): ...
Markdown
UTF-8
3,515
2.78125
3
[]
no_license
--- layout: post redirect_from: - /writeup/algo/atcoder/jag2017summer-day3-e/ - /blog/2017/10/03/jag2017summer-day3-e/ date: "2017-10-03T06:58:41+09:00" tags: [ "competitive", "writeup", "atcoder", "jag-summer", "dp", "graph" ] "target_url": [ "https://beta.atcoder.jp/contests/jag2017summer-day3/tasks/jag2017summer...
PHP
UTF-8
998
2.71875
3
[ "MIT" ]
permissive
<?php namespace Repositories\Indexers; use Repositories\RepositoryWriterInterface; class Terrain implements IndexerInterface { const DEFAULT_INDEX = "terrains"; public function onNewObject(RepositoryWriterInterface $repo, $object) { if ($object->type != "terrain") { return; }...
Python
UTF-8
2,002
2.75
3
[ "MIT" ]
permissive
from mykrobe.stats import percent_coverage_from_expected_coverage from mykrobe.stats import log_factorial from mykrobe.stats import log_lik_depth from math import log from math import exp import pytest def test_percentage_coverage(): assert percent_coverage_from_expected_coverage( 100) > percent_coverage...