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
Markdown
UTF-8
610
2.75
3
[ "MIT" ]
permissive
# ES6 함수의 추가 기능 ## 1. 함수의 구분 - arguments는 사용하지 않는 것이 좋다. Rest 파라미터로 사용할 수 있기 때문이다. ## 3. 화살표 함수 - **함수를 만들 때 일반 함수로 만들 것이면 의도적을 화살표 함수를 사용해라.** - **콜백 함수 사용 시 무조건 화살표 함수 사용해라.** - 클래스 필드는 constructor{this.name=name;} 처럼 형태를 바꿔서 생각해보면 쉽다. ## 4. Rest 파라미터 - Rest 파라미터는 매개변수 자리에 오고 Spread 연산자는 그 밖에 있다. 정반대로 동작한다.
TypeScript
UTF-8
4,157
2.828125
3
[]
no_license
import { api } from "./api-lib" import { KultunautDetailedEvent, KultunautEvent } from "./types" const fieldsList = (page: number) => '&page=' + page + '&fieldlist=Title,Startdate,Enddate,Tags,Image,LocationName,Link,Ticket,LocationAddress,LocationCity,LocationZip,Starttime,Time' const location = (lat: string, lon: st...
C
UTF-8
800
2.75
3
[]
no_license
#ifndef MATRIX_MATRIXOPTIONS_H #define MATRIX_MATRIXOPTIONS_H enum MatrixOptions { DefaultOptions = 0, // horizontal serpentine layout. first pixel is bottom-left MatrixHorizontal = 0b0000, // stripe is left to right MatrixVertical = 0b0001, // stripe is top down MatrixSerpentin...
Python
UTF-8
6,321
2.84375
3
[]
no_license
import filecmp import os import unittest from datetime import datetime from unittest import TestCase from rfwtools.feature_set import FeatureSet import pandas as pd import numpy as np import math import test def make_dummy_df(n, standard=True): """Generates a dummy DataFrame with id as only metadtata column. Op...
Python
UTF-8
3,713
2.84375
3
[]
no_license
import json import nltk from collections import Counter import numpy as np from sklearn.feature_extraction.text import CountVectorizer from sklearn.metrics import jaccard_similarity_score from nltk.stem import WordNetLemmatizer from nltk.corpus import stopwords import string # Simplified question def getPOS(corpus): ...
C++
UTF-8
1,300
2.578125
3
[]
no_license
#pragma comment(linker, "/stack:252457298") #pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; const long long Mod = 1000000007LL; int n, k; vector<int> a; vector<long long> Powers; void CalculatePowers() { if (k == 1) {Powers.push_back(1); return;} if (k == -1) {Powers.push_back(-1...
C++
UTF-8
555
3.0625
3
[]
no_license
#include<iostream> #include<malloc.h> using namespace std; int main(){ int n; cout<<"Enter the number of numbers that you want to enter: "<<endl; cin >>n; int *a=(int*)malloc(sizeof(int)*n); for(int i=0;i<n;i++){ cin>> a[i]; } for(int i=0;i<n-1;i++){ int min=a[i]; ...
Python
UTF-8
1,249
2.796875
3
[]
no_license
from transformers import Trainer from transformers import BertTokenizerFast from transformers import BertForSequenceClassification import numpy as np import pandas as pd class FineTunedBertModule: category_array = ["buildings", "infrastructure ", "other", "resilience"] def __init__(self): self...
PHP
UTF-8
2,026
2.75
3
[]
no_license
<?php /** * Template Name: Donation Forms & Goals * * This snippet is a page template with an example query that gets * the 10 latest donation forms and displays their goal * * IMPORTANT: This snippet, unlike others you might find in our snippet library * does not go in functions.php or a must-use plugin....
Java
UTF-8
22,748
1.609375
2
[]
no_license
package com.zxtech.mt.activity; import android.content.DialogInterface; import android.content.Intent; import android.support.v4.view.ViewPager; import android.view.View; import android.widget.AdapterView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; import com.a...
C#
UTF-8
893
2.625
3
[]
no_license
using System; namespace eStore.Shared.ViewModels.Printers { public class ReceiptDetails { public const string Employee = "Cashier: M0001 Name: Manager"; //TODO: implement to help public string BillNo { get; private set; }// = "Bill NO: 67676767"; public string BillDate { get; p...
Markdown
UTF-8
1,015
2.75
3
[ "MIT" ]
permissive
--- linktitle: Step 2. RStudio menu: setup: parent: Setup weight: 3 title: Download and install RStudio type: book weight: 3 --- Attendees will interact with the R programming language via the RStudio development environment. The RStudio Desktop application is available [here](https://rstudio.com/products/...
JavaScript
UTF-8
3,183
2.578125
3
[ "MIT" ]
permissive
var widerScreenWidth = window.matchMedia("(max-width: 1024px)"); //For converting mousewheel scroll into horizontal scroll var scrollicon = document.getElementById("scroll-arrow") if (!widerScreenWidth.matches) { main.addEventListener('wheel', (e) => { main.scrollLeft += e.deltaY; if(main.scrollLeft > 0){ scrollic...
PHP
UTF-8
453
2.546875
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\myclasses; /* * 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. */ class MakeObject{ static function becomeArrayToObject($array){ //array_map((object), $ar...
C#
UTF-8
2,349
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace CSRToolWebApp.Models { public class BreadCrumbs { public List<BreadCrumb> Items { get; set; } public BreadCrumbs() { this.Items = new List<BreadCrumb>(); } publi...
Markdown
UTF-8
4,039
3.078125
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 'Como: Criar um LineSegment em uma PathGeometry' ms.date: 03/30/2017 dev_langs: - csharp - vb helpviewer_keywords: - line segments [WPF], creating - graphics [WPF], line segments ms.assetid: 0155ed47-a20d-49a7-a306-186d8e07fbc4 ms.openlocfilehash: a50c98ccc3f6d517e0917cb774af4d49d2bfa7a3 ms.sourcegitcommit: ...
C++
UTF-8
7,492
3.125
3
[]
no_license
// We need to include the declaration of our new rectangle class in order to use it. #include "camera.h" #include <iostream> #include <iomanip> #include <vector> #include <random> #include <chrono> #include <thread> int main() { int set_rows; int set_columns; int set_sampling_time; int index = 0; ...
C
UTF-8
4,231
3.640625
4
[]
no_license
/**************************************** Assignment - 5 Name : Dinesh Sandadi Zid : Z1797942 Section : 2 DateDue : 10/28/2017 TA : David Wiilams Purpose : This program implement producer consumer problem solut...
Python
UTF-8
3,355
2.96875
3
[]
no_license
import numpy as np import matplotlib.pyplot as plt import scipy as sp import astropy.units as unit import astropy.constants as cons import matplotlib as mpl mpl.rcParams['font.size']=14 def f(r, x2, y2): x,y,xdot,ydot=r[2],r[3],x2(r[2],r[3]),y2(r[2], r[3]) return np.array([x,y,xdot,ydot]) def trajectory(v0, t...
Markdown
UTF-8
616
2.6875
3
[ "MIT" ]
permissive
# SoundManager Sound handle. ## Functions | Name | Description | |:---|:---| | switchBGMByName | Play the background music by resource name. | | switchBGMBySound | Play the background music by sound itself. | | playOneShotByNames | Play one shot the sound by using the resource name. | | playOneShotBySound | Play one...
C++
UTF-8
2,032
2.8125
3
[]
no_license
#include "Sprite.h" //------------------------------------Constructors----------------------------------------------- Sprite::Sprite(): drawBox{0,0,0,0}, drawCirc{}, assetTex{nullptr} {}; Sprite::Sprite(SDL_Rect dBox, SDL_Texture* aTex): drawBox{dBox}, drawCirc{}, assetTex{aTex}, animFrame{-1} {}; Sprite::S...
Java
UTF-8
1,181
3.515625
4
[]
no_license
// FirstEvents.java // События - нажатия клавиш на клавиатуре import javax.swing.*; import java.awt.event.*; public class FirstEvents extends JFrame { public FirstEvents() { super("FirstEvents"); // при закрытии окна - выход setDefaultCloseOperation(EXIT_ON_CLOSE); // регистрируем нашего слушателя ...
Java
UTF-8
275
2.015625
2
[]
no_license
package com.example.demo.services; import com.example.demo.entity.Books; import java.util.List; public interface BooksService { boolean save(Books books); List<Books> findAllBooks(); Books findBook(int id); void addBookGenre(int bookId, int genreId); }
JavaScript
UTF-8
631
4
4
[]
no_license
function getString() { s1 = "hello"; s2 = "pillow"; return s1 && s2; } function getStrings(s1, s2) { s1List = []; s2List = []; i = 0; sameLetter = ""; for (s in s1) { s1List.push(s); } for (s in s2) { s2List.push(s); } while (i < s1List.length && i < s...
Python
UTF-8
288
3.65625
4
[]
no_license
#!/usr/bin/python3 """ A Function that computes the square value of all integers of a matrix. """ def square_matrix_simple(matrix=[]): if matrix: new_matrix = [] for rows in matrix: new_matrix.append([n ** 2 for n in rows]) return new_matrix
Python
UTF-8
171
3.859375
4
[]
no_license
#Multiplication of the given number: entrada=input("Digite los numeros: ") lista=entrada.split(',') mult = 1 for i in lista: mult = mult * int(i) print(mult)
Python
UTF-8
1,281
3.21875
3
[ "MIT" ]
permissive
a = 50 print('\033[32m_\033[m'*a) print('\033[1;32m{:=^{}}\033[m'.format('SISTEMA DE BOLETIM', a)) print('\033[32m-\033[m'*a) boletim = list() individuo = list() notas = list() media = 0 continuar = 's' conti2 = 0 while True: if 's' in continuar: individuo.append(input('Nome: ')) notas.append(floa...
Java
UTF-8
2,889
3.75
4
[]
no_license
package Lists; import java.awt.Dimension; import java.awt.Font; import java.awt.Label; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; public class InsertionSort { public stat...
C++
UTF-8
7,061
2.59375
3
[]
no_license
#include <sys/shm.h> #include <libexplain/shmctl.h> #include <string> #include "Node.h" #include "Gk.h" #include "pp.h" #include "util_shm.h" #include "util_clt.h" void *GetShmMem_(key_t key, size_t size) { void *shm = NULL; //分配的共享内存的原始首地址 int shmid; //共享内存标识符 //创建共享内存 shmid = shmget((key_t)ke...
PHP
UTF-8
579
2.640625
3
[]
no_license
<?php /** * Delete a user */ require "../config.php"; if (isset($_GET["id"])) { try { $connection = new PDO($dsn, $username, $password, $options); $id = $_GET["id"]; $sql = "DELETE FROM baibao WHERE MaBB = :id"; $statement = $connection->prepare($sql); $statement->bin...
JavaScript
UTF-8
2,503
2.578125
3
[]
no_license
import React, { useState, useEffect } from "react"; import '../styles/MyKdrama.css' import "./Icons.js"; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import DramaCard from "./DramaCard"; const axios = require('axios').default; function MyKdrama(props) { const [watchedDramas, setWatchedDramas]...
C
UTF-8
935
2.625
3
[]
no_license
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
C#
UTF-8
1,692
2.75
3
[]
no_license
using System; namespace OpenDentBusiness { ///<summary>Stores the session token for when a user has logged into something.</summary> [Serializable] public class SessionToken:TableBase { ///<summary>Primary key.</summary> [CrudColumn(IsPriKey=true)] public long SessionTokenNum; ///<summary>The hash...
Markdown
UTF-8
1,987
3.203125
3
[]
no_license
# 論婚姻的鎖鏈以及保祿特權 **依諾森三世** **致富拉里主教烏里書--公元一一九九年五月一日-PL214, 588C** 閣下曾函告我們,請示:夫妻之一方,遺棄另一方而改入異端教。那被遺棄的一,方想要再結婚,生育子女。試問:根據律法,這能這 樣做嗎?所以我們就把你所問的問題,同我們的兄們商議結果,我們這樣答覆閣下:雖然我們的前任教宗(如:天士三世 Caelestinus Ⅲ)似乎並不這樣想法,但我們要加以分析:是否夫妻二人,先是外教人,後來,中一方,歸正,信奉天主教?或是:夫妻二人,先是天主教人,後來中一方,陷入 異端教,或失落信德,又入落入外教人的錯誤中?如2木2夫妻二人,先是外教人,後來其中一方歸正,...
PHP
UTF-8
3,667
3.09375
3
[ "Apache-2.0" ]
permissive
<?php /** * Class Date_conv * * Class for date conversion in Gregorian-Julian-Hijri calendar. * This class originally adopted from hijri-dates library (https://github.com/GeniusTS/hijri-dates/blob/master/src/Converter.php) * * @license MIT */ class Date_conv { /** * The Julian Day for a given Gregorian ...
C#
UTF-8
3,586
2.703125
3
[ "MIT" ]
permissive
using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// Script to controll enemy turrets behaviour. It lets them move the turret using two degrees of freedom in two different GameObjects (Base and Turret). /// Inherits form EnemyController. /// </summary> public class TurretCo...
Go
UTF-8
710
3.21875
3
[]
no_license
package bowlingkata // Game keeps the score of a bowling game. type Game struct { currentFrame Frame previousFrame Frame beforePreviousFrame Frame score int } // Score returns the total score of a game. func (game *Game) Score() int { return game.score } // Roll registers a new roll t...
Java
UTF-8
518
1.953125
2
[]
no_license
package com.app; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication(scanBasePackages = "com.app.*") public class SampleappApplication { private static final Logger log...
Java
UTF-8
2,865
2.1875
2
[]
no_license
package com.hdsx.rabbitmq.vo; import java.io.Serializable; import java.util.Collection; import java.util.Map; /** * Jpush 推送的消息体 */ public class PushMsg implements Serializable { private static final long serialVersionUID = 1L; //发送平台类型 private String type; //标题 private String title; //...
Swift
UTF-8
490
2.578125
3
[]
no_license
import Foundation import UIKit enum Colors { static let base = UIColor(red: 0.12, green: 0.12, blue: 0.13, alpha: 1.0) static let red = UIColor(red: 0.85, green: 0.09, blue: 0.14, alpha: 1.0) static let card = UIColor(red: 0.13, green: 0.15, blue: 0.17, alpha: 1.0) static let secondaryBase = UIColor(re...
Python
UTF-8
2,997
3.390625
3
[]
no_license
# -*- coding: utf-8 -*- import simple_draw as sd sd.resolution = (1200, 700) # 1) Написать функцию draw_branches, которая должна рисовать две ветви дерева из начальной точки # Функция должна принимать параметры: # - точка начала рисования, # - угол рисования, # - длина ветвей, # Отклонение ветвей от угла рисования пр...
Java
UTF-8
1,424
3.375
3
[]
no_license
package stream_API.exercises; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.Map; import java.util.TreeMap; public class OfficeStuff { public static void main(String[] args) throws IOException ...
Java
UTF-8
548
1.828125
2
[]
no_license
package com.example.HelloTabsMh; import android.app.ListActivity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.AdapterView; public class ListView extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstance...
JavaScript
UTF-8
710
3.546875
4
[]
no_license
///VARIABLES/// var input = document.getElementById("tarea") var boton = document.getElementById("boton") var lista = document.getElementById("lista") var limpiar = document.getElementById("limpiar") console.log(tarea + boton + lista) var inputs=document.getElementsByTagName("input") console.log(inputs) //FUNCIÓN// fu...
C++
UTF-8
9,362
2.640625
3
[]
no_license
#include <pseudoc/ast/flow.hpp> using namespace ast; IfStatement::IfStatement(std::unique_ptr<Expression> condition, std::unique_ptr<Statement> on_true): _condition(std::move(condition)), _on_true(std::move(on_true)) { } IfStatement::IfStatement(std::unique_ptr<Expression> condition, std::unique_ptr<Statemen...
PHP
UTF-8
3,438
3.046875
3
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace AppBundle; use Dotenv\Dotenv; use Dotenv\Loader; use Respect\Validation\Validator as v; /** * Handles things that need to be secret by reading things from env. */ class Secrets { const MISSING_ENV_EXCEPTION_MESSAGE = 'Loading .env file failed while attempting to access environment variable '; ...
Ruby
UTF-8
625
3.0625
3
[]
no_license
# fm = "%{a} %{b} %{c} %{d}" # puts fm % {a:"Hung", b:"cute", c:"qua troi", d:0326.to_s(8).to_i} # tabby = "\tI'm \\tabie \r in." # tabby2 = "\t*I'm \a \\ \\ \\ \f goodboy." # puts %q{ # List options for you: # 1- ABC # 2- XYZ # 3- XXX # } # puts tabby # puts tabby2 puts "Chuong trinh thay boi" print "Ban...
Java
UTF-8
5,957
2.765625
3
[]
no_license
package template.geometry.geo2; import java.util.function.Consumer; public class IntegerTriangulation { public IntegerTriangulation() { this((long) 1e6); } /** * @param LOTS 顶点xy数据范围 */ public IntegerTriangulation(long LOTS) { theRoot = newTriangle(new Triangle(new IntegerPo...
Java
UTF-8
1,636
2.25
2
[]
no_license
package com.github.dagger2demo; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.Toast; import com.github.dagger2demo.component.DaggerLoginComponent; import com.github.dagger2demo.module.LoginModule; import com.g...
PHP
UTF-8
1,202
2.703125
3
[]
no_license
<?php class ApiGenerator { private $ipBDD; private $usuarioBDD; private $claveBDD; public function __construct($ipBDD, $usuarioBDD, $claveBDD) { $this->ipBDD = $ipBDD; $this->usuarioBDD = $usuarioBDD; $this->claveBDD = $claveBDD; } public function bases() { $bdd = ne...
C#
UTF-8
2,638
2.71875
3
[]
no_license
using DAL.Conexion; using FlamERPennyAPI_Entidades.Persistencia; using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Text; namespace FlamERPennyAPI_DAL.Manejadoras { public class ManejadoraVendedores { public static int insertarVendedor(Vendedor vendedor) ...
Swift
UTF-8
21,803
2.65625
3
[]
no_license
/* * FieldPosition+BottomCameraContainer.swift * GURobots * * Created by Callum McColl on 26/7/20. * Copyright © 2020 Callum McColl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
PHP
UTF-8
242
2.578125
3
[]
no_license
<?php class LdapObjectNotWritableException extends Exception { public function __construct(\Model $model, $dn, $parentDn) { parent::__construct("Model: \"{$model->name}\" / DN: \"{$dn}\" / Parent DN: \"{$parentDn}\""); } }
Python
UTF-8
657
3.75
4
[]
no_license
# encoding: utf-8 class Solution(object): def hammingDistance(self, x, y): """ :type x: int :type y: int :rtype: int """ x = "{0:b}".format(x) y = "{0:b}".format(y) print x, y if len(x) > len(y): y = ''.join(['0' for _ in...
C
UTF-8
882
4.03125
4
[]
no_license
#include <cs50.h> #include <math.h> #include <stdio.h> void printSum(void); // declare the function void printSums(int, int); // place holder int squared(int); bool isLeapYear(void) int main(void) { const year = get_int("Enter a year: "); if (isLeapYear(year)) } int year = get_int("Enter a year: "); if...
Markdown
UTF-8
992
2.75
3
[]
no_license
# live php 简洁高效的PHP框架 ## 框架核心只做了一件事: url地址到控制器方法的映射 支持多级控制器目录 - 默认地址:/index/index 对应 app/controller/index.php控制器 index方法 - /admin/user/list 对应 app/controller/admin/user.php控制器 list方法 - /home/user/index/userinfo 对应 app/controller/home/user/index.php控制器 userinfo方法 ## 集成mysql操作 [ninvfeng/mysql](https://github.com/ninvfen...
Java
UTF-8
1,486
2.296875
2
[]
no_license
/** * */ package thesis.nlp.core.process.export.tuple; import java.util.LinkedHashSet; import java.util.Set; import thesis.nlp.models.AdverbPhrase; import thesis.nlp.models.PrepositionalPhrase; import thesis.nlp.util.StringProcessUtil; /** * @author lohuynh * */ public class PrepPhraseStringCon...
PHP
UTF-8
2,963
2.765625
3
[]
no_license
<?php namespace App\Entity; use App\Repository\SubjectRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=SubjectRepository::class) */ class Subject { /** * @ORM\Id * @ORM\Generated...
JavaScript
UTF-8
5,959
2.671875
3
[]
no_license
const express = require('express'); const { rejectUnauthenticated } = require('../modules/authentication-middleware'); const encryptLib = require('../modules/encryption'); const pool = require('../modules/pool'); const userStrategy = require('../strategies/user.strategy'); const axios = require('axios'); const router...
Java
UTF-8
2,211
2.171875
2
[]
no_license
package jp.co.willwave.aca.dto.api; import jp.co.willwave.aca.model.entity.RouteDetailEntity; import jp.co.willwave.aca.model.enums.CustomerType; import jp.co.willwave.aca.utilities.WebUtil; import lombok.Data; import org.springframework.util.StringUtils; import java.util.Date; import java.util.List; import java.util...
Java
UTF-8
590
2.328125
2
[]
no_license
package com.nayan.SpringStuff; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.nayan.beans.HelloWord; import com.nayan.components.Employee; public class App { public static void main(String a[]){ ApplicationContext co...
Java
UTF-8
30,424
1.734375
2
[]
no_license
/** * @author Jason Gossit * @version 1.0, 04/30/13 */ package jgossit; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.text.ParseExceptio...
Markdown
UTF-8
7,468
3.15625
3
[]
no_license
# OOP ORIENTED IMPLEMETATION wp_nonce # This class as be made as a test, it's not to use in production environment. The class have the basic function for creating and verifying a nonce it's already declarated as $jmcNonce: ## $jmcNonce->Create() ## ### Description ### Generates and returns a nonce. The ...
C
UTF-8
898
4.09375
4
[]
no_license
#include <stdio.h> int main(void) { int incomes[7]; int size = sizeof(incomes) / sizeof(incomes[0]); int i; int best = 0, bestIndex = 0; int total = 0; double average; for(i = 0; i < size; i++) { printf("Enter the income of day %d: ", i+1); scanf("%d", &incomes[i]); } printf("---------------------------...
Shell
UTF-8
887
3.578125
4
[]
no_license
#!/bin/bash #echo "printing from auth" #echo "$name $pass" #n=$name #echo $n #result of mysql query stored in output output=$(mysql -u host -h MariaDB-lxc.mycloud.com -p123456 -e "SELECT username,password from mycloud.users where username='$name' AND password='$pass';") #the output variable will have only one line ...
Python
UTF-8
1,148
2.828125
3
[]
no_license
import re from expungeservice.models.charge_classifier import ChargeClassifier class ChargeCreator: @staticmethod def create(**kwargs): case = kwargs['case'] statute = ChargeCreator.__strip_non_alphanumeric_chars(kwargs['statute']) level = kwargs['level'] chapter = ChargeCreat...
JavaScript
UTF-8
3,306
2.84375
3
[]
no_license
#!/usr/bin/env node "use strict"; /********************************************************************** * Libraries *********************************************************************/ const config = require('../config/config.js'); /********************************************************************** * Log...
C
UTF-8
2,048
2.765625
3
[]
no_license
/* ** main.c for ElCrypt in /home/barrau_h ** ** Made by Hippolyte Barraud ** Login <barrau_h@epitech.net> ** ** Started on Sun Mar 1 20:50:07 2015 Hippolyte Barraud ** Last update Sun Mar 1 21:53:53 2015 Hippolyte Barraud */ #include "../includes/elcrypt.h" char *strdup(const char *str) { int n; char *dup...
C#
UTF-8
3,069
3.84375
4
[]
no_license
namespace DataStructureAlgorithm.Leetcode { //707. Design Linked List //https://leetcode.com/problems/design-linked-list/ public class DesignLinkedList { } public class MyLinkedList { public int size; public Node Head; /** Initialize your data structure here. */ ...
Markdown
UTF-8
754
2.921875
3
[]
no_license
# Ludo This is the 2nd attempt to get it right. Players can roll the dice and make moves equal to the number of the dice ## What's new - When the pieces get clicked, they'll move - The server ensures no one rolls the dice or clicks on pieces outside their turn - Implemented dice rolling. Only the player whose turn...
C
UTF-8
661
3.109375
3
[]
no_license
/* ** EPITECH PROJECT, 2019 ** print_list ** File description: ** piscine synthèse */ #include "../include/my.h" #include "../include/struct.h" int list_size(list_t *list) { list_t *start = list_get_firstelem(list); unsigned int i = 0; while (start) { i = i + 1; start = start->next; ...
Swift
UTF-8
1,233
2.703125
3
[]
no_license
// // ReviewInputViewController.swift // Project3Sample // // Created by Russell Mirabelli on 11/16/19. // Copyright © 2019 Russell Mirabelli. All rights reserved. // import UIKit class ReviewInputViewController: UIViewController { @IBOutlet weak var nameField: UITextField! @IBOutlet weak var titleFi...
Ruby
UTF-8
143
2.59375
3
[]
no_license
cart_items_prices = [12.43, 19.99, 3.49, 75.00] expensive_food = [] cart_items_prices.each do |x| if x >= 15.00 puts x end end
Swift
UTF-8
4,966
2.890625
3
[]
no_license
// // ViewController.swift // SlideshowApp // // Created by Yoshi on 2018/08/31. // Copyright © 2018年 yoshiyuki.oohara. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var imageView: UIImageView! var timer: Timer! // 表示している画像の番号 var dispImage...
Markdown
UTF-8
673
3.234375
3
[]
no_license
# Uber-Data-Analysis Data analysis on UBER's data of ride calls from travellers I used simple Python(panda and seaborn) functions to get really useful insights from the data. After analysing the data we got the following output results: - Generated the map of the place where data belongs to; - Generated heatmap of the...
Python
UTF-8
512
3.3125
3
[]
no_license
""" Python 2 solution for Zipfsong: https://open.kattis.com/problems/zipfsong author - Oussama Zaki <zaki.oussama@gmail.com> """ import operator def stupid_print(s): print s if __name__ == "__main__": n, m = map(int, raw_input().split()) album = dict() for i in range(1, n + 1): f...
Java
UTF-8
734
3.1875
3
[]
no_license
package com.yangzl.jvm; /** * @author yangzl * @date 2021/3/14 * * 测试堆空间初始值与最大值,注意:runtime.maxMemory() = eden + s0 / s1 + 老年代 * * -Xms1000m * -Xmx1000m * -Xmn400m */ public class HeapSpaceTest { /** * initial = max = 950m * 年轻代每次只能选择 eden + s0 / s1 = 300m + 50m「难道默认是 6:1:1,或者说 jvm 自动调整了」 * * @par...
Markdown
UTF-8
8,477
2.5625
3
[]
no_license
# Section 2 - 파이썬 기초 스크랩핑 ## 크롬(Chrome) 개발자 도구 #### ● 기본개념 1. DOM 구조 분석(요소검사) 2. 선택자(Selector) 추출 - 개발자 도구를 통해 내가 원하는 데이터의 Selector을 가져올 수 있는지 3. Console 도구 4. Source - 로딩 한 리소스 분석 및 디버깅 5. 네트워크 탭 및 기타 ## 파이썬 urllib을 활용한 웹에서 필요한 데이터 추출하기(1) #### ● 오늘 배울 내용 정리 1. Urlretrieve 2. urlopen 3. urlretrie...
Java
UTF-8
2,038
3.765625
4
[ "MIT" ]
permissive
import java.util.ArrayList; import java.util.Collections; public class Pairings { public static void main(String[] args) { ArrayList<String> names = new ArrayList<String>(); for(int i = 1; i <= 6; i++){ names.add(Integer.toString(i)); } printCycles(makePairs(names)); } static ArrayList...
TypeScript
UTF-8
1,279
2.546875
3
[ "Apache-2.0" ]
permissive
const Web3 = require('web3'); import * as Utilities from './utilities'; /** * Listen new transactions and return its hash when address occurs in 'from' or 'to' property. * Start listening from latest block. * Address matching is case insensitive. * @param {string} nodeUrl url of the Ethereum node to communicate wi...
Markdown
UTF-8
3,276
2.921875
3
[]
no_license
# Simple-Hide-Show-Accordion Simple Hide/Show Accordion a simple light responsive slide toggle accordion. Demo page coming soon. *** ###Styling Styling by changing the following classes. .accordion-tab { font:bold 12px/35px "Days One",sans-serif; } .accordion-tab { background: #f3f3f3; } /* CHANGE OPEN & CLOSE ...
Python
UTF-8
856
2.6875
3
[]
no_license
import re #with open('test_data.csv', 'r', encoding="utf8") as f: with open('List-of-1000-Kanji-converted2.csv', 'r', encoding="utf8") as f: f.readline() z = str(f) i = 0 arr=[] for line in f: x = line.split(",") #for y in x: #print(y) if (len(x) == 3...
Python
UTF-8
20,347
2.578125
3
[ "Apache-2.0" ]
permissive
""" Copyright 2017 Brocade Communications Systems, 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 to i...
JavaScript
UTF-8
410
2.859375
3
[]
no_license
var main = function() { draw = function() { stroke(255,255,255); //noStroke(); //stroke(mouseX,mouseY,(mouseY-mouseX)); fill(mouseY, mouseX, (mouseX-mouseY)); if (mouseIsPressed) { ellipse(mouseX, mouseY, mouseX, mouseY); } else { rect(mous...
Swift
UTF-8
3,054
2.53125
3
[ "MIT" ]
permissive
// // ViewController.swift // AnodaGameTimer // // Created by Oksana Kovalchuk on 9/10/17. // Copyright © 2017 Oksana Kovalchuk. All rights reserved. // import UIKit import SwiftySound import SwiftyUserDefaults import Crashlytics class MainVC: UIViewController, TimerDelegate { let contentView: MainView =...
Java
UTF-8
1,001
2.0625
2
[]
no_license
package com.web.hyundai.model.usedcars; import lombok.*; @Data @NoArgsConstructor @AllArgsConstructor @Builder public class UsedCarWeb { private Long id; private String model; private Integer price; private int year; private Integer mileage; private String fuel; private String extColor; ...
Java
UTF-8
1,947
1.648438
2
[]
no_license
package com.zhihu.android.player.upload2.core; import com.zhihu.android.player.p1801b.C23607a; /* renamed from: com.zhihu.android.player.upload2.core.d */ /* compiled from: FileUploadTracker */ public class FileUploadTracker { /* renamed from: a */ public FileParcel f82618a; /* renamed from: b */ pu...
Markdown
UTF-8
3,312
2.859375
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 一个犹太教徒和珍珠的故事 --- 相传从前以色列人中,有个虔诚的信徒,为人忠诚老实,他的家属全靠纺纱糊口。他每天把家人纺线的纱带往市中交易;卖掉纱,然后买棉花,并用赚得的钱买食物带回家去,供家人继续纺纱,并维持家人的生活;一天做了一天吃,生活倒也勉强过得下去。 有一天那个虔诚的信徒照例拿纱到市中去经营买卖。在市中,一个弟兄辈的亲戚和他碰头,向他诉苦、求援。他慈悲为怀,慨然把卖纱所得的钱都给那个亲戚,成全别人,宁可不买棉花和食物,而空着手回家去。 家里的人等着棉花纺纱,并急需食物充饥,见他空手回来,问道:“你买的棉花和食物哪儿去了?” “一个亲戚向我告急,我把卖纱的钱都给他了。” ...
SQL
UTF-8
199
2.6875
3
[]
no_license
set @d1 = '2013-05-01'; set @d2 = '2013-06-09'; SELECT COUNT(*) FROM montages WHERE montage_status = 'In Progress' AND montages.montage_date_updated >= @d1 and montages.montage_date_updated < @d2
Java
UTF-8
7,597
2.703125
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 downlaodtimemvc; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Font; import java.awt.Grid...
Java
UTF-8
565
3.4375
3
[]
no_license
package com.tony.java8.method.reference; public class MethodReferenceDemo { public MethodReferenceDemo(){ System.out.println("Indside constructor!"); } public void m2() { System.out.println("Indside M2 mnethod ...!"); } public static void m3() { System.out.println("Indside M3 mn...
Ruby
UTF-8
1,028
3.8125
4
[]
no_license
#!/usr/bin/env ruby require_relative '../config/environment' class Cli def run_game puts "Welcome to Tic-Tac-Toe." puts "Please input your choice (0-2): 0 , 1, or 2 Players." choice = gets.chomp case choice when "0" Game.new(Computer.new('X'), Computer.new('O')).play when "1" puts "Please w...
PHP
UTF-8
199
3.3125
3
[]
no_license
<?php class FirstDisplayer implements Displayer { public function display($array) { foreach ($array as $row) { echo $row . "<br />\n"; } } }
Java
UTF-8
2,100
1.84375
2
[]
no_license
package com.example.chen1.uncom.relationship; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.util.Log; import android.view.View; import android.view.animation.AnimationUtils; import android.widget.AdapterView; i...
Python
UTF-8
1,514
3.734375
4
[ "BSD-3-Clause", "CC-BY-SA-4.0" ]
permissive
"""Credit to Eli Bendersky""" from concurrent.futures import ProcessPoolExecutor, as_completed import math def factorize_naive(n): """ A naive factorization method. Take integer 'n', return list of factors. """ if n < 2: return [] factors = [] p = 2 while True: if n =...
Java
UTF-8
799
3.140625
3
[]
no_license
package uk.ac.standrews.cs.cs3099.risk.commands; public class AttackCommand extends Command { private String command = "attack"; private int[] payload = new int[3]; public AttackCommand(int playerId, int ackId, int source, int dest, int armies) { super(playerId, ackId); payload[0] = source; payload[1] = de...
Java
UTF-8
10,357
2.046875
2
[]
no_license
package com.studentstreet; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.os.Handler; import android.os.Message; imp...
Java
UTF-8
478
2.09375
2
[]
no_license
package App.Generic; import org.testng.Assert; public class ResponseCode { public int SuccessResponseCode = 200; public int ServerResponseCode = 500; public int PageNotFoundResponseCode = 404; public int PageAuthenticationCode = 401; /* * public void SuccessCode(int Code) { * * Assert.assert...
JavaScript
UTF-8
1,709
2.515625
3
[]
no_license
const validateUserName = (userName) => { if (!userName || userName.length === 0) { return 'هذا الحقل مطلوب'; } else { return null; } }; const validateEmail = (email) => { if (!email || email.length === 0) { return 'هذا الحقل مطلوب'; // } else if ( // !/^\w+([\.-]?\w+)*@\w+([\....
Java
UTF-8
987
1.742188
2
[]
no_license
package com.pointlion.sys.mvc.common.model.base; import com.jfinal.plugin.activerecord.Model; import com.jfinal.plugin.activerecord.IBean; /** * Generated by JFinal, do not modify this file. */ @SuppressWarnings("serial") public abstract class BaseOaBumphOrgUser<M extends BaseOaBumphOrgUser<M>> extends Mod...