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
C
UTF-8
999
4.34375
4
[]
no_license
//Reference https://www.geeksforgeeks.org/quick-sort/ #include <stdio.h> void swap(int *a, int *b) { //swapping using pointers //t = temporal variable to store int a int t = *a; *a = *b; *b = t; } int partition(int *arr, int low, int high) { int pivot_elem = arr[high]; int min_elem = (low - 1); fo...
Markdown
UTF-8
1,939
3.265625
3
[]
no_license
# Simple Container project Python sucks ! Well the language is OK but the damn environment mess is a disaster. Try to use multiple projects on your machine lands you in hell. The solution - containerize your projects. The docker lab example is fine but there's a few bugs - so this is the simple guide with fixes and ...
Python
UTF-8
491
3.671875
4
[]
no_license
""" 문제 첫째 줄에는 별 1개, 둘째 줄에는 별 3개, ..., N번째 줄에는 별 2*N-1개를 찍는 문제 별은 가운데를 기준으로 대칭이어야 한다. 입력 첫째 줄에 N (1<=N<=100)이 주어진다. 출력 첫째 줄부터 N번째 줄 까지 차례대로 별을 출력한다. 예제 입력 1 5 예제 출력 1 * *** ***** ******* ********* """ N=int(input()) a=1 for i in range(0, N): print(" "*(N-1), end="") print("*"*a) N-=1 a+=2
Java
UTF-8
1,615
3.546875
4
[]
no_license
package com.youmu.maven.Algorithm.leetcode; public class S1190 { public String reverseParentheses(String s) { char[] stack = new char[s.length()]; int top = 0; for (int x = 0; x < s.length(); x++) { char c = s.charAt(x); if (c != ')') { stack[top++] =...
C#
UTF-8
3,192
2.59375
3
[]
no_license
using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using nucleocs.DTO; using nucleocs.Models; namespace nucleocs.MVDTO{ public class MVProduct{ public int ProductId { get; set; } pu...
Java
UTF-8
6,556
2.75
3
[]
no_license
package salesforce.core.selenium; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.Select; import org.openqa.selenium...
Java
UTF-8
5,153
2.296875
2
[]
no_license
package com.xdx97.bean; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; /** * msg_info * @author */ public class MsgInfo implements Serializable { /** * 消息id */ private String id...
TypeScript
UTF-8
867
2.6875
3
[ "MIT" ]
permissive
import FS from 'fs-extra'; import path from 'path'; import { getTrendingData, ITrendingData } from './utils/index.js'; async function saveTrendingData(data: ITrendingData[], type: string = 'daily') { await FS.outputFile(path.join(process.cwd(), 'dist', `trending-${type}.json`), JSON.stringify(data, null, 2)); } ;(...
Markdown
UTF-8
7,097
2.59375
3
[]
no_license
--- published: true layout: default-theme-wet-boew-fr title: Envelopper et tronquer le texte hide_breadcrumb: false date_modified: 2019-04-11 --- {::nomarkdown} {% raw %} <span class="wb-prettify all-pre"></span> <div class="row"> <nav role="navigation" class="col-md-8"> <div class="panel panel-default"> ...
Java
UTF-8
846
1.820313
2
[]
no_license
package test; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; import test.testsaplicacion.AplicacionTest; import test.testsarticulos.MenudenciaTest; import test.testsarticulos.VoluminosoTest; import test.testspersona.ClienteTest; import test.test...
Java
UTF-8
3,254
1.945313
2
[]
no_license
package com.example.vaibhav.udhaar; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; imp...
SQL
UTF-8
58,122
3.3125
3
[]
no_license
# создаем таблицы CREATE TABLE Out_categories ( outcome_id integer NOT NULL PRIMARY KEY, outcome_count varchar(50) NOT NULL ); CREATE TABLE Inc_categories ( income_id integer NOT NULL PRIMARY KEY, income_count varchar(50) NOT NULL ); CREATE TABLE Outcome ( outcome_num varc...
SQL
UTF-8
902
3.09375
3
[]
no_license
--- File: faculty.sql --- Date: 2019/01/27 --- Name: Ian Carlos --- Description: This SQL file will be used to store and retrieve data for the Faculty.java class. DROP TABLE IF EXISTS faculty CASCADE; CREATE TABLE faculty( id BIGINT PRIMARY KEY REFERENCES users(id), schoolCode CHAR(5) NOT NULL, schoolDesc VARCHAR(...
Java
UTF-8
519
2.515625
3
[]
no_license
package cimi.com.easeinterpolator; import android.content.Context; import android.util.AttributeSet; import android.view.animation.Interpolator; /** * Created by cimi on 15/7/3. */ public class EaseSineInOutInterpolator implements Interpolator { public EaseSineInOutInterpolator() { } public EaseSineI...
Python
UTF-8
269
4.5625
5
[]
no_license
#Program to print Odd and Even numbers in range(0,100) in Python def check_odd_even(): for num in range(0,100): if num % 2 == 0: print(f"Even Numbers are : {num}") else: print(f"Odd Numbers are : {num}")
Java
UTF-8
254
1.820313
2
[]
no_license
package com.APISpring.service; import java.util.List; import com.APISpring.entities.CTHoaDon; import com.APISpring.entities.HoaDon; public interface ICTHoaDonService { public CTHoaDon save(CTHoaDon cthd); public List<CTHoaDon> findAll(HoaDon hd); }
Python
UTF-8
844
4.1875
4
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Feb 26 18:41:40 2019 @author: student-03 """ #List 串列 #可以存多型別資料(陣列僅能存單型別資料) #可以變換元素 income=[] while True: salary=input("輸入數字") if salary!='q': income.append(salary) else: break print(type(income)) #確認型別 print(type(i...
Java
UTF-8
1,526
2.109375
2
[]
no_license
package com.home.entities; import java.util.Date; public class ReportInvoiceDaily { public int no; public String staff_name; public String customer1_codes; public String customer1_names; public Date date1_receipt_of_product; public Date date2_company_receipt_of_invoice; public Date getDate2_company_receipt_of_...
Java
UTF-8
1,093
3.65625
4
[]
no_license
package leetcode101_200; public class L116_PopulatingNextRightPointersInEachNode_medium { // https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node/ // 不要提交这个类 public static class Node { public int val; public Node left; public Node right; public Node n...
PHP
UTF-8
2,857
2.703125
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\models; use Yii; /** * This is the model class for table "employee". * * @property integer $id * @property integer $branch_id * @property string $name * @property string $surname * @property string $password * @property string $create_time * @property string $update_time * * @property ...
C
UTF-8
344
3.28125
3
[]
no_license
#include <stdio.h> int main(){ int a[3]; for (register int i = 0; i < 3; i++) scanf("%d", &a[i]); for (register int i = 0; i < 3; i++) for (register int j = i + 1; j < 3; j++) if (a[i] > a[j]) { int tmp = a[i]; a[i] = a[j]; a[j] = tmp; } printf("%d->%d->%d\n", a[0], a[...
Python
UTF-8
82
3.453125
3
[]
no_license
a=int(input()) b=0 c=0 while(a!=0): c=a%10 b=(b*10)+c a=int(a/10) print (b)
JavaScript
UTF-8
339
3.890625
4
[ "MIT" ]
permissive
let nums = []; do { let num = prompt("Enter Number"); if (Number.isNaN(parseInt(num))) { break; } else { nums.push(parseInt(num)); } } while(true); let c = 0; let sum = () => nums.forEach(element => { c = c + element; }); let display = function(sum) { sum(); alert...
C#
UTF-8
4,468
2.71875
3
[]
no_license
using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; namespace FreelanceHuntApi.Model { public class Review { /// <summary> /// Середнє арфиметичне оцінок для цього відгуку(замовник, фрілансер) /// </summary> public double? GradeAverage { get; private s...
Python
UTF-8
926
3.828125
4
[ "MIT" ]
permissive
class Range: '''Range of lines in file from a to b (including a and b). a, b >=0''' def __init__(self, start: int, end: int = None): self._start = start self._end = end or start assert self._start <= self._end @staticmethod def from_str(s: str) -> 'Range': if isinstance(...
Python
UTF-8
2,577
3.4375
3
[]
no_license
import pygame from tictactoe import Game SCREEN_WIDTH = 640 SCREEN_HEIGHT = 640 GRID_SIZE = 3 CELL_WIDTH = SCREEN_WIDTH / GRID_SIZE CELL_HEIGHT = SCREEN_HEIGHT / GRID_SIZE BLACK = (0, 0, 0) WHITE = (255, 255, 255) class Renderer: def __init__(self): pygame.init() pygame.display.set_caption("T...
Java
UTF-8
707
1.867188
2
[]
no_license
package us.com.plattrk.service; import us.com.plattrk.api.model.EmailAddress; import us.com.plattrk.api.model.Incident; import us.com.plattrk.api.model.IncidentReportByProduct; import java.util.Date; import java.util.List; public interface Report { public void generateDailyReport(List<Incident> incidents, Date ...
PHP
UTF-8
13,185
2.53125
3
[]
no_license
<?php namespace HomeOffice\AlfrescoApiBundle\Repository; use GuzzleHttp\Client as Guzzle; use HomeOffice\AlfrescoApiBundle\Service\DateHelper; use HomeOffice\ProcessManagerAuthenticatorBundle\Security\SessionTicketStorage; use HomeOffice\AlfrescoApiBundle\Service\AtomHelper; use HomeOffice\AlfrescoApiBundle\Service\Q...
Java
UTF-8
4,737
3.1875
3
[]
no_license
package dp_6; import lombok.Getter; import lombok.Setter; import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import static java.awt.BorderLayout.*; import static javax.swing.JFrame.*; import static javax.swing.JOptionPane.*; class Solitaer { @Getter...
JavaScript
UTF-8
4,268
2.59375
3
[ "MIT" ]
permissive
// TCPTransport.js "use strict"; var util = require("util"); var Slip = require("node-slip"); var events = require("events"); var net = require('net'); var log = require('./Logger'); // CRC algorithm based on Xmodem AVR code var calcCrc = function(data) { var crc = 0; var size = data.length; var i; var index ...
C#
UTF-8
14,615
2.640625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp4 { public partial class Form1 : Form { public Form1() ...
TypeScript
UTF-8
165
2.609375
3
[]
no_license
export interface BaseModel { id?: string; createdAt: Date; updatedAt: Date; } export interface IndexedBaseModel extends BaseModel { index: number; }
Java
UTF-8
4,821
3.015625
3
[]
no_license
package mapdemo; import java.io.BufferedReader; import java.io.FileReader; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import...
C++
UTF-8
409
2.984375
3
[ "MIT" ]
permissive
#pragma once #include <cstring> #include <type_traits> namespace kae { template <typename Result, typename Arg> Result bit_cast(const Arg& src) noexcept { static_assert(sizeof(Arg) == sizeof(Result)); static_assert(std::is_trivially_copyable_v<Arg>); static_assert(std::is_trivial_v<Result>); Result ...
Java
UTF-8
401
1.632813
2
[ "Apache-2.0" ]
permissive
package com.filip.versu.model.view; import com.filip.versu.model.Searchable; import com.filip.versu.model.view.abs.AbsBaseFeedViewModel; public class SearchHistoryFeedViewModel extends AbsBaseFeedViewModel<Searchable> { @Override public SearchHistoryFeedViewModel removeReferencesBeforeSerialization() { ...
Markdown
UTF-8
2,487
3.671875
4
[]
no_license
### JavaScript Loops and Repetitive Tasks This folder is the dedicated walkthrough regarding JavaScript Loops and executing repetitive code in JS. Some of the topics involve different types of loops, methods for exiting the loops, skipping loops and more. Full module's objectives can be found inside the walkthrough's ...
Markdown
UTF-8
519
2.53125
3
[]
no_license
## 自己 Leetcode 刷题 的 代码 1. 分各种类别 --》每个不同的数据结构、不同的算法思想 2. 大都 记录了 自己的理解,心得 3. 后期开始,也 督促下 自己 做题 要有 时间概念,所以 记录了 几个时间点 1. 第一遍 做的时候,肯定 会很慢,套路见得少,不要 想不出来,还死扣。。。--》看答案去 2. `理解官方答案 和 自己落笔、整理完` 有一个 **鸿沟** --》 非常 费时间,但是 这步 必不可少!
Markdown
UTF-8
12,729
3.140625
3
[ "MIT" ]
permissive
# City Explorer **Author**: Eugene Monnier **Version**: 1.02.0 ## Overview The *City Explorer* project is a project to develop a backend server for a website that allows a user to request weather and event information by city. ## Getting Started ### Documentation [Node JS Docs](https://nodejs.org/en/) [NPM JS Doc...
PHP
UTF-8
308
2.984375
3
[]
no_license
<?php class Enseignant{ private $login; private $password; public function __construct($_login, $_password){ $this->login = $_login; $this->password = $_password; } public function getLogin(){ return $this->login; } public function getPassword(){ return $this->password; } }
Java
UTF-8
5,479
2.078125
2
[ "MIT" ]
permissive
package com.apoem.mmxx.eventtracking.infrastructure.dao.support; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.apoem.mmxx.eventtracking.DateUtils; import com.apoem.mmxx.eventtracking.infrastructure.common.holder.SpringContextHolder; import com.apoem.mmxx.eventtracking.infrastructure...
JavaScript
UTF-8
162
2.75
3
[]
no_license
// console.log("Notes") // module.exports.age = 25 const addNote = (title, note) => { console.log("Adding", title, note); } module.exports = { addNote }
C#
UTF-8
5,555
2.671875
3
[]
no_license
using Lab_26.Models; using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.Linq; using System.Net; using System.Web; using System.Web.Mvc; namespace Lab_26.Controllers { [Authorize] public class ItemsController : Controller { private ItemDAO dao...
JavaScript
UTF-8
2,631
2.59375
3
[ "MIT" ]
permissive
import React from 'react'; import Select from 'react-select'; function getStringValue(value) { return value ? value.value : ''; } function handleCallback(cb, value) { if (cb) { cb(value); } } class FormControlSelect extends React.Component { constructor(props) { super(props); this.state = { ...
Java
UTF-8
1,974
2.171875
2
[ "Apache-2.0" ]
permissive
package org.folio.support.http; import org.folio.support.ProxyRelationship; import org.folio.support.ProxyRelationships; import io.restassured.response.ValidatableResponse; import lombok.NonNull; public class ProxiesClient { private final RestAssuredCollectionApiClient<ProxyRelationship, ProxyRelationships> client...
Python
UTF-8
297
3.328125
3
[]
no_license
def spiralNumbers(n): m = [[0] * n for _ in range(n)] i, j, di, dj = 0, 0, 0, 1 for k in range(n * n): m[i][j] = k + 1 if (not -1 < i + di < n) or (not -1 < j + dj < n) or m[i + di][j + dj] != 0: di, dj = dj, -di i, j = i + di, j + dj return m
JavaScript
UTF-8
1,846
2.65625
3
[]
no_license
import React from 'react'; class Note extends React.Component { constructor(props) { super(props); this.state = { error: null, isLoaded: false, notes: [] }; } componentDidMount() { /*fetch("http://devb/projects/github/php-starter/starter/api/note")*/ fetch("http://localhost...
Java
UTF-8
2,560
2.25
2
[]
no_license
package net.ion.radon.impl.let.sample; import java.sql.SQLException; import java.util.Map; import net.ion.framework.db.IDBController; import net.ion.framework.db.Rows; import net.ion.framework.db.bean.handlers.BeanHandler; import net.ion.framework.db.procedure.IQueryable; import net.ion.framework.db.procedur...
Swift
UTF-8
1,537
3.125
3
[ "MIT" ]
permissive
// // SCNVector3 + Extension.swift // 3.ARRuler // // Created by wz on 2017/10/11. // Copyright © 2017年 cc.onezen. All rights reserved. // import UIKit import SceneKit extension SCNVector3 { /**get the camera vector*/ static func positionTransform(transform: matrix_float4x4) -> SCNVector3{ ...
C
UTF-8
780
2.796875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "Funciones.h" #include "sectores.h" void harcodeoSector(eSectores* list) { eSectores x[]= { {001,"Recursos Humanos",0}, {002,"IT",0}, {003,"Finanzas",0}, {004,"Auditoria",0}, ...
Java
UTF-8
2,166
2.234375
2
[]
no_license
package com.niit.Ques3SpringMVC.Model; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity public class Weather { @Id ...
C++
UTF-8
3,099
2.625
3
[ "Apache-2.0" ]
permissive
#include "xo/system/assert.h" #include "log.h" #include "log_sink.h" #include <stdarg.h> #include <vector> #include <iostream> #include <algorithm> namespace xo { namespace log { void std_cout_log( level l, const std::string& msg ) { std::cout << msg << std::endl; } level lowest_log_level = level::never_log_lev...
Ruby
UTF-8
247
2.734375
3
[]
no_license
# frozen_string_literal:true # User class represents a single player class User attr_reader :x_or_o def initialize(x_or_o, name = x_or_o) @name = name == '' ? x_or_o : name @x_or_o = x_or_o end def to_s @name.to_s end end
PHP
UTF-8
89
2.53125
3
[]
no_license
<?php $a["a"] = "Cat"; $a["b"] = "Dog"; print_r($a); echo "<br />"; echo $a["C言"]; ?>
Java
UTF-8
1,805
1.984375
2
[]
no_license
package ins.sino.claimcar.regist.vo; /** * Custom VO class of PO VprppheadId */ public class PrppMainVo implements java.io.Serializable { private static final long serialVersionUID = 1L; private String endorseNo; private String policyNo; private String classCode; private String riskCode; private String pri...
Java
UTF-8
883
2.359375
2
[]
no_license
/** * */ package com.example.demo.contoller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import com.example.demo.negocio.IDescuento;...
TypeScript
UTF-8
1,767
2.953125
3
[]
no_license
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { AppThunk, RootState } from '../../app/store'; type TodoType = { todoInfo: { userId: number, id: number, title: string, completed: boolean, } } const initialState: TodoType = { todoInfo: { userId: 0, ...
PHP
UTF-8
1,201
2.53125
3
[ "MIT" ]
permissive
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateResultsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('results', funct...
Java
UTF-8
599
2.09375
2
[]
no_license
package com.chen.springboot.service; import com.chen.springboot.po.User; public interface UserService { User findUserId(int id); /** * 登录 * @param username 用户名 * @param psaaword 密码 * @return */ String findUserAndPw(String username,String psaaword); /** * 删除用户 *...
JavaScript
UTF-8
7,445
2.6875
3
[ "MIT" ]
permissive
// =================================================================== // COUNT TASKS // =================================================================== function countTasks() { $('.tasks_counter').each(function() { var counter = $(this), currentLi = counter.closest('.whole_column').find('li...
Markdown
UTF-8
663
2.71875
3
[]
no_license
# 为什么会废弃 componentwillMount Fiber之后,由于任务可中断, willMount可能被执行多次(fiber算法是异步渲染,异步渲染 可能因为高优先级任务的出现被打断现有的任务导致willMount被多次执行) 首先这个函数的功能完全可以使用componentDidMount和constructor来代替,异步获取的数据的情况上面已经说明了,而如果抛去异步获取数据,其余的即是初始化而已,这些功能都可以在constructor中执行,除此之外,如果我们在willMount中订阅事件,但在服务端这并不会执行willUnMount事件,也就是说服务端会导致内存泄漏
Java
UTF-8
6,262
2.265625
2
[]
no_license
package cl.project.myapplication; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.KeyE...
PHP
UTF-8
12,674
2.671875
3
[]
no_license
<?php require_once("ShipClasses.php"); class FighterFlight extends BaseShip{ public $shipSizeClass = -1; //0:Light, 1:Medium, 2:Heavy, 3:Capital, 4:Enormous public $imagePath = "img/ships/null.png"; public $iconPath, $shipClass; public $systems = array(); public $agile = ...
Markdown
UTF-8
2,887
3.140625
3
[]
no_license
# Unofficial Cambridge Pseudocode Language Plugin for Notepad ++ ### Cambridge Pseudocode Cambridge International offers their students the opportunity to course the subject Computer Science in the following key stages: * 0478 Computer Science in Key Stage 4 (IGCSE) * 9618 Computer Science in Key Stage 5 (A Level) W...
Java
UTF-8
505
2.28125
2
[]
no_license
package com.example.mbg; import java.io.Serializable; public class SyncObject implements Serializable { private String tag; private byte[] bytes; public SyncObject(String string, byte[] serialize) { // TODO Auto-generated constructor stub this.tag=string; bytes = serialize; } public String getTag() { ...
C#
UTF-8
2,842
2.75
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media.Media3D; namespace WWCrossFeed { class WWVirtualTrackball { Point mPressPosXY; public double SphereRadius { get; set; } ...
Markdown
UTF-8
2,337
2.671875
3
[]
no_license
# CSE 110 W20 Team 35 Meeting Minutes ## Meeting Objective: Brainstorm Part 2 **Date: Thursday 1/28/2021** **Start Time: Zoom 4 pm PT** **End Time: 5 pm PT** **Attendees (Name, Role):** 1. Nidhi Giridhar 2. Sydney Wong 3. Jasmine Chen 4. Alejandro Malanche 5. Alejandro Marquez 6. Ian Rebmann 7. Zachary Chan 8...
Markdown
UTF-8
6,741
2.921875
3
[ "MIT" ]
permissive
### Installing Repertoire Faceting N.B. Repertoire Faceting requires Postgres 9.3+, Rails 3.2+, Ruby 2.0.0+, and JQuery 1.3.2+. #### Short version. You need a working Rails app, with a model, controller, and a partial to show the model 1. in Gemfile `gem 'repertoire-faceting'` 2. install native bitset extensions...
C++
UTF-8
3,605
2.90625
3
[]
no_license
#pragma once #include "stdafx.h" #include "Pz13BorodinApi.hpp" template<typename T> class Set { public: Set(); Set(int capacity); Set(const Set<T>& other); ~Set(); Set& operator=(const Set<T>& other); Set operator+(Set<T>& other); Set operator*(Set<T>& other); Set operator-(Set<T>& other); T& operator[](int...
PHP
UTF-8
4,069
2.734375
3
[ "MIT" ]
permissive
<?php class Stocks extends Application { var $token; //agent token var $site = 'http://bsx.jlparry.com/'; //server url var $team = 'B01'; //team number function __construct() { parent::__construct(); } function index() { } /*Purchases a stock from the BSX and update...
Java
UTF-8
2,808
2
2
[]
no_license
package com.tangmiyi.future.exampleorder.controller; import com.tangmiyi.future.core.annotation.ServiceLogAop; import com.tangmiyi.future.core.bean.ResultBean; import com.tangmiyi.future.exampleorder.pojo.param.TestValidParam; import com.tangmiyi.future.exampleorder.service.PropertiesService; import lombok.extern.slf4...
Markdown
UTF-8
47,933
3.078125
3
[ "BSD-3-Clause", "MIT", "LicenseRef-scancode-proprietary-license", "ISC", "Apache-2.0" ]
permissive
--- layout: docs title: Tab description: Documentazione ed esempi sull'utilizzo del componente Tab. group: componenti toc: true --- L'interfaccia a tab (o schede) di Bootstrap si basa sull'utilizzo del layout di navigazione, con l'aggiunta della classe `.nav-tabs`. Per ottenere una versione con sfondo scuro e testo ch...
Markdown
UTF-8
3,154
2.578125
3
[]
no_license
--- description: "Steps to Prepare Award-winning Pea and Ham Soup" title: "Steps to Prepare Award-winning Pea and Ham Soup" slug: 1033-steps-to-prepare-award-winning-pea-and-ham-soup date: 2021-03-28T13:47:40.190Z image: https://img-global.cpcdn.com/recipes/173924bacd685b24/680x482cq70/pea-and-ham-soup-recipe-main-phot...
Python
UTF-8
230
3.46875
3
[]
no_license
min = input('Informe minutos usando: ') if min < 200: preco = 0.20 else: if min <= 400: preco = 0.18 else: if min <= 800: preco = 0.15 else: preco = 0.08 print ('O preco dos minutos usando: R$ %.2f' %(min * preco))
Ruby
UTF-8
1,873
2.96875
3
[]
no_license
require './lib/atm.rb' describe Atm do let(:account) { instance_double('Account', pin: 1234, exp_date: '04/17', account_status: :active) } before do #add atrribute of balance and set it to 100 allow(account).to receive(:balance).and_return(100) #allow account to receive new balance using setter method ...
SQL
UTF-8
922
2.75
3
[ "MIT" ]
permissive
-- View: public."V_Activity_Linestring" -- DROP VIEW public."V_Activity_Linestring"; CREATE OR REPLACE VIEW public."V_Activity_Linestring_Public" AS SELECT "Activity".act_type, "Activity".act_dist, "Activity"."act_totalElevGain", "Activity".act_avg_speed, "Activity".act_elapsed_time, "Act...
C
UTF-8
335
3.5
4
[]
no_license
#include <stdio.h> int main() { int n = 20, i, j, k; for (i = 1; i <= n; i++) { //print space for (j = 1; j < i; j++) { printf(" "); } //printf * for (k = 0; k <= n - i; k++) { printf("*"); } printf("\n"); } ...
C++
UTF-8
394
3.5625
4
[]
no_license
#include "pch.h" #include <iostream> #include <string> namespace { using std::cout; using std::string; } int length(char s[]); int main() { char arr[] = "computer"; int wordLen = length(arr); cout << wordLen; } int length(char s[]) { char *ptr = s; // Point to first element int count = 0; while (*ptr != ...
C++
UTF-8
1,501
3.34375
3
[]
no_license
#include <iostream> #include <memory.h> #pragma warning(disable:4996) using namespace std; char tree[31]; int t_cnt; class Trie { private: Trie* ascii[128]; int cnt; public: Trie() :cnt(0) { memset(ascii, 0, sizeof(ascii)); } void insert(const char* key) { if (*key == '\0') { // 문자열 끝 cnt++; // 해당 나무 개수 카...
Java
UTF-8
3,212
2.25
2
[]
no_license
package com.example.krishna.badgecountapp.test; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.provider.MediaStore; import android.util.Log...
Python
UTF-8
672
4.4375
4
[]
no_license
# Дана строка текста. # Напишите программу для подсчета стоимости строки, исходя из того, # что один любой символ (в том числе пробел) стоит 6060 копеек. Ответ дайте в рублях и копейках. # Sample Input 1: # # Привет, как дела?! # Sample Output 1: # # 10 р. 80 коп. def line_cost(string): characters = len(string) ...
C++
UTF-8
969
2.625
3
[]
no_license
/* Platform :- Codeforces Contest :- Codeforces Round 702 Div 3 Problem :- E - Accidental Victory */ #include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; long int A[n]; vector<long int>B; for(int i=0;i<n;...
Java
UTF-8
2,663
3.390625
3
[]
no_license
public class Bl { private static int DEFAULT_SIZE = 1 << 28; public static final int ELEM_NUM = 50 * 10000; // 欲容纳的元素个数 public static final double PERCENTAGE = 0.001; // 希望的误差率 byte[] LowBitSet; byte[] HighBitSet; private static final boolean HIGH = false; private static final boolean LOW = true; ...
Rust
UTF-8
5,232
2.828125
3
[]
no_license
use super::udp_socket; use crate::ethernet; use crate::ipv4::*; use crate::net_util; #[derive(Clone, Debug)] pub struct UDP { header: UdpHeader, pub payload: Vec<u8>, } #[derive(Copy, Clone, Debug)] pub struct UdpHeader { src_port: u16, dst_port: u16, length: u16, chksm: u16, } pub const UDP_...
C#
UTF-8
1,614
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Chat_Server { public partial class Register : Form { public Regi...
Java
UTF-8
2,971
2.671875
3
[]
no_license
package icms_controller; import icms_ejb.*; import java.util.List; import javax.ejb.Stateful; import javax.persistence.*; @Stateful public class GestionnaireUsersBean implements GestionnaireUsersLocal { @PersistenceContext private EntityManager em; public void creerAdmin() { em.persist(new User(...
Shell
UTF-8
1,979
3.109375
3
[]
no_license
#!/bin/bash ##Created by @CrazyHer echo '继续进行安装...' &&\ cd ~ &&\ apt update && apt install wget curl dialog clang gcc g++ net-tools python -y &&\ curl -sL https://deb.nodesource.com/setup_12.x | bash - &&\ apt-get install -y nodejs &&\ npm install -g yarn &&\ curl -fOL https://github.com/cdr/code-server/releases/downlo...
SQL
UTF-8
1,173
3.40625
3
[ "MIT" ]
permissive
-- For Section 3.1 -- this is to create an Athena table for Zipcode to City mapping -- drop table quicksightdemo.usa_zipcode_list; create external table quicksightdemo.usa_zipcode_list ( RecordNumber INT, Zipcode STRING, City STRING, State STRING, Lat STRING, Long STRING, Locationtext STRING,...
Java
UTF-8
10,838
2.84375
3
[]
no_license
package com.android.util.file; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.nio.channels.FileChannel; import android.annotation.SuppressLint; import android.content.Contex...
C++
UTF-8
831
3.109375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> int * newarray(int n) { int size = sizeof(int) * (n + 1); int *p = (int *)malloc(size); return (int *)memset(p, 0, size); } int max(int v1, int v2) { if (v1 > v2) { return v1; } else { return v2; } } int main(void) { ...
Markdown
UTF-8
1,210
2.640625
3
[]
no_license
--- id: error-errors title: Error Codes sidebar_label: Error Codes --- <div id="docBody"> <p>When issues arise, Diffbot APIs return the following fields in a JSON response:</p> <table class="controls table table-bordered" border="0" cellpadding="5"> <thead><tr> <th>Field</th> <th>Response</th> </tr></thead> <tbody>...
Java
UTF-8
839
2.859375
3
[]
no_license
package com.sise.pet.utils; public enum CaptchaType { UPDATE_PASSWORD(1,"captcha:updatePassword:"), REGISTER(2,"captcha:register:"); Integer code; String value; CaptchaType(Integer code, String value) { this.code = code; this.value = value; } public static String getValue...
TypeScript
UTF-8
902
2.5625
3
[]
no_license
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext' import File from 'App/Models/File' import Application from '@ioc:Adonis/Core/Application' export default class FilesController { public async store({ request }: HttpContextContract) { if (!request.file('file')) return const upload = request....
Python
UTF-8
189
3.390625
3
[]
no_license
file_path = input().split("\\") tokens = file_path[-1].split(".") file_name = tokens[0] extension = tokens[1] print(f"File name: {file_name}") print(f"File extension: {extension}")
Python
UTF-8
774
3.390625
3
[]
no_license
from tkinter import * root = Tk() root.title("han GUI") listbox = Listbox(root, selectmod = "extended", height= 0) listbox.insert(0, "사과") listbox.insert(1, "딸기") listbox.insert(2, "바나나") listbox.insert(END, "수박") listbox.insert(END, "포도") listbox.pack() def btncmd(): #listbox.delete(0)#END면 맨뒤에 항목 삭제 ...
Python
UTF-8
1,677
2.703125
3
[ "MIT" ]
permissive
from flask import Flask, render_template, request from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) user = '' password = '' host = '' database = '' app.config['SQLALCHEMY_DATABASE_URI'] = f'postgresql://{user}:{password}@{host}/{database}' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.secret_k...
Swift
UTF-8
2,033
2.6875
3
[ "Apache-2.0" ]
permissive
// // CodeSystems.swift // HealthRecords // // Generated from FHIR 4.0.1-9346c8cc45 // Copyright 2022 Apple 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...
Markdown
UTF-8
743
2.796875
3
[]
no_license
``` var data = $('body').data(), // data has properties house and mouse house = data.house, mouse = data.mouse ``` Một ví dụ khác của phép gán destructuring (từ Node.js): ``` var jsonMiddleware = require('body-parser').json var body = req.body, // body has username and password username = body.username, pass...
Markdown
UTF-8
1,520
2.796875
3
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
--- date: 2009-09-29 22:11:42 slug: talking-about-data-races title: Talking about data races categories: [ "code" ] --- My countryman [Bartosz Milewski](http://bartoszmilewski.wordpress.com/) - the author of one of the best C++ introductory books - the [C++ In Action](http://www.relisoft.com/book/) posted video with v...
Java
UTF-8
5,120
2.34375
2
[]
no_license
package web.action; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionSupport; import com.opensymphony.xwork2.ModelDriven; import web.Intermediate.CartItems; import web....
Python
UTF-8
3,298
2.90625
3
[]
no_license
# -*- coding: utf-8 -*- import jieba import re import jieba.posseg as pseg from sklearn import feature_extraction from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import CountVectorizer from sklearn.cross_validation import train_test_split from sklearn import ensembl...