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
Java
UTF-8
3,559
1.976563
2
[]
no_license
package com.example.notuygulamam.Fragments; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.util.Log; impor...
SQL
UTF-8
1,565
4.03125
4
[]
no_license
-- Bài 1 -- Hiển thị tất cả thông tin khách hàng (câu a) select * from KHACHHANG; select * from sanpham; -- Hiển thị 3 khách hàng đầu tiên( câu b ) select maKhachHang,HovaTen,email,dienThoai from khachhang limit 3; -- Hiển thị tất cả thông tin sản phẩm (câu c) select maSanPham,tenSP, CONCAT(soLuong*donGia) as 'Tổng ...
C++
UTF-8
3,935
3.046875
3
[]
no_license
/** * @file src/program/game/Entity.hpp * @author Adam 'Adanos' Gąsior * Used library: SFML */ #pragma once #include <SFML/Graphics.hpp> namespace rr { class Item; class Entity : public sf::Drawable { public: enum Species { NONE, CHEST, ...
C++
UTF-8
2,527
2.765625
3
[ "MIT" ]
permissive
// Copyright (c) 2019-2020 OuterC - Nomango #pragma once #include "json_value.h" namespace oc { namespace __json_detail { template <typename _BasicJsonTy> struct json_value_getter { using string_type = typename _BasicJsonTy::string_type; using char_type = typename _BasicJsonTy::char_type; using integer_type = ty...
C#
UTF-8
931
3.015625
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace VsPlayer { class CommandExcute { public static string executeCmd(string[] Commands) { Process process = new Process { StartInfo = { FileName = "cmd.exe...
Markdown
UTF-8
1,159
2.875
3
[]
no_license
# 见面之后的感想 - 雷霄骅(leixiaohua1020)的专栏 - CSDN博客 2014年12月18日 13:54:51[雷霄骅](https://me.csdn.net/leixiaohua1020)阅读数:5635 好久没写非技术文字,见面之后的感想,记录几句。 这件事从头至尾都是一个不可思议故事,以至于让我自己都有些稀里糊涂。而如今它却迅速迎来一个非常寻常的结尾。尽管很多人都说“不忘初心”,但是实际上实践起来却很不容易。当人们长时间经历过不同的生活环境之后,已经不太容易有相同的思维方式。而空间上距离的遥远更是无法逾越的障碍。 不可思议的故事确实很难发生,更多的还是平凡的故事。 我也想...
C
UTF-8
2,939
2.6875
3
[]
no_license
#include<pic.h> //LCD PIN Connection #define rs RE0 #define rw RE1 #define en RE2 //Signal1 LED #define S1G RB0 #define S1Y RB1 #define S1R RB2 //Signal2 LED #define S2G RB3 #define S2Y RB4 #define S2R RB5 //Signal3 LED #define S3G RB6 #define S3Y RB7 #define S3R RC0 //Signal4 LED #define S4G RC1 #define S4Y RC2 #...
JavaScript
UTF-8
896
2.609375
3
[]
no_license
var http = require('http'); var fs = require('fs'); var url = require('url'); var path = require('path'); http.createServer(function (req, res) { var uri = url.parse(req.url).pathname; console.log(uri); ext = path.extname(uri); if (ext == '') { uri += '.html'; } filePath = './public' + uri conso...
C
UTF-8
293
3.28125
3
[]
no_license
#include "get_next_line.h" int main() { int fd; int i; char *line; fd = open("text.txt", O_RDONLY); i = 0; while((i = get_next_line(fd, &line)) > 0) { printf("i = %d |%s|\n", i, line); free(line); } if (line) { printf("i = %d |%s|\n", i, line); free(line); } return 0; }
C++
UTF-8
3,281
2.671875
3
[ "MIT" ]
permissive
//------------------------------------------------------------------------------------------------ // File: animatedmeshcontroller.h // // Desc: // // Copyright (c) 2007-2008 Unseen Studios. All rights reserved. //------------------------------------------------------------------------------------------------ #ifn...
PHP
UTF-8
2,494
2.796875
3
[]
no_license
<?php namespace App\Jobs; use App\Route; class SendApiRequest extends Job { protected $route; /** * Create a new job instance. * * @return void */ public function __construct(Route $route) { $this->route = $route; } /** * Execute the job. * * @retu...
Markdown
UTF-8
429
2.765625
3
[]
no_license
# Float A **Float** \(Floating Point\) data type represents a numerical value, which contain a decimal point. **Floats** have a very large range, at the cost of some precision. They are mostly used for very large and very small numbers where _relative accuracy_ is needed. For more in-depth information on floating p...
Shell
UTF-8
624
3.671875
4
[]
no_license
imgs_file='imgs.list' #存储着图片src的文件 imgs_dir='./img' #用于保存下载图片的路经 exist_file='exist.list' #用于保存之前已经下载过的标题 mkdir $imgs_dir cat $imgs_file | while read line do if [[ "$line" =~ "#" ]];then { line=`echo $line | sed 's/\ //g' | sed 's/\[/(/g' | sed 's/\]/)/g'` flag=`grep "$line" $exist_file` if [[ "$flag" == "" ...
C#
UTF-8
754
2.71875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Einfall.Editor { // An ending list and a possibility to work out containing varaibles would be nice public class FunctionMetaData { int _startingLineNumber; string _name; p...
Swift
UTF-8
2,667
2.59375
3
[]
no_license
// // LoginTextField.swift // PlantTree // // Created by Admin on 27/04/2017. // Copyright © 2017 greenworld. All rights reserved. // import UIKit //@IBDesignable class LoginTextField : UITextField { //Initializers private let iconView = UIImageView() private let iconBox = UIView() private let lin...
Java
UTF-8
5,800
3.140625
3
[]
no_license
package hr.fer.zemris.java.hw02; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class ComplexNumberTest { static ComplexNumber c1 = new ComplexNumber(1, 1); // 1+i static ComplexNumber c2 = new ComplexNumber(-2.1, 1); // -2.1 + i static ComplexNumber c3 = new ComplexNumber(...
JavaScript
UTF-8
1,021
2.53125
3
[]
no_license
import React, { createContext, useContext, useState, useMemo, useCallback, } from "react"; const themes = { light: { type: "light", fontColor: "#2b2c38", background: "#fff", }, dark: { type: "dark", fontColor: "#dcdcdc", background: "#2b2c38", }, }; const ThemeContext = creat...
Java
UTF-8
1,027
2.21875
2
[]
no_license
// Generated by Dagger (https://dagger.dev). package com.hs.weatherforecast.domain.usecase; import com.hs.weatherforecast.repo.CurrentWeatherRepository; import dagger.internal.Factory; import javax.inject.Provider; @SuppressWarnings({ "unchecked", "rawtypes" }) public final class CurrentWeatherUseCase_Factory...
Markdown
UTF-8
12,670
3.46875
3
[]
no_license
preprocess: replace "IMAGE: ([^;\n]+);?(.*)" -> "<center><img src=\"/circle-tree-system/intro/\\1.svg\" \\2 /></center>" replace "<!--a*-->" -> "" --- layout: post title: Introducing the Circle-Tree System comments: True --- If you want to follow along on paper, you'll want some colored pencils. Like at least ...
Python
UTF-8
1,618
2.921875
3
[]
no_license
import numpy as np import matplotlib.pyplot as plt from xlrd import open_workbook import re class Plot(object): """Used to plot.""" def __init__(self,dpi=100): self.dpi=dpi def plot_from_memorry(self, vars, labels=None, xylabel=None): """The first element of vars is independent variable.""" lengt...
C++
UTF-8
4,089
2.8125
3
[]
no_license
#pragma once #include <json/value.hxx> #include <json/string.hxx> #include <istream> #include <ostream> #include <fstream> #include <string> #include <vector> namespace podreader { namespace json { namespace detail { template <typename T, typename Enable = STL enable_if_t<STL is_fundamental_v<T> or STL is_s...
JavaScript
UTF-8
680
2.625
3
[]
no_license
(function( window ) { 'use strict'; angular .module( 'utils.localstorage', []) .factory( 'localstorage', localstorage ); function localstorage() { var services = { get : get, set : set, remove : remove }; return services; function get( key ) { return localStorag...
C++
UTF-8
1,148
3.921875
4
[]
no_license
#include<iostream> #define MAX 100 using namespace std; class stack{ private: int top; public: int a[MAX]; stack(){ top = -1; } int pop(); bool push(int x); bool isEmpty(); bool isFull(); }; bool stack :: push(int x){ if(top >...
PHP
UTF-8
641
3
3
[]
no_license
<?php declare(strict_types=1); namespace AbstractFactory\Repository; use AbstractFactory\Contract\DbRecordInterface; use AbstractFactory\Entity\User; class MySqlRecord extends BaseMySqlRepository implements DbRecordInterface { public function add(User $user) { echo 'Добавляем в mysql пользователя $...
Java
UTF-8
1,091
1.539063
2
[]
no_license
package com.entities; import com.entities.Activite; import com.entities.ResponsableMarketing; import javax.annotation.Generated; import javax.persistence.metamodel.ListAttribute; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; @Generated(value="EclipseLink-2.5...
Java
UTF-8
1,125
2.21875
2
[]
no_license
package com.cinema.Domain; import java.sql.Date; public class Ticket { private long id_ticket; private long id_showtime; private long id_seat; private long id_user; private long id_type; private Date date; public long getId_ticket() { return id_ticket; } public void setId...
Java
UTF-8
1,069
2.71875
3
[]
no_license
package attributes; import java.util.Map; /** * Created by msg on 2016/11/23. */ public class PropertyEffect { private final String name; private final Map<Integer, Integer> attributes; public PropertyEffect(String name, Map<Integer, Integer> attributes) { this.name = name; this.attri...
Java
UTF-8
763
3.28125
3
[]
no_license
/* * Gson tutorial: http://zetcode.com/java/gson/ * Java Gson read list * */ package com.zetcode.e06; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.List; pub...
JavaScript
UTF-8
5,111
2.734375
3
[]
no_license
/* jshint expr: true, node: true */ /* global describe, it, beforeEach, before */ "use strict"; var assert = require("should"); var BallView = require("../scripts/view/ballView.js"); var BallDOMMock = require("./mocks/ballDOMMock.js"); var FrameView = require("../scripts/view/frameView.js"); var FrameDOMMock = requir...
Java
UTF-8
196
1.875
2
[]
no_license
package edu.eci.arsw.alexandria.model.Paint; import lombok.Data; @Data public class Circle extends Figure{ private float radius; private float startAngle; private float endAngle; }
Java
UTF-8
1,534
2.21875
2
[]
no_license
package es.studium.LoginServlet; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import es.studium.modelo...
Python
UTF-8
2,683
2.953125
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Wed Jun 9 23:14:55 2021 @author: EI11560 """ import re import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import nltk import string import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) #%mat...
Java
UTF-8
2,275
2.109375
2
[]
no_license
package net.mcreator.nkquest.potion; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraft.util.ResourceLocation; import net.minecraft.potion.PotionType; import...
Java
UTF-8
1,747
1.992188
2
[]
no_license
package com.myroom.application; import com.myroom.activity.CreateRoomActivity; import com.myroom.adapter.CurrencyAdapter; import com.myroom.adapter.GuestInRoomAdapter; import com.myroom.adapter.PaymentHistoryAdapter; import com.myroom.adapter.RoomAdapter; import com.myroom.adapter.RoomInformationAdapter; import com.my...
Java
UTF-8
3,644
1.789063
2
[ "Apache-2.0" ]
permissive
package com.hover.stax.actions; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import andr...
Python
UTF-8
13,243
3.0625
3
[]
no_license
''' -----------------------Authors------------------------- Nayanika Ghosh - 4191 4976 Disha Nayar - 6199 1035 ------------------------------------------------------- ''' import pickle import numpy as np from sklearn.svm import SVC from sklearn.neighbors import KNeighborsClassifier from sk...
C++
UTF-8
3,913
3.84375
4
[]
no_license
#pragma once #include <iostream> using namespace std; template <typename T> struct node { T value; node* left; node* right; }; template <typename T> class BinarySearchTreeTemplate { public: BinarySearchTreeTemplate(); ~BinarySearchTreeTemplate(); //public-facing methods void insertType(T value); void pri...
C++
UTF-8
1,904
2.90625
3
[]
no_license
#pragma once #include <iostream> #include <memory> #include <utility> #include <vector> struct Vector; class Matrix { public: Matrix() = default; Matrix(int size, int size2 = 0); explicit Matrix(const Matrix& mat); Matrix(Matrix&& mat); Matrix(double* table, const std::pair<int, int> size); std::pair<...
PHP
UTF-8
3,176
3.046875
3
[]
no_license
<?php // Dossier dans lequel iront les images $uploadDir = 'images/'; if (isset($_POST['Send'])) { for($i=0; $i<count($_FILES['fichier']['name']); $i++) //boucle pour chaque fichier { if ($_FILES['fichier']['size'][$i] < 1000000) // Validation de la taille en octets { if (isset($_F...
Java
UTF-8
502
1.90625
2
[]
no_license
package jinhetech.oracle.generation.entity.service; import java.util.List; import java.util.Map; import jinhetech.oracle.generation.entity.entity.Table; public interface DaoService { /** * 生成Dao层信息 * @param moduleMap 当前模块Map * @param daoMap 当前Dao配置Map * @param tableList * @return * @thr...
Java
UTF-8
4,393
1.96875
2
[]
no_license
package com.valfom.skydiving.altimeter; import android.app.Activity; import android.app.ListActivity; import android.app.LoaderManager; import android.content.CursorLoader; import android.content.Intent; import android.content.Loader; import android.content.SharedPreferences; import android.database.Cursor; import and...
Markdown
UTF-8
7,227
2.671875
3
[]
no_license
p8105\_hw2\_kxg2002.Rmd ================ Katie 10/9/2019 ## Load in the trash wheel data ``` r trash_wheel_data = read_excel( path = "./Data/Trash-Wheel-Collection-Totals-8-6-19.xlsx", range = "A2:N408") %>% janitor::clean_names() %>% select(-homes_powered) %>% drop_na(dumpster) %>% mutate(spo...
Rust
UTF-8
10,153
2.796875
3
[ "MIT" ]
permissive
//! Integration tests for the GDLK Wasm API #![deny(clippy::all)] // Needed for the macro #![allow(clippy::bool_assert_comparison)] use gdlk_wasm::{ compile, HardwareSpec, LangValue, ProgramSpec, SourceElement, Span, }; use maplit::hashmap; use std::collections::HashMap; use wasm_bindgen_test::wasm_bindgen_test; ...
C
UTF-8
498
2.765625
3
[]
no_license
#include <avr/io.h> #include <avr/interrupt.h> int main (void) { // set pin 6/PB1/OC0B to be output // set pin 5/PB0/OC0A to be output DDRB = (1 << DDB1) | (1 << DDB0); // Toggle OC0B on compare match with OCR0B. // Toggle OC0A on compare match with OCR0A. TCCR0A = (1 << COM0B0) | (1 << COM0A0); // CTC...
Java
UTF-8
642
2.734375
3
[]
no_license
package com.example.nozes; public class Meeting { private String titulo, data, hora; public Meeting(String titulo, String data, String hora){ this.titulo = titulo; this.data = data; this.hora = hora; } public String getTitle() { return titulo; } public void se...
PHP
UTF-8
1,796
3
3
[]
no_license
<?php /** * User: ms * Date: 14.09.15 * Time: 21:24 */ namespace Mvg\Parser\Html; use Mvg\Parser\AbstractParser; /** * Class NewsTicker * @package Mvg\Parser\Html */ class NewsTicker extends AbstractParser { /** * @var array */ protected $interferences = array(); /** * @param $response */ public ...
C#
UTF-8
7,524
2.796875
3
[]
no_license
using Analytics.Modeling.ModelingExceptions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Analytics.Modeling.ModelingRules { class EnterOperation : BasicOperation { public EnterOperation(ModelingModel model) : base(model)...
Java
UHC
1,245
2.671875
3
[]
no_license
package com.example.simplelistactivity; import java.util.ArrayList; import java.util.HashMap; import android.app.Activity; import android.os.Bundle; import android.widget.ListView; import android.widget.SimpleAdapter; public class SimpleList2Activity extends Activity{ /** Called when the activity is first created....
Java
UTF-8
2,542
2.421875
2
[]
no_license
import java.io.*; import java.util.*; import javax.servlet.*; import java.sql.*; import java.util.*; import javax.servlet.http.*; public class DonateCloth extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { PrintWrit...
JavaScript
UTF-8
1,126
2.75
3
[]
no_license
import React, { useEffect, useState } from "react"; import axios from "axios"; import LocationCard from "./LocationCard.js"; export default function LocationsList() { const [locationList, setLocationList] = useState([]); const [error, setError] = useState(); useEffect(() => { /...
Python
UTF-8
648
3.203125
3
[]
no_license
def DFS(graph, root): visit = [] stack = [root] while stack: node = stack.pop() if node not in visit: visit.append(node) stack.extend(graph[node]) return visit T = int(input()) for _ in range(T): N = int(input()) plist = list(map(int, input().split()))...
Java
UTF-8
345
2.15625
2
[]
no_license
package Ljc.JFramework; public class TimeOutException extends CoreException { /** * */ private static final long serialVersionUID = 1L; public TimeOutException() { super(); } public TimeOutException(String message) { super(message); } public TimeOutException(String message, Exception inner) { sup...
C
UTF-8
677
3.171875
3
[ "MIT" ]
permissive
#include <stdio.h> #include <string.h> #define LEN_TEST 8 extern int init_randombytes(); extern void cleanup_randombytes(); extern void randombytes(unsigned char* dest, long long int length); void print_buffer(unsigned char* randomness) { int i; for(i = 0; i < LEN_TEST-1; i++) { printf("%02X ", randomn...
SQL
UHC
615
2.859375
3
[]
no_license
DROP VIEW USRBM.VW_PC_CROSS; /* Formatted on 2017-03-18 11:00:30 (QP5 v5.136.908.31019) */ CREATE OR REPLACE FORCE VIEW USRBM.VW_PC_CROSS ( STND_YEAR, SELL, TMS, DAY_ORD, RACE_NO ) AS SELECT stnd_year, DECODE (SUM (sell_cd), 2, 'â', 4, '', 'â') sell, tms, day_or...
PHP
UTF-8
4,614
3.3125
3
[]
no_license
<?php class ExponentialGenerator { public static function generate($start, $end, $ratio) { $res = array(); if ($ratio <= 1.0) { return $res; } while ($start <= $end) { $next = (int) ($start * $ratio); if ($next == $start) { $next++...
TypeScript
UTF-8
1,234
2.734375
3
[]
no_license
/* Copyright (C) Michael Fatemi - All Rights Reserved. Unauthorized copying of this file via any medium is strictly prohibited. Proprietary and confidential. Written by Michael Fatemi <myfatemi04@gmail.com>, February 2021. */ import hyphenate from '../lib/hyphenate'; export type Theme = { // The classname for...
Go
UTF-8
526
3.34375
3
[]
no_license
package strand // ToRNA will transcribe given DNA strain to its corresponding RNA strain func ToRNA(dna string) string { // Assuming the DNA sequence consist of nucleotide in bytes dnaSeq := []byte(dna) rnaSeq := make([]byte, len(dnaSeq)) // The mapping of DNA nucleotide to RNA nucleotide rnaMapping := map[uint8...
SQL
UTF-8
7,092
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jul 30, 2019 at 04:37 AM -- Server version: 5.7.26 -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `rest_api` -- -- -------------------------...
Java
UTF-8
920
4.28125
4
[]
no_license
/* * File: Ch4Ex13.java * ------------------ * This program reads in a series of integers from the user, until the * sentinel is entered. Then it displays the largest number and the * second largest entered. */ import acm.program.*; public class Ch4Ex13 extends ConsoleProgram { /* Variable to store the senti...
C++
UTF-8
715
2.890625
3
[]
no_license
#pragma once #include <random> #include <vector> #include <algorithm> using namespace std; int Randrange(int b) { static random_device r; static mt19937 gen(r()); return gen() % b; } int Randrange(int a, int b) { return Randrange(b) + a; } int Randchoice(const vector<int> &nums, const vector<double> &probs) { ...
Java
UTF-8
2,227
2.015625
2
[]
no_license
package com.how2java.tmall.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.how2java.tmall.mapper.OrderItemMapper; import com.how2java.tmall.pojo.Order; import com.how2java.tmall.pojo.OrderItem; import com.ho...
Python
UTF-8
1,018
2.765625
3
[ "MIT" ]
permissive
import os from flask import Flask, request from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL'] db = SQLAlchemy(app) class User(db.Model): __tablen...
C
UTF-8
813
2.921875
3
[]
no_license
/* Solves the board using brute force. returns : */ #define SOLUTION 0 #define PARTIAL_SOLN 1 #define NO_SOLN 2 int brute_force(cell_t* board) { // Construct list of spots to fill up. int lst_unfilled_idxs[BOARD_SIZE]; // Unnecessarily large, but that's okay. int iter_lui; // iterator for lst_unfilled_indices ...
Python
UTF-8
881
4.125
4
[]
no_license
# -*- coding: utf-8 -*- def binary_search(my_list, key): #Search key in my_list[start... end - 1]. start = 0 end = len(my_list) while start < end: mid = (start + end)//2 if my_list[mid] > key: end = mid elif my_list[mid] < key: start = mid + 1 ...
C++
UTF-8
469
3.453125
3
[]
no_license
// Dynamic Programming // Set 1 Overlapping sub-problems // Fibonacci numbers // solution 1: Top down #define MAX 100 vector<int> v(MAX, 0); int fib(int n) { if(v[n] == 0) { if(n <= 1) { v[n] = 1; } else { v[n] = fib(n-1) +fib(n-2); } } return v[n]; } // solution 2: Bottom up int fib(int n) { ...
PHP
UTF-8
1,937
2.75
3
[]
no_license
<?php namespace App\Http\Controllers\API; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class AppVersionController extends Controller { /** * This index method is use for check app version in adroid and ios both * If version is not latest than send update app message * If plat...
C++
UTF-8
661
3.140625
3
[]
no_license
#include "Polynomial.h" Polynomial::Polynomial() { } Polynomial::Polynomial(int key, int a0, int a1, int a2, int a3, int a4, int x) :key(key),x(x) { a[0] = a0; a[1] = a1; a[2] = a2; a[3] = a3; a[4] = a4; } Polynomial::~Polynomial() { } int* Polynomial::getCoefficient() { return a; } int Polynomial::getX(...
Markdown
UTF-8
3,584
2.65625
3
[]
no_license
###### Mad in craft # The psychologist who pretended to be insane ##### Susannah Cahalan grippingly explores an influential—but unreliable—experiment ![image](images/20200111_BKP504.jpg) > Jan 9th 2020 The Great Pretender: The Undercover Mission that Changed our Understanding of Madness. By Susannah Cahalan. G...
Shell
UTF-8
2,292
3.875
4
[ "MIT" ]
permissive
#!/bin/bash #set -e #set -o pipefail # trap any script errors and exit trap "trapError" ERR SUDO= trapError() { echo echo " ^ Received error ^" exit 1 } createArchImg(){ #sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libasound2-dev #sudo apt-get -y update #sudo apt-get -...
C
UTF-8
48,812
3.15625
3
[]
no_license
/* * ledSegment.c * * Created on: Dec 29, 2017 * Author: Sterna * * This file handles segmentation of LEDs. A segment is a strip with a certain number of LEDs * The segment can be treated like a single strip, just smaller. It can be faded, put on loops, perform a pre-programmed pattern etc * A segment may only...
C
UTF-8
314
3.25
3
[]
no_license
#include "player_heal.h" #include <stdio.h> int player_heal(int *nowHP,int healHP,int MaxHP){ if(*nowHP+healHP<MaxHP){ *nowHP += healHP; printf("HPを%d回復した!\n",healHP); } else{ *nowHP = MaxHP; printf("HPが満タンになった!\n"); } return 0; }
C
UTF-8
279
2.640625
3
[ "MIT" ]
permissive
#include <stdio.h> #include <message_def.h> MSG_CODE get_my_message(void) { return HELLO_YOU; } int main() { printf(gm(JUST_SAY_HI)); printf("\n"); printf(gm(HELLO_WORLD)); printf("\n"); printf(gm(get_my_message())); printf("\n"); return 0; }
C++
UTF-8
4,421
2.734375
3
[]
no_license
#include <iostream> #include <stdio.h> #include <fstream> #include <string> #include <cmath> #include <random> #include <chrono> #include <vector> #include <map> using namespace std; struct TEXT{ public: std::map<int, string> menu; TEXT(){ this->menu[1] = "Sortowanie przez proste wstawianie\n"; this->menu...
TypeScript
UTF-8
9,226
2.890625
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2020-2023 SenX S.A.S. * * 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 law or a...
JavaScript
UTF-8
1,144
2.953125
3
[]
no_license
import React, { Component } from 'react'; import CharacterSelector from '../components/CharacterSelector.js'; import CharacterDetail from '../components/CharacterDetail.js'; class StarWarsContainer extends React.Component { constructor(props) { super(props); this.state = { characters: [], select...
Markdown
UTF-8
2,912
3.703125
4
[]
no_license
# Command-line-interpreter Implementation of a shell (command-line interpreter). Like traditional UNIX shells, the shell program will also be a user level process , that will rely heavily on the operating system's services. The shell do the following: * Receive commands from the user. * Interpret the commands, and ...
C++
UTF-8
6,766
2.546875
3
[]
no_license
#include "firstfollow.h" //functions for checking wheather the look ahead token is in first of any non terminal //First of definition vector<Symbol> Firstfollow::firstOfDefinition() { vector<Symbol> fOfConstDef = firstOfConstDef(); vector<Symbol> fOfVariDef = firstOfVariDef(); vector<Symbol> fOfProcDef = firstOfPr...
Java
UTF-8
5,908
2.609375
3
[]
no_license
package choi.security.keystroke.data; import android.util.Log; import java.util.ArrayList; import choi.security.keystroke.util.Converter; /** * Created by Nate on 2017-10-17. */ public class FeatureManage { private String username; private long inputtime; //currentTimeMillis private String day; ...
Java
UTF-8
4,512
3.5625
4
[]
no_license
import org.junit.Test; import org.mockito.InOrder; import java.util.LinkedList; import java.util.List; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.*; public class SomeObjectTest { @Test public void testMultipleTimes() { List mockedList = mock(List.class); m...
TypeScript
UTF-8
1,994
3.375
3
[ "MIT" ]
permissive
import { Point } from './point'; /** * Provides the utilities for getting element's metrics. */ export declare class ElementRect { private element; /** * Returns the width of the current element. */ width: number; /** * Returns the height of the current element. */ height: numb...
Java
UTF-8
609
1.859375
2
[]
no_license
package com.chinaredstar.jc.crawler.biz.service.impl; import com.chinaredstar.jc.crawler.biz.result.UserResult; import com.chinaredstar.jc.crawler.biz.service.IUserService; import com.chinaredstar.jc.crawler.dao.mapper.UserMapper; import org.springframework.stereotype.Service; import javax.annotation.Resource; import...
JavaScript
UTF-8
3,127
2.734375
3
[]
no_license
const toggleWidgets = { title: "Widgets", html: ` <div id=widgetListContainer> </div> <div id=footerContainer> <button class=widgetSettingsBtn id=applyWidgetToggleBtn>Show Changes</button> </div>`, css: true, openScript: function () { // Send A...
Markdown
UTF-8
357
2.765625
3
[]
no_license
# Capital One Summit Challenge An application that gets information from Instagram's API about a certain tag and displays info about the number of posts, the users who used the tag, and whether or not the post was positive or negative. Built to accomplish Capital One's challenge, not meant to be something that is extr...
Shell
UTF-8
1,730
2.953125
3
[]
no_license
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " export CLICOLOR=1 export LSCOLORS=ExFxBxDxCxegedabagacad alias ls='ls -GFhl' _complete_hosts () { COMPREPLY=() ...
Swift
UTF-8
695
3.59375
4
[]
no_license
import Foundation enum Transaction:Error { case inactiveUseAccount case WithdrawalError } class Bank { var initial = 500 var my_bal = 1000 var active:Bool = false func CheckData(withdrawal:Int)throws { if !active { throw Transaction.inactiveUseAccount } ...
SQL
UTF-8
1,717
2.875
3
[]
no_license
SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET client_min_messages = warning; ALTER TABLE IF EXISTS ONLY public.py_trade_tourism_and_investment_programme_...
Python
UTF-8
1,068
2.609375
3
[]
no_license
"""Business level operations on customers.""" from bizwiz.common.session_filter import get_session_filter from bizwiz.customers.models import Customer def get_session_filtered_customers(session): """Return customers optionally filtered by currently active session.""" session_filter = get_session_filter(sessi...
C#
UTF-8
1,563
3.015625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace cslab3gui { public partial class Form1 : Form { Matrix matrixA = new Matrix();...
Python
UTF-8
1,222
3.53125
4
[]
no_license
import numpy as np import xarray as xr import pandas as pd from matplotlib import pyplot as plt def to_farenheit(val): ''' Convert value in degrees Kelvin to Farenheit ''' return((val - 273.15)*(9/5)+32) def get_cdd_hdd(dataset): ''' Calculate HDD and CDD given temperature Parameters: ...
Java
UTF-8
5,428
2.1875
2
[]
no_license
package example.com.mydbmv; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView;...
Java
UTF-8
5,806
1.828125
2
[]
no_license
package com.gabriellcosta.mymapsapp; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import com.gabriellcosta.my...
Python
UTF-8
429
3.609375
4
[]
no_license
kapsel = [] print('Tänk att du ska gräva ned en tidskapsel som ska hittas om 500 år! Vad skulle du fylla den med?') while len(kapsel) < 5: print('Vad vill du lägga till i kapseln?') nySak = input('> ') kapsel.append(nySak) print() print('----- 500 år senare ------') print('I ett bygge av ett 700-våning...
Java
UTF-8
472
1.828125
2
[]
no_license
private Result setLength(long lobID, long length) { ResultMetaData meta = updateLobLength.getParametersMetaData(); Object[] params = new Object[meta.getColumnCount()]; params[UPDATE_LENGTH.LOB_LENGTH] = ValuePool.getLong(length); params[UPDATE_LENGTH.LOB_ID] = ValuePool...
Python
UTF-8
253
2.859375
3
[]
no_license
c=() d=() a0=int(input()) a1=int(input()) b0=int(input()) b1=int(input()) h=sqrt((a0-b0)^2 + (a1-b1)^2) c0=b0 c1=b1-(((h*h)-(b0-c0)*(b0-c0))**0.5) c1=int(c1) d0=a0 d1=c1 c=(c0,c1) d=(d0,d1) H=format(h,'.2f') print(c) print(d) print(H)
Python
UTF-8
2,883
3.078125
3
[]
no_license
import pygame, sys from all_levels.Minesweeper.constant import X_DIMENSION, Y_DIMENSION, TOPBAR_RATIO, CLOCK_BORDER, CLOCK_SPACING, WHITE, BLACK def initScreenAndGameClock(): # initialize pygame pygame.init() # initialize the fonts try: pygame.font.init() except: sys.exit() # ...
TypeScript
UTF-8
1,242
2.96875
3
[ "MIT" ]
permissive
namespace Question { export interface Input { readonly id: string; readonly type: 'images' | 'text' | 'checkbox'; readonly options: Options; } export interface ImagesOptions { readonly required: boolean; readonly hint?: string; readonly images: Array<{ readonly id: string; ...
Java
UTF-8
1,607
3.96875
4
[]
no_license
public class Triangle{ //Instance variables private Point v1; private Point v2; private Point v3; //Constructor to make a triangle given points public Triangle(Point A, Point B, Point C){ v1 = new Point(A.getX(), A.getY()); v2 = new Point(B.getX(), B.getY()); v3 = new Point(C.getX(), C.getY()); ...
Java
UTF-8
2,396
2.8125
3
[]
no_license
package MCADatabase; //Imports use for various methods in the program import java.sql.*; import java.util.logging.*; import javax.swing.table.DefaultTableModel; import java.text.*; import java.util.Locale; import javax.swing.event.*; public class sqlDriver { //This method is called multiple times throughout the p...
Python
UTF-8
13,405
2.609375
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ================================================ main_process_lma_data ================================================ This program reads LMA raw data and plots several features such as sources position, histograms, etc. """ # Author: fvj # License: BSD 3 clause i...
Java
UTF-8
1,155
2.359375
2
[]
no_license
package com.refactorizando.example.springnative; import static org.springframework.http.HttpStatus.NOT_FOUND; import static org.springframework.web.reactive.function.server.ServerResponse.ok; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Sort; import org.springframework.web.reactive.fu...