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
595
2.625
3
[]
no_license
using Calculator.Common.Entities; using Calculator.Loggers; namespace Calculator.Web.Services { public class ResultSenderService : IResultSenderService { private readonly IActivityLogger activityLogger; public ResultSenderService(IActivityLogger logger) { activity...
JavaScript
UTF-8
3,581
3.140625
3
[]
no_license
"use strict"; const intersectAni = function () { const sections = document.querySelectorAll("section"); const sectionPic = document.querySelector(".section-picture"); const sectionDesc = document.querySelector(".section-description"); const fadeIn = function (entries) { const [entry] = entries; if (!...
Ruby
UTF-8
910
2.84375
3
[]
no_license
class Product < ActiveRecord::Base validates_uniqueness_of :name validates_presence_of :name has_many :costs def set_cost #second validate it into sql with setcost if costs.nil? @costs=Array.new end @costs << Cost.new(:valid_from => Time.now, :amount => @cost, ...
Markdown
UTF-8
2,139
3.90625
4
[]
no_license
## Navigation - [Chapter 1](#Chapter-1) - [Chapter 2](#Chapter-2) ## Chapter 1 Strings and Arrays ### 1.1 Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures? ### 1.2 Given two strings, write a method to decide if one is a permutation of the o...
Markdown
UTF-8
26,628
2.5625
3
[ "Apache-2.0" ]
permissive
一直在金融行业里做软件项目,见识了各种形形色色的企业软件开发框架,就像见多了摄影的美景后自己也想去那走一走,所以JEA诞生了。<br> JEA定位为面向服务的企业级分布式开发集成框架,要完全发挥JEA的各项特性,需要准备多台服务器分别部署应用和支撑系统,如果要商用,相对来说大中型企业可能会更适合些。主要特点如下:<br> 1、分布式远程过程调用:随着SOA越来越深入人心,软件的整体设计可能也会像传统工业社会一样,慢慢向流水线方向发展。曾经接触过很多类似这样的产品:它们独力完成了所有的业务工作,不需要和其它业务系统进行协同工作,随着时间的推移,它们越来越庞大,越来越难维护,而且还会发现一个很神奇的现象,产品里的很多业务功能总是能在同家...
Markdown
UTF-8
619
2.96875
3
[]
no_license
--- title: "関数定義の基本" date: "2003-10-13" --- Ruby の関数は、下記のように `def` キーワードを使用して定義します。 ```Ruby # メソッドの定義 def add(a, b) a + b end # メソッドの呼び出し puts add(1, 2) ``` 戻り値は `return` を使って明示することができますが、最後に評価した値が関数の戻り値として扱われるので、多くの場合は `return` を省略することができます。 むしろ `return` を省略した方が少しだけ処理が速いらしいです(『Ruby ソースコード完全解説』より)。
Java
UTF-8
5,618
3.078125
3
[]
no_license
package us.fitzpatricksr.cownet.commands.games; import org.bukkit.plugin.java.JavaPlugin; import us.fitzpatricksr.cownet.CowNetThingy; /** * This class simply manages the state transition changes in the game. It doesn't keep track of * players, winners, losers or much else. There is a simple callback interface th...
C++
UTF-8
203
2.75
3
[]
no_license
#include <iostream> using namespace std; int main(){ long long a,b,c,d; cin >> a >> b >> c >> d; if(b>=c&&d>=a) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
PHP
UTF-8
4,426
2.578125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class M_User extends CI_Model { public function insert($data) { return $this->db->insert('user', $data); } public function login($email) { //return $this->db->get_where('user', array('username' => $email)); ...
C++
UTF-8
1,378
2.625
3
[ "MIT" ]
permissive
#include <iostream> #include <algorithm> #include <vector> #include <numeric> #include "../lib/euler.hpp" using namespace std; typedef unsigned long ul; int main() { int N = 10000000; vector<bool> s = sieve(N); vector<ul> phiArray; phiArray.resize(N); // calculate all primes and powers of prim...
Java
UTF-8
210
2.5
2
[]
no_license
package lean.java.example.design.patterns.factory; /** * Created by sunyong on 2018-09-06. */ public class AudiCar implements Car { @Override public String getName() { return "Audi"; } }
Markdown
UTF-8
242
3.046875
3
[]
no_license
### Description Given 2 strings, determine if they are anagrams of each other. An anagram is a word, phrase, or name formed by rearranging the letters of one another. ### Examples cinema > iceman qwerty > qeywrt '' > '' ### Input 2 strings
Java
UTF-8
3,530
2.421875
2
[]
no_license
package org.ptolemy.graphiti.generic; import java.util.Collection; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.util.EcoreUtil; import org.ptolemy.graphiti.generic.ActorViewModel.PortKind; import org.ptolemy.graphiti.generic.EntityViewModel.Entity...
PHP
UTF-8
130
2.625
3
[]
no_license
<?php class Object implements Serializable{ public function serialize(){ } public function unserialize($serialized){ } }
Java
UTF-8
583
3.328125
3
[]
no_license
package objects; import java.util.Map; public class ShoppingCart { private Map<Book, Integer> bookCopies; public ShoppingCart(Map<Book, Integer> bookCopies) { this.bookCopies = bookCopies; } public Map<Book, Integer> getBookCopies() { return bookCopies; } public void setBookCopies(Map<...
JavaScript
UTF-8
1,002
3.53125
4
[ "MIT" ]
permissive
/** * Explanation of the algorithm: * https://codility.com/media/train/6-Leader.pdf */ function solution(A) { // sort the input const _A = [...A] A.sort((a,b) => a - b) // find the leader (stack method) let stack = [] for (let x=0; x<A.length; x++) { if (x == 0) { stack.p...
Markdown
UTF-8
1,416
2.90625
3
[ "MIT" ]
permissive
# DBView DBView is a lightweight tool to view and manage your remotely hosted databases in the browser. While desktop database management software is powerful, it can be overwhelming and require unecessary overhead when your only needs are viewing tables and performing standard tasks (especially for those with limited...
Python
UTF-8
3,039
2.578125
3
[ "MIT" ]
permissive
# coding=utf-8 import os import unittest import HTMLTestRunner from framework.util.Config import Config from framework.util.Email import Email from framework.util.Log import Log TAG = os.path.basename(__file__) class TestRunner: _instance = None def __init__(self): pass def setUpTestSuite(self,...
Java
UTF-8
2,796
2.53125
3
[]
no_license
package com.bus.hbm; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="users") public class Users { @Id @GeneratedValue(strategy = Gen...
TypeScript
UTF-8
2,751
2.546875
3
[ "MIT" ]
permissive
import { Readable } from 'stream'; import { FastifyInstance } from 'fastify'; import td from 'testdouble'; import { getArtwork } from '@/api/routes/getArtwork'; import { ArtworksService } from '@/services/ArtworksService'; import { mockToken } from '../mockToken'; import test from '../setupTestServer'; async functi...
Python
UTF-8
234
3.59375
4
[ "MIT" ]
permissive
def get_average(li): sum = 0 for num in li: sum += num mean = sum / len(li) return mean def test_get_average(): num1 = 10 num2 = 20 numbers = [num1, num2, 50] assert(get_average(numbers)) == 40
C++
UTF-8
4,865
2.5625
3
[]
no_license
#include "SpriteFactory.h" #include "../Maths/Matrix4.h" #include "../Graphics/Mesh.h" #include "../Graphics/VertexBuffer.h" #include "../Graphics/IndexBuffer.h" #include "../Graphics/Material.h" #include "../Graphics/Shader.h" #include "../Resources/ResourceManager.h" #include "../Platform/Application.h" using name...
Python
UTF-8
1,584
2.578125
3
[ "MIT" ]
permissive
from os import environ from fastapi.exceptions import HTTPException from fastapi.security import HTTPBearer from jwt import decode from pydantic import BaseModel from starlette.requests import Request from starlette.status import HTTP_403_FORBIDDEN KEY = environ.get("KEY", "secret") # Authenticate Model class LazyUs...
Python
UTF-8
2,370
3.09375
3
[ "BSD-2-Clause" ]
permissive
# stdlib import glob import os.path import sys def public(f): """"Use a decorator to avoid retyping function/class names. * Grabbed from recipe by Sam Denton http://code.activestate.com/recipes/576993-public-decorator-adds-an-item-to-__all__/ * Based on an idea by Duncan Booth: http://groups.goog...
Java
UTF-8
2,659
2.5625
3
[]
no_license
package eu.eyan.amoba.gui; import java.awt.Color; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.JPanel; import com.jgoodies.forms.factories.CC; import com.jgoodies.forms.layout.FormLayout; public class AmobaTablaView extends JPanel { private static final long serialVer...
Python
UTF-8
294
2.78125
3
[]
no_license
for t in range(int(input())): n, m = map(int, input().split()) a = [list(input().strip()) for _ in range(n)] ans = 0 for y in range(n-1): if a[y][m-1] != "D": ans += 1 for x in range(m-1): if a[n-1][x] != "R": ans += 1 print(ans)
PHP
UTF-8
1,977
2.875
3
[]
no_license
<?php /** * Classe de entidade Artigo */ include_once('Categoria.class.php'); include_once('../../Utilizador/entity/Usuario.class.php'); class Article { private $id; private $titulo; private $conteudo; private $dataPublicacao; private $tags; private $publicado; private $imagem; private $banner;...
JavaScript
UTF-8
676
2.609375
3
[]
no_license
export const getCustomerData = async () => { const response = await fetch('http://localhost:5000/customer-data'); const body = await response.json(); if (response.status !== 200) { throw Error(body.message); } return body; }; export const postCustomerData = async customers => { const ...
TypeScript
UTF-8
2,626
2.71875
3
[]
no_license
import {Component, OnInit, Input, Output} from '@angular/core'; import {Book} from "../shared/book"; import {ActivatedRoute, Router} from "@angular/router"; import {BookStoreService} from "../shared/book-store.service"; import {AuthService} from "../shared/authentication-service"; @Component({ selector: 'bs-book-d...
Markdown
UTF-8
7,489
2.640625
3
[]
no_license
一〇〇 方振远随在那人的身后,进入楼上一间雅室之中。 垂帘起处,只见一个身穿蓝色劲装的少年,端坐房中。 蓝衣少年一见方振远,立刻起身迎了上来,欠身一礼,道:“方老前辈,还记得在下吗?” 方振远仔细看去,只觉似曾相识,但一时之间,却又想不起来,怔了一怔,道:“阁下是……” 蓝衣少年道:“晚辈姓铁。” 方振远道:“原来是铁兄。” 蓝衣少年道:“不敢当,老前辈言重了。” 方振远轻轻咳了一声,道:“铁兄,那封信是你写的吗?” 蓝衣人道:“不错,虎威镖局,正陷入险恶境界之中,晚辈不忍坐视老前辈受害,因此,才传书示警,希望老前辈能够置身事外。” 方振远道...
C++
UTF-8
1,829
2.671875
3
[]
no_license
#include <EEPROM.h> #include "settings.h" #include "supervisor.h" void ParamSettings::writeEepromLong(unsigned int base, unsigned int slot, long value) { base = base + (slot * sizeof(long)); const byte *b = (const byte *) (const void *) &value; for (unsigned int i = 0; i < sizeof(long); i++) { EEPROM.write(...
Markdown
UTF-8
3,420
3.375
3
[ "MIT" ]
permissive
--- title: Առաջնահերթություններ date: 15/03/2023 --- Հիսուսի առակներն ու դասերը, աստվածաշնչյան հերոսների մասին պատմող պատմությունները, ինչպես նաև Էլեն Ուայթի խորհուրդները հստակորեն ցույց են տալիս, որ չկա Աստծուն կիսատ նվիրվելու ճանապարհ։ Մենք կա՛մ Տիրոջ կողմն ենք, կա՛մ Նրա դեմ։ Երբ դպիրը Հիսուսին հարցրեց, թե որ պատ...
Java
UTF-8
483
2.484375
2
[]
no_license
package com.readlearncode; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Source code github.com/readlearncode * * @author Alex Theedom www.readlearncode.com * @version 1.0 */ ...
C++
UTF-8
4,859
2.78125
3
[]
no_license
/** * Controlls the camera using a mass-spring system. The camera * always follows the target (player). */ #include <NiApplication.h> #include <NiPhysX.h> #include <NiViewMath.h> #include "CameraController.h" #include "VelocityController.h" #include "Bee.h" #include "ConfigurationManager.h" #include "...
C++
UTF-8
869
3.5
4
[]
no_license
#include <iostream> #include <list> using std::list; bool Isbalance(const char* str, int len) { bool ret = false; list<char> stack; for (size_t i = 0; i < len; i++) { if (str[i] == '(' || str[i] == '[' || str[i] == '{') { stack.push_back(str[i]); } else if (str[i] == ')') { if (stack.back() == '(')...
Java
UTF-8
805
2.59375
3
[]
no_license
package com.smartmarket.display; import java.text.DecimalFormat; import com.pi4j.component.lcd.LCDTextAlignment; import com.pi4j.component.lcd.impl.I2CLcdDisplay; import com.pi4j.io.i2c.I2CBus; public class LCD extends I2CLcdDisplay { public LCD(int i2cAdress) throws Exception { super(2, 16, I2CBus.BUS_1, i2cAd...
Java
UTF-8
7,006
1.96875
2
[]
no_license
package com.bt.zhangzy.logisticstraffic.activity; import android.os.Bundle; import android.text.TextUtils; import android.view.KeyEvent; import android.view.View; import android.view.WindowManager; import android.view.inputmethod.EditorInfo; import android.widget.CheckBox; import android.widget.CompoundButton; import ...
Java
UTF-8
577
2.296875
2
[]
no_license
package manager; import java.io.IOException; import com.ibatis.common.resources.Resources; import com.ibatis.sqlmap.client.SqlMapClient; import com.ibatis.sqlmap.client.SqlMapClientBuilder; public abstract class SQLmanager { private SqlMapClient sc; public SQLmanager(){ sc=null; try{ sc=Sq...
JavaScript
UTF-8
1,568
3.046875
3
[]
no_license
$(function(){ var step1Li = $('.step1 li'); var step2Li = $('.step2 li'); var id1 = "", id2 = "", id1Text = "", id2Text = ""; step1Li.on('click',function(){ step1Li.removeClass('active'); $(this).toggleClass('active'); console.log($('.step1 li.active')); }); step2Li.on(...
Java
UTF-8
1,537
3.90625
4
[]
no_license
import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.CharBuffer; public class ByteOrdering{ public static void main(String[] args){ ByteBuffer buffer = ByteBuffer.allocate(5); buffer.put((byte)1).put((byte)2).put((byte)3).put((byte)4); buffer.flip(); System.out.println("ByteBuffer reading ...
TypeScript
UTF-8
555
3.3125
3
[]
no_license
interface ConvertDateReturnType { year: string; month: string; day: string; hour: string; minute: string; second: string; } const convertDate = (date: string): ConvertDateReturnType => { // 2021-05-22T00:26:12.843439 const year = date.slice(0, 4); const month = date.slice(5, 7); ...
Java
UTF-8
700
1.757813
2
[]
no_license
package cn.dingyuegroup.gray.server.mysql.dao; import cn.dingyuegroup.gray.server.mysql.entity.GrayPolicyEntity; import java.util.List; public interface GrayPolicyMapper { int deleteByPrimaryKey(Integer id); int insert(GrayPolicyEntity record); GrayPolicyEntity selectByPrimaryKey(Integer id); List...
Java
UTF-8
780
2.796875
3
[]
no_license
package com.dbobrov.jdk8demo; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; public class Unsigned { @Test public void unsignedToString() { int a = 1 << 31; assertThat(Integer.toString(a), is("-2147483648")); ...
C++
UTF-8
1,957
3.65625
4
[]
no_license
#pragma once #include "List.h" namespace Collections { template<class T> class ArrayList : public List<T> { private: T* m_Arr; int m_Count; int m_Capacity; int m_InitialCapacity; public: ArrayList(int capacity = 4) : m_InitialCapacity(capacity), m_Capacity(capacity) { m_Arr = new T[capacity]; ...
Python
UTF-8
214
3.203125
3
[]
no_license
class emp(): a = 1 def dispnames(self,name): print("this is ",name) def company(self, name, cname): print("{} belongs to {}".format(name,cname)) emp. emp.company('superman', 'avengers')
Java
UTF-8
2,223
2.125
2
[]
no_license
/* * SSLR Squid Bridge * Copyright (C) 2010-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the...
Markdown
UTF-8
629
2.671875
3
[]
no_license
# C Examples Some C exercises related to (but not only) my OSes exam. These are essentially split in two subdirs: - _my-own_: own stuff, like reimplementations of nice things - _tlpi_: exercises taken from The Linux Programming Interface ## Special note This is **not** to be intended as software to be run once more...
Java
UTF-8
1,640
2.390625
2
[]
no_license
package com.amarnehsoft.vaccinations.database.db2.schema; /** * Created by alaam on 2/11/2018. */ public class KindergartenTable { public static final String TBL_NAME = "KINDER_TBL"; public static final String _CREATE_TABLE = "CREATE TABLE IF NOT EXISTS " + TBL_NAME + " (" ...
C#
UTF-8
588
3.171875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RomanNumeralKata02 { class Program { static void Main(string[] args) { Console.WriteLine("Please enter a number"); int userNumber = Convert.ToIn...
Python
UTF-8
11,185
2.71875
3
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-free-unknown" ]
permissive
""" GeneratorSheet: a sheet with a pattern generator. """ import param from topo.base.sheet import Sheet from topo.base.patterngenerator import PatternGenerator,Constant from topo.base.simulation import FunctionEvent, PeriodicEventSequence from holoviews.interface.collector import AttrDict from holoviews import Imag...
Python
UTF-8
320
3.203125
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __author__ = 'calpa' __mtime__ = '3/11/2016' """ def power_of_four(number): # Use the same idea in power of two, plus 32 bits logic return number > 0 and (number & (number - 1)) == 0 and number & 0x55555555 != 0 print power_of_four(5) print power_of_four(16)
JavaScript
UTF-8
882
3.140625
3
[]
no_license
//解决js数字计算中的浮点数问题 function fixed(arg1, arg2, computeMethod){ switch (computeMethod) { case 'add': var r1, r2, m; try { r1 = arg1.toString().split(".")[1].length } catch (e) { r1 = 0 } try { r2 = arg2.toString().split(".")[1].length } catch (e) { r2 = 0 } m = Math.pow(10, Math.max(r1, r2)...
Python
UTF-8
584
3.25
3
[]
no_license
class a(): def __init__(self): print("init from a") def add(self,m1,m2): m3=m1.self+m2.self print(m3) class b(a): def __init__(self): print("init from b") b1=b()# object creation for the class b #here python checks for the init in b ...
Markdown
UTF-8
5,181
3.046875
3
[]
no_license
# iForest ## Introduction Isolation Forest, also known as iForest, is a data structure for anomaly detection. Traditional model-based methods need to construct a profile of normal instances and identify the instances that do not conform to the profile as anomalies. The traditional methods are optimized for normal ins...
Java
UTF-8
7,166
2.03125
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 nprot.vista; import NProt.accesoDatos.ManejoBD; import java.awt.Dimension; import java.awt.event.ItemEvent; import java.awt.e...
Markdown
UTF-8
1,286
2.703125
3
[]
no_license
# Realtime Transport Map Show real time transport locations on a map. ## Map highlights - Zoom (mouse scroll) - Filter Routes - Show/Hide Stops - Vehicles are triangle and Stops are rectangular - Vehicles color, Stops color (inherited from associated Route color) - Vehicles heading (shown by rotating triangle) ...
Python
UTF-8
1,930
3.046875
3
[]
no_license
import pyttsx3 import PyPDF2 import sys, getopt, os def main(argv): inputfile = '' inputpage = 1 try: opts, args = getopt.getopt(argv,"hi:p:",["ifile=","pnum="]) except getopt.GetoptError as e: print("Something went wrong...") print('ab.py -i <inputfile> -o <pagenumber>') ...
Markdown
UTF-8
2,216
2.890625
3
[ "MIT" ]
permissive
+++ title = "WGD 2022-05-20" categories = ["zet"] tags = ["zet"] slug = "WGD-2022-05-20" date = "2022-05-20 00:00:00 +0000 UTC" draft = "false" ShowToc = "true" +++ # WGD 2022-05-20 Still working on Mudmap's switch from single user accounts to multiple accounts per organisation. ## Mudmap I'm making a lot of progre...
Python
UTF-8
59,771
2.796875
3
[ "BSD-3-Clause" ]
permissive
##################################################################### ##### IMPORT STANDARD MODULES ##################################################################### #Python 3 support: from __future__ import absolute_import, division from __future__ import print_function, unicode_literals import pandas as p...
Python
UTF-8
5,121
3.375
3
[]
no_license
import ast code = """\ a = 23 b = 42 c = a + 2*b - z """ top = ast.parse(code) print(ast.dump(top)) print("first visit") print("-"*10) class NameVisitor(ast.NodeVisitor): def visit_Name(self,node): print((node.id,node.ctx)) NameVisitor().visit(top) print("second visit") print("-"*10) class NameNumVisit...
C#
UTF-8
1,993
2.59375
3
[]
no_license
using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Threading; using System.Threading.Tasks; using HttpClientFactoryExample.Extensions; using HttpClientFactoryExample.Model; using Microsoft.Extensions.Logging; namespace HttpClientFactoryExample.Servi...
Java
UTF-8
736
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 aula06_at03_01; import java.util.Scanner; /** * * @author clecioferreira */ public class Aula06_at03_01 { /** * @p...
PHP
UTF-8
3,368
2.578125
3
[]
no_license
<?php namespace PMW\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use PMW\Models\LogBook; use Illuminate\Support\Facades\Auth; /** * Controller ini berfungsi untuk melakukan aksi yang berkaitan dengan * logbook * * @author BagasMuharom <bagashidayat@mhs.unesa.ac.id|bagas...
Java
UTF-8
2,810
2.5
2
[]
no_license
package Admin; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResp...
Java
UTF-8
948
3.578125
4
[]
no_license
package com.casino.carddealer.utility; /** * Cards with their symbols and names; they are used used to display with the rank after the * evaluation. */ public enum Cards { TWO("2", "Two"), THREE("3", "Three"), FOUR("4", "Four"), FIVE("5", "Five"), SIX("6", "Six"), SEVEN("7", "Seven"), EIGHT("8", "Eigh...
C++
UTF-8
3,547
3.046875
3
[]
no_license
#include "Shader.hpp" #include <sstream> #include <fstream> #include <iostream> #include <GL/glew.h> #include <GLFW/glfw3.h> #include <math.h> Shader::Shader(const std::string& vertexPath, const std::string& fragmentPath) { std::ifstream vertexFile; std::ifstream fragmentFile; std::stringstream vertexStre...
PHP
UTF-8
594
3.015625
3
[]
no_license
<?php echo "<center> Array assignment</center>"; $a=array("php","java","embedded","android"); sort($a); print_r($a); echo "<br>"; $a=array("php","java","embedded","android"); array_unique($a); print_r($a); echo "<br>"; $a1=array("a","b","c","d"); $a2= array("php","java","embedded","android"); print_r(arra...
Java
UTF-8
2,752
3.875
4
[]
no_license
/* * UCF COP3330 Fall 2021 Assignment 2 Solution * Copyright 2021 Zarin Tasnim */ package ex32; import java.util.Scanner; import java.util.Random; class numberGame { //not allowing non numeric value public static boolean inputValidation(String input) { if (input.matches("[0-9]+")) { ...
JavaScript
UTF-8
234
3.03125
3
[]
no_license
console.log('---GENERATORS---'); function* numbersGen() { yield 1; yield 2; yield 3; } let getNum = numbersGen(); console.log(getNum.next()); console.log(getNum.next()); console.log(getNum.next()); console.log(getNum.next());
Rust
UTF-8
4,535
3.171875
3
[]
no_license
use core::ops::RangeInclusive; use std::cmp::{ min, max }; #[derive(PartialEq, Clone, Copy, Debug)] pub struct Point { x: i32, y: i32 } impl Point { fn origin() -> Self { Point{x: 0, y: 0} } fn manhattan_dist_to(&self, other: Point) -> u32 { ((self.x - other.x).abs() + (self.y - other.y).abs()) as u32 } ...
JavaScript
UTF-8
3,113
2.671875
3
[ "MIT" ]
permissive
/* bbmaker.js 1.0 BBMaker is a script that converts a QuickUp Object Model to BBCode. BBMaker complies with QUOMs made in http://www.crazymatt.net/quickup/scripts/compiler.2.1.js , and is built around QuickUp Specification 1.2 revision 1, which can be found at http://www.crazymatt.net/quickup/QuickUp1.2r1.pd...
Markdown
UTF-8
1,479
2.890625
3
[]
no_license
### what do I want to learn or understand better? As of now with one week in of the course: - The fundamentals of agile strategy and how to apply effectively it to our team. ### how can I help someone else, or the entire team, to learn something new? As we sat and discussed our social contract, we came to a conc...
C++
UTF-8
1,274
2.640625
3
[]
no_license
#ifndef _Point_h_ #define _Point_h_ /* * Copyright (C) 2007 The Android Open Source Project * * 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/LICE...
JavaScript
UTF-8
2,606
3.03125
3
[]
no_license
// =============================================================================== // LOAD DATA // We are linking our routes to a series of "data" sources. // These data sources hold arrays of information on table-data, waitinglist, etc. // ===============================================================================...
JavaScript
UTF-8
386
3.46875
3
[]
no_license
console.log("linha 1"); console.log("linha 2"); //throw new Error("Novo erro!"); console.log("linha 3"); try { console.log(soma(10, new Array(10))); } catch (error) { console.log(error.name); console.log(error.message); console.log(error.stack); } finally { console.log("Sempre sera executado!"); } ...
Python
UTF-8
7,299
2.984375
3
[]
no_license
from abc import abstractmethod from contracts import ContractsMeta, contract from decent_logs import WithInternalLog from reprep import Report from reprep.interface import ReportInterface __all__ = ['AgentInterface', 'UnsupportedSpec', 'ServoAgentInterface', 'PredictorAgentInterface', 'PassiveAgentInterfac...
Ruby
UTF-8
240
2.984375
3
[]
no_license
class Categories attr_accessor :name, :index @@all = [] def initialize(name, index) @name = name @index = index @@all << self end def self.all @@all end end
Python
UTF-8
3,551
2.953125
3
[]
no_license
import math from bisect import bisect_right from functools import partial import torch.optim as optim from torch.optim.optimizer import Optimizer from torch.optim.lr_scheduler import _LRScheduler class CosineAnnealingLR_withwarmup(_LRScheduler): r"""Set the learning rate of each parameter group using a cosine anne...
C#
UTF-8
7,949
2.765625
3
[]
no_license
using System.Collections.Generic; using System; namespace XYZware_SLS.model.geom { public class TopoTriangleStorage { public HashSet<TopoTriangle> triangles = new HashSet<TopoTriangle>(); public List<List<TopoTriangle>> tempTriangles = new List<List<TopoTriangle>>(4); public TopoTriangl...
C++
UTF-8
320
2.546875
3
[]
no_license
#include "TableRow.h" std::ostream& operator<<(std::ostream& stream, const TableRow& tableRow) { stream << "TableRow { " << "keyStr: \"" << tableRow.getTableKeyStr() << "\"; keyNum: " << tableRow.getTableKeyNum() << "; field: " << tableRow.getField() << "; }"; return stream; }
Python
UTF-8
6,528
2.96875
3
[]
no_license
#!/usr/bin/python # -*- coding: utf-8 -*- import os import shutil import urllib import re import sys url_feed = "http://www.radio-t.com/atom.xml" podcast_path = "/home/mak/Музыка/podcasts/" player_path = "/media/disk/music/podcast/" def get_list_urls(url): """ возвращает список доступных подкастов Argume...
Java
UTF-8
1,426
2.375
2
[]
no_license
package com.teacore.teascript.team.adapter; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.teacore.teascript.R; import com.teacore.teascript.base.BaseListAdapter; import com.teacore.teascript.team.bean.TeamMember; import com.teacore.teascript.widget.AvatarView; /*...
Java
UTF-8
691
2.140625
2
[]
no_license
package com.rahul.program.employee.service; import java.util.List; import javax.validation.ConstraintViolationException; import com.rahul.program.employee.exception.EmployeeException; import com.rahul.program.employee.model.Employee; public interface EmployeeService { public Employee createEmploye...
JavaScript
UTF-8
771
2.59375
3
[]
no_license
const db = require("quick.db") module.exports.run = async(client, message, args) => { const permission = "ADMINISTRATOR" if (!message.member.hasPermission(permission)) return message.reply(`You need the **${permission}** permission to do this.`) if (!message.guild.me.hasPermission(permission)) return mess...
Java
UTF-8
983
2.453125
2
[ "MIT" ]
permissive
package net.glowstone.net.codec.play.game; import com.flowpowered.network.Codec; import com.flowpowered.network.util.ByteBufUtils; import io.netty.buffer.ByteBuf; import net.glowstone.net.GlowBufUtils; import net.glowstone.net.message.play.game.EditBookMessage; import org.bukkit.inventory.ItemStack; import java.io.IO...
PHP
UTF-8
4,419
3.0625
3
[]
no_license
<?php namespace tool; /** * 请求类 * * @author EricGU178 */ class Request extends Base { /** * 发起post请求 * * @param string $url * @param array $data * @return void * @author EricGU178 */ static public function requestPost(string $url, array $data , $headers = []) { ...
Java
UTF-8
718
3.578125
4
[]
no_license
package java0719_api; import java.util.StringTokenizer; public class Java129_StringTokenizer { public static void main(String[] args) { // 연속된 구분자는 두번째 구분자부터는 무시한다. StringTokenizer st = new StringTokenizer("java,,jsp/spring", ",/"); System.out.println("counttoken : " + st.countTokens()); // 3 while (st.has...
Java
UTF-8
1,533
2.28125
2
[ "Apache-2.0" ]
permissive
/** * */ package kbox.extractor.framework.persistence; /** * @author Ciro Baron Neto * * Nov 4, 2016 */ public class KnsTable { String name; String target; String description; String publisher; long size; public KnsTable(String name, String target, String description, String publisher,l...
Python
UTF-8
6,809
2.671875
3
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
r""" This is a port of zend-config to Python Some idioms of PHP are still employed, but where possible I have Pythonized it IGNORE: Author: Asher Wolfstein Copyright 2017 Blog: http://wunk.me/ E-Mail: asherwunk@gmail.com Twitter: https://twitter.com/asherwolfstein Send Me Some Love! Package Homepa...
SQL
UTF-8
830
3.0625
3
[]
no_license
-- alter session set "_ORACLE_SCRIPT"=true; THIS IS NOT REQUIRED CREATE TABLESPACE tbs_perm_01 DATAFILE 'tbs_perm_01.dbf' SIZE 256M; CREATE TEMPORARY TABLESPACE tbs_temp_02 TEMPFILE 'tbs_temp_02.dbf' SIZE 64M; CREATE USER spring_user IDENTIFIED BY spring_password DEFAULT TABLESPACE tbs_perm_01 -- QUOTA 128M on t...
PHP
UTF-8
143
3.09375
3
[]
no_license
<?php $time= date("his"); $date= date("Ymd"); $print= ' Time= '.$time."\n"; $print.= ' Date= '.$date."\n"; echo $print; exit(2); ?>
PHP
UTF-8
618
2.734375
3
[]
no_license
<?php declare(strict_types=1); namespace Meeting\Controller; use Meeting\Repository\MeetingsRepository; final class MeetingsController { /** * @var MeetingsRepository */ private $meetingsRepository; public function __construct(MeetingsRepository $meetingsRepository) { ...
Python
UTF-8
114
2.796875
3
[]
no_license
nama = [ 'Ihsan', 'Sheila', 'HackMe', 'WizKhalifa', 'Tegar' ] for nama_list in nama: print(nama_list)
Markdown
UTF-8
1,158
2.546875
3
[]
no_license
# animeapp Anime Flutter application. it's just another app that i made for fun. it's connected to KITSU API: https://kitsu.docs.apiary.io/ I'm still learning about flutter. <div style="display: inline"> <img src="https://github.com/yomergonzalez/anime_app/blob/master/screenshots/img1.png?raw=true" width="200"> <i...
Java
UTF-8
1,061
2.5625
3
[]
no_license
package beanutil; public class RecordBean { private int R_id; private int R_sumtime; private int U_id; private String R_date; @Override public String toString() { return "RecordBean [R_id=" + R_id + ", R_sumtime=" + R_sumtime + ", U_id=" + U_id + ", R_date=" + R_date + "]"; } public RecordB...
C++
GB18030
1,126
2.53125
3
[]
no_license
#pragma once #ifndef _TASKDEFINE_H_ #define _TASKDEFINE_H_ #include <vector> using std::vector; enum enJOINT { JOINT_NONE,//޽ڵ JOINT_J1,//J1ڵ JOINT_J2, JOINT_J3, JOINT_J4, JOINT_J5, JOINT_J6, JOINT_J7, JOINT_J8, JOINT_J9, JOINT_J10 }; enum enJOINTTASK { JOINTTASK_NONE,// JOINTTASK_PARK,//ͣ JOINTTASK_LOADI...
C#
UTF-8
6,422
3.796875
4
[ "MIT" ]
permissive
using System; using System.Collections; using System.Collections.Generic; namespace ALGON.DataStructures.LinkedLists { /// <summary> /// Реализация кольцевого односвязного списка /// </summary> /// <typeparam name="T"></typeparam> public class SinglyCircularALinkedList<T> : ICollection<T> { ...
C++
UTF-8
5,473
2.765625
3
[]
no_license
#include "deadlock_detector.h" #include <vector> #include <map> #include <stack> using namespace std; #define maxT 50 //maxNumOfCurrentTransaction bool abortT[maxT]; //POSSIBLE DATA STRUCTURE FOR WAIT-FOR GRAPH bool waitFor[maxT][maxT]; vector<vector<Node *>*> *cycles; // a list whose elements are lists of strongly...
C#
UTF-8
2,451
3.203125
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Text; namespace DnsShell { // DnsShell.IO.EndianBinaryReader - A modified version of System.IO.BinaryReader // allowing for control over Endian order for certain methods. // // Constructors: // Publi...
Ruby
UTF-8
671
4.03125
4
[]
no_license
def volume volume=(1...20) Puts "What is the volume of your amplifier?" Puts "Do you want to throw it off the cliff?" (y/n) if user_input <=11 && y Puts "Crank it to eleven" elsif volume <=11 && n Puts "That's not very rock, man" elsif volume >=11 Puts "Crank it up (+1)" end end #Matt's solution puts...