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
TypeScript
UTF-8
3,379
3.109375
3
[]
no_license
const isString = require('lodash/isString'); const isNumber = require('lodash/isNumber'); const isObject = require('lodash/isObject'); import Logger from '@terrestris/base-util/dist/Logger'; import { ADD_ACTIVEMODULE, REMOVE_ACTIVEMODULE, SET_INITIALLY_ACTIVE_MODULE } from '../constants/ActiveModules'; /** * R...
C++
GB18030
4,980
3.15625
3
[]
no_license
//==================================================================================== //SOFTWARE: Non-local Elasto-plastic Continuum Analysis (NECA) //CODE FILE: Geometry_2D.h //OBJECTIVE: The definitions of point, line and shape in 2D //AUTHOR: Fei Han //E-MAIL: fei.han@kaust.edu.sa //=============================...
Markdown
UTF-8
7,038
2.640625
3
[]
no_license
<div id="hypercomments_widget" class="js-hypercomments-widget invisible"></div> # Тема 2. Надорганізмові рівні організації живої природи: популяція, екосистема, біосфера (11 год.) <table> <tr> <td width="50%" align="center"><b>Зміст навчального матеріалу</b></td> <td width="50%" align="center"><b>Навчальні дося...
Java
UTF-8
890
2.9375
3
[]
no_license
import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; public class CDPlayerTest { private CDPlayer player; private String cd; @Before public void before(){ player = new CDPlayer("Sony", "SE5", 4); cd = "Abba Gold"; } @Test public voi...
Python
UTF-8
289
2.953125
3
[]
no_license
#!/usr/bin/env python import re, sys convert = lambda text: int(text) if text.isdigit() else text alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key)] if __name__ == "__main__": sys.stdout.write(''.join(sorted(sys.stdin.readlines(), key=alphanum_key)))
C++
UTF-8
1,330
2.703125
3
[ "MIT" ]
permissive
#ifndef COthello_H #define COthello_H enum COthelloPieceValue { COTHELLO_PIECE_BORDER, COTHELLO_PIECE_NONE, COTHELLO_PIECE_WHITE, COTHELLO_PIECE_BLACK }; class COthelloPiece { public: static COthelloPieceValue otherPiece(COthelloPieceValue piece); }; class COthelloBoard { public: COthelloBoard(); vo...
C#
UTF-8
744
2.5625
3
[]
no_license
using AdventOfCode2020.Days.Day05.Calculator; using AdventOfCode2020.Days.Day05.Decoders; using AdventOfCode2020.Puzzles; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AdventOfCode2020.Days.Day05 { [Puzzle(5, 2)] public class Task2 : Day05 { protec...
Python
UTF-8
36,302
2.84375
3
[]
no_license
#---------------------------------------------------------------------- # Name: DOTS AND BOXES GAME # Purpose: PROJECT # # Author: SUSHEELA # # Created: 14/06/2015 # Copyright: (c) user 2015 # Licence: <your licence> #--------------------------------------------------------------------------...
Python
UTF-8
981
2.9375
3
[ "MIT" ]
permissive
import unittest from simple_ws import RequestParser class RequestParserTestMethods(unittest.TestCase): def test_valid_request(self): rp = RequestParser() input_head = "GET / HTTP/1.1\r\n" \ "Host: localhost:8080\r\n" \ "Connection: Upgrade\r\n" \ ...
Java
UTF-8
2,872
1.710938
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2000-2013 JetBrains s.r.o. * * 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 agre...
Python
UTF-8
78
3.03125
3
[]
no_license
def encontra_cateto(hip,cto): cta=((hip**2)-(-cto**2))**1/2 return cta
C#
UTF-8
3,228
2.890625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using EntityMap; using PayCare.Model; using PayCare.Repository.Mapping; namespace PayCare.Repository { public interface ICompanyRepository { Company GetById(Guid id); Company GetAll(); List<Company> S...
Markdown
UTF-8
3,114
3.0625
3
[ "MIT" ]
permissive
** **Practica 9: POO.Módulos** =========== **Autor:Alberto Martínez Chincho** ----------- **Introducción:** ------------- En esta practica vamos a desarrollar los módulos Mixin Enumerable y Comparable. Usaremos el modulo Comprable para la jerarquía de clases que desarrollamos en la practica anterior con algunas mo...
Java
UTF-8
1,267
1.757813
2
[]
no_license
package org.young.sso.server.service; import org.young.sso.sdk.resource.LoginUser; import org.young.sso.sdk.resource.SsoResult; import org.young.sso.server.beans.IdInfo; import org.young.sso.server.controller.form.PasswordForgetForm; import org.young.sso.server.controller.form.ValidateForm; import org.young.sso.server...
Java
UTF-8
2,214
2.734375
3
[]
no_license
package info.esblurock.reaction.chemconnect.core.base.contact; import com.googlecode.objectify.annotation.Entity; import com.googlecode.objectify.annotation.Index; import info.esblurock.reaction.chemconnect.core.base.DatabaseObject; import info.esblurock.reaction.chemconnect.core.base.dataset.ChemConnectCompoundDataS...
Java
UTF-8
1,363
3.484375
3
[ "MIT" ]
permissive
package com.holub; enum Currency{ USD, EURO; public double conversionRateTo(Currency target){ return 1.0; } } public class Money{ private double value; private Currency currency; public Money(double value, Currency currency){ this.value = value; this.currency = currency; } ...
Markdown
UTF-8
1,155
3.953125
4
[]
no_license
# 我所理解的js扁平化(拍平)数组的方法有哪些 **需求**: 将给定的数组拍平,即变成一维数组,你能想到哪几种方法。 ```js var arr = [1,2,[3,[4,5,[6]],7],8]; ``` ```js //第一种处理方法 var tempArr = JSON.stringify(arr).split(''); var arrFlat = []; for(var i=0;i<tempArr.length;i++){ if(!isNaN(Number(tempArr[i]))) arrFlat.push(Number(tempArr[i])) } ``` ```js //第二种方法 var arrFlat ...
Java
UTF-8
2,032
2.703125
3
[]
no_license
package com.hepolite.racialtraits.ability; import org.bukkit.ChatColor; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import com.hepolite.coreutility.apis.damage.Damage; import com.hepolite.coreutility.apis.damage.DamageAPI; import com.hepolite.coreutility.apis.damage.DamageType; import com....
PHP
UTF-8
553
3.484375
3
[]
no_license
<?php //Super class qui sera appliqué par les classes qui l'etendent abstract class Stats { //Initialisation de nos propriétes qui a une visibilité protected protected $nom = "test"; protected $pdv = 0; protected $atk = 0; protected $def = 0; //Initialisation de notre accesseur qui retourne notre propriéte no...
Python
UTF-8
812
3
3
[]
no_license
import sys stdin = sys.stdin ixs = range(4) for i in xrange(int(stdin.readline())): print "Case #%i: " % (i+1), rows = [stdin.readline()[:4] for i in ixs] cols = [[row[i] for row in rows] for i in ixs] diags = [ [rows[i][i] for i in ixs], [rows[i][3-i] for i in ixs] ] notdone =...
Java
UTF-8
1,711
2.796875
3
[]
no_license
package pro.woz.swarm.clients.producers; import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.clients.producer.RecordMetadata; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.util.concurrent....
Java
UTF-8
426
2.453125
2
[]
no_license
package framework.exceptions; public class ServiceNotFoundException extends Exception { private static final long serialVersionUID = 5650216591219543299L; private String service; public ServiceNotFoundException(String msg, String resourceName) { super(msg); setService(resourceName); } public void setServi...
Java
UTF-8
147
1.929688
2
[]
no_license
package service; import model.Person; public interface EditService { public Person getPerson(); public void savePerson(Person person); }
Markdown
UTF-8
3,131
3.34375
3
[]
no_license
### 2019 年 10 月 14 日-2019 年 10 月 18 日的作业答案 #### 1. 计算机包含哪些部分,至少写出 2 个,不局限分类方式。 #### A1CN1. 软件和硬件 #### A1EN1. Software and Hardware #### A1CN2. 控制器,运算器,存储器,输入设备,输出设备 #### A1EN2. Control Unit, Arithmetical Unit, Memory Unit, Input Devices, Output Devices #### A1CN3. 系统和应用 #### A1EN3. System and Application #### A...
C#
UTF-8
281
2.921875
3
[ "MIT" ]
permissive
using System; namespace T { public class Test { public static int Main () { int i = 12; object o = i; if (i.ToString () != "12") return 1; if (((Int32)o).ToString () != "12") return 2; if (o.ToString () != "12") return 3; return 0; } } }
Python
UTF-8
7,002
2.921875
3
[ "MIT" ]
permissive
#!/usr/bin/python ############################################################################### # # This script generates dihedral populations of passed columns in the # rotamer datafile. It also parses the survival probabilities of dunking states # and outputs histograms of dunking survival. The name is kind of a li...
Java
WINDOWS-1250
822
3.375
3
[]
no_license
public class cadenas{ public static void main(String[] args){ String telefono = "72-25-14-23-62"; int indice1 = telefono.indexOf('1'); System.out.println("El ndice del carcter buscado es: "+ indice1); int indice2 = telefono.indexOf('-', 4); System.out.println("El segundo ndice es: "+indice2); System.ou...
JavaScript
UTF-8
2,033
2.78125
3
[]
no_license
var intervalID; $("#registerSubmit").on("click", function () { console.log("Pressed submit button!"); let email = $(".email").val() ; let password = $(".password").val(); var text = '{ "email" : "' + email + '", "password" : "' + password + '"}'; console.log("Trying register with email: " + email);...
PHP
UTF-8
4,243
2.546875
3
[]
no_license
<?php include('mysql.php'); date_default_timezone_set('UTC'); $req_liste_inscrit = $bdd->prepare('SELECT id, caem FROM inscrits WHERE val_email_j = ? AND valeur_inscrit = ?'); $req_liste_inscrit->execute(array(1, 1)); $donnees_liste_inscrit = $req_liste_inscrit->fetch(); $jour = time() - 60*60*18; $jour1 = time() - 60...
JavaScript
UTF-8
2,931
2.59375
3
[ "MIT" ]
permissive
/** * Created by yinziwei on 2018/4/7. */ function enterCerticateDatil(id) { var data = {}; data.certificateId = id; $.ajax({ type:"POST", url:"/certificate/certificateOnclick/certificateDetail", data:JSON.stringify(data), contentType:"application/json", dataType:"...
C#
UTF-8
517
3.0625
3
[]
no_license
using System; class Program { static void Main() { var thankyou = new List <string>() {"Thank", "You"} Console.WriteLine(string.Join("", Method()));. } //<sumary> //Methid create arrays //</summary> //<returns> An array. </returnd> ...
C++
UTF-8
1,397
3.625
4
[]
no_license
#include <iostream> #include <vector> class Solution { public: std::vector<std::vector<int>> permuteUnique(std::vector<int> &nums) { std::vector<int> base; std::sort(nums.begin(), nums.end()); return permute_recursively(nums, base); } std::vector<std::vector<int>> permute_recursiv...
C#
UTF-8
2,668
2.765625
3
[]
no_license
using System.IO; using System.Linq; using CCDPlanetHelper.Database; using CCDPlanetHelper.Models; using Fooxboy.NucleusBot.Interfaces; using Fooxboy.NucleusBot.Models; using Newtonsoft.Json; namespace CCDPlanetHelper.Commands { public class RemindersCommand:INucleusCommand { public string Command => "r...
Java
UTF-8
3,071
2.09375
2
[]
no_license
package io.codelirium.examples.facade; import io.codelirium.examples.facade.controller.GreetingsController; import io.codelirium.examples.facade.controller.UrlMappings; import io.codelirium.examples.facade.service.FacadeService; import io.codelirium.examples.facade.service.GreetingsFacadeServiceImpl; import io.codelir...
C++
UTF-8
4,946
2.90625
3
[]
no_license
//Modified the starting code of a button from http://www.instructables.com/id/How-to-control-your-TV-with-an-Arduino/ //Tutorials and examples from https://www.arduino.cc/en/Tutorial/Button were used to help with the code int IRledPin = 13; // LED connected to digital pin 13 int buttonPin = 3; //Button connect...
Java
UTF-8
13,771
2.28125
2
[]
no_license
package by.epam.dao; import by.epam.entity.Company; import by.epam.entity.User; import by.epam.entity.UserHistory; import by.epam.entity.UserType; import by.epam.exception.DAOException; import by.epam.pool.ConnectionPool; import java.sql.*; import java.util.ArrayList; import java.util.List; import java.util.ResourceB...
Java
UTF-8
255
2.765625
3
[]
no_license
class Test { public static void main(String[] args){ new Test().m(); } public void m(){ class Inner { public void sum(int x, int y){ System.out.println(x+y); } } Inner inner = new Inner(); inner.sum(1,2); inner.sum(2,3); } }
C++
UTF-8
1,373
3.609375
4
[]
no_license
#include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode *reverseBetween(ListNode *head, int m, int n) { ListNode *p, *q, *x; int i, rots; if (head == NULL || m == n) ...
C#
UTF-8
1,722
3.015625
3
[]
no_license
// Copyright (c) 2014 Jonathan Magnan (http://zzzportal.com) // All rights reserved. // Licensed under MIT License (MIT) // License can be found here: https://zextensionmethods.codeplex.com/license using System.IO; public static partial class StringExtension { /// <summary> /// A string extension method t...
C++
UTF-8
1,886
3.1875
3
[]
no_license
#pragma once #include <iostream> class Derived; class Base { public: friend class Test; Base() :m_Id(++s_CurrentId) { std::cout << "Base Constructor" << std::endl; } //Base(const Base& i_Other) = delete; virtual void Print() const { std::cout << "Base Print" << std::endl; } virtual void PrintInt(int i) ...
PHP
UTF-8
5,203
2.59375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php class Spaces_model extends CI_Model { function __construct() { parent::__construct(); $this->load->database(); } function loadFeaturedSpaces() { return $this->db->query("SELECT * FROM areas_information WHERE featured = 1 ORDER BY area_name")->result_array(); } ...
Java
UTF-8
668
1.953125
2
[]
no_license
package com.site.service.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.site.core.base.AbstractManagerImpl; import com.site.core.mybatis.Dao; import com.site.dao.PosTPayflowDao; import com.site.entity.PosTPayflow; import com.site.service.PosTPayflowService; /** ...
Java
UTF-8
2,995
2.796875
3
[]
no_license
package org.test.junit; import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.List; import org.junit.AfterClass; import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runn...
JavaScript
UTF-8
1,335
3.015625
3
[]
no_license
const quotes = [ { quote: "Travel expands the mind and fills the gap1.", author: "Sheda Savage" }, { quote: "Travel expands the mind and fills the gap2.", author: "Sheda Savage" }, { quote: "Travel expands the mind and fills the gap3.", author: "Sheda ...
Java
UTF-8
498
2.4375
2
[]
no_license
package com.huangpan; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; public class MyAdvice { public void mybefor(JoinPoint jp) { System.out.println("前..."); } public void myafer(JoinPoint jp) { System.out.println("后..."); } public Object myaround(ProceedingJoinPoint...
Java
UTF-8
1,663
2.640625
3
[]
no_license
package ca.judacribz.week5day1_test; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView; import java.util.Map; public class MainActivity extends AppCompatActivity { EditText etQ1, ...
Python
UTF-8
2,701
3.109375
3
[ "BSD-3-Clause" ]
permissive
""" Interpolation of an SVF generated by a function and 3 of its integral curves for given initial points computed with the scipy integration method. """ import copy import matplotlib.pyplot as plt import numpy as np from scipy.integrate import ode from calie.fields import compose as cp from calie.fields import gener...
C++
UTF-8
761
2.890625
3
[]
no_license
#include<iostream> #include<vector> #include<algorithm> #include<math.h> using namespace std; int main() { vector<vector<int>> vect,vectf; cout<<"enter the capacity"; int x; cin>>x; for(int i=0;i<x;i++) { vector<int> vect1; for(int i=0;i<2;i++) { i...
Ruby
UTF-8
122
2.609375
3
[]
no_license
# frozen_string_literal: true # Gigasecond time from X class Gigasecond def self.from(time) time + 10**9 end end
C
UTF-8
473
3.25
3
[]
no_license
/** Gabiel Augusto Requena dos Reis - 16.2.8105 Sistemas de informacao - CSI030 */ #include <stdio.h> int main(void){ float a,b; printf("Insira o valor da base do retangulo: "); scanf("%f",&a); printf("Insira a altura do retangulo: "); scanf("%f",&b); system ("cls"); pri...
Python
UTF-8
218
3.140625
3
[]
no_license
N = int(input()) a = sorted((int(i) for i in input().split()), reverse=True) alice = 0 bob = 0 for i in range(0, N, 2): try: alice += a[i] bob += a[i+1] except: pass print(alice - bob)
JavaScript
UTF-8
2,810
4.46875
4
[]
no_license
// Create a function that takes a string and returns true or false, depending on whether the characters are in order or not. function isInOrder(str) { str = str.split('') let comparator = str.slice() comparator = comparator.sort() return str.join() === comparator.join()? true: false } // isInOrder...
C#
UTF-8
1,885
3.109375
3
[]
no_license
using System; using System.Globalization; using System.IO; using System.Windows.Data; using System.Windows.Media.Imaging; namespace Video03 { /// <summary> /// Converts a full path to a specific image type of a drive, folder or file. /// </summary> // attribute for easier findings [ValueConve...
Java
UTF-8
709
2.265625
2
[ "Apache-2.0" ]
permissive
package com.example.restaurant.bean; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; @AllArgsConstructor @NoArgsConstructor @Data public class User { private Integer user_id; private String user_name; private String user_password; priva...
Shell
UTF-8
408
2.9375
3
[]
no_license
if [ "$USE_UNICODE_GLYPHS" = "y" ] then GIT="\ue725" GITHUB="\uf113 " GITLAB="\uf296 " DIRTY="!" NEW="?" UP="\uf63e" DOWN="\uf63b" FOLDER="\uf07c " AWS="\uf0c2 " ERROR="\uf46e" ARROW=">" else GIT="branch:" GITHUB="GH" GITLAB="GL" DIRTY="!" NEW="?" ...
C++
ISO-8859-1
198
3.390625
3
[]
no_license
//Construa um algoritmo que apresente na tela os nmeros de 1 a 30. #include <iostream> using namespace std; main() { int x=1; while (x<=30) { cout << x <<"\n"; x++; } }
JavaScript
UTF-8
3,955
3.140625
3
[]
no_license
var canvas = document.getElementById("monCanvas"); var wW = canvas.width = 800; var wH = canvas.height = 800; var context = canvas.getContext('2d'); var cellSize = 50; var cells = []; var fps = 2; var COLUMN = 11; var ROWS = COLUMN; var lecture = false; function drawGrid(){ for (var i = 0; i < COLUMN; i...
Java
UTF-8
2,830
1.84375
2
[]
no_license
package com.ihk.saleunit.action.new_; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import com.ihk.property.data.pojo.PropertyDeveloper; import com.ihk.property.data.pojo.PropertyProject; import com.ihk.property.data.services.IPropertyDeveloperServices; import com.ihk...
Markdown
UTF-8
1,902
2.84375
3
[]
no_license
# File Transfer Application ## Introduction File Transfer Application between one main.Server and one main.Client with Authentication system built-in. The problem is to create a file transfer system that utilizes Socket Programming, Connection Management, Reliable Communication, and security protocol that utilizes SH...
C++
UTF-8
2,468
2.546875
3
[ "Apache-2.0" ]
permissive
#include <HAL/Devices/DeviceFactory.h> #include "AutoExposureDriver.h" namespace hal { class AutoExposureFactory : public DeviceFactory<CameraDriverInterface> { public: AutoExposureFactory(const std::string& name) : DeviceFactory<CameraDriverInterface>(name) { Params() = { {"p", "...
Shell
UTF-8
535
3.375
3
[ "MIT" ]
permissive
#!/bin/bash # Get the status from command line applet DROP_STATUS="$(dropbox-cli status)" # Define comparison strings SYNCED="Up to date" STOPPED="Dropbox isn't running!" if [ "$DROP_STATUS" == "$STOPPED" ]; then echo OFF # Long message echo OFF # Short message echo "#FF0000" # Red when off elif [ "$DROP_STATUS" ==...
PHP
UTF-8
1,564
3.25
3
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Тренируемся !!!</title> <?php $h = date('H'); # Присваеваем переменной текущее время (часы) ?> <style> body { b...
PHP
UTF-8
2,108
2.625
3
[]
no_license
<?php header('Content-Type: application/json'); $_POST = json_decode(file_get_contents('php://input'), true); if(isset($_POST['type'])){ if($_POST['type'] ==="Delete_General") { $table_name = $_POST['table_name']; $deleteListIndexBy = $_POST['deleteListIndexBy']; ...
Python
UTF-8
375
2.9375
3
[]
no_license
""" MY NOTE: assingment to x makes new list the e before the 'for' is not the new list only the temp place holder for each item in em. I assume the first occurence of e is to allow operations to be done on e post assingment """ import sys import re x = [e for e in sys.stdin if re.match("[A-z]+\s<[a-z](\w|\.|\_|-...
SQL
UTF-8
196
2.609375
3
[ "MIT" ]
permissive
DROP MATERIALIZED VIEW IF EXISTS object_type_cache CASCADE; CREATE MATERIALIZED VIEW object_type_cache AS SELECT hash, (git_parse_object_type(content))::objtype as type FROM objects;
Python
UTF-8
285
3.6875
4
[]
no_license
numero = int(input('Digite um número: ')) numeros_iguais = False while numero > 0 and not numeros_iguais: i1 = numero % 10 numero = numero // 10 i2 = numero % 10 if i1 == i2: numeros_iguais = True if numeros_iguais: print ('sim') else: print('não')
Rust
UTF-8
1,761
2.765625
3
[]
no_license
use crate::error::*; use crate::ir::*; use falcon::{il, RC}; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Program<V: Value> { functions: BTreeMap<usize, RC<Function<V>>>, } impl<V: Value> Program<V> { pub fn new() -> Program<V>...
Shell
UTF-8
3,905
4
4
[]
no_license
#!/usr/bin/dumb-init /bin/bash set -e # Note above that we run dumb-init as PID 1 in order to reap zombie processes # as well as forward signals to all processes in its session. Normally, sh # wouldn't do either of these functions so we'd leak zombies as well as do # unclean termination of all our sub-processes. # As ...
Python
UTF-8
159
3.40625
3
[]
no_license
def gen(n): print("ist value") yield n n+=1 print("2nd value") yield n n+=1 print("3rd value") yield name print(next(gen(3)))
Markdown
UTF-8
1,507
3.078125
3
[ "MIT", "CC-BY-4.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference" ]
permissive
## Application settings and HTTPS ### Verify application settings For your bot to function properly in the cloud, you must ensure that its application settings are correct. If you've already [registered](~/portal-register-bot.md) your bot with the Bot Framework, update the Microsoft App Id and Microsoft App Password...
Markdown
UTF-8
4,355
2.765625
3
[ "Apache-2.0" ]
permissive
# sovren-dotnet ![Nuget](https://img.shields.io/nuget/dt/Sovren.SDK?color=0575aa) ![GitHub](https://img.shields.io/github/license/sovren/sovren-dotnet?color=0575aa) ![Nuget](https://img.shields.io/nuget/v/Sovren.SDK?color=0575aa) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/sovren/sovren-dotn...
Markdown
UTF-8
1,545
2.921875
3
[]
no_license
Getting-Cleaning-Data ===================== Coursera's Getting &amp; Cleaning Data ## Steps followed in generating the tidy dataset * Download the zip file in the current working directory * Unzip the file in the "UCI HAR Dataset" subfolder in the current working directory * Read the subject_train, X_train and y_tra...
Java
UTF-8
1,836
2.515625
3
[]
no_license
package itcast.ssm.controller; import itcast.ssm.po.Items; import org.springframework.stereotype.Controller; import org.springframework.web.HttpRequestHandler; import org.springframework.web.bind.annotation.RequestMapping; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import j...
Python
UTF-8
18,420
2.671875
3
[]
no_license
import pygame from pygame import * import pygame.mixer #----CORES----------------- PRETO = (0, 0, 0) BRANCO = (255, 255, 255) CINZA = (100, 100, 100) VERMELHO = (120, 0, 0) VERDE_ESCURO = (0, 120, 0) VERDE_CLARO = (0, 255, 0) VERMELHO_CLARO = (255, 0, 0) AZUL = (0, 0, 255) COR_FUNDO = (54, 54, 54) COR_TABULEIRO = (0, ...
PHP
UTF-8
2,460
2.703125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Bridit\ExpertSenderApi\Tests\Request; use Bridit\ExpertSenderApi\Enum\HttpMethod; use Bridit\ExpertSenderApi\Request\SnoozedSubscribersPostRequest; /** * SnoozedSubscribersPostRequestTest * * @author Nikita Sapogov <p.zelant@gmail.com> */ class SnoozedSubscribersPostReque...
Java
UTF-8
1,835
2.5
2
[]
no_license
package com.example.android.note.Room; import android.app.Application; import android.os.AsyncTask; import java.util.List; import androidx.lifecycle.LiveData; public class ItemRepository { private ItemDao itemDao; private ItemDatabase itemDatabase; private LiveData<List<Item>> allNotes; public ItemR...
Java
UTF-8
342
1.585938
2
[]
no_license
package com.sys.monitor.mapper; import com.sys.monitor.entity.AppWhiteList; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * <p> * 白名单,不管接口慢成傻德行,都不管 Mapper 接口 * </p> * * @author willis * @since 2020-02-26 */ public interface AppWhiteListMapper extends BaseMapper<AppWhiteList> { }
PHP
UTF-8
809
2.578125
3
[]
no_license
<!-- This is the index page after the login --> <?php session_start(); include "../html/admin-header.html"; include "../function/connection.php"; include "../function/functions.php"; $user_data = check_login($con); $timestamp = strtotime($user_data['date']); $date = date("l jS \of F Y", $timestamp); $tim...
C++
UTF-8
1,046
2.53125
3
[]
no_license
#include "PlatformControl.h" PlatformControl::PlatformControl() { // Use Requires() here to declare subsystem dependencies Requires(platform); } // Called just before this Command runs the first time void PlatformControl::Initialize() { platform->setSpeed(0.0); } // Called repeatedly when this Command is schedule...
Shell
UTF-8
112
3.28125
3
[]
no_license
EXIT_CODE="$(($$ % 2))" echo "My exit code is: $EXIT_CODE" if [ $EXIT_CODE -ne 0 ]; then exit $EXIT_CODE fi
Python
UTF-8
1,617
3.09375
3
[]
no_license
import numpy as np import scipy.optimize from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import pandas fig = plt.figure() ax = fig.gca(projection='3d') def fitPlaneLTSQ(XYZ): (rows, cols) = XYZ.shape print(rows, cols) G = np.ones((rows, 3)) print(XYZ) pr...
PHP
UTF-8
1,531
2.546875
3
[ "BSD-3-Clause" ]
permissive
<?php namespace api\controllers; use yii\db\ActiveRecord; use yii\helpers\Json; use yii\rest\ActiveController; use common\models\Feedback; use yii\web\ServerErrorHttpException; use yii\httpclient\Client; class FeedbackController extends ActiveController { const SITE_VERIFY_URL = 'https://www.google.com/recaptcha...
Markdown
UTF-8
1,964
2.875
3
[ "MIT" ]
permissive
# Deep Remove Folders and Directories in Windows Welcome to the '**DeepRemove**' tool page! The tool that removes folder or directory structures that are too deep to remove by traditional tools or shell commands in Windows. ## Little bit of history I started this tool long time back in CodePlex to solve a recurre...
Python
UTF-8
3,243
2.90625
3
[]
no_license
from tkinter import * from tkinter.messagebox import * # some useful variable font=('verna',30,"bold") # important function def all_clear(): textfield.delete(0,END) def click_btn_function(event): global textfield print("btn clicked") b=event.widget text=b['text'] if text=="x": te...
Markdown
UTF-8
5,391
2.71875
3
[ "MIT" ]
permissive
--- layout: default title: Output nav_order: 5 --- # Output As described in the **tool manuscript**, the main output of the workflow consists on two files, which can be found in the **call-hipathia** task directory created by [cromwell](https://github.com/broadinstitute/cromwell). ## Circuit activity matrix **path...
PHP
UTF-8
499
2.515625
3
[]
no_license
<?php use app\entity; use PHPUnit\Framework\TestCase; class ProductoTest extends TestCase { public function TestObtenerProducto(){ $producto = new producto(); $producto -> id_producto('10'); $producto -> categoria('socalos'); $producto -> presentacion('saco'); $producto -> unidad_medida('kilo'); $producto -> pre...
C++
UHC
1,011
3.140625
3
[]
no_license
/* : ã ȣ: 11403 Ǯ̹ : BFS ¥ : 160821 Ÿ : BFSε 2 ϴ ƴ϶ ϳϳ ذϱ 1 ̽ ans ȴ. ٸ ׷ ̿ ʴ´. */ #include<iostream> #include<cstdio> #include<queue> using namespace std; int n; int arr[102][102]; int ans[102][102]; int flag[102]; queue<int> q; int main(void) { scanf("%d", &n); for (int i = 1; i <= n; i++) { for (i...
Python
UTF-8
1,260
3.3125
3
[]
no_license
import pdb class Solution: # @param num, a list of integer # @return an integer def findPeakElement(self, num): if not num: return if len(num) == 1: return 0 low, high = 0, len(num) pdb.set_trace() while low < high: ...
Python
UTF-8
161
3.34375
3
[]
no_license
def conta_a(string): cont=0 n=len(string) for i in range(0, len(string)): if string[i]=="a": contador+=1 return contador
C++
UTF-8
2,123
2.59375
3
[]
no_license
#include "TextureImporter.h" #include <crunch/inc/crnlib.h> #include <crunch/crnlib/crn_mipmapped_texture.h> #include <crunch/crnlib/crn_texture_conversion.h> #include <crunch/crnlib/crn_console.h> bool TextureImporter::importFile(const std::string &sourceFile, const std::string &outputFile) const { // Read the text...
C++
UTF-8
506
3
3
[]
no_license
#include <iostream> #include <vector> #include <ctime> using namespace std; vector<vector<int> > generateMatrix(int n); int main() { int n; scanf("%d", &n); clock_t runtime = clock(); vector<vector<int> > matrix = generateMatrix(n); runtime = clock() - runtime; FILE * ftime = fopen("runtime.txt", "w"); fprintf...
C#
UTF-8
6,686
2.609375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; using System.Web; using System.Net.Http; using System.Net.Http.Headers; using Newtonsoft; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Ninject.Activation; using Microsoft.As...
SQL
UTF-8
691
3.5625
4
[ "Apache-2.0" ]
permissive
CREATE TEMPORARY FUNCTION countColorMixDeclarations(css STRING) RETURNS NUMERIC LANGUAGE js OPTIONS (library = "gs://httparchive/lib/css-utils.js") AS r''' try { const ast = JSON.parse(css); return countDeclarations(ast.stylesheet.rules, {values: /color-mix\(.*\)/}); } catch (e) { return null; } '''; SELECT cl...
C#
UTF-8
3,035
2.890625
3
[]
no_license
/* * 描述: * 1. * * 修改者: 邓平 */ using System; using System.Collections; using System.Collections.Generic; using System.Text; using UnityEngine; namespace PracticeByDeng { public class CellSendStream { //数据缓冲区 private List<byte> _byteList = null; public Cel...
Markdown
UTF-8
871
3.75
4
[]
no_license
#### 编程练习 某班的成绩出来了,现在老师要把班级的成绩打印出来。 效果图: XXXX年XX月X日 星期X--班级总分为:81 格式要求: 1、显示打印的日期。 格式为类似“XXXX年XX月XX日 星期X” 的当前的时间。 2、计算出该班级的平均分(保留整数)。 同学成绩数据如下: "小明:87; 小花:81; 小红:97; 小天:76;小张:74;小小:94;小西:90;小伍:76;小迪:64;小曼:76" #### 任务 第一步:可通过javascript的日期对象来得到当前的日期。 提示:使用Date()日期对象,注意星期返回值为0-6,所以要转成文字"星期X" 第二步:一长窜的字符...
Python
UTF-8
1,133
4.25
4
[]
no_license
""" ----------------- Palindrome Check ----------------- Write a function that takes in a non-empty string and that returns a boolean representing whether the string is a palindrome. A palindrome is defined as a string that's written the same forward and backward. Note that single-character strings are palindromes. Sa...
Java
UTF-8
578
2.078125
2
[]
no_license
/*$Id$*/ package ru.naumen.NauChat.server; import java.util.List; import com.google.common.collect.Lists; /** * Реализация @MessagingService - пока просто при каждом вызове добавляет новое сообщение MessageXXX * @author ivodopyanov * @since 22.06.2012 */ public class MessagingServiceImpl implements MessagingServ...
Python
UTF-8
874
2.84375
3
[]
no_license
from flask import Flask from flask import render_template from flask import request app = Flask(__name__) @app.route("/hello", methods = ['POST', 'GET']) def index(): greeting = "Hello World" if request.method == "POST": name = request.form['name'] greet = request.form['greet'] gre...
C#
UTF-8
513
3.21875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Palindrome.Web.Extensions { public static class StringExtensions { public static bool IsPalindrome(this string str) { var allChars = str.Where(c => Char.IsLetter(c)).Select(c...
PHP
UTF-8
2,726
2.890625
3
[]
no_license
<?php namespace App\Console\Commands; use Artisan; use GuzzleHttp\Client; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; class CreateStorageSymlink extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'stor...