language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
C# | UTF-8 | 1,356 | 2.96875 | 3 | [] | no_license | namespace Northwind.Common.Infrastructure.Validation
{
using System;
public class Validator
{
public static void ThrowIfNull(object obj, string message = "")
{
if (obj == null)
{
if (message == string.Empty)
{
mess... |
JavaScript | UTF-8 | 2,112 | 2.703125 | 3 | [] | no_license | var testCase = require('nodeunit').testCase;
module.exports = testCase({
setUp: function(callback){
var rps = require('../src/rps');
this.rps = new rps.RPS();
callback();
},
tearDown: function(callback){
callback();
},
"TC 1 - Player() - constructor": test... |
SQL | UTF-8 | 147 | 2.609375 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS GetAll;
DELIMITER //
CREATE PROCEDURE GetAll()
BEGIN
SELECT * FROM user u, project p WHERE u.id = p.id;
END
//
DELIMITER ; |
Markdown | UTF-8 | 2,618 | 3.0625 | 3 | [] | no_license | ---
description: Haiku Animator integrates with the tools you already love. Draw in Sketch, bring to life in Animator. Let's start by covering how to get your Sketch design into Animator.
---
# Sketch and Other Image Assets
Animator doesn't _yet_ provide its own drawing tools. Though we plan to add some in the future... |
Markdown | UTF-8 | 2,587 | 3.65625 | 4 | [] | no_license | ### LESS
>LESS是一种动态样式语言,属于CSS预处理语言的一种,它使用类似CSS的语法,为CSS赋予了动态语言的特性,如变量、继承、运算、函数等,更方便CSS的编写和维护。
#### 变量
```less
@red: #E10602;
@blue: #2932E1;
@yellow: #CAA066;
.name{
color: @yellow;
.first{
color: @red;
}
.second{
color: @blue;
}
}
```
编译之后为:
```css
.name {
color: #CAA066;
}
.nam... |
Java | UTF-8 | 1,137 | 1.960938 | 2 | [] | no_license | package com.example.nychighschools.di.scores;
import android.arch.lifecycle.ViewModelProviders;
import com.example.nychighschools.di.app.Repository;
import com.example.nychighschools.repo.DataSource;
import com.example.nychighschools.scores.DetailsActivity;
import com.example.nychighschools.scores.DetailsViewModel;
im... |
Markdown | UTF-8 | 5,643 | 2.90625 | 3 | [] | no_license | # Connecting to an LDAP Directory
Lightweight Directory Access Protocol (LDAP) servers are common user stores for Liferay DXP. You can configure LDAP at the system scope in System Settings or at the instance scope in Instance settings. Users can be imported from or exported to LDAP.
## Adding a New LDAP Server Connec... |
Java | UTF-8 | 1,503 | 3 | 3 | [] | no_license | package repository;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import model.Product;
import util.EntityManagerUtil;
public class ProductRepository {
private EntityManager em;
public List<Product> findAll() {
em = EntityManagerUtil.getEntityManager();
// re... |
Java | UTF-8 | 2,735 | 2.34375 | 2 | [] | no_license | package dalcoms.pub.connect3blocks;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.andengine.engine.handler.timer.ITimerCallback;
import org.andengine.engine.handler.timer.TimerHandler;
import org.andengine.extension.physics.box2d.PhysicsWorld;
import android.util.Log;
import ... |
Markdown | UTF-8 | 1,521 | 2.640625 | 3 | [] | no_license | # Live Updating / Streams / Websockets / Push Models
---
> stub
---
How does this work?
- rooms created per-user (like Emailbox)
- is Firebase overkill? (yeah)
- Just need to be notified of new models, changes, and to know the last __version, corret?
This will be tested/used on the Inbox PageView at first. It is a... |
Swift | UTF-8 | 1,549 | 2.859375 | 3 | [
"MIT"
] | permissive | //
// NSLayoutConstraintSearch.swift
// UIKitSwagger
//
// Created by Sam Odom on 9/25/14.
// Copyright (c) 2014 Sam Odom. All rights reserved.
//
import UIKit
internal extension NSLayoutConstraint {
internal func hasItem(item: AnyObject) -> Bool {
return firstItem.isEqual(item) || (secondItem != nil... |
Shell | UTF-8 | 4,378 | 3.734375 | 4 | [] | no_license | #!/bin/sh
# Usage: sh jabbaPerfTest.sh {Experiment Number List} {Request Per Second List}
# Example : sh jabbaPerfTest.sh batch 5,10,15 100,200,300,350,400
# Example : sh jabbaPerfTest.sh single 1,3,6,9 100,200,300,350,400
# Example : sh jabbaPerfTest.sh batch 5,10,15 100,200,300,350,400,800 mixed
if [ -f jabbaPer... |
Java | UTF-8 | 15,649 | 1.742188 | 2 | [] | no_license | package com.tecmanic.toketani.activity;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import andro... |
Python | UTF-8 | 1,344 | 2.5625 | 3 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | # Copyright 2023 The Google Earth Engine Community Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
Java | UTF-8 | 4,847 | 2.953125 | 3 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | package io.opensphere.server.util;
import java.awt.GridBagConstraints;
import java.awt.Insets;
/**
* Builder class for {@link GridBagConstraints}.
*/
public class GridBagConstraintsBuilder
{
/** The x grid position. */
private int myGridx = GridBagConstraints.RELATIVE;
/** The y grid position. */
p... |
C++ | UTF-8 | 1,521 | 2.59375 | 3 | [
"MIT",
"BSL-1.0",
"BSD-2-Clause"
] | permissive | /*
* Copyright (c) 2019, 2020, 2021 SiKol Ltd.
* Distributed under the Boost Software License, Version 1.0.
*/
/*
* Configuration file parser.
*/
#ifndef IVY_CONFIG_LEX_HXX_INCLUDED
#define IVY_CONFIG_LEX_HXX_INCLUDED
#include <any>
#include <cstdint>
#include <optional>
#include <ivy/string.hx... |
C++ | UTF-8 | 1,558 | 3.375 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void binary(int num){
for(int i = 31; i >= 0; i--){
cout << ((num & (1 << i)) == 0 ? 0: 1) << " ";
}
cout << endl;
}
int length_ones(int num){
int len = 0;
for(int i = 31; i >= 0; i--){
int ... |
Java | UTF-8 | 11,050 | 1.796875 | 2 | [] | no_license | package black.kr.hs.mirim.sosimtapaxml;
import android.Manifest;
import android.content.CursorLoader;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.location.Address;
import android.location.Geocoder;
import android.n... |
Java | UTF-8 | 2,353 | 2.3125 | 2 | [] | no_license | package com.example.nathan.studenthub.presenter;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.vie... |
Java | UTF-8 | 2,145 | 2.171875 | 2 | [] | no_license | package com.example.waimai2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;... |
Python | UTF-8 | 233 | 3.421875 | 3 | [] | no_license | import random
print("number guessing game" )
number=int(input("enter a number between 1 and 9"))
if(number<12):
print("No admission")
elif(number==12):
print("adimssion granted")
else:
print("advance level") |
C | UTF-8 | 594 | 3.46875 | 3 | [] | no_license |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
//pid_t waitpid(pid_t pid, int *wstatus, int options);
int main()
{
printf("Hello all\n");
pid_t child_pid = fork();
// If fork returns a positive value for child_id then I'm (the process) the parent
if ( child_pid > 0 )
{
int status;
wai... |
Python | UTF-8 | 3,010 | 2.59375 | 3 | [] | no_license | import logging
import azure.functions as func
import sys
import json
import wolframalpha
import configparser
from azure.servicebus import ServiceBusClient, ServiceBusMessage
config = configparser.ConfigParser()
config.read('./config.ini')
if "service_bus_client" not in config:
raise RuntimeError("config.ini fi... |
Java | UTF-8 | 19,521 | 2.21875 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Presentation;
import DAL.*;
import DTO.*;
import BLL.*;
import java.awt.Color;
import java.awt.Frame;
import java.awt.event.Ke... |
JavaScript | UTF-8 | 540 | 2.921875 | 3 | [] | no_license | var fileInput = document.getElementById('file'),
previewImg = document.getElementById('bigImg');
fileInput.addEventListener('change', function () {
var file = this.files[0];
var reader = new FileReader();
// 监听reader对象的的onload事件,当图片加载完成时,把base64编码賦值给预览图片
reader.addEventListener("load", function () {... |
Python | UTF-8 | 817 | 3.734375 | 4 | [] | no_license | '''
For this problem, use the same data set as in the previous problem.
Your task now is to run the greedy algorithm that schedules jobs (optimally) in decreasing
order of the ratio (weight/length).
In this algorithm, it does not matter how you break ties.
You should report the sum of weighted completion times of t... |
C++ | UTF-8 | 1,518 | 3.0625 | 3 | [] | no_license | #ifndef GRAPHICS_H
#define GRAPHICS_H
#include "../header/sprite.h"
/*
Graphics Class
Holds all information dealing with graphics for the game
*/
#include <SDL.h>
#include <map>
#include <string>
struct SDL_Window;
struct SDL_Renderer;
class Graphics {
public:
Graphics();
~Graphics();
/* SDL_Surface* loadImage
... |
JavaScript | UTF-8 | 9,571 | 2.546875 | 3 | [] | no_license | // -------------------------------------------------------------------------------------------
// Registry module.
// -Implements API calls over registry services.
//
// list = {
// 'IP:PORT': {
// 'service1': { ... },
// 'service2': { ... }
// },
// 'IP2:PORT': { ... }
// }... |
JavaScript | UTF-8 | 996 | 5.21875 | 5 | [] | no_license | // it restructures a function so it takes one argument,
//then returns another function that takes the next argument, and so on.
//Un-curried function
function unCurried(x, y) {
return x + y;
}
//Curried function
function curried(x) {
return function(y) {
return x + y;
}
}
//Alternative... |
Markdown | UTF-8 | 5,753 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | ---
title: Hello World Explained
url: tutorials/develop/hello-world-explained
layout: subpage
---
Now that we've installed the tools necessary to create and preview the default PhoneGap application, it's worth stopping to take a moment to look through the default application and point out some important details.
## `... |
Markdown | UTF-8 | 1,454 | 3.578125 | 4 | [
"MIT"
] | permissive | # 39. Combination Sum
[Original Page](https://leetcode.com/problems/combination-sum/)
Given a set of candidate numbers (**_C_**) and a target number (**_T_**), find all unique combinations in **_C_** where the candidate numbers sums to **_T_**.
The **same** repeated number may be chosen from **_C_** unlimited number... |
Markdown | UTF-8 | 1,608 | 3.453125 | 3 | [] | no_license | ---
title: Finalize login
---
# Finalize login endpoint
Now that we have signup in place, we can finalize our login endpoint!
Our current login endpoint is using hardcoded userId to generate the `jwt` token and it isn't really looking for users on a table. We are going to have to change it into something like this:
... |
Markdown | UTF-8 | 6,371 | 2.890625 | 3 | [] | no_license | ---
title: 第一个自己独立开发并发布的软件
date: 2014-09-09 10:23:38
categories: Before 2016
tags: Selenium
---
       这篇博文也是产于14年。[点此查看原文][1]
       当时比较有空,自己鼓捣出了一个桌面软件,超鸡冻!现在再看觉得有点杀鸡用牛刀了,同样的功能也许curl一下简单方便又高效。而且连API文档都不知道该怎么使用,但是当时做这个东西的热情和执着,还是值得表扬的哈哈哈哈哈哈哈哈。
----------
     ... |
Java | UTF-8 | 3,741 | 1.734375 | 2 | [] | no_license | package com.ghotel.oss.console.modules.index.service.impl;
import com.ghotel.oss.console.core.logging.dao.GocNoticeRepository;
import com.ghotel.oss.console.core.utils.GocBeanUtil;
import com.ghotel.oss.console.modules.admin.bean.PaginationResult;
import com.ghotel.oss.console.modules.index.bean.NoticeSearchCrite... |
C# | UTF-8 | 1,884 | 2.96875 | 3 | [
"MIT"
] | permissive | using Microsoft.AspNetCore.Http;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
namespace CommonUtil.Helpers
{
public sealed class CurrentUser : ICurrentUser
{
private readonly HttpContext _httpContext;
public CurrentUser(IHttpContextAccessor httpContextAcc... |
Python | UTF-8 | 1,254 | 3.203125 | 3 | [] | no_license | class Solution:
def gameOfLife(self, board: List[List[int]]) -> None:
m = len(board)
n = len(board[0])
dir = [[0, -1], [-1, -1], [-1, 0], [-1, 1], [0, 1], [1, 1], [1, 0], [1, -1]]
for i in range(m):
for j in range(n):
lnc = 0
for cord in ... |
Java | UTF-8 | 179 | 2.203125 | 2 | [] | no_license | package j8c.Exceptions;
public class ParametersNotSetException extends Exception {
public ParametersNotSetException() {
super("You need to set the parameters");
}
}
|
Markdown | UTF-8 | 1,026 | 3.671875 | 4 | [] | no_license | # 单子风格
## 约束
- 有一个可以修改数据的抽象
- 抽象提供三个操作:1.封装数据;2.将若干函数逐个绑定,建立函数调用顺序;3.打开封装,查看数据的最终结果
## 注解
单子风格是顺序调用函数的另一种变体,不同于其他传统的函数组合方式,我们建立了在**值与函数之间充当胶水的抽象方式**——“单子”。它包括两个主要操作:
1. 封装操作,输入一个简单值并返回一个胶水抽象的实例
2. 绑定操作,将封装的数据传递给函数
```python
class WFTHeOne:
def __init__(self, v):
self._value = v
def bind(self, fun... |
Markdown | UTF-8 | 6,274 | 3.09375 | 3 | [] | no_license |
Syntax: `f ': x` ([each-parallel](adverbs/#each-parallel))
Syntax: `f peach x` (binary, uniform)
Syntax: `.[g;] peach y` (binary, uniform)
Where
- `f` is a unary function and `x` is a list of arguments
- `g` is a binary function and `y` is a list of argument pairs
`f peach`, or the derivative `f':`, is used... |
Java | UTF-8 | 2,324 | 2.0625 | 2 | [] | no_license | //package com.wonana.restapi.config;
//
//import com.wonana.restapi.accounts.AccountService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.authentication.AuthenticationManager;
//import org.springfram... |
Java | UTF-8 | 3,947 | 2.046875 | 2 | [] | no_license | package net.tacs.game.services.impl;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.tacs.game.model.opentopodata.auth.AuthTokenResponse;
import net.tacs.game.model.opentopodata.auth.AuthUserResponse;
import net.tacs.game.services.SecurityProviderService;
... |
Markdown | UTF-8 | 1,133 | 3.5 | 4 | [] | no_license | # 09.图像渲染

## 解法一:DFS
```java
class Solution {
int[] dx = {1, 0, 0, -1};
int[] dy = {0, 1, -1, 0};
public int[][] floodFill(int[][] image, int sr, int sc, int newColor) {
... |
C++ | UTF-8 | 6,488 | 2.71875 | 3 | [] | no_license | /*
* File: StateInfoTimeStamp.cpp
* Author: essam
*
* Created on June 18, 2015, 1:50 PM
*/
#include "StateInfoTimeStamp.h"
#include "AViterbi.h"
#include <string>
#include<iostream>
#include<stdlib.h>
StateInfoTimeStamp::StateInfoTimeStamp(double p, std::string v_path, double v_prob, TransList *list) {
t... |
C | UTF-8 | 3,435 | 2.828125 | 3 | [] | no_license | #include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <asm/termios.h>
#include <unistd.h>
#include "types.h"
#include "hardware.h"
// Global variable for holding file descriptor to talk to UART0 for MIDI communications:
int uart0_fd = -1;
// Default UART0 device na... |
PHP | UTF-8 | 1,545 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Terminus;
class Fixtures {
static $fixtures_dir = 'tests/fixtures';
static $current_fixture;
/**
* This creates a "phony" data blob that we can use for unit testing.
*/
static function put($args, $data) {
$key = Fixtures::getArgsKey($args);
if (!defined('CLI_ROOT')) {
$cli... |
C# | UTF-8 | 1,660 | 3.484375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarDelegate
{
class Program
{
static void Main(string[] args)
{
//First, make a Car object
Car c1 = new Car("SlugBug", 100, 10);
//... |
Go | UTF-8 | 1,684 | 3.390625 | 3 | [] | no_license | package lru
import "container/list"
type Cache struct {
//允许使用的最大内存
maxBytes int
//当前已使用的内存
nbytes int
ll *list.List
cache map[interface{}]*list.Element
OnEvicted func(key string, value Value)
}
type entry struct {
key string
value Value
}
type Value interface {
Len() int
}
func New(maxBytes int,onEvic... |
Go | UTF-8 | 450 | 2.6875 | 3 | [] | no_license | package api
import (
"fmt"
"net/http"
)
// Index ...
func Index(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
auth := r.Header["X-Auth-Token"][0]
user := r.Header["X-User-Id"][0]
service := r.Header["X-Service"][0]
// bytes, _ := json.Marshal(r.Header)
returnIn... |
SQL | UTF-8 | 469 | 3.1875 | 3 | [] | no_license | CREATE TABLE `comments` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`type` varchar(10) NOT NULL,
`type_id` int(10) unsigned NOT NULL,
`message` text NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `type,type... |
Java | UTF-8 | 595 | 1.734375 | 2 | [
"MIT"
] | permissive | package com.jkcoxson.camelmod;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.... |
Java | UTF-8 | 382 | 2.09375 | 2 | [] | no_license | package repository;
import model.Message;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
/**
* Created by Ольга on 04.08.2014.
*/
public interface MessageRepository extends CrudRepository<Message, Long> {
@Query("select m from Message m order b... |
C++ | UTF-8 | 1,078 | 2.9375 | 3 | [] | no_license | #ifndef PLOT_H
#define PLOT_H
#include <qwt_plot.h>
#include <qwt_plot_grid.h>
#include <QWidget>
/*! \class Plot
* \brief 2D display widget
*
* This class inherits QwtPlot and allows to display a two dimensionel graph. \n
* It is used for a 2D display of the drone's position.
*
*/
class Plot : public QwtPlot... |
Java | UTF-8 | 437 | 3.09375 | 3 | [] | no_license | /**
* A node to be used in a linked list
* 2020-02-14
* Author: Elliot Duchek
*/
public class Node {
String data;
Node next;
public Node(String data, Node next) {
this.data = data;
this.next = next;
}
public Node(String data) {
this.data = data;
this.next = null... |
Java | UTF-8 | 1,575 | 3.546875 | 4 | [] | no_license | package demo10;
import java.util.Random;
import java.util.concurrent.*;
/**
* callable和runable区别是可以返回线程执行的结果
* Created by Administrator on 2016/7/4 0004.
*/
public class FutureAndCallableTest {
public static void main(String[] args) {
//通过executor提交任务
ExecutorService executorService = Executors... |
Java | UTF-8 | 2,302 | 2.140625 | 2 | [] | no_license | package pages;
import actors.User;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.Select;
import selenium.WebDriverWrapper;
import utils.Log4Test;
import java.util.concur... |
TypeScript | ISO-8859-1 | 12,388 | 2.828125 | 3 | [] | no_license | ///<reference path='Haendler.ts' />
namespace Haendler {
document.addEventListener("DOMContentLoaded", init);
let trees: string[] = ["Nordmanntanne", "Rotfichte", "Fichte", "Gucci-Fichte"];
let treesPrice: number[] = [34.99, 29.99, 19.99, 349.99];
let balls: string[] = ["Kugel rot", "Kuge... |
PHP | UTF-8 | 2,744 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php include '../dataConnections.php';
session_start();
if(!isset($_SESSION['principal'])){
echo "<script language='javascript'>window.location='../index.php';</script>";
}
$currentPage = 'other';
include 'header.php';
$data = array();
$yands = '2/4 Sem-1';
$Branch = 'CSE';
$sql = "SELECT student_ma... |
Java | UTF-8 | 1,227 | 2.4375 | 2 | [] | no_license | package com.shridhar.actions;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.shridhar.dao.CommonDAO;
public class FetchRights {
private Role role = new Role();
private... |
PHP | UTF-8 | 596 | 2.734375 | 3 | [] | no_license | <?php
namespace Botlife\Entity\Bar\Dao;
class ItemPrice
{
public function getPrice($itemId)
{
$response = \DataGetter::getData(
'file-content', 'http://rscript.org/lookup.php?type=ge&search=' . $itemId
);
$response = explode("\n", $response);
foreach ($response as... |
C++ | UTF-8 | 3,807 | 3.953125 | 4 | [] | no_license |
#include <iostream>
#include<vector>
#include <algorithm>
using namespace std;
class Observer;
/**
* Subject interface is implemented by all concrete implementation of Subject
* class.These methods will accept Observer instance for register,removal and
* notification
*/
class Subject{
public:
virtu... |
Markdown | UTF-8 | 795 | 2.65625 | 3 | [] | no_license | # _{Andres Garcia}_
#### _{Portfolio}, {V 1.0.0}_
#### By _**{Developed by Andres Garcia}**_
## Description
_{This is my personal portfolio, here you will find any relevant information to me, including my work experience, background information and much more. }_
## Setup/Installation Requirements
* _Computer_
* _... |
Java | UTF-8 | 1,638 | 2.484375 | 2 | [] | no_license | package cz.kinst.jakub.weather.android.adapter;
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.List;
import butterknife.B... |
Java | UTF-8 | 777 | 3.046875 | 3 | [] | no_license | package com.jhlc.second.second.saunfa;
/**
* Created by licheng on 8/1/16.
*/
public class CountNonDivisible {
public static void main(String[] args) {
int[] A = {3,1,2,0,6};
for (int i = 0; i < A.length; i++) {
System.out.print(solution(A)[i] + " ");
}
}
//66分 https:... |
C | UTF-8 | 490 | 2.671875 | 3 | [] | no_license | #include<stdlib.h>
#include<stdio.h>
#define debug(...) printf(__VA_ARGS__)
#define debug2(x...) printf(x)
#define fun(n) printf("test"#n"=%d",token##n)
#define token9 9
static inline int func(int x,int y){
return x+y;
//printf("%s\n",__func__);
}
int main(){
func(1,2);
debug("%s\n",__FILE__);
de... |
Java | UTF-8 | 927 | 2.578125 | 3 | [] | no_license | package me.Andrew.IslandExtras.IslandBorder;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import java.util.ArrayList;
/**
* Created by Andrew on 04/06/2017.
*/
public class ChatHandler {
private String prefix = cc("&a[Prefix] ");
public void sendHelp(Player p){
ArrayList help = ne... |
Markdown | UTF-8 | 1,794 | 3.109375 | 3 | [] | no_license | # Bird Speak
This app allows users to read the latest 25 tweets, up to 7 days ago, from any twitter handle.
### App Design Choices
For user authentication, Devise is a no brainer. It's the goto for quick and reliable authentication. For styling, I chose Tachyons because it is also quick, lightweight and prevents me f... |
PHP | UTF-8 | 4,741 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use Auth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\User;
use Illuminate\Support\Facades\Mail;
use Illuminate\Mail\Mailable;
use Malahierba\ChileRut\Facades\ChileRut;
/**
* Es el controlador del administrador del sistema.
*
*/
class UserCon... |
JavaScript | UTF-8 | 3,883 | 2.625 | 3 | [] | no_license |
angular.module("mainModule", [])
.controller("mainController", function($scope) {
$scope.firstName = "John",
$scope.lastName = "Doe";
$scope.updateName = function(firstName, lastName) {
$scope.firstName = firstName;
$scope.lastName = lastName;
};
})
// 1 - Shared scope (scope : false)
.directive("... |
Ruby | UTF-8 | 491 | 3.296875 | 3 | [] | no_license | def change_possibilities_bottom_up(amount, denominations)
ways_of_doing_n_cents = [0] * (amount + 1)
ways_of_doing_n_cents[0] = 1
for coin in denominations
(coin..amount).each do |num|
higher_amount_remainder = num - coin
ways_of_doing_n_cents[num] += ways_of_doing_n_cents[higher_amount_remainder... |
Java | UHC | 3,138 | 3.015625 | 3 | [] | no_license | package swExpert_5653_ٱ⼼;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;
public class Solution {
static int N, M, K;
static int data[] = new i... |
PHP | UTF-8 | 2,607 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the EnabledChecker package
*
* (c) InnovationGroup
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace FivePercent\Component\EnabledChecker\Checker;
use FivePercent\Component\EnabledChecker\... |
Python | UTF-8 | 114 | 3.109375 | 3 | [] | no_license | ven=int(input())
for g in range(2,ven):
if ven%g==0:
print("yes")
break
else:
print("no")
|
Java | UTF-8 | 1,056 | 2.234375 | 2 | [] | no_license | package cn.wtu.broadcast.parent.vo.cmd;
import java.io.Serializable;
/**
* RDS设置频点VO
* @author yinjie
*
*/
public class RdsFrequencyPointVo implements Serializable{
private static final long serialVersionUID = 1L;
//频点序号
private Integer rdsPointSequence;
//频点优先级
private Integer rdsPriority;
//频率
pr... |
Java | UTF-8 | 498 | 1.664063 | 2 | [] | no_license | package com.iuh.ABCStore.services;
import java.util.HashMap;
import javax.transaction.Transactional;
import org.springframework.stereotype.Service;
import com.iuh.ABCStore.model.GioHang;
import com.iuh.ABCStore.model.NguoiDung;
@Service
@Transactional
public interface IGioHangService {
boolean thanhToanPayP... |
C++ | UTF-8 | 1,421 | 2.65625 | 3 | [] | no_license | #ifndef FAS_SERIALIZATION_COMMON_DESER_AD_INTEGER_HPP
#define FAS_SERIALIZATION_COMMON_DESER_AD_INTEGER_HPP
namespace fas{ namespace serialization{ namespace common{ namespace deser{
/*template<typename TgParseNumber>*/
struct ad_integer
{
//typedef TgParseNumber _number_;
template<typename T, typename J, type... |
Markdown | UTF-8 | 667 | 2.609375 | 3 | [] | no_license | # High School Contract Tracing
Ontario Engineering Competition 2021 Entry
## About
- This program was built with the intention of contact tracing a hypothetical virus in a high school
- The contact tracing algorithm leveraged a weighted directed graph to track possible transitions on the limited data we were given (s... |
Shell | UTF-8 | 1,786 | 3.6875 | 4 | [
"BSD-3-Clause"
] | permissive | #!/bin/bash
#
# CoRM: Compactable Remote Memory over RDMA
#
# Help functions to measure latency of CoRM
#
# Copyright (c) 2020-2021 ETH-Zurich. All rights reserved.
#
# Author(s): Konstantin Taranov <konstantin.tar... |
C++ | UTF-8 | 1,218 | 3.375 | 3 | [] | no_license | #include <unordered_map>
#include <vector>
#include <iostream>
#include <map>
using namespace std;
class Solution {
public:
double frogPosition(int n, vector<vector<int>>& edges, int t, int target) {
unordered_map<int,vector<int>> m;
for(auto edge : edges){
int from = min(edge[0... |
C++ | UTF-8 | 355 | 2.5625 | 3 | [] | no_license | //
// Created by Erik Stevenson on 9/16/17.
//
// Human controller, polls keyboard for up/down arrows, returns the respective command.
//
#ifndef CSCI437_HUMAN_H
#define CSCI437_HUMAN_H
#include "Player.h"
class Human : public Player {
public:
Human(Player::Side);
Player::Command logic(const sf::FloatRect, c... |
Swift | UTF-8 | 1,011 | 3.578125 | 4 | [
"MIT"
] | permissive | //
// Service.swift
// MVVM_Practice
//
// Created by 윤병일 on 2021/07/01.
//
import Foundation
class Service { // Repository 를 이용해서 서버 모델 가져온것을 Logic(Service) 에서 사용하는 Model 로 바꿔줬다.
var currentModel = Model(currentDateTime: Date())
let repository = Repository()
func fetchNow(completion : @escaping(Mod... |
Java | UTF-8 | 3,192 | 1.976563 | 2 | [] | no_license | package com.getusroi.dynastore.config;
import java.io.Serializable;
import com.getusroi.config.beans.ConfigurationUnit;
import com.getusroi.dynastore.config.jaxb.DynastoreConfiguration;
import com.getusroi.dynastore.config.jaxb.DynastoreName;
public class DynaStoreConfigurationUnit extends ConfigurationUnit implemen... |
Python | UTF-8 | 362 | 3.4375 | 3 | [] | no_license | import itertools
s = "plyvmcthyommabcqtmqklpfkopccabybkneifgjdqhexoezlykccgpfidcqizmotounzpslphlpwghbubwthhpivqvwmvuirfhfnkjzpxyccwnuqodbdmsxybztgzvtonheaxcrpukdpgapfczulexugxghuzuvwqvgckpsgjqyzywlxtzmkqmzgavdmchnyaqzidzjfbizxgikjbsmhyikjvgveeifntxpmpgaoqbzwxyfsnexidvxdxxzzzykphrzprlzoyqqlbxbbgmyzplgqnzphbbdxitexvvjzh... |
JavaScript | UTF-8 | 960 | 3.375 | 3 | [
"MIT"
] | permissive | /**
* Definition for a binary tree node.
* function TreeNode(val, left, right) {
* this.val = (val===undefined ? 0 : val)
* this.left = (left===undefined ? null : left)
* this.right = (right===undefined ? null : right)
* }
*/
/**
* @param {TreeNode} root
* @return {boolean}
*/
const isEvenOddTree ... |
Markdown | UTF-8 | 13,444 | 2.765625 | 3 | [] | no_license | ---
title: Education
---
# 教務の概要
学生の履修や出席,成績などのモデルを定義する.
## 依存モデル
```alloy
private open Base
private open Curriculum
private open CurriculumExtensions
private open Department
private open Facility as F
private open Staff as S
private open Student as G
private open Timetable as T
```
## 履修
各学生は時間割に対して履修登録できる.
履修抽選... |
Java | UTF-8 | 4,196 | 2.171875 | 2 | [] | no_license | package com.xunhe.javaweb.controller;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springfra... |
Java | UTF-8 | 1,010 | 3.609375 | 4 | [] | no_license | package OurStudyGroup;
public class OddEven1 {
public static void main(String[] args) {
//write a program that can print all the ODD/Even numbers between 0 ~ 100 that can be divisible by 3 & 5
for(int i=1; i<=100;i+=2){
if (i%5==0 && i%3==0){
System.out.print(i+" ");
... |
JavaScript | UTF-8 | 693 | 4.375 | 4 | [] | no_license | // Problem:
// Given a non-negative integer num, return the number of steps to reduce it to zero.
// If the current number is even, you have to divide it by 2, otherwise, you have to subtract 1 from it.
// Solution:
var numberOfSteps = function (num) {
let steps = 0
while (num > 0) {
// use a ternary t... |
Java | UTF-8 | 616 | 2.875 | 3 | [
"MIT"
] | permissive | package net.jacobpeterson.abstracts.enums;
/**
* {@link SortDirection} defines enums for directional sorting.
*/
public enum SortDirection implements APIName {
/** The Ascending {@link SortDirection}. */
ASCENDING("asc"),
/** The Descending {@link SortDirection}. */
DESCENDING("desc");
/** The... |
C# | UTF-8 | 2,221 | 2.765625 | 3 | [
"CC-BY-4.0"
] | permissive | using System;
using System.Diagnostics;
using System.Net;
using System.IO;
using System.Windows.Forms;
namespace CRYENGINE_ImportHub
{
class CUpdateNotification
{
const string UPDATE_CHECK_URL = "http://www.guillaume-puyal.com/systems/CEI_check_update.php";
private string m_final_url;
... |
Java | UTF-8 | 181 | 1.890625 | 2 | [] | no_license | package com.coderzoe.entity;
/**
* @author yhs
* @date 2020/5/31 17:04
* @description
*/
public class Cat {
public void bark(){
System.out.println("miao");
}
}
|
Python | UTF-8 | 945 | 2.671875 | 3 | [] | no_license | import io
import sys
import random
import argparse
import matplotlib
import datetime as dt
import itertools as it
def get_key(d):
# group by 1 minute
d = dt.datetime.fromtimestamp(float(d))
k = d - dt.timedelta(seconds=d.second % 60)
return dt.datetime(k.year, k.month, k.day, k.hour, k.minute, k.second... |
C++ | UTF-8 | 410 | 2.625 | 3 | [] | no_license | #ifndef StandardJoint_h
#define StandardJoint_h
#include "Arduino.h"
#include "Servo.h"
#include "Adafruit_PWMServoDriver.h"
class StandardJoint
{
public:
StandardJoint(int pin);
void setTarget(int target);
void updateJoint();
bool reachedTarget();
private:
Servo _servo;
int _target;
i... |
Markdown | UTF-8 | 5,930 | 2.609375 | 3 | [] | no_license | # Maximo API for Service Requests
Below are some details on how to create/update a Maximo Service Request w/attachment via Maximo's RESTful Api.
In this situation, the company has built a proxy application that relay the request between the internet and intranet.
This proxy application is a Azure Function app hosting i... |
Markdown | UTF-8 | 2,445 | 2.828125 | 3 | [
"MIT"
] | permissive | # MHacks
## Preview
<a href="https://gmoraitis.github.io/MHacks_Filtering_A_Drum_Loop/"
target="_blank"> </a>
## Usage
### Basic Usage
After downloading, simply edit the HTML and CSS files included with the template in your favorite text editor to make changes. These a... |
Java | UTF-8 | 2,430 | 2.296875 | 2 | [] | no_license | package com.example.seconlifeps;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
public class DBHelper extends SQLiteOpenHelper {
final static String DBName = "SheltersDB";
final static String TBName_User =... |
C | UTF-8 | 1,722 | 2.59375 | 3 | [
"MIT"
] | permissive | #include "usb_dev.h"
#include "usb_xinput.h"
#include "core_pins.h" // for yield(), millis()
#include <string.h> // for memcpy()
//#include "HardwareSerial.h"
#ifdef XINPUT_INTERFACE // defined by usb_dev.h -> usb_desc.h
#if F_CPU >= 20000000
//Function receives packets from the RX endpoint
//We will use this for ... |
C | UTF-8 | 155 | 3.203125 | 3 | [] | no_license | # include <stdio.h>
void main()
{
int i, sum =0;
for(i=0;i<=20;i++)
{
if( i % 2 != 0 && i % 3 != 0)
{
sum += i;
}
}
printf("%d", sum);
|
Markdown | UTF-8 | 2,992 | 3.171875 | 3 | [] | no_license | # Firmware Code
This folder holds all of the code used throughout this project. This code is primarily used for
controlling the microcontroller used on the custom PCB, the ESP32. The code was done in C++ via
the Arduino IDE. Within the folder, there also exists the flow diagram for the NodeRed server
that hand... |
Markdown | UTF-8 | 3,587 | 3.4375 | 3 | [] | no_license | # read underscore3
```
var _ = function(obj){
if(obj instanceof _) return obj;
if(!(this instanceof _)) return new _(obj);
this._wrapped = obj;
}
```
这里是创建了 underscore 对象.这个函数的目的其实就是为了创建 underscore 对象, 如果在 new 命令的时候有对象传进来, 那么就将这个对象传给新建对象的 _wrapped 属性存储起来.
```
if(typeof exports != 'undefined' && !exports.nodeTyp... |
Java | UTF-8 | 10,997 | 1.875 | 2 | [] | no_license | import android.view.View;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public final class xe
extends zc
{
ArrayList a = new ArrayList();
ArrayList b = new ArrayList();
ArrayList c = new ArrayList();
ArrayList d = new ArrayList();
ArrayList e = new ArrayList();
ArrayList f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.