language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
C#
UTF-8
1,829
2.609375
3
[]
no_license
using FutureFinancingTriangle.Generator.Input; using FutureFinancingTriangle.Generator.Logic; using FutureFinancingTriangle.Generator.Output; using FutureFinancingTriangle.Generator.Wrappers; using Moq; using System.Collections.Generic; using Xunit; namespace FutureFinancingTriangle.Generator.Tests.Output { publi...
Python
UTF-8
4,321
2.734375
3
[]
no_license
#!/usr/bin/python3 import csv import sys import matplotlib.pyplot as plt import numpy as np from constants import * def read_from_csv(filenames, indicies): """ Indicies must be 4 elements """ f_x_vals, f_train, f_test, f_train_var, f_test_var = [], [], [], [], [] for i, filename in enumerate(filenames): ...
Python
UTF-8
5,107
2.59375
3
[]
no_license
###I run this in Google Colab #from __future__ import absolute_import, division, print_function, unicode_literals #try: # %tensorflow_version only exists in Colab. # !pip install -q tf-nightly #except Exception: # pass #import tensorflow as tf # tf.enable_eager_execution() #tf.executing_eagerly() im...
PHP
UTF-8
644
2.59375
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Prices extends Model { protected $table = 'prices'; protected $fillable = [ 'product_id', 'price', 'type', ]; protected $hidden = []; protected $dateFormat = 'U'; ////////// public static funct...
Python
UTF-8
1,569
3.46875
3
[]
no_license
import matematica as m func = [ [], lambda x: m.soma(*x), lambda x: m.somav(*x), lambda x: m.sub(*x), lambda x: m.subv(*x), lambda x: m.multi(*x), lambda x: m.dot(*x), lambda x: m.cross(*x), lambda x: m.produto(*x), lambda x: m.divisao(*x), lambda x: m.power(*x), lambda ...
PHP
UTF-8
2,988
2.640625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Message; use App\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class ChatsController extends Controller { public function __construct() { $this->middleware(function ($request, $next) { $this->user = Auth::user(); ...
Java
UTF-8
1,554
2.703125
3
[]
no_license
package com.leaning.KafkaStream; import org.apache.kafka.streams.KafkaStreams; import org.apache.kafka.streams.StreamsConfig; import org.apache.kafka.streams.processor.TopologyBuilder; import java.util.Properties; public class Application { public static void main(String[] args) { String brokers = "Cen...
Python
UTF-8
721
3.5625
4
[]
no_license
class Solution: def lengthOfLongestSubstring(self, s: str) -> int: l = len(s) if l <= 1: return l left = 0 right = 1 res = 1 while right < l: cur = s[left:right+1] cur_length = len(cur) if self.is_valid_str(cur): ...
Python
UTF-8
2,552
3.078125
3
[]
no_license
import sys, requests # pip install requests import webbrowser global nick # varivel nick como global x = sys.argv # x recebe sys.argv def ajuda(): print(""" ++++++++++++++++++++++++++++++++++++++++++++++++++ + -all => PROCURA TUDO (exceto o -tu) + -f => Facebook + -tw => Twitter + -i => Instagram + -tu =>...
PHP
UTF-8
318
2.53125
3
[]
no_license
<?php Class Login_model extends BaseModel { function __construct () { parent:: __construct(); } function get_user ( $email, $password ) { return $this->db->fetch( 'SELECT `id`, `firstname` FROM `account` WHERE `email` = ? AND `password` = SHA2( ?, 224 );', array( $email, $password ) ); } }
Java
UTF-8
1,050
3.578125
4
[]
no_license
package study.week02; import java.text.SimpleDateFormat; import java.time.Instant; import java.time.LocalDate; import java.time.LocalTime; import java.time.format.DateTimeFormatter; import java.util.Date; public class DateAndTime { public static void main(String[] args) { Date nowDate = new Date(); ...
Java
UTF-8
4,120
2.03125
2
[]
no_license
package com.jindan.jdy.controller.waimao; import com.jindan.jdy.common.pojo.WaimaoDowBankExpend; import com.jindan.jdy.common.pojo.WaimaoDowMarket; import com.jindan.jdy.controller.utils.WorkbookUtils; import com.jindan.jdy.service.waimao.WaimaoDowBankExpendService; import com.jindan.jdy.service.waimao.WaimaoDowMarket...
C++
UTF-8
1,021
3.65625
4
[]
no_license
// // main.cpp // Hypothenuse // // Created by Kevin Racapé on 22/08/2020. // Copyright © 2020 Kevin Racapé. All rights reserved. // #include <iostream> #include <cmath> int main() { float AB{0},AC{0},BC{0},squareBC{0}; std::cout << "Calculation of the Hypothenuse" << std::endl; std::cout << "Hyp...
C++
UTF-8
2,348
3.96875
4
[ "Apache-2.0" ]
permissive
// C++ program to find maximum path sum between two leaves of // a binary tree #include <iostream> using namespace std; // A binary tree node struct Node { int data; struct Node* left, *right; }; // Utility function to allocate memory for a new node struct Node* newNode(int data) { struct Node* node = n...
JavaScript
UTF-8
702
2.71875
3
[]
no_license
$(document).ready(function(){ $('.edit-comment').click( function(e){ e.preventDefault(); doALittleAjax(this); }); $('form').on('submit', function(){ var valuesToSubmit = $('.edit_comment').serialize(); alert(valueToSubmit); // $.ajax({ // url: $('#mail-form').attr('action'), //sumbits it to the given...
Java
UTF-8
694
1.890625
2
[]
no_license
package com.labwinner.dao; import java.util.List; import org.apache.ibatis.annotations.Param; import com.labwinner.domain.TeamMomentsLike; import com.labwinner.domain.TeamProjMomentsComment; public interface MomentsCommentDao { public void save(TeamProjMomentsComment momentsComment); public void delete(Integer...
JavaScript
UTF-8
3,638
2.90625
3
[]
no_license
// API Reference: https://www.wix.com/corvid/reference // “Hello, World!” Example: https://www.wix.com/corvid/hello-world import wixData from 'wix-data'; import {local} from 'wix-storage'; import wixLocation from 'wix-location'; const makeDropdown = "#makeDropdown"; const modelDropdown = "#modelDropdown"; const type...
TypeScript
UTF-8
383
2.6875
3
[]
no_license
import { IIngredients } from "../types/burger"; export enum ActionType { ADD_INGREDIENT = "ADD_INGREDIENT", REMOVE_INGREDIENT = "REMOVE_INGREDIENT" } interface Payload { ingredientName: string; } export interface IngredientActionTypes { actionType: ActionType; payload: Payload; } export interface ingredie...
Java
GB18030
822
2.53125
3
[]
no_license
import java.util.ArrayList; import java.util.List; /****************************************************************************** * Copyright (C) 2015 ShenZhen ComTop Information Technology Co.,Ltd * All Rights Reserved. * Ϊڿտơδ˾ʽͬ⣬κθˡ岻ʹá * ơ޸Ļ򷢲. *********************************************************...
Java
UTF-8
8,283
1.914063
2
[ "Apache-2.0" ]
permissive
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ package im.actor.core.js.modules; import java.io.IOException; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.HashSet; import im.actor.core.api.ApiFileLocation; import im.actor.core.api.ApiFileUrlDescription; import im.actor.core...
Java
UTF-8
1,700
2.453125
2
[]
no_license
package com.evertdev.lastfm; import com.evertdev.lastfm.common.DurationConverter; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ publi...
Python
UTF-8
1,907
3.40625
3
[]
no_license
#script in Python 3.7 import numpy as np import matplotlib.pyplot as plt import math # S = susceptible individuals # I = infectious individuals # β = infectious rate, controls the rate of spread which represents the probability of transmitting disease between a susceptible and an infectious individual # γ = recovery r...
Markdown
UTF-8
1,041
3.015625
3
[ "MIT" ]
permissive
# Contribution to this project Contributing is not just about code! There is much more to a project. Contributions can include: * **Starring** the project (at the top right) * **Logging** a bug / idea or commenting on an existing ticket (issue) * Fixing a **typo** in the text of the Application / website / document...
C
UTF-8
418
3.3125
3
[]
no_license
#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); for(a=1;a<=5;a++) { for(b=1;b<=5-a;b++) { printf(" "); } for(c=1;c<=a;c++) { printf(" *"); } printf("\n"); } for(a=4;a>=1;a--) { for(b=1;b<=4-a;b++) { printf(" "); ...
Java
UTF-8
1,675
2.75
3
[]
no_license
package com.uiFrameworkk.pentland.helper.window; import java.util.Set; import org.apache.log4j.Logger; import org.openqa.selenium.WebDriver; import com.uiFrameworkk.pentland.helper.logger.LoggerHelper; public class WindowHelper { private WebDriver driver; private Logger log = LoggerHelper.getLogger(Windo...
SQL
UTF-8
4,676
3.484375
3
[]
no_license
CREATE TABLE job ( id INTEGER PRIMARY KEY AUTOINCREMENT, tag VARCHAR(80) NOT NULL, state CHAR(1) NOT NULL DEFAULT "?", state_prev CHAR(1) NOT NULL DEFAULT "?", location VARCHAR(80) NOT NULL, foreign_id VARCHAR(80) DEFAULT NULL, mode VARCHAR(10) NOT NULL, parameters TEXT DEFAULT "", p...
JavaScript
UTF-8
2,139
2.75
3
[]
no_license
import React, { useState, useMemo } from "react"; import { Button } from ".."; import "./SequenceQuizCard.css"; //https://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array function shuffle(a) { for (let i = a.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [a[i], a[j]] =...
C++
UTF-8
470
2.65625
3
[]
no_license
#include<iostream> #include<algorithm> using namespace std; int main(){ int t; cin >> t; while(t--){ int n,k; cin >> n >> k; int a[10005]; int dem=0; for(int i=0; i<n; i++) cin >> a[i]; sort(a, a+n); for(int i=0; i<n; i++){ for(int j=i+1; j<...
Python
UTF-8
110
3.34375
3
[]
no_license
from math import * x = int(input("Enter x:")) y = ((e**(2*x)*sqrt(x)-((x+1/3)/x))**1/3)*abs(2.5*x) print(y)
JavaScript
UTF-8
5,638
2.796875
3
[]
no_license
function makeAjaxCall(url, cb){ var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); xhr.send(); xhr.onreadystatechange = function(){ if (xhr.readyState === 4 && xhr.status === 200){ //console.log(xhr.response); var responseJson = JSON.parse(xhr.response); cb(responseJson); } ...
JavaScript
UTF-8
561
2.71875
3
[ "MIT" ]
permissive
/* eslint-env mocha */ import "./helper"; import {assert} from "chai"; import Event from "../src/event"; import "../src/util"; describe("class Event", function(){ const event = new Event({ title: "party", where: "kazusuke", note: "酒池肉林", date: new Date() }); it("should have title, where and no...
Markdown
UTF-8
5,615
3.453125
3
[]
no_license
--- title: オートコンプリートの実装方法 --- # オートコンプリート機能の実装方法 オートコンプリートは使いやすい検索ボックスを作るのに便利な機能です。PGroongaにはオートコンプリートを実装するための機能があります。 次の検索を組み合わせることでオートコンプリートを実現できます。 * 前方一致検索 * 日本語のみ:ヨミガナでのオートコンプリート用に前方一致RK検索 * 緩い全文検索 ## サンプルスキーマとインデックス サンプルのスキーマを示します。 ```sql CREATE TABLE terms ( term text, readings text[] ); ``` ...
Java
UTF-8
8,522
1.898438
2
[]
no_license
package net.wit.dao; import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Set; import net.wit.Filter; import net.wit.Order; import net.wit.Page; import net.wit.Pageable; import net.wit.entity.*; import net.wit.entity.Tenant.Status; /** * <p> * Title: * </p> * <p> * Descrip...
C++
UTF-8
519
3.03125
3
[ "MIT" ]
permissive
#include <iostream> #include <algorithm> using namespace std; int knapSack(int W, vector<int> wt, vector<int>val, int n){ if(n==0|| W==0){ return 0; } if(wt[n-1] >W){ return knapSack(W, wt, val, n-1); } else return max(val[n-1]+ knapSack(W-wt[n-1], wt, val, n-1), knapSack(W,...
Python
UTF-8
461
3.765625
4
[]
no_license
l = [] n = int(input("Enter no of elements to be added in list : ")) i = 0 while i < n: get_num = int(input("Enter Value: ")) l.append(get_num) i += 1 value = int(input("Enter value to be found : ")) l.append(value) def sentinal(l, value): j = 0 while True: if l[j] == value: br...
Python
UTF-8
1,933
2.828125
3
[]
no_license
import struct import os from tarfile import _FileInFile as __FileInFile import tarfile import lzma class _FileInFile(__FileInFile): def seek(self, position, mode=0): """Seek to a position in the file. """ if mode == 0: self.position = position elif mode == 1: ...
Java
UTF-8
3,547
1.8125
2
[]
no_license
/** * AUTO GENERATED - DO NOT EDIT */ package com.vmail.service.support.delegate; import com.jwApps.collection.*; import com.jwApps.service.*; import com.jwApps.template.*; import com.jwApps.time.*; import com.jwApps.utility.*; import com.vmail.db.base.*; import com.vmail.model.*; import com.vmail.model.base.*; im...
C#
UTF-8
947
2.5625
3
[ "MIT" ]
permissive
namespace Cofoundry.Domain; /// <summary> /// Message published when properties that affect the URL /// of a page has changed (e.g. PageDirectoryId, UrlSlug, /// LocaleId etc). This message is not triggered if the URL /// indirectly changes e.g. if a parent directory changes. /// </summary> public class PageUrlChan...
Python
UTF-8
530
2.875
3
[ "BSD-3-Clause" ]
permissive
# Authors: # Loic Gouarin <loic.gouarin@polytechnique.edu> # Benjamin Graille <benjamin.graille@math.u-psud.fr> # # License: BSD 3 clause """ Example of a square in 2D with a circular hole with a D2Q13 """ import pylbm dico = { "box": {"x": [0, 1], "y": [0, 1], "label": 0}, "elements": [pylbm.Circle(...
Java
GB18030
3,132
2.171875
2
[]
no_license
package com.huaixuan.network.biz.dao.express; import java.util.List; import java.util.Map; import com.huaixuan.network.biz.domain.express.Express; import com.huaixuan.network.biz.domain.express.query.FreightStatisticsQuery; import com.huaixuan.network.biz.query.QueryPage; /** * * @version 3.2.0 */ public interfac...
Python
UTF-8
1,444
3.125
3
[ "MIT" ]
permissive
# _*_ coding: utf-8 _*_ # from linked_list import LinkedList import pytest def test_dll_init(): from src.double_linked_list import DblList test_list = DblList() assert test_list def test_dll_insert(): from src.double_linked_list import DblList test_list = DblList(['mom', '32', 43, [1, 2]]) t...
JavaScript
UTF-8
1,596
2.53125
3
[ "BSD-3-Clause" ]
permissive
import createVariants from '../createVariants'; describe('createVariants', () => { function test(withBase, withCallback) { // these are stupid examples but enough to prove transformation works const baseConfig = { name: 'bundle.base' }; const variants = { rtl...
JavaScript
UTF-8
430
2.734375
3
[]
no_license
const tail = require("../tail.js"); const assertEqual = require("../assertEqual.js"); const assert = require("chai").assert; describe("#tail", () => { const result = tail(["Hello","Lighthouse","Labs"]); it("returns true if the first element is Lightouse", () => { assert.deepEqual(result[0],"Lighthouse"); });...
C++
UTF-8
1,493
2.828125
3
[]
no_license
/** * @file cromosoma.h * @brief Definici&oacute;n de la clase Cromosoma. * @author Mar&iacute;a Andrea Cruz Bland&oacute;n * @date 09/2013, 11/2013 * **/ #ifndef CROMOSOMA_H #define CROMOSOMA_H #include <igraph.h> #include <vector> #include <unordered_set> using namespace std; class Cromosoma { private...
JavaScript
UTF-8
632
2.5625
3
[]
no_license
import React,{useEffect,useState} from 'react'; import axios from 'axios' import './App.css'; import DisplayPokemon from './components/DisplayPokemon' function App() { const[pokemon,setPokemon] = useState([]) const getPokemon = ()=>{ axios.get("https://pokeapi.co/api/v2/pokemon/") .then(response => {...
Java
UTF-8
2,645
2.9375
3
[]
no_license
package com.main; import java.sql.SQLException; import java.util.Scanner; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.bean.InvalidAgeException; import com.bean.Student; import com.dao.StudentDao; public clas...
Java
UTF-8
996
3.71875
4
[]
no_license
package com.leetcode.arrays; /** * https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ * * @author prabhakaran.nivanil * */ public class BuyAndSellStockOnce { public static void main(String[] args) { BuyAndSellStockOnce buySellStock = new BuyAndSellStockOnce(); int[] prices = new int[] { 7, 6, 4,...
PHP
UTF-8
6,941
2.671875
3
[]
no_license
<?php if (!defined('BASE_PATH')) exit('Access Denied!'); /** * * Freedl_Service_Cugd * @author fanch * */ class Freedl_Service_Cugd extends Common_Service_Base{ /** * 按条件检索单条记录 * @param array $params * @param array $orderBy * @return */ public static function getBy($params, $orderBy = array()){ if...
Java
UTF-8
589
1.632813
2
[]
no_license
package br.gov.pbh.desif.model.pojo; import br.gov.pbh.desif.model.pojo.base.AbstractRelatorioEstaticoApuracaoIssqnVO; import java.util.Date; public class RelatorioEstaticoApuracaoIssqnVO extends AbstractRelatorioEstaticoApuracaoIssqnVO { public RelatorioEstaticoApuracaoIssqnVO() { } public Relator...
Java
UTF-8
1,536
2.09375
2
[ "Apache-2.0" ]
permissive
/* * GeoAPI - Java interfaces for OGC/ISO standards * Copyright © 2005-2023 Open Geospatial Consortium, Inc. * http://www.geoapi.org * * 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 ...
Java
UTF-8
2,732
3.3125
3
[ "Apache-2.0" ]
permissive
package com.lucidworks.analysis; import java.util.ArrayList; import static java.lang.System.arraycopy; /** * Utility functions for working with character arrays. */ public class CharArrayUtil { public static boolean equals(char[] buffer, char[] phrase) { if (buffer == null || phrase == null) return fal...
Java
UTF-8
5,479
1.945313
2
[]
no_license
package fr.lekiosque; import io.appium.java_client.MobileElement; import io.appium.java_client.android.Connection; import org.junit.AfterClass; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; import org.openqa.selenium.By; import org.openqa.selen...
Java
UTF-8
1,338
2.125
2
[]
no_license
package iiitb.ebay.users.model; public class UserAddress { private int userID; private int userAddressID; private String address1; private String contactName; private String city; private String state; private int pinCode; public String getContactName() { return contactName; } public void ...
Ruby
UTF-8
377
3.53125
4
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
class Dog attr_accessor :owner, :mood attr_reader :name #when reading a book you are not changing it, when you are writing a book it is constantly changing @@all = [] def initialize(name, owner) @name = name @owner = owner @mood = "nervous" @@all << self end def self.all @@all end end...
Python
UTF-8
6,552
2.515625
3
[]
no_license
import numpy as np import cv2 from scipy.spatial import distance as dist def mouse_handler(event, x, y, flags, param): #마우스로 좌표 알아내기 if event == cv2.EVENT_LBUTTONUP: clicked = [x, y] print(clicked) def grab_cut(resized): mask_img = np.zeros(resized.shape[:2], np.uint8) #초기 마스크를 만든다. #grab...
PHP
UTF-8
1,286
2.5625
3
[ "MIT" ]
permissive
<?php namespace Magnum\Output\Render; use PHPUnit\Framework\TestCase; class MutableContextTest extends TestCase { public function testArrayInConstructor() { $payload = ['test' => 'context']; $mc = new MutableContext($payload); self::assertEquals($payload, $mc->provide('test')); } public function pr...
PHP
UTF-8
3,375
3.0625
3
[]
no_license
<?php require_once('../object/DBConnect.php'); require_once('../object/Question.php'); require_once ('../object/Choice.php'); class QuestionDao { private $dbConnect; function __construct() { $this->dbConnect = new DBConnect(); } public function get...
Python
UTF-8
498
2.8125
3
[]
no_license
import math zonas_wifi=[['2.698','-76.680','63'],['2.724','-76.693','20'],['2.606','-76.742','680'],['2.698','-76.690','15']] coordenadas= [[2.697,-76.681],[2.697, -76.741],[2.695, -76.691]] latitud=float(coordenadas[0][0]) longitud=float(coordenadas[1][0]) r=6372.795477598 a=(latitud-float(zonas_wifi[0][0]))/2 b=math....
Python
UTF-8
4,762
2.53125
3
[]
no_license
# -*- coding: utf-8 -*- ERRORMSGZH = { 99: "服务器繁忙,稍后再试", 100: "消息格式错误", 101: "非法操作", 102: "找不的此角色", 103: "功能未开放", 104: "操作太快", 105: "你的帐号在别处登录,请重新登录", 110: "此功能只对VIP开放", 111: "VIP等级不够", 120: "金币不足", 121: "元宝不足", 122: "等级不足 ", 123: "官职不足", 130: "装备不够", 131: "宝...
Java
UTF-8
3,889
2.4375
2
[]
no_license
package com.example.c4q.materialcrossword.crossword.view; import android.text.Editable; import android.text.TextWatcher; import android.view.View; import android.widget.TextView; import android.widget.Toast; import com.example.c4q.materialcrossword.Mvp; import com.example.c4q.materialcrossword.R; import com.example....
Java
UTF-8
1,199
2.609375
3
[]
no_license
package ru.anr.base.tests.multithreading; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.test.context.ContextConfiguration; import ru.anr.base.ApplicationException; import ru.anr.base.tests.BaseTestCase; import java.util.Set; /** * Description ... * * @autho...
Java
UTF-8
1,341
2.390625
2
[]
no_license
package com.wb.springcloud.fallback; import com.wb.springcloud.entities.Dept; import com.wb.springcloud.service.DeptClientService; import feign.hystrix.FallbackFactory; import org.springframework.stereotype.Component; import java.util.Arrays; import java.util.List; /** * 自定义针对DeptClientService所有的方法的服务降级 * 需要实现Fall...
PHP
UTF-8
1,102
2.96875
3
[]
no_license
<?php // print_r($_FILES); /* 把上传回来的文件,保存到服务端 */ // 获取上传回来的文件 $file = $_FILES['file']; // 生成一个不会重复的文件名 /* 我们在服务端,为了保证上传的文件名不会同名 时间戳 + 随机数 + 后缀名 */ // 先得到文件的后缀名 // strrchr(字符串,符号) 得到的是某个符号最后一次出现在字符串的位置开始到字符串结尾的所有字符 $ext = strrchr($file['name'],"."); $fileName = time() . rand(10000,99999...
Python
UTF-8
877
3.5625
4
[]
no_license
#Take in list of points, returns left and right most points from list import numpy as np def getLR(approx): try: L = approx[0][0][0] R = approx[0][0][0] lp = approx[0][0] rp = approx[0][0] point = None print ("[getLR.py]: Showing iterative data:") for i in ...
C#
UTF-8
2,458
2.9375
3
[ "MIT" ]
permissive
using System; using System.Diagnostics; namespace N8Engine { internal static class GameLoop { public static event Action<float> OnPreUpdate; public static event Action<float> OnEarlyUpdate; public static event Action<float> OnUpdate; public static event Action<float> OnPostUpda...
JavaScript
UTF-8
6,104
2.796875
3
[]
no_license
//let targetFcts = require('./targetFunctions.js') let ExtractTargetColorsWorker = require("./workers/extractTargetColors.w.js") class Target { constructor(imageSrcData, callback, initialNumColRow, progressCallback, globalParams) { this.ready = false this.imageSrcData = imageSrcData this.image...
Ruby
UTF-8
1,053
2.8125
3
[]
no_license
module GradesHelper def display_assessment_items(course) if params[:action] == "edit" course.assessment_items.pluck(:name, :id) else [] end end def display_courses(user) if params[:action] == "edit" user.courses.pluck(:name, :id) else [] end end def compute_ov...
Markdown
UTF-8
1,487
4.09375
4
[]
no_license
------ Created by Michael R. Year : 2021 - 20/02/2021 Personal learning courses ------ ## My solution ```javascript let dog = { name: "Spot", numLegs: 4, sayLegs: function() {return "This dog has " + this.numLegs + " legs.";} }; dog.sayLegs(); ``` --- ## Problem Make Code More Reusable with the this Keyword T...
Python
UTF-8
4,027
2.8125
3
[]
no_license
import matplotlib.pyplot as plt from matplotlib import figure import numpy as np from sklearn.manifold import TSNE def seedsdataset(): X=[] Y=[] with open("seeds_dataset.txt","r") as f: for lines in f: lines=lines.replace("\n","") values=lines.split("\t") Y.appe...
PHP
UTF-8
3,131
2.8125
3
[]
no_license
<?php namespace Salesfire; use Salesfire\Types\Transaction; use Salesfire\Types\Product; class Formatter { /** * @var array The site identifier */ public $uuid; /** * @var array The events to format */ public $events = array(); /** * @param string The site identifier ...
JavaScript
UTF-8
763
2.609375
3
[]
no_license
/** * Created by QiHan Wang on 2017/5/27. */ // SearchParams 查询段转为object /*function searchs(search) { let obj = {}; const params = (search.split('?')[1]).split('&'); for (let i = 0; i < params.length; i++) { let param = params[i].split('='); obj[param[0]] = decodeURIComponent(param[1]); } return obj...
Python
UTF-8
1,509
3.234375
3
[]
no_license
#!/usr/bin/python # -*- coding: UTF-8 -*- """ @Time : 2018-11-13 21:20 @Author : jianjun.wang @Email : alanwang6584@gmail.com """ import numpy as np import cv2 as cv img = np.zeros((320, 320, 3), np.uint8) #生成一个空灰度图像 print img.shape # 输出:(320, 320, 3) # 绘制一个红色椭圆 ptCenter = (160, 160) # 中心点位置 axesSize = (100...
Python
UTF-8
541
2.546875
3
[]
no_license
import os from pymongo import MongoClient import urllib class MongoDriver: def __init__(self): with open(os.environ['MONGO_USERNAME'], 'r') as user_secret: self.mongo_username = user_secret.read().strip() with open(os.environ['MONGO_PASSWORD'], 'r') as pass_secret: ...
Java
UTF-8
1,211
2.4375
2
[]
no_license
package com.example.nitin.desichain.Contents; import java.io.Serializable; /** * Created by ashis on 6/20/2017. */ public class ProductHorizontal implements Serializable { private String mProductName,mProductNoOfReviews,mProductRating; private String mProductImageId; int DISCOUNT; int mProductCost...
JavaScript
UTF-8
872
3
3
[]
no_license
const personnel = [ { id: 5, name: 'Brian Mason', pilotingScore: 100, shootingScore: 36, isDeltaPilot: true }, { id: 82, name: 'Pauline Saunders', pilotingScore: 83, shootingScore: 91, isDeltaPilot: false }, { id: 22, name: 'Carry Beaman', pilotingScore: 34,...
Markdown
UTF-8
1,414
2.671875
3
[]
no_license
--- name: "Walnut and Flax Seed Trail Mix Recipe With Figs and Honey" slug: "walnut-and-flax-seed-trail-mix-recipe-with-figs-and-honey" layout: 'RecipeLayout' prepTime: "25" cuisine: "Continental" cuisineSlug: "continental" image: "https://www.archanaskitchen.com/images/archanaskitchen/1-Author/Shyma_Menon/Walnu...
Java
UTF-8
3,436
2.015625
2
[ "Apache-2.0" ]
permissive
/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) 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...
C++
UTF-8
1,309
2.734375
3
[]
no_license
class Solution { public: bool isboundary(int x,int y,int n,int m) { if(x>=0 && x<n && y>=0 && y<m) return true; return false; } struct path{ int x,y; }; int shortestPathBinaryMatrix(vector<vector<int>>& grid) { int n=grid.size(),m=grid[0].s...
JavaScript
UTF-8
493
2.65625
3
[]
no_license
function openCatalogDesktop() { let $catalogButton = document.querySelector('.catalog-button'); let catalogButtonActive = 'catalog-button--active'; let $catalogDesktop = document.querySelector('.header-catalog'); let catalogDesktopActive = 'header-catalog--active'; $catalogButton.addEventListener('...
Java
UTF-8
1,747
2
2
[]
no_license
package vmc.javafxui.proxies; import java.util.List; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.anno...
Java
UTF-8
595
1.820313
2
[ "MIT" ]
permissive
package ru.xander.etl.graph.graph.xml; import lombok.Getter; import lombok.Setter; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import java.util.List; /** * @author Alexander S...
PHP
UTF-8
1,093
2.765625
3
[]
no_license
<?php declare(strict_types = 1); namespace App\Repositories\Resources\Users; use App\Exceptions\NotFoundInRepositoryException; use App\Repositories\Resources\DatabaseResourceRepository; use App\Resources\User; /** * Class DatabaseUsersRepository * @package App\Repositories\Resources\Users */ class DatabaseUsersRe...
Python
UTF-8
720
2.859375
3
[]
no_license
import urllib.request import urllib.parse from urllib.error import URLError,HTTPError url='https://api.weibo.com/oauth2/access_token' values={'client_id':'339837652', #key 'client_secret':'92299b8986fbc70e2c67d5f14075a3bc',#secret 'grant_type':'authorization_code', 'redirect_uri':'www.baidu...
Java
UTF-8
569
1.96875
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.wpi.first.wpilibj.templates.commands.rollers; import edu.wpi.first.wpilibj.command.CommandGroup; /** * * @au...
Java
UTF-8
592
3.8125
4
[]
no_license
package com.opps.polymorphism; class ABC15 { void methodABC() { System.out.println(111); } void methodABC(int i) { System.out.println(222); } } class XYZ15 extends ABC15 { @Override void methodABC(int i) { System.out.println(333); } ...
SQL
UTF-8
12,983
3.84375
4
[]
no_license
/* This table describes the properties of a supplier with supplier id, supplier name and zip code for potential distance calculations. */ CREATE TABLE Supplier( sid varchar2(35), sname varchar2(35), zipcode varchar2(6), PRIMARY KEY (sid) ); /* This table describes properties of items throughou...
Go
UTF-8
7,900
3.1875
3
[ "Apache-2.0" ]
permissive
package pubsub import ( "os" "sync" "time" ) // Subscriber .... type Subscriber interface { OnPublish(interface{}) error } // Topic ... type Topic interface { Publish(interface{}) error Subscribe(Subscriber) error Unsubscribe(Subscriber) error Destroy() error IsEmpty() bool } // MultiTopic ... type MultiTo...
JavaScript
UTF-8
1,495
2.546875
3
[]
no_license
import React from 'react'; import fantasy from '../data/fantasy.json'; import history from '../data/history.json'; import horror from '../data/horror.json'; import romance from '../data/romance.json'; import scifi from '../data/scifi.json'; import {Container, Row, Col} from 'react-bootstrap'; const Books = (props) =>{...
Java
UTF-8
2,485
2.828125
3
[]
no_license
package source.mdtn.comm; import source.mdtn.bundle.Bundle; import source.mdtn.server.Server; import source.mdtn.server.Service; /** * Classe che rappresenta un BundleProtocol. */ public class BundleProtocol { /** modalità operativa (0=server, 1=client)*/ private int operativeMode; /** * Costruttore del prot...
PHP
UTF-8
1,064
2.9375
3
[]
no_license
<?php /*ouverture de la connexion à la base de données */ $objetPdo = new PDO('mysql:host=localhost;dbname=agenda','root',''); /*Requette d'insertion (sql)*/ $pdoStat = $objetPdo->prepare('INSERT INTO contact VALUES (NULL, :nom, :prenom, :tel, :mel)'); //*on lie chaque marqeur à une valeur */ $pdoStat->bindValue...
JavaScript
UTF-8
5,637
2.984375
3
[]
no_license
var Graphics = {}; var layers = new Array(); var checkImagesLoaded = null; var background = new Image(); var guideAnimation = null; var guideSprite = new Image(); Graphics.circleRadius = 10; Graphics.thinLineThickness = 1; Graphics.boldLineThickness = 5; Graphics.lineStrokeStyle = "#cfc"; Graphics.imagesL...
Java
UTF-8
3,059
2.328125
2
[]
no_license
package com.mobike.android_architecture.service; import android.app.Notification; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.support.annotation.Nul...
PHP
UTF-8
3,445
2.53125
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\modules\work\models; use Yii; /** * This is the model class for table "work_progress". * * @property integer $id * @property integer $work_id * @property integer $physical * @property integer $financial * @property string $dateofprogress * @property string $remarks * @property double $exp...
Markdown
UTF-8
1,063
3.125
3
[ "MIT" ]
permissive
# Basic React Decentralised Application (Hardhat Development environment) ## Contract 1 The 1st contract is a simple *Greeter* contract that is deployed with an initial greeting. Once deployed, the deployed greeting can be seen (without any gas) and it can also be changed/updated which incurs some fee. Here are some ...
Java
UTF-8
7,703
1.765625
2
[]
no_license
package org.sistcoop.cooperativa.services.resources.admin; import java.util.ArrayList; import java.util.List; import javax.ejb.Stateless; import javax.inject.Inject; import javax.ws.rs.PathParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import org.sistcoop.c...
Python
UTF-8
4,503
2.59375
3
[]
no_license
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2018 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright...
Python
UTF-8
80
3.3125
3
[]
no_license
st = 7 sp = 0 while st > 0: print(" "*sp + "*"*st) st -= 2 sp += 1
JavaScript
UTF-8
3,668
2.921875
3
[]
no_license
const players = { PLAYER_1: 1, PLAYER_2: 2, }; module.exports = { getAvailableGame: function (games) { for (const [key, value] of games) { const game = games.get(key); if (!game.player1 || !game.player2) { return game; } } return null; }, createNewGame: function () { ...
Ruby
UTF-8
3,618
2.59375
3
[]
no_license
# require "awesome_print" # include SlotsHelper class Card < ActiveRecord::Base extend SlotsHelper has_and_belongs_to_many :slots has_many :card_keywords # TODO: fix to assign to slot def self.search(queries_string, slot) return [] if queries_string.blank? query_array = queries_string.to_s...
Java
UTF-8
945
3.203125
3
[]
no_license
import java.util.Arrays; import java.util.Scanner; import java.util.StringTokenizer; public class Manold { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t=Integer.parseInt(sc.nextLine()); for(int x=1;x<=t;x++){ int len=Int...