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
Shell
UTF-8
429
2.609375
3
[]
no_license
#! /bin/bash echo 'deb-src http://ftp.ch.debian.org/debian/ jessie main' >> /etc/apt/sources.list apt-get update apt-get build-dep -y privoxy mkdir -p /usr/src/privoxy pushd /usr/src curl -LO http://http.debian.net/debian/pool/main/p/privoxy/privoxy_3.0.23.orig.tar.gz cd privoxy tar xvf ../privoxy_3.0.23.orig.tar.gz -...
C++
UTF-8
488
3.65625
4
[]
no_license
/* Author: Sanjeev Sharma Description: Practice functions, return true if even number */ #include <iostream> using namespace std; // returns true if the argument is even, otherwise false bool is_even(int n); int main() { // test for (int i = -5; i < 6; i++) { cout << i << '\t'; if (is_even(i))...
PHP
UTF-8
320
3.234375
3
[]
no_license
// function that runs when shortcode is called function w3villa_shortcode() { // Things that you want to do. $message = 'Hello world!'; // Output needs to be return return $message; } // register shortcode add_shortcode('greeting', 'w3villa_shortcode'); // call the shortcode echo do_shortcode("[greeting]");
Python
UTF-8
350
3.015625
3
[]
no_license
import planarity n = 6 m = n * (n - 1) / 2 out = "1" for x in xrange(1, pow(2, m)): edgelist = [] u, v = 1, 1 for y in xrange(m): u += 1 if u >= v: v += 1 u = 1 if x & (1<<(m-y-1)): edgelist.append((u, v)) out += "1" if planarity.is_planar(e...
C++
UTF-8
2,172
2.5625
3
[]
no_license
/// /// @file create_kmers_presence_absence_table.cpp /// @brief This program will create a table of presence absence accross DBs // // Taking the sorted general kmers list as well as the sorted kmers from // each accessions, create a table with kmers as rows and accessions as collumns // where each c...
Java
UTF-8
7,659
2.65625
3
[ "MIT" ]
permissive
package tictactoe.client; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.concurrent.TimeUnit; import net.accelbyte.sdk.core.AccelByteSDK; import net.accelbyte.sdk.core.client.OkhttpWebSocketClient; import net.accelbyte.sdk.core.repository.DefaultConfigRepository; import net.accelbyte.sdk.core.rep...
C#
UTF-8
2,775
3.390625
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; namespace NGnono.Doubts.GenericsDoubts { internal struct StructDict { //public override int GetHashCode() //{ // return 1; //} public string Name { get; set; } } class Program { static void Main(str...
Markdown
UTF-8
2,847
3.609375
4
[]
no_license
Local Storage INTRODUCING HTML5 STORAGE “HTML5 Storage” is a specification named Web Storage, which was at one time part of the HTML5 specification proper, but was split out into its own specification for uninteresting political reasons. Certain browser vendors also refer to it as “Local Storage” or “DOM Storage.” Th...
Ruby
UTF-8
4,206
3.515625
4
[]
no_license
require_relative '../connect_four' describe Game do before :all do @game = Game.new end describe '#new' do it 'generates a Board' do expect(@game.board).to be_an_instance_of Game::Board end it 'gives Player 1 the first turn' do expect(@game.player1.is_turn).to be true expect(...
Markdown
UTF-8
10,104
3.234375
3
[]
no_license
# 引言 随着互联网的发展,人们在享受互联网带来的便捷的服务的时候,也面临着个人的隐私泄漏的问题。小到一个拥有用户系统的小型论坛,大到各个大型的银行机构,互联网安全问题都显得格外重要。而这些网站的背后,则是支撑整个服务的核心数据库。可以说数据库就是这些服务的命脉,没有数据库,也就无从谈起这些服务了。 对于数据库系统的安全特性,主要包括数据独立性、数据安全性、数据完整性、并发控制、故障恢复等方面。而这些里面显得比较重要的一个方面是数据的安全性。由于开发人员的设计不周到,以及数据库的某些缺陷,很容易让黑客发现系统的漏洞,从而造成巨大的损失。 接下来本文将会介绍非常常见的一种攻击数据库的方法:SQL注入,以及使用在项目使用Java开发的情...
C++
UTF-8
311
2.59375
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <array> #include <boost/algorithm/cxx11/any_of.hpp> #include <boost/bind.hpp> struct g { bool a(const int& c)const {return c==5;} }; std::array<g,100> cucc; int main() { return boost::algorithm::any_of(cucc, boost::bind(&g::a, 5)); }
Shell
UTF-8
800
2.6875
3
[]
no_license
#!/bin/bash alias vi='vim' alias g='git' alias ed='emacs --daemon -nw' alias e='emacsclient -t' alias gopen='gnome-open' alias mkdir='mkdir -p' alias ...='../..' alias cnpm='npm --registry=https://registry.npm.taobao.org \ --cache=$HOME/.npm/.cache/cnpm \ --disturl=https://npm.taobao.org/dist \ --userconfi...
Java
UTF-8
918
1.8125
2
[ "Apache-2.0" ]
permissive
package com.demo.common.model.base; import com.jfinal.plugin.activerecord.IBean; import com.jfinal.plugin.activerecord.Model; /** * Generated by JFinal, do not modify this file. */ @SuppressWarnings("serial") public abstract class BaseRoleResource<M extends BaseRoleResource<M>> extends Model<M> implements IBean { ...
Java
UTF-8
767
2.15625
2
[]
no_license
package app_kvECS; import shared.metadata.*; import java.util.List; import shared.messages.KVAdminMessage; public interface INodeConnection { /** * Sends a list of nodes to kill to a node. */ public void sendKillMessage() throws Exception; public boolean sendCloseMessage(); /** * Tel...
Python
UTF-8
1,720
3.375
3
[]
no_license
#http://suninjuly.github.io/selects1.html #http://suninjuly.github.io/selects2.html from selenium import webdriver from selenium.webdriver.support.ui import Select import time import math def calc(x): return str(math.log(abs(12*math.sin(int(x))))) link = "http://suninjuly.github.io/selects1.html" try: brows...
C#
UTF-8
1,002
2.578125
3
[ "MIT" ]
permissive
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace AnimationEffects { /// <summary> /// Use this class to attach sound effects data to animations /// Optional: randomize the pitch for the sounds /// Domain: Editor, project-specific /// </summary> [System.S...
Java
UTF-8
370
1.554688
2
[ "MIT" ]
permissive
/** * */ package br.com.swconsultoria.efd.icms.registros.bloco0; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; /** * @author Samuel Oliveira * */ @EqualsAndHashCode @Getter @Setter public class Registro0220 { private final String reg = "0220"; private String unid_conv; ...
Python
UTF-8
2,632
4.03125
4
[]
no_license
# Leetcode 99. Recover Binary Search Tree # Solution 1 Sort an almost sorted array where two elements are swapped # Runtime: O(N) # Memory Usage: O(N) # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None cla...
Java
UTF-8
1,294
2.234375
2
[]
no_license
package com.wissen.justhire.model; import java.io.Serializable; import javax.persistence.*; /** * The persistent class for the process_status database table. * */ @Entity @Table(name="process_status") @NamedQuery(name="ProcessStatus.findAll", query="SELECT p FROM ProcessStatus p") public class ProcessStatus impl...
Java
UTF-8
2,589
2.9375
3
[]
no_license
package demos; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import communication.MyLog; import models.IzhNeuron; import startup.Constants; public class OneNeuronDynamics { /** log*/ MyLog mlog = ...
Java
UTF-8
1,202
2.296875
2
[]
no_license
package br.ufjf.dcc196.trb2.arthur_e_gustavo.adapters; import android.content.Context; import android.database.Cursor; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CursorAdapter; import android.widget.TextView; import br.ufjf.dcc196.trb2.arthur_e_g...
Java
UTF-8
2,005
2.4375
2
[ "Apache-2.0" ]
permissive
package org.gbif.pipelines.transforms.core; import static org.junit.Assert.assertEquals; import java.util.Arrays; import org.gbif.pipelines.io.avro.LocationRecord; import org.gbif.pipelines.io.avro.json.LocationInheritedRecord; import org.junit.Test; /** Tests for LocationInheritedFieldsFn. */ public class LocationI...
Java
UTF-8
5,240
1.828125
2
[]
no_license
package shopandclient.ssf.com.shopandclient.ui; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.*; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.hyphenate.chat.EMClient; import com.hyphenate.chat.EMGroup; imp...
Java
UTF-8
549
1.953125
2
[]
no_license
package com.microservicelibrairie.dao; import com.microservicelibrairie.entities.Librairie; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; public interface LibrairieRepository extends ...
Java
UTF-8
5,597
2.265625
2
[]
no_license
package com.bullshit.endpoint.entity; public class Hospital { /** * This field was generated by MyBatis Generator. * This field corresponds to the database column hospital.hospital_id * * @mbggenerated */ private String hospitalId; /** * This field was generated by MyBatis Ge...
Ruby
UTF-8
362
3.234375
3
[]
no_license
class Destination attr_reader :station_name, :fuel_type, :access_days_time, :address def initialize(station) @station_name = station[:station_name] @fuel_type = station[:fuel_type_code] @access_days_time = station[:access_days_time] @address = "#{station[:street_address]}, #{station[:city]}, #{sta...
Java
UTF-8
1,570
3.125
3
[]
no_license
package com.CRUD; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import com.etity.Employee; import java.util.Scanner; public class ReadObject { //Delete the object public static void main(String[] args) { Scanner input = new Scanner(System.i...
Python
UTF-8
1,359
2.671875
3
[]
no_license
import casadi as cd import pandas as pd import numpy as np def gen_t(pts1, pts2): tpts = [0] for i, pt in enumerate(pts1): if i != 0: dist_tmp = (pts1[i] - pts1[i-1]) ** 2 + (pts2[i] - pts2[i-1]) ** 2 tpts += [cd.sqrt(dist_tmp) + tpts[-1]] maxt = tpts[-1] tpts = [t/maxt ...
Java
UTF-8
554
1.84375
2
[]
no_license
package com.nnlightctl.server; import com.nnlight.common.Tuple; import com.nnlightctl.request.BaseRequest; import com.nnlightctl.request.SystemParamRequest; import com.nnlightctl.po.SystemParam; import java.util.List; public interface SystemParamServer { int addOrUpdateSystemParam( SystemParamRequest request); S...
Python
UTF-8
579
3.125
3
[]
no_license
class Category: def __init__(self, amount, label): self._amount = amount self._label = label def __str__(self): return str(self._amount) + ', ' + self._label def __repr__(self): return str(self) def get_label(self): return self._label class Expense(Ca...
C#
UTF-8
12,937
2.71875
3
[]
no_license
using System; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using Newtonsoft.Json; using System.Data.SqlClient; using System.Collections.Generic; namespace CurrencyJob { class Program { private static string BaseURL = "https://openexchangerates.org/api/latest.jso...
Java
UTF-8
426
2.140625
2
[]
no_license
/* * Creator: Calvin Liu */ package me.calvinliu.scoreboard.integration; /** * Http Result for testing */ public class HttpResult { private String response; private int code; public HttpResult(String response, int code) { this.response = response; this.code = code; } public S...
C#
UTF-8
1,866
3.34375
3
[]
no_license
using System; namespace _03._Santas_Holiday { class Program { static void Main(string[] args) { int numOfDays = int.Parse(Console.ReadLine()); string typeOfRoom = Console.ReadLine(); string feedback = Console.ReadLine(); double pricePerNight = 0...
Python
UTF-8
163
2.796875
3
[]
no_license
def answer(x): distinct = set() for s in x: if s not in distinct and s[::-1] not in distinct: distinct.add(s) return len(distinct)
C#
UTF-8
5,879
3.640625
4
[]
no_license
using System; namespace _03_Types { class Program { static void Main(string[] args) { // tuples (int, int) t1 = (1, 2); t1.Item1 = 10; var t21 = (1, 2); t21.Item2 = 20; var t22 = (1, "abc"); t22....
JavaScript
UTF-8
1,471
2.765625
3
[ "MIT" ]
permissive
$(document).ready(function() { $(".profile").submit(function(event){ event.preventDefault(); var countryInput = $ ("input:radio[name=country]:checked").val(); var spotInput = $("input:radio[name=spot]:checked").val(); var ageInput = $("#age").val(); var daysInput = $("#days").val(); var compa...
Python
UTF-8
2,491
3.703125
4
[]
no_license
# -*- coding: utf-8 -*- from euler.baseeuler import BaseEuler from os import path, getcwd from itertools import cycle, product class Euler(BaseEuler): def solve(self): fp = path.join(getcwd(), 'euler/resources/cipher.txt') with open(fp, 'r') as f: data = f.read() ct = list(m...
JavaScript
UTF-8
13,120
2.53125
3
[]
no_license
/** * PeptideController * * @description :: Server-side logic for managing Peptides * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers */ module.exports = { /** * `PeptideController.create()` */ create: function (req, res) { var gene = req.body.gene; var geneCard = ...
Markdown
UTF-8
663
2.75
3
[]
no_license
# Programação assíncrona - Operações que podem ser lentas - Requisição de daos à APIs - Processamento intenso de dados - Comunicação com banco de dados (Node.js) - É extremamente importante que o JavaScript **não** espere o término de instruções lentas - A principal técnica é a utilização do **event loop** ## E...
C++
UTF-8
943
3.65625
4
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference", "LGPL-3.0-only" ]
permissive
/////////////////////////////////////////////////////////////////////////////// // Copyright Christopher Kormanyos 2019. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // // appendix0a_12-001_range_based_fo...
Python
UTF-8
3,024
3.609375
4
[]
no_license
import csv from collections import defaultdict def read_csv(path): """Reads a CSV from a given path. Stores it as a list of lists. Args: path (str): path to the CSV file. Returns: list: list of lists, each corresponds to a different line in the given CSV file. """ wi...
Python
UTF-8
5,087
2.75
3
[]
no_license
""" puts vulnerability info into the db cve, summary, repo_location, commit_number """ import re from lxml import etree import urllib2 import psycopg2 # Connect to an existing database conn = psycopg2.connect(dbname="patch_db", user="patch_user") # Open a cursor to perform database operations cur = conn.cursor() def...
PHP
UTF-8
8,126
2.96875
3
[ "MIT" ]
permissive
<?php /** * Generated by PHPUnit_SkeletonGenerator on 2015-02-16 at 20:05:00. */ class SentenceTest extends PHPUnit_Framework_TestCase { /** * @var Sentence */ protected $object; /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ ...
Markdown
UTF-8
268
2.78125
3
[]
no_license
默认的解释器会自动装载被调用的 Node.js 核心模块到 REPL 环境中。 举个例子,除了声明为全局或有限范围的变量的情况,输入`fs`会被解释为 `global.fs = require('fs')`。 ```js > fs.createReadStream('./some/file'); ```
Python
UTF-8
1,635
2.53125
3
[]
no_license
from domain.entity import Entity class Card_client(Entity): def __init__(self,nume,prenume,CNP,data_nasterii,data_inregistrarii): super(Card_client, self).__init__() self.__nume = nume self.__prenume = prenume self.__CNP = CNP self.__data_nasterii = data_nasterii ...
Python
UTF-8
3,720
3.328125
3
[]
no_license
import re import sys from dataclasses import dataclass import math import copy sys.path.append("c:\\Users\\james_pc\\projects\\aoc2020\\") sys.path.append("./..") from utils import time_algo PATH = "day22/" # Part 1 def get_input(filename): my_file = open(filename, "r") content = my_file.readlines() r...
Java
UTF-8
197
2.265625
2
[]
no_license
package com.monopoly.exceptions; @SuppressWarnings("serial") public class InvalidDiceValueException extends Exception { public InvalidDiceValueException() { super("Invalid Dice Value!"); } }
JavaScript
UTF-8
5,768
2.890625
3
[]
no_license
(function (){ var resSpan = document.getElementsByTagName('span')[0]; var canvas = document.createElement("canvas"); var fire = document.getElementById("fire"); var ctx = canvas.getContext("2d"); var spaceShipHeigth = 40; var spaceShipWidth = 40; var monsterHeigth = 60; var monsterWidth =60; var score = 0; var youLos...
PHP
UTF-8
976
3.046875
3
[]
no_license
<?php /** * definisce un oggetto percorso */ class Giro { public $nomeGiro; public $autista; public $mezzo; public $idGiro; public $idAppalto; public $fermate; //COSTRUTTORE /** * costruttore percorso * @param type string $unNome nome del percorso * @pa...
Python
UTF-8
379
2.515625
3
[ "Apache-2.0" ]
permissive
import netomaton as ntm import numpy as np from .rule_test import * class TestUtils(RuleTest): def test_binarize_for_plotting(self): activities = [[2], [35], [12]] np.testing.assert_equal([[0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 1, 1], [...
C++
UTF-8
2,807
2.625
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
Java
UTF-8
1,047
1.953125
2
[]
no_license
package net.luis.common.action; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.opensymphony.xwork2.ActionSupport; import net.luis.common.dao.Page; /** * @CreateTime:2017年3月28日 下午4:43:04 * @Author sai.liu * @ProjectPackage:net.luis.base.action.BaseAction....
Java
UTF-8
1,092
2.03125
2
[]
no_license
package com.example.finclaw.bl.attendance; import com.example.finclaw.vo.ResponseVO; import com.example.finclaw.vo.account.UserVO; import com.example.finclaw.vo.attendance.AttendanceVO; import com.example.finclaw.vo.project.ProjectVO; import com.example.finclaw.vo.server.ServerInfoForm; import com.example.finclaw.vo.s...
C
UTF-8
1,729
3.75
4
[ "MIT" ]
permissive
#include<alloc.h> #include<stdio.h> #include<conio.h> #define F 0 #define T 1 struct btnode { struct btnode *lc; int data; struct btnode *rc; }; int ch,n,i; void main() { struct btnode *bt1,*bt2; bt1=NULL; bt2=NULL; while(1) { clrscr(); printf("\n\t\t\t1:Insert a node in Tree-1")...
Java
UTF-8
16,515
1.976563
2
[ "Apache-2.0" ]
permissive
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed...
Python
UTF-8
927
2.515625
3
[ "CC0-1.0" ]
permissive
#!/usr/bin/env python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class RecentFilter(Gtk.RecentChooserDialog): def __init__(self): Gtk.RecentChooserDialog.__init__(self) self.set_title('RecentFilter') self.set_default_size(300, 200) recentfilter = Gtk...
Go
UTF-8
2,423
3.9375
4
[ "MIT" ]
permissive
package async import ( "context" "sync" ) // Task is a function that can be run concurrently. type Task func() error // Run will execute the given tasks concurrently and return any errors. func Run(tasks ...Task) <-chan error { errc := make(chan error) // run tasks var wg sync.WaitGroup for _, v := range task...
Python
UTF-8
902
3.359375
3
[]
no_license
def solution(begin, target, words): arr = [begin] + words lenw = len(words[0]) graph = {e: [] for e in arr} for x in graph: for y in arr: if x != y and check(x, y, lenw): graph[x].append(y) minc = bfs(graph, begin, target) return minc def check(a, b, size): ...
Java
UTF-8
442
1.671875
2
[ "Apache-2.0" ]
permissive
package im.heart.cms.repository; import java.math.BigInteger; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import im.heart.cms.entity.Ad; import org.springframework.stereotype.Repository; /** * * @author gg * @desc Ad接口 *...
C++
UTF-8
1,628
3.625
4
[]
no_license
#include <iostream> #include "vector_io.h" std::string intToString(int & input){ std::string output = ""; bool got_minus = input < 0; if (input == 0) return std::string("0"); while(input) { char c = std::abs(input % 10) + 48; input /= 10; output.push_back(c); } ...
Java
UTF-8
8,155
2.046875
2
[]
no_license
package kirey.com.icap.activities; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; ...
Markdown
UTF-8
1,094
2.90625
3
[ "MIT" ]
permissive
--- title: Axios and Content-Type date: 2020-02-11 tag: JS --- import { MDXTextLink as TextLink } from "../../../src/components/mdx-comps" During work today, my colleague Mo and I were having issues making `DELETE` requests to a micro service that he had created. In Postman and the standard XHR function that ships wi...
Java
UTF-8
2,189
2.28125
2
[]
no_license
package com.example.greentea.ViewHolder; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RatingBar; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; ...
Java
UTF-8
8,348
2.546875
3
[]
no_license
package com.haoxueren.demo.rxjava; import android.app.Activity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import com.haoxueren.demo.R; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.concurre...
Java
UTF-8
1,507
3.546875
4
[]
no_license
import java.util.Scanner; import org.jfugue.player.Player; public class main{ public static void printmenu() { System.out.println("Menu:"); System.out.println("1: Interval Training"); System.out.println("2: Pitch Training"); System.out.println("3: Triad Training"); System.out.println("4: Inversion Training"...
C++
UTF-8
2,757
2.796875
3
[]
no_license
#include <cstring> #include <iostream> #include "adt/array_size.h" #include "deliantra/data/glyph.h" #include "deliantra/data/map.h" #include "trenderer.h" void renderer::draw_map () const { for (size_t y = 0; y < array_size (win); y++) { wchar_t buf[array_size (win[y]) + 1]; memcpy (buf, win[y],...
Java
UTF-8
853
2.328125
2
[ "Apache-2.0" ]
permissive
package com.beanbox.context.suppport; import com.beanbox.beans.factory.support.DefaultListableBeanFactory; import com.beanbox.beans.reader.support.XmlBeanDefinitionReader; import com.beanbox.context.suppport.AbstractRefreshableApplicationContext; /** * @author: @zyz * 模板模式 */ public abstract class AbstractXmlAppl...
Python
UTF-8
9,230
3
3
[]
no_license
''' Bio 331 HW 3: Random Walks Author: Sol Taylor-Brill Date: 10/03/19 ''' import matplotlib.pyplot as plt import random import math from graphspace_python.api.client import GraphSpace from graphspace_python.graphs.classes.gsgraph import GSGraph graphspace = GraphSpace("soltb@reed.edu", "solTB") #Starting GraphSpace s...
C#
UTF-8
5,987
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.Linq; using System.Net; using System.Web; using System.Web.Mvc; using CarInsurance.Models; namespace CarInsurance.Controllers { public class InsureeController : Controller { private InsuranceEntit...
Java
UTF-8
1,338
3.046875
3
[]
no_license
package by.epam_training.java_online.module5.task1_text_file.logic; import by.epam_training.java_online.module5.task1_text_file.entity.Directory; public class FileLogic { private final static FileLogic instance = new FileLogic(); private FileLogic() { } public static FileLogic getInstance() { r...
JavaScript
UTF-8
1,537
3.453125
3
[]
no_license
// task 1 // Make a page that has on it an element that is 100px by 100px in size, // has absolute positioning, and has a solid background color.Add an event // handler that makes this box center itself directly under the user's mouse // pointer as it is moved across the screen. (function () { var elem = document....
JavaScript
UTF-8
519
2.75
3
[]
no_license
class Monitor { Promise(source, handler, interval) { source() .then(value => { if (value !== this.value) { handler(this.value = value) } }) .then(() => setTimeout(() => this.Promise(...arguments), interval) ) .catch(err => console.error(err)) } ...
Markdown
UTF-8
1,862
2.59375
3
[ "CC-BY-3.0" ]
permissive
--- name: "article" path: "/article1" date: 2019-08-01T17:12:33.962Z title: "Рекорд по набору текста с помощью нейроинтерфейса" pre: "В Китае установили рекорд по набору текста с помощью нейроинтерфейса: на одну букву по полсекунды. Аппарат продемонстрировали на Всемирной конференции роботов. Вэй Сывэнь, сотрудник Тянь...
PHP
UTF-8
1,116
2.984375
3
[]
no_license
<?php namespace VkApiSDK\ApiTypes\Database; use VkApiSDK\BaseType; use VkApiSDK\ApiTypes; class City extends BaseType { protected static $requiredParams = []; protected static $map = [ 'id' => true, 'title' => true, 'area' => true, 'region' => true, 'important' => ApiTypes\Base\...
Java
UTF-8
572
2.90625
3
[]
no_license
package com.yc.model.Observer; /** * @author cfun * @description 李斯 * @date 2019-11-14 */ public class LiSi implements IliSi { @Override public void update(String str) { System.out.println("李斯:观察到韩非子活动,开始向老板汇报了..."); this.reportToQinShiHuang(str); System.out.println("李斯:汇报完毕...\n");...
C
UTF-8
1,138
3.671875
4
[ "MIT" ]
permissive
#include <stdio.h> /* LEE LAS INSTRUCCIONES COMPLETAS ANTES DE EJECUTAR ESTE PROGRAMA. 1) Observa con detenimiento este código. 2) Escribe en un comentario el output que esperas ver en la consola. 3) Compila y ejecuta el programa. 4) Compara tus predicciones con el resultado 5) Explica con tu...
JavaScript
UTF-8
3,533
2.84375
3
[ "MIT" ]
permissive
/** * BiliOB-Watcher * * @author FlyingSky-CN * @package audioVisual */ $('#music').attr('width', audioVisualConfig.width); $('#music').attr('height', audioVisualConfig.height); var canvasCtx = document.getElementById("music").getContext("2d"); var AudioContext = window.AudioContext || window.webkitAudioContext...
Ruby
UTF-8
679
2.84375
3
[]
no_license
require 'rubygems' require 'nokogiri' require 'open-uri' require 'csv' require 'pry' zipcodes = [] CSV.foreach("zipcode.csv", headers: true) do |row|{ zipcode: row['zipcode'] } row.each { |key,value| zipcodes << value } end zipcodes.each do |code| url = "http://www.zillow.com/homes/#{code}_rb" html = open(u...
Markdown
UTF-8
654
2.546875
3
[]
no_license
# Jeff’s dotfiles Mostly just my vim, tmux, and bash configs. ### Install Warning, this will replace some files in your home directory, and includes my own opinionated configs; read the source and use with care. 1. Clone this repo. 2. Symlink the files in this repo to your home directory. You'll also need to clone...
JavaScript
UTF-8
158
2.921875
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Write your code here let num1 = 31; let num2 = 2; let multiply = num1 * num2; let random = Math.random(); let mod = 4%10; let max = Math.max(5,20,15);
C++
UTF-8
216
3.171875
3
[]
no_license
#include <iostream> #include <ctype.h> using namespace std; int main() { char a; cout << "enter a symbol: "; cin >> a; if (isalpha(a)){ cout << "alphabet";} else{ cout << "not alphabet";} return 0; }
Swift
UTF-8
677
2.59375
3
[]
no_license
// // CommentCell.swift // TessafoldTest // // Created by Ali jaber on 26/04/2021. // import UIKit class CommentCell: UITableViewCell { @IBOutlet weak var commentLabel: UILabel! var comment: Comment? { didSet { setUI() } } override func awakeFromNib() { super.awa...
Markdown
UTF-8
4,381
3.078125
3
[]
no_license
# Executive Summary ## 1.1. Company Description Embark integrates the latest technology into all projects putting clients ahead of the game. Other companies say they're innovative, when in reality they're using technology that has been around for years. Embark comes up with 'out-of-the-box' solutions, as well as bein...
Markdown
UTF-8
1,709
3.21875
3
[]
no_license
# Css&Less - 命名 - 类名及id全部小写,中划线分隔 - 例: ```css .my-class { font-size: 20px; } #my-id { background: transparent; } ``` - less变量 - 变量、函数、混合等采用驼峰式命名 ```less @baseColor: #f938ab; @successColor: green; @warnColor: red; .box { background: @baseCo...
JavaScript
UTF-8
1,733
3.109375
3
[]
no_license
//This is an example of a component that ONLY uses an Action Creator from the Redux Reducer to make a call to get an array of swag objects that render maps to a bunch of <Swag /> objects that get displayed. There are NO STATE subscriptions in this example. import React, { Component } from "react"; import './Shop.css';...
Markdown
UTF-8
4,021
2.8125
3
[]
no_license
--- title: "Setting some goals for 2020" author: John Peart excerpt: "Another year, another set of goals." layout: post image: /assets/images/social/goals/goals.png category: - personal --- 2019 has been, on the whole, pretty successful. I worked on [things that really mattered](https://www.gov.uk/government/public...
TypeScript
UTF-8
408
3.453125
3
[]
no_license
let multiply = function (x, y) { return x * y } let multiplyTs = function (x: number, y: number): number { return x * y } console.log(multiply(2, 3)) console.log(multiplyTs(5, 8)) // Arrow Functions let divide = (x, y) => { return x / y; } let divideTs = (x: number, y: number): number => { return ...
Rust
UTF-8
2,792
3.359375
3
[]
no_license
use std::ops::RangeInclusive; use crate::{ easing::{Easing, Linear}, tweenable::Tweenable, }; #[derive(Debug)] pub struct Stage<T: Tweenable> { pub duration: f32, pub values: RangeInclusive<T>, pub easing: Box<dyn Easing>, } #[derive(Debug, Clone, Copy)] enum State { Running { stage_index: usize, time: f32 }, ...
Java
UTF-8
305
1.757813
2
[]
no_license
package com.alipay.android.phone.mobilecommon.multimediabiz.biz.persistence.db; import android.content.Context; public interface DbHelperCreator { DbHelper getDbHelper(Context context); String getDbName(); int getDbVersion(); OnDbCreateUpgradeHandler getOnDbCreateUpgradeHandler(); }
Java
UTF-8
588
2.015625
2
[]
no_license
package com.v2.coaching.di.module; import android.content.Context; import com.v2.coaching.Ui.Activity.BaseMain; import com.v2.coaching.di.ActivityContext; import dagger.Module; import dagger.Provides; /** * Created by janisharali on 08/12/16. */ @Module public class ActivityModule { private BaseMain mBaseMai...
Swift
UTF-8
656
2.5625
3
[]
no_license
// // SpeechRecognizer.swift // Watson Conversation // // Created by Marco Aurélio Bigélli Cardoso on 10/04/17. // Copyright © 2017 IBM. All rights reserved. // import Foundation @objc protocol SpeechRecognizer: class { weak var delegate: SpeechRecognizerDelegate? { get set } func startRecording() fun...
Java
UTF-8
447
1.765625
2
[]
no_license
package com.ml.blog.service; import com.github.pagehelper.PageInfo; import com.ml.blog.entity.Message; /** * @author Mr.ml * @date 2021/1/16 */ public interface MessageService { int saveMessage(Message message); int removeMessage(Integer messageId); int updateMessage(Message message);...
Python
UTF-8
307
2.703125
3
[]
no_license
from collections import Counter def bairro_mais_custoso(dg): ds = {} soma = 0 for k, v in dg.items(): v2 = v[6:12] for i in v2: soma += i ds[k] = soma k = Counter(ds) m = k.most_common(1) return m
JavaScript
UTF-8
1,049
3.515625
4
[]
no_license
function sort(arr) { heapify(arr); // O(N) T let right = arr.length - 1; // O(NLog(N)) T while (right > 0) { swap(arr, 0, right); right--; sink(arr, 0, right); } return arr; } // O(N) T function heapify(arr) { let lastParentIdx = Math.floor((arr.length - 2) / 2); ...
Java
UTF-8
587
1.875
2
[]
no_license
package org.onedatashare.server.service; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.onedatashare.server.service.oauth.DbxOauthService; import org.springframework.beans.factory.annotation.Autowired; public class DbxOauthServiceTest { @Autowired private D...
C#
UTF-8
1,022
2.5625
3
[ "MIT" ]
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. using System.Linq; namespace MvcApi.Query { /// <summary> /// Represents a query option like $filter, $top etc. /// </summary> public interface IStructuredQueryPart { ...
Ruby
UTF-8
426
3.890625
4
[]
no_license
# password.rb #Write a program that displays a welcome message, but only after the user #enters the correct password, where the password is a string that is defined as #a constant in your program. Keep asking for the password until the user enters #the correct password. PWD = "bubble" loop do puts "Please enter yo...
Java
UTF-8
546
1.851563
2
[]
no_license
package com.snap.core.db.record; import com.snap.core.db.record.BestFriendModel.Creator; /* compiled from: lambda */ public final /* synthetic */ class -$$Lambda$ktw8M_f8IJdmsC-qellLlsv2DwM implements Creator { public static final /* synthetic */ -$$Lambda$ktw8M_f8IJdmsC-qellLlsv2DwM INSTANCE = new -$$Lambda$ktw8...
C++
UTF-8
504
2.953125
3
[]
no_license
// Strings.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <string.h> #include <iostream> using namespace std; #pragma warning(disable: 4996) void foo(char *s) { cout << s << endl; } int _tmain(int argc, _TCHAR* argv[]) { foo("This is const string"); char name2[10]; ...
Java
UTF-8
380
2.796875
3
[]
no_license
package com.mnikiforov.testing_sber.t2016.c3_ooconcepts; /** * Created by Zigzag on 16.10.2016. */ public class Polimorphism_A { protected int i = 1; public Polimorphism_A() { System.out.println("A"); setI(); } public void setI() { System.out.println("A.setI"); i = ...