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
PHP
UTF-8
2,224
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Admin; use App\Http\Models\BlogUsers; use Illuminate\Support\Facades\Session; use Validator; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class LoginController extends Controller { /** * @param Request * @return [type] */ public f...
Python
UTF-8
391
2.96875
3
[]
no_license
# Simply read adc values . by Stefania Saladino) # import time # Import the GianoPi.py file (must be in the same directory as this file!). import GianoPi # Create an instance of the robot gianopirobot = GianoPi.GianoPi() # Now test 4 ground sensors while(True): four_line_sensors = gianopirobot.get_ground_...
Java
UTF-8
1,577
2.375
2
[]
no_license
package com.leyou.gateway.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; impo...
Markdown
UTF-8
14,781
3.296875
3
[]
no_license
# Loom [![Build Status](https://travis-ci.org/warrickbayman/Loom.svg?branch=1.1)](https://travis-ci.org/warrickbayman/Loom) [![Stable](https://poser.pugx.org/warrickbayman/loom/v/stable.svg)](https://packagist.org/packages/warrickbayman/loom) [![Latest Unstable Version](https://poser.pugx.org/warrickbayman/loom/v/unsta...
Shell
UTF-8
116
2.53125
3
[ "MIT" ]
permissive
#!/bin/sh set -e if ! [ -d 'node_modules' ]; then npm install fi BABEL_ENV=dev exec node -r babel-register "$1"
Markdown
UTF-8
2,942
2.640625
3
[]
no_license
--- categories: - WordPress date: "2011-10-30T06:53:37+09:00" slug: 1066 title: "[WP Plugins] 「Recent Posts Plus」で、サイドバーの最新の記事に「はてなブックマーク数」を表示する" --- WordPress は、標準で「最新の記事」を表示してません(テーマによっては対応しているようです)。 最近の記事は、いつもトップに表示してあるから別にいいやと思っていたのですが、「ブログは線でなく点で読まれる」という格言を聞いてから、急いで「最新の記事」をサイドバーに用意しました。 今回は、ちょこっと手を加えて、はてなブックマ...
Java
UTF-8
4,530
2.046875
2
[]
no_license
package com.origicheck.africababa.fragments.products.categories; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable;...
Python
UTF-8
1,867
3.0625
3
[]
no_license
# import logging # logging.basicConfig(level = logging.DEBUG) # logging.debug("This will get logged") # logging.basicConfig(filename='app.log', filemode ='w', # format = '%(name)s - %(levelname)s - %(message)s') # logging.warning("This will get logged to a file") # logging.basicConfig(format='%(process)d-%(levelname...
Java
UTF-8
1,264
3.203125
3
[]
no_license
public class Copo { //Variaveis/Propriedades de instancia private String liquido; private double capacidade; private double contem; //Construtores public Copo(){ liquido="Desconhecido"; capacidade=25.0; contem=0.0; } public Copo(String liq, double volume){ liquido=liq; capac...
Shell
UTF-8
508
2.78125
3
[]
no_license
#!/bin/bash cd gke && \ echo "Generando kubeconfig file" pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml \ ip=$(pulumi stack output ingress_ip) \ echo -e "\nIngress $ip" &&\ echo -e "\nkubectl get pod" &&\ KUBECONFIG=./kubeconfig.yaml kubectl get po &&\ sleep...
Python
UTF-8
300
3
3
[]
no_license
# https://projecteuler.net/problem=53 # How many, not necessarily distinct, values of nCr, for 1 ≤ n ≤ 100, # are greater than one-million? from math import factorial as f def C(n, r): return f(n) // (f(r) * f(n - r)) print(sum(C(n, r) > 1000000 for n in range(23, 101) for r in range(1, n)))
JavaScript
UTF-8
1,738
2.8125
3
[]
no_license
const chai = require("chai"); const {normalizeExchangeRate} = require('../helpers/helper').helper; const {getAllCurrencies} = require('../helpers/helper').helper; const expect = chai.expect; const mockExchangeRates = [{ '$': { currency: 'USD', rate: '1.1294' } }, { '$': { currency: ...
Java
UTF-8
464
3.265625
3
[]
no_license
package hash; import java.util.HashMap; import java.util.Map; public class Main { public static void main(String[] args) { Map<Character, Integer> map = new HashMap<>(); String s = "ABBCDDD"; char[] chars = s.toCharArray(); for (int i = 0; i < chars.length; i++) { char c = chars[i]; if (map.contain...
Python
UTF-8
321
3.28125
3
[]
no_license
long_number = '' with open('num.txt') as inputfile: for line in inputfile: long_number = line.strip().split(',')[0] total = 0 half_length = len(long_number) / 2 for index, char in enumerate(long_number[:half_length]): if char == long_number[index+half_length]: total += int(char) print total * 2...
Java
UTF-8
6,278
2.109375
2
[]
no_license
package ru.kvaga.amphora.svfp.iso8583.lt.loadgenerator.configuration; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; public class SystemConfigurator extends Configurator { public String ISO_SERVER_HOST ...
Markdown
UTF-8
2,869
2.984375
3
[]
no_license
<h1>Level 12</h1> <h2>Level Goal</h2> The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the da...
C
UTF-8
11,227
2.984375
3
[]
no_license
/* file: console.c */ /* purpose: source file for console I/O functions */ /* supporting both Windows (using Visual Studio 2008) */ /* and UNIX using GCC 4 platforms */ /* written by: Danny Abesdris, Catherine...
Java
UTF-8
2,133
2.25
2
[ "Apache-2.0" ]
permissive
package org.openecomp.sdc.be.model; import org.junit.Test; import java.util.List; public class ProductTest { private Product createTestSubject() { return new Product(); } @Test public void testCtor() throws Exception { new Product(new ProductMetadataDefinition()); } @Test public void testGetFullName(...
Markdown
UTF-8
2,088
2.546875
3
[ "MIT" ]
permissive
--- title: Plague - Feb 07 catalog: true tags: - reading permalink: /r_plague_2_7.html folder: plague summary: --- 1. Short, square-shouldered, with a determined-looking face and keen, intelligent eyes, he gave the impression of someone who could <b data-toggle="tooltip" data-original-title="{{site.data.answers....
C++
UTF-8
9,286
2.765625
3
[]
no_license
#ifndef ETTPNEIGHBORHOOD_H #define ETTPNEIGHBORHOOD_H #include <neighborhood/moNeighborhood.h> #include <neighborhood/moNeighbor.h> #include "neighbourhood/ETTPneighbor.h" #include <utils/eoRNG.h> #define ETTPNEIGHBORHOOD_DEBUG template <typename EOT> class ETTPneighborhood : public moNeighborhood<ETT...
Java
UTF-8
457
1.960938
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 Package2; //import Package1.*; /** * * @author zia */ public class NonSubClass { public void method(){ ...
Java
UTF-8
2,467
2.5625
3
[]
no_license
package com.everis.academia.java.agenda.digital.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persist...
Python
UTF-8
1,651
2.9375
3
[]
no_license
import pandas as pd import numpy as np import sys spam_data = pd.read_csv('/resources/data/datalaguTriariyani.csv') spam_data['label'] = np.where(spam_data['label']=='positif',1,0) print(spam_data.shape) spam_data.head(20) import matplotlib.pyplot as plt import seaborn as sns spam_data["label"].value_c...
Python
UTF-8
645
2.921875
3
[]
no_license
#Librerias Python import traceback from datetime import date from datetime import timedelta from pathlib import Path #Librerias Propias from .datos_bono import datos_bono from .descargar_casos import descargar_casos def consolidar_descargar_casos(dias_anteriores,repeticiones,caso = 'todos'): print('='*80) ls...
JavaScript
UTF-8
1,098
2.765625
3
[]
no_license
export class Route { constructor () { this.wayPoints = []; this.loc = navigator.geolocation || null; this.geoOptions = { timeout: 10000 // ms }; } addWaypoint () { var self = this; if (self.loc) { return new Promise(function (res...
Java
UTF-8
3,473
2.203125
2
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "LicenseRef-scancode-freemarker", "MIT", "LGPL-2.1-only", "LicenseRef-scancode-other-permissive", "LGPL-2.0-or-later", "EPL-1.0", "BSD-3-Clause", "GPL-1.0-or-later" ]
permissive
/* * Copyright 2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
C++
UTF-8
585
2.53125
3
[]
no_license
#include <cstdio> #include <iostream> #include <vector> using namespace std; int main(){ int t,n,a,b,c,rsult=1; cin >> t; int i=1; while(i<=t){ cin >> n; vector<double>slopes; vector<int>count; int j=0;rsult=1; while(j<n){ cin >> a >> b >> c; double sl=b/a; for(int yui=0;yui<slopes.size();yui++){ ...
JavaScript
UTF-8
336
2.828125
3
[]
no_license
let funcionario = { email: 'abc@abc.com' }; let proxyFuncionario = new Proxy(funcionario,{ get(target, prop, receiver){ console.log("Armadilha aqui"); return '**' + Reflect.get(target, prop, receiver) +'**' ; } }); console.log(proxy...
Java
UTF-8
1,513
2.546875
3
[]
no_license
package br.com.corridaKart.util; import java.io.BufferedReader; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.stream.Collectors; import br.com.corrid...
Java
UTF-8
6,571
1.703125
2
[]
no_license
/** */ package uw.cs.watform.forml.forml.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import uw.cs.watform.form...
Python
UTF-8
2,404
3.1875
3
[]
no_license
import heapq as hq from collections import namedtuple from typing import TypeVar, Callable, Iterable, Tuple, Optional, Set, List T = TypeVar('T') Info = namedtuple("Info", "maxl nodes") Queue = List[Tuple[float, T]] def a_star(start: T, goal: T, h: Callable[[T], float], gen_children: Callable[[T, T], Iterable[T]], ...
Java
UTF-8
339
2.46875
2
[]
no_license
package edu.bu.cs591p1; public class LoanInterestTransaction extends Transaction { private final double _interestAmount; public LoanInterestTransaction(long id, long account, double amount) { super("LoanInterest", id, account); _interestAmount = amount; } public double getInterestAmount() { return _int...
Python
UTF-8
1,222
3.828125
4
[]
no_license
import random def create_group(): print("Enter the number of friends joining (including you):") try: count = int(input()) except ValueError: print("No one is joining for the party") else: if count <= 0: print("No one is joining for the party") ...
C++
UTF-8
7,646
2.9375
3
[]
no_license
#pragma once #include <vector> #include "IceIncludes.h" #include "Ogre.h" #include "LoadSave.h" #include "boost/any.hpp" #include "OgreAny.h" #include "IceScriptParam.h" namespace Ice { /** A piece of any "basic" data. Supports int, bool, float, string, Vector3 and Quaternion */ class DllExport...
C++
UTF-8
1,500
2.703125
3
[]
no_license
// // Gate Sequencer // Sync-in -> Gate sequence // // 2021.04.27 // #include <MsTimer2.h> #define PIN_SYNC_IN (2) #define PIN_GATE_OUT (12) #define PIN_GATE_LED (11) #define PIN_PULSE_WIDTH (A0) #define CNT_N (8) byte sequence[CNT_N] = {0}; int cnt = 0; int pulseWidth =...
Markdown
UTF-8
1,977
3.359375
3
[]
no_license
# Data Structures This is a temporary repository containing work done in Data Structures Lab, SY Sem 4 B.Tech Engineering. ## Singly Linked List - LL_Menu.cpp A menu driven program to perform basic linked lists commands like: display list, create list, insert at start, middle, end, delete at start, middle, end, rev...
C#
UTF-8
6,334
2.796875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Globalization; namespace OMetaSharp { public class CodeGen { private StringBuilder m_Buffer = new StringBuilder(); private static readonly char PushIndentSignal = char.ConvertF...
Python
UTF-8
471
3.5625
4
[]
no_license
#! /usr/bin/python3 # Program Name: PPC---Challenge-10.py # Author Name: Thomas Morrissey # Date Written: 9/30/2014 a=int(input("How on average do you spend on your computer per day?")) if a < 2: print("That seems reasonable.") else: print("Get a life") #Self-Review #I have completed successfully this assignm...
Ruby
UTF-8
82
2.78125
3
[]
no_license
puts "Bonjour, monde !" puts #"Et avec une voix sexy ca donne : Bonjour, monde !"
Java
UTF-8
746
1.96875
2
[]
no_license
package com.rudy.dao; import com.rudy.entity.RoleInfo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; @Mapper @Repository public interface RoleInfoMapper { int deleteByPrimaryKey(Integer id); i...
SQL
UTF-8
15,089
4.03125
4
[]
no_license
-- Q1 select distinct first_name from tajik.public_users order by length(first_name) desc; select distinct first_name from tajik.public_users order by length(first_name) asc; select count(first_name),first_name from tajik.public_users group by first_name order by count(first_name) desc; -- or together -- select d...
Shell
UTF-8
2,298
2.71875
3
[]
no_license
############################################################################### # # You need to set CMVS_TOP and CMVS_DEP before doing anything # ############################################################################### ############################################################################### # # 1. CMVS...
Markdown
UTF-8
5,260
2.703125
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 加密和解密在 Visual Basic 中的字符串 ms.date: 07/20/2015 helpviewer_keywords: - encryption [Visual Basic], strings - strings [Visual Basic], encrypting - decryption [Visual Basic], strings - strings [Visual Basic], decrypting ms.assetid: 1f51e40a-2f88-43e2-a83e-28a0b5c0d6fd ms.openlocfilehash: 96e56ab315a739fef...
Java
UTF-8
3,213
2.140625
2
[]
no_license
package com.ururu2909.firstapp; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.Fr...
Python
UTF-8
3,415
2.78125
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/python3 import os import sys # Checking for puremagic try: import puremagic as pr except: print("Error: >puremagic< module not found.") sys.exit(1) # Checking for colorama try: from colorama import Fore, Style except: print("Error: >colorama< not found.") sys.exit(1) # Checking fo...
Java
UTF-8
2,551
3.671875
4
[]
no_license
import java.util.ArrayList; public class LineParser { /* * Class for parsing words from line and updating sentenceCount in * Concordance class */ public ArrayList<String> parseLine(String line, Concordance concordance) { // Go through the input line and update the sentenceCount in concordance for (int i ...
Python
UTF-8
2,231
2.78125
3
[ "MIT" ]
permissive
import sys import os import helpers import json import csv class FramerateManager(): def __init__(self,data,new_rate): data = json.load(open(data)) self.framerates_json = json.load(open(data["framerates_json"])) self.new_rate = new_rate self.temp = data["temp"] + "temp.txt" ...
C++
UTF-8
654
2.640625
3
[]
no_license
#include "obstacle.h" // Constructor Obstacle::Obstacle(Position* pos, QPixmap* sprite, bool test) : WorldObject(pos, sprite), test(test){} // Type std::string Obstacle::type(){return "obstacle";} // Probe for testing void Obstacle::probeObstacle(){ int height = RES_Y-pos->getY(); if(!probed && pos->getX() <...
C++
UTF-8
3,422
2.625
3
[]
no_license
///////////////////////////////////////////////////////////////////////////// // Copyright (c) Electronic Arts Inc. All rights reserved. ///////////////////////////////////////////////////////////////////////////// #ifndef EASTL_ALLOCATOR_H #define EASTL_ALLOCATOR_H #include <EASTL/internal/config.h> #include <EAST...
Java
UTF-8
4,339
2.703125
3
[]
no_license
import com.mysql.jdbc.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JOptionPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class CLIENTS { NewConnection newConnection = new NewConnection(); //Funtion of adding clients ...
Java
UTF-8
773
1.71875
2
[]
no_license
package org.camp.used.board.dto; import java.time.LocalDateTime; import java.util.List; import org.camp.used.board.dto.BoardInsertDTO.BoardInsertDTOBuilder; import org.camp.used.file.dto.FileResDTO; import org.camp.used.member.dto.MemberGetOneDTO; import org.camp.used.reply.dto.ReplyResDTO; import lombok.AllArgsCons...
Swift
UTF-8
2,302
3.4375
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause" ]
permissive
import Foundation public protocol NodeType { /// Render the node in the given context func render(_ context:Context) throws -> String /// Reference to this node's token var token: Token? { get } } /// Render the collection of nodes in the given context public func renderNodes(_ nodes:[NodeType], _ context:C...
Java
UTF-8
3,635
2.546875
3
[]
no_license
package com.ReadExcel; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import library.ExcelDataConfig; public class RWExcelData { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub ...
C++
UTF-8
56,599
2.765625
3
[]
no_license
// mpi2.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include "pch.h" #include <iostream> #include "mpi.h" #include <stdio.h> #pragma comment(lib, "msmpi.lib") #include "vector" #include "algorithm" #include <ctime> #include <ctime> #include <cmath> ...
Markdown
UTF-8
3,105
2.765625
3
[ "MIT" ]
permissive
# Tag 2: Wie entwickelt man Klassen? # Was ist OOP? ## 7. Ein einfaches objektorientiertes Programm ### Aufgabe 7.1 * Führe das Programm `rect.cpp` aus. * Klärt gemeinsam was der Quelltext tut. ### Aufgabe 7.2 Klärt gemeinsam folgende Begriffe: * Klasse * Instanz * Objektinstanzierung * Variablendefinition * ...
Java
UTF-8
1,689
2.84375
3
[]
no_license
package com.cybertek.tests.day5_xPath; import com.cybertek.utilities.WebDriverFactory; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class XpathLocator { public static void main(String[] args) throws InterruptedException { // Test case ...
Java
UTF-8
7,628
3.125
3
[]
no_license
package sample; import java.text.DecimalFormat; import java.util.ArrayList; public class Funktsioonid extends Main { //Muutujad: stringid ja double-id (et ka komadega arvestaks) String nimi; Double neto = 0.0; //Algväärtus 0. Kui pole teada, siis saab sisestada 0 või tühjaks jätta. Muul juhul number. ...
Markdown
UTF-8
847
2.578125
3
[ "BSD-3-Clause" ]
permissive
# Server Integrations These guides will cover how to integrate Panel applications with various external frameworks such as Django, FastAPI and Flask. ::::{grid} 1 3 3 3 :gutter: 1 1 1 2 :::{grid-item-card} Flask :link: flask :link-type: doc Discover to run Panel applications alongside an existing Flask server. ![F...
Java
UTF-8
264
2.265625
2
[]
no_license
package com.yytxdy.fim.sso.exceptions; import com.yytxdy.fim.sso.utils.ErrorCodes; public class DuplicatedSMSException extends BaseException { public DuplicatedSMSException() { super(ErrorCodes.DUPLICATED_SMS, "请勿重复发送验证码"); } }
JavaScript
UTF-8
858
2.84375
3
[ "MIT" ]
permissive
/** * Spreadsheets の TextFinder 機能を試すためのコンテナバインドスクリプト * * @vesion 1.0 * @author Kenji.Nakahara * @date: 2019/04/15 * @update: 2019/04/15 * @include libraries: */ function findAll(){ var spread = SpreadsheetApp.getActiveSpreadsheet() ; var sheet = spread.getSheets()[0] ; var textFinder = sheet.createTextF...
C++
UTF-8
611
3.25
3
[]
no_license
#include <iostream> #include <string> #include <cmath> using namespace std; class Solution { public: int reverse(int x) { int ne = x < 0 ? -1 : 1; int absx = ne * x; long re = 0; while(absx > 0){ re = re * 10 + absx % 10; absx /= 10; } if( ne > 0 && re > 2147483647L){ retu...
TypeScript
UTF-8
378
3.015625
3
[]
no_license
import { ShapeBuilder } from "./types"; export class CoreShapeBuilder implements ShapeBuilder { public createLine(start: Point, length: Length, angle: Angle = 0): Line { const radians = (angle * Math.PI) / 180; const end: Point = { x: start.x + length * Math.sin(radians), y: start.y - length * Ma...
Java
UTF-8
448
1.679688
2
[]
no_license
import play.*; import play.jobs.*; import play.test.*; import models.*; @OnApplicationStart public class Bootstrap extends Job { public void doJob() { // Check if the database is empty if(User.count() == 0) { try { //Fixtures.loadModels("initial-data.yml"...
Python
UTF-8
1,117
3.078125
3
[]
no_license
import copy class Solution(): def countSmaller(self, nums): # l = len(nums) # v = copy.deepcopy(nums) # v.sort() # bit = [0] * (l + 1) # print(v) # m = dict() # res = 0 # for i in range(l): # m[nums[i]] = i # for j in range...
Java
UTF-8
2,062
2.765625
3
[ "Apache-2.0" ]
permissive
package com.unsupervisedsentiment.analysis.classification; import java.util.ArrayList; import java.util.Set; import com.unsupervisedsentiment.analysis.model.SeedScoreModel; import com.unsupervisedsentiment.analysis.model.Tuple; public class PolarityAssigner { /** * Necessary because for some reason changes in a ...
PHP
UTF-8
939
2.6875
3
[]
no_license
<?php include 'check.php'; include('../crud/class/mysql_crud.php'); include '../functions.php'; /* * Output */ $db = new Database(); $db->connect(); $db->select('customers'); $customers = $db->getResult(); $aColumns = array('id', 'name', 'email', 'country', 'phone'); $output = array( "aaData" => array() ); $m ...
C#
UTF-8
1,743
3.15625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataAccess { public interface IUnitOfWork : IDisposable { /// <summary> /// Push the changes being tracked by the DbContext to the database. /// </summary> ...
Java
UTF-8
795
2.484375
2
[]
no_license
package shoppingcart; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import shoppingcart.model.Event; import shoppingcart.model.EventType; import javax.persistence.Entity; import javax.persistence.Table; import java.time.LocalDate; @AllArgsConstructor @N...
Markdown
UTF-8
1,912
3.0625
3
[]
no_license
# Frontend Mentor - Social media dashboard with theme switcher solution This is a solution to the [Social media dashboard with theme switcher challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/social-media-dashboard-with-theme-switcher-6oY8ozp_H). Frontend Mentor challenges help you improve your co...
Markdown
UTF-8
459
2.640625
3
[]
no_license
# Make Your Move: Image Recognition using Neural Networks Combined computer vision techniques and convolutional neural networks to accurately classify chess pieces and identified their location on a chessboard. Tools: Python, Google Cloud, Keras, TensorFlow, OpenCV, Pillow, Scikit-learn, NumPy, Seaborn, and others ...
TypeScript
UTF-8
953
2.875
3
[]
no_license
import { Highlight } from './highlight.pipe'; describe('Highlight Pipe', () => { let pipe: Highlight; beforeEach(() => (pipe = new Highlight())); it('should find a matching text', () => { const highlight = pipe.transform('Buy', 'Buy'); expect(highlight).toBe('<mark>Buy</mark>'); }); it('should on...
Java
UTF-8
12,277
1.867188
2
[]
no_license
package com.pixeldifusiones.redciudadana; import android.app.DatePickerDialog; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.PorterDuff; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.supp...
Ruby
UTF-8
574
2.875
3
[]
no_license
#!/usr/bin/ruby require_relative 'advent21' require 'test/unit' class TestAdvent21 < Test::Unit::TestCase TestData1_1 = <<EOF mxmxvkd kfcds sqjhc nhms (contains dairy, fish) trh fvjkl sbzzf mxmxvkd (contains dairy) sqjhc fvjkl (contains soy) sqjhc mxmxvkd sbzzf (contains fish) EOF def setup @test1_1 =...
PHP
UTF-8
765
2.5625
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Laravel\Passport\HasApiTokens; use Illuminate\Support\Facades\Hash; class User extends Authenticatable { use Notifiable, HasApiTokens; protected $fillable = [ 'name', 'email'...
PHP
UTF-8
839
2.703125
3
[]
no_license
<?php try{ $bdd = new PDO('mysql:host=localhost;dbname=JEU;charset=utf8', 'jeremydata', 'b302937ba5'); } catch(Exception $e) { die('Erreur : '.$e->getMessage()); } ?> <?php session_start(); $id = $_SESSION['id']; var_dump($id); $pass = $_POST['new_pass']; $pass2 = $_POST['new_pass2']; if (emp...
Python
UTF-8
1,764
2.5625
3
[]
no_license
import unittest import thefs from the import * the.use(thefs) class TestTheFs(unittest.TestCase): def setUp(self): self.r = self.assertRaises self.true = self.assertTrue def test_basename(self): self.true(expect("/a/b/c.md").to.have.basename("c.md")) with self.r(AssertionError...
Java
UTF-8
895
2.40625
2
[]
no_license
package bit.dail3.easyandroidanimationsdemo; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import com.easyandroidanimations.library.ExplodeAnimation; public class MainActivity extends AppCompatActivity { private ImageView im...
JavaScript
UTF-8
5,146
3.4375
3
[]
no_license
import React from "react"; import { Button, SafeAreaView, Text, TouchableHighlight, View } from "react-native"; const newGameState = { squares: Array(9).fill(null), //create an array of length 9 with null in it xIsNext: true }; export default class App extends React.Component { //must call constructor...
Python
UTF-8
615
3.09375
3
[]
no_license
import pygame from pygame.time import wait SCREEN_WIDTH = 320 SCREEN_HEIGHT = 240 SCREEN_BACKGROUND = (0, 0, 0) RECT_WIDTH = 10 RECT_HEIGHT = 10 RECT_X = 0 RECT_Y = 0 RECT_COLOR = (255, 255, 255) RECT_STEP = 20 TIME = 1000 def main(): pygame.init() screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGH...
Java
UTF-8
398
1.960938
2
[]
no_license
package com.amiltone.td_iem_411.model.pojo; import java.util.List; /** * Created by amiltonedev_lt027 on 01/11/2016. */ public interface BLEDevice { public static final int OFFLINE = 0; public static final int AVAILABLE = 1; public static final int CONNECTED = 2; int getStatus(); String getLas...
PHP
UTF-8
2,866
3
3
[]
no_license
<?php require_once "database.php"; class Customer extends Database{ public function createCustomer($first_name,$last_name,$username,$password,$email,$address,$contact){ $sql = "INSERT INTO customers(first_name,last_name,username,`password`,email,`address`,contact) VALUES('$first_name','$last_name'...
Shell
UTF-8
431
3.484375
3
[]
no_license
#!/bin/sh host_list=" server1 server2 " cur_time=`date +%Y%m%d-%H:%M` email=your@email for hosts in `echo $host_list` do if ! ping -c 1 $hosts >/dev/null 2>/dev/null then sleep 2 if ! ping -c 1 $hosts >/dev/null 2>/dev/null then echo "$hosts : Server or Network Died" >> $$.tmp echo >> $$...
C#
UTF-8
1,464
3.0625
3
[ "Apache-2.0" ]
permissive
namespace SecondAttempt { using Microsoft.Xna.Framework; public class FadeEffect : ImageEffect { public float FadeSpeed; public bool Increase; public float FadeMax; public float FadeMin; public FadeEffect() { FadeSpeed = 1; ...
Python
UTF-8
793
2.5625
3
[]
no_license
import os from twilio.rest import Client # alright then, keep your secrets # Get the Twilio SID and auth token from environment variables, see startup.sh twilio_sid = os.environ.get('TWILIO_SID') twilio_auth = os.environ.get('TWILIO_AUTH') # set up the Twilio client client = Client(twilio_sid, twilio_auth) # Prompt ...
JavaScript
UTF-8
860
2.875
3
[]
no_license
$("div.box").css("background-color","blue"); $("div.box").text("Lookie Lookie"); // $("div#box1").on("click",function() { // $("div#box1").css("height","500px"); // $("div#box1").css("width","500px"); // $("div#box2").css("height","200px"); // $("div#box2").css("width","200px"); // }) // $("div#box2").on("c...
Python
UTF-8
1,473
3.25
3
[ "BSD-3-Clause" ]
permissive
#! /usr/bin/env python """ # given a dataset json, manually add the sample_labels, sample_label_index , feature_labels Usage: export dataset json from mongo ./add_samples_to_dataset.py > dataset_with_samples.json import new dataset json to mongo Requires the following files to exist in the pwd: -- dataset.json :...
JavaScript
UTF-8
2,430
2.703125
3
[]
no_license
document.addEventListener("DOMContentLoaded", () => { let path = window.location.pathname; let pageFile = path.split("/").pop(); let pageName = pageFile.split(".")[0]; const getJSONProductsClass = new GetJSONProductsClass(); const mainCategoriesPageClass = new MainCategoriesPageClass(); getJSO...
Python
UTF-8
364
3
3
[ "MIT" ]
permissive
from queues.priority_queue.heap import MaxHeap class PriorityQueue: def __init__(self): self.priority_queue = MaxHeap() def insert(self, name, priority): self.priority_queue.insert(name, priority) def remove(self): return self.priority_queue.extractMax() def display(self): ...
SQL
UTF-8
3,712
3.390625
3
[]
no_license
--Creation vue lesdossiers drop view LesDossiers; drop table LesLocataires; drop table LesBillets; drop table LesInscriptions; drop table LesLogements; drop table LesResultats; drop table LesEpreuves; drop table LesDossiers_base; drop table LesSportifs; drop table LesEquipes; drop table LesDisciplines; drop table Les...
SQL
UTF-8
1,832
4.125
4
[]
no_license
--Dentre os filmes em cartaz, qual o filme com maior receita e qual sua receita e seu orçamento? select title, revenue, budget from tb_movie where now_playing = 'S' and revenue in (select Max(revenue) from tb_movie); /*Dentre as produtoras com filmes em cartaz ou filmes a serem lançados, qual teve o maior l...
PHP
UTF-8
1,793
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Service; use App\Models\Cadastro; use Illuminate\Support\Facades\DB; use Illuminate\Support\Arr; use Exception; class CadastroService { public static function store($request) { try{ $cadastro = Cadastro::create($request); return[ 'status' =>...
Java
UTF-8
2,523
2.171875
2
[]
no_license
package com.example.e_stem; import androidx.appcompat.app.AppCompatActivity; import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; public class Mainscreen extends AppCompatActivity { ...
Java
UTF-8
4,092
2.0625
2
[]
no_license
/******************************************************************************* * Copyright (c) 2003, 2007 IBM Corporation Licensed Material - Property of IBM. All rights reserved. * * US Government Users Restricted Rights - Use, duplication or disclosure v1.0 restricted by GSA ADP * Schedule Contract with I...
Java
UTF-8
5,923
2.265625
2
[ "Apache-2.0", "CC-BY-SA-3.0", "MIT", "BSD-3-Clause" ]
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 m...
PHP
UTF-8
976
2.703125
3
[ "MIT" ]
permissive
<?php namespace Addon\Module\Addons\Controller\Admin; use Streams\Controller\AdminController; class InstallerController extends AdminController { /** * Install an addon. * * @param $type * @param $slug * @return \Illuminate\Http\RedirectResponse */ public function install($type, ...
Java
UTF-8
1,906
2.4375
2
[]
no_license
package net.project.hibernate.model; import java.io.Serializable; import java.math.BigDecimal; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; /** @author Hibernate CodeGenerator */ public class...
Ruby
UTF-8
868
3.71875
4
[]
no_license
# Granny's Greeting is awesome because we can use it to introduce our players # to Granny, and let them know what Granny expects # # doctest: An example of using grannys_greeting # >> grannys_greeting('Sonny') # => "Hello Sonny!" def grannys_greeting(name) "Hello #{name}!" end # doctest: prompt_sonny # >...
Python
UTF-8
644
3.34375
3
[]
no_license
import string from collections import OrderedDict def solution(s, n): alphabets = OrderedDict(zip(string.ascii_lowercase,range(1,27))) result = [] for c in s: if c.isalpha(): index = (alphabets[c.lower()] + n) % 26 if index == 0: index = 26 for ke...
Markdown
UTF-8
5,387
3.015625
3
[ "MIT" ]
permissive
# Laravel Favicon [![Latest Version on Packagist](https://img.shields.io/packagist/v/beyondcode/laravel-favicon.svg?style=flat-square)](https://packagist.org/packages/beyondcode/laravel-favicon) [![Build Status](https://img.shields.io/travis/beyondcode/laravel-favicon/master.svg?style=flat-square)](https://travis-ci....
Java
UTF-8
6,768
2.0625
2
[]
no_license
/* * Created on 10/10/2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package mila.lexicon.dbUtils; /** * @author dalia bojan * @version 1.0 * */ public class PrefixRecord { String prefix = ""; String description = ""; boole...