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
2,378
1.984375
2
[]
no_license
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agree...
C#
UTF-8
3,599
2.59375
3
[]
no_license
using System; using System.Collections.Generic; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; using api.Data; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Authentication; usi...
Rust
UTF-8
2,782
3.28125
3
[]
no_license
use std::num::Float; use std::fmt; #[ deriving( Clone, PartialEq ) ] pub struct Vec3 { pub x : f64, pub y : f64, pub z : f64, } #[ allow( dead_code ) ] impl Vec3 { #[ inline ] pub fn new( x : f64, y : f64, z : f64 ) -> Vec3 { return Vec3 { x : x, y : y, z : z, }; } #[ inline ] pub fn length( &se...
PHP
UTF-8
631
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; // 1. To specify package’s class you are using use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract; use Astrotomic\Translatable\Translatable; class Ingredients extends Mod...
Java
UTF-8
547
2.3125
2
[]
no_license
package cn.ep.spring.boot.ch04.s17; import cn.ep.ws.*; import org.springframework.ws.client.core.support.WebServiceGatewaySupport; public class WsClient extends WebServiceGatewaySupport { public GetCountryResponse getCountry(String name) { GetCountryRequest request = new GetCountryRequest(); requ...
Java
UTF-8
222
1.789063
2
[]
no_license
package multi.campus.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class MovieGenre { int movieCd; String genreNm; }
Python
UTF-8
8,697
2.796875
3
[ "MIT" ]
permissive
""" Structures (:mod:`structures`) ========================== The `structures` module attempts to implement all types of graphene as objects from nanostructured to planar with any number of layers. """ import os import numpy as np from scipy import integrate from scipy import optimize from scipy import special from ...
C++
UTF-8
420
2.90625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> int main() { int t, n, x, k; std::cin >> t; while (t--) { std::cin >> n; std::vector<int> v(n); for (int i = 0; i < n; ++i) { std::cin >> v.at(i); } std::cin >> k; int key = v.at(k - 1); int count = std::count_if(v.begin(), v.end...
C#
UTF-8
375
2.671875
3
[]
no_license
using System; namespace StudioMobile { public partial struct Font : IDisposable { public System.Drawing.Font Native; public Font(string name, float size) { Native = new System.Drawing.Font (name, size); } public static implicit operator System.Drawing.Font(Font f) { return f.Native; } publi...
Java
UTF-8
700
2.3125
2
[]
no_license
package com.cc.tongxundi.utils; import com.cc.tongxundi.bean.BaseBean; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; import java.util.List; /** * Created by sjw on 2017/9/23. */ public class GsonManager { public static <T> T fromJsonStr(String json, Cla...
C
UTF-8
1,283
2.65625
3
[]
no_license
#include "prod_cons.h" int main(int argc, char* argv[], char** envp) { pthread_t t_con, t_pro; int s = -9; sem_t sem_p, sem_c; circ_q_t *q = 0; arg_t arg; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; int delay = 50000000; arg.mutex = &mutex; arg.delay = delay; if(sem_init(&sem_p, 0, SIZE) == -1) { ...
Swift
UTF-8
3,948
2.78125
3
[]
no_license
// // ImageController.swift // DropMusic // // Created by Angel Contreras on 10/12/16. // Copyright © 2016 Angel Contreras. All rights reserved. // import Foundation import UIKit import MapKit extension UIImage{ var circle: UIImage? { let square = CGSize(width: min(size.width, size.height), height: mi...
Markdown
UTF-8
1,149
2.546875
3
[ "MIT" ]
permissive
# babel-plugin-remove-nonjs [![Build Status](https://travis-ci.org/piglovesyou/babel-plugin-remove-nonjs.svg?branch=master)](https://travis-ci.org/piglovesyou/babel-plugin-remove-nonjs) Simply removes non-JS `require()` such as `require('./style.css')`, possibly resolved by Webpack with its ExtractTextPlugin. ## Exam...
Java
UTF-8
2,824
2.390625
2
[]
no_license
package edu.utdallas.hltri.data.medline.jaxb; import com.fasterxml.aalto.stax.InputFactoryImpl; import com.google.common.collect.Streams; import edu.utdallas.hltri.data.medline.jaxb.struct.PubmedArticle; import edu.utdallas.hltri.data.medline.jaxb.struct.PubmedArticleSet; import java.io.InputStream; import java.util.I...
C#
UTF-8
4,413
2.53125
3
[ "MIT" ]
permissive
using System; using System.Collections; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; namespace nboard { class PngStegoUtil { private string _key; public PngStegoUtil() { if (!F...
Java
UTF-8
34,343
1.5625
2
[]
no_license
package com.kustomer.kustomersdk.API; import android.os.Handler; import android.os.Looper; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.kustomer.kustomersdk.DataSources.KUSChatMessagesDataSource; import com.kustomer.kustomersdk.DataSources.KUSObjectDataSource; impo...
Java
UTF-8
1,211
2.6875
3
[]
no_license
package cn.itsource.gogou.util; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; /** * * @author yun */ public enum JedisUtils { INSTANCE; private static JedisPool pool; static { //创建配置文件对象 JedisPoolConfig config = new J...
Java
UTF-8
4,529
2.53125
3
[]
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 servlets; import business.Course; import business.CourseDB; import business.Section; import business.SectionDB; import java.io...
C++
UTF-8
3,406
2.515625
3
[]
no_license
#include "game_sound_manager.h" #define CHUNKSIZE 2048 #define CHANNELS 4 #define FREQUENCY 44100 #define DEFAULT_CHANNEL 0 GameSoundManager::GameSoundManager() { int flags = MIX_INIT_FLAC; int result = 0; Mix_OpenAudio(FREQUENCY, MIX_DEFAULT_FORMAT, CHANNELS, CHUNKSIZE); if (flags != (result = Mix_I...
JavaScript
UTF-8
105
2.734375
3
[]
no_license
let operando1 = 23 let operando1 = 33 console.log (operando1) // no, por que let no se puede redifinir
C
UTF-8
335
3.140625
3
[]
no_license
#include<pthread.h> #include<stdio.h> void *display_name(void *a) { printf("\nTHREAD Operation:%d\n",pthread_self()); pthread_exit((void*)&a); } void main() { int i=0; void *retval; pthread_t t; for(i=0;i<5;i++) { pthread_create(&t,NULL,&display_name,NULL); pthread_join(t,&retval); } //printf("\nMAIN FUNCTION:%d\n",*(i...
Python
UTF-8
758
4.65625
5
[]
no_license
""" Create a string variable that is assigned the following sentence: “Zeven Zottegemse zotten zullen zes zomerse zondagen zwemmen zonder zwembroek.” a.Count the number of words in that sentence. Hint: strings have the methodsplit()that returns a list with each word of that sentence as an element. len(mylist)returns t...
Java
UTF-8
2,721
1.929688
2
[]
no_license
package com.ko30.quartz.job.lottery.grabdata; import java.util.Calendar; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import org.springframework.stereotype.Service; import com.alibaba.fastjson.JSONObject; import com.ko30.common.base.entity.quartz.QuartzParamI...
JavaScript
UTF-8
989
3.765625
4
[]
no_license
// this is what you would do if you were one to do things the easy way: // var parseJSON = JSON.parse; // but you're not, so you'll write it from scratch: var parseJSON = function(json) { // your code goes here var obj = {}; if (typeof json === null) { return null; } if (typeof json === 'number' || typeo...
JavaScript
UTF-8
1,895
2.625
3
[]
no_license
import React from 'react'; import axios from 'axios'; import List from './components/List'; const BASE_URL = 'http://hn.algolia.com/api/v1'; const PATH_SEARCH = '/search'; const PARAM_QUERY = 'query='; const DEFAULT_QUERY = 'javascript'; const withLoadingIndicator = (Component) => { const EnhancedComponent = ({isLo...
Python
UTF-8
646
2.578125
3
[]
no_license
import pandas as pd from sklearn.metrics import davies_bouldin_score, silhouette_score from sklearn.cluster import KMeans from sklearn.model_selection import train_test_split if __name__ == '__main__': headers = ['stg', 'scg', 'str', 'lpr', 'peg', 'uns'] df = pd.read_csv('dataset/data_user_modeling.csv', heade...
C
UTF-8
3,181
3.484375
3
[]
no_license
/**************************************************************************** * \brief Console * \copyright 2018-2019, Zhejiang University, Program Design Project, Group 6. * \verson 1.2 * \author Chenyun Lu * \file Polynomial_Interact.c * * \date 2019/03/25 Fang :created *************...
Python
UTF-8
5,248
2.65625
3
[]
no_license
import random from collections import deque import numpy as np import tensorflow as tf import keras.backend as K from keras.models import Sequential from keras.models import load_model, clone_model from keras.layers import Dense from keras.optimizers import Adam import numpy as np import pandas as pd import matplot...
Java
UTF-8
4,264
2.34375
2
[]
no_license
//package com.binghe.crawler.impl; // //import java.io.BufferedInputStream; //import java.io.BufferedWriter; //import java.io.File; //import java.io.FileInputStream; //import java.io.FileNotFoundException; //import java.io.FileOutputStream; //import java.io.IOException; //import java.io.OutputStreamWriter; //...
Python
UTF-8
3,168
4.09375
4
[]
no_license
import math class Polygon: def __init__(self, n: "Number of edges/ vertices", r: "Circum radius"): self.circumradius = r self.vertices = n @property def vertices(self): return self._vertices @property def edges(self): return self._edges @proper...
Python
UTF-8
2,459
3.03125
3
[]
no_license
""" Performing feature extraction for model training.""" import torch import logging import warnings import pandas as pd import numpy as np from config import Config from utils.helpers import sliding_windows, save_train_test_splits from torch.autograd import Variable from sklearn.preprocessing import MinMaxScaler def...
Java
UTF-8
5,012
1.5
2
[]
no_license
package com.sienrgitec.painaniprov.model; public class ctProveedor { private Integer iProveedor; private String cClaveProv; private String cRazonS; private String cNegocio; private String cRFC; private Integer iGiro; private Integer iSubGiro; private String cWhatsApp; private Strin...
Java
UTF-8
256
1.5
2
[]
no_license
package com.eaglec.win.dao.cms; import com.eaglec.win.dao.BaseDao; import com.eaglec.win.domain.cms.Module; /** * @date: 2013-8-14 * @author:lwch * @description:模块管理的接口 */ public interface ModuelDao extends BaseDao<Module>{ }
Markdown
UTF-8
2,257
3.28125
3
[]
no_license
# Django-Scrapy-SAP This repository contains files of a single page web application created with Django and Scrapy. It was developed as part of my co-operative education project to create an application that would grab HTML from the faculty and events pages of Acadia University's computer science website, store it in ...
TypeScript
UTF-8
5,049
3.453125
3
[]
no_license
import { Injectable } from '@angular/core' interface ICacheService { deleteObject: (key: string) => any fetchObject: (key: string) => any saveObject: (key: string, obj: any, expirationTime ?: number) => void } /** * @description * Though angular has it's own specific storage module we made our own, * partly ...
Python
UTF-8
3,104
3.53125
4
[]
no_license
from tkinter import * #Import whole module class CurrencyConvereter(): def __init__(self): window = Tk() # create application window window.title("Currency Converter") # add title to application window window.geometry("450x350") # specify size of the window ...
Rust
UTF-8
1,278
2.625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
use swc_common::{errors::HANDLER, Span}; use swc_ecma_ast::*; use swc_ecma_visit::{noop_visit_type, Visit}; use crate::{ config::{LintRuleReaction, RuleConfig}, rule::{visitor_rule, Rule}, }; const MESSAGE: &str = "Unexpected 'debugger' statement"; pub fn no_debugger(config: &RuleConfig<()>) -> Option<Box<dy...
Python
UTF-8
8,284
2.515625
3
[]
no_license
from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait import os import sys from time import sleep from utils.creds import load_creds...
Markdown
UTF-8
2,230
3.5
4
[]
no_license
## About Simple Plate Simple plate was a project created to test and evolve my abilities as a front-end developer. The project idea is a webpage for cooking recipes. The project's prototype can be [found here] (https://www.figma.com/file/E6xlazw52ICbowNMpNclc8/Untitled?node-id=0%3A1). The idea and design of th...
PHP
UTF-8
2,897
2.59375
3
[ "MIT" ]
permissive
<?php namespace App\Services; use App\Models\Keyword; use App\Models\Rule; use Houdunwang\WeChat\WeChat; class WechatService { public function __construct(){ //与微信通信绑定 //读取 config/hd_config.php配置文件 //config()读取框架配置项、框架配置项读取env对数据、env数据来源我们自己的后台 $config = config...
C#
UTF-8
4,434
2.859375
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; using Sdl.Web.Common; using Sdl.Web.Common.Interfaces; using Sdl.Web.Common.Logging; namespace Sdl.Web.Tridion.Caching { /// <summary> /// Abstract base class for DXA Cache Providers /// </summary>...
Markdown
UTF-8
8,681
2.703125
3
[]
no_license
# Azure Functions on IoT Edge You can use Azure Functions to deploy code that implements your business logic directly to your IoT Edge devices. This functionality allows developers to utilize the uniquely productive programming model provided by Functions even on the devices which may or may not be connected to t...
Java
UTF-8
4,460
1.9375
2
[]
no_license
package com.archu.gussoapintegration.api.regon.fullreport; import com.archu.gussoapintegration.api.regon.fullreport.dto.*; import com.archu.gussoapintegration.integration.regon.fullreport.FullReportClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service...
Markdown
UTF-8
2,154
3.8125
4
[]
no_license
# 415. 字符串相加 [每日一题] [求和进位] 1. https://leetcode-cn.com/problems/add-strings/ 2. 题目:给定两个字符串形式的非负整数 num1 和num2, 计算它们的和; + 注意: - num1 和num2 的长度都小于 5100. - num1 和num2 都只包含数字 0-9. - num1 和num2 都不包含任何前导零。 - [你不能使用任何 内建的 BigInteger 库], 也不能直接将输入的字符串转换为整数形式。 4. 思路和代码: + 从num1, num2的尾部开始计算, 保存到tmp中 + 计算当前位置的值: tmp%10...
PHP
UTF-8
144
2.546875
3
[ "MIT" ]
permissive
<?php namespace Bug7352\WithSubNamespace; const MY_OTHER_CONST = 'thing'; class World { /** @var string */ const THERE = MY_OTHER_CONST; }
C#
UTF-8
1,088
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace RFIDReaderControler { /// <summary> /// 与服务器通讯的协议,通过该协议控制该应用,使得该应用做出相应反应 /// 其中command为执行的动作,而flag则标记出执行的具体读写器 /// command 具体值有:open close /// flag则根据具体读写器的设置确定具体值 /// </summary> public class CommandProtocol {...
Python
UTF-8
1,205
2.8125
3
[]
no_license
from django.db import models from django.urls import reverse class Hero(models.Model): name = models.CharField(max_length=50) secret_identity = models.CharField(max_length=50) power = models.TextField(max_length=250) def __str__(self): return f'{self.name} is truly {self.secret_identity} with the power(s)...
Java
UTF-8
15,482
1.625
2
[]
no_license
package com.yoka.mrskin.activity; import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import and...
Java
UTF-8
1,291
2.46875
2
[]
no_license
package com.cd.handlers; import com.cd.editors.MyDateEditor; import org.springframework.stereotype.Controller; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.serv...
Python
UTF-8
196
3.21875
3
[]
no_license
import numpy as np a = np.arange(9) a = a.reshape(3, 3) print(a) b = np.arange(16) b = b.reshape(4, 4) print(b) print(b.min(axis=0)) print(b.min(axis=1)) print(a.min(axis=0)) print(a.min(axis=1))
Markdown
UTF-8
2,447
2.6875
3
[]
no_license
--- copyright: years: 2014, 2019 lastupdated: "2019-06-18" keywords: manage bare metal port control subcollection: bare-metal --- {:shortdesc: .shortdesc} {:codeblock: .codeblock} {:screen: .screen} {:new_window: target="_blank"} {:pre: .pre} {:table: .aria-labeledby="caption"} # Gestión del ...
PHP
UTF-8
2,984
2.625
3
[]
no_license
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; ob_start(); require 'vendor/autoload.php'; if(isset($_POST['submit'])){ if(isset($_POST['email']) and isset($_POST['topic']) and isset($_POST['content'])){ $contact_email = $_POST['email']; $topic = $_POST['topic...
C++
UTF-8
2,001
2.65625
3
[]
no_license
#include <opencv2\opencv.hpp> void manage_bounding_boxes(std::vector<cv::Rect>* bb, cv::Rect* mean){ //TODO TEST Join multiple bounding boxes if(!bb || !mean) return; int xx = INT_MAX,yy = INT_MAX, ww = INT_MIN,hh = INT_MIN; for(unsigned int i = 0 ; i < bb->size() ; i++){ //if(bb->at(i).x >= 0 && bb->at(i).y >=...
Python
UTF-8
917
3.96875
4
[]
no_license
# https://www.interviewbit.com/courses/programming/topics/arrays/problems/spiral1/ # return a spiral representation of an array def getSpiral(arr): x1, y1, x2, y2, direction, res = 0, 0, len(arr[0]) - 1, len(arr) - 1, 'right', [] while x1 <= x2 and y1 <= y2: if direction == 'right': for i in...
PHP
UTF-8
191
3.203125
3
[]
no_license
<?php ##$a에 1을 더한 후 $a 값을 $b에 대입하기 $a = 0; $b = ++$a; echo "\$a는 {$a}, \$b는{$b}<br>"; ## $a는 1, $b는 1 $a = 0; $b = $a++; echo "\$a는 {$a}, \$b는{$b}"; ?>
Python
UTF-8
1,787
2.546875
3
[]
no_license
import os import sys from sqlalchemy import Column, ForeignKey, Integer, String, Float from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine Base = declarative_base() class ShopOwner(Base): __tablename__= 'shop' id = Column( Integer, p...
Java
UTF-8
240
1.929688
2
[]
no_license
package common; public class Config { /** * Specify the browser and platform for test: * CHROME_MAC * CHROME_WINDOWS * MOZILLA_MAC **/ public static final String BROWSER_AND_PLATFORM = "CHROME_WINDOWS"; }
Java
UTF-8
2,407
2.1875
2
[]
no_license
package com.kodgemisi.assignment.controllers; import java.sql.Timestamp; import java.util.Date; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.social.connect.Connection; import org.springframework.social.connect.ConnectionKey; import org.springframework.social.connect.Conne...
Rust
UTF-8
1,201
2.6875
3
[]
no_license
use futures::executor::block_on; use planner::engine::db_wrapper::event::Event; use planner::engine::db_wrapper::{event, Connection}; #[test] fn add_and_remove() { let pool = Connection::new(); let pool = &pool.unwrap().pool; let event = Event::new() .title("Test") .date(chrono::Utc::now() ...
Markdown
UTF-8
9,250
3.078125
3
[]
no_license
## How to get email alert when your website is down using shell and Python? There are many ways to monitor and set alerts for your web server using third party apps but they don't come with free, be it Pingdom or Amazon's CloudWatch. In this post I am going to show how we can write and setup our own alert tool with j...
Java
UTF-8
1,480
3.4375
3
[]
no_license
import java.util.Scanner; public class Olympiad { public static void main(String[] args) { System.out.println("Enter the starting time:"); Scanner sc = new Scanner(System.in); int h1 = sc.nextInt(); int m1 = sc.nextInt(); int s1 = sc.nextInt(); System.out.println(...
JavaScript
UTF-8
1,236
2.859375
3
[]
no_license
import React, { useState, useEffect } from "react"; import "./App.css"; import PropTypes from 'prop-types'; function AssignmentUsingFunctionComponent() { const [response, setResponse] = useState([]); const [isLoading, setIsLoading] = useState(true); useEffect(() => { fetch( `http://jsonplaceholder.typ...
Python
UTF-8
4,229
2.703125
3
[]
no_license
import smbus class DS1307: _ADDRESS_SECONDS = 0x00 _ADDRESS_MINUTES = 0x01 _ADDRESS_HOURS = 0x02 _ADDRESS_DAY = 0x03 _ADDRESS_DATE = 0x04 _ADDRESS_MONTH = 0x05 _ADDRESS_YEAR = 0x06 _ADDRESS_CONTROL = 0x07 def __init__(self, i2cbus=1, pAddress=0x68): # 7bits + R/W toevoegen ...
C
UTF-8
1,680
2.703125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_iterate.c :+: :+: :+: ...
Java
UTF-8
1,231
2.734375
3
[]
no_license
package com.MyJunit; import com.MyOther.Junit; import org.junit.*; import static org.junit.Assert.assertEquals; /** * Created by panghaichen on 2018-06-29 14:13 **/ public class TestJunit { /** * 只执行一次,在整个类执行之前执行 */ @BeforeClass public static void beforeClass(){ System.out.println("B...
Markdown
UTF-8
339
2.6875
3
[]
no_license
# ivr_lab_robotics_2016 Private repository for managing robotics code in IVR 2016 class. Utilises simple PID controllers to navigate a two-wheeled robot around 3 courses: following a line in a fast and efficient manner; following a broken line; navigating around an obstacle placed on a line and finding the line again (...
JavaScript
UTF-8
2,210
2.640625
3
[]
no_license
class Login extends React.Component { constructor(props) { super(props); this.state = { email: (this.props.email || ''), password: (this.props.password || '') }; } updateEmail(event) { this.setState({ email: event.target.value }); } updatePassword(event) { this.setState({ pas...
TypeScript
UTF-8
182
2.921875
3
[]
no_license
export class SkyObject { ra = 0; // right ascension dec = 0; // declination constructor(ra: number, dec: number) { this.ra = ra; this.dec = dec; } }
C++
UTF-8
5,819
3.046875
3
[]
no_license
// BiTree.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "my.h" HRESULT buildTree(const char *,int *pIndex,LPBITREE * ppTreeNode); HRESULT preOrderTraverseTree(LPBITREE pRootNode); HRESULT inOrderTraverseTree(LPBITREE pRootNode); HRESULT postOrderTraverseTree(LPBIT...
Java
UTF-8
920
2.59375
3
[]
no_license
package ar.com.kfgodel.associative.materialization.api.config; import ar.com.kfgodel.associative.materialization.api.ExpectedObjectDefinition; import ar.com.kfgodel.associative.materialization.api.context.MaterializationContext; import ar.com.kfgodel.decomposer.api.DecomposableTask; /** * This type represents a mate...
C
UTF-8
591
2.953125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main(void) { int x, y; for(y=1; y<=7; y++) { if(y<=4) { for(x=1; x<=13; x++) { if(abs(x-7)+1 == y) printf("*"); else printf(" "); } ...
Markdown
UTF-8
371
2.75
3
[ "MIT" ]
permissive
[<<< Previous question <<<](0321.md) Question ID#0322.md [>>> Next question >>>](0323.md) What is the output of the following PHP script: ```php $a = 10; $b = "10"; if ($a == $b) { echo "a"; } else { echo "b"; } if ($a === $b) { echo "c"; } else { echo "d"; } ``` Enter the exact script output - [...
C
UTF-8
985
3.4375
3
[]
no_license
/** * SO * Lab #4 * * Task #2, Linux * * Catching signals */ #include <stdio.h> #include <string.h> #include <signal.h> #include <unistd.h> #include "utils.h" int normal_count; int real_count; int done; static void sig_handler(int signum) { switch (signum) { case SIGINT: usleep(100000); normal_count++; ...
Markdown
UTF-8
2,324
3.0625
3
[ "MIT", "LicenseRef-scancode-unknown", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# Read From STDIN **Go** is good for small command line utilities. In my process to learn **Go** I wanted to write some small command line utilities so I thought about what command line utilities I was missing... I used to work with DNS so I decided that the process of opening a browser to find a punycode converter a...
Python
UTF-8
957
4.03125
4
[]
no_license
# I'm establishing my global variables here to be used in conditionals later fav_game = "The Witcher 3" second_fav_game = "The Outer Wilds" fav_film = "Lord of the Rings: The Return of the King" second_fav_film = "City of God" # This is my first user input which sets up the 'parent' conditional game_answer = input("...
C++
UTF-8
2,059
2.5625
3
[ "BSL-1.0" ]
permissive
#include "stb_image.h" #include "../Debug.h" #include "RenderAssets.h" namespace Amendieres::Gfx { AssetBase* PngTexture2D::Factory(const uint64_t rid) { return new PngTexture2D(rid); } PngTexture2D::PngTexture2D(const uint64_t rid) : AssetBase(rid, static_cast<int32_t>(AssetType::PngTexture))...
Java
UTF-8
2,374
2.515625
3
[]
no_license
package org.stevejxsn.alecalphabet; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.ImageView; import android.widget.TextView; import android.inputmethodservice.K...
C++
UTF-8
1,099
3.140625
3
[ "MIT" ]
permissive
#include <string> #include <vector> #include <iostream> #include <unordered_map> #include "assembler.hpp" using namespace std; void print_result(vector<string> instructions) { unordered_map<string, int> programme = assembler(instructions); for (auto i = programme.begin(); i != programme.end(); ++i) { cout ...
C
WINDOWS-1252
280
3.125
3
[]
no_license
#include<stdio.h> int main() { int x,y,z; for(x=0;x<=20;x++) { for(y=0;y<=33;y++) { z=100-x-y; if(z%3==0&&x*5+y*3+z/3==100) printf("gj %dmj: %d,xj: %d\n",x,y,z); } } getch(); return 0; }
Java
UTF-8
530
1.867188
2
[ "Apache-2.0" ]
permissive
package xproject.speech; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.amazon.speech.speechlet.Speechlet; import com.amazon.speech.speechlet.servlet.SpeechletServlet; public class XProjectServlet extends SpeechletServlet { private static final Logger log = LoggerFactory.getLogger(XPro...
Java
UTF-8
2,584
2.140625
2
[]
no_license
package config; import java.util.Collections; import org.springframework.batch.core.Job; import org.springframework.batch.core.Step; import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; import org.spring...
C#
UTF-8
3,068
3.5
4
[]
no_license
 #region using statements using System; using System.Collections.Generic; using System.Security.Cryptography; using System.Linq; using DataJuggler.Core.UltimateHelper; #endregion namespace DataJuggler.Core.RandomShuffler { #region class ShuffleHelper /// <summary> /// This method [Ent...
Java
UTF-8
1,702
3.078125
3
[ "Apache-2.0" ]
permissive
package com.minicluster.cluster.node; import java.io.*; /** * An endpoint is a socket address. Basically it is the pair hostname:port */ public class Endpoint implements Serializable { private static final long serialVersionUID = 1L; private static final String separator = ":"; private Integer port; ...
Python
UTF-8
8,135
3.1875
3
[]
no_license
# /* # (c) 2011 - 2015, Vladimir Agafonkin # Sun_calc is a Java_script library for calculating sun / moon position and light phases. # https: // github.com / mourner / suncalc # */ # // sun calculations are based on http: // aa.quae.nl / en / reken / zonpositie.html formulas # // date / time constants and conversio...
PHP
UTF-8
2,271
2.53125
3
[]
no_license
<?php ob_start(); include '../getConnection.php'; $subject_ID = $_GET['ID']; include '../checkCoord2.php'; if($coordCorrect != true) { exit(header('location: ../notCoord.php')); ob_get_flush(); } if(isset($_POST['Submit'])) { try { $topicName = $_POST["strtopicName"]; if(!empty(...
C++
UTF-8
2,925
3.40625
3
[]
no_license
//GameCharacter.cpp //Description: definition for GameCharacter class //Author: Liam McCormick //Date: 20/11/2018 #include <iostream> #include <string> #include "GameCharacter.h" //contructors and destructors GameCharacter::GameCharacter() { std::string characterName_ = "New character"; float health_ = 0; float we...
C
UTF-8
33,534
2.65625
3
[]
no_license
/*********************************************************** * A single header file lightmap seam optimization library * * https://github.com/ands/seamoptimizer * * no warranty implied | use at your own risk * * author: Andreas Mantler (ands) | last change: 05.03.2017 * * ...
Java
UTF-8
17,180
1.539063
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "licen...
Python
UTF-8
479
3.140625
3
[]
no_license
#!/bin/python3 import math import os import random import re import sys def dectobin(n): binary = '' while(n>=1): if n==1: binary = ''.join([binary,str(n)]) return binary else: r = n%2 binary = ''.join([binary,str(r)]) n = n//2 re...
Markdown
UTF-8
1,307
2.578125
3
[ "MIT" ]
permissive
--- title: Jacob Sartorius arrested for drug abuse layout: post author: max.morphey permalink: /even-more-admin/ source-id: 1hwDGKNmB4ZsUpW8_Rb8-B7SqScd3S3rZ9zT0tcuzzjU published: true --- <table> <tr> <td>Title: </td> <td>Making my page look even neater</td> <td> Date: </td> <td>14/12/16</td> </t...
Java
UTF-8
3,533
2.421875
2
[ "Apache-2.0" ]
permissive
package com.airbnb.reair.incremental.configuration; import com.airbnb.reair.incremental.DirectoryCopier; import com.airbnb.reair.incremental.deploy.ConfigurationKeys; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import java.net.URI; import java.net.URISyntaxException; import java.ut...
JavaScript
UTF-8
13,444
2.65625
3
[ "MIT" ]
permissive
// Great Vegan restaurant locations in SF for the app var locations = [ { "title" : "Shizen Vegan Sushi Bar", "location" : { "lat" : 37.768313, "lng" : -122.421643 }, "foursquareid" : "54a8b5d1498ef8abe40ce6b3", "rating" : "loading" }, { "title" : "Halu Ramen", "lo...
JavaScript
UTF-8
1,162
2.6875
3
[]
no_license
function set_featured_item(elem, featured, id) { var row = elem.parentNode; img = elem.childNodes[0]; if (featured != 'featured') { img.oSrc = img.oSrc.replace(/show/g, 'hide'); img.src = img.src.replace(/show/g, 'hide'); img.oSrc = img.oSrc.replace(/not.featured/g, 'featured'); img.src = img.src.replace...
Java
UTF-8
1,817
2.265625
2
[]
no_license
/** * Copyright (c) 2012 powered by CNRVoice * * @author: CNR * @date: 2012-10-12 上午11:53:19 * @Description: * */ package com.cnrvoice.base.authc; import java.util.Collection; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache....
JavaScript
UTF-8
184
3.046875
3
[]
no_license
let a = 2; let b = 2; let c = 2; let d = 2; let h = 1; const f = (a,b,h) => {return h*(a+b)/2} console.log(`Pole powierzchni trapezu o wymiarach ${a}, ${b}, ${h}, wynosi ${f(a,b,h)}`);
Java
UTF-8
919
1.984375
2
[]
no_license
package rmagalhaes.com.baking.data.helpers; import android.net.Uri; import android.provider.BaseColumns; /** * Created by Rafael Magalhães on 04/03/18. */ public class RecipeContract { public static final String AUTHORITY = "rmagalhaes.com.baking"; public static final Uri BASE_CONTENT_URI = Uri.parse("cont...
Markdown
UTF-8
981
2.953125
3
[ "MIT" ]
permissive
# Virtual Camera 3D first-person virtual camera [Processing](https://processing.org) library. Allows you to control the camera with the keyboard and mouse, using WASD-style movement. ![VirtualCamera screenshot 0](img/virtualcamera0.png) ![VirtualCamera screenshot 1](img/virtualcamera1.png) ![VirtualCamera screenshot 2...
Python
UTF-8
6,587
2.703125
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # Author: Kaiqi Fu # usage: require 1. ref_human_detail 2. human_our_detail 3 ref_our_detail import re f = open("ref_human_detail",'r') dic={} insert = 0 delete = 0 sub = 0 cor=0 count=0 ## 0: ref 1:human 2:ops --- 3: human 4: our 5: ops for line in f: line = line.strip()...
Python
UTF-8
235
2.640625
3
[ "MIT" ]
permissive
from sense_hat import SenseHat from time import sleep sense = SenseHat() while True: humidity = sense.get_humidity() if humidity > 29: sense.clear(255,0,0) else: sense.clear(0,0,255) sleep(0.1)
Java
UTF-8
10,145
1.9375
2
[]
no_license
package com.pwc.dao.mysql; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.HashMap; import java.util.Map; import javax.annotation.Resource; import javax.persistence.Column; import javax.persistence.Query; import javax.persistence.Transient; import javax.sound.midi.Syse...