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
2,051
2.53125
3
[]
no_license
package com.atguigu.test; import java.util.HashMap; import java.util.List; import javax.swing.plaf.synth.SynthSeparatorUI; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springfra...
C#
UTF-8
2,200
2.609375
3
[]
no_license
using System.Collections.Generic; using System.Linq; using MobiFinanceBank.DAL.Repositories.Interfaces; using MobiFinanceBank.Model.Models; using MobiFinanceBank.Vm; using MobiFinanceBank.VmService.Interfaces; using ClientType = MobiFinanceBank.Model.Enums.ClientType; namespace MobiFinanceBank.VmService { /// <su...
C#
UTF-8
800
2.515625
3
[]
no_license
using CodeGenerator.Core.Templates.Commands.Parameters; using System.Collections.Generic; using System; namespace CodeGenerator.Core.Templates.Parser { public class FallbackParser : CommandParserBase { public FallbackParser(IInternalParsable parsable) : base(parsable) { } ...
Java
UTF-8
662
2.328125
2
[]
no_license
package tp2.factCt; import jade.core.behaviours.Behaviour; import jade.lang.acl.ACLMessage; import jade.lang.acl.MessageTemplate; public class ReceiveBhv extends Behaviour { private FactAgt parentAgt; public ReceiveBhv(FactAgt parentAgt){ this.parentAgt = parentAgt; } //@Override public void ...
C#
UTF-8
1,842
3.421875
3
[]
no_license
using System.Collections.Generic; using System.Diagnostics.Contracts; using System.IO; namespace Leaf { public class GrayScaleImage { private List<List<byte>> _image; private int _pixelHeight; private int _pixelWidth; public int PixelHeight => _pixelHeight; public int...
JavaScript
UTF-8
8,049
2.8125
3
[]
no_license
var count = 0; function searchMedicine() { var input, filter, table, tr, td, i, txtValue; input = document.getElementById('searchMedicine'); filter = input.value.toUpperCase(); table = document.getElementById('myTable'); tr = table.getElementsByTagName('tr'); for (i = 0; i < tr.length; i++) { td = tr[i...
JavaScript
UTF-8
5,201
2.546875
3
[ "MIT" ]
permissive
"use strict"; var AppView = (function(){ function create(){ var appView = {}; bind(appView); appView.init(); return appView; } function bind(appView){ appView.installServiceWorker = installServiceWorker.bind(appView); appView.serviceWorkerInstalled = serviceWorkerInstalled.bind(appView); ...
Markdown
UTF-8
3,545
2.75
3
[]
no_license
# 九月十三日相克宗至红龙乡 ![](https://ridemypic.oss-cn-chengdu.aliyuncs.com/rideimg/2616645-e05bc0ee4849f2c8.jpg) 天路十八旁 今天的骑行路,从相克宗到红龙乡,我一直知道并担忧其难度的。 从3400上升到4200,然后基本保持在4100至4400之间的大起大伏。总行程八十公里的高海拨骑行。晚饭时,一个自驾从亚丁回来的住客还告诉我,剪子湾隧道全线无灯,这。。。 晚饭后,我还向老板打听搭车的价格。老板推荐我搭施工队的车上去。 不知道是高反还是犹豫不决,昨天一整晚都没有睡踏实,早上三四点钟,村里的狗开始疯狂地叫。 促使我决定还是出发...
C#
UTF-8
916
3.640625
4
[ "MIT" ]
permissive
using System; class Styrofoam { static void Main() { double budget = double.Parse(Console.ReadLine()); double houseArea = double.Parse(Console.ReadLine()); int windowsCount = int.Parse(Console.ReadLine()); double styrofoamPackArea = double.Parse(Console.ReadLine()); dou...
Shell
UTF-8
287
2.6875
3
[]
no_license
#!/bin/sh # save as asmtomach.sh and run: # chmod u+rwx asmtomach.sh # then run: # ./asmtomach.sh 'mov $1, %eax' cd /var/tmp echo $1 > asmtomach.s gcc -m32 -c asmtomach.s objdump -d asmtomach.o | grep '[0-9a-f][0-9a-f] ' | grep -v '00000000 <.text>' | cut -c 7- cd - 2>&1 >/dev/null
SQL
UTF-8
256
3.25
3
[]
no_license
-- Q) Listar los articulos que tengan un precio mayor a la mitad del precio -- promedio de los articulos y un stock minimo mayor a 200 unidades. (6 filas) SELECT * FROM ARTICULOS WHERE PTO_REPOSICION>200 AND PRECIO>(SELECT AVG(PRECIO)/2 FROM ARTICULOS)
Java
UTF-8
1,685
2.421875
2
[]
no_license
package ejb; import domain.Expediente; import exceptions.ExpedienteNoEncontradoException; import java.util.List; import java.util.logging.Logger; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.TypedQuery; import javax.persistenc...
C#
UTF-8
4,501
2.734375
3
[ "MIT", "ImageMagick", "LicenseRef-scancode-unknown-license-reference" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; namespace NMagickWand { public delegate IntPtr MagickQueryStringListDelegate(string pattern, out UIntPtr count); public delegate IntPtr MagickWandQueryStringListDelegate(IntPtr wand, string pattern, out UI...
Java
UTF-8
928
3.9375
4
[]
no_license
import java.util.Scanner; public class homework2{ public static void main(String[] args) { Scanner rd = new Scanner(System.in); //Definir variables String palabra; //Solicitar una String System.out.print("Ingrese una palabra: "); palabra = rd.next();// Definir la variables int size = palabra....
Java
UTF-8
2,035
1.96875
2
[]
no_license
package com.cn.thinkx.merchant.domain; import java.sql.Date; public class CardBal { private String selectDate; private String insCode; private String productCode; private String outAmt; private String cardBal; private String createUser; private String updateUser; private Date createTime; private Date updateT...
Java
UTF-8
885
2.46875
2
[]
no_license
package com.valencia.sopra.component; import java.util.Date; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** * EJEMPLO DE UN PROCESO SPRING BATCH USANDO LAS ANOTAC...
JavaScript
UTF-8
4,996
2.96875
3
[]
no_license
import React, { Component } from 'react'; import Form from '../components/Form'; export default class FormContainer extends Component { constructor(props){ super(props); this.state = { firstName: '', lastName: '', email: '', message: '', i...
Markdown
UTF-8
9,240
2.53125
3
[ "Apache-2.0", "MIT" ]
permissive
# Installation instructions <!-- toc --> - [Installation instructions](#installation-instructions) - [Basic requirements](#basic-requirements) - [Installation steps:](#installation-steps) - [Load required modules](#load-required-modules) - [Archiving new emails via Postfix or the likes](#archiving-new-emails-vi...
Shell
UTF-8
537
3.40625
3
[]
no_license
#!/bin/bash javac Syllables.java OUTPUT="$(java Syllables < input.txt)" LINESOUT="$(echo "${OUTPUT}" | nl)" DIFF="$(diff <(echo "${LINESOUT}") <(nl output.txt) | grep ">")" IFS=$'\n'; array=($DIFF);unset IFS; for element in "${array[@]}" do LINE="$(echo "$element" | sed -e '$!d' | grep -o -E '[0-9]+' | head -1)"...
JavaScript
UTF-8
3,662
3.125
3
[ "Unlicense" ]
permissive
/* * https://leetcode.com/contest/weekly-contest-185/ * * Rank Name Score Finish Time Q1 (3) Q2 (4) Q3 (5) Q4 (6) * 2666 / 14208 claytonjwong 12 1:23:20 0:10:28 *1 0:41:44 1:13:20 *1 */ /* * 1417. Reformat The String * * Q: https://l...
Python
UTF-8
2,825
2.875
3
[]
no_license
import re import os import sys def replyToPost(subreddit, answerToPost, query): if not os.path.isfile("posts_replied_to.txt"): print("Nessun file posts_replied_to.txt, verrà creato al primo controllo!") posts_replied_to = [] else: with open("posts_replied_to.txt", "r") as f: ...
Java
UTF-8
1,565
3.171875
3
[]
no_license
package com.example.nurse; import java.util.TreeMap; import android.util.Log; /* * This class includes 3 vital signs:temperature(float), * blood pressure(float), heart rate(float). * These information is recorded in a map(Use recorded time as key). * Every time someone tries to add new information, it is adde...
Java
UTF-8
2,373
2.828125
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 BTVN_L1; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.Socket; ...
C#
UTF-8
1,096
2.78125
3
[]
no_license
using System.Collections.Generic; namespace RQL.Net { public class RQLResponse { internal RQLResponse( RQLRequestBatch batch, string jsonResult, bool success ) { Success = success; Batch = batch; JsonResponse = jsonResult; if( success ) ...
Markdown
UTF-8
5,814
2.953125
3
[]
no_license
# Books This is a demo project that uses the Google Books API with React and Redux. #### Selected Enhancements - Sort books by ascending, descending, recently added*. Linkable (i.e. copy/paste browser url and same view displays). - Switchable layouts (from grid view to list view). Linkable. (**instead of recently a...
C++
UTF-8
451
2.609375
3
[]
no_license
#include<iostream> #include"Matrix.h" int main(int argc,char* argv[]){ /*int I=atoi(argv[1]),J=atoi(argv[2]); Mat<Q> m(I,vector<Q>(J,0)); for(int i=0;i<I;i++){ for(int j=0;j<J;j++){ m[i][j]=Q(argv[i*J+j+3]); } }*/ int I,J; cin>>I>>J; Mat<Q> m(I,vector<Q>(J,0)); for(int i=0;i<I;i++){ f...
C++
UTF-8
3,430
2.671875
3
[]
no_license
#define OLC_PGE_APPLICATION #include "olcPixelGameEngine.h" // define map in 1d array // load sprite and draw // move with mouse class BreakOut : public olc::PixelGameEngine { public: BreakOut() { sAppName = "Pixel Experiments"; } private: float fBatPos = 20.0f; float fBatWidth = 40.0f; olc::vf2d vBall = { 2...
C
UTF-8
3,557
2.75
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
//////////////////////////////////////////////////////////////////////////////// // COPYRIGHT (c) 2016 Igal Maly. ALL RIGHTS RESERVED. // Use of this source code is governed by a FreeBSD License that can be found // in the LICENSE file. //------------------------------------------------------------------------------ //...
C++
UTF-8
4,314
2.75
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #define ericxiao ios_base::sync_with_stdio(0);cin.tie(0); using namespace std; int B, N, d, x, M; inline int Abs(int x){ return (x < 0) ? -x : x; } inline char readchar() { static const size_t bufsize = 65536; static char buf[bufsize]; static ch...
JavaScript
UTF-8
1,280
3.125
3
[]
no_license
/* * Title: * Description: * Author: Md Asif Joardar * Date: * */ // dependencies const crypto = require('crypto'); const environments = require('./environments'); // module scaffolding const utilities = {}; // parse json string to object utilities.parseJSON = (jsonString) => { let output; ...
C++
UTF-8
18,726
2.578125
3
[]
no_license
/* HOW THE LIGHT PATTERN WORKS: > The prefix (half past, quarter to, etc) will be a separate color from the hours. > Hours will be one of two solid colors, one for AM, one for PM - Light blue for AM, Purple for PM? > The prefix will fade from green -> red over the course of the 5 min interval */ /* * But...
JavaScript
UTF-8
3,343
3.03125
3
[ "MIT" ]
permissive
import Ajax from "./ajax.js"; let game; let player; const rock_button = document.getElementById("rock_button"); const paper_button = document.getElementById("paper_button"); const scissors_button = document.getElementById("scissors_button"); const lizard_button = document.getElementById("lizard_button"); const spock_...
Python
UTF-8
915
2.5625
3
[]
no_license
#!/usr/bin/python import os import re import subprocess filename = "/var/log/zimbio/error.log" stdin,stdout = os.popen2("tail -100 %s" % filename) stdin.close() lines = stdout.readlines() stdout.close() # Loop through the lines backwards until we find the "REQUEST STATS" counter = len(lines) - 1 lns = [] while co...
C#
UTF-8
640
2.53125
3
[ "Apache-2.0" ]
permissive
using System; using Windows.UI.Xaml.Data; namespace Musicus { public class BoolOpacityConverter : IValueConverter { public bool IsReverse { get; set; } public object Convert(object value, Type targetType, object parameter, string language) { var state = (bool)value; ...
PHP
UTF-8
4,791
2.640625
3
[]
no_license
<?php /** * Elementor Counter Widget. * * Elementor widget that inserts an embbedable content into the page, from any given URL. * * @since 1.0.0 */ class Alesha_Counter_Widget extends \Elementor\Widget_Base { /** * Get widget name. * * Retrieve Counter widget name. * * @since 1.0.0 * @access public...
Java
UTF-8
737
2.8125
3
[]
no_license
package com.chengxuxiaoba.video.model; import java.util.HashMap; import java.util.Map; public class KeyValuePair<K, V> { private Map<K, V> mapContainer = new HashMap<K, V>(); public KeyValuePair(){} public KeyValuePair(K key, V value) { mapContainer.put(key, value); } public void pu...
Java
UTF-8
1,873
2.265625
2
[ "Apache-2.0" ]
permissive
package com.study.fuli.data; import com.study.fuli.data.remote.ApiUrl; import com.study.fuli.data.remote.Utils; import com.study.fuli.event.EventButtGirlGot; import org.greenrobot.eventbus.EventBus; import java.io.IOException; import java.util.ArrayList; import okhttp3.Call; import okhttp3.Callback; import okhttp3....
Java
UTF-8
3,986
1.890625
2
[]
no_license
package khttp.responses; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.Iterator; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.internal.markers.KMappedMarker; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 0}, d1 = {"\u0000!\n\u0000\n\u0002\u0010(\n...
Markdown
UTF-8
1,280
2.671875
3
[ "MIT" ]
permissive
--- title: "Ricetta pane con uvetta, semplice" date: 2021-05-22 07:30:00 +0200 author: Stefano Marzorati layout: post image: 'https://marzorati.co/img/ricette.png' share-img: 'https://marzorati.co/img/ricette.png' categories: [Ricette] tags: [ricetta, pane, uvetta, lievito, acqua, sale, farina] --- **Quantitativo per f...
Python
UTF-8
1,781
2.609375
3
[]
no_license
class ResultManager: def __init__(self, gen, syn, exo, syn_merger, hit_merger, hit_analyzer): self.results = {g.name: Result(g) for g in gen.intervals()} # merge in the synteny data for result in self.results.values(): syn_merger.merge(result=result, syn=syn) # merge in...
JavaScript
UTF-8
917
2.765625
3
[]
no_license
(function(){ let ajaxHelper = new AjaxHelper(); var code = document.querySelector("#code"); var name = document.querySelector("#name"); var update = false; let create = async () =>{ var data = { name: name.value }; if(!update){ data.code = code.value; ...
TypeScript
UTF-8
3,147
2.640625
3
[]
no_license
import { Injectable } from '@angular/core'; @Injectable() export class CheatCodesService { // Variables cheatCodes= [ ["ArrowUp", "ArrowUp", "ArrowDown", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowLeft", "ArrowRight", "b", "a"], ["[", "]", "ArrowDown", "l", "2", "ArrowUp", "l", "1", "o", "ArrowUp", "x", "Arro...
C++
UTF-8
1,782
3.640625
4
[]
no_license
#include <iostream> using namespace std ; #include "FormeS.hpp" //Implantation de la classe FormeS //Constructeur //qui prend en paramètrela taille FormeS::FormeS(size_t taille) :maxformes(taille), nbformes(0), formes(nullptr) //liste d'initialisation { formes = new Forme * [maxformes] ; } //On crée le tableau //...
PHP
UTF-8
3,998
2.703125
3
[ "MIT" ]
permissive
<?php namespace OneSite\Notifier\Services; use GuzzleHttp\Client; use OneSite\Notifier\Contracts\NotificationInterface; /** * Class FirebaseService * @package OneSite\Notifier\Services */ class FirebaseService implements NotificationInterface { /** * @var Client */ private $client; /** ...
Java
UTF-8
4,479
2.59375
3
[ "Apache-2.0" ]
permissive
package edu.stanford.nlp.sempre; import java.util.*; import fig.basic.*; /** * Similar to LexiconFn, but list all approximate matches from a FuzzyMatchable instance. * * @author ppasupat */ public class FuzzyMatchFn extends SemanticFn { public static class Options { @Option public int verbose = 0; } pu...
JavaScript
UTF-8
1,668
2.5625
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import AppNavbar from './AppNavbar'; import { Table } from 'reactstrap'; class Movies extends Component { constructor(props){ super(props); this.state = { isLoading: true, movies: [], testmovie: [] }; } async componentDidMount() ...
Python
UTF-8
642
3.875
4
[]
no_license
# converting to str method # class Solution(object): # def isPalindrome(self, x): # x = str(x) # rev = x[::-1] # return x == rev # without converting to str class Solution(object): def isPalindrome(self, x): if x < 0: return False x_copy = x r...
PHP
UTF-8
368
2.5625
3
[ "MIT" ]
permissive
<?php namespace App\Models; use CodeIgniter\Model; class SettingsEmailTemplate extends Model { protected $table = 'settings_email_template'; protected $primaryKey = 'id'; protected $useSoftDeletes = false; protected $returnType = "object"; protected $allowedFields = ["title","subject","email_...
Ruby
UTF-8
44
2.5625
3
[]
no_license
n = gets.to_i puts (10000 + n * 10000) / 2
C++
UTF-8
648
2.640625
3
[]
no_license
#include "Pir.h" void Pir::begin(uint8_t _pin, Buzzer* buzzer, PubSubClient* client) { pin = _pin; this->buzzer = buzzer; this->client = client; pinMode(pin, INPUT); } void Pir::loop(){ val = get(); Serial.println("val Pir: "); Serial.println(val); if(val == HIGH){ if(pirState == LOW){ Seri...
C++
UTF-8
9,098
2.796875
3
[ "MIT" ]
permissive
/* * helper_functions.h * Some helper functions for the path planning project. * Created on: Nov 25, 2018 * Author: Michael Berner */ #ifndef HELPER_FUNCTIONS_H_ #define HELPER_FUNCTIONS_H_ #include <math.h> #include <fstream> #include <vector> #include <iostream> #include <string> #include "Eigen-3.3/Eige...
JavaScript
UTF-8
3,359
2.703125
3
[]
no_license
if (!window.superskill) window.superskill = {}; if (!window.superskill.loader) window.superskill.loader = {}; // TODO: this.loading keeps parent-child references after load completes. Remove them to save memory window.superskill.loader = new function() { this.base = "things/"; this.loading = {}; ...
PHP
UTF-8
2,200
2.75
3
[]
no_license
<?php /** * User: haier */ namespace Home\Service; class AdminService extends CommonService{ /** * 管理员登录认证 * @param array $admin 管理员信息 * @return array */ public function login($admin) { $Admin = $this->getM(); // 邮箱是否存在 if (!$this->existAccount($admin['email'])...
SQL
UTF-8
353
2.96875
3
[]
no_license
-- Add NL search to topics table ALTER TABLE topics ADD COLUMN search_vector tsvector; CREATE INDEX topics_search_index ON topics USING gin(search_vector); CREATE TRIGGER topics_search_update BEFORE UPDATE OR INSERT ON topics FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger("search_vector", "pg_cat...
Ruby
UTF-8
221
3.0625
3
[]
no_license
threes = 0 fives = 0 fifteens = 0 sum = 0 while threes < 999 do threes += 3 sum += threes end while fives < 995 do fives += 5 sum += fives end while fifteens < 990 do fifteens += 15 sum -= fifteens end puts sum
Markdown
UTF-8
19,536
2.640625
3
[ "MIT" ]
permissive
![todoist-shortcuts logo](src/icon128.png) **todoist-shortcuts** is a browser extension or greasemonkey script which adds a bunch of keyboard shortcuts to [Todoist](https://todoist.com). Along with this repository, it is also available from the following places: * [ Extension for Google Chrome ![Chrome Users](htt...
JavaScript
UTF-8
544
4.09375
4
[]
no_license
//example 1 var colors = [ 'red', 'blue' , 'green' ,'pink']; for(var i = 0; i <colors.length; i++){ console.log(colors) } colors.forEach(function(value){ console.log(value); }); //example 2 var numbers = [ 1,2,3,4,5] var sum = 0; function adder(number){ sum += number; } numbers.forEach(adder); sum; //exam...
JavaScript
UTF-8
774
3.03125
3
[]
no_license
//document.addEventListener('DOMContentLoaded', check) function check(){ //var btn = document.querySelector('#registerButton'); //btn.addEventListener('click', valid8); //function valid8(){ var usernameInput = document.querySelector('#user'); var errdiv = document.querySelector("#error"); if (usernameIn...
PHP
UTF-8
566
2.8125
3
[]
no_license
<?php $dsn = sprintf("%s:%s",$database['type'],$database['host']); try { $conn = new PDO($dsn); $conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo $e->getMessage(); die(); } function hsql_query($conn,$sql , $params = array()) { $sql = preg_replace("/\?/","__DA...
C#
UTF-8
2,972
3.15625
3
[]
no_license
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Password_Manager { class sql { private SqlConnection conn; //ServerConnection Server = new ServerConnection(); ...
Shell
UTF-8
86,874
3.21875
3
[]
no_license
#!/bin/bash declare -i PIDscript=$! declare -a argumentosEntrada=$@ # Nombre: global # Descripción: Es el bloque de código que alberga todas las variables globales # ¿Por qué usar una función global? # No hay mucho beneficio más allá del estético, poder minimazar el bloque de código de global (200 líneas aprox) # m...
SQL
UTF-8
6,080
3.265625
3
[]
no_license
drop table ea_category cascade constraints delete from ea_category cascade constraints create table ea_category( ey_categorynum number(4) primary key, ey_bigcategory varchar2(100) not null, --대분류 ey_smallcategory varchar2(100) not null --소분류 ); select distinct(ey_bigcategory) from ea_catego...
Java
UTF-8
3,696
2.015625
2
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * Copyright © 2019 Cask Data, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
JavaScript
UTF-8
220
3.28125
3
[]
no_license
function trocaCedulas(valor){ let c100 let r100 let cedulas if(valor > 100){ let c100 = parseInt(valor / 100) let r100 = valor % 100 } } console.log(trocaCedulas(200))
Java
UTF-8
1,857
3.015625
3
[ "Apache-2.0" ]
permissive
package com.hasancaslan; import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.util.concurrent.ExecutionException; import java.util.function.Supplier; public class JavaHttpClientDemo { public static void ...
JavaScript
UTF-8
2,320
3.046875
3
[ "MIT" ]
permissive
$(document).ready(() => { function updateUI(postId, voteType){ console.log("more stuff"); let gifScoreSpan = $(`#gifScoreSpan${postId}`); let jellyScoreSpan = $(`#jellyScoreSpan${postId}`); $.ajax({ method: "GET", url: "/api/updateVotes/" + postId, }).then( (results) => { let ol...
Swift
UTF-8
3,617
2.875
3
[]
no_license
// // ContentView.swift // MisDatos // // Created by David A Cantú Delgado on 19/02/20. // Copyright © 2020 Tec de Monterrey. All rights reserved. // import SwiftUI struct ContentView: View { @State private var infoSheet = false @State private var esFormal = true @State private var menuIzq = "Inf...
Java
UTF-8
1,707
2.25
2
[]
no_license
package com.example.demo.jdbc; import com.example.demo.bean.ApiVarBean; import org.springframework.jdbc.core.RowMapper; import java.sql.ResultSet; import java.sql.SQLException; public class ApiVarBeanRowMapper implements RowMapper<ApiVarBean> { @Override public ApiVarBean mapRow(ResultSet resultSet, int i) t...
Swift
UTF-8
2,762
3
3
[]
no_license
// // PokemonDetailTypesTableViewCell.swift // PokemonApp // // Created by Juan Santiago Martín Balbás on 14/10/2018. // Copyright © 2018 Juan Santiago Martín Balbás. All rights reserved. // import UIKit class PokemonDetailTypesTableViewCell: UITableViewCell { static let reuseIdentifier = "PokemonDetailTypesT...
Java
UTF-8
4,831
2.078125
2
[]
no_license
/* * Copyright (c) 2020. Hartmut Lang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
C
UTF-8
335
2.953125
3
[]
no_license
#include<stdio.h> int main() { int n,i,y; scanf("%d",&n); int a[2*n]; for(i=0;i<2*n;i++) { scanf("%d",&a[i]); } for(i=0;i<2*n;i=i+2) { y=a[i]; a[i]=a[i+1]; if(y>a[i])printf(">\n"); else if(y<a[i])printf("<\n"); else printf("=\...
TypeScript
UTF-8
793
2.625
3
[ "MIT" ]
permissive
const uuidRegExp = new RegExp('UUID="([^"]+)"'); const locationRegExp = new RegExp('Location="([^"]+)"'); const zonenameRegExp = new RegExp('ZoneName="([^"]+)"'); const invisibleRegExp = new RegExp('Invisible="([^"]+)"'); export default class ZoneGroupMember { public static fromXML(xml: string): ZoneGroupMember { ...
Markdown
UTF-8
1,002
2.859375
3
[]
no_license
# hbo-newsletter v-1 This program is responsible for newsletter preparation. It automaticly creates new html files, containing static links in place of photos delivered by template. All it needs, is delivered html templates and csv files with names and urls from static cms storage. - To use this script, you need to r...
Python
UTF-8
1,306
2.671875
3
[ "MIT" ]
permissive
from matplotlib import pyplot as plt import csv import numpy as np filename = r"C:\Users\cmcpa\OneDrive\Desktop\cte_data2_short.txt" file = open(filename, 'r') data = csv.reader(file) data_points = [] for line in data: data_points.append(float(line[0].split(' ')[-1])) cte_values = np.array(data_points) time_values ...
Markdown
UTF-8
2,217
2.921875
3
[]
no_license
--- title: "Random Dentist Experience" date: 2019-08-05T12:22:22+05:00 draft: false author: Alexander tags: - random - dentist - experience --- ## This time So I was about to visit a dentist today. It was my last visit in this "session". And I needed to fix a wisdom tooth. And I randomly recollected that at some poi...
Markdown
UTF-8
785
2.828125
3
[ "MIT" ]
permissive
# UNO Uno is an American shedding-type card game that is played with a specially printed deck. The game's general principles put it into the Crazy Eights family of card games, and it is similar to the traditional European game Mau-Mau. # Description This game was developed in the spring of 2020 for AP assignment. # ...
C#
UTF-8
1,788
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; namespace GDLibrary { public class RailCamera3D : Camera3D { private RailParameters railParameters; private Actor targetActor; p...
C#
UTF-8
1,264
2.640625
3
[]
no_license
using System.Collections.Generic; using System.Linq; using DAL.Entities; using DAL.Interfaces; using MyMenu.DAL.EF; namespace DAL.Repositories { public class RecipeClientProfileManager:IRecipeClientProfileManager { public ApplicationContext Database { get; set; } public RecipeClientProfileMana...
JavaScript
UTF-8
2,931
3.171875
3
[ "MIT" ]
permissive
function doExample1() { doFlipAnimation(); } function doFlipAnimation( ) { if ( myVarFlip === undefined ) { var makeAnimation = function ( ) { myContext2.translate( myImage.width, myImage.height ); myContext2.rotate( Math.PI ); myContext2.drawImage( myImage,...
Java
UTF-8
4,558
2.328125
2
[ "BSD-3-Clause" ]
permissive
package com.sjwitservices.guiceutils.childinjectortools.destroyable; import static org.mockito.Mockito.any; import static org.mockito.Mockito.when; import static org.mockito.Mockito.verify; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.contains; import static org.junit.Assert.*; ...
C
UTF-8
1,625
4.15625
4
[]
no_license
/* Gabriel Pellegrino da Silva Ra - 172358 O programa a seguir armazena dinamicamente os valores de uma matriz triangular inferior. Calcula a sua normalizacao e em seguida imprime o resultado, bem como o valor da media e o desvio padrao. Sendo a[ij] a matriz lida, e b[ij] a matriz impressa. (2) b[ij]= (a[ij]- m...
JavaScript
UTF-8
182
3.140625
3
[]
no_license
const outra = [] for (let loka = 0; loka <10; loka++){ outra.push(function() { console.log(loka) console.log(typeof loka) }) } outra[2]() outra[8]()
Java
UTF-8
375
3.21875
3
[]
no_license
package package1; public class compareArray1Element { public static void main(String[] args) { int [] a = {10,45,12,47,50,55}; int [] b = {15,10,12,49,55,75,56}; int l1 = a.length; int l2 = b.length; for(int i=0; i< l1; i++) { for(int j =0; j< l2; j++) { if(a[i] == b[j]) { Syst...
Java
UTF-8
283
1.789063
2
[]
no_license
package com.github; import org.slf4j.ILoggerFactory; import org.slf4j.LoggerFactory; public class App3 { public static void main(String[] args) { ILoggerFactory iLoggerFactory = LoggerFactory.getILoggerFactory(); System.out.println(iLoggerFactory); } }
PHP
UTF-8
686
2.65625
3
[]
no_license
<?php namespace App\Model\Entity; use Cake\ORM\Entity; /** * Pertanyaan Entity * * @property int $key_pertanyaan * @property int $key_materi * @property string $pertanyaan */ class Pertanyaan extends Entity { /** * Fields that can be mass assigned using newEntity() or patchEntity(). * * Note...
Python
UTF-8
159
3.609375
4
[ "Apache-2.0" ]
permissive
# append token to a file newline def append_to_file(file, token): file_object = open(file, "a") file_object.write(token + "\n") file_object.close()
C++
UTF-8
5,034
3.59375
4
[]
no_license
#include <iostream> #include <string> #include <limits> #include <Windows.h> #define OFFSET 3 using namespace std; class Member { private: string name; char group; string habitat; int population; public: string GetName() { return name; } void SetName(string value) { ...
PHP
UTF-8
573
2.71875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Middleware; use Closure; class API { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { // dump($request);die; ...
Markdown
UTF-8
16,809
2.6875
3
[]
no_license
# Laporan Praktikum #4 - Relasi Kelas ## Kompetensi Setelah menempuh pokok bahasan ini, mahasiswa mampu: 1. Memahami konsep relasi kelas. 2. Mengimplementasikan relasi has‑a dalam program. ## Ringkasan Materi Pada bagian tugas saya hanya kebingunan mengapa untuk mendeklarasikan kode kamar apakah perlu membuat clas...
Java
UTF-8
4,771
2.46875
2
[]
no_license
package com.technolosea.sailwinder; import android.util.Log; import androidx.annotation.NonNull; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; import com.g...
C++
UTF-8
980
2.734375
3
[]
no_license
#pragma once #include <Windows.h> #include <utility> #include <stdexcept> #define RETURN_IF_FAILED(hr) do { if (FAILED(hr)) { return hr; } } while(0) #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) inline void THROW_IF_FAILED(HRESULT hr, const char* message) { ...
C++
SHIFT_JIS
1,313
2.859375
3
[]
no_license
#pragma once #include"DxControl.h" class DxKeyBoard : public DxControl { protected: char KeyState[256]; //L[̉ێ char OldKeyState[256]; //Ot[ł̃L[̉ێ int KeepTime[256]; //݂̉Ԃt[ێĂ̂ێ public: //RXgN^ DxKeyBoard(); //L[ZbgiS0jɂ void ResetKeyData(); //ԂXV void UpDate(); //w肵L[Ă邩ǂ@L[z̓YkeyCodeɂ̂Ԃ //G[ȂfalseԂ tr...
Java
UTF-8
2,488
3.453125
3
[]
no_license
package Jogo; import jplay.Keyboard; import jplay.Sprite; import jplay.URL; import jplay.Window; public class Jogador extends Sprite{ private double velocidade = 0.5; private int direcao=3; private Keyboard teclado; private boolean movendo= false; //Codigo Inicia a criação do personagem...
Java
UTF-8
640
1.882813
2
[]
no_license
package com.tyss.taskmanagement.dto; import java.io.Serializable; import java.util.concurrent.atomic.AtomicInteger; import javax.persistence.Column; import javax.persistence.Embeddable; import javax.persistence.GeneratedValue; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import lombok.Dat...
Python
UTF-8
6,835
2.765625
3
[ "Apache-2.0" ]
permissive
#Author: Christopher Ivie #Description: Downloads the most recent NIST CVE feed, stores the information into a database! import requests import zipfile import json import os import os.path from os import path import sqlite3 from datetime import datetime import pytz import tzlocal #Get local time zone local_timezone ...
JavaScript
UTF-8
787
2.546875
3
[]
no_license
var firebase = require("firebase-admin"); var sleep = require('sleep') var serviceAccount = require("./firebasekey.json"); firebase.initializeApp({ credential: firebase.credential.cert(serviceAccount), databaseURL: "https://voyager01.firebaseio.com" }); var refS = firebase.database().ref('samples/') function w...
Java
UTF-8
1,904
3.078125
3
[]
no_license
package com.farbig.practice.dsa.algorithms.sort.old; public class TestSort { public static boolean isdatasorted = true; public static boolean display = true; public static boolean detaildisplay = true; static int factor = 1; //static int sample[] = { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; //static int sam...
C++
UTF-8
1,417
2.859375
3
[ "BSD-2-Clause" ]
permissive
#ifndef LOCATION_H #define LOCATION_H /* This file is part of VROOM. Copyright (c) 2015-2022, Julien Coupey. All rights reserved (see LICENSE). */ #include <cassert> #include "structures/typedefs.h" namespace vroom { class Location { private: // Index of this location in the matrix. Index _index; // Coord...
Ruby
UTF-8
2,028
3.0625
3
[]
no_license
require 'spec_helper' describe Elevator do describe "#new" do it "sets the elevator number" do @elevator = Elevator.new(3, 10) expect(@elevator.number).to eq(3) end it "sets the number of floors" do @elevator = Elevator.new(2, 8) expect(@elevator.no_floors).to eq(8) end end...
PHP
UTF-8
1,152
2.5625
3
[ "MIT" ]
permissive
<?php // Passando os dados obtidos pelo formulário para as variáveis abaixo $nomeremetente = $_POST['nome']; $emailremetente = trim($_POST['email']); $emaildestinatario = 'brazil@pyladies.com'; // Digite seu e-mail aqui, lembrando que o e-mail deve estar em seu servidor web $assunto = $_POST['assunto']...