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
Java
UTF-8
1,745
3.296875
3
[ "Apache-2.0" ]
permissive
package org.javacord.bot.util.wiki.parser; /** * A class representing a page on the wiki. */ public class WikiPage implements Comparable<WikiPage> { private final String title; private final String[] keywords; private final String path; private final String content; /** * Creates a new wik...
Markdown
UTF-8
3,346
3.6875
4
[]
no_license
# CSL Lab 03 - Variables ## How can I create custom variables to hold values in my p5.js projects? # Overview In this learning activity, students create their own variables to set the position, size and grey scale color of their shapes without repeating code. # Objectives ## Students will be able to: * Identify rep...
Markdown
UTF-8
3,813
3.015625
3
[ "MIT" ]
permissive
--- layout: post title: CUDA与OPENGL 混合编程 subtitle: date: 2020-03-30 author: infinityyf header-img: img/tag-bg-o.jpg catalog: true tags: - CUDA - openGL --- ## 在cuda中注册一个texture 资源 使用`cudaGraphicsGLRegisterImage `,使用`cudaGraphicsResource**`来作为内存的映射指针,该函数接受GL的textureID或renderbufferID. 说明: ...
Markdown
UTF-8
1,239
2.625
3
[]
no_license
--- title: "Set up guide" date: 2019-02-2 draft: false weight: 70 --- # Set up guide This page will guide you to set up this repository and get started contributing to this book. We use a static site generator called as "Hugo". So before you get started, if will be helpful if you have some basic understanding of sta...
Python
UTF-8
295
3.375
3
[ "Apache-2.0" ]
permissive
#-----------Binary Tree------------ class BinaryTreeNode: def __init__(self, data): self.data = data self.left = None self.right = None btn1 = BinaryTreeNode(1) btn2 = BinaryTreeNode(2) btn3 = BinaryTreeNode(3) btn1.left = btn2 btn1.right = btn3
JavaScript
UTF-8
1,487
3.0625
3
[]
no_license
const timer = document.querySelector('.timer__show'); const start = document.querySelector('.start'); const pause = document.querySelector('.pause'); const reset = document.querySelector('.reset'); let second =0; let minute =0; let houre = 0; start.addEventListener('click', () => { const Interval = setInter...
C#
UTF-8
5,678
2.5625
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Reflection; using Nirvana.CQRS; namespace Nirvana.Util.Extensions { public static class PropertyInfoExtensions { public static string WritePrimitiveType(this PropertyInfo propertyInfo) { var type = propertyInfo.PropertyTyp...
C#
UTF-8
3,720
2.75
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.SqlClient; namespace CourseWork { public partial class AddNewField : Fo...
Java
UTF-8
2,583
2.484375
2
[]
no_license
package edu.washington.mhd94.quizdroid; import android.content.Intent; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.*; import java.lang.Object.*; import java.util.ArrayList; public cla...
Java
UTF-8
375
1.84375
2
[ "Apache-2.0" ]
permissive
package com.example.demo; import java.util.List; import org.springframework.data.repository.CrudRepository; public interface TransactionRepository extends CrudRepository<Transaction, Long> { List<Transaction> findByUserId(long userId); List<Transaction> findByProductId(long productId); List<Transaction> findByTy...
Java
UTF-8
2,017
2.171875
2
[]
no_license
package com.iask.yiyuanlegou1.home.main.product; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.iask.yiyuanlegou1.R; import com.iask.yiyuanlegou1.log.AndroidLogge...
Java
UTF-8
142
1.5625
2
[ "Apache-2.0" ]
permissive
package com.alibaba.aliper.client.view; public interface IView { void fill(String agent,String chart,String line,long time,double value); }
C
UTF-8
7,118
3.09375
3
[]
no_license
#include "tools.h" /* in result, file pointer is pointing to the begin of i-node bitmap */ int copy_file_to_vd(char *filename, char *vd_name){ FILE *file_to_copy; FILE *disk; FILE *secondDescriptor; /* helper descriptor */ char *inode_bitmap; char *data_bitmap; char buffer[BLOCK_SIZE]; struct stat st; double ...
JavaScript
UTF-8
3,168
2.9375
3
[]
no_license
new Vue({ el:'#app', data:{ playerHealth:100, monsterHealth:100, isGameOn:false, count:0, monAttack:0, playAttack:0, isShowLog:false }, methods:{ startGame:function(){ this.isGameOn=true; this.isShowLog=...
PHP
UTF-8
2,041
2.5625
3
[]
no_license
<?php use App\Category; use App\Circle; use App\User; use Illuminate\Database\Seeder; class UserSeeder extends Seeder { private $storage = 'users'; /** * Run the database seeds. * * @return void */ public function run() { $images = $this->images; if (env('SEED_TEST...
Python
UTF-8
895
3.296875
3
[]
no_license
def saddle_points(matrix): if len(matrix) == 0: return [] ## Raise ValueError if nested list element is not match in case irregular matrix. element_count = len(matrix[0]) for sublist in matrix: if len(sublist) != element_count: raise ValueError("Irregular Matrix.") ## c...
JavaScript
UTF-8
493
2.578125
3
[]
no_license
import React from 'react'; const Progress = (props) => { let keyResults = props.data; let score = 0; let value = 0; if(keyResults.length !== 0) { score = keyResults.reduce((prev, keyResult) => { return prev += +keyResult.score; }, 0); value = Math.round(100 * score / keyResults.length); } return ( ...
Python
UTF-8
14,737
2.609375
3
[]
no_license
from abc import ABC, abstractmethod from screens.disposition_code import MenuAction from screens.menu_renderer import StandardTextRenderer from screens.menu_renderer import LazyTextRenderer from screens.menu_renderer import HighlightStrategyNormal from screens.menu_renderer import HighlightStrategyInputField from gamep...
PHP
UTF-8
452
2.71875
3
[]
no_license
<?php namespace App\Utils; class Statuses { const TO_DO = 'To do'; const IN_PROGRESS = 'In progress'; const IN_QA = 'In QA'; const DONE = 'Done'; public static function all(): array { return [ Statuses::TO_DO, Statuses::IN_PROGRESS, Statuses::IN_QA,...
Java
UTF-8
9,595
2.203125
2
[ "MIT" ]
permissive
/* The MIT License (MIT) Copyright (c) 2015 Terence Parr, Hanzhou Shi, Shuai Yuan, Yuanyuan Zhang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation...
Java
UTF-8
1,307
2.140625
2
[]
no_license
/** * (C) 2011-2012 Alibaba Group Holding Limited. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * */ package com.juhuasuan.osprey; import java.io.Serializable; /** * @au...
Java
UTF-8
1,183
3.859375
4
[]
no_license
package p_2_array_of_arrays; import java.util.Arrays; import java.util.Scanner; /** * Задана матрица неотрицательных чисел. Посчитать сумму элементов в каждом столбце. Определить, какой * столбец содержит максимальную сумму. */ public class Task9 { public static void main(String[] args) { int[][] ...
Java
UTF-8
1,551
2.21875
2
[]
no_license
package br.com.acad.dao.dieta.impl; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; import java.util.List; import javax.persistence.Query; import javax.persistence.TypedQuery; import org.springframework.stereotype.Repository; import br.com.acad.dao.dieta.interf.Solici...
Markdown
UTF-8
417
2.953125
3
[]
no_license
# 🧭 Elegant scalable percentage based Compass drawn using relative and real screen values ## About Elegant Compass View that uses percentage instead of fixed values to draw components to have similar scales in both portrait and landscape orientations. | Portrait | Landscape | | ----------|-----------| | <img ...
PHP
UTF-8
8,286
2.546875
3
[]
no_license
<?php /** * This is the model class for table "orders". * * The followings are the available columns in table 'orders': * @property integer $id * @property string $order_id * @property integer $branch * @property double $distcount * @property double $price * @property integer $status * @property integer $aut...
Python
UTF-8
3,440
3.515625
4
[ "MIT" ]
permissive
import sys def main(): game_start = int(input("Bem-vindo ao jogo do NIM!\nEscolha:\n\n1 - para jogar uma partida isolada\n2 - para jogar um campeonato\n")) if game_start == 1: print('Você escolheu um jogo isolado') partida() elif game_start == 2: print('Voê selecionou um Campeonato!...
Java
UTF-8
2,729
2.828125
3
[ "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
package io.github.mdsimmo.bomberman.messaging; import io.github.mdsimmo.bomberman.PlayerRep; import io.github.mdsimmo.bomberman.commands.Cmd.Permission; import java.util.List; import java.util.Map; import org.bukkit.command.CommandSender; public abstract class Chat { public static void sendMessage( Message messag...
Java
UTF-8
7,289
1.945313
2
[]
no_license
package program.sw8.sw8program; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.Cont...
Python
UTF-8
95
2.921875
3
[]
no_license
R=[] def lista_sufixos(R): return R.split() i=0 while i<len(R): print(R[i]) i+=1
Swift
UTF-8
2,061
3.046875
3
[]
no_license
import CoreData import SwiftUI public struct Create: View { @State private var name: String = "" @State private var req = 3 @State private var opt = 1 @State private var step = 3 @State var showImagePicker: Bool = false @State var image: UIImage? public var body: some View { ...
C++
UTF-8
3,747
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<to;x++) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)...
C++
UTF-8
419
2.921875
3
[]
no_license
#ifndef ELEMENTA_H #define ELEMENTA_H #include "ielement.h" #include <string> using std::string; class ElementA : public IElement { public: ElementA(const string &name) : m_name(name) {} virtual void accept(IVisitor *visitor); inline string name() { return this->m_name; } virtual void setName(const...
Java
UTF-8
5,759
2.4375
2
[ "MIT" ]
permissive
package cn.marwin.crawler; import cn.marwin.classifier.MyClassifier; import cn.marwin.entity.Weibo; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import cn.marwin.entity.Comment; import cn.marwin.entity.Hot; import redis.clients.jedis.Jedis; import cn.ma...
Java
UTF-8
6,191
3.875
4
[]
no_license
package com.crownp.morethanjavacoding.Datastruct.SwardOffer.code02_String; import java.util.LinkedHashMap; import java.util.Map; /** * @Description TODO * @Author qgp * @Date 2019/12/5 9:56 **/ public class SwardOffer_String { /** * 【替换空格】 * 请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的...
JavaScript
UTF-8
3,227
2.546875
3
[]
no_license
$(document).ready(function(){ $(".test1").click(function(){ $(this).hide(); }); $("#test1").click(function(){ $(this).hide(); }); $("#test2").click(function(){ alert("You clicked!"); }); $("#test3").dblclick(function(){ alert("You double clicked!"); }); ...
Markdown
UTF-8
8,166
2.59375
3
[]
no_license
# 使用 TypeScript 开发 Vue 项目 ## 19.1 环境说明 ### Vue 项目中启用 TypeScript 支持 **使用 Vue CLI 脚手架工具创建 Vue 项目:** 对于全新项目,可以使用 Vue CLI 脚手架工具创建 Vue 项目 ![iShot2021-04-21 19.21.58](https://public.shiguanghai.top/blog_img/iShot2021-04-21%2019.21.58.png) **添加 Vue 官方配置的 TS 适配插件:** 对于已有项目,可以添加 Vue 官方配置的 TypeScript 适配插件 使用 `@vue/cli` 安...
Java
UTF-8
882
2.953125
3
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.mygdx.game; import com.badlogic.gdx.graphics.Texture; /** * * @author Shezar Khan, Anthony Peragine, Jet Keonakhone * Grass is a subclass of Terrain */ public class Grass extends Terrain { ...
Python
UTF-8
4,790
2.765625
3
[]
no_license
import socket import os import sys import tqdm from math import ceil from threading import Thread clients = [] # Thread to listen one particular client class ClientListener(Thread): def __init__(self, id: str, sock: socket.socket): super().__init__(daemon=True) self.sock = sock ...
Python
UTF-8
1,047
3.234375
3
[]
no_license
"""Models for adopt app.""" from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() DEFAULT_IMAGE_URL = 'https://cdn.dribbble.com/users/2095589/screenshots/4166422/user_1.png' def connect_db(app): """Connect this database to provided Flask app. You should call this in your Flask app. """ db.app...
C++
UTF-8
1,116
3.484375
3
[]
no_license
/// /// @file operator[].cpp /// @iverson (1564329410@qq.com) /// @date 2016-03-03 21:05:47 /// #include <string.h> #include <iostream> using std::cout; using std::endl; class CharSz{ public: CharSz(int); ~CharSz(); /*以成员函数的形式重载下标运算符*/ char & operator[](int); int getLen(); private: int _len;...
PHP
UTF-8
3,477
3.234375
3
[]
no_license
<?php namespace Curly\Ast\Node; use Curly\ContextInterface; use Curly\Ast\Node; use Curly\Ast\NodeInterface; use Curly\Io\Stream\OutputStreamInterface; /** * The Conditional node will evaluate one or more expression nodes into a boolean result. * * @author Chris Harris <c.harris@hotmail.com> * @version 1.0.0 * ...
JavaScript
UTF-8
2,205
3
3
[ "MIT" ]
permissive
"use strict"; // I got part of the following code from the following site // https://gist.github.com/ccnokes/95cb454860dbf8577e88d734c3f31e08#file-store-js // Import modules const path = require('path'); const fs = require('fs'); const electron = require('electron'); class Store { constructor(opts) { const use...
Java
UTF-8
2,973
2.546875
3
[]
no_license
package model; import android.os.Parcel; import android.os.Parcelable; import java.io.Serializable; public class Product implements Serializable, Parcelable { private String id; private String name; private Integer price; private String img; private String categories; private String descripti...
Python
UTF-8
17,647
3.078125
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Mar 26 14:33:23 2019 #@author: Jonathan Mushkin (Weizmann Institute of Science) All functions related to the Keplerian Mechcnics of 3-body motion simulation When possible, this code is made generic for N-bodies """ import numpy as np from numpy.linalg import n...
JavaScript
UTF-8
5,390
3.015625
3
[]
no_license
var readline = require('readline'); var readlineThing = readline.createInterface({ input: process.stdin, output: process.stdout }); var game = { start: function() { initialize(); }, restart: function() { game.start(); } } function initialize() { readlineThi...
Python
UTF-8
1,643
3.5625
4
[]
no_license
import math import matplotlib.pyplot as plt def phase_oscillation(g): # 引数は減衰比 x = [] # プロット用データ(x軸) y = [] # プロット用データ(y軸) for t in range(0, 40000): # プロットデータ作成 t *= 0.01 w = t # 入力の円振動数 try: fi = math.atan(-2 * g * wn * w / (wn ** 2 - w ** 2)) / math.pi *...
C++
UTF-8
1,014
2.578125
3
[ "MIT" ]
permissive
#include "VoxelTest.h" #include <algorithm> namespace test { TEST_F(VoxelTest, CreateTest) { ASSERT_TRUE(obj_ptr_); voxel_ptr_ = std::make_unique<voxel::Voxel>( *obj_ptr_, glm::vec3{ 8.f, 8.f, 8.f }); EXPECT_TRUE(voxel_ptr_); } TEST_F(VoxelTest, InsiderTest) { ASSERT_TRUE(obj_ptr_); voxel_ptr_ ...
C#
UTF-8
463
3.078125
3
[]
no_license
using System; using System.Collections.Generic; public class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); List<string> list = new List<string>(); for (int i = 0; i < n; i++) { list.Add(Console.ReadLine()); } va...
Python
UTF-8
1,890
2.9375
3
[]
no_license
#!/usr/bin/python """ LOG: 2016/12/16: Added handling of standard error messages """ USAGE = "Calculate the proportion of amino acids in correct positions" import sys, os ############################################################################### # call a external programm that returns a value running on "worki...
Markdown
UTF-8
1,393
2.578125
3
[]
no_license
#Overview 整个项目用javascript完成,数据库用的是MongoDB,http服务器用的是Express,后端基于NodeJS,通信用的是socket.io。由于客户端是基于web的,所以支持包括移动端,PC端等常用设备,当然也支持安卓设备。 Demo服务器可以通过校内网访问http://10.131.251.231:3000 测试。 #Front-End Architecture ## 用户界面 前端用户界面部分采用HTML编写,可以通过浏览器访问,具体实现见index.html 通过jquery操作DOM实现消息显示,具体见client.js ## 与后端通信 通过socket.io-client模块,实...
Java
UTF-8
5,108
2.890625
3
[]
no_license
package com.yangyue.crawler; import com.alibaba.fastjson.JSONArray; import com.yangyue.dao.bean.NewsBean; import com.yangyue.dao.imp.NewsDao; import com.yangyue.dao.inf.NewsDaoInf; import com.yangyue.tools.HttpRequest; import com.yangyue.tools.NewsCrawlerHelper; /** * Created by yangyue on 2016/11/2. */ ...
Java
UTF-8
622
2.109375
2
[]
no_license
package doctor.service; import doctor.models.security.ConfirmationToken; import doctor.repository.ConfirmationTokenRepo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @Service @RequiredArgsConstructor public class ConfirmationTokenService { private final ConfirmationTokenRe...
Java
UTF-8
1,050
2.09375
2
[]
no_license
package cn.znh.rulerseebar; import android.graphics.Color; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { private RulerSeekBar mRulerSeekBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onC...
Go
UTF-8
5,327
2.71875
3
[]
no_license
package main import ( "fmt" "math" "os" "time" "github.com/project-draco/moea" "github.com/project-draco/moea/binary" "github.com/project-draco/moea/nsgaii" ) const ( maxValue = float64(^uint32(0)) ) type problem struct { numberOfValues int bounds func(int) (float64, float64) objectiveFunct...
Python
UTF-8
3,220
2.75
3
[]
no_license
import sys import os import re import glob import read_log as log import input_adf import input_g09 print 'python autorun.py flag' print 'this script is run from a base directory' print 'flag = int.int.int... where each int specifies some flag (separator is .)' flag = sys.argv[1] flags = flag.split('.') cwd = os.ge...
PHP
UTF-8
3,632
2.828125
3
[]
no_license
<?php require("vendor/autoload.php"); use PHPUnit\Framework\TestCase; use DV\DataValidator as Data; class DataValidatorTest extends TestCase { /** * CPF TESTS */ public function testShouldReturnFalseWhenCpfHasMoreDigits() { $this->assertFalse(Data::isCpf("56355065523")); } publi...
JavaScript
UTF-8
415
2.9375
3
[ "MIT" ]
permissive
'use strict' var includes = require('./includes') /** * Pull values from an array. * * @param {*[]} array * @param {*|*[]} values * @return {*[]} */ module.exports = function pull (array, values) { var i, j, k = [], l = 0, m if (!Array.isArray(values)) values = [ values ] for (i = 0, m = array.length; i...
Markdown
UTF-8
724
2.78125
3
[]
no_license
# blackjack It's a practice on my javascript skill, which shows the game of casino blackjack abiding it's fundamental rules It follows the rule of blackajck with little alteration The kings,heart, and queen still have their values as 10 and ace can be 1 or 11 depending on the condition Ace will be 11 if it won' exceed ...
JavaScript
UTF-8
4,826
2.625
3
[ "LicenseRef-scancode-unknown-license-reference", "CC0-1.0" ]
permissive
var guides = [[0, 0], [1, 0], [2, 0.5], [3, 10]]; var svg = d3 .select("body") .append("svg") .attr("width", window.innerWidth) .attr("height", window.innerHeight); var xScale = d3.scaleLinear(); xScale.domain([0, 200]).range([0, window.innerWidth]); var yScale = d3.scaleLinear(); yScale.domain([1, 8]...
Java
UTF-8
1,444
3.015625
3
[]
no_license
package br.com.modulo1; import java.util.*; public class ExercicioLista { public static void main(String[] args) { //List<String> dia = new ArrayList<String>(Arrays.asList("red","blue","gray","purpll")); //List<String> cores = Arrays.asList("red","blue","gray","purpll"); List<String>...
JavaScript
UTF-8
329
2.59375
3
[]
no_license
import firebase from '../../firebase/config'; const SignUpRequest = async(email, password) => { try { return await firebase.auth().createUserWithEmailAndPassword(email, password); console.log("HI "); } catch (error) { console.log("HI "+error) alert(error) return; } }; export default SignU...
Markdown
UTF-8
1,117
2.875
3
[ "Apache-2.0" ]
permissive
--- title: Flow Service Account --- The Service Account is a special account in Flow that has special permissions to manage system contracts. It is able to mint tokens, set fees, and update network-level contracts. During Flow's Beta period, the Service Account is also the only account that is able to create new Flow ...
C#
UTF-8
2,723
2.703125
3
[]
no_license
using CommandLine; using System; using System.IO; using System.Reflection; namespace ConfigFixerByEnv { class Program { static void Main(string[] args) { Parser.Default.ParseArguments<Options>(args) .WithParsed<Options>(o => { var currentdire...
Java
UTF-8
125
1.648438
2
[]
no_license
package com.crv.ole.base; /** * Created by zhangbo on 2017/8/5. */ public interface BaseService<T> { void clear(); }
PHP
UTF-8
2,771
2.671875
3
[]
no_license
<?php $mysqli = false; function connectDB(){ global $mysqli; $mysqli = new mysqli("localhost", "root", "", "myblog.ua"); $mysqli->query("SET NAMES 'utf8'"); } function getAllArticles(){ return getAll("articles"); } function getAllGuestBookComments(){ ret...
JavaScript
UTF-8
929
2.546875
3
[]
no_license
document.onmouseover = onmouseover; document.onmouseout = onmouseout; function onmouseover() { var e = window.event.srcElement; var s = e.title.toString(); if(s == '' && e.tagName == 'A') s = e.innerText; if(s != '') window.setTimeout('window.status=\''+s.split('\'').join('\\\'')+'\'', 1); } function onmouseo...
Go
UTF-8
9,717
2.78125
3
[ "MIT" ]
permissive
package create import ( "bytes" "encoding/json" "io" "net/http" "os" "path/filepath" "strings" "testing" "github.com/MakeNowJust/heredoc" "github.com/cli/cli/v2/internal/browser" "github.com/cli/cli/v2/internal/config" "github.com/cli/cli/v2/internal/run" "github.com/cli/cli/v2/pkg/cmd/gist/shared" "git...
TypeScript
UTF-8
4,318
2.65625
3
[]
no_license
/* * Copyright (C) 2018 The DAD Authors * This file is part of The DAD library. * * The DAD 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 License, or * (at your option) any lat...
JavaScript
UTF-8
904
2.640625
3
[]
no_license
function SetHeight(iframeId, minHeight) { var iframe = document.getElementById(iframeId); if (iframe && !window.opera) { if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight) { iframe.height = iframe.contentDocument.body.offsetHeight; } ...
C#
UTF-8
2,341
2.625
3
[]
no_license
using Microsoft.VisualStudio.TestTools.UnitTesting; using WBAC.DeveloperInterview.Model; using WBAC.DeveloperInterview.EvaluationStrategies.AgeEvaluation; namespace WBAC.DeveloperInterview.Tests.EvaluationStrategies.AgeEvaluation { [TestClass] public class ZeroYearStrategyTests { [TestMethod] ...
Python
UTF-8
1,945
3.109375
3
[]
no_license
#!/usr/bin/python3 # program to extract content from Setopati # for Nepali ngram model # http://virtualanup.com/nepali-ngram-models/ import urllib3 from bs4 import BeautifulSoup import os http = urllib3.PoolManager() def checkDir(directory): if not os.path.exists(directory): os.makedirs(directory) outp...
Java
UTF-8
1,780
2.25
2
[]
no_license
package rocks.zipcodewilmington; import com.sun.tools.javac.comp.Resolve; import org.junit.Assert; import org.junit.Test; import rocks.zipcodewilmington.animals.Cat; import rocks.zipcodewilmington.animals.Dog; import rocks.zipcodewilmington.animals.animal_storage.CatHouse; import rocks.zipcodewilmington.animals.animal...
Python
UTF-8
4,540
2.640625
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[4]: ##Import all necessary packages import os import glob import random import pandas as pd import concurrent.futures import numpy as np import matplotlib.pyplot as plt from matplotlib.image import imread import PIL as image import tensorflow_addons as tfa import tensorflow...
Markdown
UTF-8
2,072
2.90625
3
[]
no_license
# angular4-ns A simple Angular 4 project ## Installation: ### Before npm install please have angular-cli installed ```bash npm install -g @angular/cli npm install ``` ### Running the application ```bash ng serve ``` Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the s...
C++
UTF-8
1,032
3.5
4
[]
no_license
#include <iostream> #include <cmath> #include "matrix.hpp" int main() { int numOfRows = 2; int numOfColumns = 3; auto **array = new double*[numOfRows]; for(int i = 0; i < numOfRows; i++) { array[i] = new double[numOfColumns]; for(int j = 0; j < numOfColumns; j++) array[i][j...
Go
UTF-8
635
3.21875
3
[]
no_license
package main import "fmt" func main() { var t int fmt.Scan(&t) for i := 0; i < t; i++ { var n, m int fmt.Scan(&n, &m) var mat = make([][]int, n, n) for value := range mat { mat[value] = make([]int, m) } fmt.Println(placeBridges(n, m, mat)) } } func placeBridges(n int, m int, mat [][]int) int { v...
Markdown
UTF-8
18,102
2.609375
3
[ "MIT" ]
permissive
--- heading: Element Mapper seo: Element Mapper Advanced Examples | Element Mapper | Cloud Elements API Docs title: Advanced description: View different advanced examples of Element Mapper in action. layout: sidebarelementdoc apis: API Docs platform: organizations breadcrumbs: /docs/guides/home.html parent: Back to Gui...
C++
UTF-8
2,539
2.6875
3
[ "MIT" ]
permissive
#include "SkipList.h" #include "Arena.h" #include "Random.h" #include <gtest/gtest.h> #include <atomic> #include <set> namespace zhanmm { typedef uint64_t Key; struct Comparator { int operator()(const Key& a, const Key& b) const { if (a < b) { return -1; } else if (a > b) { return +1; } e...
Python
UTF-8
776
2.78125
3
[]
no_license
import csv import json filtered = [] with open('large_airports.csv', 'rb') as csvfile: spamreader = csv.reader(csvfile, delimiter=',', quotechar='"') for row in spamreader: filtered.append(row) jsonObject = {} for row in filtered: jsonObject[row[7]] = { 'ident': row[0], 'lat': row...
C#
UTF-8
3,048
3.265625
3
[]
no_license
namespace AquaShop.Models.Aquariums { using System; using System.Collections.Generic; using System.Linq; using System.Text; using AquaShop.Models.Decorations.Contracts; using AquaShop.Models.Fish.Contracts; using AquaShop.Utilities.Messages; using Contracts; public abstract class A...
SQL
WINDOWS-1250
2,163
3.765625
4
[]
no_license
--1 --A) CREATE TABLE Uczestnicy ( PESEL VARCHAR(11) NOT NULL CONSTRAINT pk_uczest_PESEL PRIMARY KEY, --pk -> primary key nazwisko VARCHAR(30) NOT NULL CONSTRAINT ck_uczest_nazw CHECK (nazwisko LIKE '[A-Z]%'), miasto VARCHAR(30) CONSTRAINT ck_uczest_miast CHECK (miasto LIKE '[A-Z]%') DEFAULT 'Pozna', ); -...
C
UTF-8
1,813
3.59375
4
[]
no_license
#include <stdio.h> void verifica(int a, int b, int c, int d, int e); void ordena(int* a, int* b, int* c, int* d, int* e); int main() { int a, b, c, d, e; scanf("%d %d %d %d %d", &a, &b, &c, &d, &e); if((a < 0) || (b < 0) || (c < 0) || (d < 0) || (e < 0) || (a > 1000000) || (b > 1000000) || (c > 1000000) || (d...
Java
UTF-8
4,752
2.75
3
[]
no_license
import com.github.javaparser.ast.CompilationUnit; import com.github.javaparser.utils.SourceRoot; import javax.swing.*; import java.awt.*; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(Stri...
C
UTF-8
5,680
3.453125
3
[]
no_license
/** Skeleton code of assignment 2 (For reference only) The time calculation could be confused, check the exmaple of gettimeofday on connex->resource->tutorial for more detail. */ struct customer_info{ /// use this struct to record the customer information read from customers.txt int user_id; int c...
Shell
UTF-8
1,065
3.171875
3
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
#!/bin/bash ANALYSIS=$1 FROMLIMIT=$4 mkdir -p $ANALYSIS declare -A array=( [signal]=met [wmn]=singlemu [tmn]=singlemu [tme]=singlemu...
Markdown
UTF-8
2,406
3.75
4
[]
no_license
# Description [https://www.codewars.com/kata/523a86aa4230ebb5420001e1/train/javascript](https://www.codewars.com/kata/523a86aa4230ebb5420001e1/train/javascript) What is an anagram? Well, two words are anagrams of each other if they both contain the same letters. For example: ``` 'abba' & 'baab' == true 'abba' & 'bbaa...
Python
UTF-8
1,581
3.203125
3
[]
no_license
#!/usr/bin/env python3 """Tools for extracting job info from CSV files""" import csv import unittest import ListShaper def read_log(file_name): #csvfile = open(file_name, newline='', encoding='latin-1', mode='r') with open(file_name, newline='', encoding='latin-1', mode='r') as csvfile: reader = csv....
Ruby
UTF-8
506
4.46875
4
[]
no_license
# FizzBuzz App #Write a program that prints the numbers from 1 to 100 #For multiples of three, print “Fizz” instead of the number # For multiples of five, print “Buzz” instead of the number # For numbers which are multiples of both three and five, print “FizzBuzz” instead of the number number = 0 while number < 1...
C#
UTF-8
16,231
2.515625
3
[ "MS-PL" ]
permissive
//------------------------------------- // Copyright (c) Microsoft Corporation //------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.IO; using NModel.Terms; using NModel; using NModel.Execution; using Action = NModel.Terms.Action; namespace ...
C++
UTF-8
8,996
2.515625
3
[]
no_license
#include "main.hpp" using namespace DBL; const char *Ai::aiType = "Ai"; const char *PlayerControlledAi::type = "PlayerControlledAi"; const char *WanderAimlesslyAi::type = "WanderAimlesslyAi"; const char *VillagerAi::type = "VillagerAi"; Ai::Ai(const char *componentSecondaryType): ActorComponent(aiType), componentSec...
Python
UTF-8
774
3
3
[]
no_license
# import all the required modules import numpy as np import imageio import scipy.ndimage import cv2 # take image input and assign variable to it img = "https://mubaarka.com/images/24.08.2021_18.33.35_REC.png" # function to convert image into sketch def rgb2gray(rgb): # 2 dimensional array to convert i...
Markdown
UTF-8
4,263
2.71875
3
[]
no_license
# Domino curriculum This repository contains a course for learning [Domino Data Lab](https://docs.dominodatalab.com/en/4.2/). Recorded Demo of Domino: - [link](https://dominodatalab.zoom.us/rec/play/uMF_deCo_D03SIGd5gSDU6QtW460famsgHcdqPYPykfgUSUCZwHwZudDauYhg61yjIp9o4p0JQcOKrWc?continueMode=true) - password: 4R*8M...
Java
UTF-8
2,756
3.421875
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
package org.jzy3d.io; import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.util.ArrayList; import java.util.List; publi...
Java
UTF-8
144
2.453125
2
[]
no_license
package DiamonProblem; public interface C2 { public default void method3() { System.out.println("call default inteface c2"); } }
JavaScript
UTF-8
704
3.5
4
[]
no_license
const secondsHand = document.querySelector('[data-seconds-hand]') const minuteHand = document.querySelector('[data-minute-hand]') const hourHand = document.querySelector('[data-hour-hand]') function timer(){ const currentTime = new Date(); const secondRatio = currentTime.getSeconds() / 60; const minuteRat...
Java
UTF-8
4,628
2.21875
2
[]
no_license
/******************************************************************************* * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. ...
JavaScript
UTF-8
2,304
2.625
3
[]
no_license
function modifier() { // 1. Interruption de l'envoi du formulaire event.preventDefault(); // 2. Récupération des données du formulaire const Nom = document.querySelector('#Nom'); const Prenom = document.querySelector('#Prenom'); const DatNaiss = document.querySelector('#DatNaiss'); cons...
Java
UTF-8
1,972
2.0625
2
[]
no_license
package com.david.freedom.plutus.request; import com.david.freedom.plutus.common.request.BaseRequest; import com.david.freedom.plutus.stats.RegistrationStatusEnum; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import javax.validation.constraints.NotNull; /** * @version $Id: null.java, v 1.0 2020...
Java
UTF-8
871
3.78125
4
[]
no_license
package dsa.ch4; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Reverser { private Stack<Character> chars; public Reverser() { this.chars = new Stack<Character>(Character.class); } public void reverse() throws IOException { char[] chrs = read(); ...
JavaScript
UTF-8
2,800
2.671875
3
[ "MIT" ]
permissive
const streamify = require('stream-generators'); exports = module.exports = itf; exports.contentType = 'application/octet-stream'; exports.extension = 'itf'; /* ITF file format see: https://developers.sygic.com/documentation.php?action=navifiles_ITF Header (4 + 4 + 2 + 2 = 12 bytes) 00 UInt32 Time Creation time -...