language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Markdown
UTF-8
1,875
3.34375
3
[ "MIT" ]
permissive
--- layout: project type: project image: images/starwars.png title: Star Wars Dodgeball permalink: projects/starwarsdodgeball # All dates must be YYYY-MM-DD format! date: 2018-09-13 labels: - Java - EZ - Graphics - Game Design summary: A space-themed computer game I designed for ICS 111. --- <div class="ui lar...
Markdown
UTF-8
623
3.609375
4
[ "MIT" ]
permissive
# [itp-w1] Basic Calculator Our second group project will be to create a program that acts as a basic four function calculator. If the operation is not `add`, `subtract`, `multiply`, or `divide`, it needs to return 'Invalid operation' All students will fork this repo and set up their cloud9 for this project individua...
Shell
UTF-8
468
2.78125
3
[]
no_license
#!/bin/bash # create/run the container, or if it already exists, restart the existing one # use 'docker container rm ottwatch-dev' to reset from the beginning echo "" echo "" echo "cd ottwatch; bin/rails db:setup" echo "/etc/init.d/mysql start" echo "alias m='mysql ottwatch_dev'" echo "mysql ottwatch_dev < db/ottwatc...
SQL
UTF-8
164
3.25
3
[]
no_license
select e.* from recursos.empleado e where e.sueldo >= ( select max( x.sueldo) from recursos.empleado x where x.iddepartamento = e.iddepartamento );
Ruby
UTF-8
2,962
2.640625
3
[ "Apache-2.0" ]
permissive
# # Cookbook Name:: sys # File:: libraries/sys_harry.rb # # Copyright 2016-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH # # Authors: # Matthias Pausch <m.pausch@gsi.de> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
C
WINDOWS-1250
351
3.375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<conio.h> main() { system("color f9"); //Ttulo del programa y para que sirve printf("Programa 7: \"Programa para cuenta ascendiente\""); int a; //Se aplica un for para que cuente e imprima valores del 1 al 10 for (a=1;a<=10;a++) printf("\n\n El contador ...
Java
UTF-8
324
2.609375
3
[]
no_license
package java.security.cert; public abstract class CRL { private String type; public abstract boolean isRevoked(Certificate certificate); public abstract String toString(); protected CRL(String type) { this.type = type; } public final String getType() { return this.type; ...
PHP
UTF-8
747
2.515625
3
[]
no_license
<?php header('Access-Control-Allow-Origin: *'); require_once '../negocio/Colaborador.php'; require_once '../util/funciones/Funciones.clase.php'; $dni = $_POST["dni"]; $nombres = $_POST["nombres"]; $apellidos = $_POST["apellidos"]; $estado = $_POST["estado"]; try { $obj = new Colaborador(); $obj->setDni($dn...
JavaScript
UTF-8
570
2.515625
3
[]
no_license
console.log('test') console.log('test') var fs = require('fs') var proto = require('proto') console.log(fs.readdirSync('.')) var Class = proto(function() { this.init = function(x) { this.x = x } this.mate = function() { console.log(this.x) } }) var x = Class(5) x.mate() var extension = require('hello')...
Python
UTF-8
1,230
3.109375
3
[]
no_license
from console.console_class import Console from common.inuyasha_symbols import INVALID_CHOICE_VALUE,\ ERROR_INVALID_MAIN_MENU_CHOICE from common.banner import Banner class MainMenu(object): @staticmethod def Show(): Console.Clear() Banner.Print() print(" ...
C++
ISO-8859-2
877
3.359375
3
[]
no_license
#pragma once // Name: ThreadSignaler.h // Author: Jrmi Panneton // Description: Thread signaling class #include <condition_variable> #include <mutex> /// @brief Signaler that allows communication between different organs /// @author Jeremi Panneton /// @ingroup engine class ThreadSignaler { public: /...
PHP
UTF-8
1,791
3.1875
3
[]
no_license
<?php $pronouns = array ('I', 'You', 'He/She','We', 'You', 'They'); foreach($pronouns as $pronouns){ if($pronouns != 'He/She'){ echo $pronouns." code<br>"; } else { echo $pronouns." codes<br>"; } } $cpt = 0; while ($cpt<120){ echo $cpt; ...
C#
UTF-8
2,687
3.359375
3
[]
no_license
using System; namespace SpanskTest { class Program { static string word = "Hablar"; static string[] ending = new string[6]; static bool continuation = true; static int slecetion; static void Main(string[] args) { Console.Title = "Fremtid";...
Markdown
UTF-8
2,139
3.265625
3
[ "MIT" ]
permissive
# Animation This library was originally created as part of my blog series, Dynamic Animation: - [Part 1](http://theliquidfire.com/2015/01/02/dynamic-animation-part-1/) - [Part 2](http://theliquidfire.com/2015/01/09/dynamic-animation-part-2/) It has since been used in several of my [tutorial projects](http://theliquid...
Java
UTF-8
843
2.1875
2
[]
no_license
package ru.sysout; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.transaction.annotation.Transactional; import ru.sysout.model.City; import javax.persistence.EntityManager; import javax.persistence.Per...
Python
UTF-8
325
3.03125
3
[]
no_license
import threading from time import sleep def wait(): sleep(2) t1 = threading.Thread( target=wait, name='Wait-Deamon', daemon=True ) t2 = threading.Thread( target=wait, name='Wait', daemon=False ) t1.start() t2.start() print(t1.is_alive()) print(t1.name) print(t2.is_alive()) print(t2.n...
PHP
UTF-8
1,564
2.796875
3
[ "MIT" ]
permissive
<?php namespace App\Model; use Illuminate\Database\Eloquent\Model; use App\Constants; class MessageModel extends Model { //定义表名 protected $table = 'message'; //去掉时间戳维护 public $timestamps = false; /** * 添加留言 * @param $content 留言内容 * @param $email 邮箱地址 * @param $uid 用户id ...
Markdown
UTF-8
7,401
3.3125
3
[]
no_license
--- title: Hello Git date: 2017-10-20 14:01:31 categories: Hello World tags: - Hello World - Git --- Git 入门 <!-- more --> # 安装 Ubuntu :通过执行 `sudo apt-get install git` Windows :从 [https://git-for-windows.github.io](https://git-for-windows.github.io) 下载 安装完成后,设置名字和 Email: ```git $ git config --global user.name "...
Python
UTF-8
396
2.515625
3
[ "Unlicense" ]
permissive
from util import dbman def enbl(ctx) -> bool: """ >>> RETURNS TRUE IF THE COMMAND IS ENABLED <<< CTX [CTX] - Context, just used for the command name """ try: if ctx.guild: return dbman.get('com', ctx.command.name, id=int(ctx.guild.id)) # Command is en/disabled else: # In...
Markdown
UTF-8
6,013
3.15625
3
[]
no_license
# Javascript의 비동기 프로그래밍 방식 > 이 글의 타이틀은 'Javascript의' 비동기 프로그래밍 방식이다. 하지만 비동기 프로그래밍은 Javascript 엔진을 위한 것이 아니라 **브라우저** 를 위한 것이라는 관점을 잊지 않았으면 한다. ## 동기와 비동기의 차이점 - **동기적** 실행 예시 ``` console.log("hello"); function foo(){ console.log("happy") } foo(); console.log("world!"); // hello // happy // world! ``` - **비동기...
Java
UTF-8
1,628
2.296875
2
[]
no_license
package com.example.block; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Button; import android.widget.NumberPicker; import android.widget.Toa...
JavaScript
UTF-8
638
2.859375
3
[]
no_license
const counter = (numberPlace, plusButton, restButton, hiddenInput) => { if (numberPlace != null) { let counter = 0; numberPlace.innerText = 0; hiddenInput.value = counter; plusButton.addEventListener("click", () => { counter += 1; numberPlace.innerText = counter; hiddenInput.value = ...
C++
UTF-8
896
2.78125
3
[]
no_license
#include "stdafx.h" #include <assert.h> #include "CNodeTester.h" #include "CNode.h" /********************************** Tester ********************************** Input : nothing Required : nothing Output : nothing Consequence : a serie of test is made one the class CNode **********************************/ void CNodeT...
Markdown
UTF-8
1,225
3.484375
3
[ "MIT" ]
permissive
### 1. If you had to describe semantic HTML to the next cohort of students, what would you say? ##### Semantic HTML is HTML that uses tag names that are more specific about what is contained within them. For example, when using a <div> tag, there is no way of knowing what is contained in that tag based on the tag it...
Java
UTF-8
623
2.078125
2
[]
no_license
package com.newer.category.web.servlet; /** * 分类模块WEB层 * @author qdmmy6 * */ public class CategoryServlet {// extends BaseServlet // private CategoryService categoryService = new CategoryService(); // // /** // * 查询所有分类 // */ // public String findAll(HttpServletRequest req, HttpServletResponse resp) // throw...
Rust
UTF-8
1,399
3
3
[ "Apache-2.0" ]
permissive
use std::{ io::{Error, ErrorKind}, path::PathBuf, }; use filenamify::filenamify; use serde::Deserialize; use crate::path::{config_file, repositories_dir}; #[derive(Deserialize, Default)] pub struct Config { #[serde(default)] pub repositories: Vec<Repository>, #[serde(default)] pub experiment...
C++
UTF-8
260
3.25
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main(){ string animals[7] = {"長頸鹿", "獅子", "老虎", "河馬", "熊", "兔子", "斑馬"}; for(int i = 0; i < 7; i++){ cout << animals[i] << endl; } return 0; }
Python
UTF-8
3,137
3.390625
3
[]
no_license
# importing useful libraries (you may need more) import numpy as np # numerical package import matplotlib.pyplot as plt # plotting package from matplotlib import rc rc('font',**{'family':'serif'}) # This is for Latex writing # definition of constants and variables k = 8.61734e-5 # Boltzmann constant # add all...
Python
UTF-8
168
2.78125
3
[]
no_license
for t in range(int(input())): x=input();l=len(x) a=[0 for i in range(10)] for i in range(l):a[int(x[i])]+=1 print(f'#{t+1}', sum([1 for i in a if i>0]))
SQL
UHC
11,266
3.578125
4
[]
no_license
select*from COMIC_EMPLOYEE; desc COMIC_EMPLOYEE; drop table COMIC_EMPLOYEE CASCADE CONSTRAINTS; drop table COMIC_WORKINGHOUR; drop table COMIC_PRODUCTORDER; drop table COMIC_PRODUCTSTOCK; drop table COMIC_BOOK; drop table COMIC_ROOM CASCADE CONSTRAINTS; drop table COMIC_ROOMUSE; drop table COMIC_ORDER; drop table COM...
Markdown
UTF-8
9,568
3.28125
3
[]
no_license
## Cards 1. A card is a piece of paper with unique related data that serves as an entry point to more detailed information. For example, a card could contain a photo, text, and a link about a single subject. 2. Cards have a constant width and variable height. The maximum height is limited to the height of the availab...
Python
UTF-8
537
3.8125
4
[]
no_license
# -*- coding: utf-8 -*- """ Created on Mon Mar 22 15:29:39 2021 @author: Pipe """ # Escribir un programa que solicite por teclado 10 notas de alumnos y nos # informe cuántos tienen notas mayores o iguales a 7 y cuántos menores. aprobados = 0 reprobados = 0 for i in range(10): nota = int(input("In...
Java
UTF-8
2,121
2.15625
2
[]
no_license
package br.com.unipar.alissonchagasaare; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.EditText; public class MainActivity extends AppCompatActivity { private EditText edAtivo, edlucro_Liquido, edPatrimon...
Java
UTF-8
6,123
1.960938
2
[]
no_license
package com.example.dss.project.Fragment; import android.app.DatePickerDialog; import android.app.TimePickerDialog; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.text.InputType; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup...
Markdown
UTF-8
2,904
2.578125
3
[ "MIT" ]
permissive
--- title: "だから、これはゆうくんと私についてです。" date: 2019-12-29 13:30:19 categories: - General tags: - "祐くん" header: image: /assets/images/20191229132657.jpg og_image: /assets/images/20191229132657.jpg --- だから、これはゆうくんと私についてです。」「あなた…私…私も彼と話をしました。私は彼に、私だけが持っている人生に満足するだろうと言った。同時に、私は彼に、私はおそらく女の子の世界では決して成長しないことを理解したと語った...
JavaScript
UTF-8
1,507
3.34375
3
[ "MIT" ]
permissive
/** * */ var n = 0; function count(){ n = n+1; document.getElementById("number").innerHTML=n; zero(); } function zero(){ if(document.getElementById("number").innerHTML=="0"){ document.getElementById("count").style.display="none"; }else{ document.getElementById("count").style.display="block"...
TypeScript
UTF-8
633
2.515625
3
[]
no_license
import { RedisClient } from "redis"; import { Request, Response, NextFunction } from "express"; class Authorization { constructor(private redis: RedisClient) { this.redis = redis; } isAuthorized = (req: Request, res: Response, next: NextFunction) => { const { authorization } = req.headers; ...
Python
UTF-8
897
2.703125
3
[ "Apache-2.0" ]
permissive
import requests import json import pprint import sys def hit_url(url, data_dict): res = requests.get(url).text.split("\n") for each_key in res: new_url= url+"/"+each_key if each_key.endswith('/'): another_key = each_key.split('/')[-2] final_meta[another_key]={} ...
Python
UTF-8
7,340
2.65625
3
[]
no_license
#!/usr/local/bin/python3 from kivy.app import App from kivy.uix.image import Image from kivy.uix.boxlayout import BoxLayout from kivy.uix.relativelayout import RelativeLayout from kivy.uix.label import Label from kivy.properties import ListProperty, ObjectProperty, \ NumericProperty, String...
PHP
UTF-8
1,772
2.640625
3
[]
no_license
<?php function hiba($hibakod){ header('Location: index.php?hiba=' . $hibakod); die; } require_once('adatkezeles.php'); session_start(); $fn = trim($_POST['fnev']); $j1 = trim($_POST['jszo1']); $j2 = trim($_POST['jszo2']); if(felhasznaloLetezik($fn)) hiba('fletezik'); if(strlen($fn) < 5 || strlen($fn) > 15) ...
Java
UTF-8
669
2.515625
3
[]
no_license
package shared.communication.params.move; /** * * Defines an accept trade command for the server. * */ public class AcceptTrade_Params { private final String type = "acceptTrade"; private int playerIndex; private boolean willAccept; public AcceptTrade_Params(int playerIndex, boolean willAccept) { this.w...
C++
UTF-8
3,041
2.65625
3
[ "MIT" ]
permissive
#pragma once #include <stdint.h> #include <vector> #include <array> #include <ostream> #include "USBDevice.h" #include "crazyflieLinkCpp/utils.hpp" namespace bitcraze { namespace crazyflieLinkCpp { #define ACK_MAXSIZE 33 class Crazyradio : public USBDevice { public: enum Datarate { Datarate_250KP...
C
UTF-8
1,352
3.25
3
[]
no_license
#include<stdio.h> #include<ctype.h> #include "calc.h" int getop(char s[]) { int i, c; int c1, c2; while ((s[0] = c = getch()) == ' ' || c == '\t'); s[1] = '\0'; if (!isdigit(c) && c != '.' && c != '-' && c != 's' && c != 'p' && c != 'e') return c; i = 0; switch (c) { case '-': ...
Python
UTF-8
1,538
3.28125
3
[]
no_license
from heapq import heappush, heappop, heappushpop, heapify class Log(object): """Neatly formated and accessable Log""" def __init__(self, raw_line): """Log variables kept as string rep for simplicity""" aux = raw_line.split(" ") bytes = 0 if aux[-1] == "-\n" else aux[-1] self.host = aux[0] self.timestamp =...
Markdown
UTF-8
770
2.875
3
[]
no_license
--- title: messageRange description: Indicates a range of chat messages image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png --- # Constructor: messageRange [Back to constructors index](index.md) Indicates a range of chat messages ### Attributes: | Name | Type | Required | Descr...
C++
UTF-8
3,062
2.8125
3
[]
no_license
#ifndef TRANSFORMTOOL_H #define TRANSFORMTOOL_H #include <ngl/Mat4.h> #include "config.h" /// TODO: need serious refactoring NO COMMENT :( class TransformTool { public: TransformTool() { reset(); } void reset() { m_angle0 = m_angle1 = m_angle2 = 0; m_scale = 1; m_translation.set(0...
Java
UTF-8
151,632
1.601563
2
[]
no_license
package TokenNamepackage org TokenNameIdentifier . TokenNameDOT apache TokenNameIdentifier . TokenNameDOT batik TokenNameIdentifier . TokenNameDOT css TokenNameIdentifier . TokenNameDOT engine TokenNameIdentifier . TokenNameDOT value TokenNameIdentifier . TokenNameDOT svg TokenNameIdentifier ; TokenNameSEMICOLON import...
Java
UTF-8
1,303
2.71875
3
[ "Apache-2.0" ]
permissive
package lambdify.apigateway; import lombok.val; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; public class URLTokenizerTest { @DisplayName("Can tokenize the ro...
JavaScript
UTF-8
7,127
2.640625
3
[]
no_license
const request = require("request"); const util = require("util"); const rp = util.promisify(request); const sleep = util.promisify(setTimeout); const cheerio = require('cheerio'); const { URL } = require('url'); let seenLinks = {}; let rootNode = {}; let currentNode = {}; let linksQueue = []; let printL...
SQL
UTF-8
560
3.953125
4
[]
no_license
WITH t1 AS (SELECT (c.city || ', ' || co.country) city_country, DATE_TRUNC('month',p.payment_date) AS month, SUM(p.amount) total_usd FROM payment p JOIN staff s ON s.staff_id = p.staff_id JOIN store st ON st.store_id = s.store_id JOIN address a ON a.address_id = st.address_id JOIN city c ON c.city_id = a.city_id JOIN c...
Markdown
UTF-8
897
3.15625
3
[]
no_license
# Information-Extraction-of-Football-players Information extraction in Python This project consists of 6 Tasks: Task 1: Creating a function that takes each document and performs: 1) sentence segmentation 2) tokenization 3) part-of-speech tagging Task 2:Creating a function that will take the list of tokens with POS ...
PHP
UTF-8
1,662
2.90625
3
[]
no_license
<?php // Import the "Grab Bag" require("common.php"); // Open an (OO) MySQL Connection $conn = new mysqli($GLOBALS["dbhost"], $GLOBALS["dbuser"], $GLOBALS["dbpass"], $GLOBALS["dbname"]); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Get the...
JavaScript
UTF-8
1,123
2.640625
3
[]
no_license
var express = require('express'); var router = express.Router(); const api = require('../DAL/api'); const logger = require('../logger'); const {validateData} = require('../utilities/validations') const catchAsync = fn => { return (req, res, next) => { fn(req, res, next).catch(next); }; }; //Get all or...
Go
UTF-8
534
2.640625
3
[ "BSD-3-Clause" ]
permissive
// (c) 2021, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package compression import ( "testing" "github.com/stretchr/testify/assert" ) func TestNoCompressor(t *testing.T) { data := []byte{1, 2, 3} compressor := NewNoCompressor() compressedBytes, err := compressor.Compress(d...
C++
GB18030
19,955
2.65625
3
[]
no_license
#include "Definition.h" using namespace std; extern int MaxCustSingleLine; //˿ extern int MaxLine; //λжУ extern int MaxSeqLen; //ȴȣ extern int MaxCustCheck; //ڶ󳤶ȣ extern int MinCheckTime; //һΰʱ extern int MaxCheckTime; //һΰʱ extern int MinRestTimeLen; //һϢʱ extern int MaxRestTimeLen; //һϢʱ extern i...
Shell
UTF-8
7,383
4.125
4
[ "WTFPL" ]
permissive
#!/bin/bash #-------------------------------------------------------------------------------- # CONSTANTS #-------------------------------------------------------------------------------- CONFFILE="${0/.sh/.conf}" # readCSVFields.conf where separator is defined #AWK="/usr/local/bin/gawk" # the MAC AWK version (gawk ...
Markdown
UTF-8
3,208
2.609375
3
[]
no_license
### 「推荐细读」给Rust提交PR全记录 该文记录了作者从发现问题,解决问题,到给Rust提PR的全过程,非常推荐大家仔细阅读一遍。 [原文](https://blog.dend.ro/rust-and-the-case-of-the-redundant-comparison) --- ### 「推荐仔细品味」「油管」从C到Rust的一些模式 该视频是GUADEC 2018(可能是什么大会)上面第一个主题分享,主要内容是介绍了如何将遗留的C语言的系统用Rust进行重构。视频中给出了一些模式和技巧,比如如何给C语言暴露Rust迭代器等,推荐仔细看看。 [原文](https://www.reddit.com/r/rust...
Java
UTF-8
924
2
2
[]
no_license
package top.fzqblog.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import top.fzqblog.mapper.LoginLogMapper; import top.fzqblog.po.model.LoginLog; import top.fzqblog.po.query.LoginLogQuery; import top.fzqblog.service....
Markdown
UTF-8
38
3.40625
3
[]
no_license
# Markup-for-PHP-C-developers_Homework
C#
UTF-8
472
2.5625
3
[]
no_license
using System; namespace ComponentEngine { public class Component { public Component() {} virtual public void SetArguments(ComponentArguments arguments) {} virtual public void Boot() { HasBooted = true; } public bool HasBooted { get; ...
Java
UTF-8
838
1.945313
2
[]
no_license
package com.jianfei.d.base.filter.xss; import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web....
C++
UTF-8
4,634
2.78125
3
[ "BSD-3-Clause" ]
permissive
#include "gtexture.hpp" GTexture::GTexture() { } GTexture::GTexture(SDL_Renderer *renderer, std::string filename, float angle) { SDL_Surface *tmpSurface = IMG_Load(filename.c_str()); if (tmpSurface == NULL) { std::cout << "Could not load image " << filename << " : " << IMG_GetError() << std::endl; #...
C++
UTF-8
1,969
3.625
4
[]
no_license
#pragma once class CPoint { public: int x, y; CPoint() { this->initialize(0, 0); } CPoint(int component) { this->initialize(component, component); } CPoint(int x, int y) { this->initialize(x, y); } void initialize(int x, int y) { this->x = x; this->y = y; } CPoint operator + (const CPoint &o...
Java
UTF-8
4,477
2.171875
2
[]
no_license
package com.zhang.ddd.presentation.facade; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import com.zhang.ddd.domain.aggregate.post.entity.Answer; import com.zhang.ddd.domain.aggregate.post.repository.QuestionRepository; import com.zhang.ddd.domain.aggregate.user.entity.User; import...
Python
UTF-8
92
3.296875
3
[ "MIT" ]
permissive
l = [] l.insert(-1,'a') print(l) l.insert(-1,'b') print(l) l.insert(-1,'c') print(l)
Java
UTF-8
5,685
1.945313
2
[]
no_license
package com.example.siddharth.khelkhelo; import android.app.ProgressDialog; import android.media.ExifInterface; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Gr...
Shell
UTF-8
131
3.015625
3
[]
no_license
#!/bin/bash echo "enter the 1st num" read num1 echo "enter the 2nd num" read num2 sum=$(($num1+$num2)) echo "sum is : $sum"
C
UTF-8
1,333
2.625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * debug.c * * Created on: 08.03.2019 * Author: Alexey Adadurov */ #include "stm32f1xx_hal.h" #include "usbd_def.h" #include <stdlib.h> static UART_HandleTypeDef *debugUart; static unsigned int debugCounter; extern void trace_write_init(UART_HandleTypeDef *huart) { debugUart = huart; debugCounter = 0...
TypeScript
UTF-8
3,488
2.875
3
[ "MIT" ]
permissive
import { parseL1, parseL1Exp, Exp, makePrimOp, makeBoolExp } from "../../src/L1/L1-ast"; import { evalL1program, makeEnv, makeEmptyEnv, evalSequence } from '../../src/L1/L1-eval'; import { bind, makeOk, isFailure } from '../../src/shared/result'; import { parse as p } from "../../src/shared/parser"; describe('L1 ...
C#
UTF-8
5,054
2.8125
3
[ "Apache-2.0" ]
permissive
using System.Linq.Expressions; using commercetools.Sdk.Linq.Query.Visitors; namespace commercetools.Sdk.Linq.Query.Converters { // | || // & && public class BinaryLogicalPredicateVisitorConverter : IQueryPredicateVisitorConverter { public int Priority { get; } = 4; public bool CanConv...
Java
UTF-8
2,262
2.78125
3
[]
no_license
package com.nixsolutions.platform.service.impl; import com.nixsolutions.platform.persistence.entity.Company; import com.nixsolutions.platform.persistence.repository.CompanyRepository; import com.nixsolutions.platform.service.CompanyService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springfr...
Markdown
UTF-8
1,982
2.96875
3
[]
no_license
# Simple_Password_Manager_v1.0 Software Development of: "Simple Password Manager v1.0". Programmed by Rizky Khapidsyah. Built and developed with Visual Basic 6 programming. The target has been applied for basic learning of VB programming. For the first use of the program, please follow the steps below: <br> 1. Please ...
TypeScript
UTF-8
4,812
3.4375
3
[]
no_license
import { buildActionsBuilder } from '../buildActionsBuilder' import { TExpression, IDictionary } from '../types' type TPredicate<T> = (value: T) => boolean interface IPeriod<T> { start: T end: T } function evaluate<T> (handler: any, value: T) { return typeof handler === 'function' ? handler(value) : handler }...
Markdown
UTF-8
2,418
3.125
3
[]
no_license
# Frontend Mentor - Order summary card solution This is a solution to the [Order summary card challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/order-summary-component-QlPmajDUj). Frontend Mentor challenges help you improve your coding skills by building realistic projects. ## Table of contents ...
C++
UTF-8
2,126
3.8125
4
[ "MIT" ]
permissive
/** A Discrete Mathematics professor has a class of N students. Frustrated with their lack of discipline, he decides to cancel class if fewer than K students are present when class starts. Given the arrival time of each student, determine if the class is canceled. Input Format The first line of input contains T, the...
C++
UTF-8
1,042
3.421875
3
[]
no_license
/** PxGrp Class * Represents groups of pixels in the program. * * Methods defined in PxGrp.cpp * * @author Andy Blackmore <axb803@bham.ac.uk> */ #include <string> using namespace std; class PxGrp { private: // Functions and vars usable only by the class int value; // How many pixels in this group are on. int s...
Markdown
UTF-8
536
2.796875
3
[]
no_license
# AnalogSea Signup Form This is a hypothetical project for a front-end web-dev exercise. The Scenario: AnalogSea Signup Form - Code up the first version (aka, v1) of a simple account creation page - The client wants clean, SEO and accessibility friendly HTML. - Deliver a live version of the page they can preview o...
C#
UTF-8
3,742
2.5625
3
[]
no_license
using ChickenFarm.GrainContracts; using Microsoft.Extensions.Logging; using Orleans; using Orleans.Configuration; using Orleans.Runtime; using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; namespace ChickenFarm.ClientConsole { class Program { static ...
C#
UTF-8
15,309
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static ANTOTOLib.DataModel; namespace ANTOTOLib { public partial class Company { public class CompanyInfo { public int? CompanyId { get; set; } pub...
Python
UTF-8
1,073
2.625
3
[ "MIT" ]
permissive
from predict_api import load_data, preprocess, predict # File locations features = "feature_data/feature_values.h5" job_desc = "feature_data/job_descriptions.h5" glove_file = "feature_data/GloVe/glove.6B.50d.txt" model_file = "model/neural_network.h5" # User profile major_input = "Computer Science" degree_type_input ...
Java
UTF-8
12,202
1.523438
2
[]
no_license
/* * eGovFrame LDAP조직도관리 * Copyright The eGovFrame Open Community (http://open.egovframe.go.kr)). * * 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/licens...
Go
UTF-8
707
2.96875
3
[ "MIT" ]
permissive
// Link - https://leetcode.com/problems/top-k-frequent-elements/ func topKFrequent(nums []int, k int) []int { if k == len(nums) {return nums;} countMap := make(map[int]int); for _, value := range nums { count,_ := countMap[value]; countMap[value] = count+1; } bucket := make([][]int,...
JavaScript
UTF-8
3,755
2.65625
3
[]
no_license
import React, { useState } from 'react'; import { StyleSheet, Text, View, TextInput, TouchableOpacity } from 'react-native'; import ResultScreen from '../ResultScreen/' function TimeKeeper() { const [minutes, setMinutes] = useState(0) const [hours, setHours] = useState(0) const [result, setR...
Java
UTF-8
2,719
3.25
3
[]
no_license
import java.util.ArrayList; public class arraylist { public static void main(String[] args) { // System.out.println(gss("abc")); // System.out.println(gsswithascii("ab")); System.out.println(getkpc("367")); } // public static ArrayList<String> gss1(String str) { // if(str.length()==0) { // ArrayList<Stri...
JavaScript
UTF-8
466
4.40625
4
[]
no_license
// Negative Outlook // Given an array, create and return a new one containing all the // values of the provided array, made negative // (not simply multiplied by -1). Given [1,-3,5], return [-1,-3,-5]. function negOutlook(arr) { var newArr = []; for(var i = 0; i < arr.length; i++) { if(arr[i...
JavaScript
UTF-8
2,290
2.96875
3
[ "MIT" ]
permissive
(function( root, factory ) { if( typeof exports === "object" && typeof exports.nodeName !== "string" ) { // CommonJS module.exports = factory( require( "characterset" ) ); } else { // Browser root.GlyphHanger = factory( root.CharacterSet ); } }( this, function( CharacterSet ) { var GH = function() {...
Java
UTF-8
351
1.859375
2
[]
no_license
package com.example.administrator.demo2018.injection.scope; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import javax.inject.Scope; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Created by Administrator on 2018\4\22 0022. */ @Scope @Retention(RUNTIME) public ...
JavaScript
UTF-8
3,150
2.71875
3
[ "MIT" ]
permissive
// tested import sinonMock from './../src/sinon-mock'; // services import utils from './../src/utils'; jest.mock('./../src/utils'); describe('sinonMock', () => { const mocks = {}; let testSpecificMocks; beforeAll(() => { mocks.value = function () {/*impl*/}; mocks.value.isSinonProxy = true; mocks.v...
JavaScript
UTF-8
1,494
2.734375
3
[]
no_license
define(['text!./templates/task.html'], function (template) { var taskView = Backbone.View.extend({ // Properties template: _.template(template), // Backbone tagName: 'li', initialize: function () { _.bindAll(this); this.listenTo(this.model, 'change', this.onModelChange); this.listenTo(this.mod...
Swift
UTF-8
1,588
2.78125
3
[ "Apache-2.0", "LicenseRef-scancode-unknown", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "MIT", "Unlicense" ]
permissive
// // 🦠 Corona-Warn-App // import Foundation enum DCCPublicKeyRegistrationError: LocalizedError, Equatable { case badRequest case tokenNotAllowed case tokenDoesNotExist case tokenAlreadyAssigned case internalServerError case unhandledResponse(Int) case noNetworkConnection // MARK: - Protocol LocalizedError...
Markdown
UTF-8
9,184
2.71875
3
[ "LicenseRef-scancode-unknown", "EPL-1.0", "CC-BY-SA-4.0", "BSD-3-Clause", "CC-BY-SA-3.0", "CC-BY-4.0", "GPL-1.0-only", "ICU", "LGPL-3.0-only", "MPL-1.0", "CDDL-1.0", "GPL-2.0-only", "GPL-1.0-or-later", "MPL-2.0", "Apache-2.0", "LGPL-2.0-only", "BSD-2-Clause" ]
permissive
# openapi-java-client Service Catalog APIs - API version: 1.0 This specifies a **RESTful API** for Service Catalog. # Authentication Our REST APIs are protected using OAuth2 and access control is achieved through scopes. Before you start invoking the the API you need to obtain an access token with the required scope...
PHP
UTF-8
90,232
2.890625
3
[]
no_license
<?php class Product { // property declaration public $id = 0; public $acct = ''; public $eventCode = ''; public $code = ''; public $categoryPrefix = ''; public $description = ''; public $description2 = ''; public $price = 0; public $value = 0; public $linkData = ''; pub...
TypeScript
UTF-8
3,084
2.765625
3
[]
no_license
import { HSlider } from "./HSlider"; import { VSlider } from "./VSlider"; import { Nentry } from "./Nentry"; import { Button } from "./Button"; import { Checkbox } from "./Checkbox"; import { Knob } from "./Knob"; import { Menu } from "./Menu"; import { Radio } from "./Radio"; import { Led } from "./Led"; import { Nume...
Java
UTF-8
1,837
2.078125
2
[]
no_license
package ng.bayue.backend.controller.basedata; import java.util.List; import ng.bayue.backend.ao.basedata.StrategyAO; import ng.bayue.backend.util.ResultMessage; import ng.bayue.base.domain.StrategyDO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; imp...
Python
UTF-8
279
3.921875
4
[]
no_license
numbers = map(int, input("numbers").split()) even_count=0 odd_count = 0 for num in numbers: if num % 2 == 0: even_count += 1 else: odd_count += 1 print("Even numbers in the list: ", even_count) print("Odd numbers in the list: ", odd_count)
C++
UTF-8
498
2.53125
3
[]
no_license
#pragma once #include <iostream> #include <SFML\Graphics.hpp> #include <SFML\Audio.hpp> class Bomb : public sf::CircleShape { public: Bomb(); ~Bomb(); bool isFlying(); void stopFlight(); void shoot(); void detonate(); bool isDetonated(); void draw(sf::RenderWindow &, double); void revertDetonation(); priv...
Python
UTF-8
432
2.578125
3
[]
no_license
#!/usr/bin/python3 # -*- coding: utf-8 -* class Categorie: """class for object Categorie""" def __init__(self): self.id_categorie = 0 self.nom = "" class Product: """class for object Product""" def __init__(self): self.ean_produit = 0 self.nom = "" self.marq...
Markdown
UTF-8
841
2.671875
3
[]
no_license
# React Contact List ## About this app This app uses React, Create-react-app and Auth0 to authenticate users. It's a phone list that stores user input into the MongoDB. ## Starting the app locally Start by installing front and backend dependencies. While in this directory, run the following command: ``` yarn inst...
Rust
UTF-8
11,614
2.921875
3
[]
no_license
use std::fs::File; use std::io::{self, Read}; #[derive(PartialEq, Debug)] enum Side { White, Black, } #[derive(Debug)] struct Board { fen: String, units: i32, // relative size of a square //board: usize, // = 8*units corner_radius: i32, margin: i32, border: i32, font: String, ...
Markdown
UTF-8
4,951
3.0625
3
[]
no_license
###### Banyan # Asian countries are at last abandoning zero-covid strategies ##### Despite the risks, they are right to do so ![image](images/20211009_ASD002_0.jpg) > Oct 7th 2021 FOR MUCH of the pandemic, many of the wealthier countries and territories in the Asia-Pacific region have pursued a “zero-covid” st...