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,558
2.015625
2
[]
no_license
package com.example.watertracker; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; imp...
Java
UTF-8
2,356
2.125
2
[]
no_license
/* * Copyright 2010 International Institute for Social History, The Netherlands. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Un...
Python
UTF-8
728
3.109375
3
[]
no_license
import broom import numpy as np sw = broom.Sweeper() def get_sub_array(A, which): """extract subarray from A determined by information in the list which """ if not A.ndim == len(which): raise ValueError('A.ndim == len(which) not true') A_shape = A.shape slice_list = [] for n, dim ...
C++
UTF-8
4,118
2.53125
3
[]
no_license
#pragma once #include <optional> #include "Vertex.h" #include "IndexedTriangleList.h" #include <DirectXMath.h> #include "ChiliMath.h" #include <array> class Cube { public: static IndexedTriangleList MakeIndependent( Dvtx::VertexLayout layout ) { using namespace Dvtx; using Type = Dvtx::VertexLayout::ElementTyp...
Markdown
UTF-8
5,917
3.265625
3
[]
no_license
--- layout: post title: "My First React Project" date: 2017-03-23 --- React Doc Builder ====== A Form Wizard React App ------ This project was built using: * React * React-Redux * React-Router * React-Form * React-Local-State The goal of this project was to create a single page app form wizard. The user would select...
Java
UTF-8
697
1.9375
2
[]
no_license
package th.co.imake.missconsult.assessment.form; import java.io.Serializable; public class McResultPKForm extends CommonForm implements Serializable { //default serial version id, required for serializable classes. private static final long serialVersionUID = 1L; private Integer mcustAssessmentId; private String m...
Java
UTF-8
374
1.820313
2
[]
no_license
package org.igov.model.relation; import org.igov.model.core.GenericEntityDao; import org.springframework.stereotype.Repository; /** * * @author Kovilin */ @Repository public class ObjectItemDaoImpl extends GenericEntityDao<Long, ObjectItem> implements ObjectItemDao { public ObjectItemDaoImpl()...
C#
UTF-8
4,320
2.96875
3
[]
no_license
using System; using System.Reflection; using System.Windows.Forms; namespace FuzzySelector.Client { public partial class WSDLConnectorForm : Form { /// <summary> /// Abstractizarea proprietatilor unei metode a unui serviciu web (ce poate fi invocata). /// </summary> private ...
Python
UTF-8
2,150
3.3125
3
[]
no_license
import pandas as pd import numpy as np import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.stem import PorterStemmer from string import punctuation # nltk.download() # nltk.download('punkt') # if you have not downloaded the nltk corpus, then uncomment the lines above def p...
Ruby
UTF-8
517
4.1875
4
[]
no_license
# Merging: That is, given two sorted arrays like the following we must merge them into one sorted array. # iterative def merge(array1, array2) result = [] index_one = 0 index_two = 0 while index_one < array1.length ele_one = array1[index_one] ele_two = array2[index_two] while index_two < array2.len...
Markdown
UTF-8
1,340
3.15625
3
[]
no_license
# Cleaning and Getting Data course project An analysis of accelerometer data generated from an experiment with Samsung Galaxy S smartphones. # Script 1. Merges the training and the test sets to create one data set. 2. Extracts only the measurements on the mean and standard deviation for each measurement. 3. Uses desc...
Java
UTF-8
343
2.296875
2
[]
no_license
package com.leketo.lolilo.entity; import java.time.LocalDate; /** * Interface to be implemented by entities that contain information about who created them and when. */ public interface Creatable { LocalDate getCreateTs(); void setCreateTs(LocalDate date); String getCreatedBy(); void setCreatedB...
Java
UTF-8
9,855
1.9375
2
[]
no_license
package com.example.user.ordersystem; import android.app.DatePickerDialog; import android.app.TimePickerDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.Message; import andro...
Java
UTF-8
526
2.09375
2
[]
no_license
package com.enji_iot.mqtt.Service; import java.util.Map; /** * 邮件服务 * */ public interface MailService_MQTT { /** * * 把模板换算成字符串 * * @return */ public String mergeTemplateIntoString(String tpl, Map<String, Object> param); /** * * 发送邮件 * * @param mailTo * @param mail...
Ruby
UTF-8
3,467
2.609375
3
[]
no_license
#Framework require 'sinatra' require 'sinatra/reloader' #database configuration require 'pg' require_relative 'db_config' #model classes require_relative 'models/dish' require_relative 'models/user' require_relative 'models/comment' #test console require 'pry' #activate session control enable :sessions #methods i...
Java
UTF-8
845
2.65625
3
[]
no_license
package assignments.assignment2; import org.grouplens.lenskit.data.event.Rating; import org.grouplens.lenskit.vectors.MutableSparseVector; public interface IUserProfileType { /** * This method updates the User profile vector given the data model and the * rating that is supposed to affect the User vec...
Markdown
UTF-8
3,601
2.703125
3
[]
no_license
--- title: "680 - Two Of A Kind" url: /2008/08/680-two-of-kind.html publishDate: Sun, 24 Aug 2008 04:28:00 +0000 date: 2008-08-24 04:28:00 categories: - "nikon-851-8" tags: - "austria" - "bicycle" - "newspaper" - "nikon-d300" - "vienna" - "wien" --- <a href="https://d25zfm9zpd7gm5.cloudfront.net/1200x12...
C#
UTF-8
24,136
2.78125
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Dinamica { public class Memoria : IEnumerable { //Lista enlazada doble public Partic...
Java
UTF-8
639
2.171875
2
[]
no_license
package ua.goit.offline.chat.security; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.User; import java.util.Collection; /** * Created by andreymi on 2/7/2017. */ public class UserEntity extends User { private ua.goit.offline.chat.entity.User use...
C++
UTF-8
2,523
2.53125
3
[]
no_license
///************************************************************************ /// <copyrigth>Voice AI Technology Of ShenZhen</copyrigth> /// <author>tangyingzhong</author> /// <contact>yingzhong@voiceaitech.com</contact> /// <version>v1.0.0</version> /// <describe> /// You can operate the sqlite by this class ///</descr...
PHP
UTF-8
1,189
2.59375
3
[ "MIT" ]
permissive
<?php namespace App\Ogniter\Model\Website; use Illuminate\Database\Eloquent\Model; use DB; class Search extends Model { protected $table = 'searches'; function register($text, $add=FALSE, $universe_id=0){ $text = trim($text); if(empty($text)){ return; } $text = s...
JavaScript
UTF-8
1,473
2.515625
3
[]
no_license
import {useState, useEffect} from 'react'; import {renameFileWithPrefix} from './../../helper'; const useStorage = (file, firebaseStorage, addAsset, currentUsername, assetCategory) => { const [progress, setProgress] = useState(0); const [error, setError] = useState(null); const [url, ...
Python
UTF-8
449
3.90625
4
[]
no_license
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None def listToListNode(list): head = ListNode(list[0]) p = head for i in range(1, len(list)): p.next = ListNode(list[i]) p = p.next return head def printLis...
C++
UTF-8
1,658
3.140625
3
[]
no_license
#include <iostream> using namespace std; int main() { int aa,bb,hh=0; int vv[50][50]; int gg[50][50]; int cc[50][50]; cout<<"Enter the number of rows"; cin >> aa; cout<<"Enter the number of columns"; cin >> bb; cout << endl; cout <<"Ent...
Python
UTF-8
370
2.53125
3
[]
no_license
import gspread_pandas def push_to_docs(df, email, book_name, sheet_name): print("Pushing to docs .... ") spread = gspread_pandas.Spread(email, book_name, sheet_name) spread_df = spread.sheet_to_df() spread_df = spread_df.append(df) spread.df_to_sheet(spread_df) #tab = workbook.fetch_tab(sh...
JavaScript
UTF-8
555
3.671875
4
[]
no_license
function getBudgets(box) { let sum = 0; for (const key of box) { sum += key.budget; } return sum; } let x = getBudgets([ { name: "John", age: 21, budget: 23000, }, { name: "Steve", age: 32, budget: 40000, }, { name: "Martin", age: 16, budget: 2700, }, ]); le...
JavaScript
UTF-8
3,001
2.578125
3
[]
no_license
var http = require("http"), fs = require('fs'); qs = require('querystring'); books = require('./public/books'); function serveStaticFile(res, path, contentType, responseCode) { if(!responseCode) responseCode = 200; fs.readFile(__dirname + path, function(err, data) { if(err) { re...
Markdown
UTF-8
1,800
2.640625
3
[]
no_license
# GPFSWorld [简体中文](README_CN.md) GPFSWorld is developed based on the [fyne](https://github.com/fyne-io/fyne) framework. It is the GUI node of the GPFS network and an integral part of the GPFS ecosystem. Everyone can use it to share their files freely. It is not only a file management tool, it is also a resource searc...
TypeScript
UTF-8
1,304
2.890625
3
[]
no_license
import { Command } from "discord-akairo"; import { Message, TextChannel, MessageEmbed } from "discord.js"; export default class Say extends Command { public constructor() { super("say", { aliases: ["say", "echo"], channel: "guild", category: "Utilities", userPermissions: ["MANAGE_CHANNELS...
Python
UTF-8
3,647
2.890625
3
[]
no_license
import json from django.http import HttpResponse from General_modules.module_DB import sqlExecute from General_modules import global_settings TABLENAME = global_settings.APA_TABLE_NAME DB_NAME = global_settings.DB_NAME_EMEP_APA db_user = global_settings.POSTGRESQL_USERNAME db_password = global_settings.POSTGRESQL_P...
C++
UTF-8
2,419
2.625
3
[]
no_license
#include <FastLED.h> // How many leds in your strip? #define NUM_LEDS 150 // For led chips like Neopixels, which have a data line, ground, and power, you just // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, // ground, and power), like the LPD8806, define both DATA_PIN and C...
Java
UTF-8
1,569
2.265625
2
[]
no_license
package net.polyv.live.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import net.polyv.live.bean.client.WrappedResponse; import net.polyv.live.bean.model.ChannelAccount; import net.polyv.live.bean.request.account.PLChannelAccountsGetRequest; import net.polyv.live.bean.result.PL...
JavaScript
UTF-8
681
2.84375
3
[ "MIT" ]
permissive
/* eslint no-underscore-dangle:0, no-restricted-syntax: 0 */ class BaseEntity { /** * @param {*} rawData */ constructor(rawData) { this.$rawData = this.constructor.transform(rawData); this._assign(); } /** * Transform raw data * @param {*} data */ static transform(data) { return ...
Java
UTF-8
3,271
3.265625
3
[]
no_license
public class DLL<T>{ private DLLNode<T> head, tail; public String toString(){ DLLNode<T> p; String s = ""; for(p = head; p != null; p = p.next) s = s + p.info.toString() + " "; return s; } public void addToHead(T el){ if(isEmpty()){ ...
Shell
UTF-8
235
2.859375
3
[]
no_license
#!/bin/bash echo -e "\e[1;31m math demo of 'let' \e[0m" x=1999 let "x = $x + 1" echo $x let "x = $x + 100" echo $x let "x +=1" echo $x let "x -=1" echo $x let x-=1 echo $x let x+=1 echo $x let x=x+99 echo $x x="olympic'"$x echo $x
Markdown
UTF-8
1,171
3.515625
4
[]
no_license
--- title: Slides of my talk SVG and React ( ReactJS Tokyo December 2017 ) layout: post category : software tags : [software,react,frontend,svg] published: true --- A few weeks ago I gave a talk in the ReactJS Tokyo meetup. When I arrived to Japan a few months ago one of my goals was to contribute in some way to the l...
Java
UTF-8
1,446
2.703125
3
[ "MIT" ]
permissive
package io.github.eetchyza.springauth; import java.time.LocalDateTime; import java.util.Collection; import io.github.eetchyza.springauth.api.GrantedAuthority; /** * Holds authentication details * * @author Dan Williams * @version 1.0.0 * @since 2019-04-06 */ public class Authentication { private String authen...
C#
UTF-8
1,251
2.59375
3
[]
no_license
using UnityEngine; public class Bullet : MonoBehaviour { private Transform target; public float speed = 70f; public GameObject bulletExplosionEffect; private float damage; public void Seek(Transform _target, float dmg) { target = _target; damage = dmg; } // Update is...
TypeScript
UTF-8
251
2.828125
3
[]
no_license
export class Usuario{ public nome: string; public endereco: string; public telefone: string; constructor(nome: string, endereco:string, telefone:string){ this.nome = nome; this.endereco = endereco; this.telefone = telefone; } }
Python
UTF-8
1,619
4.09375
4
[]
no_license
def get_length(dna): """ (str) -> int Return the length of the DNA sequence dna. >>> get_length('ATCGAT') 6 >>> get_length('ATCG') 4 """ return len(dna) def is_longer(dna1, dna2): """ (str, str) -> bool Return True if and only if DNA sequence dna1 is longer than DNA sequence...
Java
UTF-8
557
1.578125
2
[]
no_license
package com.tyh.bankcrawper; import com.tyh.bankcrawper.client.OrderClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableSched...
C++
UTF-8
7,061
3.0625
3
[]
no_license
#include <components/program.h> #include "print_visitor.h" PrintVisitor::PrintVisitor(const std::string& filename) : stream_(filename) {} void PrintVisitor::Visit(Program* program) { stream_ << "Program:" << std::endl; auto addTab = AddTab(this); program->main_->Accept(this); for (const auto& cl...
Python
UTF-8
460
3.0625
3
[]
no_license
import re import requests from bs4 import BeautifulSoup url = 'https://www.nytimes.com/' source_code = requests.get(url) plain_text = source_code.text soup = BeautifulSoup(plain_text) string1 = ["sports","trump","tech"] for i in range(len(string1)): count = 0 for link in soup.findAll('a',href=re.compile(str...
Python
UTF-8
1,800
3.34375
3
[]
no_license
from typing import List import queue import collections def top(i, j, m, n): ''' :param i: :param j: :param m: 行 :param n: 列 :return: ''' if i == 0 and 0 <= j < n: return True def bottom(i, j, m, n): ''' :param i: :param j: :param m: 行 :param n: 列 :...
C++
UTF-8
781
3.375
3
[]
no_license
https://practice.geeksforgeeks.org/problems/zigzag-tree-traversal/1 void zigZagTraversal(Node* root) { if (root == NULL) return ; stack <Node *> s1; stack <Node *> s2; s1.push(root); while(s1.empty() == false || s2.empty() == false){ while(s1.empty() == false){ Node * root_s1 = s1.top(); ...
C++
UTF-8
644
3.71875
4
[]
no_license
// C++11 thread basics /* C++11 threas VS pthreads: 1. pthreads is a C lib, not supporting some of the C++ features like exception and object lifetimes. 2. C++11 threads is in a RAII(Resource Allocation Is Initialization) manner. 3. some of the pthreads functionalities not supported in C++11 and vise versa. */ #inclu...
Python
UTF-8
576
4.3125
4
[]
no_license
# Write a Python program to find the smallest multiple of the first n numbers. # Also, display the factors. # Test Data: # If n = (13) # Expected Output : # [13, 12, 11, 10, 9, 8, 7] # 360360 def smallest_multiple(n): i = n * 2 factors = [number for number in range(n, 1, -1) if number * 2 > n] print(fa...
Markdown
UTF-8
3,160
2.734375
3
[]
no_license
--- layout: post status: publish published: true title: "소통에 어려움을 겪는 이유" author: display_name: Kay login: Kay email: iam@hannal.net url: '' author_login: Kay author_email: iam@hannal.net wordpress_id: 1041 wordpress_url: http://blog.hannal.com/communication_skill_01_for_who_for_what/ date: '2007-07-17 00:58:37 ...
C#
UTF-8
4,681
2.515625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using application.Strategy; using commonTypes; using commonClass; namespace Strategy { public class HybridKeltner_Helper : baseHelper { public HybridKeltner_Helper() : base(typeof(HybridKeltn...
Markdown
UTF-8
5,877
2.796875
3
[]
no_license
# EXMiniHoga > **Extends**: [`AGrid`](./../afc/AGrid.md) 호가와 거래량을 2열로 표시하는 호가그리드. 형태는 아래와 같다. 1열 | 2열 :--- | ---: 매수호가N | 거래량 ... | ... 매수호가1 | 거래량 매도호가1 | 거래량 ... | ... | ... 매도호가N | 거래량 <br/> ## Properties ### frwName * `Default` "stock" <br/> ### quoteCount \<Number> 호가 단계(5호가, 10호가) <br/> ### rowLen \<Num...
Shell
UTF-8
872
3.3125
3
[]
no_license
#!/bin/sh #cd /home/dsandler/dsandler.org/tools/shirtdb/preview SITEDIR=/home/dsandler/web/shirts cd $SITEDIR/preview if [ "$1" = "" ]; then wget --recursive --level=1 --accept=jpg --no-parent http://keepernotes.com/shirts/ cd keepernotes.com/shirts # fixup test -f 2010.wiess-front.jpg \ && mv 2010.wiess-front....
Java
UTF-8
1,242
2.34375
2
[]
no_license
package com.example.tutorial_9; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class call extends AppCompatAct...
Java
UTF-8
2,120
2.65625
3
[]
no_license
package com.rotemarbiv.tin; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; /** *...
Markdown
UTF-8
1,046
2.671875
3
[ "MIT", "ISC", "BSD-2-Clause" ]
permissive
--- title: Web workers category: JavaScript updated: 2017-10-30 layout: 2017/sheet weight: -1 --- ## Web workers #### Client ```js var worker = new Worker('worker.js') worker.onmessage = function (message) { alert(JSON.stringify(message.data)) }) worker.postMessage('hello!') ``` Messages can be anything that ca...
C++
UTF-8
4,053
2.90625
3
[]
no_license
#include "mbed.h" #include <math.h> #include <cstdio> #include <cmath> #include <complex> #include <iostream> #include <valarray> void initLCD(); void write_command(char c); void write_data(char c); void print_LCD_char(char c); void print_LCD_String(char *s); void initLED(); void configLED(char b, char g, cha...
C++
UTF-8
741
2.515625
3
[]
no_license
// // TextureCache.cpp // flyweight, proxy pattern // // Created by mac on 2016. 9. 3.. // Copyright © 2016년 남준현. All rights reserved. // #include "TextureCache.hpp" #include "Texture2D.hpp" TextureCache& TextureCache::getInstance() { static TextureCache instance; return instance; } TextureCache::Textur...
Java
UTF-8
405
1.820313
2
[]
no_license
package ch.bergturbenthal.raoa.importer.domain.model; import java.nio.file.Path; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.lang.NonNull; import org.springframework.validation.annotation.Validated; @ConfigurationProperties(prefix = "raoa....
Java
UTF-8
584
2.25
2
[]
no_license
package ru.pp.xaos.server.manage.response.errors; import java.io.IOException; import javax.servlet.http.HttpServletResponse; import ru.pp.xaos.server.config.Strings; import ru.pp.xaos.server.format.TemplateLoader; public class FileIsTooLarge { private static TemplateLoader templateLoader = new TemplateLoader(); ...
JavaScript
UTF-8
619
2.71875
3
[]
no_license
import { useState, useEffect } from 'react'; import axios from 'axios' function CurrentLocation() { const [locationData, setLocationData] = useState(''); useEffect(() => { let result = setInterval(() => { axios.get('https://freegeoip.app/json/').then(function (response) { result = response.data...
Java
UTF-8
987
1.640625
2
[]
no_license
package com.google.android.gms.internal.p001firebaseauthapi; /* renamed from: com.google.android.gms.internal.firebase-auth-api.zzhz reason: invalid package */ /* compiled from: com.google.firebase:firebase-auth@@20.0.2 */ public final class zzhz extends zzzz<zzic, zzhz> implements zzabh { private zzhz() { ...
Markdown
UTF-8
8,030
3.171875
3
[ "BSD-3-Clause" ]
permissive
## 2.7 Шаблонизатор Slim Slim - язык шаблонов, чья задача — сократить объем кода, при этом не делая его страшным и непонятным. Вот так выгядит шаблон с использованием Slim: ``` doctype html html head title Slim Examples meta name="keywords" content="template language" body h1 Markup examples #conte...
C++
UTF-8
730
3.515625
4
[ "MIT" ]
permissive
class Solution { public: bool checkOverlap(int radius, int x_center, int y_center, int x1, int y1, int x2, int y2) { auto clamp = [&](int center, int mini, int maxi) { return max(mini, min(maxi, center)); }; // The closest point to the circle within the rectangle int closes...
Python
UTF-8
924
3.96875
4
[]
no_license
#!/usr/bin/env python # encoding: utf-8 """ nrc.py Created by Yamato Matsuoka on 2012-07-16. Description: Write a program to find the first non repeated character in a string. Input sample: The first argument will be a text file containing strings. e.g. yellow tooth Output sample: Print to stdout, the first no...
PHP
UTF-8
2,082
2.59375
3
[]
no_license
<?php namespace App\Repository; use League\OAuth2\Server\Entities\AuthCodeEntityInterface; use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface; use Psr\Log\LoggerInterface; use GraphAware\Neo4j\Client\Client; use GraphAware\Neo4j\Client\ClientBuilder; use GraphAware\Neo4j\OGM\EntityManager; use App\Mo...
Python
UTF-8
243
2.65625
3
[]
no_license
with open("/Users/keshavkummari/6am_python_nit_3rdJuly2019/file-and-dir/test.txt","r+a") as file: #print(file.read()) print(file.tell()) print(file.seek(0)) #print(file.write("Our Next Topic is RegEx")) print(file.read())
C++
GB18030
1,203
3.234375
3
[]
no_license
/************************************************************************ * ǩ : shared_ptrweak_ptr * : * : * : v1.0 * ˵ : * : dragonfive * ʱ : * ʱ : ************************************************************************ * Copyright @dragonfive 2016 . All rights reserved. ...
JavaScript
UTF-8
2,500
3.15625
3
[ "MIT" ]
permissive
const runBatches = require('./runBatches'); const taskFactorySample = (delay, resolve, val) => () => new Promise((res, rej) => setTimeout(resolve ? res : rej, delay, val)); describe('runBatches', () => { describe('* called with no arguments', () => { test('returns a rejected promise', async () => { expe...
Java
UTF-8
357
1.828125
2
[]
no_license
package io.lvcore.model.feedback; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import java.time.Instant; @Getter @Setter @NoArgsConstructor @AllArgsConstructor public class Review { String text; Instant dateWritten; String status; Stri...
C
UTF-8
480
3.71875
4
[]
no_license
/* Show how each of the following numbers will look if displayed by printf with %#012.5g as the conversion specification: a) 83.7361 *0000083.736 00000083.736 b) 29748.6607 *00000029748 00000029749. c) 1054932234.0 *1.054900000 001.0549e+09 d) 0.0000235218 002.3522e-05 002.3522e-05 */ #include <stdio.h> int main...
C++
UTF-8
3,535
2.84375
3
[ "MIT" ]
permissive
#include <ros/ros.h> #include <i2c_comm/I2CIn.h> #include <i2c_comm/I2COut.h> #include <std_msgs/String.h> #include <vector> #include <iostream> #include <map> extern "C" { #include <picom/i2c.h> #include <alib-c/alib_error.h> } /* Map of file descriptors to I2C devices. * First value is I2C addr, second is the ...
PHP
UTF-8
481
2.59375
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Cart extends Model { protected $fillable = [ 'products_id', 'users_id', 'qty', 'total', ]; protected $hidden = [ ]; public function product(){ return $this->hasOne( Product::class, 'id', 'products_id' );...
JavaScript
UTF-8
3,038
3.015625
3
[]
no_license
(function () { function showError(err) { let quote = document.getElementById("quotes").getElementsByTagName("p")[0]; let author = document.getElementById("quotes").getElementsByTagName("cite")[0]; quote.textContent = "Sorry, quotes are not currently available. Please check back later."; ...
C++
UTF-8
5,853
2.640625
3
[]
no_license
#include "body.h" body::body(GLfloat shininess, GLfloat ambient) { this-> colour = glm::vec3(0.33, 0.368, 0.192); this->numberOfVerticies = 40; this->light = new lighting(shininess, ambient); this->transform = new transformation(); this->base_cylider = new cylinder(0.2, 70.0, this->colour); this->gun_transforma...
PHP
UTF-8
2,785
3.109375
3
[]
no_license
<?php require_once 'autoload.php'; include 'templates/functions.php'; //New items are not created yet, have to use POST $db = db_connect(); $faker = Faker\Factory::create(); for( $i=0;$i < 20; $i++ ) { $blog_title = $faker->sentence($nbWords = 4, $variableNbWords = true) ; $blog_author = ...
Python
UTF-8
765
2.625
3
[]
no_license
import pandas as pd import folium, os result = pd.read_csv('datasets/processed/final.csv') wb_map = folium.Map(location=[22.9964948,87.6855882], zoom_start=6.5, width='100%', height=800,) for idx, row in result.iterrows(): print('Percentage loaded {0:.3f}\r'.format(idx*100.0/result.shape[0]), end='') folium.Ci...
Python
UTF-8
414
2.921875
3
[ "MIT" ]
permissive
import board def get_initial_arrangement_from_user() -> board.Board: """ the function handles user input to get the initial arrangement from the user :return: a list of ships objects. according to the games rules. """ board.Board() def get_guess_from_user() -> list: """ the function hand...
Java
UTF-8
1,086
2.21875
2
[]
no_license
package com.autodisk.ObjectRepository; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import com.autodisk.genericutility.FileLib; public class Loginpage { //Rule_1 WebDriver driver; @FindBy(na...
PHP
UTF-8
3,645
2.65625
3
[ "MIT" ]
permissive
<?php $servername = "localhost"; $user = "root"; $passwd = "mysql123"; $db = "car"; $conn = mysqli_connect($servername, $user, $passwd, $db) or die(mysqli_connect_error()); session_start(); if ($_SERVER["REQUEST_METHOD"] == "POST") { $uname = $_POST['userName']; $_SESSION["uname"] = $uname; $pas = $_POST['password'...
Markdown
UTF-8
578
2.78125
3
[]
no_license
# short-url Link to the application: http://1aa.xyz node.js application with a connected MongoDB to shorten your URL # How to run locally - Create MongoDB database, for example on cloud via https://mongodb.com or locally - Create .env file - Add ```MONGODB_URI=url_to_your_database``` to .env file - Run below: ```sh ...
Markdown
UTF-8
21,343
2.796875
3
[ "MIT", "CC-BY-4.0" ]
permissive
--- title: Azure Cosmos DB Provider - EF Core description: Documentation for the database provider that allows Entity Framework Core to be used with Azure Cosmos DB. author: AndriySvyryd ms.date: 02/12/2023 uid: core/providers/cosmos/index --- # EF Core Azure Cosmos DB Provider This database provider allows Entity Fra...
Java
UTF-8
9,094
2.328125
2
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
package io.opensphere.filterbuilder2.editor.common; import java.awt.Component; import java.awt.Dimension; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.DefaultListCellRenderer; import ja...
PHP
UTF-8
5,055
2.5625
3
[]
no_license
<?php lmb_require('src/service/social_photo_source/BaseSocialPhotoSource.class.php'); class InstagramPhotoSource extends BaseSocialPhotoSource { protected $uid; protected $token; function __construct(User $user) { parent::__construct($user); $this->uid = $user->instagram_uid; $this->token = $user->instagram...
Markdown
UTF-8
3,811
2.796875
3
[]
no_license
# UserProfile.UserApi All URIs are relative to *http://userprofile.qantas.io/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**addUser**](UserApi.md#addUser) | **POST** /user | Add a new user [**getUser**](UserApi.md#getUser) | **GET** /user | Get an existing user profile [**upd...
C
UTF-8
2,377
2.984375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* print_arg.c :+: :+: :+: ...
C++
UTF-8
986
2.84375
3
[]
no_license
#include "navcontext.h" NavContext::NavContext(QObject *parent) : QObject(parent), m_history() { m_history.push(PageContext()); } const PageContext &NavContext::currentPage() const { return m_history.top(); } void NavContext::replacePage(const QString& newCurrent) { return replacePage(PageContext(newCurr...
Java
UTF-8
1,062
2.21875
2
[]
no_license
package com.zr.action.ems; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.zr.service.ExamService; import com.zr.service.impl.ExamServiceImpl; ...
C++
UTF-8
5,736
3.53125
4
[]
no_license
#include <iostream> #include <string> using namespace std; class Package{ public: Package(){ // cout << "Package is created at " << this << endl; } Package(string desc, int wt):description(desc){ // cout << "Package is created at " << this << endl; setWe...
Rust
UTF-8
6,072
2.6875
3
[ "BSD-3-Clause" ]
permissive
#[macro_use] extern crate clap; use std::io::BufReader; use arcstar::sae_types::*; use eventcam_tracker::tracker::FeatureTracker; use eventcam_converter::conversion; use std::fs::create_dir_all; use std::path::Path; /// process an event file into a set of corners /// # Arguments /// /// * `src_path` - Path to the ...
Markdown
UTF-8
4,010
2.859375
3
[]
no_license
--- date: 2023-06-21 imdb_id: tt0090917 grade: F slug: deadly-friend-1986 --- Paul, a teenage prodigy in robotics and artificial intelligence, reanimates his teenage neighbor Sam by implanting his pet robot’s processor into her brain after she’s rendered brain dead by her abusive alcoholic father. It works, but she’s ...
Java
UTF-8
379
1.625
2
[]
no_license
package android.support.p010c.p011a; import android.annotation.TargetApi; import android.app.Fragment; @TargetApi(15) /* renamed from: android.support.c.a.d */ class C0038d { /* renamed from: a */ public static void m115a(Fragment fragment, boolean z) { if (fragment.getFragmentManager() != null) { ...
Java
UTF-8
5,124
1.867188
2
[]
no_license
package org.myapp.dev.api.security; import org.myapp.dev.config.AppConfig; import org.myapp.dev.config.JwtConfig; import org.myapp.dev.core.user.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.http.HttpMethod; im...
PHP
UTF-8
1,150
2.625
3
[ "MIT" ]
permissive
<?php $home = "/var/www/html/term.js-master"; $current_dir = isset($_POST['id']) ? $_POST['id'] : $home; $root = array(); if( !strcmp( $current_dir, $home) ){ $root['id'] = $home; $root['text'] = "Project Home"; $root['type'] = "D"; $root['state'] = 'open'; $root['children'] = listFolders( $current_d...
JavaScript
UTF-8
1,306
2.6875
3
[]
no_license
var React = require("react"); var _ = require("underscore"); var connect = require("react-redux").connect; function getSummary(items) { var result = 0; _.each(items, function (item) { result += item.count * item.price; }); return result; } var Bucket = React.createClass({ propTypes: { ...
Python
UTF-8
550
3.046875
3
[]
no_license
import socket def udp_main(): # 1.新建套接字 udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # 绑定端口 udp_socket.bind(('',10001)) # 2.收发数据 udp_data = input("please enter the messege: ") udp_addr = ('192.168.110.1',8001) udp_socket.sendto(udp_data.encode('utf-8'), udp_addr) ...
Go
UTF-8
188
3.109375
3
[ "MIT" ]
permissive
package problem50 func myPow(x float64, n int) float64 { res := 1.0 if n < 0 { n = -n x = 1 / x } for ; n > 0; n >>= 1 { if n&1 == 1 { res *= x } x *= x } return res }
JavaScript
UTF-8
1,067
2.65625
3
[]
no_license
const HCCrawler = require('headless-chrome-crawler'); (async () => { const crawler = await HCCrawler.launch( { // Function to be evaluated in browsers evaluatePage: (() => ({ title: $('title').text(), })), // Function to be called with evaluate...
Python
UTF-8
4,651
4.09375
4
[]
no_license
# Name: Denis Savenkov # hw3.py ##### Template for Homework 3, exercises 3.1 - ###### import math # ********** Exercise 3.1 ********** # Define your function here def list_intersection(list1, list2): #create an empty list to store common elements inter_list = [] #iterate the list and if the e...
Python
UTF-8
4,178
3.578125
4
[]
no_license
""" This is homework #1 for A.I. spring class CSCI561 Simple checker game by adopting Minimax, Alphabeta Algorithm - __main file__ -> class: starCircleWar - methods: * parseInputFile * run_minimax * run_alphabeta input : input.txt output : output.txt - nextMove - myopic utility va...
C++
UTF-8
457
2.796875
3
[ "BSD-3-Clause" ]
permissive
#pragma once #include <sstream> #include <string> namespace global_check { // Goal: Try to recreate issue of duplicate objects when linking with Python // code. struct Impl { static double global; }; template <typename T> std::pair<std::string, T> Producer(const T& value) { T& global = Impl::global; global +...
Python
UTF-8
13,095
2.90625
3
[ "MIT" ]
permissive
from gym_electric_motor.core import ElectricMotorVisualization from .motor_dashboard_plots import StatePlot, ActionPlot, RewardPlot, TimePlot, EpisodePlot, StepPlot import matplotlib.pyplot as plt import gymnasium class MotorDashboard(ElectricMotorVisualization): """A dashboard to plot the GEM states into graphs....