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 | 4,591 | 2.40625 | 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 Services;
import Entities.Demande;
import Entities.Don;
import com.codename1.io.ConnectionRequest;
import com.codename1.io.Ne... |
Java | UTF-8 | 1,368 | 3.3125 | 3 | [] | no_license | package it.polimi.ingsw.model;
import it.polimi.ingsw.model.exception.PositionOutOfBoundsException;
import java.io.Serializable;
import java.util.Objects;
/**
* defines size of the Board and range of possible positions accepted
* every BoardCell is related to a Position
*/
public class Position implements Seriali... |
Python | UTF-8 | 191 | 3.359375 | 3 | [] | no_license | a = float(1)
b = float("1")
c = float("-1.0666")
d = float("-infinity")
print(a, b, c, d)
print(type(c))
print(type(d))
i = "5.05"
print("type a", type(i))
z = "7"
print("type z", type(z)) |
Java | UTF-8 | 6,503 | 2.09375 | 2 | [] | no_license | package be.openclinic.datacenter;
import java.awt.Color;
import java.awt.geom.Ellipse2D;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleD... |
Shell | UTF-8 | 295 | 2.578125 | 3 | [] | no_license | #!/usr/bin/env bats
PCAP="command23.pcap"
CFG="snort.lua"
OPTION="-q -A csv -k none -l ."
@test "Event Queue and IPS" {
$snort -r $PCAP -c $CFG $OPTION > snort.out
diff expected event_trace.txt --ignore-matching-lines "^Trace st"
}
teardown()
{
rm -f snort.out event_trace.txt
}
|
Java | UTF-8 | 687 | 2.015625 | 2 | [] | no_license | package br.com.henriquecouto.domain.model;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
i... |
Shell | UTF-8 | 3,500 | 4.25 | 4 | [] | no_license | #!/bin/bash
# Author: Jerry Peng 2018
# In this script,
# 1) we check the format of wav files inside a given directory
# 2) create wav.scp. It will be used in kaldi.
posfix="*.MP3"
cleanup=false
. ./utils/parse_options.sh || exit 1;
if [ $# -ne 2 ]; then
echo "Usage: check_and_format_data.sh [--posfix='*.... |
Java | UTF-8 | 1,384 | 2.65625 | 3 | [] | no_license | package com.rob.tutorial.query;
import com.rob.tutorial.TestGeodeClient;
import com.rob.tutorial.data.Customer;
import com.rob.tutorial.data.CustomerKey;
import org.apache.geode.cache.query.*;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
/**
* ... |
C# | UTF-8 | 7,625 | 2.8125 | 3 | [] | no_license | using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Text;
using System.Collections.Generic;
/// <summary>
/// Summary description for travelDetailsDAO
/// </summary>
public class travelDetailsDAO
{
//... |
JavaScript | UTF-8 | 9,972 | 2.734375 | 3 | [] | no_license | $(function(){
class navlist{
constructor(navtabdata){
this.navtabdata = navtabdata;
this.links();
}
//处理标签
links(){
this.addcreatnavul();
this.addcreatnavbodyul();
this.addcreatmouse();
}
//创建顶部标签
add... |
C# | UTF-8 | 1,661 | 2.625 | 3 | [
"MIT"
] | permissive | using UnityEngine;
using UnityEngine.Serialization;
namespace Buriola.Board
{
public class Node : MonoBehaviour
{
[FormerlySerializedAs("canPacmanMoveHere")]
public bool CanPacmanMoveHere = true;
[FormerlySerializedAs("neighbours")]
public Node[] Neighbours;
[Formerly... |
C++ | UTF-8 | 417 | 2.96875 | 3 | [] | no_license | #include <stdio.h>
struct structA
{
int iMember;
char *cMember;
};
int main(int argc, char* argv[])
{
structA instant1,instant2;
char c = 'a';
instant1.iMember = 1;
instant1.cMember = &c;
instant2 = instant1;
printf("*(instant1.cMember)->%c\n",*(instant1.cMember));
*(instan... |
Java | UTF-8 | 949 | 3.53125 | 4 | [] | no_license | package 树;
/**
* 给定一个 N 叉树,找到其最大深度。
* <p>
* 最大深度是指从根节点到最远叶子节点的最长路径上的节点总数。
* <p>
* 例如,给定一个 3叉树 :
* <p>
*
* <p>
* <p>
* <p>
*
* <p>
* 我们应返回其最大深度,3。
* <p>
* 说明:
* <p>
* 树的深度不会超过 1000。
* 树的节点总不会超过 5000。
* <p>
* 来源:力扣(LeetCode)
* 链接:https://leetcode-cn.com/problems/maximum-depth-of-n-ary-tree
* 著作... |
Python | UTF-8 | 10,974 | 2.75 | 3 | [] | no_license | #!/usr/bin/env python
# coding: utf-8
import os.path
import re
import selenium
import pandas as pd
import time
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.common import exceptions
import json
from collections import OrderedDict
import sys
import bs4
class crawler(webdriver.Chrome):
... |
Markdown | UTF-8 | 455 | 2.640625 | 3 | [
"MIT"
] | permissive | # Stylus
Quasar 提供了主题,用户可以任意定制和修改。样式均由Stylus写就,戳[这里](http://www.zhangxinxu.com/jq/stylus/)学习Stylus。
# 网格布局(Grid layout)
关于布局,首先要了解[CSS弹性盒模型](http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html)(flexbox)。
Quasar提供了很多CSS类帮助我们轻松实现布局。可以简单地把这种布局方式理解为table的行列布局。
|
C# | UTF-8 | 6,022 | 3.640625 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Menu
{
class Program
{
static void Multiplication(int nb)
{
for (int i = 1; i <= 10; i++)
{
Console.WriteLine("{0}*{1} = {2}", n... |
PHP | UTF-8 | 1,517 | 2.765625 | 3 | [] | no_license | <?php
namespace app\repositories;
use app\models\Article;
use yii\data\Pagination;
use app\models\Category;
class CategoryRepository extends Category
{
/**
* @return int|string
*/
public function getArticlesCount() : int
{
return $this->getArticles()->count();
}
/**
* @ret... |
TypeScript | UTF-8 | 810 | 2.640625 | 3 | [] | no_license | export declare class Url {
#private;
constructor(url?: string);
/** `http` or `https` */
scheme?: string;
domain?: string | null;
port?: number | null;
/** domain + port */
get host(): string | null;
set host(h: string | null);
get pathAndQuery(): string | null;
set pathAndQ... |
Python | UTF-8 | 2,739 | 3.015625 | 3 | [] | no_license | #!/usr/bin/env python
# coding: utf-8
# ## KNN分类器
# K-Nearest Neighbor classifier
# 注意:
# 无需学习的一个简单非线性分类器,适合于数据集小,维度少的数据分类
# K值的选取会影响分类的准确度
# 原理:
# 每次对一个数据分类时,需要计算该数据到训练集(其实不训练,或者叫带标签的先验集)中所有数据的距离(欧氏距离(推荐),曼哈顿距离等),找最近的k个数据,这k个数据就代表了该数据的所属类别,譬如K个数据中有x个A类数据,y个B类数据(x + y = k),那么该数据属于A类的概率x/k,属于B类的概率y/k。
# In[1]:
'''导入... |
Markdown | UTF-8 | 4,101 | 2.78125 | 3 | [
"MIT"
] | permissive | ---
title: Ενας Οσιος Ιερεας
date: 03/02/2022
---
`Διαβάστε Εβρ. 7:26. Ποια είναι τα πέντε χαρακτηριστικά του Ιησού σε αυτά τα εδάφια;`
Ο Ιησούς ήταν «Όσιος», δεν είχε ψεγάδι στη σχέση Του με τον Θεό (Εβρ. 2:18, 4:15, 5:7, 8). Το αρχαίο ελληνικό κείμενο της Παλαιάς Διαθήκης χρησιμοποιεί τον ίδιο όρο για να προσδι... |
Python | UTF-8 | 666 | 3.9375 | 4 | [] | no_license | """
Your job is to make a "Twitter link" regular expression `rx`. This RegEx
searches a tweet to find the **@handle** and the **#handle**. Only return the
**@** and **#** handles.
### Examples
tweet("Visit us at @edabit") ➞ "@edabit"
tweet("Follow @JavaScript") ➞ "@JavaScript"
tweet("#Honesty... |
Markdown | UTF-8 | 21,380 | 2.65625 | 3 | [] | no_license | # Add upload file to form and store it to model-id-depends folder
## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
add
```
"bscheshirwork/yii2-file-upload-behavior": "@dev"
```
to the require section of your `composer.json` file.
The namespac... |
Go | UTF-8 | 1,553 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | package main
import (
"encoding/binary"
"log"
"os"
"os/signal"
"syscall"
"time"
"github.com/mediabuyerbot/go-wirenet"
)
var startIndex int
func main() {
wire, err := wirenet.Join(":9876",
wirenet.WithSessionCloseTimeout(time.Second),
wirenet.WithRetryMax(1000),
wirenet.WithRetryWait(time.Second, 10*ti... |
Python | UTF-8 | 92 | 2.578125 | 3 | [] | no_license | li = []
for i in range(10):
import pdb;
pdb.set_trace()
li.append(i)
print(li)
|
Python | UTF-8 | 5,926 | 2.8125 | 3 | [] | no_license | class Intcode_computer():
def __init__(self, inputs = []):
self.sequence = []
self.inputs = inputs
self.outputs = []
self.p = 0
self.rb = 0
self.state = "initiated"
def read_sequence(self, path):
with open(path, 'r') as f:
seq = f.read()
... |
C++ | UTF-8 | 1,307 | 3.546875 | 4 | [] | no_license |
#include <utility>
using namespace std;
namespace itertools {
template <typename E1, typename E2>
class product
{
public:
const E1& pro1;
const E2& pro2;
product(const E1& pro1_begin, const E2& pro2_end) : pro1(pro1_begin), pro2(pro2_end){}
template<typename T1, typename T2>
class iterator
{
public:... |
C# | UTF-8 | 5,498 | 2.765625 | 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 SystemAnalysis1
{
public partial class ChooseProblemForm : Form
{
private List... |
Markdown | UTF-8 | 3,688 | 2.734375 | 3 | [] | no_license | # Statamic Butik Documentation

[](https://packagist.org/packages/jonassiewertsen/statam... |
Java | UTF-8 | 402 | 2.125 | 2 | [] | no_license | package model;
/**
* project_name:java_demo
* package_name:model
* user: youzipi
* date: 2014/8/26
*/
public class Bookmark {
private String url;
private String title;
private String category;
public Bookmark() {
}
public Bookmark(String url, String title, String category) {
this... |
C# | UTF-8 | 2,759 | 2.53125 | 3 | [] | no_license | using JobBuddy.Models;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartupAttribute(typeof(JobBuddy.Startup))]
namespace JobBuddy
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{... |
Shell | UTF-8 | 752 | 3.21875 | 3 | [
"MIT"
] | permissive | #!/bin/bash
insert_test_dir="./testcases/insertion/"
merge_test_dir="./testcases/merge_sort/"
if [[ $1 == "insert" ]]; then
input_file=$insert_test_dir$2
readable_input=$insert_test_dir$3
output_file=$readable_input"_insert"
integer_file=$insert_test_dir$4
./insertion $input_file $integer_file
... |
Java | UTF-8 | 239 | 2.53125 | 3 | [] | no_license | package Oops_Concept;
public class MethodMain_Class {
public static void main(String[] args) {
Methods tm1 = new Methods();
tm1.add(3, 4444);
tm1.dothis();
int u = tm1.mulp(43, 11);
System.out.println(u);
}
}
|
Java | UTF-8 | 342 | 2.046875 | 2 | [] | no_license | package com.vv.easy.client;
import org.apache.http.impl.client.CloseableHttpClient;
public class TaskWrapper extends Thread {
private CloseableHttpClient httpClient;
public TaskWrapper(CloseableHttpClient httpClient) {
this.httpClient = httpClient;
}
@Override
public void run() {
... |
C | UTF-8 | 1,879 | 3.34375 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
int main() {
int n, r, curr_sum, j, k;
scanf("%d %d", &n, &r);
int **F = malloc(n * sizeof(int *));
int **W = malloc(n * sizeof(int *));
for (int i = 0; i < n; ++i) {
F[i] = malloc(n * sizeof(int));
W[i] = malloc(n * sizeof(int));
}
... |
Markdown | UTF-8 | 5,510 | 3.0625 | 3 | [] | no_license | # Description du Projet
Un exemple très sommaire de jeu est fourni qui permet seulement de se déplacer parmi quatre pièces d'un château.
Quatre commandes de mouvement (N, S, E ou O) permettent de se déplacer d'une pièce à une autre en empruntant la sortie correspondante de la pièce
(nord, sud, est ou ouest respectiv... |
Java | UTF-8 | 1,104 | 2.171875 | 2 | [] | no_license | package com.chattio.controller;
import com.chattio.dto.UserDto;
import com.chattio.service.DialogService;
import com.chattio.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.security.Principal;
import java.util.List;
@Re... |
Python | UTF-8 | 243 | 3.203125 | 3 | [] | no_license | import sys
def gcd(a, b):
n = max(a, b)
g = i = 1
while i <= n:
if a % i == 0 and b % i == 0:
g = i
i = i + 1
return g
a = int(sys.argv[1])
b = int(sys.argv[2])
print "gcd(%d, %d) = %d" % (a, b, gcd(a, b))
|
Markdown | UTF-8 | 27,257 | 2.640625 | 3 | [] | no_license | # gate-api
Welcome to Gate.io API
APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf.
This Python package is automatically generated by the [OpenAPI Generator](https://open... |
JavaScript | UTF-8 | 78 | 3.109375 | 3 | [] | no_license | let num =[5, 8, 2, 9, 3];
num.sort();
console.log(`Nosso vetor é o ${num}`); |
TypeScript | UTF-8 | 2,042 | 3.03125 | 3 | [] | no_license | import { Value, ValueType } from './Value';
export type GradientColorValueType = ValueType & {
colorsCount: number;
timelineCount: number;
};
export class GradientColorValue extends Value {
private static _temp: number[] = [0, 0, 0, 0];
public colors: number[] = [1, 1, 1];
public timeline: number... |
Python | UTF-8 | 1,249 | 4.1875 | 4 | [] | no_license | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 24 18:56:04 2021
@author: maherme
"""
#%%
# Notice the memory address in this example of inmutable object and how this
# object does not change after the function is called.
def process(s):
print('Initial s # = {0}'.format(id(s)))
s = s + '... |
C++ | UTF-8 | 2,002 | 2.765625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /* This file is Copyright University of Edinburgh 2018. For license details, see LICENSE. */
#pragma once
#include <cstdint>
#include <vector>
#include <string>
namespace libgvnc
{
struct FB_PixelFormat {
FB_PixelFormat()
{
}
FB_PixelFormat(uint8_t bpp, uint8_t depth, uint8_t be, uint8_t truecolor, uint8_t... |
C | UTF-8 | 1,289 | 2.734375 | 3 | [] | no_license | #define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
Java | UTF-8 | 6,894 | 1.9375 | 2 | [] | no_license | package edu.cs.columbia.iesrcsel.utils.extracting.impl;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import opennlp.tools.util.InvalidFo... |
Python | UTF-8 | 14,999 | 2.71875 | 3 | [
"MIT",
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | #!/usr/bin/env python
import pytest
from simpy_events.event import Event, EventDispatcher, Context
import simpy
@pytest.fixture
def env():
yield simpy.Environment()
def test_create_context():
c = Context(event='my event', hook='before', attr1='test')
assert c.event == 'my event'
assert c.hook == 'b... |
TypeScript | UTF-8 | 1,645 | 2.96875 | 3 | [] | no_license | export type Rule = (val: any, ...insertedArgs: any[]) => boolean;
export interface RuleData {
rule: Rule;
message: string;
ruleId?: string;
}
/**
* FieldsDescription type for using it in constructor
* you only can use array of objects with RuleData
*/
export interface FieldsDescription {
[key: string]: Rul... |
JavaScript | UTF-8 | 565 | 2.53125 | 3 | [] | no_license | console.log(process.version); //노드의 버전
console.log(process.arch); // 프로세서 아키텍트 버전
console.log(process.platform); // 운영체제 플랫폼 정보
console.log(process.pid); // 현재 프로세스 아이디 => 프로세스를 여러 개 가질때 구분할 수 있음.
console.log(process.uptime()); // 프로세스가 시작된 루 흐른 시간, 단위=초
console.log(process.execPath); //노드의 경로
console.log(process.cwd()... |
C++ | UTF-8 | 431 | 2.71875 | 3 | [] | no_license | #include <iostream>
#include <fstream>
using namespace std;
class Jugadores
{
private:
string nombre;
int puntaje;
public:
Jugadores();
string getNombre();
void setNombre(string aux);
int getPuntaje();
void setPuntaje(int aux);
friend ostream &o... |
Java | UTF-8 | 2,218 | 2.15625 | 2 | [] | no_license | package br.com.payroll;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import java.util.Locale;
public class MainActivity extends AppCompatA... |
Python | UTF-8 | 1,319 | 2.65625 | 3 | [] | no_license | from django.http import HttpResponse
from .models import Siti, Categorie, Links, Prodotti
from . import scrapers
# costruisce tutti i link unendo siti e categorie, va richiamata solo se si sono apportate modifiche alla tabella siti e/o categorie
# dopo essere stata richiamata, inserire manualmente nella tabella Links... |
Java | UTF-8 | 1,631 | 3.796875 | 4 | [] | no_license | /**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
public class LowestCommonAncestor {
public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
if(root==p || root=... |
Java | UTF-8 | 643 | 2.84375 | 3 | [] | no_license | public class genefind
{
public static void main(String[] args)
{
String start = args[0];
String end = args[1];
String genome = StdIn.readAll();
int beg = -1;
for(int i=0;i<genome.length() - 2;i++)
{
String codon = genome.substring(i,i+3);
i... |
Python | UTF-8 | 9,078 | 3.078125 | 3 | [] | no_license | # importing packages
import numpy as np
import pandas as pd
from math import sqrt
from sklearn.metrics.pairwise import pairwise_distances
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import train_test_split
# column headers for the dataset
data_cols = ['userID', 'movieID', 'rating', 'ti... |
Rust | UTF-8 | 2,025 | 2.9375 | 3 | [] | no_license | use std::cell::RefCell;
use std::collections::HashMap;
use std::rc::Rc;
use crate::intcode::{self, Program};
pub fn solve() {
println!("{}\n{}", solve1(), solve2());
}
type Point = (i32, i32);
const FILENAME: &str = "files/11.in";
fn solve1() -> i32 {
let mut program = intcode::read(FILENAME);
get_colo... |
Shell | UTF-8 | 1,149 | 2.890625 | 3 | [] | no_license | # https://docs.microsoft.com/en-us/azure/app-service/scripts/app-service-cli-deploy-github
# Azure CLI for Mac/Linux (only difference is use of envvars %username% vs $USER)
# ...and the file extension
# run commands in Terminal
# gitrepo=https://github.com/Azure-Samples/php-docs-hello-world
gitrepo=https://g... |
Java | UTF-8 | 571 | 2.765625 | 3 | [] | no_license | /*
HackerRank Contest : 30 Days of code
Sat 30 Januaray 2016
Made with <3 by Pierre Plantié
*/
public class DataTypesPractice {
public static void main(String[] args) {
// Write your print statements here!
System.out.println("Primitive : double\nPrimitive : char\nPrimitive : boolean\nPrimitive : int... |
TypeScript | UTF-8 | 528 | 2.71875 | 3 | [
"MIT"
] | permissive | import {Message} from 'typegram'
import {Result} from './type'
import {plaintext} from './plaintext'
import {raw} from './simple'
export * from './type'
export * from './simple'
export type FormatType = 'raw' | 'plaintext'
export const FORMATS: FormatType[] = ['raw', 'plaintext']
export function formatByType(histo... |
Java | UTF-8 | 1,904 | 2.078125 | 2 | [] | no_license | package com.dalong.webview;
import android.graphics.Bitmap;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActi... |
JavaScript | UTF-8 | 2,884 | 2.578125 | 3 | [] | no_license | // This is an EXCELLENT promise library!
import Q from 'q';
const express = require('express');
const router = express.Router();
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const keys = require('../../config/keys');
const passport = require('passport');
// Load Input Validation
const vali... |
C++ | UTF-8 | 6,732 | 2.703125 | 3 | [
"Zlib"
] | permissive | /*
HDRI pre-filter shaders from https://learnopengl.com/PBR
*/
#pragma once
#include <string>
static const std::string PBRCubeVertex = R"(
ATTRIBUTE vec4 a_position;
VARYING_OUT vec3 v_worldPosition;
uniform mat4 u_viewProjectionMatrix;
void main()
{
v_worldPosi... |
PHP | UTF-8 | 4,385 | 2.90625 | 3 | [] | no_license | <?php
/**
* Posts Customizations
*
* @package Lift\OGN\Theme
* @subpackage Posts
*/
namespace Lift\OGN\Theme;
/**
* Class: Posts
*
* Customizes the OGN Posts Experience.
*
* @since v1.2.0
*/
final class Posts {
/**
* Register Hooks
*
* @since v1.2.0
* @return void
*/
public function regist... |
Markdown | UTF-8 | 312 | 2.53125 | 3 | [] | no_license | ## 作業
### 作業 1
完成
```cpp
Str a="ABC";
char s = (char)a;
```
但是
```cpp
Str a="ABC";
char s = a;
```
要禁止自動轉換
### 作業2
只考慮 int double folat 做一個 template 物件,包含基本op操作。

|
Markdown | UTF-8 | 9,142 | 3.296875 | 3 | [
"MIT"
] | permissive | This document describes a ZIP64 file in ["literate binary"][lb] notation,
integrating handcrafted binary (expressed as hex code) with documentation
written in [Markdown][Markdown]. Two different representations can be derived
from this document:
1. A PDF/HTML/Latex ... file, using a Markdown converter like [Pandoc][P... |
PHP | UTF-8 | 6,102 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include_once 'db_connection.php';
if (isset($_GET['pid']))
$_SESSION['pid'] = $_GET['pid'];
//set validation error flag as false
$error = false;
//check if form is submitted
if (isset($_POST['report'])) {
setcookie('mycookie', $_POST['report']);
$ititle = mysqli_real_escape_strin... |
Java | UTF-8 | 781 | 2.6875 | 3 | [] | no_license | package com.taobao.daogou.client.util;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* 一个简单的线程池
*/
public class ThreadPoolHelper {
static ThreadPoolHelper mInstance;
public static... |
Java | UTF-8 | 1,424 | 1.734375 | 2 | [] | no_license | package angady.com.customer.data.remote;
import java.util.Map;
import angady.com.customer.model.entities.BaseResponse;
import angady.com.customer.model.entities.ShopListResponse;
import angady.com.customer.model.network.AuthorizeRequest;
import angady.com.customer.model.network.ProductListRequest;
import angady.com.c... |
Rust | UTF-8 | 45,834 | 2.734375 | 3 | [
"MIT"
] | permissive | extern crate rand;
use rand::{Rand, Rng, StdRng};
use std::fmt;
pub use std::collections::HashMap;
pub trait AllValues {
fn all_values() -> Vec<Self>
where
Self: std::marker::Sized;
}
macro_rules! all_values_rand_impl {
($($t:ty)*) => ($(
impl Rand for $t {
fn rand<R: Rng>(rn... |
Java | UTF-8 | 883 | 2.078125 | 2 | [
"Apache-2.0"
] | permissive | package com.flame.mall.admin.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotEmpty;
/**
* 修改用户名密码参数
*
* <p>Title:</p>
* <p>Description:</p>
* <p>Copyright: Copyright (c) 2020</p>
* <p>Company:PCCW</p>
*
* @version 1.0
* ... |
Rust | UTF-8 | 742 | 2.8125 | 3 | [] | no_license | use super::world::LocationKey;
pub enum Eyes {
Open,
Closed,
Disabled,
}
impl Default for Eyes {
fn default() -> Self {
Eyes::Closed
}
}
pub struct PhysicalAttributes {
pub eyes: Eyes,
}
impl Default for PhysicalAttributes {
fn default() -> Self {
PhysicalAttributes {
... |
Python | UTF-8 | 999 | 3.140625 | 3 | [] | no_license | '''
Keep in mind decision tree is non linear and non contenious model
'''
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# from sklearn.preprocessing import Imputer,LabelEncoder,OneHotEncoder,StandardScaler
# from sklearn.model_selection import train_test_split
from sklearn.tree import Decis... |
Java | UTF-8 | 1,031 | 2.796875 | 3 | [] | no_license | package com.study.pattern.cache.key;
import java.util.Arrays;
import javax.cache.annotation.GeneratedCacheKey;
public class DefaultArrayBasedGeneratedCacheKey implements GeneratedCacheKey {
/**
*
*/
private static final long serialVersionUID = 1L;
private final Object[] parameters;
private final int hash... |
Java | UTF-8 | 5,159 | 2.25 | 2 | [] | no_license | package com.guochen.controller;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.ss.usermod... |
PHP | UTF-8 | 2,466 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Fabio
* Date: 29/06/2020
* Time: 11:22
*/
namespace App\Database\Bartender;
use App\Database\Order\Order;
use Fcristiano\LaravelCommon\Model\Utils\ManageDeletedAt;
use Illuminate\Database\Eloquent\Model;
/**
* Class Bartender
* @package App\Database\Bartender
*
* @p... |
Python | UTF-8 | 14,750 | 4.28125 | 4 | [] | no_license | #
# Time : O(N); Space: O(H), where H is height of the tree
# @tag : Tree and BST
# @by : Shaikat Majumdar
# @date: Aug 27, 2020
# **************************************************************************
#
# Geeks for Geeks - Print All Leaf Nodes of a Binary Tree from left to right
#
# Description:
# Given a Binary ... |
Markdown | UTF-8 | 1,541 | 2.59375 | 3 | [
"MIT"
] | permissive | # Welcome to the documentation for PlantCV
## Getting started
[PlantCV](http://plantcv.danforthcenter.org) is composed of modular functions in order to be applicable to a
variety of plant types and imaging systems.
In the following documentation
we will describe use of each function and provide tutorials on how each... |
Python | UTF-8 | 302 | 3.5 | 4 | [] | no_license | x = int(input("Insert x: "))
y = int(input("Insert y: "))
P = [x,y]
x = int(input("Insert x translation: "))
y = int(input("Insert y translation: "))
P_ = [P[0] + x ,P[1] + y]
def ShowIt(P, P_):
print("P: (", P[0],",",P[1],")")
print("P': (", P_[0],",",P_[1],")")
ShowIt(P,P_)
|
Rust | UTF-8 | 12,523 | 3.078125 | 3 | [
"MIT"
] | permissive | use resources::ResourcesLoader;
use serialize::json;
use std::ascii::StrAsciiExt;
use std::collections::{ HashSet, HashMap };
use super::EntitiesState;
use super::EntitiesHelper;
use super::EntityID;
use super::ComponentID;
/// Loads entities into an EntitiesState
pub fn load(loader: &ResourcesLoader, resourceName: &s... |
Java | UTF-8 | 1,559 | 2.453125 | 2 | [] | no_license | package com.tinyurl.api.component.urlcreator;
import com.tinyurl.api.exception.EmptyRequestException;
import com.tinyurl.api.exception.EmptyURLException;
import com.tinyurl.api.model.OrgURL;
import com.tinyurl.api.model.URL;
import com.tinyurl.api.repository.OrgURLRepository;
import com.tinyurl.api.restcontrollers.dto... |
TypeScript | UTF-8 | 4,387 | 2.53125 | 3 | [
"MIT"
] | permissive | import { State } from '../../State';
import { AdaptedEvent, Config } from '../interfaces';
import GestureHandler from './GestureHandler';
import RotationGestureDetector, {
RotationGestureListener,
} from '../detectors/RotationGestureDetector';
const ROTATION_RECOGNITION_THRESHOLD = Math.PI / 36;
export default cla... |
Java | UTF-8 | 2,739 | 2.375 | 2 | [] | no_license | package com.exhibit.rpc.util;
import java.lang.management.ManagementFactory;
import java.net.URL;
import java.util.Iterator;
import java.util.Set;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.Query;
/**
*
* @... |
Java | UTF-8 | 988 | 2.140625 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package top.myhdg.bijou.activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import top.myhdg.bijou.R;
import static top.myhdg.bijou.activity.MainActivity.htmlSource;
public class SourceActivity extends BaseActivity {
private E... |
Python | UTF-8 | 391 | 3.515625 | 4 | [] | no_license | # Calculate the factorial of N
def fac(n):
''' returns n*(n-1)*(n-2)...*1, n>1
1, n <=1
'''
if n <=1:
return 1
return n * fac(n-1)
def facIterative(n):
result = 1
for i in range(2, n+1):
... |
Python | UTF-8 | 3,535 | 2.890625 | 3 | [
"BSD-3-Clause"
] | permissive | from flam import *
# context_factory is an object with callable attributes used to construct the
# real context.
#
# context_factory.req = ...
"""
Decorators provided by flam:
accept(mime_type)
route(path, endpoint, methods)
template(template)
resource(model)
unpack_form(schema)
unpack_query(schema)
"""
class Pat... |
SQL | UTF-8 | 2,111 | 3.78125 | 4 | [] | no_license | SELECT * FROM Franchisees
SELECT * FROM Stores;
SELECT * FROM [Unified Receipts];
SELECT * FROM Stores
GROUP BY zipcode;
SELECT zipcode FROM Stores
GROUP BY zipcode;
SELECT DISTINCT zipcode FROM Stores;
SELECT zipcode, COUNT(*) as Count from Stor... |
Markdown | UTF-8 | 8,223 | 3.328125 | 3 | [] | no_license | # Neural-Style-Transfer-for-Images
Besides Deep Dream, another major development in deep learning-driven image modification that happened in the summer of 2015 is neural style transfer, introduced by Leon Gatys et al. The neural style transfer algorithm has undergone many refinements and spawned many variations since i... |
JavaScript | UTF-8 | 1,989 | 3.09375 | 3 | [] | no_license |
export default class Player {
constructor(props){
this.color = props.color;
this.left = props.left;
this.right = props.right;
this.keyNames = props.keyNames;
this.name = props.name;
this.id = props.id;
this.active = false;
this.wins = 0;
}
reset(){
this.alive = this.active;
this.direction = 2*... |
C# | UTF-8 | 1,423 | 3.5625 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _03.Fruit_coktails
{
class Program
{
static void Main(string[] args)
{
string fruit = Console.ReadLine();
string volume = Console.ReadLine();
... |
Python | UTF-8 | 191 | 3.6875 | 4 | [] | no_license | import sys
name = "Enter Your Text here"
print ("Entered string: ", name)
a = str(name)
print ("Simple string : " + a )
b = unicode (name)
print ("Unicode converted string : " + b )
|
JavaScript | UTF-8 | 1,237 | 2.9375 | 3 | [] | no_license | const button = document.getElementById("button");
const input = document.getElementById("input");
const inner = document.getElementById("Inner");
const pink = document.getElementById("pink");
const green = document.getElementById("green");
const blue = document.getElementById("blue");
const outer = document.getElementB... |
PHP | UTF-8 | 23,555 | 2.96875 | 3 | [] | no_license | <?php
/**
* Image manipulation class
* Uses GD
*
* @author Saša Tomislav Mataić <sasa.tomislav [ AT ] mataic.com>
*/
class Louis_Nya_Image
{
/**
* If image was modified, this attribute holds
* the resulting image resource to be saved
* @var resource
*/
public $_image = null;
/**
*... |
Markdown | UTF-8 | 3,634 | 2.796875 | 3 | [
"BSD-3-Clause"
] | permissive | ### UCSB WSG Webguide
This is the UCSB Web Standards Group webguide which is a static website whose content provides recommendations and best practices for websites hosted within and affiliated with www.ucsb.edu. These recommendations are intended to be broad enough to apply to most any website in any domain -- but an... |
C | UTF-8 | 297 | 3.125 | 3 | [] | no_license | /**
* Author: Olivia Froelicher
* Date: 2020/08/18
*
* A simple hello world program in C
*
*/
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv) {
printf("Olivia Froelicher\n");
printf("Mechanical Engineering\n");
printf("Mike Martinez\n");
printf("Computer Science\n");
return 0;... |
Java | UTF-8 | 2,140 | 1.796875 | 2 | [] | no_license | package team.wuming.common.domain;
import java.io.Serializable;
import java.util.Date;
public class Xuexid implements Serializable {
private String departid;// 学习地点编码
private String xxdd;// 学习点名称
private String dizhi;// 学习地址
private String telephone;// 电话
private String lianxiren;// 联系人
private Str... |
C++ | UTF-8 | 1,777 | 2.546875 | 3 | [] | no_license | //
// Created by Michael on 10/27/19.
//
#include <iostream>
#include <cstring>
#include <pthread.h>
#include <memcached.h>
#include "tracer.h"
uint64_t total_count = (1 << 24);
int thread_number = 2;
memcached_server_st *servers = memcached_servers_parse("localhost");
memcached_st *memc = memcached_create(NULL);
... |
Java | UTF-8 | 1,660 | 2.5 | 2 | [] | no_license | package com.nedink.lang;
public enum Phoneme {
I("i"),
E("e"),
A("a"),
O("o"),
U("u"),
B("b"),
C("c"),
D("d"),
F("f"),
G("g"),
H("h"),
J("j"),
K("k"),
L("l"),
M("m"),
N("n"),
P("p"),
R("r"),
S("s"),
T("t"),
V("v"),
W("w"),
X(... |
C++ | UTF-8 | 730 | 2.671875 | 3 | [] | no_license | /*
* player.hpp
*
* Created on: Sep 10, 2008
* Author: mikosz
*/
#ifndef PLAYER_HPP_
#define PLAYER_HPP_
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <timemanager.hpp>
#include <actor.hpp>
namespace coconutengine
{
class Player : boost::non... |
JavaScript | UTF-8 | 1,747 | 2.609375 | 3 | [] | no_license | var line = $('.line');
var line1 = $('.line-1');
var line2 = $('.line-2');
var text = $('.text');
var tl = new TimelineMax();
tl.to(line, 2, {height:300, ease: Power4.easeInOut})
.to(line, 2, {rotation:35}, "-=0.5")
.to(line2, 0.2, {top:-30}, "=-2")
.to(line1, 2.5, {left:-300, ease: Power4.easeInOut})
.to(lin... |
Java | UTF-8 | 2,791 | 2.15625 | 2 | [] | no_license | package com.gx.vo;
import java.io.Serializable;
import java.util.Date;
public class NoticeVo implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 公告ID
*/
private Integer noticeId;
/**
* 用户ID
*/
private Integer userId;
/**
* 公告名称... |
Java | UTF-8 | 676 | 3.578125 | 4 | [
"Unlicense"
] | permissive | package rpg.skills;
import rpg.characters.RpgCharacter;
/**
* Power Strike Class - Instance of Skill that deals 2 * owner's attack in normal damage to an enemy on use
* @author Nils Rollshausen
*/
public class PowerStrike extends Skill {
/**
* Main constructor for PowerStrike - creates new PowerStrike class wi... |
Java | UTF-8 | 408 | 3 | 3 | [] | no_license | package com.company;
public class Main {
public static RandomRodentGenerator rand = new RandomRodentGenerator();
public static void main(String[] args) {
Rodent []rodents = new Rodent[5];
for(int i=0; i < rodents.length; i++)
rodents[i] = rand.next();
for(Rodent rodent: rodents)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.