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
Rust
UTF-8
626
2.546875
3
[]
no_license
use std::marker::PhantomData; use crate::raw::RawValIter; pub struct Drain<'a, T: 'a> { pub vec: PhantomData<&'a mut Vec<T>>, pub iter: RawValIter<T>, } impl<'a, T> Iterator for Drain<'a, T> { type Item = T; fn next(&mut self) -> Option<T> { self.iter.next() } fn size_hint(&self) -> ...
C
UTF-8
463
3
3
[]
no_license
/*! @file * * @brief Library that performs math operations. * * This module contains routines that allows a caller to perform mathematical operations. * * @author APope * @date 2015-09-30 */ #ifndef MATH_H #define MATH_H #include "types.h" /*! @brief Calculates the square root of a number. * * @param n...
Markdown
UTF-8
1,039
2.640625
3
[]
no_license
# Membuat Account Type *(Instruksi kerja ini merupakan sub instruksi dari (1) [Membuat Journal](./membuat.md), atau (2) [Memodifikasi Journal](./memodifikasi.md). Instruksi kerja ini tidak bisa berdiri sendiri)* ## A. INPUT *(Tidak ada instruksi khusus)* ## B. LANGKAH KERJA 1. Klik label **Add an Item** pada tab *...
SQL
UTF-8
1,719
2.78125
3
[ "Apache-2.0" ]
permissive
-- @@@ START COPYRIGHT @@@ -- -- (C) Copyright 2015 Hewlett-Packard Development Company, L.P. -- -- 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/...
Shell
UTF-8
1,065
3.796875
4
[]
no_license
#! /bin/bash echo "Welcome to Arithmetic computation and sorting" read -p "Enter three number a,b,c: " a b c compute1=$(($a+$b*$c)) echo $compute1 compute2=$(($a*$b+$c)) echo $compute2 compute3=$(($c+$a/$b)) echo $compute3 compute4=$(($a%$b+$c)) echo $compute4 result[0]=$compute1 result[1]=$compute2 result[2]=$c...
Python
UTF-8
2,298
2.734375
3
[]
no_license
import json import requests from .models import Currency def get_data(url): """ :param url: str :return: dict """ response = requests.get(url) response.raise_for_status() return json.loads(response.content) def get_rates_exchangeratesapi(date=None, base=None, symbols=None): """ ...
Java
UTF-8
384
1.78125
2
[]
no_license
package com.bwie.majunbao.ui.activity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.bwie.majunbao.R; public class PaySuccessActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...
Markdown
UTF-8
1,344
3.5
4
[]
no_license
# hapi-routes-prefixer A simple plugin to prefix routes with strings such as '/v1' or '/api'. ## Why? When we want to apply prefix to individual route plugins but not to all of the plugins registered with the server object. ## Installation ```bash npm install --save hapi-routes-prefixer ``` ## Usage After inst...
C#
UTF-8
982
3.171875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Infrastructure.Algorithms; using Infrastructure.Core; using Infrastructure.Core.Interfaces; namespace Dijkstra_Demo { class Program { static void Main(string[] args) { ...
C#
UTF-8
684
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LearningInterfaces { class Transaction { private readonly IList<INotificationService> _notificationService; public Transaction() { _notificationSer...
Python
UTF-8
540
3.25
3
[]
no_license
N = int(input()) M = int(input()) graph = [[] for i in range(N)] for edge in range(M): a, b = [int(x) for x in input().split()] graph[a].append(b) graph[b].append(a) def dfs(vertex, graph, used = set()): used.add(vertex) for neighbour in graph[vertex]: if neighbour not in used: ...
C
UTF-8
520
3.875
4
[]
no_license
/** * arrays3.c - iterate through an unknown string (another way) (Solution) * * CS50 | Section 1 | Week 3 * * Thanks to Eric Ouyang and Frederick Widjaja * * =+ * * Prints each character in the name on one line */ #include <stdio.h> #include <cs50.h> int main(void) { // ask user for a string ...
JavaScript
UTF-8
1,881
3.21875
3
[]
no_license
$(document).ready(function () { function seatGeek(city) { var queryURL = "https://api.seatgeek.com/2/events?client_id=MjEyNTQ5ODF8MTU5ODMwNjk2Mi43&q=" + city; $.ajax({ url: queryURL, method: "GET", }).then(function (response) { // Printing the entire object to console c...
C#
UTF-8
1,011
2.828125
3
[ "MIT" ]
permissive
using static AdventOfCode.Common.Helpers; namespace AdventOfCode.Puzzles._2020; [Puzzle(2020, 13, CodeType.Fastest)] public class Day_13_Fastest : IPuzzle { public (string, string) Solve(PuzzleInput input) { var span = input.Span; var (myTime, i) = span.AtoI(); i++; var minTimeAfter = (id: 0, timeAfter: i...
Java
UTF-8
2,660
2.109375
2
[]
no_license
package com.jsmy.chongyin.viewholder; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.jsmy.chongyin.NetWork.NetWork; import com.jsmy.chongyin.R; import com.jsmy.chongyin.activity.MainActivity; import com....
TypeScript
UTF-8
2,004
2.671875
3
[]
no_license
import { Request, Response, NextFunction } from "express"; import { responseMessage } from "../../responsesMessage"; import Category from "../../config/models/Category"; interface ICategory { code: number; name: string; } export default { index: async (req: Request, res: Response, next: NextFunction) => { tr...
Java
UTF-8
2,158
2.4375
2
[]
no_license
package com.lou.weixin.sdk.constants; import org.apache.commons.lang3.StringUtils; /** * 公众号消息event类型 * * @author loufeng * @date 2018/7/4 下午4:02. */ public enum EventMsgType { /** * 上报地理位置事件 */ location, /** * 关注事件 */ subscribe, /** * 用户已关注时的扫描带参数二维码事件事件推送 */ ...
Java
UTF-8
2,503
2.375
2
[]
no_license
package com.tradevan.ptrs.rest.client; import java.io.File; import java.io.FileInputStream; import java.security.KeyStore; import javax.net.ssl.SSLContext; import org.apache.http.client.HttpClient; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.TrustSelfSignedStrategy; im...
Java
UTF-8
1,206
2.328125
2
[]
no_license
package com.example.lab1; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; public class DetailActivity extends AppCo...
JavaScript
UTF-8
1,535
2.546875
3
[ "MIT" ]
permissive
!function ($) { var defaults = { } var RadioButton = function (element, options) { this.$element = $(element), this.options = $.extend({}, defaults, options); }; RadioButton.prototype = { init : function (){ if(this.$element.data('radio') != 1){ this.$element.data('radio', 1); this.$element.wrap('...
C++
UTF-8
1,537
2.78125
3
[]
no_license
#ifndef NODE_HPP #define NODE_HPP #include <QMatrix4x4> #include "BaseObject.hpp" namespace SceneGraph { class Renderer; class Material; class Geometry; class Node : protected BaseObject { public: enum class Type { None, GeometryNode, TransformNode }; enum Flag { UsePreprocess = 1 << 0 }; private: friend ...
Python
UTF-8
338
3.46875
3
[]
no_license
#!/usr/bin/env python3 #-*- coding: utf-8 -*- def index_words_iter(text): if text: yield 0 for index, letter in enumerate(text): if letter == ' ': yield index + 1 def main(): address = 'Rour score and seven years ago...' result = list(index_words_iter(address)) print(r...
Java
UTF-8
783
2.296875
2
[]
no_license
package org.elias.springapp; import org.elias.springapp.entity.Person; import org.elias.springapp.repository.PersonRepository; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org....
Markdown
UTF-8
6,792
3.078125
3
[]
no_license
--- layout: "post" title: "Dockerizing your apps" date: 2016-05-26 14:16:54 permalink: dockerizing-your-app --- ###### Preface As some of you may already know, from the last autumn-2015 I'm working as a software engineer in startup company called [Upwork](https://upwork.com), in one of teams. From the time I started...
Markdown
UTF-8
2,047
3.46875
3
[ "MIT" ]
permissive
# Validation Rules Validations can be defined in a few ways, each has its PROs over others. ## Object with Options API Vuelidate 0.x supported defining rules as an object, and we kept this functionality, though it is limited compared to the other methods below. ```vue <script> export default { data: () => ({ ...
Python
UTF-8
539
4.46875
4
[]
no_license
num1 = float(input("Enter The First Number: ")) num2 = float(input("Enter The Second Number: ")) op = input("Enter The Arithmetic Operator: ") def add(): num3=num1 + num2 print(num3) def subtract(): num3=num1 - num2 print(num3) def multiply(): num3=num1 * num2 print(num3) def divide(): n...
Markdown
UTF-8
3,080
2.828125
3
[]
no_license
# my_server_http_web using c/c++ to build a program for http server in Linux 2018.5.21 基于Linux下多线程的web服务器 1.使用语言:c/c++ 2.项目介绍: 1)采用典型的c/s服务器框架结构 2)采用非阻塞I/O模型,同时通过erno值判断读取情况 3)采用Reactor事件处理模式: i)主线程只负责监听文件描述上是否有事件发生,有的话就立即将该事件通知工作线程。除此之外,主线程不做任何其他实质性的工作。工作流程如下(epoll为例): ...
C++
UTF-8
8,732
2.609375
3
[]
no_license
#include "aluno.cpp" //#include "prof.cpp" #include "engine.cpp" #define MAX 100 Tester t; void test_verifica() { t.open("verifica", 1); char str1[MAX] = "corda"; char str2[MAX] = "corda"; char str3[MAX] = "coracao"; char str4[MAX] = "faculdade"; t.add(verifica(str1, str2) == 1); t.add(...
C
ISO-8859-1
864
2.8125
3
[]
no_license
int taken[55] = {0}; int n, take[55][55], list[55] indegree[55]; int i, j, k; // when take[a][b] = 1, that means a must come before b // indegree[i] = number of items that that must come before i // when taken[i] = 1, means we already have taken ith item int invalid = 0; for(i=0; i<n; i++) { for(j=0; j<n; j+...
Java
UTF-8
1,524
3.78125
4
[]
no_license
/** * */ package ca.bcit.comp1510.lab2; //3. import java.util.Scanner; /** * Calculate how many cans of paint we need to paint a room. * @author Chih-Hsi Chang * @version 2017-09-19 */ public class Paint { /** * Make a useful tool. * @param args unused */ public static void main(String[] ...
SQL
UTF-8
801
3.625
4
[ "MIT" ]
permissive
SET xmloption = content; CREATE TABLE public.companys ( id uuid DEFAULT public.gen_random_uuid() NOT NULL, name text NOT NULL, description text NOT NULL ); CREATE TABLE public.users ( id uuid DEFAULT public.gen_random_uuid() NOT NULL, first_name text NOT NULL, last_name text NOT NULL, email ...
Markdown
UTF-8
372
2.5625
3
[ "MIT" ]
permissive
--- layout: project_single title: "Love all the different pieces, textures, and finishes. I'd kill for the piece in the foreground." slug: "love-all-the-different-pieces-textures-and-finishes-id-kill-for-the-piece-in-the" parent: "amazing-french-country-cottage-decor" --- Love all the different pieces, textures, and ...
C#
UTF-8
873
2.828125
3
[]
no_license
using UnityEngine; using UnityEngine.UI; public class DeathCounters : MonoBehaviour { public Text killValuesTxt; public Text highestKillsValueTxt; public void SetValuesText(int kills) { string text = "KILLS: " + kills.ToString(); killValuesTxt.text = text; } public void ...
Python
UTF-8
2,660
3.4375
3
[]
no_license
import random import simplegui # Global variables COMPUTER_SCORE = 0 HUMAN_SCORE = 0 human_choice = '' computer_choice = '' def choice_to_number(choice): # if choice == 'rock': # return 0 # elif choice == 'paper': # return 1 # else: return 2 return {'rock':0, 'paper':1, 'scissors':2}[choice] def number_to_c...
Java
UTF-8
152
1.578125
2
[]
no_license
import java.lang.*; public class myLZW1 { public static void main(String[] args) { System.out.println("Ahhhhhhh"); } }
Ruby
UTF-8
1,237
3.125
3
[ "JSON", "BSD-3-Clause" ]
permissive
module Seek module BioSchema # Handles a CSV row from the bioschema mapping definitions # A row contains - type, method, property # Provides the ability to validate the row, check if it matches a given resource, # and invoke the method to get the property value class CSVMappingInfo include A...
C
UTF-8
326
3.125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main() { int n,i,j,p=0,q=0; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d", &j); if(j >=10 && j <= 20){ p=p+1; }else{ q=q+1; } } printf("%d in\n", p); printf("%d out\n",q); return...
Markdown
UTF-8
11,587
3.3125
3
[]
no_license
# 单元测试 [toc] `testing` 为 Go 语言 package 提供自动化测试的支持。通过 `go test` 命令,能够自动执行如下形式的任何函数: ``` func TestXxx(*testing.T) ``` 注意:Xxx 可以是任何字母数字字符串,但是第一个字母不能是小写字母。 在这些函数中,使用 `Error`、`Fail` 或相关方法来发出失败信号。 要编写一个新的测试套件,需要创建一个名称以 _test.go 结尾的文件,该文件包含 `TestXxx` 函数,如上所述。 将该文件放在与被测试文件相同的包中。该文件将被排除在正常的程序包之外,但在运行 `go test` 命令时将被包含。 有关...
C++
WINDOWS-1252
2,896
2.65625
3
[]
no_license
#include "glut.h" #include <iostream> #include <stdlib.h> #include <stdio.h> #include <assert.h> #include <sstream> using namespace std; /* colores 1.0 0.0 0.0 red, duh 0.0 1.0 0.0 green, duh 0.0 0.0 1.0 blue, duh 1.0 1.0 0.0 yellow 1.0 0.0 1.0 purple 0.0 1.0 1.0 cyan 1.0 1.0 1.0 white 1.0 0.5 0.0 oran...
Ruby
UTF-8
305
2.5625
3
[ "MIT" ]
permissive
# -*- encoding : utf-8 -*- require 'megingiard/ansi_escape_code_validator' module Megingiard # As the name suggests class AnsiEscapeSequence def initialize(code) AnsiEscapeCodeValidator.instance.validate(code) @code = code end def to_s "\e[#{@code}m" end end end
JavaScript
UTF-8
12,383
2.875
3
[]
no_license
"use strict"; const htmlparser2 = require("htmlparser2"); const parse5 = require("parse5"); const cheerio = require("cheerio"); const util = require("util"); // Usado pela função util.inspect para depurar. const path = require("path"); // RegEx para checar o início do URL. // Serve para testar se começa com http:// ...
Java
UTF-8
643
1.851563
2
[]
no_license
package com.kakaobank.assignment.images; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.kakaobank.assignment.entity.util.DocumentUtil; public class FavoritesFragment extends AbstractImagesFr...
Java
UTF-8
99
1.757813
2
[]
no_license
package com.zyl.beginning.inheritence.paints; public interface Rendering { void doRender(); }
Shell
UTF-8
299
3.3125
3
[ "MIT" ]
permissive
#!/bin/sh # huy 2013-10-09 # Lists the keys used to encrypt the specified GPG files for i in "$@"; do echo "$i: \t\c" key=$(gpg --batch --list-only --decrypt --status-fd 1 $i 2>/dev/null | awk '/^\[GNUPG:\] ENC_TO / { print $3 }') gpg --list-keys "$key" | sed -n 's/uid[[:space:]]*//p' done
Markdown
UTF-8
2,620
3.125
3
[ "CC-BY-4.0", "CC-BY-3.0", "MIT" ]
permissive
--- id: 4780 title: Hacking Together an Auto-Tweeting Spreadsheet date: 2016-05-25T21:47:33+00:00 author: Brian Bennett layout: post guid: http://blog.ohheybrian.com/?p=4780 permalink: /2016/05/hacking-together-an-auto-tweeting-spreadsheet/ categories: - All - Projects - Technology --- A while back, I had looked ...
Ruby
UTF-8
2,506
2.671875
3
[]
no_license
require './test/test_helper' require './lib/game_setup' require './lib/board' require 'pry' class GameSetupTest < Minitest::Test def test_it_has_a_class gs = GameSetup.new assert_instance_of GameSetup, gs end def test_computer_two_unit_ship_is_not_nil gs = GameSetup.new gs.two_unit_placement ...
Java
UTF-8
1,968
2.3125
2
[]
no_license
package com.linhnv.foodsy.model; /** * Created by linhnv on 22/07/2017. */ public class OwnerRegister { private int id_user; private String display_name_user; private int id_place; private String display_name_place; private String address; private String phone_number; private String phot...
Java
UTF-8
3,331
2.34375
2
[]
no_license
package My.project.Ui.Fragment; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import My.project.Entity.Video; import My.project.Ui.R; import My.project.Util.Connector; import android.app.Activity; import android.app.ListFragment; import android.content....
Java
UTF-8
1,745
3.671875
4
[]
no_license
/** * * <b>LinkedList.java</b><br> * This is my single-linked list implementation using the * list interface. * * */ class LinkedList<E> implements List<E> { private Link<E> head; private Link<E> tail; protected Link<E> current; private int size; LinkedList(){ head = new Link<E>(null); current = t...
Python
UTF-8
129
3.46875
3
[]
no_license
ages = [('Joe', 9), ('Samantha', 45), ('Methuselah', 969)] for (name, age) in ages: print('{:10s} {:3d}'.format(name, age))
C
UTF-8
2,142
2.6875
3
[]
no_license
/************************************************************************* > File Name: error.c > Author: zhanglp > Mail: zhanglp92@gmail.com > Created Time: 2014年11月15日 星期六 19时59分43秒 > Description: ************************************************************************/ #include "pcl.h" #include <string.h...
Python
UTF-8
2,295
3.515625
4
[]
no_license
import random class Solution(object): def __init__(self, nums): self.nums = nums self.len = len(nums) def _swap(self, i, j): self.nums[i], self.nums[j] = self.nums[j], self.nums[i] def bubble(self): """ Time complexity: O(n^2) Space complexity: O(1) - inpl...
JavaScript
UTF-8
485
2.5625
3
[]
no_license
import { OPEN_MODAL, CLOSE_MODAL } from "../actions/types"; const initialState = { views: [] }; export default function modals(state = initialState, action) { switch (action.type) { case OPEN_MODAL: { return { ...state, views: state.views.concat(action.payload) }; } case CLOS...
Java
UTF-8
4,608
2.4375
2
[ "Apache-2.0" ]
permissive
package com.kymjs.model; import android.os.Parcel; import android.os.Parcelable; import java.util.List; import java.util.Objects; /** * 开源实验室博客 * * @author kymjs (https://kymjs.com/) on 12/2/15. */ public class Blog implements Parcelable { private String title; private String description; private St...
Java
UTF-8
20,940
2.265625
2
[]
no_license
package cn.teamar.genki.pos.basic.po; import java.util.ArrayList; import java.util.List; public class FoodMenuExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public FoodMenuExample() { oredCriteria = new ArrayList<Criteria>(); ...
C#
UTF-8
3,554
3
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Kiss.Data.Driver { /// <summary> /// SqlWriter /// </summary> public class SqlWriter { private const string indent = "\t"; private StringBuilder builder = new StringBuilder(); pr...
C
UTF-8
6,454
2.875
3
[]
no_license
/* gestionPartie.c ----- Rôle : contient des fonction gérant le jeu */ #include <stdlib.h> #include <stdio.h> #include <SDL/SDL.h> #include <SDL/SDL_image.h> #include <time.h> #include "variablesGlobales.h" struct Heros heros; int nivSuivant[NB_NIVEAUX] = {0,5,12,20,35,60}; void initialiserJeu(){ srand(time(NU...
C#
UTF-8
1,109
3.03125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Globalization; class ExamSchedule { static void Main(string[] args) { string hour = Console.ReadLine(); string minutes = Console.ReadLine(); m...
Java
UTF-8
247
2.75
3
[]
no_license
package main.code.days_30.day_21; public class Printer <T> { // Write your code here public void printArray(T[] array){ for (T element : array){ System.out.println(element); } } }
JavaScript
UTF-8
649
2.90625
3
[]
no_license
//index.js import React from 'react'; import ReactDOM from 'react-dom'; import './styles.css'; const rootElement = document.querySelector('#root'); const element = ( <div className="greeting"> <div className="greeting__title">Hello, world!</div> <div className="greeting__text">I'm learning React</div> </d...
Go
UTF-8
777
2.640625
3
[]
no_license
package utils import ( "github.com/hhkbp2/go-logging" "os" "time" ) func WriteLog(message string) { filePath := "./serverLog.log" fileMode := os.O_APPEND bufferSize := 0 buffersFlushTime := 30 * time.Second inputChanSize := 1 fileMaxByte := uint64(100*1024*1024) backupCount := uint32(9) handler := logging...
JavaScript
UTF-8
9,628
2.625
3
[]
no_license
import React from 'react'; import { Button} from 'react-bootstrap'; import axios from 'axios'; import Header from '../../Header/Header'; import './RegisterNewCCAdmin.css' import {NotificationManager} from 'react-notifications'; import { Link, withRouter } from 'react-router-dom' const emailRegex = RegExp( /^[a-zA-Z0...
Java
UTF-8
311
1.882813
2
[ "Apache-2.0" ]
permissive
package org.ihtsdo.otf.snomedboot; public class ReleaseImportException extends Exception { private static final long serialVersionUID = 1L; public ReleaseImportException(String message) { super(message); } public ReleaseImportException(String message, Throwable cause) { super(message, cause); } }
Java
UHC
928
3.59375
4
[]
no_license
package mypackage; public class StringPractice { public static void main(String[] args) { String str="korea "; str += "I love "; int year = 2018; str += year; String num = "12"; int sum = year + Integer.parseInt(num); str = str.replace("korea", "ѹα"); String str1 = str.substring(0, 3); System.out.pr...
C++
UTF-8
1,595
2.609375
3
[]
no_license
#include "rproduitinventaire.h" namespace Core { RProduitInventaire::RProduitInventaire( QObject *parent ) : QDjangoModel( parent ) { setForeignKey( "etat", new Etat( this ) ); setForeignKey( "inventaire", new Inventaire( this ) ); setForeignKey( "produit", new Produit( this ) ); } ...
Markdown
UTF-8
1,768
3.703125
4
[]
no_license
You have a long list of tasks that you need to do today. To accomplish task you need minutes, and the deadline for this task is . You need not complete a task at a stretch. You can complete a part of it, switch to another task, and then switch back. You've realized that it might not be possible to complete all the t...
Java
UTF-8
4,315
2.671875
3
[ "Apache-2.0" ]
permissive
package com.codepath.nytimessearch.adapters; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.codepath.nytimessearch.R; i...
JavaScript
UTF-8
2,121
3.296875
3
[ "MIT" ]
permissive
var tiempo = 1201; var tiempo1 = 1201; var idIntervalo; var idIntervalo1; function incrementarTiempo() { var cronometro; var horas = 0; var minutos = 0; cronometro = document.getElementById('tiempo'); tiempo--; segundos = tiempo; segundos = segundos % 60; mi...
Java
UTF-8
1,680
2.203125
2
[ "Apache-2.0", "MIT" ]
permissive
package org.robolectric.shadows; import static com.google.common.truth.Truth.assertThat; import static org.robolectric.Shadows.shadowOf; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.Canvas; i...
Shell
UTF-8
2,583
3
3
[]
no_license
#!/bin/sh # When this command is executed by the start script and # runs in the TestWorld directory PATH=`pwd`:$PATH # echo $PATH echo echo "* ================================================ *" echo "| Tests for CS270 Assignment 2 |" echo "| Comparison with Expected Output |" ec...
TypeScript
UTF-8
2,246
2.90625
3
[ "MIT" ]
permissive
import Schema from '../Schema'; /* eslint-disable import/export */ /* eslint-disable @typescript-eslint/no-var-requires */ export interface CurseforgeSource { /** * The curseforge project id */ projectId: number; /** * The file id */ fileId: number; } export interface Source { ...
Java
GB18030
926
2.59375
3
[]
no_license
package com.login.dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Dao { // private final static String DRIVER = "com.mysql.jdbc.Driver"; //URLָҪʵݿ private final static String URL = "jdbc:mysql://127.0....
C#
UTF-8
923
3.703125
4
[]
no_license
using System; using System.Collections; class HashCollection { static void Main(string[] args) { Hashtable objTable = new Hashtable(); objTable.Add(001, "John"); objTable.Add(002, "Peter"); objTable.Add(003, "James"); objTable.Add(004, "Joe"); Co...
C++
UTF-8
1,178
3.765625
4
[]
no_license
/*给定一个链表,两两交换其中相邻的节点,并返回交换后的链表。 示例: 给定 1->2->3->4, 你应该返回 2->1->4->3. 说明: 你的算法只能使用常数的额外空间。 你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。 */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { publi...
Python
UTF-8
359
3.03125
3
[]
no_license
import sys from datetime import datetime start = datetime.now() range_start = int(sys.argv[1]) range_end = int(sys.argv[2]) for i in range(range_start, range_end+1): if i%10**7==0: print(' %.0f%%'% ((i-range_start)/(range_end-range_start)*100)) print('%s-%s took %.0f seconds'%(range_start, range_end, (d...
C++
UTF-8
1,290
3.234375
3
[]
no_license
// // Created by Liang on 2019-07-14. // #include <string> #include <iostream> #include <cstring> using namespace std; class Solution { public: string longestPalindrome(string s) { // 计算字符串的最长子字符串 if(s.length() == 0) return ""; string new_s = ""; for(auto c: s){ ...
Java
UTF-8
2,077
2.078125
2
[]
no_license
package Constants.PageNavigation; import org.openqa.selenium.By; import Generics.All_Buttons; import SetUp.LaunchSetup; public class PageNavigation extends LaunchSetup{ public static void ER_ErVisit(){ All_Buttons.homeButton_click(); driver.switchTo().defaultContent(); driver.findElement(By.xp...
Java
UTF-8
1,716
2.109375
2
[]
no_license
package com.fernando.sinch.supermarket.controllers; import com.fernando.sinch.supermarket.dto.DTOKardex; import com.fernando.sinch.supermarket.json.JsonResponse; import com.fernando.sinch.supermarket.services.IKardex; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.ac...
C++
UTF-8
915
3.4375
3
[]
no_license
#include "./symbol_table.h" SymbolTable::SymbolTable() { UNDEFINED = new string[3]; UNDEFINED[0] = "undefined"; UNDEFINED[1] = "undefined"; UNDEFINED[2] = "undefined"; } void SymbolTable::add_member(string value, string type, string context) { string* new_member = new string[3]; new_member[0...
Java
UTF-8
3,206
2.140625
2
[]
no_license
package com.prog.sistemaeventos.model; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinTable; import javax.persis...
Java
UTF-8
983
3.3125
3
[]
no_license
package design_pattern.behavioral.state.singleton_machine_design; /** * 状态机的实现模式三:单例的状态模式 * * @author chenyuqun */ public class MarioStateMachine { // 当前的状态 private IMario currentState; private int score; public MarioStateMachine() { currentState = SmallMario.getInstance(); } publ...
Java
UTF-8
1,837
3.015625
3
[]
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 contabancaria; /** * * @author Aroldo */ public class Conta { /** DECLARANDO OS ATRIBUTOS DA CLASSE CON...
Python
UTF-8
1,155
2.515625
3
[ "BSD-3-Clause" ]
permissive
import magma as m from fault.verilogams import VAMSWrap, RealIn, RealOut, ElectIn, ElectOut def test_vams_wrap(): # declare the circuit myblk = m.DeclareCircuit( 'myblk', 'a', RealIn, 'b', RealOut, 'c', m.In(m.Bit), 'd', m.Out(m.Bits[2]), 'e', ElectIn, '...
Java
UTF-8
2,941
2.140625
2
[]
no_license
package com.company.service.impl; import java.util.ArrayList; import java.util.List; import org.junit.Test; import com.company.bean.Car; import com.company.bean.Car_level; import com.company.bean.Car_model; import com.company.bean.Color; import com.company.bean.Type; import com.company.bean.User; import...
Java
UTF-8
1,732
3.1875
3
[]
no_license
package leetcode.easy; public class BuddySettings { public boolean buddyStrings(String A, String B) { if(A.length() != B.length()){ return false; } if(A.length() == 0 || A.length() == 1){ return false; } if(A.length() == 2) { if(A.charAt(...
Rust
UTF-8
951
2.5625
3
[]
no_license
use crate::mir::*; use crate::ty::Subst; pub trait MirTy<'tcx> { fn ty(&self, tcx: TyCtx<'tcx>, vars: &impl LvalueTy<'tcx>) -> Ty<'tcx>; } impl<'tcx> MirTy<'tcx> for Operand<'tcx> { fn ty(&self, tcx: TyCtx<'tcx>, vars: &impl LvalueTy<'tcx>) -> Ty<'tcx> { match self { Operand::Lvalue(lvalue...
Java
UTF-8
219
1.5625
2
[]
no_license
package hello.service; import org.springframework.stereotype.Service; import hello.repo.Customer805Repository; @Service public class Customer805Service { public Customer805Service(Customer805Repository repo) { } }
C#
UTF-8
2,770
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.Diagnostics; using System.Management.Automation; using System.Text; using BranchingModule.Logic; namespace BranchingModule.Cmdlets { public abstract class BranchingModulePSCmdletBase : PSCmdlet, ITextOutputListener, IUserInputProvider, IDynamicParameters ...
Python
UTF-8
3,500
2.984375
3
[]
no_license
%%time from nltk.tokenize import word_tokenize import numpy as np import nltk nltk.download('punkt') def data_stream(): """Stream the data in 'leipzig100k.txt' """ with open('leipzig100k.txt', 'r') as f: for line in f: for w in word_tokenize(line): if w.isalnum(): ...
JavaScript
UTF-8
1,062
2.578125
3
[]
no_license
/** * @file db/actions/lightSensor.js * * @description provides an action layer for communicating with the lightSensor route */ /** * @function destroyLightSensorHist * @param {Object} data * @fires destroyLightSensorHistSvc * @description uses destroyLightSensorHistSvc() to send new lightSensor da...
Python
UTF-8
15,661
2.6875
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Website Feature Extraction """ import json import numpy as np import pandas as pd from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer # import sys # sys.path.insert(0, "/Users/bartramshawd/pyne...
C++
UTF-8
664
3.203125
3
[]
no_license
/* * C++ Primer 练习8.4个人答案 * 将按行读取和按单词读取写在同一个文件中 */ #include <iostream> #include <fstream> #include <string> #include <vector> //#define INPUT_IN_LINE using namespace std; int main(){ string ifile = "test.txt"; vector<string> vec; ifstream input(ifile); if(input){ string buf; #ifdef INPUT_IN_...
C#
UTF-8
989
3.015625
3
[]
no_license
using System.Linq; using System.Xml.Linq; namespace ConsoleApplication19 { class Program { static void Main(string[] args) { const string xml = @"<A><B id='ABC'><C name='A' /><C name='B' /><C name='C' /><C name='G' /></B><B id='ZYZ'><C name='...
Rust
UTF-8
2,883
2.765625
3
[ "MIT" ]
permissive
use bevy::prelude::*; /// Container for all the game's sprite sheets. #[derive(Resource, Debug)] pub struct SpriteSheets { pub character: Handle<TextureAtlas>, pub slash_attack: Handle<TextureAtlas>, pub thrust_attack: Handle<TextureAtlas>, pub terrain: Handle<TextureAtlas>, pub hearts: Handle<TextureAtlas>, pub...
Java
UTF-8
7,646
2.21875
2
[]
no_license
package com.centit.support.database.metadata; import com.centit.support.algorithm.NumberBaseOpt; import com.centit.support.algorithm.StringRegularOpt; import com.centit.support.common.JavaBeanField; import com.centit.support.compiler.Lexer; import com.centit.support.database.utils.FieldType; import org.apache.commons....
Markdown
UTF-8
1,757
2.640625
3
[]
no_license
# Composer WordPress Development Kit. WordPress Environment for PHP Built-in Server. ## Getting Started ### 1. Installation of PHP, composer, WP-CLI, MySQL , yq, cURL. PHP and cURL are pre-installed in Mac OS. If Composer, WP-CLI, MySQL , yq are not installed ,install through brew command ``` $ brew install co...
Markdown
UTF-8
5,327
3.4375
3
[]
no_license
九 这种所谓考验,大部分情形之下,都有匪夷所思的情节——更多的情形是,考验的过程,根本不是人力所能胜任,而要靠“天意”的帮助,情形十分可笑,属于蛮荒民族无知行为之一。 我想到这里,忍不住道:“看来,你们崇拜的神,并不保佑那三位国王。” 土王脸色阴沉,并不出声,我心想有关他人信奉的神,最好不要多开玩笑,所以转口道:“也就是说,在贵国历史上,从来没有一个国王,可以通过传统的考验。” 他点了点头:“是——” 在说了一个字之后,他突然兴奋起来,提高声音:“所以,如果我能通过考验,就成为历史上第一个成功的国王,我的子民对我的拥戴也必然空前。” 我灵光一闪,突然想到了一些事,脱口就道:“...
Markdown
UTF-8
2,102
2.640625
3
[]
no_license
# Overview The **React/Redux** project was developed during my 30-day internship at TÜBİTAK Bilgem YTE.\ Server-side application is available in [this repository](https://github.com/umutbayramoglu/event-management-system-backend). # Getting Started 1. Clone this repository:\ `git clone https://github.com/umutbayramog...
Java
UTF-8
8,915
1.507813
2
[ "LGPL-2.0-or-later", "Apache-2.0" ]
permissive
/* * JBoss, Home of Professional Open Source * Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors * as indicated by the @author tags. All rights reserved. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made availabl...
Python
UTF-8
1,084
2.515625
3
[]
no_license
from fractions import gcd def lcm(a, b): return a*b//gcd(a, b) inFile = open("B-large.in", 'r') outFile = open('outputx.txt', 'w') lines = [] for i in inFile: i.strip lines.append(list(map(int, i.split(' ')))) tc=lines[0][0] lines = lines[1:] for iasdf in range(tc): n, m = lines[2*iasdf][0], li...