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
160
2.53125
3
[]
no_license
#include "subject.h" Subject::Subject( const std::string &name ): name{name} {} std::string Subject::getName() const { return name; } Subject::~Subject() {}
JavaScript
UTF-8
5,115
3.28125
3
[]
no_license
// HTML'de yer alan item eklenecek olan listeyi DOM ile bir değişkene atama var ul = document.querySelector("#list"); // Local Storage tanımlı değil ise Liste Elemanlarını tutmak için listArray isimli boş array tanımlama var listArray = []; if (localStorage.getItem("listArray")) { // Bu blok yani If bloğu Local St...
PHP
UTF-8
745
2.65625
3
[]
no_license
<?php require 'Calculator.php'; use PHPUnit\Framework\TestCase; class CalculatorTests extends TestCase { private $calculator; protected function setUp() { $this->calculator = new Calculator(); } protected function tearDown() { $this->calculator = NULL; } public fun...
Java
UTF-8
757
2.78125
3
[]
no_license
package service.dao; import org.springframework.stereotype.Component; import service.models.Point; import java.util.ArrayList; import java.util.List; @Component public class PointDAO { private static int POINTS_COUNT; private List<Point> points; { points = new ArrayList<>(); points.add(...
Ruby
UTF-8
436
3.53125
4
[]
no_license
#write your code here def add(a,b) a+b end def subtract(a,b) a - b end def sum(numberList) total = 0 for num in numberList total += num end return total end def multiply(numberList) total = 1 for num in numberList total *= num end return total end def power(a,b) a**b end def factorial...
Java
UTF-8
4,223
1.859375
2
[]
no_license
package com.zozmom.ui; import com.zozmom.manager.AccountManager; import com.zozmom.model.UserInfoModel; import com.zozmom.pic.PhotoLoader; import com.zozmom.ui.fragment.MeFragment; import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android...
C++
UTF-8
1,936
3.5
4
[]
no_license
#include "BigNums.h" int main() { /*BigNumber bn1("99"); BigNumber bn2("10"); BigNumber bn3; cout << bn2 << endl; cout << bn2 << ">" <<bn1 << "? " << (bn2 > bn1) << endl; cout << bn2 << "<" <<bn1 << "? " << (bn2 < bn1) << endl; cin >> bn3; cout << bn3 << endl; bn3 = b...
C++
UTF-8
1,475
2.703125
3
[]
no_license
#ifndef TTCHAT_CONVERSATION_H #define TTCHAT_CONVERSATION_H #include "SLPPacket.h" #include "Client.h" #include <mutex> #include <list> #include <thread> #include <queue> using namespace std; class Chatroom { public: //identyfikator rozmowy uint64_t id; private: //lista klientów należących do rozmowy ...
Python
UTF-8
211
2.859375
3
[]
no_license
#!/usr/bin/env python import os import sys def read_filenames(directory): try: file_names = os.listdir(directory) return file_names except: print("Please use the linux format")
Python
UTF-8
5,154
2.671875
3
[]
no_license
# -*- coding: utf-8 -*- import xml.etree.ElementTree as etree from pyconizer.lib.api.sld.v1_0_0.classes import PropertyIsLikeType from pyconizer.lib.api.structure import Rule, NamedLayer from pyconizer.lib.api.svg import create_svg_icon # python 3 compatibility from future.moves.urllib.request import urlopen try: ...
Swift
UTF-8
1,864
2.71875
3
[]
no_license
// // NavigationMenuView.swift // SwiftUIMovieDbMac // // Created by Djuro Alfirevic on 22/06/20. // Copyright © 2020 Djuro Alfirevic. All rights reserved. // import SwiftUI struct NavigationMenuView: View { @ObservedObject var searchState = MovieSearchState() @State var selection: String? = "Home" ...
Java
UTF-8
575
2.125
2
[]
no_license
package org.scriptbox.box.jmx.proc; import org.scriptbox.box.exec.AbstractExecBlock; import org.scriptbox.box.exec.ExecRunnable; import org.scriptbox.box.jmx.conn.JmxConnections; public abstract class JmxProcessProvider extends AbstractExecBlock<ExecRunnable> { private String name; protected JmxConnections connect...
C++
GB18030
3,721
3.90625
4
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; void test() { string str("1234567890"); int size = str.size(); int cap = str.capacity(); //reserve(n) : n > capacityʱ,,һ޸ݺsize str.reserve(20); int size1 = str.size(); int cap1 = str.capacity(); //reserve(n) : С: n < sizeʱ,κβ,capaci...
Java
UTF-8
7,178
1.78125
2
[ "MIT" ]
permissive
package betterquesting.client.gui2.party; import betterquesting.api.api.QuestingAPI; import betterquesting.api.enums.EnumPacketAction; import betterquesting.api.network.QuestingPacket; import betterquesting.api.questing.party.IParty; import betterquesting.api.utils.RenderUtils; import betterquesting.api2.client.gui.Gu...
C#
UTF-8
2,435
2.59375
3
[]
no_license
using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using QTask.Models; namespace QTask.Controllers { [Produces("application/json")] [Route("api/[controller]")] public class TaskController : Controller { private readonly Tas...
Markdown
UTF-8
1,465
3.0625
3
[]
no_license
--- layout: post title: Codility - PermMissingElem date: 2018-02-21 20:37:1 +0900 category: codility --- [RESULT](https://app.codility.com/demo/results/trainingRVBEZW-857) ```java import java.util.*; class Solution { public int solution(int[] A) { boolean[] array = new boolean[100002]; for (int a...
Java
UTF-8
1,028
2.9375
3
[]
no_license
package com.soebes.katas.java8; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.junit.jupiter.api.Test; public class StreamsTest { @Test public void testName() throws Exception { ExecutorService newSingleThreadExecutor = Executors.newSingleTh...
Markdown
UTF-8
1,017
3.09375
3
[]
no_license
# **Finding Lane Lines on the Road** Overview --- [//]: # (Image References) [img]: ./test_images/solidWhiteRight.jpg "Input" [outImg]: ./test_images_output/solidWhiteRight.jpg "Ouput" This project includes a Jupyter Notebook with the same code as in LineDetect.py so you can run it how you prefer. It will run thr...
Markdown
UTF-8
1,358
2.671875
3
[]
no_license
--- layout: post title: Pylint wordpress_id: 140 wordpress_url: http://blog.malev.com.ar/?p=140 comments: true categories: - title: Programacion slug: programacion autoslug: programacion - title: Python slug: python autoslug: python tags: - title: buenas practicas slug: buenas-practicas autoslug: buenas-...
C#
UTF-8
685
3.40625
3
[]
no_license
using System; namespace Aula_9_atividade { class Program { static void Main(string[] args) { Console.WriteLine ("Digite o valor do produto"); double Valoruser = double.Parse (Console.ReadLine () ) ; Console.WriteLine ("Digite o valor do desconto"); ...
C#
UTF-8
434
2.90625
3
[]
no_license
using System; namespace RabbitWrapper { public static class DateTimeExtensions { static readonly DateTime EpochTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); // Unix time public static long SecondsSinceEpoch(this DateTime date) { var timeSin...
Python
UTF-8
921
2.5625
3
[]
no_license
#!/usr/bin/python # -*- coding: UTF-8 -*- #Author by 2019/05/11 Split fa[sta] into sliding window import sys,re from Bio import SeqIO winw = int(sys.argv[3]) step = int(sys.argv[4]) with open(sys.argv[2], "w") as out: for record in SeqIO.parse(sys.argv[1], "fasta"): seq = str(recor...
JavaScript
UTF-8
1,369
2.625
3
[]
no_license
// $(document).ready(function () { // $.ajax({ // //url: 'http://localhost:3000/api/get/aaa', // url: 'ttie.eba-9cjewynp.ap-southeast-2.elasticbeanstalk.com', // success:function(data) { // let all = data; // console.log(data); // let fruit = $("#111"); ...
C#
UTF-8
818
3.53125
4
[]
no_license
using System; using NodaTime; class Test { static void Main() { ShowAge(1988, 9, 6); ShowAge(1991, 3, 31); ShowAge(1991, 2, 25); } private static readonly PeriodType YearMonth = PeriodType.YearMonthDay.WithDays...
Java
UTF-8
3,432
2.640625
3
[]
no_license
package com.lightmesh.h2compress; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import or...
SQL
UTF-8
12,002
3.359375
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.3.10 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2016 年 07 月 28 日 22:22 -- 服务器版本: 5.6.14 -- PHP 版本: 5.4.34 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_...
Shell
UTF-8
443
2.9375
3
[]
no_license
#!/bin/sh # Specify appropriate SWT library! SWT_JAR=libs/ext/swt/swt-gtk-linux-x86_64.jar JARS=$SWT_JAR for f in libs/*.jar do JARS=$JARS:$f done export MOZILLA_FIVE_HOME=/usr/lib/`rpm -q firefox | sed -e "s/\(firefox-[^-]*\)-.*/\1/"` #export MOZILLA_FIVE_HOME=/usr/lib64/xulrunner-1.9.2.20/ export LD_LIBRARY_PA...
C
UTF-8
3,212
3.625
4
[]
no_license
#include "grafo.h" #include "pilha.h" #include "fila.h" //funcao retorna um tad de grafo Grafo criaGrafo(int n){ int i; //cria ponteiro para uma estrutura de grafo Grafo* g = (Grafo*) malloc(sizeof(Grafo)); //cria uma lista de ponteiros que apontam para as listas de adjacencia g->lista = (No**) malloc(sizeof(No*)...
Java
UTF-8
5,039
2.9375
3
[]
no_license
package cpsc2150.banking.models; /** * @author Annie Hayes, Marc Caramello * * @invariant MONTHSPERYEAR = 12 AND payment >= 0 AND Rate >= 0 AND Customer != null AND DebtToIncomeRatio >= 0 AND * Principal >= 0 AND NumberOfPayments >= 0 AND PercentDown >= 0 AND MIN_YEARS <= homeYears <= MAX_YEARS * * @C...
Swift
UTF-8
6,682
3.09375
3
[ "MIT" ]
permissive
// // ColorOctree.swift // // Copyright (c) 2015 Miles Hollingsworth // // 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 ...
Java
UTF-8
809
1.960938
2
[]
no_license
package research.resources; import com.mongodb.DB; import research.db.DBConnection; import research.db.DBHandler; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.net.UnknownHostException; /** * Created by nuwan...
Java
UTF-8
2,972
2.40625
2
[]
no_license
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
PHP
UTF-8
3,187
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Service; use Illuminate\Http\Request; use Intervention\Image\Facades\Image ; use Session; use Storage; class ServiceController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public funct...
Java
UTF-8
3,490
2.09375
2
[]
no_license
package net.sf.anathema.character.generic.impl.magic.persistence.builder; import net.sf.anathema.character.generic.impl.traits.TraitTypeUtils; import net.sf.anathema.character.generic.magic.charms.CharmException; import net.sf.anathema.character.generic.magic.charms.ComboRestrictions; import net.sf.anathema.character....
C++
UTF-8
425
2.859375
3
[]
no_license
struct node*update(struct node*start,int p) { struct node* first=start; struct node* pre=NULL; struct node* second=start; while(second->next!=NULL) { second=second->next; } for(int i=0;i<p;i++) { pre=first; first=first->next; } second->next=s...
C#
UTF-8
609
3.375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LeetCode { public static partial class LeetCode51_100 { public static int ClimbStairs(int n) { if (n < 1) { return 0; } if (n == 1) { return 1; ...
Python
UTF-8
1,888
3.125
3
[ "Unlicense" ]
permissive
""" Facebook AI powered chatbot in Excel. There are two functions: - parlai_create_world creates a world containing two agents (the AI and the human). - parlai_speak takes an input from the human and runs the model to get the AI response. The entire conversation is returned by parlai_speak so it can be viewed in ...
C++
UTF-8
528
2.671875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; typedef vector<ll> vll; ll M = 2147483648; int main() { vll A; ll sum1 = 1; while (sum1 <= M) { A.push_back(sum1); ll sum2 = 3 * sum1; while (sum2 <= M) A.push_b...
C
UTF-8
2,158
2.59375
3
[]
no_license
#include <stddef.h> #include <memory.h> #define CR4_BIT_PGE (1U << 7) #define MAX_HEAP_PAGES 64 #define HEAP_START_ADDR 0x00040000 static char heap_alloc_table[MAX_HEAP_PAGES] = {0}; void mem_init(void) { struct page_directory_entry *pde; struct page_table_entry *pte; unsigned int paging_base_addr; unsigned int ...
Java
UTF-8
2,126
3.265625
3
[]
no_license
import java.io.*; /** * A classe LojaHabitavel implementa uma loja habitável que difere da loja apenas num sentido : é possível habitar a loja. */ public class LojaHabitavel extends Apartamento implements Habitavel, ImovelComum, Serializable { private String negocio; /** * Cria uma instância LojaHab...
SQL
UTF-8
2,025
3.53125
4
[]
no_license
/* Formatted on 8/22/2014 11:24:47 AM (QP5 v5.163.1008.3004) */ ALTER TABLE TEMP_INGRESOS_A102003 READ WRITE; UPDATE TEMP_INGRESOS_A102003 A1 SET NATID_CENTRO_PRIMER_TRASLADO = NVL ( (SELECT UBI_CAH_CODIGO FROM UBICACIONES WHERE UBI_CODIGO = A1.NATID_CAMA_PRIMER_TRASLA...
Python
UTF-8
79
2.765625
3
[]
no_license
N, A, B, C, D = map(int,input().split()) print(min((N+A-1)//A*B, (N+C-1)//C*D))
Python
UTF-8
1,313
2.9375
3
[]
no_license
def contabiliza_combustivel(dicionario): gasolina_litros = 0 etanol_litros = 0 gasolina_preço = 0 etanol_preço = 0 tipos = [] for item in dicionario: if dicionario[item]['tipo'] not in tipos: tipos.append(dicionario[item]['tipo']) resposta = dict.fromkeys(tipos) infor...
PHP
UTF-8
1,256
2.84375
3
[]
no_license
<?php namespace App\ConferenceRepositories; use App\Models\Rooms; class RoomRepository { public function all() { return Rooms::all(); } public function find($roomId) { return Rooms::find($roomId); } public function get($filters = null) { if (empty($filters)) { $rooms = Rooms::with('buildin...
PHP
UTF-8
7,181
2.765625
3
[]
no_license
<?php include "./layout/pdo.php"; session_start(); $years=$_POST['years']; $period=$_POST['period']; switch ($period) { case '1': $ped="1.2月"; break; case '2': $ped="3.4月"; break; case '3': $ped="5.6月"; break; case '4': $ped="7.8月"; break; ...
Java
UTF-8
756
2.015625
2
[]
no_license
package com.myf.weixin.entity.weixin.customservice; import com.myf.weixin.entity.weixin.WxJsonResult; import java.util.List; /** * Created by myf on 2016/6/8. */ public class WaitCaseListRet extends WxJsonResult { private int count;//未接入会话数量 private List<WaitCaseListItem> waitcaselist;//未接入会话列表,...
Python
UTF-8
141
3.515625
4
[]
no_license
def main(): a, b = 10, 1 statement = "a is less" if a < b else "a is not less" print(statement) if __name__=="__main__" : main()
Markdown
UTF-8
940
2.78125
3
[]
no_license
# app_loja Projeto de uma loja em Flutter, com sistema de compras integrado com Firebase, sistema de carrinho de compras, pedidos, acompanhamento do pedido, cupons de desconto e outras funções de uma loja. Requisitos: Flutter e Dart, vscode ou Android Studio. Para emular no iOS precisa de um Macbook. ATENÇÂO!!! ...
Java
UTF-8
1,340
2.8125
3
[]
no_license
package com.sps.game; import com.badlogic.gdx.Game; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.sps.game.screens.MenuScreen; import com.sps.game.screens.SplashWorker; /** * This class creates the game and launches the Menu Screen. * @author Miraj Shah, Miguel Abaquin, Devin Shingadia. * ...
C++
GB18030
405
3.4375
3
[]
no_license
//3С #include<stdio.h> //int main() //{ // int a, b, c, t; // scanf_s("%d%d%d", &a, &b, &c); // //λa<=b<=cʽ // if (a > b) // { // t = a; // a = b; // b = t; // } // if (a > c) // { // t = a; // a = c; // c = t; // } // if (b > c) // { // t = b; // b = c; // c = t; // } // printf("%d %d %d\n", a, b, c); // // ...
Java
UTF-8
1,531
2.484375
2
[ "Unlicense" ]
permissive
package org.erik.timesheets.ui.views.timesheet; import com.vaadin.flow.data.renderer.TemplateRenderer; import org.erik.timesheets.AbstractGrid; import org.erik.timesheets.domain.dto.TimesheetEntryDTO; public class TimesheetGrid extends AbstractGrid<TimesheetEntryDTO> { private static final String TEMPLATE = ...
Python
UTF-8
42
2.796875
3
[]
no_license
name = "你好,世界" print(name )
JavaScript
UTF-8
84
2.703125
3
[]
no_license
var a = 5 ; a++; a++; a++; a++; a--; var a = "asldjkh " alert(a + 5 + " the end ")
Java
UTF-8
1,365
2.4375
2
[]
no_license
package bns; import bns.comm.UnifyEnum; import bns.thread.KeyThread; import javafx.application.Application; import javafx.event.EventHandler; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.stage.Stage; import javafx.stage.StageStyle;...
Markdown
UTF-8
2,575
2.8125
3
[]
no_license
# Article 2 Pour l'application des dispositions du présent arrêté, on entend par : Emballage : tout produit constitué de matériaux de toute nature, destiné à contenir et à protéger des marchandises données, allant des matières premières aux produits finis, à permettre leur manutention et leur acheminement du producte...
Python
UTF-8
901
3.0625
3
[]
no_license
with open('input') as f: line1 = f.readline().split(',') line2 = f.readline().split(',') dirs = {'U': [0, -1], 'D': [0, 1], 'R': [1, 0], 'L': [-1, 0]} path = dict() position = [0, 0] step = 0 for instruction in line1: direction = instruction[0] amount = int(instruction[1:]) #print(direction, amoun...
C++
UTF-8
715
3.203125
3
[]
no_license
#include <iostream> #include <string> #include "code.hpp" #include "decode.hpp" int main() { char decision; std::cout << "\n" << "CODER AND DECODER V1.0 MODULAR c++ version | by __ilprofessore\n\n"; std::cout << "alternate syntax: '0 <code>' to encode and '1 <decode>' to decode.\n"; std::cout...
C
UTF-8
1,882
2.9375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strtrim.c :+: :+: :+: ...
Markdown
UTF-8
5,469
2.984375
3
[]
no_license
一七 桑雅道:“不知道,那家医院只说他是监护人,没说明他们两者之间,有亲属关系。” 原振侠吸了一口气,沉默了片刻。在沉默了片刻之后,原振侠才说:“如果陶启泉是她的监护人,你还要为她的手术费去筹募,这不是滑稽么?最近的世界豪富录中,陶启泉排在第五名,估计他的财产,超过五百亿美元!” 桑雅也很不自然地笑了笑,原振侠作了一个请他继续说下去的手势。 桑雅对于那少女有这样的一个古怪名字,又对于那少女有这样声名烜赫的大豪富作监护人这两点,实在没有法子不觉得奇怪。他勉力使自己镇定下来,才道:“请告诉我她的联络地址。” 对方说出了一个地址,桑雅听了之后,不禁苦笑——地址是在本市,很简单:“陶氏大厦顶...
Markdown
UTF-8
1,543
2.75
3
[]
no_license
```yaml area: Hertfordshire og: description: Police are appealing for witnesses following a serious injury road traffic collision in Hitchin this morning (Saturday, February 17). publish: date: 17 Feb 2018 title: Did you witness road traffic collision in Hitchin? url: https://www.herts.police.uk/news-and-appeals/di...
Java
UTF-8
3,464
2.34375
2
[]
no_license
package com.iit.jee.springboot.springsecurity.web; import com.iit.jee.springboot.springsecurity.model.Convention; import com.iit.jee.springboot.springsecurity.service.ConventionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframewo...
Python
UTF-8
353
2.765625
3
[]
no_license
from copy import * from numpy import * def fill_matrix(A): M = copy(A) for i in range(M.shape[1]): a = M[:, i] b = a[a>0] if sum(b) == 0: m = 3 else: m = mean(b) for j in range(M.shape[0]): if M[j, i] == 0: ...
Java
UTF-8
1,003
2.25
2
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
package io.sphere.sdk.inventories.commands.updateactions; import io.sphere.sdk.commands.UpdateAction; import io.sphere.sdk.inventories.InventoryEntry; import java.time.Instant; import java.util.Optional; /** * * {@include.example io.sphere.sdk.inventories.commands.InventoryEntryUpdateCommandTest#setExpectedDeliver...
Markdown
UTF-8
707
2.625
3
[]
no_license
# Index This is [my](https://willcodefor.beer) public brain. It's built using [[foam]] and runs on [[github-pages]]. [[read-in-2020]] ## Daily notes - [[2020-07-11]] - [[2020-07-10]] - [[2020-07-09]] - [[2020-07-08]] - [[2020-07-07]] - [[2020-07-06]] [//begin]: # "Autogenerated link references for markdown compati...
Java
UTF-8
436
1.882813
2
[]
no_license
package com.startedup.base.utils; import android.content.Context; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import com.startedup.base.R; public class AnimUtil { public static void animateItemRemove(Context context,View itemView){ Animation a...
TypeScript
UTF-8
1,043
3.015625
3
[]
no_license
import { t } from 'testcafe'; /** * @author Sagar * @version 1.0 * @since 26/09/20 */ /** Print custom message in the console * * @param message `<custom message to be printed in the console>` */ export const annotateTestOutput = function (message: string) { /* tslint:disable-next-l...
Java
UTF-8
919
2.140625
2
[]
no_license
package ua.service.implementation; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import ua.entity.Eduranse; import ua.repository.EduranseRepository; import...
C++
UTF-8
1,094
3.71875
4
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
#include <algorithm> #include <iostream> #include <string> void increment(std::string &password) { int location = password.size() - 1; while(password[location] == 'z') { password[location--] = 'a'; } password[location]++; } bool isValid(const std::string &password) { bool paired, triple = false; paired = ((st...
Java
UTF-8
929
1.898438
2
[]
no_license
package org.xfs.scm.map.model.list; import org.xfs.scm.map.model.base.BaseMapModel; public class ListRequestModel extends BaseMapModel{ private String filter; private String coord_type_output; private int page_index=1; private int page_size=10; public String getFilter() { return filter; ...
C
UTF-8
230
2.515625
3
[]
no_license
#include <sys/types.h> #include <unistd.h> void *simple_malloc (size_t size) { void *p; p = sbrk ( 0); /*If sbrk f a i l s , we return NULL */ if ( sbrk ( size ) == (void*)−1) return NULL; return p; }
Python
UTF-8
2,923
3.328125
3
[ "MIT" ]
permissive
from airflow.hooks.postgres_hook import PostgresHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class DataQualityOperator(BaseOperator): """ Data Quality operator. Connects to a data-warehouse through provided connection ID, and loops over provided set of tests,...
Markdown
UTF-8
862
3.421875
3
[]
no_license
# FenwickTree/Binary Indexed Tree 1. The idea is to store partial sum in each node and get total sum by traversing the tree from leaf to root. The tree has a height of log(n). 2. Mutable updating prefix sum problems 3. Leetcode 307(Range Sum Query - Mutable):[https://leetcode.com/problems/range-sum-query-mutable/](http...
C++
UTF-8
2,022
2.71875
3
[]
no_license
/* * Wll1Loader.h * * Created on: 2015-12-13 * Author: wll */ #ifndef WLL1LOADER_H_ #define WLL1LOADER_H_ #include "LanguageTypes.h" #include "WllLoader.h" #include <vector> using namespace std; class Wll1Loader : public WllLoader { public: Wll1Loader(const vector<Symbols>& input_symbols); virtual bool ...
Python
UTF-8
2,011
2.9375
3
[]
no_license
import random class Graph(object): def __init__(self,file): self.edges=[] self.vertices={} self.nodes=[str(x) for x in range(1,201)] with open(file,'r') as graph: for line in graph: t = line.strip().split() i=True ...
C++
UTF-8
1,113
2.875
3
[]
no_license
// https://www.acmicpc.net/problem/1654 // 랜선 자르기 // Written in C++ langs // 2020. 02. 27. // Wizley #include <iostream> #include <algorithm> #include <string> #include <vector> #include <cmath> #include <cstring> #include <cstdlib> using namespace std; int K, N; long long LAN[1000001]={0,}; long long H=0; long lon...
Markdown
UTF-8
736
2.71875
3
[ "MIT" ]
permissive
--- layout: post title: Cinematic Color date: 2012-09-11 15:32 author: ventspace comments: true categories: [Photography] tags: [cinema, cinematography, Graphics, graphics] --- I chose not to go to SIGGRAPH 2012, and I'm starting to wish I had. Via <a href="http://lousodrome.net/blog/light/2012/09/11/readings-on-color-...
C++
UTF-8
783
2.859375
3
[ "MIT" ]
permissive
class Solution { public: vector<int> findAnagrams(string s, string p) { vector<int> res; vector<int> map(26,0); for(int i = 0; i < p.length(); i++) map[ p[i] - 'a' ]++; int n_unmatched = p.length(); int left, right = 0; // Idea: using two...
C
UTF-8
1,475
2.71875
3
[]
no_license
/*************************************************************** stdio.c ***************************************************************/ #include <windows.h> #include "wince.h" /* for wce_mbtowc */ FILE *freopen(const char *filename, const char *mode, FILE *file) { wchar_t *wfilename, *wmode; FILE *f...
Java
UTF-8
453
1.851563
2
[]
no_license
package com.crm.service; import com.crm.domain.PageResult; import com.crm.domain.Transfer; import com.crm.query.TransferQueryObject; import java.util.List; public interface ITransferService { PageResult queryForPage(TransferQueryObject queryObject); int deleteByPrimaryKey(Long id); int insert(Transfer ...
Java
UTF-8
8,396
1.859375
2
[ "Apache-2.0", "LicenseRef-scancode-apple-excl", "BSD-3-Clause", "APAFML" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Java
UTF-8
114
1.90625
2
[]
no_license
package com.yfgz.es.bean; public interface BasePrice { Double obtainPrice(); Double obtainDiscount(); }
Markdown
UTF-8
4,541
2.53125
3
[]
no_license
--- title: "virtual(C# 참조) | Microsoft 문서" ms.date: 2015-07-20 ms.prod: .net ms.technology: - devlang-csharp ms.topic: article f1_keywords: - virtual_CSharpKeyword - virtual dev_langs: - CSharp helpviewer_keywords: - virtual keyword [C#] ms.assetid: 5da9abae-bc1e-434f-8bea-3601b8dcb3b2 caps.latest.revisi...
C++
UTF-8
610
2.96875
3
[]
no_license
#ifndef MENU_H #define MENU_H #include "DoublyLinkedList.h" // The menu class is constructed with a DoublyLinkedList parameter and handles // all user interaction and manipulation of list class Menu{ public: // @pre None. // @param list - the linked list passed to the menu object to be operated on by the ...
Java
GB18030
3,123
2
2
[]
no_license
package com.sinosoft.mm.struts.action; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.sinosoft.mm....
Java
ISO-8859-1
1,160
2.21875
2
[]
no_license
package gcom.gui.portal; import javax.servlet.http.HttpSession; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; public class AcessarPortalActionForm extends ActionForm { private static final long serialVersionUID = -89...
C#
UTF-8
909
2.75
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MirthDotNet.Model { [Serializable] public class MirthDateTime { public static readonly DateTime UnixEpoch = new DateTime(1970,1,1,0,0,0,0); public long time { get; set; } p...
Java
UTF-8
1,961
2.578125
3
[]
no_license
package project.back.back.model; import javax.persistence.*; import java.util.Objects; @Entity @Table(name = "MEMBER_HAS_KEYWORD", schema = "dbo") @IdClass(MemberHasKeywordPK.class) public class MemberHasKeyword { private String keywordLabel; private int memberId; private Keyword keywordByKeywordLabel; ...
PHP
UTF-8
926
2.546875
3
[ "Apache-2.0", "MIT" ]
permissive
<?php require_once(realpath(dirname(__FILE__).'/../') . '/class.imagefilter.php'); Class FilterJcrop extends ImageFilter{ public static function run($res, $width, $height, $dst_x, $dst_y, $background_fill='fff'){ $dst_w = Image::width($res); $dst_h = Image::height($res); if(!empty($width) && !empty...
C++
UTF-8
349
3.1875
3
[]
no_license
#include <iostream> #include <cstdlib> // just for practice int main() { int x{}, y{}, z{}; x = 5 - -1; std::cout << x << '\n'; y = 4; y+=1; std::cout << "x / y = " << x/y << '\n'; //integer division std::cout << "double(x)/y = " << static_cast<double>(x)/y << '\n'; // static cast ...
C#
UTF-8
3,136
3.296875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text.RegularExpressions; using System.Linq; namespace Triangles.Excercise { public class TriangleInfo { public string DisplayName { get { return RowIdentifier.ToUpper() + ColumnIdentifier; } } public List<Vertex2D> Vertices { get; set...
Java
UTF-8
3,527
2.140625
2
[]
no_license
package com.jumbo.wms.model.warehouse; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; im...
Java
UTF-8
1,910
2.359375
2
[]
no_license
package com.example.taylorflowers.friender; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.Toast; public class registration extends AppCompatActivity { @Override protecte...
C#
UTF-8
1,755
2.90625
3
[ "MIT" ]
permissive
using System; using System.Timers; using System.Windows.Forms; using Timer = System.Timers.Timer; namespace SimpleReactionMachine { static class SimpleReactionMachine { static private IController Contoller; static private IGui Gui; /// <summary> /// The main entry...
Python
UTF-8
325
4.59375
5
[]
no_license
#Declare a variable called full_name that is equal to artist's first and last names with a space in between artist = { "first": "Neil", "last": "Young", } full_name = artist["first"] + " " + artist["last"] #or full_name2 = f"{artist['first']} {artist['last']}" print(full_name) print() print(full_n...
Java
UTF-8
2,226
2.5625
3
[]
no_license
import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.firefox.FirefoxDriver; import org.ope...
Java
UTF-8
437
1.945313
2
[ "Apache-2.0" ]
permissive
package cl.kaiser.hana; public class KProcedureException extends Exception { private static final long serialVersionUID = 4354608826209653826L; public KProcedureException() { super(); } public KProcedureException(String message) { super(message); } public KProcedureException(String message, Thro...
PHP
UTF-8
1,193
2.640625
3
[]
no_license
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use Illuminate\Support\Facades\Artisan; class InitApp extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'app:init'; /** * The console command desc...
C
UTF-8
696
3.3125
3
[]
no_license
#include <stdio.h> int main(void) { int i; int t, c; scanf("%d", &t); for (c = 1; c <= t; c++) { int n, p[26]; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", p + i); printf("Case #%d: ", c); while (1) { int max, maxIdx; max = 0; for (i = 0; i < n; i++) if (p[...
Java
UTF-8
926
2.484375
2
[]
no_license
public class Estudiante{ String NoEstudiante; String Nombre; Fecha FechaNacimiento; int Puntuacion; private Estudiante(String NoEstudiante, String Nombre, Fecha FechaNacimiento,int Puntuacion){ NoEstudiante = iNoEstudiante; Nombre = iNombre; FechaNacimiento = iFechaNacimiento; Puntuacion = iPuntuacion; ...
Rust
UTF-8
1,373
4.25
4
[]
no_license
fn main() { // let number = 30; // // if number < 5 { // println!("condition was true"); // } else { // println!("condition was false"); // } // // let mut counter = 0; // let result = loop { // println!("again!"); // counter += 1; // if ...