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 |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 1,399 | 2.71875 | 3 | [] | no_license | # SIR : TPOPOWER - Servlet
Avant de tester le projet, vous devez lancer le fichier 'run-hsqldb-server.bat' (ou .sh sur linux et mac). Cela permet de lancer une base de donnée.
Vous pouvez aussi changer dans la classe '' le 'dev' par 'mysql' afin d'utiliser votre propre base de donnée mysql, dont les informations de co... |
Markdown | UTF-8 | 2,684 | 3.515625 | 4 | [] | no_license | # エクササイズ - 組み込み型 - str型
## `str_ex1.py`
``` py
numbers = ["One", "Two", "Three", "Four", "Five"]
# TODO
```
次の実行結果となるようにプログラムを作成してください。
### 実行結果
```
$ python str_ex1.py
ONE
TWO
THREE
FOUR
FIVE
```
---
## `str_ex2.py`
``` py
numbers = ["One", "Two", "Three", "Four", "Five"]
# TODO
```
次の実行結果となるようにプログラムを作成してく... |
Markdown | UTF-8 | 1,434 | 3.890625 | 4 | [
"MIT"
] | permissive | ### 考察点
基本
### 描述
给你两个有序整数数组 nums1 和 nums2,请你将 nums2 合并到 nums1 中,使 nums1 成为一个有序数组。
### 说明
* 初始化 nums1 和 nums2 的元素数量分别为 m 和 n 。
* 你可以假设 nums1 有足够的空间(空间大小大于或等于 m + n)来保存 nums2 中的元素。
### 思路
* 从nums1和nums2数组的末尾开始一个一个比较,把较大的数,按顺序从后往前加入混合之后的数组末尾。
* 需要三个变量i,j,k,分别指向nums1,nums2,和混合数组的末尾。
* 进行while循环,确保i和j都大于0在执行。
* nums1[i]... |
C# | UTF-8 | 395 | 3.09375 | 3 | [] | no_license | /* ----- In the Main Thread ----- */
Thread t = new Thread(() => waitForProcessClose(newProcess));
t.Start();
while (t.IsAlive)
{
Thread.Sleep(500);
}
/* ----- In the Main Thread ----- */
public static bool waitForProcessClose(Process handleToProce... |
JavaScript | UTF-8 | 1,030 | 3.328125 | 3 | [] | no_license | let callAjax = function () {
let xhr = new XMLHttpRequest();
// response is ready :: 4
xhr.onload = () => {
const refJson = JSON.parse(xhr.responseText);
// using this data :: we have to DOM Operation;
domLogic(refJson);
};
xhr.open("GET", "https://reqres.in/api/u... |
TypeScript | UTF-8 | 952 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | module Wpjs {
export class Post implements IStorageObject {
private m_data: PostModel;
private m_wpjs: Wordpress;
/**
* Constructor for Post object
*
* @param {Wordpress} wpjs
* @param {PostModel} data
*/
constructor(wpjs: Wordpress, data: Po... |
C++ | UHC | 1,407 | 3 | 3 | [] | no_license | #include "CharacterFactory.h"
#include "MonsterFactory.h"
void AttackTest(JobClass* job);
void SohwanTest(TypeClass* type);
int main()
{
KnightCharacter* knightFactory = new KnightCharacter();
ArcherCharacter* archerFactory = new ArcherCharacter();
WizardCharacter* wizardFactory = new WizardCharacter();
ThiefChar... |
PHP | UTF-8 | 493 | 3.765625 | 4 | [] | no_license | <?php
function insertionSort2($n, $arr) {
for ($i = 1; $i < $n; $i++) {
$temp = $arr[$i];
for ($j = $i - 1; $j >= 0; $j--) {
if ($arr[$j] > $temp) { // 还未到正确的位置,继续向前
$arr[$j + 1] = $arr[$j];
} else { // 到了正确的位置, break
break;
}
... |
C | UTF-8 | 2,797 | 2.96875 | 3 | [] | no_license | /*
** EPITECH PROJECT, 2020
** my_printf
** File description:
** convert_base
*/
#include <stdlib.h>
#include "my.h"
char **convert_less_than_2(char *nbr, char *base_f, char **tab, int d)
{
int result = 0;
int retenue = 0;
int i = 0;
for (int a = 0; base_f[a] != nbr[0]; a += 1)
result += 1;
... |
Java | UTF-8 | 861 | 2.40625 | 2 | [] | no_license | package by.bsu.calculator.constants;
public final class ExpressionConstants {
public final static String EXPRESSION_PATTERN = "^\\s*(\\-?(\\d+(\\.\\d+)?))\\s*([\\*\\+\\-\\/])\\s*(\\-?(\\d+(\\.\\d+)?))\\s*$";
public final static int FIRST_VALUE_WITH_SIGN_GROUP = 1;
public final static int FIRST_VALUE_WITHO... |
C++ | UTF-8 | 832 | 2.546875 | 3 | [] | no_license |
//
// Mark Pytel
// CS5303 homework #7
//
/*
I understand that using, receiving or giving unauthorized assistance in
writing this assignment is in violation of academic regulations and is subject to academic discipline, including a grade of 0 for this assignment with no chance of a making up the assignment, forf... |
Markdown | UTF-8 | 2,317 | 2.96875 | 3 | [] | no_license | ### Les registres.
Les registres sont une partie très importante de tout processeur. La plupart des instructions assembleur vont concerner un ou plusieurs registres.
Un registre est un minuscule composant électronique qui comporte 64 minuscules interrupteurs qui peuvent prendre les valeurs 0 ou 1.
La taille des regi... |
Markdown | UTF-8 | 861 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | # XML External entities
-------
## Example:
"""
Django’s serialization framework provides a mechanism for “translating” Django models into other formats. By which we can avoid XXE while using XML.
Models can be easily translated to other formats such as XML, Json, YAML
"""
//Serialization of... |
Java | UTF-8 | 3,613 | 1.851563 | 2 | [] | no_license | package com.midea.cloud.srm.supcooperate.orderreceive.controller;
import com.github.pagehelper.PageInfo;
import com.midea.cloud.common.enums.UserType;
import com.midea.cloud.common.utils.AppUserUtil;
import com.midea.cloud.common.utils.IdGenrator;
import com.midea.cloud.srm.model.common.BaseController;
import com.mide... |
C# | UTF-8 | 1,410 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using Windows.UI.Xaml.Navigation;
namespace Ch9
{
/// <summary>
/// This is an implementation of <see cref="IStackNavigationService"/> that uses
/// an inner <see cref="NavigationService"/> to do most operations.
/// </summary>
public sealed class StackNavigationSe... |
C# | UTF-8 | 905 | 2.578125 | 3 | [] | no_license | using System.Configuration;
using System.Data;
using Oracle.ManagedDataAccess.Client;
namespace mmo_pd_db_client.Manual.DB
{
public class DbConnection
{
public string connectionString { get; set; }
public OracleConnection connection { get; set; }
public DbConnection()
{
... |
TypeScript | UTF-8 | 1,712 | 3.578125 | 4 | [] | no_license | export abstract class CheckingAccount {
abstract open(initialAccount: number): Error | void;
}
export class BusinessCheckingAccount extends CheckingAccount {
open(initialAccount: number) {
if (initialAccount < 1000) {
throw new Error('Business Account must have an initial deposit of 1000 Euros')
}
... |
Python | UTF-8 | 12,374 | 2.8125 | 3 | [] | no_license | import numpy
import os
import copy
import random
import pickle
from NN import NeuralNet
from TicTacToe import TTT
ios = True
try:
import console
import TUi
except:
import basicInterface
ios = False
class RandomPlayer:
def guess(self):
return random.randint(0,9)
def fill_genes():
a =... |
C++ | UTF-8 | 1,740 | 2.515625 | 3 | [] | no_license | #include "app/ModelLoad.h"
#include <glm/ext/matrix_clip_space.hpp>
#include <glm/ext/matrix_transform.hpp>
bool ModelLoad::setup()
{
const char* vertexCode = R"##(
#version 460 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 2) in vec2 aTexCoords;
out vec2 TexCo... |
C# | UTF-8 | 523 | 3.03125 | 3 | [] | no_license | static async Task<int> GetTotalSizeAsync(params string[] urls)
{
if (urls == null)
return 0;
var tasks = urls.Select(GetSizeAsync);
var sizes = await TaskEx.WhenAll(tasks);
return sizes.Sum();
}
static async Task<int> GetSizeAsync(string url)
{
try... |
JavaScript | UTF-8 | 2,374 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | // This is the main app.js. We're using the cylon library here. One nice thing
// about the cylon library is that you can talk to various device types such as
// Edison, Beaglebone, RasPi, etc. without using device specific language.
var Cylon = require('cylon');
//include node.js packages here if you want (see npmjs... |
Markdown | UTF-8 | 3,307 | 3 | 3 | [] | no_license | # Locating-Artifacts-of-Deepfake-Images-in-Frequency-Domain-with-Butterworth-Filter
"the code of paper Locating Artifacts of Deepfake Images in Frequency Domain with Butterworth Filter
>Generative Adversarial Networks (GANs) have
achieved impressive results for many face-swap applications
which can generate realistic i... |
Python | UTF-8 | 55 | 3.109375 | 3 | [] | no_license | a = "Hello World"
for i in range(0, 100):
print(a)
|
C# | UTF-8 | 1,983 | 2.90625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.Net.Http;
namespace GoodToCode.Extensions.Net
{
/// <summary>
/// Builds an HttpClient object
/// </summary>
/// <returns></returns>
/// <remarks></remarks>
public class HttpClientBuilder : HttpClient
{
/// <summary>
... |
Python | UTF-8 | 1,336 | 3.15625 | 3 | [] | no_license | # Library for opening url and creating
# requests
import urllib.request
# pretty-print python data structures
from pprint import pprint
# for parsing all the tables present
# on the website
from html_table_parser import HTMLTableParser
# for converting the parsed data in a
# pandas dataframe
import... |
Python | UTF-8 | 452 | 3.484375 | 3 | [] | no_license | import math
coordinates = [int(x) for x in input().split()]
goat = coordinates[:2]
bottom_left = coordinates[2:4]
top_right = coordinates[4:]
x = 0
y = 0
if goat[0] < bottom_left[0]:
x = bottom_left[0]
elif goat[0] < top_right[0]:
x = goat[0]
else:
x = top_right[0]
if goat[1] < bottom_left[1]:
y = bott... |
C# | UTF-8 | 1,130 | 2.609375 | 3 | [
"MIT"
] | permissive | using System;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
namespace WebRocket.Client.Wrappers {
public class ClientWebSocket : IClientWebSocket {
public ClientWebSocket(System.Net.WebSockets.ClientWebSocket socket) {
mSocket = socket;
}
public WebSocketState... |
Java | UTF-8 | 1,741 | 2.75 | 3 | [] | no_license | package cz.cuni.mff.d3s.demo.uptime;
import cz.cuni.mff.d3s.demo.SimulationConstants;
public class SingleEventUptimeDecider implements
ComponentUptimeDeciderGenerator {
private int iteration;
private int numToAdd;
private int numToKill;
public SingleEventUptimeDecider(int iteration, int numToAdd, ... |
Markdown | UTF-8 | 1,316 | 2.875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Using functional programming for Exception Handling
bigimg: /img/image-header/factory.jpg
tags: [Functional Programming]
---
<br>
## Table of contents
- [Given problem](#given-problem)
- [Solution for using functional programming]()
- [Benefits and Drawbacks]()
- [When to use]()
- [Wrapping ... |
Python | UTF-8 | 334 | 2.90625 | 3 | [] | no_license | user_result = {'id':'아이디', 'pw':'패스워드비밀번호', 'name':'이름'}
item_list = ['id', 'pw', 'name']
session_list = {}
for item in item_list:
this = user_result[item]
session_list[item] = this
print('--------------')
print(session_list)
print('--------------')
session_list['id'] = 'skmdks'
print(session_list) |
C++ | UTF-8 | 340 | 2.75 | 3 | [] | no_license | #pragma once
#include "AuxStructures/Point.h"
#include <vector>
template<typename Node, typename Point>
class EstructuraBase {
protected:
Node* root;
public:
virtual void insert(Point) = 0;
virtual Node* search(Point) = 0;
virtual std::vector<Node*> range(Point,Point) = 0;
virtual Point* nearest_nei... |
Python | UTF-8 | 4,505 | 3 | 3 | [] | no_license | #Part1
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
np.random.seed(10)
# Importing the dataset
dataset = pd.read_csv('Churn_Modelling.csv')
X= dataset.iloc[:, 3:13].values
y = dataset.iloc[:, 13].values
# Encoding categorical data
# Encoding the Independent Varia... |
JavaScript | UTF-8 | 2,056 | 2.59375 | 3 | [] | no_license | import {Layer, Registerable, Serializable, LayerProxy, expose} from '../../..';
describe('Parent layer', () => {
test('Parent call', () => {
class BaseMath extends Serializable(Registerable()) {
constructor({a, b, ...object} = {}, {isDeserializing} = {}) {
super(object, {isDeserializing});
... |
Shell | UTF-8 | 1,949 | 3.53125 | 4 | [] | no_license | #!/bin/sh
function showForm() {
cat <<EOT
<h1 class="page-header">"xoops_trust_path" Settting</h1>
<form method="get" class="form-horizontal">
<div class="control-group">
<label class="control-label" for="TRUST">xoops_trust_path : </label>
<div class="controls">
<input id="TRUST" name="TRUST" class="sp... |
Markdown | UTF-8 | 1,886 | 2.65625 | 3 | [] | no_license | # Projeto de Servidor TCP e Client
### 1 - Clonar repositório para maquina local
### 2 - Subir o Servidor TCP
+ Acessar a pasta *tcp-project/java-server-project* pelo cmd ou powershell
+ Rodar comando:
`mvn clean install`
+ Rodar comando:
`mvn exec:java "-Dexec.mainClass=com.personal.tcp.Server"`
### 3 -... |
Python | UTF-8 | 14,100 | 3.828125 | 4 | [
"MIT"
] | permissive | import copy
class AStarTrack(object):
# 初始化类
def __init__(self,x,y,print=None):
self._x = x
self._y = y
self._print = print #print用于判断是否需要打印地图至cmd
self._open = [] #open列表会记录所有被扫描过的点的坐标,这些坐标会被优先处理
self._close = [] #close列表会记录所有已经计算过的点的坐标,这些坐标不会再被计算
self._trace =... |
JavaScript | UTF-8 | 6,639 | 2.59375 | 3 | [] | no_license | var io = require('../server');
const Lobby = require('../models/lobby');
const Player = require('../models/player');
const Tank = require('../models/tank');
var lobbies = {};
var socketHashMapList = {};
module.exports = { lobbies, socketHashMapList };
io.on('connection', (socket) => {
console.log("A new socket c... |
JavaScript | UTF-8 | 1,319 | 2.984375 | 3 | [] | no_license | import React,{useState} from 'react'
import {format} from 'date-fns'
function App() {
const [state,setState]=useState('')
const [state1,setState1]=useState('')
const [state2,setState2]=useState('')
const [item,setItem]=useState([])
const [clr,setClr]=useState(false)
const call=(event)=>{
setState(e... |
Rust | UTF-8 | 4,168 | 2.6875 | 3 | [
"MIT"
] | permissive | use crate::kv::{
encode, DeleteRangeRequest, DeleteRangeResponse, PutRequest, PutResponse, RangeRequest,
RangeResponse, ResponseHeader,
};
use serde::{Deserialize, Serialize};
#[derive(Debug, Eq, PartialEq, Serialize, Deserialize)]
pub enum CompareResult {
EQUAL,
GREATER,
LESS,
#[serde(rename =... |
Python | UTF-8 | 4,930 | 3.140625 | 3 | [] | no_license | import numpy as np
import cv2
class ImageManager:
'''
Class to be used to store the acquired images split in two channels and methods useful for cell identification and roi creation
'''
def __init__(self,dim_h, dim_v, half_side, min_cell_size):
zeros_im = np.zeros((dim_v,dim_h),dtype=np.uin... |
C++ | UTF-8 | 4,864 | 2.96875 | 3 | [] | no_license | #include <stdio.h>
#include <time.h>
#include <string.h>
#include <vector>
#include <glm.hpp>
#include <gtc/matrix_transform.hpp>
#include <Raytracer/Raytracer.h>
#include <Rasterizer/SimpleRasterizer.h>
#include <Windowing/DisplayWindow.h>
using namespace glm;
using namespace Rasterizer;
using namespace Raytrace... |
Java | UTF-8 | 323 | 1.617188 | 2 | [
"MIT"
] | permissive | package dbuchta.gitlab.issue.exporter.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
@Generated("com.robohorse.robopojogenerator")
public class IdentitiesItem{
@JsonProperty("provider")
private String provider;
@JsonProperty("extern_uid")
private String externUid... |
Shell | UTF-8 | 2,747 | 2.796875 | 3 | [] | no_license | #!/bin/bash
WHAT=$1; if [[ "$1" == "" ]]; then echo "monojet.sh <what>"; exit 1; fi
if [[ "$HOSTNAME" == "cmsphys06" ]]; then
T="/data1/emanuele/monox/TREES_25ns_1LEPSKIM_23NOV2015";
J=6;
else
T="/cmshome/dimarcoe/TREES_060515_MET200SKIM";
J=6;
fi
COREOPT="-P $T --s2v -j $J -l 2.11 -W vtxWeight "
CORE... |
Python | UTF-8 | 1,336 | 2.859375 | 3 | [] | no_license | x, y = map(int, input().split())
lis = []
for i in range(x):
lis.append(list(input()))
BW = [[0 for _ in range(y)] for _ in range(x)]
WB = [[0 for _ in range(y)] for _ in range(x)]
# BW 테스트
for i in range(x):
for j in range(y):
if (i+j)%2 == 0:
if lis[i][j] == "B":
pass
... |
Swift | UTF-8 | 4,307 | 2.84375 | 3 | [] | no_license | //
// DetailViewController.swift
// Network Example
//
// Copyright © 2016 Elon Rubin. All rights reserved.
//
import Foundation
import UIKit
class DetailViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet weak var postTitle: UILabel!
@IBOutlet weak var postAuthor: UI... |
Markdown | UTF-8 | 2,496 | 2.953125 | 3 | [] | no_license | # Neighborhood-Map
This is a Chicago Neighborhood Map displaying some tourist attractions, restaurants, cafes and subway stations, on the list in the right pane as well as with the corresponding markers on the map. It is built with KnockoutJS framework using some Google Map APIs and some external APIs such as Wikipedi... |
Markdown | UTF-8 | 466 | 2.890625 | 3 | [] | no_license | # OOP-Assignment-1
The assignment goal is to practice the following concepts:
• Class design
• Collections
• Inheritance and substitution
In this assignment you will implement a Polynomial Calculator. The Calculator
will allow the user to compute polynomial addition, polynomial multiplication, and other services.
... |
Java | UTF-8 | 1,476 | 2.15625 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright © 2020 IBM Corp. All rights reserved.
*
* 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 required by applicable law... |
Java | UTF-8 | 13,675 | 1.671875 | 2 | [
"CC0-1.0"
] | permissive | /*
* 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 quickstore.controller;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.i... |
Java | UTF-8 | 119 | 1.851563 | 2 | [] | no_license | package interfaces;
public interface CallbackEnabledLeftGraph {
void onCallbackEnabledLeftGraph(String value);
}
|
C | UTF-8 | 978 | 2.71875 | 3 | [] | no_license | #ifndef _LEVEL_H
#define _LEVEL_H
#include "rooms.h"
typedef struct level* level_t;
enum level_tile_mask
{
LEVEL_TILE_BOTTOM = 1,
LEVEL_TILE_LEFT = 2,
LEVEL_TILE_RIGHT = 4,
LEVEL_TILE_TOP = 8,
LEVEL_TILE_TYPEMASK = 255,
};
#define TILE_TYPE_SHIFT 8
#define LEVEL_TILE_SIZE 16.0f
level_t level_create(rooms_... |
SQL | UTF-8 | 2,386 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 02, 2021 at 08:05 AM
-- Server version: 5.7.24
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
C++ | UTF-8 | 3,628 | 3.078125 | 3 | [] | no_license | #include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
class Image{
private: string filename;
public:
double currentScore;
double expectedWin;
Image(string _filename) : filename(_... |
Java | UTF-8 | 532 | 3.5625 | 4 | [] | no_license | package es.cj.fundamentos01.datos;
import java.util.Scanner;
public class EjercicioTres {
// Pedir el radio de un circulo y calcular su area y su longitud
private static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
System.out.println("Radio: ");
double radio = sc... |
C | UTF-8 | 338 | 3.015625 | 3 | [] | no_license |
///getting the current directory name for shell
void get_direc_name(char *var, int iscommand){
char temp[MAX_PATH];
char *path = getcwd(temp,sizeof(temp));
if(path!=NULL){
strcpy(var,temp);
if(iscommand==1){
printf("%s%s\n%s",COLOR_YELLO,var,COLOR_BLUE);
}
}
else{
printf("error in get... |
Java | UTF-8 | 782 | 2 | 2 | [] | no_license | package com.app.interfaces;
import com.app.interfaces.fallback.ProductFallbackFactory;
import com.app.interfaces.response.ProductResponse;
import com.app.interfaces.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframe... |
SQL | UTF-8 | 111 | 3.109375 | 3 | [] | no_license | SELECT a.FirstName,a.LastName,b.City,b.State
FROM Person as a left join Address as b on a.PersonID = b.PersonID |
Java | UTF-8 | 1,195 | 2.828125 | 3 | [
"MIT"
] | permissive | package command;
import java.awt.geom.Point2D;
import models.MCircleElement;
import models.MElement;
import models.MGraphSlot;
import models.MSquareElement;
import models.MTriangleElement;
public class AddElementCommand extends AbstractCommand{
MGraphSlot model;
MElement element = null;
String type;
Point2D... |
Python | UTF-8 | 2,771 | 2.734375 | 3 | [] | no_license | import os
import pickle
from shutil import which
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from config import HEADLESS_MODE, SELENIUM_TIMEOUT, TRANSLATION_DICTIONARY_FILENAME
def make_headless_selenium_driver(headless_mode=HEADLESS_MODE, timeout=SELENIUM_TIMEOUT):
bi... |
Java | UTF-8 | 4,959 | 2.484375 | 2 | [] | no_license | package ios;
import helper.MobileTestingHelper;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterClass... |
Markdown | UTF-8 | 3,362 | 3.546875 | 4 | [] | no_license | # Your First Rails Application (OUT OF DATE)
So you’ve installed RVM, installed Ruby, and installed rails. Now what?
I’m going to take you through the first steps to develop your first rails application.
It is going to be a simple blog with a static home page. In future episodes,
we will expand on this blogging applic... |
Java | UTF-8 | 10,396 | 2.03125 | 2 | [] | no_license | package com.prateekraina.gamersden;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextWatcher;
import androi... |
Markdown | UTF-8 | 6,631 | 2.6875 | 3 | [] | no_license | # 禅道 11.6版本 任意文件读取漏洞
## 漏洞描述
禅道 11.6 版本中对用户接口调用权限过滤不完善,导致调用接口执行SQL语句导致SQL注入
## 影响版本
> [!NOTE]
>
> 禅道 11.6
## 环境搭建
这里使用docker环境搭建
```
docker run --name zentao_v11.6 -p 8084:80 -v /u01/zentao/www:/app/zentaopms -v /u01/zentao/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d docker.io/yunwisdom... |
Go | UTF-8 | 1,249 | 2.890625 | 3 | [
"BSD-2-Clause"
] | permissive | // Copyright (c) 2015, Nick Patavalis (npat@efault.net).
// All rights reserved.
// Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE file.
// +build linux freebsd netbsd openbsd darwin dragonfly solaris
// Bit-twiddling convenience methods for type TcFlag
package termios... |
Python | UTF-8 | 4,179 | 3.3125 | 3 | [] | no_license | import _sqlite3 as db
class Transaction():
def __init__(self):
'''
Инициализируем новую базу данных для хранения транзакций
'''
self.conn = db.connect('transaction.db')
self.cursor = self.conn.cursor()
sql_query = '''
create table if not exi... |
Java | UTF-8 | 1,034 | 2.640625 | 3 | [] | no_license | package shooting;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.util.Random;
import gameListener.GameKeyLisener;
import panels.MainFrame;
public class Player {
/**GameKeyListener Class*/
private GameKeyLisener key;
private MainFrame mf;
private Game2 game2;
private int x=320... |
SQL | UTF-8 | 191 | 2.703125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-27T04:16:00Z' AND timestamp<'2017-11-28T04:16:00Z' AND SENSOR_ID='d762ed2e_ba0e_4761_9c46_d797bcc5024b'
|
Markdown | UTF-8 | 3,048 | 2.765625 | 3 | [
"MIT"
] | permissive | # Fingerprinter
````
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@################################@
@######## ########@
@######## ########@
@######## ################@
@######## ################@
@######## ################@
@######## ##########@
@######## ... |
C# | UTF-8 | 318 | 2.609375 | 3 | [
"Apache-2.0",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference",
"CC-BY-4.0",
"OFL-1.0",
"MIT",
"LicenseRef-scancode-public-domain-disclaimer",
"OFL-1.1"
] | permissive | namespace Philadelphia.Web {
public static class EventSourceExtensions {
public static ConnectionReadyState GetRichReadyState(this EventSource self) {
//https://www.w3.org/TR/eventsource/#dom-eventsource-readystate
return (ConnectionReadyState)self.readyState;
}
}
}
|
Java | UTF-8 | 2,561 | 2.828125 | 3 | [] | no_license | package entity;
import java.io.IOException;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.GL11;
import org.newdawn.slick.Color;
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;
import org.newdawn.slick.util.ResourceLoader;
import world.World;
public abstract class E... |
Python | UTF-8 | 202 | 2.609375 | 3 | [] | no_license | import requests
url = ""
data = {}
headers = {"Content-Type": "application/json;charset=UTF-8"}
res = requests.request("post", url, json=data, headers=headers)
print(res.status_code)
print(res.text)
|
C++ | UTF-8 | 9,202 | 3.390625 | 3 | [
"MIT"
] | permissive | #include "pch.h"
#include "BinarySearchTree.h"
#include <iostream>
#include <stdexcept>
#include <string>
using namespace std;
// We will not be treating this in the same manner as a map/dictionary even though that's usually the purpose of a tree.
// This tree can support insert, search, and delete for integers.
// C... |
Markdown | UTF-8 | 2,166 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | # Anno-Go
[](https://travis-ci.com/github/jhump/annogo/branches)
[](https://goreportcard.com/report/github.com/jhump/annogo)
[;
const server = dgram.createSocket('udp4');
const firebase = require('firebase');
const config = {
apiKey: "AIzaSyCwMUc5a8vSP7XGyQB6mvmWUoYpNSxmW0M",
authDomain: "symbiote-demo.firebaseapp.com",
databaseURL: "https://symbiote-demo.firebase... |
Python | UTF-8 | 3,593 | 3.078125 | 3 | [] | no_license | #!/usr/bin/python\<nl>\
# -*- coding: utf-8 -*-
"""
@author nik |
"""
# required librairies
import random
from column_water_vapor import *
# helper functions
def random_window_size():
"""
"""
return random.randint(7, 21)
def random_adjacent_pixel_values(pixel_modifiers):
"""
"""
return [ran... |
Markdown | UTF-8 | 1,623 | 2.75 | 3 | [] | no_license | +++
Title = ""
Description = ""
+++
<div class="wrapper">
<article>
<h1>Coderdojo-Nürnberg</h1>
<p>Hier kommt ganz viel Text über das Coderdojo-Nürnberg.</p>
</article>
<aside class="sidebar">
<div class="sidebar-box">
<h2>Das sind wir</h2>
<img src="/images/... |
Java | UTF-8 | 1,761 | 2.578125 | 3 | [] | no_license | /*
* (C) Nhu-Huy Le, nle@hm.edu
* (C) Mathias Long Yan, myan@hm.edu
* Oracle Corporation Java 1.8.0
* Microsoft Windows 7 Professional
* 6.1.7601 Service Pack 1 Build 7601
*/
package vss.rmi.diningphilos.server.n.remote.objects;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObj... |
PHP | UTF-8 | 670 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace TSK\StudentBundle\Event;
use Symfony\Component\EventDispatcher\Event;
use TSK\StudentBundle\Form\Model\StudentRegistration;
use TSK\StudentBundle\Entity\Student;
class StudentPostRegistrationEvent extends Event
{
protected $student;
protected $studentRegistration;
public function __constr... |
Java | UTF-8 | 4,920 | 3.609375 | 4 | [] | no_license |
public class Board {
private Piece[][] board=new Piece[8][8];
public Player player1;
public Player player2;
public int turn;//Determines whos turn it is
public Board() {
for(int i=0; i<8; i++) {
for(int j=0; j<8; j++) {
//put pieces on the board
board[i][j]=null;
}
}
this.playe... |
Java | UTF-8 | 8,673 | 2.34375 | 2 | [] | no_license |
package org.mgnl.nicki.verify;
/*-
* #%L
* nicki-verify
* %%
* Copyright (C) 2017 Ralf Hirning
* %%
* 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... |
PHP | UTF-8 | 862 | 3.1875 | 3 | [] | no_license | <?php
namespace System\DataAnnotations;
/**
* Description of RequiredAttribute
*
* @author Edgar
*/
class RequiredAttribute extends ValidationAttribute
{
/**
*
* @var bool
* @access private
*/
private $_allowEmptyStrings;
/**
*
* @param string $errorMessage
* @pa... |
Java | UTF-8 | 285 | 1.53125 | 2 | [] | no_license | package X;
/* renamed from: X.10s reason: invalid class name and case insensitive filesystem */
public class C222610s {
public static final boolean A00 = (!Boolean.parseBoolean(null));
static {
Boolean.parseBoolean(null);
Boolean.parseBoolean(null);
}
}
|
Java | UTF-8 | 370 | 2.53125 | 3 | [] | no_license | package com.st.javaschool.rnd.intro;
import com.st.javaschool.rnd.intro.test.MySecondClass;
public class MyFirstClass {
public static void main(String[] args) {
if (args.length == 0) {
System.out.println("Hello World!");
return;
}
MySecondClass secClass = new MySec... |
Markdown | UTF-8 | 15,931 | 2.78125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | ---
geometry: margin=1in
---
# Web Checkers Application Design Documentation
## Team Information
* Team name: GuineaPigs
* Team members
* Edward Herrin
* Jisook Moon
* Jack Xu
* Xavier Brooks
* David Malik
## Executive Summary
> _This product is a client/server product that allows people to p... |
Java | UTF-8 | 75 | 1.945313 | 2 | [] | no_license |
abstract class T843abstract7 {
abstract private void foo();
}
|
C++ | UTF-8 | 2,445 | 3 | 3 | [
"MIT"
] | permissive | #pragma once
#include <SequenceTrack.hpp>
class Recorder {
public:
SequenceTrack track; ///< Track data for visualization.
std::mutex mtxTrack; ///< Protect @ref track.
std::vector<std::pair<double, std::vector<unsigned char>>> rawRecordedData; ///< Raw MIDI data received during recordin... |
C++ | UTF-8 | 1,075 | 3.5 | 4 | [] | no_license | //Prefix 1d done below
#include<iostream>
using namespace std;
int main(){
// int arr[10][10]= { {1,4,2,5},
// {3,2,5,2},
// {2,8,9,1},
// {8,2,4,1}};
int arr[100][100]={{1,1},
{1,1}};
int n=2;
int ... |
TypeScript | UTF-8 | 4,286 | 3.484375 | 3 | [
"MIT"
] | permissive | import {WordOrderMatcher} from "../WordOrderMatcher";
import {IWordOrderMatchInput} from "../_types/IWordOrderMatchInput";
import {IWordOrderMatch} from "../_types/IWordOrderMatch";
/**
* Retrieves the indices of matches
* @param matches The found match data
* @returns The indices of the matches in the original inp... |
C++ | UTF-8 | 2,292 | 2.84375 | 3 | [] | no_license | #include <echo/linear_algebra/singular_value_decomposition.h>
#include <echo/linear_algebra/product.h>
#include <echo/linear_algebra/matrix.h>
#include <echo/linear_algebra/transpose.h>
#include <echo/intel_execution_context.h>
#include <echo/numeric_array/test.h>
#include <echo/test.h>
using namespace echo;
using nam... |
Go | UTF-8 | 11,154 | 2.625 | 3 | [] | no_license | package main
import (
"database/sql"
"errors"
"fmt"
"github.com/coopernurse/gorp"
_ "github.com/mattn/go-sqlite3"
"strconv"
"strings"
"time"
)
type Parameter struct {
Name string `db:"name"`
Value string `db:"value"`
}
type Stock struct {
// db tag lets you specify the column name if it differs from the ... |
Python | UTF-8 | 277 | 3.546875 | 4 | [] | no_license | length = int(input("집의 크기는 얼마로 할까요?"))
import turtle
t=turtle.Turtle()
t.shape("turtle")
t.forward(length)
t.left(120)
t.forward(length)
t.left(120)
t.forward(length)
t.left(30)
t.forward(length)
t.left(90)
t.forward(length)
t.left(90)
t.forward(length)
|
Python | UTF-8 | 996 | 2.65625 | 3 | [] | no_license | from flask import Flask, jsonify, abort, make_response
import peewee
db = peewee.SqliteDatabase("/root/data.db")
class Flow(peewee.Model):
in_port = peewee.IntegerField()
mac_address = peewee.TextField()
out_port = peewee.IntegerField()
datapath = peewee.TextField()
class Meta:
databa... |
C++ | UTF-8 | 264 | 2.515625 | 3 | [] | no_license | #pragma once
#include "../../common/common.h"
__declspec(align(16)) class IAlignedObject
{
public:
inline void* operator new( size_t size )
{
return _aligned_malloc(size,16);
};
inline void operator delete( void* block )
{
_aligned_free(block);
};
}; |
Python | UTF-8 | 1,154 | 3.0625 | 3 | [] | no_license | # coding:utf8
import os
from pyPdf import PdfFileWriter, PdfFileReader
def split(in_file, start, end, out_file):
# 读取文件流
input_stream = file(in_file, 'rb')
# pdf 读取器
pdf_input = PdfFileReader(input_stream)
# 获取 pdf 张数
page_count = pdf_input.getNumPages()
# 校验参数
if s... |
Java | UTF-8 | 408 | 2.203125 | 2 | [
"Apache-2.0"
] | permissive | package org.cobbzilla.util.error;
import java.util.concurrent.atomic.AtomicReference;
public class GeneralErrorHandlerBase implements GeneralErrorHandler {
public static final GeneralErrorHandlerBase instance = new GeneralErrorHandlerBase();
public static AtomicReference<GeneralErrorHandler> defaultErrorHand... |
Java | UTF-8 | 745 | 2 | 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 com.sam.testassignment1.repositories;
import com.sam.testassignment1.dtos.Movies;
import com.sam.testassignment1.dtos.... |
Markdown | UTF-8 | 10,005 | 2.765625 | 3 | [] | no_license | # Opinion Poll by 40dB for Prisa, 22–28 February 2022
<p align="center"><a href="#voting-intentions">Voting Intentions</a> | <a href="#seats">Seats</a> | <a href="#coalitions">Coalitions</a> | <a href="#technical-information">Technical Information</a></p>
## Voting Intentions
![Graph with voting intentions not yet p... |
C | UTF-8 | 600 | 3.046875 | 3 | [] | no_license | #include <stdio.h>
int main() {
int w, h, f;
scanf("%d %d %d", &w, &h, &f);
int k = h-1;
for(int i = 0 ; i < h ; i++){
if(f == 2){
for(int j = 0 ; j < k ; j++){
printf(" ");
}
}
else if(f == 1){
for(int j = k+1 ; j < h ; j++){
... |
Java | UTF-8 | 2,665 | 2.90625 | 3 | [] | no_license | package com.algoexpert.veryhard.maxktransaction;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class ProgramTest {
@Test
public void TestCase1() {
int[] input = {};
assertThat(Program2.maxProfitWithKTransactions(input, 1)).isEqualTo(0);
}
@Test
... |
Python | UTF-8 | 552 | 2.546875 | 3 | [
"MIT"
] | permissive | import os
import subprocess
sizes = [16, 24, 32, 48, 57, 64, 76, 96, 120, 128, 144, 152, 180, 192, 195, 196, 228, 270, 512]
if __name__ == '__main__':
publicFolder = f'{os.path.dirname(os.path.abspath(__file__))}/public'
filePath = f'{publicFolder}/icon.svg'
if os.path.exists(filePath):
os.mkdir(f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.