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,523 | 1.960938 | 2 | [] | no_license | /*
This software is the confidential information and copyrighted work of
NetCracker Technology Corp. ("NetCracker") and/or its suppliers and
is only distributed under the terms of a separate license agreement
with NetCracker.
Use of the software is governed by the terms of the license agreement.
Any use of ... |
Shell | UTF-8 | 3,732 | 2.609375 | 3 | [] | no_license | echo "******************************************************************************"
echo "Install OS Packages." `date`
echo "******************************************************************************"
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
dnf install -y dnf-utils zip unzip
dnf install -y bc
dnf install ... |
JavaScript | UTF-8 | 2,753 | 2.984375 | 3 | [
"MIT"
] | permissive | /**
* Widget to select channels
*/
window.discotron.ChannelListWidgetController = class extends window.discotron.WidgetController {
/**
* @class
* @param {object} options Args
* @param {Array} options.channels An array of Channel
* @param {Array} options.selectedChannels Default selected chann... |
C | UTF-8 | 1,780 | 3.53125 | 4 | [] | no_license | #include "dag.h"
#include <stdio.h>
#include "stack.h"
struct _dag {
int nodes[MAX_EDGES_PER_NODE][MAX_NODES];
size_t edge_count[MAX_NODES];
};
Dag *dag__create() {
Dag *d = calloc(1, sizeof(struct _dag));
for (int i = 0; i < MAX_NODES; i++) {
d->edge_count[i] =
MAX_EDGES_PER_NOD... |
C# | UTF-8 | 1,390 | 2.734375 | 3 | [] | no_license | class Algo_BT_Main
{
static void Main(string[] args)
{
var root = Algo_BT_GenerateBST.GenerateBST(new int[] { 12, 5, 3, 9, 10, 33, 20, 13, 28 });
var root2 = Algo_BT_GenerateBST.GenerateBST(new int[] { 12, 5, 3, 9, 10, 33, 20, 13, 19 });
var root3 = GenerateBT();
Console.WriteLi... |
Java | UTF-8 | 3,729 | 2.015625 | 2 | [] | no_license | /*
Five Sticks
6957 W. North Ave., #202
Chicago, IL 60302
USA
http://www.fivesticks.com
mailto:info@fivesticks.com
Copyright (c) 2003-2004, Five Sticks Publications, Inc.
All rights reserved.
Redistribution and use in source and binary forms,
with or without modification, are permitted provid... |
C# | UTF-8 | 2,466 | 2.6875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vlastelin.Data.Model;
using Vlastelin.Common;
namespace VlastelinClient.ViewModel.ObjectsViewModel
{
public class PassengerVM : FIOItemVM
{
public Passenger passenger
{
get
... |
Java | UTF-8 | 1,629 | 2.359375 | 2 | [] | no_license | package space.alair.vavale.net_tools;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import space.alair.vavale.app_datas.AppControl;
/**
* Created by Alair on 3/23/2018.
*/
public class RetrofitBuilder {
private static Retr... |
SQL | UTF-8 | 1,114 | 3.75 | 4 | [] | no_license | /*Table structure for table `product_lines` */
DROP TABLE IF EXISTS `product_line`;
CREATE TABLE `product_line` (
`product_line` varchar(50) NOT NULL,
`text_description` varchar(4000) DEFAULT NULL,
`html_description` mediumtext,
`image` mediumblob,
PRIMARY KEY (`product_line`)
) ;
/*Table structure for ta... |
PHP | UTF-8 | 7,139 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Repository\ClienteRepository;
use App\Repository\InvestimentosRepository;
class ClienteController extends Controller
{
function __construct(){
// $this->middleware('cliente_existente')->only([
// 'destroy'
// ])... |
PHP | UTF-8 | 1,096 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package Core
* @subpackage Infrastructure
*/
declare(strict_types=1);
namespace Kwai\Core\Infrastructure\Security;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use stdClass;
/**
* Class JsonWebToken
*/
class JsonWebToken
{
public function __construct(
private string $secret,
priv... |
Java | UTF-8 | 1,759 | 2.0625 | 2 | [] | no_license | package com.abin.lee.cloud.service.feign.service;
import com.abin.lee.cloud.service.feign.configuration.CloudServiceProviderConfiguration;
import com.abin.lee.cloud.service.feign.hystrix.CloudServiceProviderFeignHystrix;
import com.abin.lee.cloud.service.model.CloudModel;
import feign.Param;
import feign.RequestLine;
... |
Python | UTF-8 | 342 | 3.140625 | 3 | [] | no_license | #!/usr/bin/env python
import sys
lines = sys.stdin.readlines()
for line in lines:
mark = int(line.split()[4])
if mark < 40:
c = "F"
elif mark < 50:
c = "3"
elif mark < 60:
c = "2.2"
elif mark < 70:
c = "2.1"
else:
c = "1"
print " ".join(line.split()[:5]), c, " ".j... |
Python | UTF-8 | 1,097 | 3 | 3 | [] | no_license | # 验证码分割程序
import os
import time
from PIL import Image
def read_img():
img_array = []
file_list = os.listdir('./captcha_img') # 读取图片
for file in file_list:
try:
image = file
img_array.append(image)
except:
print(f'{file}:图像已损坏,请重新选择图片')
os.... |
C++ | UTF-8 | 1,208 | 2.640625 | 3 | [
"MIT"
] | permissive | class Solution {
public:
vector<vector<int>> kSmallestPairs(vector<int>& nums1, vector<int>& nums2, int k) {
if(nums1.empty() || nums2.empty()){
return {};
}
vector<vector<int>> answer;
priority_queue<vector<int>, vector<vector<int>>, greater<vector<int>>... |
PHP | UTF-8 | 902 | 2.796875 | 3 | [] | no_license | <?php namespace Payment;
class PaymentData {
public $transactionId;
public $autorize = false;
public $automaticCapture = false;
public $dateTime;
public $description;
public $currency = 986; // Brazilian R$
public $orderId;
public $installments = 1; /// 1 parcela
public $value;
public $cardBran... |
Markdown | UTF-8 | 1,361 | 2.84375 | 3 | [] | no_license | # Description
* The application is generated by using JavaScript as the front, and ruby and rails as the backend. The app is about making orders of items from companies, and those orders can be managed by creating, deleting, and updating.
# Setting up
- First create two respositories on Github(front and back... |
Python | UTF-8 | 1,498 | 2.703125 | 3 | [] | no_license | """Module for generating users that have favorited a seller """
from bangazon_reports.views.connections import Connection
import sqlite3
from django.shortcuts import render
from bangazonapi.models import Product
def inexpensive_product_list(request):
"""Function to build an HTML report of games by user"""
if ... |
TypeScript | UTF-8 | 1,234 | 2.75 | 3 | [
"MIT"
] | permissive | import { memoizeOne } from '@bigcommerce/memoize';
import { createSelector } from '../common/selector';
import { SignInEmail } from './signin-email';
import SignInEmailState, { DEFAULT_STATE } from './signin-email-state';
export default interface SignInEmailSelector {
getEmail(): SignInEmail | undefined;
get... |
Java | UTF-8 | 5,302 | 2.703125 | 3 | [] | no_license | package com.example.simplemusic;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.view.View;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
/... |
Markdown | UTF-8 | 3,670 | 2.734375 | 3 | [] | no_license | # IMPORTANTE!!
### Para poder utilizar el stegobmp es necesario instalar las "unlimited strength JCE policy files" de oracle.
### Si ya tenes tu entorno configurado con estas politicas podes omitir este paso.
### Pasos:
#### Si tenes Java 8u152 u superiror:
1) Situarse con el comando cd en el siguiente directorio
... |
Java | UTF-8 | 2,671 | 2.078125 | 2 | [] | no_license | package org.cryptable.pki.server.model.profile.jaxb;
import javax.xml.bind.annotation.*;
/**
* Constraints profile of the certificate
*
* <Profile ID="9" Name="Everything">
*
* <Certificate>
* ...
* </Certificate>
*
* <PIN_Code>
* ...
* </PIN_Code>
*
* <CRL>
* ...
* </CRL>
*
* <Pu... |
Java | UTF-8 | 717 | 2.78125 | 3 | [] | no_license | package vehicles;
class vehicle {
private int ID_plate_no;
private String vehicle_brand;
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getID_plate_no() {
return ID_plate_no;
}
public void setID_plate_no(i... |
C# | UTF-8 | 1,302 | 2.6875 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShrinkPlayer : MonoBehaviour
{
public Vector3 downSize;
public Vector3 regularSize;
public Vector3 bigSize;
public bool finishShrink= false;
public bool finishGrow = false;
void Start(){
regu... |
Markdown | UTF-8 | 1,270 | 2.90625 | 3 | [] | no_license | <img src="https://github.com/cosparks/le_ballon/blob/62ad85d65ad4fa41c3070c73c4a0109aab303526/docs/LeBallonStart.png" width="800">
Imaginative and whimsical physics-based game where you play as a balloon trying to navigate a series of mazes, which become more and more challenging as the game progresses.
:
self.value = val
self.next = None
class LinkedList:
def __init__(self):
self.head = None
def append(self, val):
node = Node(val)
... |
Python | UTF-8 | 5,397 | 3.046875 | 3 | [] | no_license | import numpy as np
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.cluster import KMeans
from sklearn.preprocessing import OneHotEncoder
class RBFClassifier(BaseEstimator, ClassifierMixin):
"""
Classical Radial basis function where the first layer weights are set via clustering
and the... |
PHP | UTF-8 | 1,483 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include("connection.php");
// initialize variables
$dish_name = "";
$raw_price = "";
$total_price = "";
$profit = "";
$dish_id = 0;
$update = false;
if (isset($_POST['save'])) {
$dish_name = $_POST['dish_name'];
$raw_price = $_POST['raw_price'];
$total_price = ... |
Java | UTF-8 | 582 | 2.640625 | 3 | [] | no_license | package com.codebreeze.algorithms;
import org.junit.jupiter.api.Test;
import java.util.function.IntBinaryOperator;
import static org.assertj.core.api.Assertions.assertThat;
public abstract class AbstractGcdTest {
@Test
void can_find_gcd_for_various_combinations() {
assertThat(operator().applyAsInt(2... |
C | UTF-8 | 2,187 | 3.09375 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_utils.c :+: :+: :+: ... |
C | GB18030 | 1,168 | 2.640625 | 3 | [] | no_license | #define _WIN32_WINNT 0x0400
HANDLE g_hTimer = NULL;
DWORD WINAPI TimerFunc( LPVOID lpParam )
{
while(1)
{
WaitForSingleObject(g_hTimer, INFINITE);
printf("hello timer\n");
}
}
void TimerOperation()
{
//ʱ
g_hTimer
= CreateWaitableTimer(NULL, FALSE, NULL);
//öʱ
LARGE_INTEGER liDueTime;
liDueTime.Qua... |
PHP | UTF-8 | 1,845 | 3 | 3 | [] | no_license | <?php
//Create a database connection
require_once("included_functions.php");
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "sarahah";
$con = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
//Test if connection occured.
if(mysqli_connect_errno()) {
die("Database connection failed : " .... |
Java | UTF-8 | 678 | 1.984375 | 2 | [] | no_license | package com.uteachon.apps.ems;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.spri... |
Python | UTF-8 | 952 | 2.859375 | 3 | [] | no_license | class Trainer(object):
def __init__(self, model, logger):
self.logger = logger
self.model = model
def fit(self, train_data, dev_data, epochs=10):
# Start trainer
for epoch_n in range(epochs):
# Train
for batch in train_data:
objective = ... |
Rust | UTF-8 | 12,949 | 3.328125 | 3 | [
"MIT"
] | permissive | #![feature(core_intrinsics)]
/// This is a benchmark for optimising the binary logistic loss function.
///
/// The exact_naive function is quite slow: 50us per iteration, so 5s for 100k elements
/// Without any precision loss, we can push it to 17.193 us with exact_factored_ln1p.
///
/// Using Taylor series, we can pu... |
Markdown | UTF-8 | 2,703 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | The Rixnik Project
==================
Welcome to the **Rixnik Project**!
DISCLAIMER
----------
Maybe in the future, some pieces of this code could be useful for a newbie, but meanwhile, please you should be careful about this statement:
> This code is been written by a student, not a professional quant. So, **YOU C... |
JavaScript | UTF-8 | 1,693 | 2.65625 | 3 | [] | no_license |
var dayRouter = require('express').Router();
var attractionRouter = require('./attraction');
var models = require('../models');
dayRouter.use(function(req,res,next) {
console.log('getting here')
next()
})
// GET /days
dayRouter.get('/', function (req, res, next) {
// serves up all days as json
// lo... |
Java | UTF-8 | 1,135 | 2.34375 | 2 | [] | no_license | package com.practicum.pu.georgidinov.shoppinglist.validator;
import com.practicum.pu.georgidinov.shoppinglist.baseentity.BaseNamedEntity;
import com.practicum.pu.georgidinov.shoppinglist.exception.ValidationCheckException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stere... |
Shell | UTF-8 | 359 | 2.8125 | 3 | [] | no_license | #!/usr/bin/env bash
REPO_DIR=/tmp/config-repo
rm -rf $REPO_DIR
mkdir $REPO_DIR
cd $REPO_DIR
git init .
echo global.greeting: Hola > application.properties
echo conference.title: Codemotion 2017 > configclient1.properties
echo local.message: This is only in development > configclient1-development.properties
git add -A... |
Markdown | UTF-8 | 1,673 | 2.59375 | 3 | [
"Unlicense"
] | permissive |
# 'Zlatan Wants To Join Us'
Published at: **2019-11-04T14:29:00+00:00**
Author: **David Kappel**
Original: [Soccer Laduma](https://www.soccerladuma.co.za/news/articles/international/categories/serie-a/zlatan-ibrahimovic-wants-to-join-us-1/666711)
With a host of clubs said to be interested in signing former Manches... |
C# | UTF-8 | 815 | 2.53125 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DamageOverTime : MonoBehaviour {
public float damagePerSecond = 10f;
PlayerControls player;
// Update is called once per frame
void Update () {
if(player != null)
{
player.luster -= damagePerS... |
PHP | UTF-8 | 1,890 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
/**
* MathImage
*
* PHP version 5.4
*
* Copyright (c) 2014 Federico Lozada Mosto <mosto.federico@gmail.com>
* For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
*
* @category OwnCaptcha
* @package OwnCaptcha\Adapters
* @author F... |
C++ | UTF-8 | 918 | 2.625 | 3 | [
"MIT"
] | permissive | void walk_to(double posx, double posy, double angle, int endx, int endy) {
cvNamedWindow("robot");
double diffx = abs(posx - endx);
double diffy = abs(posy - endy);
angle = angle - 180;
if (angle < 0) {
angle += 360;
}
double target_angle = atan(diffx / diffy);
target_angle = target_angle * 180 / M_PI;
d... |
PHP | UTF-8 | 1,298 | 2.5625 | 3 | [] | no_license | <?php namespace app\Controllers; use app\Model;
class adminLogin
{
private static $data = [];
public static function checkData($data)
{
$emptyInput = [];
foreach ($data as $key => $value)
{
if (empty($value))
{
... |
Java | UTF-8 | 643 | 2.875 | 3 | [] | no_license | package builder;
import bread.Bread;
import ingredients.Filling;
import ingredients.Flavor;
import ingredients.Topping;
public class BreadBuilder {
private Flavor flavor;
private Filling filling;
private Topping topping;
public void setFlavor(Flavor flavor) {
this.flavor = flavor;
}
public... |
PHP | UTF-8 | 831 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Service;
use AppBundle\Entity\Product;
use AppBundle\Repository\ProductRepository;
interface ProductServiceInterface
{
/**
* @param Product $product
* @return bool
*/
public function add(Product $product): bool;
/**
* @param Product $prod... |
SQL | UTF-8 | 402,256 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : laomao
Source Server Version : 50626
Source Host : localhost:3306
Source Database : oa_prision
Target Server Type : MYSQL
Target Server Version : 50626
File Encoding : 65001
Date: 2020-03-20 22:45:59
*/
SET FOREIGN_KEY_... |
Java | UTF-8 | 1,467 | 3.359375 | 3 | [] | no_license | class binaryTree1
{
static class Node
{
int data;
Node lchild;
Node rchild;
Node(int d)
{
data=d;
lchild=null;
rchild=null;
}
}
public static Node root(int d)
{
Node root=new Node(d);
root.lchild=null;
root.rchild=null;
... |
Java | UTF-8 | 1,259 | 3.0625 | 3 | [] | no_license | package algorithms.mazeGenerators;
import java.io.*;
public class Position implements Serializable {
private int row;
private int column;
public Position(int row, int column) {
this.row = row;
this.column = column;
}
@Serial
private void writeObject(ObjectOutputStream stream)... |
C# | UTF-8 | 2,255 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ExamSite.Data;
using ExamSite.ViewModels;
namespace ExamSite.Services
{
public class ExamServices
{
ExamSiteEntities _db;
public ExamServices()
{
_db = new ExamSiteEntities();
... |
Python | UTF-8 | 129 | 4.03125 | 4 | [] | no_license | import turtle
turtle.shape('turtle')
i = 1
n = 50
while i < n:
turtle.forward(i * 10)
turtle.left(90)
i += 1 |
Java | UTF-8 | 2,572 | 2.125 | 2 | [] | no_license | package com.pivmag.pmstat.server.config;
import org.apache.commons.dbcp2.BasicDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertyS... |
Python | UTF-8 | 4,841 | 3.15625 | 3 | [] | no_license | # https://www.geeksforgeeks.org/python-mean-squared-error/
# https://machinelearningmastery.com/tutorial-to-implement-k-nearest-neighbors-in-python-from-scratch/
import numpy as np
import pandas as pd
import math
import matplotlib.pyplot as plt
def euclidean_distance(x1, x2):
squared_distance = 0
fo... |
Python | UTF-8 | 1,941 | 2.703125 | 3 | [] | no_license | # SIO IM服务端接口代码
"""
1、manager 消息管理对象
2、sio对象
定义事件触发和处理方法
3、app对象
4、端口监听对象
5、执行sio服务
"""
from werkzeug.wrappers import Request
import socketio
import jwt
import eventlet
eventlet.monkey_patch()
JWT_SECRET = 'TPmi4aLWRbyVq8zu9v82dWYW17/z+UvRnYTt4P6fAXA'
mq_uri = 'amqp://python:rabbitmqpwd@localhost:5672/toutiao'
ma... |
Ruby | UTF-8 | 366 | 2.921875 | 3 | [] | no_license | class AttrAccessorObject
def self.my_attr_accessor(*names)
# ...
#getter
names.each do |ele|
define_method(ele) do
instance_variable_get("@"+ele.to_s)
end
end
#setter
names.each do |ele|
define_method(ele.to_s + "=") do |input|
instance_variable_set("@"+ele... |
Markdown | UTF-8 | 851 | 3.078125 | 3 | [
"MIT"
] | permissive | ## Testing Next.js for SEO
Since `next-page-tester` simulates the server side rendering cycle of a Next.js app, It's possible writing test assertions against the initial DOM generated from SSR before React gets mounted/hydrated.
```js
import { getPage } from 'next-page-tester';
describe('SEO tests', () => {
it('re... |
C# | UTF-8 | 598 | 2.859375 | 3 | [] | no_license | public bool ThumbnailCallback() {
return true;
}
private void GetThumbnail(PaintEventArgs e)
{
Image.GetThumbnailImageAbort callback =
new Image.GetThumbnailImageAbort(ThumbnailCallback);
Image image = new Bitmap(@"c:\FakePhoto.jpg");
... |
C++ | UTF-8 | 1,299 | 3.265625 | 3 | [] | no_license | #include <iostream>
class Rocket
{
private:
std::uint32_t hydrogen_level;
std::uint32_t oxygen_level;
public:
Rocket(/* args */);
std::uint32_t get_hydrogen_level() const { return hydrogen_level; };
std::uint32_t get_oxygen_level() const { return oxygen_level; };
virtual ~Rocket() = default;
}... |
Java | UTF-8 | 15,399 | 2.203125 | 2 | [] | no_license | package com.rose.scheduler.manager.impl;
import com.rose.scheduler.common.Constants;
import com.rose.scheduler.core.JobStore;
import com.rose.scheduler.core.component.JobComponent;
import com.rose.scheduler.dao.TaskDao;
import com.rose.scheduler.entity.Pageable;
import com.rose.scheduler.entity.Task;
import com.rose.s... |
Python | UTF-8 | 1,131 | 3.359375 | 3 | [] | no_license | class Solution:
"""
超时解法
"""
def findContinuousSequence(self, target: int) -> list:
def genSequence(mid: int, n: int):
if n%2==1:
return list(range(mid-(n//2), mid+(n//2)+1))
elif n%2==0:
return list(range(mid-(n//2)+1, mid+(n//2)+1))
... |
Java | UTF-8 | 1,502 | 2.671875 | 3 | [] | no_license | package com.company;
public class StudentScores {
private int id;
private String name;
private int maths;
private int qa;
private int ai;
private int robotics;
public StudentScores(int id, String name, int maths, int qa, int ai, int robotics) {
this.id = id;
this.name = nam... |
Python | UTF-8 | 2,987 | 3.734375 | 4 | [] | no_license | import json
class interpreting_tweet(object):
"""interprets a tweet in json and prints out useful information related to that tweet"""
def __init__(self,jsonfilename):
self.jsonfilename=jsonfilename
self.data=[] # creating an emptry list
#note we don't need to add this to the initliza... |
PHP | UTF-8 | 2,998 | 2.59375 | 3 | [] | no_license | <?php
namespace book\entity;
use framework\core\entity;
use framework\core\http;
use framework\vendor\image;
class www_xxbiquge_com extends www_booktxt_net
{
function __construct($data)
{
entity::__construct($data);
if (! empty($this->_data['url']) && ! empty($this->_data['source']))
{
... |
Java | UTF-8 | 194 | 1.789063 | 2 | [] | no_license | package com.krish.SplitWise.models;
import lombok.Data;
@Data
public class User {
private String id;
private String name;
private String emailId;
private String phoneNumber;
}
|
C# | UTF-8 | 691 | 3.1875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Minesweeper
{
class HallOfFame
{
internal static void HighScores(List<HighScore> score)
{
Console.WriteLine("\nScore:");
if (score.Count > 0)
{
fo... |
Java | UTF-8 | 1,137 | 2.5 | 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 com.health.data;
/**
*
* @author HP
*/
import java.sql.Connection;
import java.sql.SQLException;
import java.u... |
Shell | UTF-8 | 5,824 | 3.421875 | 3 | [] | no_license | #!/bin/bash
if [ $# -lt 8 ]
then
echo ""
echo "Usage: LST_Alexcis1.sh -id <InputDir> -subjid <SubjId> -fs <SubjDir> -od <OutputDir>"
echo ""
echo " -id : Input directory containing the rec/par files"
echo " -subjid : Subject ID"
echo " -fs : Path to FS output directory (equivalent to SUBJECTS_DIR)"
echo "... |
C++ | UTF-8 | 1,417 | 2.875 | 3 | [] | no_license | /*
* Interview.h
*
* Created on: Feb 23, 2019
* Author: delgemoon
*/
#ifndef LIBS_INTERVIEW_H_
#define LIBS_INTERVIEW_H_
#include <string>
using namespace std;
enum TrafficLight {
red, green, yellow
};
enum CarColor {
black, white, gray, silver,
//green // can't have the color green in two ... |
Java | UTF-8 | 5,378 | 1.929688 | 2 | [
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"Python-2.0",
"GPL-1.0-or-later",
"CDDL-1.0",
"BSD-3-Clause",
"GPL-3.0-only",
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-public-domain"
] | permissive | /* -------------------------------------------------------------------------- *
* OpenSim: ModelRenameAction.java *
* -------------------------------------------------------------------------- *
* OpenSim is a toolkit for musculoskeletal modeling and simulation, *
... |
Rust | UTF-8 | 1,082 | 2.84375 | 3 | [] | no_license | pub fn run_external_command(line: &[String]) -> i32 {
use std::io::{ErrorKind, stderr, Write};
use std::process::Command;
let command = &line[0];
let arguments = &line[1..];
return match Command::new(command).args(arguments).spawn() {
Ok(mut child) => {
match child.wait() {
... |
PHP | UTF-8 | 2,342 | 2.90625 | 3 | [] | no_license | <?php
require_once("src/telegram.inc");
define("STAT_FILE", "logs/stats.log");
$telegram = new Telegram();
$availableChains = getAvailableChains();
$currentStat = getCurrentStat();
$lastCheckStat = getLastStatCheck();
logMessage("Start checking..");
if(is_array($lastCheckStat) && count($lastCheckStat)) {
foreach($a... |
Java | ISO-8859-1 | 1,963 | 2.515625 | 3 | [] | no_license | package br.com.senai.util;
import java.util.Date;
import javax.persistence.EntityManager;
import br.com.senai.dao.JPAUtil;
import br.com.senai.model.Estado;
import br.com.senai.model.Fornecedor;
public class PopulaFornecedor {
public static void main(String[] args) {
EntityManager em = JPAUtil.... |
Python | UTF-8 | 4,705 | 3.484375 | 3 | [] | no_license | from copy import deepcopy
from random import randint
from settings import CIRCLE, CROSS
from user import User
class Field(object):
"""
We're presuming that field is organized as
array of rows
"""
def __init__(self, size):
self._field = [[None for i in range(size)] for x in range(siz... |
Markdown | UTF-8 | 1,302 | 3.609375 | 4 | [] | no_license | Student Attendance Record I
===
1.问题描述
---
You are given a string representing an attendance record for a student. The record only contains the following three characters:<br>
<br>
'A' : Absent.<br>
'L' : Late.<br>
'P' : Present. <br>
<br>
A student could be rewarded if his attendance record doesn't contain more th... |
PHP | UTF-8 | 1,382 | 2.90625 | 3 | [] | no_license | <?php
/**
* Votix. The advanded and secure online voting platform.
*
* @author Philippe Lewin <philippe.lewin@gmail.com>
* @author Club*Nix <club.nix@edu.esiee.fr>
* @license MIT
*/
namespace AppBundle\Service;
/**
* Class StatusService
* @package AppBundle\Service
*/
class StatusService implements StatusServ... |
Java | UTF-8 | 2,491 | 3.03125 | 3 | [] | no_license | package edu.byu.cs.tweeter.model.service.request;
/**
* Contains all the information needed to make a register request.
*/
public class RegisterRequest {
private String firstName;
private String lastName;
private String username;
private String password;
private byte[] imageBytes;
/**
*... |
C# | UTF-8 | 2,579 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Xml;
using System.Xml.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows.Forms;
using HtmlAgilityPack;
namespace GoogleMiner
{
class Program
{
... |
Python | UTF-8 | 923 | 3.8125 | 4 | [] | no_license | input_list = [5, 6, 2, 10, 15, 20, 5, 2, 1, 3]
def div_by_five(num):
if num % 5 == 0:
return True
else:
return False
xyz = (i for i in input_list if div_by_five(i)) # generator (doesn't create a list)
print(xyz) # <generator object <genexpr> at 0x10fecc7d8>
xyz = [i for i in input_list if... |
C++ | UTF-8 | 687 | 3.84375 | 4 | [] | no_license | #include<iostream>
#include<cmath>
using namespace std;
class PalindromicInt {
private:
int length(int num) {
if(num==0) return 1;
if(num<0) return -1;
int len=0;
while(num) {
num/=10;
len++;
}
return len;
}
public:
bool isPalindrome(int num) {
int len=length(num);
if(len<=0) return false;
... |
C# | UTF-8 | 1,743 | 3.1875 | 3 | [] | no_license | using System.Security.Cryptography;
using System.Text.RegularExpressions;
using System.Text;
using System.Web;
using System;
public class Hash {
public static string REGEX_SIGNATURE_END = @"&signature=.*$";
public static string EncodeURL(string secret, string url) {
// Encode the url and Convert the string ... |
Java | UTF-8 | 2,442 | 2.828125 | 3 | [] | no_license | package com.whaley.chatserver.service.incomingmessages.messagereading;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import com.whaley.chatserver.service.bridge.SynchronizedQueue;
import com.whaley.chatserver.service.data.Message;
import com.whaley.chatserver.service.inc... |
Java | UTF-8 | 1,348 | 2.265625 | 2 | [] | no_license | package com.marve.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.stereotype.Component;
import com.marve.entity.Candidate;
@Component
public class CandidateDao {
public void addResult(Candidate c) th... |
C++ | UTF-8 | 14,214 | 2.6875 | 3 | [
"MIT"
] | permissive | #include "formulas/UserDefined.h"
#include <cmath>
#include <stack>
#include <sstream>
#include "utils/Range.h"
namespace sag {
Vector<number> UserDefined::step(const Vector<number>& prev, const std::vector<number> params) {
std::vector<number> res;
for (std::vector<std::vector<Parser::Elem>>::iterator formula =... |
C++ | UHC | 12,176 | 2.8125 | 3 | [] | no_license | #include "SRPG.h"
#include "SRPG_characters.h"
//SRPG_characters.cpp ÷̾ Ϳ ܺ
extern char
*pname,
*ename;
extern short
pMHP,
pHP,
pMAP,
pAP,
pMEXP,
pEXP,
pSTR,
pAGL,
pDEF,
pLV,
eMHP,
eHP,
eMAP,
eAP,
eSTR,
eAGL,
eDEF,
eEXP,
eNumber;
extern bool
pUnd,
pdead,
pCor,
eUnd,
edead,
eCor,
ispDEFup,
iseDEFup,
iseSMKed,
turns... |
Python | UTF-8 | 40 | 2.875 | 3 | [] | no_license | C = float(input())
F = 9*C/5+32
print(F) |
Markdown | UTF-8 | 3,286 | 3 | 3 | [] | no_license | # School_District_Analysis
## Project Overview
Maria has assigned me the task of re-evaluating the district grade data in light of Thomas High School being flagged for academic dishonesty with respect to its ninth graders. To that end, I have modified the data to exclude 9th grade testing results from Thomas High Sch... |
PHP | UTF-8 | 504 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use App\Post;
use Illuminate\Database\Seeder;
class PostTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('posts')->truncate();
$faker = \Faker\Factory::create();
foreach(range(1,50) as $ind... |
Python | UTF-8 | 6,123 | 2.5625 | 3 | [] | no_license | from gi.repository import Gtk, GLib, Gdk
import random
import threading
import time
import coloring
Gdk.threads_init()
GLib.threads_init()
MAZE_SIZE = 100
CELL_WIDTH = 4
WALL_WIDTH = 0
class PrimsPainter():
def __init__(self, darea):
self.darea = darea
width = (CELL_WIDTH + WALL_WIDTH) * MAZE_SI... |
C++ | UTF-8 | 2,936 | 2.859375 | 3 | [] | no_license | #include "y/counting/mloop.hpp"
#include "y/counting/comb.hpp"
#include "y/counting/perm.hpp"
#include "y/counting/permutations.hpp"
#include "y/counting/symm-pair.hpp"
#include "y/type/point3d.hpp"
#include "y/utest/run.hpp"
#include "y/sequence/vector.hpp"
#include "y/container/matrix.hpp"
using namespace upsylon;
... |
Go | UTF-8 | 7,127 | 2.875 | 3 | [
"MIT"
] | permissive | package edit_test
import (
"testing"
"github.com/influxdata/flux/ast"
"github.com/influxdata/flux/ast/astutil"
"github.com/influxdata/flux/ast/edit"
"github.com/influxdata/flux/parser"
"github.com/influxdata/flux/values"
)
func TestEditor(t *testing.T) {
testCases := []struct {
name string
in ... |
JavaScript | UTF-8 | 7,524 | 4.125 | 4 | [
"MIT"
] | permissive | /**
Before doing the exercise please preview the following links:
1. http://javascript.ruanyifeng.com/grammar/function.html#
2. http://javascript.ruanyifeng.com/oop/this.html#toc3
3. http://es6.ruanyifeng.com/#docs/function - ES6
4. https://github.com/getify/You-Dont-Know-JS/blob/master/scope%20&%20closures/READM... |
C# | UTF-8 | 663 | 2.609375 | 3 | [] | no_license | using System.ComponentModel.DataAnnotations;
namespace CourseWorkDb.Models.Tables
{
public partial class ProductType
{
[Display(Name = "Номер")]
public int Id { get; set; }
[Display(Name = "Вид продукции")]
[Required(ErrorMessage = "Укажите вид продукции")]
... |
Java | UTF-8 | 668 | 1.960938 | 2 | [] | no_license | package com.example.pricemonitor.repository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.example.pricemonitor.model.InstrumentTick;
@Configuration
@S... |
Java | UTF-8 | 3,031 | 2.890625 | 3 | [
"MIT"
] | permissive | package seedu.address.logic.parser;
import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;
import static seedu.address.logi... |
Python | UTF-8 | 458 | 2.734375 | 3 | [] | no_license | # Pyramid application to connect to wsgi_server.py
from pyramid.config import Configurator
from pyramid.response import Response
def hello_world(request):
# Create the pyramid response object
return Response(
'Hello world from Pyramid!\n',
content_type='text/plain',
)
# Add configuration
... |
Python | UTF-8 | 7,358 | 2.984375 | 3 | [] | no_license | # coding: utf-8
# 1 - Import library
import pygame
import math
import random
from pygame.locals import *
# 2 - Initialize the game
pygame.init()
pygame.mixer.init()
width, height = 700, 600
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption("打鼩鼬鼱")
# 3 - Set values & variables
time_teller = ... |
Python | UTF-8 | 279 | 4.25 | 4 | [] | no_license | # Crie um algoritmo que leia um numero e mostre o seu dobro, triplo e a raiz quadrada.
n1 = int(input('Digite um numero: '))
print('O dobro do numero é: {}'.format(n1 * 2))
print('O triplo do numero é: {}'.format(n1 * 3))
print('A raiz quadrada é: {}'.format((n1 ** (1/2))))
|
Python | UTF-8 | 5,830 | 2.828125 | 3 | [] | no_license | import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import configparser
import PyWeather
class PyWeatherGUI(QDialog):
'''
classdocs
'''
def __init__(self, parent=None):
'''
Constructor
'''
#
# Call contstructor of our Super Class, we inherit from Q... |
PHP | UTF-8 | 11,375 | 2.875 | 3 | [] | no_license | <?php
class InternshipModel {
//Muestra los datos de estancia relativos a un niu de estudiante
public static function getStudentInternship($conn, $niu_estudiante){
$internship = null;
if(isset($conn)){
try{
include_once '../entities/Internship.inc.php';
... |
C | UTF-8 | 1,161 | 2.53125 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include "arena.h"
INSTR programa[] = {
{PUSH, {NUM, 3}},
{PUSH, {NUM, 6}},
{CALL, {NUM, 5}},
{PRN, {NUM, 0}},
{END, {NUM, 0}},
{ADD, {NUM, 0}},
{RET, {NUM, 0}}
};
int main(int ac, char **av) {
display = popen("./apres", "w");
Arena *a = cria_arena();
te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.