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
C++
UTF-8
3,721
2.625
3
[]
no_license
//========================================================================= // Module: r3dBackgroundTaskDispatcher.h // Copyright (C) 2011. //========================================================================= #pragma once ////////////////////////////////////////////////////////////////////////// /** * This c...
TypeScript
UTF-8
981
2.625
3
[ "MIT" ]
permissive
import { Action, Dispatch } from "redux"; import { ActionTypes } from './actionTypes'; import { IFrameData, IRegion } from "../../models/applicationState"; export default interface ICustomDataActions { initFrameData(frameData: IFrameData): void; updateFrame(frame: string, regions: IRegion[]): void; up...
C#
UTF-8
523
2.75
3
[]
no_license
var roomTypeParam = Expression.Parameter(typeof(RoomType), "roomType"); // ???????????????????????? DOES NOT WORK var comparison = Expression.Lambda<Func<House, bool>>( Expression.Equal(houseMainRoomTypeParam, Expression.Constant(Enum.Parse(typeof(Room...
Python
UTF-8
1,614
2.671875
3
[]
no_license
from bot.models import Script, Step scripts = { '1': { 'title': 'Футболки', 'steps': [ {'id': 1, 'next': 2, 'text': 'Какого света?', 'answers': ['Белый', 'Черный']}, {'id': 2, 'next': 3, 'text': 'Какой материал?', 'answers': ['Хлопок', 'Синтетика']}, {'id': 3, 'n...
Java
UTF-8
5,677
3.328125
3
[]
no_license
package preprocessing; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.ArrayList; import java.util.List; import trendlines.ExpTrendLine; import trendlines.TrendLine; /** * Class representing a set of x,y coordinates for a 2D plot with support to * liste...
Swift
UTF-8
752
2.59375
3
[]
no_license
// // MultiPlayerRequest.swift // GuessTheSong // // Created by Ivan Nikitin on 13/09/2018. // Copyright © 2018 Иван Никитин. All rights reserved. // import Foundation struct MultiPlayerRequest: BackendAPIRequest { private let token: String init(token: String) { self.token = token } ...
Markdown
UTF-8
396
2.671875
3
[ "MIT" ]
permissive
--- layout: project_single title: "Super cute Christmas shutter doors decorated! One says NOEL and the other Let it Snow perfect outdoor craft." slug: "super-cute-christmas-shutter-doors-decorated-one-says-noel-and-the-other-let-it-snow" parent: "diy-christmas-decoration-ideas" --- Super cute Christmas shutter doors d...
Java
UTF-8
132
1.640625
2
[]
no_license
package com.mq.rabbit.api; /** * 回调消息 */ public interface SendCallback { void onSuccess(); void onFailure(); }
C#
UTF-8
1,140
2.765625
3
[]
no_license
using FiguresWinForm.Model; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using System.Text; using System.Threading.Tasks; namespace FiguresWinForm.Serialize { class BinFormatSerialize : ISerialize { public voi...
Java
UTF-8
1,425
3.15625
3
[]
no_license
package com.game.twinghosts.elementalclimber.Data; import java.io.Serializable; import java.util.Calendar; import java.util.Date; public class CustomDate implements Serializable { private int day, month, year; public CustomDate(int day, int month, int year){ this.day = day; this.month = mont...
PHP
UTF-8
8,834
3.109375
3
[]
no_license
<?php //me connecte à la base de donnée //crée notre variable $pdo include("db.php"); //pour débugguer les données envoyées du formulaire //var_dump($_POST); //par défaut, on dit que le formulaire est entièrement valide //si on trouve ne serait-ce qu'une seule erreur, on ...
C
UTF-8
783
3.140625
3
[]
no_license
#include <stdio.h> char Matrix[64][64]; void exec(int size, int x, int y) { int i, j; int total0 = size*size, total1 = size*size; // printf("\n(%d, %d) size:%d : ", x, y, size); for (i = x; i < x + size; i++) { for (j = y; j < y + size; j++) { if (Matrix[i][j] == '0') { //printf("0"); total0--; } ...
Java
UTF-8
1,159
2.734375
3
[]
no_license
/** * 按修改时间筛选文件 */ package logic.action; import logic.filter.TimeFilter; import org.eclipse.jface.action.Action; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import display.MainWindow; /** * 按修改时间筛选文件 * * @author luyf */ public class ChooseTimeAction extends Action im...
TypeScript
UTF-8
798
2.53125
3
[]
no_license
import { ApiUidPromise } from "../http.interface"; import { Toast } from "vant"; const unhandleAPI: string[] = []; export function matchUnhandleAPI(id: string) { return unhandleAPI.find(apiUid => apiUid === id); } export function addUnhandleAPI(id: string) { unhandleAPI.push(id); } export function removeUnh...
Rust
UTF-8
1,315
3.640625
4
[ "LLVM-exception", "Apache-2.0" ]
permissive
pub fn simple_hash(s: &str) -> usize { let mut h: u32 = 5381; for c in s.chars() { h = (h ^ c as u32).wrapping_add(h.rotate_right(6)); } h as usize } /// Compute an open addressed, quadratically probed hash table containing /// `items`. The returned table is a list containing the elements of th...
Java
UTF-8
1,221
2.34375
2
[]
no_license
package ng.com.bitsystems.mis.services.springdatajpa.users; import ng.com.bitsystems.mis.models.users.Users; import ng.com.bitsystems.mis.repositories.users.UsersRepository; import ng.com.bitsystems.mis.services.users.UserService; import org.springframework.stereotype.Service; import java.util.HashSet; import java.ut...
C#
UTF-8
2,280
3.34375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; namespace RawData { class Program { static void Main() { int num = int.Parse(Console.ReadLine()); string[] input = new string[5]; List<Car> carsList = new List<Car>(); ...
Java
UTF-8
1,501
2.390625
2
[ "MIT" ]
permissive
package roth.lib.java.api.digitalocean.dropletaction; import roth.lib.java.annotation.Entity; import roth.lib.java.annotation.Property; import roth.lib.java.api.digitalocean.DigitalOceanConstants; import roth.lib.java.api.digitalocean.type.SizeType; @Entity @SuppressWarnings("serial") public class DropletActionReques...
Java
UTF-8
3,796
1.84375
2
[]
no_license
package com.yonyou.iuap.corp.demo.entity.yonbip; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.yonyou.iuap.corp.demo.api.V1.BaseApi; /** * @author nishch * @version 1.0 * @date 2020/3/29 * @des 分页获取租户下用户信息 返回的子表数据 */ @JsonIgnoreProperties(ignoreUnknown = true) public class UserInfoChE...
Markdown
UTF-8
3,915
3.609375
4
[]
no_license
--- title: 第30条:理解prototype、getPrototypeOf和__ptoto__之间的不同 tags: 编写高质量javascript代码的68条有效方法 grammar_cjkRuby: true --- 原型包括三个独立但相关的访问器。这三个单词都是对单词prototype做了一些变化。 - C.prototype用于建立由new C()创建的对象的原型 - Object.getPrototypeOf(obj)是ES5中用来获取obj对象的原型对象的标准方法 - obj.__proto__是获取obj对象的原型对象的非标准方法 ## 一个例子 要理解这些访问器,我们拿一个典型的js数据类型作例子。 假设U...
Java
UTF-8
2,791
2.09375
2
[]
no_license
package com.team.house.controller.pre; import com.team.house.entity.Users; import com.team.house.service.UsersService; import com.team.house.util.sms.SentMsgUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotat...
Python
UTF-8
309
3.6875
4
[]
no_license
""" """ def executar_bubble_sort(lista): n = len(lista) 3 for i in range(n-1): 4 for j in range(n-1): 5 if lista[j] > lista[j + 1]: 6 lista[j], lista[j + 1] = lista[j + 1], lista[j] 7 return lista 8 9 lista = [10, 8, 7, 3, 2, 1] 10 executar_bubble_sort(lista)
Java
UTF-8
2,738
2.9375
3
[]
no_license
package com.company.examplefortests.thirdexample; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import java.util.ArrayList; import java.util.HashMap; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify;...
SQL
UTF-8
109
3
3
[]
no_license
SELECT LEFT(summary, 92) AS "Summaries" FROM movies WHERE id%2 = 0 AND id BETWEEN 42 AND 84 ;
C++
UTF-8
2,223
3.40625
3
[ "BSD-2-Clause" ]
permissive
#pragma once #include "types.h" template<typename T> class Queue { public: struct Node { explicit Node(T&& value) : value(move(value)) { } Node* next { nullptr }; Node* prev { nullptr }; T value; }; Queue() { } ~Queue() { while (!is_emp...
C++
UTF-8
1,394
3.546875
4
[]
no_license
#include <iostream> #include <vector> #include <utility> #include <algorithm> using namespace std; /* 문제: 큰 수의 법칙 유형: 그리디 날짜: 2021-04-16 이름: @namgonkim */ int solution(vector<int>&data, int len, int m, int k) { int answer = 0; int firstBig = 0, secondBig = 0; // 1. 오름차순 정렬 sort(data.begin(), data.end...
PHP
UTF-8
1,547
2.5625
3
[ "Apache-2.0" ]
permissive
<?php namespace app\common\entity; use think\Model; use traits\model\SoftDelete; class StoreLog extends Model { protected $deleteTime = 'delete_time'; /** * @var string 对应的数据表名 */ protected $table = 'store_log'; /** * @var string 获取类型 1:冻结中 2:待释放 3:已释放 */ public functio...
Shell
UTF-8
290
3.234375
3
[ "Apache-2.0" ]
permissive
#!/bin/bash git log HEAD~1..HEAD | grep -q '!!! Temporary Commit !!!' is_tmp_commit=$? # When we're on a temporary commit, don't do anything. if [[ $is_tmp_commit = 0 ]]; then exit 0 fi echo "--> Running $0" source "$(dirname "$0")"/rust_env.sh set -e make unit-"${COMPONENTS:-all}"
C#
UTF-8
1,406
3.859375
4
[]
no_license
// Version 0.0.0 using System; namespace wordTwister { class Program { /// <summary> /// Entry point of the app /// </summary> /// <param name="args"></param> static void Main(string[] args) { Console.Write("Geben Sie das Wort ein: "); ...
TypeScript
UTF-8
1,087
2.703125
3
[]
no_license
import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-primer-componente', templateUrl: './primer-componente.component.html', styleUrls: ['./primer-componente.component.css'] }) export class PrimerComponenteComponent implements OnInit { nombre: string; persona = { nombre: 'Carlo...
Java
UTF-8
2,744
1.90625
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2020 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
Python
UTF-8
422
2.765625
3
[]
no_license
import unittest import conversor class MyTestCase(unittest.TestCase): def test_something(self): print(conversor.numero_para_extenso("1321.05")) print(conversor.numero_para_extenso("0.05")) print(conversor.numero_para_extenso("113")) print(conversor.numero_para_extenso("113,12")) ...
C#
UTF-8
1,321
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace ReclamaPoaS2B.Models { public class Repositorio { public static List<Categoria> getCategorias() { ReclamePOAContext _db = new ReclamePOAContext(); return ...
Python
UTF-8
3,357
2.75
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ☆*°☆*°(∩^o^)~━━ 2017/11/24 14:54 (ˉ▽ ̄~) ~~ 一捆好葱 (*˙︶˙*)☆*° Fuction: Used for feature analysis (Problem 2) √ ━━━━━☆*°☆*° """ from sklearn.linear_model import (LinearRegression, Ridge, Lasso, RandomizedLasso) from sk...
PHP
UTF-8
494
2.515625
3
[]
no_license
<?php /** * @package SamsPlugin */ namespace Inc\Base; use \Inc\Base\BaseController; class Enqueue extends BaseController { public function register() { add_action('wp_enqueue_scripts', array($this, 'enqueue')); // enqueue scripts function enqueue() { wp_enqu...
Python
UTF-8
1,160
3.390625
3
[]
no_license
from typing import List class Solution: def partitionLabels(self, s: str) -> List[int]: last_index = { c: i for i, c in enumerate(s) } left = right = 0 res = [] for i, c in enumerate(s): right = max(right, last_index[c]) if i == right: res.ap...
C++
UTF-8
689
2.96875
3
[]
no_license
#ifndef ROOM_H_ #define ROOM_H_ #include <strings.h> #include <string> #include <map> using namespace std; class Room { string roomName; string creator; //string ip:port (default - TCP),string port - UDP 2001... map<string,string> roomMembers; public: Room(string roomName,string creator); map<string,string>...
C
UTF-8
2,459
2.59375
3
[]
no_license
/*! \file main.c \brief DAC concurrent mode simultaneous trigger with same triangle wave demo */ /* Copyright (C) 2017 GigaDevice 2014-12-26, V1.0.0, firmware for GD32F10x 2017-06-20, V2.0.0, firmware for GD32F10x */ #include "gd32f10x.h" void rcu_config(void); void gpio_config(void); void dac_...
PHP
UTF-8
678
2.53125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Jorge Gonzalez * Date: 06/09/2018 * Time: 20:22 */ namespace App\Domain\Anuncios\Domain\Component\Components\CustomTypes; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Types\Type; class TypeAlto extends Type { const NAME = 'TypeAlto'; ...
Python
UTF-8
1,455
2.625
3
[ "Apache-2.0" ]
permissive
import requests from enum import Enum class HTTPMethod(Enum): GET = 1 POST = 2 class ResponseType(Enum): json = 1 image = 2 data = 3 # used for audio if we have a playback feature class NetworkError: def __init__(self, status_code, url, description): self.status_code = status_code self.url = url self.con...
JavaScript
UTF-8
5,026
2.703125
3
[]
no_license
const BufferParser = require('./Buffers/buffer'); const CompleteToken = require('./completeToken'); // let openCloseTokens = [ // { opening:'|',closing:'|' }, // { opening:'[',closing:']' } // ]; let opening_tokens = ['|','[']; let closing_tokens = ['|',']']; module.exports = class CustomTokenizer{ ...
JavaScript
UTF-8
363
2.515625
3
[]
no_license
// ! not support for all browser window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => { const newColorScheme = e.matches ? "dark" : "light"; }); // detect color scheme console.log( window.matchMedia('(prefers-color-scheme: light)').matches ); // const matchRes = window.matchMedia("(ma...
Rust
UTF-8
2,659
3.09375
3
[]
no_license
use crate::*; use core::marker::PhantomData; use std::fmt; /// Marker for Unary Operation used in [`UnarySym`]. pub trait UnaryOp { ///Returns the op name. fn op_name<'a>(&self) -> &'a str { let s = std::any::type_name::<Self>(); debug_assert!(s.ends_with("Op")); let op_name = &s[..s.le...
C++
UTF-8
421
3.09375
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; int main() { long long int cs_num,a,b,c; cin >> cs_num; for (int i = 0; i < cs_num; i++) { cin >> a >> b >> c; switch (a) { case 1: cout << b + c << endl; break; case 2: cout << b - c << endl; break; case 3: ...
Python
UTF-8
1,271
4.28125
4
[]
no_license
# 必选参数–>默认参数–>可变参数–>关键字参数–>命名关键字参数 #必选参数:形参必须传值 def bit(n): print('n:',n) bit(9) # m为默认参数 def fight(m=18): print('m:',m) #10,传参时为所传参数,不传参时为默认参数 fight(10) def func(*args,m): print(m,args) func(2,34,m=19) #可变参数 *args接收的参数为元组 是可变参数类型,接收不定长参数 def total(a=5,*args,**kwargs): print('a:',a) pr...
Python
UTF-8
1,207
3.84375
4
[]
no_license
# check for rating for this movie: ## universal -> everyone can watch ## pg, General viewing, but some scenes may be unsuitable for young children ## 12, Films classified 12A and video works classified 12 contain material that is not generally suitable for children aged under 12. No one younger than 12 may see a ...
Shell
UTF-8
143
3.578125
4
[]
no_license
#!/bin/sh echo "enter file name" read filename if [ -x $filename ] ; then echo "file is executable" else echo "file is not executable" fi
C++
UTF-8
9,932
2.828125
3
[ "MIT" ]
permissive
// Copyright(c) 2018 Seth Ballantyne <seth.ballantyne@gmail.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy of this // software and associated documentation files(the "Software"), to deal in the Software // without restriction, including without limitation the rights to use, copy...
Swift
UTF-8
5,177
2.609375
3
[ "MIT" ]
permissive
// // PhotoBrowserCell.swift // STWeiBo // // Created by ST on 15/11/20. // Copyright © 2015年 ST. All rights reserved. // import UIKit import SDWebImage protocol PhotoBrowserCellDelegate : NSObjectProtocol { func photoBrowserCellDidClose(cell: PhotoBrowserCell) } class PhotoBrowserCell: UICollectionViewCell ...
C#
UTF-8
3,496
2.515625
3
[]
no_license
using Microsoft.Win32; using EPAM.DBAttribute; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Controls; namespace EPAM.FunctionTypes.ViewModel { public class MainWindowVM...
Java
UTF-8
2,704
2.09375
2
[]
no_license
package com.hk.stream.producer; import com.hk.commons.util.JsonUtils; import com.hk.commons.util.StringUtils; import com.hk.core.authentication.api.SecurityContextUtils; import com.hk.core.authentication.api.UserPrincipal; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomStringUtils; import org....
PHP
UTF-8
2,106
2.890625
3
[]
no_license
<?php error_reporting(-1); ini_set('display_errors', 'On'); //Connect code $db = new PDO('mysql:host=localhost;dbname=employees;charset=utf8', 'root', 'protodrake124', array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); $emp_no = ($_REQUEST["emp"]); $firstname = (...
JavaScript
UTF-8
839
3.21875
3
[]
no_license
const inputCode = document.querySelector('#inpCode'); const btnSubmit = document.querySelector('#inpSubmit'); const MOGELIJKE_ANTWOORDEN = ["U", "De letter U", "letter u"]; const lblEror = document.querySelector('.errMsg'); btnSubmit.addEventListener('click', function(e) { e.preventDefault(); if (checkAlsRaads...
Markdown
UTF-8
5,644
3.3125
3
[]
no_license
# Using Deep Learning to Referee Fencing <div style="text-align: justify"> In fencing, when both competitors hit eachother within a few miliseconds, both sides of the scoreboard will light up. Then the referee has to make a decision on who's point it is. As a rough rule of thumb, it goes to who took more initiative or...
C#
UTF-8
1,481
3.5
4
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using System.Linq.Expressions; namespace TestEnumerable { public class MyEnumerator : IEnumerator<int> { private int[] _array; public MyEnumerator(int[] array) { _array = array; } ...
C++
IBM852
7,678
3.171875
3
[ "MIT" ]
permissive
#ifndef __message_h__ #define __message_h__ #include "common_types.h" #include "generic_exception.h" #include "useful.h" #include <cstdlib> #include <cassert> #include <memory> #include <vector> #include <queue> /**********************************************************/ class Message { public: Message() ...
Java
UTF-8
1,571
2.203125
2
[]
no_license
package com.learning.j10.web; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.jbbwebsolutions.service.IServ...
TypeScript
UTF-8
1,824
2.59375
3
[ "MIT" ]
permissive
///<reference path="InputListener.ts"/> import {Display} from "./gfx/Display"; import {Tracer} from "./gfx/Tracer"; import {InputListener} from "./InputListener"; import {Logger} from "./util/Logger"; import {TimeUtils} from "./util/TimeUtils"; export class Engine { private running:boolean; private display:Display;...
Java
UTF-8
1,079
1.921875
2
[]
no_license
package com.example.wacky.attenaide.data; import android.provider.BaseColumns; /** * Created by wacky on 3/5/17. */ public class AttenaideContract { public static final class AttenaideEntry implements BaseColumns { public static final String STUDENT_TABLE_NAME = "students"; public static final ...
PHP
UTF-8
112
3.140625
3
[]
no_license
<?php $day = 3; switch ($day){ case 1 <= $day && $day <= 5: echo "Это рабочий день"; }
JavaScript
UTF-8
394
3.078125
3
[]
no_license
var cosas =['2','','>:v PARA ESO ESTA SORT', '5', '1']; function ordernar(){ var cosas =['2','7','8', '5', '1']; var key; var j; for(var x=1; x<cosas.length;x++){ key= cosas[x]; j= x-1; while(j>-1 && key<cosas[j]){ cosas[j+1]=cosas[j]; j=j-1; } ...
Python
UTF-8
1,193
3.953125
4
[]
no_license
# Functions and files # from sys import argv # script, input_file = argv # def print_all(f): # print(f.read()) # def rewind(f): # f.seek(0) # def print_a_line(line_count, f): # print(line_count, f.readline()) # > readline() reads one entire line from the fileA trailing newline character is kept in the ...
C
UTF-8
1,867
3.25
3
[]
no_license
#include <stdio.h> #include <math.h> #include <stdlib.h> #include "mpi.h" #include <sys/stat.h> #define MAT_SIZE 5 #define EPS 0.00000001 #define DIRERCTORY "transpose" void saveMat(char* dir, char* type, int row, int col, double* out) { // open input file and save the matrix char szFileName[255] = {0}; sprintf(...
JavaScript
UTF-8
1,344
2.890625
3
[]
no_license
var map; // The map object var myCentreLat = 53.797316; var myCentreLng = -1.542664; var initialZoom = 14; function infoCallback(infowindow, marker) { return function() { infowindow.open(map, marker); }; } function addMarker(myPos,myTitle,myInfo) { var marker = new google.maps.Marker({ position: ...
JavaScript
UTF-8
3,339
3.375
3
[ "MIT" ]
permissive
const isValidDate = (value, format) => { let date; let day; let month; let year; let valid; if (format === 'YYYY-DD-MM') { date = value.split('-'); year = date[0]; day = date[1]; month = date[2]; } else if (format === 'YYYY-MM-DD') { date = value.split('-'); year = date[0]; ...
Markdown
UTF-8
1,202
2.96875
3
[]
no_license
--- math: true layout: default --- {% include mathjax.html %} # fdcoeffV *Routine Name:* fdcoeffV *Author:* Jack Kiefer *Language:* C++ ## Description Computes coefficients for finite difference approximations of an arbitrary oder of accuracy for a given derivative. ## Input * ``k`` - Specifies coefficients ...
JavaScript
UTF-8
2,152
3.21875
3
[]
no_license
/** * Rotates a shape about its CG around Z * @param {number} alpha Rotation angle in degrees * @param {number[]} CG CG coordinated relative to global coords * @return {object[]} resulting transformations */ const localRotateZ = (alpha, CG) => { const alphaRad = alpha * Math.PI / 180; // Rotated CG coords...
C
UTF-8
1,036
2.625
3
[]
no_license
// // Created by anton on 04.01.18. // #include <string.h> #include <stdio.h> #include "sms.h" #include "../../system/mydefs.h" #include "../control.h" #include "../../system/initializer.h" static char sms_buffer[SMS_BUFFER_LENGTH]; static char *sms_buffer_pointer = (char *) &sms_buffer; int is_sms(char *message) { ...
Java
UTF-8
214
1.921875
2
[]
no_license
package com.example.myapplication.service.impl; import com.example.myapplication.entity.User; public interface UserService { User get(String username); void save(User user); void modify(User user); }
Python
UTF-8
254
3.5
4
[]
no_license
def drawImage(n): for i in range((n+1)//2): print ('='*((n-(i*2+1))//2)+'@'*(i*2+1)+'='*((n-(i*2+1))//2)) j = 1 for i in range((n+1)//2,n): print ('='*j+'@'*(n-j*2)+'='*j) j = j+1 n = int(input("Masukan Angka ganjil: ")) drawImage(n)
Java
UTF-8
141
1.789063
2
[]
no_license
package lingo.lingowords.infrastructure; import lingo.lingowords.domain.Word; public interface WordDao { boolean createWord(Word word); }
TypeScript
UTF-8
2,195
2.53125
3
[]
no_license
import { Component, OnInit } from '@angular/core'; import { ItemService } from './item.service'; import { Rubro } from './rubro'; import {Observable} from 'rxjs/Observable'; @Component({ selector: 'item-component', templateUrl: 'item.component.html', styleUrls: ['item.component.css'], providers: [ ...
C++
UTF-8
2,374
3.734375
4
[]
no_license
#pragma once #include "../utils.h" /* matrix col +-----+ |#####| r |#####| o |#####| w +-----+ */ template<typename T> class matrix { u32 colLen; // колво столбцов u32 rowLen; // колво строк T* memory; // обнуление void zeroing() { memory = 0; rowLen...
Python
UTF-8
459
2.625
3
[]
no_license
import cv2 as cv img = cv.imread('peoples.jpg') # cv.imshow('Person',img) gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) # cv.imshow('gray',gray) haar_cascade = cv.CascadeClassifier('haars_cascade.xml') faces_rect = haar_cascade.detectMultiScale(gray,scaleFactor=1.1,minNeighbors=10) print("faces detected ", len(faces_r...
Java
UTF-8
473
1.828125
2
[]
no_license
package org.pikIt.studentInit.controllers; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @Controller public class HomePageController { @GetMapping("/") public String homePage() { ...
Go
UTF-8
852
2.828125
3
[]
no_license
package config import "time" const ( // QueueSize defines the maximum number of jobs // that can be scheduled simultaneously. QueueSize = 512 ) const ( T000 = 0 T001 = 1 * time.Millisecond T002 = 2 * time.Millisecond T003 = 3 * time.Millisecond T004 = 4 * time.Millisec...
Java
UTF-8
8,907
1.578125
2
[]
no_license
package com.yidu.sevensecondmall.Activity.UserCenter; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AlertDialog; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; imp...
Java
UTF-8
2,212
2.171875
2
[ "Apache-2.0" ]
permissive
package agent.ext.xtorm; import com.windfire.base.asysCmnd; import com.windfire.base.asysTransact; import yuk.dic.ModelDic; import agent.agentC.Agent; import agent.agentC.tracer.MainTracer; import agent.ext.AbsMonitor; public class XtormMonitor extends AbsMonitor{ private Agent agent = Agent.getInstance(...
C
UTF-8
1,452
3.09375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <libxml/parser.h> #include <libxml/xpath.h> int main() { xmlDocPtr doc; xmlXPathContextPtr ctxt; xmlXPathObjectPtr xpathRes; // Ouverture du document XML xmlKeepBlanksDefault(0); // Ignore les noeuds texte composant la mise en for...
Java
UTF-8
5,548
2.078125
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 Entities; import java.io.Serializable; import java.util.Collection; import javax.persistence.Basic; import javax.persistence.C...
Java
UTF-8
6,700
2.609375
3
[]
no_license
package result; import java.io.FileOutputStream; import java.io.IOException; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Date; import opticDiscAnalyser.MainWindow; import com.itextpdf.text.*; import com.itextpdf.text.pdf.PdfPCell; import com.itextpdf.text.pdf.PdfPTable; impor...
C
WINDOWS-1250
766
3.09375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int sort(const void *a, const void *b){ return *(int*)b-*(int*)a ; } int main(void){ int n; scanf("%d",&n); int a[n*3]; for (int i=0; i<n*3; i++){ scanf("%d",&a[i]); } long long ans=0; qsort (a,n*3,sizeof(int),sort); fo...
C#
UTF-8
3,493
3.546875
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace calculator_app { class Calculator { static void Main(string[] args) { string state = "salah"; while(state == "salah") { Console.WriteLine("Menu Calculator : \n"); ...
JavaScript
UTF-8
14,987
2.515625
3
[]
no_license
console.log("Ready!"); var socket = io(); socket.on('newData', function(data) { // console.log(data); for (var key in data) { var results = ""; // console.log("key: " + key) switch (key) { case ('avalara'): // console.log("case 1"); populate(key, data); break; case ('bigCommerce'): // cons...
PHP
UTF-8
1,611
2.546875
3
[]
no_license
<?php /** * Created by JetBrains PhpStorm. * User: EC * Date: 14.06.13 * Time: 21:04 * Project: phpOCR * @author: Evgeny Pynykh bpteam22@gmail.com */ use phpOCR\cOCR as cOCR; set_time_limit(600); if(!isset($_POST['Submit1'])) { chdir(dirname(__FILE__)); require_once '../cOCR.php'; chdir(dirname(__FILE__)); $tem...
PHP
UTF-8
1,754
2.59375
3
[]
no_license
<?php /** * Wallet data model class * * @author: Raysmond */ class Wallet extends RModel{ public $user; const COIN_NAME = 'Group Coins'; const COIN_DB_NAME = "group_coin"; public $userId,$type,$money,$frozenMoney,$timestamp; public static $table = "wallet"; public static $primary_key = "...
Java
UTF-8
558
1.929688
2
[]
no_license
package com.ahead.blockchain.controller; import com.ahead.blockchain.servlet.HomeServlet; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; @Controller public ...
JavaScript
UTF-8
5,439
2.65625
3
[ "BSD-2-Clause" ]
permissive
import mysql from 'mysql' export class DataBase{ #connetcion #query = { operation : 'SELECT', table : '', select : '*', where : [], whereCondition : 'AND', order : '', join : [], } #autoReset = true // always reset the query after executing it ...
Rust
UTF-8
19,155
2.625
3
[]
no_license
use std::sync::{Arc, Mutex}; use gdk; use gtk; use gtk::prelude::*; use pango; use neovim_lib::neovim::Neovim; use neovim_lib::neovim_api::NeovimApi; use ui::color::Color; use nvim_bridge::{CompletionItem, PmenuColors}; use thread_guard::ThreadGuard; /// Maximum height of completion menu. const MAX_HEIGHT: i32 = 500...
C++
UTF-8
8,223
2.515625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
#include "fixtures.h" #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_floating_point.hpp> #include <gadfit/automatic_differentiation.h> // Test the accuracy of an AD variable #define TEST_AD(x, ref_val, ref_d, ref_dd, ref_idx) \ CHECK_THAT(x.val, Catch::...
JavaScript
UTF-8
2,995
3.53125
4
[]
no_license
// Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list. var findMinDifference = function(A) { A=A.map(d=>[Number(d[0]+d[1]),Number(d[3]+d[4])]) console.log(A) function calc(timeA,timeB){ if(timeA[0]<timeB[0]...
Java
UTF-8
1,098
1.648438
2
[]
no_license
package com.google.android.gms.ads.internal.util; import com.android.volley.Response; import com.android.volley.VolleyError; import com.google.android.gms.ads.internal.util.client.C0633h; /* renamed from: com.google.android.gms.ads.internal.util.ac */ /* compiled from: :com.google.android.gms@201515033@20.15.15 (1203...
Python
UTF-8
1,758
4.1875
4
[]
no_license
# 限制访问中,不希望外面直接访问到变量 # 可以直接添加 __ 双下划线进行限制访问,这是私有变量的意思 class Student(object): def __init__(self,name,age): self.__name = name self.__age = age def get_name(self): return self.__name def get_age(self): return self.__age def set_name(self,name): self.__name = name def set_age(self,age): if age > 0: sel...
Python
UTF-8
505
3.859375
4
[]
no_license
class Queue: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def enque(self, item): self.items.append(item) def dequeue(self): return self.items.pop(0) def peek(self): return self.items[len(self.items)-1] def siz...
JavaScript
UTF-8
565
2.78125
3
[]
no_license
// Slideup/Slidedown var slideDownSection = document.getElementById("slidedown-section") var slideUpSection = document.getElementById("slideup-section") //>>>>> Section Slide >>>>> function SectionSlide(){ slideDownSection.classList.remove("hidden") $(slideUpSection).slideUp(1000, function(){ $(slide...
PHP
UTF-8
237
2.5625
3
[]
no_license
<?php declare(strict_types=1); namespace App\Dto\Response\Transformer; interface IResponseDtoTransformerInterface { public function transformFromItem($item); public function transformFromArrayItems(iterable $items): iterable; }
Java
UTF-8
651
1.679688
2
[]
no_license
package com.cbx.gp.platform.service; import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.transactio...
Python
UTF-8
1,096
2.5625
3
[]
no_license
#!/usr/bin/python import gdb MAX_ORDER = 11 NR_FREE_CMA_PAGES = int(gdb.parse_and_eval("NR_FREE_CMA_PAGES")) NR_FREE_PAGES = int(gdb.parse_and_eval("NR_FREE_PAGES")) def print_zone(num): print str(gdb.parse_and_eval("contig_page_data->node_zones[" + str(num) + "]->name")) print "NR_FREE_CMA_PAGES = " + str(gdb.par...
Markdown
UTF-8
1,756
2.8125
3
[]
no_license
# L’ebook redistribuable Une introduction rapide et interactive à l’usage des éditeurs, graphistes et simples curieux. ## Aspects techniques Cet article est également une expérimentation de mise en pages. Il a été conçu avec une approche d’amélioration progressive : si CSS Grid n’est pas supporté, on utilise Flexbox...
PHP
UTF-8
4,033
2.671875
3
[]
no_license
<?php # РАБОТА С СЕССИЕЙ session_start(); # ЕСЛИ НАЖАТА КНОПКА "ВЫХОД" - ЗАВЕРШАЕМ СЕССИЮ И ОБНОВЛЯЕМ СТРАНИЦУ if ( isset($_POST['exit']) ) { session_destroy(); header('Location:' . '/zone'); } # ВКЛЮЧАЕМ КЛАСС ДЛЯ РАБОТЫ С БАЗОЙ ДАННЫХ require_once('../classes/db.class.php'); ?> <!DOCTYPE html> <ht...