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
Java
UTF-8
4,205
2.953125
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
package edu.cmu.cs214.hw5.visualizer; import java.awt.Cursor; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Image; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JPanel; import edu.cmu.cs214.hw5.gui.GUIResour...
C#
UTF-8
1,129
3.109375
3
[]
no_license
using System.Diagnostics; static void Main() { Process ThisProcess = Process.GetCurrentProcess(); Process[] AllProcesses = Process.GetProcessesByName(ThisProcess.ProcessName); if (AllProcesses.Length > 1) { //Don't put a MessageBox in here because the user could spam ...
Markdown
UTF-8
5,945
3.0625
3
[ "MIT" ]
permissive
# Mars Rover Challenge [![Build Status](https://travis-ci.com/dev-11/mars-rover-challenge.svg?branch=master)](https://travis-ci.com/dev-11/mars-rover-challenge) [![codecov](https://codecov.io/gh/dev-11/mars-rover-challenge/branch/master/graph/badge.svg)](https://codecov.io/gh/dev-11/mars-rover-challenge) [![Codacy Bad...
Python
UTF-8
6,226
2.546875
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
# # ReportLab QRCode widget # # Ported from the Javascript library QRCode for Javascript by Sam Curren # # URL: http://www.d-project.com/ # http://d-project.googlecode.com/svn/trunk/misc/qrcode/js/qrcode.js # qrcode.js is copyright (c) 2009 Kazuhiko Arase # # Original ReportLab module by German M. Bravo # # modified an...
Markdown
UTF-8
18,407
3.5625
4
[ "Apache-2.0" ]
permissive
--- title: An Introduction to DOM Clobbering and Its Applications catalog: true date: 2021-01-23 13:34:51 tags: [Web,JavaScript,Front-end,Security] categories: - Security photos: /img/dom-clobbering/cover-en.png --- ## Introduction As a front-end engineer, it is natural to know a lot about front-end-related knowled...
Ruby
UTF-8
1,246
3.046875
3
[]
no_license
require './inventory_base' class InventoryUse attr_accessor :properties, :amount, :start_date, :end_date, :periodicity, :wday def initialize(properties) @properties = properties @amount = properties[:amount] @start_date = properties[:start_date] @end_date...
Markdown
UTF-8
328
2.671875
3
[]
no_license
# Math and Statistics problem This place where I solve common Math and Statistics problem using code. [Greatest Common Divisors (GCD) and Least Common Multiple (LCM)](LCM%20and%20GCD.ipynb). [Divisors](Divisors.ipynb). [Primes](Prime%20Numbers.ipynb). [Fibonacci](Fibonacci.ipynb). [Project Euler](project-eu...
Python
UTF-8
252
3.109375
3
[]
no_license
# coding: utf-8 # In[14]: def multi3_odd(start, finish): total = 0 for x in range(start, finish): if (x%3 == 0) and (x%2 != 0): total += 1 return total # In[15]: multi3_odd(3,12) # In[17]: multi3_odd(3,200)
C++
UTF-8
2,241
3.390625
3
[]
no_license
#include<iostream> #include<cstring> #include "PriorityQueue.h" using namespace std; template <class T> PriorityQueue<T>::PriorityQueue() { size = 0; } template <class T> PriorityQueue<T>::~PriorityQueue() { delete [] a; } template <class T> void PriorityQueue<T>::copy(const PriorityQueue<T>& c) { size =...
C
UTF-8
1,721
2.96875
3
[ "MIT" ]
permissive
//author dachr/zhangzhibo #include <malloc.h> #include "jobshop.h" void *getJob() { scanf("%d%d", &jobNum, &machineNum); job = malloc(jobNum * sizeof(JOBPTR)); for (int i = 0; i < jobNum; ++i) { JOBPTR node = job[i] = malloc(sizeof(struct job)); for (int j = 0; j < machineNum - 1; ++j) {...
Java
UTF-8
1,342
3.171875
3
[]
no_license
import java.io.BufferedReader; import java.io.DataOutput; import java.io.PrintWriter; import java.io.IOException; import java.io.InputStreamReader; import java.net.Socket; import javax.swing.JTextArea; public class ChatClientThread extends Thread { protected Socket socket; protected BufferedReader bufferedRea...
PHP
UTF-8
1,599
2.640625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * */ class Question extends CI_Model { public function getQuestions() { $Pashe=$_SESSION['phase_objetive_id']; $consulta=$this->db->query("SELECT * FROM question WHERE phase_objetive_id=$Pashe "); if($consulta->num_rows() >= 1){ return $consulta->result(); }else{ return false; }...
C
UTF-8
3,919
2.90625
3
[]
no_license
#include <stdio.h> #include <limits.h> #include <stdlib.h> #include <inttypes.h> #include <string.h> //assumes little endian void printBits(size_t const size, void const * const ptr); int main() { int n = 7; int a = (((!!n)) & 1) << 31; int b = (n + (~1 + 1)); printBits(sizeof(n), &b); printBits(sizeof(n), &a);...
Markdown
UTF-8
2,900
3.296875
3
[]
no_license
# Problema 5: Histórico de vencedores Em diversos esportes, a cada premiação ou campeonato, novos campeões ou premiados entram para a lista de vencedores. Para permitir a organização de um histórico de premiações de uma modalidade de esporte, você deve implementar um sistema que armazena e organiza esse histórico de f...
Java
SHIFT_JIS
1,456
2.59375
3
[]
no_license
package dbconnect; import java.sql.ResultSet; import java.sql.SQLException; import java.awt.Button; import java.awt.FlowLayout; import java.awt.BorderLayout; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowEvent; import java.awt.event.WindowLi...
Python
UTF-8
2,089
2.828125
3
[]
no_license
from django import template from ..models import Activity register = template.Library() class RecordNode(template.Node): @classmethod def parse(cls, parser, token): tokens = token.contents.split() if len(tokens) != 2: raise template.TemplateSyntaxError("Only 2 arguments needed for...
Markdown
UTF-8
1,096
2.625
3
[]
no_license
# Hadoop: The Definitive Guide > Humble Bundle上买的 ## Keywords - 2015, Hadoop 2 (Released date of the book). 2020, Hadoop 3 released. - MapReduce, HDFS, YARN - High-level data processing tools like Hive, Spark ## HDFS, Hadoop Distributed Filesystem - a reliable, scalable platform for storage and analysis. - beyond...
Ruby
UTF-8
2,172
2.890625
3
[ "MIT" ]
permissive
$:.unshift File.expand_path((File.dirname(__FILE__) + '/../lib')) $:.unshift File.expand_path((File.dirname(__FILE__) + '/source_code_examples')) $:.unshift File.expand_path((File.dirname(__FILE__) + '/source_code_for_errors')) $:.unshift File.expand_path(File.dirname(__FILE__)) require 'pp' require 'term/ansicolor' r...
Java
UTF-8
1,366
2.390625
2
[ "Apache-2.0" ]
permissive
package com.ziroom.ziroomcustomer.findhouse.presenter.model; public class HouseConfig { private String category; private String icon; private int num; private String title; private String value; public String getCategory() { return this.category; } public String getIcon() { return thi...
SQL
UTF-8
2,421
3.375
3
[]
no_license
ALTER TABLE emp_registry DROP CONSTRAINT IF EXISTS FKrx0lkq97klv1hub5v3xen9hlh; ALTER TABLE emp_registry DROP CONSTRAINT IF EXISTS FKbyijndlfb1a6vi97y5spvou5l; ALTER TABLE statistic DROP CONSTRAINT IF EXISTS FKoifiete5h1dmj02jk2fwe6d65; DROP SEQUENCE IF EXISTS dept_id_seq; DROP SEQUENCE IF EXISTS emp_id_seq; DROP SE...
Markdown
UTF-8
3,060
2.859375
3
[ "MIT" ]
permissive
--- layout: post title: "Tip of the Week: Check If You Have Been Hacked!" comments: true categories: - TipOW - Security tags: date: 2018-05-31 completedDate: 2018-05-31 12:34:09 +1000 keywords: description: Check if you have an account/password that has been compromised in a data breach primaryImage: haveibeenpwned....
Java
UTF-8
466
3
3
[]
no_license
public class LootMonster extends Monster { String TypeOfLoot; public LootMonster(String loot,int h,int x,int m) { super(h,x,m); TypeOfLoot=loot; } //Override inherited method by redefining public void takeDamage(int dmg) { //Let the superclass version of the method execute super...
Java
UTF-8
591
3.578125
4
[ "BSD-3-Clause" ]
permissive
// This is the main class/method for the interpreter. // Each command-line argument is a complete program, // which is scanned, parsed, and evaluated. // All evaluations share the same environment, // so they can share variables. public class Interpreter { public static void main(String[] args) { Parser parser = n...
Markdown
UTF-8
2,133
2.53125
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 管理您組織中的 Azure 地圖服務 Power BI 視覺效果 |Microsoft Azure 對應 description: 在本文中,您將瞭解如何管理組織內 Power BI 視覺效果的 Microsoft Azure 對應。 author: rbrundritt ms.author: richbrun ms.date: 06/26/2020 ms.topic: conceptual ms.service: azure-maps services: azure-maps manager: cpendle ms.custom: '' ms.openlocfilehash: 2f7372d522c02eb8...
Shell
UTF-8
283
2.796875
3
[ "Unlicense" ]
permissive
#!/bin/bash # make-mocha-dark.sh > mocha-dark.js # grab the mocha.js file and change the canvas progress indicator to # a dark colour scheme. FILE=${1:-../../node_modules/mocha/mocha.js} perl -pne 's{fillText}{fillStyle = "yellow"; // BSAC DARK SCHEME\n ctx.fillText}xmsg' $FILE
Shell
UTF-8
4,219
2.796875
3
[]
no_license
#!/bin/bash LCD_W=800 LCD_H=480 HDMI_1080P_W=1920 HDMI_1080P_H=1080 CURRENT_RES=$(adb shell dumpsys window | grep cur= |tr -s " " | cut -d " " -f 4|cut -d "=" -f 2) CURRENT_W=$(echo "$CURRENT_RES" | awk -Fx '{print $1}') CURRENT_H=$(echo "$CURRENT_RES" | awk -Fx '{print $2}') if [[ "$CURRENT_W" -eq 800 ]] && [[ "$...
PHP
UTF-8
2,266
3.3125
3
[]
no_license
<?php require_once "../models/Editora.php"; require_once "Conexao.php"; class EditoraController { public static function salvar(Editora $editora) { if ($editora->getId() > 0) { return self::alterar($editora); } else { return self::inserir($editora); } } ...
Markdown
UTF-8
1,695
3.015625
3
[ "MIT" ]
permissive
Estimation: Back-End extension I believe that the following changes will take approx. 30 minutes to complete. It will involve adding two new files to the project: Stamp.java and ClearStamp.java. I will also edit the various resource files to enable use of these commands in all languages. Review: It took 21 minutes...
Java
UTF-8
2,595
2.703125
3
[]
no_license
package com.chainsys.employeeapp.dao.impl; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.chainsys...
Java
UTF-8
1,923
2.59375
3
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package org.apache.tinkerpop.gremlin.spark.structure; import org.apache.tinkerpop.gremlin.structure.Element; import java.io.Serializable; import java.util.UUID; /** * Created by dkopel on 11/15/16. */ public abstract class SparkElement<ID> extends AbstractSparkEntity<ID> implements Element, Serializable { prot...
Java
UTF-8
454
3.578125
4
[]
no_license
package Constructors; public class HowCanAccessSuperClassConstructorsInSubClass { public static void main(String[] args) { B b=new B(); } } class A{ A(){ System.out.println("This is 'A' Class Constructors"); } } class B extends A{ // How to access the Super Class constructor in Sub class ? B...
C#
UTF-8
758
2.578125
3
[]
no_license
using System; using System.Security.Permissions; namespace System.Windows.Forms { /// <summary>Defines a message filter interface.</summary> // Token: 0x02000288 RID: 648 public interface IMessageFilter { /// <summary>Filters out a message before it is dispatched.</summary> /// <param name="m">The message to ...
Markdown
UTF-8
7,325
3
3
[]
no_license
--- title: batman 测试框架用户使用手册1.0 tags: 接口测试,自动化测试,python --- ## 一 测试框架背景及目的 - 传统的软件测试大多是白盒测试,单元测试和接口测试尤为明显,测试人员都是根据开发人员开发出一个功能,然后对任何合理的输入和不合理的输入 ,进行鉴别和响应,最后对整个模块的测试结果进行分析.编写测试报告 - batman测试框架是针对公司需求基于python开发的自动化测试框架.主要功能是测试人员只针对某一个功能通过简单输入测试数据和期待数据等操作,然后系统会自动生成一份测试报告.这样把测试人员从繁琐的测试工作中解脱出来. ---------- ## 二 ...
C#
UTF-8
13,439
2.65625
3
[ "MIT" ]
permissive
using Newtonsoft.Json.Linq; using SimpleMockWebService.Configurations; using SimpleMockWebService.Services.Interfaces; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Reflection; using System.Text.RegularExpressions; using System...
Python
UTF-8
597
3.015625
3
[]
no_license
from collections import deque n_queries = int(input()) stack = deque() for i in range(n_queries): query = input() if query.startswith('1'): index, query = query.split() stack.appendleft(int(query)) elif query == '2': if len(stack) > 0: stack.popleft() elif query ==...
C++
UTF-8
5,373
2.765625
3
[]
no_license
#pragma once #include "pressabledefs.h" #include "fin/debug/log.h" namespace fin::input { typedef struct gamepadButtonUpdate { int buttonIndex; PressableState pressableState; bool operator==(const gamepadButtonUpdate& other) const { return buttonIndex == other.buttonIndex && pressableState ...
Java
UTF-8
823
2.40625
2
[]
no_license
package view; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import org.junit.Before; import org.junit.Test; import game.commons.GameConstants; public class ViewFacadeTest { private IView view; @Before public void setUp() { view = new ViewFacade();...
JavaScript
UTF-8
333
3.390625
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Code your solutions in this file function writeCards(arr, eventName) { const resultArr = []; for (let i = 0; i < arr.length; i++) { resultArr.push(`Thank you, ${arr[i]}, for the wonderful ${eventName} gift!`); } return resultArr; } function countDown(num) { while (num >= 0) { console.log(num); ...
Shell
UTF-8
1,470
3.1875
3
[]
no_license
# Sprawdza poziom energii dla baterii w laptopie IBM x60s (pewnie też w innych IBM / Lenovo). # Napisany, gdy bateria w związku z jej wiekiem zaczęła wariować. Poziom energii spadał z 70% do 3%, # laptop dalej pracował 40 min, poziom dochodził do 0% i w zależności od obciążenia można było z niego korzystać # jeszcze...
Java
UTF-8
4,132
2.125
2
[]
no_license
/** * galaxy inc. * meetup client for android */ package com.galaxy.picasa.sync; import java.io.IOException; import java.util.HashMap; import java.util.Map; import android.content.ContentValues; import android.util.JsonReader; import com.android.gallery3d.common.EntrySchema; import com.android.galle...
Python
UTF-8
8,372
2.859375
3
[]
no_license
""" Generate the "reader friendly" version of a notebook used as a textbook source document. Notebooks used as source documents may have content that is confusing to readers, such as directives or visible cell tag toolbars. This script cleans all of these up and generates new notebooks that are "reader friendly". Usa...
Markdown
UTF-8
1,684
4.28125
4
[]
no_license
Given an array of integers, calculate the fractions of its elements that are positive, negative, and are zeros. Print the decimal value of each fraction on a new line. Note: This challenge introduces precision problems. The test cases are scaled to six decimal places, though answers with absolute error of up to 10^-4 ...
C#
UTF-8
8,534
2.578125
3
[]
no_license
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows...
Shell
UTF-8
4,082
3.8125
4
[]
permissive
#!/bin/bash PG_VERSION=$(psql -V | awk '{print $3}' | sed 's/\.\(.*\)//') HOST_IP=$(echo $SSH_CLIENT | awk '{ print $1}') PHP_VERSION=$(php --version | head -1 | awk '{print $2}' | cut -d. -f 1-2) VB_IP=$(hostname -I|awk '{print $1}') PROJECT_FOLDER=/var/www/fusionpbx-api LARAVEL_FOLDER=/var/www/laravel-api function s...
Java
UTF-8
4,729
3.8125
4
[]
no_license
//找出两个有序数组共同的中位数,时间复杂度为O(log(m + n))。 // nums1 = [1, 3] // nums2 = [2] // 则中位数是 2.0 public class a4_findMedianSortedArrays { // 思路1:找出第k小的数 public static double findMedianSortedArrays(int[]nums1,int[]nums2){ int n = nums1.length; int m = nums2.length; int left = (...
Python
UTF-8
117
3.53125
4
[]
no_license
n1=int (input('Digite um número:')) n2=int(input('Digite um número:')) s=n1 + n2 print('A soma vale:{}' .format(s))
C++
UTF-8
564
2.5625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> constexpr int INF = 1000 * 1000 * 1000; constexpr int MXT = 30 * 60; int main() { std::ios::sync_with_stdio(false); int N; std::cin >> N; std::vector<int> T(N); for (int i = 0; i < N; ++i) { std::cin >> T[i]; } std::vector<int> dp(N + 1, INF); dp[0...
Markdown
UTF-8
2,177
2.8125
3
[]
no_license
## 1)基于VGG16_BN的参数统计 代码在文件vgg_analysis.py中。需要将VGG16_BN的模型文件放到上一级目录中以便读取。 #### 卷积层工作 1. 权重的数量级统计(PDF,CDF) 2. 卷积核L1范数的数量级统计(PDF,CDF) 3. 卷积核之间的皮尔逊相关系数(热图) #### BN层工作 1. γ参数的数量级统计(PDF,CDF) #### 存在的一些问题 - 量化不够细致,某些折线图形状略为极端; - 热图横纵坐标过多(最大512×512),视觉效果并没有那么好。后发现,向量维度越高,相关系数必然越低,对后面卷积层的卷积核相关系数统计意义不大; - 以及对python和matplo...
Python
UTF-8
3,420
2.96875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sun Mar 10 10:54:25 2019 @author: Geethanjali """ import pandas import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from sklearn.feature_extraction import image from sklearn.preprocessing import LabelEncoder from sklearn.cluster import spectr...
Java
UTF-8
3,537
1.765625
2
[]
no_license
/* * Copyright (C) 2019 The Android Open Source Project * * 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 app...
Shell
UTF-8
2,592
2.59375
3
[]
no_license
### zprofile ## general # history & completion zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' export HISTFILE=${HOME}/.zhistory export HISTSIZE=10000 export SAVEHIST=100000 setopt hist_ignore_dups setopt EXTENDED_HISTORY setopt share_history setopt hist_ignore_all_dups setopt hist_ignore_space setopt hist_verify ...
Java
UTF-8
294
1.679688
2
[]
no_license
package br.com.sga.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import br.com.sga.model.Manutencao; public interface ManutencaoRepository extends JpaRepository<Manutencao, Long> { public List<Manutencao> findByAtivo_Codigo(Long id ); }
Markdown
UTF-8
2,953
2.5625
3
[]
no_license
# Assignment 2 - Web API - Automated development process. Name: Zihan Zhang ## Overview. This project's API is standard RESTful, it includes: GET, PUT, POST and DELETE. ## API endpoints. + GET /courses - Get all courses. + GET /courses/:id - Get one course by id. + POST /courses - Add a new course + PUT /cours...
Python
UTF-8
391
2.53125
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 #coding=utf-8 """ 爬取豆瓣电影数据 :author Wang Weiwei <email>weiwei02@vip.qq.com / weiwei.wang@100credit.com</email> :sine 2017/9/23 :version 1.0 """ from scrapy.spiders import BaseSpider class Douban(BaseSpider): name = "douban" allowed_domains = ["movie.douban.com"] start_...
C++
UTF-8
860
3.359375
3
[]
no_license
// { Driver Code Starts // Counts Palindromic Subsequence in a given String #include<iostream> #include<cstring> using namespace std; // Function return the total palindromic subsequence int countPS(string str); // Driver program int main() { int t; cin>>t; while(t--) { string str; cin>>str; cout<<countPS(...
PHP
UTF-8
1,071
2.90625
3
[]
no_license
<?php function getPossibleDuplicateCounts() { global $db; $count = 0; $programs = $db->fetchRows("SELECT * FROM Program WHERE id IN (15, 11)"); foreach ($programs as $program) { if (in_array($program['id'], array('27', '28', '31'))) continue; $videosForProgram = $db->fetchRows("SELECT * FROM Video WHERE pro...
C
UTF-8
438
3.421875
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> #include <math.h> #pragma warning (disable: 4996) void main() { double num1,cosv, tanv,sinv,rad; printf("enter your degree value.\n"); scanf("%lf", &num1); rad = num1 *(3.14159/180); cosv = cos(rad); tanv = tan(rad); sinv = sin(rad); printf("your value of cos is %f\n...
C#
WINDOWS-1251
6,315
3.265625
3
[]
no_license
// MSVC 2010x86 : //> "%VS100COMNTOOLS%vsvars32.bat" //> csc /target:exe /platform:x86 /o Contacts.cs using System; using System.Collections; namespace Contacts { class Contact : IComparable, IComparer, IDisposable { public static string[] Names = { "*Contact", "*Mobile", "Work", "...
Java
UHC
1,393
2.53125
3
[]
no_license
package mysurvlet; import java.io.IOException; import java.io.PrintWriter; import java.util.*; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import j...
C#
UTF-8
449
2.890625
3
[ "MIT" ]
permissive
namespace StringCountWithinString.Client { using System; public class StringCountWithinString { static void Main() { ServiceStringCountWithinStringClient client = new ServiceStringCountWithinStringClient(); int count = client.GetStringCountWithinString("pesho", "pes...
Python
UTF-8
3,029
3.375
3
[]
no_license
from tkinter import * from tkinter import messagebox import random root=Tk() root.config(bg="#E7C333") root.minsize(width=300,height=500) root.maxsize(width=300,height=500) root.title("My To Do List") root.geometry("300x500") tasks=[] def update_listbox(): clear_listbox() for task in t...
Python
UTF-8
7,277
2.765625
3
[]
no_license
## BFS import sys from pprint import pprint sys.stdin = open('1175.txt', 'r') ''' 3 6 .SC#C. ..##.. ...... ''' # # import heapq # def solve(status): # global nbd # direction = [(-1,0), (1,0), (0,-1), (0,1)] # visit = [[False]*M for _ in range(N)] # visit[minsik[0]][minsik[1]] = True # 처음에는 항상 True ...
PHP
UTF-8
2,263
2.515625
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-mulanpsl-1.0-en" ]
permissive
<?php declare(strict_types=1); namespace Imi\OpenTracing\Test; use function Imi\env; use PHPUnit\Framework\TestCase; use Symfony\Component\Process\Process; use Yurun\Util\HttpRequest; abstract class BaseTest extends TestCase { protected static Process $process; protected static string $httpHost = ''; ...
C#
UTF-8
1,996
3.109375
3
[]
no_license
namespace Area51Elevator { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; class Elevator { public ElevatorDoor Door { get; private set; } public List<Floor> SupportedFloors { get; private set; } public...
Java
UTF-8
2,135
2.78125
3
[]
no_license
package edu.calvin.harambe.knowledgeshare; /** * News Filter (NewsFilter.java) * This filter extends the existing Filter class for our purposes * * @version: 1.0 (Fall, 2016) */ import android.widget.Filter; import java.util.ArrayList; public class NewsFilter extends Filter { ArrayList<NewsCard> searchedL...
JavaScript
UTF-8
716
2.78125
3
[]
no_license
(function(){ function permutations(str) { return walk([], str.split(''), []); } function walk(stack, data, acc) { if (!data.length) return acc.push(stack.slice().join('')); for (var i = 0; i < data.length; i++) { stack.push(data.splice(i, 1)); walk(stack, d...
PHP
UTF-8
1,832
2.71875
3
[]
no_license
<?php namespace App\Entity; use App\Repository\SalleRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=SalleRepository::class) */ class Salle { /** * @ORM\Id * @ORM\GeneratedValue ...
C++
UTF-8
1,865
3.3125
3
[]
no_license
class Solution { public: vector<int> pos{0, 0}; bool isRobotBounded(string ins) { int dir = 1; // dir%4 represents direction, {0,1,2,3} representing {E,N,W,S}. for (int i = 0; i < ins.length(); i++) { if (ins[i] == 'L') // Left means moving anticlockwise (N->W). dir++; else if (ins[i] == 'R') // Right m...
Markdown
UTF-8
1,129
3.03125
3
[ "Apache-2.0" ]
permissive
# ArrayV2 ### Github https://github.com/elmurphy/ArrayV2 ### NPM https://www.npmjs.com/package/arrayv2 New type JavaScript array. Simple linq functions for javascript arrays! -Where<br> -OrderBy<br> -OrderByDesc<br> -Select<br> -SelectMany<br> -GroupBy<br> Every functions has a Set version, the Set function will r...
Java
UTF-8
2,850
2.375
2
[]
no_license
package com.eatanapple.footballscoretracker; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import butterknife...
Java
UTF-8
4,941
2.078125
2
[]
no_license
package codes.ait.applock.Fragments; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.view....
C
UTF-8
2,038
3.03125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* get_next_line.c :+: :+: :+: ...
Java
UTF-8
538
1.757813
2
[]
no_license
package com.pdata.batch.service; import java.util.List; import com.pdata.batch.dto.PeopleDTO; import com.pdata.batch.dto.PeopleDTO2; public interface PeopleGraphService { public void bulkUpload(List<PeopleDTO> peopleDTO) throws Exception; public void bulkUploadToGraph(List<? extends PeopleDTO> items) t...
JavaScript
UTF-8
1,453
2.921875
3
[]
no_license
for (var i = 0; i < document.querySelectorAll("button").length; i++) { document.querySelectorAll(".drum")[i].addEventListener("click", function() { drumaudioplay(this.innerHTML); buttonAnimation(this.innerHTML); }); } document.addEventListener("keydown", function() { drumaudioplay(event.key); buttonAni...
Markdown
UTF-8
1,087
2.8125
3
[]
no_license
# Recursion ## 递归代码摸版 1. 递归terminator 2. 处理当前层逻辑 3. 下探到下一层 4. 清理当前层 ## 递归思路 1. 不要人肉进行递归 2. 找到最近最简的方法,将其拆解成为可重复解决的问题(重复子问题) 3. 数学归纳思想 ## 题解 1. 生成括号 2. 验证二叉搜索树:BST的中序遍历是顺序的 # Divide and Conquer、BackTracking ## 分治 ### 分治代码摸版 ```python def divide_conquer(problem, param1, param2, ...): # recursion terminator if ...
JavaScript
UTF-8
1,704
3.125
3
[]
no_license
class Queen extends ChessPieces{ constructor(color, xposition, yposition, canMove){ super(color, xposition, yposition, canMove); if(this.color == "white"){ this.image = new Image(60, 60); this.image.src = "/images/WhiteQueen.png"; this.image.style.left = this.xpos...
Java
UTF-8
2,311
2.15625
2
[]
no_license
package com.example.demo.model.internal; import java.util.Date; import com.example.demo.model.internal.response.GetUserResponse; /** * @author eguzman (2018.07.02 2:10 PM) */ public class User { private Long id; private String firstName; private String middleName; private String lastName; priva...
C++
UTF-8
699
2.625
3
[]
no_license
#ifndef MYPOLYGON_H #define MYPOLYGON_H #include <QPolygonF> #include <QPointF> class mypolygon { public: mypolygon(); const QPolygonF getCore(){ return _core; } void setCore(const QPolygonF& core){ _core = core; } void optimizeCoord(QPointF _trans, double _scale); private: QPolygonF _core; }; class mypol...
PHP
UTF-8
646
2.609375
3
[]
no_license
<?php use Symfony\Component\HttpFoundation\JsonResponse; class InicioController extends BaseController{ public function visualizarInicio(){ $centro = 0; $centro = Centro::buscar_centro(3);//Consulto mi centro... en nuestro caso el centro cimogsys con codigo 3 if(count($centro)!=0){ $proyectos=Proyectos::l...
Python
UTF-8
984
3.953125
4
[]
no_license
# Thomas Edwards # PHYS 5794 - Computational Physics # 1/27/16 # Homework 1, Problem 3 # Problem statement: # Write a program to calculate the integral # exp(-x) dx, x = [0, 1] # and estimate its numerical accuracy by using the Simpson rule. The numerical accuracy can be # obtained by comparing with the analytical res...
Markdown
UTF-8
2,087
2.5625
3
[]
no_license
# API_Contact_Project Production Support and Developer on Mulesoft V3, V4, Datapower, APIC and others IBM products. #Project Statment - To develop full CRUD operations with incremental updates. - To design API support the API and data model. - Accessable to customer facing and high visibility. #Input date model - Jso...
Ruby
UTF-8
474
2.609375
3
[ "MIT" ]
permissive
require 'rainbow' require 'tty-prompt' require_relative 'interrupt_handler' APP_NAME = Rainbow('ConfC').green # ## ConfC module ConfC # ## Ask to choose existent files to clone. def self.ask_choose_files(existent_files) prompt = TTY::Prompt.new(interrupt: ConfC::INTERRUPT_HANDLER) prompt.multi_select("...
C#
UTF-8
1,950
2.75
3
[]
no_license
using CarClassified.DataLayer.Interfaces; using CarClassified.Models.Views; using System.Collections.Generic; using System.Linq; namespace CarClassified.DataLayer.Queries.ListingQueries { /// <summary> /// Gets active listings /// </summary> /// <seealso cref="CarClassified.DataLayer.Interfaces.IQuery...
JavaScript
UTF-8
3,762
2.546875
3
[]
no_license
/* * * bcnf.js - takes care of input and output * Author: Yo Han Ko (yohanko1) * */ JS.require('JS.Class', 'JS.Module', 'JS.Set', 'JS.Hash'); var output_field_id = "output_field"; var target_attr = null; var relation = document.getElementById("rel"); function bcnf_main(output_div) { var outDiv = document.ge...
Markdown
UTF-8
9,965
2.84375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 人類加上標籤的轉譯指導方針-語音服務 titleSuffix: Azure Cognitive Services description: 若要改善語音辨識的精確度,例如當單字被刪除或不正確地取代時,您可以使用人為標記的轉譯以及您的音訊資料。 人類加上標籤的轉譯是音訊檔案逐字的單字轉譯。 services: cognitive-services author: erhopf manager: nitinme ms.service: cognitive-services ms.subservice: speech-service ms.topic: conceptual ms.date: 09/06/2019 m...
Python
UTF-8
7,437
2.609375
3
[]
no_license
# -*- encoding: utf8 -*- import os import sys import numpy import Tkinter import tkFileDialog from PIL import Image, ImageTk #import matplotlib #matplotlib.use('TkAgg') # XXX Esse backend deixa mais lento o plot, # # mas se não usar não da pra mudar de imagem :/ # #from matplotlib import pyplot ...
C++
UTF-8
514
2.734375
3
[]
no_license
#ifndef TOSSTRING #define TOSSTRING #include <string> static std::string tosstring(System::String^ string) { using System::Runtime::InteropServices::Marshal; if (string->Length == 0 || string->Length < 0) { //MessageBox::Show("No field can be empty"); } System::IntPtr pointer = Marshal::StringToHGlobalAnsi(st...
C#
UTF-8
777
3.265625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp.ProxyPattern { class UserRegistration : IUserRegistration { private List<string> _userDatabase = new(); public void ListAllUsers() { for...
PHP
UTF-8
799
2.6875
3
[ "LGPL-2.1-only", "BSD-3-Clause", "LGPL-3.0-only", "LGPL-2.0-or-later", "Apache-2.0", "BSD-2-Clause", "MIT" ]
permissive
<?php namespace BookStack\Access\Mfa; use Illuminate\Contracts\Validation\Rule; class TotpValidationRule implements Rule { protected $secret; protected $totpService; /** * Create a new rule instance. * Takes the TOTP secret that must be system provided, not user provided. */ public fu...
Swift
UTF-8
817
2.515625
3
[]
no_license
// // LogupModel.swift // EksiSozlukKlon // // Created by Mehmet fatih DOĞAN on 1.04.2021. // import Foundation import Firebase class LogupModel:NSObject{ let firebaseService = FirebaseService() weak var alertView:MutualAlertViewController! var parentView:UIViewController? override init()...
Python
UTF-8
308
3.8125
4
[]
no_license
list_num = [] list_num.extend([1, 2]) # extending list elements print(list_num) list_num.extend((3, 4, 5.5, 6.8)) # extending tuple elements print(list_num) list_num.extend('ABC') # extending string elements print(list_num) evens = [2, 4, 6] odds = [1, 3, 5] nums = odds + evens print(nums)
C
UTF-8
327
3.296875
3
[]
no_license
/* ASSIGNMENT ERROR if array[] or array[n] */ #include<stdio.h> int main() { int array[5]; int idx; for(idx=0;idx<5;idx++) { printf("Enter the values of the array %d:",idx); scanf("%d",&array[idx]); //DOUBT. location is :array[0].... } for(idx=0;idx<5;idx++) { printf("array[%d]=%d\n",idx,array[idx]); } retur...
TypeScript
UTF-8
318
2.546875
3
[]
no_license
import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'searchSeries' }) export class SearchSeriesPipe implements PipeTransform { transform(list: any[], text:string): any[] { if (!text) return list; return list.filter(series => series.title.toUpperCase().includes(text.toUpperCase())); } }
SQL
UTF-8
14,686
3.5
4
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; create database if NOT EXISTS pm; use pm; -- -- Database: `pm` -- -- ---------------------------------------------------- -- Properties CREATE TABLE IF NOT EXISTS `cpm_prop_property` ( `prop_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'property id', `prop_address` text NOT...
Java
UTF-8
7,742
2.03125
2
[]
no_license
package gui; import app.AppCore; import controller.DeleteTopController; import controller.FaSController; import controller.InsertTopController; import controller.ReportTopController; import controller.SearchTopController; import controller.UpdateTopController; import listener.MyListSelectionListener; import observer.N...
C
UTF-8
1,552
3.75
4
[]
no_license
/* ============================================================================ Name : Clase5_1.c Author : Version : Copyright : Your copyright notice Description : Hello World in C, Ansi-style ============================================================================ main: pedir una cantid...
Markdown
UTF-8
1,964
2.640625
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 聊斋志异 · 卷四 · 棋鬼 --- 扬州督同将军梁公,解组乡居,日携棋酒,游林丘间。会九日登高与客弈,忽有一人来,逡巡局侧,耽玩不去。视之,目面寒俭,悬鹑结焉,然意态温雅,有文士风。公礼之,乃坐。亦殊撝谦。分指棋谓曰:“先生当必善此,何不与客对垒?”其人逊谢移时,始即局。局终而负,神情懊热,若不自己。又着又负,益愤惭。酌之以酒,亦不饮,惟曳客弈。自晨至于日昃,不遑溲溺。方以一子争路,两互喋聒,忽书生离席悚立,神色惨阻。少间,屈膝向公座,败颡乞救,公骇疑,起扶之曰:“戏耳,何至是?”书生曰:“乞嘱付圉人,勿缚小生颈。”公又异之,问:“圉人谁?”曰:“马成。” 先是,公圉役马成者,走无常,十数...
SQL
UTF-8
1,351
2.703125
3
[]
no_license
DO $BODY$ DECLARE now_date timestamp with time zone; BEGIN now_date :=now(); RAISE NOTICE 'adding student to roster :Hayes Feather ELA8'; PERFORM addstudenttorosterwithnocourse( state_student_identifier:='001010730', att_sch_displayidentifier:='8_5500', ayp_sch_displayidentifier:='8_5500', ...
Swift
UTF-8
725
3.171875
3
[]
no_license
// // GithubURL.swift // Dasdom // // Created by dasdom on 15.03.16. // Copyright © 2016 dasdom. All rights reserved. // import Foundation enum GithubURL { case Repositories(String) case Users(String) var baseURLString: String { return "https://api.github.com" } func url() -> NSURL? { switch sel...
Python
UTF-8
1,376
2.765625
3
[]
no_license
import requests import pandas as pd import numpy as np """# Get data from Google Drive""" def download_file_from_drive_id(id, destination): URL = "https://docs.google.com/uc?export=download" session = requests.Session() response = session.get(URL, params = { 'id' : id }, stream = True) token = get...