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
3,730
3.65625
4
[]
no_license
# TOP84.Largest Rectangle In Histogram ### 题目描述 ![avatar](img.png) ### 解题思路 - 两重循环+剪枝(自己想的方法,不过最后有个case过不去 ```cpp // TL 95/96 class Solution { public: int largestRectangleArea(vector<int>& heights) { int ans=0; for(int i=0;i<heights.size();i++){ int _min=heights[i]; ...
C++
UTF-8
2,492
2.734375
3
[]
no_license
#include "Engine.h" namespace Batman { Input::Input(HWND hwnd) { //save window handle window = hwnd; //create DirectInput object DirectInput8Create( GetModuleHandle(NULL), //get this app handle DIRECTINPUT_VERSION, IID_IDirectInput8, //unique id (void**)&di, //pointer to di o...
Java
UTF-8
1,728
3.28125
3
[]
no_license
package leetcode.dp; import java.util.ArrayList; import java.util.List; public class Triangle { public static void main(String[] args) { List<List<Integer>> list = new ArrayList<List<Integer>>(); List<Integer> list1 = new ArrayList<Integer>(); list1.add(-1); List<Integer> list2 =...
SQL
UTF-8
22,334
2.703125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10.14 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Jun 09, 2017 at 02:16 PM -- Server version: 5.6.31-77.0-log -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
Java
UTF-8
651
2.9375
3
[ "Apache-2.0" ]
permissive
package kilim.test.ex; import kilim.Pausable; public class ExFlow { void loop() throws Pausable { ExA a = null; int i; for (i = 0; i < 10; i++) { if (i < 5) { a = new ExC(); } else { a = new ExD();; } } // at...
Markdown
UTF-8
1,830
3.734375
4
[]
no_license
### 130. 被围绕的区域 难度:Middle 相关话题:`深度优先搜索`、`广度优先搜索`、`并查集` 给定一个二维的矩阵,包含 `'X'` 和 `'O'` (**字母 O** )。 找到所有被 `'X'` 围绕的区域,并将这些区域里所有的 `'O'` 用 `'X'` 填充。 **示例:** ``` X X X X X O O X X X O X X O X X ``` 运行你的函数后,矩阵变为: ``` X X X X X X X X X X X X X O X X ``` **解释:** 被围绕的区间不会存在于边界上,换句话说,任何边界上的 `'O'` 都不会被填充...
Java
UTF-8
1,506
2.234375
2
[]
no_license
package com.example.medical_record.service.impl; import com.example.medical_record.dao.RecordDao; import com.example.medical_record.dao.UserDao; import com.example.medical_record.entity.po.Record; import com.example.medical_record.entity.po.User; import com.example.medical_record.entity.vo.RecordVo; import com.example...
JavaScript
UTF-8
6,348
2.65625
3
[]
no_license
import annyang from 'annyang' export default class Speech{ constructor(scroll, notify = false){ fetch('/resources/jokes.json').then(res => res.json()) .then(jokes => this.jokes = jokes).then(jokes => localStorage.setItem('jokes', JSON.stringify(jokes))) .catch(() => this.jokes = JSON.parse(localStora...
Markdown
UTF-8
7,596
3.171875
3
[]
no_license
--- title: 如何优化数据导入 date: 2019-09-012 21:39:21 tags: MySQL --- ## 前言 我们有时会遇到批量数据导入的场景,而数据量稍微大点,会发现导入非常耗时间。这篇博客将介绍一些常用的加快数据导入的方法。 ## 一次插入多行的值 插入行所需的时间由以下因素决定(参考MySQL 5.7参考手册:[8.2.4.1优化INSERT语句](https://dev.mysql.com/doc/refman/5.7/en/insert-optimization.html)) * 连接:30% * 向服务器发送查询:20% * 解析查询:20% * 插入行:10%...
C++
UTF-8
6,518
3.09375
3
[]
no_license
/* * EdgeDetection.cpp * * Created on: Dec 15, 2014 * Author: hyzor */ #include "EdgeDetection.h" EdgeDetection::EdgeDetection() {} EdgeDetection::~EdgeDetection() {} cv::Mat EdgeDetection::ProcessImg(const cv::Mat* img, unsigned int parallelMethod, unsigned int num_threads) { if (!img->data) { std::...
C
UTF-8
404
3.109375
3
[]
no_license
#include <stdio.h> int main() { int n,i,j; printf("Enter the number of Pages: "); scanf("%d",&n); int p[n]; for(i=0;i<n;i++) { scanf("%d",&p[i]); } int m[4]={0}; int f=0,fault=0,flag=0; for(i=0;i<n;i++) { flag=0; for(j=0;j<4;j++) { if(p[i]==m[j]) { flag=1; break; } } if(!flag) ...
C++
UTF-8
3,226
2.59375
3
[]
no_license
/* KCANVAS PROJECT Common 2D graphics API abstraction with multiple back-end support (c) livingcreative, 2015 - 2017 https://github.com/livingcreative/kcanvas 05bitmaps.cpp Bitmaps example */ #include "kcanvas/canvas.h" #include "common/bmp.h" using namespace c_util; using namespa...
C++
UTF-8
1,062
2.765625
3
[]
no_license
#include "TestBlueFilter.h" /** * @brief TestBluefilter::TestApplyBluefilter * Prueba para la clase blue filter, verifica que realmente * se modifico el valor de azul en todos los pixeles */ void TestBluefilter::TestApplyBluefilter() { string path; for (int i = 1; i < 8; i++) {//se obtiene cada una de las...
C++
UTF-8
12,558
2.59375
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <cstdint> using namespace std; unsigned char songlength; int16_t maxRows = -1; bool verbose = false; uint8_t *xmdata = NULL; uint16_t notes[257][8]; uint16_t noteRows[1936][8]; ifstream XMFILE; ofstream ASMFILE; bool isPatternUsed(int patnum); bool ve...
Java
UTF-8
780
3.953125
4
[]
no_license
//创建工厂类 public class Factory{ public static Shape getShape(String shapeType){ if(shapeType == null) return null; if(shapeType.equalsIgnoreCase("")){ return new Circle(); }else if(shapeType.equalsIgnoreCase("")){ return new Rectangle(); }else if(shapeType.equalsIgnoreCase("")){ return new Square();...
JavaScript
UTF-8
672
2.515625
3
[]
no_license
export function selectDough(dough) { // selectDough is an ActionCreator, it needs to return an action, // an object with a type property. return { type: "DOUGH_SELECTED", payload: dough }; } export function selectIngredient(ingredient) { // selectIngredient is an ActionCreator, it needs to return an ...
Java
UTF-8
823
3.328125
3
[]
no_license
package main.Week8.Prerequisites.ShortestPath; import java.util.*; class GraphImpl implements Graph { private Map<Integer, Vertex> vertices; public GraphImpl() { this.vertices = new HashMap<>(); } public void addVertex(Vertex v) { this.vertices.put(v.getId(), v); } @Override...
Python
UTF-8
2,463
2.6875
3
[]
no_license
""" Model and handler for tracking latest e-mails for a fetching """ from fetching.models import Fetching from helpers.clean import clean_str from google.appengine.ext import db import random import logging, time class FetchedMessage(db.Model): """ Represents a single fetched message """ fetching = db....
Java
UTF-8
386
2.640625
3
[]
no_license
import javax.swing.JOptionPane; public class exitclass implements Runnable { Thread t1; exitclass() { JOptionPane.showMessageDialog(null, "Admin has terminated subscription"); t1=new Thread(this); t1.start(); } public void run() { try { t1.sleep(5000); System.exit(0); } ...
Java
UTF-8
748
2.65625
3
[]
no_license
package com.example.gradiuation.stopwatch; /** * Created by eagle-eye on 27/07/15. */ public class logs { private String name; private String time; private String clock; public logs(String name, String time, String clock) { super(); this.name = name; this.time = time; ...
Markdown
UTF-8
1,149
2.921875
3
[]
no_license
# KeyInPicture That script can crypt message in the picture. You can decrypt picture only if you have secret code. ## Installing: git clone https://github.com/wannaWhat/KeyInPicture.git cd KeyInPicture pip install -r requirements.txt ## How to use: ### Help menu: python keyInPicture.py --help positional a...
Markdown
UTF-8
1,334
3.703125
4
[ "MIT" ]
permissive
--- title: 'toPlainEnglish' date: '2021-08-28' type: 'javascript' draft: false summary: 'Replace all VNese letters with the corresponding English accents' --- Replace all `VNese` letters with the corresponding English accents ```js const toPlainEnglish = (str) => { str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ...
TypeScript
UTF-8
604
3.375
3
[ "MIT" ]
permissive
enum shortOrLong { "ascending" = "ascending", "descending" = "descending" } function sorter <T> (option : shortOrLong, returnAmount : number, ...arrs : T[][]) { let container = [...arrs]; if (option == shortOrLong.ascending){ container.sort((a : T[],b: T[])=>{ return a.length - b.le...
Markdown
UTF-8
1,565
2.859375
3
[]
no_license
--- layout: post title: "t-distributed stochastic nieghbor embedding" date: 2019-09-19 --- Construction site .... # When can I use it? # How does it work? Two probability distributions are fit to the sample units (e.g. sites). The first, lets call it f_{full}() describes the distribution of the sample units in a sp...
C++
UTF-8
2,460
2.703125
3
[]
no_license
#pragma once #include <memory> #include <string> #include <vector> #include "model.h" #include "shader.h" #include "camera.h" #include "render-target.h" #include "rasterizer-state.h" namespace Seed { class Renderer { public: Renderer(void) : rasterizer_state_(RS_CW) , viewport_(VP_SIMPLE) , depth_stenc...
Swift
UTF-8
495
2.65625
3
[]
no_license
// // IterationTests.swift // IterationTests // // Created by Adrian McDaniel on 12/14/16. // Copyright © 2016 dssafsfsd. All rights reserved. // //import XCTest //@testable import Iteration //class ForwardBackwardTests: XCTestCase { // func testForwardBackward() { // let list = forwardBackward(input: ...
Java
UTF-8
353
2.875
3
[]
no_license
import java.util.Scanner; class Main { public static void main (String[] args){ // Type your code here Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int sum=0; int temp=0; int i=n%10; while(n!=0) { temp=n; n=n/10; } sum=i+temp; ...
Java
UTF-8
698
2.390625
2
[]
no_license
package pages; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class SearchPage { WebDriver driver; private By SEARCHWINDOW = By.id("ss"); private By SEARCHBUTTON = By.cssSelector(".sb-searchbox__button "); public SearchPage(WebDrive...
Markdown
UTF-8
872
2.671875
3
[ "MIT" ]
permissive
--- name: Opdagelses&#173;rejsende tags: - De grønne pigespejdere - forløb - udgået age: 9-16 image: dgp-opdagelsesrejsende.jpg infolink: http://pigespejder.dk/forside/for-pigespejdere/aktivitetsmateriale/udfordringsmaerker-for-spejdere-seniorspejdere/stifinderen/opdagelsesrejsende/ buylink: http://www.55nord.dk/de-gr%...
Java
UTF-8
673
2.046875
2
[]
no_license
package com.retargeting_branding.repositories; import com.retargeting_branding.models.Advertiser; import com.retargeting_branding.models.Impression; import com.retargeting_branding.models.Website; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework....
Ruby
UTF-8
1,575
3.40625
3
[]
no_license
# -*- coding: utf-8 -*- # game # frame # score module Bowling class Game def initialize(game_str) @game_str = game_str end # == Parameters: # # game: "[[1,1],[2,3],...]" # # ex. # [[5,3],[7,2],[8,/],[X],[7,1],[9,-],[6,2],[X],[6,/],[8,-]] # score: 126 # # []: 1フレーム ...
C++
UTF-8
793
2.65625
3
[]
no_license
#include "GameScreenMenu.h" GameScreenMenu::GameScreenMenu(SDL_Renderer* renderer) : GameScreen(renderer) { SetUpScreen(); } bool GameScreenMenu::SetUpScreen() { //Load the menu texture menuBackgroundTexture = new Texture2D(mRenderer); if (!menuBackgroundTexture->LoadFromFile("Images/CopytightThis.j...
Java
UTF-8
3,215
2.03125
2
[]
no_license
package cdm.event.common.functions; import cdm.legalagreement.master.EquitySwapMasterConfirmation2018; import cdm.product.asset.InterestRatePayout; import cdm.product.asset.InterestRatePayout.InterestRatePayoutBuilder; import cdm.product.common.schedule.CalculationPeriodDates; import cdm.product.common.schedule.Paymen...
Java
UTF-8
1,234
2.453125
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 bankproject; import controllers.ClientFinder; import java.io.IOException; import java.util.logging.Logger; import javafx.appli...
Python
UTF-8
415
3.5625
4
[]
no_license
mystr = input() count = 0 max_count = -1 max_occr='' ans = list()#if we have multiple answer for i in mystr: count = mystr.count(i) if(count > max_count): max_count = count max_occr = i for i in mystr: count = mystr.count(i) if(count == max_count): ...
C++
UTF-8
724
2.640625
3
[]
no_license
#include "person.h" #include "ui_person.h" Person::Person(QWidget *parent) : QDialog(parent), ui(new Ui::Person) { ui->setupUi(this); } Person::Person(const Person &obj) { name = obj.name; //dok = obj.dok; diag = obj.diag; } Person::~Person() { delete ui; } void Person::on_Name_textEdit...
Ruby
UTF-8
1,107
2.875
3
[ "MIT" ]
permissive
#!/usr/bin/env ruby require 'optparse' require 'noaa_weather_client' def strip_coordinates!(args) coordinates = args.last(2).select { |arg| arg =~ /-?\d{1,2}\.\d{2,}/ } args.pop(2) if coordinates.size == 2 end opts = OpenStruct.new( postal_code: nil, features: [ :observations ], coordinates: strip_coordinat...
Java
UTF-8
21,702
2.1875
2
[]
no_license
/** * This file is part of the Joana IFC project. It is developed at the * Programming Paradigms Group of the Karlsruhe Institute of Technology. * * For further details on licensing please read the information at * http://joana.ipd.kit.edu or contact the authors. */ package edu.kit.joana.ifc.sdg.graph.slicer.conc...
Java
UTF-8
529
2.609375
3
[]
no_license
package com.accolite.bookingBus; import com.accolite.bookingTemplate.BookingTemplate; public class BookingBus extends BookingTemplate{ // Declaring transport name and its value private final static String transportName = "Bus"; // Get mode of transport public void getModeOfTransport() { System.out.println("M...
C++
GB18030
974
3.25
3
[]
no_license
#include <iostream> #include <string> #include "Database.h" #include "Function.h" using namespace std; int main() { //ѭڵĴͨmainChoiceʵֳ˳ݿĴ˵ѡ˳ѭbreakѡ˴µݿ⣬򱾴ѭڵڶѭڱǶ̬ѭڴģ³ʼ Database MyData("MyData"); cout << "ӭʹMyDataݿϵͳDOS1.0V!" << endl; pause(); system("cls"); while (true) { int mainChoice = 0; string preName = ...
Markdown
UTF-8
2,418
3.046875
3
[ "Apache-2.0" ]
permissive
SimplicityJS ============ Pattern matching in JavaScript A port of [Simplicity for C#](https://github.com/becdetat/Simplicity) to JavaScript. ## Installation npm install --save-dev simplicityjs **Note that the NPM package name is `simplicityjs`, not `simplicity` (which was already taken). Add a reference to `./nod...
Java
UTF-8
1,652
2.515625
3
[]
no_license
package com.servi.cloud.consumer.util.proxy.jdk; import sun.misc.ProxyGenerator; import java.io.FileOutputStream; import java.io.IOException; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; public class Test { private static void saveProxyFile() { FileOutputStream out = null; ...
C
UTF-8
12,401
2.53125
3
[ "LGPL-2.0-or-later", "GPL-1.0-or-later", "LGPL-2.0-only", "MIT", "LicenseRef-scancode-unknown-license-reference", "GPL-2.0-only" ]
permissive
/* * GraphApp - Cross-Platform Graphics Programming Library. * * File: menus.c -- creating menus, menubars, etc. * Platform: Windows Version: 2.35 Date: 1998/04/04 * * Version: 1.00 Changes: Original version by Lachlan Patrick. * Version: 2.00 Changes: New object class system. * Version: 2.15 Changes: Adde...
Shell
UTF-8
2,609
4.34375
4
[]
no_license
#! /bin/bash # bash colors COL_GREEN="\e[1;32m" COL_YELLOW="\e[1;33m" COL_RED="\e[1;31m" COL_BLUE="\e[1;34m" COL_CYAN="\e[1;36m" COL_STOP="\e[0m" # Build Phi firmware but check some stuff first echo -e $COL_CYAN echo '****************' echo '* Build Phi *' echo '****************' echo -e $COL_STOP # get hostnam...
TypeScript
UTF-8
1,740
2.515625
3
[ "MIT" ]
permissive
import chai from 'chai'; import fs from 'fs'; import waitOn from 'wait-on'; const expect = chai.expect; import { createLogger } from '../../src/logger/logger'; const waitOnOptions = { delay: 500, interval: 500, resources: ['app.log'], timeout: 3000 }; function deleteLogFile(callback: any) { fs.u...
Java
UTF-8
1,041
2.28125
2
[]
no_license
package app.servlets; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @WebServlet(n...
JavaScript
UTF-8
680
3.71875
4
[]
no_license
const colours=["green","red","rgba(133,122,200)","#f15025","yellow","blue","purple","teal","pink","orange"]; const btn=document.getElementById("btn"); const color=document.querySelector(".colour"); btn.addEventListener("click",function(){ /*to get different background colors, we are using a random n umber having...
TypeScript
UTF-8
1,192
2.609375
3
[]
no_license
import { createSlice, PayloadAction, createSelector } from '@reduxjs/toolkit'; import { RootState } from 'app/store'; import { City } from 'models'; export interface CityState { loading: boolean; cityList: Array<City>; } const initialState: CityState = { cityList: [], loading: false, }; const citySlide = crea...
Java
UTF-8
5,020
2.296875
2
[]
no_license
package com.ruider.service.impl; import com.ruider.mapper.LeaveingManageMapper; import com.ruider.model.LeaveingManage; import com.ruider.model.User; import com.ruider.service.LeaveingManageService; import com.ruider.service.UserService; import com.ruider.utils.MailUtil.EmailCreator; import com.ruider.utils.MailUtil.E...
C#
UTF-8
4,420
2.578125
3
[ "MIT" ]
permissive
//--------------------------------------------------------------------- // <copyright file="BasicUnpackStreamContext.cs" company="Microsoft Corporation"> // Copyright (c) 1999, Microsoft Corporation. All rights reserved. // </copyright> // <summary> // Part of the Deployment Tools Foundation project. // </summ...
Java
UTF-8
2,556
2.109375
2
[ "Apache-2.0" ]
permissive
package fr.univnantes.termsuite.engines.contextualizer; /******************************************************************************* * Copyright 2015-2016 - CNRS (Centre National de Recherche Scientifique) * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. ...
Markdown
UTF-8
2,813
2.734375
3
[]
no_license
# X61HMM ## 支持型号 - ThinkPad X60 (MT 1706,1707,1708,1709,2509以及2510) - ThinkPad X60s (MT 1702,1703,1704,1705,2507,2508,2533以及2534) - ThinkPad X61 (MT 7673,7674,7675,7676,7678以及7679) - ThinkPad X61s (MT 7666,7667,7668,7669,7670以及7671) ## 供电检查 为了检查该供电系统,应当进行以下操作: 1. 关闭计算机 2. 移除电池 3. 连接交流电源适配器 4. 尝试开...
Python
UTF-8
683
3.09375
3
[]
no_license
# model.py from mesa import Agent, Model from mesa.time import RandomActivation class MoneyAgent(Agent): def __init__(self, unique_id, model,p): super().__init__(unique_id, model) print(p) def step(self): self.otherAgents = self.model.schedule.agents print(self.otherAgents) ...
JavaScript
UTF-8
2,492
3.28125
3
[]
no_license
import React, { useState, useEffect } from 'react'; const TodoList = (props) => { // const [ phonesCount, setPhonesCount ] = useState(0); // const [ counter, setCounter ] = useState(0); // (1) without dependecy array: React specifies all of the variables as dependencies. // useEffect(() => { // ...
Ruby
UTF-8
685
2.875
3
[]
no_license
require 'sikulix' require './class/Faker.rb' include Sikulix def CreateCompany(arregloCom, arregloDom) end def TestMain() intContador = 0 while intContador.to_i <= 0 intContador = input("Cantidad de compañias a crear?") if intContador.to_i > 0 arreglo = GenerarCompanies(intCont...
Java
UTF-8
3,117
2.5625
3
[]
no_license
package Graphique; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingConstants; import javax.swing.border.EmptyBorder; ...
Python
UTF-8
1,304
3.203125
3
[]
no_license
import pandas as pd from itertools import compress class NullsCalc: def __init__(self, df): self.df = df self.numNulls = {} self.percentNulls = {} self._nullsDict() def _nullsDict(self): for colName in self.df.columns: col = self.df[colName].values boolMx = pd.isna(col) nulls = sum(boolMx) sel...
Java
UTF-8
737
2.203125
2
[]
no_license
package com.kucw.controller; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestContr...
Markdown
UTF-8
3,171
2.9375
3
[ "Apache-2.0" ]
permissive
# Machine Learning and Applied Data Science conference content ## NVIDIA RAPIDS: Open-Source GPU Data Science on Azure Traditional machine-learning workloads have yet to be GPU-accelerated the way deep learning and other neural net methods have. RAPIDS aims to change that, while maintaining the ease of use of the PyD...
C++
UTF-8
856
3.046875
3
[]
no_license
#pragma once #include <string> using namespace std; double const SAVINGS_INTEREST = 1.01; double const CD_INTEREST = 0.0185; //This is different because it has to be to implement it the right way. int const CD_DURATION = 120; // There was no duration given, so the bank defaults the required duration at 10 years (or ...
Python
UTF-8
1,605
2.734375
3
[ "MIT" ]
permissive
from .help import * from .internal import * from typing import List import pandas as pd hash_col = "--HASHCOL--" lagged_time_col = "--LAGGEDTIMECOL--" lagged_hash_col = "--LAGGEDHASHCOL--" def create_lag( df, target: str, time_col: str, lag: int, group_cols: List[str]=[], ) -> str: lag_fe...
C++
UTF-8
2,618
2.5625
3
[]
no_license
/*# include <sbmt/search/unary_applications.hpp> # include <sbmt/edge/null_info.hpp> # include <sbmt/grammar/grammar_in_memory.hpp> # include <sbmt/grammar/brf_file_reader.hpp> # include <fstream> # include <sstream> # include <boost/test/auto_unit_test.hpp> # include <boost/algorithm/string/trim.hpp> using namespac...
Python
UTF-8
1,645
3.5625
4
[]
no_license
cars = ['audi', 'bmw', 'subaru', 'toyota'] for car in cars: if car == 'bmw': print(car.upper()) else : print(car.title()) # Python的真假值分别为Ture与False # 函数lower() 不会修改存储在变量中的值 requested_topping = 'mushrooms' if requested_topping != 'anchovies': print("Hold the anchovies!") answer = 17 if answer != 42: print("T...
PHP
UTF-8
651
2.625
3
[]
no_license
<?php /** * Copyright (c) 2020. Martynov AV email: sandysman@mail.ru */ namespace ParsingTags\DB\Tables; class tableDescriptions extends table { protected $tableName = 'descriptions'; protected $tableColumnNameId = 'id_description'; protected $tableColumnNameName = 'description'; public function _...
JavaScript
UTF-8
2,278
2.984375
3
[]
no_license
import assert from 'assert'; import isNormalized from '../isNormalized.js'; describe('isNormalized', function() { describe('returns a boolean', function() { it('returns result type of boolean', function() { assert.strictEqual(typeof isNormalized('2d6+5'), 'boolean'); }); }); describe('te...
Markdown
UTF-8
18,334
3.4375
3
[ "MIT" ]
permissive
--- title: Get to Know Gatsby Building Blocks typora-copy-images-to: ./ disableTableOfContents: true --- In the [**previous section**](/tutorial/part-zero/), you prepared your local development environment by installing the necessary software and creating your first Gatsby site using the [**"hello world" starter**](ht...
JavaScript
UTF-8
2,483
2.859375
3
[]
no_license
const getBagIfContain = require("../days/day7").getBagIfContain const filterFor = require("../days/day7").filterFor const day7 = require("../days/day7").day7 const day7part2 = require("../days/day7").day7part2 const should = require('chai').should() describe('test suite for problem 7 of advent of code 2020', () => { ...
JavaScript
UTF-8
7,145
3.265625
3
[]
no_license
/** Store edit js re-written. */ var defaultCloseTime = "1700"; /** Returns the hours in the example format. { hours-1-day_1: "0600,1730", ... } The above example states that Sunday has an opening time of 6 am and closing time of 5.30 pm. If the 24/7 checkbox is ...
JavaScript
UTF-8
7,739
2.921875
3
[]
no_license
DeviceFinder = (function() { /** * Finds available devices * * @param filter optional parameter used for filtering out unwanted devices, if no filter is used then all devices will be returned * @return array of devices that matches the filter used */ function find(filter) { ...
JavaScript
UTF-8
594
3.03125
3
[ "Apache-2.0" ]
permissive
class Link { /** * Create a level link * @param {int} sourceX * @param {int} sourceY * @param {int} width * @param {int} height * @param {float} targetX * @param {float} targetY * @param {string} targetName */ constructor(sourceX, sourceY, width, height, targetX, targetY, targetName) { if (argume...
Python
UTF-8
148
2.90625
3
[]
no_license
# Create a light at (10, 10, 10) shining at (0, 0, 1). # import pyvista as pv light = pv.Light(position=(10, 10, 10)) light.focal_point = (0, 0, 1)
Python
UTF-8
2,730
2.703125
3
[]
no_license
import sys import math Matrix = [ [[],[],[]], [[],[],[]], [[],[],[]] ] Matrix_transposed=[] Winning_move = False for i in range(3): line = input() for j in range(len(line)): Matrix[i][j]=line[j] Dots_quantity=0 Rows_O = [] Rows_X = [] Col_O = [] Col_X = [] Dia_1_9 = [] Dia_3_7 = [] for i in range (len...
Shell
UTF-8
165
3.1875
3
[ "MIT" ]
permissive
#!/usr/bin/env bash set -eu echo -n '' > ./index.md while read -r i; do b=$(basename "$i") echo "- [$b]($i)" >> ./index.md done <<< "$(find . -type f | sort)"
C++
UTF-8
1,360
3.46875
3
[]
no_license
#include <iostream> #include <array> using namespace std; int main() { array <int ,7>alphabet={1,2,3,4,5,6,7}; cout<<"The sixth number of alphabet is :"<<alphabet[6]<<endl; array<float,5>grades={10.3,25.6,22.3,77.8,99.2}; float y; cout<<"Please input grade :"; cin>>y; grades[4]=y; for(f...
C#
WINDOWS-1252
3,015
2.53125
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////// // Copyright 2002-2007 by Manfred Lange, Markus Renschler, Jake Anderson, // and Piers Lawson. All rights reserved. // // This software is provided 'as-is', without any express or implied warranty. // In no eve...
Java
UTF-8
2,614
2.390625
2
[]
no_license
package de.uzl.hsr.oaltl; import de.uzl.hsr.oaltl.grammar.LTLLexer; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; public class PrintTest { @Test public void testNextOperator() { Pr...
Java
UTF-8
657
2.421875
2
[]
no_license
package com.example.tourtracker.models; public class ExpenseModel { public String expId; public String tourId; public String title; public double amount; public long timeStamp; public ExpenseModel() { } public ExpenseModel(String expId, String title, double amount) { this.exp...
PHP
UTF-8
279
2.53125
3
[]
no_license
<?php namespace MerchantOfComplexity\Authters\Support\Exception; class AuthorizationDenied extends AuthorizationException { public static function reason(string $message = null): AuthorizationDenied { return new self($message ?? 'Authorization denied'); } }
Java
UTF-8
1,169
1.914063
2
[]
no_license
package com.zx.emanage.inve.persist; import java.util.Map; import com.zx.emanage.util.gen.entity.WmsInveExtendInfo; import com.zx.sframe.util.mybatis.BaseDao; import com.zx.sframe.util.mybatis.MyBatisRepository; @MyBatisRepository public interface WmsInveExtendInfoDao extends BaseDao<WmsInveExtendInfo> { /** ...
JavaScript
UTF-8
4,056
2.609375
3
[]
no_license
import * as fetchhJsonp from 'fetch-jsonp'; function getJson(url, params, setting) { let me = this; if (setting.syncId && BaseHttpRequest.requestSet.has(setting.syncId)) { console.log('重复提交') return; } let host = getGwHost(); if (url.indexOf('\/\/') == -1 && (url.indexOf('api/menu...
PHP
UTF-8
1,860
2.609375
3
[]
no_license
<?php namespace App\FamilyMembers; use App\FamilyMembers\Members\Parents as Parents; use App\FamilyMembers\Members\Animal as Animal; use App\FamilyMembers\Members\Child as Child; use App\FamilyMembers\Guardian\NeedsMum as NeedsMum; use App\FamilyMembers\Guardian\NeedsParents as NeedsParents; use App\FamilyMembers\Gua...
C#
UTF-8
1,103
2.671875
3
[]
no_license
using UnityEngine; using System.Collections; using System.Collections.Generic; public class ObjectiveHandler : MonoBehaviour { private List<GameObject> objectives; private List<GameObject> prevObjectives; private GameObject arrow; private ArrowBehaviour ab; private bool showArrow; void Start () { showArrow...
Java
UTF-8
833
2.390625
2
[]
no_license
import com.sweethome.jimmy.mynews.Models.Article; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; public class ArticleTest { //Test Article @Test public void articleGetTest() { Article article = new Article(); article.setStat...
C++
UTF-8
18,368
2.796875
3
[]
no_license
#include"Apstract.h" Abs_Node tree; int label = 0; int temp = 0; Code* C; void code_gen(Abs_Node& n); string getOpCode(OpCode op); string newlabel() { return "L" + to_string(++label); } string newtemp() { return "T" + to_string(++temp); } string place(Abs_Node node) { if (node.code == NULL) return node.name; e...
Java
UTF-8
2,523
2.125
2
[]
no_license
package com.example.visit.planning; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import androidx.fragment.app.Fragment; import com.example.visit.MainActivity; import com.example.vis...
Java
UTF-8
3,354
1.875
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2022 Red Hat * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
C++
UTF-8
231
2.546875
3
[]
no_license
#include "OrderPTest.h" Order::Order() { string orderName; } Order::Order(string n) { this->orderName = n; } Order::~Order() { orderName.clear(); } string Order::getResult() { return orderName; }
Python
UTF-8
565
3.109375
3
[]
no_license
import numpy as np data = np.loadtxt("/Users/Masaru/Desktop/data.txt",skiprows = 1) N = 24 x = data[:,0] y = data[:,1] sum_x = np.sum(x for x in data[:,0]) sum_y = np.sum(y for y in data[:,1]) sum_xy = np.sum(x * y) sum_x2 = np.sum(x**2 for x in data[:,0]) a = (N * sum_xy - sum_x * sum_y) / (N * sum_x2 - sum_x ** 2)...
C++
UTF-8
389
3.078125
3
[]
no_license
// n-dimension vectors // Vec<2, int> v(n, m) = arr[n][m] // Vec<2, int> v(n, m, -1) default init -1 template<int D, typename T> struct Vec : public vector<Vec<D-1, T>> { template<typename... Args> Vec(int n=0, Args... args) : vector<Vec<D-1, T>>(n, Vec<D-1, T>(args...)) {} }; template<typename T> struct Vec<1, T> : ...
C++
UTF-8
3,494
2.640625
3
[]
no_license
#include "addconnectiondialog.h" #include "ui_addconnectiondialog.h" AddConnectionDialog::AddConnectionDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AddConnectionDialog) { ui->setupUi(this); // Initialize Id P_id = 0; M_id = 0; personValid = false; machineValid = false; // ...
Java
UTF-8
67
1.75
2
[]
no_license
package model; public enum ShipSize { SMALL,MEDIUM,LARGE; }
Java
UTF-8
3,302
1.703125
2
[]
no_license
package module.cr.entity; import utility.CoreEntity; /** * * @author user */ public class EntityCrSubmoduleList extends CoreEntity { public static String ID = "ID"; public static String STATUS = "STATUS"; public static String INSERT_DATE = "INSERT"; public static String MODIFICATION_D...
Java
UTF-8
1,570
1.96875
2
[]
no_license
package com.huigou.uasp.bpm.engine.domain.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import com.huigou.data.domain.model.AbstractEntity; /** * 环节处理人手写意见 * * @author gongmm */ @Entity @Table(name = "WF_ProcUnitHandlerManuscript") public class ProcUnit...
C++
UTF-8
1,266
2.515625
3
[]
no_license
#pragma once #include "IDbPort.hpp" #include "sqlite_orm.h" namespace ue { inline auto create_storage(const std::string& path) { using namespace sqlite_orm; return make_storage(path, make_table("messages", make_column("message_id", &me...
Markdown
UTF-8
713
2.546875
3
[]
no_license
--- layout: post title: One must doubt tags: politics --- > William James used to preach the “will to believe.” For my part, I should wish to preach the “will to doubt.” None of our beliefs are quite true; all have at least a penumbra of vagueness and error. The methods of increasing the degree of truth in our beliefs...
JavaScript
UTF-8
912
2.71875
3
[]
no_license
const express = require("express"); const cors = require("cors"); const morgan = require("morgan"); require("dotenv").config(); const app = express(); const data = require("./data.json"); // middlewares app.use(express.json()); app.use(cors()); app.use(morgan("dev")); app.post("/api/message", (req, res) => { const...
C++
UTF-8
2,291
2.578125
3
[]
no_license
/* * main.cpp * * Created on: Apr 19, 2014 * Author: manoj */ #include <iostream> #include <string.h> #include <stdlib.h> #include <stdlib.h> #include <sstream> #include <string> #include <fstream> #include <vector> #include <string> #include <algorithm> #include "common.h" #include "server.h" using namespa...
Java
UTF-8
888
2.109375
2
[]
no_license
package com.niit.digi.dazzle.test; import java.util.Date; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.niit.digi.dazzle.dao.EventDao; import com.niit.digi.dazzle.model.Event; public class EventTest { public static void main(String[] args) { ...
Python
UTF-8
919
3.265625
3
[]
no_license
# Leetcode - https://leetcode.com/problems/merge-k-sorted-lists/ import heapq # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def mergeKLists(self, lists: List[ListNode]) -> ListNode: p...
Python
UTF-8
13,831
3.03125
3
[]
no_license
from jackGrammarVisitor import jackGrammarVisitor from symbol_table import SymbolTable from code_writer import CodeWriter class jackVisitor(jackGrammarVisitor): """Clase que hereda del visitor para ir escribiendo en lenguaje de maquina virtual""" def __init__(self): """Inciializa una tabald e simbolo...