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 |
|---|---|---|---|---|---|---|---|
TypeScript | UTF-8 | 9,115 | 2.515625 | 3 | [
"MIT"
] | permissive | import { EventEmitter } from "@angular/core";
import { EntityBase } from "./entity-base";
import { Element } from "./element";
import { ElementCell } from "./element-cell";
import { RatingMode } from "./resource-pool";
import { UserElementField } from "./user-element-field";
export enum ElementFieldDataType ... |
Java | UTF-8 | 1,114 | 3.40625 | 3 | [] | no_license | package strings;
public class SubstringUsingKMP {
public boolean Kmp(char[] str,char[] pattern){
int[] patternSuffixEqualsPrefix = getPattenSuffixEqualsPrefix(pattern);
int i=0;
int j=0;
while(i<str.length && j<pattern.length){
if(str[i]==pattern[j]){
i++;
j++;
}
else{
if(j!=0){
... |
JavaScript | UTF-8 | 1,976 | 2.6875 | 3 | [] | no_license | //MODULES
import {useState} from "react";
import { logIn } from "../../services/blogService";
import PropTypes from "prop-types";
//COMPONENTS
import InputForm from "../InputForm/InputForm.component";
import Button from "../Button/Button.component";
import "./LogInForm.style.css";
const LogInForm = ({ setUser, setMe... |
Java | UTF-8 | 1,709 | 3.921875 | 4 | [] | no_license | import java.util.*;
public class CarroMain {
public static void main(String[] args) throws Exception {
Carro[] carros = new Carro[2];
carros[0] = new Carro("CHEVROLET");
carros[1] = new Carro("MAZDA");
System.out.println("Informacion del objeto ubicado en 0 : " + carros[0].getMarca(... |
Markdown | UTF-8 | 4,836 | 2.71875 | 3 | [
"MIT"
] | permissive | ---
published: true
hidden: false
title: Đàn bà khôn và 9 vũ khí mê hoặc khiến chồng yêu đến mê mẩn
tags: styling react styled-components
twitter_large: true
image: dan-ba-khon.jpg
custom_excerpt: Đàn bà muốn giữ đàn ông không chỉ hơn thua nhau ở nhan sắc mà còn là khôn ngoan biết đâu là vũ khí khiến chồng yêu đến mê m... |
JavaScript | UTF-8 | 866 | 4.375 | 4 | [] | no_license | class BankAccount{
constructor(balance){
/**
* this keyword is used to create variable inside the table of the object.
* This method is much like python.
*/
this.balance = balance;
}
deposit(value){
this.balance = this.balance + value;
console.log(`depositing value ${value}`);
}
... |
Java | UTF-8 | 1,034 | 1.875 | 2 | [] | no_license | package com.tinshine.blog.dao.tBlog;
import com.tinshine.blog.entity.BlogEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface IBlogDao {
boolean addArticle(@Param("title") String title, @Param("summary") String summary,
@Param("releaseDate") String re... |
C | UTF-8 | 1,078 | 4.28125 | 4 | [
"MIT"
] | permissive | // Given the root of a binary tree, flatten the tree into a "linked list":
// The "linked list" should use the same TreeNode class where the right child pointer points to the next node in the list and the left child pointer is always null.
// The "linked list" should be in the same order as a pre-order traversal of th... |
Java | UTF-8 | 2,429 | 2.046875 | 2 | [] | no_license | package com.xdl.jjg.web.service;
import com.jjg.member.model.domain.EsGrowthWeightConfigDO;
import com.jjg.member.model.dto.EsGrowthWeightConfigDTO;
import com.jjg.member.model.dto.EsGrowthWeightConfigListDTO;
import com.xdl.jjg.response.service.DubboPageResult;
import com.xdl.jjg.response.service.DubboResult;... |
C | UTF-8 | 417 | 3.9375 | 4 | [] | no_license | // prints the conversion table from fahrenheit to celcius
#include <stdio.h>
main(){
float fahr, celcius;
float lower, upper, step;
lower = 0;
upper = 300;
step = 20;
fahr = lower;
printf("%s\t%s", "Fahrenheit", "Celcius\n");
while(fahr <= upper){
celcius = (5.0 / 9.0) * (fah... |
Markdown | UTF-8 | 13,786 | 2.53125 | 3 | [] | no_license | Live transcoding (including video transcoding and audio transcoding) refers to the process where the original stream pushed from the live streaming site is converted into streams of different codecs, resolutions, and bitrates in the cloud before being pushed to viewers. This meets playback needs in varying network envi... |
C# | UTF-8 | 1,343 | 3.375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleAppObs
{
class Program
{
static void Main(string[] args)
{
//the observab... |
Java | UTF-8 | 2,631 | 2.796875 | 3 | [] | no_license | /******************************************************/
/*Auteur: Hendrick Samuel & Khamana Benedict */
/*Groupe: 2203 */
/*Application: Inpres Harbour */
/*Date de creation: 25/03/2020 */
/**********************************... |
JavaScript | UTF-8 | 389 | 2.53125 | 3 | [] | no_license | $(document).ready(function(){
$('form').on('submit', function(){
var add = $('form input');
var newRecipe = {name: add.val()};
$.ajax({
type: 'POST',
url: '/admin',
data: newRecipe,
success: function(data){
location.reload();
... |
Java | UTF-8 | 5,709 | 1.898438 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2021 Shulie Technology, Co.Ltd
* Email: shulie@shulie.io
* 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
*
* Unless r... |
Python | UTF-8 | 5,266 | 2.890625 | 3 | [
"MIT"
] | permissive | #! /usr/bin/env python2.5
# -*- coding: utf-8 -*-
import instantiate
import pddl
class RelaxedAtom(object):
def __init__(self, name):
self.name = name
def __cmp__(self, other):
return cmp(self.name, other.name)
def __repr__(self):
return "<RelaxedAtom %r>" % self.name
def _... |
Markdown | UTF-8 | 10,424 | 2.53125 | 3 | [
"MIT"
] | permissive | ---
Name: "Helpers"
weight: 6
aliases:
- /docs/helpers
- /es/docs/helpers
---
# Helpers
{{<note>}}
Este documento solo aplica cuando se usa [github.com/gobuffalo/buffalo/render](https://github.com/gobuffalo/buffalo/tree/main/render).
Consulta [github.com/gobuffalo/plush](https://github.com/gobuffalo/plush) para ... |
Python | UTF-8 | 317 | 2.640625 | 3 | [] | no_license | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
req= urllib2.Request('http://www.baidu.com')
try:
urllib2.urlopen(req)
except urllib2.URLError,e:
if hasattr(e,"code"):
print(e.code)
except urllib2.URLError,e:
if hasattr(e,"reason"):
print(e.reason)
else:
print("OK")
|
Markdown | UTF-8 | 1,397 | 3.09375 | 3 | [
"MIT"
] | permissive | # web-crawler
A web crawler that seeks for urls. Currently it doesn't serve any purpose apart from collecting different urls it finds across the web.
## Getting Started
### Prerequisites
- Python >= 3
- pipenv
OR
- Docker Compose
### Installing
Navigate to the project root and run the following command:
```bash... |
JavaScript | UTF-8 | 826 | 3.765625 | 4 | [] | no_license | /*
pascal triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
*/
function pascal(n) {
if (n === 1) {
console.log(['1']);
} else if (n === 2) {
console.log([[1], [1, 1]]);
} else {
const ans = [[1], [1, 1]];
for (let i = 2; i <= n... |
Java | UHC | 6,518 | 1.90625 | 2 | [] | no_license | /***************************************************************************************************
* ϸ : .java
* :
* ۼ :
* ۼ :
***************************************************************************************************/
/*******************************************************************************... |
Swift | UTF-8 | 3,779 | 2.703125 | 3 | [] | no_license | //
// AppDelegate.swift
// Clok
//
// Created by Secret Asian Man Dev on 23/12/20.
// Copyright © 2020 Secret Asian Man 3. All rights reserved.
//
import UIKit
final class AppDelegate: NSObject, UIApplicationDelegate {
var notificationCentre: NotificationCentre? = .none
func application(_ applic... |
JavaScript | UTF-8 | 549 | 2.890625 | 3 | [] | no_license | const Post = require("./post");
class Poll extends Post {
constructor({ options, title, author, text }) {
super({ title, author, text });
this.options = options;
this.votes = { A: 0, B: 0, C: 0, D: 0 };
}
vote(optionLetter) {
this.votes[optionLetter]++;
}
}
class Optio... |
Ruby | UTF-8 | 725 | 3.5 | 4 | [] | no_license | # -*- coding: utf-8 -*-
op1 =
[
" _ ∩ おっ\n",
" ( ゜∀゜)彡 \n",
" ( | \n",
" | | \n",
" し ⌒ J \n"
]
op2 =
[
" _ \n",
" ( ゜∀゜) ぱい \n",
" ( ⊂彡 \n",
" | | \n",
" し ⌒ J \n"
]
class Op
@array = []
def initialize(ar = [])
... |
Markdown | UTF-8 | 1,937 | 3.4375 | 3 | [] | no_license | ##simple string
```ruby
puts "ln -s file1 file2"
```
#####string concatenation
```ruby
command = "ln"
options = "-s"
arguments = "file1 file2"
puts command + options + arguments
#=> command + options + arguments
```
####splate operator
```ruby
command = ["ln"]
options = ["-s"]
arguments = ["file1", "file2"]
c... |
Shell | UTF-8 | 1,364 | 3.9375 | 4 | [] | no_license | #!/bin/bash
#set -x
usage () {
echo "Usage: $0 SERVICE_NAME LOG_FILE"
}
if [ "$#" -ne 2 ];then
usage;
exit 1;
fi;
#if [ ! -f "$1" ];then
# echo "SERVICE_NAME $1 is not existent"
# usage;
# exit 1;
#fi;
if [ ! -f "$2" ];then
echo "LOG_FILE $2 is not existent"
usage;
exit 1;
fi;
SERVICE_DIR=$(dirname ... |
Python | UTF-8 | 7,754 | 2.75 | 3 | [
"MIT"
] | permissive | import numpy as np
import os
import cv2
import matplotlib.pyplot as plt
from scipy.ndimage import zoom
from scipy.misc import imresize
def print_training_params_to_file(init_locals):
"""save param log file"""
del init_locals['self']
with open(os.path.join(init_locals['save_log_path'], 'Training_Parameter... |
Java | UTF-8 | 746 | 2.875 | 3 | [] | no_license | package com.song.newsreader.utils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
/**
* Created by Administrator on 2016/2/27.
*/
public class SortHashMap {
public static void main(String[] args){
sortMap();
}
public static void sortMap(){
Array... |
Java | UTF-8 | 1,668 | 2.09375 | 2 | [] | no_license | package com.zhp.bos.service.impl.auth;
import java.util.List;
import org.hibernate.Hibernate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import org.spring... |
C# | UTF-8 | 343 | 2.53125 | 3 | [] | no_license | using System;
namespace CodeSharper.Core.Common.NameMatchers
{
public class EqualityNameMatcher : INameMatcher
{
/// <summary>
/// Matches the specified collection.
/// </summary>
public Boolean Match(String expected, String actual)
{
return expected == actu... |
Markdown | UTF-8 | 25,558 | 2.921875 | 3 | [] | no_license | # Create Basic VUE-APP
Instruksi Project Dari nol
# Vue CLI
[========]
- Pertama kita install vue CLI
````bash
# install with npm
npm i -g @vue/cli @vue/cli-service-global
# install with yarn
yarn global add @vue/cli @vue/cli-service-global
````
Sekarang Vue CLI telah terinsal secara global, kita bisa menggun... |
Markdown | UTF-8 | 3,416 | 2.609375 | 3 | [
"CC-BY-4.0",
"MIT",
"CC-BY-3.0"
] | permissive | <properties
pageTitle="Skalowanie usługi sieci web | Microsoft Azure"
description="Dowiedz się, jak skalowanie usługi sieci web przez zwiększanie współbieżności oraz dodawania nowych punktów końcowych."
services="machine-learning"
documentationCenter=""
authors="neerajkh"
manager="srikants"
editor=... |
Java | UTF-8 | 1,035 | 2.15625 | 2 | [] | no_license | package com.phonebookbackend.model;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
imp... |
Markdown | UTF-8 | 4,624 | 2.828125 | 3 | [] | no_license | 初识机器学习
1. 机器学习的概述
2. 机器学习的现状分析
3. 机器学习的核心思想
4. 机器学习的框架与选型..
一. 机器学习的概述
1) 概述:
机器学习是用数据或以往的经验, 并以此来优化程序的性能标准. (用现有已知的数据, 预测未来可能发展的情况)
Machine learning is programming computers to optimize a performance critertion using example data or past experience.
2) 机器学习的发展史:
1950s-1960s: 研究火热(1957年感知机算法)
1960s... |
C++ | UTF-8 | 3,397 | 3.3125 | 3 | [] | no_license | /**
* @file player.h
* header de clase Player
* */
#ifndef __PLAYER_H__
#define __PLAYER_H__
#include "lib/utilities.h"
#include "lib/edge.h"
#include "lib/vertex.h"
#include "lib/thread.h"
#include "lib/mutex.h"
#include <map>
#include <vector>
/**
* Clase abstracta padre de Pacman y Ghost. Esta clase contiene e... |
Java | UTF-8 | 1,883 | 2.203125 | 2 | [] | no_license | package org.tq.Utility;
import org.apache.commons.mail.DefaultAuthenticator;
import org.apache.commons.mail.EmailAttachment;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.MultiPartEmail;
import org.tq.EsignGenie.BaseClass;
public class EmailSent extends BaseClass
{
public static vo... |
C++ | UTF-8 | 846 | 2.96875 | 3 | [] | no_license | #ifndef METALH
#define METALH
#include "material.h"
#include "randomize.h"
class metal : public material {
public:
vec3 albedo;
float fuzz;
public:
metal(const vec3& a) : albedo(a) { fuzz = 0; };
metal(const vec3& a, float f) : albedo(a) { if (f < 1) fuzz = f; else fuzz = 1; };
virtual bool scatte... |
Java | UTF-8 | 1,337 | 2.96875 | 3 | [] | no_license | package com.ustglobal.springcore1;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import com.ustglobal.springcore1.config.PetConfigurationClass;
import com.ustg... |
C++ | UTF-8 | 6,235 | 2.65625 | 3 | [
"MIT"
] | permissive | /// ComputeSingleGeneQuery.hpp
/// Shaun Harker
/// 2018-05-14
/// MIT LICENSE
#include "ComputeSingleGeneQuery.h"
namespace ComputeSingleGeneQuery_detail_ {
inline bool isPowerOfTwo(uint64_t x) { return x && (!(x & (x - 1)));}
inline bool HammingDistanceOne(uint64_t x, uint64_t y) {return isPowerOfTwo(x ^ y);}
}... |
PHP | UTF-8 | 1,472 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Controllers;
class AuthController extends BaseController
{
public function login()
{
if ($this->request->getMethod() == 'post'){
$rules = [
'username' => 'required',
'password' => 'required'
];
$validate = $this->validate($rules);
if($validate){
... |
Java | UTF-8 | 808 | 2.5625 | 3 | [] | no_license | package ca.uqam.mgl7460.a2011.hospitalizer.domain;
import static org.junit.Assert.*;
import org.junit.Test;
public class AddressTest {
@Test
public void testGetCivicNumber() {
String expectedCivicNumber = "123";
String expectedStreet = "Sainte-Catherine";
String expectedCity = "Montreal";
Strin... |
C# | UTF-8 | 8,766 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | using System;
namespace JetBlack.MessageBus.Common
{
/// <summary>
/// This class is an adjunct to System.BitConverter. It's purpose is to provide
/// platform independent methods to transform types into byte arrays and back.
/// </summary>
public static class PortableBitConverter
{
... |
C++ | UTF-8 | 1,608 | 2.546875 | 3 | [
"BSL-1.0"
] | permissive | //==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
@copyright 2016 J.T. Lapreste
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
... |
C# | UTF-8 | 2,390 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | using System;
using System.Collections;
using System.Collections.Generic;
using PCRE.Internal;
namespace PCRE.Dfa
{
public sealed class PcreDfaMatchResult : IReadOnlyList<PcreDfaMatch>
{
private readonly uint[] _oVector;
private readonly int _resultCode;
private readonly PcreDfaMatch[]... |
C++ | UTF-8 | 854 | 2.5625 | 3 | [] | no_license | #include "system.h"
namespace mathmod
{
System::System(Area *area)
{
m_Area = area;
}
void System::addCondition(Point3f p)
{
if(m_Area->isInitial(p))
{
m_L0.push_back(p);
}
else
{
m_Lg.push_back(p);
}
}
void S... |
C++ | UTF-8 | 475 | 2.578125 | 3 | [] | no_license | #ifndef MATERIASOURCE_HPP
# define MATERIASOURCE_HPP
#include <string>
#include <iostream>
#include "IMateriaSource.hpp"
#include "AMateria.hpp"
class MateriaSource: public IMateriaSource
{
int amount;
AMateria *source[4];
public:
MateriaSource();
~MateriaSource();
MateriaSource(const MateriaSource& cop... |
Java | UTF-8 | 809 | 2.171875 | 2 | [] | no_license | package com.swift.hello.spring.boot.bootstrap;
import com.swift.hello.spring.boot.annotation.EnableHello;
import com.swift.hello.spring.boot.service.UserService;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.Conf... |
Go | UTF-8 | 1,824 | 3.28125 | 3 | [] | no_license | package main
import (
"encoding/json"
"fmt"
)
/**
golang 的json用法https://blog.csdn.net/wade3015/article/details/88401969
*/
type Stu struct {
Name string `json:"name"`
Age int
HIgh bool
Sex string `json:"sex"`
Class *Class `json:"class"`
}
type Class struct {
Name string
Grade int
}
type Server stru... |
C++ | UTF-8 | 578 | 3.375 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <vector>
#include <map>
struct some_key
{
int a = 0;
double b = 0;
std::string c;
std::vector<int> d;
bool operator<(some_key const& rhs) const
{
return std::tie(a,b,c,d)<std::tie(rhs.a,rhs.b,rhs.c,rhs.... |
Markdown | UTF-8 | 3,541 | 2.75 | 3 | [
"MIT"
] | permissive | # Run on Kubernetes
## Run directly
Note: If you want to customize the configuration, you are required to link Firebase. See the
[firebase documentation](../advanced/firebase.md) on how to do that.
Note that you shouldn't be running more than 1 replica.
```yml
kind: Namespace
apiVersion: v1
metadata:
name: cimoni... |
C++ | UTF-8 | 3,492 | 2.59375 | 3 | [] | no_license | #include "audioplayer.h"
#include <string.h>
#include <stdio.h>
void AudioPlayer::pad_added_handler (GstElement * src, GstPad * srcPad, AudioPlayer *player) {
GstPad *sinkPad = gst_element_get_static_pad(player->convert, "sink");
gst_pad_link(srcPad, sinkPad);
}
AudioPlayer::AudioPlayer(){
strCurrentTime ... |
C# | UTF-8 | 2,022 | 3.84375 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace Practice.InterviewBit.Problems.ProblemSet.Level7.DynamicProgramming
{
/// <summary>
/// Jump Game Array
/// https://www.interviewbit.com/problems/jump-game-array/
/// </summary>
public class JumpGameArray
{
/*... |
Java | UTF-8 | 1,655 | 2.8125 | 3 | [] | no_license | package com.windsor.node.plugin.common;
/**
* Implementation of {@link ITranformer}.
*
* @param <IN>
* type to be transformed from
* @param <OUT>
* type to be tranformed into
*/
public abstract class AbstractTransformer<IN, OUT> implements ITransformer<IN, OUT> {
@SuppressWarnings("unche... |
Python | UTF-8 | 1,296 | 2.609375 | 3 | [] | no_license | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import time
mnist=tf.keras.datasets.mnist
(train_x,train_y),(test_x,test_y)=mnist.load_data()
X_train,X_test=tf.cast(train_x,dtype=tf.float32)/255.0,tf.cast(test_x,dtype=tf.float32)/255.0
y_train,y_test=tf.cast(train_y,dtype=tf.int32),tf.cast... |
Swift | UTF-8 | 1,055 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | //
// CollectionCellViewModel.swift
// Papr
//
// Created by Joan Disho on 05.09.18.
// Copyright © 2018 Joan Disho. All rights reserved.
//
import Foundation
import RxSwift
protocol CollectionCellViewModelInput {}
protocol CollectionCellViewModelOutput {
var photoCollection: Observable<PhotoCollection> { get... |
C++ | UTF-8 | 2,892 | 3.5625 | 4 | [] | no_license | #include "Quaternion.h"
inline Quaternion::Quaternion(float _pitch, float _yaw, float _roll) :pitch(_pitch), yaw(_yaw), roll(_roll) {}
Quaternion Quaternion::operator+(const Quaternion& other) const
{
return{ pitch + other.pitch, yaw + other.yaw,roll + other.roll };
}
Quaternion Quaternion::operator-(const Quaterni... |
Java | UTF-8 | 40,498 | 1.734375 | 2 | [
"IJG"
] | permissive | package com.cartracker.mobile.android.util;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;... |
Python | UTF-8 | 409 | 3.53125 | 4 | [] | no_license | print(""" ******************************
Girilen Sayıların Toplamını Hesaplama
Çıkmak için "q" Basınız...
******************************
""")
toplam = 0
sayi = input("Değer Giriniz: ")
while True:
if (sayi=="q"):
print("Hoşçakalın")
break
sayi = int(sayi)
toplam = toplam + sayi
sayi =... |
Markdown | UTF-8 | 6,468 | 2.8125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | # auro-counter
`<auro-counter>` is a [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) for the purpose of ...
## UI development browser support
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSup... |
C# | UTF-8 | 774 | 2.5625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TrackSystem {
class Filler {
public static void Fill (out Developer developer, out Tester tester, int sample) {
developer = new Developer (sample);
... |
Python | UTF-8 | 1,648 | 3.15625 | 3 | [] | no_license | import unittest
from pipe import Parallelepiped, select, where, concat
class TestPipes(unittest.TestCase):
def test_parallelepiped(self):
par0 = (range(100) | where(lambda x: x % 2 == 1)
| select(lambda x: x ** 2)
| select(lambda x: x - 1)
... |
Java | UTF-8 | 489 | 2.015625 | 2 | [] | no_license | package genlab.igraph.algos.readers;
import genlab.core.exec.IExecution;
import genlab.core.model.instance.IAlgoInstance;
import genlab.core.model.meta.basics.graphs.IGenlabGraph;
public class ReadLGLExec extends AbstractIGraphReaderExec {
public ReadLGLExec(IExecution exec, IAlgoInstance algoInst) {
super(exec, ... |
Markdown | UTF-8 | 1,076 | 2.53125 | 3 | [] | no_license | ---
title: 'DIY Devs: Helpful Guides for Learning How to Code'
customTitleTag: 'DIY Devs: Helpful Guides for Learning How to Code'
date: 2019-10-26 12:09:47
description: Hi there, I'm John, and I've put together a number of guides and posts to help you learn how to code and become a developer.
share_cover: /img/share-i... |
Markdown | UTF-8 | 8,742 | 2.875 | 3 | [
"MIT"
] | permissive | import { Callout } from '../../components/Callout';
## Install using a docker image
The docker image is probably the simplest installation use case, since it includes all dependencies and works standalone.
There are two "flavors", [RoadRunner](https://roadrunner.dev/)-based and [openswoole](https://openswoole.com/)-... |
C# | UTF-8 | 2,430 | 2.796875 | 3 | [] | no_license | using System;
using System.Data;
namespace Banking.Repository.Repositories.AdoNET
{
public static class DataReaderExtensiones
{
public static short GetValueInt16(this IDataReader reader, int ordinal)
{
short value = 0;
if (!reader.IsDBNull(ordinal))
{
... |
Ruby | UTF-8 | 557 | 3.78125 | 4 | [] | no_license | # Look at Ruby's merge method. Notice that it has two versions. What is the difference between merge and merge!? Write a program that uses both and illustrate the differences.
action_movies = { first_blood: 1984, predator: 1987, alien: 1988 }
comedies = { kings_speech: 2011, just_go_with_it: 2012, father_of_the_bride:... |
JavaScript | UTF-8 | 6,141 | 3.28125 | 3 | [] | no_license | var c1 = document.getElementById("choice1");
var c2 = document.getElementById("choice2");
var c3 = document.getElementById("choice3");
var c4 = document.getElementById("choice4");
var hat = document.getElementById("hat");
var shirt = document.getElementById("shirt");
var pants = document.getElementById("pants");
var s... |
Java | UTF-8 | 21,128 | 2.078125 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.senacrs.view;
import br.com.senacrs.Dao.UsuarioDao;
import br.com.senacrs.model.Usuario;
import javax.swing.JOptionPane... |
Python | UTF-8 | 546 | 3.671875 | 4 | [] | no_license | # Задача A-Шестнадцатеричные и двоичные
# Вычислите XOR от двух чисел.
# Логическая операция "исключающее или".
# FALSE XOR FALSE = FALSE
# FALSE XOR TRUE =TRUE
# TRUE XOR FALSE =TRUE
# TRUE XOR TRUE =FALSE
# Операция дает FALSE если операнды равны не зависимо от них. Еще одно название "Сложение по модулю 2"
x, y = in... |
PHP | UTF-8 | 712 | 2.953125 | 3 | [] | no_license | <?php
require_once __DIR__ . "\AbstractController.php";
require_once __DIR__ . "\..\Models\Product.php";
class SearchController extends AbstractController
{
// This method searches for products in the database and adds them to an array
function search()
{
$searchTerm = $this->request->GET("searchTe... |
C++ | UTF-8 | 371 | 2.640625 | 3 | [] | no_license |
#include <cstdint>
#include <algorithm>
union Tstamp {
uint64_t value;
uint16_t shorts[4];
};
extern "C" {
std::uint64_t getEventTimestamp(void* pBody) {
uint16_t* pData = reinterpret_cast<uint16_t*>(pBody);
pData += 7; // traverse to the tstamp output
Tstamp tstamp;
std::copy(pData, pData+4... |
Markdown | UTF-8 | 5,919 | 2.5625 | 3 | [] | permissive | Fuel REST Client (for Node.js) [](https://travis-ci.org/salesforce-marketingcloud/FuelSDK-Node-REST) [](https://greenkeep... |
PHP | UTF-8 | 7,202 | 2.59375 | 3 | [] | no_license | <?php
session_start();
require_once "config.php";
if(!isset($_SESSION['username'])) {
header("Location: index.php"); //Redirect the user
}
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$foodname = $_POST["name"];
$username = $_SESSION['username'];
$rating = $_POST["rating"];
$review = $_POST["rev... |
Python | UTF-8 | 850 | 3.671875 | 4 | [] | no_license | '''
https://www.hackerrank.com/contests/juniper-2016/challenges/bus-1
Bus and Time
One day, when Meera was standing in a bus stop, she noticed that the bus always comes in every K minutes.
She also got the information that the bus takes exactly T minutes to travel from its first stop to the last stop.
The bus needs a... |
JavaScript | UTF-8 | 1,384 | 3 | 3 | [] | no_license |
"use strict";
var byId = document.getElementById.bind(document);
var queryS = document.querySelector.bind(document);
var querySa = document.querySelectorAll.bind(document);
var parOne = byId("p1");
var parTwo = byId("p2");
var parThree = byId("p3");
var parFour = byId("p4");
var sp1 = byId("p1... |
Java | UTF-8 | 4,738 | 2.25 | 2 | [] | no_license | package br.com.cerveja.controller;
import java.util.ArrayList;
import java.util.List;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.P... |
Java | UTF-8 | 1,255 | 2.46875 | 2 | [] | no_license | //package com.bigbird.learnkafka.springboot;
//
//import org.apache.kafka.clients.consumer.ConsumerRecord;
//import org.springframework.kafka.annotation.KafkaListener;
//import org.springframework.stereotype.Component;
//
//import java.util.List;
//import java.util.Optional;
//
///**
// * kafka消费者开启批量消费
// */
//@Compon... |
Java | UTF-8 | 1,102 | 2.125 | 2 | [] | no_license | package com.invoice.controller;
import com.invoice.entity.Department;
import com.invoice.entity.Submit;
import com.invoice.service.SubmitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
... |
Markdown | UTF-8 | 4,407 | 3.28125 | 3 | [] | no_license | # Final Project - Status Dashboard
Using the tools and techniques you learned in this class, design, prototype and test an interactive device.
Project Github page set up - May 3
Functional check-off - May 10
Final Project Presentations (video watch party) - May 12
Final Project Documentation due - May 19
## Team... |
C | UTF-8 | 325 | 2.875 | 3 | [] | no_license | #include<stdio.h>
#include<string.h>
void
rec_rev_util(char *str, char **s)
{
if(!*str)
return ;
char a = *str;
rec_rev_util(str+1, s);
**s = a;
*s = *s+1;
}
void
str_rev_rec(char *str)
{
rec_rev_util(str, &str);
}
main() {
char str[15] = "maruthi manohar";
printf("%s\n",str);
str_rev_rec(str);
printf("%... |
Java | ISO-8859-1 | 2,682 | 3.15625 | 3 | [] | no_license | import java.util.Scanner;
public class Vacaciones{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
String nombre = "";
int clave = 0;
int antiguedad = 0;
System.out.println("*******************************************************");
System.out.println("*Bie... |
Java | UTF-8 | 1,074 | 2.328125 | 2 | [] | no_license | package org.mule.modules.baseannotations;
import org.mule.api.annotations.Configurable;
import org.mule.api.annotations.param.Default;
public class BaseConfig {
/**
* Base parameter
*/
@Configurable
@Default("BaseParam")
private String baseParameter;
/**
* Set greeting message
... |
C++ | UTF-8 | 1,399 | 2.609375 | 3 | [
"MIT"
] | permissive | ////////////////////////////////////////////////////////////////////////////////
//! \file AboutDlg.cpp
//! \brief The AboutDlg class definition.
//! \author Chris Oldwood
#include "Common.hpp"
#include "AboutDlg.hpp"
#include <WCL/Path.hpp>
#include <WCL/VerInfoReader.hpp>
////////////////////////////////////////... |
JavaScript | UTF-8 | 2,763 | 3.25 | 3 | [] | no_license | /**
* Индикатор JS скилла
* */
const indicatorArrow = document.querySelector('.js-indicator-arrow');
const checkboxContent = document.querySelector('.js-checkbox-content');
const checkboxMark = document.querySelectorAll('.js-checkbox-mark');
const indicatedSkills = ['vanillajs','gulp','angular','jquery'];
const oneIn... |
Shell | UTF-8 | 275 | 2.984375 | 3 | [] | no_license | #!/bin/bash
declare -a folders=("go" "java" "python3" "nodejs8", "rust")
export AWS_PROFILE=default
export AWS_REGION=us-east-1
for i in `seq 1 11`;
do
for folder in "${folders[@]}"
do
cd $folder
pwd
sls deploy --region $AWS_REGION
cd ..
done
done
|
C# | UTF-8 | 3,031 | 3.203125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Image_Generator_project
{
class Program
{
private static string GLOBAL_FOLDER
{
get
{
st... |
C# | UTF-8 | 532 | 2.546875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace Common
{
/// <summary>
/// The Application Settings Manager
/// </summary>
public static class AppSettingsManager
{
/// <summary>
/// Gets the application setting value.
/// </summary>
/// ... |
Java | UTF-8 | 2,989 | 2.359375 | 2 | [] | no_license | package com.sixgod.teachPlan.service.impl;
import com.sixgod.teachPlan.Exception.EntityRepeatException;
import com.sixgod.teachPlan.entity.EducatePlan;
import com.sixgod.teachPlan.entity.Major;
import com.sixgod.teachPlan.repository.EducatePlanRepository;
import com.sixgod.teachPlan.service.EducatePlanService;
import ... |
Java | UTF-8 | 3,156 | 2.46875 | 2 | [
"MIT"
] | permissive | package com.elmakers.mine.bukkit.heroes;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.... |
C# | UTF-8 | 4,098 | 2.625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
public class UdpSever
{
#region 字段
// 定义节点
IPEndPoint ipEndPoint = null;
// 定义UDP发送和接收
UdpClient udpReceive = null;
UdpState udpReceiveStat... |
C++ | UTF-8 | 727 | 3.25 | 3 | [] | no_license | //{5,4,1,4,3,5,1,2}
//output: 3,2
#include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int >a;
int n,pos=0,i=0;
int res=0,one=0,two=0;
cin>>n;
while(n--){
int x;
cin>>x;
a.push_back(x);
res^=x;
}
one=two=res;
... |
SQL | UTF-8 | 321 | 3.21875 | 3 | [] | no_license | create table Owner
(
owner_id NUMBER GENERATED ALWAYS AS IDENTITY,
owner_name VARCHAR2(40),
vehicle_id NUMBER(6) not null,
address VARCHAR2(40),
constraint owner_id_pk primary key (owner_id)
)
alter table Owner
add constraint owner_vehicle_id_fk foreign key (vehicle_id)
references Vehicles(vehicle_id)... |
C# | UTF-8 | 7,190 | 3.140625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Reflection;
namespace LibrarySystem.Entities
{
/// <summary>
/// 枚举项在数据库中的值与在网页中的值的映射关系
/// </summary>
[Serializable]
[AttributeUsage(AttributeTarge... |
Java | UTF-8 | 1,353 | 2.234375 | 2 | [
"BSD-3-Clause"
] | permissive | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content.browser;
import android.view.ViewTreeObserver;
/**
* A CursorController instance can be used to control a cursor in t... |
PHP | UTF-8 | 1,813 | 2.65625 | 3 | [] | no_license | <?php
require ("core.php");
$BANK_TITLE = $_SESSION ["uname"];
$target_dir = "uploads/";
$target_file = $target_dir . $_SESSION ["uid"] . basename ( $_FILES ["fileToUpload"] ["name"] );
$uploadOk = 1;
$imageFileType = pathinfo ( $target_file, PATHINFO_EXTENSION );
// Check if image file is a actual image or ... |
TypeScript | UTF-8 | 577 | 2.578125 | 3 | [
"MIT"
] | permissive | import { emitMeta } from './emit';
import { TEventMap, TUnsubscribeHandlers } from './types';
import { EMetaEvents } from './meta-events';
export const unsubscribe = <M extends TEventMap>(
eventMap: M
) => <E extends keyof M>(
event: E
): TUnsubscribeHandlers<M, E> => (
...handlers
) => {
if (event in eventMap... |
Java | UTF-8 | 5,043 | 2.8125 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Controladores;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import ... |
PHP | UTF-8 | 489 | 2.671875 | 3 | [] | no_license | <?php
require_once("compania.php");
class Alpha extends Compania {
var $codautorizacion;
function __construct ($nombre,$telefonoemergencia,$codautorizacion){
parent::__construct($nombre,$telefonoemergencia);
$this->codautorizacion = $codautorizacion;
}
function getCodAutoriza... |
C# | UTF-8 | 11,389 | 2.546875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Shop_project.Utils;
using System.Data.SqlClient;
using System.Net.Mail;
using System.Net;
using Sys... |
Markdown | UTF-8 | 1,563 | 3.5625 | 4 | [
"MIT"
] | permissive | Object.map.js
=============
`Array.map` for `Object` in JavaScript. Map both an object’s keys and values.
Usage
-----
By default, will allow calling `Object.map` (obviously, as a non-enumerable property).
If you're terrified about augmenting prototypes of natives zomg ruin on us all, just set the `shouldAugmentObje... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.