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
5,479
2.90625
3
[]
no_license
--- title: Pengenalan Dasar tentang Lumen date: 2018-01-07 12:14:49 tags: ['laravel','php'] draft: false description: "Untuk mulai membuat RESTful API, Pengenalan Dasar tentang Lumen sangat perlu dan penting untuk dipelajari agar nantinya kita lebih mudah dalam membuat sebuah API service." slug: pengenalan-dasar-tentan...
Python
UTF-8
10,208
2.546875
3
[ "Apache-2.0" ]
permissive
# Copyright 2021 Canonical Ltd. # # 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 in writing, s...
C++
UTF-8
1,484
3.765625
4
[]
no_license
/* 1.6 Действительные числа. Шаг 11 Даны действительные коэффициенты a, b, c, при этом a ≠ 0 . Решите квадратное уравнение ax2 + bx + c = 0 и выведите все его корни. Формат входных данных: Вводятся три действительных числа. Формат выходных данных: Если уравнение имеет два корня, выведите два корня в...
Java
UTF-8
11,565
1.671875
2
[]
no_license
package com.reconinstruments.connectdevice.ios; import android.app.ProgressDialog; import android.bluetooth.BluetoothAdapter; import android.content.Intent; import android.graphics.drawable.Drawable; import android.graphics.drawable.LevelListDrawable; import android.graphics.drawable.TransitionDrawable; import android...
SQL
UTF-8
971
3.515625
4
[]
no_license
create database escola; use escola; CREATE TABLE alunos ( id_aluno INT PRIMARY KEY AUTO_INCREMENT, matricula INT NOT NULL, nome VARCHAR(35), turma VARCHAR(5), ano date ); alter table alunos drop ano; alter table alunos add nota float; SELECT * FROM alunos; insert into alunos va...
C#
UTF-8
1,103
3.078125
3
[]
no_license
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Module6.ObjectOrientedTypes; namespace Module6.UnitTests { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { var expected = "Max Kritzinger"; var me = new Per...
C++
UTF-8
481
2.90625
3
[]
no_license
#include "UniformRS.h" #include <random> std::vector<std::pair<size_t, double>> UniformRS::sample(size_t sample_size) { std::random_device rd; std::mt19937 generator(rd()); std::uniform_int_distribution<size_t> uid(0, dataset_size - 1); std::vector<std::pair<size_t, double>> sample_IDs(sample_size); for (size_t...
Markdown
UTF-8
1,624
2.703125
3
[ "Unlicense" ]
permissive
# Solange Knowles Has Separated From Her Husband Published at: **2019-11-02T16:27:41+00:00** Author: **Bridget Read** Original: [VULTURE](https://www.vulture.com/2019/11/solange-knowles-separated-from-her-husband-alan-ferguson.html) Solange Knowles, sister of Bey, has taken to Instagram to announce in an all-lower...
Java
UTF-8
1,455
2.15625
2
[]
no_license
package com.yami.internet; import android.support.v4.app.Fragment; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.wi...
PHP
UTF-8
4,376
2.6875
3
[ "BSD-3-Clause" ]
permissive
<?php /** * * @package Gems * @subpackage Clover * @author Matijs de Jong <mjong@magnafacta.nl> * @copyright Copyright (c) 2019, Erasmus MC and MagnaFacta B.V. * @license New BSD License */ namespace Gems\Clover; use Zalt\Loader\Target\TargetInterface; use Zalt\Loader\Target\TargetTrait; /** * *...
Markdown
UTF-8
757
2.828125
3
[]
no_license
![](https://raw.github.com/astanway/transpad/master/drag.jpeg) ## Eh? Your phone is _fabulous_, and it knows it. But do you? ## I have no idea what's going on. Do you promise to love your phone no matter what? Good. Because it just told you it doesn't want to be a phone anymore. It wants to be a mouse. It's been a _g...
JavaScript
UTF-8
1,825
2.75
3
[]
no_license
/* eslint-disable no-loop-func, prefer-spread */ // require('babel-register') const r = require('ramda') const noOfGames = (games, player) => { return gamesForPlayer(games, player).length } const gamesForPlayer = r.curry((games, player) => { return r.filter(g => { return r.contains(player, r.flatten(g)) }, ...
Python
UTF-8
338
3.390625
3
[]
no_license
def cigar_party(cigars, is_weekend): if is_weekend: if cigars >= 40: return True else: return False else: if 40 <= cigars <= 60: return True else: return False print(cigar_party(30, False)) print(cigar_party(50, False)) print(cigar...
C++
UTF-8
429
3.125
3
[]
no_license
class Solution { public: int maxProfit(vector<int> &prices) { if (prices.size() < 2) return 0; int max_profit = 0; int min_price_ahead = prices[0]; for (int i = 1; i < prices.size(); ++i) { if (max_profit < prices[i] - min_price_ahead) max_profit = prices[i] - min_price_ahead; ...
Python
UTF-8
164
3.296875
3
[]
no_license
#!/usr/bin/python3 def divisible_by_2(my_list=[]): new_list = [] for i in my_list: new_list.append(False if i % 2 else True) return(new_list)
C++
UTF-8
600
2.8125
3
[]
no_license
// // main.cpp // Uri 1257 - Array Hash // // Created by S M HEMEL on 12/21/16. // Copyright © 2016 S M HEMEL. All rights reserved. // #include <iostream> #include <cstring> using namespace std; int main() { int n,l; char linha[51]; int total; cin >> n; while(n--) { cin >> l; ...
C
UTF-8
1,681
2.703125
3
[]
no_license
/** @brief software pwm implementation source file. This source file provides implementation for a software PWM. @file soft_pwm.c @author Joao P Bino */ #include "soft_pwm.h" #include "mcc_generated_files/pin_manager.h" static volatile uint16_t dutycycle [PWM_CHANNEL_MAX] = {0}; static volatile uint8_t pwm_c...
Java
UTF-8
289
2.3125
2
[]
no_license
package designPattern.AbstractFactory; /** * @author sby * @Title: SpringTextField * @Description: TODO * @date 2019/1/22 14:03 */ public class SpringTextField extends TextField { @Override public void display() { System.out.println("春天样式文本框"); } }
Markdown
UTF-8
13,276
3.1875
3
[]
no_license
# lamp on ubuntu - Keith - CSDN博客 2014年11月13日 22:09:17[ke1th](https://me.csdn.net/u012436149)阅读数:539 个人分类:[web develop](https://blog.csdn.net/u012436149/article/category/2709623) ### How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 ### Introduction A "LAMP" stack is a g...
Markdown
UTF-8
4,448
3.71875
4
[]
no_license
# Graphical Editor Write a program which simulates a simple interactive graphical editor. ### Usage ''' npm run ''' ### Notes The original command S write to a file. In this example the command was replaced by show in console. ## Original Problem Graphical editors such as Photoshop allow us to alter bit-mapped image...
Java
UTF-8
1,491
2.40625
2
[]
no_license
package buySell; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.surf.dsasm.Rework.client.RestClientInteractor; import MetricApplier.SymbolVsMetricSortedList; import model.Bou...
SQL
UTF-8
463
3.25
3
[]
no_license
CREATE TABLE SUBSCR_RQST ( SUBSCR_RQST_ID INT(11) NOT NULL AUTO_INCREMENT, USER_ID INT(11) UNSIGNED DEFAULT NULL, PROJ_ID INT(11) NOT NULL, RQST_TM DATETIME NOT NULL, PRIMARY KEY (SUBSCR_RQST_ID), INDEX IX__SUBSCR_RQST__PROJ_ID (PROJ...
Java
UTF-8
204
1.648438
2
[ "MIT" ]
permissive
package io.blacknode.adx; import android.location.Location; /** * Created by Arshit on 2/22/18. */ public interface OnLocationChangedListener { void onLocationChanged(Location currentLocation); }
Java
UTF-8
1,144
2.4375
2
[]
no_license
/* CSI4124/SYS5110 – Foundations of Modeling and Simulation * SM Market - Simulation Project * Fall 2016 * * Team Members: * Paul Laplante * Saman Daneshvar * Matthew Gordon Yaraskavitch * Toluwalase Olufowobi * Ekomabasi Ukpong * Qufei Chen */ package smmSimModel; import simulationModelli...
C
UTF-8
1,366
2.703125
3
[]
no_license
#include <store.h> #include <store/object.h> #include <stdlib.h> #include <string.h> #include "_impl.h" static object *_ob_new_unmanaged(object prototype) { object* ret = malloc(sizeof(object)); memcpy(ret, &prototype, sizeof(object)); if(ret->constructor!=NULL) ret->constructor(ret); return ret; } /*static v...
Java
UTF-8
6,577
2.1875
2
[]
no_license
package com.renny.simplebrowser.globe.image.impl.glide; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.support.annotation.Nullable; import android.text.TextUtils; import android.widget.ImageView; import com.bumptech.glide.load.DataSource; impo...
Java
UTF-8
233
1.898438
2
[]
no_license
package me.nic.cloud.mapper; import me.nic.cloud.entities.Payment; import org.apache.ibatis.annotations.Mapper; @Mapper public interface PaymentMapper { int create(Payment payment); Payment selectPaymentById(Long id); }
JavaScript
UTF-8
8,093
3.796875
4
[]
no_license
/** * @namespace * @memberof L3D */ L3D.utils = (function() { var utils = {}; /** * @constructor * @description Linked list in javascript * @memberof L3D.utils */ var List = function() { /** * @private * @type {Number} * @description number of elements in the list */ this._size = 0...
JavaScript
UTF-8
611
2.65625
3
[]
no_license
(function() { var LevelWalls = function(width, height, metal, floor, wood) { this.initialize(width, height, metal, floor, wood); } var p = LevelWalls.prototype = new createjs.Container(); p.width; p.height; p.metal; p.floor; p.wood; p.Container_initialize = p.initialize; p.initialize = function(width,...
Java
UTF-8
1,496
2.46875
2
[]
no_license
package de.dailab.oven.database; import javax.annotation.Nonnull; import org.junit.Assume; import org.junit.Before; import de.dailab.oven.database.configuration.DatabaseConfiguration; import de.dailab.oven.database.configuration.Graph; /** * Provides a {@link Graph} instance that can be used for database tests. Cre...
C++
UTF-8
1,710
3.140625
3
[]
no_license
#include <iostream> #include <fstream> #include "Eigen/Dense" #include "Eigen/Eigenvalues" //using namespace std; using namespace Eigen; using namespace std; //Die Funktion Federpendel gibt die Eigenwerte des Differentialgleichungssystems aus VectorXd Federpendel(VectorXd &m, VectorXd &k, VectorXd &l, int N) { //au...
Python
UTF-8
11,839
2.515625
3
[]
no_license
# coding: utf-8 # In[1]: import tensorflow as tf import time,sys,os,math,random,itertools,glob,cv2 from datetime import timedelta #from sklearn.utils import shuffle import pandas as pd import numpy as np from datetime import timedelta from sklearn.model_selection import train_test_split,ShuffleSplit os.environ['TF_...
TypeScript
UTF-8
287
2.71875
3
[]
no_license
import Ajv from 'ajv' interface Validation { valid: boolean error?: string } export default (schema: any, data: any): Validation => { const ajv = new Ajv() const valid = ajv.validate(schema, data) if (valid) { return { valid } } return { valid, error: ajv.errorsText() } }
TypeScript
UTF-8
1,470
2.6875
3
[]
no_license
import { testGraphQl } from '../../lib/testHelpers'; import { expect } from 'chai'; describe('GraphQL: species', () => { it('queries without inputs', async (): Promise<void> => { const query = `query { species { name id } }`; const res = await testGraphQl(query); ...
PHP
UTF-8
199
2.65625
3
[]
no_license
<?php if (isset($_POST['ticket_type'])) { require_once('../classes/Tickets.php'); $tick = new Tickets(); if ($tick->insertTicket($_POST)) { echo "Success"; } else { echo "Failure"; } } ?>
Markdown
UTF-8
6,538
3.03125
3
[]
no_license
+++ title = "Connection handshakes" description = "How to handle initial steps in a protocol" menu = "going_deeper" weight = 104 +++ Some protocols require some setup before they can start accepting requests. For example, PostgreSQL requires a [start-up message](https://www.postgresql.org/docs/9.3/static/protocol-flow...
Swift
UTF-8
891
2.546875
3
[]
no_license
// // ListViewModel.swift // StarWarsCleanArch // // Created by Miguel Barone - MBA on 28/02/20. // Copyright © 2020 Miguel Barone - MBA. All rights reserved. // import Foundation import RxCocoa import RxSwift protocol ListViewModelContract { var swList: Driver<[SWResponse]?> { get } func showList() } cl...
Java
UTF-8
863
2.203125
2
[ "Apache-2.0" ]
permissive
package net.onrc.onos.apps.proxyarp.web; import net.floodlightcontroller.restserver.RestletRoutable; import org.restlet.Context; import org.restlet.Restlet; import org.restlet.routing.Router; /** * Routing class for ARP module REST URLs. */ public class ArpWebRoutable implements RestletRoutable { /** * G...
Java
UTF-8
1,081
3.390625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
/* * Hackerrank Jobs Coding Challenge * Hackerrank Software Engineer position */ public class CountingBinarySubstring { public static void main(String[] args) { System.out.println(counting("0000011110010110100110001")); } static int counting(String s) { int counter = 0; int i =...
JavaScript
UTF-8
1,567
2.5625
3
[]
no_license
import React, { useState } from "react"; import axios from "axios"; import { BASE_URL } from "../Constant/Constant"; import GlobalStateContext from "./GlobalStateContext"; import useRequestData from "../Hooks/useRequestData"; const GlobalState = (props) => { const [pokedexList, setPokedexList] = useState([]); cons...
Markdown
UTF-8
1,836
2.515625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: コンパイラ エラー C2593 ms.date: 11/04/2016 f1_keywords: - C2593 helpviewer_keywords: - C2593 ms.assetid: 4a0fe9bb-2163-447d-91f6-1890ed8250f6 ms.openlocfilehash: c358553a36104b5c389076f5a5ce02f94f85e85a ms.sourcegitcommit: 0ab61bc3d2b6cfbd52a16c6ab2b97a8ea1864f12 ms.translationtype: MT ms.contentlocale: ja-JP ms.la...
Java
UTF-8
8,960
3.21875
3
[]
no_license
import java.awt.Color; import edu.princeton.cs.algs4.Bag; import edu.princeton.cs.algs4.Point2D; import edu.princeton.cs.algs4.Queue; import edu.princeton.cs.algs4.RectHV; import edu.princeton.cs.algs4.StdDraw; /* * A 2d-tree is a generalization of a BST to two-dimensional keys. The idea is * to build a BST with po...
C++
UTF-8
529
2.953125
3
[]
no_license
class Solution { public: int numberOfArithmeticSlices(vector<int>& a) { if(a.size()<3) return 0; int ans = 0; int ptr1 = 0, ptr2 = 2; int curr_diff = a[ptr1+1] - a[ptr1]; while(ptr2<a.size()) { if(a[ptr2]-a[ptr2-1] == curr_diff) ...
C
UTF-8
866
3.265625
3
[]
no_license
// LIST THE CONTENTS OF A TEXT FILE ON THE TERMINAL OR A FILE // USAGE: p3b <text file> [<destination>] #include <stdio.h> #include <unistd.h> #include <fcntl.h> #define LENGTH 1024 int main(int argc, char *argv[]) { int src, dst, nr; char *buffer[LENGTH]; if (!(argc == 2 || argc == 3)) { printf("Usage:...
C
UTF-8
721
3.984375
4
[]
no_license
//normal function call using char and passing arguments using char. // for single char use single quote', for many char(string) use double quote" //diff representations: //char a ='b'; //char b[13] = "abi is good"; //char c[4] = {'h','e','l'}; //size should be one more than the total string #include<stdio.h> char f...
Java
GB18030
2,227
1.765625
2
[]
no_license
package org.wx; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.WxBeanFactoryImpl; import org.springframework.transaction.annotation.Transactional; import org.apache.log4j.Logger; im...
C#
UTF-8
1,048
2.875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace ConnectionsSquare { public static class FamilyManager { public static List<GenericLocalMap<Being>> families = new List<GenericLocalMap<Being>>(); public static void GenerateFamilies() { families.A...
C++
UTF-8
1,808
3.859375
4
[]
no_license
#include <iostream> using s = unsigned short; int main(){ unsigned short number {16387}; std::cout << sizeof(number) << " bytes" << std::endl; //shift left by 2 bit positions auto result {static_cast<s> (number << 2)}; //without casting, it is treated as int std::cout << result << std::endl; // std::cout <<...
C#
UTF-8
9,898
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Web; using X.PagedList; using System.Collections; using System.ComponentModel.DataAnnotations; namespace RaceAnalysis.Models { public class TriathletesViewModel :BaseViewModel { public int TotalCount { get; set; } ...
Java
UTF-8
558
2.734375
3
[]
no_license
package com.yu.structure.proxy.staticproxy; import java.util.ArrayList; /** * @author yuchangying * @date 2022-06-15 18:14:49 * * 代理模式-静态代理:在不改变被代理类的情况下对被代理类加强,需要实现接口 * 1、需要被代理类实现的接口 * 2、需要被代理的类 * 3、代理工厂 */ public class Client { public static void main(String[] args) { IteachDao iteachDao = new T...
TypeScript
UTF-8
406
3.71875
4
[ "MIT" ]
permissive
function aaa(a: string, b: string, c: string) { const d = 123; const e = b + 123; return `1${a}2${e}3${c}4${d}`; } aaa('1', '2', '3'); const bbb = (x: string) => "222"; bbb("1"); const a = { b() { return "111"; } }; const b = { b: function () { return "111"; } }; const ...
PHP
UTF-8
739
2.890625
3
[]
no_license
<?php namespace App\DTO; use Symfony\Component\Validator\Constraints as Assert; class ProfilePasswordDTO { /** * @var string * @Assert\NotBlank * @Assert\Length( * max="4096", * min="6", * minMessage = "Jūsų slaptažodis turi turėti mažiausiai {{ limit }} simbolius", ...
C#
UTF-8
1,046
3.578125
4
[ "MIT" ]
permissive
public class Solution { public int EvalRPN(string[] tokens) { // solution 1: from left to right var st = new Stack(); int iout; int right, left; for(var i = 0; i < tokens.Length; i++){ if(int.TryParse(tokens[i], out iout)) st.Push(int.Parse(tokens[...
PHP
UTF-8
2,701
2.734375
3
[]
no_license
<?php $con = mysqli_connect("localhost", "root", "wearethebest", "hma2014"); //*************take out info from ANEW ********************************************* $sql1 = "SELECT description FROM ANEW"; $sql2 = "SELECT Valence_Mean FROM ANEW"; $sql3 = "SELECT Word_Frequency FROM ANEW"; $result1 = mysqli_query($con,$s...
Java
UTF-8
4,100
2.375
2
[]
no_license
package com.freemindcafe.socket.ssl.sample5; import static com.freemindcafe.utils.FileSystemUtils.currentDir; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.net.Socket; import java.security.KeyStore; import java.security.Principa...
Java
GB18030
3,037
2.859375
3
[]
no_license
package lesson2; import java.awt.*; import java.awt.event.*; import java.io.IOException; import java.util.Enumeration; import java.util.Scanner; import javax.swing.*; import java.awt.color.*; import lesson2.MainUI; public class AdchangeUI extends JFrame implements ActionListener { ...
PHP
UTF-8
1,204
2.671875
3
[ "MIT" ]
permissive
<?php namespace Frontend\Modules\Addresses\Engine; use Backend\Core\Engine\Model as BackendModel; use Backend\Modules\Addresses\Entity\Address; use Backend\Modules\Addresses\Repository\AddressRepository; use Backend\Modules\Catalog\Entity\Product; use Backend\Modules\Catalog\Repository\ProductRepository; use Frontend\...
JavaScript
UTF-8
1,694
2.84375
3
[]
no_license
var articles = JSON.parse(localStorage.getItem('news')) || []; function getArticles() { return new Promise((resolve, reject) => { setTimeout(()=> resolve(articles.reverse()), 200); }); }; function addArticle({id, title, author, tags, publishDate, shortDescription, fullDescription}) { return new Promise((res...
Python
UTF-8
1,870
2.71875
3
[]
no_license
#!/usr/bin/python # -*- coding: utf-8 -*- import time import sys import random #need this to pad the animation height = 48 width = 40 #the canvas we have to work with screen1 = [['-']*width for i in range(height)] screen2 = [['-']*width for i in range(height)] a = ''' __ __ ___ __ __ __ __ __ ___ | T T...
JavaScript
UTF-8
1,119
3.4375
3
[]
no_license
/** * 2021/04/13 每日一题 783. 二叉搜索树节点最小距离 * 给你一个二叉搜索树的根节点 root ,返回 树中任意两不同节点值之间的最小差值 。 * * 注意:本题与 530:https://leetcode-cn.com/problems/minimum-absolute-difference-in-bst/ 相同 * 示例 1: * * * 输入:root = [4,2,6,1,3] * 输出:1 * 示例 2: * * * 输入:root = [1,0,48,null,null,12,49] * 输出:1 */ /** * Definition for a bin...
Markdown
UTF-8
1,613
3.78125
4
[]
no_license
# C++ 알고리즘을 풀때 썻던 라이브러리 정리 ## String.find() ![string_find](https://user-images.githubusercontent.com/59689327/117568589-170e6a80-b0fc-11eb-8521-2891f28174f0.PNG) C++ 라이브러리중에 부분 문자열을 찾는 유용한 라이브러리가 있어서 정리해본다.<br> 2.find()는 s가 가키는 문자부터 count 개 만큼을 취한 부분 문자열을 원 문자열에서 찾는다. s 중간에 NULL 이 있어도 괜찮다.<br> 3.s 가 가리키는 문자열을 원 문자열...
C++
UTF-8
277
2.640625
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <math.h> #define PI 3.141592654 long double A, B, C; long double rad, alt; int main() { while (scanf("%Lf %Lf %Lf ", &A, &B, &C) != EOF) { rad = A*PI/180; alt = tan(rad)*B + C; printf("%0.2Lf\n", 5*alt); } return 0; }
JavaScript
UTF-8
1,266
2.953125
3
[]
no_license
var DataService = function () { var self = this; let counter = 2; let dvdList = [ { dvdId: 1, title: 'Crossroads', releaseYear: '1986', director: 'Walter Hill', rating: 'R' } ]; // ///////////////////////////////////////////...
C++
UTF-8
3,560
3.8125
4
[]
no_license
/* GeeksForGeeks: Longest consecutive sequence in Binary tree Link to Problem: https://practice.geeksforgeeks.org/problems/longest-consecutive-sequence-in-binary-tree/1 Difficulty: Easy Given a Binary Tree find the length of the longest path which comprises of nodes with consecutive values in increasing order. Ever...
Python
UTF-8
584
3.265625
3
[]
no_license
def any_lowercase1(s): for c in s: if c.islower(): return True else: return False any_lowercase1(k) def any_lowercase2(s): for c in s: if 'c'.islower(): return 'True' else: return 'False' def any_lowercase3(s): for c i...
C++
UTF-8
2,239
2.90625
3
[]
no_license
#include "../header/myheader.h" class LT1726 { public: // D D // vector<int> v; // for(int i=0; i < nums.size(); i++) { // for(int j=i+1; j < nums.size(); j++) { // v.push_back(nums[i]*nums[j]); // } // } // sort(v.begin(), v.end()); // // int ...
Java
UTF-8
935
3.3125
3
[]
no_license
package LinkedList; import static LinkedList.LinkedList.makelist; public class PalindromeList { public static boolean ispalin(Node head) { // find the middle element in list Node fast = head, slow = head; while(fast != null && fast.next!=null) { fast = fast.next.ne...
Python
UTF-8
802
3.234375
3
[ "MIT" ]
permissive
def engineer(train, test, real_test=None, funclist=[]): """ Loop through all of the dataframes and apply each of the funclist functions on them, in order funclist must be a list of functions that accept data as a single parameter. """ datasets = [train, test] if real_test is not None: d...
Markdown
UTF-8
2,772
2.640625
3
[ "Apache-2.0" ]
permissive
# ijcnlp17_emo Code to replicate experiments in the IJCNLP 2017 paper "Modelling Representation Noise in Emotion Analysis using Gaussian Processes" (to appear) ## Requirements ### Data and resources Download the "Affective Text" dataset and put the gzipped file in the "data" folder: https://web.eecs.umich.edu/~miha...
Java
UTF-8
327
2.5625
3
[]
no_license
package com.abstractionExample; //parent class public abstract class BMW { public void commonFeatures(){ System.out.println("common features..."); } public abstract void Enginepower();// Abstract method public static void main(String[] args) { System.out.println("Abstract class"); ...
C++
UTF-8
5,968
2.640625
3
[]
no_license
// HeapAllocations.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> #include <Windows.h> #include <tchar.h> #include <stdio.h> #include <intsafe.h> #include <thread> #include <chrono> #include <queue> #include <mutex> #include <condition_var...
Markdown
UTF-8
1,478
2.78125
3
[]
no_license
> [Monsters, NPC and Animals](srd_monsters.md) --- # Young White Dragon - Alias: [Jeune dragon blanc](hd_monsters_jeune_dragon_blanc.md) -  Large dragon, chaotic evil - **Armor Class** 17 (natural armor) - **Hit Points** 133 (14d10 + 56) - **Speed** 40 ft., burrow 20 ft., fly 80 ft., swim 40 ft. |STR|DEX|CON|INT|W...
PHP
UTF-8
602
2.921875
3
[ "MIT" ]
permissive
<?php namespace App\Models; class Cart { public function centsToPrice($cents) { return number_format($cents / 100, 2); } public static function unitPrice($item) { $a = 3; echo '<script>alert("hi" gettype($a))</script>'; // alert(gettype($a)); //return (new ...
Markdown
UTF-8
959
2.984375
3
[]
no_license
# California Public Schools: Cleaned Data Set PURPOSE: This repository is for cleaning the California Department of Education's database of public schools. It can then be used as a lookup table or for making interactive maps. The original dataset is available publicly from [CDE's website](http://www.cde.ca.gov/ds...
Python
UTF-8
8,440
2.859375
3
[]
no_license
import wx, os from ..textbox import LayoutDimensions from .smart import SmartTextBox, SmartInputLayout __author__ = 'Joeny' class PathSmartBox(SmartTextBox): """ Path Smart Box. """ def __init__(self, parent, *args, **kwargs): """ :param parent: :param args: :param ...
JavaScript
UTF-8
798
2.5625
3
[]
no_license
import { FETCH_RSS_BEGIN, FETCH_RSS_SUCCESS, FETCH_RSS_FAILURE } from "./index"; export const fetchRSSBegin = () => ({ type: FETCH_RSS_BEGIN }) export const fetchRSSSuccess = data => ({ type: FETCH_RSS_SUCCESS, payload: { data } }) export const fetchRSSFailure = error => ({ type: FETCH_RSS_FAILURE, ...
Java
UTF-8
88,872
1.84375
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package UI; import javax.swing.JOptionPane; import Class.Koneksi; import java.sql.Connection; import java.util.Calendar; import java.u...
PHP
UTF-8
4,120
2.828125
3
[]
no_license
<?php ob_start(); ?> <?php function placeholder($image) { if(!isset($image)) { return 'php.png'; } else { return $image; } } function redirect($location){ global $connection; header("Location:" . $location); // instead of returning you can use exit function exit;...
Markdown
UTF-8
1,271
3.25
3
[]
no_license
### **Orientation** ``` Del.» function Orientation(const poly: TPath): boolean; C++ » bool Orientation(const Path &poly); // Function in the ClipperLib namespace. C# » public static bool Orientation(Path poly); // Static method of the Clipper class in the ClipperLib namespace. ``` 方向只有在封闭的曲线里面是重要的,方向的定义就是在给定的封闭曲线中...
C#
UTF-8
794
3.046875
3
[]
no_license
namespace WeatherStation { public class WeatherData : Observable<WeatherInfo> { private double _humidity; private double _pressure; private double _temperature; private void MeasurementsChanged() { NotifyObservers(); } public void SetMeasure...
JavaScript
UTF-8
668
3.421875
3
[]
no_license
const crypto = require ('crypto'); const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); let comparedStr = '0000'; for (let i = 0; i < 60; i++) { comparedStr += 'f'; } //console.log(comparedStr); rl.question('Enter a string: ', str =...
Markdown
UTF-8
10,948
3.0625
3
[]
no_license
# readme ### 目录 * [第10次作业新增内容(最新)](#new3) * [设计文档更新](#设计文档更新) * [新增出租车类型](#新增出租车类型) * [新增测试接口](#新增测试接口2) * [第9次作业新增内容](#new2) * [bug修改说明](#bug修改说明) * [设计文档](#设计文档) * [道路交叉方式的输入](#道路交叉方式的输入) * [新增内容(第8次作业)](#new) * [新增测试接口](#新增测试接口) * [过程规格](#过程规格) * [上次内容(第7次作业)](#last) * [输入](#输入) * [本程序提供的测试接口](#...
Java
UTF-8
844
2.15625
2
[ "Apache-2.0" ]
permissive
package lv.ctco.cukes.ldap.facade; import com.google.inject.Inject; import com.google.inject.Singleton; import lv.ctco.cukes.core.internal.context.GlobalWorldFacade; import lv.ctco.cukes.ldap.internal.ConnectionService; @Singleton public class SetupFacade { @Inject GlobalWorldFacade world; @Inject Con...
C#
UTF-8
1,907
3.515625
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lesson0102 { class Program { static void Main(string[] args) { // Các toán tử // Toán tử số học: +; -; *; /; % // Toán tử so sánh: ...
JavaScript
UTF-8
1,275
3.4375
3
[ "MIT" ]
permissive
/** * @param {number[][]} times * @param {number} N * @param {number} K * @return {number} */ const networkDelayTime = function (times, N, K) { const mins = new Array(N).fill(Infinity) mins[K - 1] = 0 for (let i = 0; i < N; i++) { for (let [u, v, t] of times) { if (mins[u - 1] === Infinity) continu...
C++
UTF-8
1,142
2.65625
3
[]
no_license
// matrix.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <vector> #include <cstdio> #include <cstdlib> #include "NxM_Matrix.h" #include "Sqr_Matrix.h" #include "Network.h" using namespace std; int main() { /// ----- new main ----- /// s...
C++
UTF-8
1,973
3.15625
3
[]
no_license
#include "Input.h" #include <conio.h> namespace Utils { Input::Input() : mLastInput(Key::None) { // Empty } Input::~Input() { // Empty } void Input::Update() { if (_kbhit()) { int character = _getch(); // Character could be ASCII // Could also be a scan code (arrow keys, function keys, et...
C++
UTF-8
16,453
2.515625
3
[]
no_license
// -*- lsst-c++ -*- /* * LSST Data Management System * Copyright 2008-2014 LSST Corporation. * * This product includes software developed by the * LSST Project (http://www.lsst.org/). * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License ...
JavaScript
UTF-8
1,309
3.125
3
[]
no_license
var express = require('express'); var router = express.Router(); router.get('/', function(req, res, next) { res.render('index', { title: 'Enter some shit' }); }); router.post('/', function(req, res, next){ var shuffle = arrShuffle(req.body.shuffleArr.split(',')); var chunks = arrChunk(shuffle, req.body.chunk...
C#
UTF-8
810
3.515625
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MergableStack { class Program { static void Main(string[] args) { Stack s = new Stack(); s.Push(3); s.Push(4); s.Push(5)...
TypeScript
UTF-8
2,292
2.5625
3
[]
no_license
import { mount, MountingOptions } from "@vue/test-utils"; import ContentList from "@/components/Parts/CategoryContent/ContentList.vue"; import ChildComponent from "@/components/Base/Input/BaseInputRadio.vue"; import crafterJSON from "@/assets/FFXIV.json"; const testData: Crafter = crafterJSON.crafter[0]; interface C...
C#
UTF-8
6,025
2.578125
3
[]
no_license
// ------------------------------------------------------------ // © 2010 Masaaki Kishi // ------------------------------------------------------------ namespace AbookTest { using Abook; using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; using EX = Abook...
Java
UTF-8
865
2.421875
2
[]
no_license
package com.murray.financial.adapter.converter; import com.murray.financial.domain.entity.BankAccount; import com.murray.financial.dtos.BankAccountDTO; import org.springframework.core.convert.converter.Converter; import org.springframework.stereotype.Component; /** * Converts a {@link BankAccount} to a {@link BankA...
Java
UTF-8
8,674
1.710938
2
[]
no_license
package com.mobdeve.s11.manuel.tang.strayhaven.home; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.Intent; import android.os.Bundle; import android.v...
Java
UTF-8
1,740
2.359375
2
[]
no_license
package com.example.thadaninilesh.approvalchain; /** * Created by thadaninilesh on 17-02-2016. */ public class ManagerForApprovalList { private String employeeName, employeeEmail, taskName, taskDescription, taskAmount; private boolean approvalSelect = false; public ManagerForApprovalList(String employee...
Python
UTF-8
441
4.21875
4
[]
no_license
# Given mixed array of numbers, strings, booleans and nulls. # Filter array and get all the numbers in a separate array. # Arrange them such as from the beginning are the odds and from the ending the evens. arr = [8, 0, 1, 'hey', 12, 5 , True, '2', None, 7, 3] ar = [] ar1 = [] for i in arr: if type(i) == int or t...
Markdown
UTF-8
1,261
2.515625
3
[ "0BSD" ]
permissive
--- category: 'blog' title: "[GatsbyJS] Making Blog Website with Gatsby for Beginners" date: "2020-03-11" --- ## CSS - viewport meta tag 는 이미 개츠비가 설정해두었기에 따로 import 필요 없음 - css 에 calc() 이용해서 바로 적용 ## 마크다운 이미지 - [gatsby-source-filesystem](https://www.gatsbyjs.com/plugins/gatsby-source-filesystem/?=gatsby-source-fil...
Java
UTF-8
4,989
2.890625
3
[]
no_license
package com.II.readFiles; import java.io.FileWriter; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; public class Out_Bib_Generation { public static void main(String[] args) { int startYear=0; i...
C++
UTF-8
531
3.71875
4
[]
no_license
#include <iostream> // Given a string, compute recursively a new string where all the // adjacent chars are now separated by a '*'. std::string insertRecursively(std::string x, unsigned int length) { if (length == 0) { return x; } else { x.insert(length - 1, 1, '*'); return insertRecur...
C++
UTF-8
693
2.65625
3
[]
no_license
#include <iostream> #include <cassert> #include "utility/type/ll.hpp" #include "utility/range.hpp" using namespace std; ll reverse(ll x) { ll y = 0; while (x) { y *= 10; y += x % 10; x /= 10; } return y; } int main() { ios_base::sync_with_stdio(false); constexpr ll l = 10...