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
Python
UTF-8
8,430
2.859375
3
[]
no_license
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ # project: Insight-Churn # date: 25/01/2017 # author: Deniz Ustebay # description: Run Logistic Regression Classifier with CV get accuracy """ from sqlalchemy import create_engine from sqlalchemy_utils import database_exists, create_database import psyc...
C++
UTF-8
1,809
2.9375
3
[]
no_license
#include "cosFunc.h" #include "../util.h" CosFunc::CosFunc() { h = 0.8; s = 20.0; k = 0.0; y = 0.8; } Float CosFunc::evalFunction(Float x, Float a, Float b) const { return h * Util::COS(s * x + k) + y; } Float CosFunc::calculateIntegral(Float a, Float b) const { Float bcomp = (h / s) * Util::...
Java
UTF-8
238
2.046875
2
[]
no_license
package fr.maazouza.averroes.middleware.objetmetier.token; public class TokenExpireException extends Exception{ private static final long serialVersionUID = 1L; public TokenExpireException(String message) { super(message); } }
JavaScript
UTF-8
391
2.546875
3
[]
no_license
var assert = require("assert"); var Dinosaur = require("../dinosaur.js"); describe("Dinosaur", function(){ beforeEach(function() { this.dinosaur = new Dinosaur("T-rex", 1); }); it("should have type", function(){ assert.equal("T-rex", this.dinosaur.type); }); it("should have offspring per year", fu...
Java
UTF-8
517
3.65625
4
[]
no_license
package numberBasedQuestions; public class findTheNumberPrimeOrNot { public void primeornot(int n) { boolean isPrime = true; for(int i=2; i<n; i++) { if(n%i == 0) { isPrime = false; break; } } if(isPrime) { System.out.println(n + " is a prime numebr"); } else { System.o...
C++
UTF-8
561
2.828125
3
[]
no_license
#include <iostream> #include <algorithm> #include "Hash.h" using namespace std; int binarySearch(int searchThis[], int findThis, int size); int main() { Hash hashTable(10); hashTable.addItem("Noah", 20); hashTable.addItem("Chris", 42); hashTable.addItem("Niki", 12); hashTable.dumpText(); ...
Markdown
UTF-8
458
2.609375
3
[ "MIT" ]
permissive
## W0614 (unused-wildcard-import) ### :x: Problematic code: ```python from pkg import * print('imported') ``` ### :heavy_check_mark: Correct code: ```python from pkg import * print('imported', func) ``` ### Rationale: Used when an imported module or variable is not used from a `'from X import *'` style import. #...
Python
UTF-8
249
3.21875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Nov 12 21:32:55 2019 @author: HomeUser """ def max_num_in_list( list ): max = list[ 0 ] for a in list: if a > max: max = a return max print(max_num_in_list([4, 6, -8, 98]))
C#
UTF-8
1,288
3.359375
3
[]
no_license
using MindBoxTest_Libary.Exceptions; using MindBoxTest_Libary.Figures.AbstractClassesAndInterfaces; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MindBoxTest_Libary.Figures.Figures { public class Circle : Figure { ...
JavaScript
UTF-8
6,880
2.734375
3
[]
no_license
import React, { Component } from 'react'; import './calendar.css' import PropTypes from 'prop-types'; // import _ from 'loadsh' // 周列表 function WeekList(props){ const week =props.week const list =week.map((item)=> <div className="every_day" key={item}>{item}</div> ) return ( <div classN...
Swift
UTF-8
3,483
3.046875
3
[ "MIT" ]
permissive
// // VMenuDemoView.swift // VComponentsDemo // // Created by Vakhtang Kontridze on 2/1/21. // import SwiftUI import VComponents // MARK:- V Menu Demo View struct VMenuDemoView: View { // MARK: Properties static let navBarTitle: String = "Menu" @State private var state: VMenuState = .enabled @...
Go
UTF-8
1,528
2.75
3
[]
no_license
package app import ( "github.com/gin-gonic/gin" "net/http" ) type response struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` } func ResponseSuccess(c *gin.Context, msg string, data interface{}) { c.JSON(http.StatusOK, response{ Code: http.St...
PHP
UTF-8
703
3.5
4
[ "MIT" ]
permissive
<?php //solution: 2783915460 echo eulerProblem24() . "\n"; function eulerProblem24() { $arr = array("0","1","2","3","4","5","6","7","8","9"); $seq = permutation(1000000, $arr); return implode("", $seq); } function permutation($pos, $seq) { $n = count($seq); $factorial = 1; for($i = 2; $i < $n; +...
C
UTF-8
965
3.671875
4
[]
no_license
/* myprog1과 myprog2를 만든 후 지시에 따라 myexec.c를 작성하시오 - myexec의 사용법은 "myexec[a|b]"이다. 즉, 입력으로 a또는 b를 받는다. - 파라미터로 a를 입력하면 "myprog1 14"를 수행하되 execl()함수를 사용한다. - 파라미터로 b를 입력하면 "myprog2 12"를 수행하되 execlp()함수를 사용한다. */ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> int main...
Java
UTF-8
151
2.296875
2
[]
no_license
package cn.itcast.day11.demo02; public class MyClass { public int num =10; public void method(){ System.out.println(num); } }
Java
UTF-8
521
1.875
2
[]
no_license
package com.imooc.repository; import com.imooc.dataobject.ProductCategory; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import java.util.List; /** * @program: sell * @description * @author: Tian * @c...
PHP
UTF-8
4,427
2.78125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."/libraries/PHPExcel.php"; class Excel extends PHPExcel { public function __construct() { parent::__construct(); } function getNameFromNumber($num) { $numeric = $num % 26; $letter =...
SQL
UTF-8
2,844
3.28125
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.6.35) # Database: shiggles_db # Generation Time: 2018-02-02 02:29:00 +0000 # *******************************************...
JavaScript
UTF-8
429
2.640625
3
[]
no_license
export default function formValidate(values){ let errors = {} if(!values.firstname.trim()){ errors.firstname = '*First Name Required' } if(!values.lastname.trim()){ errors.lastname = '*Last Name Required' } if(!values.email.trim()){ errors.email = '*Email Required' ...
Java
UTF-8
3,615
2.296875
2
[]
no_license
package com.example.acodersspringapp.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.sprin...
Python
UTF-8
100
2.6875
3
[]
no_license
#!/bin/python import time curr = 0 while True: print "In something ..." time.sleep(60)
Python
ISO-8859-9
1,850
3.625
4
[]
no_license
# coding:iso-8859-9 Trke # Python 3 - Multithreaded Programming # Yeni yntemle sicim yaratma: Thread altsnf, override __init__ ve run metodlar, # sicim tip nesneleri yaratma, start ile run' koturma, icabnda join ile sicimlerin # almas tamamlanmadan alttaki kodlamaya gememenin salanmas ve # lock ile bir sicim tamam...
C++
UTF-8
3,871
2.890625
3
[]
no_license
#include <iostream> #include <string> #include <map> #include <limits> #include "global.h" #include "support.h" #pragma warning(disable:4996) extern unsigned int numMax; extern char ch; extern long long value; extern std::string ident; extern int lineNo; extern std::map<std::string, int> keywordTable; int lex() { s...
JavaScript
UTF-8
281
2.734375
3
[]
no_license
class Task{ constructor(title, desc, dueDate){ this.title = title; this.desc = desc; this.dueDate = dueDate; this.id = ++Task.count; this.completed = false; this.date = new Date(); } } Task.count = 0; module.exports = Task;
C++
UTF-8
2,547
3.296875
3
[]
no_license
#pragma once #include <string> template<typename T> struct StringCast { }; #define CAST_STRING_TO_SIMPLE_DATA_TYPE(T, STR_TO_XXX) \ template <> \ struct StringCast<T> \ { ...
C++
UTF-8
10,205
3.296875
3
[]
no_license
#include <src/numeric/GeoPosition.h> #include <cmath> #include <iostream> #include <QDebug> #include <QSettings> #include <QString> #include "src/util/qString.h" /** * Constructs an invalid GeoPosition */ GeoPosition::GeoPosition () { // Since the two Angle properties are default-constructed, the...
C#
UTF-8
1,070
2.578125
3
[]
no_license
using System.Collections.Generic; using UnityEngine; public class WinGameWhenOccupantCountIsBelowThreshold : AbstractGameBoardModifier, IGameBoardModifier { [SerializeField] private int minOccupantThreshold = 0; void Start () { //listen when any occupants is removed from the board...
Java
UTF-8
9,115
1.953125
2
[]
no_license
package net.dorokhov.pony.core.library.service.scan; import net.dorokhov.pony.api.library.domain.Song; import net.dorokhov.pony.core.library.service.AudioTagger; import net.dorokhov.pony.api.library.domain.ReadableAudioData; import net.dorokhov.pony.api.library.domain.WritableAudioData; import net.dorokhov.pony.core.l...
PHP
UTF-8
817
3.46875
3
[]
no_license
<!DOCTYPE html> <?php $someText = "dynamic text"; $varA = "from one tag"; $varB = 1; ?> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <h1>HEADLINES AND <?php echo $someText;?></h1> <p>You can combine static html with values from php variabl...
Markdown
UTF-8
3,336
3.171875
3
[]
no_license
# docker-utils ## Warnings: Selfish-ware. One day and a bottle of wine project. Docker swarm and AWS helpers. The whole thing is an organised hack. - Useless for 99.99999% of the people. - I was sick of struggling with docker for every project I'm starting and I can't remember shit. - Very specific to my (limited) k...
C#
UTF-8
700
3.140625
3
[]
no_license
// for each combination of ID1 and ID2 // return the latest item from the // most frequently-occuring quantity IEnumerable<MyEntity> GetLatestMaxByID(IEnumerable<MyEntity> list) { foreach (var group in list.GroupBy(x => new { x.ID1, x.ID2 })) yield return GetSingleItemForIDs(group);...
Java
GB18030
243
2.421875
2
[]
no_license
public class NaobaiJing implements Advertise{ public void showAdvertisement(){ System.out.println("ڲ ԰׽"); } public String giveCorpName(){ return "ף̫˾"; } }
Java
UTF-8
6,116
2
2
[]
no_license
package com.jusfoun.jusfouninquire.ui.widget; import android.app.Dialog; import android.text.TextUtils; import android.view.Gravity; import android.view.View; import android.view.Window; import android.widget.EditText; import android.widget.TextView; import com.jusfoun.jusfouninquire.InquireApplication; import com.si...
Java
UTF-8
2,935
1.976563
2
[]
no_license
package com.sofia.poseidon.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.muggle.poseidon.base.ResultBean; import com.muggle.poseidon.util.IStringUtils; import com.sofia.poseidon.entity.vo.SysUserVO; import com.sofia.poseid...
C++
UTF-8
13,746
2.515625
3
[ "BSD-2-Clause" ]
permissive
#pragma once namespace KERF_NAMESPACE { struct TRANSMIT_NODE; struct TRANSMITTER; struct EMITTER { bool bytes_remain_to_read = true; TRANSMIT_NODE *parent; virtual I read_1_byte_write_to_buffer(char *buffer){return read_up_to_n_bytes_write_to_buffer(buffer, 1);}; virtual I read_up_to_n_bytes_write_to_buffer(...
C++
UTF-8
849
2.8125
3
[]
no_license
// // Created by kimdong on 2019-05-04. // #include <iostream> #include <vector> #include <algorithm> using namespace std; struct result{ int idx; int score; }; bool compare(result a, result b){return a.score > b.score;} vector<result> board(8,{0,0}); int totalScore = 0; vector<int> ans; void input(); void...
Python
UTF-8
6,144
2.703125
3
[ "MIT" ]
permissive
__author__="congcong wang" import pickle import shutil import time from sklearn.metrics.pairwise import cosine_similarity from sentence_transformers import SentenceTransformer from tqdm import tqdm import nltk import os import logging logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=loggin...
Shell
UTF-8
399
3.375
3
[]
no_license
#!/bin/sh [ -f ./restricted/common ] && . ./restricted/common PREFIX=infrastructure myexit(){ echo "ERROR DURING BUILDING IMAGE" exit 1 } IMAGES="paas mesos mesos-slave mesos-master consul haproxy registrator dnsmasq" for image in $IMAGES; do docker build --rm=true --tag=${REGISTRY}${image} $PREFIX/${image}|| my...
Markdown
UTF-8
893
2.890625
3
[]
no_license
# Vehicle-Collection A simple Console Application that make you Add, Modify and Remove vehicles to/from a list. The list can be stored on a JSON/XML file to save all your vehicles and load them every time you start the application. N.B.: To save all the changes, you need to edit the following methods: 1) private sta...
Python
UTF-8
34,696
2.640625
3
[]
no_license
from functools import partial from tkinter import * from tkinter import ttk import psycopg2 from tkinter import messagebox from PIL import ImageTk from function_ import get_geometry, get_monitor class Student: get_mo = get_monitor() width_manage_frame = get_mo[0] * 0.234 # Ширина Manage frame height_manag...
Java
UTF-8
2,265
1.703125
2
[ "LicenseRef-scancode-generic-cla", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * $Header: * /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLInitializationError.java,v * 1.2 2004/06/10 18:25:24 olegk Exp $ $Revision: 155418 $ $Date: 2005-02-26 08:01:52 -0500 (Sat, 26 * Feb 2005) $ * *...
Java
UTF-8
6,529
2.203125
2
[]
no_license
package com.ias.webide.server.rest; import java.sql.SQLException; import java.util.ArrayList; import javax.swing.text.StyledEditorKit.BoldAction; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import com.google.gson.Gson; import com.google.gson.Json...
Python
UTF-8
2,646
3.328125
3
[]
no_license
import requests from bs4 import BeautifulSoup import csv import os #Plan: # 1. We need to define function to get html request # 2. Need to find out the number of pages # 3. We need to define function to get content of the page # 4. parse # URL = 'https://kolesa.kz/cars/mercedes-benz/almaty/' HEADERS = {'user-agent': ...
Swift
UTF-8
3,657
2.796875
3
[ "MIT" ]
permissive
// // Iex.swift // stocks // // Created by Daniel on 5/29/20. // Copyright © 2020 dk. All rights reserved. // import Foundation // TODO: support https://sandbox.iexapis.com/stable/stock/market/batch?symbols=aapl&types=company,balance-sheet&token=Tsk_309349a480bc4f4e922f63c57b69e3de struct Iex { struct Compan...
Java
UTF-8
431
2.28125
2
[ "BSD-3-Clause" ]
permissive
package org.micromanager.events.internal; import org.micromanager.events.ChannelGroupChangedEvent; public class DefaultChannelGroupChangedEvent implements ChannelGroupChangedEvent { private final String channelGroup_; public DefaultChannelGroupChangedEvent(final String newChannelGroup) { channelGroup_ = ...
JavaScript
UTF-8
2,070
2.59375
3
[ "Apache-2.0" ]
permissive
$(document).ready(function () { $(window).on('load',function () { var dataImg={ 'data':[ {"src":'1.jpg'}, {"src":'2.jpg'}, {"src":'3.png'}, {"src":'4.jpg'}, {"src":'5.jpg'}, {"src":'6.jpg'}, {"src":'7.jpg'}, {"src":'8.jpg'}, {"src":'9.jpg'}, {"src":'10.jpg'}, {"src":'11...
Java
UTF-8
1,632
2.328125
2
[]
no_license
package sa.store.model; import javax.persistence.*; @Entity @Table(name = "stores") @NamedQueries({@NamedQuery(name = Store.FIND_ALL, query = "SELECT u FROM Store u")}) public class Store { public static final String FIND_ALL = "Store.findAll"; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) ...
C++
UTF-8
3,198
2.59375
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <texture.h> #include <cmath> #include <glm.hpp> using namespace std; Texture::Texture(int type, int w, int h) { textureType = type; width = w; height = h; data = new float[width*height*4]; for (int i = 0;i<width*height*4;i++) data[i] = i...
Java
UTF-8
3,229
1.804688
2
[]
no_license
package com.airbnb.android.cohosting.fragments; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import butterknife.BindView; import butterknife.OnClick; import com.airbnb.android.cohosting.C5658R; import com.airbnb.android.cohosting.CohostingGraph;...
Python
UTF-8
2,586
3.921875
4
[]
no_license
### SKU CoE ITE - ParkSooYoung ### ### Grade 1.5 , Semester 2.5 , Chapter 10 , Number 5 ### ''' Quiz) 동네에 항상 대기 손님이 있는 맛있는 치킨집이 있습니다. 대기 손님의 치킨 요리 시간을 줄이고자 자동 주문 시스템을 제작하였습니다. 시스템 코드를 확인하고 적절한 예외처리 구문을 넣으시오. 조건1 : 1보다 작거나 숫자가 아닌 입력값이 들어올 때는 ValueError로 처리 출력 메시지 : "잘못된 값을 입력하였습니다." 조건2 : 대기 손님이 주문...
Java
UTF-8
2,453
2.171875
2
[]
no_license
package com.b13.orderservice.controller; import java.net.URISyntaxException; import java.util.Optional; import javax.servlet.http.HttpServletRequest; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org...
JavaScript
UTF-8
1,635
2.546875
3
[]
no_license
const catchify = p => p.then(d => ([ , d ])).catch(e => ([ e ])) export const createRequester = ({ hostname, appId, apiKey, fetcher, now = Date.now, sdkVersion = '1.3.0', maxRetries = 2 }) => { let baseUrl, accessToken, refreshToken, tokenCreateTime const logIn = async () => { const response = await fetcher(`${ba...
JavaScript
UTF-8
2,566
2.546875
3
[]
no_license
import Vue from 'vue' import Vuex from 'vuex' import axios from 'axios'; import moment from 'moment'; import apiUrl from '@/config/api'; Vue.use(Vuex) // 仿效 socket Server(未來導入從這個著手) let socketTemporary; function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min) ) + min; } export default new ...
Ruby
UTF-8
2,912
2.75
3
[ "MIT" ]
permissive
require_relative './argument_interceptor' require_relative './invocation' require 'set' module Compact class Contract attr_reader :specs def initialize @collaborator_invocations = Set.new @test_double_invocations = Set.new end def prepare_double(block = Proc.new) double = block.cal...
Python
UTF-8
489
2.9375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Fri Sep 27 16:32:24 2019 @author: baneel """ import matplotlib.pyplot as plt from skimage import io from skimage.measure import find_contours plt.ion() plt.rcParams['image.cmap'] = 'gray' ### USER INPUT im_name = 'path_to_image' threshold = 120 ### SCRIPT im = io.imread(im_nam...
Python
UTF-8
281
4.1875
4
[]
no_license
# Write a program that uses nested loops to draw this pattern: # ## # # # # # # # # # # # # # # # for row in range(6): print("#", end = "") for col in range(row): print(" ", end = "") print("#")
Python
UTF-8
5,674
2.515625
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- import datetime import logging import json import os import pymysql import sys import yaml from typing import Any from typing import Dict from typing import Final from typing import List from typing import NoReturn from typing import Union from timo.database_manager.models import Database Qu...
Ruby
UTF-8
2,642
2.859375
3
[]
no_license
require 'simplecov' SimpleCov.start require_relative '../../lib/kupon' describe Kupon do let(:impreza) { instance_double("Wydarzenie",:nazwa => "Mecz")} let(:opcja1) { instance_double("Opcja",:kurs => 2.0, :id => 1)} let(:opcja2){ instance_double("Opcja",:kurs => 4.0, :id => 2)} let(:opcja3) { instance_doubl...
Markdown
UTF-8
8,686
3.453125
3
[ "Apache-2.0" ]
permissive
--- layout: post redirect_from: "/articles/improving-the-mac-installer-for-firefox/" title: "Improving the Mac installer for Firefox" subtitle: "With a renewed focus on improving the Firefox install experience — what can we improve on the Mac?" cover_image: mountains.jpg excerpt: "With a renewed focus on improving t...
Python
UTF-8
239
3.40625
3
[]
no_license
#!/usr/bin/env python3 """ this module uses type annotation to document a string concat function """ def concat(str1: str, str2: str) -> str: """ this function concats 2 strings and returns a single string """ return str1 + str2
SQL
UTF-8
14,119
3.078125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 04, 2020 at 09:09 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
Java
UTF-8
6,191
2.0625
2
[ "MIT" ]
permissive
/* * Copyright 2012-2016 Broad Institute, Inc. * * 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 limitation the rights to use, * copy, modify, merge,...
C#
UTF-8
6,383
2.578125
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 MB_YGS__LYS_Puan_Hesaplama_Motoru { public partial class LysHesapla : Form { #region Metodlar ...
PHP
UTF-8
928
2.546875
3
[]
no_license
<?php class Post extends AppModel { var $name = 'Post'; var $displayField = 'title'; var $validate = array( 'post' => array( 'rule' => array('custom', '/^[a-z0-9 ]*$/i'), 'maxLength' => 610, 'require' => true, 'messag...
JavaScript
UTF-8
655
3.703125
4
[]
no_license
//new功能 //访问构造函数的属性和构造函数原型的属性 function fakeNew(){ var obj = new Object(); var Constructor = Array.prototype.shift.call(arguments); obj.__proto__ = Constructor.prototype; var result = Constructor.apply(obj,arguments); return typeof result ==='object'? result : obj ; } function Pe...
Shell
UTF-8
242
3.0625
3
[]
no_license
#!/bin/bash importantlines="" if [ -p /dev/stdin ]; then while IFS= read -r line; do if [[ $line =~ .*Verif.* ]]; then importantlines="|$importantlines$line" fi done fi curl --request POST --url "$1" --data-raw "$2$importantlines"
C#
UTF-8
861
2.53125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; namespace Haxgo.Core.Sessions { public class SessionService { public static void InsertObject(string Key, object Obj) { if ((Obj != null)) ...
TypeScript
UTF-8
3,217
2.53125
3
[]
no_license
import Axios, { AxiosRequestConfig } from 'axios'; import { RouteComponentProps } from 'react-router-dom'; import * as config from './app.config'; import { Dto } from './dtos/Dto'; import { ResourceError } from './dtos/Error'; import { SystemLogout } from './components/Login'; const instance = Axios.create({ base...
C#
UTF-8
3,642
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 ProjectManager { public partial class CreateForm : Form { public enum...
PHP
UTF-8
1,210
2.75
3
[]
no_license
<?php /** * Created by PhpStorm. * User: oem * Date: 24.10.18 * Time: 13:54 */ namespace Phore\Datalytics\Core\Aggregator; use InvalidArgumentException; class AggregatorFactory { private $defaultAggregator; public function __construct(string $defaultAggregator="first") { $this->defaultAgg...
Go
UTF-8
1,092
3.03125
3
[]
no_license
package main import ( "bufio" "bytes" "flag" "fmt" "io/ioutil" "os" "path/filepath" "strings" ) func main() { var ( input string verbose bool ) flag.StringVar(&input, "i", "main.go", "set input file") flag.BoolVar(&verbose, "v", false, "verbose mode") flag.Parse() f, err := os.OpenFile(input, os...
Java
UTF-8
743
2.53125
3
[]
no_license
package ovgu.ir; import java.util.ArrayList; import java.util.List; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.tartarus.snowball.ext.PorterStemmer; public class TextStemmer { public List<String> getStemmedValue(List<String> termList){ Tok...
PHP
UTF-8
2,152
2.640625
3
[]
no_license
<?php /* Plugin Name: Anti-User Plugin URI: NONE Description: Basic WordPress Plugin Header Comment Version: 20160911 Author: shamelessApathy Author URI: NONE License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html Text Domain: wporg Domain Path: /languages */ defined('ABSPATH') or die(' No...
C++
UTF-8
763
3.625
4
[]
no_license
#include <iostream> #include <string> #include <vector> struct vertex { float x, y, z; vertex(float x, float y, float z) : x(x), y(y),z(z) {} vertex(const vertex& vert) : x(vert.x), y(vert.y), z(vert.z) { std::cout << "copied" << std::endl; } }; std::ostream& operator<<(std::ostream& stream, const v...
Java
UTF-8
1,256
3.4375
3
[]
no_license
package functionAndArrayPepcoding; import java.util.Scanner; public class AnyBaseAddition { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int b = sc.nextInt(); int n1 = sc.nextInt(); int n2 = sc.nextInt(); int d = getSum(b, n1, n2); Syst...
SQL
UTF-8
23,523
3.625
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 14, 2021 at 09:55 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
Shell
UTF-8
2,317
3.078125
3
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#!/bin/bash # Licensed under the Apache License, Version 2.0 or the MIT License. # SPDX-License-Identifier: Apache-2.0 OR MIT # Copyright Tock Contributors 2023. BUILD_DIR="verilator_build/" # Preemptively cleanup layout (incase this was a test) so that following apps (non-tests) load the correct layout. rm $TOCK_RO...
Java
UTF-8
1,160
2.0625
2
[]
no_license
package com.service.goods.service; import com.github.pagehelper.PageInfo; import com.goods.pojo.Brand; import java.util.List; /** * @Author: huangzhigao * @Date: 2020/3/29 14:14 */ public interface BrandService { /** * 查询所有品牌 * * @return */ List<Brand> findAllBrand(); /** * ...
Markdown
UTF-8
853
3.359375
3
[ "MIT" ]
permissive
### 序列化和反序列化二叉搜索树 ### 序列化是将数据结构或对象转换为一系列位的过程,以便它可以存储在文件或内存缓冲区中,或通过网络连接链路传输,以便稍后在同一个或另一个计算机环境中重建。 设计一个算法来序列化和反序列化** 二叉搜索树** 。 对序列化/反序列化算法的工作方式没有限制。 您只需确保二叉搜索树可以序列化为字符串,并且可以将该字符串反序列化为最初的二叉搜索树。 **编码的字符串应尽可能紧凑。** **示例 1:** ``` 输入:root = [2,1,3] 输出:[2,1,3] ``` **示例 2:** ``` 输入:root = [] 输出:[] ``` **提示:** * 树中节点数...
Java
UTF-8
922
2.453125
2
[]
no_license
package com.lv.dao; import com.lv.model.User; import java.util.List; /** * 定义有关users数据表有关的操作方法 * * @author lv */ public interface UserDao { /** * 插入一条数据 * * @param user * @return */ public int save(User user); /** * 根据用户id删除对应的用户数据 * * @param id * @return */ public int deleteUserById(in...
Java
UTF-8
752
2.1875
2
[]
no_license
package de.fisgmbh.tgh.applman.odata; import java.util.HashMap; import java.util.Map; public class EdmTypeEntityApplication extends EdmTypeEntityJPAStandard { private static final String ET_NAME = "Application"; private static Map<String, String> customPropertyNames; static { customPropertyNames = n...
JavaScript
UTF-8
481
4.125
4
[]
no_license
const first = 2; const second = 2; if (first == second){ console.log(" first-second variable 'double equal' condition is true"); } else { console.log("first-second variable 'double equal' condition is false"); } /////// const firstExample = 14; const secondExample = "14"; if (firstExample === secondExample){ ...
Python
UTF-8
11,126
2.65625
3
[]
no_license
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
C++
UTF-8
1,418
2.796875
3
[]
no_license
#pragma once #include "RT1W\textures\texture.h" #include "RT1W/ray.h" #include "RT1W\hittables\hittable.h" #include "RT1W\textures\solid_color.h" class material { public: // not pure virtual: non enforced interface virtual color emitted(double u, double v, const point3& p) const { return color(0, 0, 0); } vir...
Java
UTF-8
1,043
2.09375
2
[]
no_license
package com.spaceapi.spaceapi.controller; import com.spaceapi.spaceapi.dto.CompanyDto; import com.spaceapi.spaceapi.service.CompaniesService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVari...
Ruby
UTF-8
524
3.859375
4
[]
no_license
# Maximum sum such that no two elements are adjacent # Find maximum possible stolen value from houses def get_max_val(arr, n) if(n == 0) return arr[0] end if(n == 1) return [arr[0], arr[1]].max end prev_prev_val = arr[0] prev_val = [arr[0], arr[1]].max i = 2 while(i < n) val = [(arr[...
Java
UTF-8
344
2.0625
2
[]
no_license
package com.revature.hobbycon.dao; import com.revature.hobbycon.data.UserData; public interface UserDAO { public UserData getUser(String userName, String userPW); public void createNewUser(UserData nu); public UserData getHobbyName(String hobbyName); public UserData setHobbyName(); public void setN...
Python
UTF-8
472
3.25
3
[]
no_license
#bulletPointerAdder.py - Adds Wikipedia bullet points to the start #of each line of text on the clipboard. import pyperclip,re text = pyperclip.paste() splitter = re.compile('\d:') #TODO: seperate lines and add starsself. #Seperate lines and add stars lines = re.split(splitter,text) for i in range(len(lines)): #loop...
C
UTF-8
1,654
2.953125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> int *next; int *nextval(int n_len,char *n) { next=(int *)malloc(sizeof(int)*(n_len+1)); next[1]=0; int i,j; i=1;j=0; while(i<n_len) { if(j == 0|| n[i] == n[j]) { i++; j++; if(n[i] == n[j]) { next[i]=next[j]; } else next[i...
C#
UTF-8
12,966
3.21875
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; namespace ProjectHamiltonService.Game { public class Puzzles { public enum Type { Variables, Conditionals, Cycles, Functions ...
Shell
UTF-8
318
2.625
3
[ "MIT" ]
permissive
#!/usr/bin/env bash echo BUILD_SCM_REVISION $(git rev-parse --short HEAD) || $SHORT_SHA echo BUILD_SCM_VERSION $(git describe --abbrev=7 --always --tags HEAD) || $SHORT_SHA echo BUILD_GUST_VERSION $(grep version < package.json | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]') || $SHORT_SHA
Java
UTF-8
3,727
1.75
2
[ "Apache-2.0" ]
permissive
package com.google.android.libraries.bind.widget; import android.graphics.Bitmap; import android.graphics.Paint; import android.graphics.Rect; import android.view.View; import android.view.ViewGroup; import com.google.android.libraries.bind.card.CardGroup; import com.google.android.libraries.bind.data.BindingV...
Python
UTF-8
410
2.921875
3
[]
no_license
name = raw_input("Enter file name:\n") if len(name) < 1: name = "mbox-short.txt" try: fhand = open(name) except: print "File: <", name, "> does not exist" d_mails = dict() for line in fhand: if line.startswith("From") and not line.startswith("From:"): words = line.split() # print words ...
JavaScript
UTF-8
1,137
2.546875
3
[]
no_license
(function(undefined) { 'use strict'; angular .module('poc') .controller('SecondController', SecondController); SecondController.$inject = ['$http','$scope']; function SecondController($http, $scope) { var vm = this; vm.users = []; vm.orderObj = 'City'; ...
Markdown
UTF-8
498
2.703125
3
[]
no_license
--- title: 羽绒服 date: 2020-02-15T20:54:12+08:00 draft: false --- 梦里的羽绒服,通常象征温暖,保护等含义。 梦见有人送给自己羽绒服,预示你会在别人的帮助和庇护下,得到提升,顺利发展。 梦见妻子穿着羽绒服,暗示妻子要离开你。 梦见自己穿的羽绒服破了,表示你事业上将遭受挫折。 梦见你特别留意某件羽绒服,提醒你要充满信心,站稳立场,并公开表明你自己的观点。
C++
UTF-8
3,097
3.4375
3
[]
no_license
//============================================================================ // Name : file2.cpp // Author : FatemehAbdi // Version : // Copyright : Dast Nazan Bache Boro Oonvar :) // Description : Hello World in C++, Ansi-style //=====================================================================...
Java
UTF-8
733
2.125
2
[]
no_license
package com.example.user.endexam; public class Bill { int Bill_id; int Table_id; public Bill() { } int Product_id; public int getBill_id() { return Bill_id; } public void setBill_id(int bill_id) { Bill_id = bill_id; } public int getTable_id() { retur...
Python
UTF-8
780
3.421875
3
[]
no_license
import operator opdracht = input() words = opdracht.split() ops = {'+' : operator.add, '-' : operator.sub, '*' : operator.mul, '/': operator.truediv} #answer = ops[words[2]](int(words[0]),int(words[1])) while True: alreadyfound = False if len(words) > 1: for i in range(0,len(words)): if al...
PHP
UTF-8
2,544
2.96875
3
[]
no_license
<? function boolCast($b) { return $b === true || $b === 'true'; } abstract class DBConnection { const TYPE_BOOLEAN = 'boolean'; const TYPE_INTEGER = 'integer'; const TYPE_STRING = 'string'; const TYPE_TIMESTAMP = 'timestamp'; private static $connection = null; private static $statementCache = array(); public...
C++
UTF-8
4,693
2.625
3
[ "Unlicense" ]
permissive
// typingPrototype.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <Windows.h> #include "SDL/SDL.h" #include <iostream> #include <string> #include <cassert> #include <time.h> #include "wordList.h" using namespace std; #define SCREEN_WIDTH 500 #define ...