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 |
|---|---|---|---|---|---|---|---|
JavaScript | UTF-8 | 1,546 | 2.96875 | 3 | [] | no_license | // 예제 8.1 - Redux context 생성해보기
import React, {createContext, Component} from 'react'
import {StyleSheet, Text, View} from 'react-native'
const ThemeContext = React.createContext()
class Parent extends Component {
state = {themeValue: 'light'}
toggleThemeValue = () => {
const value = this.state.th... |
C# | UTF-8 | 517 | 2.703125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace BL.DateParser
{
public class CsvParser : DataParser
{
public string FilePath { get; set; }
protected override Stream GetStream()
{
return new FileStrea... |
C | UTF-8 | 213 | 2.90625 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
void write (void){
char word;
printf("enter a word");
scanf("%c",&word);
}
int main()
{ char ch;
ch = write;
printf("%c",ch);
return 0;
}
|
Python | UTF-8 | 568 | 3.296875 | 3 | [] | no_license | def menu():
import sys
opcao = None
print("==========================================");
print("| >>>>>>>>> Menu <<<<<<<<< |");
print("| 1 - Inserir valor |");
print("| 2 - Remover valor |");
print("| 3 - Carregar arvore de arquivo ... |
Markdown | UTF-8 | 13,951 | 2.84375 | 3 | [] | no_license | # Компонентный подход на примере styled-components и react-router
Разберем компонентный подход на примере двух наиболее известных библиотек в Реакте
Помните, в прошлых уроках мы говорили про то, что Реакт силён компонентным подходом? Мы ещё долго будем это [разбирать](https://reactjs.org/docs/composition-vs-inheritanc... |
TypeScript | UTF-8 | 1,081 | 2.515625 | 3 | [] | no_license | import { enableProdMode, ElementRef } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import {Polity} from './app/polity/polity';
if (environment.production) {
e... |
Python | UTF-8 | 7,363 | 2.953125 | 3 | [] | no_license | #-----------------------------------------------------------------
# Toy Blockchain for DSBA 20598 FinTech and Blockchain course
# (c) 2019 Silvio Petriconi <myfirstname.mylastname@unibocconi.it>
# License: GNU General Public License 3.0
#-----------------------------------------------------------------
import hash... |
Java | UTF-8 | 453 | 2.21875 | 2 | [] | no_license | package com.app.runners.model;
/**
* Created by Fede_CC on 22/09/2018.
*/
public class Resource {
public String hash = "";
public String url = "";
public String type = "";
public Resource(){
this.hash = "";
this.url = "";
this.type = "";
}
public Resource(String ne... |
C# | UTF-8 | 704 | 3.109375 | 3 | [] | no_license | using System;
using System.IO;
namespace Extensibility
{
public class FileLogger : ILogger
{
private readonly string _path;
public FileLogger(string path)
{
this._path = path;
}
public void LogError(string message)
{
Log(message, "ERROR"... |
Python | UTF-8 | 1,841 | 2.828125 | 3 | [] | no_license | import pickle
from pandas import read_csv
from pandas.plotting import scatter_matrix
from matplotlib import pyplot
from sklearn.model_selection import train_test_split, KFold, cross_val_score
from sklearn.metrics import classification_report, confusion_matrix, accuracy_score
from sklearn.linear_model import LogisticRe... |
Java | UTF-8 | 1,385 | 2.75 | 3 | [] | no_license | package kotakpasir;
import java.util.Vector;
import java.awt.Color;
public abstract class Element{
private int absis;
private int ordinat;
private int temperatur;
private static double densitas;
private static String nama;
private static Color warna;
public int getAbsis(){
return absis;
}
public int... |
JavaScript | UTF-8 | 1,741 | 2.828125 | 3 | [
"MIT"
] | permissive | // Dependencies
const express = require('express');
const path = require('path');
const fs = require('fs');
const { v4: uuidv4 } = require('uuid');
var dbNotes = require('./db/db.json');
const app = express();
const PORT = process.env.PORT || 3000;
app.use(express.urlencoded({ extended: true }));
app.use(express.jso... |
C++ | UTF-8 | 412 | 2.875 | 3 | [] | no_license | #ifndef _BOOK_
#define _BOOK_
#include <iostream>
#include <ostream>
#include <string>
#include <vector>
using namespace std;
class Book {
private:
string title;
string author;
int numberPages;
public:
Book();
~Book();
Book(string name, string author, int numberPages);
friend ostream& operator<< (os... |
Java | UTF-8 | 675 | 2.171875 | 2 | [] | no_license | package com.tommy.rider.adapter;
import java.util.List;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
/**
* Created by navneet on 4/6/16.
*/
public interface RetrofitArrayAPI {
/*
* Retrofit get annotation with our URL
* And our method th... |
Go | UTF-8 | 2,041 | 2.8125 | 3 | [] | no_license | package middleware
import (
"ginblog/utils"
"ginblog/utils/errmsg"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"net/http"
"strings"
"time"
)
var JwtKey = []byte(utils.JwtKey)
type MyClaims struct {
Username string `json:"username"`
jwt.StandardClaims
}
var code int
//生成token
func SetToken(user... |
Java | UTF-8 | 2,038 | 4.1875 | 4 | [
"MIT"
] | permissive | /**
* A Simple Algorithm to Execute Floyd Warshall.
*
* This checks whether edges can be connected from one to another vertex.
* Note that the graph is impelmented using an Adjacency Matrix.
*
* @author seanlowjk
*/
public class FloydGraph {
/**
* The number of Vertices in the Graph.
*/
p... |
Rust | UTF-8 | 8,858 | 2.984375 | 3 | [] | no_license | use counter::Counter;
use smorse::{smalpha, smalpha_all, smorse};
use std::collections::HashSet;
use std::error::Error;
use std::fs::File;
use std::io::prelude::*;
use std::io::BufReader;
use std::path::{Path, PathBuf};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
#[structopt(name = "smorse", about = "convert... |
Python | UTF-8 | 1,485 | 3.078125 | 3 | [] | no_license | import os, time
import sys
import signal # Импорт модуля для установки и ловли сигнала
import time # Модуль для тестов, ставит на паузу скрипт
# Функция для показа пользователю информации о номере сигнале и выход из программы
def sig_handler(sig_num, frame):
print("SIGNAL: " + str(sig_num))
exit(0)
# Устанавл... |
JavaScript | UTF-8 | 1,016 | 2.5625 | 3 | [] | no_license | const UPDATE_PERCENT = "UPDATE_PERCENT"
const UPDATE_URL = "UPDATE_URL";
const FILE_UPLOADED = "FILE_UPLOADED"
export const reducer = (state = {}, action) => {
switch(action.type){
case FILE_UPLOADED:
return {
...state,
fileUploadedStatus : action.fileUploadedSt... |
Markdown | UTF-8 | 744 | 2.578125 | 3 | [] | no_license | # About
This robot is used to take orders from different tables in a restaurant. The taken on the basis of different colour flags shown by the customer. Once the robot takes the order from all the tables, it goes to the kitchen area to place the order in respective cooking zone, which are marked by similar colour flag... |
C# | UTF-8 | 2,810 | 2.703125 | 3 | [] | no_license | using SamuraiDbModel;
using System.Collections.Generic;
using System.Linq;
namespace SamuraiLogic
{
public class NumberingOfMatches
{
public List<CompetitionGridNode> SetMatchesGridNumber(List<CompetitionGridNode> nodes)
{
foreach (var group in nodes.GroupBy(x => x.CompetitionGridI... |
Markdown | UTF-8 | 1,168 | 2.640625 | 3 | [
"MIT"
] | permissive | # Routes Folder
Routes define endpoints within your application. Fastify provides an
easy path to a microservice architecture, in the future you might want
to independently deploy some of those.
In this folder you should define all the routes that define the endpoints
of your web application.
Each service is a [Fasti... |
Shell | UTF-8 | 151 | 2.890625 | 3 | [] | no_license | #!/bin/bash -x
isAvailable= env | awk -F= '{print $1}'
if [[ $isAvailable == 0 ]]
then
export usersecret="dH34xjaa23"
else
echo "Already value set "
fi
|
C++ | UTF-8 | 122 | 2.515625 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main(){
int n=3,temp;
temp = n /2/2;
cout << temp <<endl;
return 0;
}
|
Rust | UTF-8 | 1,789 | 2.78125 | 3 | [] | no_license | mod aabb;
mod aarect;
mod block;
mod bvhnode;
mod constantmedium;
mod hitrecord;
mod rotate;
mod sphere;
mod translate;
use crate::{Ray, Vec3};
use aabb::Aabb;
pub use aarect::{XyRect, XzRect, YzRect};
pub use block::Block;
pub use bvhnode::BvhNode;
pub use constantmedium::ConstantMedium;
pub use hitrecord::HitRecord;
... |
PHP | UTF-8 | 768 | 2.640625 | 3 | [] | no_license | <?php
class modifyForm {
private $username;
private $price;
private $id;
public function __construct($username = null, $email = null, $id = null)
{
$this->username = $username;
$this->email = $email;
$this->id = $id;
... |
Java | UTF-8 | 896 | 3.703125 | 4 | [] | no_license | package com.sda.SzukamDrugiejPolowki;
public class Main {
public static void main(String[] args) {
int[] tab = {1, 2, 4, 6, 7};
int p = tab.length;
int x = 1; // szukany element
int l = 1; //
boolean ending = false;
while (!ending) {
if (l > p) {
... |
C++ | UTF-8 | 2,211 | 3.609375 | 4 | [] | no_license | #include <iostream>
#include <string>
#include "BankAccount.h"
using namespace std;
BankAccount::BankAccount()
{
Balance = 0;
Interest = 0;
Time = 0;
}
int main()
{
double Amount;
double rate;
double timee;
int loop = 1;
int option = 1;
BankAccount call;
call.setBalance(0.0);
... |
Python | UTF-8 | 3,755 | 2.84375 | 3 | [] | no_license | import tensorflow as tf
import pandas as pd
from sklearn.model_selection import train_test_split
import numpy as np
import os
from dataProcessing_NYC import dataProcessing_NYC
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
rng = np.random
learning_rate = 0.01
epochs = 50
display_step = 1
# Network Parameters
n_hidden_1 = 1... |
Java | UTF-8 | 416 | 2.078125 | 2 | [
"Apache-2.0"
] | permissive | package org.ovirt.engine.core.bll.scheduling.external;
import java.util.LinkedList;
import java.util.List;
import org.ovirt.engine.core.compat.Guid;
public class FilteringResult extends SchedulerResult {
private List<Guid> possibleHosts = new LinkedList<>();
public void addHost(Guid host) {
possible... |
C | UTF-8 | 2,544 | 2.96875 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.c :+: :+: :+: ... |
PHP | UTF-8 | 690 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Controllers;
use App\Libraries\Request;
class AuthController extends DefaultController
{
public function loginAction()
{
$login = strtolower(Request::getString('login'));
$password = strtolower(Request::getString('password'));
... |
C# | UTF-8 | 1,570 | 2.625 | 3 | [] | no_license | using System;
using System.Diagnostics;
using System.Numerics;
using Strilanc.Value;
namespace Circuit.Phys {
[DebuggerDisplay("{ToString()}")]
public struct Photon {
public readonly Position Pos;
public readonly Velocity Vel;
public readonly Polarization Pol;
public Photon(Pos... |
Java | UTF-8 | 109 | 2.078125 | 2 | [] | no_license |
public class Class9982{
public void callMe(){
System.out.println("called");
}
}
|
C | IBM852 | 2,184 | 3.3125 | 3 | [] | no_license | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main()
{
FILE *input, *output;
input = fopen("input.txt", "r"); //input file
output = fopen("output.txt", "a"); //output file
int number_r, number_c, count;
//read rule
fscanf (input, "%d", &number_r);
char r... |
Ruby | UTF-8 | 580 | 4.375 | 4 | [] | no_license | # Ask for a Name, subname and last name
# Show the full name in upercase
#Check if values are empty, in that case, ask again
#Initialize vars
name = ''
second_name = ''
last_name = ''
while name.nil? || name.empty?
print "Write your name: "
name = gets.chomp.upcase
end
while second_name.nil? || second_name.... |
Python | UTF-8 | 6,656 | 3.890625 | 4 | [] | no_license | """
Программа для переноса на определенное количество дней, месяцев и годов с учетом високосности
и (или) изменения текущего дня, месяца, года.
"""
class Date:
DAY_OF_MONTH = ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31), # Month_of_Year
(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)) #... |
JavaScript | UTF-8 | 432 | 2.828125 | 3 | [] | no_license | /* When the user scrolls down, hide the navbar. When the user scrolls up, show the navbar
ps= previous scroll position
cs= current scroll position
*/
var ps = window.pageYOffset;
window.onscroll = function() {
var cs = window.pageYOffset;
if (ps > cs) {
document.getElementByClassName("top-container").style... |
Java | UTF-8 | 980 | 2.109375 | 2 | [] | no_license | package com.carparkingsystem.dao.repository;
import com.carparkingsystem.dao.entity.VehicleTrackingTime;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.R... |
Java | UTF-8 | 3,630 | 2.15625 | 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 csg.workspace;
import csg.CSGApp;
import djf.AppTemplate;
import djf.components.AppDataComponent;
import djf.compone... |
Java | UTF-8 | 6,343 | 2.09375 | 2 | [
"Apache-2.0"
] | permissive | package com.itheima.mobilesafe.receivers;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.telephony.SmsMessa... |
Markdown | UTF-8 | 6,547 | 2.75 | 3 | [] | no_license | sermonis
========
Sermonis started as an experimentation using mongoDB, atmosphere and Spring-Data and finished with a working web chat application using these technologies.
The Sermonis application was born. Its goal is to provide users an easy way to deploy a simple web application that let users talk with eac... |
Markdown | UTF-8 | 1,496 | 2.734375 | 3 | [] | no_license | # poc-netcore-rest
.Net Core Rest in a Docker Container
This project is a quick POC (control) project to test exposing .Net services via Docker on AWS Fargate. On Windows this is really straight forward using the AWS Toolkit. On Mac there are few more steps because everything is done via the AWS CLI.
## Fargate Dep... |
Python | UTF-8 | 3,877 | 2.734375 | 3 | [] | no_license | #!/usr/bin/env python3
import math
import sys
import xml.etree.ElementTree as etree
from gmplot import gmplot
import subprocess
import os
# thanks to Pasa on stackoverflow
# https://stackoverflow.com/questions/53873673/plot-data-on-satellite-maps/54164812
class CustomGoogleMapPlotter(gmplot.GoogleMapPlotter):
def... |
C++ | UTF-8 | 966 | 2.859375 | 3 | [] | no_license | #ifndef SPACESHIPBLUEPRINTS_H
#define SPACESHIPBLUEPRINTS_H
#include "SpaceShips/Battleship.h"
#include "SpaceShips/Exploration_vessel.h"
#include "SpaceShips/Fighter.h"
#include "SpaceShips/Frigate.h"
#include "SpaceShips/Transporter.h"
#include <iostream>
#include <string>
using namespace std;
/**This class is the a... |
Java | UTF-8 | 1,129 | 2.15625 | 2 | [] | no_license | package org.self.learn.springmvc.config;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.cont... |
Python | UTF-8 | 4,046 | 2.515625 | 3 | [] | no_license | # import sys
import requests
import random
from util.user_agents import ua_list
from util.util_function import get_html_soup, extract_ip
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
from selenium.w... |
Markdown | UTF-8 | 4,676 | 2.796875 | 3 | [] | no_license | <div id="hypercomments_widget" class="js-hypercomments-widget invisible"></div>
# Тема 2. Хімічні реакції
<table>
<tr>
<td width="10%" align="center"><b>К-ть годин</b></td>
<td width="45%" align="center"><b>Зміст навчального матеріалу</b></td>
<td width="45%" align="center"><b>Державні вимоги до рівня з... |
TypeScript | UTF-8 | 67,292 | 2.71875 | 3 | [
"MIT"
] | permissive | import paper = require("paper");
import { BubbleSpec, TailSpec, BubbleSpecPattern } from "bubbleSpec";
import { Comical } from "./comical";
import { Tail } from "./tail";
import { ArcTail } from "./arcTail";
import { ThoughtTail } from "./thoughtTail";
import { LineTail } from "./lineTail";
import { makeSpeechBubble, m... |
Java | UTF-8 | 18,486 | 1.789063 | 2 | [
"Apache-2.0"
] | permissive | /*
* 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 law or agreed to in writing, software
* distributed... |
C++ | UTF-8 | 438 | 2.890625 | 3 | [] | no_license | #include <iostream>
#include <sstream>
using namespace std;
int *inputArray;
int *countingArray;
int *sortedArray;
void createArrays()
{
}
void getInputArray()
{
string inputString;
/* getline(cin,inputString);
istringstream iss(inputString);*/
int j = 0;
while(iss >> i)
{
int i = 0;
}
}
int main... |
Java | UTF-8 | 1,720 | 2.421875 | 2 | [] | no_license | package org.sdrc.scsl.web.controller;
import org.sdrc.scsl.model.mobile.LoginDataModel;
import org.sdrc.scsl.model.mobile.MasterDataModel;
import org.sdrc.scsl.model.mobile.SyncModel;
import org.sdrc.scsl.model.mobile.SyncResult;
import org.sdrc.scsl.service.MobileService;
import org.springframework.beans.factory.anno... |
Java | UTF-8 | 783 | 2.484375 | 2 | [] | no_license | import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.Background;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
/**
* Created by XZL on 2017/5/24.
*/
public class Fa... |
Python | UTF-8 | 2,511 | 3.984375 | 4 | [] | no_license | '''
Level: Medium Tag: [Math]
You have a list arr of all integers in the range [1, n] sorted in a strictly increasing order.
Apply the following algorithm on arr:
Starting from left to right, remove the first number and every other number afterward until
you reach the end of the list.
Repeat the previous step again... |
Python | UTF-8 | 564 | 3.5625 | 4 | [] | no_license | inventory = {'arrow': 12, 'goldcoin': 42, 'rope': 1, 'torch': 6, 'dagger': 1}
addeditems = ['arrow', 'goldcoin', 'rope', 'goldcoin', 'dagger', 'goldcoin']
def addtoinventory(iventory, addeditems):
for items in addeditems:
inventory[items] += 1
def displayinventory(items):
print("Inventory:... |
Java | UTF-8 | 2,092 | 1.710938 | 2 | [] | no_license | package com.tencent.mm.plugin.webview.fts.b.a.a;
import android.text.TextUtils;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import org.json.JSONException;
import org.json.JSONObject;
public final class a {
public Strin... |
JavaScript | UTF-8 | 5,628 | 2.890625 | 3 | [] | no_license | var quiztitle = " Leviticus ಅಧ್ಯಾಯ 2";
var quiz = [
{
"question" : " 1. This should be poured on meat offerings of fine flour. ",
"image" : "",
"choices" : [
" a. Blood ",
" b. Water ",
" c. Oil ",
" d. Wine "
],
"correct" : " c. Oil ",
"explanation" : " And when any will offer a meat ... |
Python | UTF-8 | 9,823 | 2.828125 | 3 | [] | no_license | import os
from flask import Flask
from flask import render_template
from flask import request
from flask import redirect
from flask import url_for
from flask import session
from flask import flash
# import flask functions
from data import db_manager, db_builder
# import database functions
app = Flask(__name__)
# Must b... |
Python | UTF-8 | 113 | 2.609375 | 3 | [] | no_license | def hello(x):
print('Hi ' + str(x))
print('my name')
print('Hello there')
hello(3)
#hello()
#hello()
|
Markdown | UTF-8 | 3,782 | 2.84375 | 3 | [] | no_license | # CI/CD
> A integração contínua (CI) é uma prática de desenvolvimento de software de DevOps em que os desenvolvedores, com frequência, juntam suas alterações de código em um repositório central. Deploy Contínuo (CD) é o ato implantar o produto produzido no servidor de aplicação, ou seja, entregar o produto ao client... |
PHP | UTF-8 | 1,457 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Aggrego\TerminalSymfonyExample\Model\TransformationStatus;
use Aggrego\Component\BoardComponent\Contract\Application\UseCases\TransformBoard\TransformBoardCommand;
use Aggrego\Component\BoardComponent\Contract\Application\UseCases\TransformBoard\Messages\BoardCreated;
use Aggr... |
Markdown | UTF-8 | 2,610 | 3.265625 | 3 | [] | no_license | # icg-assignment-1
assignment 1 for icg due 26/05/2021
Description:
What we have is a website with a customer and staff side. On the customer side it is going to be a website where users can create accounts or log in and then using special code on the product they will certify that they have bought this item. After wh... |
PHP | UTF-8 | 300 | 2.640625 | 3 | [] | no_license | <?php
$m = rand(1,12);
echo $m.'<br>'
switch ($m){
case 1 :case 3 :case 5 :case 7 :case 8 :case 1 :
echo'31'
break;
case 2
echo'28'
break;
case 4 :case 6 :case 9 :case 11:
echo '30'
break;
}
echo '<>';
$a='1';
|
PHP | UTF-8 | 1,250 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace src\models;
use HCTorres02\QueryBuilder\Database;
class Category
{
/** @var int */
public $id;
/** @var string */
public $title;
/** @var bool */
public $active;
/**
* @return Category[]|null
*/
public static function all($onlyActives = false): ?array
... |
Java | UTF-8 | 1,117 | 2.46875 | 2 | [
"Apache-2.0"
] | permissive | package org.sirenia.func.core;
import lombok.Cleanup;
import lombok.SneakyThrows;
import org.sirenia.func.anno.SideEffect;
import org.springframework.util.FileCopyUtils;
import javax.annotation.Nonnull;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.function.BiConsumer;
import java.util.zip... |
C++ | UTF-8 | 658 | 3.65625 | 4 | [] | no_license | // Main’s only responsibilityis to call a function called doAllThework.
// doAllTheWork should ask the user for the 2 ints and the char, do the
// calculations and write all info to the screen.
// Mekhi 2.24.20
#include <iostream>
using namespace std;
void doAllTheWork()
{
int int1, int2, intSum;
char charPlus;
intSum ... |
Markdown | UTF-8 | 2,204 | 3.015625 | 3 | [] | no_license | Frameworks
==========
Frameworks are collections of code that can be thought of and loaded as a single unit. They
can depend on each other (though not circularly).
SproutCore has several frameworks. For instance:
- Runtime
- Foundation
- Desktop
Desktop requires Foundation, which requires Runtime.
Frameworks ... |
Java | UTF-8 | 2,799 | 3.125 | 3 | [
"MIT"
] | permissive | package diya.model.automata.components;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Stack;
import diya.model.automata.events.TapeUpdatedEvent;
import diya.model.language.Symbol;
import diya.model.language.Word;
public class Tape extends Component i... |
C | WINDOWS-1252 | 614 | 3.96875 | 4 | [] | no_license | /*
Write a function to change the account number from 11060 to 12050 From the array.
11060, 2003, 2106, 52003, 11060, 87645
*/
#include <stdio.h>
void change(int* acc , int size , int a , int b){
int i;
for(i=0; i < size ; i++) if(acc[i] == a) { printf("1 "); acc[i] = b; }
}
int main(void){
int accNum[6] = ... |
C | UTF-8 | 3,274 | 2.625 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* str_char_handlers.c :+: :+: :+: ... |
Markdown | UTF-8 | 14,890 | 2.8125 | 3 | [] | no_license | # TLS
Transport Layer Security.
As well known as SSL (SSL is the old standard).
## Content
<!-- toc -->
- [Introduction](#introduction)
* [TLS handshake](#tls-handshake)
* [Pre master secret vs master secret](#pre-master-secret-vs-master-secret)
* [Certificate Authorities](#certificate-authorities)
* [SNI ... |
Java | UTF-8 | 614 | 4 | 4 | [] | no_license | // 문자를 입력받고 단 수 만큼 출력하기
package java_example;
import java.util.Scanner;
public class Exam7_7 {
static void putChar(int n,char x) {
for (int i = 0; i < n; i++) {
System.out.print(x);
}
}
static void putStart(int n, char x) {
putChar(n,x);
}
public static void main(String[] args) {
Scanner sc =... |
Python | UTF-8 | 703 | 3.140625 | 3 | [] | no_license | class lipstick:
brands=3
def __init__(self,col1,col2,col3,col4):
self.col1=col2
self.col2=col2
self.col3=col3
self.col4=col4
@staticmethod
def longlipstick():
print("lipstick lenght is more")
def avg(self):
print((self.col1+self.... |
JavaScript | UTF-8 | 1,243 | 3.484375 | 3 | [] | no_license | var numbers=[1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8];
var container=document.getElementById("container");
var cards;
var inner;
var r;
for(var i=0; i<16; i++){
r=Math.floor(Math.random()*numbers.length);
cards=document.createElement("div");
inner=document.createElement("div");
cards.className="cards";
in... |
C | UTF-8 | 590 | 3.25 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int no_subset_sum_ge(int set[],int set_size,int value)
{
int count=0,x,sum,k;
for(x=0;x<(pow(2,set_size));x++)
{
sum=0;
for(k=0;k<set_size;k++)
{
if(x&(1<<k))
{
sum=sum+set[k];
... |
JavaScript | UTF-8 | 1,763 | 3.53125 | 4 | [] | no_license | /** Variables **/
const form = document.querySelector('form');
const tabla = document.querySelector('table');
const btnEnviar = document.querySelector('#btnEnviar');
/** Objetos **/
class Interfaz {
};
/** Event's Listeners's **/
// Cuando envía el formulario...
btnEnviar.addEventListener('click', function (event){
... |
Markdown | UTF-8 | 5,651 | 2.875 | 3 | [] | no_license |
# Windows Forensics
## Partie 1: RDP Cache
Voici une machine virtuelle Windows. Plusieurs flags ont été manipulés dans cette machine, mais ils ont tous été supprimés. Pourtant, des traces des flags restent sur ces machines. Dans les quatre prochains exercices, vous serez introduit au monde complexe du *Windows Foren... |
Java | UTF-8 | 2,153 | 2.484375 | 2 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | /**
* ============LICENSE_START====================================================
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
* ==================================================================... |
Rust | UTF-8 | 1,274 | 3.109375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | //! A simple demonstration how iron's helper macros make e.g. IO-intensive code easier to write.
#[macro_use]
extern crate iron;
use std::fs;
use std::io;
use std::io::Cursor;
use iron::prelude::*;
use iron::Method;
use iron::StatusCode;
fn main() {
Iron::new(|req: &mut Request| {
Ok(match req.method {
... |
Java | UTF-8 | 3,073 | 2.5625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package eu.geoknow.generator.publish;
import java.util.HashMap;
import com.hp.hpl.jena.rdf.model.Model;
import eu.geoknow.generator.exceptions.InformationMissingException;
import eu.geoknow.generator.utils.Utils;
/**
* Class for holding all required information to do a data publishing.
*
* @author mvoigt
*
*... |
C | UTF-8 | 549 | 2.640625 | 3 | [] | no_license | //
// List.h
// DataStructure
//
// Created by Daniel on 15/9/23.
// Copyright (c) 2015年 Daniel. All rights reserved.
//
#ifndef __DataStructure__List__
#define __DataStructure__List__
#include <stdio.h>
struct node
{
struct node *pre;
struct node *next;
int key;
};
struct node * list_search(struct ... |
SQL | UTF-8 | 2,121 | 3.578125 | 4 | [] | no_license | SELECT PROG.ID, PROG.NAME, PROG.DESCRIPTION,
PROG_PROF.ID, PROG_PROF.EFFECTIVE, PROG_PROF.EXPIRATION,
PROG_PROF.DISPLAY_ORDER,PROG_PROF.DEFAULT_OPT_IN, PROG_PROF.VISIBLE_IN_UI,
PROG_PROF.CHAN_EMAIL,PROG_PROF.CHAN_IVR, PROG_PROF.CHAN_SMS, PROG_PROF.CHAN_SECURE,
PROG_CONF.ID, PROG_CONF.EFFECTIVE, PROG_CONF.EXPI... |
PHP | UTF-8 | 1,556 | 2.515625 | 3 | [] | no_license | <?php
/**
* @author Tim Rupp
* @see http://www.enrise.com/2011/01/rest-style-context-switching-part-2/
*/
class ErrorController extends Zend_Controller_Action {
const IDENT = __CLASS__;
public function init() {
$this->_helper->viewRenderer->setNoRender();
}
public function errorAction() {
try {
$log = App... |
C# | UTF-8 | 2,015 | 2.875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Threading.Tasks;
using Verbarium.DAL.Interfaces;
namespace Verbarium.DAL.Realisations
{
public class GenericRepository<T> : IGenericRepository<T>
where T : class,... |
Java | UTF-8 | 3,753 | 2.140625 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"CC-BY-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
* ============LICENSE_START=======================================================
* ONAP : ccsdk features
* ================================================================================
* Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
* All rights reserved.
* =======================... |
C# | UTF-8 | 5,923 | 2.546875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using OXML.DL;
using OXML.Library;
namespace OXML.UI
{
public partial class MainForm : Form
{
private readonly string PPT_Location = @"E:\003_P\openxm... |
Python | UTF-8 | 166 | 3.5625 | 4 | [] | no_license | n = int(input())
sum1 = 0
sum2 = 0
for i in range(1,n+1):
if (i%2 == 0):
sum1 += i
else:
sum2 += i
func = sum1 - sum2
print(func)
|
PHP | UTF-8 | 7,622 | 2.859375 | 3 | [] | no_license | <?php
require_once "utils/functions.php";
if( isLogged() && isNew($_SESSION['uid']) ) {
if(isset($_POST['submit'])) {
$q1 = $_POST['q1'];
$q2 = $_POST['q2'];
$q3 = $_POST['q3'];
$q4 = $_POST['q4'];
$q5 = $_POST['q5'];
if( !isset($q1) || !isset($q2) || !isset($q3) || !isset($q4) || !isset($q5... |
JavaScript | UTF-8 | 274 | 2.640625 | 3 | [
"MIT"
] | permissive | client.on('guildMemberAdd', async member => {
let cfxtag2 = await db.fetch(`cfxtag${member.guild.id}`)
var cfxtag = [];
if(cfxtag2 == null) cfxtag = `${member.user.username}`
else cfxtag = `${cfxtag2} ${member.user.username}`
member.setNickname(`${cfxtag}`)
});
|
JavaScript | UTF-8 | 1,992 | 3.734375 | 4 | [] | no_license | 'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', inputStdin => {
inputString += inputStdin;
});
process.stdin.on('end', _ => {
inputString = inputString.replace(/\s*$/, '')
.split(... |
C# | UTF-8 | 1,517 | 2.921875 | 3 | [] | no_license | using System.Collections.Generic;
using System.Linq;
namespace Holiday
{
public class DAL
{
private readonly IStorage storage;
public DAL(IStorage storage)
{
this.storage = storage;
}
public IEnumerable<HolidayRequest> GetAllRequest(Employee employee)
... |
Java | UTF-8 | 173 | 1.851563 | 2 | [] | no_license | package task.dao;
import java.util.List;
import task.model.Item;
public interface TaskDAO {
List<Item> queryItemList();
void del(String name, int count);
}
|
JavaScript | UTF-8 | 767 | 4.6875 | 5 | [] | no_license | // Faça um programa que defina três variáveis com os valores dos três ângulos internos de um triângulo. Retorne true se os ângulos representarem os ângulos de um triângulo e false , caso contrário. Se algum ângulo for inválido o programa deve retornar uma mensagem de erro.
// Para os ângulos serem de um triângulo váli... |
C++ | UTF-8 | 2,779 | 3.21875 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <fstream>
using namespace std;
void bfs(string **, int, int);
int main(int argc, char * args[]) {
ifstream inputFile;
int verticiesSize = 0;
int edgeSize = 0;
string ** verticies;
string user;
inputFile.open(args[1]);
// handle verticies
inputFile >> verticie... |
Python | UTF-8 | 5,461 | 2.546875 | 3 | [] | no_license |
# coding: utf-8
# In[1]:
import numpy as np
import matplotlib.pyplot as plt
get_ipython().magic(u'matplotlib inline')
import pickle as pkl
from sklearn.metrics import roc_auc_score
from sklearn.metrics import accuracy_score
from sklearn.metrics import precision_recall_curve
from sklearn.metrics import average_precis... |
Python | UTF-8 | 324 | 2.8125 | 3 | [] | no_license | from anytree import Node, RenderTree
node=Node("a")
b=Node("b" , node)
c=Node("c", node)
d=Node("d", b)
for pre, fill, node in RenderTree(node):
print("%s%s" % (pre, node.name))
# print(d.parent)
# print(d.name)
# print(d.root)
d=None
for pre, fill, node in RenderTree(node):
print("%s%s" % (pre, node.name... |
C++ | UTF-8 | 2,448 | 2.671875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef long long int ll;
typedef pair < int,int > PII;
typedef pair < ll,ll > PLL;
#define F first
#define S second
ostream& operator<<(ostream & os, PLL h)
{
return os << "( " << h.F << ", " << h.S << " )" << endl;
}
PLL operator+ (PLL a, ll x) ... |
PHP | UTF-8 | 1,853 | 2.609375 | 3 | [] | no_license | <?php
require_once('includes/db.php');
include('includes/functions.php');
if(isset($_POST['Submit'])){
if($_POST['email']!='' && valid_email($_POST['email'])==TRUE){
$sql = "SELECT id, username, temp_pass, email FROM users WHERE email = '".mysqli_real_escape_string($cn,$_POST['email'])."'";
$getUser = mysqli_... |
JavaScript | UTF-8 | 4,538 | 2.78125 | 3 | [] | no_license | /* globals React */
'use strict';
var PlaneValues = React.createClass({
getInitialState: function() {
return({
idSelected: this.props.idSelected
});
},
componentWillReceiveProps: function(nextProps) {
this.setState({
idSelected: nextProps.idSelected
});
},
componentDidUpdate: func... |
JavaScript | UTF-8 | 9,835 | 2.78125 | 3 | [] | no_license | /**
* define the common JS sdk
*/
var JSDK = (function() {
"use strict";
/** make setTimeout() a promise, usage:
* later(1000, 'any data').then(function(data) {
* // do anything
* return later(2000, data); // if you want to chain
* }).then(function(data) {
* // do anything...
* });
*/
function lat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.