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 |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 1,328 | 3.421875 | 3 | [] | no_license | # https://leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/580/week-2-january-8th-january-14th/3599/
from typing import List
import bisect
MOD = 1000000007
class Solution:
def createSortedArray(self, instructions: List[int]) -> int:
nums = []
costs = 0
for n in instru... |
C++ | UHC | 1,510 | 2.921875 | 3 | [] | no_license | #include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <list>
using namespace std;
vector<vector<int>>adj;
vector<bool>visited;
vector<bool>discovered;
queue<int>q;
vector<int>dfsOrder;
vector<int>bfsOrder;
//dfs,bfs Լ
//Է main ޱ
void dfs(int v) {
visited[v] = true;
... |
Python | UTF-8 | 355 | 2.9375 | 3 | [] | no_license | liczby = open('/Users/jakubchudon/Desktop/matura2019/pierwsze.txt')
tablica=[]
for linia in liczby:
liczba1=linia.split()
liczba=int(liczba1[0])
odwrotna=int(str(liczba)[::-1])
tablica.append(odwrotna)
for x in tablica:
for dzielnik in range(2,x):
if x% dzielnik ==0:
break
el... |
PHP | WINDOWS-1250 | 1,229 | 2.734375 | 3 | [] | no_license |
<?php
//$Usuario = strtolower(htmlentities($HTTP_POST_VARS["Usuario"], ENT_QUOTES));
//$Usuario = htmlentities($HTTP_POST_VARS["Usuario"], ENT_QUOTES);
// conecion a la base de datos
$conn_access = odbc_connect ("captahuellas", "", "");
$rs_access = odbc_exec ($conn_access, "select USERID, CHECKTIME from CHECKINOU... |
Python | UTF-8 | 5,190 | 3.34375 | 3 | [] | no_license | """ Pour une matrice (n,n) on cherchera comment placer k points
dans la matrice de telle sorte que tout point de la matrice soit
à une distance minimal d'un des points 'k'."""
from random import randint
import matplotlib.pyplot as plt
from time import time
import os
import copy
n = 75
M = [[(i,j) for j in range(n)]... |
Markdown | UTF-8 | 1,818 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | # Key Management
Hoard acts much like a conventional password store; we symmetrically encrypt the given data with it's original hash then store it at an address determined by the hash of the encrypted data. Compare this with a typical setup where a user's password is hashed and authentication is based on whether the u... |
C++ | UTF-8 | 8,907 | 2.6875 | 3 | [
"MIT"
] | permissive | #include <algine/algine_renderer.h>
#include <GL/glew.h>
#include <algine/texture.h>
#include <algine/framebuffer.h>
#include <algine/renderbuffer.h>
namespace algine {
void pointer(const int location, const int count, const uint buffer, const uint stride, const void *offset) {
glBindBuffer(GL_ARRAY_BUFFER, buffe... |
Java | UTF-8 | 9,616 | 1.882813 | 2 | [] | no_license | package database.dao.userpast;
import models.share.Share;
import models.userpast.UserPastUnit;
import play.Logger;
import play.db.DB;
import play.db.jpa.JPQL;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Time;
import java.text.SimpleDateFormat;
import java.uti... |
Java | UTF-8 | 2,955 | 2.125 | 2 | [] | no_license | package cn.xinzhili.chat.service;
import cn.xinzhili.chat.api.RoleType;
import cn.xinzhili.chat.bean.UserBean;
import cn.xinzhili.chat.client.UserServiceClient;
import cn.xinzhili.chat.util.UserFactory;
import cn.xinzhili.user.api.UserRole;
import cn.xinzhili.user.api.error.UserErrorCode;
import cn.xinzhili.user.api.r... |
PHP | UTF-8 | 941 | 2.984375 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
class pekerjaan{
public function kerjaan(){
echo "Work address: Surabaya <br>";
echo "Company: PT. Aneka Usaha <br>";
echo "Company address: Surabaya <br>";
echo "Posisition: CEO <br>";
echo "NPWP... |
Markdown | UTF-8 | 15,418 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | ---
navTitle: Upgrades
title: Application Schema Upgrades
originalFilePath: upgrades.md
---
In this chapter we discuss upgrading software on a EDB Postgres Distributed cluster and how
to minimize downtime for applications during the upgrade.
## Overview
EDB Postgres Distributed cluster has two sets of software, the ... |
PHP | UTF-8 | 865 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cheetahmail\Data\Subscribers;
class UnsubscribeByTisIdResponse
{
/**
* @var boolean $UnsubscribeByTisIdResult
*/
protected $UnsubscribeByTisIdResult = null;
/**
* @param boolean $UnsubscribeByTisIdResult
*/
public function __construct($UnsubscribeByTisIdResult)
... |
Python | UTF-8 | 1,176 | 2.953125 | 3 | [] | no_license | from django.db import models
class User(models.Model):
'''This class simulates a user with a name,username and e-mail as attributes'''
name = models.CharField(max_length=200)
lastname=models.CharField(max_length=200)
email = models.EmailField(max_length=70) #unique=True
def __str__(self):
'''this function retu... |
Python | UTF-8 | 626 | 2.765625 | 3 | [] | no_license | num=int(input())
s=input()
oldNum = 0
cnt = 0
end = num - 1
chars = list(s)
flag,i=0,0
while i<end :
if flag==1:
break
for j in range(end,i-1,-1) :
if(i == j):
if(num % 2==0 or oldNum == 1):
print("Impossible")
flag=1
break
... |
Markdown | UTF-8 | 3,124 | 2.53125 | 3 | [] | no_license | # Data Narrative
This file describes how the data was curated into BIDS after it was de-identified.
For more details, see the commit history of this repository.
Note: In this special case, original data is stored in
`/cbica/projects/RBC/RBC_RAWDATA/bidsdatasets/HRC`
# Transfer Process
The data were acquired at [SI... |
Markdown | UTF-8 | 4,191 | 2.59375 | 3 | [] | no_license | # Ch9 - Labels and Legends
```r
library(lattice)
```
Topics covered:
- Labels (main, sub, xlab, ylab)
- Legends, color keys
- Legends in grouped displays; auto.key
- Dropping unused levels of grouping variable
- Page annotation
```r
data(Cars93, package = "MASS")
table(Cars93$Cylinders)
```
```
##
## 3 ... |
Java | UTF-8 | 1,735 | 2.375 | 2 | [] | no_license | package com.nearsoft.training.library.model;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.... |
C++ | UTF-8 | 7,448 | 2.71875 | 3 | [] | no_license | #include "widget.h"
#include "ui_widget.h"
#include "nmmatrix.h"
#include <ctime>
/* Init properties */
Widget::Widget(QWidget *parent):QWidget(parent), ui(new Ui::Widget) {
lastX = 0;
lastY = 0;
alpha = 0;
beta = 0;
prismN = 3;
prismR = 4;
prismH = 4;
pyramidR = 4;
pyramidH = 4;... |
Python | UTF-8 | 31,473 | 2.65625 | 3 | [] | no_license | import os
from datetime import datetime
from math import sqrt
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import preprocessing, metrics
from sklearn.metrics import confusion_matrix, classification_report
from sklearn.metrics.pairwise import cosine_similarity
from pycaret.regression import *
fro... |
Swift | UTF-8 | 3,574 | 2.609375 | 3 | [] | no_license | //
// ViewController.swift
// RecipeApp
//
// Created by Callie on 4/8/20.
// Copyright © 2020 Tu (Callie) T. NGUYEN. All rights reserved.
//
import UIKit
import PKHUD
class ViewController: UIViewController {
@IBOutlet weak var tableView: UITableView! {
didSet {
tableView.register(UIN... |
Shell | UTF-8 | 109 | 2.515625 | 3 | [] | no_license | #!/bin/bash
cat /etc/passwd |awk -F : '$3>500 && $3<5000{print "username: "$1," uid is "$3," gid is "$4}'
|
Java | UTF-8 | 652 | 2.296875 | 2 | [] | no_license | package com.example.demo.eventman;
import org.springframework.context.ApplicationEvent;
import com.example.demo.model.Vehicle;
public class EmptyTankEvent extends ApplicationEvent{
private static final long serialVersionUID = 4939990986618611229L;
private float remainingGas;
private Vehicle vechile;
public E... |
Shell | UTF-8 | 1,223 | 3.484375 | 3 | [] | no_license | #!/bin/bash
# This is just to be able to gauge the oreder things; it's not a super-rigorous benchmark.
# Times aren't really repoducible, but the order they fall in is.
# Check they're all on the path
path_to_t=$(which t)
if [ ! -x "$path_to_t" ] ; then
printf "t not found. Please install with 'sudo gem install t'... |
Python | UTF-8 | 367 | 3.3125 | 3 | [] | no_license | length = 12
count = 0
altcount = 0
for altcount in range(0,length+1):
display = "x"
if altcount == 0:
for count in range(1,length+1):
display+= " " +str(count)
print display
else:
display = str(altcount)
for count in range(1,length+1):
display += " "... |
C++ | UTF-8 | 1,508 | 2.671875 | 3 | [] | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cmath>
#include <cctype>
#include <cstdint>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
#include <vector>
#include <map>
#include <unordered_set>
#include <stack>
#include <queue>
#includ... |
C++ | UTF-8 | 702 | 3.28125 | 3 | [] | no_license | class Solution {
public:
string removeKdigits(string& num, int k)
{
if(k <= 0)
{
return num;
}
int i = 0;
for(; i < num.length() - 1; i++)
{
if(num[i] > num[i + 1])
{
break;
}
}
if(nu... |
Markdown | UTF-8 | 2,471 | 2.953125 | 3 | [] | no_license |
## Scenario
Windows employs two major file systems, NTFS or FAT32, while EXT is the de factor file system for Linux. When an operating system is changed from Linux to Windows after reinstallation, the data disk remains in its original format. Therefore, the system might not be able to access data disk’s file system. I... |
C++ | UTF-8 | 883 | 2.8125 | 3 | [] | no_license | #ifndef _WORDBST_H_
#define _WORDBST_H_
#include "WordNode.h"
class WordBST
{
private:
WordNode * root; // Word BST Root
void R_Preorder(WordNode * node);
void R_Inorder(WordNode * node);
void R_Postorder(WordNode * node);
void I_Preorder(); // Preorder traversal
void I_Inorder();
void I_Postorder();
void I_L... |
Rust | UTF-8 | 611 | 2.8125 | 3 | [] | no_license | use crate::game::card::object::Card;
use ::bevy::prelude::*;
use bevy_text_mesh::TextMesh;
impl Card {
fn text(&self) -> String {
let mana_cost = self.proto.cost.mana;
format!(
"[ {mana_cost} ]
some longer strings in my wonderful game"
)
}
}
pub fn update_text_meshes(cards:... |
JavaScript | UTF-8 | 3,047 | 2.65625 | 3 | [] | no_license | $(function () {
$("#signupForm").validate({
// 검증할 규칙 rules에 명시 - 각 요소의 이름에 사용
rules:{
username:{ //필수, 2-4
required : true,
minlength : 2,
maxlength : 4
},
password:{// 필수, 8-15
required : true,
... |
Java | ISO-8859-1 | 3,860 | 2.640625 | 3 | [] | no_license | package engine;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.junit.runner.JUnitCore;
import org.junit.runner.Request;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
imp... |
Markdown | UTF-8 | 657 | 2.96875 | 3 | [
"MIT"
] | permissive | # zmdb
A database platform that operates with HTTP requests. Made with Java Spring.
# Running
First, download the .jar from the latest release. To run without viewing logs, just run the .jar. To view logs, run the file in cmd by typing "java -jar 'FILEPATH'", where FILEPATH is the location where the .jar was downloade... |
C++ | UTF-8 | 1,084 | 2.78125 | 3 | [
"MIT"
] | permissive | #include <Adafruit_NeoPixel.h>
#define DATA_PIN 4
#define NUM_PX 12
Adafruit_NeoPixel strip = Adafruit_NeoPixel(
NUM_PX,
DATA_PIN,
NEO_GRB + NEO_KHZ800
);
int dataPin = 4;
int pixels = 12;
int pixel = 0;
int col_mode = 0;
void colorWipe(uint32_t c) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
... |
Shell | UTF-8 | 613 | 3.3125 | 3 | [] | no_license | #!/bin/sh
if [ "`git status -s`" ]
then
echo "The working directory is dirty. Please commit any pending changes."
exit 1;
fi
echo "Deleting old publication"
rm -rf dist
mkdir dist
git worktree prune
rm -rf .git/worktrees/dist/
echo "Checking out gh-pages branch into dist"
git worktree add -B gh-pages dist or... |
Python | UTF-8 | 1,058 | 2.859375 | 3 | [] | no_license | import sys
from PyQt5.QtCore import QObject, QTimer, pyqtSlot
from PyQt5.QtWidgets import QApplication
class MyTime(QTimer):
def __init__(self, *args, **kwargs):
super(MyTime, self).__init__(*args, **kwargs)
def __del__(self):
print('del')
class Worker(QObject):
def __init__(self):
... |
Swift | UTF-8 | 9,996 | 2.671875 | 3 | [] | no_license | //
// VideoLauncher.swift
// YoutubeApp
//
// Created by Oluwatobi Adebiyi on 11/13/16.
// Copyright © 2016 Oluwatobi Adebiyi. All rights reserved.
//
import UIKit
import AVFoundation
class VideoPlayerView: UIView {
var player: AVPlayer?
// Loading Indicator
let activityIndicatorView: UIActi... |
Java | UTF-8 | 3,126 | 2.234375 | 2 | [] | no_license | package com.neyyco.bots.Commands.Command;
import com.neyyco.bots.Commands.Types.ServerCommand;
import com.neyyco.bots.Main;
import com.neyyco.bots.Music.MusicController;
import com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmel... |
Python | UTF-8 | 2,874 | 2.734375 | 3 | [
"MIT"
] | permissive | # Reminder Application
# Authors: Sharon, Hailey, Mayank
# import modules
from flask import Flask, redirect, url_for, render_template, request, flash
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import DateTime
from datetime import datetime
# app configurations
app = Flask(__name__)
app.secret_key = "rem... |
Markdown | UTF-8 | 5,375 | 3.015625 | 3 | [] | no_license | # 內核和用戶空間共享內存的實現例程-proc和mmap
之所以想寫這篇帖子,是有兩個方面原因。其一是內核版有一個關於《內核可以從線性地址直接計算物理地址,用來做什麼呢?》的討論,偶說計算出物理地址可以共享給用戶空間讀寫。dreamice兄說能否說一下詳細的應用。其二是alb*版主提到wheelz曾經寫過這樣一個例程,拜讀了一把,發現在傳遞物理地址和內存大小上,wheelz的例程還有些不夠靈活。alb*版主提到可以通過文件的方式實現動態的傳遞。
因此,偶也寫了這樣一個例程,可以動態的將內核空間的物理地址和大小傳給用戶空間。
整個內核模塊,在模塊插入時建立proc文件,分配內存。卸載模塊的時候將用戶空間寫入的內容打印出來。
以... |
Ruby | UTF-8 | 1,334 | 2.609375 | 3 | [] | no_license | class User < ApplicationRecord
#callback to supplement email uniqueness validation (see db migration where index was added)
#also you don't need self here - you could just do email.downcase!
before_save { email.downcase! }
#validations
validates :name, presence: true, length: { maximum: 50 }
validates :emai... |
C# | UTF-8 | 13,887 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System.Data;
using System.Data.SqlClient;
using BangazonAPI.Models;
namespace BangazonAPI.Controllers
{
... |
Markdown | UTF-8 | 1,311 | 2.5625 | 3 | [
"MIT"
] | permissive | ---
title: How to suggest a feature
description: Contributor Info
tags:
- MyCrypto
priority: 66
date_published: '2017-11-16'
date_modified: '2021-10-26'
---
If there's a feature that you think would make MyCrypto a better product, we
want to know. Here's the best way to tell us:
1. **Search for your suggestion on [... |
JavaScript | UTF-8 | 7,788 | 2.59375 | 3 | [] | no_license | var pairing = require('./HAPPairing').HAPtoAccessoryPairing;
var http = require('http');
var mdns = require('mdns');
var Accessory, Service, Characteristic, UUIDGen;
var uuid = require('./util/uuid');
module.exports = function(homebridge) {
console.log("homebridge API version: " + homebridge.version);
// Accessor... |
Java | UTF-8 | 245 | 1.664063 | 2 | [] | no_license | package com.wzgiceman.retrofitaysproxy.impl;
import android.util.Log;
/**
* cglib请求
* Created by WZG on 2017/1/19.
*/
public class HttpRequestCglibImpl {
public void request() {
Log.e("tag","-------->htt请求");
}
}
|
C# | UTF-8 | 8,998 | 2.765625 | 3 | [] | no_license | using System;
namespace WorkingStandards.Entities.Reports
{
/// <summary>
/// Запись отчета [Сводная по изделиям в разрезе цехов]
/// </summary>
public class SummeryOfProductsInContextOfWorkGuild : IComparable<SummeryOfProductsInContextOfWorkGuild>
{
/// <summary>
/// Доп. параметр для облегчения подсчета вы... |
Java | UTF-8 | 18,090 | 1.945313 | 2 | [] | no_license | package com.elasticpath.tools.sync.merge.impl;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import... |
Python | UTF-8 | 9,281 | 2.578125 | 3 | [
"MIT"
] | permissive | from gkdtex.parse import (
Seq, Arg, PosGroup, KwGroup, Command, Object, Whitespace,
Block, Subscript, Superscript
)
from gkdtex.wrap import parse
from gkdtex.spelling import number_spelling
from collections import deque
from contextlib import contextmanager
import io
import typing
import sys
class Span:
... |
Markdown | UTF-8 | 1,160 | 2.609375 | 3 | [
"MIT"
] | permissive | ---
order: 4
label: 'Global Config'
---
# Global Config
We have added global configuration capabilities to component parameters, which you can use to define the default behavior of the component.
## How to use
To provide default configuration items for some components, provide an object in the root injector that co... |
SQL | UTF-8 | 1,354 | 4.28125 | 4 | [] | no_license | -- Ensure you've run SalesOrdersStructure.sql
-- and SalesOrdersData.sql in the Sample Databases folder
-- in order to run this example.
-- NOTE: Sample table Students does not exist.
CREATE DATABASE StudentsTest;
USE StudentsTest;
CREATE TABLE Students (
StudentID int PRIMARY KEY NOT NULL,
LastName varchar(50),
... |
PHP | UTF-8 | 452 | 3.03125 | 3 | [] | no_license | <?php
class Pipsqueak implements Cat
{
function name()
{
return 'Pipsqueak';
}
function long_hair()
{
return false;
}
function bow()
{
return false;
}
function bell()
{
return true;
}
function stripes()
{
return true;... |
Java | UTF-8 | 5,661 | 2.125 | 2 | [] | no_license | /******************************************************************************
** This data and information is proprietary to, and a valuable trade secret
** of, Basis Technology Corp. It is given in confidence by Basis Technology
** and may only be used as permitted under the license agreement under which
** it ... |
Markdown | UTF-8 | 236 | 2.828125 | 3 | [] | no_license | $$ y = 2x + 3 \\ y - 3 = 2x $$
$$ x = \phi(y) = \frac{y-3}{2} $$
У функции $\phi(y)$ нет никаких ограничений на $y$. При любом $y$ у нее определено какое-то значение. |
Java | UTF-8 | 606 | 3.25 | 3 | [] | no_license | package ash.patz.learning.concurrency;
/**
* Created by APatil on 5/21/2017.
*/
public class Consumer implements Runnable {
public Consumer(Drop drop) {
this.drop = drop;
}
private Drop drop;
@Override
public void run() {
String take = null;
do {
take = dro... |
Python | UTF-8 | 893 | 2.59375 | 3 | [] | no_license | import os
import os.path as path
from pathlib import Path
import json
from threading import Lock
MYFILELOCK = Lock()
def touchFile(file, contents=None):
with MYFILELOCK:
os.umask(0) #dirty
f = open(os.path.join("configs", file),"w")
ret = json.dump(contents,f)
f.close()
return ret;
def getFile(file):
... |
Markdown | UTF-8 | 330 | 2.53125 | 3 | [] | no_license | # Web Lesson 2
## This class is an introduction to html & css
In today's class we learned basics tags in html
1. Headings
2. Paragraph
3. Block Elements
4. In-line Elements
5. Ordered Lists
6. Unordered Lists
7. Image and video tags
# Outputs

 throws WeaponException;
List<Weapon> findAllWeapon();
Weapon findWeaponById(long weaponId) throws WeaponException;
}
|
Markdown | UTF-8 | 3,269 | 2.953125 | 3 | [] | no_license | ---
layout: cartoon
title: "The Postmodern Prometheus"
date: 2014-09-25 11:29:52 +0100
comments: true
categories:
- cartoons
author: Rebecca Fox
image: /media/frankenstein.jpg
cartoon: /media/cartoons/frankenstein.jpg
---
Mary Shelly’s Frankenstein is a product of its time. It beautifully illustrates the nineteenth ... |
C++ | UTF-8 | 1,926 | 3.25 | 3 | [] | no_license | #include <bits/stdc++.h>
#define eb emplace_back
#define endl "\n"
#define pb push_back
using namespace std;
struct edges{
int to;
int length;
};
int djikstra(const vector<vector <edges> > &graph, int source, int target)
{
vector <int> min_distance(graph.size(), INT_MAX);
min_distance[source] = 0;
... |
Swift | UTF-8 | 607 | 3.203125 | 3 | [
"MIT"
] | permissive | //
// 226-InvertTree.swift
// BinaryTree
//
// Created by Csy on 2019/2/15.
// Copyright © 2019 CXL. All rights reserved.
//
/**
翻转一棵二叉树。
*/
import Foundation
class InvertTree {
func invertTree(_ root: TreeNode?) -> TreeNode? {
if root == nil {
return nil
}
// 先... |
Java | UTF-8 | 8,672 | 1.921875 | 2 | [] | no_license | package com.example.lucas.myapp;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
... |
Shell | UTF-8 | 4,762 | 2.921875 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | #!/bin/bash
PROGNAME="$0"
usage() {
cat <<EOF
NAME
`basename $PROGNAME` - Nonogram solver
SYNOPSIS
`basename $PROGNAME` [options] skel.nono ...
DESCRIPTION
Nonogram solver using a program by Steven Simpson.
OPTIONS
-b Binary and decimal numbers
-p png-file Convert and image it into a PNG png-file
... |
Java | UTF-8 | 12,079 | 2.265625 | 2 | [
"MIT"
] | permissive | package es.upm.fi.dia.oeg.rdb;
import es.upm.fi.dia.oeg.model.CSVW;
import es.upm.fi.dia.oeg.rmlc.api.model.TriplesMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.PrintWriter;
import java.sql.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.ut... |
C++ | ISO-8859-1 | 643 | 3.484375 | 3 | [] | no_license | #include "Sort.h"
template <class T>
class BubbleSort : public Sort<T>
{
public:
T* sort(T* o) = 0; //Si modifico el contenido, no necesito el &, sin embargo, si necesito modificar el apuntador ah s.
BubbleSort();
~BubbleSort();
};
template <class T>
T* BubbleSort::sort(T* o)
{
//aqu va lo de bubble sort
/*
Co... |
C++ | UTF-8 | 1,795 | 3.609375 | 4 | [] | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Codec {
private:
void insert(int num, TreeNode* node) {
if (num > node->val) {
if (node->right... |
C# | UTF-8 | 1,375 | 3.359375 | 3 | [
"MIT",
"CC-BY-4.0"
] | permissive | using System;
using System.Data;
using System.ComponentModel;
using System.Windows.Forms;
// <Snippet1>
public class myKeyPressClass
{
static long keyPressCount = 0 ;
static long backspacePressed = 0;
static long returnPressed = 0 ;
static long escPressed = 0 ;
... |
C# | UTF-8 | 2,051 | 3.734375 | 4 | [] | no_license | using System;
using System.Text.RegularExpressions;
namespace Lab2._3_Validating_Input_With_Regex
{
class Program
{
static void Main(string[] args)
{
Console.Write("Please enter a valid Name: ");
string nameInput = Console.ReadLine();
string name = nameInput... |
PHP | UTF-8 | 789 | 2.953125 | 3 | [] | no_license | <?php
require_once("config.php");
class baseDatos{
private $conexion;
private $db;
public static function conectar(){
$conexion = mysqli_connect(host, user, pass, dbname, port);
//Set de caracteres utf8
mysqli_set_charset($conexion, "utf8");
if($conexion->connect_errno){
... |
Java | UTF-8 | 2,517 | 2.828125 | 3 | [] | no_license | package com.garbri.proigo.core.objects;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.BodyDef;
import com.badlogic.gdx.physics.box2d.CircleShape;
import com.badlogic.gdx.physics.box2d.FixtureDef;
impo... |
TypeScript | UTF-8 | 1,319 | 2.6875 | 3 | [
"MIT"
] | permissive | import type { Optic, TryA, TryT, A, B, S, T } from './optic.js'
import type { Expected } from './errors.js'
import type { Eq } from '../utils.js'
import * as I from '../internals.js'
import { Apply, HKT } from '../hkt.js'
interface GuardA<ValueType, SubType extends ValueType> extends A {
0: TryA<
this,
S<thi... |
Markdown | UTF-8 | 3,644 | 2.90625 | 3 | [] | no_license | ---
layout: post
title: 如何不使用贴吧App查看贴吧
tags: [贴吧, PHP]
---
为自己手机的最后一片净土而战(ง •_•)ง<!--more-->
# 起因
由于某些原因,我还是很想上百度贴吧看看的。虽然一些大公司很流氓,但也正因为他们是大公司,所以积累的信息才更多……
一年前,我因为使用百度搜索时打不开搜索内容,所以不得不[使用了一些办法](/2019/05/12/baidu.html)来解决这个问题。不过看起来百度也知道自己这么做是在砸自家招牌,所以后来这个问题百度貌似他们自己解决了。
而现在呢,我又因为某些原因需要使用百度贴吧,当然安装贴吧Ap... |
PHP | UTF-8 | 433 | 2.984375 | 3 | [] | no_license | <?php
namespace Controllers;
/**
* class qui ne peut pas etre instancier
* class controller (evite repetition du $model) et qui permet dans les autres controller de faire un $modelName pour recupérer la class du model
*/
abstract class Controller
{
protected $model;
protected $modelName;
... |
C++ | UTF-8 | 3,783 | 3.6875 | 4 | [
"MIT"
] | permissive | #include <iostream>
#include <vector>
#include <unordered_set>
#include <iostream>
#include <queue>
//graph with adjacency sets
class SetGraph {
private:
//we have to store two vectors to be able to find and children and parents fast
std::vector<std::unordered_set<int>> adjacency_list_income;
std::vector<... |
Python | UTF-8 | 1,114 | 3.625 | 4 | [] | no_license | #Author : sakura_kyon@hotmail.com
#Question : Find Minimum in Rotated Sorted Array II
#Link : https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/
#Language : python
#Status : Accepted
#Run Time : 272 ms
#Description:
#Follow upfor "Find Minimum in Rotated Sorted Array":What if... |
PHP | UTF-8 | 1,259 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Phossa2\Route\Parser;
/**
* ParserStd test case.
*/
class ParserStdTest extends \PHPUnit_Framework_TestCase
{
/**
*
* @var ParserStd
*/
private $object;
/**
* Prepares the environment before running a test.
*/
protected function setUp()
{
parent:... |
PHP | UTF-8 | 5,300 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<?php
session_start();
if(isset($_SESSION['logged_in'])){
header('Location: welcome.php');
}
else {
require_once 'head.php';
require_once 'database.php';
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialch... |
PHP | UTF-8 | 711 | 2.53125 | 3 | [] | no_license | <?php
if (array_key_exists("assignmentid", $_GET)) {
include "connection.php";
$ref = $_GET['ref'];
$pass = $_GET['pass'];
$destination = "";
if ($ref == 'admin') {
$destination .= "admin-assignment.php";
}elseif ($ref == 'teacher') {
$destination .= "teacher-assignment.php";
... |
Swift | UTF-8 | 1,426 | 3.296875 | 3 | [] | no_license | //
// ContentView.swift
// SliderApp
//
// Created by Vinícius Schuck on 08/01/20.
// Copyright © 2020 Vinícius Schuck. All rights reserved.
//
import SwiftUI
struct ContentView: View {
@State private var showAlert = false
@State private var sliderValue = 0.0
@State private var selectPicker = 0
... |
C# | UTF-8 | 3,152 | 2.75 | 3 | [
"MIT"
] | permissive | // This file is licensed to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
namespace Spines.Hana.Blame.Services.ReplayManager
{
/// <summary>
/// A shuffler used by tenhou.net, based on the mersenne t... |
Java | UTF-8 | 1,455 | 2.09375 | 2 | [] | no_license | package com.mgjr.presenter.impl;
import com.mgjr.model.bean.HomepageRecommendProjectsBean;
import com.mgjr.model.impl.HomeBannerModelImpl;
import com.mgjr.model.listeners.BaseModel;
import com.mgjr.presenter.listeners.OnPresenterListener;
import com.mgjr.view.listeners.ViewListener;
import java.util.Map;
/**
* Crea... |
Python | UTF-8 | 4,387 | 3.0625 | 3 | [] | no_license | """
This file contains some miscellaneous helper functions and os wrappers.
"""
import os
import numpy as np
import cv2
def file_exists(file_path):
"""
Check if a file exists.
Inputs
----------
path: str
Path to file.
Outputs
-------
bool
True if file exist... |
PHP | UTF-8 | 1,413 | 3.078125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="de" dir="ltr">
<head>
<meta charset="utf-8">
<title>Dateiuploads mit PHP</title>
</head>
<body>
<h1>Dateiuploads mit PHP</h1>
<?php
echo "<pre>";print_r($_FILES);echo"</pre>";
// Formular gesendet?
if (!empty($_FILES)) {
// Validierung
if (em... |
C++ | UTF-8 | 521 | 3.1875 | 3 | [] | no_license | #include <iostream>
#include <stack>
#include <cstring>
using namespace std;
int main(){
int t;
cin >> t;
stack<char>operations;
stack<char>others;
while(t--){
string s;
cin >> s;
for(int i=0; i<s.size(); i++){
if(s[i]=='+' || s[i]=='-' || s[i]=='*' || s[i]=='/' || s[i]=='^' || s[i]=='%')
operat... |
Java | UTF-8 | 280 | 2.859375 | 3 | [] | no_license | package bot;
/**
* The value of a game state, as defined by a Heuristic.
* @author jonbuckley
*
*/
public class HeuristicValue {
public float probability;
public float value;
public HeuristicValue(float prob, float v) {
this.probability = prob;
this.value = v;
}
}
|
TypeScript | UTF-8 | 1,116 | 2.546875 | 3 | [
"MIT"
] | permissive | import { NgModule, NgModuleFactoryLoader, ModuleWithProviders, StaticProvider } from '@angular/core';
import { ModuleMapNgFactoryLoader, ModuleMap, MODULE_MAP } from './module-map-ngfactory-loader';
/**
* Helper function for getting the providers object for the MODULE_MAP
*
* @param {ModuleMap} moduleMap Map to us... |
Markdown | UTF-8 | 6,809 | 2.953125 | 3 | [] | no_license | # Máquina Virtual
Quiero crear una Máquina Virtual, para poder desarrollar desde cualquier
entorno de desarrollo que se ejecute sin problemas en cualquier plataforma.
Pero tiene que ser pequeña, para poder integrarse en muchos sitios, y muy
flexible, para que cualquier tipo de lenguaje de programación pueda ser
implem... |
Java | UTF-8 | 2,248 | 2.328125 | 2 | [] | no_license | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the MuleSource MPL
* license, a copy of which has been included with... |
PHP | UTF-8 | 1,597 | 2.5625 | 3 | [] | no_license | <?php
if ($_SERVER['REQUEST_METHOD']) {
header('HTTP/1.0 403 Forbidden');
echo 'You are forbidden!';
exit;
}
if (!file_exists("./database/")) {
mkdir("./database/");
}
$categories = array(
"Clothing",
"Wood",
"Potery",
"Totebag",
"Papercuts"
);
$categories_serialized = serialize($categories);
file_put_co... |
TypeScript | UTF-8 | 2,241 | 3.578125 | 4 | [] | no_license | /*
* Human readable elapsed or remaining time (example: 3 minutes ago)
* @param {Date|Number|String} date A Date object, timestamp or string parsable with Date.parse()
* @return {string} Human readable elapsed or remaining time
* @author github.com/victornpb
*/
export const fromNow = (date: any) => {
const SECOND = ... |
Java | UTF-8 | 258 | 1.726563 | 2 | [] | no_license | package com.bmdb.db;
import org.springframework.data.repository.CrudRepository;
import com.bmdb.business.Actor;
public interface ActorRepo extends CrudRepository <Actor, Integer> {
//Optional<Actor> findAllByName(String firstName, String lastName);
}
|
Java | UTF-8 | 8,685 | 2.21875 | 2 | [] | no_license | package com.wyfx.total.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wyfx.total.entity.Dictionaries;
import com.wyfx.total.exception.CanNotMaveException;
import com.wyfx.total.exception.DictionariesNameConflictException;
import com.wyfx.total.mapper.Dictionari... |
C# | UTF-8 | 2,063 | 2.921875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using Api.Models;
using Api.Clients;
using System.Threading.Tasks;
using System.Linq;
namespace Api.Services
{
public interface ICustomersService {
Task<CustomersListDto> GetCustomersAsync();
}
public class CustomersService : ICustomersService
{... |
Python | UTF-8 | 497 | 2.78125 | 3 | [] | no_license | class SansArtifact:
def __init__(self):
self.lightTotal = 0
def weapons(self, weapon_list):
a = 0
for light in weapon_list:
a += light*0.1304
self.lightTotal += a
def armor(self, armor_list):
b = 0
for light in armor_list:
b += light*... |
Java | UTF-8 | 2,483 | 2.328125 | 2 | [
"MIT"
] | permissive | package edu.usm.sosw.sword.db;
import java.util.List;
import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.BindBean;
import org.skife.jdbi.v2.sqlobject.GetGeneratedKeys;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.SqlUpdate;
import org.skife.jdbi.v2.sqlobject... |
PHP | UTF-8 | 886 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class TimeValidator extends ConstraintValidator
{
const PATTERN = '/(0[0-9]|1[0-9]|2[0-3]):(... |
Java | UTF-8 | 1,179 | 2.0625 | 2 | [] | no_license | package com.trajectoryvisualizer.dao;
import com.trajectoryvisualizer.entity.RawStudies;
import com.trajectoryvisualizer.entity.TraclusStudies;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springfr... |
JavaScript | UTF-8 | 3,571 | 2.640625 | 3 | [] | no_license | 'use strict';
document.addEventListener ( 'DOMContentLoaded', () => {
// DOM-Elemente
let email = document.querySelector('#email');
let password = document.querySelector('#password');
let btn = document.querySelector('#btn');
let linkNeueruser = document.querySelector('#li... |
Markdown | UTF-8 | 3,116 | 2.9375 | 3 | [] | no_license | # Models for Vacancy
## Database

### Organization
| field | type | description |
| ------------ | ---------- | ------------------------------------------------------------------------------------ |... |
Java | UTF-8 | 6,760 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | /*
* HE_Mesh Frederik Vanhoutte - www.wblut.com
*
* https://github.com/wblut/HE_Mesh
* A Processing/Java library for for creating and manipulating polygonal meshes.
*
* Public Domain: http://creativecommons.org/publicdomain/zero/1.0/
*/
package wblut.geom;
/**
* Interface for implementing non-mutable trans... |
Python | UTF-8 | 1,664 | 2.8125 | 3 | [] | no_license |
from ecinema.models.model import Model
from ecinema.data.PriceData import PriceData
class Price(Model):
def __init__(self):
self.__id = None
self.__price = None
self._Model__is_init = False
self._Model__id = None
self.__data_access = PriceData()
def obj_as_dict(self... |
JavaScript | UTF-8 | 752 | 3.71875 | 4 | [
"MIT"
] | permissive | /**
*
* # Ease
*
* Produces a function for composing easing functions.
* ```
* ease(0.00, 0.25, t => sin(t * 25))(ease(0.25, 1.00, t => 5)())
* ```
*
**/
export const ease = (start = 0.0, end = 1.0, op = (t) => 1) => {
const compose = (next = (t) => 1) => {
const fn = (t) => {
if (t >= start && t ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.