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
Swift
UTF-8
4,943
2.75
3
[]
no_license
// // ItemView.swift // Minha Lista // // Created by Wilton Garcia on 14/06/21. // import UIKit class ItemView: UIView { //MARK: - Private properties public weak var delegate: AddListViewDelegate? private var clique = 0; //MARK: - View Properties private let contentView: UI...
JavaScript
UTF-8
8,485
2.578125
3
[]
no_license
"use strict" var User = require("../models/user.model"); var Carrito = require("../models/carrito.model"); var bcrypt = require("bcrypt-nodejs"); var jwt = require("../services/jwt"); const { param } = require("../routes/user.route"); function createCart(user){ var carrito = new Carrito(); carrito.compra = f...
JavaScript
UTF-8
17,875
2.75
3
[]
no_license
// import React from 'react'; // const rootElement=document.getElementById('root'); /*global ReactDOM*/ /*global React*/ // window.id = 0; // class Todo extends React.Component { // constructor(props){ // super(props); // this.state = { // items:[], // text:"" // } ...
JavaScript
UTF-8
5,106
2.9375
3
[]
no_license
function Tree(node) { this.selfNode = node //Tree返回dom节点 this.selfNode.Tree = this //dom节点返回Tree this.childs = [] this.parent = null this.iOpen = node.children[0].children[0] this.label = node.children[0].children[1] } Tree.prototype = { //添加动画 anime: function(node, anime) { node.classList.add(anim...
JavaScript
UTF-8
817
3.171875
3
[ "MIT" ]
permissive
// this should contain front end js for loging in async function loginHandler(event) { event.preventDefault(); const email= document.querySelector('#email-login').value.trim(); const password = document.querySelector('#password-login').value.trim(); if(email && password) { const response = aw...
Java
UTF-8
2,198
3.140625
3
[]
no_license
package calculoimc; import javax.swing.JOptionPane;; public class CalculoIMC { public static void main(String[] args) { boolean result; String speso,saltura; float peso, altura; float imc; String classifica; String bemVindo = ("Programa para calculo do IMC! \n (Ok para continuar) \n\n"); JOptionP...
Java
UTF-8
935
2.359375
2
[ "MIT" ]
permissive
package com.example.l.TripFlash.network; import android.graphics.Bitmap; import com.android.volley.Response; import org.json.JSONObject; import java.io.ByteArrayOutputStream; public class BitmapMultipartReqeust{ private final String mimeType = "form-data;"; private static MultipartRequest multipartRequest;...
JavaScript
UTF-8
444
3.4375
3
[]
no_license
let a=91; console.log(a,typeof a); let b=9.875; console.log(parseInt(b)); console.log(parseFloat(b)); console.log(typeof b); console.log(b.toFixed(5)); console.log(b.toFixed(1)); let x=parseInt("Hello 90 ID"); console.log(x,typeof x); let y=parseFloat("95 How are you?"); console.log(y,typeof y); let z=55.89.toFixed(...
Python
UTF-8
2,368
3.640625
4
[ "MIT" ]
permissive
''' Description: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True Example 2: Input: "abca" Output: True Explanation: You could delete the character 'c'. Note: The string will only contain lowercase characters a-z. The m...
Markdown
UTF-8
774
2.75
3
[]
no_license
# Frontend Mentor - Stats preview card component solution This is a solution to the [Stats preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/stats-preview-card-component-8JqbgoU62). Frontend Mentor challenges help you improve your coding skills by building realistic projects...
C++
GB18030
1,548
3.1875
3
[]
no_license
#include "ClassStudent.h" int ClassStudent::studentCount_ = 0; ClassStudent::ClassStudent(Student s[20]) { Student i(1111,"Zhangsan"); for (int i = 0; i < 20; i++) { *(students_ + i) = &s[i]; } } ClassStudent::ClassStudent(ClassStudent& p) { code_ = p.code_; studentCount_ = p.studentCount_; ...
PHP
UTF-8
854
2.546875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: brahim * Date: 25/12/16 * Time: 15:55 */ include 'functions0.php'; $idPersonne = $_POST["idPersonne"]; $idPersonne = $_POST['idPersonne']; $nom = $_POST[""]; $prenom = $_POST["prenom"]; $age = $_POST["age"]; $email = $_POST["email"]; $password = $_POST["password"]; $resp...
Java
UTF-8
1,804
3.5625
4
[]
no_license
package com.company; import java.util.Random; public class Main { public static void main(String[] args) { Random newRandom = new Random(); int randomOne = newRandom.nextInt(6) + 1; System.out.println(randomOne); switch (randomOne) { case 1: System...
C++
ISO-8859-2
3,432
2.765625
3
[]
no_license
/* * Copyright (C) Gbor Grzsny <gabor@gorzsony.com> - All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential */ #include <cmath> #include <GL/Math/Mat4.hpp> #include "common/PI.hpp" #include "common/GLlerp.hpp" #include "gfx/shape/WireShape.hpp...
Ruby
UTF-8
130
2.796875
3
[]
no_license
#!/usr/bin/env ruby # encoding: utf-8 x = ARGF.file.read.split("\n") x.shift puts x.map { |e| e.scan(/[aeiouy]/).size }.join ' '
Markdown
UTF-8
1,701
2.671875
3
[]
no_license
feedreader Date:09/08/2014 ## Welcome To feedreader Portal ## ###Genereal Usage Notes### --------------------------------------------------------------- **Feed Reader** is the portal for Getting the feed Data like news in Slide Show. - So You can access it in your browser without any special installation for...
Python
UTF-8
306
3.15625
3
[]
no_license
a=int(input("enter a number")) b=int(input("enter a number")) c=int(input("enter your number")) if a>b: if a>c: print(a) elif c>b: print(c) elif b>c: print(b) elif c>a: if c>b: print(c) elif b>a: print(b) # esme sabse highest number print kr rha hai
Python
UTF-8
4,736
2.6875
3
[ "CC0-1.0" ]
permissive
#!/usr/bin/env python3 import sys, os import argparse from collections import OrderedDict from pathlib import Path import shutil class ConfigFile(): def __init__(self, filepath): self.content = OrderedDict() self.filepath = filepath with open(filepath, 'r') as file: idx = 0 ...
Python
UTF-8
874
2.578125
3
[]
no_license
#!/usr/bin/python import sys import os radiolimit = 6 gain = "-20.0" noise = "-140.0" noisevar = "5.0" args = len(sys.argv) - 1 if args != 1: print "usage: showtopo.py <file>" sys.exit() file = sys.argv[1] if os.access(file, os.R_OK): f = open(file,"r") lines = f.readlines() else: prin...
Python
UTF-8
4,891
2.515625
3
[]
no_license
import multiprocessing import cv2 import numpy as np import json import os import imageio import shutil # img_src is numpy array, affine matrix is 2*3 matrix # image index is col, row # keep all pixels in the source image # return img_dst, off_set def warp_affine(img_src, affine_matrix, no_blank_margin=True): hei...
JavaScript
UTF-8
1,339
3.078125
3
[]
no_license
// Stuff that helps us test import React from "react"; import { render, fireEvent } from "../../../tools/test-utils"; // We're using our own custom render function and not RTL's render our custom utils also re-export everything from RTL so we can import fireEvent and screen here as well import "@testing-library/jest-do...
C#
UTF-8
2,484
2.59375
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Configuration; using System.Collections.Specialized; using com.espertech.esper.client; using com.espertech.esper.client.util; namespace WebMonitoringSink.Configuration { /// <summary> /// This class encaps...
Python
UTF-8
1,293
3.28125
3
[]
no_license
import pandas as pd import argparse import json import random def load_json(fname): content=[] with open(fname, 'r') as content_file: for jsonObj in content_file: Dict = json.loads(jsonObj) content.append(Dict) return content def get_posts(content,num,maxlen): names=[] ...
Markdown
UTF-8
1,467
3.265625
3
[]
no_license
# Chapéu do TDD Existem dentro do TDD, 3 chapéus principais que representam as etapas do TDD. ## Chapéu Vermelho (Test) Esse chapéu representa a etapa de criação de testes. É nessa etapa que são feitos os testes da funcionalidade que está sendo desenvolvida. Puramente isso, sem fazer quaisquer alterações em código d...
Python
UTF-8
24,760
2.734375
3
[]
no_license
import time import numpy as np import random from sklearn.ensemble import ExtraTreesRegressor from NewExperimentDenoingAlgorithm import * #0 stands for red observation, 1 stands for blue observation, 2 stands for green observation #actions can be performed in this state [0,1,2,3] corresponding to [left,right,up, down...
C++
UTF-8
1,717
3.171875
3
[]
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* mergeKLists(vector<ListNode*>& lists) { ListNode *head = NULL; ListNode *curr,*temp; in...
Java
UTF-8
9,272
2.140625
2
[]
no_license
package GUI; import java.awt.*; import AMath.Calc; import Game.*; import java.awt.event.*; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import Shirage.*; import javax.swing.*; public class MapDisplay extends JPanel implements MouseListener, MouseMotionListener { privat...
Python
UTF-8
1,154
3.1875
3
[]
no_license
#! /usr/bin/env python3 """This is my homework for Coursera: Interfacing with the Raspberry Pi Week 3 This program simply searches through twitter for tweets mentioning "Ian G. Harris" and prints "Ian G. Harris is popular!" when 3 or more such tweets are found.""" import json from twython import TwythonStrea...
Markdown
UTF-8
5,968
3.40625
3
[]
no_license
三 “我明白你的直觉,”梅森说。“我也有这种直觉。只不过多年来在法庭交互询问证人的训练,让我随时注意到一个人实际讲了些什么。我可以确定葛蒂并没有告诉我们她曾特地询问这位小姐是不是摩莎小姐的秘书中心派来的。” “噢,那她是怎么来的?” “叫她进来问就知道了,”梅森说。“千万别让她跑掉,戴拉。明天我还有一些工作给她做,这位小姐是个难得的人才。” 戴拉·史翠特点点头,离开她的座位,走向外头办公室,隔了一会她回来时,一边在鼻子周围扑着粉。 “可能上洗手间去了。”戴拉说。 “你留话了吗?”梅森问。 “有,我交代葛蒂等她回座位时就带她进来。” “文件打得怎样?” ...
C
UTF-8
1,631
3.453125
3
[]
no_license
#include <stdio.h> #include "ex22.h" #include "dbg.h" int THE_SIZE = 1000; static int THE_AGE = 37; //here statis is the opposite of extern //static here means that this var is only to be used inside this .c and to not be accassable outside it //(static here is based on the file level and can be different in...
Python
UTF-8
1,332
2.796875
3
[]
no_license
#!/usr/bin/python # various constants and utilities for neutron decay from math import * neutronBetaEp = 782.347 # neutron beta decay endpoint, keV m_e = 511.00 # electron mass, keV/c^2 m_p = 938272.046 # proton mass, keV/c^2 lmbda = abs(-1.2723) # +/-0.0023, PDG 2010 value lambda, Wilkinson sign con...
PHP
UTF-8
538
2.765625
3
[ "MIT", "LicenseRef-scancode-oreilly-notice" ]
permissive
<?php require_once 'login.php'; $mysqli = new mysqli($db_hostname, $db_username, $db_password, $db_database); // Check connection if ($mysqli->connect_errno) { echo "Failed to connect to MySQL: " . $mysqli->connect_error; exit(); } $query = "SELECT * FROM countries"; $re...
C++
UTF-8
3,058
2.5625
3
[ "MIT" ]
permissive
// // main.cpp for main in /home/diallo_n/alassane/abstractVM_2016 // // Made by mamadou diallo // Login <diallo_n@epitech.net> // // Started on Fri Jul 21 15:24:06 2017 mamadou diallo // Last update Wed Jul 26 12:00:58 2017 mamadou diallo // #include <iostream> #include <fstream> #include <vector> #include "IOp...
C#
UTF-8
1,822
2.765625
3
[]
no_license
using System; using System.Linq; using System.IO; namespace IEngineer.Studio.Extension.Ichnos { public class FileStreamTraceListener : ITraceMessageListener, IDisposable { StreamWriter writer; TraceStreamOptions options; /// <summary> /// Creates an instance of the FileStream...
Python
UTF-8
1,255
2.796875
3
[]
no_license
import numpy as np from sklearn.model_selection import train_test_split from sklearn.metrics import f1_score from sklearn.svm import LinearSVC from sklearn.linear_model import LogisticRegression data_path = "../processedDataset/" if __name__ == '__main__': # load data inputs=np.loadtxt(data_path+"microarray_...
Java
UTF-8
4,397
2.28125
2
[]
no_license
package com.example.respirapp; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.BatteryManager; import android.os.Build; import android.os.Bundle; import android.util.Log; import android.widget.Toast; import com.androgni...
Java
UTF-8
1,329
2.875
3
[]
no_license
//package Collections; // //import java.lang.reflect.Constructor; //import java.lang.reflect.Field; //import java.util.*; //import java.util.concurrent.locks.Lock; //import java.util.concurrent.locks.ReentrantLock; // ///** // * @Author: xianz // * @Date: 2020/8/15 10:05 // * @Title&Description: // * @Analysis: // * @S...
C
UTF-8
16,030
3.6875
4
[ "MIT" ]
permissive
/* structure * Realization of matrix/vector structure functions * Done by Kostiukovych Stanislav, Statistics * Date 28.05.2019 */ #include "Dmatrix.h" /* Creates a vector with all values 0. * Returns NULL if size <= 0 and otherwise a * pointer to the new vector. */ vector * newVector(int num) { if (num...
PHP
UTF-8
1,134
2.578125
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateActivitiesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('activities', function(Blueprint $table) { $table->increments('id'...
Java
UTF-8
5,968
1.828125
2
[]
no_license
/* * Copyright (c) 2008-2015 EMC Corporation * All Rights Reserved */ package com.emc.storageos.volumecontroller.impl.plugins.discovery.smis.processor.detailedDiscovery; import com.emc.storageos.db.client.DbClient; import com.emc.storageos.db.client.model.StoragePool; import com.emc.storageos.db.client.model.Storag...
Java
UTF-8
1,892
3.28125
3
[]
no_license
import java.util.*; import java.io.*; import java.math.*; /** * Auto-generated code below aims at helping you parse * the standard input according to the problem statement. **/ class Solution { public static void main(String args[]) { Scanner in = new Scanner(System.in); int N = in.nextInt(); ...
Java
UTF-8
1,997
2.515625
3
[]
no_license
package com.example.jeevanjyoti.broadcastReceiver; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import android.util.Log; import androidx.localbroadcastmanager.content.LocalBroadcastManager; publ...
Python
UTF-8
291
3.921875
4
[]
no_license
birthyear = input('Enter Birth year (Christ) :') print('variable type of year input = {}'.format(type(birthyear))) # calculate # convert str to int age = 2018 - int(birthyear) print('variable type of year after convert = {}'.format(type(int(birthyear)))) print(' Your age = {}'.format(age))
C#
UTF-8
14,266
2.53125
3
[]
no_license
using System; using System.Collections.Generic; using System.Web; using Excel = Microsoft.Office.Interop.Excel; namespace IGenFormsViewer { /// <summary> /// Summary description for ExcelRoutines /// </summary> public class ExcelRoutines { private string moduleName = "ExcelRoutines"; ...
Markdown
UTF-8
33,832
2.828125
3
[]
no_license
--- title: "纪录片《量子力学揭秘》" date: 2023-08-07T23:34:25+08:00 draft: false math: true categories: - 影视 - 物理学 tags: - 纪录片 --- 英文名:The Secrets of Quantum Physics 讲述人:Jim AL-Khalili University of Surrey ## Einstein's nightmare(探究现实的本质) {{< bilibili BV1ds411E79V >}} 借用一位量子力学奠基者的话说,我们谓之”真实“的万物并不能自我验证其”其实“。 ### Max Planck ...
C#
UTF-8
1,520
3.375
3
[]
no_license
// BGCoder: http://bgcoder.com/Contests/Practice/Index/94#0 namespace MultiverseCommunication { using System; class MultiverseCommunication { static void Main() { string input = Console.ReadLine().ToUpper(); ulong result = 0; int counter = 0; ...
C++
UTF-8
731
2.5625
3
[]
no_license
/* * BlueTooth.cpp * * Created on: Dec, 5, 2015 * Author: juliosugaya */ #include <Arduino.h> #include "BOTLib.h" //<<constructor>> BlueTooth::BlueTooth(uint8_t rx, uint8_t tx){ btSerial = new SoftwareSerial(rx, tx); btSerial->begin(9600); } char BlueTooth::read() { return (c...
C#
UTF-8
10,694
2.546875
3
[]
no_license
//using System; //using System.Collections.Generic; //using System.Linq; //using System.Text; //using System.Threading.Tasks; //using System.IO; //namespace Rotation_Deconvolution //{ // class Program // { // static void Main(string[] args) // { // /* // Written...
PHP
UTF-8
3,407
2.609375
3
[]
no_license
<?php namespace App\Controller; use \App; use Core\HTML\BootstrapForm; class UsersController extends AppController { public function __construct() { parent::__construct(); $this->loadModel('User'); } public function register() { $errors = []; $success = []; ...
Markdown
UTF-8
2,200
3.125
3
[ "MIT" ]
permissive
--- layout: post title: "Joining Chef, The Hard Parts" date: 2014-07-01 06:39:31 -0700 comments: true categories: writing, context switching, chef --- Anybody that has spent any time with me recently has probably heard about how much I love working for Chef. I have been meaning to write a post about how great the tran...
Shell
UTF-8
233
3.203125
3
[]
no_license
#!/bin/bash if [ $# -ne 1 ] then echo "Usage: bash convert.sh file" exit fi cat $1 | awk -F, '{ if($2>$3 && $2>$4 && $2>$5) {max = 0} else if($3>$4 && $3>$5) {max = 1} else if($4>$5) {max = 2} else {max = 3} print $1/64","max }'
Python
UTF-8
328
3.8125
4
[]
no_license
''' @author : Rohithmarktricks This program prints the sum of n variable from 1 ''' SUM_ = 0 END = int(input("Enter the end variable :")) i = 1 while i <= END: SUM_ += i i += 1 print(SUM_) #Using For loop: END = int(input("Enter the end integer value :")) SUM_ = 0 for i in range(1, END+1, 1): SUM_ += i prin...
Python
UTF-8
1,932
3.171875
3
[]
no_license
""" This modules for setting. """ from tkinter import * from rootPackage.control1 import open_control from tkinter import messagebox def open_setting(): root = Toplevel() root.title("Setting") root.iconbitmap("sponge.ico") root.geometry("800x600") root.resizable(width=False, height=False) bg = ...
Markdown
UTF-8
372
2.640625
3
[]
no_license
# 03 JavaScript: Password Generator In this project we were asked to create a code quiz from scratch. Using html Css and javascript I created a quiz that askes questions, has a timer and records the score of the person who takes the quiz. using various functions and JQuery techneques the quiz was created. you can rest...
Java
UTF-8
1,714
2.359375
2
[]
no_license
package com.otto.beekeeperstocksystem.RepositoryTests; import android.test.AndroidTestCase; import com.otto.beekeeperstocksystem.Domain.Hive; import com.otto.beekeeperstocksystem.Repositories.HiveRepository; import com.otto.beekeeperstocksystem.Repositories.Impl.HiveRepositoryImpl; import junit.framework.Assert; imp...
Java
UTF-8
1,092
2.203125
2
[]
no_license
package com.cityfleet.model; import com.cityfleet.R; /** * Created by vika on 05.04.16. */ public enum ReportType { POLICE(R.drawable.ic_police_pin, R.drawable.ic_policeman, R.string.police), TLC(R.drawable.ic_tlc_pin, R.drawable.ic_police, R.string.tlc), ACCIDENT(R.drawable.ic_accident_pin, R.drawable....
Java
UTF-8
757
2.1875
2
[]
no_license
package org.fire.cost.dao.custom; import org.fire.cost.domain.Group; import org.fire.cost.vo.GroupVO; import org.fire.cost.vo.PageData; import java.util.List; /** * “组”dao扩展类 * * @author liutengfei */ public interface GroupDaoCustom { /** * 根据过滤条件查询“组”数据 * * @return */ List<Group> get...
C#
UTF-8
653
2.640625
3
[]
no_license
using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; namespace PublicAddressBook.Client.Helpers { public static class HeaderParser { public static PagingInfo FindAndParsePagingInfo(System.Net.Http.Headers.HttpResponseHeaders responseHeaders) { IEnumerable<str...
Java
UTF-8
1,348
4.4375
4
[]
no_license
//Simulate class to simulate the game of five rounds. Here, you will create one // object of Dealer and two objects of the player class. The simulation should // display the final points, name of each player, and the name of the winner. public class Simulate { public static void main(String[] args) { // Create O...
C++
UTF-8
5,447
3.328125
3
[]
no_license
// // Created by zealot on 11/30/15. // #include "LameBook.h" LameBook::LameBook(std::string filePath) { m_filePath=filePath; std::ifstream inFile(m_filePath); std::string tempstring="temp"; if (inFile.is_open()) { for (std::forward_list<User>::iterator seeker = m_Users.before_begin(); in...
C#
UTF-8
1,417
2.796875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace BangaiO { public partial class VUMeter : Control { public Color Color { g...
C#
UTF-8
1,236
3.078125
3
[]
no_license
using System; using System.Linq; using System.Collections.Generic; using AddressBook.Models; using AddressBook.Data; using Microsoft.EntityFrameworkCore; namespace AddressBook.Services { public class DatabaseContactRepository : IContactRepository { private readonly ApplicationDbContext _dbContext; ...
Java
UTF-8
326
1.664063
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 com.vcs.lects.l09.tasks; /** * * @author owr */ public interface ToStringConverter { String convert(Object obj); ...
Java
UTF-8
5,562
2.5
2
[]
no_license
package com.company; import org.bouncycastle.crypto.BufferedBlockCipher; import org.bouncycastle.crypto.engines.RC6Engine; import org.bouncycastle.crypto.modes.CBCBlockCipher; import org.bouncycastle.crypto.modes.CFBBlockCipher; import org.bouncycastle.crypto.modes.OFBBlockCipher; import org.bouncycastle.crypto.paddin...
PHP
UTF-8
5,660
2.671875
3
[]
no_license
<?php class Venta{ private $id_venta; private $num_venta; private $efectivo_venta; private $total_venta; private $subtotal_venta; private $igv_venta; private $vuelto_venta; private $fecha_venta; private $id_usuario; private $id_cli; private $db; public function __construct(){ $this->db = Database::con...
JavaScript
UTF-8
877
2.96875
3
[]
no_license
//TODO: Please write code in this file. function printInventory(inputs) { var array_print = ""; var total_price =0; for (var i = 0; i < inputs.length; i++) { var print_format = '名称:' + inputs[i].name + ',数量:' + inputs[i].count + inputs[i].unit + ',单价:' + inpu...
TypeScript
UTF-8
1,259
2.515625
3
[]
no_license
import { Component, Input, EventEmitter, Output, ViewChild, } from '@angular/core'; import { DropdownMenuComponent } from 'src/app/shared-components/dropdown-menu/dropdown-menu.component'; interface Client { id: number; name: string; } @Component({ selector: 'main-client-picker', templateUrl: './cli...
Markdown
UTF-8
1,725
2.859375
3
[]
no_license
# NCKU DSAI Homework 1 - Electricity Forecasting [usage] 1. pip install -r requirements.txt (Python版本為3.6.4 安裝dependency) 2. python app.py --training "training_data.csv" --output "submission.csv" (traing_data.csv是輸入不能改 輸出檔名可改) ## Description 我選擇台電所提供自2020/01/01到2020/01/31的發電數據csv檔,使用XGBoost做迴歸,以預測2021/03/23到2021/03/...
Ruby
UTF-8
1,196
2.703125
3
[]
no_license
# -*-ruby; coding: utf-8 -*- vim:set ft=ruby: class CalcBot < Nadoka::NDK_Bot @@FUNCS = 'acos|asin|atan|atan2|acosh|asinh|atanh|cos|sin|tan|cosh|sinh|tanh|erf|erfc|exp|frexp|hypot|ldexp|log|log10|sqrt|E|PI' @@DICE = '\d*d\d+' def bot_initialize @available_channel = @bot_config[:ch] || /.*/ end def expec...
Markdown
UTF-8
621
2.625
3
[]
no_license
#Commands: GetKeyAsync **GetKeyAsync** is used to retrieve an object stored as [a configuration item](../../../configurations) in RavenFS. ## Syntax {CODE get_key_1@FileSystem\ClientApi\Commands\Configurations.cs /} | Parameters | | | | ------------- | ------------- | ----- | | **key** | string | The conf...
JavaScript
UTF-8
1,855
2.78125
3
[]
no_license
const fs = require('fs'); const puppeteer = require('puppeteer'); const snippetScraper = () => { const getSnippet = Array(document.getElementsByClassName('speechesItem')); const snippets = []; for(let i=0;i<getSnippet[0].length;i++){ snippets.push(getSnippet[0][i].innerText); }; re...
Java
UTF-8
572
2.328125
2
[ "MIT" ]
permissive
package com.example.utils; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; /** * Created by yy on 8/30/15. */ public class JsonUtils { public static ObjectMapper mapper = new ObjectMapper(); public static String con...
Markdown
UTF-8
771
2.8125
3
[ "MIT" ]
permissive
--- layout: post title: What are the Different Account's Status options? date: 2015-02-11 17:09:30.000000000 +02:00 type: post published: true status: publish categories: - Accounts tags: [] meta: /accounts-status-options/ --- There are four different account's status options: * Updated + time - The time the account...
Markdown
UTF-8
839
2.6875
3
[ "MIT" ]
permissive
# company-web-service ## Sinopsis 'Company-web-service' is a tiny RESTful web application for managing companies. ## Decription 'Company-web-service' allows create, update and delete company instances. Server side of the application is running on Zend Framework 2, while client side is on Angular.js. ## Installation...
PHP
UTF-8
2,729
2.5625
3
[ "MIT" ]
permissive
<?php /** * Imbo * * Copyright (c) 2011-2012, Christer Edvartsen <cogo@starzinger.net> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitati...
Python
UTF-8
402
3.671875
4
[]
no_license
# Task # Read an integer NN. For all non-negative integers i<Ni<N, print i2i2. See the sample for details. # Input Format # The first and only line contains the integer, NN. # Constraints # 1≤N≤201≤N≤20 # Output Format # Print NN lines, one corresponding to each ii. # Sample Input # 5 # Sample Output # 0 # 1 # 4 ...
Java
UTF-8
3,123
2.40625
2
[]
no_license
package project.controllers; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import project.DAO.UserDAO; import project.models.ErrMsg; import project.models.User; import org.springframework.http.HttpStatus; import project.utils.Response; import java.util.ArrayList; im...
Java
UTF-8
879
2.171875
2
[]
no_license
package com.raha.profile.auth.service; import com.raha.profile.auth.dtos.TokenDto; import com.raha.profile.auth.dtos.Logging; import com.raha.profile.auth.security.token.TokenHelper; import com.raha.profile.user.exception.NotFoundException; import com.raha.profile.user.repository.UserRepository; import lombok.Required...
Java
UTF-8
444
1.859375
2
[]
no_license
package junit; import java.util.ArrayList; import bean.Complaint; import bean.Feedback; import service.ComplaintManagementSystem; public class ComplaintManagementDemo { public static void main(String args[]) { ComplaintManagementSystem obj2=new ComplaintManagementSystem(); ArrayList<Feedback> feed=...
Python
UTF-8
699
3.75
4
[]
no_license
hor=int(input("Ingrese el número de horas trabajadas: ")) tar=int(input("Ingrese la tarifa: ")) if hor<=35: su1=hor*tar nom=str(input("Ingrese el nombre: ")) if su1<=2000: su1=2000 elif su1>2000 and su1<2221: su1=su1*20/100 elif su1>2220: su1=su1*30/100 ...
Java
UTF-8
2,687
2.34375
2
[ "Apache-2.0" ]
permissive
package no.nels.client; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.netty.handler.codec.http.HttpResponseStatus; import io.vertx.core.json.JsonArray; import no.nels.client.model.StatsInfo; import no.nels.client.model.StatsRequest; import no.n...
Java
UTF-8
908
1.898438
2
[ "MIT" ]
permissive
/* * Copyright (c) 2017-2021 Anton Bulakh <self@necauqua.dev> * Licensed under MIT, see the LICENSE file for details. */ package dev.necauqua.mods.cm.mixin.entity.player; import dev.necauqua.mods.cm.mixin.entity.EntityMixin; import net.minecraft.entity.player.EntityPlayerMP; import org.spongepowered.asm.mixin.Mixi...
C++
UTF-8
337
2.890625
3
[]
no_license
#ifndef DATEIMPL_H #define DATEIMPL_H #include <iostream> #include <iomanip> #include <string> class DateImpl { public: DateImpl( int day, int month ) { d = day; m = month; } virtual void tell() = 0; int getDay() const { return d;} int getMonth() const { return m;} protected: int d, m...
C++
UTF-8
1,257
2.890625
3
[]
no_license
//tag: stack //找到01矩阵中最大全1矩形的面积 51nod1158 //O(N)找到第一个比a[i]小的/大的数 #include<cstdio> #include<algorithm> using namespace std; const int MAXN=507; int up[MAXN]; int M,N;//N行M列 int solve(){ int stk[MAXN],top=0; int right[MAXN],left[MAXN]; up[M+1]=-1,up[0]=-1;//方便最后所有元素出栈 for(int i=1;i<=M+1;++i){ ...
C++
UTF-8
13,724
2.9375
3
[]
no_license
#include "MazeApp.hpp" #define PRINTBMP // dont define if you want sample outputs of maze graphics #define GIFBMP // dont define if you want sample outputs for gif of maze graphics using namespace MazeApp; MazeBuilder::MazeBuilder(uint32_t dim = 10) : maze(dim, vector<vector<uint32_t>>(dim)) {} void MazeBui...
JavaScript
UTF-8
1,234
3.421875
3
[]
no_license
var p1b=document.querySelector("#p1"); var p2b=document.getElementById("p2"); var resetbut=document.getElementById("reset"); var p1disp=document.querySelector("#p1disp"); var p2disp=document.querySelector("#p2disp"); var numInput=document.querySelector("input"); var winningScoreDisplay=document.querySelector("p s...
JavaScript
UTF-8
1,819
2.984375
3
[]
no_license
var io = require('socket.io-client'); var socket = io(window.location.origin); document.onkeypress = function(e) { console.log(e.charCode) if (e.charCode === 32) { socket.emit('panic') } if (e.charCode === 49) { socket.emit('preset1') } if (e.charCode === 50) { socket.emit('preset2') } if (...
Markdown
UTF-8
2,847
2.765625
3
[]
no_license
--- layout: post title: Appearance | WindowsForms | Syncfusion description: This section deals with explain about the appearance in MultiColumnComboBox control on Windows Forms platform platform: WindowsForms control: Editors Package documentation: ug --- # Appearance in Windows Forms MultiColumnComboBox Visual style...
Java
UTF-8
1,043
2.96875
3
[]
no_license
package view; import javax.swing.*; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; public class ChoiceMenu extends JMenu { String[] labels; JRadioButtonMenuItem[] items; ButtonGroup group; public ChoiceMenu(String title, String[] labels) { super(titl...
Markdown
UTF-8
1,753
2.875
3
[]
no_license
### Hi there 👋 I'm Chris, an American web developer based in Paris. I'm the front end developer at [Bergamotte](https://www.bergamotte.com) and I spend most of my time working with Javascript, scss, and Ruby. I am currently learning Python, React, and taking the latest version of Harvard's CS-50 outside of my day j...
Markdown
UTF-8
2,378
3.546875
4
[ "MIT" ]
permissive
# Weekend Challenge ## Build a Portfolio Website Layout Using Flexbox ## Introduction In this challenge you will be building a simple portfolio website based on a given wireframe using the CSS principles covered today. Portfolio websites are a great way to show off your work to friends, family, and future employers...
Java
UTF-8
1,326
3.15625
3
[]
no_license
package zy.leetcode.stack.solution1111; import org.junit.Assert; import org.junit.Test; import java.util.ArrayDeque; import java.util.Arrays; import java.util.Deque; public class Solution { public int[] maxDepthAfterSplit(String seq) { int[] ans = new int[seq.length()]; Arrays.fill(ans, 1); ...
Java
UTF-8
149
2.546875
3
[]
no_license
package prWeek3.ex3; public class NumberCorrector { public Integer correct(Double weight){ return Math.abs(weight.intValue()); } }
Java
UTF-8
577
2.4375
2
[]
no_license
package utility; import java.io.IOException; public class CompilerProxy { private Compiler compiler = new Compiler(); private static CompilerProxy instance = new CompilerProxy(); private CompilerProxy() { } public static CompilerProxy getInstance() { return instance; } public void setup(String codingan,...
Markdown
UTF-8
499
3.109375
3
[ "MIT" ]
permissive
<h2>Self explanation</h2><p>It's time to explain the <code>self</code> parameter used in previous tasks. The <code>self</code> parameter is a Python convention. <code>self</code> is the first parameter passed to any class method. Python will use the <code>self</code> parameter to refer to the object being created.</p><...
Rust
UTF-8
5,789
2.90625
3
[]
no_license
#![crate_name = "router_os"] #![crate_type = "lib"] extern crate crypto; use crypto::md5::Md5; use crypto::digest::Digest; use std::collections::BTreeMap; use std::io::prelude::*; use std::net::TcpStream; fn hex_binascii<'a>(hexstr: String) -> Result<Vec<u8>, &'a str> { if hexstr.len() % 2 != 0 { Err("Odd number...
Markdown
UTF-8
4,952
2.875
3
[]
no_license
--- layout: post title: "Decorator (2)" description: "" category: notes tags: [decorator] --- {% include JB/setup %} # Administrivia * Exam 1: tomorrow night! <3 # Decorator (175) ## Participants (alternative to what apperas in the GoF) Idea: Transparency. Clients should not know whether or not they're using a dec...
JavaScript
UTF-8
1,281
2.53125
3
[]
no_license
import _ from "lodash"; const create = () => { return { spots: 0, wager: 0, gamesToPlay: 0, special: false, numbers: "", numbersArray: [], startHour: -1, cost: 0, winnings: 0, profit: 0, gameIds: [], playId: null }; }; const print = gameSlip => { console.table([ ...
C++
UTF-8
866
3.15625
3
[]
no_license
///////////////////////////////////// /*Input:-- *Output:counter is 0 counter is 0 counter is 0 number is 100 number is 200 number is 300 counter is 3 counter is 3 counter is 3 *Description:Implementation of static data member *Date:19-June-20...
Markdown
UTF-8
943
2.59375
3
[]
no_license
# gcs_to_gee This script is designed to read a local csv file containing uri links from a GCS bucket, then generate multi-tile manifest and upload it into Google Earth Engine as a single asset in an image collection. Learn more about manifest uploads here. https://developers.google.com/earth-engine/image_manifest#using...