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
399
2.109375
2
[]
no_license
package org.natsna.pahu.AkkaStudy.ex06; import akka.actor.ActorRef; import akka.actor.ActorSystem; import akka.actor.Props; public class AgentMain { public static void main(String[] args) { ActorSystem actorSystem = ActorSystem.create("TestSystem"); ActorRef agentActor = actorSystem.actorOf(Props.create(AgentAct...
C++
UTF-8
3,017
2.578125
3
[]
no_license
#pragma once #include "BaseModel.h" #include <Matrix.h> #include "ModelLoader.h" struct ID3D11Texture2D; namespace Prism { class Sprite : public BaseModel { friend class Engine; friend class ModelLoader; public: void Render(const CU::Vector2<float>& aPosition, const CU::Vector2<float>& aScale = { 1.f, 1.f }...
Ruby
UTF-8
653
2.875
3
[]
no_license
# 當SketchUp遇見Ruby - 邁向程式化建模之路(碁峯出版) # http://books.gotop.com.tw/v_AEC009100 # ex_405.rb - 推擠切除部分立方體 mod = Sketchup.active_model ent = mod.entities depth = 10; width = 10 # 用分號區隔,可寫成一行 pts = [] pts[0] = [0, 0, 0] pts[1] = [width, 0, 0] pts[2] = [width, depth, 0] pts[3] = [0, depth, 0] # 建立矩形表面 test_face = ent.add_fac...
JavaScript
UTF-8
657
2.53125
3
[]
no_license
import React from 'react'; import SearchBox from './components/SearchBox'; import BookList from './components/BookList'; export default class App extends React.Component { constructor(props) { super(props); this.state = { books: [] } } handleSetState = (newBook) => { console.log('setting...
PHP
UTF-8
1,116
2.71875
3
[ "MIT" ]
permissive
<?php namespace Digitaliseringskataloget\SF1500\Organisation6\Organisationsystem; /** * Class representing AnonymiserInputType * * * XSD Type: AnonymiserInputType */ class AnonymiserInputType { /** * @var string $personUUID */ private $personUUID = null; /** * @var string $personCPR ...
Markdown
UTF-8
3,168
2.671875
3
[]
no_license
# SENZ007 Temperature and Humidity Sensor ###### Translation > For `English`, please click [`here.`](https://github.com/njustcjj/SENZ007-Temperature-and-Humidity-Sensor/blob/master/README.md) > For `Chinese`, please click [`here.`](https://github.com/njustcjj/SENZ007-Temperature-and-Humidity-Sensor/blob/master/READM...
Python
UTF-8
4,080
4.03125
4
[]
no_license
# Authors: Willem Vidler # Date: December 14th, 2020 # Program Name: Temperature Conversion # Program Description: Program that converts celcius into fahrenheit and vice-versa from tkinter import * # Imports the tkinter module from tkinter.ttk import * # Replace the tk widget with the ttk ones # Constants CE...
PHP
UTF-8
1,377
2.59375
3
[]
no_license
<?php class ToolsHelper { public static function getRandomString($length) { $characters = "0123456789abcdefghijklmnopqrstuvwxyz"; $string=""; for ($p = 0; $p < $length; $p++) { $string .= $characters[mt_rand(0, (strlen($characters))-1)]; } return $string;...
C++
UTF-8
197
2.609375
3
[]
no_license
#ifndef _compare_h #define _compare_h template <typename T> int compare(const T &v1, const T &v2) { if(std::less<T>()(v1,v2)) return -1; if(std::less<T>()(v2,v1)) return 1; return 0; } #endif
C
UTF-8
488
3.234375
3
[]
no_license
#include <stdio.h> void printArray(int *,int); int main() { int A[10],i,n; printf("\nEnter n"); scanf("%d",&n); printf("Enter %d numbers",n); for(i=0;i<n;i++) scanf("%d",&A[i]); printf("\n"); printArray(A,n); printf("\n");//Address printArray(A,n); printf...
Java
UTF-8
1,522
2.234375
2
[]
no_license
package com.stars.modules.email.packet; import com.stars.core.player.Player; import com.stars.core.player.PlayerPacket; import com.stars.modules.MConst; import com.stars.modules.email.EmailModule; import com.stars.modules.email.EmailPacketSet; import com.stars.network.server.buffer.NewByteBuffer; /** * Created by zh...
C#
UTF-8
1,256
2.703125
3
[]
no_license
using UnityEngine; using System.Collections; public class PlayerControl : MonoBehaviour { //Craeting variables for player. public static int _playerHP; float _playerSpeed = 1f; public float _bounds; float _playerX; float _playerY; //Setting up player hp and position. void Start() ...
Java
UTF-8
1,546
2.53125
3
[]
no_license
package app.habbo.xyz.Habbo; import java.util.HashMap; import app.habbo.xyz.Environment; public class Habbo { private int Id; private String Username; private String Look; private String Motto; private boolean isOnline = false; int relationship = 1; private String lastOnline ="01.01.1970";...
Python
UTF-8
846
3.828125
4
[]
no_license
# Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. # # Example 1: # # Input: "aba" # Output: True # Example 2: # # Input: "abca" # Output: True # Explanation: You could delete the character 'c'. class Solution: def validPalindrome(self, s): lef...
Java
UTF-8
2,680
2.015625
2
[ "MIT" ]
permissive
package com.rideaustin.rest; import javax.annotation.security.RolesAllowed; import javax.inject.Inject; import org.apache.http.HttpStatus; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PatchMapping; import org.springframework.web.bind.annotation.PathVaria...
Java
UTF-8
6,661
2.0625
2
[]
no_license
package com.matteoveroni.views.translations; import com.matteoveroni.bus.events.EventChangeView; import com.matteoveroni.bus.events.EventGoToPreviousView; import com.matteoveroni.bus.events.EventViewChanged; import com.matteoveroni.views.ViewName; import com.matteoveroni.views.dictionary.events.EventShowTranslationsAc...
JavaScript
UTF-8
8,955
3
3
[]
no_license
// SUSPECTS OBJECTS const mrGreen = { firstName: 'Jacob', lastName: 'Green', color: '#16a83d', description: 'He has a lot of connections', age: 45, image: 'assets/green.png', occupation: 'Entrepreneur', favoriteWeapon: 'knife' } const prPlum = { firstName: 'Peter', lastName: 'Plum', color: '#ff4...
Python
UTF-8
949
2.671875
3
[]
no_license
from produs import * def cautare_produs(listaProduse, prod, pret): for produs in listaProduse: # print(f' produs 1 {prod.nume} == produs 2 {produs.nume}') if prod.nume == produs.nume: produs.modif_pret(pret) return produs return False def are_potential(produs): try...
Ruby
UTF-8
143
3.09375
3
[]
no_license
arr = [["test", "hello", "world"],["example", "mem"]] puts arr.last.first #brings the last element and then brings the first from the last one
JavaScript
UTF-8
15,174
2.578125
3
[]
no_license
/* * WEB322 – Assignment 2 (Winter 2021) * I declare that this assignment is my own work in accordance with Seneca Academic * Policy. No part of this assignment has been copied manually or electronically from * any other source (including web sites) or distributed to other students. * * Name: Wonchu...
Java
UTF-8
1,078
2.171875
2
[]
no_license
package uk.co.telegraph.core.commons.dynamiclistdata; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.lang3.StringUtils; import com.google.common.collect.Lists; import uk.co.telegraph.core.commons.curatedlist.CuratedList; import uk.co.telegraph.core.commons.mostviewedlist.MostViewedList; ...
Java
UTF-8
1,261
3.421875
3
[]
no_license
package day1; public class Extwentyone { public static void main(String[] args) { int month = 2; int year = 2019; switch(month) { case 1: System.out.println("Number of Days is : 31"); break; case 2: if(checkYear(year)) System.out.println("Number of Days is : 29"); else System.out.println("...
Java
UTF-8
960
2.421875
2
[]
no_license
package cn.com.yuzhushui.websocket.common.base; import java.util.HashMap; import java.util.Map; import lombok.Data; import qing.yun.hui.common.utils.StringUtil; /*** ** @category 请用一句话来描述其用途... ** @author qing.yunhui ** @email: 280672161@qq.com ** @createTime: 2016年11月17日下午9:18:19 **/ @Data public class BaseQue...
Python
UTF-8
494
3.171875
3
[]
no_license
import matplotlib.pyplot as plt import numpy as np # plot def show_result(title, x1, x2, xd, y1, y2, yd, y): plt.figure() plt.title(title, fontsize=18) plt.xlim(x1-xd/4, x2+xd/4) plt.xticks(np.arange(x1, x2+xd/4, xd)) plt.ylim(y1-yd/4, y2+yd/4) plt.yticks(np.arange(y1, y2+yd/4, yd)) plt.xla...
C++
UTF-8
1,995
2.78125
3
[]
no_license
#include <mpi.h> #include <iostream> using namespace std; int main(int argc, char **argv) { int myid, numprocs, n, count, remainder, myBlockSize; int* data = NULL; int* sendcounts = NULL; int* displs = NULL; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); MPI_Comm_rank(MPI_COMM_WORLD, &myid)...
Go
UTF-8
4,031
2.703125
3
[]
no_license
package handlers import ( "encoding/json" "github.com/go-playground/validator/v10" "github.com/gorilla/mux" "go.uber.org/zap" "net/http" "strconv" "task-manager/adapters" "task-manager/models" "task-manager/repositories" "task-manager/services" ) type TaskHandler struct { service services.TaskService va...
Java
UTF-8
412
2.796875
3
[ "MIT", "Apache-2.0" ]
permissive
package com.esafirm.imagepicker.model; public enum MediaType { IMAGE(0), VIDEO(1); public int value; MediaType(int value) { this.value = value; } public static MediaType fromInteger(int x) { switch (x) { case 0: return IMAGE; case 1: ...
JavaScript
UTF-8
6,087
2.578125
3
[]
no_license
/* Will call the cb with as a parameter an array of lists on wich searches can be run. Each list of items corresponds to a relevant use case to test (relevance or performances) Usage : const prepareLists = require('this-file') const prepareLists((lists)=>{ `do what you want with the list of lists (of ite...
Java
UTF-8
938
2.46875
2
[]
no_license
package com.n01216688.testing; public class DataStructure_Restaurantinfo { private String restaurant_name; private String restaurant_phone; private String restaurant_address; public DataStructure_Restaurantinfo() { } public DataStructure_Restaurantinfo(String name, String phone, String addr...
Python
UTF-8
1,366
3.484375
3
[ "MIT" ]
permissive
#author: Rafa Arquero Gimeno #we need split import string #read field data in file def field_parser(raw_field): return tuple(string.split(raw_field, "&&")) def parser(): #init matrix M = [] #the file could not be here, so... try: raw = open("./peliculas100.dat") raw = file.readli...
Java
UTF-8
154
1.8125
2
[ "MIT" ]
permissive
package fr.slaynash.communication.enums; public enum ConnectionState { STATE_DISCONNECTED, STATE_CONNECTING, STATE_CONNECTED, STATE_DISCONNECTING; }
C
UTF-8
2,115
3.453125
3
[]
no_license
/** * Extreme Edge Cases Lab * CS 241 - Fall 2018 */ #include <stdlib.h> #include <ctype.h> #include <string.h> #include <stdio.h> char **camel_caser(const char *input_str) { if (!input_str) { return NULL; } int count = 0; for (int i = 0; input_str[i] != '\0'; i++) { if (ispunc...
Markdown
UTF-8
2,761
2.5625
3
[ "Unlicense" ]
permissive
# 800 رائد ورائدة أعمال في معرض الشرقية غدا Published at: **2019-11-02T22:17:56+00:00** Author: **صحيفة البلاد** Original: [صحيفة البلاد](https://albiladdaily.com/2019/11/03/800-%d8%b1%d8%a7%d8%a6%d8%af-%d9%88%d8%b1%d8%a7%d8%a6%d8%af%d8%a9-%d8%a3%d8%b9%d9%85%d8%a7%d9%84-%d9%81%d9%8a-%d9%85%d8%b9%d8%b1%d8%b6-%d8%a7%...
Markdown
UTF-8
4,120
2.703125
3
[]
no_license
--- name: 3.5.5.2 title: 3.5.5.2 - EIGRP Query Scoping with Summarization short-title: EIGRP Query Scoping with Summarization category: 3.5 EIGRP collection: eigrp layout: page exam: both sidebar: eigrp_sidebar permalink: 3.5.5.2.html folder: eigrp --- First we need to understand what is meant by Query Scoping… When s...
Markdown
UTF-8
2,727
3.3125
3
[ "MIT" ]
permissive
# {%= name %} {%= badge("fury") %} > {%= description %} Also see [expand-object][], for doing the reverse of this library. ## Install {%= include("install-npm", {save: true}) %} ## Usage ```js var collapse = require('{%= name %}'); collapse({a: {b: {c: [1, 2, 3]}}}) //=> 'a.b.c:1,2,3' ``` Re-expand a collapsed s...
Java
UTF-8
629
1.875
2
[ "MIT" ]
permissive
package com.virus.pt.db.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.virus.pt.db.dao.RoleDao; import com.virus.pt.db.service.RoleService; import com.virus.pt.model.dataobject.Role; import org.springframework.stereotype.Service; import java.util.List; /** * @author int...
C
UTF-8
1,280
3.453125
3
[]
no_license
#include"http_define.h" /* * 사용 API : memchr(읽을 버퍼 시작 포인터, 검색할 문자, 버퍼 총 길이), memchr을 이용하여 첫 포인터부터 기준문자까지의 길이를 구해 반환하는 함수 매개 변수 : char * start_line, int full_length, int parse_std_word 반환값 : int parsed_thing_length , 실패 시 -1, 문자 체크 NULL값은 -2로 체크*/ int get_parsing_length(char * start_line, int full_length, int pa...
JavaScript
UTF-8
427
2.765625
3
[]
no_license
const initialState = { monster: 100, hero: 100, }; export default function healthReducer(state = initialState, action) { switch (action.type) { case 'SET_HERO_HEALTH': return { ...state, hero: state.hero + action.payload, }; case 'SET_MONSTER_HEALTH': return { ....
Java
UTF-8
1,488
2.90625
3
[]
no_license
import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.*; public class Login extends JFrame implements ActionListener{ JButton b1,b2,b3; JLabel l1; public Login(){ super("Alpha Bank"); JPanel panel = new JPanel(); setSize(700,7...
C#
UTF-8
2,756
2.6875
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Threading; using System.Timers; using DatadogStatsD.Telemetering; using DatadogStatsD.Ticking; using DatadogStatsD.Transport; namespace DatadogStatsD.Metrics { /// <summary> /// <see cref="Gauge"/> measures the value of a metric at a particular time....
PHP
UTF-8
1,083
2.578125
3
[]
no_license
<?php header("Access-Control-Allow-Origin: *"); include "conn.php"; $role = isset($_POST['role']) ? $_POST['role'] : ""; if ($role=='admin' || $role=='user'){ $sql = "SELECT id, email, nama, role, created_at FROM users where role=?"; $stmt = $conn->prepare($sql); $stmt->bind_param('s', $role); $stmt-...
Python
UTF-8
326
3.140625
3
[ "MIT" ]
permissive
class Parking: def __init__(self, link, type_): self.link = link allowed_parking_types = ["parallel", "angle", "reverse-angle", "perpendicular"] if type_ not in allowed_parking_types: raise ValueError("Parking type must be from %s" % (allowed_parking_types)) self.type_ = ...
Markdown
UTF-8
5,938
2.890625
3
[ "MIT", "CC-BY-3.0", "CC-BY-4.0" ]
permissive
--- title: Host a single-page site description: Learn how to host a simple single-page website on the decentralized web using IPFS. --- # Host a single-page website A great way to get to know IPFS is to use it to host a simple, single-page website. Here's a step-by-step guide to doing just that. ::: tip We've put to...
Python
UTF-8
27,937
3
3
[ "MIT" ]
permissive
import drawSvg as draw from matplotlib import cm,colors import pycatflow as pcf import math import copy debug_legend = False class Node: def __init__(self, index, col_index, x, y, size, value, width, label, category): self.x = x self.index = index self.col_index = col_index ...
Java
UTF-8
756
2.046875
2
[]
no_license
package cn.test.servlet; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import cn.test.dao.TourDao; import cn.test.entity.Tour; ...
PHP
UTF-8
2,925
3.125
3
[ "MIT" ]
permissive
<?php /** * The function returns the current ID. * Returns zero if no ID is stored. * @return integer - ID session. */ function GetID() { // Search current ID... if (isset($_COOKIE['CURRENT_ID'])) { $id = (int)$_COOKIE['CURRENT_ID'] + 1; // ...or returns zero } else { $id = 0; } // We ...
Java
UTF-8
231
1.726563
2
[]
no_license
package net.es.oscars.utils.config; public class ConfigException extends Exception { private static final long serialVersionUID = 1; // make -Xlint happy public ConfigException(String msg) { super(msg); } }
Markdown
UTF-8
2,440
2.8125
3
[ "MIT" ]
permissive
<h1 align="center">Savignano-Flex</h1> <div align="center"> Write JavaScript Flex styles and have them served in css. [![NPM Version](https://img.shields.io/npm/v/savignano-flex.svg?style=flat)](https://www.npmjs.com/package/savignano-flex) [![NPM Downloads](https://img.shields.io/npm/dm/savignano-flex.svg?style=fla...
Java
UTF-8
524
1.757813
2
[ "Apache-2.0" ]
permissive
package cloud.antelope.lingmou.di.component; import dagger.Component; import com.jess.arms.di.component.AppComponent; import cloud.antelope.lingmou.di.module.CarDepotSearchDeviceModule; import com.jess.arms.di.scope.FragmentScope; import cloud.antelope.lingmou.mvp.ui.fragment.CarDepotSearchDeviceFragment; @Fragme...
C++
UTF-8
1,754
2.78125
3
[]
no_license
#ifndef PLAYER_CURRENCIES_H #define PLAYER_CURRENCIES_H #include <memory> #include <unordered_map> struct CharacterCurrency { int8 WinStreak; int8 TopWinStreak; float RankPoints; float TopRankPoints; time_t DailyQuestTimer; uint8 DailyQuestAmount; int32 KillingSpree; uint16 Tot...
C++
UTF-8
9,600
2.859375
3
[ "Apache-2.0" ]
permissive
/* Copyright (c) 2017-2018 Origin Quantum Computing. All Right Reserved. Licensed under the Apache License 2.0 ComplexMatrix.h Author: Wangjing Created in 2018-8-31 Classes for matrix caculate */ #ifndef COMPLEXMATRIX_H #define COMPLEXMATRIX_H #include <iostream> #include <complex> #include <exception> #include <v...
Java
UTF-8
1,055
3.578125
4
[]
no_license
package cards; import data.CardNames; import game.Engine; import data.CardDescriptions; // class for the block card and superclass for all the sub block cards public class Block extends Card { // used to check which card wins @Override public int compareTo(Card card) { // if its a throw they lose if(card ins...
PHP
UTF-8
2,488
2.59375
3
[]
no_license
<?php defined('BASEPATH') OR exit('No direct script access allowed'); use Mpdf\Mpdf; class PdfManagement { function __construct() { $this->Mpdf = new \Mpdf\Mpdf(); } public function run ($config = []) { // var_dump($config);exit; // $this->Mpdf->WriteHTML($config['html'],...
Markdown
UTF-8
1,338
2.796875
3
[]
no_license
--- layout: post author: Jeff Watkins title: Augustus Versus the Squirrelly Minions of Satan date: 2004-10-02 categories: - Cats --- Augustus has come a long way since we first moved to Rhinebeck. He started out wearing a harness and leash when we went for our daily walks, but now he gets to roam totally unencumbere...
Go
UTF-8
1,480
2.59375
3
[ "MIT" ]
permissive
package main import ( "io/ioutil" "gopkg.in/yaml.v2" ) type backendConfig map[string]string type configBridge struct { Backend string `yaml:"backend"` // DEPRECATE IN THE FUTURE Backends map[string]backendConfig `yaml:"backends"` PublicKey string `yaml:"public_key"` /...
Python
UTF-8
6,134
3.78125
4
[]
no_license
documents = [ {"type": "passport", "number": "2207 876234", "name": "Leia Organa"}, {"type": "invoice", "number": "11-2", "name": "Anakin Skywalker"}, {"type": "insurance", "number": "10006", "name": "Han Solo"} ] directories = { '1': ['2207 876234', '11-2'], '2': ['10006'], '3': [] } def sho...
Python
UTF-8
11,845
3.03125
3
[]
no_license
import numpy as np from nndl.layers import * import pdb """ This code was originally written for CS 231n at Stanford University (cs231n.stanford.edu). It has been modified in various areas for use in the ECE 239AS class at UCLA. This includes the descriptions of what code to implement as well as some slight potenti...
Java
UTF-8
535
2.828125
3
[ "MIT" ]
permissive
package com.infotamia.weather.pojos.entities; /** * @author Mohammed Al-Ani */ public class MainEntity { private double temp; public MainEntity() { } public double getTemp() { return (temp - 273.15); } public String getFormattedTemp() { return String.format("%dC",(int) getTe...
Python
UTF-8
1,756
2.734375
3
[ "MIT" ]
permissive
#!/usr/bin/env python # -*- coding: utf-8 -*- # test.py import sys import pytest import unittest import json import requests sys.path.append('../src/') from principal import * from usuario import * #url = 'https://proyecto-iv-19.herokuapp.com/status' class TestMethods(unittest.TestCase): with open('../json/dat...
JavaScript
UTF-8
527
2.890625
3
[]
no_license
$(document).ready(function(){ $('#boton1').click(function(){ $("tr:first").css("background", "#9cf"); }); $('#boton2').on('click',function(){ $("td:last").css("background", "#9cf"); }); $('#boton3').on('click',function(){ $("tr:even").css("background", "#9cf"); }); ...
C
UTF-8
2,317
3.34375
3
[]
no_license
#include "reserva.h" int quartos(){ while (1) { int qua=0,cat=0; printf("Escolha a classe do seu quarto:\n\t1 - Luxo\n\t2 - Normal\n\t3 - Simples\n"); scanf("%d",&cat); if(cat==1 || cat==2 || cat==3){ if(cat==1){ pri...
C++
UTF-8
1,432
3.203125
3
[]
no_license
#include <iostream> #include <queue> #define size 8 using namespace std; int arr[size][size] = { 0,1,1,0,0,0,0,0, 1,0,0,1,1,0,0,0, 1,0,0,0,0,1,1,0, 0,1,0,0,0,0,0,1, 0,1,0,0,0,0,0,1, 0,0,1,0,0,0,0,1, 0,0,1,0,0,0,0,1, 0,0,0,1,1,1,1,0 }; int visited[size] = { 0 }; int graph[size]; int front ...
Java
UTF-8
559
1.734375
2
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
package org.apereo.cas.validation; import org.apereo.cas.authentication.principal.Service; import jakarta.servlet.http.HttpServletRequest; /** * This is {@link ServiceTicketValidationAuthorizer}. * * @author Misagh Moayyed * @since 5.2.0 */ @FunctionalInterface public interface ServiceTicketValidationAuthorizer...
Java
UTF-8
2,797
2.109375
2
[]
no_license
package com.imedcare.project.fnbj.cqbj.zzjl.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.imedcare.framework.aspectj.lang.annotation.Excel; import com.imedcare.framework.web.domain.BaseEntity; import java.util.Date; /** * 产前保健转诊记录对象...
Java
UTF-8
545
1.664063
2
[]
no_license
package android.support.v4.app; final class FragmentManagerImpl$2 implements Runnable { FragmentManagerImpl$2(FragmentManagerImpl paramFragmentManagerImpl) {} public final void run() { FragmentManagerImpl localFragmentManagerImpl = this$0; FragmentHostCallback localFragmentHostCallback = this$0.mHos...
PHP
UTF-8
503
2.671875
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace HaploMvc\Template; use HaploMvc\HaploApp; /** * Class HaploTemplateFactory * @package HaploMvc */ class HaploTemplateFactory { /** @var HaploApp */ protected $app; /** * @param HaploApp $app */ public function __construct(HaploApp $app) { $this->app = $app; ...
Python
UTF-8
926
3.296875
3
[]
no_license
from os import path, remove import datetime def random_name(name_base): """ Método para generar un nombre aleatorio. """ suffix = datetime.datetime.now().strftime("%y%m%d_%H%M%S") filename = "_".join([name_base, suffix]) return filename def directory_exists(url_path): """ Método para verificar exi...
C++
UTF-8
6,583
2.84375
3
[ "BSD-2-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-unknown-license-reference", "GPL-3.0-only" ]
permissive
// // pedsim - A microscopic pedestrian simulation system. // Copyright (c) 2003 - 2004 by Christian Gloor // #include "ped_tree.h" #include "ped_agent.h" #include "ped_scene.h" #include <cassert> #include <cstddef> using namespace std; /// Description: set intial values /// \author chgloor /// \date 2012-01-28...
Java
UTF-8
985
2.78125
3
[]
no_license
package net.coljate.graph; import net.coljate.set.impl.TwoSet; /** * * @author Ollie */ public interface MutableUndirectedGraph<V, E> extends MutableGraph<V, E>, UndirectedGraph<V, E> { @Override @Deprecated default boolean add(final Relationship<V, E> relationship) { return relationsh...
Python
UTF-8
1,767
3.6875
4
[]
no_license
import re def func(a): while True: #这个循环的作用就是用来四则运算的 if '*' in a: c = a.split('*') if '/' in c[0]: a = div(a) else: a = mul(a) elif '/' in a: a = div(a) else: a = add(a) return a def mul(a...
C++
UTF-8
1,209
3.546875
4
[]
no_license
/*Programma per l'inserimento, in una lista, di tre elementi, visualizzazione degli elementi, e rimozione del secondo elemento*/ //Relazione con i puntatori , elementi di tipo intero #include <stdio.h> #include <stdlib.h> //no operatori , no classi ,no tipo template typedef struct elemento_lista{ /* Definizione ...
C++
UTF-8
2,042
2.765625
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Character.cpp :+: :+: :+: ...
TypeScript
UTF-8
3,363
3.578125
4
[]
no_license
interface vehiclesToParkType { slot: number, vehicleNumber: string } let vehiclesToPark: vehiclesToParkType[] = []; let availableParkingSlots: number[] = []; let lotSize = 0; /** * create_parking_lot command * @param howManyLots no. of slots in the parking */ export const create_parking_lot = async (howMan...
C++
UTF-8
763
3.046875
3
[]
no_license
/* UVa 10409 - Die Game To build using Visual Studio 2008: cl -EHsc -O2 UVa_10409_Die_Game.cpp */ #include <cstdio> using namespace std; int main() { while (true) { int n; scanf("%d", &n); if (!n) break; int top = 1, north = 2, south = 5, east = 4, west = 3; while (n--) { ch...
PHP
UTF-8
205
3.328125
3
[]
no_license
<?php $a = 'hello world'; /* a comment */ echo 'something'; $b = 3; $c = 4; print $a; /* with indentation */ $a = 4; $b = 2; $c = 1; print $a; echo $a; ?>
Markdown
UTF-8
27,320
3.46875
3
[ "MIT" ]
permissive
--- layout: post title: 沉默的大多数-王小波 date: 2017-12-03 22:56:20 +0800 categories: 生活 tags: 人生 keywords: 沉默的大多数 王小波 description: 王小波《沉默的大多数》 --- 君特·格拉斯在《铁皮鼓》里,写了一个不肯长大的人。小奥斯卡发现周围的世界太过荒诞,就暗下决心要永远做小孩子。在冥冥之中,有一种力量成全了他的决心,所以他就成了个侏儒。这个故事太过神奇,但很有意思。人要永远做小孩子虽办不到,但想要保持沉默是能办到的。 在我周围,像我这种性格的人特多──在公众场合什么都不说,到了私下里则妙语连珠,换言之,对信得过的人什么都...
Java
UTF-8
274
2.8125
3
[]
no_license
public class Zad6 { public static void main(String[] args) { for (int i = 0; i <= 100000; i++){ if (i%3==0 && i%5==0 && i%7==0){ System.out.println("i = " + i + " i jest podzielne przez 3, 5 i 7"); } } } }
Python
UTF-8
2,502
3.28125
3
[]
no_license
''' AUTHORS: Dinindu Thilakarathna [dininduwm@gmail.com] ''' from csv import writer from os import walk import json import datetime, pytz # path for the events event_path = 'events/' csv_file = 'data/data.csv' # event list event_list = [] # headers of the data headers = ["date","time","description","l...
Java
UTF-8
528
1.898438
2
[]
no_license
package com.kaishengit.mapper; import com.kaishengit.pojo.User; import java.util.List; import java.util.Map; /** * Created by liu on 2017/3/17. */ public interface UserMapper { User findByUserName(String username); Long findAll(); Long findAllByQueryParam(Map<String, Object> queryParam); List<Us...
Markdown
UTF-8
2,365
3.296875
3
[ "Apache-2.0", "MIT" ]
permissive
# Advanced Example There will be sections of the wiki to go into these in detail, but this is an example of a table with a custom row, filters, search, custom view: ```php <?php namespace App\Http\Livewire; use App\Models\User; use Illuminate\Container\Container; use Illuminate\Database\Eloquent\Builder; use Luckyk...
Go
UTF-8
824
2.65625
3
[]
no_license
package main import ( "context" "io" "log" "time" pb "github.com/wagaru/microservice/streaming-server/gen/pb-go/helloworld" "google.golang.org/grpc" ) const ( address = "localhost:50052" defaultName = "world" ) func main() { conn, err := grpc.Dial(address, grpc.WithInsecure(), grpc.WithBlock()) if er...
Java
UTF-8
2,754
3.859375
4
[]
no_license
package com.concurrent; import java.util.Arrays; /** * @author hujing * @date Create in 2020/9/23 * 大顶堆实现 **/ public class HeapDemo { public static void main(String[] args) { Heap heap = new Heap(10); heap.add(5); heap.add(3); heap.add(4); heap.add(7); heap.add...
Shell
UTF-8
549
3.453125
3
[ "MIT" ]
permissive
#!/bin/bash # Copyright (C) 2015 Jeffrey Meyers # This program is released under the "MIT License". # Please see the file COPYING in the source # distribution of this software for license terms. # ./add_user.sh <username> <password> db=$1 db_user=$2 username=$3 password=$4 pass_hash=$(echo -n ${password} | sha256su...
Python
UTF-8
3,071
2.5625
3
[]
no_license
import cv2 import numpy as np import tensorflow as tf import tensorflow.keras as keras import matplotlib.pyplot as plt model = keras.models.load_model('./models/face_net.h5') face_cascade = cv2.CascadeClassifier('./haarcascade_frontalface_default.xml') font = cv2.FONT_HERSHEY_SIMPLEX fontScale ...
Python
UTF-8
453
2.625
3
[]
no_license
import os import glob # response = input("This will remove all log files.... Continue? y/n\n") # if response == 'y': # exp1 = glob.glob('../logs/exp1/*') # exp2 = glob.glob('../logs/exp2/*') # for f1 in exp1: # os.remove(f1) # for f2 in exp2: # os.remove(f2) # else: # quit() exp1 ...
Python
UTF-8
7,513
3.1875
3
[ "Apache-2.0" ]
permissive
""" CNN Model: Handles anything related to the Convolutional Neural Network """ import torch import numpy as np # import PyTorch Functionalities import torch.nn.functional as F import torch.nn as nn # import own modules import loghub ''' //////////////////////////////////////////////////////////////////////////////...
Java
UTF-8
1,411
2.28125
2
[]
no_license
package ipstore.aspect.change; import ipstore.entity.*; /** * Here will be javadoc * * @author karlovsky * @since 2.5.0, 4/8/13 */ public enum ChangeType { NONE, // 0 ACCOUNTS(Account.class, AccountChangeField.class, "/acc...
Markdown
UTF-8
1,818
2.578125
3
[ "Apache-2.0" ]
permissive
[clikt](../index.md) / [com.github.ajalt.clikt.parameters.options](index.md) / [transformAll](./transform-all.md) # transformAll `fun <AllT, EachT : `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, ValueT> `[`NullableOption`](-nullable-option.md)`<`[`EachT`](transform-all.md#EachT)`, `[...
Java
UTF-8
10,442
2.328125
2
[]
no_license
package noppes.mpm.client.model.part.legs; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; import noppes.mpm.client.model.ModelPlaneRenderer; import org.lwjgl.opengl.GL11; public class ModelNagaLeg...
Python
UTF-8
1,257
2.765625
3
[ "MIT" ]
permissive
import os import sys import os.path dir_path = os.path.dirname(os.path.realpath(__file__)) def write_file_ecg_len(filepath): l=0 fopen = open(filepath) print(fopen.name) for line in fopen: l+=1 print(l) fw = open(filepath+".len",'w+') fw.write(str(l)) fopen.close() fw.close...
Python
UTF-8
2,479
3.5
4
[]
no_license
''' Author: Qiming Chen Date Apr 30 2017 Description: A CUDA version to calculate the Mandelbrot set Usage: 1. setup cuda environment 2. python mandelbrot_gpu.py ''' from numba import cuda import numpy as np from pylab import imshow, show @cuda.jit(device=True) def mandel(x, y, max_iters): ''' Given the real ...
C++
UTF-8
513
2.71875
3
[]
no_license
#include <iostream> #include <string> #include <fstream> #include <vector> using namespace std; #include "school.h" int main() { ifstream ifs; string name, nick, yr_s; int yr; vector<School> schools; School sch; ifs.open("schoolinfo.csv"); char c = ifs.peek(); while(c != EOF) { getline(ifs, name...
Java
UTF-8
1,309
2.671875
3
[]
no_license
package com.csis3275.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "jobs_mavericks") public class Jobs_Mavericks { @Id @GeneratedValue(strategy = Generati...
JavaScript
UTF-8
4,749
2.6875
3
[ "MIT" ]
permissive
import { statuses, types } from './constants'; import { getDefaults, resetDefaults, setDefaults } from './defaults'; import QueueItem from './QueueItem'; import { isObject } from './utils'; class Qonductor { constructor(options = {}) { const { autoStart: defaultAutoStart, keepHistory: ...
Java
UTF-8
789
2.03125
2
[]
no_license
package ssm.testService; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import ssm.dao.ContrcatDao; import ssm.domain.Contract; import ssm.domain.SelectInfo; import ssm.service.ContrcatService; import ssm.service.impl.ContrcatServiceImpl; import java.util.List; public class Con...
Java
UHC
1,058
3.234375
3
[]
no_license
package jv_0910; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class eggMonster { public static void main(String[] args) { String morningEgg; String lunchEgg; String dinnerEgg; try { BufferedReader keybd = new BufferedReader(new Input...
PHP
UTF-8
4,406
3.25
3
[]
no_license
<?php abstract class AbsAPI { /** * Metodo para retornar o nome da API usado na requisição. * @return string nome da api para requisição. */ public abstract function getAPIName(); /** * Comando GET para listar os arquivos do banco de dados.<br> * Exemplo de uma requisição:<br> ...
PHP
UTF-8
320
2.609375
3
[]
no_license
<?php namespace app\core; /** * Class Controller * @package app\core */ class Controller { /** * @param $view * @param array $params * @return string|string[] */ public function render($view, $params = []) { return Application::$app->view->renderView($view, $params); } }
TypeScript
UTF-8
3,890
2.984375
3
[ "MIT" ]
permissive
import { Key } from '../interface'; /** * 获取有效的scrollTop值 * Safari的缓动效果会获得负值的scrollTop */ export function getValidScrollTop(scrollTop: number, scrollRange: number) { return scrollTop < 0 ? 0 : scrollTop > scrollRange ? scrollRange : scrollTop; } /** * 获取滚动比例 * 视口已滚动距离 / 总可滚动距离 */ export function getScrollPerc...
Markdown
UTF-8
12,811
3.046875
3
[]
no_license
--- order_index: null title: Conditional Probabilities template_type: popup uid: efbff85df56391b7be2c39e44adee68d parent_uid: 9ca6b310dc93095c9ac0f0e5f95e6930 technical_location: >- https://ocw.mit.edu/resources/res-6-012-introduction-to-probability-spring-2018/part-i-the-fundamentals/conditional-probabilities short_...